最新BGP選路原則詳解(不錯(cuò)的文檔)_第1頁(yè)
最新BGP選路原則詳解(不錯(cuò)的文檔)_第2頁(yè)
最新BGP選路原則詳解(不錯(cuò)的文檔)_第3頁(yè)
最新BGP選路原則詳解(不錯(cuò)的文檔)_第4頁(yè)
最新BGP選路原則詳解(不錯(cuò)的文檔)_第5頁(yè)
已閱讀5頁(yè),還剩106頁(yè)未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說(shuō)明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id1bgpbgp路由選路原則詳解路由選路原則詳解v1.0v1.0學(xué)習(xí)總結(jié),個(gè)人見(jiàn)解,如有錯(cuò)誤歡迎改正! 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id2學(xué)習(xí)目標(biāo)學(xué)習(xí)目標(biāo) 掌握bgp十三條選路原則的原理 熟練掌握常見(jiàn)的bgp路由選路原則 2007 cisco systems, inc. all rights reserved.cisc

2、o confidentialpresentation_id3bgp路由選路原則路由選路原則1.weight1.weight屬性屬性2.local preference2.local preference屬性屬性3.3.本地路由始發(fā)方式本地路由始發(fā)方式4.as-path4.as-path長(zhǎng)度長(zhǎng)度5.origin5.origin屬性屬性6.med6.med屬性屬性7.ebgp7.ebgp優(yōu)于優(yōu)于ibgpibgp8.8.到達(dá)到達(dá)next-hopnext-hop的代價(jià)的代價(jià)9.9.執(zhí)行等價(jià)負(fù)載均衡執(zhí)行等價(jià)負(fù)載均衡10.ebgp10.ebgp路由接收的順序路由接收的順序11.11.路由的路由的route

3、r-idrouter-id12.cluster-list12.cluster-list長(zhǎng)度長(zhǎng)度13.13.配置的配置的bgp peerbgp peer指定地址指定地址 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id4第一條第一條:weight屬性屬性 比較原則及配置注意事項(xiàng):cisco私有,可通過(guò)關(guān)聯(lián)route-map方式進(jìn)行配置,該值無(wú)法傳遞給其他bgp peer,只能在本地使用.攜帶的weight值越大,則該路由越優(yōu)先. 本地始發(fā)路由的默認(rèn)值是32768,從其他bgp peer學(xué)習(xí)

4、過(guò)來(lái)的路由的默認(rèn)值是0雖然weight屬性是cisco私有的,但是很多廠商也是內(nèi)置該屬性(但無(wú)法顯示及修改),這樣就保證了本地始發(fā)的路由是最優(yōu)先的,因?yàn)楸镜厥及l(fā)路由的”weight”為32768,從其他bgp peer學(xué)習(xí)過(guò)來(lái)的路由的”weight”為0. 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id5第一條第一條:weight屬性屬性 實(shí)驗(yàn)驗(yàn)證r2、r3分別通告10.0.0.0給r1r1將10.0.0.0使用network方式引入bgp10.0.0.0/810.0.0.0/810.

5、0.0.0/8as 1as 2r3r1r2ibgpebgp 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id6第一條第一條:weight屬性屬性 實(shí)驗(yàn)驗(yàn)證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 stal

6、eorigin codes: i - igp, e - egp, ? - incomplete network next 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 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id7第一條第一條:weight屬性屬性 實(shí)驗(yàn)驗(yàn)證r1對(duì)bgp peer應(yīng)用不同的route-map修改所學(xué)習(xí)路由的weight值1

7、0.0.0.0/810.0.0.0/810.0.0.0/8as 1as 2r3r1r2ibgpebgprouter bgp 1 -r1的路由策略的路由策略neighbor 9.9.12.2 route-map from_r2 inroute-map from_r2 permit 10 set weight 65535 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id8第一條第一條:weight屬性屬性 實(shí)驗(yàn)驗(yàn)證r1的bgp表選路結(jié)果r1#sh ip bgpbgp table versio

8、n 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 pathr 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 2007

9、cisco systems, inc. all rights reserved.cisco confidentialpresentation_id9bgp路由選路原則路由選路原則1.weight1.weight屬性屬性2.local preference2.local preference屬性屬性3.3.本地路由始發(fā)方式本地路由始發(fā)方式4.as-path4.as-path長(zhǎng)度長(zhǎng)度5.origin5.origin屬性屬性6.med6.med屬性屬性7.ebgp7.ebgp優(yōu)于優(yōu)于ibgpibgp8.8.到達(dá)到達(dá)next-hopnext-hop的代價(jià)的代價(jià)9.9.執(zhí)行等價(jià)負(fù)載均衡執(zhí)行等價(jià)負(fù)載均衡1

10、0.ebgp10.ebgp路由接收的順序路由接收的順序11.11.路由的路由的router-idrouter-id12.cluster-list12.cluster-list長(zhǎng)度長(zhǎng)度13.13.配置的配置的bgp peerbgp peer指定地址指定地址 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id10第二條第二條:local preference屬性屬性 比較原則及配置注意事項(xiàng):值越大,越優(yōu)先默認(rèn)情況下,本地始發(fā)的路由的lp為100,從ebgp peer接收的路由的lp為100.l

11、ocal preference屬性只能在ibgp peer之間傳遞,不能在ebgp peer之間傳遞,如果在ebgp peer之間收到的路由的路徑屬性中攜帶了local preference,則會(huì)觸發(fā)notifacation報(bào)文,造成會(huì)話中斷 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id11第二條第二條:local preference屬性屬性 比較原則及配置注意事項(xiàng):local preference通過(guò)如下三種方法進(jìn)行設(shè)置:通過(guò)將igp路由引入bgp時(shí)關(guān)聯(lián)route-map進(jìn)行設(shè)置

12、針對(duì)ibgp peer應(yīng)用in/out方向的route-map,對(duì)從peer接收到的或者通告給peer的所有或部分路由進(jìn)行設(shè)置針對(duì)ebgp peer應(yīng)用in方向的route-map,對(duì)從peer接收到的所有或部分路由進(jìn)行設(shè)置local preference為bgp選路策略中經(jīng)常使用的一個(gè)路徑屬性 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id12第二條第二條:local preference屬性屬性 實(shí)驗(yàn)一:local prefenerce無(wú)法在ebgp peer之間傳遞r1r2as

13、1as 210.0.0.0/8ebgprouter bgp 2 network 10.0.0.0 neighbor 9.9.12.1 remote-as 1 neighbor 9.9.12.1 route-map to_r1 out!route-map to_r1 permit 10 set local-preference 500 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id13第二條第二條:local preference屬性屬性 實(shí)驗(yàn)一:local prefenerce無(wú)法在e

14、bgp peer之間傳遞查看本地始發(fā)的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 staleorigin codes: i - igp, e - egp, ? - incomplete network next hop metric locprf weight path* 10.0.0.0 0.0.0.0

15、 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 local 0.0.0.0 from 0.0.0.0 (9.9.0.2) origin igp, metric 0, localpref 100, weight 32768, valid, sourced, loca

16、l, best 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id14第二條第二條:local preference屬性屬性 實(shí)驗(yàn)一:local prefenerce無(wú)法在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 history, * valid, best, i

17、 - 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 i500500沒(méi)有傳遞沒(méi)有傳遞? ?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 suppressed, d da

18、mped, 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 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id15第二條第二條:local preference屬性屬性 實(shí)驗(yàn)一:lo

19、cal prefenerce無(wú)法在ebgp peer之間傳遞r2通告給r1的bgp update報(bào)文r2通告的通告的10.0.0.0/8前綴的路徑屬性中不包含前綴的路徑屬性中不包含local preference屬性屬性 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id16第二條第二條:local preference屬性屬性 實(shí)驗(yàn)二:修改本地始發(fā)路由的默認(rèn)lp值r1r2as 110.0.0.0/8ibgprouter bgp 1 -r2的路由策略的路由策略 bgp default lo

20、cal-preference 500 network 10.0.0.0 neighbor 9.9.12.1 remote-as 1 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id17第二條第二條:local preference屬性屬性 實(shí)驗(yàn)二:修改本地始發(fā)路由的默認(rèn)lp值r2#sh ip b bgp table version is 2, local router id is 10.0.0.1status codes: s suppressed, d damped, h histor

21、y, * 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 available, best #1, table default-ip-routing

22、-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 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id18第二條第二條:local preference屬性屬性 實(shí)驗(yàn)二:修改本地始發(fā)路由的默認(rèn)lp值r1#s

23、h ip b bgp table version is 4, 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 path*i10.0.0.0 9.9.12.2 0 500 0 i 2007 cisco systems, inc.

24、 all rights reserved.cisco confidentialpresentation_id19第二條第二條:local preference屬性屬性 實(shí)驗(yàn)三:將igp中的路由引入bgp時(shí)關(guān)聯(lián)route-map設(shè)置lpr1r2as 110.0.0.0/8ibgprouter 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 2007 cisco systems

25、, inc. all rights reserved.cisco confidentialpresentation_id20第二條第二條:local preference屬性屬性 實(shí)驗(yàn)三:將igp中的路由引入bgp時(shí)關(guān)聯(lián)route-map設(shè)置lpr2#sh ip b bgp table version is 3, local router id is 10.0.0.1status codes: s suppressed, d damped, h history, * valid, best, i - internal, r rib-failure, s staleorigin codes: i

26、 - igp, e - egp, ? - incomplete network next hop metric locprf weight path* 10.0.0.0 0.0.0.0 0 400 32768 ir1#sh ip bbgp table version is 6, 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, ?

27、- incomplete network next hop metric locprf weight path*i10.0.0.0 9.9.12.2 0 400 0 i 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id21第二條第二條:local preference屬性屬性 實(shí)驗(yàn)四:對(duì)ibgp peer應(yīng)用in/out方向route-mapr3單向訪問(wèn)r6的數(shù)據(jù)流需求r1r2對(duì)r3應(yīng)用out方向route-mapr1as 1r2r3r4r5r6as 2以該方式部署策略以該方式部署策略,

28、對(duì)對(duì)數(shù)據(jù)流控制的作用范圍數(shù)據(jù)流控制的作用范圍10.0.0.0/811.0.0.0/8ebgp 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id22第二條第二條:local preference屬性屬性 實(shí)驗(yàn)四:對(duì)ibgp peer應(yīng)用in/out方向route-mapr4、r5正常通告r6的路由,r1、r2的bgp表r1as 1r2r3r4r5r6as 210.0.0.0/811.0.0.0/8ebgpr1#sh ip bgp network next hop metric locprf

29、 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 0 2 i* 9.9.14.4 0 2 ir2#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 iibgpibgpibgpibgp 2007 cisco systems, inc. all rights reserved.cisco con

30、fidentialpresentation_id23第二條第二條:local preference屬性屬性 實(shí)驗(yàn)四:對(duì)ibgp peer應(yīng)用in/out方向route-mapr1、r2的路由策略router bgp 1 -r1的路由策略的路由策略 neighbor 9.9.13.3 route-map to_r3 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

31、_r3 permit 20 match ip address 2 set local-preference 400router bgp 1 -r2的路由策略的路由策略 neighbor 9.9.23.3 route-map to_r3 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 400route-map to_r3 permit 20 match ip address 2 set loc

32、al-preference 500r1as 1r2r3r4r5r6as 210.0.0.0/811.0.0.0/8ebgpibgpibgpibgpibgp 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id24第二條第二條:local preference屬性屬性 實(shí)驗(yàn)四:對(duì)ibgp peer應(yīng)用in/out方向route-mapr3的路由選路結(jié)果r3#sh ip b bgp table version is 6, local router id is 9.9.0.3status code

33、s: 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 2 i*i11.0.0.0 9.9.23.2 0 500 0 2 i* i 9.9.13.1 0 400 0 2 ir1as 1r2r3r4

34、r5r6as 210.0.0.0/811.0.0.0/8ebgpibgpibgpibgpibgp 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id25第二條第二條:local preference屬性屬性 實(shí)驗(yàn)四:對(duì)ibgp peer應(yīng)用in/out方向route-map路由策略結(jié)果:r3到r6的實(shí)際單向數(shù)據(jù)流r1as 1r2r3r4r5r6as 210.0.0.0/811.0.0.0/8ebgp以該方式部署策略以該方式部署策略,對(duì)對(duì)數(shù)據(jù)流控制的作用范圍數(shù)據(jù)流控制的作用范圍 2007 c

35、isco systems, inc. all rights reserved.cisco confidentialpresentation_id26第二條第二條:local preference屬性屬性 實(shí)驗(yàn)五:對(duì)ebgp peer應(yīng)用in方向route-mapr3單向訪問(wèn)r6的數(shù)據(jù)流需求r1r2分別對(duì)r4r5應(yīng)用out方向的route-mapr1as 1r2r3r4r5r6as 2以該方式部署策略以該方式部署策略,對(duì)對(duì)數(shù)據(jù)流控制的作用范圍數(shù)據(jù)流控制的作用范圍10.0.0.0/811.0.0.0/8ebgp 2007 cisco systems, inc. all rights reserve

36、d.cisco confidentialpresentation_id27第二條第二條:local preference屬性屬性 實(shí)驗(yàn)五:對(duì)ebgp peer應(yīng)用in方向route-mapr1、r2的路由策略router bgp 1 -r1的路由策略的路由策略 neighbor 9.9.14.4 route-map from_r4 inaccess-list 1 permit 10.0.0.0route-map from_r4 permit 10 match ip address 1 set local-preference 500route-map from_r4 permit 20rout

37、er bgp 1 -r2的路由策略的路由策略 neighbor 9.9.25.5 route-map from_r5 inaccess-list 2 permit 11.0.0.0route-map from_r5 permit 10 match ip address 2 set local-preference 500route-map from_r5 permit 20r1as 1r2r3r4r5r6as 210.0.0.0/811.0.0.0/8ebgpibgpibgpibgpibgp 2007 cisco systems, inc. all rights reserved.cisco

38、confidentialpresentation_id28第二條第二條:local preference屬性屬性 實(shí)驗(yàn)五:對(duì)ebgp peer應(yīng)用in方向route-mapr1、r2的bgp表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 500 0 2 i* 11.0.0.0 9.9.14.4 0 2 i* 9.9.15.5 0 2 ir2#sh ip bgp network next hop metric locprf weight path* 10.0.0

39、.0 9.9.25.5 0 2 i* 9.9.24.4 0 2 i* 11.0.0.0 9.9.25.5 500 0 2 i* 9.9.24.4 0 2 ir1as 1r2r3r4r5r6as 210.0.0.0/811.0.0.0/8ebgpibgpibgpibgpibgp 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id29第二條第二條:local preference屬性屬性 實(shí)驗(yàn)五:對(duì)ebgp peer應(yīng)用in方向route-mapr3的bgp表r3#sh ip bgp bgp

40、table version is 10, 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 100 0 2 i*i 9.9.13.1 0 500 0 2 i*i11.0.0.

41、0 9.9.23.2 0 500 0 2 i* i 9.9.13.1 0 100 0 2 ir1as 1r2r3r4r5r6as 210.0.0.0/811.0.0.0/8ebgpibgpibgpibgpibgp 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id30第二條第二條:local preference屬性屬性 實(shí)驗(yàn)五:對(duì)ebgp peer應(yīng)用in方向route-map路由策略結(jié)果:r3到r6的實(shí)際單向數(shù)據(jù)流r1as 1r2r3r4r5r6as 210.0.0.0/811.0.0

42、.0/8以該方式部署策略以該方式部署策略,對(duì)對(duì)數(shù)據(jù)流控制的作用范圍數(shù)據(jù)流控制的作用范圍 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id31bgp路由選路原則路由選路原則1.weight1.weight屬性屬性2.local preference2.local preference屬性屬性3.3.本地路由始發(fā)方式本地路由始發(fā)方式4.as-path4.as-path長(zhǎng)度長(zhǎng)度5.origin5.origin屬性屬性6.med6.med屬性屬性7.ebgp7.ebgp優(yōu)于優(yōu)于ibgpibgp8

43、.8.到達(dá)到達(dá)next-hopnext-hop的代價(jià)的代價(jià)9.9.執(zhí)行等價(jià)負(fù)載均衡執(zhí)行等價(jià)負(fù)載均衡10.ebgp10.ebgp路由接收的順序路由接收的順序11.11.路由的路由的router-idrouter-id12.cluster-list12.cluster-list長(zhǎng)度長(zhǎng)度13.13.配置的配置的bgp peerbgp peer指定地址指定地址 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id32第三條第三條:本地路由始發(fā)方式本地路由始發(fā)方式 比較原則及配置注意事項(xiàng) 該比較原則主

44、要是指本地在進(jìn)入一條igp路由進(jìn)去bgp表時(shí),使用不同的方式比如network或redistribute等,那么這些方式之間是存在優(yōu)先順序的:networkredistributeaggregate注意,該原則是不會(huì)作為bgp路由選路策略的 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id33第三條第三條:本地路由始發(fā)方式本地路由始發(fā)方式 實(shí)驗(yàn)驗(yàn)證 本地分別以3種方式引入一條路由,如下配置所示interface loopback1 ip address 3.3.3.3 255.255.2

45、55.255router bgp 1 network 3.3.3.3 mask 255.255.255.255 route-map a aggregate-address 3.3.3.3 255.255.255.255 attribute-map c redistribute connected route-map broute-map a permit 10 set local-preference 200route-map b permit 10 set local-preference 300route-map c permit 10 set local-preference 400 2

46、007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id34第三條第三條:本地路由始發(fā)方式本地路由始發(fā)方式 實(shí)驗(yàn)驗(yàn)證 本地bgp表中的顯示,network方式為第一選擇r3#sh ip bgpbgp table version is 13, local router id is 9.9.0.3status codes: s suppressed, d damped, h history, * valid, best, i - internal, r rib-failure, s staleorig

47、in codes: i - igp, e - egp, ? - incomplete network next hop metric locprf weight path* 3.3.3.3/32 0.0.0.0 0 200 32768 i 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id35第三條第三條:本地路由始發(fā)方式本地路由始發(fā)方式 實(shí)驗(yàn)驗(yàn)證 將network 3.3.3.3 mask 255.255.255.255 刪除redistribute方式成為優(yōu)選r3#sh ip bbgp

48、 table version is 14, 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* 3.3.3.3/32 0.0.0.0 0 300 32768 ? 2007 cisco systems, inc. all

49、 rights reserved.cisco confidentialpresentation_id36bgp路由選路原則路由選路原則1.weight1.weight屬性屬性2.local preference2.local preference屬性屬性3.3.本地路由始發(fā)方式本地路由始發(fā)方式4.as-path4.as-path長(zhǎng)度長(zhǎng)度5.origin5.origin屬性屬性6.med6.med屬性屬性7.ebgp7.ebgp優(yōu)于優(yōu)于ibgpibgp8.8.到達(dá)到達(dá)next-hopnext-hop的代價(jià)的代價(jià)9.9.執(zhí)行等價(jià)負(fù)載均衡執(zhí)行等價(jià)負(fù)載均衡10.ebgp10.ebgp路由接收的順序路由

50、接收的順序11.11.路由的路由的router-idrouter-id12.cluster-list12.cluster-list長(zhǎng)度長(zhǎng)度13.13.配置的配置的bgp peerbgp peer指定地址指定地址 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id37第四條第四條:as-path長(zhǎng)度長(zhǎng)度 比較原則及配置注意事項(xiàng)優(yōu)選長(zhǎng)度小的as-path列表其他as-path比較原則:在做聚合路由時(shí),使用as-set后產(chǎn)生的as-path列表中的里的as號(hào)長(zhǎng)度只算一個(gè)as號(hào)的長(zhǎng)度在聯(lián)盟內(nèi)的as

51、-path列表中的()的as號(hào)長(zhǎng)度不做計(jì)算依據(jù)當(dāng)向ebgp peer 通告路由時(shí),將自己的as號(hào)加在as-path列表的最左端,向ibgp peer通告路由時(shí),不會(huì)對(duì)as-path列表做任何修改 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id38第四條第四條:as-path長(zhǎng)度長(zhǎng)度 比較原則及配置注意事項(xiàng)修改as-path列表的方法:可以通過(guò)對(duì)ebgp peer使用in/out方向的route-map,使用set as-path prepend命令來(lái)添加as號(hào)。注意,上述操作只能對(duì)eb

52、gp peer,對(duì)ibgp peer無(wú)法生效??梢栽赽gp進(jìn)程下使用bgp bestpath as-path ignore命令來(lái)跳過(guò)as-path的長(zhǎng)度比較修改as-path長(zhǎng)度可作為bgp選路策略的一種。 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id39第四條第四條:as-path長(zhǎng)度長(zhǎng)度 實(shí)驗(yàn)一:使用out方向的route-map來(lái)修改as-pathr3訪問(wèn)r4的單向數(shù)據(jù)流需求r1r2r3r4as1as210.0.0.0/8以該方式部署策略以該方式部署策略,對(duì)對(duì)數(shù)據(jù)流控制的作用范

53、圍數(shù)據(jù)流控制的作用范圍 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id40第四條第四條:as-path長(zhǎng)度長(zhǎng)度 實(shí)驗(yàn)一:使用out方向的route-map來(lái)修改as-pathr1、r2的路由策略(r1保持默認(rèn))router bgp 2 -r2的路由策略的路由策略 neighbor 9.9.23.3 route-map to_r3 outroute-map to_r3 permit 10 set as-path prepend 5 5 5 r1r2r3r4as1as210.0.0.0/8

54、ibgpebgpebgpibgp 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id41第四條第四條:as-path長(zhǎng)度長(zhǎng)度 實(shí)驗(yàn)一:使用out方向的route-map來(lái)修改as-pathr3的bgp表選路結(jié)果r3#sh ip bbgp table version is 2, local router id is 9.9.0.3status codes: s suppressed, d damped, h history, * valid, best, i - internal, r ri

55、b-failure, s staleorigin codes: i - igp, e - egp, ? - incomplete network next hop metric locprf weight path* 10.0.0.0 9.9.23.2 0 2 5 5 5 i* 9.9.13.1 0 2 i 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id42第四條第四條:as-path長(zhǎng)度長(zhǎng)度 實(shí)驗(yàn)二:使用in方向的route-map來(lái)修改as-pathr3訪問(wèn)r4的單向數(shù)據(jù)流需求r1

56、r2r3r4as1as210.0.0.0/8以該方式部署策略以該方式部署策略,對(duì)對(duì)數(shù)據(jù)流控制的作用范圍數(shù)據(jù)流控制的作用范圍 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id43第四條第四條:as-path長(zhǎng)度長(zhǎng)度 實(shí)驗(yàn)二:使用in方向的route-map來(lái)修改as-pathr3的路由策略router bgp 1 -r3的路由策略的路由策略 neighbor 9.9.23.2 route-map from_r2 inroute-map from_r2 permit 10 set as-pa

57、th prepend 5 5 5r1r2r3r4as1as210.0.0.0/8ibgpebgpebgpibgp 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id44第四條第四條:as-path長(zhǎng)度長(zhǎng)度 實(shí)驗(yàn)二:使用in方向的route-map來(lái)修改as-pathr3的bgp表選路結(jié)果r3#sh ip bgpbgp table version is 2, local router id is 9.9.0.3status codes: s suppressed, d damped, h h

58、istory, * 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.23.2 0 5 5 5 2 i* 9.9.13.1 0 2 i不同方向的不同方向的route-map對(duì)于插入的對(duì)于插入的as號(hào)的位置是不同的號(hào)的位置是不同的 2007 cisco systems, inc. all rights reserved.cisco confid

59、entialpresentation_id45bgp路由選路原則路由選路原則1.weight1.weight屬性屬性2.local preference2.local preference屬性屬性3.3.本地路由始發(fā)方式本地路由始發(fā)方式4.as-path4.as-path長(zhǎng)度長(zhǎng)度5.origin5.origin屬性屬性6.med6.med屬性屬性7.ebgp7.ebgp優(yōu)于優(yōu)于ibgpibgp8.8.到達(dá)到達(dá)next-hopnext-hop的代價(jià)的代價(jià)9.9.執(zhí)行等價(jià)負(fù)載均衡執(zhí)行等價(jià)負(fù)載均衡10.ebgp10.ebgp路由接收的順序路由接收的順序11.11.路由的路由的router-idrou

60、ter-id12.cluster-list12.cluster-list長(zhǎng)度長(zhǎng)度13.13.配置的配置的bgp peerbgp peer指定地址指定地址 2007 cisco systems, inc. all rights reserved.cisco confidentialpresentation_id46第五條第五條:origin屬性屬性 比較原則及配置注意事項(xiàng)三種不同的origin屬性的優(yōu)先順序:igpegpincompleteorigin屬性會(huì)一直在bgp路由中攜帶origin屬性配置方法:將igp路由引入bgp時(shí)關(guān)聯(lián)route-map進(jìn)行設(shè)置默認(rèn)情況下,network方式產(chǎn)生的b

溫馨提示

  • 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

最新文檔

評(píng)論

0/150

提交評(píng)論