Table Of Contents
DHCP Commands
accounting (DHCP)
address client-id
address hardware-address
address range
authorization username (dhcp)
bootfile
class (dhcp)
clear ip dhcp binding
clear ip dhcp conflict
clear ip dhcp limit lease
clear ip dhcp server statistics
clear ip dhcp snooping binding
clear ip dhcp snooping database statistics
clear ip dhcp snooping statistics
clear ip dhcp subnet
clear ip route dhcp
client-identifier
client-name
default-router
dns-server
domain-name (DHCP)
hardware-address
host
import all
ip address dhcp
ip address pool (DHCP)
ip dhcp aaa default username
ip dhcp bootp ignore
ip dhcp class
ip dhcp client
ip dhcp client authentication key-chain
ip dhcp client authentication mode
ip dhcp-client broadcast-flag
ip dhcp client class-id
ip dhcp-client default-router distance
ip dhcp-client forcerenew
ip dhcp client hostname
ip dhcp client lease
ip dhcp client mobile renew
ip dhcp-client network-discovery
ip dhcp client request
ip dhcp compatibility lease-query client
ip dhcp compatibility suboption link-selection
ip dhcp conflict logging
ip dhcp database
ip dhcp excluded-address
DHCP Commands
accounting (DHCP)
To enable Dynamic Host Configuration Protocol (DHCP) accounting, use the accounting command in DHCP pool configuration mode. To disable DHCP accounting for the specified server group, use the no form of this command.
accounting server-group-name
no accounting server-group-name
Syntax Description
server-group-name
|
Name of a server group to apply DHCP accounting. The server group can have one or more members. The server group is defined in the configuration of the aaa group server and aaa accounting commands.
|
Defaults
No default behavior or values
Command Modes
DHCP pool configuration
Command History
Release
|
Modification
|
12.2(15)T
|
This command was introduced.
|
12.4(6)T
|
This command was enhanced to support relay pools.
|
12.2(28)SB
|
This command was integrated into Cisco IOS Release 12.2(28)SB.
|
12.2(33)SRB
|
This command was integrated into Cisco IOS Release 12.2(33)SRB.
|
Usage Guidelines
The accounting command is used to enable the DHCP accounting feature by sending secure DHCP START accounting messages when IP addresses are assigned to DHCP clients, and secure DHCP STOP accounting messages when DHCP leases are terminated. A DHCP lease is terminated when the client explicitly releases the lease, when the session times out, and when the DHCP bindings are cleared from the DHCP database. DHCP accounting is configured on a per-client or per-lease basis. Separate DHCP accounting processes can be configured on a per-pool basis.
The accounting command can be used to network pools in which bindings are created automatically and destroyed upon lease termination (or when the client sends a DHCP RELEASE message). DHCP bindings are also destroyed when the clear ip dhcp binding or no service dhcp command is issued. These commands should be used with caution if an address pool is configured with DHCP accounting.
The accounting feature can also be used in relay pools. This feature is enabled by using the accounting command with relay pools that use the relay destination command in DHCP pool configuration mode.
AAA and RADIUS must be configured before this command can be used to enable DHCP accounting. A server group must be defined with the aaa group server command. START and STOP message generation is configured with the aaa accounting command. The aaa accounting command can be configured to enable the DHCP accounting to send both START and STOP messages or STOP messages only.
Examples
The following example configures DHCP accounting start and stop messages to be sent if RADIUS-GROUP1 is configured as a start-stop group. Stop messages will only be sent if RADIUS-GROUP1 is configured as a stop-only group.
ip dhcp pool WIRELESS-POOL
The following example configures DHCP accounting for a relay pool. The DHCP relay agent sends start and stop messages when an address is assigned to or released from the client.
relay source 10.0.0.0 255.0.0
relay destination 10.5.5.5
Related Commands
Command
|
Description
|
aaa accounting
|
Enables AAA accounting of requested services for billing or security purposes when you use RADIUS or TACACS+.
|
aaa group server
|
Groups different server hosts into distinct lists and distinct methods.
|
aaa new-model
|
Enables the AAA access control model.
|
aaa session-id
|
Specifies whether the same session ID will be used for each AAA accounting service type within a call or whether a different session ID will be assigned to each accounting service type.
|
clear arp-cache
|
Deletes all dynamic entries from the ARP cache.
|
clear ip dhcp binding
|
Deletes an automatic address binding from the Cisco IOS DHCP server database.
|
ip dhcp pool
|
Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode.
|
ip radius source-interface
|
Forces RADIUS to use the IP address of a specified interface for all outgoing RADIUS packets.
|
radius-server host
|
Specifies a RADIUS server host.
|
radius-server retransmit
|
Specifies the number of times that Cisco IOS will look for RADIUS server hosts.
|
service dhcp
|
Enables the Cisco IOS DHCP server and relay agent features.
|
show ip dhcp binding
|
Displays address bindings on the Cisco IOS DHCP server.
|
show ip dhcp server statistics
|
Displays Cisco IOS DHCP server statistics.
|
update arp
|
Secures the MAC address of the authorized client interface to the DHCP binding.
|
address client-id
To reserve an IP address for a DHCP client identified by client identifier, use the address client-id command in DHCP pool configuration mode. To remove the reserved address, use the no form of this command.
address ip-address client-id string [ascii]
no address ip-address client-id string [ascii]
Syntax Description
ip-address
|
IP address reserved for the client.
|
string
|
A unique ASCII string or hexadecimal string.
|
ascii
|
(Optional) Client ID is in ASCII string form.
|
Command Default
IP addresses are not reserved.
Command Modes
DHCP pool configuration (dhcp-config)
Command History
Release
|
Modification
|
12.2(46)SE
|
This command was introduced.
|
Usage Guidelines
The address client-id command can be used to create reserved addresses in pools for any DHCP client identified by the client identifier option in the DHCP packet. You can also reserve an IP address for a DHCP client that is configured to use the port-based address allocation feature. For port-based address allocation, the string argument must be the short name of the interface (port) and the ascii keyword must be specified.
Examples
In the following example, a subscriber ID will be automatically generated based on the short name of the interface (port) specified by the address client-id command. The DHCP server will ignore any client identifier fields in the DHCP messages and use this subscriber ID as the client identifier. The DHCP client is preassigned IP address 10.1.1.7.
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
network 10.1.1.0 255.255.255.0
address 10.1.1.7 client-id ethernet 1/0 ascii
Related Commands
Command
|
Description
|
address hardware-address
|
Reserves an IP address for a client identified by hardware address.
|
address hardware-address
To reserve an IP address for a client identified by hardware address, use the address hardware-address command in DHCP pool configuration mode. To remove the reserved address, use the no form of this command.
address ip-address hardware-address mac-address [hardware-number]
no address ip-address hardware-address mac-address
Syntax Description
ip-address
|
IP address reserved for the client.
|
mac-address
|
Hardware address of the client.
|
hardware-number
|
(Optional) ARP hardware specified in an online database at http://www.iana.org/assignments/arp-parameters. The valid range is from 0 to 255.
|
Command Default
IP addresses are not reserved.
Command Modes
DHCP pool configuration (dhcp-config)
Command History
Release
|
Modification
|
12.2(46)SE
|
This command was introduced.
|
Usage Guidelines
This command is used to reserve an IP address for clients identified by the hardware address included in the fixed-size header of the DHCP message.
Examples
In the following example, an IP address is reserved for a client that is identified by its hardware address:
address 10.10.10.3 hardware-address b708.1388.f166
Related Commands
Command
|
Description
|
address client-id
|
Reserves an IP address for a DHCP client identified by the client identifier.
|
address range
To set an address range for a Dynamic Host Configuration Protocol (DHCP) class in a DHCP server address pool, use the address range command in DHCP pool class configuration mode. To remove the address range, use the no form of this command.
address range start-ip end-ip
no address range start-ip end-ip
Syntax Description
start-ip
|
Starting IP address that defines the range of addresses in the address pool.
|
end-ip
|
Ending IP address that defines the range of addresses in the address pool.
|
Defaults
No default behavior or values
Command Modes
DHCP pool class configuration
Command History
Release
|
Modification
|
12.2(13)ZH
|
This command was introduced.
|
12.3(4)T
|
This command was integrated into Cisco IOS Release 12.3(4)T.
|
12.2(28)SB
|
This command was integrated into Cisco IOS Release 12.2(28)SB.
|
12.2(33)SRB
|
This command was integrated into Cisco IOS Release 12.2(33)SRB.
|
Usage Guidelines
If this command is not configured for a DHCP class in a DHCP server address pool, the default value is the entire subnet of the address pool.
Examples
The following example sets the available address range for class 1 from 10.0.20.1 through 10.0.20.100:
network 10.0.20.0 255.255.255.0
address range 10.0.20.1 10.0.20.100
Related Commands
Command
|
Description
|
ip dhcp class
|
Defines a DHCP class and enters DHCP class configuration mode.
|
authorization username (dhcp)
To specify the parameters that RADIUS sends to a DHCP server when downloading configuration information for a DHCP client, use the authorization username command in DHCP pool configuration mode. To disable the parameters, use the no form of this command.
authorization username string
no authorization username string
Syntax Description
string
|
Specifies a string that RADIUS sends to the DHCP server when downloading IP address and other configuration information for a client's DHCP responses. The string contains the following formatting characters to insert information associated with the DHCP client:
• %c-—Ethernet address of the DHCP client (chaddr field)
• %i-—Inner VLAN ID from the DHCP relay information (option 82)
• %o-—Outer VLAN ID from the DHCP relay information (option 82)
• %p—Port number from the DHCP relay information (option 82)
• %g—Gateway address of the DHCP relay agent (giaddr field)
• %%—Transmits the percent sign (%) character in the string sent to the RADIUS server
Note The percent (%) is a marker to insert the DHCP client information associated with the specified character. The % is not sent to the RADIUS server unless you specify the %% character.
|
Command Default
Parameters are not specified.
Command Modes
DHCP pool configuration (config-dhcp)
Command History
Release
|
Modification
|
12.2(31)ZV1
|
This command was modified for the DHCP server RADIUS proxy feature on the Cisco 10000 series router and integrated into Cisco IOS Release 12.2(31)ZV1.
|
Cisco IOS XE Release 2.4
|
This command was implemented on the Cisco ASR 1000 Series Aggregation Services Routers.
|
Examples
The following example shows how to configure RADIUS to send the Ethernet address of the DHCP client (chaddr field) to the DHCP server when downloading configuration information for a DHCP client:
Router(config)# ip dhcp pool pool_common
Router(config-dhcp)# authorization method auth1
Router(config-dhcp)# authorization shared-password cisco
Router(config-dhcp)# authorization username %c-user1
Related Commands
Command
|
Description
|
authorization list
|
Specifies the AAA authorization list.
|
bootfile
To specify the name of the default boot image for a Dynamic Host Configuration Protocol (DHCP) client, use the bootfile command in DHCP pool configuration mode. To delete the boot image name, use the no form of this command.
bootfile filename
no bootfile
Syntax Description
filename
|
Specifies the name of the file that is used as a boot image.
|
Defaults
No default behavior or values.
Command Modes
DHCP pool configuration
Command History
Release
|
Modification
|
12.0(1)T
|
This command was introduced.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Examples
The following example specifies xllboot as the name of the boot file:
Related Commands
Command
|
Description
|
ip dhcp pool
|
Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode.
|
next-server
|
Configures the next server in the boot process of a DHCP client.
|
class (dhcp)
To associate a class with a Dynamic Host Configuration Protocol (DHCP) address pool and enter DHCP pool class configuration mode, use the class command in DHCP pool configuration mode. To remove the class association, use the no form of this command.
class class-name
no class class-name
Syntax Description
class-name
|
Name of the DHCP class.
|
Defaults
No default behavior or values
Command Modes
DHCP pool configuration
Command History
Release
|
Modification
|
12.2(13)ZH
|
This command was introduced.
|
12.3(4)T
|
This command was integrated into Cisco IOS Release 12.3(4)T.
|
12.2(28)SB
|
This command was integrated into Cisco IOS Release 12.2(28)SB.
|
12.2(33)SRB
|
This command was integrated into Cisco IOS Release 12.2(33)SRB.
|
Usage Guidelines
You first define the class using the ip dhcp class global configuration command. If a nonexistent class is named by the class command, the class will be automatically created. Each class in the DHCP pool will be examined for a match in the order configured.
Examples
The following example associates DHCP class 1 and class 2 with a DHCP pool named ABC:
network 10.0.20.0 255.255.255.0
address range 10.0.20.1 10.0.20.100
address range 10.0.20.101 10.0.20.200
Related Commands
Command
|
Description
|
ip dhcp class
|
Defines a DHCP class and enters DHCP class configuration mode.
|
clear ip dhcp binding
To delete an automatic address binding from the Dynamic Host Configuration Protocol (DHCP) server database, use the clear ip dhcp binding command in privileged EXEC mode.
clear ip dhcp [pool name] binding {* | address}
Syntax Description
pool name
|
(Optional) Name of the DHCP pool.
|
*
|
Clears all automatic bindings.
|
address
|
The address of the binding you want to clear.
|
Command Modes
Privileged EXEC
Command History
Release
|
Modification
|
12.0(1)T
|
This command was introduced.
|
12.2(8)T
|
The pool name keyword and argument combination was added.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Usage Guidelines
Typically, the address denotes the IP address of the client. If the asterisk (*) character is used as the address parameter, DHCP clears all automatic bindings.
Use the no ip dhcp pool global configuration command to delete a manual binding.
Note the following behavior for the clear ip dhcp binding command:
•
If you do not specify the pool name option and an IP address is specified, it is assumed that the IP address is an address in the global address space and will look among all the non-virtual routing and forwarding (VRF) DHCP pools for the specified binding.
•
If you do not specify the pool name option and the * option is specified, it is assumed that all automatic or on-demand bindings in all VRF and non-VRF pools are to be deleted.
•
If you specify both the pool name option and the * option, all automatic or on-demand bindings in the specified pool only will be cleared.
•
If you specify the pool name option and an IP address, the specified binding will be deleted from the specified pool.
Examples
he following example deletes the address binding 10.12.1.99 from a DHCP server database:
Router# clear ip dhcp binding 10.12.1.99
The following example deletes all bindings from all pools:
Router# clear ip dhcp binding *
The following example deletes all bindings from the address pool named pool1:
Router# clear ip dhcp pool pool1 binding *
The following example deletes address binding 10.13.2.99 from the address pool named pool2:
Router# clear ip dhcp pool abc binding pool2
Related Commands
Command
|
Description
|
show ip dhcp binding
|
Displays address bindings on the Cisco IOS DHCP server.
|
clear ip dhcp conflict
To clear an address conflict from the Dynamic Host Configuration Protocol (DHCP) server database, use the clear ip dhcp conflict command in privileged EXEC mode.
clear ip dhcp [pool name] conflict {* | address}
Syntax Description
pool name
|
(Optional) Name of the DHCP pool.
|
*
|
Clears all address conflicts.
|
address
|
The IP address of the host that contains the conflicting address you want to clear.
|
Command Modes
Privileged EXEC
Command History
Release
|
Modification
|
12.0(1)T
|
This command was introduced.
|
12.2(8)T
|
The pool name keyword and argument combination were added.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Usage Guidelines
The server detects conflicts using a ping session. The client detects conflicts using gratuitous Address Resolution Protocol (ARP). If the asterisk (*) character is used as the address parameter, DHCP clears all conflicts.
Note the following behavior for the clear ip dhcp conflict command:
•
If you do not specify the pool name option and an IP address is specified, it is assumed that the IP address is an address in the global address space and will look among all the non-virtual routing and forwarding (VRF) DHCP pools for the specified conflict.
•
If you do not specify the pool name option and the * option is specified, it is assumed that all automatic/ or on-demand conflicts in all VRF and non-VRF pools are to be deleted.
•
If you specify both the pool name option and the * option, all automatic or on-demand conflicts in the specified pool only will be cleared.
•
If you specify the pool name option and an IP address, the specified conflict will be deleted from the specified pool.
Examples
The following example shows an address conflict of 10.12.1.99 being deleted from the DHCP server database:
Router# clear ip dhcp conflict 10.12.1.99
The following example deletes all address conflicts from all pools:
Router# clear ip dhcp conflict *
The following example deletes all address conflicts from the address pool named pool1:
Router# clear ip dhcp pool pool1 conflict *
The following example deletes address conflict 10.13.2.99 from the address pool named pool2:
Router# clear ip dhcp pool pool2 conflict 10.13.2.99
Related Commands
Command
|
Description
|
show ip dhcp conflict
|
Displays address conflicts found by a Cisco IOS DHCP server when addresses are offered to the client.
|
clear ip dhcp limit lease
To clear lease limit violation entries, use the clear ip dhcp limit lease command in privileged EXEC mode.
clear ip dhcp limit lease [interface-type interface-number]
Syntax Description
interface-type
|
(Optional) Interface type. For more information, use the question mark (?) online help function.
|
interface-number
|
(Optional) Interface or subinterface number. For more information about the numbering system for your networking device, use the question mark (?) online help function.
|
Command Modes
Privileged EXEC (#)
Command History
Release
|
Modification
|
12.2(33)SRC
|
This command was introduced.
|
Usage Guidelines
The show ip dhcp limit lease command displays the number of lease limit violations. You can control the number of subscribers at the global level by using the ip dhcp limit lease per interface command and at the interface level by using the ip dhcp limit lease command.
Examples
In the following example, the number of lease violations is displayed and then cleared:
Router# show ip dhcp limit lease
Router# clear ip dhcp limit lease
Router# show ip dhcp limit lease
Related Commands
Command
|
Description
|
ip dhcp limit lease
|
Limits the number of leases offered to DHCP clients per interface.
|
ip dhcp limit lease per interface
|
Limits the number of DHCP leases offered to DHCP clients behind an ATM RBE unnumbered or serial unnumbered interface.
|
show ip dhcp limit lease
|
Displays the number of times the lease limit threshold has been violated on an interface.
|
clear ip dhcp server statistics
To reset all Dynamic Host Configuration Protocol (DHCP) server counters, use the clear ip dhcp server statistics command in privileged EXEC mode.
clear ip dhcp server statistics
Syntax Description
This command has no arguments or keywords.
Command Modes
Privileged EXEC
Command History
Release
|
Modification
|
12.0(1)T
|
This command was introduced.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Usage Guidelines
The show ip dhcp server statistics command displays DHCP counters. All counters are cumulative. The counters will be initialized, or set to zero, with the clear ip dhcp server statistics command.
Examples
The following example resets all DHCP counters to zero:
Router# clear ip dhcp server statistics
Related Commands
Command
|
Description
|
show ip dhcp server statistics
|
Displays Cisco IOS DHCP server statistics.
|
clear ip dhcp snooping binding
To clear the DHCP-snooping binding-entry table without disabling DHCP snooping, use the clear ip dhcp snooping binding command in privileged EXEC mode.
clear ip dhcp snooping binding
Syntax Description
This command has no arguments or keywords.
Defaults
This command has no default settings.
Command Modes
Privileged EXEC
Command History
Release
|
Modification
|
12.2(14)SX
|
Support for this command was introduced on the Supervisor Engine 720.
|
12.2(17d)SXB
|
Support for this command on the Supervisor Engine 2 was extended to Release 12.2(17d)SXB.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
Examples
This example shows how to clear the DHCP-snooping binding-entry table:
Router# clear ip dhcp snooping binding
clear ip dhcp snooping database statistics
To clear the DHCP binding database statistics, use the clear ip dhcp snooping database statistics command in privileged EXEC mode.
clear ip dhcp snooping database statistics
Syntax Description
This command has no arguments or keywords.
Command Default
This command has no default settings.
Command Modes
Privileged EXEC (#)
Command History
Release
|
Modification
|
12.2(14)SX
|
Support for this command was introduced on the Supervisor Engine 720.
|
12.2(17d)SXB
|
Support for this command on the Supervisor Engine 2 was extended to Release 12.2(17d)SXB.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
Examples
The following example shows how to clear the statistics from the DHCP binding database:
Router# clear ip dhcp snooping database statistics
clear ip dhcp snooping statistics
To clear the DHCP snooping statistics, use the clear ip dhcp snooping statistics command in privileged EXEC mode.
clear ip dhcp snooping statistics
Syntax Description
This command has no arguments or keywords.
Defaults
This command has no default settings.
Command Modes
Privileged EXEC
Command History
Release
|
Modification
|
12.2(18)SXF5
|
This command was introduced.
|
Examples
This example shows how to clear the DHCP snooping statistics:
Router# clear ip dhcp snooping statistics
clear ip dhcp subnet
To clear all currently leased subnets in the Dynamic Host Configuration Protocol (DHCP) pool, use the clear ip dhcp subnet command in privileged EXEC configuration mode.
clear ip dhcp [pool name] subnet { * | address}
Syntax Description
pool name
|
(Optional) Name of the DHCP pool.
|
*
|
Clears all leased subnets.
|
address
|
Clears a subnet containing the specified IP address.
|
Command Modes
Privileged EXEC
Command History
Release
|
Modification
|
12.2(8)T
|
This command was introduced.
|
12.2(33)SRC
|
This command was integrated into Cisco IOS Release 12.2(33)SRC.
|
Usage Guidelines
A PPP session that is allocated an IP address from the released subnet will be reset.
Note the following behavior for the clear ip dhcp subnet command:
•
If you do not specify the pool name option and an IP address is specified, it is assumed that the IP address is an address in the global address space and will look among all the non-virtual routing and forwarding (VRF) DHCP pools for the specified subnet.
•
If you do not specify the pool name option and the * option is specified, it is assumed that all automatic or on-demand subnets in all VRF and non-VRF pools are to be deleted.
•
If you specify both the pool name option and the * option, all automatic or on-demand subnets in the specified pool only will be cleared.
•
If you specify the pool name option and an IP address, the subnet containing the specified IP address will be deleted from the specified pool.
Caution 
Use this command with caution to prevent undesired termination of active PPP sessions.
Examples
The following example releases the subnet containing 10.0.0.2 from any non-VRF on-demand address pools:
Router# clear ip dhcp subnet 10.0.0.2
The following example clears all leased subnets from all pools:
Router# clear ip dhcp subnet *
The following example clears all leased subnets from the address pool named pool3:
Router# clear ip dhcp pool pool3 subnet *
The following example clears the address 10.0.0.2 from the address pool named pool2:
Router# clear ip dhcp pool pool2 subnet 10.0.0.2
Related Commands
Command
|
Description
|
show ip dhcp pool
|
Displays information about the DHCP address pools.
|
clear ip route dhcp
To remove routes from the routing table added by the Cisco IOS Dynamic Host Configuration Protocol (DHCP) server and relay agent for the DHCP clients on unnumbered interfaces, use the clear ip route dhcp command in EXEC mode.
clear ip route [vrf vrf-name] dhcp [ip-address]
Syntax Description
vrf
|
(Optional) VPN routing and forwarding instance (VRF).
|
vrf-name
|
(Optional) Name of the VRF.
|
ip-address
|
(Optional) Address about which routing information should be removed.
|
Defaults
No default behavior or values.
Command Modes
EXEC
Command History
Release
|
Modification
|
12.2
|
This command was introduced.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Usage Guidelines
To remove information about global routes in the routing table, use the clear ip route dhcp command. To remove routes in the VRF routing table, use the clear ip route vrf vrf-name dhcp command.
Examples
The following example removes a route to network 10.5.5.217 from the routing table:
Router# clear ip route dhcp 10.5.5.217
Related Commands
Command
|
Description
|
show ip route dhcp
|
Displays the routes added to the routing table by the Cisco IOS DHCP server and relay agent.
|
client-identifier
To specify the unique identifier (in dotted hexadecimal notation) for a Dynamic Host Configuration Protocol (DHCP) client, use the client-identifier command in DHCP pool configuration mode. To delete the client identifier, use the no form of this command.
client-identifier unique-identifier
no client-identifier
Syntax Description
unique-identifier
|
The distinct identification of the client in dotted-hexadecimal notation, for example, 01b7.0813.8811.66.
|
Defaults
No default behavior or values.
Command Modes
DHCP pool configuration
Command History
Release
|
Modification
|
12.0(1)T
|
This command was introduced.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Usage Guidelines
This command is valid for manual bindings only. DHCP clients require client identifiers instead of hardware addresses. The client identifier is formed by concatenating the media type and the MAC address. For example, the Microsoft client identifier for Ethernet address b708.1388.f166 is 01b7.0813.88f1.66, where 01 represents the Ethernet media type. For a list of media type codes, refer to the "Address Resolution Protocol Parameters" section of RFC 1700, Assigned Numbers.
You can determine the client identifier by using the debug ip dhcp server packet command.
Examples
The following example specifies the client identifier for MAC address 01b7.0813.8811.66 in dotted hexadecimal notation:
client-identifier 01b7.0813.8811.66
Related Commands
Command
|
Description
|
hardware-address
|
Specifies the hardware address of a BOOTP client.
|
host
|
Specifies the IP address and network mask for a manual binding to a DHCP client.
|
ip dhcp pool
|
Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode.
|
client-name
To specify the name of a Dynamic Host Configuration Protocol (DHCP) client, use the client-name command in DHCP pool configuration mode. To remove the client name, use the no form of this command.
client-name name
no client-name
Syntax Description
name
|
Specifies the name of the client, using any standard ASCII character. The client name should not include the domain name. For example, the name abc should not be specified as abc.cisco.com.
|
Defaults
No default behavior or values
Command Modes
DHCP pool configuration
Command History
Release
|
Modification
|
12.0(1)T
|
This command was introduced.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Usage Guidelines
The client name should not include the domain name.
Examples
The following example specifies a string client1 that will be the name of the client:
Related Commands
Command
|
Description
|
host
|
Specifies the IP address and network mask for a manual binding to a DHCP client.
|
ip dhcp pool
|
Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode.
|
default-router
To specify the default router list for a Dynamic Host Configuration Protocol (DHCP) client, use the default-router command in DHCP pool configuration mode. To remove the default router list, use the no form of this command.
default-router address [address2...address8]
no default-router
Syntax Description
address
|
Specifies the IP address of a router. One IP address is required, although you can specify up to eight addresses in one command line.
|
address2...address8
|
(Optional) Specifies up to eight addresses in the command line.
|
Defaults
No default behavior or values.
Command Modes
DHCP pool configuration
Command History
Release
|
Modification
|
12.0(1)T
|
This command was introduced.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Usage Guidelines
The IP address of the router should be on the same subnet as the client subnet. You can specify up to eight routers in the list. Routers are listed in order of preference (address1 is the most preferred router, address2 is the next most preferred router, and so on).
Examples
The following example specifies 10.12.1.99 as the IP address of the default router:
default-router 10.12.1.99
Related Commands
Command
|
Description
|
ip dhcp pool
|
Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode.
|
dns-server
To specify the Domain Name System (DNS) IP servers available to a Dynamic Host Configuration Protocol (DHCP) client, use the dns-server command in DHCP pool configuration mode. To remove the DNS server list, use the no form of this command.
dns-server address [address2...address8]
no dns-server
Syntax Description
address
|
The IP address of a DNS server. One IP address is required, although you can specify up to eight addresses in one command line.
|
address2...address8
|
(Optional) Specifies up to eight addresses in the command line.
|
Defaults
If DNS IP servers are not configured for a DHCP client, the client cannot correlate host names to IP addresses.
Command Modes
DHCP pool configuration
Command History
Release
|
Modification
|
12.0(1)T
|
This command was introduced.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Usage Guidelines
Servers are listed in order of preference (address1 is the most preferred server, address2 is the next most preferred server, and so on).
Examples
The following example specifies 10.12.1.99 as the IP address of the domain name server of the client:
Related Commands
Command
|
Description
|
domain-name (DHCP)
|
Specifies the domain name for a DHCP client.
|
ip dhcp pool
|
Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode.
|
domain-name (DHCP)
To specify the domain name for a Dynamic Host Configuration Protocol (DHCP) client, use the domain-name command in DHCP pool configuration mode. To remove the domain name, use the no form of this command.
domain-name domain
no domain-name
Syntax Description
domain
|
Specifies the domain name string of the client.
|
Defaults
No default behavior or values.
Command Modes
DHCP pool configuration
Command History
Release
|
Modification
|
12.0(1)T
|
This command was introduced.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Examples
The following example specifies cisco.com as the domain name of the client:
Related Commands
Command
|
Description
|
dns-server
|
Specifies the DNS IP servers available to a DHCP client.
|
ip dhcp pool
|
Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode.
|
hardware-address
To specify the hardware address of a BOOTP client, use the hardware-address command in DHCP pool configuration mode. To remove the hardware address, use the no form of this command.
hardware-address hardware-address [protocol-type | hardware-number]
no hardware-address
Syntax Description
hardware-address
|
MAC address of the client.
|
protocol-type
|
(Optional) Protocol type. The valid entries are:
• ethernet
• ieee802
If no protocol type is specified, the default is Ethernet.
|
hardware-number
|
(Optional) ARP hardware specified in an online database at http://www.iana.org/assignments/arp-parameters. The valid range is from 0 to 255. See Table 14 for valid entries.
|
Defaults
Only the hardware address is enabled.
Command Modes
DHCP pool configuration
Command History
Release
|
Modification
|
12.0(1)T
|
This command was introduced.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Usage Guidelines
This command is valid for manual bindings only.
Table 14 lists the valid assigned hardware numbers found online at http://www.iana.org/assignments/arp-parameters.
Table 14 ARP Hardware Numbers and Types
Hardware Number
|
Hardware Type
|
1
|
Ethernet
|
2
|
Experimental Ethernet (3Mb)
|
3
|
Amateur Radio AX.25
|
4
|
ProNET Token Ring
|
5
|
Chaos
|
6
|
IEEE 802 Networks
|
7
|
ARCNET
|
8
|
Hyperchannel
|
9
|
Lanstar
|
10
|
Autonet Short Address
|
11
|
LocalTalk
|
12
|
LocalNet (IBM PCNet or SYTEK LocalNET)
|
13
|
Ultra link
|
14
|
SMDS
|
15
|
Frame Relay
|
16
|
Asynchronous Transmission Mode (ATM)
|
17
|
HDLC
|
18
|
Fibre Channel
|
19
|
Asynchronous Transmission Mode (ATM) (RFC2225)
|
20
|
Serial Line
|
21
|
Asynchronous Transmission Mode (ATM)
|
22
|
MIL-STD-188-220
|
23
|
Metricom
|
24
|
IEEE 1394.1995
|
25
|
MAPOS and Common Air Interface (CAI)
|
26
|
Twinaxial
|
27
|
EUI-64
|
28
|
HIPARP
|
29
|
IP and ARP over ISO 7816-3
|
30
|
ARPSec
|
31
|
IPsec tunnel (RFC3456)
|
32
|
InfiniBand (RFC-ietf-ipoib-ip-over-infiniband-09.txt)
|
33
|
TIA-102 Project
|
Examples
The following example specifies b708.1388.f166 as the MAC address of the client:
hardware-address b708.1388.f166 ieee802
Related Commands
Command
|
Description
|
client-identifier
|
Specifies the unique identifier of a DHCP client in dotted hexadecimal notation.
|
host
|
Specifies the IP address and network mask for a manual binding to a DHCP client.
|
ip dhcp pool
|
Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode.
|
host
To specify the IP address and network mask for a manual binding to a Dynamic Host Configuration Protocol (DHCP) client, use the host command in DHCP pool configuration mode. To remove the IP address of the client, use the no form of this command.
host address [mask | /prefix-length]
no host
Syntax Description
address
|
Specifies the IP address of the client.
|
mask
|
(Optional) Specifies the network mask of the client.
|
/prefix-length
|
(Optional) Specifies the number of bits that comprise the address prefix. The prefix is an alternative way of specifying the network mask of the client. The prefix length must be preceded by a forward slash (/).
|
Defaults
The natural mask is used.
Command Modes
DHCP pool configuration
Command History
Release
|
Modification
|
12.0(1)T
|
This command was introduced.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Usage Guidelines
If the mask and prefix length are unspecified, DHCP examines its address pools. If no mask is found in the pool database, the Class A, B, or C natural mask is used. This command is valid for manual bindings only.
There is no limit on the number of manual bindings but you can configure only one manual binding per host pool.
Examples
The following example specifies 10.12.1.99 as the IP address of the client and 255.255.248.0 as the subnet mask:
host 10.12.1.99 255.255.248.0
Related Commands
Command
|
Description
|
client-identifier
|
Specifies the unique identifier of a Microsoft DHCP client in dotted hexadecimal notation.
|
hardware-address
|
Specifies the hardware address of a DHCP client.
|
ip dhcp pool
|
Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode.
|
network (DHCP)
|
Configures the subnet number and mask for a DHCP address pool on a Cisco IOS DHCP server.
|
import all
To import Dynamic Host Configuration Protocol (DHCP) option parameters into the DHCP server database, use the import all command in DHCP pool configuration mode. To disable this feature, use the no form of this command.
import all
no import all
Syntax Description
This command has no arguments or keywords.
Defaults
Disabled
Command Modes
DHCP pool configuration
Command History
Release
|
Modification
|
12.1(2)T
|
This command was introduced.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Usage Guidelines
When the no import all command is used, the DHCP server deletes all "imported" option parameters that were added to the specified pool in the server database. Manually configured DHCP option parameters override imported DHCP option parameters.
Imported option parameters are not part of the router configuration and are not saved in NVRAM.
Examples
The following example allows the importing of all DHCP options for a pool named pool1:
Related Commands
Command
|
Description
|
ip dhcp database
|
Configures a DHCP server to save automatic bindings on a remote host called a database agent.
|
show ip dhcp import
|
Displays the option parameters that were imported into the DHCP server database.
|
ip address dhcp
To acquire an IP address on an interface from the Dynamic Host Configuration Protocol (DHCP), use the ip address dhcp command in interface configuration mode. To remove any address that was acquired, use the no form of this command.
ip address dhcp [client-id interface-name] [hostname host-name]
no ip address dhcp [client-id interface-name] [hostname host-name]
Syntax Description
client-id
|
(Optional) Specifies the client identifier. By default, the client identifier is an ASCII value. The client-id interface-name option sets the client identifier to the hexadecimal MAC address of the named interface.
|
interface-name
|
(Optional) The interface name from which the MAC address is taken.
|
hostname
|
(Optional) Specifies the hostname.
|
host-name
|
(Optional) Name of the host to be placed in the DHCP option 12 field. This name need not be the same as the hostname entered in global configuration mode.
|
Defaults
The hostname is the globally configured hostname of the router.
The client identifier is an ASCII value.
Command Modes
Interface configuration (config-if)
Command History
Release
|
Modification
|
12.1(2)T
|
This command was introduced.
|
12.1(3)T
|
The client-id keyword and interface-name argument were added.
|
12.2(3)
|
The hostname keyword and host-name argument were added. The behavior of the client-id interface-name option changed. See the "Usage Guidelines" section for details.
|
12.2(8)T
|
The command was expanded for use on PPP over ATM (PPPoA) interfaces and certain ATM interfaces.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Usage Guidelines
Note
Prior to Release 12.2(8)T, the ip address dhcp command could be used only on Ethernet interfaces.
The ip address dhcp command allows any interface to dynamically learn its IP address by using the DHCP protocol. It is especially useful on Ethernet interfaces that dynamically connect to an internet service provider (ISP). Once assigned a dynamic address, the interface can be used with the Port Address Translation (PAT) of Cisco IOS Network Address Translation (NAT) to provide Internet access to a privately addressed network attached to the router.
The ip address dhcp command also works with ATM point-to-point interfaces and will accept any encapsulation type. However, for ATM multipoint interfaces you must specify Inverse ARP via the protocol ip inarp interface configuration command and use only the aa15snap encapsulation type.
Some ISPs require that the DHCPDISCOVER message have a specific hostname and client identifier that is the MAC address of the interface. The most typical usage of the ip address dhcp client-id interface-name hostname host-name command is when interface-name is the Ethernet interface where the command is configured and host-name is the hostname provided by the ISP.
A client identifier (DHCP option 61) can be a hexadecimal or an ASCII value. By default, the client identifier is an ASCII value. The client-id interface option overrides the default and forces the use of the hexadecimal MAC address of the named interface.
Note
Between Cisco IOS Releases 12.1(3)T and 12.2(3), the client-id optional keyword allowed the change of the fixed ASCII value for the client identifier. After Release 12.2(3), the optional client-id keyword forced the use of the hexadecimal MAC address of the named interface as the client identifier.
If a Cisco router is configured to obtain its IP address from a DHCP server, it sends a DHCPDISCOVER message to provide information about itself to the DHCP server on the network.
If you use the ip address dhcp command with or without any of the optional keywords, the DHCP option 12 field (host name option) is included in the DISCOVER message. By default, the hostname specified in option 12 will be the globally configured host name of the router. However, you can use the ip address dhcp hostname host-name command to place a different name in the DHCP option 12 field than the globally configured hostname of the router.
The no ip address dhcp command removes any IP address that was acquired, thus sending a DHCPRELEASE message.
You might need to experiment with different configurations to determine the one required by your DHCP server. Table 15 shows the possible configuration methods and the information placed in the DISCOVER message for each method.
Table 15 Configuration Method and Resulting Contents of the DISCOVER Message
Configuration Method
|
Contents of DISCOVER Messages
|
ip address dhcp
|
The DISCOVER message contains "cisco- mac-address -Eth1" in the client ID field. The mac-address is the MAC address of the Ethernet 1 interface and contains the default hostname of the router in the option 12 field.
|
ip address dhcp hostname host-name
|
The DISCOVER message contains "cisco- mac-address -Eth1" in the client ID field. The mac-address is the MAC address of the Ethernet 1 interface, and contains host-name in the option 12 field.
|
ip address dhcp client-id ethernet 1
|
The DISCOVER message contains the MAC address of the Ethernet 1 interface in the client ID field and contains the default hostname of the router in the option 12 field.
|
ip address dhcp client-id ethernet 1 hostname host-name
|
The DISCOVER message contains the MAC address of the Ethernet 1 interface in the client ID field and contains host-name in the option 12 field.
|
Examples
In the examples that follow, the command ip address dhcp is entered for Ethernet interface 1. The DISCOVER message sent by a router configured as shown in the following example would contain "cisco- mac-address -Eth1" in the client-ID field, and the value abc in the option 12 field.
The DISCOVER message sent by a router configured as shown in the following example would contain "cisco- mac-address -Eth1" in the client-ID field, and the value def in the option 12 field.
ip address dhcp hostname def
The DISCOVER message sent by a router configured as shown in the following example would contain the MAC address of Ethernet 1 interface in the client-id field, and the value abc in the option 12 field.
ip address dhcp client-id Ethernet 1
The DISCOVER message sent by a router configured as shown in the following example would contain the MAC address of Ethernet 1 interface in the client-id field, and the value def in the option 12 field.
ip address dhcp client-id Ethernet 1 hostname def
Related Commands
Command
|
Description
|
ip dhcp pool
|
Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode.
|
ip address pool (DHCP)
To enable the IP address of an interface to be automatically configured when a Dynamic Host Configuration Protocol (DHCP) pool is populated with a subnet from IP Control Protocol (IPCP) negotiation, use the ip address pool command in interface configuration mode. To disable autoconfiguring of the IP address of the interface, use the no form of this command.
ip address pool name
no ip address pool
Syntax Description
name
|
Name of the DHCP pool. The IP address of the interface will be automatically configured from the DHCP pool specified in name.
|
Defaults
IP address pooling is disabled.
Command Modes
Interface configuration
Command History
Release
|
Modification
|
12.2(8)T
|
This command was introduced.
|
Usage Guidelines
Use this command to automatically configure the IP address of a LAN interface when there are DHCP clients on the attached LAN that should be serviced by the DHCP pool on the router. The DHCP pool obtains its subnet dynamically through IPCP subnet negotiation.
Examples
The following example specifies that the IP address of Ethernet interface 2 will be automatically configured from the address pool named abc:
Related Commands
Command
|
Description
|
show ip interface
|
Displays the usability status of interfaces configured for IP.
|
ip dhcp aaa default username
To specify the default user name for non-virtual routing and forwarding (VRF) address pools that have been configured to obtain subnets through authentication, authorization, and accounting (AAA), use the ip dhcp aaa default username command in global configuration mode. To disable this functionality, use the no form of this command.
ip dhcp aaa default username name
no ip dhcp aaa default username name
Syntax Description
name
|
Name of the address pool.
|
Defaults
No default behavior or values.
Command Modes
Global configuration
Command History
Release
|
Modification
|
12.2(8)T
|
This command was introduced.
|
12.2(15)T
|
The behavior when the username attribute is sent in the AAA request was changed.
|
12.2(28)SB
|
This command was integrated into Cisco IOS Release 12.2(28)SB.
|
Usage Guidelines
Address pools that are configured with the vrf and origin aaa commands will set the username attribute in the AAA request to the specified VRF name. If the VPN ID as specified in RFC 2685 is configured for the VRF, the VPN ID will be sent instead.
Address pools that are not configured with the vrf command but are configured with the origin aaa command, will set the username attribute in the AAA request to the specified name in the ip dhcp aaa default username command.
Use the debug aaa attribute command to verify the value of the username attribute in the subnet request to the AAA server.
In Cisco IOS Release 12.2(8)T, if this command is not configured, no AAA subnet request from non-VRF ODAPs will be sent.
In Cisco IOS Release 12.2(15)T, if the DHCP pool is not configured with VRF and the ip dhcp aaa default username command is not configured, the AAA request will still be sent with the username attribute set to the DHCP pool name.
This command is not needed if all on-demand address pools (ODAPs) on the VHG/provider edge (PE) are VRF-associated.
Examples
The following example sets the username attribute in the AAA request to abc:
ip dhcp aaa default username abc
Related Commands
Command
|
Description
|
debug aaa attribute
|
Verifies the value of the AAA attributes.
|
origin
|
Configures an address pool as an on-demand address pool.
|
vrf
|
Associates the on-demand address pool with a VPN routing and forwarding instance.
|
ip dhcp bootp ignore
To enable a Dynamic Host Configuration Protocol (DHCP) server to selectively ignore and not reply to received Bootstrap Protocol (BOOTP) request packets, use the ip dhcp bootp ignore command in global configuration mode. To return to the default behavior, use the no form of this command.
ip dhcp bootp ignore
no ip dhcp bootp ignore
Syntax Description
This command has no arguments or keywords.
Defaults
The default behavior is to service BOOTP requests.
Command Modes
Global configuration
Command History
Release
|
Modification
|
12.2(8)T
|
This command was introduced.
|
12.2(28)SB
|
This command was integrated into Cisco IOS Release 12.2(28)SB.
|
Usage Guidelines
A DHCP server can forward ignored BOOTP request packets to another DHCP server if the ip helper-address command is configured on the incoming interface. If the ip helper-address command is not configured, the router will drop the received BOOTP request.
Examples
The following example shows that the router will ignore received BOOTP requests:
Related Commands
Command
|
Description
|
ip bootp server
|
Enables the BOOTP service on routing devices.
|
ip helper-address
|
Forwards UDP broadcasts, including BOOTP, received on an interface.
|
ip dhcp class
To define a Dynamic Host Configuration Protocol (DHCP) class and enter DHCP class configuration mode, use the ip dhcp class command in global configuration mode. To remove the class, use the no form of this command.
ip dhcp class class-name
no ip dhcp class class-name
Syntax Description
class-name
|
Name of the DHCP class.
|
Defaults
No default behavior or values.
Command Modes
Global configuration
Command History
Release
|
Modification
|
12.2(13)ZH
|
This command was introduced.
|
12.3(4)T
|
This command was integrated into Cisco IOS Release 12.3(4)T.
|
12.2(28)SB
|
This command was integrated into Cisco IOS Release 12.2(28)SB.
|
12.2(33)SRB
|
This command was integrated into Cisco IOS Release 12.2(33)SRB.
|
Usage Guidelines
DHCP class configuration provides a method to group DHCP clients based on some shared characteristics other than the subnet in which the clients reside.
Examples
The following example defines three DHCP classes and their associated relay agent information patterns. Note that CLASS3 is considered a "match to any" class because it has no relay agent information pattern configured:
! Relay agent information patterns
relay-information hex 01030a0b0c02050000000123
relay-information hex 01030a0b0c02*
relay-information hex 01030a0b0c02050000000000 bitmask 0000000000000000000000FF
! Relay agent information patterns
relay-information hex 01040102030402020102
relay-information hex 01040101030402020102
Related Commands
Command
|
Description
|
relay agent information
|
Enters relay agent information option configuration mode.
|
relay-information hex
|
Specifies a hexadecimal string for the full relay agent information option.
|
ip dhcp client
To configure the Dynamic Host Configuration Protocol (DHCP) client to associate any added routes with a specified tracked object number, use the ip dhcp client command in interface configuration mode. To restore the default setting, use the no form of this command.
ip dhcp client route track number
no ip dhcp client route track
Syntax Description
route track number
|
Associates a tracked object number with the DHCP-installed static route. Valid values for the number argument range from 1 to 500.
|
Defaults
No routes are associated with a track number.
Command Modes
Interface configuration
Command History
Release
|
Modification
|
12.3(2)XE
|
This command was introduced.
|
12.3(8)T
|
This command was integrated into Cisco IOS Release 12.3(8)T.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2(33)SXH
|
This command was integrated into Cisco IOS Release 12.2(33)SXH.
|
Usage Guidelines
The ip dhcp client command must be configured before the ip address dhcp command is configured on an interface. The ip dhcp client command is checked only when an IP address is acquired from DHCP. If the ip dhcp client command is specified after an IP address has been acquired from DHCP, the ip dhcp client command will not take effect until the next time the router acquires an IP address from DHCP.
Examples
The following example configures DHCP on an Ethernet interface and associates tracked object 123 with routes generated from this interface:
ip dhcp client route track 123
Related Commands
Command
|
Description
|
ip address dhcp
|
Acquires an IP address on an Ethernet interface from the DHCP.
|
ip dhcp client authentication key-chain
To specify the key chain to be used in authenticating a request, use the ip dhcp client authentication key-chain command in interface configuration mode. To disable key-chain authentication, use the no form of this command.
ip dhcp client authentication key-chain name
no ip dhcp client authentication key-chain name
Syntax Description
name
|
Name of the key chain.
|
Command Default
Authentication is not specified.
Command Modes
Interface configuration (config-if)
Command History
Release
|
Modification
|
12.4(22)YB
|
This command was introduced.
|
15.0(1)M
|
This command was integrated into Cisco IOS Release 15.0(1)M.
|
Usage Guidelines
Configure the ip dhcp client authentication key-chain command to send to the server authentication messages that are encoded by the secret ID and secret value that were configured in the key chain command. When authentication is enabled, all client-server exchanges must be authenticated: the ip dhcp client authentication mode and key chain commands must be configured.
Examples
The following example shows how to specify a key chain named chain1 for authentication exchanges:
Router(config-if)# ip dhcp client authentication key-chain chain1
Related Commands
Command
|
Description
|
ip dhcp client authentication mode
|
Specifies the type of authentication to be used in DHCP messages on the interface.
|
ip dhcp-client forcerenew
|
Enables forcerenew-message handling on the DHCP client when authentication is enabled.
|
key chain
|
Identifies a group of authentication keys for routing protocols.
|
ip dhcp client authentication mode
To specify the type of authentication to be used in DHCP messages on the interface, use the ip dhcp client authentication mode command in interface configuration mode. To remove the specification, use the no form of this command.
ip dhcp client authentication mode {md5 | token}
no ip dhcp client authentication mode {md5 | token}
Syntax Description
md5
|
Specifies MD5-based authentication.
|
token
|
Specifies token-based authentication.
|
Command Default
No authentication mode is configured.
Command Modes
Interface configuration (config-if)
Command History
Release
|
Modification
|
12.4(22)YB
|
This command was introduced.
|
15.0(1)M
|
This command was integrated into Cisco IOS Release 15.0(1)M.
|
Usage Guidelines
Token-based authentication is useful only for basic protection against inadvertently instantiated DHCP servers. Tokens are transmitted in plain text; they provide weak authentication and do not provide message authentication. MD5-based authentication provides better message and entry authentication because it specifies the generation of a temporary value by the source.
Examples
The following example shows how to specify chain1 as the key chain, and MD5 as the mode, for authentication exchanges:
Router(config-if)# ip dhcp client authentication key-chain chain1
Router(config-if)# ip dhcp client authentication mode md5
Related Commands
Command
|
Description
|
ip dhcp client authentication key-chain
|
Specifies the key chain to be used in DHCP authentication requests.
|
ip dhcp-client forcerenew
|
Enables forcerenew-message handling on the DHCP client when authentication is enabled.
|
key chain
|
Identifies a group of authentication keys for routing protocols.
|
ip dhcp-client broadcast-flag
To configure the Dynamic Host Configuration (DHCP) client to set the broadcast flag, use the ip dhcp-client broadcast-flag command in global configuration mode. To disable this feature, use the no form of this command.
ip dhcp-client broadcast-flag
no dhcp-client broadcast-flag
Syntax Description
This command has no arguments or keywords.
Defaults
The broadcast flag is on.
Command Modes
Global configuration
Command History
Release
|
Modification
|
12.2
|
This command was introduced.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Usage Guidelines
Use this command to set the broadcast flag to 1 or 0 in the DHCP packet header when the DHCP client sends a discover requesting an IP address. The DHCP server listens to this broadcast flag and broadcasts the reply packet if the flag is set to 1.
If the no ip dhcp-client broadcast-flag command is entered, the broadcast flag is set to 0 and the DHCP server unicasts the reply packets to the client with the offered IP address.
The DHCP client can receive both broadcast and unicast offers from the DHCP server.
Examples
The following example sets the broadcast flag on:
ip dhcp-client broadcast-flag
Related Commands
Command
|
Description
|
ip address dhcp
|
Acquires an IP address on an interface via DHCP.
|
service dhcp
|
Enables DHCP server and relay functions.
|
ip dhcp client class-id
To specify the class identifier, use the ip dhcp client class-id command in interface configuration mode. To remove the class identifier, use the no form of this command.
ip dhcp client class-id {string | hex string}
no ip dhcp client class-id {string | hex string}
Syntax Description
string
|
A unique ASCII string.
|
hex string
|
A unique hexadecimal value.
|
Defaults
No class identifier is specified.
Command Modes
Interface configuration
Command History
Release
|
Modification
|
12.3(2)XF
|
This command was introduced.
|
12.3(8)T
|
This command was integrated into Cisco IOS Release 12.3(8)T.
|
12.2(28)SB
|
This command was integrated into Cisco IOS Release 12.2(28)SB.
|
Usage Guidelines
The ip dhcp client class-id command is checked only when an IP address is acquired from a Dynamic Host Configuration Protocol (DHCP) server. If the command is specified after an IP address has been acquired from the DHCP server, the command will not take effect until the next time the router acquires an IP address from the DHCP server. This means that the new configuration will only take effect after either the ip address dhcp command or the release dhcp and renew dhcp EXEC commands have been specified.
The class identifier is used by vendors to specify the type of device that is requesting an IP address. For example, docsis 1.0 can be used for a cable modem and Cisco Systems, Inc. IP Phone can be used for a Cisco IP phone.
Examples
The following example configures a class identifier with a hexadecimal string of ABCDEF1235:
ip dhcp client class-id hex ABCDEF1235
Related Commands
Command
|
Description
|
ip address dhcp
|
Acquires an IP address on an interface from DHCP.
|
release dhcp
|
Performs an immediate release of a DHCP lease for an interface.
|
renew dhcp
|
Performs an immediate renewal of a DHCP lease for an interface.
|
ip dhcp-client default-router distance
To configure a default Dynamic Host Configuration Protocol (DHCP) administrative distance for clients, use the ip dhcp-client default-router distance command in global configuration mode. To return to the default, use the no form of this command.
ip dhcp-client default-router distance value
no ip dhcp-client default-router distance value
Syntax Description
distance
|
DHCP administrative distance. The value argument sets the default distance. The range is from 1 to 255.
|
Defaults
254
Command Modes
Global configuration
Command History
Release
|
Modification
|
12.2
|
This command was introduced.
|
12.2(11)T
|
This command was integrated into Cisco IOS Release 12.2(11)T.
|
12.2(18)S
|
This command was integrated into Cisco IOS Release 12.2(18)S.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Examples
The following example shows how to configure the default admininstrative distance to 25:
ip dhcp-client default-router distance 25
Related Commands
Command
|
Description
|
debug dhcp client
|
Displays debugging information about the DHCP client activities and monitors the status of DHCP packets.
|
show ip route dhcp
|
Displays the routes added to the routing table by the DHCP server and relay agent.
|
ip dhcp-client forcerenew
To enable forcerenew-message handling on the DHCP client when authentication is enabled, use the ip dhcp-client forcerenew command in global configuration mode. To disable the forced authentication, use the no form of this command.
ip dhcp-client forcerenew
no ip dhcp-client forcerenew
Syntax Description
This command has no arguments or keywords.
Command Default
Forcerenew messages are dropped.
Command Modes
Global configuration (config)
Command History
Release
|
Modification
|
12.4(22)YB
|
This command was introduced.
|
15.0(1)M
|
This command was integrated into Cisco IOS Release 15.0(1)M.
|
Usage Guidelines
DHCP forcerenew handling is not enabled until the CLI is configured.
Examples
The following example shows how to enable DHCP forcerenew-message handling on the DHCP client:
Router(config)# ip dhcp-client forcerenew
Related Commands
Command
|
Description
|
ip dhcp client authentication key-chain
|
Specifies the key chain to be used in DHCP authentication requests.
|
ip dhcp client authentication mode
|
Specifies the type of authentication to be used in DHCP messages on the interface.
|
key chain
|
Identifies a group of authentication keys for routing protocols.
|
ip dhcp client hostname
To specify or modify the hostname sent in a Dynamic Host Configuration Protocol (DHCP) message, use the ip dhcp client hostname command in interface configuration mode. To remove the hostname, use the no form of this command.
ip dhcp client hostname host-name
no ip dhcp client hostname host-name
Syntax Description
host-name
|
Name of the host.
|
Command Default
The hostname is the globally configured hostname of the router.
Command Modes
Interface configuration(config-if)
Command History
Release
|
Modification
|
12.3(2)XF
|
This command was introduced.
|
12.3(8)T
|
This command was integrated into Cisco IOS Release 12.3(8)T.
|
12.2(28)SB
|
This command was integrated into Cisco IOS Release 12.2(28)SB.
|
Usage Guidelines
The ip dhcp client hostname command is checked only when an IP address is acquired from a DHCP server. If the command is specified after an IP address has been acquired from DHCP, it will not take effect until the next time the router acquires an IP address from the DHCP server. This means that the new configuration will only take effect after either the ip address dhcp command or the release dhcp and renew dhcp EXEC commands have been specified.
This command is applicable only for DHCP requests generated by Cisco IOS software. This command is ignored when Cisco IOS software relays requests (for example, from Distributed Route Processor PPP clients).
Examples
The following example shows how to specify the hostname of the DHCP client as hostA:
ip dhcp client hostname hostA
Related Commands
Command
|
Description
|
ip address dhcp
|
Acquires an IP address on an interface from DHCP.
|
release dhcp
|
Performs an immediate release of a DHCP lease for an interface.
|
renew dhcp
|
Performs an immediate renewal of a DHCP lease for an interface.
|
ip dhcp client lease
To configure the duration of the lease for an IP address that is requested from a Dynamic Host Configuration Protocol (DHCP) client to a DHCP server, use the ip dhcp client lease command in interface configuration mode. To restore to the default value, use the no form of this command.
ip dhcp client lease days [hours] [minutes]
no ip dhcp client lease
Syntax Description
days
|
Specifies the duration of the lease in days.
|
hours
|
(Optional) Specifies the number of hours in the lease. A days value must be supplied before an hours value can be configured.
|
minutes
|
(Optional) Specifies the number of minutes in the lease. A days value and an hours value must be supplied before a minutes value can be configured.
|
Defaults
A default lease time is not included in the DHCP DISCOVER messages sent by the client. The client accepts the lease time that the DHCP server sends.
Command Modes
Interface configuration
Command History
Release
|
Modification
|
12.3(2)XF
|
This command was introduced.
|
12.3(8)T
|
This command was integrated into Cisco IOS Release 12.3(8)T.
|
12.2(28)SB
|
This command was integrated into Cisco IOS Release 12.2(28)SB.
|
Usage Guidelines
The ip dhcp client lease command is checked only when an IP address is acquired from a DHCP server. If the command is specified after an IP address has been acquired from DHCP, it will not take effect until the next time the router acquires an IP address from the DHCP server. This means that the new configuration will only take effect after either the ip address dhcp command or the release dhcp and renew dhcp EXEC commands have been specified.
Examples
The following example shows a one-day lease:
The following example shows a one-hour lease:
The following example shows a one-minute lease:
ip dhcp client lease 0 0 1
Related Commands
Command
|
Description
|
ip address dhcp
|
Acquires an IP address on an interface from DHCP.
|
lease
|
Configures the duration of the lease for an IP address that is assigned from a DHCP server to a DHCP client
|
release dhcp
|
Performs an immediate release of a DHCP lease for an interface.
|
renew dhcp
|
Performs an immediate renewal of a DHCP lease for an interface.
|
ip dhcp client mobile renew
To configure the number of renewal attempts and the interval between attempts for renewing an IP address acquired by a Dynamic Host Configuration Protocol (DHCP) client, use the ip dhcp client mobile renew command in interface configuration mode. To disable the functionality, use the no form of this command.
ip dhcp client mobile renew count number interval ms
no ip dhcp client mobile renew count number interval ms
Syntax Description
count number
|
Number of attempts to renew a current IP address before starting the DHCP discovery process. The range is from 0 to 10 attempts. The default is 2 attempts.
|
interval ms
|
Interval to wait between renewal attempts. The range is from 1 to 1000 ms. The default is 50 ms.
|
Defaults
count number: 2
interval ms: 50
Command Modes
Interface configuration
Command History
Release
|
Modification
|
12.3(14)T
|
This command was introduced.
|
Usage Guidelines
Mobile DHCP clients automatically attempt to renew an existing IP address in response to certain events, such as moving between wireless access points. The number of renewal attempts, and the interval between those attempts, depending on network conditions, can be modified by using the ip dhcp client mobile renew command.
Examples
In the following example, the DHCP client will make four attempts to renew its current IP address with an interval of 30 milliseconds between attempts :
ip dhcp client mobile renew count 4 interval 30
Related Commands
Command
|
Description
|
ip address dhcp
|
Acquires an IP address on an interface from DHCP.
|
ip dhcp-client network-discovery
To control the sending of Dynamic Host Configuration Protocol (DHCP) Inform and Discover messages, use the ip dhcp-client network-discovery command in global configuration mode. To change or disable DHCP message control, use the no form of this command.
ip dhcp-client network-discovery informs number-of-messages discovers number-of-messages
period seconds
no ip dhcp-client network-discovery informs number-of-messages discovers
number-of-messages period seconds
Syntax Description
informs number-of-messages
|
Number of DHCP Inform messages. Valid choices are 0, 1, or 2 messages. Default is 0 messages.
|
discovers number-of-messages
|
Number of DHCP Discover messages. Valid choices are 0, 1, or 2 messages. Default is 0 messages.
|
period seconds
|
Timeout period for retransmission of DHCP Inform and Discover messages. Valid periods are from 3 to 15 seconds. Default is 15 seconds.
|
Defaults
0 DHCP Inform and Discover messages (network discovery is disabled when both the informs and discovers keywords are set to 0); 15-second timeout period.
Command Modes
Global configuration
Command History
Release
|
Modification
|
12.2
|
This command was introduced.
|
12.2(28)SB
|
This command was integrated into Cisco IOS Release 12.2(28)SB.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Usage Guidelines
The ip dhcp-client network-discovery command allows peer routers to dynamically discover Domain Name System (DNS) and NetBIOS name server information configured on a DHCP server using PPP IP Control Protocol (IPCP) extensions. Setting the number of DHCP Inform or Discover messages to 1 or 2 determines how many times the system sends a DHCP Inform or Discover message before stopping network discovery, as follows:
•
When the number of DHCP Inform messages is set to 1, once the first Inform messages is sent the system waits for a response from the DHCP server for the specified timeout period. If there is no response from the DHCP server by the end of the timeout period, the system sends a DHCP Discover message when the number of Discover messages is not set to 0. If the number of Discover messages is set to 1, network discovery stops. If the number of Discover messages is set to 2, the system waits again for a response from the DHCP server for the specified timeout period. If there is no response from the DHCP server by the end of this second timeout period, the system sends a second DHCP Discover message and stops network discovery.
•
When the number of DHCP Inform messages is set to 2, once the first Inform messages is sent, the system waits for a response from the DHCP server for the specified timeout period. If there is no response from the DHCP server by the end of the timeout period, the system sends another DHCP Inform message. If the number of Discover messages is set to 1, network discovery stops. If the number of Discover messages is set to 2, the system waits again for a response from the DHCP server for the specified timeout period. If there is no response from the DHCP server by the end of this second timeout period, the system sends a second DHCP Discover message and stops network discovery.
Network discovery also stops when the DHCP server responds to DHCP Inform and Discover messages before the configured number of messages and timeout period are exceeded.
Setting the number of messages to 0 disables sending of DHCP Inform and Discover messages, and is the same as entering the no ip dhcp-client network-discovery command. When the ip dhcp-client network-discovery command is disabled, the system falls back to the static configurations made using the async-bootp dns-server and async-bootp nb-server global configuration commands or, as a last resort, to a DNS server address assigned with the ip name-server command.
Examples
The following example sets two DHCP Inform and Discovery messages and a timeout period of
12 seconds:
ip dhcp-client network-discovery informs 2 discovers 2 period 12
Related Commands
Command
|
Description
|
async-bootp
|
Configures extended BOOTP requests for asynchronous interfaces as defined in RFC 1084.
|
ip dhcp-server
|
Specifies which DHCP servers to use on a network, and specifies the IP address of one or more DHCP servers available on the network.
|
ip name-server
|
Specifies the address of one or more name servers to use for name and address resolution.
|
ip dhcp client request
To configure a Dynamic Host Configuration Protocol (DHCP) client to request an option from a DHCP server, use the ip dhcp client request command in interface configuration mode. To remove the request for an option, use the no form of this command.
ip dhcp client request option-name
no ip dhcp client request option-name
Syntax Description
option-name
|
The option name can be one of the following keywords:
• tftp-server-address
• sip-server-address
• netbios-nameserver
• vendor-specific
• vendor-identifying-specific
• static-route
• classless-static-route
• domain-name
• dns-nameserver
• router
By default, all these options except sip-server-address, vendor-identifying-specific, and classless-static-route are requested.
|
Defaults
All the options are requested except sip-server-address, vendor-identifying-specific, and classless-static-route.
Command Modes
Interface configuration (config-if)
Command History
Release
|
Modification
|
12.3(2)XF
|
This command was introduced.
|
12.3(8)T
|
This command was integrated into Cisco IOS Release 12.3(8)T.
|
12.2(28)SB
|
This command was integrated into Cisco IOS Release 12.2(28)SB.
|
12.4(22)YB
|
This command was modified. The sip-server-address, vendor-identifying-specific, and classless-static-route keywords were added.
|
15.0(1)M
|
This command was integrated into Cisco IOS Release 15.0(1)M.
|
Usage Guidelines
By default, all options except sip-server-address, vendor-identifying-specific, and classless-static-route are requested, so you must use the no form of the ip dhcp client request command to disable those default options, and explicitly specify any options that are not enabled by default.
Default options that are specified by the no form are removed from the DHCP originated address for the interface. An option can be reinserted in the list of requested options by using the same command without the no keyword. Multiple options can be specified on one configuration line. However, each option will appear on a separate line in the running configuration.
The ip dhcp client request command is checked only when an IP address is acquired from a DHCP server. If the command is specified after an IP address has been acquired from DHCP, it will not take effect until the next time the router acquires an IP address from the DHCP server. This means that the new configuration will take effect only after either the ip address dhcp command or a DHCP lease renewal or termination that is not initiated by a release dhcp or a renew dhcp command.
Examples
The following example shows how to configure the DHCP client to remove the DNS name server from the options requested from the DHCP server:
no ip dhcp client request dns-nameserver
Related Commands
Command
|
Description
|
ip address dhcp
|
Acquires an IP address on an interface from DHCP.
|
ip dhcp-client forcerenew
|
Enables forcerenew-message handling on the DHCP client when authentication is enabled.
|
ip dhcp client authentication key-chain
|
Specifies the authentication key used for the DHCP protocol on the interface.
|
ip dhcp client authentication mode
|
Specifies the type of authentication to be used in DHCP messages on the interface.
|
release dhcp
|
Performs an immediate release of a DHCP lease for an interface.
|
renew dhcp
|
Performs an immediate renewal of a DHCP lease for an interface.
|
Command
|
Description
|
ip address dhcp
|
Acquires an IP address on an interface from DHCP.
|
release dhcp
|
Performs an immediate release of a DHCP lease for an interface.
|
renew dhcp
|
Performs an immediate renewal of a DHCP lease for an interface.
|
ip dhcp compatibility lease-query client
To configure the Dynamic Host Configuration Protocol (DHCP) client to send a lease query according to RFC 4388, use the ip dhcp compatibility lease-query client command in global configuration mode. To disable this configuration, use the no form of this command.
ip dhcp compatibility lease-query client {cisco | standard}
no ip dhcp compatibility lease-query client
Syntax Description
cisco
|
Configures the DHCP client to use the Cisco standard lease-query message type. This is the default value.
|
standard
|
Configures the DHCP client to use the RFC 4388 standard lease-query message type.
|
Command Default
The DHCP client is configured to use the Cisco standard lease-query message type.
Command Modes
Global configuration (config)
Command History
Release
|
Modification
|
12.4(22)T
|
This command was introduced.
|
12.2(33)SRC
|
This command was integrated into Cisco IOS Release 12.2(33)SRC.
|
Usage Guidelines
Some DHCP servers support only the RFC 4388 standard of lease query. If the DHCP server supports only the RFC 4388 standard, then you must configure the DHCP client to send a lease query according to the RFC 4388 standard.
The Cisco IOS DHCP client sends a lease query with the message type set to 13 and receives either an ACK (acknowledge) or NAK (deny) from the DHCP server. This is the behavior of the DHCP client as per the Cisco standard.
As per the RFC 4388 standard, if a DHCP server receives a lease query with the message type set to 10, it will reply with one of the following message types:
•
DHCPLEASEUNASSIGNED 11
•
DHCPLEASEUNKNOWN 12
•
DHCPLEASEACTIVE 13
By using the ip dhcp compatibility lease-query client command, you can switch between Cisco's implementation and the RFC 4388 standard implementation.
Examples
The following example shows how to configure the DHCP client to switch from Cisco's implementation to the RFC 4388 standard implementation:
Router(config)# ip dhcp compatibility lease-query client standard
Related Commands
Command
|
Description
|
ip dhcp compatibility suboption
|
Configures DHCP compatibility for a relay-agent suboption.
|
ip dhcp compatibility suboption link-selection
To configure the Dynamic Host Configuration Protocol (DHCP) client to use private as well as the Internet Assigned Numbers Authority (IANA) standard relay agent suboption numbers, use the ip dhcp compatibility suboption link-selection command in global configuration mode. To disable this configuration, use the no form of this command.
ip dhcp compatibility suboption link-selection {cisco | standard}
no ip dhcp compatibility suboption link-selection
Syntax Description
cisco
|
Configures the DHCP client to use the private Cisco suboption numbers.
|
standard
|
Configures the DHCP client to use the standard IANA suboption numbers.
|
Command Default
Disabled. (The DHCP client is configured to use the private relay agent suboption numbers.)
Command Modes
Global configuration (config)
Command History
Release
|
Modification
|
12.4(100)
|
This command was introduced.
|
12.2(33)SRC
|
This command was integrated into Cisco IOS Release 12.2(33)SRC.
|
Usage Guidelines
Sometimes new features are implemented in advance of standardization. That is, features are developed before the IANA numbers are assigned to the relay agent suboptions. In these cases, the DHCP client uses the private Cisco relay agent suboption numbers. When the IANA numbers are assigned later, the DHCP client must be able to use both the private as well as the IANA relay suboption numbers. You can use the ip dhcp compatibility suboption link-selection command to configure the DHCP client to use the IANA relay agent suboption numbers.
Examples
The following example shows how to configure the DHCP client to support the relay agent with the IANA standard suboption number:
Router(config)# ip dhcp compatibility suboption link-selection standard
Related Commands
Command
|
Description
|
ip dhcp compatibility lease-query client
|
Configures the DHCP client to send a lease query according to the RFC 4388 standard.
|
ip dhcp conflict logging
To enable conflict logging on a Dynamic Host Configuration Protocol (DHCP) server, use the ip dhcp conflict logging command in global configuration mode. To disable conflict logging, use the no form of this command.
ip dhcp conflict logging
no ip dhcp conflict logging
Syntax Description
This command has no arguments or keywords.
Defaults
Conflict logging is enabled.
Command Modes
Global configuration
Command History
Release
|
Modification
|
12.0(1)T
|
This command was introduced.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Usage Guidelines
A DHCP server database agent should be used to store automatic bindings. If a DHCP server database agent is not used, specify the no ip dhcp conflict logging command to disable the recording of address conflicts. By default, the DHCP server records DHCP address conflicts in a log file.
Examples
The following example disables the recording of DHCP address conflicts:
no ip dhcp conflict logging
Related Commands
Command
|
Description
|
clear ip dhcp conflict
|
Clears an address conflict from the Cisco IOS DHCP server database.
|
ip dhcp database
|
Configures a Cisco IOS DHCP server to save automatic bindings on a remote host called a database agent.
|
show ip dhcp conflict
|
Displays address conflicts found by a Cisco IOS DHCP server when addresses are offered to the client.
|
ip dhcp database
To configure a Cisco IOS Dynamic Host Configuration Protocol (DHCP) server and relay agent to save automatic bindings on a remote host called a database agent, use the ip dhcp database command in global configuration mode. To remove the database agent, use the no form of this command.
ip dhcp database url [timeout seconds | write-delay seconds | write-delay seconds timeout
seconds]
no ip dhcp database url
Syntax Description
url
|
Specifies the remote file used to store the automatic bindings. The following are acceptable URL file formats:
• tftp://host/filename
• ftp://user:password@host/filename
• rcp://user@host/filename
• flash://filename
• disk0://filename
|
timeout seconds
|
(Optional) Specifies how long (in seconds) the DHCP server should wait before aborting a database transfer. Transfers that exceed the timeout period are aborted. By default, DHCP waits 300 seconds (5 minutes) before aborting a database transfer. Infinity is defined as 0 seconds.
|
write-delay seconds
|
(Optional) Specifies how soon the DHCP server should send database updates. By default, DHCP waits 300 seconds (5 minutes) before sending database changes. The minimum delay is 60 seconds.
|
Defaults
DHCP waits 300 seconds for both a write delay and a timeout.
Command Modes
Global configuration
Command History
Release
|
Modification
|
12.0(1)T
|
This command was introduced.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Usage Guidelines
A DHCP database agent is any host (for example, an FTP, TFTP, or rcp server) or storage media on the DHCP server (for example, disk0) that stores the DHCP bindings database. You can configure multiple DHCP database agents, and you can configure the interval between database updates and transfers for each agent.
The DHCP relay agent can save route information to the same database agents to ensure recovery after reloads.
In the following example, the timeout value and write-delay are specified in two separate command lines:
ip dhcp database disk0:router-dhcp timeout 60
ip dhcp database disk0:router-dhcp write-delay 60
However, the second configuration overrides the first command line and causes the timeout value to revert to the default value of 300 seconds. To prevent the timeout value from reverting to the default value, configure the following on one command line:
ip dhcp database disk0:router-dhcp write-delay 60 timeout 60
Examples
The following example specifies the DHCP database transfer timeout value as 80 seconds:
ip dhcp database ftp://user:password@172.16.1.1/router-dhcp timeout 80
The following example specifies the DHCP database update delay value as 100 seconds:
ip dhcp database tftp://172.16.1.1/router-dhcp write-delay 100
Related Commands
Command
|
Description
|
show ip dhcp database
|
Displays Cisco IOS DHCP server database agent information.
|
ip dhcp excluded-address
To specify IP addresses that a Dynamic Host Configuration Protocol (DHCP) server should not assign to DHCP clients, use the ip dhcp excluded-address command in global configuration mode. To remove the excluded IP addresses, use the no form of this command.
ip dhcp excluded-address low-address [high-address]
no ip dhcp excluded-address low-address [high-address]
Syntax Description
low-address
|
The excluded IP address, or first IP address in an excluded address range.
|
high-address
|
(Optional) The last IP address in the excluded address range.
|
Defaults
All IP pool addresses are assignable.
Command Modes
Global configuration
Command History
Release
|
Modification
|
12.0(1)T
|
This command was introduced.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Usage Guidelines
The DHCP server assumes that all pool addresses may be assigned to clients. Use this command to exclude a single IP address or a range of IP addresses.
Examples
The following example configures an excluded IP address range from 172.16.1.100 through 172.16.1.199:
ip dhcp excluded-address 172.16.1.100 172.16.1.199
Related Commands
Command
|
Description
|
ip dhcp pool
|
Configures a DHCP address pool on a Cisco IOS DHCP server and enters DHCP pool configuration mode.
|
network (DHCP)
|
Configures the subnet number and mask for a DHCP address pool on a Cisco IOS DHCP server.
|