Implementing the Dynamic Host Configuration
Protocol
This module describes the concepts and tasks you will use to configure Dynamic Host Configuration Protocol
(DHCP).
Feature History for Implementing the Dynamic Host Configuration Protocol
Release
Modification
Release 2.0
This feature was introduced.
Release 3.4.0
The DHCP IPv6 Information Pool configuration procedure was
added and DCHP relay information description was updated.
Release 3.7.0
The DHCP CLI was modified.
Prerequisites for Configuring DHCP Relay Agent , page 1
Information About DHCP Relay Agent, page 2
How to Configure and Enable DHCP Relay Agent, page 2
Configuring a DHCP Proxy Profile, page 13
DHCPv4 Client, page 15
Information About Configuring DHCP IPv6 Information Pools, page 16
How to Configure DHCP IPv6 Information Pools, page 17
Configuration Examples for the DHCP Relay Agent, page 18
Additional References, page 20
Prerequisites for Configuring DHCP Relay Agent
The following prerequisites are required to configure a DHCP relay agent:
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
Implementing the Dynamic Host Configuration Protocol
Information About DHCP Relay Agent
You must be in a user group associated with a task group that includes the proper task IDs. The command
reference guides include the task IDs required for each command. If you suspect user group assignment
is preventing you from using a command, contact your AAA administrator for assistance.
A configured and running DHCP client and DHCP server
Connectivity between the relay agent and DCHP server
Information About 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.
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 configure a
DHCP relay profile and configure one or more helper addresses in it. You can assign the profile to an interface
or a VRF.
Figure 1: Forwarding UDP Broadcasts to a DHCP Server Using a Helper Address, on page 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 the DHCP server's address and sends the message out on another interface. The relay agent inserts
the IP address of the interface, on which the relay profile into the gateway 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 helper address in the relay profile).
Figure 1: Forwarding UDP Broadcasts to a DHCP Server Using a Helper Address
How to Configure and Enable DHCP Relay Agent
This section contains the following tasks:
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
2
OL-26066-04
Implementing the Dynamic Host Configuration Protocol
Configuring and Enabling the DHCP Relay Agent
Configuring and Enabling the DHCP Relay Agent
Configuring a DHCP Relay Profile
This task describes how to configure and enable the DHCP relay agent.
SUMMARY STEPS
1. configure
2. dhcp ipv4
3. profile profile-name relay
4. helper-address [vrf vrf- name ] address
5. Use the commit or end command.
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/RP0/CPU0:router# configure
Step 2
Enters DHCP IPv4 configuration mode.
dhcp ipv4
Example:
RP/0/RP0/CPU0:router(config)# dhcp ipv4
Step 3
profile profile-name relay
Enters DHCP IPv4 profile relay submode.
Example:
RP/0/RP0/CPU0:router(config-dhcpv4)# profile client relay
Step 4
helper-address [vrf vrf- name ] address
Example:
RP/0/RP0/CPU0:router(config-dhcpv4-relay-profile)# helper-address
vrf
foo 10.10.1.1
Forwards UDP broadcasts, including BOOTP
and DHCP.
The value of the address argument
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.
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
Implementing the Dynamic Host Configuration Protocol
Configuring the DHCPv6 (Stateless) Relay Agent
Step 5
Command or Action
Purpose
Use the commit or end command.
commitSaves the configuration changes
and remains within the configuration session.
endPrompts user to take one of these
actions:
Yes Saves configuration changes and
exits the configuration session.
NoExits the configuration session
without committing the configuration
changes.
CancelRemains in the configuration
mode, without committing the
configuration changes.
Configuring the DHCPv6 (Stateless) Relay Agent
Perform this task to specify a destination address to which client messages are forwarded and to enable
Dynamic Host Configuration Protocol (DHCP) for IPv6 relay service on the interface.
SUMMARY STEPS
1. configure
2. dhcp ipv6
3. interface type interface-path-id relay
4. destination ipv6-address
5. Use the commit or end command.
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/RP0/CPU0:router# configure
Step 2
dhcp ipv6
Enables DHCP for IPv6 and enters the DHCP IPv6 configuration mode.
Example:
RP/0/RP0/CPU0:router(config) # dhcp
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
4
OL-26066-04
Implementing the Dynamic Host Configuration Protocol
Enabling DHCP Relay Agent on an Interface
Command or Action
Purpose
ipv6
RP/0/RP0/CPU0:router(config-dhcpv6)#
Step 3
interface type interface-path-id relay
Example:
Specifies an interface type and interface-path-id, places the router in
interface configuration mode, and enables DHCPv6 relay service on the
interface.
RP/0/RP0/CPU0:router(config-dhcpv6) #
interface tenGigE 0/5/0/0 relay
Step 4
destination ipv6-address
Example:
RP/0/RP0/CPU0:router(config-dhcpv6-if)
# destination 10:10::10
Step 5
Use the commit or end command.
Specifies a destination address to which client packets are forwarded.
When relay service is enabled on an interface, a DHCP for IPv6 message
received on that interface is forwarded to all configured relay destinations.
The incoming DHCP for IPv6 message may have come from a client on
that interface, or it may have been relayed by another relay agent.
commitSaves the configuration changes and remains within the
configuration session.
endPrompts user to take one of these actions:
Yes Saves configuration changes and exits the configuration
session.
NoExits the configuration session without committing the
configuration changes.
CancelRemains in the configuration mode, without committing
the configuration changes.
Enabling DHCP Relay Agent on an Interface
This task describes how to enable the Cisco IOS XR DHCP relay agent on an interface.
Note
On Cisco IOS XR software, the DHCP relay agent is disabled by default.
SUMMARY STEPS
1. configure
2. dhcp ipv4
3. interface type name relay profile profile-name
4. Use the commit or end command.
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
Implementing the Dynamic Host Configuration Protocol
Disabling DHCP Relay on an Interface
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/RP0/CPU0:router# configure
Step 2
dhcp ipv4
Enters DHCP IPv4 configuration submode.
Example:
RP/0/RP0/CPU0:router(config-if)# dhcp ipv4
Step 3
interface type name relay profile profile-name
Attaches a relay profile to an interface.
Example:
RP/0/RP0/CPU0:router(config-dhcpv4)# interface
FastEthernet0/0 relay profile client
Step 4
Use the commit or end command.
commitSaves the configuration changes and remains within
the configuration session.
endPrompts user to take one of these actions:
Yes Saves configuration changes and exits the
configuration session.
NoExits the configuration session without committing
the configuration changes.
CancelRemains in the configuration mode, without
committing the configuration changes.
Disabling DHCP Relay on an Interface
This task describes how to disable the DHCP relay on an interface by assigning the none profile to the interface.
SUMMARY STEPS
1. configure
2. dhcp ipv4
3. interface type name none
4. Use the commit or end command.
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
6
OL-26066-04
Implementing the Dynamic Host Configuration Protocol
Enabling DHCP Relay on a VRF
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/RP0/CPU0:router# configure
Step 2
Enters DHCP IPv4 configuration submode.
dhcp ipv4
Example:
RP/0/RP0/CPU0:router(config)# dhcp ipv4
Step 3
interface type name none
Disables the DHCP relay on the interface.
Example:
RP/0/RP0/CPU0:router(config-dhcpv4-relay-profile)# interface
pos 0/1/4/1 none
Step 4
Use the commit or end command.
commitSaves the configuration changes and
remains within the configuration session.
endPrompts user to take one of these actions:
Yes Saves configuration changes and
exits the configuration session.
NoExits the configuration session
without committing the configuration
changes.
CancelRemains in the configuration
mode, without committing the
configuration changes.
Enabling DHCP Relay on a VRF
This task describes how to enable DHCP relay on a VRF.
SUMMARY STEPS
1. configure
2. dhcp ipv4
3. vrf vrf-name relay profile profile-name
4. Use the commit or end command.
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
Implementing the Dynamic Host Configuration Protocol
Configuring the Relay Agent Information Feature
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/RP0/CPU0:router# configure
Step 2
dhcp ipv4
Enters DHCP IPv4 configuration submode.
Example:
RP/0/RP0/CPU0:router(config)# dhcp ipv4
Step 3
vrf vrf-name relay profile profile-name
Enables DHCP relay on a VRF.
Example:
RP/0/RP0/CPU0:router(config-dhcpv4)
#vrf default relay profile client
Step 4
Use the commit or end command.
commitSaves the configuration changes and remains within the
configuration session.
endPrompts user to take one of these actions:
Yes Saves configuration changes and exits the configuration
session.
NoExits the configuration session without committing the
configuration changes.
CancelRemains in the configuration mode, without
committing the configuration changes.
Configuring the Relay Agent Information Feature
This task describes how to configure the DHCP relay agent information option processing capabilities.
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).
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
8
OL-26066-04
Implementing the Dynamic Host Configuration Protocol
Configuring the Relay Agent Information Feature
SUMMARY STEPS
1. configure
2. dhcp ipv4
3. profile profile-name relay
4. relay information option
5. relay information check
6. relay information policy {drop | keep}
7. relay information option allow-untrusted
8. Use the commit or end command.
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/RP0/CPU0:router# configure
Step 2
Enters DHCP IPv4 configuration mode.
dhcp ipv4
Example:
RP/0/RP0/CPU0:router(config)# dhcp ipv4
Step 3
profile profile-name relay
Enters DHCP IPv4 profile relay mode.
Example:
RP/0/RP0/CPU0:router(config-dhcpv4)# profile client relay
Step 4
Enables the system to insert the DHCP relay agent
information option (option-82 field) in forwarded
BOOTREQUEST messages to a DHCP server.
relay information option
Example:
RP/0/RP0/CPU0:router(config-dhcpv4-relay-profile)# relay
information option
This option is injected by the relay agent while
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 removes 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
suboptions. These options contain the information
known by the relay agent.
The supported suboptions are:
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
Implementing the Dynamic Host Configuration Protocol
Configuring the Relay Agent Information Feature
Command or Action
Purpose
Remote ID
Circuit ID
Note
Step 5
relay information check
Example:
RP/0/RP0/CPU0:router(config-dhcpv4-relay-profile)# 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, received from the DHCP
server, is valid. If an invalid message is received,
the relay agent drops the message. If a valid
message is received, the relay agent removes the
option-82 field and forwards the packet.
Note
Step 6
relay information policy {drop | keep}
Example:
This function is disabled by
default.
Use the relay information check command
to reenable this functionality if the functionality
has been disabled.
(Optional) Configures the reforwarding policy for a
DHCP relay agent; that is, whether the relay agent will
drop or keep the relay information.
RP/0/RP0/CPU0:router(config)# dhcp relay information
policy drop
Step 7
relay information option allow-untrusted
Example:
(Optional) Configures the DHCP IPv4 Relay not to
discard BOOTPREQUEST packets that have an existing
relay information option and the giaddr set to zero.
RP/0/RP0/CPU0:router(config-dhcpv4-relay-profile)# relay
information check
Step 8
Use the commit or end command.
commitSaves the configuration changes and remains
within the configuration session.
endPrompts user to take one of these actions:
Yes Saves configuration changes and exits the
configuration session.
NoExits the configuration session without
committing the configuration changes.
CancelRemains in the configuration mode,
without committing the configuration changes.
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
10
OL-26066-04
Implementing the Dynamic Host Configuration Protocol
Configuring Relay Agent Giaddr Policy
Configuring Relay Agent Giaddr Policy
This task describes how to configure BOOTPREQUEST packets for Dynamic Host Configuration Protocol
(DHCP) IPv4 Relay processes, that already contain a nonzero giaddr attribute.
SUMMARY STEPS
1. configure
2. dhcp ipv4
3. profile profile-name relay
4. giaddr policy {replace | drop}
5. Use the commit or end command.
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/RP0/CPU0:router# configure
Step 2
Enables the DHCP IPv4 configuration submode.
dhcp ipv4
Example:
RP/0/RP0/CPU0:router(config)# dhcp ipv4
Step 3
profile profile-name relay
Enables profile relay submode.
Example:
RP/0/RP0/CPU0:router(config-dhcpv4)# profile client relay
Step 4
giaddr policy {replace | drop}
replaceReplaces the existing giaddr value
with a value that it generates.
Example:
RP/0/RP0/CPU0:router(config-dhcpv4-relay-profile)# giaddr
policy drop
Step 5
Specifies the giaddr policy.
Use the commit or end command.
dropDrops the packet that has an existing
nonzero giaddr value.
commitSaves the configuration changes and
remains within the configuration session.
endPrompts user to take one of these actions:
Yes Saves configuration changes and exits
the configuration session.
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
11
Implementing the Dynamic Host Configuration Protocol
Configuring the Broadcast Flag Policy
Command or Action
Purpose
NoExits the configuration session without
committing the configuration changes.
CancelRemains in the configuration mode,
without committing the configuration changes.
Configuring the Broadcast Flag Policy
This task describes how to configure DHCP IPv4 Relay to broadcast BOOTPREPLY packets only if the
DHCP IPv4 broadcast flag is set in the DHCP IPv4 header.
Note
By default, the DHCP IPv4 Relay always broadcasts BOOTPREPLY packets.
SUMMARY STEPS
1. configure
2. dhcp ipv4
3. profile profile-name relay
4. broadcast-flag policy check
5. Use the commit or end command.
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/RP0/CPU0:router# configure
Step 2
dhcp ipv4
Configures DHCP IPv4 mode.
Example:
RP/0/RP0/CPU0:router(config)# dhcp ipv4
Step 3
profile profile-name relay
Enables profile relay mode.
Example:
RP/0/RP0/CPU0:router(config-dhcpv4)# profile client relay
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
12
OL-26066-04
Implementing the Dynamic Host Configuration Protocol
Configuring a DHCP Proxy Profile
Step 4
Command or Action
Purpose
broadcast-flag policy check
Enables checking of the broadcast flag in
packets.
Example:
RP/0/RP0/CPU0:router(config-dhcpv4-relay-profile)# broadcast-flag
policy check
Step 5
Use the commit or end command.
commitSaves the configuration changes
and remains within the configuration
session.
endPrompts user to take one of these
actions:
Yes Saves configuration changes
and exits the configuration session.
NoExits the configuration session
without committing the configuration
changes.
CancelRemains in the
configuration mode, without
committing the configuration
changes.
Configuring a DHCP Proxy Profile
The DHCP proxy performs all the functions of a relay and also provides some additional functions. The DHCP
proxy conceals DHCP server details from DHCP clients. The DHCP proxy modifies the DHCP replies such
that the client considers the proxy to be the server. In this state, the client interacts with the proxy as if it is
the DHCP server.
This task describes how to configure and enable the DHCP proxy profile.
SUMMARY STEPS
1. configure
2. dhcp ipv4
3. profile profile-name proxy
4. helper-address [vrf vrf- name ] address [ giaddr gateway-address ]
5. Use the commit or end command.
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
13
Implementing the Dynamic Host Configuration Protocol
Configuring a DHCP Proxy Profile
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/RP0/CPU0:router# configure
Step 2
dhcp ipv4
Enters DHCP IPv4 configuration mode.
Example:
RP/0/RP0/CPU0:router(config)# dhcp ipv4
Step 3
profile profile-name proxy
Enters DHCP IPv4 profile proxy submode.
Example:
RP/0/RP0/CPU0:router(config-dhcpv4)# profile client proxy
Step 4
helper-address [vrf vrf- name ] address [ giaddr gateway-address ]
Example:
RP/0/RP0/CPU0:router(config-dhcpv4-proxy-profile)# helper-address
vrf
foo 10.10.1.1
Forwards UDP broadcasts, including BOOTP
and DHCP.
The value of the address argument
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.
Step 5
Use the commit or end command.
commitSaves the configuration changes
and remains within the configuration session.
endPrompts user to take one of these
actions:
Yes Saves configuration changes and
exits the configuration session.
NoExits the configuration session
without committing the configuration
changes.
CancelRemains in the configuration
mode, without committing the
configuration changes.
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
14
OL-26066-04
Implementing the Dynamic Host Configuration Protocol
DHCPv4 Client
DHCPv4 Client
The Dynamic Host Configuration Protocol (DHCP) client functionality enables the router interfaces to
dynamically acquire the IPv4 address using DHCP.
The DHCP provides configuration parameters to Internet hosts. DHCP consists of two components:
a protocol to deliver host-specific configuration parameters from a DHCP server to a host.
a mechanism to allocate network addresses to hosts.
DHCP is built on a client-server model, where designated DHCP server hosts allocate network addresses, and
deliver configuration parameters to dynamically configured hosts.
A relay agent is required if the client and server are not on the same Layer 2 network. The relay agent usually
runs on the router, and is required because the client device does not know its own IP address initially. The
agent sends out a Layer 2 broadcast to find a server that has this information. The router relays these broadcasts
to the DHCP server, and forwards the responses back to the correct Layer 2 address so that the correct device
gets the correct configuration information.
DHCP has the ability to allocate IP addresses only for a configurable period of time, called the lease period.
If the client is required to retain this IP address for a longer period beyond the lease period, the lease period
must be renewed before the IP address expires. The client renews the lease based on configuration that was
sent from the server. The client unicasts a REQUEST message using the IP address of the server. When a
server receives the REQUEST message and responds with an ACK message. The lease period of the client
is extended by the lease time configured in the ACK message.
Restrictions and Limitations
DHCP client can be enabled only on management interfaces.
Either DHCP or static IP can be configured on an interface.
Enabling DHCP Client on an Interface
The DHCP client can be enabled at an interface level. The DHCP component receives a notification when
DHCP is enabled or disabled on an interface.
SUMMARY STEPS
1. configure
2. interface MgmtEth rack/slot/CPU0/port
3. interface <interface_name> ipv4 address dhcp
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
15
Implementing the Dynamic Host Configuration Protocol
Information About Configuring DHCP IPv6 Information Pools
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/RP0/CPU0:router# configure
Step 2
interface MgmtEth rack/slot/CPU0/port
Enters interface configuration mode.
Example:
RP/0/RP0/CPU0:router(config)#interface mgmtEth 0/0/CPU0/0
Step 3
interface <interface_name> ipv4 address dhcp
Configure DHCP on the interface.
Example:
RP/0/RP0/CPU0:router(config)# interface mgmtEth 0/0/CPU0/0
ipv4 address dhcp
Example:
dhcp Enable IPv4 DHCP client
The following example shows a sample of using IPv4 address command:
RP/0/0/CPU0:ios(config)#interface mgmtEth 0/0/CPU0/0 ipv4 address ?
A.B.C.D/prefix IPv4 address/prefix or IPv4 address and Mask
dhcp Enable IPv4 DHCP client
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 interface.
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
Domain name service (DNS) serversList of IPv6 addresses of DNS servers
Domain search listString containing domain names for DNS resolution
SIP server addressList of IPv6 addresses of SIP server
SIP server domain listString containing domain names for SIP server
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
16
OL-26066-04
Implementing the Dynamic Host Configuration Protocol
How to Configure DHCP IPv6 Information Pools
How to Configure DHCP IPv6 Information Pools
This section contains the following task:
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. Use the commit or end command.
5. show dhcp ipv6 pool [ pool-name ]
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/RP0/CPU0:router# configure
Step 2
Enables the DHCP IPv6 configuration mode.
dhcp ipv6
Example:
RP/0/RP0/CPU0:router (config)# dhcp ipv6
Step 3
pool pool-name
Creates a DHCP pool specified by the pool-name argument for the
prefix delegation and the other configurations on the interface.
Example:
RP/0/RP0/CPU0:router (config-dhcp
ipv6)# pool pool1
Step 4
Use the commit or end command.
commitSaves the configuration changes and remains within the
configuration session.
endPrompts user to take one of these actions:
Yes Saves configuration changes and exits the configuration
session.
NoExits the configuration session without committing the
configuration changes.
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
17
Implementing the Dynamic Host Configuration Protocol
Configuration Examples for the DHCP Relay Agent
Command or Action
Purpose
CancelRemains in the configuration mode, without
committing the configuration changes.
Step 5
show dhcp ipv6 pool [ pool-name ]
(Optional) Displays the DHCP IPv6 pool name.
Example:
RP/0/RP0/CPU0:router# show dhcp ipv6
pool pool1
Configuration Examples for the DHCP Relay Agent
This section provides the following configuration examples:
DHCP Relay Profile: Example
The following example shows how to configure the Cisco IOS XR relay profile:
dhcp ipv4
profile client relay
helper-address vrf foo 10.10.1.1
!
! ...
DHCP Relay on an Interface: Example
The following example shows how to enable the DHCP relay agent on an interface:
dhcp ipv4
interface GigabitEthernet 0/1/1/0 relay profile client
!
DHCP Relay on a VRF: Example
The following example shows how to enable the DHCP relay agent on a VRF:
dhcp ipv4
vrf default relay profile client
!
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
18
OL-26066-04
Implementing the Dynamic Host Configuration Protocol
Relay Agent Information Option Support: Example
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 ipv4
profile client relay
relay information
check
!
!
Relay Agent Giaddr Policy: Example
The following example shows how to configure relay agent giaddr policy:
dhcp ipv4
profile client relay
giaddr policy drop
!
!
Cisco IOS XR Broadcast Flag Policy: Example
This task describes how to configure DHCP IPv4 Relay to broadcast BOOTPREPLY packets only if the
DHCP IPv4 broadcast flag is set in the DHCP IPv4 header.
Note
By default, the DHCP IPv4 Relay always broadcasts BOOTPREPLY packets.
SUMMARY STEPS
1. configure
2. dhcp ipv4
3. profile profile name relay
4. broadcast-flag policy check
5. Use the commit or end command.
DETAILED STEPS
Step 1
Command or Action
Purpose
configure
Enters global configuration mode.
Example:
RP/0/RP0/CPU0:router# configure
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
19
Implementing the Dynamic Host Configuration Protocol
Additional References
Step 2
Command or Action
Purpose
dhcp ipv4
Configures DHCP IPv4 mode.
Example:
RP/0/RP0/CPU0:router(config)# dhcp ipv4
Step 3
profile profile name relay
Enables profile relay mode.
Example:
RP/0/RP0/CPU0:router(config-dhcpv4)# profile client relay
Step 4
Enables checking of the broadcast flag in
packets.
broadcast-flag policy check
Example:
RP/0/RP0/CPU0:router(config-dhcpv4-relay-profile)# broadcast-flag
policy check
Step 5
Use the commit or end command.
commitSaves the configuration changes
and remains within the configuration
session.
endPrompts user to take one of these
actions:
Yes Saves configuration changes
and exits the configuration session.
NoExits the configuration session
without committing the configuration
changes.
CancelRemains in the
configuration mode, without
committing the configuration
changes.
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 module in the Cisco IOS XR IP
Addresses and Services Command Reference for the
Cisco CRS Router
DHCP commands
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
20
OL-26066-04
Implementing the Dynamic Host Configuration Protocol
Additional References
Related Topic
Document Title
Getting started material
Cisco IOS XR Getting Started Guide for the
Cisco CRS Router
Information about user groups and task IDs
Configuring AAA Services module in the
Cisco IOS XR System Security Configuration Guide
for the Cisco CRS Router
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
MIBs
MIBs Link
To locate and download MIBs, use the Cisco MIB
Locator found at the following URL and choose a
platform under the Cisco Access Products menu: http:/
/cisco.com/public/sw-center/netmgmt/cmtk/
mibs.shtml
RFCs
RFC
Title
RFC 2131
Dynamic Host Configuration Protocol
RFC 3315
Dynamic Host Configuration Protocol for IPv6
(DHCPv6)
Technical Assistance
Description
Link
The Cisco Technical Support website contains
http://www.cisco.com/techsupport
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.
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
OL-26066-04
21
Implementing the Dynamic Host Configuration Protocol
Additional References
Cisco IOS XR IP Addresses and Services Configuration Guide for the Cisco CRS Router, Release 4.2.x
22
OL-26066-04