Configuring DHCP

Configuration Examples

DHCP Database Agent Configuration Example

The following example stores bindings on host 172.16.4.253. The file transfer protocol is FTP. The server should wait 2 minutes (120 seconds) before writing database changes.

ip dhcp database ftp://user:password@172.16.4.253/router-dhcp write-delay 120

DHCP Address Pool Configuration Example

In the following example, three DHCP address pools are created: one in network 172.16.0.0, one in subnetwork 172.16.1.0, and one in subnetwork 172.16.2.0. Attributes from network 172.16.0.0—such as the domain name, DNS server, NetBIOS name server, and NetBIOS node type—are inherited in subnetworks 172.16.1.0 and 172.16.2.0. In each pool, clients are granted 30-day leases and all addresses in each subnetwork, except the excluded addresses, are available to the DHCP Server for assigning to clients. Table 5 lists the IP addresses for the devices in three DHCP address pools.

Table 5

DHCP Address Pool Configuration Example

 

 

 

 

 

 

 

 

Pool 0 (Network 172.16.0.0)

Pool 1 (Subnetwork 172.16.1.0)

Pool 2 (Subnetwork 172.16.2.0)

 

 

 

 

 

 

 

Device

 

IP Address

Device

IP Address

Device

IP Address

 

 

 

 

 

 

Default routers

Default routers

172.16.1.100

Default routers

172.16.2.100

 

 

 

 

172.16.1.101

 

172.16.2.101

 

 

 

 

 

 

DNS Server

172.16.1.102

 

 

172.16.2.102

 

 

 

 

 

 

 

 

 

 

NetBIOS name server

172.16.1.103

 

 

172.16.2.103

 

 

 

 

 

 

 

 

 

 

NetBIOS node type

h-node

 

 

 

 

 

 

 

ip dhcp database ftp://user:password@172.16.4.253/router-dhcp write-delay 120 ip dhcp excluded-address 172.16.1.100 172.16.1.103

ip dhcp excluded-address 172.16.2.100 172.16.2.103

!

ip dhcp pool 0 network 172.16.0.0 /16 domain-name cisco.com

dns-server 172.16.1.102 172.16.2.102 netbios-name-server 172.16.1.103 172.16.2.103 netbios-node-type h-node

!

ip dhcp pool 1 network 172.16.1.0 /24

default-router 172.16.1.100 172.16.1.101 lease 30

!

ip dhcp pool 2 network 172.16.2.0 /24

default-router 172.16.2.100 172.16.2.101 lease 30

Cisco IOS IP Configuration Guide

IPC-77

Page 123
Image 123
Cisco Systems 78-11741-02 manual Dhcp Database Agent Configuration Example, Dhcp Address Pool Configuration Example, IPC-77