Networking Forums

Networking Forums > Computer Networking > Linux Networking > linux route

Reply
 
 
nadavh@gmail.com
Guest
Posts: n/a

 
      06-05-2006, 02:01 PM
how can i make the default gatewat to be the localloopback?
thanks.

 
Reply With Quote
 
 
 
 
Lew Pitcher
Guest
Posts: n/a

 
      06-05-2006, 02:12 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(E-Mail Removed) wrote:
> how can i make the default gatewat to be the localloopback?


You might want to read the instructions on the route(8) command; see
"man 8 route" for details.

To answer your question, enter the following command as root
route add default gw 127.0.0.1

Of course, you realize that this will totally bork network access to any
IP address that doesn't have an explicit route, don't you?


- --

Lew Pitcher, IT Specialist, Corporate Technology Solutions,
Enterprise Technology Solutions, TD Bank Financial Group

(Opinions expressed here are my own, not my employer's)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFEhDvmagVFX4UWr64RAiSfAJ9QB/Rq8eAQ9ew+W9NWzUrDBz5PmwCdFnbh
kgaJbzwC6Bjvde1bhcr5qIU=
=E3/a
-----END PGP SIGNATURE-----
 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      06-05-2006, 04:46 PM
(E-Mail Removed) writes:

>how can i make the default gatewat to be the localloopback?


Why would you want that? since your machine has no idea how to forward the
packet, why would you send it to the local machine?

 
Reply With Quote
 
nadavh@gmail.com
Guest
Posts: n/a

 
      06-14-2006, 02:25 PM

Unruh wrote:
> (E-Mail Removed) writes:
>
> >how can i make the default gatewat to be the localloopback?

>
> Why would you want that? since your machine has no idea how to forward the
> packet, why would you send it to the local machine?


i am writing a server that listens to packets on the lo.
i have other route rule for traffic to go out of the machine.

 
Reply With Quote
 
Bill Marcum
Guest
Posts: n/a

 
      06-15-2006, 05:11 PM
On 14 Jun 2006 07:25:06 -0700, (E-Mail Removed)
<(E-Mail Removed)> wrote:
>
> Unruh wrote:
>> (E-Mail Removed) writes:
>>
>> >how can i make the default gatewat to be the localloopback?

>>
>> Why would you want that? since your machine has no idea how to forward the
>> packet, why would you send it to the local machine?

>
> i am writing a server that listens to packets on the lo.
> i have other route rule for traffic to go out of the machine.
>

If you want to allow outgoing traffic only to those specific routes, you
don't need a default gateway.


--
Send some filthy mail.
 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      06-15-2006, 08:01 PM
On 14 Jun 2006, in the Usenet newsgroup comp.os.linux.networking, in article
<(E-Mail Removed) .com>, (E-Mail Removed) wrote:

>Unruh wrote:


>> (E-Mail Removed) writes:


>>> how can i make the default gatewat to be the localloopback?


>> Why would you want that?


>i am writing a server that listens to packets on the lo.


Packets that arrive on the lo interface will have one of two types of IP
address for both source and destination - either 127.0.0.0 through
127.255.255.255 (the "localhost" network) or the IP address of one of the
real interfaces of "this" computer. To _reply_ to these packets, the kernel
knows to use the loopback interface.

>i have other route rule for traffic to go out of the machine.


That's great, but the local IP address, or localhost is not reachable
by going outside of the computer. Try this - enter the commands

/sbin/ifconfig -a
ping -c 10 IP.ADD.RE.SS <-- try 127.0.0.1 AND the address of eth0
/sbin/ifconfig -a

Now look at the 'TX packets' and 'RX packets' counts - and note that the
packets used the loopback interface, even if you tried to ping the address
of the Ethernet interface. Why? Because the kernel knows the IP address
translates to itself, and when talking to yourself there is not need to
clutter up the wires with needless noise.

Old guy
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set default gw not by route command in linux? ChaoZhang Linux Networking 31 11-27-2006 11:52 PM
linux 2.6.15 breaks route to outside world? whatdoineed2do@yahoo.co.uk Linux Networking 5 01-12-2006 08:46 PM
multiple ADSL lines on 1 linux box to route outgoing traffic jonathan Linux Networking 1 10-26-2004 01:33 PM
linux multipath per session route alexp Linux Networking 0 08-22-2003 01:16 AM
Linux automatic route after bringing up interface Peteris Krumins Linux Networking 2 07-31-2003 06:13 PM



1 2 3 4 5 6 7 8 9 10 11