Routing table curiosity

George Bonser (grep@shorelink.com)
Thu, 19 Aug 1999 22:35:10 -0700 (PDT)


2.2.12pre8 kernel
Three Ethernet interfaces

netA 192.168.10.0
netB 192.168.20.0

ifconfig eth0 192.168.10.1 netmask 255.255.255.0
ifconfig eth1 192.168.20.1 netmask 255.255.255.0

Start routed. Routes are advertized properly on both interfaces and routes
being advertized by other hosts on netA are picked up and installed
properly. So far so good.

Now, stop routed.
ifconfig eth0 down
ifconfig eth2 192.168.10.1 netmask 255.255.255.0

and move the cable from eth0 to eth2

Quick look at the routing table shows netA being routed out eth2 ... cool.

Start routed .... trouble.

All routes picked up via RIP on netA are now installed on eth0 which is
marked down!

Looks like something (either routed or the kernel) when being told to
install a route is simply going down the list of interfaces and using the
fist candidate it finds without checking to see if the interface is up or
not. If the interfaces is down, it should continue scanning for a
candidate interface for the route and use the dead one only if a better
one does not exist.

Is there some way to "umplumb" an interface to take it back to its state
before it was configured?

George Bonser

"When someone annoys you, it takes 32 muscles to frown, but it only
takes 4 muscles to extend your arm and smack them in the head."

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/