router doesn't work if rebooted while network is down
Matthew Dillon
dillon at apollo.backplane.com
Sat Jun 15 11:55:01 PDT 2013
:Last night the power blinked for a second, which took the cable signal down. I
:restarted the router. The cable signal is now up, and I have an external
:address, but I can't ping out from my other boxes. I ran "pfctl -s rules" and
:saw this wrong line:
:
:block drop in inet from 192.168.100.10 to any
:
:where 192.168.100.10 is the address that the cable modem gives when it has no
:signal. Reloading the rules corrects the address, but I still can't ping out
:from the router. I can't do "rcrun restart netif" because of bug 2425. I have
:to reboot it; then everything works. How can I fix it?
:
:Pierre
What is happening is that the cable modem is serving a non-routable
IP address to your computer when the cable modem does not have
connectivity, instead of the routable address it would normally serve
out.
The easiest solution is to tell your computer's dhclient to not accept
that broken address, so dhclient just tries forever until it gets the
real address.
You can do this via /etc/dhclient.conf like this:
# specify the correct interface here
#
interface "em0" {
supersede routers 10.0.0.1;
request subnet-mask;
require subnet-mask;
reject 192.168.100.1;
reject 192.168.100.10;
}
Where you have a reject line for the IP the cable modem would otherwise
try to assign you.
--
The way to manually fix it during testing is to just kill the dhclient
on the interface and then re-run 'dhclient <interface>'.
-Matt
Matthew Dillon
<dillon at backplane.com>
More information about the Users
mailing list