Re: Router/Gated config

H. Peter Anvin (hpa@zytor.com)
Thu, 9 May 1996 19:38:14 -0700 (PDT)


> >=20
> Why ? I've read TCPIP Illustrated (I think you know it) at page
> 119. The basic scheme for ICMP redirect messages is :
>=20
> if a host receive a packet, then forward it using the same iface
> it came from, you send an ICMP redirect something. Isn't it
> exactly that ? except it's for hosts, and not an entire net
> (there is an ICMP message which is "redirect for host" (type 5 code 1=
))
>=20

Yes. But a router between several networks have *several*
interfaces. In this case the networks and the interfaces happen to
share the same hardware, however, they are still separate interfaces
for the purpose of IP.

To explain why that is, consider what would happen if this really
would result in an ICMP request.

Host A: 192.168.1.100
Host B: 192.168.2.100
Host AB: 192.168.1.1 and 192.168.2.1 (router)

Netmask 255.255.255.0

Host A wants to communicate with host B. As so, it sends the packet
to its gateway, host AB. Host AB generates an ICMP redirect for
192.168.2.100. Suddently host A has an entry in its routing table
that *points to another network*!! The code for host A has no way of
knowing it is supposed to send out an ARP request for that address; in
fact, it is supposed to consult the routing tables to find out the
appropriate gateway -- an infinite loop!

Hence, this does not happen. As far as host AB is concerned,
192.168.1.1 and 192.168.2.1 are two separate Ethernet interfaces (they
can be referred to as eth0 and eth0:1 for example) that just happen to
share the same hardware.

-hpa

--=20
PGP public key available - finger hpa@zytor.com
"The earth is but one country, and mankind its citizens." -- Bah=E1'u=
'll=E1h
"One net to rule them all, one net to find them, one net to bring them =
all
and using Unix bind them." -- Alan V. Shackelford