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 ip dhcp relay information option command in global configuration mode. To disable inserting relay information into forwarded BOOTREQUEST messages, use the
no form of this command.
ip dhcp relay information option [vpn]
no ip dhcp relay information option [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 ip dhcp relay information option 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 ip dhcp relay information option vpn command 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 ip helper-address command.
If only the ip dhcp relay information option vpn command is 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 ip dhcp relay information option command and the ip dhcp relay information option vpn 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 ip dhcp smart-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 ip dhcp relay information option command. The rbe nasip command 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:
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