On Thu, 21 Sep 2006, in the Usenet newsgroup comp.os.linux.networking, in
article <(E-Mail Removed)> , Duane Evenson wrote:
>looking at the output from netstat -rn...
/sbin/route -n would be another way to look at the same information
>My books and some internet sites use the interface's IP address for
>networks' gateway. My computer and other internet sites use 0.0.0.0
>as the gateway.
Hmmm, none of the UNIX boxes I have access to use the interface address,
and I don't recall any off the top of the head. On the other hand,
when microsoft invented networking, they put their own weird twist on
things, probably because they didn't understand it, and didn't want to
use tools and standards that had been around 13 years before.
In windoze, (host = 192.168.1.2 default gateway = 192.168.1.1), you'd see
route print
Network Address Netmask Gateway Address Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.2 1
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
192.168.1.0 255.255.255.0 192.168.1.2 192.168.1.2 1
192.168.1.2 255.255.255.255 127.0.0.1 127.0.0.1 1
192.168.1.255 255.255.255.255 192.168.1.2 192.168.1.2 1
224.0.0.0 224.0.0.0 192.168.1.2 192.168.1.2 1
255.255.255.255 255.255.255.255 192.168.1.2 192.168.1.2 1
compared to (in this case Linux)
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
224.0.0.0 0.0.0.0 240.0.0.0 U 0 0 0 eth0
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 eth0
so four lines instead of seven. Incidentally, windoze got it wrong above, as
the network mask for Multicast is not 224.0.0.0 (which would be 224.0.0.0
through 255.255.255.255), but is 240.0.0.0 (224.0.0.0 - 239.255.255.255).
Also, the main difference between the various *nix is the name given to the
interface. Linux used 'ethX', but others use different letters, such as hmeX
or leX (Sun), ecX or etX (IRIX) and so on (where the X is a number).
>Where can I go to get this difference explained? This seems to be an "of
>course" topic I'm missing.
In *nix, we refer to the interface by name - while microsoft refers to it
by IP address. This appears to be part of the "baffle 'em with bullsh!t"
techno-babble used to scare away the curious. What to read... how about
the "Linux Network Administrator's Guide" from the Linux Documentation
Project (
http://tldp.org/guides.html), or you can buy the dead-tree edition
from O'Reilly and Associates (
www.ora.com) as ISBN 0-596-00548-2 for US$35.
>A wild guess is that newer versions of the router daemon don't need the
>interface's IP address.
Some of this is semantics - you use a "gateway" to reach some _other_
network that isn't directly attached to your system. In the above listing,
the networking code doesn't use a gateway to send to local addresses,
because they can be reached directly.
Old guy