On Tue, 16 Feb 1999, David Miller wrote:

> Nonsense I think, ifconfig removes both network routes for me...
> ? ifconfig eth0 down
> ? route -n
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref Use Iface
> 168.121.1.1     0.0.0.0         255.255.255.255 UH    0      0   0   ppp0
> 127.0.0.0       0.0.0.0         255.0.0.0       U     0      0   0   lo
> 0.0.0.0         168.121.1.1     0.0.0.0         UG    0      0   0   ppp0

Of course this is going to remove all the routes, since without eth0
they're useless.  That's obvious behavior.

The problem is when you have to remove a route with route(8) in order to
do other tricks:

[root@psi omega]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.1.7.0        0.0.0.0         255.255.255.0   U     0      0        0 eth1
10.1.7.0        0.0.0.0         255.255.255.0   U     0      0        0 eth1
10.1.3.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
10.1.3.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         10.1.3.1        0.0.0.0         UG    0      0        0 eth0
[root@psi omega]# route del -net 10.1.7.0 netmask 255.255.255.0
[root@psi omega]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.1.7.0        0.0.0.0         255.255.255.0   U     0      0        0 eth1
10.1.3.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
10.1.3.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         10.1.3.1        0.0.0.0         UG    0      0        0 eth0
[root@psi omega]# 

*This*, IMHO, is broken.  I've been playing with host-routing chains to do
ad-hoc wireless (10.1.7.x is WaveLAN), and it's a pain to have to delete 2
or even 3 routes to the same place before I can get rid of the network
route entirely.  If we *must* have an automagically generated route show
up when you ifconfnig an interface (which I also think is broken), then at
the very least removing a route would remove all duplicate copies of it.
IMO, route(8) adding an identical route to something that already exists
is a bit broken too...

Haven't seen the right code, so I'm unsure if this is a kernel problem
(auto-adding of routes appears to be) or a net-tools issue, so I'm sending
this to both the kernel list (where it came from) and linux-net.

TTYAL,
     Omega

         Erik Walthinsen <[EMAIL PROTECTED]> - Staff Programmer @ OGI
        Quasar project - http://www.cse.ogi.edu/DISC/projects/quasar/
   Video4Linux Two drivers and stuff - http://www.cse.ogi.edu/~omega/v4l2/
        __
       /  \             SEUL: Simple End-User Linux - http://www.seul.org/
      |    | M E G A           Helping Linux become THE choice
      _\  /_                          for the home or office user

-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to