Configuration procedure
Configuring Switch A:
# Enable IPv6 forwarding.
<SwitchA> system-view [SwitchA] ipv6
# Create VLAN 10.
[SwitchA] vlan 10 [SwitchA-vlan10] quit
# Assign port Ethernet 1/0/3 to VLAN 10.
[SwitchA] interface ethernet 1/0/3 [SwitchA-Ethernet1/0/3] port link-type trunk [SwitchA-Ethernet1/0/3] port trunk permit vlan 10 [SwitchA-Ethernet1/0/3] quit
# Assign an IPv6 address to VLAN-interface 10.
[SwitchA] interface vlan-interface 10 [SwitchA-Vlan-interface10] ipv6 address 10::1/64 [SwitchA-Vlan-interface10] quit
Configuring Switch B:
# Enable IPv6 forwarding.
<SwitchB> system-view [SwitchB] ipv6
# Create VLAN 10.
[SwitchB] vlan 10 [SwitchB-vlan10] quit
# Add ports Ethernet 1/0/1 through Ethernet 1/0/3 to VLAN 10.
[SwitchB] interface ethernet 1/0/1 [SwitchB-Ethernet1/0/1] port access vlan 10 [SwitchB-Ethernet1/0/1] quit [SwitchB] interface ethernet 1/0/2 [SwitchB-Ethernet1/0/2] port access vlan 10 [SwitchB-Ethernet1/0/2] quit [SwitchB] interface ethernet 1/0/3 [SwitchB-Ethernet1/0/3] port link-type trunk [SwitchB-Ethernet1/0/3] port trunk permit vlan 10 [SwitchB-Ethernet1/0/3] quit
# Enable ND snooping for global unicast and link local addresses in VLAN 10.
[SwitchB] ipv6 nd snooping enable link-local [SwitchB] ipv6 nd snooping enable global [SwitchB] vlan 10 [SwitchB-vlan 10] ipv6 nd snooping enable
# Enable ND detection in VLAN 10.
[SwitchB-vlan 10] ipv6 nd detection enable [SwitchB-vlan 10] quit
# Configure the uplink port Ethernet 1/0/3 as an ND-trusted port, and the downlink ports Ethernet 1/0/1 and Ethernet 1/0/2 as ND-untrusted ports (the default).
[SwitchB] interface ethernet 1/0/3 [SwitchB-Ethernet1/0/3] ipv6 nd detection trust
The configuration enables Switch B to check all incoming ND packets of ports Ethernet 1/0/1 and Ethernet 1/0/2 based on the ND snooping table.