Centralized VXLAN IP gateway experimental configuration-based on HCL simulator

Require

1. Configure IP address (omitted)

2. All routers use OSPF to establish neighbor transfer routes, requiring loopback interfaces to communicate with each other. R2 and R4 declare network segments 20.0.0.0/24 and 192.168.1.0/24.

3. Configure VXLAN. The gateway of the PC is on R2. It is required that the PCs can communicate with each other and the PC can communicate with R4.

parse

Configure OSPF. R2 configuration (commands for other devices are similar)

ospf 1 router-id 2.2.2.2
 area 0.0.0.0
  network 2.2.2.2 0.0.0.0
  network 10.0.0.8 0.0.0.3
  network 20.0.0.0 0.0.0.255
  network 192.168.1.0 0.0.0.255

Configure VXLAN section

R1 configuration (R3 configuration only requires modifying the destination and source in the tunnel interface)

 l2vpn enable #Enable L2VPN function

#

interface Tunnel1 mode vxlan #Create a tunnel and specify the type as vxlan
 source 1.1.1.1
 destination 2.2.2.2
#
interface Tunnel2 mode vxlan
 source 1.1.1.1
 destination 3.3.3.3
#
vsi vpn1 #Create a VSI named vpn1
 vxlan 10 #Create vxlan ID
  tunnel 1 #Associate VXLAN tunnel
  tunnel 2
#

interface GigabitEthernet0/1.10
 vlan-type dot1q vid 100
 xconnect vsi vpn1 #The interface associated with the terminal is vsi

R2 configuration

#
 l2vpn enable
#

interface Tunnel1 mode vxlan
 source 2.2.2.2
 destination 1.1.1.1
#
interface Tunnel2 mode vxlan
 source 2.2.2.2
 destination 3.3.3.3
#

interface Vsi-interface1 #Create VSI virtual interface VSI-interface1, and configure the IP address
 ip address 192.168.1.254 255.255.255.0
#
vsi vpn1
 gateway vsi-interface 1 #Configure the instance and interface VSI-interface1 to associate
 vxlan 10
  tunnel 1
  tunnel 2

Layer 2 switch configuration

vlan 100

port g1/0/2

int g1/0/1

p l t port

tr per vlan 100

Testing between PCs

 

Guess you like

Origin blog.csdn.net/m0_62621003/article/details/132307268