The VXLAN feature is often used with hot standby, virtual system, and NAT features on a data center.
In a data center shown in Figure 1, VMs of one virtual private cloud (VPC) are deployed on different x86 servers. VXLAN-supported Layer-2 devices provide access and Layer-2 forwarding services for the VMs. The FWs act as VXLAN gateways and are responsible for network security between VPCs and between VPCs and physical networks. Route isolation is required between VPCs. Only public addresses are visible for external networks. For secure and stable networking, FWs must work in hot standby mode.
Security Zone |
Interface |
Description |
|---|---|---|
TRUST |
GigabitEthernet 0/0/0 |
Connecting to a VXLAN Layer-2 access device |
DMZ |
BDIF1 BDIF2 |
Outbound interfaces of VPCs where tenant VMs reside |
Virtual-if0 |
Outbound interface from a virtual system to the root system, equal to the BDIF interface for the root system |
|
GigabitEthernet 0/0/1 |
HRP heartbeat interface |
|
UNTRUST |
GigabitEthernet 0/0/2 |
Upstream interface connecting the device to the Internet or another physical network |
Virtual-if1 Virtual-if2 |
Interfaces connecting virtual systems to the root system, equal to GigabitEthernet 0/0/2 for virtual systems |
Connect two FWs to Layer-3 devices (OSPF configured) in the upstream direction and Layer-2 devices in active/standby mode (VRRP group configured) in the downstream direction.
Permit OSPF packets in the security policies for the interzone between the Local zone and the security zone where upstream interfaces reside. Otherwise, OSPF neighbor relationships cannot be set up.
Create the BD, VNI (VXLAN ID), and VXLAN tunnel. Set the source IP address of the NVE interface to the virtual IP address of the VRRP group.
Permit VXLAN packets in the security policies for the interzone between the Local zone and the security zone where VRRP group interfaces reside. Otherwise, VXLAN tunnels cannot be set up.
Create a BDIF (VXLAN) interface, and set an IP address for the interface.
Set the same IP address on the standby device. Setting the same MAC address for both devices is recommended. Otherwise, services are interrupted for a short period during the switchover.
Configure NAT Server in the virtual system to map private IP addresses into public IP addresses.
Configure the VXLAN Layer-2 access device. Set the peer IP address of VXLAN tunnel to the VRRP virtual IP address of the FW. Set up a VXLAN tunnel between VXLAN Layer-2 access devices.
Choose , click Edit, complete the following configuration, and click OK.
The configuration on FW_B is similar to that on FW_A except that:
A BD is automatically created when you create a VXLAN tunnel.
The device can automatically associate a virtual system based on the VXLAN ID. Do not manually set the virtual system.
In this example, the IP address of the interface on the downstream device is 10.0.10.1.
Choose and click Add to configure a static route.
Choose and click Add Security Policy to configure the following security policies.
Name |
Function |
|---|---|
vxlan |
Permit VXLAN packets. |
ospf |
Permit OSPF packets. |
1_in |
Permit access from Internet users to VMs in the intranet after NAT is performed. |
2_in |
|
1_out |
Permit intranet users to access the external network after NAT is performed. |
2_out |
The configuration of vsys2 is the same as that of vsys1 except that:
The configuration on FW_B is the same as that on FW_A. This configuration must be manually performed because it cannot be automatically backed up to the standby device in hot standby scenarios.
Operation |
Queried Session Table |
|---|---|
Access from the VM at 192.168.1.2 in VPCa to a public IP address is successful. |
|
Access from the Internet to the NAT Server address (2.2.2.2) in VPCb is successful. |
|
Access from the VM at 192.168.1.2 in VPCa to the NAT Server address (2.2.2.2) in VPCb is successful. |
|
Shut down GigabitEthernet 0/0/2 on FW_A and repeat the preceding operations. The operations succeed. |
All the preceding session tables can be queried on FW_B. |
FW_A |
FW_B |
|---|---|
# hrp enable hrp interface GigabitEthernet 0/0/1 remote 172.16.0.2 hrp adjust ospf-cost enable hrp auto-sync config static-route hrp track interface GigabitEthernet 0/0/2 # bridge-domain 1 vxlan vni 8001 # bridge-domain 2 vxlan vni 8002 # vsys enable # vsys name vsys1 1 assign global-ip 1.1.1.1 1.1.1.100 exclusive assign vni 8001 # vsys name vsys2 2 assign global-ip 2.2.2.1 2.2.2.100 exclusive assign vni 8002 # interface GigabitEthernet0/0/0 ip address 10.0.10.11 255.255.255.0 vrrp vrid 1 virtual-ip 10.0.10.10 active # interface GigabitEthernet 0/0/1 ip address 172.16.0.1 255.255.255.0 # interface GigabitEthernet 0/0/2 ip address 10.1.0.1 255.255.255.0 # interface Vbdif1 ip address 192.168.1.1 255.255.255.0 # interface Vbdif2 ip address 192.168.2.1 255.255.255.0 # interface Nve1 source 10.0.10.10 vxlan statistic enable vni 8001 head-end peer-list 10.0.20.10 10.0.20.11 vni 8002 head-end peer-list 10.0.20.10 10.0.20.11 # firewall zone trust set priority 85 add interface GigabitEthernet0/0/0 # firewall zone untrust set priority 5 add interface GigabitEthernet 0/0/2 # firewall zone dmz set priority 50 add interface Virtual-if0 add interface GigabitEthernet 0/0/1 # ospf 1 import-route static area 0.0.0.0 network 10.1.0.0 0.0.0.255 # ip route-static 1.1.1.0 255.255.255.0 vpn-instance vsys1 ip route-static 2.2.2.0 255.255.255.0 vpn-instance vsys2 ip route-static 10.0.20.0 255.255.255.0 10.0.10.1 # security-policy rule name vxlan source-zone local source-zone trust destination-zone local destination-zone trust destination-address 10.0.0.0 mask 255.255.0.0 service vxlan action permit rule name ospf source-zone local source-zone untrust destination-zone local destination-zone untrust destination-address 10.0.0.0 mask 255.0.0.0 service ospf action permit rule name 1_in source-zone untrust destination-zone dmz destination-address 1.1.1.0 mask 255.255.255.0 action permit rule name 2_in source-zone untrust destination-zone dmz destination-address 2.2.2.0 mask 255.255.255.0 action permit rule name 1_out source-zone dmz destination-zone untrust source-address 1.1.1.0 mask 255.255.255.0 action permit rule name 2_out source-zone dmz destination-zone untrust source-address 2.2.2.0 mask 255.255.255.0 action permit # switch vsys vsys1 # interface Vbdif1 ip address 192.168.1.1 255.255.255.0 # firewall zone untrust set priority 5 add interface Virtual-if1 # firewall zone dmz set priority 50 add interface Vbdif1 # security-policy rule name in source-zone untrust destination-zone dmz destination-address 192.168.1.0 mask 255.255.255.0 action permit rule name out source-zone dmz destination-zone untrust source-address 192.168.1.0 mask 255.255.255.0 action permit # ip route-static 0.0.0.0 0.0.0.0 public # nat server to1 0 global 1.1.1.2 inside 192.168.1.2 unr-route # switch vsys vsys2 # interface Vbdif2 ip address 192.168.2.1 255.255.255.0 # firewall zone untrust set priority 5 add interface Virtual-if2 # firewall zone dmz set priority 50 add interface Vbdif2 # security-policy rule name in source-zone untrust destination-zone dmz destination-address 192.168.2.0 mask 255.255.255.0 action permit rule name out source-zone dmz destination-zone untrust source-address 192.168.2.0 mask 255.255.255.0 action permit # ip route-static 0.0.0.0 0.0.0.0 public # nat server to2 1 global 2.2.2.2 inside 192.168.2.2 unr-route # |
# hrp enable hrp interface GigabitEthernet 0/0/1 remote 172.16.0.1 hrp adjust ospf-cost enable hrp auto-sync config static-route hrp track interface GigabitEthernet 0/0/2 # bridge-domain 1 vxlan vni 8001 # bridge-domain 2 vxlan vni 8002 # vsys enable # vsys name vsys1 1 assign global-ip 1.1.1.1 1.1.1.100 exclusive assign vni 8001 # vsys name vsys2 2 assign global-ip 2.2.2.1 2.2.2.100 exclusive assign vni 8002 # interface GigabitEthernet0/0/0 ip address 10.0.10.12 255.255.255.0 vrrp vrid 1 virtual-ip 10.0.10.10 standby # interface GigabitEthernet 0/0/1 ip address 172.16.0.2 255.255.255.0 # interface GigabitEthernet 0/0/2 ip address 10.2.0.1 255.255.255.0 # interface Vbdif1 ip address 192.168.1.1 255.255.255.0 # interface Vbdif2 ip address 192.168.2.1 255.255.255.0 # interface Nve1 source 10.0.10.10 vxlan statistic enable vni 8001 head-end peer-list 10.0.20.10 10.0.20.11 vni 8002 head-end peer-list 10.0.20.10 10.0.20.11 # firewall zone trust set priority 85 add interface GigabitEthernet0/0/0 # firewall zone untrust set priority 5 add interface GigabitEthernet 0/0/2 # firewall zone dmz set priority 50 add interface Virtual-if0 add interface GigabitEthernet 0/0/1 # ospf 1 import-route static area 0.0.0.0 network 10.2.0.0 0.0.0.255 # ip route-static 1.1.1.0 255.255.255.0 vpn-instance vsys1 ip route-static 2.2.2.0 255.255.255.0 vpn-instance vsys2 ip route-static 10.0.20.0 255.255.255.0 10.0.10.1 # security-policy rule name vxlan source-zone local source-zone trust destination-zone local destination-zone trust destination-address 10.0.0.0 mask 255.255.0.0 service vxlan action permit rule name ospf source-zone local source-zone untrust destination-zone local destination-zone untrust destination-address 10.0.0.0 mask 255.0.0.0 service ospf action permit rule name 1_in source-zone untrust destination-zone dmz destination-address 1.1.1.0 mask 255.255.255.0 action permit rule name 2_in source-zone untrust destination-zone dmz destination-address 2.2.2.0 mask 255.255.255.0 action permit rule name 1_out source-zone dmz destination-zone untrust source-address 1.1.1.0 mask 255.255.255.0 action permit rule name 2_out source-zone dmz destination-zone untrust source-address 2.2.2.0 mask 255.255.255.0 action permit # switch vsys vsys1 # interface Vbdif1 ip address 192.168.1.1 255.255.255.0 # firewall zone untrust set priority 5 add interface Virtual-if1 # firewall zone dmz set priority 50 add interface Vbdif1 # security-policy rule name in source-zone untrust destination-zone dmz destination-address 192.168.1.0 mask 255.255.255.0 action permit rule name out source-zone dmz destination-zone untrust source-address 192.168.1.0 mask 255.255.255.0 action permit # ip route-static 0.0.0.0 0.0.0.0 public # nat server to1 0 global 1.1.1.2 inside 192.168.1.2 unr-route # switch vsys vsys2 # interface Vbdif2 ip address 192.168.2.1 255.255.255.0 # firewall zone untrust set priority 5 add interface Virtual-if2 # firewall zone dmz set priority 50 add interface Vbdif2 # security-policy rule name in source-zone untrust destination-zone dmz destination-address 192.168.2.0 mask 255.255.255.0 action permit rule name out source-zone dmz destination-zone untrust source-address 192.168.2.0 mask 255.255.255.0 action permit # ip route-static 0.0.0.0 0.0.0.0 public # nat server to2 1 global 2.2.2.2 inside 192.168.2.2 unr-route # |