Grouping subnet declarations

Glenn Satchell Glenn.Satchell at
Tue Mar 20 13:44:22 UTC 2007

>X-Original-To: dhcp-users at
>X-Greylist: delayed 723 seconds by postgrey-1.27 at; Tue, 20 Mar 
2007 13:30:33 UTC
>Date: Tue, 20 Mar 2007 14:18:30 +0100 (CET)
>From: Hartmut Brandt <hartmut.brandt at>
>X-X-Sender: brandt_h at
>To: dhcp-users at
>Subject: Grouping subnet declarations
>X-OriginalArrivalTime: 20 Mar 2007 13:18:27.0780 (UTC) 
>X-archive-position: 3191
>X-ecartis-version: Ecartis v1.0.0
>X-original-sender: hartmut.brandt at
>List-software: Ecartis version 1.0.0
>X-List-ID: <>
>X-list: dhcp-users
>from reading the manual page I got the impression that I can do something
>shared-network kn {
>  	...
>  	group {
>  		option routers;
>  		subnet netmask {
>  			...
>  		}
>  		subnet netmask {
>  			...
>  		}
>  		subnet netmask {
>  			...
>  		}
>  	}
>[The intention is to add more groups which have other routers.]
>The corresponding sentence in the manual is: It [the group statement] can 
>be used to group hosts, shared networks, subnets, or even other groups.
>However dhcpd complains about an empty shared-network declaration. If I 
>remove the group and put the router option into each subnet, it works.
>What I'm doing wrong?

The syntax checking is not perfect, sometimes an error will confuse the
parser and you get an error that doesn't make sense.

Your first subnet declaration defines a subnet that spans from to The router is not part of that
subnet, so it is invalid.

Likewise the second subnet goes from to The router is not part of that subnet, so it is

The shared-network is for when you have multiple IP networks configured
on the same physical wire.

You must define subnets as they match your real network topology.

Usually you need to specify a router in every subnet, because every
subnet will have a different router. This is a basic rule of how
IP routing works, rather than a limitation of the dhcp server.


More information about the dhcp-users mailing list