To specify a destination address to which client messages are forwarded and to enable DHCP for IPv6 relay service on the interface,
use the ipv6 dhcp relay destination command in Interface Configuration mode. To remove a relay destination on the interface or to delete an output interface
for a destination, use the no form of this command.
Syntax
ipv6 dhcp relay destination [{ipv6-address [interface-id]} | interface-id]
no ipv6 dhcp relay destination [{ipv6-address [interface-id]} | interface-id]
Parameters
-
ipv6-address [interface-id]—Relay destination IPv6 address in the form documented in RFC 4291 where the address is specified in hexadecimal using 16-bit
values between colons. There are the following types of relay destination address:
-
interface-id—Interface identifier that specifies the output interface for a destination. If this argument is configured, client messages
are forwarded to the well-known link-local Multicast address All_DHCP_Relay_Agents_and_Servers (FF02::1:2) through the link to which the output interface is connected.
Default Configuration
The relay function is disabled, and there is no relay destination on an interface.
Command Mode
Interface Configuration mode
User Guidelines
This command specifies a destination address to which client messages are forwarded, and it enables DHCP for IPv6 relay service
on the interface. Up to 10 addresses can be defined per one interface and up to 100 addresses can be defined per switch.
DHCPv6 Relay inserts the Interface-id option if an IPv6 global address is not defined on the interface on which the relay
is running. The Interface-id field of the option is the interface name (a value of the ifName field of the ifTable) on which the relay is running.
When relay service is running on an interface, a DHCP for IPv6 message received on that interface will be forwarded to all
configured relay destinations configured per interface and globally.
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.
The relay destination can be a Unicast address of a server or another relay agent, or it may be a Multicast address. There
are two types of relay destination addresses:
-
A link-local Unicast or Multicast IPv6 address, for which a user must specify an output interface
-
A global Unicast IPv6 address. A user can optionally specify an output interface for this kind of address.
If no output interface is configured for a destination, the output interface is determined by routing tables. In this case,
it is recommended that a Unicast or Multicast routing protocol be running on the router.
Multiple destinations can be configured on one interface, and multiple output interfaces can be configured for one destination.
When the relay agent relays messages to a Multicast address, it sets the hop limit field in the IPv6 packet header to 32.
Unspecified, loopback, and node-local Multicast addresses are not acceptable as the relay destination.
Note that it is not necessary to enable the relay function on an interface for it to accept and forward an incoming relay
reply message from servers. By default, the relay function is disabled, and there is no relay destination on an interface.
Use the no form of the command with arguments to remove a specific address.
Use the no form of the command without arguments to remove all the defined addresses and to disable the relay on the interface.
Examples
Example 1. The following example sets the relay Unicast link-local destination address per VLAN 200 and enables the DHCPv6 Relay on VLAN
100 if it was not enabled:
switchxxxxxx(config)# interface vlan 100
switchxxxxxx(config-if)# ipv6 dhcp relay destination FE80::1:2 vlan 200
switchxxxxxx(config-if)# exit
Example 2. The following example sets the relay well known Multicast link-local destination address per VLAN 200 and enables the DHCPv6
Relay on VLAN 100 if it was not enabled:
switchxxxxxx(config)# interface vlan 100
switchxxxxxx(config-if)# ipv6 dhcp relay destination vlan 200
switchxxxxxx(config-if)# exit
Example 3. The following example sets the Unicast global relay destination address and enables the DHCPv6 Relay on VLAN 100 if it was
not enabled:
switchxxxxxx(config)# interface vlan 100
switchxxxxxx(config-if)# ipv6 dhcp relay destination 3002::1:2
switchxxxxxx(config-if)# exit
Example 4. The following example enables DHCPv6 relay on VLAN 100:
switchxxxxxx(config)# interface vlan 100
switchxxxxxx(config-if)# ipv6 dhcp relay destination
switchxxxxxx(config-if)# exit
Example 5. The following example disables DHCPv6 relay on VLAN 100:
switchxxxxxx(config)# interface vlan 100
switchxxxxxx(config-if)# no ipv6 dhcp relay destination
switchxxxxxx(config-if)# exit