04-Layer 3-IP Services Configuration Guide

HomeSupportResource CenterConfigure & DeployConfiguration GuidesH3C S12500-X & S12500X-AF Switch Series Configuration Guides(R115x)-6W10204-Layer 3-IP Services Configuration Guide
10-DHCPv6 configuration
Title Size Download
10-DHCPv6 configuration 342.60 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

Protocols and standards· 3

Configuring the DHCPv6 server 4

Overview·· 4

IPv6 address assignment 4

IPv6 prefix assignment 4

Concepts· 5

DHCPv6 address pool 6

IPv6 address/prefix allocation sequence· 7

Configuration task list 7

Configuring IPv6 prefix assignment 7

Configuration guidelines· 8

Configuration procedure· 8

Configuring IPv6 address assignment 8

Configuration guidelines· 9

Configuration procedure· 9

Configuring network parameters assignment 10

Configuring the DHCPv6 server on an interface· 10

Configuration guidelines· 11

Configuration procedure· 11

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

Displaying and maintaining the DHCPv6 server 12

DHCPv6 server configuration examples· 12

Dynamic IPv6 prefix assignment configuration example· 12

Dynamic IPv6 address assignment configuration example· 15

Configuring the DHCPv6 relay agent 18

Overview·· 18

DHCPv6 relay agent configuration task list 19

Enabling the DHCPv6 relay agent on an interface· 19

Specifying DHCPv6 servers on the relay agent 19

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

Displaying and maintaining the DHCPv6 relay agent 20

DHCPv6 relay agent configuration example· 20

Network requirements· 20

Configuration procedure· 21

Verifying the configuration· 21

Configuring the DHCPv6 client 23

Overview·· 23

Configuration restrictions and guidelines· 23

DHCPv6 client configuration task list 23

Configuring IPv6 address acquisition· 23

Configuring IPv6 prefix acquisition· 24

Configuring stateless DHCPv6· 24

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

Displaying and maintaining DHCPv6 client 25

DHCPv6 client configuration examples· 25

IPv6 address acquisition configuration example· 25

IPv6 prefix acquisition configuration example· 27

Stateless DHCPv6 configuration example· 28

 


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 by 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.

For more information about stateless address autoconfiguration, see "Configuring IPv6 basics."

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.

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

Overview

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

 

 

NOTE:

The term "interface" in this section collectively refers to VLAN interfaces and Layer 3 Ethernet interfaces. You can set an Ethernet port as a Layer 3 interface by using the port link-mode route command (see Layer 2—LAN Switching Configuration Guide).

 

IPv6 address assignment

As shown in Figure 6, 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 DHCP clients, with lease renewal.

Figure 6 IPv6 address assignment

 

IPv6 prefix assignment

As shown in Figure 7, 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 7 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 8 DUID-LL format

 

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

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

·          Hardware typeThe 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 allocationTo 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 allocationTo 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 allocationTo 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 allocationTo 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 an address pool applied, the DHCP server selects an IPv6 address or prefix and other configuration parameters from this address pool.

3.        If no static address pool is configured and no address pool is applied to the receiving interface, the DHCPv6 server selects an address pool depending on the client location.

¡  Client on the same subnet as the serverThe 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 serverThe 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 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.        IPv6 address/prefix that was ever assigned to the client.

6.        Assignable IPv6 address/prefix in the address pool/prefix pool expected by 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.

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

Configuration task list

Tasks at a glance

(Optional.) Perform the following tasks:

·         Configuring IPv6 prefix assignment

·         Configuring IPv6 address assignment

·         Configuring network parameters assignment

(Required.) Configuring the DHCPv6 server on an interface

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

 

Configuring IPv6 prefix assignment

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.

Configuration 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.

·          Only one prefix pool can be applied to an address pool. 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.

Configuration procedure

To configure IPv6 prefix assignment:

 

Step

Command

Remarks

1.       Enter system view.

system-view

N/A

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.

To exclude multiple IPv6 prefix ranges, repeat this step.

3.       Create a prefix pool.

ipv6 dhcp prefix-pool prefix-pool-number prefix prefix/prefix-len assign-len assign-len

This step is required for dynamic prefix assignment.

By default, no prefix pool is configured.

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

ipv6 dhcp pool pool-name

By default, no DHCPv6 address pool is configured.

5.       Specify an IPv6 subnet for dynamic assignment.

network prefix/prefix-length [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]

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

6.       Configure static or dynamic prefix assignment.

·         Configure a static prefix binding:
static-bind
prefix prefix/prefix-len duid duid [ iaid iaid ] [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]

·         Apply the prefix pool to the address pool:
prefix-pool
prefix-pool-number [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]

Use at least one command.

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

To add multiple static IPv6 prefix bindings, use the static-bind prefix command.

 

Configuring IPv6 address assignment

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.

Configuration 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.

·          Only one prefix pool can be applied to an address pool. 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.

·          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.

Configuration procedure

To configure IPv6 address assignment:

 

Step

Command

Remarks

1.       Enter system view.

system-view

N/A

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.

To exclude multiple IPv6 prefix ranges, repeat this step.

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

ipv6 dhcp pool pool-name

By default, no DHCPv6 address pool is configured.

4.       Specify an IPv6 subnet for dynamic assignment.

network prefix/prefix-length [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]

By default, no IPv6 address subnet is specified.

You cannot use this command to configure the same subnet in different address pools.

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

In addition to IPv6 prefixes and IPv6 addresses, you can configure up to eight DNS server addresses, one domain name suffix, eight SIP server addresses, and eight SIP server domain names in an address pool.

To configure network parameters assignment:

 

Step

Command

Remarks

1.       Enter system view.

system-view

N/A

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

ipv6 dhcp pool pool-name

By default, no DHCPv6 address pool exists on the DHCPv6 server.

3.       Specify an IPv6 subnet for dynamic assignment.

network prefix/prefix-length [ preferred-lifetime preferred-lifetime valid-lifetime valid-lifetime ]

By default, no IPv6 subnet is specified.

4.       (Optional.) Specify a DNS server address.

dns-server ipv6-address

By default, no DNS server address is specified.

5.       (Optional.) Specify a domain name suffix.

domain-name domain-name

By default, no domain name suffix is specified.

6.       (Optional.) 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.       (Optional.) Configure a self-defined DHCPv6 option.

option code hex hex-string

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

 

Configuring the DHCPv6 server on an interface

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

·          Apply an address pool on the interfaceThe 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 assign an IPv6 address/prefix to a client.

·          Configure global address assignment on the interfaceThe 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.

Configuration guidelines

·          If you use the ipv6 dhcp server command multiple times, the most recent configuration takes effect.

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

·          Only one address pool can be applied to an interface. If you use the ipv6 dhcp server apply pool command multiple times, the most recent configuration takes effect.

Configuration procedure

To configure the DHCPv6 server on an interface:

 

Step

Command

Remarks

1.       Enter system view.

system-view

N/A

2.       Enter interface view.

interface interface-type interface-number

N/A

3.       Enable the DHCPv6 server on the interface.

ipv6 dhcp select server

By default, the interface discards DHCPv6 packets from DHCPv6 clients.

4.       Configure an address/prefix assignment method.

·         Configure global address assignment:
ipv6 dhcp server
{ allow-hint | preference preference-value | rapid-commit } *

·         Apply a DHCPv6 address pool to the interface:
ipv6 dhcp server apply pool
pool-name [ allow-hint | preference preference-value | rapid-commit ] *

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

 

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

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

To set the DSCP value for DHCPv6 packets sent by the DHCPv6 server:

 

Step

Command

Remarks

1.       Enter system view.

system-view

N/A

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.

 

Displaying and maintaining the 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 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 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

Dynamic IPv6 prefix assignment configuration example

Network requirements

As shown in Figure 9, Switch acts as a DHCPv6 server to assign the IPv6 prefix, DNS server address, domain name, SIP server address, and SIP server name to each DHCPv6 client.

The switch assigns prefix 2001:0410:0201::/48 to the client whose DUID is 00030001CA0006A40000, and assigns prefixes ranging from 2001:0410::/48 to 2001:0410:FFFF::/48 (excluding 2001:0410:0201::/48) to other clients. The DNS server address is 2::2:3. The DHCPv6 clients reside in domain aaa.com. The SIP server address is 2:2::4, and the SIP server name is bbb.com.

Figure 9 Network diagram

 

Configuration procedure

# Specify an IPv6 address for VLAN-interface 2.

<Switch> system-view

[Switch] interface vlan-interface 2

[Switch-Vlan-interface2] ipv6 address 1::1/64

# Disable RA message suppression on VLAN-interface 2.

[Switch-Vlan-interface2] undo ipv6 nd ra halt

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

[Switch-Vlan-interface2] ipv6 nd autoconfig managed-address-flag

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

[Switch-Vlan-interface2] ipv6 nd autoconfig other-flag

[Switch-Vlan-interface2] quit

# Create prefix pool 1, and specify the prefix 2001:0410::/32 with the assigned prefix length 48.

[Switch] ipv6 dhcp prefix-pool 1 prefix 2001:0410::/32 assign-len 48

# Create address pool 1.

[Switch] ipv6 dhcp pool 1

# In address pool 1, configure subnet 1::/64 where VLAN interface-2 resides.

[Switch-dhcp6-pool-1] network 1::/64

# Apply prefix pool 1 to address pool 1, and set the preferred lifetime to one day, and the valid lifetime to three days.

[Switch-dhcp6-pool-1] prefix-pool 1 preferred-lifetime 86400 valid-lifetime 259200

# In address pool 1, bind prefix 2001:0410:0201::/48 to the client DUID 00030001CA0006A40000, and set the preferred lifetime to one day, and the valid lifetime to three days.

[Switch-dhcp6-pool-1] static-bind prefix 2001:0410:0201::/48 duid 00030001CA0006A40000 preferred-lifetime 86400 valid-lifetime 259200

# Configure the DNS server address 2:2::3.

[Switch-dhcp6-pool-1] dns-server 2:2::3

# Configure the domain name as aaa.com.

[Switch-dhcp6-pool-1] domain-name aaa.com

# Configure the SIP server address as 2:2::4, and the SIP server name as bbb.com.

[Switch-dhcp6-pool-1] sip-server address 2:2::4

[Switch-dhcp6-pool-1] sip-server domain-name bbb.com

[Switch-dhcp6-pool-1] quit

# Enable the DHCPv6 server on VLAN-interface 2, enable desired prefix assignment and rapid prefix assignment, and set the preference to the highest.

[Switch] interface vlan-interface 2

[Switch-Vlan-interface2] ipv6 dhcp select server

[Switch-Vlan-interface2] ipv6 dhcp server allow-hint preference 255 rapid-commit

Verifying the configuration

# Display DHCPv6 server configuration on VLAN-interface 2.

[Switch-Vlan-interface2] display ipv6 dhcp server interface vlan-interface 2

Using pool: global

Preference value: 255

Allow-hint: Enabled

Rapid-commit: Enabled

# Display information about address pool 1.

[Switch-Vlan-interface2] display ipv6 dhcp pool 1

DHCPv6 pool: 1

  Network: 1::/64

    Preferred lifetime 604800, valid lifetime 2592000

  Prefix pool: 1

    Preferred lifetime 86400, valid lifetime 259200

  Static bindings:

    DUID: 00030001ca0006a40000

    IAID: Not configured

    Prefix: 2001:410:201::/48

      Preferred lifetime 86400, valid lifetime 259200

  DNS server addresses:

    2:2::3

  Domain name:

    aaa.com

  SIP server addresses:

    2:2::4

  SIP server domain names:

    bbb.com          

# Display information about prefix pool 1.

[Switch-Vlan-interface2] display ipv6 dhcp prefix-pool 1

Prefix: 2001:410::/32

Assigned length: 48

Total prefix number: 65536

Available: 65535

In-use: 0

Static: 1

# After the client with the DUID 00030001CA0006A40000 obtains an IPv6 prefix, display the binding information on the DHCPv6 server.

[Switch-Vlan-interface2] display ipv6 dhcp server pd-in-use

Pool: 1

 IPv6 prefix                                 Type      Lease expiration

 2001:410:201::/48                           Static(C) Jul 10 19:45:01 2009

# After the other client obtains an IPv6 prefix, display binding information on the DHCPv6 server.

[Switch-Vlan-interface2] display ipv6 dhcp server pd-in-use

Pool: 1

 IPv6 prefix                                 Type      Lease expiration

 2001:410:201::/48                           Static(C) Jul 10 19:45:01 2009

 2001:410::/48                               Auto(C)   Jul 10 20:44:05 2009

Dynamic IPv6 address assignment configuration example

Network requirements

As shown in Figure 10, Switch A acts as a DHCPv6 server to assign IPv6 addresses to the clients in subnets 1::1:0:0:0/96 and 1::2:0:0:0/96. On Switch A, configure the IPv6 address for VLAN-interface 10 and 1::2:0:0:1/96 for VLAN-interface 20. The lease duration of the addresses on subnet 1::1:0:0:0/96 is 172800 seconds (two days), the valid time is 345600 seconds (four days), the domain name suffix is aabbcc.com, and the DNS server address is 1::1:0:0:2/96. The lease duration of the addresses on subnet 1::2:0:0:0/96 is 432000 seconds (five days), the valid time is 864000 seconds (ten days), the domain name is aabbcc.com, and the DNS server address is 1::2:0:0:2/96.

Figure 10 Network diagram

 

Configuration procedure

1.        Configure the interfaces on the DHCPv6 server:

# Specify an IPv6 address for VLAN-interface 10.

<SwitchA> system-view

[SwitchA] interface vlan-interface 10

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

# Disable RA message suppression on VLAN-interface 10.

[SwitchA-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.

[SwitchA-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.

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

[SwitchA-Vlan-interface10] quit

# Specify an IPv6 address for VLAN-interface 20.

[SwitchA] interface vlan-interface 20

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

# Disable RA message suppression on VLAN-interface 20.

[SwitchA-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.

[SwitchA-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.

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

[SwitchA-Vlan-interface20] quit

2.        Enable DHCPv6:

# Enable DHCPv6 server on VLAN-interface 10 and VLAN-interface 20.

<SwitchA> system-view

[SwitchA] interface vlan-interface 10

[SwitchA-Vlan-interface10] ipv6 dhcp select server

[SwitchA-Vlan-interface10] quit

[SwitchA] interface vlan-interface20

[SwitchA-Vlan-interface20] ipv6 dhcp select server

[SwitchA-Vlan-interface20] quit

# Exclude the DNS server address from dynamic assignment.

[SwitchA] ipv6 dhcp server forbidden-address 1::1:0:0:2

[SwitchA] ipv6 dhcp server forbidden-address 1::2:0:0:2

# Configure the DHCPv6 address pool 1 to assign IPv6 addresses and other configuration parameters to clients in subnet 1::1:0:0:0/96.

[SwitchA] ipv6 dhcp pool 1

[SwitchA-dhcp6-pool-1] network 1::1:0:0:0/96 preferred-lifetime 172800 valid-lifetime 345600

[SwitchA-dhcp6-pool-1] domain-name aabbcc.com

[SwitchA-dhcp6-pool-1] dns-server 1::1:0:0:2

[SwitchA-dhcp6-pool-1] quit

# Configure the DHCPv6 address pool 2 to assign IPv6 addresses and other configuration parameters to clients in subnet 1::2:0:0:0/96.

[SwitchA] ipv6 dhcp pool 2

[SwitchA-dhcp6-pool-2] network 1::2:0:0:0/96 preferred-lifetime 432000 valid-lifetime 864000

[SwitchA-dhcp6-pool-2] domain-name aabbcc.com

[SwitchA-dhcp6-pool-2] dns-server 1::2:0:0:2

[SwitchA-dhcp6-pool-2] quit

Verifying the configuration

# Verify that the clients on subnets 1::1:0:0:0/96 and 1::2:0:0:0/96 can obtain IPv6 addresses and all other configuration parameters from the DHCPv6 server (Switch A). (Details not shown.)

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

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


Configuring the DHCPv6 relay agent

The term "interface" in this section collectively refers to VLAN interfaces and Layer 3 Ethernet interfaces. You can set an Ethernet port as a Layer 3 interface by using the port link-mode route command (see Layer 2—LAN Switching Configuration Guide).

Overview

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 11, 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 DHCP server on each subnet.

Figure 11 Typical DHCPv6 relay agent application

 

As shown in Figure 12, 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 12 Operating process of a DHCPv6 relay agent

 

DHCPv6 relay agent configuration task list

Tasks at a glance

(Required.) Enabling the DHCPv6 relay agent on an interface

(Required.) Specifying DHCPv6 servers on the relay agent

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

 

Enabling the DHCPv6 relay agent on an interface

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.

ipv6 dhcp select relay

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

Do not enable the DHCPv6 relay agent and DHCPv6 client on the same interface.

 

Specifying DHCPv6 servers on the relay agent

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

To specify a DHCPv6 server on a 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.       Specify a DHCPv6 server.

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

By default, no DHCPv6 server is specified.

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.

 

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

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

To set the DSCP value for DHCPv6 packets sent by the DHCPv6 relay agent:

 

Step

Command

Remarks

1.       Enter system view.

system-view

N/A

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.

 

Displaying and maintaining the 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 example

Network requirements

As shown in Figure 13, configure the DHCPv6 relay agent on Switch A to relay DHCPv6 packets between DHCPv6 clients and the DHCPv6 server.

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

Figure 13 Network diagram

 

Configuration procedure

1.        Configure the DHCPv6 relay agent on Switch A:

# Specify IPv6 addresses for VLAN-interface 2 and VLAN-interface 3.

<SwitchA> system-view

[SwitchA] interface vlan-interface 2

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

[SwitchA-Vlan-interface2] quit

[SwitchA] interface vlan-interface 3

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

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

[SwitchA-Vlan-interface3] ipv6 dhcp select relay

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

2.        Enable Switch A to send RA messages, and turn on the M and O flags.

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

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

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

Verifying the configuration

# Display DHCPv6 server address information on Switch A.

[SwitchA-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.

[SwitchA-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

Overview

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, and other configuration parameters.

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

Configuration restrictions and guidelines

When you configure DHCPv6 client, follow these restrictions and guidelines:

·          The DHCPv6 client configuration is supported only on Layer 3 Ethernet interfaces, Layer 3 aggregate interfaces, management Ethernet interfaces, and VLAN interfaces.

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

DHCPv6 client configuration task list

Tasks at a glance

(Required.) Perform one of the following tasks:

·         Configuring IPv6 address acquisition

·         Configuring IPv6 prefix acquisition

·         Configuring stateless DHCPv6

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

Configuring IPv6 address acquisition

Step

Command

Remarks

1.       Enter system view.

system-view

N/A

2.       Enter interface view.

·         Layer 3 Ethernet interface:
interface interface-type interface-number

·         Layer 3 aggregate interface:
interface route-aggregation interface-number

·         Management Ethernet interface:
interface M-GigabitEthernet interface-number

·         VLAN interface:
interface vlan-interface interface-number

N/A

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

ipv6 address dhcp-alloc [ rapid-commit ]

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

 

Configuring IPv6 prefix acquisition

Step

Command

Remarks

1.       Enter system view.

system-view

N/A

2.       Enter interface view.

·         Layer 3 Ethernet interface:
interface interface-type interface-number

·         Layer 3 aggregate interface:
interface route-aggregation interface-number

·         Management Ethernet interface:
interface M-GigabitEthernet interface-number

·         VLAN interface:
interface vlan-interface interface-number

N/A

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

ipv6 dhcp client pd prefix-number [ rapid-commit ]

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

 

Configuring stateless DHCPv6

Step

Command

Remarks

1.       Enter system view.

system-view

N/A

2.       Enter interface view.

·         Layer 3 Ethernet interface:
interface interface-type interface-number

·         Layer 3 aggregate interface:
interface route-aggregation interface-number

·         Management Ethernet interface:
interface M-GigabitEthernet interface-number

·         VLAN interface:
interface vlan-interface interface-number

N/A

3.       Configure the interface to support stateless DHCPv6.

·         Enable stateless IPv6 address autoconfiguration:
ipv6 address auto

·         Enable stateless DHCPv6:
ipv6 dhcp client stateless enable

By default, the interface does not support stateless DHCPv6.

You can perform both tasks.

If you use only the ipv6 address auto command, make sure the M flag is set to 0 and the O flag is set to 1 in the RA message. Otherwise, stateless DHCPv6 cannot be triggered.

 

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

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

To set the DSCP value for DHCPv6 packets sent by the DHCPv6 client:

 

Step

Command

Remarks

1.       Enter system view.

system-view

N/A

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.

 

Displaying and maintaining 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 ]

 

DHCPv6 client configuration examples

IPv6 address acquisition configuration example

Network requirements

As shown in Figure 14, configure VLAN-interface 2 of Switch to use DHCPv6 to obtain configuration parameters from the DHCPv6 server. The parameters include IPv6 address, DNS server address, domain name suffix, SIP server address, and SIP server domain name.

Figure 14 Network diagram

 

Configuration procedure

You must configure the DHCPv6 server first before configuring the DHCPv6 client. For information about configuring DHCPv6 server, see "Configuring the DHCPv6 server."

# Configure VLAN-interface 2 to use DHCPv6 to obtain an IPv6 address and other configuration parameters. Configure the interface to support DHCPv6 rapid address assignment.

<Switch> system-view

[Switch] interface vlan-interface 2

[Switch-Vlan-interface2] ipv6 address dhcp-alloc rapid-commit

[Switch-Vlan-interface2] quit

Verifying the configuration

# Display the DHCPv6 client information. The output shows that the client has obtained an IPv6 address and other configuration parameters from the server.

[Switch] display ipv6 dhcp client

Vlan-interface2:

  Type: Stateful client requesting address

    State: OPEN

    IAID: 0xf0019

    Client DUID: 00030001000fe2ff0000

    Preferred server:

      Reachable via address: FE80::200:5EFF:FE0A:2303

      Server DUID: 00030001000fe20a0a00

    Address: 1:2::2

       Preferred lifetime 60 sec, valid lifetime 60 sec

       T1 30 sec, T2 48 sec

       Will expire on Feb 4 2013 at 15:37:20 (50 seconds left)

    DNS server addresses:

      2000::FF

    Domain name:

      example.com

    SIP server addresses:

      2:2::4

    SIP server domain names:

      bbb.com

# Display brief IPv6 information for all interfaces on the device. The output shows that the DHCPv6 client has obtained an IPv6 address..

[Switch] display ipv6 interface brief

*down: administratively down

(s): spoofing

Interface                                Physical   Protocol   IPv6 Address

Vlan-interface2                          up         up         1:2::2

IPv6 prefix acquisition configuration example

Network requirements

As shown in Figure 15, configure VLAN-interface 2 of Switch to use DHCPv6 to obtain configuration parameters from the DHCPv6 server. The parameters include IPv6 prefix, DNS server address, domain name suffix, SIP server address, and SIP server domain name.

Figure 15 Network diagram

 

Configuration procedure

You must configure the DHCPv6 server first before configuring the DHCPv6 client. For information about configuring DHCPv6 server, see "Configuring the DHCPv6 server."

# Configure an IPv6 address for VLAN-interface 2 that connects to the DHCPv6 server.

<Switch> system-view

[Switch] interface vlan-interface 2

[Switch-Vlan-interface2] ipv6 address 1::2/48

# Configure VLAN-interface 2 to use DHCPv6 to obtain an IPv6 prefix and other configuration parameters. Configure the interface to support DHCPv6 rapid prefix assignment. Enable the DHCPv6 client to assign an ID to the obtained IPv6 prefix.

[Switch-Vlan-interface2] ipv6 dhcp client pd 1 rapid-commit

[Switch-Vlan-interface2] quit

Verifying the configuration

# Display the DHCPv6 client information. The output shows that the client has obtained an IPv6 prefix and other configuration parameters from the DHCPv6 server.

[Switch] display ipv6 dhcp client

Vlan-interface2:

  Type: Stateful client requesting prefix

    State: OPEN

    IAID: 0xf0019

    Client DUID: 00030001000fe2ff0000

    Preferred server:

      Reachable via address: FE80::200:5EFF:FE0A:2303

      Server DUID: 00030001000fe20a0a00

    Prefix: 12:34::/32

      Preferred lifetime 90 sec, valid lifetime 90 sec

      T1 45 sec, T2 72 sec

      Will expire on Feb 4 2013 at 15:37:20 (80 seconds left)

    DNS server addresses:

      2000::FF

    Domain name:

      example.com

    SIP server addresses:

      2:2::4

    SIP server domain names:

      bbb.com

# Display information about the dynamic IPv6 prefix. The output shows that the client has obtained an IPv6 prefix.

[Switch] display ipv6 prefix 1

Number: 1

Type  : Dynamic

Prefix: 12:34::/32

Preferred lifetime 90 sec, valid lifetime 90 sec

Stateless DHCPv6 configuration example

Network requirements

As shown in Figure 16, configure VLAN-interface 2 on Switch A to use stateless DHCPv6 to obtain configuration parameters except IPv6 address and IPv6 prefix. Switch B acts as the gateway and advertises RA messages periodically.

Figure 16 Network diagram

 

Configuration procedure

You must configure the DHCPv6 server first before configuring the DHCPv6 client. For information about configuring DHCPv6 server, see "Configuring the DHCPv6 server."

1.        Configure the gateway Switch B.

# Configure an IPv6 address for VLAN-interface 2.

<SwitchB> system-view

[SwitchB] interface vlan-interface 2

[SwitchB-Vlan-interface2] ipv6 address 1::1 64

# Set the O flag in RA messages to 1.

[SwitchB-Vlan-interface2] ipv6 nd autoconfig other-flag

# Allow the interface to advertise RA messages.

[SwitchB-Vlan-interface2] undo ipv6 nd ra halt

2.        Configure the DHCPv6 client Switch A.

# Enable stateless IPv6 address autoconfiguration on VLAN-interface 2.

<SwitchA> system-view

[SwitchA] interface vlan-interface 2

[SwitchA-Vlan-interface2] ipv6 address auto

With stateless IPv6 address autoconfiguration enabled, but no IPv6 address configured for VLAN-interface 2, Switch A automatically generates a link local address. It sends an RS message to Switch B to request configuration information for IPv6 address generation. Upon receiving the RS message, Switch B sends back an RA message. After receiving an RA message with the M flag set to 0 and the O flag set to 1, Switch A performs stateless DHCPv6 to get other configuration parameters.

Verifying the configuration

# Display the DHCPv6 client information for VLAN-interface 2.

[SwitchA-Vlan-interface2] display ipv6 dhcp client interface vlan-interface 2

Vlan-interface2:

 Type: Stateless client

    State: OPEN

    IAID: 0xf0019

    Client DUID: 00030001000fe2ff0000

    Preferred server:

      Reachable via address: FE80::213:7FFF:FEF6:C818

      Server DUID: 0003000100137ff6c818

    DNS server addresses:

      1:2:4::5

      1:2:4::7

    Domain name:

      abc.com

# Display the DHCPv6 client statistics.

[SwitchA-Vlan-interface2] display ipv6 dhcp client statistics

Interface                     :  Vlan-interface2

Packets received              :  1

        Reply                 :  1

        Advertise             :  0

        Reconfigure           :  0

        Invalid               :  0

Packets sent                  :  5

        Solicit               :  0

        Request               :  0

        Renew                 :  0

        Rebind                :  0

        Information-request   :  5

        Release               :  0

        Decline               :  0

 

  • 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
新华三官网