Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 May 1998 13:56:17 +0200
From:      Pierre Beyssac <Pierre.Beyssac@hsc.fr>
To:        freebsd-net@FreeBSD.ORG
Subject:   weird route behaviour (2.2.6)
Message-ID:  <19980527135617.A733@mars.hsc.fr>

next in thread | raw e-mail | index | archive | help
Uh, I'm having the following strange routing table problem on a
freshly-installed 2.2.6 system.

I should probably mention that this is for a laptop, and ep0 is a
PCMCIA card I removed and inserted a number of times when tweaking
the config. This seems to have left the routing table in a weird
state.

1) I have (or rather, netstat shows) the following simple routing
   table. The machine sits on a.b.c.32/27 (ep0). All the rest is
   routed to a.b.c.58, a router.

Destination        Gateway            Flags     Refs     Use     Netif Expire
default            a.b.c.58           UGSc        0        0       ep0
127.0.0.1          127.0.0.1          UH          0       72       lo0
a.b.c.32/27        link#5             UC          0        0 
a.b.c.33           8:0:20:d:2b:ec     UHLW        0      912       ep0   1184
a.b.c.58           0:0:c:f8:5e:31     UHLW        1        0       ep0    843

2) yet, the routing entry for machines in subnet a.b.c.192/27
   (should be the default entry) is not found:

$ ping a.b.c.193
PING a.b.c.193 (a.b.c.193): 56 data bytes
ping: sendto: No route to host

   [adding an host route to the same IP address through the same router works]

3) attempting to remove the default route fails, but attempting to _change_
   it succeeds:

# route delete default a.b.c.58 
writing to routing socket: No such process
delete net default: gateway a.b.c.58: not in table
# route change default a.b.c.43 1
change net default: gateway a.b.c.43

4) even funnier, flushing the routes then adding an explicit route
   to subnet a.b.c.192/27 simply puts the "default" entry back
   instead of adding the route:

(just after route flush)

Destination        Gateway            Flags     Refs     Use     Netif Expire
127.0.0.1          127.0.0.1          UH          0       86       lo0
a.b.c.32/27        link#5             UC          0        0 
a.b.c.33           8:0:20:d:2b:ec     UHLW        2     1062       ep0   1199
a.b.c.58           0:0:c:f8:5e:31     UHLW        0        0       ep0    476

# route add a.b.c.192 -netmask 0xffffffe0 a.b.c.58 1
add net a.b.c.192: gateway a.b.c.58
# netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags     Refs     Use     Netif Expire
default            a.b.c.58           UGSc        0        0       ep0
^^^^^^^ ????
127.0.0.1          127.0.0.1          UH          0       88       lo0
a.b.c.32/27        link#5             UC          0        0 
a.b.c.33           8:0:20:d:2b:ec     UHLW        1     1085       ep0   1197
a.b.c.58           0:0:c:f8:5e:31     UHLW        1        0       ep0    376


This all looks odd to me. Am I missing something obvious or should
I start digging into route & friends ? I haven't tried rebooting
(I assume this would solve the problem) because it's not the first
time I encounter such a problem and I'd like to get this nailed...
-- 
Pierre.Beyssac@hsc.fr

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980527135617.A733>