dnsmasq pushing static route over DHCP
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 23 Oct 2022 06:52:08 UTC
Hello all, I have a machine running dnsmasq to provide DNS and DHCP services to my small network. All machines are running FreeBSD 13-stable as of a week ago. Dnsmasq is installed from the port and is version 2.87. I use DHCP options to push the default route to the clients. The relevant bit of my dnamasq.conf is: dhcp-authoritative dhcp-range=igb0,XXX.2.73.10,XXX.2.73.99,255.255.255.128,12h dhcp-option=option:router,XXX.2.73.1 That all works correctly. # route get default route to: default destination: default mask: default gateway: XXX.2.73.1 Now I would also like to push a static route to clients to give them access to another network which is connected via OpenVPN. I've added the DHCP option 121: dhcp-option=option:classless-static-route,XXX.3.73.0/24,XXX.2.73.2 That adds the new static route correctly. But it breaks the default route. # route get XXX.3.73.1 route to: XXX.3.73.1 destination: XXX.3.73.0 mask: 255.255.255.0 gateway: XXX.2.73.2 # route get default route: route has not been found I've tried just "option:static-route" instead (option 33). But that doesn't appear to work at all. Can somebody please give me some clues. I'll happily admit that I don't know what I'm doing! Thanks in advance. Graham