59-22
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
Configuring DHCP Address Pools
Troubleshooting Tips
Use the debug ip dhcp server class command to display the class matching results.
Defining the DHCP Address Pool
Step 1
Switch> enable
Enables privileged EXEC mode.
• Enter your password if prompted.
Step 2
Switch# configure terminal
Enters global configuration mode.
Step 3
Switch(config)# ip dhcp class name 
Defines a DHCP class and enters DHCP class configuration 
mode.
Step 4
Switch(dhcp-class)# relay agent 
information
Enters relay agent information option configuration mode.
• If you omit this step, the DHCP class matches any relay agent 
information option, whether the relay agent information 
option value is available or not.
Step 5
Switch(dhcp-class-relayinfo)# 
relay-information hex pattern [*] 
[bitmask mask] 
(Optional) Specifies a hexadecimal value for full relay 
information option.
• The pattern argument creates a pattern that is used to match 
the DHCP class.
• If you omit this step, no pattern is configured and it is 
considered a match to any relay agent information option 
value, but the relay information option must be available in 
the DHCP packet.
• You can configure multiple relay-information hex commands 
in a DHCP class.
Step 6
Repeat Steps 3 through 5 for each DHCP class 
you need to configure.
—
Step 7
Switch(dhcp-class-relayinfo)# end 
Exits relay agent information option mode and returns to 
privileged EXEC mode.
Step 1
Switch> enable
Enables privileged EXEC mode.
• Enter your password if prompted.
Step 2
Switch# configure terminal
Enters global configuration mode.
Step 3
Switch(config)# ip dhcp pool name 
Assigns a name to a DHCP pool and enters DHCP configuration 
mode.
• Multiple pools can be configured with the same class, 
eliminating the need to configure the same pattern in multiple 
pools.
Step 4
Switch(dhcp-config)# network 
network-number [mask | /prefix-length]
Configures the subnet and mask for a DHCP address pool on a 
Cisco IOS DHCP server.