Need to retry DHCP until I get public IP from cable modem



  • I have a crappy cable service that keeps dropping the connection between the cable modem and the internet. When the modem loses this connection it gives a private (192) IP address to the pfsense router plugged into it. Once the connection comes back there is no indication of this to the router (such as the Ethernet going down and then back up again). So the router keeps it's private IP and can't reach the internet. I have to manually go to Status->Interfaces and release and renew the WAN IP.

    I would like there to be a way to do this automatically. It can't be periodic: the algorithm is "If I am given a private IP keep requesting a new one until I get a public IP". The public/private test could be the ability to ping the gateway.

    Any ideas?



  • There was very recently a thread about exactly this.
    The solution was basically to configure the dhcp client to decline rfc1918 ips.
    I cant find the link to this thread right now. Will look again for it when i'm at a computer and not on my mobile.



  • Ive never had a cablemodem (not a gateway) that didn't do this. Reason for the design is so that the device behind it can still access the modem page for diagnostics.

    Still it is a pain if the connection goes down and the router grabs (usually) 192.168.100.X then I have to either do it myself or have someone on site reset the interface.

    But for all reading keep in mind that if you lose your address while the cablemodem is down you will not easily be able to see the modems webpage to see whats up at least without setting the address yourself.



  • @GruensFroeschli:

    There was very recently a thread about exactly this.
    The solution was basically to configure the dhcp client to decline rfc1918 ips.

    Check

    http://redmine.pfsense.org/issues/2704
    http://forum.pfsense.org/index.php/topic,56330.0.html



  • @dhatz:

    @GruensFroeschli:

    There was very recently a thread about exactly this.
    The solution was basically to configure the dhcp client to decline rfc1918 ips.

    Check

    http://redmine.pfsense.org/issues/2704
    http://forum.pfsense.org/index.php/topic,56330.0.html

    Thanks this looks great. I already have an alias on the interface to access the modem webpage whilst the connection is up and running. So rejecting the bad IP is I think the perfect solution.


Locked