25-15

Cisco IE 2000 Switch Software Configuration Guide
OL-25866-01
Chapter 25 Configuring DHCP
Configuration Examples for Configuring DHCP
Configuration Examples for Configuring DHCP

Enabling DHCP Server Port-Based Address Allocation: Examples

In this example, a subscriber identifier is automatically generated, and the DHCP server ignores any

client identifier fields in the DHCP messages and uses the subscriber identifier instead. The subscriber

identifier is based on the short name of the interface and the cl ient preassigned IP address 10.1.1.7.

switch# show running config
Building configuration...
Current configuration : 4899 bytes
!
version 12.2
!
hostname switch
!
no aaa new-model
clock timezone EST 0
ip subnet-zero
ip dhcp relay information policy removal pad
no ip dhcp use vrf connected
ip dhcp use subscriber-id client-id
ip dhcp subscriber-id interface-name
ip dhcp excluded-address 10.1.1.1 10.1.1.3
!
ip dhcp pool dhcppool
network 10.1.1.0 255.255.255.0
address 10.1.1.7 client-id “Et1/0” ascii
<output truncated>

This example shows that the preassigned address was correctly reserved in the DHCP pool:

switch# show ip dhcp pool dhcppool
Pool dhcp pool:
Utilization mark (high/low) : 100 / 0
Subnet size (first/next) : 0 / 0
Total addresses : 254
Leased addresses : 0
Excluded addresses : 4
Pending event : none
1 subnet is currently in the pool:
Current index IP address range Leased/Excluded/Total
10.1.1.1 10.1.1.1 - 10.1.1.254 0 / 4 / 254
1 reserved address is currently in the pool
Address Client
10.1.1.7 Et1/0

Enabling DHCP Snooping: Example

This example shows how to enable DHCP snooping globally and on VLAN 10 and to configure a rate

limit of 100 packets per second on a port:

Switch(config)# ip dhcp snooping
Switch(config)# ip dhcp snooping vlan 10
Switch(config)# ip dhcp snooping information option
Switch(config)# interface gigabitethernet1/1
Switch(config-if)# ip dhcp snooping limit rate 100