Excluding a range from a subnet

John Hascall john at iastate.edu
Wed Apr 23 11:35:08 UTC 2008


> I have to add a dhcp server in an already configured subnet, and manage
> a range. The problem is that in my range, there may be one or many
> devices with a static ip not configured in dhcp, and my dhcp server
> musn't manage them. I'd like to declare one range, with excluded
> ip/ranges to ignore. I had a look on internet but didn't find smthg
> corresponding exactly to what I need :

[manually abandon the addresses in the lease file]

  This will surely bite you some day in the future.


> Segmenting my range :

   This is what you need to do.
   It is not that hard or inelegant.  For example:

	shared-network "sample" {
		subnet 192.168.117.0 netmask 255.255.255.0 {
			option broadcast-address 192.168.117.255;
			option routers 192.168.117.254;
			...
		}
		# we always reserve 0, 250-255
		# 15, 42-49, 51-56, 61 are not managed by dhcp
		pool {
			range 192.168.117.1 192.168.117.14;
			range 192.168.117.16 192.168.117.41;
			range 192.168.117.50;
			range 192.168.117.57 192.168.117.60;
			range 192.168.117.62 192.168.117.249;
			...
		}
	}


> Declaring them as hosts :

   Given a new enough version of dhcpd you can apparently 'reserve'
   the in use addresses in th erange to the existing devices.  I
   have not tried this myself.


John


More information about the dhcp-users mailing list