BGP选路原则详解(不错的)课件.ppt
《BGP选路原则详解(不错的)课件.ppt》由会员分享,可在线阅读,更多相关《BGP选路原则详解(不错的)课件.ppt(111页珍藏版)》请在三一办公上搜索。
1、BGP路由选路原则详解V1.0,学习总结,个人见解,如有错误欢迎改正!,学习目标,掌握BGP十三条选路原则的原理熟练掌握常见的BGP路由选路原则,BGP路由选路原则,1.Weight属性,2.Local Preference属性,3.本地路由始发方式,4.AS-Path长度,5.Origin属性,6.MED属性,7.EBGP优于IBGP,8.到达Next-hop的代价,9.执行等价负载均衡,10.EBGP路由接收的顺序,11.路由的Router-ID,12.Cluster-list长度,13.配置的BGP Peer指定地址,第一条:Weight属性,比较原则及配置注意事项:Cisco私有,可通
2、过关联Route-map方式进行配置,该值无法传递给其他BGP Peer,只能在本地使用.携带的Weight值越大,则该路由越优先. 本地始发路由的默认值是32768,从其他BGP Peer学习过来的路由的默认值是0虽然Weight属性是Cisco私有的,但是很多厂商也是内置该属性(但无法显示及修改),这样就保证了本地始发的路由是最优先的,因为本地始发路由的”Weight”为32768,从其他BGP Peer学习过来的路由的”Weight”为0.,第一条:Weight属性,实验验证R2、R3分别通告10.0.0.0给R1R1将10.0.0.0使用network方式引入BGP,10.0.0.0/
3、8,10.0.0.0/8,10.0.0.0/8,AS 1,AS 2,R3,R1,R2,IBGP,EBGP,第一条:Weight属性,实验验证R1的BGP表,r1#sh ip bgp BGP table version is 2, local router ID is 9.9.0.1Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next
4、 Hop Metric LocPrf Weight Path* i10.0.0.0 9.9.13.3 0 100 0 i* 9.9.12.2 0 0 2 i* 0.0.0.0 0 32768 i,第一条:Weight属性,实验验证R1对BGP Peer应用不同的Route-map修改所学习路由的Weight值,10.0.0.0/8,10.0.0.0/8,10.0.0.0/8,AS 1,AS 2,R3,R1,R2,IBGP,EBGP,router bgp 1 -R1的路由策略neighbor 9.9.12.2 route-map FROM_R2 inroute-map FROM_R2 permi
5、t 10 set weight 65535,第一条:Weight属性,实验验证R1的BGP表选路结果,r1#sh ip bgpBGP table version is 7, local router ID is 9.9.0.1Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Pa
6、thr i10.0.0.0 9.9.13.3 0 100 0 ir 9.9.12.2 0 65535 2 ir 0.0.0.0 0 32768 i,BGP路由选路原则,1.Weight属性,2.Local Preference属性,3.本地路由始发方式,4.AS-Path长度,5.Origin属性,6.MED属性,7.EBGP优于IBGP,8.到达Next-hop的代价,9.执行等价负载均衡,10.EBGP路由接收的顺序,11.路由的Router-ID,12.Cluster-list长度,13.配置的BGP Peer指定地址,第二条:Local Preference属性,比较原则及配置注意事项
7、:值越大,越优先默认情况下,本地始发的路由的LP为100,从EBGP Peer接收的路由的LP为100.Local Preference属性只能在IBGP Peer之间传递,不能在EBGP Peer之间传递,如果在EBGP Peer之间收到的路由的路径属性中携带了Local Preference,则会触发Notifacation报文,造成会话中断,第二条:Local Preference属性,比较原则及配置注意事项:Local Preference通过如下三种方法进行设置:通过将IGP路由引入BGP时关联Route-map进行设置针对IBGP Peer应用IN/OUT方向的Route-map,
8、对从Peer接收到的或者通告给Peer的所有或部分路由进行设置针对EBGP Peer应用IN方向的Route-map,对从Peer接收到的所有或部分路由进行设置Local Preference为BGP选路策略中经常使用的一个路径属性,第二条:Local Preference属性,实验一:Local Prefenerce无法在EBGP Peer之间传递,R1,R2,AS 1,AS 2,10.0.0.0/8,EBGP,router bgp 2 network 10.0.0.0 neighbor 9.9.12.1 remote-as 1 neighbor 9.9.12.1 route-map TO_
9、R1 out!route-map TO_R1 permit 10 set local-preference 500,第二条:Local Preference属性,实验一:Local Prefenerce无法在EBGP Peer之间传递查看本地始发的BGP路由的LP值,r2#show ip bgp BGP table version is 2, local router ID is 9.9.0.2Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleO
10、rigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path* 10.0.0.0 0.0.0.0 0 32768 i,空值?,r2#sh ip b 10.0.0.0BGP routing table entry for 10.0.0.0/8, version 2Paths: (1 available, best #1, table Default-IP-Routing-Table) Advertised to non peer-group peers: 9.9.12.1 Loca
11、l 0.0.0.0 from 0.0.0.0 (9.9.0.2) Origin IGP, metric 0, localpref 100, weight 32768, valid, sourced, local, best,第二条:Local Preference属性,实验一:Local Prefenerce无法在EBGP Peer之间传递R2通告给R1的BGP路由是否携带LP?,r1#sh ip bgp BGP table version is 2, local router ID is 9.9.0.1Status codes: s suppressed, d damped, h histo
12、ry, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path* 10.0.0.0 9.9.12.2 0 0 2 i,500没有传递?,r2#sh ip bgp neighbors 9.9.12.1 advertised-routes BGP table version is 2, local router ID is 9.9.0.2Status codes: s sup
13、pressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path* 10.0.0.0 0.0.0.0 0 32768 i,第二条:Local Preference属性,实验一:Local Prefenerce无法在EBGP Peer之间传递R2通告给R1的BGP Update报文,R2通告的10.0.0.0/8前缀的路径属
14、性中不包含Local Preference属性,第二条:Local Preference属性,实验二:修改本地始发路由的默认LP值,R1,R2,AS 1,10.0.0.0/8,IBGP,router bgp 1 -R2的路由策略 bgp default local-preference 500 network 10.0.0.0 neighbor 9.9.12.1 remote-as 1,第二条:Local Preference属性,实验二:修改本地始发路由的默认LP值,r2#sh ip b BGP table version is 2, local router ID is 10.0.0.1S
15、tatus codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path* 10.0.0.0 0.0.0.0 0 32768 i,空值?,r2#sh ip b 10.0.0.0BGP routing table entry for 10.0.0.0/8, version 2Paths: (1 a
16、vailable, best #1, table Default-IP-Routing-Table) Advertised to non peer-group peers: 9.9.12.1 Local 0.0.0.0 from 0.0.0.0 (10.0.0.1) Origin IGP, metric 0, localpref 500, weight 32768, valid, sourced, local, best,第二条:Local Preference属性,实验二:修改本地始发路由的默认LP值,r1#sh ip b BGP table version is 4, local rout
17、er ID is 9.9.0.1Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path*i10.0.0.0 9.9.12.2 0 500 0 i,第二条:Local Preference属性,实验三:将IGP中的路由引入BGP时关联Route-map设置LP,R1,R2,AS
18、 1,10.0.0.0/8,IBGP,router bgp 1 -R2的路由策略 network 10.0.0.0 route-map SET_LP neighbor 9.9.12.1 remote-as 1!route-map SET_LP permit 10 set local-preference 400,第二条:Local Preference属性,实验三:将IGP中的路由引入BGP时关联Route-map设置LP,r2#sh ip b BGP table version is 3, local router ID is 10.0.0.1Status codes: s suppress
19、ed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path* 10.0.0.0 0.0.0.0 0 400 32768 i,r1#sh ip bBGP table version is 6, local router ID is 9.9.0.1Status codes: s suppressed, d damped, h hi
20、story, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path*i10.0.0.0 9.9.12.2 0 400 0 i,第二条:Local Preference属性,实验四:对IBGP Peer应用IN/OUT方向Route-mapR3单向访问R6的数据流需求R1R2对R3应用OUT方向Route-map,R1,AS 1,R2,R3,R4,R5,R6,AS 2,以
21、该方式部署策略,对数据流控制的作用范围,10.0.0.0/8,11.0.0.0/8,EBGP,第二条:Local Preference属性,实验四:对IBGP Peer应用IN/OUT方向Route-mapR4、R5正常通告R6的路由,R1、R2的BGP表,R1,AS 1,R2,R3,R4,R5,R6,AS 2,10.0.0.0/8,11.0.0.0/8,EBGP,r1#sh ip bgp Network Next Hop Metric LocPrf Weight Path* 10.0.0.0 9.9.15.5 0 2 i* 9.9.14.4 0 2 i* 11.0.0.0 9.9.15.5
22、0 2 i* 9.9.14.4 0 2 i,r2#sh ip bgp Network Next Hop Metric LocPrf Weight Path* 10.0.0.0 9.9.25.5 0 2 i* 9.9.24.4 0 2 i* 11.0.0 9.9.25.5 0 2 i* 9.9.24.4 0 2 i,IBGP,IBGP,IBGP,IBGP,第二条:Local Preference属性,实验四:对IBGP Peer应用IN/OUT方向Route-mapR1、R2的路由策略,router bgp 1 -R1的路由策略 neighbor 9.9.13.3 route-map TO_R3
23、 outaccess-list 1 permit 10.0.0.0access-list 2 permit 11.0.0.0route-map TO_R3 permit 10 match ip address 1 set local-preference 500route-map TO_R3 permit 20 match ip address 2 set local-preference 400,router bgp 1 -R2的路由策略 neighbor 9.9.23.3 route-map TO_R3 outaccess-list 1 permit 10.0.0.0access-list
24、 2 permit 11.0.0.0route-map TO_R3 permit 10 match ip address 1 set local-preference 400route-map TO_R3 permit 20 match ip address 2 set local-preference 500,R1,AS 1,R2,R3,R4,R5,R6,AS 2,10.0.0.0/8,11.0.0.0/8,EBGP,IBGP,IBGP,IBGP,IBGP,第二条:Local Preference属性,实验四:对IBGP Peer应用IN/OUT方向Route-mapR3的路由选路结果,r3
25、#sh ip b BGP table version is 6, local router ID is 9.9.0.3Status codes: s suppressed, d damped, h history, * valid, best, i - internal, r RIB-failure, S StaleOrigin codes: i - IGP, e - EGP, ? - incomplete Network Next Hop Metric LocPrf Weight Path* i10.0.0.0 9.9.23.2 0 400 0 2 i*i 9.9.13.1 0 500 0
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- BGP 原则 详解 不错 课件
链接地址:https://www.31ppt.com/p-1375394.html