Configuring a DHCP Database Client

Problem

You want to back up your DHCP database of address assignments to another device so that you won’t lose it if the router reloads.

Solution

You can ensure your DHCP address assignments are not lost when a router reloads by configuring the router to periodically copy its DHCP database to a remote server.

The first example configures a router to use FTP to copy the DHCP database to a remote server:

Router1#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router1(config)#ip dhcp database ftp://dhcp:bindsave@172.25.1.1/dhcp-leases
Router1(config)#end
Router1#

The second example uses TFTP as the transport protocol:

Router1#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router1(config)#ip dhcp database tftp://172.25.1.1/dhcp-leases
Router1(config)#end
Router1#

And the third configures RCP as the transport protocol:

Router1#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router1(config)#ip dhcp database rcp://dhcp@172.25.1.1/dhcp-leases
Router1(config)#end
Router1#

Discussion

By default, the router stores its DHCP binding database in memory. So when the router reloads, all DHCP database information is lost. You can configure the router to periodically send a copy this database to a remote server to avoid losing this important information. If the router reloads for any reason, it will automatically load the last version of the database file from the remote server ...

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.