Routing Table (Feature)

Richard B. Johnson (root@chaos.analogic.com)
Tue, 16 Feb 1999 14:05:37 -0500 (EST)


When the startup scripts initialize the network, they generally
do `route add -net NNN.NNN.NNN.0 netmask MMM.MMM.MMM.MMM dev DEV`
This is for compatibility. Alexy's latest code automatically adds
a route when `ifconfig` is executed. This has not caused any problems
unless, when a ppp connection is established, you modify the routing
table to correspond to the new configuration.

Please don't tell me you don't have to. It depends upon the configuration.
My configuration changes the actual network and routes between two
networks so I have connectivity between all my home machines and the
internet via my ppp link.

In changing the network, from 204.178.40.0, netmask 255.255.248.0 to
204.178.47.0, netmask 255.255.255.0, it is necessary to delete the
existing network, i.e., `route del -net 204.178.40.0 netmask 255.255.248.0`
and add the new one. Unfortunately, the routing table contains two
entries for the same network:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
204.178.40.0 * 255.255.248.0 U 0 0 0 eth0
204.178.40.0 * 255.255.248.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default cisco.analogic. 0.0.0.0 UG 1 0 0 eth0a

The `ifconfig` command only deletes one. The command has to be executed
twice to delete the second one. The problem is that when my ppp link
is shut down, I do not add two identical routes back (nor should I).
The result is that the second time the ppp link is established, I will
get an error if I try to delete two routes. So, a work-around of
always deleting two identical routes doesn't work very well.

Therefore, since it has now become the De-facto standard to automatically
add routes when the interface is configured, I respectfully ask that
when a route is deleted, the kernel software delete all entries of that
same route. Since time is not critical, looking through the whole routing
table, rather than just exiting when the first equivalent entry is
found, will go a long way towards helping to maintain compatibility
with existing SYSV systems.

Cheers,
Dick Johnson
***** FILE SYSTEM WAS MODIFIED *****
Penguin : Linux version 2.2.1 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.
Wisdom : It's not a Y2K problem. It's a Y2Day problem.

-
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/