Master server, multiple cisco relays, many subnets.
Simon Hobson
dhcp1 at thehobsons.co.uk
Wed Aug 20 09:18:15 UTC 2008
Matt Jenkins wrote:
>I manage the network for a WISP and need to migrate away from my
>Cisco routers serving DHCP. I think I have an understanding of what
>I need to do to configure a central DHCP server but I am still a
>little lost after reading the archives, man pages, example conf
>files, etc. I have setup dhcp servers before on most variations of
>Linux/BSD/Windows. I am also very knowledgeable with Linux/BSD for
>8+ years now. What I need help with is the giaddr identification
>that each cisco router will pass to the Master server.
This **should** be automagic.
>For a small example (All Ips are imaginary):
>
>Master Server
>Eth0 12.1.1.10
>Eth0:1 10.10.0.88
>
>Cisco 1
>Serial0 88.15.15.89
>FastEthernet0
>- 21.17.21.1
>- 21.17.22.1
>DHCP Ranges
>21.17.21.0/24
>21.17.22.0/24
>
>
>Cisco 2
>Serial0 65.45.158.48
>FastEthernet0
>- 52.84.19.1
>- 68.54.78.1
>DHCP Ranges
>52.84.19.0/24
>68.54.78.0/24
>
>I want the DHCP server to handle all those dhcp ranges but only
>relay them to the correct cisco router. Is this possible?
Yes it's possible - it's standard functionality.
Just to clarify, taking the first router :
>Cisco 1
>Serial0 88.15.15.89
>FastEthernet0
>- 21.17.21.1
>- 21.17.22.1
>DHCP Ranges
>21.17.21.0/24
>21.17.22.0/24
Are these two subnets on the same wire ? Ie
ip address 21.17.21.1 255.255.255.0
ip address 21.17.22.1 255.255.255.0 secondary
In this situation, this is what's called a shared network, and your
config for this network would be :
shared-network "cisco-1" {
subnet 21.17.21.0 netmask 255.255.255.0 {
option routers 21.17.21.1 ;
range 21.17.21.2 21.17.21.254 ;
}
subnet 21.17.22.0 netmask 255.255.255.0 {
option routers 21.17.22.1 ;
range 21.17.22.2 21.17.22.254 ;
}
}
Be aware that by defaults, all addresses in both subnets are equal -
a client could get an address from either. This is a fundamental
limitation of the broadcasts used in DHCP.
I'm not certain, but I think the router will use the primary IP
address as the GIAddr in forwarded packets. The DHCP server sees that
this is in part of a shared network and will automatically hand out
addresses in both subnets.
On the Cisco routers, it's a matter of turning on the IP Helper :
ip helper 12.1.1.10
however, this also tuns on a load of other things that you almost
certainly don't want (thanks Cisco !). I can't recall what they are,
but it will be in the archives if you search for "ip helper".
More information about the dhcp-users
mailing list