[780] in linux-net channel archive
Re: Prob. w/ dummy module and Linux 1.2.11/ELF
daemon@ATHENA.MIT.EDU (Nick Holloway)
Wed Jul 26 19:29:22 1995
To: submit-linux-dev-net@ratatosk.yggdrasil.com
From: Nick Holloway <Nick.Holloway@alfie.demon.co.uk>
Date: 25 Jul 1995 23:38:40 +0100
In <3v320v$uai@smurf.noris.de> on linux.largesites
urlichs@smurf.noris.de (Matthias Urlichs) writes:
> > /sbin/route add 198.68.8.251
>
> NB: If you want to be able to ping yourself, do
> /sbin/route add 198.68.8.251 dev lo
> instead.
This comment is not directed at Matthias in particular, he is just the
most recent person to raise this.
Where has the `wisdom' that "dev lo" should be added when adding a route
for the dummy device come from?
This came up on my ISP's newgroups, and it turned out that having
the route through the loopback device actually caused problems with
recognising where the connection was from.
If you connect to the IP address on the dummy device, rather than the
connection being shown as coming from the IP address, it shows it as
coming from the loopback address. You can see this by trying the route
with and without the "dev lo", and running "who" after a telnet to your
own address.
Not being able to ping yourself with the normal route is certainly not
the reason, as I can demonstrate:
$ netstat -rn
Kernel routing table
Destination net/address Gateway address Flags RefCnt Use Iface
127.0.0.0 * UN 0 125725 lo
158.152.44.128 * UH 0 0 dummy
$ ping -c1 158.152.44.128
PING 158.152.44.128 (158.152.44.128): 56 data bytes
64 bytes from 158.152.44.128: icmp_seq=0 ttl=255 time=3 ms
--- 158.152.44.128 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 3/3/3 ms
--
`O O' | Home: Nick.Holloway@alfie.demon.co.uk
// ^ \\ | Work: Nick.Holloway@parallax.co.uk http://www.parallax.co.uk/~alfie/