Subject: dhcpd.conf question
To: None <netbsd-users@netbsd.org>
From: Neil Booth <neil@daikokuya.co.uk>
List: netbsd-users
Date: 10/14/2003 22:06:48
I'm wondering how to "unset" a global option for the subnet for a
specific host.

On my LAN, which uses DCHP, the DHCP server and the router ("gateway")
for the LAN are different hosts, and I want the router's interface to
the LAN to be configured with DHCP.

So I have:

subnet 192.168.0.0 netmask 255.255.255.0 {
  range 192.168.0.10 192.168.0.20;
  option routers gateway;
  option broadcast-address 192.168.0.255;
}

where gateway is resolved by DNS.  gateway is a generic alias; the specific
host is "monkey"; here's its DHCP entry:  

host monkey {
  hardware ethernet 00:40:05:A8:6F:63;
  fixed-address monkey;
}

As-is, this picks up the global "option routers" from the subnet above.
However, as this the router (and multi-homed), I don't want a routers
option at all; it should route its packets through another interface
(10.0.0.1) which is statically configured at boot time.

It doesn't seem right to do the obvious override and have the DHCP server
serve an address (10.0.0.1) not on its subnet to monkey.  But as-is,
monkey gets its LAN IP address sent as a gateway, and gets confused
routing packets.  Serving 127.0.0.1 doesn't seem like the right thing
to do either.

Ideally I'd like to "lose" the global option for this one host, so that
the server doesn't send it a gateway at all, but I don't see a way of
doing that in the dhcpd.conf docs.

Thanks,

What's the right way to resolve this?

Neil.