Lab Soo

Lab:

 

 

r7#show ip bgp
BGP table version is 19, local router ID is 7.7.7.7
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
r i7.7.7.7/32 56.1.1.5 0 100 0 100 100 i
r> 57.1.1.5 32769 100 100 i
r 0.0.0.0 0 32768 i
使用以下命令让R7能够从R5和R6地方学习到自发路由7.7.7.7/32并设置权重为32769,让R7优选R5作为传输路径
ip prefix-list F7 seq 5 permit 7.7.7.7/32
route-map w permit 10
match ip address prefix-list F7
set weight 32769
router bgp 16
neighbor 57.1.1.5 route-map w in

step 7:在R6所在区域加入R7,并用R7的物理接口与R5/R6建立eBGP和iBGP关系
step 8:R5的VRF中对BGP邻居R7做as-override
step 9:R5上给从R7 / R6学习过来的路由设置同样的SoO = 6:7
ip prefix-list R7 seq 5 permit 7.7.7.7/32
ip prefix-list R7 seq 10 permit 172.16.0.0/20 ge 24 le 24
route-map F7 permit 10
match ip address prefix-list R7
set extcommunity soo 6:7
route-map F7 permit 20
router bg 100
address-family ipv4 vrf R6
nei 57.1.1.7 route-map F7 in
nei 56.1.1.6 route-map F7 in

*其中soo是用于在打破BGP水平分割前提下的防环机制
r7#show ip bgp
BGP table version is 53, local router ID is 7.7.7.7
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 7.7.7.7/32 0.0.0.0 0 32768 i
*> 10.1.1.0/24 57.1.1.5 0 100 100 i
* i 56.1.1.5 0 100 0 100 100 i
*> 10.1.2.0/24 57.1.1.5 0 100 100 i
* i 56.1.1.5 0 100 0 100 100 i
*> 10.1.3.0/24 57.1.1.5 0 100 100 i
* i 56.1.1.5 0 100 0 100 100 i
*>i172.16.6.0/24 67.1.1.6 0 100 0 i
*>i172.16.7.0/24 67.1.1.6 0 100 0 i
*>i172.16.8.0/24 67.1.1.6 0 100 0 i

r5#show ip bg vpnv4 all 7.7.7.7
BGP routing table entry for 100:6:7.7.7.7/32, version 37
Paths: (2 available, best #2, table R6)
Advertised to update-groups:
16
16
56.1.1.6 from 56.1.1.6 (6.6.6.6)
Origin IGP, localpref 100, valid, external
Extended Community: SoO:6:7 RT:6:6
mpls labels in/out 5005/nolabel
16
57.1.1.7 from 57.1.1.7 (7.7.7.7)
Origin IGP, metric 0, localpref 100, valid, external, best
Extended Community: SoO:6:7 RT:6:6
mpls labels in/out 5005/nolabel
由上述实验结果可以看出,当7.7.7.7/32到达AS 100区域就会给设置soo:6:7,因为连接AS 16的两个出接口都启用了soo检测,所以7.7.7.7/32不会像指定策略之前那样再次进入AS 16通过R6传递给R7

总结:
当为某个邻居学习过来的路由条目设置soo时,默认就启用了soo检测机制(也就是向该邻居发送更新的同时要检测所更新的条目是否带有soo),检测流程如下:

 

 

posted @ 2020-04-30 09:39  cyrusxx  阅读(211)  评论(0编辑  收藏  举报