Configuration procedure

  1. Configure Switch A:

    # Enable IPv6.

    <SwitchA> system-view
    [SwitchA] ipv6
    

    # Specify a global unicast address for VLAN-interface 2.

    [SwitchA] interface vlan-interface 2
    [SwitchA-Vlan-interface2] ipv6 address 3001::1/64
    [SwitchA-Vlan-interface2] quit
    

    # Specify a global unicast address for VLAN-interface 1, and allow it to advertise RA messages (no interface advertises RA messages by default).

    [SwitchA] interface vlan-interface 1
    [SwitchA-Vlan-interface1] ipv6 address 2001::1/64
    [SwitchA-Vlan-interface1] undo ipv6 nd ra halt
    [SwitchA-Vlan-interface1] quit
    
  2. Configure Switch B:

    # Enable IPv6.

    <SwitchB> system-view
    [SwitchB] ipv6
    

    # Configure a global unicast address for VLAN-interface 2.

    [SwitchB] interface vlan-interface 2
    [SwitchB-Vlan-interface2] ipv6 address 3001::2/64
    [SwitchB-Vlan-interface2] quit
    

    # Configure an IPv6 static route with destination IP address 2001::/64 and next hop address 3001::1.

    [SwitchB] ipv6 route-static 2001:: 64 3001::1
    
  3. Configure the host:

    # Enable IPv6 for Host to automatically obtain an IPv6 address through IPv6 ND.

    # On Switch A, use the ping ipv6 command to ping Switch B for the connectivity.

    [SwitchA] ping ipv6 3001::1
      PING 3001::1 : 56  data bytes, press CTRL_C to break
        Reply from 3001::1
        bytes=56 Sequence=0 hop limit=64  time = 3 ms
        Reply from 3001::1
        bytes=56 Sequence=1 hop limit=64  time = 2 ms
        Reply from 3001::1
        bytes=56 Sequence=2 hop limit=64  time = 2 ms
        Reply from 3001::1
        bytes=56 Sequence=3 hop limit=64  time = 3 ms
        Reply from 3001::1
        bytes=56 Sequence=4 hop limit=64  time = 9 ms
    
      --- 3001::1 ping statistics ---
        5 packet(s) transmitted
        5 packet(s) received
        0.00% packet loss
        round-trip min/avg/max = 2/3/9 ms
    

    # Display neighbor information about GigabitEthernet 1/0/2 on Switch A.

    [SwitchA] display ipv6 neighbors interface GigabitEthernet 1/0/2
                    Type: S-Static    D-Dynamic
    IPv6 Address                 Link-layer      VID  Interface    State T Age
    FE80::215:E9FF:FEA6:7D14      0015-e9a6-7d14  1     GE1/0/2         STALE D 1238
    2001::15B:E0EA:3524:E791      0015-e9a6-7d14  1     GE1/0/2         STALE D 1248
    

    The output shows that the IPv6 global unicast address that the host obtained is 2001::15B:E0EA:3524:E791.