To specify how long a Dynamic Host Configuration Protocol (DHCP) server waits for a ping reply from an address pool, use the ipdhcppingtimeout command in global configuration mode. To restore the default number of milliseconds (500) of the timeout, use the no form of this command.
ipdhcppingtimeoutmilliseconds
noipdhcppingtimeout
Syntax Description
milliseconds
The amount of time (in milliseconds) that the DHCP server waits for a ping reply before it stops attempting to reach a pool address for client assignment. The maximum timeout is 10000 milliseconds (10 seconds). The default timeout is 500 milliseconds.
Command Default
500 milliseconds
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
This command specifies how long to wait for a ping reply (in milliseconds).
Examples
The following example specifies that a DHCP server will wait 800 milliseconds for a ping reply before considering the ping a failure:
ip dhcp ping timeout 800
Related Commands
Command
Description
clearipdhcpconflict
Clears an address conflict from the Cisco IOS DHCP Server database.
ipdhcppingtimeout
Specifies the number of packets a Cisco IOS DHCP Server sends to a pool address as part of a ping operation.
showipdhcpconflict
Displays address conflicts found by a Cisco IOS DHCP Server when addresses are offered to the client.
ip dhcp pool
To configure a Dynamic Host Configuration Protocol (DHCP) address pool on a DHCP server and enter DHCP pool configuration mode, use the ipdhcppool command in global configuration mode. To remove the address pool, use the no form of this command.
ipdhcppoolname
noipdhcppoolname
Syntax Description
name
Name of the pool. Can either be a symbolic string (such as engineering) or an integer (such as 0).
Command Default
DHCP address pools are not configured.
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
During execution of this command, the configuration mode changes to DHCP pool configuration mode, which is identified by the (config-dhcp)# prompt. In this mode, the administrator can configure pool parameters, like the IP subnet number and default router list.
Examples
The following example configures pool1 as the DHCP address pool:
ip dhcp pool pool1
Related Commands
Command
Description
host
Specifies the IP address and network mask for a manual binding to a DHCP client.
ipdhcpexcluded-address
Specifies IP addresses that a Cisco IOS DHCP server should not assign to DHCP clients.
network(DHCP)
Configures the subnet number and mask for a DHCP address pool on a Cisco IOS DHCP server.
ip dhcp relay bootp ignore
To configure the Dynamic Host Configuration Protocol (DHCP) relay agent stop forwarding Bootstrap Protocol (BOOTP) packets between the clients and servers, use theipdhcprelaybootpignore command in global configuration mode. To disable the configuration, use the no form of this command.
ipdhcprelaybootpignore
noipdhcprelaybootpignore
Syntax Description
This command has no arguments or keywords.
Command Default
Disabled (Relay agent forwards BOOTP packets from clients and servers).
Command Modes
Global configuration (config)
Command History
Release
Modification
15.0(1)M
This command was introduced.
Usage Guidelines
You can use the ipdhcprelayagentbootpignore command in network deployments, where clients send both BOOTP and DHCP packets. When the client sends both type of packets, sometimes the DHCP server or the relay agent will not be able to differentiate between the two types of packets. You can use this command to configure the relay agent stop forwarding the BOOTP packets.
Examples
The following example shows how to configure the relay agent to stop forwarding BOOTP packets:
Router# configure terminal
Router(config)# ip dhcp relay bootp ignore
Related Commands
Command
Description
ipdhcprelayinformation
Configures a DHCP server to validate the relay agent information option.
ipdhcpbootpignore
Configures the DHCP server to stop processing BOOTP packets from clients.
ip dhcp relay prefer known-good-server
To configure the Dynamic Host Configuration Protocol (DHCP) relay agent to forward the client requests to the server that handled the previous request, use theipdhcprelaypreferknown-good-server command in global configuration mode. To disable the configuration, use the
no form of this command.
ipdhcprelaypreferknown-good-server
noipdhcprelaypreferknown-good-server
Syntax Description
This command has no arguments or keywords.
Command Default
The relay agent does not forward the requests based on the preference.
Command Modes
Global configuration (config)
Command History
Release
Modification
15.0(1)M
This command was introduced.
Usage Guidelines
The DHCP servers send addresses to the DHCP clients. Because the DHCP server that responds first cannot be predicted, the client receives different addressees from the servers. This results in unpredictable changes in the address used by the client. Such address changes result in TCP service interruptions. You can configure the
ipdhcprelaypreferknown-good-server command to reduce the frequency with which the DHCP clients change their address and to forward the client requests to the server that handled the previous request.
If the
ipdhcprelaypreferknown-good-server command is configured, and the DHCP client is attached to an unnumbered interface, then the DHCP relay checks if the DHCP client broadcasts the DHCP packets. If the packets are broadcast, the server unicasts the requests to all configured helper addresses, and not just to the server that handled the previous request. If the packets are unicast, the DHCP relay forwards the unicast packets from the client to the DHCP server that had assigned the IP address to the client.
This functionality impacts the DHCPv4 relay, and not the DHCPv6 relay.
Examples
The following example shows how to configure the DHCP relay agent to forward the client requests to the server that handled the previous request:
Router# configure terminal
Router(config)# ip dhcp relay prefer known-good-server
Related Commands
Command
Description
iphelper-address
Enables the forwarding of UDP broadcasts, including BOOTP, received on an interface.
ip dhcp relay forward spanning-tree
To set the gateway address (giaddr) field in the DHCP packet before forwarding to spanning-tree interfaces, use theipdhcprelayforwardspanning-tree command in global configuration mode. To disable this functionality, use the
no form of this command.
ipdhcprelayforwardspanning-tree
noipdhcprelayforwardspanning-tree
Syntax Description
This command has no arguments or keywords.
Command Default
Disabled
Command Modes
Global configuration
Command History
Release
Modification
12.1
This command was introduced.
Usage Guidelines
Prior to Cisco IOS Release 12.1, when the
ipforward-protocolspanning-treeany-local-broadcastcommand was configured, DHCP broadcasts were forwarded to all spanning-tree enabled interfaces after setting the giaddr field in the DHCP packet.
The behavior of the DHCP relay agent was modified in release 12.1 such that the DHCP broadcasts were still forwarded to all spanning-tree enabled interfaces but the giaddr field was not set on the packets. This behavior can cause problems in a network because the DHCP server uses the giaddr field to properly allocate addresses when the client is not in the local network.
Use the
ipdhcprelayforwardspanning-tree command to set the giaddr to the IP address of the incoming interface before forwarding DHCP broadcasts to spanning-tree enabled interfaces.
Theipforward-protocoludp command is enabled by default and automatically determines that BOOTP client and server datagrams (ports 67 and 68) should be forwarded. This forwarding results in another packet sent to spanning-tree enabled interfaces without the giaddr field set. To avoid these duplicate packets, use the
noipforward-protocoludpbootpc and
noipforward-protocoludpbootps commands.
Examples
In the following example, the giaddr field in the DHCP packet will be set to the IP address of the incoming interface before forwarding to spanning-tree enabled interfaces:
ip dhcp relay forward spanning-tree
ip forward-protocol spanning-tree any-local-broadcast
Related Commands
Command
Description
ipforward-protocol
Specifies which protocols and ports the router forwards when forwarding broadcast packets
ipforward-protocolspanning-tree
Permits IP broadcasts to be flooded throughout the internetwork in a controlled fashion.
ip dhcp relay information check
To configure a Dynamic Host Configuration Protocol (DHCP) server to validate the relay agent information option in forwarded BOOTREPLY messages, use the ipdhcprelayinformationcheck command in global configuration mode. To disable an information check, use the no form of this command.
ipdhcprelayinformationcheck
noipdhcprelayinformationcheck
Syntax Description
This command has no arguments or keywords.
Command Default
A DHCP server checks relay information. Invalid messages are dropped.
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
This command is used by cable access router termination systems. By default, DHCP checks relay information. Invalid messages are dropped.
Examples
The following example configures the DHCP Server to check that the relay agent information option in forwarded BOOTREPLY messages is valid:
ip dhcp relay information check
Related Commands
Command
Description
ipdhcprelayinformationoption
Configures a Cisco IOS DHCP Server to insert the DHCP relay agent information option in forwarded BOOTREQUEST messages.
ipdhcprelayinformationpolicy
Configures the information reforwarding policy of a DHCP relay agent (what a DHCP relay agent should do if a message already contains relay information).
ip dhcp relay information check-reply
To configure a DHCP server to validate the relay agent information option in forwarded BOOTREPLY messages, use the ipdhcprelayinformationcheck-reply command in interface or subinterface configuration mode. To disable an information check, use the no form of this command.
ipdhcprelayinformationcheck-reply [none]
noipdhcprelayinformationcheck-reply [none]
Syntax Description
none
(Optional) Disables the command function.
Command Default
A DHCP server checks relay information. Invalid messages are dropped.
If an ipdhcprelayinformation command is configured in global configuration mode but not configured in interface configuration mode, the global configuration is applied to all interfaces.
If an ipdhcprelayinformation command is configured in both global configuration mode and interface configuration mode, the interface configuration command takes precedence over the global configuration command. However, the global configuration is applied to interfaces without the interface configuration.
If an ipdhcprelayinformation command is not configured in global configuration mode but is configured in interface configuration mode, only the interface with the configuration option applied is affected. All other interfaces are not impacted by the configuration.
The ipdhcprelayinformationcheck-replynone command option is saved in the running configuration. This command takes precedence over any relay agent information global configuration.
Examples
The following example shows how to configure the DHCP server to check that the relay agent information option in forwarded BOOTREPLY messages received from FastEthernet interface 0 is valid:
!
interface FastEthernet 0
ip dhcp relay information check-reply
Related Commands
Command
Description
ipdhcprelayinformationoption-insert
Enables the system to insert a DHCP relay agent information option in forwarded BOOTREQUEST messages to a DHCP server.
ipdhcprelayinformationcheck
Configures a DHCP server to validate the relay information option in forwarded BOOTREPLY messages in global configuration mode.
ipdhcprelayinformationpolicy-action
Configures the information reforwarding policy for a DHCP relay agent.
ip dhcp relay information option
To enable the system to insert a Dynamic Host Configuration Protocol (DHCP) relay agent information option in forwarded BOOTREQUEST messages to a DHCP server, use the ipdhcprelayinformationoption command in global configuration mode. To disable inserting relay information into forwarded BOOTREQUEST messages, use the no form of this command.
ipdhcprelayinformationoption [vpn]
noipdhcprelayinformationoption [vpn]
Syntax Description
vpn
(Optional) Virtual private network.
Command Default
The DHCP server does not insert relay information.
Command Modes
Global configuration
Command History
Release
Modification
12.0(1)T
This command was introduced.
12.2(4)B
The vpn keyword was added.
12.2(8)T
This command was integrated into Cisco IOS Release 12.2(8)T.
12.2(31)SB
This command was integrated into Cisco IOS Release 12.2(31)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
This functionality enables a DHCP server to identify the user (for example, cable access router) sending a request and initiate appropriate action based on this information. By default, DHCP does not insert relay information.
The ipdhcprelayinformationoption command automatically adds the circuit identifier suboption and the remote ID suboption to the DHCP relay agent information option (also called option 82).
The vpn optional keyword should be used only when the DHCP server allocates addresses based on VPN identification suboptions.
The ipdhcprelayinformationoptionvpncommand adds the following VPN-related suboptions into the relay agent information option when DHCP broadcasts are forwarded by the relay agent from clients to a DHCP server:
VPN identifier--Contains the VPN ID if configured or the virtual routing and forwarding (VRF) name if configured on the interface (VPN ID takes precedence over VRF name).
Subnet selection--Contains the incoming interface subnet address.
Server identifier override--Contains the incoming interface IP address.
After these suboptions are successfully added, the gateway address is set to the outgoing interface of the router toward the DHCP server IP address that was configured using the iphelper-address command.
If only the ipdhcprelayinformationoptionvpncommandis configured, the VPN identifier, subnet selection, and server identifier override suboptions are added to the relay information option. Note that the circuit identifier suboption and the remote ID suboption are not added to the relay information option. However, if both the ipdhcprelayinformationoption command and the ipdhcprelayinformationoptionvpn command are configured, all five suboptions are added to the relay agent information option.
When the packets are returned from the DHCP server, option 82 is removed before the reply is forwarded to the client.
Even if the vpn option is specified, the VPN suboptions are added only to those DHCP or BOOTP broadcasts picked up by the interface that was configured with a VRF name or VPN ID.
For clients from unnumbered ATM or serial interfaces, when this command is enabled, the VPN identifier suboption will contain the VRF name of the unnumbered interface.
Subnet selection and server identifier override suboptions are added from the IP address of the interface from which the unnumbered interface is configured to borrow its IP address. The client host route will be added on the applicable VRF routing tables.
If the ipdhcpsmart-relay global configuration command is enabled, then the server identifier override and subnet selection suboptions will use the secondary IP address of the incoming interface when the same client retransmits more than three DHCP DISCOVER packets (for both numbered and unnumbered interfaces).
Examples
The following example configures a DHCP server to insert the DHCP relay agent information option, including VPN suboptions, in forwarded BOOTREQUEST messages. In this example, the circuit identifier suboption and the remote ID suboption are not included in the relay information option:
ip dhcp relay information option vpn
The following example configures a DHCP server to insert the DHCP relay agent information option, including VPN suboptions, the circuit identifier suboption, and the remote ID suboption, in forwarded BOOTREQUEST messages:
ip dhcp relay information option vpn
ip dhcp relay information option
Examples
The following example enables DHCP option 82 support on the DHCP relay agent by using the ipdhcprelayinformationoption command. The rbenasipcommand configures the router to forward the IP address for Loopback0 to the DHCP server. The value (in hexadecimal) of the agent remote ID suboption is 010100000B0101814058320, and the value of each field is the following:
Port Type: 0x01
Version: 0x01
Reserved: undefined
NAS IP address: 0x0B010181 (hexadecimal value of 11.1.1.129)
NAS Port
Interface (slot/module/port): 0x40 (The slot/module/port values are 01 00/0/000.)
VPI: 0x58 (hexadecimal value of 88)
VCI: 0x320 (hexadecimal value of 800)
ip dhcp-server 172.16.1.2
!
ip dhcp relay information option
!
interface Loopback0
ip address 10.1.1.129 255.255.255.192
!
interface ATM4/0
no ip address
!
interface ATM4/0.1 point-to-point
ip unnumbered Loopback0
ip helper-address 172.16.1.2
atm route-bridged ip
pvc 88/800
encapsulation aal5snap
!
interface Ethernet 5/1
ip address 172.16.1.1 255.255.0.0
!
router eigrp 100
network 10.0.0.0
network 172.16.0.0
!
rbe nasip Loopback0
In the following example, the DHCP relay receives a DHCP request on Ethernet interface 0/1 and sends the request to the DHCP server located at IP helper address 10.44.23.7, which is associated with the VRF named red.
ip dhcp relay information option vpn
!
interface ethernet 0/1
ip helper-address vrf red 10.44.23.7
Related Commands
Command
Description
ipdhcprelayinformationcheck
Configures a Cisco IOS DHCP server to validate the relay agent information option in forwarded BOOTREPLY messages.
ipdhcprelayinformationpolicy
Configures the information reforwarding policy of a DHCP relay agent.
ipdhcpsmart-relay
Allows the Cisco IOS DHCP relay agent to switch the gateway address.
iphelper-address
Forwards UDP broadcasts, including BOOTP, received on an interface.
ip dhcp relay information option server-id-override
To enable the system to insert the server ID override and link selection suboptions on a specific interface into the Dynamic Host Configuration Protocol (DHCP) relay agent information option in forwarded BOOTREQUEST messages to a DHCP server, use the
ipdhcprelayinformationoptionserver-id-override command in interface configuration mode. To disable inserting the server ID override and link selection suboptions into the DHCP relay agent information option, use the
no form of this command.
ipdhcprelayinformationoptionserver-id-override
noipdhcprelayinformationoptionserver-id-override
Syntax Description
This command has no arguments or keywords.
Command Default
The server ID override and link selection suboptions are not inserted into the DHCP relay agent information option.
Command Modes
Interface configuration (config-if)
Command History
Release
Modification
Cisco IOS XE Release 2.1
This command was introduced on Cisco ASR 1000 Series Aggregation Services Routers.
12.2(33)SRE
This command was integrated into Cisco IOS Release 12.2(33)SRE.
15.1(1)SY
This command was integrated into Cisco IOS Release 15.1(1)SY.
Usage Guidelines
The
ipdhcprelayinformationoptionserver-id-override command adds the following suboptions into the relay agent information option when DHCP broadcasts are forwarded by the relay agent from clients to a DHCP server:
Server ID override suboption
Link selection suboption
When this command is configured, the gateway address (giaddr) will be set to the IP address of the outgoing interface, which is the interface that is reachable by the DHCP server.
If the
ipdhcprelayinformationoptionserver-id-override command is configured on an interface, it overrides the
ipdhcp-relayinformationoptionserver-override global configuration on that interface only.
Examples
In the following example, the DHCP relay will insert the server ID override and link selection suboptions into the relay information option on Ethernet interface 0/0:
Device(config)# interface Ethernet0/0
Device(config-if)# ip dhcp relay information option server-id-override
Related Commands
Command
Description
ipdhcp-relayinformationoptionserver-override
Enables the system to globally insert the server ID override and link selection suboptions on a specific interface into the DHCP relay agent information option in forwarded BOOTREQUEST messages to a DHCP server.
ip dhcp relay information option subscriber-id
To specify that a Dynamic Host Configuration Protocol (DHCP) relay agent add a subscriber identifier suboption to option82, use the ipdhcprelayinformationoptionsubscriber-idcommand in interface configuration mode. To disable the subscriber identifier, use the no form of this command.
ipdhcprelayinformationoptionsubscriber-idstring
noipdhcprelayinformationoptionsubscriber-idstring
Syntax Description
string
Up to a maximum of 50 characters that can be alphanumeric. The string can be ASCII text only.
Note
If more than 50 characters are configured, the string is truncated.
Command Default
Disabled to allow backward capability.
Command Modes
Interface configuration
Command History
Release
Modification
12.3(14)T
This command was introduced.
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
When the unique subscriber identifier is configured on the relay agent and the interface, the identifier is added to option82 in all of the client DHCP packets to the DHCP server. When the server echoes option82 in the reply packets, the relay agent removes option82 before forwarding the reply packet to the client. When an interface is numbered, all renew packets and release packets are unicast to the server, so option82 is not added.
The unique identifier should be configured for each subscriber and when a subscriber moves from one interface to the other, the configuration of the interface should be changed also.
In case of unnumbered interfaces, all the client packets are sent to the relay. Option82 is added in all the client packets before forwarding the packets to the server. If the server does not echo option82 in the packet, the relay agent tries to validate option82 in the reply packet. If the reply packet does not contain option82, then the validation fails and the packet is dropped by the relay agent. The client cannot get any IP address because of the validation failure. In this case, the existingnoipdhcprelayinformationcheck command can be used to avoid the option82 invalidation.
Note
The configurable string is not an option for network access server (NAS)-IP, because users can move between NAS termination points. When a subscriber moves from one NAS to another, this option does not result in a configuration change on the side of the DHCP server of the ISP.
Examples
The following example shows how to configure an ATM interface for the subscriber identifier suboption.
ip dhcp relay information option
!
interface Loopback0
ip address 10.1.1.129 255.255.255.192
!
interface ATM4/0
no ip address
!
interface ATM4/0.1 point-to-point
ip helper-address 10.16.1.2
ip unnumbered Loopback0
ip dhcp relay information option subscriber-id newperson123
atm route-bridged ip
pvc 88/800
encapsulation aal5snap
Related Commands
Command
Description
ipdhcprelayinformationcheck
Configures a Cisco IOS DHCP server to validate the relay agent information option in forwarded BOOTREPLY messages.
ipdhcprelayinformationoption
Enables the system to insert the DHCP relay agent information option in forwarded BOOTREQUEST messages to a DHCP server.
ipdhcprelayinformationpolicy
Configures the information reforwarding policy of a DHCP relay agent (what a DHCP relay agent should do if a message already contains relay information).
ipdhcpsmart-relay
Enables the Cisco IOS DHCP relay agent to switch the gateway address (giaddr field of a DHCP packet) to secondary addresses when there is no DHCPOFFER message from a DHCP server
iphelper-address
Forwards UDP broadcasts, including BOOTP, received on an interface.
ip dhcp relay information option vpn-id
To enable the system to insert VPN suboptions into the DHCP relay agent information option in forwarded BOOTREQUEST messages to a DHCP server and set the gateway address to the outgoing interface toward the DHCP server, use the
ipdhcprelayinformationoptionvpn-idcommand in interface configuration mode. To remove the configuration, use the
no form of this command.
ipdhcprelayinformationoptionvpn-id [none]
noipdhcprelayinformationoptionvpn-id
Syntax Description
none
(Optional) Disables the VPN functionality on the interface.
Command Default
The DHCP server does not insert relay information.
Command Modes
Interface configuration
Command History
Release
Modification
12.4(11)T
This command was introduced.
Usage Guidelines
If the
ipdhcprelayinformationoptionvpn global configuration command is configured and the
ipdhcprelayinformationoptionvpn-idinterface configuration command is not configured, the global configuration is applied to all interfaces.
If the
ipdhcprelayinformationoptionvpn global configuration command is configured and the
ipdhcprelayinformationoptionvpn-idinterface configuration command is also configured, the interface configuration command takes precedence over the global configuration command. However, the global configuration is applied to interfaces without the interface configuration.
If the
ipdhcprelayinformationoptionvpnglobal configuration command is not configured and the
ipdhcprelayinformationoptionvpn-idinterface configuration command is configured, only the interface with the configuration option applied is affected. All other interfaces are not impacted by the configuration.
The
ipdhcprelayinformationoptionvpn-idnoneoption allows you to disable the VPN functionality on the interface. The only time you need to use this option is when the
ipdhcprelayinformationoptionvpn global configuration command is configured and you want to override the global configuration.
The
noipdhcprelayinformationoptionvpn-id command removes the configuration from the running configuration. In this case, the interface inherits the global configuration, which may or may not be configured to insert VPN suboptions.
Examples
In the following example, the DHCP relay agent receives a DHCP request on Ethernet interface 0/1 and sends the request to the DHCP server located at IP helper address 10.44.23.7, which is associated with the VRF named red. The
ipdhcprelayinformationoptionvpn-id interface configuration command only applies to Ethernet interface 0/1. All other interfaces are not impacted by the configuration:
!
interface ethernet 0/1
ip helper-address vrf red 10.44.23.7
ip dhcp relay information option vpn-id
Related Commands
Command
Description
ipdhcprelayinformationoption
Enables the system to insert the DHCP relay agent information option in forwarded BOOTREQUEST messages to a DHCP server.
ip dhcp relay information option-insert
To enable the system to insert a DHCP relay agent information option in forwarded BOOTREQUEST messages to a DHCP server, use the ipdhcprelayinformationoption-insertcommand in interface configuration mode or subinterface configuration mode. To disable inserting relay information into forwarded BOOTREQUEST messages, use the no form of this command.
ipdhcprelayinformationoption-insert [none]
noipdhcprelayinformationoption-insert [none]
Syntax Description
none
(Optional) Disables the command function.
Command Default
The DHCP server does not insert relay information.
If an ipdhcprelayinformation command is configured in global configuration mode but not configured in interface configuration mode, the global configuration is applied to all interfaces.
If an ipdhcprelayinformation command is configured in both global configuration mode and interface configuration mode, the interface configuration command takes precedence over the global configuration command. However, the global configuration is applied to interfaces without the interface configuration.
If an ipdhcprelayinformation command is not configured in global configuration mode but is configured in interface configuration mode, only the interface with the configuration option applied is affected. All other interfaces are not impacted by the configuration.
The ipdhcprelayinformationoption-insertnone command option is saved in the running configuration. This command takes precedence over any relay agent information global configuration.
Examples
The following example shows how to configure the DHCP server to insert the relay agent information option in forwarded BOOTREQUEST messages:
!
interface FastEthernet 0
ip dhcp relay information option-insert
Related Commands
Command
Description
ipdhcprelayinformationcheck-reply
Configures a DHCP server to validate the relay agent information option in forwarded BOOTREPLY messages.
ipdhcprelayinformationoption
Enables the system to insert a DHCP relay agent information option in forwarded BOOTREQUEST messages to a DHCP server in global configuration mode.
ipdhcprelayinformationpolicy-action
Configures the information reforwarding policy for a DHCP relay agent.
ip dhcp relay information policy
To configure the information reforwarding policy for a Dynamic Host Configuration Protocol (DHCP) relay agent (what a relay agent should do if a message already contains relay information), use the ipdhcprelayinformationpolicy command in global configuration mode. To restore the default relay information policy, use the no form of this command.
ipdhcprelayinformationpolicy
{ drop | encapsulate | keep | replace }
noipdhcprelayinformationpolicy
Syntax Description
drop
Directs the DHCP relay agent to discard messages with existing relay information if the relay information option is already present.
encapsulate
Encapsulates prior relay agent information.
keep
Indicates that existing information is left unchanged on the DHCP relay agent.
replace
Indicates that existing information is overwritten on the DHCP relay agent.
Command Default
The DHCP server replaces existing relay information.
Command Modes
Global configuration (config)
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.
12.2(33)SRD
This command was modified. The encapsulate keyword was added.
Cisco IOS XE Release 3.1S
This command was integrated into Cisco IOS XE Release 3.1S and implemented on the Cisco ASR 1000 Series Aggregation Services Routers.
Usage Guidelines
A DHCP relay agent may receive a message from another DHCP relay agent that already contains relay information. By default, the relay information from the previous relay agent is replaced.
The ipdhcprelayinformationpolicyencapsulate command option is only needed when the relay agent needs to encapsulate the relay agent information option from a prior relay agent. If this command option is used, the prior option 82 is encapsulated inside the current option 82 and both are forwarded to the DHCP server.
Examples
The following examples show how to configure a DHCP relay agent to drop messages with existing relay information, keep existing information, replace existing information, and encapsulate existing information, respectively:
ip dhcp relay information policy drop
ip dhcp relay information policy keep
ip dhcp relay information policy replace
ip dhcp relay information policy encapsulate
Related Commands
Command
Description
ipdhcprelayinformationcheck
Configures a Cisco IOS DHCP server to validate the relay agent information option in forwarded BOOTREPLY messages.
ipdhcprelayinformationoption
Configures a Cisco IOS DHCP server to insert the DHCP relay agent information option in forwarded BOOTREQUEST messages.
ipdhcprelayinformationpolicy-action
Configures the information reforwarding policy for a DHCP relay agent in interface configuration mode.
ip dhcp relay information policy-action
To configure the information reforwarding policy for a DHCP relay agent (what a relay agent should do if a message already contains relay information), use the ipdhcprelayinformationpolicy-action command in interface configuration mode or subinterface configuration mode. To restore the default relay information policy, use the no form of this command.
ipdhcprelayinformationpolicy-action
{ drop | encapsulate | keep | replace }
noipdhcprelayinformationpolicy-action
Syntax Description
drop
Directs the DHCP relay agent to discard messages with existing relay information if the relay information option is already present.
encapsulate
Encapsulates prior information.
keep
Indicates that existing information is left unchanged on the DHCP relay agent.
replace
Indicates that existing information is overwritten on the DHCP relay agent.
Command Default
The DHCP server replaces existing relay information.
This command was integrated into Cisco IOS Release 12.2(33)SRC.
12.2(33)SRD
This command was modified. The encapsulation keyword was added.
Cisco IOS XE Release 3.1S
This command was integrated into Cisco IOS XE Release 3.1S and implemented on the Cisco ASR 1000 Series Aggregation Services Routers.
Usage Guidelines
If an ipdhcprelayinformation command is configured in global configuration mode but not configured in interface configuration mode, the global configuration is applied to all interfaces.
If an ipdhcprelayinformation command is configured in both global configuration mode and interface configuration mode, the interface configuration command takes precedence over the global configuration command. However, the global configuration is applied to interfaces without the interface configuration.
If an ipdhcprelayinformation command is not configured in global configuration mode but is configured in interface configuration mode, only the interface with the configuration option applied is affected. All other interfaces are not impacted by the configuration.
The ipdhcprelayinformationpolicy-actionencapsulate command is only needed when the relay agent needs to encapsulate the relay agent information option from a prior relay agent. If this command option is used, the prior option 82 is encapsulated inside the current option 82 and both are forwarded to the DHCP server.
Examples
The following example shows how to configure a DHCP relay agent to drop messages with existing relay information:
Router# configure terminal
Router(config)# interface FastEthernet 0
Router(config-if)# ip dhcp relay information policy-action drop
The following example shows how to configure a DHCP relay agent to encapsulate existing relay information:
Router# configure terminal
Router(config)# interface Ethernet0/0
Router(config-if)# ip dhcp relay information policy-action encapsulate
Related Commands
Command
Description
ipdhcprelayinformationcheck-reply
Configures a DHCP server to validate the relay agent information option in forwarded BOOTREPLY messages.
ipdhcprelayinformationoption-insert
Enables the system to insert a DHCP relay agent information option in forwarded BOOTREQUEST messages to a DHCP server.
ipdhcprelayinformationpolicy
Configures the information reforwarding policy for a DHCP relay agent in global configuration mode.
ip dhcp relay information trust-all
To configure all interfaces on a router as trusted sources of the Dynamic Host Configuration Protocol (DHCP) relay agent information option, use the ipdhcprelayinformationtrust-all command in global configuration mode. To restore the interfaces to their default behavior, use the no form of the command.
ipdhcprelayinformationtrust-all
noipdhcprelayinformationtrust-all
Syntax Description
This command has no arguments or keywords.
Command Default
All interfaces on the router are considered untrusted.
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
By default, if the gateway address is set to all zeros in the DHCP packet and the relay information option is already present in the packet, the Cisco IOS DHCP relay agent will discard the packet. If the ipdhcprelayinformationtrust-allcommand is configured globally, the Cisco IOS DHCP relay agent will not discard the packet even if the gateway address is set to all zeros. Instead, the received DHCPDISCOVER or DHCPREQUEST messages will be forwarded to the addresses configured by the iphelper-address command as in normal DHCP relay operation.
Examples
In the following example, all interfaces on the router are configured as a trusted source for relay agent information:
ip dhcp relay information trust-all
Related Commands
Command
Description
iphelper-address
Enables the forwarding of UDP broadcasts, including BOOTP, received on an interface.
showipdhcprelayinformationtrusted-sources
Displays all interfaces on the router that are configured as a trusted source for the DHCP relay agent information option.
ip dhcp relay information trusted
To configure an interface as a trusted source of the Dynamic Host Configuration Protocol (DHCP) relay agent information option, use the ipdhcprelayinformationtrusted command in interface configuration mode. To restore the interface to the default behavior, use the no form of the command.
ipdhcprelayinformationtrusted
noipdhcprelayinformationtrusted
Syntax Description
This command has no arguments or keywords.
Command Default
All interfaces on the router are considered untrusted.
Command Modes
Interface 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
By default, if the gateway address is set to all zeros in the DHCP packet and the relay information option is already present in the packet, the Cisco IOS DHCP relay agent will discard the packet. If the ipdhcprelayinformationtrustedcommand is configured on an interface, the Cisco IOS DHCP relay agent will not discard the packet even if the gateway address is set to all zeros. Instead, the received DHCPDISCOVER or DHCPREQUEST messages will be forwarded to the addresses configured by the iphelper-address command as in normal DHCP relay operation.
Examples
In the following example, interface Ethernet 1 is configured as a trusted source for the relay agent information:
interface ethernet 1
ip dhcp relay information trusted
Related Commands
Command
Description
iphelper-address
Enables the forwarding of UDP broadcasts, including BOOTP, received on an interface.
showipdhcprelayinformationtrusted-sources
Displays all interfaces on the router that are configured as a trusted source for the DHCP relay agent information option.
ip dhcp-relay source-interface
To globally configure the source interface for the relay agent to use as the source IP address for relayed messages, use theipdhcp-relaysource-interface command in global configuration mode. To remove the source interface configuration, use the
no form of this command.
ipdhcp-relaysource-interfacetypenumber
noipdhcp-relaysource-interfacetypenumber
Syntax Description
type
Interface type. For more information, use the question mark (?) online help function.
number
Interface or subinterface number. For more information about the numbering system for your networking device, use the question mark (?) online help function.
Command Default
The source interface is not configured.
Command Modes
Global configuration (config)
Command History
Release
Modification
Cisco IOS XE Release 2.1
This command was introduced on Cisco ASR 1000 Series Aggregation Services Routers.
12.2(33)SRE
This command was integrated into Cisco IOS Release 12.2(33)SRE.
15.1(1)SY
This command was integrated into Cisco IOS Release 15.1(1)SY.
Usage Guidelines
The
ipdhcp-relaysource-interface command allows the network administrator to specify a stable, hardware-independent IP address (such as a loopback interface) for the relay agent to use as a source IP address for relayed messages.
If the
ipdhcp-relaysource-interface global configuration command is configured and the
ipdhcprelaysource-interface command is also configured, the
ipdhcprelaysource-interface command takes precedence over the global configuration command. However, the global configuration is applied to interfaces without the interface configuration.
Examples
In the following example, the loopback interface IP address is configured to be the source IP address for the relayed messages:
Device(config)# ip dhcp-relay source-interface loopback 0
Device(config)# interface loopback 0
Device(config-if)# ip address 10.2.2.1 255.255.255.0
Related Commands
Command
Description
ipdhcprelaysource-interface
Configures the source interface for the relay agent to use as the source IP address for relayed messages.
ip dhcp route connected
To specify routes as connected routes, use the
ipdhcprouteconnected command in global configuration mode. To return to the default settings, use the
no form of this command.
ipdhcprouteconnected
noipdhcprouteconnected
Syntax Description
This command has no arguments or keywords.
Command Default
All interfaces on the router are untrusted.
Command Modes
Global configuration
Command History
Release
Modification
12.2(18)SXF
Support for this command was introduced on the Supervisor Engine 720.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
Usage Guidelines
If you enable the
ipdhcprouteconnectedcommand, DHCP downloads the route database from a database agent and adds the routes as connected routes, even though they may have been added as static routes previously.
Examples
This example shows how to specify routes as connected routes:
Router(config)#
ip dhcp route connected
ip dhcp server use subscriber-id client-id
To configure the Dynamic Host Configuration Protocol (DHCP) server to use the subscriber identifier as the client identifier on all incoming DHCP messages on an interface, use the
ipdhcpserverusesubscriber-idclient-id command in interface configuration mode. To disable this functionality, use the
no form of this command.
ipdhcpserverusesubscriber-idclient-id
noipdhcpserverusesubscriber-idclient-id
Syntax Description
This command has no arguments or keywords.
Command Default
DHCP uses the client identifier option in the DHCP packet to identify clients.
Command Modes
Interface configuration (config-if)
Command History
Release
Modification
12.2(46)SE
This command was introduced.
12.2(33)SXI4
This command was integrated into Cisco IOS Release 12.2(33)SXI4.
Usage Guidelines
This command takes precedence on the interface over the
ipdhcpusesubscriber-idclient-id command.
Examples
In the following example, the DHCP server uses the subscriber identifier as the client identifier for all incoming messages received on Ethernet interface 0/0:
Router(config)# interface Ethernet 0/0
Router(config-if)# ip dhcp server use subscriber-id client-id
Related Commands
Command
Description
ipdhcpusesubscriber-idclient-id
Configures the DHCP server to globally use the subscriber identifier as the client identifier on all incoming DHCP messages.
ip dhcp smart-relay
To allow the Cisco IOS Dynamic Host Configuration Protocol (DHCP) relay agent to switch the gateway address (giaddr field of a DHCP packet) to secondary addresses when there is no DHCPOFFER message from a DHCP server, use the ipdhcpsmart-relay command in global configuration mode. To disable this smart-relay functionality and restore the default behavior, use the no form of this command.
ipdhcpsmart-relay
noipdhcpsmart-relay
Syntax Description
This command has no arguments or keywords.
Command Default
Disabled
Command Modes
Global configuration
Command History
Release
Modification
12.1
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 relay agent attempts to forward the primary address as the gateway address three times. After three attempts and no response, the relay agent automatically switches to secondary addresses.
Examples
The following example enables the DHCP relay agent to automatically switch to secondary address pools:
ip dhcp smart-relay
ip dhcp snooping
To globally enable DHCP snooping, use the
ipdhcpsnoopingcommand in global configuration mode. To disable DHCP snooping, use the
no form of this command.
ipdhcpsnooping
noipdhcpsnooping
Syntax Description
This command has no arguments or keywords.
Command Default
Disabled
Command Modes
Global configuration
Command History
Release
Modification
12.2(18)SXE
Support for this command was introduced on the Supervisor Engine 720.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
Usage Guidelines
Wireless clients, or mobile nodes, gain access to an untrusted wireless network only if there is a corresponding entry in the DHCP snooping database. Enable DHCP snooping globally by entering the
ipdhcpsnoopingcommand, and enable DHCP snooping on the tunnel interface by entering the
ipdhcpsnoopingpackets command. After you enable DHCP snooping, the process snoops DHCP packets to and from the mobile nodes and populates the DHCP snooping database.
Examples
This example shows how to enable DHCP snooping:
Router(config) # ip dhcp snooping
This example shows how to disable DHCP snooping:
Router(config) # no ip dhcp snooping
Related Commands
Command
Description
ipdhcpsnoopingpackets
Enables DHCP snooping on the tunnel interface.
showipdhcpsnooping
Displays the DHCP snooping configuration.
showipdhcpsnoopingbinding
Displays the DHCP snooping binding entries.
showipdhcpsnoopingdatabase
Displays the status of the DHCP snooping database agent.
ip dhcp snooping binding
To set up and generate a DHCP binding configuration to restore bindings across reboots, use the
ipdhcpsnoopingbinding command in privileged EXEC mode. To disable the binding configuration, use the
no form of this command.
Displays the status of the DHCP snooping database agent.
ip dhcp snooping database
To configure the Dynamic Host Configuration Protocol (DHCP)-snooping database, use the
ipdhcpsnoopingdatabase command in global configuration mode. To disable the DHCP-snooping database, use the
no form of this command.
Specifies the database URL for storing entries using the bootflash.
ftp:url
Specifies the database URL for storing entries using FTP.
rcp:url
Specifies the database URL for storing entries using remote copy (rcp).
scp:url
Specifies the database URL for storing entries using Secure Copy (SCP).
sup-bootflash:
Specifies the database URL for storing entries using the supervisor bootflash.
tftp:url
Specifies the database URL for storing entries using TFTP.
timeoutseconds
Specifies the abort timeout interval; valid values are from 0 to 86400 seconds.
write-delayseconds
Specifies the amount of time before writing the DHCP-snooping entries to an external server after a change is seen in the local DHCP-snooping database; valid values are from 15 to 86400 seconds.
Command Default
The DHCP-snooping database is not configured.
Command Modes
Global configuration
Command History
Release
Modification
12.2(18)SXE
This command was introduced on the Supervisor Engine 720.
12.2(18)SXF5
The
sup-bootflash: keyword was added.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
Usage Guidelines
You must enable DHCP snooping on the interface before entering this command. Use the
ipdhcpsnooping command to enable DHCP snooping.
Examples
This example shows how to specify the database URL using TFTP:
Router(config)# ip dhcp snooping database tftp://10.90.90.90/snooping-rp2
This example shows how to specify the amount of time before writing DHCP snooping entries to an external server:
Router(config)# ip dhcp snooping database write-delay 15
Related Commands
Command
Description
ipdhcpsnooping
Enables DHCP snooping.
showipdhcpsnooping
Displays the DHCP snooping configuration.
showipdhcpsnoopingbinding
Displays the DHCP snooping binding entries.
showipdhcpsnoopingdatabase
Displays the status of the DHCP snooping database agent.
ip dhcp snooping detect spurious
To enable spurious DHCP server detection on a VLAN, use the
ipdhcpsnoopingdetectspuriousvlancommand in global configuration mode. To disable spurious DHCP server detection on a VLAN, use the
no form of this command.
ipdhcpsnoopingdetectspuriousvlanword
noipdhcpsnoopingdetectspuriousvlanword
Syntax Description
word
DHCP snooping VLAN or VLAN range.
Command Default
This command has no default settings.
Command Modes
Global configuration
Command History
Release
Modification
12.2(33)SXH6
Support for this command was introduced.
Examples
This example shows how to enable spurious DHCP server detection on a specified VLAN list:
Router(config)# ip dhcp snooping detect spurious vlan 3-5
WORD DHCP Snooping vlan list number or vlan range, example: 1,3-5,7,9-11
Router(config)# ip dhcp snooping detect spurious interval ?
<1-65535> Time in minutes
Specify the interval between the DHCPDISCOVER messages.
Router# show ip dhcp snooping detect spurious ?
entry DHCP snooping detect spurious entry
| Output modifiers
<cr>
Provides brief configuration information related to spurious DHCP server detection.
Router# show ip dhcp snooping detect spurious entry ?
vlan spurious entry VLAN
| Output modifiers
<cr>
Displays all the learnt entries or those from a specific VLAN.
Clears either all entries or those from a specific VLAN.
Router# show ip dhcp snooping detect spurious
Spurious DHCP server detection enabled
Detection VLAN list : 13-15,20,30
Detection interval : 10 minutes
Router# sh ip dhcp sn det sp en
Count MacAddress IpAddress VLAN Interface Last Seen
------ ---------------- --------------- ---- ----------- ------------
1 0004.2322.9dc9 20.0.0.1 20 GigabitEthernet1/25 Sep 21 2009 15:37:50
1 0004.2322.9dc9 10.78.96.194 20 GigabitEthernet1/25 Sep 21 2009 15:37:37
1 0011.955f.067c 30.0.0.1 30 GigabitEthernet1/26 Sep 21 2009 15:37:52
Related Commands
Command
Description
clearipdhcpsnoopingdetectspuriousentry
Clears all entries or those from a specific VLAN.
ipdhcpsnoopingdetectspuriousinterval
Specifies the interval time between DHCPDISCOVER messages.
ipdhcpsnoopingdetectspuriousvlan
Enables spurious DHCP server detection on a VLAN.
showipdhcpsnoopingdetectspurious
Displays the configuration information related to spurious DHCP server detection.
showipdhcpsnoopingdetectspuriousentry
Displays all the learnt entries or those from a specific VLAN.
ip dhcp snooping detect spurious interval
To set the interval time between DHCPDISCOVER messages, use the
ipdhcpsnoopingdetectspuriousintervalcommand in global configuration mode. To reset the time to its default time, use the
no form of this command.
ipdhcpsnoopingdetectspuriousintervaltime
noipdhcpsnoopingdetectspurious
Syntax Description
time
Time in minutes between DHCPDISCOVER messages; valid values are 1 through 65535.
Command Default
30 minutes is the default.
Command Modes
Global configuration
Command History
Release
Modification
12.2(33)SXH6
Support for this command was introduced.
Examples
This example shows how to set the time interval between DHCPDISCOVER messages to 350 minutes:
Router(config)# ip dhcp snooping detect spurious interval 350
Router(config)#
Related Commands
Command
Description
clearipdhcpsnoopingdetectspuriousentry
Clears all entries or those from a specific VLAN.
ipdhcpsnoopingdetectspuriousvlan
Enables spurious DHCP server detection on a VLAN.
showipdhcpsnoopingdetectspurious
Displays the configuration information related to spurious DHCP server detection.
showipdhcpsnoopingdetectspuriousentry
Displays all the learnt entries or those from a specific VLAN.
ip dhcp snooping detect spurious vlan
To enable spurious DHCP server detection on a VLAN, use the
ipdhcpsnoopingdetectspuriousvlancommand in global configuration mode. To disable spurious DHCP server detection on a VLAN, use the
no form of this command.
ipdhcpsnoopingdetectspuriousvlanrange
noipdhcpsnoopingdetectspuriousvlanrange
Syntax Description
range
DHCP snooping VLAN or VLAN range.
Command Default
This command has no default settings.
Command Modes
Global configuration
Command History
Release
Modification
12.2(33)SXH6
Support for this command was introduced.
Examples
This example shows how to enable spurious DHCP server detection on a specified VLAN list:
Router(config)# ip dhcp snooping detect spurious vlan 3-5
Router(config)#
Related Commands
Command
Description
clearipdhcpsnoopingdetectspuriousentry
Clears all entries or those from a specific VLAN.
ipdhcpsnoopingdetectspuriousinterval
Specifies the interval time between DHCPDISCOVER messages.
showipdhcpsnoopingdetectspurious
Displays the configuration information related to spurious DHCP server detection.
showipdhcpsnoopingdetectspuriousentry
Displays all the learnt entries or those from a specific VLAN.
ip dhcp snooping information option
To enable Dynamic Host Configuration Protocol (DHCP) option 82 data insertion, use the
ipdhcpsnoopinginformationoption command in global configuration mode. To disable DHCP option 82 data insertion, use the
no form of this command.
ipdhcpsnoopinginformationoption [allow-untrusted]
noipdhcpsnoopinginformationoption
Syntax Description
allow-untrusted
(Optional) Enables the switch to accept incoming DHCP snooping packets with option 82 information from the edge switch.
Command Default
DHCP option 82 data insertion is enabled by default. Accepting incoming DHCP snooping packets with option 82 information from the edge switch is disabled by default.
Command Modes
Global configuration
Command History
Release
Modification
12.2(18)SXE
This command was introduced on the Supervisor Engine 720.
12.2(18)SXF2
The
allow-untrusted keyword was added.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
Usage Guidelines
DHCP option 82 is part of RFC 3046. DHCP is an application-layer protocol that is used for the dynamic configuration of TCP/IP networks. The protocol allows for a relay agent to pass DHCP messages between the DHCP clients and DHCP servers. By using a relay agent, servers need not be on the same network as the clients. Option 82 (82 is the option’s code) addresses the security and scalability issues. Option 82 resides in the relay agent when DHCP packets that originate from the forwarding client are sent to the server. Servers that recognize Option 82 may use the information to implement the IP address or other parameter assignment policies. The DHCP server echoes the option back to the relay agent in its replies. The relay agent strips out the option from the relay agent before forwarding the reply to the client.
When you enter the
ipdhcpsnoopinginformationoptionallow-untrusted on an aggregation switch that is connected to an edge switch through an untrusted interface, the aggregation switch accepts packets with option 82 information from the edge switch. The aggregation switch learns the bindings for hosts connected through an untrusted switch interface. You can enable the DHCP security features, such as dynamic Address Resolution Protocol (ARP) inspection or IP source guard, on the aggregation switch while the switch receives packets with option 82 information on untrusted input interfaces to which hosts are connected. You must configure the port on the edge switch that connects to the aggregation switch as a trusted interface.
Caution
Do not enter the
ipdhcpsnoopinginformationoptionallow-untrusted command on an aggregation switch that is connected to an untrusted device. If you enter this command, an untrusted device might spoof the option 82 information.
Examples
This example shows how to enable DHCP option 82 data insertion:
ip dhcp snooping information option
This example shows how to disable DHCP option 82 data insertion:
no ip dhcp snooping information option
This example shows how to enable the switch to accept incoming DHCP snooping packets with option 82 information from the edge switch:
ip dhcp snooping information option allow-trusted
Related Commands
Command
Description
showipdhcpsnooping
Displays the DHCP snooping configuration.
showipdhcpsnoopingbinding
Displays the DHCP snooping binding entries.
showipdhcpsnoopingdatabase
Displays the status of the DHCP snooping database agent.
ip dhcp snooping limit rate
To configure the number of the DHCP messages that an interface can receive per second, use the
ipdhcpsnoopinglimitratecommand in interface configuration mode. To disable the DHCP message rate limiting, use the
no form of this command.
ipdhcpsnoopinglimitraterate
noipdhcpsnoopinglimitrate
Syntax Description
rate
Number of DHCP messages that a switch can receive per second; valid values are from 1 to 4294967294 seconds.
Command Default
Disabled
Command Modes
Interface configuration
Command History
Release
Modification
12.2(18)SXE
Support for this command was introduced on the Supervisor Engine 720.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
Usage Guidelines
This command is supported on Layer 2 switch-port and port-channel interfaces only.
Typically, the rate limit applies to the untrusted interfaces. If you want to set up rate limiting for the trusted interfaces, note that the trusted interfaces aggregate all DHCP traffic in the switch, and you will need to adjust the rate limit of the interfaces to a higher value.
Examples
This example shows how to specify the number of DHCP messages that a switch can receive per second:
Router(config-if)# ip dhcp snooping limit rate 150
This example shows how to disable the DHCP message rate limiting:
Router(config-if)# no ip dhcp snooping limit rate
Related Commands
Command
Description
showipdhcpsnooping
Displays the DHCP snooping configuration.
showipdhcpsnoopingbinding
Displays the DHCP snooping binding entries.
showipdhcpsnoopingdatabase
Displays the status of the DHCP snooping database agent.
ip dhcp snooping packets
To enable DHCP snooping on the tunnel interface, use the
ipdhcpsnoopingpacketscommand in interface configuration mode. To disable DHCP snooping, use the
no form of this command.
ipdhcpsnoopingpackets
noipdhcpsnoopingpackets
Syntax Description
This command has no arguments or keywords.
Command Default
Disabled
Command Modes
Interface configuration
Command History
Release
Modification
12.2(18)SXE
Support for this command was introduced on the Supervisor Engine 720.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
Usage Guidelines
This command is supported on Layer 2 switch-port and port-channel interfaces only.
This command is supported on Cisco 7600 series routers that are configured with a WLSM only.
Wireless clients, or mobile nodes, gain access to an untrusted wireless network only if there is a corresponding entry in the DHCP snooping database. Enable DHCP snooping globally by entering the
ipdhcpsnooping command, and enable DHCP snooping on the tunnel interface by entering the
ipdhcpsnoopingpacketscommand. After you enable DHCP snooping, the process snoops DHCP packets to and from the mobile nodes and populates the DHCP snooping database.
Examples
This example shows how to enable DHCP snooping:
Router(config-if)# ip dhcp snooping packets
This example shows how to disable DHCP snooping:
Router(config-if)# no ip dhcp snooping packets
Related Commands
Command
Description
ipdhcpsnooping
Enables DHCP snooping.
showipdhcpsnooping
Displays the DHCP snooping configuration.
showipdhcpsnoopingbinding
Displays the DHCP snooping binding entries.
showipdhcpsnoopingdatabase
Displays the status of the DHCP snooping database agent.
ip dhcp snooping verify mac-address
To verify that the source MAC address in a DHCP packet matches the client hardware address on an untrusted port, use the
ipdhcpsnoopingverifymac-address command in global configuration mode. To disable verification, use the
no form of this command.
ipdhcpsnoopingverifymac-address
noipdhcpsnoopingverifymac-address
Syntax Description
This command has no arguments or keywords.
Command Default
Enabled
Command Modes
Global configuration
Command History
Release
Modification
12.2(18)SXE
Support for this command was introduced on the Supervisor Engine 720.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
Usage Guidelines
For untrusted DHCP snooping ports, DHCP snooping verifies the MAC address on the client hardware address field to ensure that a client is requesting multiple addresses from a single MAC address. You can use the
ipdhcpsnoopingverifymac-address command to trust the ports or you can use the
noipdhcpsnoopingverifymac-address command to leave the ports untrusted by disabling the MAC address verification on the client hardware address field.
Examples
This example shows how to verify that the source MAC address in a DHCP packet matches the client hardware address on an untrusted port:
Router(config)# ip dhcp snooping verify mac-address
This example shows how to turn off the verification of the MAC address on the client hardware address field:
Router(config)# no ip dhcp snooping verify mac-address
Related Commands
Command
Description
showipdhcpsnooping
Displays the DHCP snooping configuration.
showipdhcpsnoopingbinding
Displays the DHCP snooping binding entries.
showipdhcpsnoopingdatabase
Displays the status of the DHCP snooping database agent.
ip dhcp snooping vlan
To enable DHCP snooping on a VLAN or a group of VLANs, use the
ipdhcpsnoopingvlan command in global configuration mode. To disable DHCP snooping on a VLAN or a group of VLANs, use the
no form of this command.
ipdhcpsnoopingvlan
{ number | vlan-list }
noipdhcpsnoopingvlan
{ number | vlan-list }
Syntax Description
number |
vlan-list
VLAN number or a group of VLANs; valid values are from 1 to 4094. See the “Usage Guidelines” section for additional information.
Command Default
Disabled
Command Modes
Global configuration
Command History
Release
Modification
12.2(18)SXE
Support for this command was introduced on the Supervisor Engine 720.
12.2(33)SRA
This command was integrated into Cisco IOS Release 12.2(33)SRA.
Usage Guidelines
DHCP snooping is enabled on a VLAN only if both the global snooping and the VLAN snooping are enabled.
Enter the range of VLANs using this format: 1,3-5,7,9-11.
Examples
This example shows how to enable DHCP snooping on a VLAN:
Router(config)# ip dhcp snooping vlan 10
This example shows how to disable DHCP snooping on a VLAN:
Router(config)# no ip dhcp snooping vlan 10
This example shows how to enable DHCP snooping on a group of VLANs:
Router(config)# ip dhcp snooping vlan 10,4-8,55
This example shows how to disable DHCP snooping on a group of VLANs:
Router(config)# no ip dhcp snooping vlan 10,4-8,55
Related Commands
Command
Description
showipdhcpsnooping
Displays the DHCP snooping configuration.
showipdhcpsnoopingbinding
Displays the DHCP snooping binding entries.
showipdhcpsnoopingdatabase
Displays the status of the DHCP snooping database agent.
ip dhcp subscriber-id interface-name
To automatically generate a subscriber identifier (ID) value based on the short name of the interface, use the ipdhcpsubscriber-idinterface-name command in global configuration mode. To disable this functionality, use the no form of this command.
ipdhcpsubscriber-idinterface-name
noipdhcpsubscriber-idinterface-name
Syntax Description
This command has no arguments or keywords.
Command Default
A subscriber ID is not automatically generated.
Command Modes
Global configuration (config)
Command History
Release
Modification
12.2(46)SE
This command was introduced.
12.2(33)SXI4
This command was integrated into Cisco IOS Release 12.2(33)SXI4.
Usage Guidelines
A subscriber ID configured on a specific interface using the ipdhcpserverusesubscriber-idclient-idcommand takes precedence over the global configuration.
Examples
In the following example, a subscriber ID will be automatically generated based on the short name of the interface (port) specified by the addressclient-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.
Router(config)# ip dhcp use subscriber-id client-id
Router(config)# ip dhcp subscriber-id interface-name
Router(config)# ip dhcp excluded-address 10.1.1.1 10.1.1.3
Router(config)# ip dhcp pool dhcppool
Router(dhcp-config)# network 10.1.1.0 255.255.255.0
Router(dhcp-config)# address 10.1.1.7 client-id ethernet 1/0 ascii
Related Commands
Command
Description
ipdhcpserverusesubscriber-idclient-id
Configures the DHCP server to use the subscriber identifier as the client identifier on all incoming DHCP messages on an interface.
ip dhcp support option55-override
To enable a DHCP server to override multiple option 55 (parameter request list) requests sent by a DHCP client and send a DHCPOFFER message with all the sub-options set in the option 55, use the ip dhcp support option55-override command in global configuration mode. To disable the configuration, use the no form of this command.
ip dhcp support option55-override
no ip dhcp support option55-override
Syntax Description
This command has no arguments or keywords.
Command Default
A DHCP server accepts the first instance of the option 55 request and ignores the remaining instances. Therefore, the server sends a DHCPOFFER message, which may not contain all the information required by the DHCP client
Command Modes
Global configuration (config)
Command History
Release
Modification
15.3(2)T
This command was introduced.
Examples
The following example shows how to enable a DHCP server to override multiple option 55 requests:
Device> enable
Device# configure terminal
Device(config)# ip dhcp support option55-override
Related Commands
Command
Description
ipaddressdhcp
Acquires an interface IP address from the DHCP.
ipdhcpclientrequest
Configures a DHCP client to request an option from a DHCP server.
ip dhcp support tunnel unicast
To configure a spoke-to-hub tunnel to unicast DHCP replies over a Dynamic Multipoint VPN (DMVPN) network, use the
ipdhcpsupporttunnelunicast command in global configuration mode. To disable the configuration, use the
no form of this command.
ipdhcpsupporttunnelunicast
noipdhcpsupporttunnelunicast
Syntax Description
This command has no arguments or keywords.
Command Default
A spoke-to-hub tunnel broadcasts the replies over the DMVPN network.
Command Modes
Global configuration (config)
Command History
Release
Modification
15.1(3)T
This command was introduced.
Usage Guidelines
By default, the DHCP replies are broadcast from the DMVPN hub to the spoke. The DHCP relay agent must unicast the DHCP messages for a DHCP server to be functional in the DMVPN environment. Hence for the DHCP to be functional in DMVPN environment, you must configure the DHCP relay agent to unicast the DHCP messages.
Use the
ipdhcpsupporttunnelunicast command to configure the DHCP relay agent to unicast the DHCP protocol messages from the server (hub) to the client (spoke). The relay agent uses the nonbroadcast multiaccess (NBMA) address to create temporary routes in Next Hop Resolution Protocol (NHRP) to help unicast the DHCPOFFER and DHCPACK messages to the spoke.
Examples
The following example shows how to configure a spoke-to-hub tunnel to unicast the replies over a DMVPN network:
Router(config)# ip dhcp support tunnel unicast
Related Commands
Command
Description
ipaddressdhcp
Configures an IP address on an interface acquired through DHCP.
ipdhcpclientbroadcast-flag
Configures the DHCP client to set or clear the broadcast flag.
ip dhcp update dns
To enable Dynamic Domain Name System (DDNS) updates of address (A) and pointer (PTR) Resource Records (RRs) for most address pools, use the ipdhcpupdatedns command in global configuration mode. To disable dynamic updates, use the no form of this command.
ipdhcpupdatedns [both] [override] [before]
noipdhcpupdatedns [both] [override] [before]
Syntax Description
both
(Optional) Enables the Dynamic Host Control Protocol (DHCP) server to perform DDNS updates on both A and PTR RRs unless the DHCP client has specified that the server not perform the updates in the fully qualified domain name (FQDN) option.
override
(Optional) Enables the DHCP server to override the DHCP client specification not to perform DDNS updates for both the A and PTR RRs.
before
(Optional) Enables the DHCP server to perform DDNS updates before sending the DHCP ACK back to the DHCP client.
Command Default
Perform DDNS updates after sending a DHCP ACK.
Command Modes
Global configuration
Command History
Release
Modification
12.3(8)YA
This command was introduced.
12.3(14)T
This command was integrated into Cisco IOS Release 12.3(14)T.
Usage Guidelines
Some address pools are configured using the updatedns command, and that configuration overrides the global configuration. See the updatedns command for more information.
If you specify the both and override keywords, the DHCP server will perform the updates for both A and PTR RRs overriding anything that the DHCP client has specified in the FQDN option.
Examples
The following example shows how to configure the DHCP server to perform A and PTR RR updates and to override the DHCP client FQDN option:
ip dhcp update dns both override
Related Commands
Command
Description
updatedns
Dynamically updates a DNS with A and PTR RRs for some address pools.
ip dhcp use
To control what information the Dynamic Host Configuration Protocol (DHCP) server accepts or rejects during address allocation, use the ipdhcpusecommand in global configuration mode. To disable the use of these parameters during address allocation, use the no form of this command.
Specifies that the DHCP server use DHCP classes during address allocation.
aaa
(Optional) Specifies to use the authentication, authorization, and accounting (AAA) server to get class name.
vrf
Specifies whether the DHCP server ignores or uses the receiving VPN routing and forwarding (VRF) interface during address allocation.
connected
Specifies that the server should use the VRF information from the receiving interface when servicing a directly connected client.
remote
Specifies that the server should use the VRF information from the receiving interface when servicing a request forwarded by a relay agent.
Command Default
The DHCP server allocates addresses by default.
Command Modes
Global configuration (config)
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.
Cisco IOS XE Release 3.1S
This command was integrated into Cisco IOS XE Release 3.1S and implemented on the Cisco ASR 1000 Series Aggregation Services Routers.
Usage Guidelines
When the Cisco IOS DHCP server code is allocating addresses, you can use the ipdhcpusecommand to either enable or disable the use of VRF configured on the interface, or to configure DHCP classes. If you use the noipdhcpuseclasscommand, the DHCP class configuration is not deleted.
Examples
The following example shows how to configure the DHCP server to use the relay agent information option during address allocation:
Router(config)# ip dhcp use class
The following example shows how to configure the DHCP server to disable the use of the VRF information option during address allocation:
Router(config)# no ip dhcp use vrf connected
Related Commands
Command
Description
ipdhcpclass
Defines a DHCP class and enters DHCP class configuration mode.
ip dhcp use subscriber-id client-id
To configure the Dynamic Host Configuration Protocol (DHCP) server to globally use the subscriber identifier as the client identifier on all incoming DHCP messages, use the ipdhcpusesubscriber-idclient-id command in global configuration mode. To disable this functionality, use the no form of this command.
ipdhcpusesubscriber-idclient-id
noipdhcpusesubscriber-idclient-id
Syntax Description
This command has no arguments or keywords.
Command Default
DHCP uses the client identifier option in the DHCP packet to identify clients.
Command Modes
Global configuration (config)
Command History
Release
Modification
12.2(46)SE
This command was introduced.
12.2(33)SXI4
This command was integrated into Cisco IOS Release 12.2(33)SXI4.
Usage Guidelines
A subscriber ID value configured on a specific interface using the ipdhcpserverusesubscriber-idclient-id command takes precedence over this command.
Examples
In the following example, a subscriber ID will be automatically generated based on the short name of the interface (port) specified by the addressclient-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.
Router(config)# ip dhcp use subscriber-id client-id
Router(config)# ip dhcp subscriber-id interface-name
Router(config)# ip dhcp excluded-address 10.1.1.1 10.1.1.3
Router(config)# ip dhcp pool dhcppool
Router(dhcp-config)# network 10.1.1.0 255.255.255.0
Router(dhcp-config)# address 10.1.1.7 client-id ethernet 1/0 ascii
Related Commands
Command
Description
ipdhcpserverusesubscriber-idclientid
Configures the DHCP server to use the subscriber identifier as the client identifier on all incoming DHCP messages on an interface.
ip dhcp-client broadcast-flag
To configure the Dynamic Host Configuration (DHCP) client to set the broadcast flag, use the ipdhcp-clientbroadcast-flag command in global configuration mode. To disable this feature, use the no form of this command.
ipdhcp-clientbroadcast-flag
nodhcp-clientbroadcast-flag
Syntax Description
This command has no arguments or keywords.
Command Default
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 noipdhcp-clientbroadcast-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
ipaddressdhcp
Acquires an IP address on an interface via DHCP.
servicedhcp
Enables DHCP server and relay functions.
ip dhcp-client default-router distance
To configure a default Dynamic Host Configuration Protocol (DHCP) administrative distance for clients, use the ipdhcp-clientdefault-routerdistancecommand in global configuration mode. To return to the default, use the no form of this command.
ipdhcp-clientdefault-routerdistancevalue
noipdhcp-clientdefault-routerdistancevalue
Syntax Description
distance
DHCP administrative distance. The value argument sets the default distance. The range is from 1 to 255.
Command Default
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
debugdhcpclient
Displays debugging information about the DHCP client activities and monitors the status of DHCP packets.
showiproutedhcp
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 ipdhcp-clientforcerenew command in global configuration mode. To disable the forced authentication, use the no form of this command.
ipdhcp-clientforcerenew
noipdhcp-clientforcerenew
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
ipdhcpclientauthenticationkey-chain
Specifies the key chain to be used in DHCP authentication requests.
ipdhcpclientauthenticationmode
Specifies the type of authentication to be used in DHCP messages on the interface.
keychain
Identifies a group of authentication keys for routing protocols.