325
[SwitchB] interface hundredgige 1/0/1
[SwitchB-HundredGigE1/0/1] service-instance 1000
[SwitchB-HundredGigE1/0/1-srv1000] encapsulation s-vid 2
# Map Ethernet service instance 1000 to VSI vpna.
[SwitchB-HundredGigE1/0/1-srv1000] xconnect vsi vpna
[SwitchB-HundredGigE1/0/1-srv1000] quit
[SwitchB-HundredGigE1/0/1] quit
5.
Configure Switch C:
# Enable L2VPN.
<SwitchC> system-view
[SwitchC] l2vpn enable
# Enable Layer 2 forwarding for VXLANs.
[SwitchC] undo vxlan ip-forwarding
# Create a VSI named
vpna
, and create VXLAN 10.
[SwitchC] vsi vpna
[SwitchC-vsi-vpna] vxlan 10
[SwitchC-vsi-vpna-vxlan-10] quit
[SwitchC-vsi-vpna] quit
# Enable MLD snooping globally.
[SwitchB] mld-snooping
[SwitchB -mld-snooping] quit
# Enable MLD snooping for VSI
vpna
.
[SwitchC] vsi vpna
[SwitchC-vsi-vpna] mld-snooping enable
# Enable dropping unknown IPv6 multicast data packets for VSI
vpna
.
[SwitchC-vsi-vpna] mld-snooping drop-unknown
# Specify FE80::3 as the source IPv6 address of MLD general queries in VSI
vpna
.
[SwitchC-vsi-vpna] mld-snooping general-query source-ip fe80::3
# Enable the MLD snooping querier for VSI
vpna
.
[SwitchC-vsi-vpna] mld-snooping querier
[SwitchC-vsi-vpna] quit
# Assign an IP address to Loopback 0. This address will be used as the source 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
.
The source address and destination address of the tunnel interface are 3.3.3.3 and 1.1.1.1,
respectively.
[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
.