Multicast-mode VXLAN configuration example

Network requirements

As shown in Figure 10:

Figure 10: Network diagram

Table 1: IP address assignment

Device

Interface

IP address

Device

Interface

IP address

Switch A:

Switch C:

VLAN-interface 11

11.1.1.1/24

VLAN-interface 13

13.1.1.3/24

Switch D:

Switch E:

VLAN-interface 11

11.1.1.4/24

VLAN-interface 13

13.1.1.5/24

VLAN-interface 21

21.1.1.4/24

VLAN-interface 23

23.1.1.5/24

Switch F:

Switch G:

VLAN-interface 21

21.1.1.6/24

VLAN-interface 12

12.1.1.7/24

VLAN-interface 22

22.1.1.6/24

VLAN-interface 22

22.1.1.7/24

VLAN-interface 23

23.1.1.6/24

Switch B:

Loop 0

6.6.6.6/32

VLAN-interface 12

12.1.1.2/24

Configuration procedure

  1. Configure IP addresses and unicast routing settings:

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

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

  2. Configure Switch A:

    # Enable L2VPN.

    <SwitchA> system-view
    [SwitchA] l2vpn enable
    

    # Enable IP multicast routing.

    [SwitchA] multicast routing
    [SwitchA-mrib] quit
    

    # 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 VLAN-interface 11, and enable the IGMP host feature on the interface. This interface's IP address will be the source IP address of VXLAN packets sent by the VTEP.

    [SwitchA] interface vlan-interface 11
    [SwitchA-Vlan-interface11] ip address 11.1.1.1 24
    [SwitchA-Vlan-interface11] igmp host enable
    [SwitchA-Vlan-interface11] quit
    

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

    [SwitchA] interface tunnel 1 mode vxlan
    [SwitchA-Tunnel1] source 11.1.1.1
    [SwitchA-Tunnel1] destination 12.1.1.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 11.1.1.1
    [SwitchA-Tunnel2] destination 13.1.1.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
    

    # Configure the multicast group address and source IP address for multicast VXLAN packets.

    [SwitchA-vsi-vpna-vxlan-10] group 225.1.1.1 source 11.1.1.1
    [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 ten-gigabitethernet 1/0/1
    [SwitchA-] service-instance 1000
    [SwitchA-Ten-GigabitEthernet1/0/1-srv1000] encapsulation s-vid 2
    

    # Map Ethernet service instance 1000 to VSI vpna.

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

    # Enable IP multicast routing.

    [SwitchB] multicast routing
    [SwitchB-mrib] quit
    

    # 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 VLAN-interface 12, and enable the IGMP host feature on the interface. This interface's IP address will be the source IP address of VXLAN packets sent by the VTEP.

    [SwitchB] interface vlan-interface 12
    [SwitchB-Vlan-interface12] ip address 12.1.1.2 24
    [SwitchB-Vlan-interface12] igmp host enable
    [SwitchB-Vlan-interface12] quit
    

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

    [SwitchB] interface tunnel 2 mode vxlan
    [SwitchB-Tunnel2] source 12.1.1.2
    [SwitchB-Tunnel2] destination 11.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 12.1.1.2
    [SwitchB-Tunnel3] destination 13.1.1.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
    

    # Configure the VXLAN multicast group address and the source IP address for VXLAN packets.

    [SwitchB-vsi-vpna-vxlan-10] group 225.1.1.1 source 12.1.1.2
    [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
    

    # Enable IP multicast routing.

    [SwitchC] multicast routing
    [SwitchC-mrib] quit
    

    # 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 VLAN-interface 13, and enable the IGMP host feature on the interface. This interface's IP address will be the source IP address of VXLAN packets sent by the VTEP.

    [SwitchC] interface vlan-interface 13
    [SwitchC-Vlan-interface13] ip address 13.1.1.3 24
    [SwitchC-Vlan-interface13] igmp host enable
    [SwitchC-Vlan-interface13] quit
    

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

    [SwitchC] interface tunnel 1 mode vxlan
    [SwitchC-Tunnel1] source 13.1.1.3
    [SwitchC-Tunnel1] destination 11.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 13.1.1.3
    [SwitchC-Tunnel3] destination 12.1.1.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
    

    # Configure the multicast group address and source IP address for VXLAN multicast packets.

    [SwitchC-vsi-vpna-vxlan-10] group 225.1.1.1 source 13.1.1.3
    [SwitchC-vsi-vpna-vxlan-10] quit
    [SwitchC-vsi-vpna] quit
    

    # On , create Ethernet service instance 1000 to match VLAN 2.

    [SwitchC] interface ten-gigabitethernet 1/0/1
    [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--srv1000] xconnect vsi vpna
    [SwitchC-Ten-GigabitEthernet1/0/1-srv1000] quit
    [SwitchC-Ten-GigabitEthernet1/0/1] quit
    
  5. Configure Switch D:

    # Enable IP multicast routing.

    <SwitchD> system-view
    [SwitchD] multicast routing
    [SwitchD-mrib] quit
    

    # Enable IGMP and PIM-SM on VLAN-interface 11.

    [SwitchD] interface vlan-interface 11
    [SwitchD-Vlan-interface11] igmp enable
    [SwitchD-Vlan-interface11] pim sm
    [SwitchD-Vlan-interface11] quit
    

    # Enable PIM-SM on VLAN-interface 21.

    [SwitchD] interface vlan-interface 21
    [SwitchD-Vlan-interface21] pim sm
    [SwitchD-Vlan-interface21] quit
    

    # Enable BIDIR-PIM.

    [SwitchD] pim
    [SwitchD-pim] bidir-pim enable
    [SwitchD-pim] quit
    
  6. Configure Switch E:

    # Enable IP multicast routing.

    <SwitchE> system-view
    [SwitchE] multicast routing
    [SwitchE-mrib] quit
    

    # Enable IGMP and PIM-SM on VLAN-interface 13.

    [SwitchE] interface vlan-interface 13
    [SwitchE-Vlan-interface13] igmp enable
    [SwitchE-Vlan-interface13] pim sm
    [SwitchE-Vlan-interface13] quit
    

    # Enable PIM-SM on VLAN-interface 23.

    [SwitchE] interface vlan-interface 23
    [SwitchE-Vlan-interface23] pim sm
    [SwitchE-Vlan-interface23] quit
    

    # Enable BIDIR-PIM.

    [SwitchE] pim
    [SwitchE-pim] bidir-pim enable
    [SwitchE-pim] quit
    
  7. Configure Switch F:

    # Enable IP multicast routing.

    <SwitchF> system-view
    [SwitchF] multicast routing
    [SwitchF-mrib] quit
    

    # Enable PIM-SM on VLAN-interface 21, VLAN-interface 22, VLAN-interface 23, and Loopback 0.

    [SwitchF] interface vlan-interface 21
    [SwitchF-Vlan-interface21] pim sm
    [SwitchF-Vlan-interface21] quit
    [SwitchF] interface vlan-interface 22
    [SwitchF-Vlan-interface22] pim sm
    [SwitchF-Vlan-interface22] quit
    [SwitchF] interface vlan-interface 23
    [SwitchF-Vlan-interface23] pim sm
    [SwitchF-Vlan-interface23] quit
    [SwitchF] interface loopback 0
    [SwitchF-LoopBack0] pim sm
    [SwitchF-LoopBack0] quit
    

    # Enable BIDIR-PIM.

    [SwitchF] pim
    [SwitchF-pim] bidir-pim enable
    

    # Configure VLAN-interface 22 as a candidate-BSR, and configure Loopback 0 as a candidate-RP for BIDIR-PIM.

    [SwitchF-pim] c-bsr 22.1.1.6
    [SwitchF-pim] c-rp 6.6.6.6 bidir
    [SwitchF-pim] quit
    
  8. Configure Switch G:

    # Enable IP multicast routing.

    <SwitchG> system-view
    [SwitchG] multicast routing
    [SwitchG-mrib] quit
    

    # Enable IGMP and PIM-SM on VLAN-interface 12.

    [SwitchG] interface vlan-interface 12
    [SwitchG-Vlan-interface12] igmp enable
    [SwitchG-Vlan-interface12] pim sm
    [SwitchG-Vlan-interface12] quit
    

    # Enable PIM-SM on VLAN-interface 22.

    [SwitchG] interface vlan-interface 22
    [SwitchG-Vlan-interface22] pim sm
    [SwitchG-Vlan-interface22] quit
    

    # Enable BIDIR-PIM.

    [SwitchG] pim
    [SwitchG-pim] bidir-pim enable
    [SwitchG-pim] 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 11.1.1.1, destination 12.1.1.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
        MTunnel0             0x6000000  Up     Auto        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  ---
    

    # Verify that the VTEP has joined the VXLAN multicast group on VLAN-interface 11.

    <SwitchA> display igmp host group
    IGMP host groups in total: 1
     Vlan-interface11(11.1.1.1):
      IGMP host groups in total: 1
       Group address      Member state      Expires
       225.1.1.1          Idle              Off
    
  2. Verify that VM 1, VM 2, and VM 3 can ping each other. (Details not shown.)