How to remove 'router' option within a dhcpd group block

Adam Nielsen a.nielsen at shikadi.net
Thu Jun 30 13:16:40 UTC 2022


Hi all,

Does anyone know if there is a way to remove a router in a group block
that was set in a subnet block, in the dhcpd config file?

  subnet 192.168.0.0 netmask 255.255.255.0 {
    option routers 1.2.3.4;
  }

  group {
    # Don't supply a router at all.
    option routers 0.0.0.0;

    host ...
  }

Specifying 0.0.0.0 doesn't work, dhcpd still hands out 1.2.3.4 from the
subnet section.

Is there a way to tell it to drop that option completely within the
group section?

My reason for asking is that I have some devices that like to phone
home, and while I can block them at the router it would be nice not to
even have them try to connect to the router at all.

Many thanks,
Adam.


More information about the dhcp-users mailing list