Categories

Categories

Archives

Sending DHCP IP based on clients hostname

I’m working on a project where I need my DHCP server to send an IP address from a specific DHCP range if the hostname is a certain value otherwise it needs to send a normal IP address range.

I’m using Internet Systems Consortium DHCP Server V3.0.3 (ISC-DHCP).

To give a specific address range, we first need to detect if the DHCP client is sending the option 12 host-name and if so assign it to a class.

class “FooBar” { match if (option host-name = “foobar”); }

Once the client has a class associated to it we need to give it an address from a pool that doesn’t deny it.

subnet

[Continue reading]