Table Of Contents
Implementing the DHCP on Cisco IOS XR Software
Contents
Prerequisites for Configuring the Cisco IOS XR DHCP Relay Agent
Information About the Cisco IOS XR DHCP Relay Agent
Packet Forwarding Addresses
How to Configure the Cisco IOS XR DHCP Relay Agent
Configuring the Packet Forwarding Address
Enabling the Cisco IOS XR DHCP Relay Agent
Configuring Cisco IOS XR Relay Agent Information Option
Configuration Examples for the Cisco IOS XR DHCP Relay Agent
Packet Forwarding Address: Example
Cisco IOS XR DHCP Relay Agent: Example
Cisco IOS XR Relay Agent Information Option Support: Example
Information About Configuring DHCP IPv6 Information Pools
Configuring Cisco IOS XR DHCP IPv6 Information Pool Option
Additional References
Related Documents
Standards
MIBs
RFCs
Technical Assistance
Implementing the DHCP on Cisco IOS XR Software
This module describes the concepts and tasks you will use to configure the Cisco IOS XR Dynamic Host Configuration Protocol (DHCP).
Feature History for Implementing the DHCP on Cisco IOS XR Software
Release
|
Modification
|
Release 2.0
|
This feature was introduced on the Cisco CRS-1.
|
Release 3.0
|
No modification.
|
Release 3.2
|
This feature was supported on the Cisco XR 12000 Series Router.
|
Release 3.3.0
|
No modification.
|
Release 3.4.0
|
DHCP IPv6 Information Pool configuration procedure was added and DCHP relay information description was updated.
|
Release 3.5.0
|
No modification.
|
Contents
•
Prerequisites for Configuring the Cisco IOS XR DHCP Relay Agent
•
Information About the Cisco IOS XR DHCP Relay Agent
•
How to Configure the Cisco IOS XR DHCP Relay Agent
•
Configuration Examples for the Cisco IOS XR DHCP Relay Agent
•
Information About Configuring DHCP IPv6 Information Pools
•
Additional References
Prerequisites for Configuring the Cisco IOS XR DHCP Relay Agent
The following prerequisites are required to configure a DHCP relay agent:
•
A router running Cisco IOS XR software
•
A configured and running DHCP client and DHCP server
•
Connectivity between the relay agent and DCHP server
•
A configured IPv4 helper address
Information About the Cisco IOS XR DHCP Relay Agent
A DHCP relay agent is a host that forwards DHCP packets between clients and servers that do not reside on a shared physical subnet. Relay agent forwarding is distinct from the normal forwarding of an IP router where IP datagrams are switched between networks transparently.
Packet Forwarding Addresses
DHCP clients use User Datagram Protocol (UDP) broadcasts to send DHCPDISCOVER messages when they lack information about the network to which they belong.
If a client is on a network segment that does not include a server, a relay agent is needed on that network segment to ensure that DHCP packets reach the servers on another network segment. UDP broadcast packets are not forwarded (because most routers are not configured to forward broadcast traffic). You can remedy this situation by configuring the interface of the router receiving the broadcasts to forward certain classes of broadcasts to a helper address. You can use more than one helper address per interface.
Figure 2 demonstrates the process. The DHCP client broadcasts a request for an IP address and additional configuration parameters on its local LAN. Acting as a DHCP relay agent, Router B picks up the broadcast, changes the destination address to DHCP server's address and sends the message out on another interface. The relay agent inserts the IP address of the interface containing the helper command into the gateway IP address (giaddr) field of the DHCP packet, which enables the DHCP server to determine which subnet should receive the offer and identify the appropriate IP address range. The relay agent unicasts the messages to the server address; in this case, 172.16.1.2 (which is specified by the ipv4 helper-address command).
Figure 2 Forwarding UDP Broadcasts to a DHCP Server Using a Helper Address
How to Configure the Cisco IOS XR DHCP Relay Agent
This section contains the following tasks:
•
Configuring the Packet Forwarding Address
•
Enabling the Cisco IOS XR DHCP Relay Agent
•
Configuring Cisco IOS XR Relay Agent Information Option
Configuring the Packet Forwarding Address
This task describes how to configure the DHCP relay agent to forward packets to a DHCP server.
See Packet Forwarding Addresses for more information.
SUMMARY STEPS
1.
configure
2.
interface type number
3.
ipv4 helper-address address
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RP0/CPU0:router(config)# configure
terminal
|
Enters global configuration mode.
|
Step 2
|
interface type number
Example:
RP/0/RP0/CPU0:router(config)# interface
FastEthernet0/0
|
Configures an interface and enters interface configuration mode.
|
Step 3
|
ipv4 helper-address address
Example:
RP/0/RP0/CPU0:router(config-if)# ipv4
helper-address 121.24.43.2
|
Forwards UDP broadcasts, including BOOTP and DHCP.
• The value of address can be a specific DHCP server address or a network address (if other DHCP servers are on the destination network segment). Using the network address enables other servers to respond to DHCP requests.
• For multiple servers, configure one helper address for each server.
|
Enabling the Cisco IOS XR DHCP Relay Agent
This task describes how to enable the Cisco IOS XR relay agent.
On Cisco IOS XR, the DHCP relay agent is disabled by default.
Note
The Cisco IOS XR relay agent can be enabled on an interface only when the ipv4 helper-address command is configured. For more information, see Configuring the Packet Forwarding Address.
SUMMARY STEPS
1.
configure
2.
dhcp server
3.
end
or
commit
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 2
|
dhcp server
Example:
RP/0/RP0/CPU0:router(config)# dhcp server
enable
|
Enables the DCHP relay agent.
|
Step 3
|
end
or
commit
Example:
RP/0/RP0/CPU0:router(config)# end
or
RP/0/RP0/CPU0:router(config)# commit
|
Saves configuration changes.
• When you issue the end command, the system prompts you to commit changes:
Uncommitted changes found, commit them before
exiting(yes/no/cancel)?
[cancel]:
– Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.
– Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.
– Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Configuring Cisco IOS XR Relay Agent Information Option
This task describes how to enable support for the DHCP relay agent information option.
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 (using the replace option).
SUMMARY STEPS
1.
configure
2.
dhcp relay information option
3.
dhcp relay information check
4.
dhcp relay information policy {drop | keep | replace}
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RP0/CPU0:router# configure terminal
|
Enters global configuration mode.
|
Step 2
|
dhcp relay information option
Example:
RP/0/RP0/CPU0:router(config)# ip dhcp relay
information option
|
Enables the system to insert the DHCP relay agent information option (option-82 field) in forwarded BOOTREQUEST messages to a DHCP server.
• This option is injected by the relay agent when forwarding client-originated DHCP packets to the server. Servers recognizing this option can use the information to implement IP address or other parameter assignment policies. When replying, the DHCP server echoes the option back to the relay agent. The relay agent strips the option before forwarding the reply to the client.
• The relay agent information is organized as a single DHCP option that contains one or more sub-options containing the information known by the relay agent. These sub-options are supported:
– Remote ID
– Circuit ID
This function is disabled by default.
|
Step 3
|
dhcp relay information check
Example:
RP/0/RP0/CPU0:router(config)# ip dhcp relay
information check
|
(Optional) Configures DHCP to check that the relay agent information option in forwarded BOOTREPLY messages is valid.
• By default, DHCP checks that the option-82 field in DHCP reply packets it receives from the DHCP server is valid. If an invalid message is received, the relay agent drops it. If a valid message is received, the relay agent removes the option-82 field and forwards the packet. Use the ip dhcp relay information check command to reenable this functionality if it has been disabled.
|
Step 4
|
dhcp relay information policy {drop | keep |
replace}
Example:
RP/0/RP0/CPU0:router(config)# dhcp relay
information policy replace
|
(Optional) Configures the reforwarding policy for a DHCP relay agent; that is, whether the relay agent will drop, keep, or replace the relay information).
• Replace is the default setting.
|
Configuration Examples for the Cisco IOS XR DHCP Relay Agent
This section provides the following configuration examples:
•
Packet Forwarding Address: Example
•
Cisco IOS XR DHCP Relay Agent: Example
•
Cisco IOS XR Relay Agent Information Option Support: Example
Packet Forwarding Address: Example
The following example shows how to configure the DHCP relay agent to forward packets to a DHCP server:
interface MgmtEth 0/0/CPU0/0
ipv4 helper-address 5.5.5.3
RP/0/0/1:Sep 28 23:28:15.738 : config[65705]: %LIBTARCFG-6-COMMIT :
Configuration committed by user 'test'.
Use 'show commit changes 1000000326' to view the changes.
RP/0/0/1:Sep 28 23:28:20.098 : config[65705]: %SYS-5-CONFIG_I :
Configured from console by console
interface MgmtEth0/0/CPU0/0
ipv4 helper-address 5.5.5.3
ipv4 address 10.25.58.25 255.255.0.0
Cisco IOS XR DHCP Relay Agent: Example
The following example shows how to enable the Cisco IOS XR relay agent:
RP/0/0/1:Sep 28 23:33:14.645 : config[65705]: %LIBTARCFG-6-COMMIT :
Configuration committed by user 'lab'.
Use 'show commit changes 1000000327' to view the changes.
RP/0/0/1:Sep 28 23:33:19.704 : config[65705]: %SYS-5-CONFIG_I :
Configured from console by console
RP/0/RP0/CPU0:router# show running-config
Building configuration... !!
Last configuration change at 23:33:11 UTC Tue Dec 28 2004 by lab ! hostname router line
aux
Cisco IOS XR Relay Agent Information Option Support: Example
The following example shows how to enable the relay agent and the insertion and removal of the DHCP relay information option:
dhcp relay information option
dhcp relay information policy drop
Building configuration... !!
Last configuration change at 14:32:03 UTC Fri December 25 2004 by router!
dhcp relay information option
dhcp relay information policy drop
Information About Configuring DHCP IPv6 Information Pools
A DHCP IPv6 configuration information pool is a named entity that includes information about available configuration parameters and policies that control assignment of the parameters to clients from the pool. A pool is configured independently of the DHCP service and is associated with the DHCP service through the command line.
Each configuration pool can contain the following configuration parameters and operational information:
•
Prefix delegation information, which could include a list of available prefixes for a particular client and associated preferred and valid lifetimes
•
DNS servers—List of IPv6 addresses of DNS servers
•
Domain search list—String containing domain names for DNS resolution
•
SIP server address—List of IPv6 addresses of SIP server
•
SIP server domain list—String containing domain names for SIP server
Configuring Cisco IOS XR DHCP IPv6 Information Pool Option
This task describes how to enable support for the DHCP IPv6 information pool option with the name pool1.
SUMMARY STEPS
1.
configure
2.
dhcp ipv6
3.
pool pool-name
4.
end
or
commit
5.
show dhcp ipv6 pool pool-name
DETAILED STEPS
| |
Command or Action
|
Purpose
|
Step 1
|
configure
Example:
RP/0/RP0/CPU0:router# configure
|
Enters global configuration mode.
|
Step 2
|
dhcp ipv6
Example:
RP/0/RP0/CPU0:router (config)# dhcp ipv6
|
Enables the DHCP IPv6 configuration mode.
|
Step 3
|
pool pool-name
Example:
RP/0/RP0/CPU0:router (config-dhcp ipv6)# pool
pool1
|
Creates a DHCP pool specified by the pool-name argument for the prefix delegation and the other configurations on the interface.
|
Step 4
|
end
or
commit
Example:
RP/0/RP0/CPU0:router(config)# end
or
RP/0/RP0/CPU0:router(config)# commit
|
Saves configuration changes.
• When you issue the end command, the system prompts you to commit changes:
Uncommitted changes found, commit them before
exiting(yes/no/cancel)?
[cancel]:
– Entering yes saves configuration changes to the running configuration file, exits the configuration session, and returns the router to EXEC mode.
– Entering no exits the configuration session and returns the router to EXEC mode without committing the configuration changes.
– Entering cancel leaves the router in the current configuration session without exiting or committing the configuration changes.
• Use the commit command to save the configuration changes to the running configuration file and remain within the configuration session.
|
Step 5
|
show dhcp ipv6 pool [pool-name]
Example:
RP/0/RP0/CPU0:router# show dhcp ipv6 pool pool1
|
(Optional) Displays the DHCP IPv6 pool name.
|
Additional References
The following sections provide references related to implementing the Cisco IOS XR DHCP relay agent.
Related Documents
Related Topic
|
Document Title
|
Cisco IOS XR DHCP commands
|
DHCP Commands on Cisco IOS XR Software module in Cisco IOS XR IP Addresses and Services Command Reference, Release 3.5
|
Cisco CRS-1 router getting started material
|
Cisco IOS XR Getting Started Guide, Release 3.5
|
Information about user groups and task IDs
|
Configuring AAA Services on Cisco IOS XR Software module in Cisco IOS XR System Security Configuration Guide, Release 3.5
|
Standards
Standards
|
Title
|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature.
|
—
|
MIBs
RFCs
RFC
|
Title
|
RFC 2131
RFC 3315
|
Dynamic Host Configuration Protocol
Dynamic Host Configuration Protocol for IPv6 (DHCPv6)
|
Technical Assistance
Description
|
Link
|
The Cisco Technical Support website contains thousands of pages of searchable technical content, including links to products, technologies, solutions, technical tips, and tools. Registered Cisco.com users can log in from this page to access even more content.
|
http://www.cisco.com/techsupport
|