Configuring DHCPv6 Relay
Overview
Function Introduction
DHCPv6 relay is any host that forwards DHCPv6 packets between clients and servers. Relay is used to forward requests and replies between clients and servers when they are not on the same physical subnet. Relay forwarding is distinct from the normal forwarding of an IPv6 router, where IPv6 datagram are switched between networks somewhat transparently.
By contrast, relay receive DHCPv6 messages and then generate a new DHCPv6 message to send out on another interface. The relay sets the link address (used by server to identify the subnet that client is belong to), and, if configured, adds the remote-id option in the packet and forwards it to the DHCPv6 server…
Principle Description
N/A
Configuration
DHCP Relay
This figure is the networking topology for testing DHCPv6 relay functions. We need two Linux boxes and one Switch to construct the test bed.
Computer A is used as DHCPv6 server.
Computer B is used as DHCPv6 client.
Switch is used as DHCPv6 relay.
step 1 Enter the configure mode
Switch# configure terminal
step 2 Enable DHCPv6 relay globally
Switch(config)# service dhcpv6 enable
Switch(config)# dhcpv6 relay
Switch(config)# dhcpv6 relay remote-id option
Switch(config)# dhcpv6 relay pd route
step 3 Configure the DHCPv6 server
Switch(config)# dhcpv6-server 1 2001:1000::1
step 4 Enter the interface configure mode and set the attributes of the interface
Switch(config)# interface eth-0-12
Switch(config-if)# no switchport
Switch(config-if)# ipv6 address 2001:1000::2/64
Switch(config-if)# no shutdown
Switch(config-if)# exit
Switch(config)# interface eth-0-11
Switch(config-if)# no switchport
Switch(config-if)# ipv6 address 2001:1001::1/64
Switch(config-if)# no shutdown
Switch(config-if)# dhcpv6-server 1
Switch(config-if)# exit
step 5 Exit the configure mode
Switch(config)# end
step 6 Validation
Check the interface configuration
Switch# show running-config interface eth-0-12
| !
interface eth-0-12
no switchport
ipv6 address 2001:1000::1/64
| !
Switch# # show running-config interface eth-0-11
| !
interface eth-0-11
no switchport
ipv6 address 2001:1001::1/64
dhcpv6-server 1
| !
Check the dhcpv6 service status
Switch# show services
Networking services configuration:
Service Name Status
| ===========================================================
dhcp disable
dhcpv6 enable
Check the dhcpv6 server group configuration
Switch# show dhcpv6-server
DHCPv6 server group information:
| ============================================================
group 1 ipv6 address list:
| [1] 2001:1000::1
Check the dhcpv6 relay statistics .
Switch# show dhcpv6 relay statistics
DHCPv6 relay packet statistics:
| ============================================================
Client relayed packets : 8
Server relayed packets : 8
Client error packets : 0
Server error packets : 0
Check the prefix-delegation client information learning by DHCPv6 relay
Switch# show dhcpv6 relay pd client
DHCPv6 prefix-delegation client information:
| ============================================================
Interface : eth-0-11
Client DUID : 000100011804ff38c2428f04970
Client IPv6 address : fe80::beac:d8ff:fedf:c600
IA ID : d8dfc60
IA Prefix : 2002:2:9:eebe::/64
prefered/max lifetime : 280/300
expired time : 2023-1-1 09:10:58
| ============================================================
Application cases {application-cases-87}
N/A