Michael Silver schrieb:
>
> I have a FreeBSD server (4.2) that is on an unreliable internet connection.
> When the connection goes down, I get the expected 'no route to host'
> message.
>
> The problem is, when the connection returns, I continue to get the 'no route
> to host' error message. How can I set FreeBSD to recover from the lost
> connection without a reboot?
First, check all interfaces are up: ifconfig -a
# ifconfig -a
rl0: flags=8843 mtu 1500
^^^^
This interface works
inet 10.0.0.111 netmask 0xff000000 broadcast 10.255.255.255
inet6 fe80::2e0:7dff:fe95:8d29%rl0 prefixlen 64 scopeid 0x1
ether 00:e0:7d:95:8d:29
media: autoselect (100baseTX ) status: active
supported media: autoselect 100baseTX 100baseTX
10baseT/UT
P 10baseT/UTP 100baseTX
fxp0: flags=8843 mtu 1500
^^^
This one does not.
To bring an interface back up
ifconfig up.
Next, check the route to the destination network is still there: Netstat
-rn
# netstat -rn
Routing tables
Internet:
Destination Gateway Flags Refs Use Netif
Expire
default 192.168.0.1 UGSc 2 104586 fxp0
^^^
U: This route is working
Assuming the default route does not work, simply
# route delete default
# route add default 192.168.0.1
would do the trick.
HTH
-Christoph Sold
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message