ND snooping configuration example

Network requirements

As shown in Figure 63, Host A and Host B are connected to the gateway through Device B. Enable ND snooping on Device B to learn ND snooping entries about Host A and Host B.

Figure 63: Network diagram

Configuration procedure

  1. Configure Device A:

    # Create VLAN 10.

    <DeviceA> system-view
    [DeviceA] vlan 10
    [DeviceA-vlan10] quit
    

    # Configure to trunk VLAN 10.

    [DeviceA] interface 
    [DeviceA-] port link-type trunk
    [DeviceA-] port trunk permit vlan 10
    [DeviceA-] quit
    

    # Assign IPv6 address 10::1/64 to VLAN-interface 10.

    [DeviceA] interface vlan-interface 10
    [DeviceA-Vlan-interface10] ipv6 address 10::1/64
    [DeviceA-Vlan-interface10] quit
    
  2. Configure Device B:

    # Create VLAN 10.

    [DeviceB] vlan 10
    [DeviceB-vlan10] quit
    

    # Configure , , and to trunk VLAN 10.

    [DeviceB] interface 
    [DeviceB-] port link-type access
    [DeviceB-] port access vlan 10
    [DeviceB-] quit
    [DeviceB] interface 
    [DeviceB-] port link-type access
    [DeviceB-] port access vlan 10
    [DeviceB-] quit
    [DeviceB] interface 
    [DeviceB-] port link-type trunk
    [DeviceB-] port trunk permit vlan 10
    [DeviceB-] quit
    

    # Enable ND snooping for global unicast addresses and link-local addresses in VLAN 10.

    [DeviceB] vlan 10
    [DeviceB-vlan10] ipv6 nd snooping enable global
    [DeviceB-vlan10] ipv6 nd snooping enable link-local
    

    # Enable ND snooping for data packets from unknown sources in VLAN 10.

    [DeviceB-vlan10] ipv6 nd snooping glean source
    [DeviceB-vlan10] quit
    

    # Configure as ND trusted interface.

    [DeviceB] interface 
    [DeviceB-] ipv6 nd detection trust
    [DeviceB-] quit
    

    # Configure to learn a maximum number of 200 ND snooping entries.

    [DeviceB] interface 
    [DeviceB-] ipv6 nd snooping max-learning-num 200
    [DeviceB-] quit
    

    # Configure to learn a maximum number of 200 ND snooping entries.

    [DeviceB] interface 
    [DeviceB-] ipv6 nd snooping max-learning-num 200
    [DeviceB-] quit
    

Verifying the configuration

# Verify that Device B has learned ND snooping entries for Host A and Host B.

[DeviceB] display ipv6 nd snooping vlan 10
IPv6 address              MAC address     VID  Interface     Status       Age
10::5                     0001-0203-0405  10   GE1/0/1       VALID        157
10::6                     0001-0203-0607  10   GE1/0/2       VALID        105