59-28
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
Example: Configuring Static Mapping
The following example shows how to restart the DHCP server, configure the pool, and specify the URL
where the static mapping text file is stored:
Switch#
configure terminal
Switch(config)#
no service dhcp
Switch(config)#
service dhcp
Switch(config)#
ip dhcp pool pool1
Switch(dhcp-config)#
origin file tftp://10.1.0.1/static-bindings
Switch(dhcp-config)#
end
Note
The static mapping text file can be copied to flash memory on the device and served by the TFTP process
of the device. In this case, the IP address in the original file line must be an address owned by the device
and one additional line of configuration is required on the device:tftp-server flash static-filename.
The following sample output from the
show ip dhcp binding
command displays address bindings that
are configured:
Device#
show ip dhcp binding
00:05:14:%SYS-5-CONFIG_I: Configured from console by console
Bindings from all pools not associated with VRF:
IP address Client-ID/ Ls expir Type Hw address User name
10.9.9.4/8 0063.7363.2d30.3036. Infinite Static 302e.3762.2e39.3634. 632d.4574.8892.
10.9.9.1/24 0063.6973.636f.2d30. Infinite Static 3036.302e.3437.3165. 2e64.6462.342d.
The following sample output displays each entry in the static mapping text file
*time* Jan 21 2005 22:52 PM
!IP address Type Hardware address Lease expiration
10.19.9.1 /24 id 0063.6973.636f.2d30.3036.302e.3437
10.9.9.4 id 0063.7363.2d30.3036.302e.3762.2e39.3634.632d Infinite
*end*
The following sample debug output shows the reading of the static mapping text file from the TFTP
server:
Switch#
debug ip dhcp server
Loading abc/static_pool from 10.19.192.33 (via Ethernet0):
[OK - 333 bytes]
*May 26 23:14:21.259: DHCPD: contacting agent tftp://10.19.192.33/abc/static_pool (attempt
0)
*May 26 23:14:21.467: DHCPD: agent tftp://10.19.192.33/abc/static_pool is responding.
*May 26 23:14:21.467: DHCPD: IFS is ready.
*May 26 23:14:21.467: DHCPD: reading bindings from tftp://10.19.192.33/abc/static_pool.
*May 26 23:14:21.707: DHCPD: read 333 / 1024 bytes.
*May 26 23:14:21.707: DHCPD: parsing text line
*time* Apr 22 2002 11:31 AM
*May 26 23:14:21.707: DHCPD: parsing text line ““
*May 26 23:14:21.707: DHCPD: parsing text line
!IP address Type Hardware address Lease expiration
*May 26 23:14:21.707: DHCPD: parsing text line
“10.9.9.1 /24 id 0063.6973.636f.2d30.3036.302e.3437”
*May 26 23:14:21.707: DHCPD: creating binding for 10.9.9.1
*May 26 23:14:21.707: DHCPD: Adding binding to radix tree (10.9.9.1)
*May 26 23:14:21.707: DHCPD: Adding binding to hash tree
*May 26 23:14:21.707: DHCPD: parsing text line
“10.9.9.4 id 0063.7363.2d30.3036.302e.3762.2e39.3634.632d”
*May 26 23:14:21.711: DHCPD: creating binding for 10.9.9.4
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 ...