Configuring Multiple DHCP Servers per Subnet
Problem
You want to configure multiple routers to act as DHCP servers for the same subnet to ensure availability.
Solution
You can configure multiple routers to act as DHCP servers for a single subnet, by ensuring that they don’t use the same pool of addresses.
Here’s Router1
:
Router1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router1(config)#ip dhcp pool
Router1(dhcp-config)#
172.22.1.0/24
network
Router1(dhcp-config)#
172.22.1.0 255.255.255.0
default-router
Router1(dhcp-config)#
172.22.1.1
domain-name
Router1(dhcp-config)#
oreilly.com
dns-server
Router1(dhcp-config)#
172.25.1.1 10.1.2.3
exit
Router1(config)#ip dhcp excluded-address
Router1(config)#
172.22.1.1 172.22.1.49
ip dhcp excluded-address
Router1(config)#
172.22.1.150 172.22.1.254
ip dhcp database
Router1(config)#
ftp://dhcp:bindsave@172.25.1.1/dhcp-leases-rtr1
end
Router1#
And here’s Router2
:
Router2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router2(config)#ip dhcp pool
Router2(dhcp-config)#
172.22.1.0/24
network
Router2(dhcp-config)#
172.22.1.0 255.255.255.0
default-router
Router2(dhcp-config)#
172.22.1.1
domain-name
Router2(dhcp-config)#
oreilly.com
dns-server
Router2(dhcp-config)#
172.25.1.1 10.1.2.3
exit
Router2(config)#ip dhcp excluded-address
Router2(config)#
172.22.1.1 172.22.1.149
ip dhcp database
Router2(config)#
ftp://dhcp:bindsave@172.25.1.1/dhcp-leases-rtr2
end
Router2#
Discussion
You can configure multiple DHCP ...
Get Cisco IOS Cookbook, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.