59-27
Catalyst 4500 Series Switch, Cisco IOS Software Configuration Guide - Cisco IOS XE 3.9.xE and IOS 15.2(5)Ex
Chapter 59 Configuring the Cisco IOS DHCP Server
Configuration Examples for the Cisco IOS DHCP Server
Switch(config)# ip dhcp database ftp://user:password@172.16.4.253/router-dhcp write-delay
120
Switch(config)# ip dhcp excluded-address 172.16.0.100 172.16.1.103
Switch(config)# ip dhcp excluded-address 172.16.1.100 172.16.1.101
!
Switch(config)# ip dhcp pool pool3
Switch(dhcp-config)# network 172.16.0.0 /16
Switch(dhcp-config)# default-router 172.16.0.100 172.16.2.101 172.16.0.102 172.16.0.103
Switch(dhcp-config)# domain-name cisco.com
Switch(dhcp-config)# dns-server 172.16.1.102 172.16.2.102
Switch(dhcp-config)# netbios-name-server 172.16.1.103 172.16.2.103
Switch(dhcp-config)# netbios-node-type h-node
Switch(dhcp-config)# lease 30
!
Switch(dhcp-config)# network 172.16.1.0 /24 secondary
Switch(dhcp-config)# override default-router 172.16.1.100 172.16.1.101
!
Switch(dhcp-config)# network 172.16.2.0 /24 secondary
Example: Configuring Manual Bindings
The following example shows how to create a manual binding for a client named example1.abc.com that
sends a client identifier in the DHCP packet. The MAC address of the client is 02c7.f800.0422 and the
IP address of the client is 172.16.2.254.
Switch(config)# ip dhcp pool pool1
Switch(dhcp-config)# host 172.16.2.254
Switch(dhcp-config)# client-identifier 01b7.0813.8811.66
Switch(dhcp-config)# client-name example1
The following example shows how to create a manual binding for a client named example2.abc.com that
does not send a client identifier in the DHCP packet. The MAC address of the client is 02c7.f800.0422
and the IP address of the client is 172.16.2.253.
Switch(config)# ip dhcp pool pool2
Switch(dhcp-config)# host 172.16.2.253
Switch(dhcp-config)# hardware-address 02c7.f800.0422 ethernet
Switch(dhcp-config)# client-name example1
Because attributes are inherited, the two preceding configurations are equivalent to the following:
Switch(config)# ip dhcp pool pool1
Switch(dhcp-config)# host 172.16.2.254 255.255.255.0
Switch(dhcp-config)# hardware-address 02c7.f800.0422 ieee802
Switch(dhcp-config)# client-name client1
Switch(dhcp-config)# default-router 172.16.2.100 172.16.2.101
Switch(dhcp-config)# domain-name abc.com
Switch(dhcp-config)# dns-server 172.16.1.102 172.16.2.102
Switch(dhcp-config)# netbios-name-server 172.16.1.103 172.16.2.103
Switch(dhcp-config)# netbios-node-type h-node
NetBIOS Name
Server
172.16.1.103
172.16.2.103
NetBIOS Node
Type
h-node
Primary Subnet
(172.16.0.0/16)
First Secondary
Subnet
(172.16.1.0/24)
Second Secondary
Subnet (172.16.2.0/24)