12/18 How does a unix box decide when to send traffic to the default
route? ARP or network address?
\_ network address
\_ So what is ARP used for these days?
\_ ARP maps IP to MAC. Without the ARP table, you
can't send ethernet frames to your router, etc.
\_ So you really dont need to keep track of ARP broadcasts
from other people on your subnet, since the switch and
router figure out where everythign should go?
\_ If you have a switch, but you can't assume that
you are connected to a switch, since you could
be connected to a hub and there is no easy way
to determine that in software.
\_ Huh? Default route is gateway of last resort; if a machine can't
find a more specific route via another IP (i.e. a multihomed box,
or a computer on a segment with several gateways) it sends traffic
to the default gateway. If it's on an ethernet segment, traffic
gets to that default router via ARP, otherwise via whatever other
layer2 protocol is used. Two different things. -John
\_ UH, default route points to an IP address, ARP is what the system
uses to find out what ethernet MAC address is associated with that
IP address.
\_ I think he means does the unix box send out an arp request
for an IP address which it knows is outside the local network
(because of the subnet mask), or does it just send the packet
to the default route. I don't know, but snoop the network and
you'll find out.
\_ the kernel tries to send out a packet, wants to send it to
the default route, and if there's no arp entry for the
gateway router's ip address, either holds onto the packet
until it gets an arp entry, or dumps it. If the gateway
IP isn't on one of the connected networks, what happens then
is system dependent (some systems wont let you set a default
route to an ip address it has no route for).
\_ if the gateway IP is not a directed connected network
(or a network which the host has a static route to it).
it's a configuration error.
\_ well some (broken) systems *will* let you configure
a default router ip address that has no routes to it.
not exactly an 'error' in the frame of its
configuration, but still something that shouldn't work. |