1. 程式人生 > >37-高級路由:BGP選路:優先級 R3 in方向

37-高級路由:BGP選路:優先級 R3 in方向

網段 mar rmi 匹配 4.0 efi 分享圖片 ffffff oca

一、實驗拓撲:
技術分享圖片
二、實驗要求:
基本要求:
1、R1、R2、R3部署EIGRP 90,通告各自網段,R1、R2與R4直連的網段不通告;
2、R1、R2、R3部署BGP AS 123,R4部署BGP AS 4;
3、R1、R2與R3通過環回口建立BGP鄰接,與R4通過直連接口建立BGP鄰接;R1、R2不建立BGP鄰接;
高級要求:
1、用Prefix-list抓取4.4.4.4 流量;

2、調用route-map;
3、route-map 匹配Prefix-list;
4、route-map下重新設置本地優先級;

5、R3在BGP下調用route-map pl in方向;
6、驗證:R3上查看4.4.4.4路由條目是否是R1優先?

三、命令部署:
1、用Prefix-list抓取4.4.4.4 流量
R3(config)#ip prefix-list pl permit 4.4.4.0/24

2、調用route-map
R3(config)#route-map pl permit 10

3、route-map 匹配Prefix-list
R3(config-route-map)#match ip address prefix-list pl

4、route-map下重新設置本地優先級
R3(config-route-map)#set local-preference 103

5、route-map 放行所有
R3(config-route-map)#route-map pl permit 1000

6、R3在BGP下調用route-map pl in
R3(config)#router bgp 123
R3(config-router)#neighbor 1.1.1.1 route-map pl in

四、驗證:
R3#show ip bgp
Network Next Hop Metric LocPrf Weight Path
*>i4.4.4.0/24 1.1.1.1 0 103 0 4 i

  • i 2.2.2.2 0 100 0 4 i

37-高級路由:BGP選路:優先級 R3 in方向