Skip to Content
Cisco IOS Cookbook, 2nd Edition
book

Cisco IOS Cookbook, 2nd Edition

by Kevin Dooley, Ian Brown
December 2006
Intermediate to advanced
1188 pages
72h 8m
English
O'Reilly Media, Inc.
Content preview from Cisco IOS Cookbook, 2nd Edition

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 172.22.1.0/24
Router1(dhcp-config)#network 172.22.1.0 255.255.255.0
Router1(dhcp-config)#default-router 172.22.1.1 
Router1(dhcp-config)#domain-name oreilly.com
Router1(dhcp-config)#dns-server 172.25.1.1 10.1.2.3
Router1(dhcp-config)#exit
Router1(config)#ip dhcp excluded-address 172.22.1.1 172.22.1.49
Router1(config)#ip dhcp excluded-address 172.22.1.150 172.22.1.254
Router1(config)#ip dhcp database ftp://dhcp:bindsave@172.25.1.1/dhcp-leases-rtr1
Router1(config)#end
Router1#

And here’s Router2:

Router2#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router2(config)#ip dhcp pool 172.22.1.0/24      
Router2(dhcp-config)#network 172.22.1.0 255.255.255.0
Router2(dhcp-config)#default-router 172.22.1.1       
Router2(dhcp-config)#domain-name oreilly.com         
Router2(dhcp-config)#dns-server 172.25.1.1 10.1.2.3  
Router2(dhcp-config)#exit
Router2(config)#ip dhcp excluded-address 172.22.1.1 172.22.1.149
Router2(config)#ip dhcp database ftp://dhcp:bindsave@172.25.1.1/dhcp-leases-rtr2
Router2(config)#end
Router2#

Discussion

You can configure multiple DHCP ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

IP Routing on Cisco IOS, IOS XE, and IOS XR: An Essential Guide to Understanding and Implementing IP Routing Protocols

IP Routing on Cisco IOS, IOS XE, and IOS XR: An Essential Guide to Understanding and Implementing IP Routing Protocols

Brad Edgeworth, Aaron Foss, Ramiro Garza Rios
Cisco Software-Defined Access

Cisco Software-Defined Access

Srilatha Vemula, Jason Gooley, Roddie Hasan

Publisher Resources

ISBN: 0596527225Supplemental ContentErrata Page