5.3. DHCPv6 Relay Commands

5.3.1. dhcpv6 relay

Command Purpose

To enable the DHCPv6 relay service, use the dhcpv6 relay command in Global Config mode.

To disable this function, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

dhcpv6 relay

no dhcpv6 relay

Command Mode

Global Config

Default

DHCPv6 relay is disabled.

Usage

The DHCPv6 service must be enabled with the dhcpv6 service command before DHCPv6 relay service can be used.

Examples

The following example shows how to enable DHCPv6 relay agent:

Switch# configure terminal
Switch(config)# dhcpv6 relay

5.3.2. dhcpv6-server (global)

Command Purpose

To create a DHCPv6 server group, use the dhcpv6-server command in global configuration mode.

To remove a DHCPv6 server group, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

dhcpv6-server NUMBER IPV6_ADDR interface IFNAME

no dhcpv6-server NUMBER ( IPV6_ADDR ( interface IFNAME | ) | )

Parameter

Parameter Description

Parameter Value

NUMBER

Number of the DHCPv6 server group. The range is from 1 to 16

1-16

IPV6_ADDR

The IPv6 address list of the DHCPv6 server. The range in number of the servers in a list is 1 to 8

IPv6 address

IFNAME

The name of supported interface

- Supportphysical/aggregation/vlanports

Command Mode

Global Config

Default

No DHCPv6 server group is defined.

Usage

This command is used to specify the remote DHCPv6 server .

Examples

The following example shows how to configure dhcpv6-server group globally:

Switch# configure terminal
Switch(config)# dhcpv6-server 1 2001:1::1
Switch(config)# dhcpv6-server 1 fe80::1 interface vlan1

Related Commands

service dhcpv6

dhcpv6-server (interface)

5.3.3. dhcpv6-server (interface)

Command Purpose

To add an interface into a DHCPv6 server group, use the dhcpv6-server command in interface configuration mode.

To remove this interface from the DHCPv6 server group, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

dhcpv6-server NUMBER

no dhcpv6-server

Parameter

Parameter Description

Parameter Value

NUMBER

Number of the DHCPv6 server group.

1-16

Command Mode

Interface Configuration

Default

No DHCPv6 server group is configured for the interface.

Usage

This command is used to specify DHCPv6 server group which is configed by the command dhcpv6-server in global mode.

Examples

The following example shows how to configure dhcpv6-server group for interface:

Switch# configure terminal
Switch(config)# interface eth-0-1
Switch(config-if)# dhcpv6-server 1

Related Commands

service dhcpv6

5.3.4. dhcpv6 relay remote-id option

Command Purpose

To enable remote-id option, use the dhcpv6 relay remote-id option command in Global Config mode.

To disable remote-id option, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

dhcpv6 relay remote-id option

no dhcpv6 relay remote-id option

Command Mode

Global Config

Default

Remote-id option is not added into DHCPv6 RELAY_FORW packet sent by relay.

Usage

None

Examples

The following example shows how to enable remote-id option:

Switch# configure terminal
Switch(config)# dhcpv6 relay remote-id option

Related Commands

dhcpv6 relay remote-id format

5.3.5. dhcpv6 relay remote-id format

Command Purpose

To specify the format of remote-id , use the dhcpv6 relay remote-id format command in Global Config mode. To restore the default format, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

dhcpv6 relay remote-id format { vlan | ifname | duid }

no dhcpv6 relay remote-id format

Parameter

Parameter Description

Parameter Value

vlan

The ID of the vlan attached by client

-

ifname

The name of the interface received packet from client

-

duid

The duid of relay

-

Command Mode

Global Config

Default

The remote-id format is “duid:ifname:”.

Usage

The format of remote-id can be a combination of vlan, interface name, DUID. This command specifies the existing keywords in the combination.

Examples

The following example shows how to specify the format of remote-id:

Switch# configure terminal
Switch(config)# dhcpv6 relay remote-id format vlan

Related Commands

dhcpv6 relay remote-id option

5.3.6. dhcpv6 relay pd route

Command Purpose

To enable learning route from prefix-delegation option, use the dhcpv6 relay pd route command in Global Config.

To disable the function, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

dhcpv6 relay pd route

no dhcpv6 relay pd route

Command Mode

Global Config

Default

The DHCPv6 relay won’t learn prefix-delegation route.

Usage

The DHCPv6 relay can learn route from prefix delegated by server to client. This kind of route should not replace static one. Use this command to enable this function.

Examples

The following example shows how to enable learning route from prefix-delegation option:

Switch# configure terminal
Switch(config)# dhcpv6 relay pd route

Related Commands

clear dhcpv6 relay pd route

dhcpv6 relay pd route distance

5.3.7. dhcpv6 relay pd route distance

Command Purpose

To configure the default distance for route learned by relay, use the dhcpv6 relay pd route distance command in Global Config.

To restore the default value, use the no form of this command…

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

dhcpv6 relay pd route distance DISTANCE

no dhcpv6 relay pd route distance

Parameter

Parameter Description

Parameter Value

DISTANCE

The default distance for route learned by relay

1-255

Command Mode

Global Config

Default

The default value of distance is 254.

Usage

Use this command to configure the distance of the route learned by relay from prefix-delegation.

Examples

The following example shows how to configure the distance of route added by DHCPv6 relay:

Switch# configure terminal
Switch(config)# dhcpv6 relay pd route distance 233

Related Commands

dhcpv6 relay pd route

5.3.8. service dhcpv6

Command Purpose

To enable the Dynamic Host Configuration Protocol (DHCP)V6 relay agent features on your router, use the service dhcpv6 command in global configuration mode.

To disable the DHCPv6 relay agent features, use the no form of this command.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

service dhcpv6 enable

service dhcpv6 disable

Command Mode

Global Config

Default

DHCPv6 service is disabled globally.

Usage

Only the main DHCPv6 service is enabled by the service dhcpv6 command, other DHCPv6 services could be used, such as dhcpv6 relay.

Examples

The following example shows how to enable DHCPv6 service globally:

Switch# configure terminal
Switch(config)# service dhcpv6 enable

Related Commands

dhcpv6 relay

5.3.9. debug dhcpv6 relay

Command Purpose

Use this command to turn on the debug switches of DHCPv6 relay module.

To restore the default, use the no form of this command

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

debug dhcpv6 relay ( events | error | dump | packet | all )

no debug dhcpv6 relay ( events | error | dump | packet | all )

Parameter

Parameter Description

Parameter Value

events

Relay events

-

error

Error DHCP message

-

packet

DHCP message fields

-

dump

Dump message in hex format

-

all

Turn all debugging on

-

Command Mode

Privileged EXEC

Default

None

Usage

Use command “terminal monitor” to make debug messages print on the VTY immediately.

Use command “show logging buffer” to check the debug messages in the logging buffer.

Examples

The following is sample to open dhcpv6 relay debug switches:

Switch# debug dhcpv6 relay all

Related Commands

terminal monitor

show logging buffer

5.3.10. show dhcpv6-server

Command Purpose

To display the DHCPv6 server groups, use the show dhcpv6-server command in privileged EXEC mode.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show dhcpv6-server

Command Mode

Privileged EXEC

Default

None

Usage

This command is used to display all the DHCPv6 server groups configured with command dhcpv6-server in global mode.

Examples

The following example shows how to display dhcpv6-server group information:

Switch# show dhcpv6-server

DHCPv6 server group information:
============================================================
group 1 ipv6 address list:
[1] 2001:1::1

Related Commands

dhcpv6-server (global)

5.3.11. show dhcpv6 relay interfaces

Command Purpose

To display to which dhcpv6-server group the interface belongs, use the show dhcpv6 relay interfaces command in privileged EXEC mode.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show dhcpv6 relay interfaces

Command Mode

Privileged EXEC

Default

None

Usage

This command is used to display the interface which is confined DHCPv6 relay.

Examples

The following example shows how to display dhcpv6 relay interfaces information:

Switch# show dhcpv6 relay interfaces

List of DHCPv6 relay enabled interface(s):
DHCPv6 relay service status: enabled
Interface Name DHCPv6 server group
============================================================
eth-0-1 1

Related Commands

show dhcpv6-server

5.3.12. show dhcpv6 relay pd client

Command Purpose

To display the result of DHCPv6 relay’s prefix-delegation route function, use the show dhcpv6 relay pd client command in privileged EXEC mode.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show dhcpv6 relay pd client

Command Mode

Privileged EXEC

Default

None

Usage

None

Examples

The following example shows how to display information of prefix-delegation route:

Switch# show dhcpv6 relay pd client

DHCPv6 prefix-delegation client information:
============================================================
Interface : vlan2
Client DUID : 0001000117e9357b606da182030
Client IPv6 address : fe80::626d:a1ff:fe82:300
IA ID : a18230
IA Prefix : 2002:2:10::/64
prefered/max lifetime : 280/300
expired time : 2023-09-17 11:43:59
============================================================

Related Commands

dhcpv6 relay pd route

dhcpv6 relay pd route distance

5.3.13. show dhcpv6 relay statistics

Command Purpose

To display the statistics of DHCPv6 packets relayed by the switch, use the show dhcpv6 relay statistics command in privileged EXEC mode.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

show dhcpv6 relay statistics

Command Mode

Privileged EXEC

Default

None

Usage

This command is used to display detail DHCPv6 statistics which processed by the switch.

Examples

The following example shows how to display DHCPv6 relay statistics:

Switch# show dhcpv6 relay statistics

DHCPv6 relay packet statistics:
============================================================
Client relayed packets: 48
Server relayed packets: 48
Client error packets: 0
Server error packets: 0

Related Commands

clear dhcpv6 relay statistics

5.3.14. clear dhcpv6 relay statistics

Command Purpose

To reset the statistics of DHCPv6 packets relayed by the switch, use the clear dhcpv6 relay statistics command in privileged EXEC mode.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

clear dhcpv6 relay statistics

Command Mode

Privileged EXEC

Default

None

Usage

This command is used to reset DHCPv6 statistics.

Examples

The following example shows how to clear DHCPv6 relay statistics:

Switch# clear dhcpv6 relay statistics

Related Commands

show dhcpv6 relay statistics

5.3.15. clear dhcpv6 relay pd route

Command Purpose

To clear the route learned by DHCPv6 relay from prefix-delegation, use the clear dhcpv6 relay pd route command in privileged EXEC mode.

Prerequisites

Platform

Software

License

Comments

AQ-N3000

7.0

Base

AQ-N5000

7.0

Base

AQ-N6000

7.0

Base

Command Syntax

clear dhcpv6 relay pd route ( prefix PREFIX | ) ( interface IFNAME | ) ( IPV6_ADDR | )

Parameter

Parameter Description

Parameter Value

PREFIX

The prefix delegated to client

IPv6 Address and mask length in X:X::X:X/M format

IPV6_ADDR

The IPv6 address of PD client

IPv6 Address

IFNAME

The name of supported interface

Support physical/aggregation/vlan ports

Command Mode

Privileged EXEC

Default

None

Usage

If no parameter is specified, all route will be cleared.

Examples

The following example shows how to clear route learned by DHCPv6 relay:

Switch# clear dhcpv6 relay pd route interface eth-0-1

Related Commands

dhcpv6 relay pd route

show dhcpv6 relay pd client