Unicast-mode VXLAN configuration example

Network requirements

As shown in Figure 9:

Figure 9: Network diagram

Configuration procedure

  1. Configure IP addresses and unicast routing settings:

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

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

  2. Configure Switch A:

    # Enable L2VPN.

    <SwitchA> system-view
    [SwitchA] l2vpn enable
    

    # Create VSI vpna and VXLAN 10.

    [SwitchA] vsi vpna
    [SwitchA-vsi-vpna] vxlan 10
    [SwitchA-vsi-vpna-vxlan-10] quit
    [SwitchA-vsi-vpna] 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
    

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

    [SwitchA] interface 
    [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
    
  3. Configure Switch B:

    # Enable L2VPN.

    <SwitchB> system-view
    [SwitchB] l2vpn enable
    

    # Create VSI vpna and VXLAN 10.

    [SwitchB] vsi vpna
    [SwitchB-vsi-vpna] vxlan 10
    [SwitchB-vsi-vpna-vxlan-10] quit
    [SwitchB-vsi-vpna] 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
    

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

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

    # Map Ethernet service instance 1000 to VSI vpna.

    [SwitchB-Ten-GigabitEthernet1/0/1-srv1000] xconnect vsi vpna
    [SwitchB-Ten-GigabitEthernet1/0/1-srv1000] quit
    [SwitchB-Ten-GigabitEthernet1/0/1] quit
    
  4. Configure Switch C:

    # Enable L2VPN.

    <SwitchC> system-view
    [SwitchC] l2vpn enable
    

    # Create VSI vpna and VXLAN 10.

    [SwitchC] vsi vpna
    [SwitchC-vsi-vpna] vxlan 10
    [SwitchC-vsi-vpna-vxlan-10] quit
    [SwitchC-vsi-vpna] 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
    

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

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

    # Map Ethernet service instance 1000 to VSI vpna.

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

Verifying the configuration

  1. Verify the VXLAN settings on the VTEPs. This example uses Switch A.

    # Verify that the VXLAN tunnel interfaces on the VTEP are up.

    [SwitchA] display interface tunnel 1
    Tunnel1
    Current state: UP
    Line protocol state: UP
    Description: Tunnel1 Interface
    Bandwidth: 64 kbps
    Maximum transmission unit: 1464
    Internet protocol processing: Disabled
    Last clearing of counters: Never
    Tunnel source 1.1.1.1, destination 2.2.2.2
    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 VXLAN tunnels have been assigned to the VXLAN.

    [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
      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
    

    # Verify that the VTEP has learned the MAC addresses of remote VMs.

    <SwitchA> display l2vpn mac-address
    MAC Address      State    VSI Name                        Link ID/Name  Aging
    cc3e-5f9c-6cdb   Dynamic  vpna                            Tunnel1       Aging
    cc3e-5f9c-23dc   Dynamic  vpna                            Tunnel2       Aging
    --- 2 mac address(es) found  ---
    
  2. Verify that VM 1, VM 2, and VM 3 can ping each other. (Details not shown.)