Configuration procedure
Configure IP addresses and unicast routing settings:
# Assign IP addresses to interfaces, as shown in Figure 23. (Details not shown.)
# Configure OSPF on Switches A through E. (Details not shown.)
# Configure OSPF to advertise routes to networks 10.1.1.0/24 and 10.1.2.0/24 on Switch B and Switch D. (Details not shown.)
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
# 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 tunnel to Switch B.
[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
# Assign Tunnel 1 to VXLAN 10.
[SwitchA] vsi vpna [SwitchA-vsi-vpna] vxlan 10 [SwitchA-vsi-vpna-vxlan-10] tunnel 1 [SwitchA-vsi-vpna-vxlan-10] quit [SwitchA-vsi-vpna] quit
# Assign Tunnel 1 to VXLAN 20.
[SwitchA] vsi vpnb [SwitchA-vsi-vpnb] vxlan 20 [SwitchA-vsi-vpnb-vxlan-20] tunnel 1 [SwitchA-vsi-vpnb-vxlan-20] quit [SwitchA-vsi-vpnb] quit
# On Ten-GigabitEthernet 1/0/1, create Ethernet service instance 1000 to match VLAN 100.
[SwitchA] interface ten-gigabitethernet 1/0/1 [SwitchA-] service-instance 1000 [SwitchA-Ten-GigabitEthernet1/0/1-srv1000] encapsulation s-vid 100
# Map Ethernet service instance 1000 on Ten-GigabitEthernet 1/0/1 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
# On Ten-GigabitEthernet 1/0/2, create Ethernet service instance 1000 to match VLAN 200.
[SwitchA] interface ten-gigabitethernet 1/0/2 [SwitchA-Ten-GigabitEthernet1/0/2] service-instance 1000 [SwitchA-Ten-GigabitEthernet1/0/2-srv1000] encapsulation s-vid 200
# Map Ethernet service instance 1000 on Ten-GigabitEthernet 1/0/2 to VSI vpnb.
[SwitchA--srv1000] xconnect vsi vpnb [SwitchA-Ten-GigabitEthernet1/0/2-srv1000] quit [SwitchA-Ten-GigabitEthernet1/0/2] quit
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 tunnel to Switch A and the VXLAN-DCI tunnel to Switch D.
[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 1.
[SwitchB] interface tunnel 1 mode vxlan [SwitchB-Tunnel1] source 2.2.2.2 [SwitchB-Tunnel1] destination 1.1.1.1 [SwitchB-Tunnel1] quit
# Create a VXLAN-DCI tunnel to Switch D. The tunnel interface name is Tunnel 2.
[SwitchB] interface tunnel 2 mode vxlan-dci [SwitchB-Tunnel2] source 2.2.2.2 [SwitchB-Tunnel2] destination 3.3.3.3 [SwitchB-Tunnel2] quit
# Assign Tunnel 1 and Tunnel 2 to VXLAN 10.
[SwitchB] vsi vpna [SwitchB-vsi-vpna] vxlan 10 [SwitchB-vsi-vpna-vxlan-10] tunnel 1 [SwitchB-vsi-vpna-vxlan-10] tunnel 2 [SwitchB-vsi-vpna-vxlan-10] quit [SwitchB-vsi-vpna] quit
# Assign Tunnel 1 and Tunnel 2 to VXLAN 20.
[SwitchB] vsi vpnb [SwitchB-vsi-vpnb] vxlan 20 [SwitchB-vsi-vpnb-vxlan-20] tunnel 1 [SwitchB-vsi-vpnb-vxlan-20] tunnel 2 [SwitchB-vsi-vpnb-vxlan-20] quit [SwitchB-vsi-vpnb] quit
# Create VSI-interface 1 and assign the interface an IP address. The IP address will be used as the gateway address for VXLAN 10.
[SwitchB] interface vsi-interface 1 [SwitchB-Vsi-interface1] ip address 10.1.1.1 255.255.255.0
# Specify VSI-interface 1 as a distributed gateway and enable local proxy ARP on the interface.
[SwitchB-Vsi-interface1] distributed-gateway local [SwitchB-Vsi-interface1] local-proxy-arp enable [SwitchB-Vsi-interface1] quit
# Create VSI-interface 2 and assign the interface an IP address. The IP address will be used as the gateway address for VXLAN 20.
[SwitchB] interface vsi-interface 2 [SwitchB-Vsi-interface2] ip address 10.1.2.1 255.255.255.0
# Specify VSI-interface 2 as a distributed gateway and enable local proxy ARP on the interface.
[SwitchB-Vsi-interface2] distributed-gateway local [SwitchB-Vsi-interface2] local-proxy-arp enable [SwitchB-Vsi-interface2] quit
# Enable dynamic ARP entry synchronization for distributed VXLAN IP gateways.
[SwitchB] arp distributed-gateway dynamic-entry synchronize
# 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
Configure Switch D:
# Enable L2VPN.
<SwitchD> system-view [SwitchD] l2vpn enable
# Set the VXLAN hardware resource mode.
[SwitchD] hardware-resource vxlan border24k
# Create VSI vpna and VXLAN 10.
[SwitchD] vsi vpna [SwitchD-vsi-vpna] vxlan 10 [SwitchD-vsi-vpna-vxlan-10] quit [SwitchD-vsi-vpna] quit
# Create VSI vpnb and VXLAN 20.
[SwitchD] vsi vpnb [SwitchD-vsi-vpnb] vxlan 20 [SwitchD-vsi-vpnb-vxlan-20] quit [SwitchD-vsi-vpnb] quit
# Assign an IP address to Loopback 0. The IP address will be used as the source IP address of the VXLAN-DCI tunnel to Switch B and the VXLAN tunnel to Switch E.
[SwitchD] interface loopback 0 [SwitchD-Loopback0] ip address 3.3.3.3 255.255.255.255 [SwitchD-Loopback0] quit
# Create a VXLAN tunnel to Switch E. The tunnel interface name is Tunnel 1.
[SwitchD] interface tunnel 1 mode vxlan [SwitchD-Tunnel1] source 3.3.3.3 [SwitchD-Tunnel1] destination 4.4.4.4 [SwitchD-Tunnel1] quit
# Create a VXLAN-DCI tunnel to Switch B. The tunnel interface name is Tunnel 2.
[SwitchD] interface tunnel 2 mode vxlan-dci [SwitchD-Tunnel2] source 3.3.3.3 [SwitchD-Tunnel2] destination 2.2.2.2 [SwitchD-Tunnel2] quit
#Assign Tunnel 1 and Tunnel 2 to VXLAN 10.
[SwitchD] vsi vpna [SwitchD-vsi-vpna] vxlan 10 [SwitchD-vsi-vpna-vxlan-10] tunnel 1 [SwitchD-vsi-vpna-vxlan-10] tunnel 2 [SwitchD-vsi-vpna-vxlan-10] quit [SwitchD-vsi-vpna] quit
# Assign Tunnel 2 to VXLAN 20.
[SwitchD] vsi vpnb [SwitchD-vsi-vpnb] vxlan 20 [SwitchD-vsi-vpnb-vxlan-20] tunnel 2 [SwitchD-vsi-vpnb-vxlan-20] quit [SwitchD-vsi-vpnb] quit
# Create VSI-interface 1 and assign the interface an IP address. The IP address will be used as the gateway address for VXLAN 10.
[SwitchD] interface vsi-interface 1 [SwitchD-Vsi-interface1] ip address 10.1.1.1 255.255.255.0
# Specify VSI-interface 1 as a distributed gateway and enable local proxy ARP on the interface.
[SwitchD-Vsi-interface1] distributed-gateway local [SwitchD-Vsi-interface1] local-proxy-arp enable [SwitchD-Vsi-interface1] quit
# Create VSI-interface 2 and assign the interface an IP address. The IP address will be used as the gateway address for VXLAN 20.
[SwitchD] interface vsi-interface 2 [SwitchD-Vsi-interface2] ip address 10.1.2.1 255.255.255.0
# Specify VSI-interface 2 as a distributed gateway and enable local proxy ARP on the interface.
[SwitchD-Vsi-interface2] distributed-gateway local [SwitchD-Vsi-interface2] local-proxy-arp enable [SwitchD-Vsi-interface2] quit
# Enable dynamic ARP entry synchronization for distributed VXLAN IP gateways.
[SwitchD] arp distributed-gateway dynamic-entry synchronize
# Specify VSI-interface 1 as the gateway interface for VSI vpna.
[SwitchD] vsi vpna [SwitchD-vsi-vpna] gateway vsi-interface 1 [SwitchD-vsi-vpna] quit
# Specify VSI-interface 2 as the gateway interface for VSI vpnb.
[SwitchD] vsi vpnb [SwitchD-vsi-vpnb] gateway vsi-interface 2 [SwitchD-vsi-vpnb] quit
Configure Switch E:
# Enable L2VPN.
<SwitchE> system-view [SwitchE] l2vpn enable
# Create VSI vpna and VXLAN 10.
[SwitchE] vsi vpna [SwitchE-vsi-vpna] vxlan 10 [SwitchE-vsi-vpna-vxlan-10] quit [SwitchE-vsi-vpna] quit
# Assign an IP address to Loopback 0. The IP address will be used as the source IP address of the VXLAN tunnel to Switch D.
[SwitchE] interface loopback 0 [SwitchE-Loopback0] ip address 4.4.4.4 255.255.255.255 [SwitchE-Loopback0] quit
# Create a VXLAN tunnel to Switch D. The tunnel interface name is Tunnel 1.
[SwitchE] interface tunnel 1 mode vxlan [SwitchE-Tunnel1] source 4.4.4.4 [SwitchE-Tunnel1] destination 3.3.3.3 [SwitchE-Tunnel1] quit
# Assign Tunnel 1 to VXLAN 10.
[SwitchE] vsi vpna [SwitchE-vsi-vpna] vxlan 10 [SwitchE-vsi-vpna-vxlan-10] tunnel 1 [SwitchE-vsi-vpna-vxlan-10] quit [SwitchE-vsi-vpna] quit
# On Ten-GigabitEthernet 1/0/1, create Ethernet service instance 1000 to match VLAN 100.
[SwitchA] interface [SwitchA-Ten-GigabitEthernet1/0/1] service-instance 1000 [SwitchA-Ten-GigabitEthernet1/0/1-srv1000] encapsulation s-vid 100
# 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