查看: 126|回复: 1

VXLAN BGP EVPN 基础配置-使用EVE-NG

1

主题

14

回帖

518

积分

中级会员

Rank: 3Rank: 3

积分
518

实验拓扑

image.png

EVE-NG拓扑导出文件

upload 附件:VXLAN BGP EVPN.zip

视频合集链接如下

https://space.bilibili.com/423219115/lists/3328767

以下是视频4-1到4-9开始的实验具体配置

(视频出处为:https://www.udemy.com/course/vxlan-bgp-evpn-by-arash-deljoo/)

Spine 1:1 Spine1 --- 10.1.11.0/24 -----leaf1

Spine 2:2 Spine1---10.1.12.0/24 --- Leaf2

Leaf1:11 Spine2---10.2.11.0/24 --- Leaf1

Leaf2:12 Spine2---10.2.12.0/24----Leaf2

LP0: X.X.X.X/32 SPINE1:1.1.1/32

=========================

1 underlay configuration step 1 -- ip addressing


spine1

conf t

hostname spine1

interface eth1/1

no switchport

ip add 10.1.11.1/24

no shutdown

interface eth1/2

no switchport

ip add 10.1.12.1/24

no shutdown

interface loopback 0

ip add 1.1.1.1/32


spine2

hostname spine2

interface eth1/1

no switchport

ip address 10.2.11.2/24

no shutdown

interface eth1/2

no switchport

ip address 10.2.12.2/24

no shutdown

interface loopback 0

ip address 2.2.2.2/32


leaf1

hostname leaf1

interface eth1/1

no switchport

ip add 10.1.11.11/24

no shutdown

interface eth1/2

no switchport

ip add 10.2.11.11/24

no shutdown

interface loopback 0

ip add 11.11.11.11/32


leaf2

hostname leaf2

interface eth1/1

no switchport

ip add 10.1.12.12/24

no shutdown

interface eth1/2

no switchport

ip add 10.2.12.12/24

no shutdown

interface loopback 0

ip add 12.12.12.12/32

===========================

2 underlay configuration step 2: mtu

int eth1/1 - 2

mtu 9216

show int e1/1

show run int e1/2

=======================

3 Underlay Configuration Step 3 - Routing Protocol - OSPF

spine1

feature ospf

router ospf underlay

router-id 1.1.1.1

interface eth1/1

ip router ospf underlay area 0.0.0.0

ip ospf network point-to-point

interface eth1/2

ip router ospf underlay area 0.0.0.0

ip ospf network point-to-point

interface loop0

ip router ospf underlay area 0.0.0.0

spine2

feature ospf

router ospf underlay

router-id 2.2.2.2

int eth 1/1 - 2

ip router ospf underlay area 0.0.0.0

ip ospf network point-to-point

interface loop0

ip router ospf underlay area 0.0.0.0

leaf1

feature ospf

router ospf underlay

router-id 11.11.11.11

int eth 1/1 - 2

ip router ospf underlay area 0.0.0.0

ip ospf network point-to-point

interface loop0

ip router ospf underlay area 0.0.0.0

leaf2

feature ospf

router ospf underlay

router-id 12.12.12.12

int eth 1/1 - 2

ip router ospf underlay area 0.0.0.0

ip ospf network point-to-point

interface loop0

ip router ospf underlay area 0.0.0.0

show ip ospf interface brief

show ip route ospf-underlay

spine1:

ping 11.11.11.11 source 1.1.1.1

ping 12.12.12.12 source 1.1.1.1

=======================

4 Underlay Configuration Step 4 - Multi Destination Traffic

unicast mode / multicast mode

multicast mode (pim anycast)

spine1:

feature pim

interface loopback 1

ip addr 100.100.100.100/32

ip route ospf underlay area 0.0.0.0

ip pim sparse-mode

int loo0

ip pim sparse-mode

int eth1/1-2

ip pim spares-mode

show ip pim interface brief

spine1# show ip pim inter brief

spine2:

feature pim

interface loo 1

ip add 100.100.100.100/32

ip router ospf underlay area 0.0.0.0

ip pim sparse-mode

int loo0

ip pim sparse-mode

show ip pim int br

leaf1

leaf2

feature pim

int loo0

ip pim sparse-mode

int eth1/1-2

ip pim sparse-mode

show ip pim int br

in all NEXUS

show ip pim neighbor

=======

spine1 , spine2, leaf1 , leaf2:

ip pim rp-addr 100.100.100.100

spine1 , spine2

ip pim anycast-rp 100.100.100.100 1.1.1.1

ip pim anycast-rp 100.100.100.100 2.2.2.2

show ip pim rp

5 Underlay Configuration Step 5 - BGP IPv4 Address Family

spine1:

feature bgp

router bgp 65000

router-id 1.1.1.1

address-family ipv4 unicast

exit

template peer leaf

remote-as 65000

update-source loopback 0

address-family ipv4 unicast

send-community extended

route-reflector-client

exit

neighbor 11.11.11.11

inherit peer leaf

neighbor 12.12.12.12

inherit peer leaf

spine2:

feature bgp

router bgp 65000

router-id 2.2.2.2

address-family ipv4 unicast

exit

template peer leaf

remote-as 65000

update-source loopback 0

address-family ipv4 unicast

send-community extended

route-reflector-client

exit

neighbor 11.11.11.11

inherit peer leaf

neighbor 12.12.12.12

inherit peer leaf

leaf1:

feature bgp

router bgp 65000

router-id 11.11.11.11

address-fa ipv4 uni

exit

neighbor 1.1.1.1

remote-as 65000

update-source loo0

address-fami ipv4 un

send-community extended

neighbor 2.2.2.2

remote-as 65000

update-source loo0

address-family ipv4 uni

send-community extended

leaf2:

feature bgp

router bgp 65000

router-id 12.12.12.12

address-fa ipv4 uni

exit

neighbor 1.1.1.1

remote-as 65000

update-source loo0

address-fami ipv4 un

send-community extended

neighbor 2.2.2.2

remote-as 65000

update-source loo0

address-family ipv4 uni

send-community extended

check:

spine 1:

show bgp ipv4 uni summary

neibhbor should includes 11.11.11.11 and 12.12.12.12

same as spine2:

6 Overlay Configuration Step 1 - L2 Multitenancy

enable these features on all Nexuses.

feature nv overlay

feature vn-segment-vlan-based

nv overlay evpn

show vlan brief

leaf1:

vlan2

name T1-v2

vn-segment 1002

exit

vlan3

name T1-v3

vn-segment 1003

int eth 1/3

switchport

switchport mode access

switchport access vlan 2

no shutdown

int eth 1/4

switchport

switchport mode access

switchport access vlan 3

no shutdown

show vlan brief

leaf2:

vlan2

name T1-v2

vn-segment 1002

exit

vlan3

name T1-v3

vn-segment 1003

int eth 1/3

switchport

switchport mode access

switchport access vlan 2

no shutdown

int eth 1/4

switchport

switchport mode access

switchport access vlan 3

no shutdown

show vlan brief

7 Overlay Configuration Step 2 - L3 Multitenancy

virtual routing & Forarding (vrf)

vlan 1000 <--->L3VNI:1000

vlan 2 --->192.168.2.1/24
vlan 3 --->192.168.3.1/24

leaf1:

vlan 1000

name T1-L3VNI

vn-segment 1000

exit

show vrf

vrf context T1

vni 1000

rd auto

address-family ipv4 unicast

route-target both auto

route-target both auto evpn

show vrf detail

feature interface-vlan

interface vlan 2

vrf member T1

ip add 192.168.2.1/24

no sh

fabric forwarding mode anycast-gateway

show run int vlan 2

fabric forwarding anycast-gateway-mac 0000.1111.2222

int vlan 2

fabric forwarding mode anycast-gateway

show run int vlan 2

需要确定配置中包含 'fabric forwarding mode anycast-gateway'

int vlan 3

vrf member T1

ip add 192.168.3.1/24

no shu

fabric forwarding mode anycast-gateway

exit

int vlan 1000

vrf member T1

end

show ip int brief

show vlan br

show run | include vrf

leaf2:

vlan 1000

name T1-L3VNI

vn-segment 1000

exit

show vrf

vrf context T1

vni 1000

rd auto

address-family ipv4 unicast

route-target both auto

route-target both auto evpn

show vrf detail

feature interface-vlan

interface vlan 2

vrf member T1

ip add 192.168.2.1/24

no sh

fabric forwarding mode anycast-gateway

show run int vlan 2

fabric forwarding anycast-gateway-mac 0000.1111.2222

int vlan 2

fabric forwarding mode anycast-gateway

show run int vlan 2

需要确定配置中包含 'fabric forwarding mode anycast-gateway'

int vlan 3

vrf member T1

ip add 192.168.3.1/24

no shu

fabric forwarding mode anycast-gateway

exit

int vlan 1000

vrf member T1

end

show ip int brief

show vlan br

show run | include vrf

show ip route vrf T1

192.168.2.0/24

192.168.2.1/32

192.168.3.0/24

192.168.3.1/32

8 Overlay Configuration Step 3 - VXLAN Tunnel

VLAN2->VNI1002->MG:239.0.0.2

VLAN3->VNI1003->MG:239.0.0.3

vtep1->172.16.0.11/32

vtep2->172.16.0.12/32

leaf1:

int loo1

ip add 172.16.0.11/32

ip router ospf UNDERLAY area 0.0.0.0

ip pim sparse-mode

exit

int nve 1

source-interface loo 1

host-reachability protocol bgp

no shutdown

member vni 1002

mcast-group 239.0.0.2

exit

member vni 1003

mcast-group 239.0.0.3

exit

member vni 1000 associate-vrf

end

show nve vni

leaf1:

int loo1

ip add 172.16.0.12/32

ip router ospf UNDERLAY area 0.0.0.0

ip pim sparse-mode

exit

ping 172.16.0.11 source 172.16.0.12

int nve 1

source-interface loo 1

host-reachability protocol bgp

no shutdown

member vni 1002

mcast-group 239.0.0.2

exit

member vni 1003

mcast-group 239.0.0.3

exit

member vni 1000 associate-vrf

end

show nve vni

9 Overlay Configuration Step 4 - BGP EVPN Address Family

spine1 & spine2:

router bgp 65000

address-family l2vpn evpn

retain route-target all

exit

show run | sec bgp

template peer leaf

address-family l2vpn evpn

send-community

send-community extended

route-reflector-client

end

leaf1:

router bgp 65000

address-family l2vpn evpn

exit

neighbor 1.1.1.1

show run | sec bgp

address-family l2vpn evpn

send-community

send-community extended

neighbor 2.2.2.2

address-family l2vpn evpn

send-community

send-community extended

show bgp l2vpn evpn summary

neighbor

1.1.1.1

2.2.2.2

leaf1:

router bgp 65000

address-family l2vpn evpn

exit

neighbor 1.1.1.1

show run | sec bgp

address-family l2vpn evpn

send-community

send-community extended

neghbori 2.2.2.2

address-family l2vpn evpn

send-community

send-community extended

show bgp l2vpn evpn summary

neighbor

1.1.1.1

2.2.2.2

spine1&2:

show bgp l2vpn evpn summary

neighbor

11.11.11.11

12.12.12.12

leaf1:

evpn

vni 1002 l2

rd auto

route-target both auto

exit

vni 1003 l2

rd auto

route-target both auto

end

show run | include evpn

spine1:

show bgp l2vpn evpn

vpc1:

ip 192.168.2.10 24 192.168.2.1

vpc2:

ip 192.168.3.10 24 192.168.3.1

vpc3:

ip 192.168.2.20 24 192.168.2.1

vpc4:

ip 192.168.3.20 24 192.168.3.1

show ip all

#check mac

vpc1 ping vpc3

vpc2 ping vpc4

show ip arp

leaf1:

int vlan 1000

ip forward

end

vpc1 ping vpc4

ping 192.168.3.20

show arp

#the mac is belong to 192.168.2.1, not 192.168.3.20

trace 192.168.3.20

1 192.168.2.1

2 192.168.2.1

3 192.168.3.20

vpc2 ping vpc3

ping 192.168.2.20

leaf1:

show l2route evpn mac-ip all

回复

使用道具 举报

0

主题

28

回帖

135

积分

新手上路

Rank: 1

积分
135
发表于 7 天前 | 显示全部楼层
<p>谢谢楼主分享!!!</p>
回复

使用道具 举报

本版积分规则

Copyright   ©2015-2024  EmulatedLab  Powered by Discuz!©   ( 浙ICP备2021010423号-1 )
快速回复 返回列表 返回顶部