Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Feb 2002 10:08:58 -0500
From:      Bill Moran <wmoran@potentialtech.com>
To:        questions@freebsd.org
Subject:   default route disappears
Message-ID:  <02022510085801.00731@proxy.pt.com>

next in thread | raw e-mail | index | archive | help
I have a FreeBSD 4.4 machine acting as a gateway and
occasionally the default route will disappear.

The machine has two network cards and is running vtund
to create a vpn across the external interface.  This vpn
is where the default route goes (to an upstream gateway)
Thus:
xl0 = 10.1.1.1 (external)
fxp0 = 192.168.43.254 (internal)
tun0 = 172.16.0.2 -> 172.16.0.1 (vtund created interface)

netstat -r shows:
Routing tables
 
Internet:
Destination        Gateway            Flags    Refs      Use  Netif Expire
default            172.16.0.1         UGSc        6     1162   tun0
10.1.1/24          link#2             UC          1        0    xl0
10.1.1.200         0:60:8:bd:1d:3e    UHLW        2   321886    xl0   1121
172.16.0.1         172.16.0.2         UH          9      225   tun0
192.168.43         link#1             UC         12        0   fxp0
192.168.43.2       0:2:b3:62:6f:7d    UHLW        1       67   fxp0   1137
<SNIPPED additional unrelated routes>

Occasionally, the default route will simply disappear.  I have
yet to see anything in /var/log/messages indicating why this
happens and my best guess is this:  The external interface
connects across a long-distance wireless connection and
I'm assuming that occasionally the connection is lost for
short periods of time (due to any number of factors) and
the vtun goes down, thus the route to 172.16.0.1 disappears
(when tun0 goes down).  Since vtund is set to automatically
reconnect, as soon as the wireless becomes available again,
the interface comes back up, and the route to 172.16.0.1
reappears.  However, at some point the default route was lost.

I tried adding a statement to add the default route when the
vtund reconnects but it doesn't seem to work.  Why does
the default route disappear?  How can I add it in such a way
that it will not disappear?

-- 
Bill Moran
Potential Technology technical services
http://www.potentialtech.com

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




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