59-31
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
domain-name central
! Specifies DNS server that will respond to DHCP clients when they need to correlate host
! name to ip address
dns-server 10.0.0.2
!Specifies the NETBIOS WINS server
netbios-name-server 10.0.0.2
!
interface FastEthernet0/0
ip address 10.0.0.1 255.255.255.0
duplex auto
speed auto
Remote Device
ip dhcp pool client
! Imports DHCP option parameters into DHCP server database
import all
network 172.16.2.254 255.255.255.0
!
interface FastEthernet0/0
ip address dhcp
duplex auto
speed auto
Example: Configuring the Remote Device to Import DHCP Options
Switch#
configure terminal
Switch(config)#
ip dhcp pool 1
Switch(dhcp-config)#
network 172.16.0.0 /16
Switch(dhcp-config)#
import all
Switch(dhcp-config)#
exit
Switch(config)#
interface FastEthernet 0/0
Switch(config-if)#
ip address dhcp
Switch(config-if)#
end
Switch#
show ip dhcp import
Example: Configuring DHCP Address Allocation Using Option 82
This example shows how to configure two DHCP classes. CLASS1 defines the group of DHCP clients
whose address requests contain the relay agent information option with the specified hexadecimal
values. CLASS2 defines the group of DHCP clients whose address requests contain the configured relay
agent information suboptions. CLASS3 has no pattern configured and is treated as a “match to any”
class. This type of class is useful for specifying a “default” class.
The subnet of pool ABC has been divided into three ranges without further subnetting the 10.0.20.0/24
subnet. If there is a DHCP Discover message from the 10.0.20.0/24 subnet with option 82 matching that
of class CLASS1, an available address in the range from 10.0.20.1 to 10.0.20.100 will be allocated. If
there is no free address in CLASS address range, the DHCP Discover message will be matched against
CLASS2, and so on.
Therefore, each class in the DHCP pool will be examined for a match in the order configured by the user.
In pool ABC, the order of matching is CLASS1, CLASS2, and finally CLASS3. In pool DEF, class
CLASS2 does not have any address range configured. By default, the address range for a particular class
is the pool’s entire subnets. Therefore, clients matching CLASS2 may be allocated addresses from
10.0.20.1 to 10.0.20.254.
Summary of Contents for Catalyst 4500 Series
Page 2: ......
Page 4: ......
Page 2086: ...Index IN 46 Software Configuration Guide Release IOS XE 3 9 0E and IOS 15 2 5 E ...