04-Network Connectivity

HomeSupportConfigure & DeployConfiguration GuidesH3C Anchor Configuration Guide(R5436)-6W10104-Network Connectivity
13-DHCPv6 configuration
Title Size Download
13-DHCPv6 configuration 386.64 KB

Contents

DHCPv6 overview·· 1

DHCPv6 address/prefix assignment 1

Rapid assignment involving two messages· 1

Assignment involving four messages· 1

Address/prefix lease renewal 2

Stateless DHCPv6· 3

DHCPv6 options· 3

Option 18· 3

Option 37· 4

Protocols and standards· 5

Configuring the DHCPv6 server 6

About DHCPv6 server 6

IPv6 address assignment 6

IPv6 prefix assignment 6

Concepts· 7

DHCPv6 address pool 7

IPv6 address/prefix allocation sequence· 8

DHCPv6 server tasks at a glance· 9

Configuring IPv6 prefix assignment 9

Configuring IPv6 address assignment 11

Configuring network parameters assignment 12

About network parameters assignment 12

Configuring network parameters in a DHCPv6 address pool 12

Configuring network parameters in a DHCPv6 option group· 13

Configuring the DHCPv6 server on an interface· 14

Configuring a DHCPv6 policy for IPv6 address and prefix assignment 15

Setting the DSCP value for DHCPv6 packets sent by the DHCPv6 server 16

Configuring DHCPv6 binding auto backup· 16

Advertising subnets assigned to clients· 17

Enabling DHCPv6 logging on the DHCPv6 server 17

Display and maintenance commands for DHCPv6 server 18

DHCPv6 server configuration examples· 19

Example: Configuring dynamic IPv6 address assignment 19

Configuring the DHCPv6 relay agent 22

About DHCPv6 relay agent 22

Typical application· 22

DHCPv6 relay agent operating process· 22

DHCPv6 relay agent tasks at a glance· 23

Enabling the DHCPv6 relay agent on an interface· 23

Specifying DHCPv6 servers on the relay agent 23

Specifying DHCPv6 server IP addresses· 23

Specifying DHCPv6 servers for a DHCPv6 address pool on the DHCPv6 relay agent 24

Specifying a gateway address for DHCPv6 clients· 25

Setting the DSCP value for DHCPv6 packets sent by the DHCPv6 relay agent 25

Specifying a padding mode for the Interface-ID option· 26

Display and maintenance commands for DHCPv6 relay agent 26

DHCPv6 relay agent configuration examples· 26

Example: Configuring DHCPv6 relay agent 26

Configuring the DHCPv6 client 29

About the DHCPv6 client 29

Restrictions and guidelines: DHCPv6 client configuration· 29

DHCPv6 client tasks at a glance· 29

Configuring the DHCPv6 client DUID·· 29

Configuring IPv6 address acquisition· 30

Configuring IPv6 prefix acquisition· 30

Configuring IPv6 address and prefix acquisition· 30

Configuring acquisition of configuration parameters except IP addresses and prefixes· 31

Setting the DSCP value for DHCPv6 packets sent by the DHCPv6 client 31

Display and maintenance commands for DHCPv6 client 32

 


DHCPv6 overview

DHCPv6 provides a framework to assign IPv6 prefixes, IPv6 addresses, and other configuration parameters to hosts.

DHCPv6 address/prefix assignment

An address/prefix assignment process involves two or four messages.

Rapid assignment involving two messages

As shown in Figure 1, rapid assignment operates in the following steps:

1.     The DHCPv6 client sends to the DHCPv6 server a Solicit message that contains a Rapid Commit option to prefer rapid assignment.

2.     If the DHCPv6 server supports rapid assignment, it responds with a Reply message containing the assigned IPv6 address/prefix and other configuration parameters. If the DHCPv6 server does not support rapid assignment, Assignment involving four messages is performed.

Figure 1 Rapid assignment involving two messages

 

Assignment involving four messages

As shown in Figure 2, four-message assignment operates using the following steps:

1.     The DHCPv6 client sends a Solicit message to request an IPv6 address/prefix and other configuration parameters.

2.     The DHCPv6 server responds with an Advertise message that contains the assignable address/prefix and other configuration parameters if either of the following conditions exists:

¡     The Solicit message does not contain a Rapid Commit option.

¡     The DHCPv6 server does not support rapid assignment even though the Solicit message contains a Rapid Commit option.

3.     The DHCPv6 client might receive multiple Advertise messages offered by different DHCPv6 servers. It selects an offer according to the receiving sequence and server priority, and sends a Request message to the selected server for confirmation.

4.     The DHCPv6 server sends a Reply message to the client, confirming that the address/prefix and other configuration parameters are assigned to the client.

Figure 2 Assignment involving four messages

 

Address/prefix lease renewal

An IPv6 address/prefix assigned by a DHCPv6 server has a valid lifetime. After the valid lifetime expires, the DHCPv6 client cannot use the IPv6 address/prefix. To use the IPv6 address/prefix, the DHCPv6 client must renew the lease time.

Figure 3 Using the Renew message for address/prefix lease renewal

 

As shown in Figure 3, at T1, the DHCPv6 client sends a Renew message to the DHCPv6 server. The recommended value of T1 is half the preferred lifetime. The DHCPv6 server responds with a Reply message, informing the client whether the lease is renewed.

Figure 4 Using the Rebind message for address/prefix lease renewal

 

As shown in Figure 4:

·     If the DHCPv6 client does not receive a response from the DHCPv6 server after sending a Renew message at T1, it multicasts a Rebind message to all DHCPv6 servers at T2. Typically, the value of T2 is 0.8 times the preferred lifetime.

·     The DHCPv6 server responds with a Reply message, informing the client whether the lease is renewed.

·     If the DHCPv6 client does not receive a response from any DHCPv6 server before the valid lifetime expires, the client stops using the address/prefix.

For more information about the valid lifetime and the preferred lifetime, see "Configuring basic IPv6 settings."

Stateless DHCPv6

Stateless DHCPv6 enables a device that has obtained an IPv6 address/prefix to get other configuration parameters from a DHCPv6 server.

The device performs stateless DHCPv6 if an RA message with the following flags is received from the router during stateless address autoconfiguration:

·     The managed address configuration flag (M flag) is set to 0.

·     The other stateful configuration flag (O flag) is set to 1.

Figure 5 Stateless DHCPv6 operation

 

As shown in Figure 5, stateless DHCPv6 operates in the following steps:

1.     The DHCPv6 client sends an Information-request message to the multicast address of all DHCPv6 servers and DHCPv6 relay agents. The Information-request message contains an Option Request option that specifies the requested configuration parameters.

2.     The DHCPv6 server returns to the client a Reply message containing the requested configuration parameters.

3.     The client checks the Reply message. If the obtained configuration parameters match those requested in the Information-request message, the client uses these parameters to complete configuration. If not, the client ignores the configuration parameters. If the client receives multiple replies with configuration parameters matching those requested in the Information-request message, it uses the first received reply.

DHCPv6 options

Option 18

Option 18, also called the interface-ID option, is used by the DHCPv6 relay agent to determine the interface to use to forward RELAY-REPLY message.

The DHCPv6 snooping device adds Option 18 to the received DHCPv6 request message before forwarding it to the DHCPv6 server. The server then assigns IP address to the client based on the client information in Option 18.

Figure 6 Option 18 format

 

Figure 6 shows the Option 18 format, which includes the following fields:

·     Option codeOption code. The value is 18.

·     Option length—Size of the option data.

·     Port index—Port that receives the DHCPv6 request from the client.

·     VLAN ID—ID of the outer VLAN.

·     Second VLAN ID—ID of the inner VLAN. This field is optional. If the received DHCPv6 request does not contain a second VLAN, Option 18 also does not contain it.

·     DUID—DUID of the DHCPv6 client.

Option 37

Option 37, also called the remote-ID option, is used to identify the client.

The DHCPv6 snooping device adds Option 37 to the received DHCPv6 request message before forwarding it to the DHCPv6 server. This option provides client information about address allocation.

Figure 7 Option 37 format

 

Figure 7 shows the Option 37 format, which includes the following fields:

·     Option code—Option code. The value is 37.

·     Option length—Size of the option data.

·     Enterprise number—Enterprise number.

·     Port index—Port that receives the DHCPv6 request from the client.

·     VLAN ID—ID of the outer VLAN.

·     Second VLAN ID—ID of the inner VLAN. This field is optional. If the received DHCPv6 request does not contain a second VLAN, Option 37 also does not contain it.

·     DUID—DUID of the DHCPv6 client.

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

·     RFC 3633, IPv6 Prefix Options for Dynamic Host Configuration Protocol (DHCP) version 6


Configuring the DHCPv6 server

About DHCPv6 server

A DHCPv6 server can assign IPv6 addresses, IPv6 prefixes, and other configuration parameters to DHCPv6 clients.

IPv6 address assignment

As shown in Figure 8, the DHCPv6 server assigns IPv6 addresses, domain name suffixes, DNS server addresses, and other configuration parameters to DHCPv6 clients.

The IPv6 addresses assigned to the clients include the following types:

·     Temporary IPv6 addresses—Frequently changed without lease renewal.

·     Non-temporary IPv6 addresses—Correctly used by DHCPv6 clients, with lease renewal.

Figure 8 IPv6 address assignment

 

IPv6 prefix assignment

As shown in Figure 9, the DHCPv6 server assigns an IPv6 prefix to the DHCPv6 client. The client advertises the prefix information in a multicast RA message so that hosts on the subnet can automatically configure their IPv6 addresses by using the prefix.

Figure 9 IPv6 prefix assignment

 

Concepts

Multicast addresses used by DHCPv6

DHCPv6 uses the multicast address FF05::1:3 to identify all site-local DHCPv6 servers. It uses the multicast address FF02::1:2 to identify all link-local DHCPv6 servers and relay agents.

DUID

A DHCP unique identifier (DUID) uniquely identifies a DHCPv6 device (DHCPv6 client, server, or relay agent). A DHCPv6 device adds its DUID in a sent packet.

Figure 10 DUID-LL format

 

The device supports the DUID format based on link-layer address (DUID-LL) defined in RFC 3315. Figure 10 shows the DUID-LL format, which includes the following fields:

·     DUID type—The device supports the DUID type of DUID-LL with the value of 0x0003.

·     Hardware type—The device supports the hardware type of Ethernet with the value of 0x0001.

·     Link layer address—Takes the value of the bridge MAC address of the device.

IA

Identified by an IAID, an identity association (IA) provides a construct through which a client manages the obtained addresses, prefixes, and other configuration parameters. A client can have multiple IAs, for example, one for each of its interfaces.

IAID

An IAID uniquely identifies an IA. It is chosen by the client and must be unique on the client.

PD

The DHCPv6 server creates a prefix delegation (PD) for each assigned prefix to record the following details:

·     IPv6 prefix.

·     Client DUID.

·     IAID.

·     Valid lifetime.

·     Preferred lifetime.

·     Lease expiration time.

·     IPv6 address of the requesting client.

DHCPv6 address pool

The DHCP server selects IPv6 addresses, IPv6 prefixes, and other parameters from an address pool, and assigns them to the DHCP clients.

Address allocation mechanisms

DHCPv6 supports the following address allocation mechanisms:

·     Static address allocation—To implement static address allocation for a client, create a DHCPv6 address pool, and manually bind the DUID and IAID of the client to an IPv6 address in the DHCPv6 address pool. When the client requests an IPv6 address, the DHCPv6 server assigns the IPv6 address in the static binding to the client.

·     Dynamic address allocation—To implement dynamic address allocation for clients, create a DHCPv6 address pool, specify a subnet for the pool, and divide the subnet into temporary and non-temporary IPv6 address ranges. Upon receiving a DHCP request, the DHCPv6 server selects an IPv6 address from the temporary or non-temporary IPv6 address range based on the address type in the client request.

Prefix allocation mechanisms

DHCPv6 supports the following prefix allocation mechanisms:

·     Static prefix allocation—To implement static prefix allocation for a client, create a DHCPv6 address pool, and manually bind the DUID and IAID of the client to an IPv6 prefix in the DHCPv6 address pool. When the client requests an IPv6 prefix, the DHCPv6 server assigns the IPv6 prefix in the static binding to the client.

·     Dynamic prefix allocation—To implement dynamic prefix allocation for clients, create a DHCPv6 address pool and a prefix pool, specify a subnet for the address pool, and apply the prefix pool to the address pool. Upon receiving a DHCP request, the DHCPv6 server dynamically selects an IPv6 prefix from the prefix pool in the address pool.

Address pool selection

The DHCPv6 server observes the following principles when selecting an IPv6 address or prefix for a client:

1.     If there is an address pool where an IPv6 address is statically bound to the DUID or IAID of the client, the DHCPv6 server selects this address pool. It assigns the statically bound IPv6 address or prefix and other configuration parameters to the client.

2.     If the receiving interface has a DHCP policy and the DHCP client matches a user class, the DHCP server selects the address pool that is bound to the matching user class. If no matching user class is found, the server assigns an IP address and other parameters from the default DHCP address pool. If no default address pool is specified or the default address pool does not have assignable IP addresses, the address assignment fails.

3.     If the receiving interface has an address pool applied, the DHCP server selects an IPv6 address or prefix and other configuration parameters from this address pool.

4.     If the above conditions are not met, the DHCPv6 server selects an address pool depending on the client location.

¡     Client on the same subnet as the server—The DHCPv6 server compares the IPv6 address of the receiving interface with the subnets of all address pools. It selects the address pool with the longest-matching subnet.

¡     Client on a different subnet than the server—The DHCPv6 server compares the IPv6 address of the DHCPv6 relay agent interface closest to the client with the subnets of all address pools. It also selects the address pool with the longest-matching subnet.

To make sure IPv6 address allocation functions correctly, keep the subnet used for dynamic assignment consistent with the subnet where the interface of the DHCPv6 server or DHCPv6 relay agent resides.

IPv6 address/prefix allocation sequence

The DHCPv6 server selects an IPv6 address/prefix for a client in the following sequence:

1.     IPv6 address/prefix statically bound to the client's DUID and IAID and expected by the client.

2.     IPv6 address/prefix statically bound to the client's DUID and IAID.

3.     IPv6 address/prefix statically bound to the client's DUID and expected by the client.

4.     IPv6 address/prefix statically bound to the client's DUID.

5.     Assignable IPv6 address/prefix in the address pool/prefix pool expected by the client.

6.     IPv6 address/prefix that was ever assigned to the client.

7.     Assignable IPv6 address/prefix in the address pool/prefix pool.

8.     IPv6 address/prefix that was a conflict or passed its lease duration. If no IPv6 address/prefix is assignable, the server does not respond.

If a client moves to another subnet, the DHCPv6 server selects an IPv6 address/prefix from the address pool that matches the new subnet.

Conflicted IPv6 addresses can be assigned to other DHCPv6 clients only after the addresses are in conflict for one hour.

DHCPv6 server tasks at a glance

To configure the DHCPv6 server, perform the following tasks:

1.     Configuring the DHCPv6 server to assign IPv6 prefixes, IPv6 addresses, and other network parameters

Choose the following tasks as needed:

¡     Configuring IPv6 prefix assignment

¡     Configuring IPv6 address assignment

¡     Configuring network parameters assignment

2.     Modifying the address pool selection method on the DHCPv6 server

Choose the following tasks as needed:

¡     Configuring the DHCPv6 server on an interface

¡     Configuring a DHCPv6 policy for IPv6 address and prefix assignment

3.     (Optional.) Setting the DSCP value for DHCPv6 packets sent by the DHCPv6 server

4.     (Optional.) Configuring DHCPv6 binding auto backup

5.     (Optional.) Advertising subnets assigned to clients

6.     (Optional.) Enabling DHCPv6 logging on the DHCPv6 server

Configuring IPv6 prefix assignment

About this task

Use the following methods to configure IPv6 prefix assignment:

·     Configure a static IPv6 prefix binding in an address pool—If you bind a DUID and an IAID to an IPv6 prefix, the DUID and IAID in a request must match those in the binding before the DHCPv6 server can assign the IPv6 prefix to the DHCPv6 client. If you only bind a DUID to an IPv6 prefix, the DUID in the request must match the DUID in the binding before the DHCPv6 server can assign the IPv6 prefix to the DHCPv6 client.

·     Apply a prefix pool to an address pool—The DHCPv6 server dynamically assigns an IPv6 prefix from the prefix pool in the address pool to a DHCPv6 client.

Restrictions and guidelines

When you configure IPv6 prefix assignment, follow these restrictions and guidelines:

·     An IPv6 prefix can be bound to only one DHCPv6 client. You cannot modify bindings that have been created. To change the binding for a DHCPv6 client, you must delete the existing binding first.

·     One address pool can have only one prefix pool applied. You cannot modify prefix pools that have been applied. To change the prefix pool for an address pool, you must remove the prefix pool application first.

·     You can apply a prefix pool that has not been created to an address pool. The setting takes effect after the prefix pool is created.

Procedure

1.     Enter system view.

system-view

2.     (Optional.) Specify the IPv6 prefixes excluded from dynamic assignment.

ipv6 dhcp server forbidden-prefix start-prefix/prefix-len [ end-prefix/prefix-len ]

By default, no IPv6 prefixes in the prefix pool are excluded from dynamic assignment.

If the excluded IPv6 prefix is in a static binding, the prefix still can be assigned to the client.

3.     Create a prefix pool.

ipv6 dhcp prefix-pool prefix-pool-number prefix { prefix-number | prefix/prefix-len } assign-len assign-len

This step is required for dynamic prefix assignment.

If you specify an IPv6 prefix by its ID, make sure the IPv6 prefix is in effect. Otherwise, the configuration does not take effect.

4.     Enter DHCP address pool view.

ipv6 dhcp pool pool-name

5.     Specify an IPv6 subnet for dynamic assignment.

network { prefix/prefix-length | prefix prefix-number [ sub-prefix/sub-prefix-length ] } [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]

By default, no IPv6 subnet is specified for dynamic assignment.

The IPv6 subnets cannot be the same in different address pools.

If you specify an IPv6 prefix by its ID, make sure the IPv6 prefix is in effect. Otherwise, the configuration does not take effect.

6.     Configure the prefix assignment. Choose the options to configure as needed:

¡     Configure a static prefix binding:

static-bind prefix prefix/prefix-len duid duid [ iaid iaid ] [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]

By default, no static prefix binding is configured.

To add multiple static IPv6 prefix bindings, repeat this step.

¡     Apply the prefix pool to the address pool:

prefix-pool prefix-pool-number [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]

By default, static or dynamic prefix assignment is not configured for an address pool.

Configuring IPv6 address assignment

About this task

Use one of the following methods to configure IPv6 address assignment:

·     Configure a static IPv6 address binding in an address pool.

If you bind a DUID and an IAID to an IPv6 address, the DUID and IAID in a request must match those in the binding before the DHCPv6 server can assign the IPv6 address to the requesting client. If you only bind a DUID to an IPv6 address, the DUID in a request must match the DUID in the binding before the DHCPv6 server can assign the IPv6 address to the requesting client.

·     Specify a subnet and address ranges in an address pool.

¡     Non-temporary address assignment—The server selects addresses from the non-temporary address range specified by the address range command. If no non-temporary address range is specified, the server selects addresses on the subnet specified by the network command.

¡     Temporary address assignment—The server selects addresses from the temporary address range specified by the temporary address range command. If no temporary address range is specified in the address pool, the DHCPv6 server cannot assign temporary addresses to clients.

Restrictions and guidelines

·     You can specify only one non-temporary address range and one temporary address range in an address pool.

·     The address ranges specified by the address range and temporary address range commands must be on the subnet specified by the network command. Otherwise, the addresses are unassignable.

·     An IPv6 address can be bound to only one DHCPv6 client. You cannot modify bindings that have been created. To change the binding for a DHCPv6 client, you must delete the existing binding first.

·     Only one subnet can be specified in an address pool. If you use the network command multiple times in a DHCPv6 address pool, the most recent configuration takes effect. If you use this command to specify only new lifetimes, the settings do not affect existing leases. The IPv6 addresses assigned after the modification will use the new lifetimes.

Procedure

1.     Enter system view.

system-view

2.     (Optional.) Specify the IPv6 addresses excluded from dynamic assignment.

ipv6 dhcp server forbidden-address start-ipv6-address [ end-ipv6-address ]

By default, all IPv6 addresses except for the DHCPv6 server's IP address in a DHCPv6 address pool are assignable.

If the excluded IPv6 address is in a static binding, the address still can be assigned to the client.

3.     Enter DHCPv6 address pool view.

ipv6 dhcp pool pool-name

4.     Specify an IPv6 subnet for dynamic assignment.

network { prefix/prefix-length | prefix prefix-number [ sub-prefix/sub-prefix-length ] } [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]

By default, no IPv6 address subnet is specified.

The IPv6 subnets cannot be the same in different address pools.

If you specify an IPv6 prefix by its ID, make sure the IPv6 prefix is in effect. Otherwise, the configuration does not take effect.

5.     (Optional.) Specify a non-temporary IPv6 address range.

address range start-ipv6-address end-ipv6-address [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]

By default, no non-temporary IPv6 address range is specified, and all unicast addresses on the subnet are assignable.

6.     (Optional.) Specify a temporary IPv6 address range.

temporary address range start-ipv6-address end-ipv6-address [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]

By default, no temporary IPv6 address range is specified, and the DHCPv6 server cannot assign temporary IPv6 addresses.

7.     (Optional.) Create a static binding.

static-bind address ipv6-address/addr-prefix-length duid duid [ iaid iaid ] [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]

By default, no static binding is configured.

To add more static bindings, repeat this step.

Configuring network parameters assignment

About network parameters assignment

In addition to IPv6 prefixes and IPv6 addresses, you can configure the following network parameters  in an address pool:

·     A maximum of eight DNS server addresses.

·     One domain name.

·     A maximum of eight SIP server addresses.

·     A maximum of eight SIP server domain names.

You can configure network parameters on a DHCPv6 server by using one of the following methods:

·     Configure network parameters in a DHCPv6 address pool.

·     Configure network parameters in a DHCPv6 option group, and specify the option group for a DHCPv6 address pool.

Network parameters configured in a DHCPv6 address pool take precedence over those configured in a DHCPv6 option group.

Configuring network parameters in a DHCPv6 address pool

1.     Enter system view.

system-view

2.     Enter DHCPv6 address pool view.

ipv6 dhcp pool pool-name

3.     Specify an IPv6 subnet for dynamic assignment.

network { prefix/prefix-length | prefix prefix-number [ sub-prefix/sub-prefix-length ] } [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]

By default, no IPv6 subnet is specified.

The IPv6 subnets cannot be the same in different address pools.

If you specify an IPv6 prefix by its ID, make sure the IPv6 prefix is in effect. Otherwise, the configuration does not take effect.

4.     Specify a DNS server address.

dns-server ipv6-address

By default, no DNS server address is specified.

5.     Specify a domain name.

domain-name domain-name

By default, no domain name is specified.

6.     Specify a SIP server address or domain name.

sip-server { address ipv6-address | domain-name domain-name }

By default, no SIP server address or domain name is specified.

7.     Configure a self-defined DHCPv6 option.

option code hex hex-string

By default, no self-defined DHCPv6 option is configured.

Configuring network parameters in a DHCPv6 option group

About this task

A DHCPv6 option group can be created by using the following methods:

·     Create a static DHCPv6 option group by using the ipv6 dhcp option-group command. The static DHCPv6 option group takes precedence over the dynamic DHCPv6 option group.

·     When the device acts as a DHCPv6 client, it automatically creates a dynamic DHCPv6 option group for saving the obtained parameters. For more information about creating a dynamic DHCPv6 option group, see "Configuring the DHCPv6 client."

Procedure

1.     Enter system view.

system-view

2.     Create a static DHCPv6 option group and enter its view.

ipv6 dhcp option-group option-group-number

3.     Specify a DNS server address.

dns-server ipv6-address

By default, no DNS server address is specified.

4.     Specify a domain name suffix.

domain-name domain-name

By default, no domain name suffix is specified.

5.     Specify a SIP server address or domain name.

sip-server { address ipv6-address | domain-name domain-name }

By default, no SIP server address or domain name is specified.

6.     Configure a self-defined DHCPv6 option.

option code hex hex-string

By default, no self-defined DHCPv6 option is configured.

7.     Return to system view.

quit

8.     Enter DHCPv6 address pool view.

ipv6 dhcp pool pool-name

9.     Specify a DHCPv6 option group.

option-group option-group-number

By default, no DHCPv6 option group is specified.

Configuring the DHCPv6 server on an interface

About this task

Enable the DHCP server and configure one of the following address/prefix assignment methods on an interface:

·     Apply an address pool on the interface—The DHCPv6 server selects an IPv6 address/prefix from the applied address pool for a requesting client. If there is no assignable IPv6 address/prefix in the address pool, the DHCPv6 server cannot to assign an IPv6 address/prefix to a client.

·     Configure global address assignment on the interface—The DHCPv6 server selects an IPv6 address/prefix in the global DHCPv6 address pool that matches the server interface address or the DHCPv6 relay agent address for a requesting client.

If you configure both methods on an interface, the DHCPv6 server uses the specified address pool for address assignment without performing global address assignment.

Restrictions and guidelines

·     An interface cannot act as a DHCPv6 server and DHCPv6 relay agent at the same time.

·     Do not enable DHCPv6 server and DHCPv6 client on the same interface.

·     You can apply an address pool that has not been created to an interface. The setting takes effect after the address pool is created.

Procedure

1.     Enter system view.

system-view

2.     Enter interface view.

interface interface-type interface-number

3.     Enable the DHCPv6 server on the interface.

ipv6 dhcp select server

By default, the interface does not act as a DHCP server or a DHCP relay agent, and discards DHCPv6 packets from DHCPv6 clients.

4.     Configure an assignment method.

¡     Configure global address assignment.

ipv6 dhcp server { allow-hint | preference preference-value | rapid-commit } *

By default, desired address/prefix assignment and rapid assignment are disabled, and the default preference is 0.

¡     Apply a DHCPv6 address pool to the interface.

ipv6 dhcp server apply pool pool-name [ allow-hint | preference preference-value | rapid-commit ] *

Configuring a DHCPv6 policy for IPv6 address and prefix assignment

About this task

In a DHCPv6 policy, each DHCPv6 user class has a bound DHCPv6 address pool. Clients matching different user classes obtain IPv6 addresses, IPv6 prefixes, and other parameters from different address pools. When receiving a DHCPv6 request, the DHCPv6 server compares the packet against the user classes in the order that they are configured.

If a match is found and the bound address pool has assignable IPv6 addresses or prefixes, the server uses the address pool for assignment. If the bound address pool does not have assignable IPv6 addresses or prefixes, the assignment fails.

If no match is found, the server uses the default DHCPv6 address pool for assignment. If no default address pool is specified or the default address pool does not have assignable IPv6 addresses or prefixes, the assignment fails.

For successful assignment, make sure the applied DHCPv6 policy and the bound address pools exist.

A match rule cannot match an option added by the DHCPv6 device, for example, Option 18 or Option 37.

Procedure

1.     Enter system view.

system-view

2.     Create a DHCPv6 user class and enter DHCPv6 user class view.

ipv6 dhcp class class-name

3.     Configure a match rule for the DHCPv6 user class.

if-match rule rule-number { option option-code [ ascii ascii-string [ offset offset | partial ] | hex hex-string [ mask mask | offset offset length length | partial ] ] | relay-agent gateway-ipv6-address }

By default, no match rule is configured for a DHCPv6 user class.

4.     Return to system view.

quit

5.     Create a DHCPv6 policy and enter DHCPv6 policy view.

ipv6 dhcp policy policy-name

The DHCPv6 policy takes effect only after it is applied to the interface that acts as the DHCPv6 server.

6.     Specify a DHCPv6 address pool for a DHCPv6 user class.

class class-name pool pool-name

By default, no address pool is specified for a user class.

7.     (Optional.) Specify the default DHCPv6 address pool.

default pool pool-name

By default, the default address pool is not specified.

8.     Return to system view.

quit

9.     Enter interface view.

interface interface-type interface-number

10.     Apply the DHCPv6 policy to the interface.

ipv6 dhcp apply-policy policy-name

By default, no DHCPv6 policy is applied to an interface.

Setting the DSCP value for DHCPv6 packets sent by the DHCPv6 server

About this task

The DSCP value of a packet specifies the priority level of the packet and affects the transmission priority of the packet.

Procedure

1.     Enter system view.

system-view

2.     Set the DSCP value for DHCPv6 packets sent by the DHCPv6 server.

ipv6 dhcp dscp dscp-value

By default, the DSCP value in DHCPv6 packets sent by the DHCPv6 server is 56.

Configuring DHCPv6 binding auto backup

About this task

The auto backup feature saves DHCPv6 bindings to a backup file, and allows the DHCPv6 server to download the bindings from the backup file at the server reboot. The bindings include the lease bindings and conflicted IPv6 addresses. They cannot survive a reboot on the DHCPv6 server.

The DHCPv6 server does not provide services during the download process. If a connection error occurs during the process and cannot be repaired in a short amount of time, you can terminate the download operation. Manual interruption allows the DHCPv6 server to provide services without waiting for the connection to be repaired.

Procedure

1.     Enter system view.

system-view

2.     Configure the DHCPv6 server to back up the bindings to a file.

ipv6 dhcp server database filename { filename | url url [ username username [ password { cipher | simple } string ] ] }

By default, the DHCPv6 server does not back up the DHCPv6 bindings.

With this command executed, the DHCPv6 server backs up its bindings immediately and runs auto backup.

3.     (Optional.) Manually save the DHCPv6 bindings to the backup file.

ipv6 dhcp server database update now

4.     (Optional.) Set the waiting time after a DHCPv6 binding change for the DHCPv6 server to update the backup file.

ipv6 dhcp server database update interval interval

By default, the DHCP server waits 300 seconds to update the backup file after a DHCP binding change. If no DHCP binding changes, the backup file is not updated.

5.     (Optional.) Terminate the download of DHCPv6 bindings from the backup file.

ipv6 dhcp server database update stop

This command only triggers one termination.

Advertising subnets assigned to clients

About this task

This feature enables the route management module to advertise subnets assigned to DHCPv6 clients. This feature achieves symmetric routing for traffic of the same host.

As shown in Figure 11, Router A and Router B act as both the DHCPv6 server and the BRAS device. The BRAS devices send accounting packets to the RADIUS server. To enable the BRAS devices to collect correct accounting information for each RADIUS user, configure the DHCPv6 server to advertise subnets assigned to clients. The upstream and downstream traffic of a RADIUS user will pass through the same BRAS device.

Figure 11 Network diagram

 

Restrictions and guidelines

The subnet advertising on the master device takes effect if the DHCPv6 address pool is bound to a VSRP instance. If the address pool is applied to a VPN instance, the VPN instance must exist.

Procedure

1.     Enter system view.

system-view

2.     Enter DHCP address pool view.

ipv6 dhcp pool pool-name

3.     Advertise the subnet that is assigned to DHCPv6 clients.

network { prefix/prefix-length | prefix prefix-number [ sub-prefix/sub-prefix-length ] } [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ] export-route

By default, the subnet assigned to DHCPv6 clients is not advertised.

Enabling DHCPv6 logging on the DHCPv6 server

About this task

The DHCPv6 logging feature enables the DHCPv6 server to generate DHCPv6 logs and send them to the information center. The information helps administrators locate and solve problems. For information about the log destination and output rule configuration in the information center, see Network Management and Monitoring Configuration Guide.

Restrictions and guidelines

As a best practice, disable this feature if the log generation affects the device performance or reduces the address and prefix allocation efficiency. For example, this situation might occur when a large number of clients frequently come online or go offline.

Procedure

1.     Enter system view.

system-view

2.     Enable DHCPv6 logging.

ipv6 dhcp log enable

By default, DHCPv6 logging is disabled.

Display and maintenance commands for DHCPv6 server

Execute display commands in any view and reset commands in user view.

 

Task

Command

Display the DUID of the local device.

display ipv6 dhcp duid

Display information about a DHCPv6 option group.

display ipv6 dhcp option-group [ option-group-number ]

Display DHCPv6 address pool information.

display ipv6 dhcp pool [ pool-name ]

Display prefix pool information.

display ipv6 dhcp prefix-pool [ prefix-pool-number ]

Display DHCPv6 server information on an interface.

display ipv6 dhcp server [ interface interface-type interface-number ]

Display information about IPv6 address conflicts.

display ipv6 dhcp server conflict [ address ipv6-address ]

Display information about DHCPv6 binding auto backup

display ipv6 dhcp server database

Display information about expired IPv6 addresses.

display ipv6 dhcp server expired [ address ipv6-address | pool pool-name ]

Display information about IPv6 address bindings.

display ipv6 dhcp server ip-in-use [ address ipv6-address | pool pool-name ]

Display information about IPv6 prefix bindings.

display ipv6 dhcp server pd-in-use [ pool pool-name | prefix prefix/prefix-len ]

Display packet statistics on the DHCPv6 server.

display ipv6 dhcp server statistics [ pool pool-name ]

Clear information about IPv6 address conflicts.

reset ipv6 dhcp server conflict [ address ipv6-address ]

Clear information about expired IPv6 address bindings.

reset ipv6 dhcp server expired [ address ipv6-address | pool pool-name ]

Clear information about IPv6 address bindings.

reset ipv6 dhcp server ip-in-use [ address ipv6-address | pool pool-name ]

Clear information about IPv6 prefix bindings.

reset ipv6 dhcp server pd-in-use [ pool pool-name | prefix prefix/prefix-len ]

Clear packets statistics on the DHCPv6 server.

reset ipv6 dhcp server statistics

 

DHCPv6 server configuration examples

Example: Configuring dynamic IPv6 address assignment

Network configuration

As shown in Figure 12, the AC acts as a DHCPv6 server to assign IPv6 addresses to the AP and DHCPv6 clients. The DHCPv6 server assigns an IPv6 address on subnet 1::1:0:0:0/96 to the AP and assigns IPv6 addresses on subnet 1::2:0:0:0/96 to the DHCPv6 clients.

Figure 12 Network diagram

Procedure

1.     Configure the interfaces on the DHCPv6 server:

# Assign an IPv6 address to VLAN-interface 10.

<AC> system-view

[AC] vlan 10

[AC-vlan10] quit

[AC] interface vlan-interface 10

[AC-Vlan-interface10] ipv6 address 1::1:0:0:1/96

# Disable RA message suppression on VLAN-interface 10.

[AC-Vlan-interface10] undo ipv6 nd ra halt

# Set the M flag to 1 in RA advertisements to be sent on VLAN-interface 10. Hosts that receive the RA advertisements will obtain IPv6 addresses through DHCPv6.

[AC-Vlan-interface10] ipv6 nd autoconfig managed-address-flag

# Set the O flag to 1 in RA advertisements to be sent on VLAN-interface 10. Hosts that receive the RA advertisements will obtain information other than IPv6 address through DHCPv6.

[AC-Vlan-interface10] ipv6 nd autoconfig other-flag

[AC-Vlan-interface10] quit

# Assign an IPv6 address to VLAN-interface 20.

[AC] vlan 20

[AC-vlan20] quit

[AC] interface vlan-interface 20

[AC-Vlan-interface20] ipv6 address 1::2:0:0:1/96

# Disable RA message suppression on VLAN-interface 20.

[AC-Vlan-interface20] undo ipv6 nd ra halt

# Set the M flag to 1 in RA advertisements to be sent on VLAN-interface 20. Hosts that receive the RA advertisements will obtain IPv6 addresses through DHCPv6.

[AC-Vlan-interface20] ipv6 nd autoconfig managed-address-flag

# Set the O flag to 1 in RA advertisements to be sent on VLAN-interface 20. Hosts that receive the RA advertisements will obtain information other than IPv6 address through DHCPv6.

[AC-Vlan-interface20] ipv6 nd autoconfig other-flag

[AC-Vlan-interface20] quit

2.     Assign the interface connected to the AP to VLAN 10.

[AC] interface gigabitethernet 1/0/2

[AC-GigabitEthernet1/0/2] port link-type trunk

[AC-GigabitEthernet1/0/2] port trunk permit vlan 10

[AC-GigabitEthernet1/0/2] port trunk pvid vlan 10

[AC-GigabitEthernet1/0/2] quit

3.     Configure wireless services:

# Configure a service template and bind VLAN 20 to the service template.

[AC] wlan service-template service

[AC-wlan-st-service] ssid service

[AC-wlan-st-service] vlan 20

[AC-wlan-st-service] service-template enable

[AC-wlan-st-service] quit

# Configure the AP.

[AC] wlan ap ap1 model WA4320i-ACN

[AC-wlan-ap-ap1] serial-id 219801A0CNC138011454

[AC-wlan-ap-ap1] radio 1

[AC-wlan-ap-ap1-radio-1] service-template service

[AC-wlan-ap-ap1-radio-1] radio enable

[AC-wlan-ap-ap1-radio-1] return

4.     Configure DHCPv6:

# Enable DHCPv6 server on VLAN-interface 10 and apply DHCPv6 address pool 1 to it.

[AC] interface vlan-interface 10

[AC-Vlan-interface10] ipv6 dhcp select server

[AC-Vlan-interface10] ipv6 dhcp server apply pool 1

[AC-Vlan-interface10] quit

# Enable DHCPv6 server on VLAN-interface 20 and apply DHCPv6 address pool 2 to it.

[AC] interface vlan-interface 20

[AC-Vlan-interface20] ipv6 dhcp select server

[AC-Vlan-interface20] ipv6 dhcp server apply pool 2

[AC-Vlan-interface20] quit

# Create DHCPv6 address pool 1, and specify network segment 1::1:0:0:0/96 and gateway address 1::1:0:0:1 for the pool.

[AC] ipv6 dhcp pool 1

[AC-dhcp6-pool-1] network 1::1:0:0:0/96

[AC-dhcp6-pool-1] gateway-list 1::1:0:0:1

[AC-dhcp6-pool-1] quit

# Create DHCPv6 address pool 2, and specify network segment 1::2:0:0:0/96 and gateway address 1::2:0:0:1 for the pool.

[AC] ipv6 dhcp pool 2

[AC-dhcp6-pool-2] network 1::2:0:0:0/96

[AC-dhcp6-pool-2] gateway-list 1::2:0:0:1

[AC-dhcp6-pool-2] quit

Verifying the configuration

# Verify that the AP on subnet 1::1:0:0:0/96 and the DHCPv6 clients on subnet 1::2:0:0:0/96 can obtain IPv6 addresses from the DHCPv6 server. (Details not shown.)

# On the DHCPv6 server, display IPv6 addresses assigned to the AP and DHCPv6 clients.

[AC] display ipv6 dhcp server ip-in-use


Configuring the DHCPv6 relay agent

About DHCPv6 relay agent

Typical application

A DHCPv6 client usually 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 13, if the DHCPv6 server resides on another subnet, the DHCPv6 clients need a DHCPv6 relay agent to contact the server. The relay agent feature avoids deploying a DHCPv6 server on each subnet.

Figure 13 Typical DHCPv6 relay agent application

 

DHCPv6 relay agent operating process

As shown in Figure 14, a DHCPv6 client obtains an IPv6 address and other network configuration parameters from a DHCPv6 server through a DHCPv6 relay agent. The following example uses rapid assignment to describe the process:

·     The DHCPv6 client sends a Solicit message containing the Rapid Commit option to the multicast address FF02::1:2 of all the DHCPv6 servers and relay agents.

·     After receiving the Solicit message, the DHCPv6 relay agent encapsulates the message into the Relay Message option of a Relay-forward message, and sends the message to the DHCPv6 server.

·     After obtaining the Solicit message from the Relay-forward message, the DHCPv6 server performs the following tasks:

¡     Selects an IPv6 address and other required parameters.

¡     Adds them to a reply that is encapsulated within the Relay Message option of a Relay-reply message.

¡     Sends the Relay-reply message to the DHCPv6 relay agent.

·     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 complete network configuration.

Figure 14 Operating process of a DHCPv6 relay agent

 

DHCPv6 relay agent tasks at a glance

To configure a DHCPv6 relay agent, perform the following tasks:

1.     Enabling the DHCPv6 relay agent on an interface

2.     Specifying DHCPv6 servers on the relay agent

3.     (Optional.) Specifying a gateway address for DHCPv6 clients

4.     (Optional.) Setting the DSCP value for DHCPv6 packets sent by the DHCPv6 relay agent

5.     (Optional.) Specifying a padding mode for the Interface-ID option

Enabling the DHCPv6 relay agent on an interface

Restrictions and guidelines

As a best practice, do not enable DHCPv6 relay agent and DHCPv6 client on the same interface.

Procedure

1.     Enter system view.

system-view

2.     Enter interface view.

interface interface-type interface-number

3.     Enable DHCPv6 relay agent on the interface.

ipv6 dhcp select relay

By default, the DHCPv6 relay agent is disabled on the interface.

Specifying DHCPv6 servers on the relay agent

Specifying DHCPv6 server IP addresses

Restrictions and guidelines

·     You can use the ipv6 dhcp relay server-address command to specify a maximum of eight DHCPv6 servers on the DHCPv6 relay agent interface. The DHCPv6 relay agent forwards DHCP requests to all the specified DHCPv6 servers.

·     If a DHCPv6 server address is a link-local address or multicast address, you must specify an outgoing interface by using the interface keyword in this command. Otherwise, DHCPv6 packets might fail to reach the DHCPv6 server.

Procedure

1.     Enter system view.

system-view

2.     Enter interface view.

interface interface-type interface-number

3.     Specify a DHCPv6 server.

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

By default, no DHCPv6 server is specified.

Specifying DHCPv6 servers for a DHCPv6 address pool on the DHCPv6 relay agent

About this task

This feature allows DHCPv6 clients of the same type to obtain IPv6 addresses, IPv6 prefixes, and other configuration parameters from the DHCPv6 servers in the matching DHCPv6 address pool.

It applies to scenarios where the DHCPv6 relay agent connects to clients of the same access type but classified into different types by their locations. In this case, the relay interface typically has no IPv6 address configured. Typical scenario is the IPoE access. You can use the gateway-list command to specify the gateway addresses for clients matching the same DHCPv6 address pool.

Upon receiving a DHCPv6 Solicit or Request from a client that matches a DHCPv6 address pool, the relay agent processes the packet as follows:

·     Fills the link-address field of the packet with a specified gateway address.

·     Forwards the packet to all DHCPv6 servers in the matching DHCPv6 address pool.

The DHCPv6 servers select a DHCPv6 address pool according to the gateway address.

Restrictions and guidelines

·     You can specify a maximum of eight DHCPv6 servers for one DHCPv6 address pool for high availability. The relay agent forwards DHCPv6 Solicit and Request packets to all DHCPv6 servers in the DHCPv6 address pool.

·     If this feature is used in the PPPoE scenario, execute the ipv6 dhcp relay client-information record command to enable the DHCPv6 relay agent to record relay entries. When a PPPoE user gets offline, the DHCPv6 relay agent locates the matching relay entry and sends a Release message to the DHCPv6 server.

·     If this feature is used in the PPPoE scenario, you do not need to execute the ipv6 dhcp select relay command. This is because the remote-server command is a must in this configuration task and it implies that this device is a relay device.

Procedure

1.     Enter system view.

system-view

2.     Create a DHCPv6 address pool and enter its view.

ipv6 dhcp pool pool-name

3.     Specify gateway addresses for the clients matching the DHCPv6 address pool.

gateway-list ipv6-address&<1-8>

By default, no gateway address is specified.

4.     Specify DHCPv6 servers for the DHCPv6 address pool.

remote-server ipv6-address [ interface interface-type interface-number ]

By default, no DHCPv6 server is specified for the DHCPv6 address pool.

Specifying a gateway address for DHCPv6 clients

About this task

By default, the DHCPv6 relay agent fills the link-address field of DHCPv6 Solicit and Request packets with the first IPv6 address of the relay interface. You can specify a gateway address on the relay agent for DHCPv6 clients. The DHCPv6 relay agent uses the specified gateway address to fill the link-address field of DHCPv6 Solicit and Request packets.

Procedure

1.     Enter system view.

system-view

2.     Enter interface view.

interface interface-type interface-number

3.     Specify a gateway address for DHCPv6 clients.

ipv6 dhcp relay gateway ipv6-address

By default, the DHCPv6 relay agent uses the first IPv6 address of the relay interface as the clients' gateway address.

Setting the DSCP value for DHCPv6 packets sent by the DHCPv6 relay agent

About this task

The DSCP value of a packet specifies the priority level of the packet and affects the transmission priority of the packet.

Procedure

1.     Enter system view.

system-view

2.     Set the DSCP value for DHCPv6 packets sent by the DHCPv6 relay agent.

ipv6 dhcp dscp dscp-value

The default DSCP value is 56.

Specifying a padding mode for the Interface-ID option

About this task

This feature enables the relay agent to fill the Interface-ID option in the specified mode. When receiving a DHCPv6 packet from a client, the relay agent fills the Interface-ID option in the mode and then forwards the packet to the DHCPv6 server.

Procedure

1.     Enter system view.

system-view

2.     Enter interface view.

interface interface-type interface-number

3.     Specify a padding mode for the Interface-ID option.

ipv6 dhcp relay interface-id { bas | interface }

By default, the relay agent fills the Interface-ID option with the interface index of the interface.

Display and maintenance commands for DHCPv6 relay agent

Execute display commands in any view and reset commands in user view.

 

Task

Command

Display the DUID of the local device.

display ipv6 dhcp duid

Display DHCPv6 server addresses specified on the DHCPv6 relay agent.

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

Display packet statistics on the DHCPv6 relay agent.

display ipv6 dhcp relay statistics [ interface interface-type interface-number ]

Clear packets statistics on the DHCPv6 relay agent.

reset ipv6 dhcp relay statistics [ interface interface-type interface-number ]

 

DHCPv6 relay agent configuration examples

Example: Configuring DHCPv6 relay agent

Network configuration

As shown in Figure 15, configure the DHCPv6 relay agent on the AC to relay DHCPv6 packets between DHCPv6 clients and the DHCPv6 server.

The AC 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 "Configuring basic IPv6 settings."

Figure 15 Network diagram

 

Procedure

# Configure basic settings on the AC. For more information, see WLAN access configuration in WLAN Configuration Guide.

# Assign IPv6 addresses to VLAN-interface 2 and VLAN-interface 3.

<AC> system-view

[AC] interface vlan-interface 2

[AC-Vlan-interface2] ipv6 address 2::1 64

[AC-Vlan-interface2] quit

[AC] interface vlan-interface 3

[AC-Vlan-interface3] ipv6 address 1::1 64

# Disable RA message suppression on VLAN-interface 3.

[AC-Vlan-interface3] undo ipv6 nd ra halt

# Set the M flag to 1 in RA advertisements to be sent on VLAN-interface 3. Hosts that receive the RA advertisements will obtain IPv6 addresses through DHCPv6.

[AC-Vlan-interface3] ipv6 nd autoconfig managed-address-flag

# Set the O flag to 1 in RA advertisements to be sent on VLAN-interface 3. Hosts that receive the RA advertisements will obtain information other than IPv6 address through DHCPv6.

[AC-Vlan-interface3] ipv6 nd autoconfig other-flag

# Enable the DHCPv6 relay agent on VLAN-interface 3 and specify the DHCPv6 server on the relay agent.

[AC-Vlan-interface3] ipv6 dhcp select relay

[AC-Vlan-interface3] ipv6 dhcp relay server-address 2::2

Verifying the configuration

# Display DHCPv6 server address information on the DHCPv6 relay agent.

[AC-Vlan-interface3] display ipv6 dhcp relay server-address

Interface: Vlan-interface3

 Server address                             Outgoing Interface

 2::2

# Display packet statistics on the DHCPv6 relay agent.

[AC-Vlan-interface3] display ipv6 dhcp relay statistics

Packets dropped               :  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


Configuring the DHCPv6 client

About the DHCPv6 client

With DHCPv6 client configured, an interface can obtain configuration parameters from the DHCPv6 server.

A DHCPv6 client can use DHCPv6 to complete the following functions:

·     Obtain an IPv6 address, an IPv6 prefix, or both, and obtain other configuration parameters. If DHCPv6 server is enabled on the device, the client can automatically save the obtained parameters to a DHCPv6 option group. With the obtained IPv6 prefix, the client can generate its global unicast address.

·     Support stateless DHCPv6 to obtain configuration parameters except IPv6 address and IPv6 prefix. The client obtains an IPv6 address through stateless IPv6 address autoconfiguration. If the client receives an RA message with the M flag set to 0 and the O flag set to 1 during address acquisition, stateless DHCPv6 starts.

Restrictions and guidelines: DHCPv6 client configuration

Do not configure the DHCPv6 client on the same interface as the DHCPv6 server or the DHCPv6 relay agent.

DHCPv6 client tasks at a glance

To configure a DHCPv6 client, perform the following tasks:

1.     (Optional.) Configuring the DHCPv6 client DUID

2.     Configuring the DHCPv6 client to obtain IPv6 addresses, IPv6 prefixes and other network parameters

Choose the following tasks as needed:

¡     Configuring IPv6 address acquisition

¡     Configuring IPv6 prefix acquisition

¡     Configuring IPv6 address and prefix acquisition

¡     Configuring acquisition of configuration parameters except IP addresses and prefixes

3.     (Optional.) Setting the DSCP value for DHCPv6 packets sent by the DHCPv6 client

Configuring the DHCPv6 client DUID

About this task

The DUID of a DHCPv6 client is the globally unique identifier of the client. The client pads its DUID into Option 1 of the DHCPv6 packet that it sends to the DHCPv6 server. The DHCPv6 server can assign specific IPv6 addresses or prefixes to DHCPv6 clients with specific DUIDs.

Restrictions and guidelines

Make sure the DUID that you configure is unique.

Procedure

1.     Enter system view.

system-view

2.     Enter interface view.

interface interface-type interface-number

3.     Configure the DHCPv6 client DUID.

ipv6 dhcp client duid { ascii ascii-string | hex hex-string | mac interface-type interface-number }

By default, the interface uses the device bridge MAC address to generate its DHCPv6 client DUID.

Configuring IPv6 address acquisition

1.     Enter system view.

system-view

2.     Enter interface view.

interface interface-type interface-number

3.     Configure the interface to use DHCPv6 to obtain an IPv6 address and other configuration parameters.

ipv6 address dhcp-alloc [ option-group group-number | rapid-commit ] *

By default, the interface does not use DHCPv6 for IPv6 address acquisition.

Configuring IPv6 prefix acquisition

1.     Enter system view.

system-view

2.     Enter interface view.

interface interface-type interface-number

3.     Configure the interface to use DHCPv6 to obtain an IPv6 prefix and other configuration parameters.

ipv6 dhcp client pd prefix-number [ option-group group-number | rapid-commit ] *

By default, the interface does not use DHCPv6 for IPv6 prefix acquisition.

Configuring IPv6 address and prefix acquisition

1.     Enter system view.

system-view

2.     Enter interface view.

interface interface-type interface-number

3.     Configure the interface to use DHCPv6 to obtain an IPv6 address, an IPv6 prefix, and other configuration parameters.

ipv6 dhcp client stateful prefix prefix-number [ option-group option-group-number | rapid-commit ] *

By default, the interface does not use DHCPv6 for IPv6 address and prefix acquisition.

Configuring acquisition of configuration parameters except IP addresses and prefixes

About this task

When a DHCPv6 client has obtained an IPv6 address and prefix, you can configure the following methods for the client to obtain other network configuration parameters:

·     Execute the ipv6 address auto command to enable an interface to automatically generate an IPv6 global unicast address and a link-local address. Then stateless DHCPv6 will be triggered when the M flag is set to 0 and the O flag is set to 1 in a received RA message. For more information about the commands, see Layer 3—IP services Command Reference.

·     Executing the ipv6 dhcp client stateless enable command on an interface to enable the interface to act as a DHCPv6 client to obtain configuration parameters from a DHCPv6 server.

If you execute both the ip address auto and ipv6 dhcp client stateless enable commands, the interface acts as follows:

·     Generate a global unicast address and a link-local address.

·     Obtain other configuration parameters from a DHCPv6 server.

Procedure

1.     Enter system view.

system-view

2.     Enter interface view.

interface interface-type interface-number

3.     Configure the interface to support stateless DHCPv6. Choose the options to configure as needed:

¡     Enable stateless IPv6 address autoconfiguration:

ipv6 address auto

¡     Configure the client to obtain network parameters from DHCPv6 servers:

ipv6 dhcp client stateless enable

By default, the interface does not support stateless DHCPv6.

Setting the DSCP value for DHCPv6 packets sent by the DHCPv6 client

About this task

The DSCP value of a packet specifies the priority level of the packet and affects the transmission priority of the packet.

Procedure

1.     Enter system view.

system-view

2.     Set the DSCP value for DHCPv6 packets sent by the DHCPv6 client.

ipv6 dhcp client dscp dscp-value

By default, the DSCP value in DHCPv6 packets sent by the DHCPv6 client is 56.

Display and maintenance commands for DHCPv6 client

Execute the display commands in any view, and execute the reset command in user view.

 

Task

Command

Display the DHCPv6 client information.

display ipv6 dhcp client [ interface interface-type interface-number ]

Display the DHCPv6 client statistics.

display ipv6 dhcp client statistics [ interface interface-type interface-number ]

Clear the DHCPv6 client statistics.

reset ipv6 dhcp client statistics [ interface interface-type interface-number ]

 

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网