Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!ames!ucbcad!ucbvax!TOPAZ.RUTGERS.EDU!hedrick From: hedrick@TOPAZ.RUTGERS.EDU (Charles Hedrick) Newsgroups: mod.protocols.tcp-ip Subject: (none) Message-ID: <8703200509.AA15526@topaz.rutgers.edu> Date: Fri, 20-Mar-87 00:09:53 EST Article-I.D.: topaz.8703200509.AA15526 Posted: Fri Mar 20 00:09:53 1987 Date-Received: Sat, 21-Mar-87 09:11:19 EST Sender: daemon@ucbvax.BERKELEY.EDU Distribution: world Organization: The ARPA Internet Lines: 32 Approved: tcp-ip@sri-nic.arpa Yes, your theory is correct. You can make any network be treated as local by doing route add 0 (in 4.2. In 4.3 I think there is some minor difference, like omitting the 0.) I thought somebody had explained this before. 4.2 works like this: route-packet (destination-address) lookup destination-address as a host in host routing table [entries that show with "H" in flags field of netstat -r] if that fails, lookup network(destination-address) as a network in network routing table [entries without an "H"] if that fails, look for default route if that fails, say destination unreachable now we have a route. If the metric is 1 or larger [metric is the last field in the "route add" comment. You can tell from the route command because routes with a metric >= 1 will show a "G" in the flags field], this is a normal gateway entry. Send packet to the host listed in the gateway field. If the metric is 0 [route add command ended in zero, or in some versions, the metric was omitted. netstat -r does not show "G" in the flags field], this is a "route to the interface". Send packet out the interface listed in the interface column. If interface is an Ethernet, use ARP. Note that the gateway address (gateway field in netstat -r) is irrelevant in the case of a route to the interface. The route add command uses that address only to figure out which interface to associate with the route. So when setting up a route to an interface, the simplest approach is to use your own address on that network.