classing gateway

Simon Hobson dhcp1 at
Thu Dec 16 12:39:00 UTC 2010

marco perugini wrote:

>i've my pool [] and there are two different gw that forward
>dhcpdiscover to my server:
>so i want to split my pool to assign range - to
>'s requests and the other half to's; how can
>i class the gateways in dhcpd.conf? does anyone know what i have to match?

What are you trying to achieve ? What is your network topology ?

Neither of those IPs is a valid address in the subnet, so 
nethier is actually valid as a gateway in,, 

But if you mean you have two gateways, each of which serves a 
separate network, and :

192.168.2.w/x is to be a shared network with
192.168.98.y/z is to be a shared network with

then all you need to do is declare the shared networks properly and 
the rest is automagic.

So why the shared networks ?

Just to be sure we understand each other. A shared network is where 
one collision domain (a physical network where devices can talk 
directly to each other without a router) has more than one IP subnet 
assigned on it.

The config option for this is shared-network and is used like this :

shared-network "x" {
   ... <shared-network specific options>
   subnet ... {
     ... <subnet specific options>
   subnet subnet mask {

Also note that you cannot use to in a range in a 
/25 subnet. .127 is the broadcast address and so is not usable, and 
you MUST have a router in the subnet so that will require an IP 
So you might put the router on and use to for your pool.

Simon Hobson

Visit 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