Simple configuration case for communication between vxlan network and vlan

Insert image description here

Environmental information introduction:

Underlay is interconnected through OSPF, and Overlay establishes tunnels through BGP EVPN.

Leaf1 and Leaf2 establish IBGP neighbor relationships with Spine respectively, and Spine serves as the route reflector RR.

Leaf1, Leaf2 and Spine use the lo b interface address as the VTEP address and BGP EVPN source address respectively.

The VTEP address of Leaf1 is 1.1.1.1/32
The VTEP address of Leaf2 is 2.2.2.2/32
The VTEP address of Spine is 3.3.3.3/32

The subnet range of Vlan10 is 192.168.10.0/24, and the gateway address is 192.168.10.1. The subnet range
of Vlan20 is 192.168.20.0/24, and the gateway address is 192.168.20.1.
The gateway is deployed on the spine.

The VNI corresponding to the Vlan10 subnet is 10.
The VNI corresponding to the Vlan20 subnet is 20.

The Vlan20 subnet devices (PC2 and PC3) on both sides can communicate directly through the VXLAN tunnel established by Leaf1 and Leaf2.

Final effect:

There is no gateway written on PC2 and PC3. They can ping each other directly without the intervention of the gateway.

SPIne node configuration:

evpn-overlay enable

interface GE1/0/0
undo portswitch
undo shutdown
ip address 10.0.12.1 255.255.255.0
ospf network-type p2p

interface GE1/0/1
undo portswitch
undo shutdown
ip address 10.0.13.1 255.255.255.0
ospf network-type p2p

interface LoopBack0
ip address 3.3.3.3 255.255.255.255

bgp 100
peer 1.1.1.1 as-number 100
peer 1.1.1.1 connect-interface LoopBack0
peer 2.2.2.2 as-number 100
peer 2.2.2.2 connect-interface LoopBack0

ipv4-family unicast
undo peer 1.1.1.1 enable
undo peer 2.2.2.2 enable

l2vpn-family evpn
undo policy vpn-target
peer 1.1.1.1 enable
peer 1.1.1.1 reflect-client
peer 2.2.2.2 enable
peer 2.2.2.2 reflect-client

ospf 1 router-id 3.3.3.3
area 0.0.0.0
network 3.3.3.3 0.0.0.0
network 10.0.12.1 0.0.0.0
network 10.0.13.1 0.0.0.0

Leaf1 node configuration:

evpn-overlay enable

bridge-domain 20
vxlan vni 20
evpn
route-distinguisher 20:1
vpn-target 20:1 export-extcommunity
vpn-target 20:2 import-extcommunity

interface GE1/0/0
undo portswitch
undo shutdown
ip address 10.0.12.2 255.255.255.0
ospf network-type p2p

interface GE1/0/1
undo shutdown

interface GE1/0/1.20 mode l2
encapsulation dot1q vid 20
bridge-domain 20

interface LoopBack0
ip address 1.1.1.1 255.255.255.255

interface Nve1
source 1.1.1.1
vni 20 head-end peer-list protocol bgp

bgp 100
peer 3.3.3.3 as-number 100
peer 3.3.3.3 connect-interface LoopBack0

ipv4-family unicast
undo peer 3.3.3.3 enable

l2vpn-family evpn
policy vpn-target
peer 3.3.3.3 enable

ospf 1 router-id 1.1.1.1
area 0.0.0.0
network 1.1.1.1 0.0.0.0
network 10.0.12.2 0.0.0.0

Leaf2 node configuration:

evpn-overlay enable

bridge-domain 20
vxlan vni 20
evpn
route-distinguisher 20:2 //RD can be inconsistent on both sides
vpn-target 20:2 export-extcommunity //RT one out and one in must be consistent
vpn-target 20:1 import-extcommunity //RT one out and one in must be consistent in reverse

interface MEth0/0/0
undo shutdown

interface GE1/0/0
undo portswitch
undo shutdown
ip address 10.0.13.3 255.255.255.0
ospf network-type p2p

interface GE1/0/1
undo shutdown

interface GE1/0/1.20 mode l2
encapsulation dot1q vid 20
bridge-domain 20

interface LoopBack0
ip address 2.2.2.2 255.255.255.255

interface Nve1
source 2.2.2.2
vni 20 head-end peer-list protocol bgp

bgp 100
peer 3.3.3.3 as-number 100
peer 3.3.3.3 connect-interface LoopBack0

ipv4-family unicast
undo peer 3.3.3.3 enable

l2vpn-family evpn
policy vpn-target
peer 3.3.3.3 enable

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.13.3 0.0.0.0

bgp evpn neighbor view:
Insert image description here

vxlan tunnel view:

Insert image description here

bgp routing view:
Insert image description here

Guess you like

Origin blog.csdn.net/ydaxia110/article/details/134712564