Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Jun 2001 12:03:51 +0200
From:      Christoph Sold <so@server.i-clue.de>
To:        Michael Silver <michaelas@yahoo.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: How to recover from ''No route to host' without a reboot?
Message-ID:  <3B3C5287.4452CDE2@i-clue.de>
References:  <003501c10075$e626f150$0200000a@silvertriad>

next in thread | previous in thread | raw e-mail | index | archive | help


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
<snip>
# ifconfig -a
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> 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 <full-duplex>) status: active
        supported media: autoselect 100baseTX <full-duplex> 100baseTX
10baseT/UT
P <full-duplex> 10baseT/UTP 100baseTX <hw-loopback>
fxp0: flags=8843<BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
               ^^^
               This one does not.
</snip>

To bring an interface back up

ifconfig <interface> up.

Next, check the route to the destination network is still there: Netstat
-rn

<snip>
# 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
</snip>
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




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