issuing IPs in an "unknown subnet"

Simon Hobson dhcp1 at thehobsons.co.uk
Wed Jul 15 10:14:11 UTC 2009


Jason Penton wrote:

>Is dhcpd able to issue IP addresses to clients in a network the dhcpd
>server doesnt know about.

Taking the question literally - NO

>For example, if DHCP requests are coming
>from a DHCP relay agent.

But that is not the same thing.

>  Now the problem is that everything I have
>tried results in the dhcp server failing on startup because the ip
>range is not in a "valid" network or at least a network that the
>server doesnt know about.
>
>I have managed to get round this using the following:
>
>subnet 0.0.0.0 netmask 0.0.0.0 {
>
>}
>
>but this seems like a hack to me. Is this correct, acceptable?

It's wrong and is guaranteed not to work.

Just define the subnets the server is required to serve, and setup 
relay agents as required. That's all you have to do and the rest will 
happen automagically.

The remote subnets are not local, but that does not mean they are 
unknown to the server.

You do not need to know anything about the route IP traffic takes 
between the remote subnet(s) and the server - that is handled 
automatically by the network. You just need to make sure that packets 
can be passed back and forth between them.

EG :
Server(192.168.1.1/24) - router - router - router - relay 
agent(192.168.2.1/24) - client(192.168.2.x)

Your config would just need :

subnet 192.168.1.0 netmask 255.255.255.0 {
}

subnet 192.168.2.0 netmask 255.255.255.0 {
   range 192.168.2.10 192.168.2.99 ;
   option routers ....
}

-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.



More information about the dhcp-users mailing list