IP address range
Simon Hobson
dhcp1 at thehobsons.co.uk
Mon Jul 27 19:28:16 UTC 2009
Jason Penton wrote:
>Lets say a relay agent is sitting on 10.31.3.10 and we want to issue
>172.16.0.0/16 addresses to all clients requesting an IP, how would one
>set that up. We can assume that the dhcp server is on 10.31.3.1
>
>if i put in the following:
>subnet 172.16.0.0 netmask 255.255.0.0 {
> pool {
> range 172.16.0.1 172.16.255.254
> }
>}
>
>then when I get the relayd req from 3.10 then dhcp says there is no
>network configured for 3.10 (unknown network segment).
>
>So then i just create a subnet for 10.31.3.0/24, however I cant put
>the range of IPs (172.16.0.0/16) in that subnet because then dhcp does
>not startup, giving an error of "bad range - 172.16.0.0 not in
>10.31.3.0/25".
>
>It would be great if someone could shed some light on how I would
>configure such a scenario
What you describe is a "shared network" and there is a section in man
dhcpd.conf on it.
The syntax is :
shared-network some-name {
options ...
subnet ... {
...
}
subnet ... {
...
}
"some-name" is arbitrary text, so you can use some descriptive name
for it, eg "third-floor" or "main-building". You can include options
common to all subnets in teh shared subnet - for example you might
put an option in there for DNS servers.
in your case, you'd have :
shared-network some-net {
subnet 172.16.0.0 netmask 255.255.0.0 {
pool {
range 172.16.0.1 172.16.255.254
}
}
subnet 10.31.3.0 netmask 255.255.254.0 {
}
}
Note that all addresses must still be unique - any subnet must be in
only one shared-subnet.
--
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