05-Layer 3 - IP Services Configuration Guide

HomeSupportResource CenterRoutersH3C SR8800 Series RoutersH3C SR8800Technical DocumentsConfigureConfiguration GuideH3C SR8800 Configuration Guide-Release3347-6W10305-Layer 3 - IP Services Configuration Guide
10-DHCPv6 Configuration
Title Size Download
10-DHCPv6 Configuration 136.04 KB

Configuring DHCPv6

DHCPv6 configuration overview

The Dynamic Host Configuration Protocol for IPv6 (DHCPv6) was designed based on IPv6 addressing scheme and is used for assigning IPv6 addresses and other configuration parameters to hosts.

Compared with other IPv6 address allocation methods (such as manual configuration and stateless address autoconfiguration), DHCPv6 can:

·           Record addresses assigned to hosts and assign addresses to specific hosts, thus facilitating network management.

·           Assign configuration parameters to hosts, such as the DNS server address or domain name.

Basic concepts

Multicast address of all DHCPv6 servers and relay agents

The multicast address FF02::1:2 identifies all DHCPv6 servers and relay agents on the local link.

DUID

A DHCP unique identifier (DUID) uniquely identifies a DHCPv6 client, relay agent, or server, and is used for authentication between DHCPv6 devices.

A DUID based on link-layer address (DUID-LL) defined in RFC 3315 is used to identify a DHCPv6 device. The DUID-LL format is shown in Figure 1, where:

·           DUID typeThe value 0x0003 indicates that the DUID type is DUID-LL.

·           Hardware typeThe router supports Ethernet as the hardware type with the value of 0x0001.

·           Link layer addressIts value is the bridge MAC address of the router.

Figure 1 Format of DUID-LL

 

Typical DHCPv6 network application

Figure 2 Network diagram

 

A DHCPv6 client uses a multicast address to contact the DHCPv6 server on the local link to obtain an IPv6 address and other configuration parameters. As shown in Figure 2, if the DHCPv6 server resides on another subnet, the DHCPv6 client can contact the server via a DHCPv6 relay agent. Thus, you do not need to deploy a DHCPv6 server on each subnet.

 

CAUTION

CAUTION:

The router can only serve as the DHCPv6 relay agent.

 

DHCPv6 relay agent operation

A DHCPv6 relay agent and DHCPv6 server exchange two types of messages, Relay-forward and Relay-reply.

Figure 3 Operating process of a DHCPv6 relay agent

 

As shown in Figure 3, the DHCPv6 relay agent works as follows:

1.      The DHCPv6 client sends a request to the multicast address FF02::1:2 of all the DHCPv6 servers and relay agents.

2.      After receiving the request, the DHCPv6 relay agent encapsulates the request into the Relay Message Option of a Relay-forward message, and sends the message to the DHCPv6 server.

3.      After obtaining the request from the Relay-forward message, the DHCPv6 server selects an IPv6 address and other required parameters and adds them into a reply which is encapsulated into the Relay Message Option of a Relay-reply message. The DHCPv6 server then sends the Relay-reply message to the DHCPv6 relay agent.

4.      The DHCPv6 relay agent obtains the reply from the Relay-reply message and sends the reply to the DHCPv6 client.

The DHCPv6 client uses the IPv6 address and other network parameters assigned by the DHCPv6 server to perform network configuration.

Protocols and standards

·           RFC 3736, Stateless Dynamic Host Configuration Protocol (DHCP) Service for IPv6

·           RFC 3315, Dynamic Host Configuration Protocol for IPv6 (DHCPv6)

·           RFC 2462, IPv6 Stateless Address Autoconfiguration

Configuring the DHCPv6 relay agent

Upon receiving a request from a DHCPv6 client, the interface that operates as a DHCPv6 relay agent encapsulates the request into a Relay-forward message and forwards the message to the specified DHCPv6 server, which then assigns an IPv6 address and other configuration parameters to the DHCPv6 client.

Configuration prerequisites

Before you configure DHCPv6 relay agent, enable IPv6 by using the ipv6 command in system view. For more information about the ipv6 command, see the chapter “IPv6 basics configuration.”

Configuration procedure

To configure the DHCPv6 relay agent:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Enable DHCPv6 relay agent on the interface and specify a DHCPv6 server.

ipv6 dhcp relay server-address ipv6-address [ interface interface-type interface-number ]

By default, DHCPv6 relay agent is disabled and no DHCPv6 server is specified on the interface.

 

 

NOTE:

·       Executing the ipv6 dhcp relay server-address command repeatedly can specify multiple DHCPv6 servers, and up to eight DHCP servers can be specified for an interface. After receiving requests from DHCPv6 clients, the DHCPv6 relay agent forwards the requests to all the specified DHCPv6 servers.

·       If the DHCPv6 server address is a link-local address or link-scoped multicast address on the local link, you must specify an outgoing interface using the interface keyword in the ipv6 dhcp relay server-address command; otherwise, DHCPv6 packets may fail to be forwarded to the DHCPv6 server.

·       Removing all the specified DHCPv6 server addresses from an interface with the undo ipv6 dhcp relay server-address command disables DHCPv6 relay agent on the interface.

 

Displaying and maintaining the DHCPv6 relay agent

 

Task

Command

Remarks

Display the DUID of the local router.

display ipv6 dhcp duid [ | { begin | exclude | include } regular-expression ]

Available in any view

Display DHCPv6 server addresses specified on the DHCPv6 relay agent.

display ipv6 dhcp relay server-address { all | interface interface-type interface-number } [ | { begin | exclude | include } regular-expression ]

Available in any view

Display packet statistics on the DHCPv6 relay agent.

display ipv6 dhcp relay statistics [ | { begin | exclude | include } regular-expression ]

Available in any view

Clear packets statistics on the DHCPv6 relay agent.

reset ipv6 dhcp relay statistics

Available in user view

 

DHCPv6 relay agent configuration example

Network requirements

As shown in Figure 4, the network address prefix of DHCPv6 clients is 1::/64, and the IPv6 address of the DHCPv6 server is 2::2/64. The DHCPv6 client and server must communicate via a DHCPv6 relay agent (Router A).

Router A acts as the gateway of network 1::/64. It sends RA messages to notify the hosts to obtain IPv6 addresses and other configuration parameters through DHCPv6. For more information about RA messages, see the chapter “IPv6 basics configuration.”

Figure 4 Network diagram

 

Configuration procedure

1.      Configure Router A as a DHCPv6 relay agent:

# Enable IPv6.

<RouterA> system-view

[RouterA] ipv6

# Configure the IPv6 addresses of GigabitEthernet 3/1/1 and GigabitEthernet 3/1/2 respectively.

[RouterA] interface GigabitEthernet 3/1/2

[RouterA-GigabitEthernet3/1/2] ipv6 address 2::1 64

[RouterA-GigabitEthernet3/1/2] quit

[RouterA] interface GigabitEthernet 3/1/1

[RouterA-GigabitEthernet3/1/1] ipv6 address 1::1 64

# Enable DHCPv6 relay agent and specify the DHCPv6 server address on interface GigabitEthernet 3/1/1.

[RouterA-GigabitEthernet3/1/1] ipv6 dhcp relay server-address 2::2

2.      Configure Router A as a gateway:

# Enable Router A to send RA messages and set the “M” and “O” flags.

[RouterA-GigabitEthernet3/1/1] undo ipv6 nd ra halt

[RouterA-GigabitEthernet3/1/1] ipv6 nd autoconfig managed-address-flag

[RouterA-GigabitEthernet3/1/1] ipv6 nd autoconfig other-flag

3.      Verify the configuration:

# After completing the above configurations, display DHCPv6 server address information on Router A.

<RouterA> display ipv6 dhcp relay server-address all

Interface: GE3/1/1

Server address(es)                             Output Interface

2::2

# Display packet statistics on the DHCPv6 relay agent.

<RouterA> display ipv6 dhcp relay statistics

Packets dropped               :  0

    Error                     :  0

    Excess of rate limit      :  0

Packets received              :  14

    SOLICIT                   :  0

    REQUEST                   :  0

    CONFIRM                   :  0

    RENEW                     :  0

    REBIND                    :  0

    RELEASE                   :  0

    DECLINE                   :  0

    INFORMATION-REQUEST       :  7

    RELAY-FORWARD             :  0

    RELAY-REPLY               :  7

Packets sent                  :  14

    ADVERTISE                 :  0

    RECONFIGURE               :  0

    REPLY                     :  7

    RELAY-FORWARD             :  7

    RELAY-REPLY               :  0