Distributed VXLAN IPv6 gateway configuration example

Network requirements

As shown in Figure 20:

Figure 20: Network diagram

Configuration procedure

  1. On VM 1 and VM 2, specify 1::1 and 4::1 as the gateway address, respectively. (Details not shown.)

  2. Configure IP addresses and unicast routing settings:

    # Assign IP addresses to interfaces, as shown in Figure 20. (Details not shown.)

    # Configure OSPF on all transport network switches (switches A through D). (Details not shown.)

    # Configure OSPFv3 to advertise routes to networks 1::/64, 4::/64, and 3::/64 on Switch B and Switch E. (Details not shown.)

  3. Configure Switch A:

    # Enable L2VPN.

    <SwitchA> system-view
    [SwitchA] l2vpn enable
    

    # Set the VXLAN hardware resource mode.

    [SwitchA] hardware-resource vxlan l3gw16k
    

    # Create VSI vpna and VXLAN 10.

    [SwitchA] vsi vpna
    [SwitchA-vsi-vpna] vxlan 10
    [SwitchA-vsi-vpna-vxlan-10] quit
    [SwitchA-vsi-vpna] quit
    

    # Create VSI vpnb and VXLAN 20.

    [SwitchA] vsi vpnb
    [SwitchA-vsi-vpnb] vxlan 20
    [SwitchA-vsi-vpnb-vxlan-20] quit
    [SwitchA-vsi-vpnb] quit
    

    # Assign an IP address to Loopback 0. The IP address will be used as the source IP address of the VXLAN tunnels to Switch B and Switch C.

    [SwitchA] interface loopback 0
    [SwitchA-Loopback0] ip address 1.1.1.1 255.255.255.255
    [SwitchA-Loopback0] quit
    

    # Create a VXLAN tunnel to Switch B. The tunnel interface name is Tunnel 1.

    [SwitchA] interface tunnel 1 mode vxlan
    [SwitchA-Tunnel1] source 1.1.1.1
    [SwitchA-Tunnel1] destination 2.2.2.2
    [SwitchA-Tunnel1] quit
    

    # Create a VXLAN tunnel to Switch C. The tunnel interface name is Tunnel 2.

    [SwitchA] interface tunnel 2 mode vxlan
    [SwitchA-Tunnel2] source 1.1.1.1
    [SwitchA-Tunnel2] destination 3.3.3.3
    [SwitchA-Tunnel2] quit
    

    # Assign Tunnel 1 and Tunnel 2 to VXLAN 10.

    [SwitchA] vsi vpna
    [SwitchA-vsi-vpna] vxlan 10
    [SwitchA-vsi-vpna-vxlan-10] tunnel 1
    [SwitchA-vsi-vpna-vxlan-10] tunnel 2
    [SwitchA-vsi-vpna-vxlan-10] quit
    [SwitchA-vsi-vpna] quit
    

    # Assign Tunnel 1 and Tunnel 2 to VXLAN 20.

    [SwitchA] vsi vpnb
    [SwitchA-vsi-vpnb] vxlan 20
    [SwitchA-vsi-vpnb-vxlan-20] tunnel 1
    [SwitchA-vsi-vpnb-vxlan-20] tunnel 2
    [SwitchA-vsi-vpnb-vxlan-20] quit
    [SwitchA-vsi-vpnb] quit
    

    # On Ten-GigabitEthernet 1/0/1, create Ethernet service instance 1000 to match VLAN 2.

    [SwitchA] interface ten-gigabitethernet 1/0/1
    [SwitchA-Ten-GigabitEthernet1/0/1] service-instance 1000
    [SwitchA-Ten-GigabitEthernet1/0/1-srv1000] encapsulation s-vid 2
    

    # Map Ethernet service instance 1000 to VSI vpna.

    [SwitchA-Ten-GigabitEthernet1/0/1-srv1000] xconnect vsi vpna
    [SwitchA-Ten-GigabitEthernet1/0/1-srv1000] quit
    [SwitchA-Ten-GigabitEthernet1/0/1] quit
    

    # Enable dynamic ND entry synchronization for distributed VXLAN IP gateways.

    [SwitchA] ipv6 nd distributed-gateway dynamic-entry synchronize
    

    # Create VSI-interface 1 and assign the interface an IPv6 anycast address. The IP address will be used as the gateway address for VXLAN 10.

    [SwitchA] interface vsi-interface 1
    [SwitchA-Vsi-interface1] ipv6 address 1::1/64 anycast
    

    # Specify VSI-interface 1 as a distributed gateway and enable local ND proxy on the interface.

    [SwitchA-Vsi-interface1] distributed-gateway local
    [SwitchA-Vsi-interface1] local-proxy-nd enable
    [SwitchA-Vsi-interface1] quit
    

    # Specify VSI-interface 1 as the gateway interface for VSI vpna.

    [SwitchA] vsi vpna
    [SwitchA-vsi-vpna] gateway vsi-interface 1
    [SwitchA-vsi-vpna] quit
    

    # Create VSI-interface 2 and assign the interface an IPv6 anycast address. The IP address will be used as the gateway address for VXLAN 20.

    [SwitchA] interface vsi-interface 2
    [SwitchA-Vsi-interface2] ipv6 address 4::1/64 anycast
    

    # Specify VSI-interface 2 as a distributed gateway and enable local ND proxy on the interface.

    [SwitchA-Vsi-interface2] distributed-gateway local
    [SwitchA-Vsi-interface2] local-proxy-nd enable
    [SwitchA-Vsi-interface2] quit
    

    # Specify VSI-interface 2 as the gateway interface for VSI vpnb.

    [SwitchA] vsi vpnb
    [SwitchA-vsi-vpnb] gateway vsi-interface 2
    [SwitchA-vsi-vpnb] quit
    

    # Configure an IPv6 static route. Set the destination address to 3::/64 and the next hop to 1::2.

    [SwitchA] ipv6 route-static 3:: 64 1::2
    
  4. Configure Switch B:

    # Enable L2VPN.

    <SwitchB> system-view
    [SwitchB] l2vpn enable
    

    # Set the VXLAN hardware resource mode.

    [SwitchB] hardware-resource vxlan border24k
    

    # Create VSI vpna and VXLAN 10.

    [SwitchB] vsi vpna
    [SwitchB-vsi-vpna] vxlan 10
    [SwitchB-vsi-vpna-vxlan-10] quit
    [SwitchB-vsi-vpna] quit
    

    # Create VSI vpnb and VXLAN 20.

    [SwitchB] vsi vpnb
    [SwitchB-vsi-vpnb] vxlan 20
    [SwitchB-vsi-vpnb-vxlan-20] quit
    [SwitchB-vsi-vpnb] quit
    

    # Assign an IP address to Loopback 0. The IP address will be used as the source IP address of the VXLAN tunnels to Switch A and Switch C.

    [SwitchB] interface loopback 0
    [SwitchB-Loopback0] ip address 2.2.2.2 255.255.255.255
    [SwitchB-Loopback0] quit
    

    # Create a VXLAN tunnel to Switch A. The tunnel interface name is Tunnel 2.

    [SwitchB] interface tunnel 2 mode vxlan
    [SwitchB-Tunnel2] source 2.2.2.2
    [SwitchB-Tunnel2] destination 1.1.1.1
    [SwitchB-Tunnel2] quit
    

    # Create a VXLAN tunnel to Switch C. The tunnel interface name is Tunnel 3.

    [SwitchB] interface tunnel 3 mode vxlan
    [SwitchB-Tunnel3] source 2.2.2.2
    [SwitchB-Tunnel3] destination 3.3.3.3
    [SwitchB-Tunnel3] quit
    

    # Assign Tunnel 2 and Tunnel 3 to VXLAN 10.

    [SwitchB] vsi vpna
    [SwitchB-vsi-vpna] vxlan 10
    [SwitchB-vsi-vpna-vxlan-10] tunnel 2
    [SwitchB-vsi-vpna-vxlan-10] tunnel 3
    [SwitchB-vsi-vpna-vxlan-10] quit
    [SwitchB-vsi-vpna] quit
    

    # Assign Tunnel 2 and Tunnel 3 to VXLAN 20.

    [SwitchB] vsi vpnb
    [SwitchB-vsi-vpnb] vxlan 20
    [SwitchB-vsi-vpnb-vxlan-20] tunnel 2
    [SwitchB-vsi-vpnb-vxlan-20] tunnel 3
    [SwitchB-vsi-vpnb-vxlan-20] quit
    [SwitchB-vsi-vpnb] quit
    

    # Create VSI-interface 1 and assign the interface an IPv6 address.

    [SwitchB] interface vsi-interface 1
    [SwitchB-Vsi-interface1] ipv6 address 1::2/64
    [SwitchB-Vsi-interface1] quit
    

    # Create VSI-interface 2 and assign the interface an IPv6 address.

    [SwitchB] interface vsi-interface 2
    [SwitchB-Vsi-interface2] ipv6 address 4::2/64
    [SwitchB-Vsi-interface2] quit
    

    # Specify VSI-interface 1 as the gateway interface for VSI vpna.

    [SwitchB] vsi vpna
    [SwitchB-vsi-vpna] gateway vsi-interface 1
    [SwitchB-vsi-vpna] quit
    

    # Specify VSI-interface 2 as the gateway interface for VSI vpnb.

    [SwitchB] vsi vpnb
    [SwitchB-vsi-vpnb] gateway vsi-interface 2
    [SwitchB-vsi-vpnb] quit
    
  5. Configure Switch C:

    # Enable L2VPN.

    <SwitchC> system-view
    [SwitchC] l2vpn enable
    

    # Set the VXLAN hardware resource mode.

    [SwitchC] hardware-resource vxlan l3gw16k
    

    # Create VSI vpna and VXLAN 10.

    [SwitchC] vsi vpna
    [SwitchC-vsi-vpna] vxlan 10
    [SwitchC-vsi-vpna-vxlan-10] quit
    [SwitchC-vsi-vpna] quit
    

    # Create VSI vpnb and VXLAN 20.

    [SwitchC] vsi vpnb
    [SwitchC-vsi-vpnb] vxlan 20
    [SwitchC-vsi-vpnb-vxlan-20] quit
    [SwitchC-vsi-vpnb] quit
    

    # Assign an IP address to Loopback 0. The IP address will be used as the source IP address of the VXLAN tunnels to Switch A and Switch B.

    [SwitchC] interface loopback 0
    [SwitchC-Loopback0] ip address 3.3.3.3 255.255.255.255
    [SwitchC-Loopback0] quit
    

    # Create a VXLAN tunnel to Switch A. The tunnel interface name is Tunnel 1.

    [SwitchC] interface tunnel 1 mode vxlan
    [SwitchC-Tunnel1] source 3.3.3.3
    [SwitchC-Tunnel1] destination 1.1.1.1
    [SwitchC-Tunnel1] quit
    

    # Create a VXLAN tunnel to Switch B. The tunnel interface name is Tunnel 3.

    [SwitchC] interface tunnel 3 mode vxlan
    [SwitchC-Tunnel3] source 3.3.3.3
    [SwitchC-Tunnel3] destination 2.2.2.2
    [SwitchC-Tunnel3] quit
    

    # Assign Tunnel 1 and Tunnel 3 to VXLAN 10.

    [SwitchC] vsi vpna
    [SwitchC-vsi-vpna] vxlan 10
    [SwitchC-vsi-vpna-vxlan-10] tunnel 1
    [SwitchC-vsi-vpna-vxlan-10] tunnel 3
    [SwitchC-vsi-vpna-vxlan-10] quit
    [SwitchC-vsi-vpna] quit
    

    # Assign Tunnel 1 and Tunnel 3 to VXLAN 20.

    [SwitchC] vsi vpnb
    [SwitchC-vsi-vpnb] vxlan 20
    [SwitchC-vsi-vpnb-vxlan-20] tunnel 1
    [SwitchC-vsi-vpnb-vxlan-20] tunnel 3
    [SwitchC-vsi-vpnb-vxlan-20] quit
    [SwitchC-vsi-vpnb] quit
    

    # On Ten-GigabitEthernet 1/0/1, create Ethernet service instance 1000 to match VLAN 4.

    [SwitchC] interface ten-gigabitethernet 1/0/1
    [SwitchC-Ten-GigabitEthernet1/0/1] service-instance 1000
    [SwitchC-Ten-GigabitEthernet1/0/1-srv1000] encapsulation s-vid 4
    

    # Map Ethernet service instance 1000 to VSI vpnb.

    [SwitchC-Ten-GigabitEthernet1/0/1-srv1000] xconnect vsi vpnb
    [SwitchC-Ten-GigabitEthernet1/0/1-srv1000] quit
    [SwitchC-Ten-GigabitEthernet1/0/1] quit
    

    # Enable dynamic ND entry synchronization for distributed VXLAN IP gateways.

    [SwitchC] ipv6 nd distributed-gateway dynamic-entry synchronize
    

    # Create VSI-interface 1 and assign the interface an IPv6 anycast address. The IP address will be used as the gateway address for VXLAN 10.

    [SwitchC] interface vsi-interface 1
    [SwitchC-Vsi-interface1] ipv6 address 1::1/64 anycast
    

    # Specify VSI-interface 1 as a distributed gateway and enable local ND proxy on the interface.

    [SwitchC-Vsi-interface1] distributed-gateway local
    [SwitchC-Vsi-interface1] local-proxy-nd enable
    [SwitchC-Vsi-interface1] quit
    

    # Specify VSI-interface 1 as the gateway interface for VSI vpna.

    [SwitchC] vsi vpna
    [SwitchC-vsi-vpna] gateway vsi-interface 1
    [SwitchC-vsi-vpna] quit
    

    # Create VSI-interface 2 and assign the interface an IPv6 anycast address. The IP address will be used as the gateway address for VXLAN 20.

    [SwitchC] interface vsi-interface 2
    [SwitchC-Vsi-interface2] ipv6 address 4::1/64 anycast
    

    # Specify VSI-interface 2 as a distributed gateway and enable local ND proxy on the interface.

    [SwitchC-Vsi-interface2] distributed-gateway local
    [SwitchC-Vsi-interface2] local-proxy-nd enable
    [SwitchC-Vsi-interface2] quit
    

    # Specify VSI-interface 2 as the gateway interface for VSI vpnb.

    [SwitchC] vsi vpnb
    [SwitchC-vsi-vpnb] gateway vsi-interface 2
    [SwitchC-vsi-vpnb] quit
    

    # Configure an IPv6 static route. Set the destination address to 3::/64 and the next hop to 4::2.

    [SwitchC] ipv6 route-static 3:: 64 4::2
    

Verifying the configuration

  1. Verify the distributed VXLAN IP gateway settings on Switch A:

    # Verify that the VXLAN tunnel interfaces are up on Switch A.

    [SwitchA] display interface tunnel 2
    Tunnel2
    Current state: UP
    Line protocol state: UP
    Description: Tunnel2 Interface
    Bandwidth: 64 kbps
    Maximum transmission unit: 1464
    Internet protocol processing: Disabled
    Last clearing of counters: Never
    Tunnel source 1.1.1.1, destination 3.3.3.3
    Tunnel protocol/transport UDP_VXLAN/IP
    Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec
    Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec
    Input: 0 packets, 0 bytes, 0 drops
    Output: 0 packets, 0 bytes, 0 drops
    

    # Verify that the VSI interfaces are up.

    [SwitchA] display interface vsi-interface 1
    Vsi-interface1
    Current state: UP
    Line protocol state: UP
    Description: Vsi-interface1 Interface
    Bandwidth: 1000000 kbps
    Maximum transmission unit: 1444
    Internet protocol processing: Disabled
    IP packet frame type: Ethernet II, hardware address: 0011-2200-0102
    IPv6 packet frame type: Ethernet II, hardware address: 0011-2200-0102
    Physical: Unknown, baudrate: 1000000 kbps
    Last clearing of counters: Never
    Input (total):  0 packets, 0 bytes
    Output (total):  0 packets, 0 bytes
    

    # Verify that the VXLAN tunnels have been assigned to the VXLANs, and the VSI interfaces are the gateway interfaces for the VSIs.

    [SwitchA] display l2vpn vsi verbose
    VSI Name: vpna
      VSI Index               : 0
      VSI State               : Up
      MTU                     : 1500
      Bandwidth               : Unlimited
      Broadcast Restrain      : Unlimited
      Multicast Restrain      : Unlimited
      Unknown Unicast Restrain: Unlimited
      MAC Learning            : Enabled
      MAC Table Limit         : -
      MAC Learning rate       : -
      Drop Unknown            : -
      Flooding                : Enabled
      Statistics              : Disabled
      Gateway Interface       : VSI-interface 1
      VXLAN ID                : 10
      Tunnels:
        Tunnel Name          Link ID    State  Type        Flood proxy
        Tunnel1              0x5000001  Up     Manual      Disabled
        Tunnel2              0x5000002  Up     Manual      Disabled
      ACs:
         AC                               Link ID    State    Type
         XGE1/0/1 srv1000                 0          Up       Manual
    
    VSI Name: vpnb
      VSI Index               : 0
      VSI State               : Up
      MTU                     : 1500
      Bandwidth               : Unlimited
      Broadcast Restrain      : Unlimited
      Multicast Restrain      : Unlimited
      Unknown Unicast Restrain: Unlimited
      MAC Learning            : Enabled
      MAC Table Limit         : -
      MAC Learning rate       : -
      Drop Unknown            : -
      Flooding                : Enabled
      Statistics              : Disabled
      Gateway Interface       : VSI-interface 2
      VXLAN ID                : 20
      Tunnels:
        Tunnel Name          Link ID    State  Type        Flood proxy
        Tunnel1              0x5000001  Up     Manual      Disabled
        Tunnel2              0x5000002  Up     Manual      Disabled
    

    # Verify that Switch A has created neighbor entries for the VMs.

    [SwitchA] display ipv6 neighbors all
    Type: S-Static    D-Dynamic    O-Openflow     R-Rule    I-Invalid
    IPv6 address                   Link layer     VID  Interface      State T  Age
    1::2                           3c8c-400d-867a 0    Tunnel1        STALE D  7
    1::100                         0001-0000-0047 0    0              STALE D  22
    4::400                         0002-0000-0047 1    Tunnel2        REACH D  5
    FE80::201:FF:FE00:47           0001-0000-0047 0    Tunnel1        REACH D  30
    FE80::202:FF:FE00:0            0002-0000-0000 1    Tunnel2        REACH D  27
    FE80::202:FF:FE00:47           0002-0000-0047 0    0              DELAY D  5
    

    # Verify that Switch A has created FIB entries for the VMs.

    [SwitchA] display ipv6 fib 4::400
    Destination count: 1 FIB entry count: 1
    Flag:
      U:Usable    G:Gateway   H:Host   B:Blackhole   D:Dynamic   S:Static
      R:Relay     F:FRR
    Destination: 4::400                                         Prefix length: 128
    Nexthop    : 4::400                                         Flags: UH
    Time stamp : 0x2c                                           Label: Null
    Interface  : Tunnel2                                        Token: Invalid
    [SwitchA] display ipv6 fib 3::300
    Destination count: 1 FIB entry count: 1
    Flag:
      U:Usable    G:Gateway   H:Host   B:Blackhole   D:Dynamic   S:Static
      R:Relay     F:FRR
    Destination: 3::                                            Prefix length: 40
    Nexthop    : 1::2                                           Flags: USGR
    Time stamp : 0x23                                           Label: Null
    Interface  : Tunnel1                                        Token: Invalid
    
  2. Verify the configuration on the border gateway Switch B:

    # Verify that the VXLAN tunnel interfaces are up on Switch B.

    [SwitchB] display interface tunnel 2
    Tunnel2
    Current state: UP
    Line protocol state: UP
    Description: Tunnel2 Interface
    Bandwidth: 64 kbps
    Maximum transmission unit: 1464
    Internet protocol processing: Disabled
    Last clearing of counters: Never
    Tunnel source 2.2.2.2, destination 1.1.1.1
    Tunnel protocol/transport UDP_VXLAN/IP
    Last 300 seconds input rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec
    Last 300 seconds output rate: 0 bytes/sec, 0 bits/sec, 0 packets/sec
    Input: 0 packets, 0 bytes, 0 drops
    Output: 0 packets, 0 bytes, 0 drops
    

    # Verify that the VSI interfaces are up.

    [SwitchB] display interface Vsi-interface 1
    Vsi-interface1
    Current state: UP
    Line protocol state: UP
    Description: Vsi-interface1 Interface
    Bandwidth: 1000000 kbps
    Maximum transmission unit: 1444
    Internet protocol processing: Disabled
    IP packet frame type: Ethernet II, hardware address: 0011-2200-0102
    IPv6 packet frame type: Ethernet II, hardware address: 0011-2200-0102
    Physical: Unknown, baudrate: 1000000 kbps
    Last clearing of counters: Never
    Input (total):  0 packets, 0 bytes
    Output (total):  0 packets, 0 bytes
    

    # Verify that the VXLAN tunnels have been assigned to the VXLANs, and the VSI interfaces are the gateway interfaces for the VSIs.

    [SwitchB] display l2vpn vsi name vpna verbose
    VSI Name: vpna
      VSI Index               : 0
      VSI State               : Up
      MTU                     : 1500
      Bandwidth               : Unlimited
      Broadcast Restrain      : Unlimited
      Multicast Restrain      : Unlimited
      Unknown Unicast Restrain: Unlimited
      MAC Learning            : Enabled
      MAC Table Limit         : -
      MAC Learning rate       : -
      Drop Unknown            : -
      Flooding                : Enabled
      Statistics              : Disabled
      Gateway interface       : VSI-interface 1
      VXLAN ID                : 10
      Tunnels:
        Tunnel Name          Link ID    State  Type        Flood proxy
        Tunnel1              0x5000001  Up     Manual      Disabled
        Tunnel2              0x5000002  Up     Manual      Disabled
    

    # Verify that Switch B has created neighbor entries for the VMs.

    [SwitchB] display ipv6 neighbors all
    Type: S-Static    D-Dynamic    O-Openflow     R-Rule    I-Invalid
    IPv6 address                   Link layer     VID  Interface      State T  Age
    3::300                         0003-0000-0047 20   Vlan20         DELAY D  3
    FE80::203:FF:FE00:47           0003-0000-0047 20   Vlan20         STALE D  222
    1::100                         0001-0000-0047 0    Tunnel2        STALE D  232
    4::400                         0002-0000-0047 1    Tunnel3        REACH D  3
    FE80::201:FF:FE00:0            0001-0000-0000 0    Tunnel2        STALE D  237
    FE80::201:FF:FE00:47           0001-0000-0047 20   Vlan20         STALE D  222
    FE80::202:FF:FE00:0            0002-0000-0000 1    Tunnel3        STALE D  345
    

    # Verify that Switch B has created FIB entries for the VMs.

    [SwitchB] display ipv6 fib 1::100
    Destination count: 1 FIB entry count: 1
    Flag:
      U:Usable    G:Gateway   H:Host   B:Blackhole   D:Dynamic   S:Static
      R:Relay     F:FRR
    Destination: 1::100                                         Prefix length: 128
    Nexthop    : 1::100                                         Flags: UH
    Time stamp : 0x21                                           Label: Null
    Interface  : Tunnel2                                        Token: Invalid
    [SwitchB] display ipv6 fib 4::400
    Destination count: 1 FIB entry count: 1
    Flag:
      U:Usable    G:Gateway   H:Host   B:Blackhole   D:Dynamic   S:Static
      R:Relay     F:FRR
    Destination: 4::                                            Prefix length: 64
    Nexthop    : ::                                             Flags: U
    Time stamp : 0x19                                           Label: Null
    Interface  : Tunnel3                                        Token: Invalid
    
  3. Verify the network connectivity for the VMs:

    # Verify that VM 1 and VM 2 can ping each other. (Details not shown.)

    # Verify that VM 1, VM 2, and VLAN-interface 20 (3::300) on Switch E can ping each other. (Details not shown.)