How to block dhcp from cable modem, but not from cable company

Hi,

I have two ISPs connected to my router, BigCable and BigTelco(DSL). BigCable is my primary ISP with BigTelco as my backup. This worked flawlessly, until I upgraded my cable modem.

The new cable modem has an internal DHCP server that will hand the router an 192.168.100.0/24 (usually .10) address (guess for modem setup for new installations).


/ip dhcp-client print terse output:

0 comment=defconf interface=ether1 add-default-route=yes default-route-distance=1 use-peer-dns=no use-peer-ntp=no dhcp-options=hostname,clientid status=bound address=192.168.100.10/24 gateway=192.168.100.1 dhcp-server=192.168.100.1 expires-after=24s

My routing filter rule detects a gateway ping and puts BigCable at the top of my routing table (distance 1).


/routing filter add chain=dynamic-in distance=1 prefix=0.0.0.0 prefix-length=0 set-check-gateway=ping set-route-comment=BigCable

This state leaves my network without internet access until BigCable fixes their end and the cable internet is backup, then I get the following:


0  comment=defconf interface=ether1 add-default-route=yes default-route-distance=1 use-peer-dns=no use-peer-ntp=no dhcp-options=hostname,clientid status=bound address=realinternetaddress/22 gateway=realinternetgatewayaddress dhcp-server=realinternetaddress primary-dns=realinternetaddress secondary-dns=realinternetaddress expires-after=2d23h4m57s

So, the modem is passing through DHCP from BigCable, when BigCable outage is over.

I tried blocking the 192.168.x.x DHCP from the modem with the following fw rule:


add action=drop chain=input comment=\
    "drop dhcp from modem that is not from bigcable" in-interface=ether1 \
    protocol=udp src-address=192.168.100.0/24 src-port=67-68

But, no luck.

What am I missing here?

Thanks.

don’t see how you configured route for Telco connection but chelck out tutorias for loadbalancing with fail-over.

instead of letting your DHCP client add default route for you,

add-default-route=yes

, disable this option, create you own static route for the BigCable connection. it looks similar to the dynamically created one but set your gateway to an Internet IP, like 8.8.8.8 and enable check gateway by ping. This route will be disabled once the ping to 8.8.8.8 times out, then in turn enable the route for Telco.

Maybe best would be to ask your ISP to place modem in bridge mode?
In that case you would get public IP on MT, so simple metric can do the job.