[CUWiN-Dev] default route disappearance

David Young dyoung at pobox.com
Thu Sep 7 19:11:12 CDT 2006


Tonight I am investigating problems with default routes.  I logged into
the library, and found that it had lost its default route.  The linkstates
were in a curious condition, with the library node advertising a default
itself!

$ grep ^0 /var/db/routes
0.0.0.0/0 nexthop 0.0.0.0, sip0, gen 340, [(etx, 65535), (hopcount, 1), (backplane-hopcount, 0), (network-radius, 1)]
$ grep '0\.0\.0\.0' /var/db/linkstates
4-ref foreign router lsa interface 0.0.0.0 type stub masklen 0 index 1 neighbor 10.236.24.254 seqno 0 flags 0x1<UP> metrics [(etx, 65535)]
4-ref foreign router lsa interface 0.0.0.0 type stub masklen 0 index 2 neighbor 10.176.196.254 seqno 0 flags 0x1<UP> metrics [(etx, 65535)]
6-ref original router lsa interface 0.0.0.0 type stub masklen 0 index 2 neighbor 10.177.40.254 seqno 0 flags 0x1<UP> metrics [(etx, 65535)]
$ grep ^0 /var/db/routes
0.0.0.0/0 nexthop 0.0.0.0, sip0, gen 436, [(etx, 65535), (hopcount, 1), (backplane-hopcount, 0), (network-radius, 1)]
$ ifconfig sip0
sip0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
        address: 00:00:24:c2:b1:28
        media: Ethernet autoselect (100baseTX full-duplex)
        status: active
        inet 10.177.40.254 netmask 0xffffff00 broadcast 10.177.40.255
        inet6 fe80::200:24ff:fec2:b128%sip0 prefixlen 64 scopeid 0x2
        inet6 fdb4:542d:dc11:b128:200:24ff:fec2:b128 prefixlen 64

The original linkstate may expire after a while, but more likely is that
hslsd is restarted.  The linkstate may be reflected to the new hslsd
instance; it appears that is what happened here,

$ grep '0\.0\.0\.0' /var/db/linkstates
4-ref foreign router lsa interface 0.0.0.0 type stub masklen 0 index 2 neighbor 10.176.196.254 seqno 0 flags 0x1<UP> metrics [(etx, 65535)]
4-ref foreign router lsa interface 0.0.0.0 type stub masklen 0 index 1 neighbor 10.236.24.254 seqno 0 flags 0x1<UP> metrics [(etx, 65535)]
4-ref foreign router lsa interface 0.0.0.0 type stub masklen 0 index 2 neighbor 10.177.40.254 seqno 0 flags 0x1<UP> metrics [(etx, 65535)]
4-ref foreign router lsa interface 0.0.0.0 type stub masklen 0 index 2 neighbor 10.49.116.254 seqno 0 flags 0x1<UP> metrics [(etx, 65535)]

The 10.177.40.254 -> 0.0.0.0 linkstate is the problem linkstate.

Seeing this, three questions came to mind.  First, why does hslsd at the
library advertise a default, anyway?  Second, are we protected against
routes like that errant default lingering forever in the routing domain?
Third, is a router protected against using a stale static routes that has
been reflected to it?

The answers to the latter two questions are most certainly "no."
That is a problem that I need to treat with some modifications to hslsd.
The answer to the first question is, "I don't know."  dhcpselect is
implicated in the problem, though.  I don't quite know what to make
of this:

$ cat /etc/internet-connected
sip0
$ pgrep dhclient
$ pgrep dhcpd
18632
$ 
$ 
$ 
$ tail /etc/rc.conf.d/hslsd
#
hslsd_flags="$hslsd_flags -f inet -t ptmp -i ath0 -i sip0 -m"
#
# Node-specific configuration (IPv6).
#
hslsd_flags="$hslsd_flags -f inet6 -t ptmp -i ath0 -i sip0 -m"
hslsd_flags="$hslsd_flags -f inet6 -t stub -i ath0 -p fdb4:542d:dc11:ed44:202:6fff:fe20:ed44/64 -i sip0 -p fdb4:542d:dc11:b128:200:24ff:fec2:b128/64"
hslsd_flags="$hslsd_flags -f inet -t stub -i sip0 -p 0.0.0.0/0 -i sip0 -p 10.177.40.254/24"
hslsd_flags="$hslsd_flags -f inet -t ptmp -i ath0 -w 15,/usr/sbin/tickle"
hslsd=YES
$ 

Oh.  The answer is in /var/log/dhcpselect.  Check this out:

Starting hslsd.
20060907234717 hsls_server_create: created server 0x804e10c
20060907234717 parse_watchdog: enter
20060907234717 optstate_addwatchdog: enter
Sep  7 18:52:46 cuw dhcpselect[647]: test-for-net-connection: sip0: testing for 
a net connection..
Sep  7 18:52:47 cuw dhcpselect[647]: test-for-net-connection: sip0: no net conne
ction
Sep  7 18:54:15 cuw dhcpselect[647]: setting expired interface sip0 to dhclient 
mode
Sep  7 18:54:15 cuw dhcpselect[647]: Setting sip0 to dhclient.
Sep  7 18:54:16 cuw dhcpselect[647]: Stopping dhcpd.
Sep  7 18:54:17 cuw dhcpselect[647]: Stopping dhclient.
Sep  7 18:54:19 cuw dhcpselect[647]: Starting dhclient.
Sep  7 18:54:34 cuw dhcpselect[647]: dhclient: sip0 failed to bind!
Sep  7 18:54:36 cuw dhcpselect[647]: Setting sip0 to dhcpd.
Sep  7 18:54:37 cuw dhcpselect[647]: Stopping dhcpd.
Sep  7 18:54:39 cuw dhcpselect[647]: Stopping dhclient.
Sep  7 18:54:41 cuw dhcpselect[647]: Starting dhcpd.
Sep  7 18:58:37 cuw dhcpselect[647]: test-for-net-connection: sip0: testing for 
a net connection..
Sep  7 18:58:41 cuw dhcpselect[647]: test-for-net-connection: sip0: found a net 
connection
Stopping hslsd.
Stopping zebra.
Configuring hslsd and zebra.
Writing zebra config for ath0 sip0
Starting zebra.
Starting hslsd.
20060907235849 hsls_server_create: created server 0x804e10c
20060907235849 parse_watchdog: enter
20060907235849 optstate_addwatchdog: enter

Looks like there is a small wart in the dhcpselect's new "check for
Internet" feature.

Dave

-- 
David Young             OJC Technologies
dyoung at ojctech.com      Urbana, IL * (217) 278-3933


More information about the CU-Wireless-Dev mailing list