Subject: problems with 'route delete' - a bug?
To: Current Users <current-users@NetBSD.ORG>
From: Jukka Marin <>
List: current-users
Date: 06/13/1996 18:05:46
I have a gateway machine (NetBSD 960413, i386) which has a weird problem
with routing.  I route two subnets over two different PPP links.  When the
PPP link dies, the route is not deleted and if I try to delete it manually,
the system claims that the route does not exist.  When the PPP link comes
up again, probably on a different ppp unit, a new route will not work
because the old one still exists.

It's like this:

I had a PPP connection on interface ppp0, which then died.  The following
commands were run on the gateway machine; the remote gateway is
and the subnet over the PPP link is 194.100.50, netmask

# netstat -r
Destination      Gateway            Flags     Refs     Use    Mtu  Interface
194.100.50     UGS         0       53      -  ppp0

# route delete -net 194.100.50
writing to routing socket: No such process
delete net 194.100.50: not in table

# route delete
writing to routing socket: No such process
delete net not in table

# route delete
writing to routing socket: No such process
delete net gateway not in table

# route get
   route to:
  interface: ppp0
 recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu     expire
       0         0         0         0         0         0         0         0

So: netstat -r still reports the route, but 'route delete' can't find it.
If I ask a route to the subnet with 'route get', it is reported correctly.

The real problem is that if someone else allocates ppp0 and the previous
PPP link to 194.100.50 is then re-established, it will be using ppp1 or
ppp2 etc. while the route is _still_ pointing to ppp0.  I have a 'route
delete' and a 'route add' command in my /etc/ppp/ip-up which try to delete
the old route and set up a new one, but they don't do any good because the
old route can NOT be deleted at all.  The only way I can make the old route
go away is rebooting the system (which I can't do, not every time a PPP
link drops).

I know I _have been_ able to remove similar routes before; I have also seen
this problem several times before.  I believe the route becomes 'dead' when
the PPP interface goes down.  I think the route should be automatically
removed OR stay 100% ok - now it seems that it dies so that it can no longer
be removed, but is still effective and trying to route the subnet to the
old ppp interface.

Has anyone seen this?  Has this been fixed?  Is this a bug?  How can I
remove the dead route?

HELP!!! ;-)