Filtering dhcp - private ip

Hi!

The ISP gives internet access over a cable modem. If the cable modem does not sync up, it will give dhcp an address from the 192.168.0.0/16 pool.
I would not like to accept dhcp from this domain, only from a public domain. How could this be configured in the routing filter dynamic-in branch?

disable DHCP client on your WAN interface, assigne a Public IP or IPs to it.

I’m sorry, but this solution is unacceptable.
What will you do, when the isp give ip from an another pool?
(Of course there is no fixed ip)
The best solution will be only accept from public pool.
I want a routing filter which will filtering any dhcp answer where gateway is on bogon space.

The only way I see it happen is the cable modem to be configured as a bridge, then it will pass whatever the public IP to you.

The cable modem configured as a bridge. But when the cable modem cannot sync up to cmts, then it will run a dhcp server and give you an ip address. (Debug function)
Of course in this case there is no internet on this interface. I configured a second (LTE based) internet with higher distance value. But because the modem give an address with the same distance value, this solution can’t working.
Second problem is the given address pool are in use in another site (over vpn).
Detect internet function is not a good solution, only for home users.

I’d suggest to use Netwatch to check 8.8.8.8, then use a script to disable / enable route to gateway