1. 實驗?zāi)康?/h1>
部署MP-BGP EVPN based VXLAN Multi-Site,了解Anycast BGW的工作原理
2. 實驗環(huán)境拓?fù)?/h1>
本實驗采用BGWs on Spine模型
3. 實驗步驟
3.1 設(shè)備配置
由于設(shè)備太占內(nèi)存隅肥,Site1和Site2都只開啟1個BGW雅采。
3.1.1 BGW1-SP1上配置Internal OSPF Underlay
config t
feature ospf
feature pim
router ospf 90
router-id 10.100.100.21
exit
interface loopback 0
ip address 10.100.100.21/32 tag 54321
ip router ospf 90 area 0
ip pim sparse-mode
no shutdown
exit
interface loopback 1
ip address 10.200.200.21/32 tag 54321
ip router ospf 90 area 0
ip pim sparse-mode
no shutdown
exit
interface loopback 100
ip address 10.111.111.1/32 tag 54321
ip router ospf 90 area 0
no shutdown
exit
interface e1/7
no switchport
mtu 9216
ip address 10.1.1.34/30
ip ospf network point-to-point
ip router ospf 90 area 0
ip pim sparse-mode
no shutdown
exit
ip pim rp-address 10.100.100.21 group-list 239.0.0.0/8
3.1.2 BGW1-SP1上配置Internal iBGP overlay
config t
feature bgp
feature nv overlay
nv overlay evpn
evpn multisite border-gateway 111
delay-restore time 300
exit
interface e1/7
evpn multisite fabric-tracking
exit
interface nve1
host-reachability protocol bgp
source-interface loopback 1
multisite border-gateway interface loopback 100
no shutdown
exit
router bgp 65501
router-id 10.100.100.21
neighbor 10.100.100.11
remote-as 65501
update-source loopback 0
address-family l2vpn evpn
send-community both
exit
3.1.3 BGW1-SP1上配置External eBGP Underlay
config t
interface e1/1
no switchport
mtu 9216
ip address 10.52.21.1/30 tag 54321
evpn multisite dci-tracking
no shutdown
exit
route-map RMAP-REDIST-DIRECT permit 10
match tag 54321
exit
router bgp 65501
address-family ipv4 unicast
redistribute direct route-map RMAP-REDIST-DIRECT
maximum-path 4
neighbor 10.52.21.2
remote-as 65036
update-source e1/1
address-family ipv4 unicast
end
3.1.4 BGW1-SP1上配置External eBGP Overlay
config t
router bgp 65501
neighbor 10.52.52.52
remote-as 65036
update-source loopback 0
ebgp-multihop 5
peer-type fabric-external
address-family l2vpn evpn
send-community both
rewrite-evpn-rt-asn
end
3.1.5 RS(eBGP RR)配置
config t
interface e1/1
no switchport
mtu 9216
ip address 10.52.21.2/30
no shutdown
exit
interface e1/3
no switchport
mtu 9216
ip address 20.52.21.2/30
no shutdown
exit
interface loopback0
ip address 10.52.52.52/32
no shutdown
exit
interface loopback1
ip address 20.52.52.52/32
no shutdown
exit
feature bgp
nv overlay evpn
route-map UNCHANGED permit 10
set ip next-hop unchanged
exit
router bgp 65036
address-family ipv4 unicast
network 10.52.52.52 mask 255.255.255.255
network 20.52.52.52 mask 255.255.255.255
address-family l2vpn evpn
retain route-target all
neighbor 10.52.21.1
remote-as 65501
update-source e1/1
address-family ipv4 unicast
exit
neighbor 20.52.21.1
remote-as 65502
update-source e1/3
address-family ipv4 unicast
exit
neighbor 10.100.100.21
remote-as 65501
update-source loopback0
ebgp-multihop 5
address-family l2vpn evpn
send-community both
route-map UNCHANGED out
rewrite-evpn-rt-asn
neighbor 20.100.100.21
remote-as 65502
update-source loopback1
ebgp-multihop 5
address-family l2vpn evpn
send-community both
route-map UNCHANGED out
rewrite-evpn-rt-asn
end
3.1.6 BGW1-SP1上配置L3 Extension
config t
feature vn-segment-vlan-based
feature interface-vlan
vlan 2003
vn-segment 50001
exit
vrf context BLUE
vni 50001
rd auto
address-family ipv4 unicast
route-target both auto
route-target both auto evpn
exit
interface vlan 2003
mtu 9216
vrf member BLUE
no ip redirect
ip forward
no shutdown
exit
interface nve1
member vni 50001 associate-vrf
exit
3.1.7 BGW1-SP1上配置L2 Extension
由于Selevtive advertisement功能默認(rèn)開啟,所以再BGW上沒有定義的L2 extension训挡,即使從RS中接收到相應(yīng)的來vpn evpn條目更新筹裕,也無法發(fā)送給內(nèi)部的BGP鄰居抖僵。
config t
vlan 10
vn-segment 30010
exit
vlan 20
vn-segment 30020
exit
interface nve1
member vni 30010
multisite ingress-replication
mcast-group 239.1.1.0
exit
member vni 30020
multisite ingress-replication
mcast-group 239.2.2.0
exit
exit
evpn
vni 30010 l2
rd auto
route-targe both auto
exit
vni 30020 l2
rd auto
route-targe both auto
exit
exit
3.1.8 可選配置BUM traffic enforcement
config t
evpn storm-control broadcast level 0-100
evpn storm-control multicast level 0-100
evpn storm-control unicast level 0-100
end
補充:
3.1.9 Site1-LEAF1上完成MP-BGP EVPN的配置
Leaf和BGW不同晋渺,本地沒有的VLAN镰绎,就不需要配置對應(yīng)的L2 EVPN。
config t
feature interface-vlan
feature ospf
feature pim
feature bgp
feature nv overlay
feature vn-segment-vlan-based
nv overlay evpn
router ospf 90
router-id 10.100.100.11
exit
interface loopback0
ip address 10.100.100.11/32
ip router ospf 90 area 0
ip pim sparse-mode
no shutdown
exit
interface loopback1
ip address 10.200.200.11/32
ip router ospf 90 area 0
ip pim sparse-mode
no shutdown
exit
interface e1/1
no switchport
mtu 9216
ip address 10.1.1.33/30
ip ospf network point-to-point
ip router ospf 90 area 0
ip pim sparse-mode
no shutdown
exit
ip pim rp-address 10.100.100.21 group-list 239.0.0.0/8
vlan 2003
vn-segment 50001
exit
vrf context BLUE
vni 50001
rd auto
address-family ipv4 unicast
route-target both auto
route-target both auto evpn
exit
exit
interface vlan 2003
mtu 9216
vrf member BLUE
no ip redirect
no shutdown
ip forward
exit
vlan 10
vn-segment 30010
exit
evpn
vni 30010 l2
rd auto
route-target both auto
exit
exit
interface nve1
host-reachability protoco1 bgp
source-interface loopback1
member vni 50001 associate-vrf
exit
member vni 30010
mcast-group 239.1.1.0
exit
no shutdown
exit
fabric forwarding anycast-gateway-mac 0002.0002.0002
router bgp 65501
router-id 10.100.100.11
address-family ipv4 unicast
exit
address-family l2vpn evpn
exit
neighbor 10.100.100.21
remote-as 65501
update-source loopback0
address-family l2vpn evpn
send-community
exit
exit
vrf BLUE
address-family ipv4 unicast
exit
interface vlan 10
vrf member BLUE
ip address 192.168.10.1/24
fabric forwarding mode anycast-gateway
no shutdown
exit
interface e1/3
switchport
switch mode access
switch access vlan 10
no shutdown
end
3.1.10 Switch1配置
vlan 10
exit
interface vlan 10
ip address 192.168.10.101 255.255.255.0
no shutdown
exit
interface gigabitEthernet 0/0
switch mode access
switch access vlan 10
exit
ip route 0.0.0.0 0.0.0.0 192.168.10.1
3.2 Site1配置檢查
BGW1-SP1
show nve interface nve1 detail
show nve multisite dci-links
show nve multisite fabric-links
show nve ethernet-segment
show bgp l2vpn evpn route-type 4
show nve vni
show nve peer
show bgp ipv4 unicast summary
show bgp l2vpn evpn summary
Site1-Leaf1
show nve vni
show nve peer
RS
show bgp l2vpn evpn
3.3 Site2配置參考
3.3.1 BGW2-SP1的配置
config t
feature ospf
feature pim
router ospf 90
router-id 20.100.100.21
exit
interface loopback 0
ip address 20.100.100.21/32 tag 54321
ip router osp 90 area 0
ip pim sparse-mode
no shutdown
exit
interface loopback1
ip address 20.200.200.21/32 tag 54321
ip router ospf 90 area 0
ip pim sparse-mode
no shutdown
exit
interface loopback100
ip address 20.111.111.1/32 tag 54321
ip router ospf 90 area 0
no shutdown
exit
interface e1/7
no switchport
mtu 9216
ip address 20.1.1.34/30
ip ospf network point-to-point
ip router ospf 90 area 0
ip pim sparse-mode
no shutdown
exit
ip pim rp-address 20.100.100.21 group-list 239.0.0.0/8
feature bgp
feature nv overlay
nv overlay evpn
evpn multisite border-gateway 222
delay-restore time 300
exit
interface e1/7
evpn multisite fabric-tracking
exit
interface nve1
host-reachability protoco1 bgp
source-interface loopback1
multisite border-gateway interface loopback100
no shutdown
exit
router bgp 65502
neighbor 20.100.100.11
remote-as 65502
update-source loopback0
address-family l2vpn evpn
send-community
exit
interface e1/1
no switchport
mtu 9216
ip address 20.52.21.1/30 tag 54321
evpn multisite dci-tracking
no shutdown
exit
route-map RMAP-REDIST-DIRECT permit 10
match tag 54321
exit
router bgp 65502
router-id 20.100.100.21
address-family ipv4 unicast
redistribute direct route-map RMAP-REDIST-DIRECT
maximum-path 4
neighbor 20.52.21.2
remote-as 65036
update-source e1/1
address-family ipv4 unicast
exit
exit
router bgp 65502
neighbor 20.52.52.52
remote-as 65036
update-source loopback0
ebgp-multihop 5
peer-type fabric-external
address-family l2vpn evpn
send-community both
rewrite-evpn-rt-asn
exit
exit
exit
feature vn-segment-vlan-based
feature interface-vlan
vlan 2003
vn-segment 50001
exit
vrf context BLUE
vni 50001
rd auto
address-family ipv4 unicast
route-target both auto
route-target both auto evpn
exit
exit
interface vlan 2003
mtu 9216
vrf member BLUE
no ip redirect
no shutdown
ip forward
exit
interface nve1
member vni 50001 associate-vrf
exit
vlan 10
vn-segment 30010
exit
vlan 20
vn-segment 30020
exit
interface nve1
member vni 30010
multisite ingress-replication
mcast-group 239.1.1.0
exit
member vni 30020
multisite ingress-replication
mcast-group 239.2.2.0
exit
exit
evpn
vni 30010 l2
rd auto
route-target both auto
exit
vni 30020 l2
rd auto
route-targe both auto
exit
exit
注意:
BGW2-SP1上檢查配置vpn multisite border-gateway 222木西,若誤配為111畴栖,則最后路由分發(fā)和轉(zhuǎn)載沒有問題,但是回PING不同八千。并將誤配修改為正確后吗讶,還需要重啟BGW2-SP1才能往前有效,通過Switch能夠互相PING通恋捆。
3.3.2 Site2-Leaf1的配置
config t
feature interface-vlan
feature ospf
feature pim
feature bgp
feature nv overlay
feature vn-segment-vlan-based
nv overlay evpn
router ospf 90
router-id 20.100.100.11
exit
interface loopback0
ip addres 20.100.10.11/32
ip router ospf 90 area 0
ip pim sparse-mode
no shutdown
exit
interface loopback1
ip address 20.200.200.11/32
ip router ospf 90 area 0
ip pim sparse-mode
no shutdown
exit
interface e1/1
no switchport
mtu 9216
ip address 20.1.1.33/30
ip ospf network point-to-point
ip router ospf 90 area 0
ip pim sparse-mode
no shutdown
exit
ip pim rp-address 20.100.100.21 group-list 239.0.0.0/8
vlan 2003
vn-segment 50001
exit
vrf context BLUE
vni 50001
rd auto
address-family ipv4 unicast
route-target both auto
route-target both auto evpn
exit
interface vlan 2003
mtu 9216
vrf member BLUE
no ip redirect
ip forward
no shutdown
exit
vlan 10
vn-segment 30010
exit
vlan 20
vn-segment 30020
exit
evpn
vni 30010 l2
rd auto
route-target both auto
exit
vni 30020 l2
rd auto
route-target both auto
exit
exit
interface nve1
host-reachability protocol bgp
source-interface loopback1
member vni 50001 associate-vrf
exit
member vni 30010
mcast-group 239.1.1.0
exit
member vni 30020
mcast-group 239.1.1.0
exit
no shutdown
exit
fabri forwarding anycast-gateway-mac 0002.0002.0002
router bgp 65502
router-id 20.100.100.11
address-family ipv4 unicast
exit
address-family l2vpn evpn
exit
neighbor 20.100.100.21
remote-as 65502
update-source loopback0
address-family l2vpn evpn
send-community both
exit
exit
vrf BLUE
address-family ipv4 unicast
exit
interface vlan 10
vrf member BLUE
ip address 192.168.10.1/24
fabric forwarding mode anycast-gateway
no shutdown
exit
exit
interface vlan 20
vrf member BLUE
ip addres 192.168.20.1/24
fabric forwarding mode anycast-gateway
no shutdown
exit
interface e1/3
switch
switch mode access
switch access vlan 10
no shutdown
exit
interface e1/4
switch
switch mode access
switch access vlan 20
no shutdown
end
3.3.3 Switch2配置
vlan 10
exit
interface vlan 10
ip address 192.168.10.102 255.255.255.0
no shutdown
exit
interface gigabitEthernet 0/0
switch mode access
switch access vlan 10
exit
ip route 0.0.0.0 0.0.0.0 192.168.10.1
3.3.4 Switch3配置
vlan 20
exit
interface vlan 20
ip address 192.168.20.102 255.255.255.0
no shutdown
exit
interface gigabitEthernet 0/0
switch mode access
switch access vlan 10
exit
ip route 0.0.0.0 0.0.0.0 192.168.20.1
4. Site1與Site2互通檢查
通過Site1 Switch1(192.168.10.101)PING Site2 Switch2(192.168.10.102)和Switch3 (192.168.20.102)照皆,測試子網(wǎng)Bridging和跨子網(wǎng)Routing
通過Site2 Switch2(192.168.10.102)PING Site2 Switch3 (192.168.20.102),測試跨子網(wǎng)Routing
檢查Site2-Leaf1上的VRF路由
檢查Site1-Leaf1上的VRF路由
檢查RS上的完整L2VPN EVPN條目