Example for Configuring IPv6 VXLAN in Centralized Gateway Mode
Applicable Products and Versions
This example applies to the following switches running V200R003C00 or later versions.
- CE12800 (configured with the CE-L16CQ-FD, CE-L48XS-FD1, CE-L36CQ-FD1, CE-L36CQ-SD, CE-L48XS-FG, CE-L36CQ-FG, or CE-L08CF-FG1 card)
- CE12800E (configured with ED-E, EG-E, or EGA-E series cards)
- CE16800
- CE5880EI, CE6880EI, CE6881, CE5881, CE6881K, CE6863, CE6863K, CE6881E, and CE6875EI
Only the CE5880EI, CE6880EI, CE6881, CE5881, CE6881K, CE6863, CE6863K, CE6881E, CE16800, and CE12800E (configured with ED-E, EG-E, or EGA-E series cards) support the IPv6 Layer 3 VXLAN gateway, and other models support only the IPv6 Layer 2 VXLAN gateway.
For details about the mapping between software versions and switch models, see the Hardware Query Tool.
Networking Requirements
In Figure 1-13, an enterprise deploys VMs in different data centers. The data center networks are IPv6 networks and the VMs are on IPv4 networks. VM1 on Server1 belongs to VLAN 10, VM1 on Server3 belongs to VLAN 30, and VM1 on Server2 belongs to VLAN 20. Server1 and Server2 are on different network segments, and Server3 and Server2 are on the same network segment. It is required that a VXLAN gateway be deployed to allow VMs in different data centers to communicate.
Configuration Roadmap
Configure a routing protocol on Device1, Device2, and Device3 to ensure Layer 3 connectivity on the IPv6 network.
Configure service access points on Device1 and Device3 to distinguish service traffic.
Configure VXLAN tunnels among Device1, Device2, and Device3 to forward service traffic.
Configure a Layer 3 VXLAN gateway on Device2 to allow users on different network segments to communicate over the IPv6 Layer 3 VXLAN gateway.
Data Preparation
To complete the configuration, you need the following data:
VMs' VLAN IDs (10, 20, and 30)
IPv6 addresses of interfaces connecting devices
Interior Gateway Protocol (IGP) running between devices (OSPFv3 in this example) and router IDs of Device1, Device2, and Device3 (1.1.1.1, 2.2.2.2, and 3.3.3.3, respectively)
- BD IDs (10 and 20)
- VNI IDs (10 and 20)
Procedure
- Configure a routing protocol.
# Configure IPv6 addresses for interfaces on Device1 and configure OSPFv3. Repeat this step for Device2 and Device3.
<HUAWEI> system-view [~HUAWEI] sysname Device1 [*HUAWEI] commit [~Device1] interface loopback 1 [*Device1-LoopBack1] ipv6 enable [*Device1-LoopBack1] ipv6 address fc00:1::1 128 [*Device1-LoopBack1] quit [*Device1] interface 10ge 1/0/1 [*Device1-10GE1/0/1] undo portswitch [*Device1-10GE1/0/1] ipv6 enable [*Device1-10GE1/0/1] ipv6 address fc00:4::1 64 [*Device1-10GE1/0/1] quit [*Device1] ospfv3 [*Device1-ospfv3-1] router-id 1.1.1.1 [*Device1-ospfv3-1] quit [*Device1] interface loopback 1 [*Device1-LoopBack1] ospfv3 1 area 0 [*Device1-LoopBack1] quit [*Device1] interface 10ge 1/0/1 [*Device1-10GE1/0/1] ospfv3 1 area 0 [*Device1-10GE1/0/1] quit [*Device1] commit
# After OSPFv3 is configured, the devices can learn the IPv6 addresses of loopback interfaces of each other using OSPFv3 and successfully ping each other.
- Enable the IPv6 VXLAN function, configure the VXLAN tunnel mode, and enable the VXLAN ACL extension function. (This step only needs to be performed on the CE12800 and CE6875EI.)
# Configure Device1. Repeat this step for Device2 and Device3.
[~Device1] ipv6 vxlan enable [*Device1] ip tunnel mode vxlan [*Device1] assign forward nvo3 acl extend enable [*Device1] commit
After configuring the VXLAN tunnel mode and enabling the IPv6 VXLAN and VXLAN ACL extension functions, you need to save the configuration and restart the switch to make the configuration take effect.
- Configure a service access point on Device1 and Device3, respectively.
# Configure Device1. Repeat this step for Device3.
[~Device1] bridge-domain 10 [*Device1-bd10] quit [*Device1] interface 10ge 1/0/2.1 mode l2 [*Device1-10GE1/0/2.1] encapsulation dot1q vid 10 [*Device1-10GE1/0/2.1] bridge-domain 10 [*Device1-10GE1/0/2.1] quit [*Device1] bridge-domain 20 [*Device1-bd20] quit [*Device1] interface 10ge 1/0/3.1 mode l2 [*Device1-10GE1/0/3.1] encapsulation dot1q vid 30 [*Device1-10GE1/0/3.1] bridge-domain 20 [*Device1-10GE1/0/3.1] quit [*Device1] commit
- Configure VXLAN tunnel information on Device1, Device2, and Device3.
# Configure Device1.
[~Device1] bridge-domain 10 [~Device1-bd10] vxlan vni 10 [*Device1-bd10] quit [*Device1] bridge-domain 20 [*Device1-bd20] vxlan vni 20 [*Device1-bd20] quit [*Device1] interface nve 1 [*Device1-Nve1] source fc00:1::1 [*Device1-Nve1] vni 10 head-end peer-list fc00:2::2 [*Device1-Nve1] vni 20 head-end peer-list fc00:2::2 [*Device1-Nve1] vni 20 head-end peer-list fc00:3::3 [*Device1-Nve1] quit [*Device1] commit
# Configure Device2.
[~Device2] bridge-domain 10 [*Device2-bd10] vxlan vni 10 [*Device2-bd10] quit [*Device2] bridge-domain 20 [*Device2-bd20] vxlan vni 20 [*Device2-bd20] quit [*Device2] interface nve 1 [*Device2-Nve1] source fc00:2::2 [*Device2-Nve1] vni 10 head-end peer-list fc00:1::1 [*Device2-Nve1] vni 20 head-end peer-list fc00:1::1 [*Device2-Nve1] vni 20 head-end peer-list fc00:3::3 [*Device2-Nve1] quit [*Device2] commit
# Configure Device3.
[~Device3] bridge-domain 20 [~Device3-bd20] vxlan vni 20 [*Device3-bd20] quit [*Device3] interface nve 1 [*Device3-Nve1] source fc00:3::3 [*Device3-Nve1] vni 20 head-end peer-list fc00:1::1 [*Device3-Nve1] vni 20 head-end peer-list fc00:2::2 [*Device3-Nve1] quit [*Device3] commit
- Configure a Layer 3 VXLAN gateway on Device2.
[~Device2] interface vbdif 10 [*Device2-Vbdif10] ip address 192.168.10.10 24 [*Device2-Vbdif10] quit [*Device2] interface vbdif 20 [*Device2-Vbdif20] ip address 192.168.20.10 24 [*Device2-Vbdif20] quit [*Device2] commit
Verifying the Configuration
After completing the configurations, run the display vxlan tunnel command on Device1, Device2, and Device3 to check VXLAN tunnel information. The following example shows the command outputs on Device2.
[~Device2] display vxlan tunnel
Number of vxlan tunnel : 2
Tunnel ID Source Destination State Type Uptime
-----------------------------------------------------------------------------------
4026531842 FC00:2::2 FC00:1::1 up static 00:36:33
4026531843 FC00:2::2 FC00:3::3 up static 00:24:49
VM1s on different servers can communicate.
Configuration Files
Device1 configuration file
# sysname Device1 # assign forward nvo3 acl extend enable //This step only needs to be performed on the CE12800 and CE6875EI. # ipv6 vxlan enable //This step only needs to be performed on the CE12800 and CE6875EI. # bridge-domain 10 vxlan vni 10 # bridge-domain 20 vxlan vni 20 # ospfv3 1 router-id 1.1.1.1 area 0.0.0.0 # interface 10GE1/0/1 undo portswitch ipv6 enable ipv6 address FC00:4::1/64 ospfv3 1 area 0.0.0.0 # interface 10GE1/0/2.1 mode l2 encapsulation dot1q vid 10 bridge-domain 10 # interface 10GE1/0/3.1 mode l2 encapsulation dot1q vid 30 bridge-domain 20 # interface LoopBack1 ipv6 enable ipv6 address FC00:1::1/128 ospfv3 1 area 0.0.0.0 # interface Nve1 source FC00:1::1 vni 10 head-end peer-list FC00:2::2 vni 20 head-end peer-list FC00:2::2 vni 20 head-end peer-list FC00:3::3 # return
Device2 configuration file
# sysname Device2 # bridge-domain 10 vxlan vni 10 # bridge-domain 20 vxlan vni 20 # ospfv3 1 router-id 2.2.2.2 area 0.0.0.0 # interface Vbdif10 ip address 192.168.10.10 255.255.255.0 # interface Vbdif20 ip address 192.168.20.10 255.255.255.0 # interface 10GE1/0/1 undo portswitch ipv6 enable ipv6 address FC00:4::2/64 ospfv3 1 area 0.0.0.0 # interface 10GE1/0/2 undo portswitch ipv6 enable ipv6 address FC00:5::1/64 ospfv3 1 area 0.0.0.0 # interface LoopBack1 ipv6 enable ipv6 address FC00:2::2/128 ospfv3 1 area 0.0.0.0 # interface Nve1 source FC00:2::2 vni 10 head-end peer-list FC00:1::1 vni 20 head-end peer-list FC00:1::1 vni 20 head-end peer-list FC00:3::3 # return
Device3 configuration file
# sysname Device3 # assign forward nvo3 acl extend enable //This step only needs to be performed on the CE12800 and CE6875EI. # ipv6 vxlan enable //This step only needs to be performed on the CE12800 and CE6875EI. # bridge-domain 20 vxlan vni 20 # ospfv3 1 router-id 3.3.3.3 area 0.0.0.0 # interface 10GE1/0/1 undo portswitch ipv6 enable ipv6 address FC00:5::2/64 ospfv3 1 area 0.0.0.0 # interface 10GE1/0/2.1 mode l2 encapsulation dot1q vid 20 bridge-domain 20 # interface LoopBack1 ipv6 enable ipv6 address FC00:3::3/128 ospfv3 1 area 0.0.0.0 # interface Nve1 source FC00:3::3 vni 20 head-end peer-list FC00:1::1 vni 20 head-end peer-list FC00:2::2 # return