【文章內(nèi)容簡介】
26 第二條 :Local Preference屬性 ? 實驗五 :對 EBGP Peer應(yīng)用 IN方向 Routemap ?R3單向訪問 R6的數(shù)據(jù)流需求 ?R1\R2分別對 R4\R5應(yīng)用 OUT方向的 Routemap R1 AS 1 R2 R3 R4 R5 R6 AS 2 以該方式部署策略 ,對數(shù)據(jù)流控制的作用范圍 EBGP 169。 2021 Cisco Sy stems, Inc. All rights reserv ed. Cisco Conf idential Presentation_ID 27 第二條 :Local Preference屬性 ? 實驗五 :對 EBGP Peer應(yīng)用 IN方向 Routemap ?R R2的路由策略 router bgp 1 R1的路由策略 neighbor routemap FROM_R4 in accesslist 1 permit routemap FROM_R4 permit 10 match ip address 1 set localpreference 500 routemap FROM_R4 permit 20 router bgp 1 R2的路由策略 neighbor routemap FROM_R5 in accesslist 2 permit routemap FROM_R5 permit 10 match ip address 2 set localpreference 500 routemap FROM_R5 permit 20 R1 AS 1 R2 R3 R4 R5 R6 AS 2 EBGP 169。 2021 Cisco Sy stems, Inc. All rights reserv ed. Cisco Conf idential Presentation_ID 28 第二條 :Local Preference屬性 ? 實驗五 :對 EBGP Peer應(yīng)用 IN方向 Routemap ?R R2的 BGP表 r1sh ip bgp Network Next Hop Metric LocPrf Weight Path * 0 2 i * 500 0 2 i * 0 2 i * 0 2 i r2sh ip bgp Network Next Hop Metric LocPrf Weight Path * 0 2 i * 0 2 i * 500 0 2 i * 0 2 i R1 AS 1 R2 R3 R4 R5 R6 AS 2 EBGP 169。 2021 Cisco Sy stems, Inc. All rights reserv ed. Cisco Conf idential Presentation_ID 29 第二條 :Local Preference屬性 ? 實驗五 :對 EBGP Peer應(yīng)用 IN方向 Routemap ?R3的 BGP表 r3sh ip bgp BGP table version is 10, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i internal, r RIBfailure, S Stale Origin codes: i IGP, e EGP, ? inplete Network Next Hop Metric LocPrf Weight Path * 0 100 0 2 i *i 0 500 0 2 i * 0 500 0 2 i * i 0 100 0 2 i R1 AS 1 R2 R3 R4 R5 R6 AS 2 EBGP 169。 2021 Cisco Sy stems, Inc. All rights reserv ed. Cisco Conf idential Presentation_ID 30 第二條 :Local Preference屬性 ? 實驗五 :對 EBGP Peer應(yīng)用 IN方向 Routemap ?路由策略結(jié)果: R3到 R6的實際單向數(shù)據(jù)流 R1 AS 1 R2 R3 R4 R5 R6 AS 2 以該方式部署策略 ,對數(shù)據(jù)流控制的作用范圍 169。 2021 Cisco Sy stems, Inc. All rights reserv ed. Cisco Conf idential Presentation_ID 31 BGP路由選路原則 Preference屬性 IBGP Nexthop的代價 RouterID BGP Peer指定地址 169。 2021 Cisco Sy stems, Inc. All rights reserv ed. Cisco Conf idential Presentation_ID 32 第三條 :本地路由始發(fā)方式 ? 比較原則及配置注意事項 ? 該比較原則主要是指本地在進入一條 IGP路由進去 BGP表時,使用不同的方式比如 work或 redistribute等,那么這些方式之間是存在優(yōu)先順序的: workredistributeaggregate ?注意,該原則是不會作為 BGP路由選路策略的 169。 2021 Cisco Sy stems, Inc. All rights reserv ed. Cisco Conf idential Presentation_ID 33 第三條 :本地路由始發(fā)方式 ? 實驗驗證 ? 本地分別以 3種方式引入一條路由,如下配置所示 interface Loopback1 ip address router bgp 1 work mask routemap A aggregateaddress attributemap C redistribute connected routemap B routemap A permit 10 set localpreference 200 routemap B permit 10 set localpreference 300 routemap C permit 10 set localpreference 400 169。 2021 Cisco Sy stems, Inc. All rights reserv ed. Cisco Conf idential Presentation_ID 34 第三條 :本地路由始發(fā)方式 ? 實驗驗證 ? 本地 BGP表中的顯示, work方式為第一選擇 r3sh ip bgp BGP table version is 13, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i internal, r RIBfailure, S Stale Origin codes: i IGP, e EGP, ? inplete Network Next Hop Metric LocPrf Weight Path * 169。 2021 Cisco Sy stems, Inc. All rights reserv ed. Cisco Conf idential Presentation_ID 35 第三條 :本地路由始發(fā)方式 ? 實驗驗證 ? 將 work mask 刪除 ?redistribute方式成為優(yōu)選 r3sh ip b BGP table version is 14, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i internal, r RIBfailure, S Stale Origin codes: i IGP, e EGP, ? inplete Network Next Hop Metric LocPrf Weight Path * 169。 2021 Cisco Sy stems, Inc. All rights reserv ed. Cisco Conf idential Presentation_ID 36 BGP路由選路原則 Preference屬性 IBGP Nexthop的代價 RouterID BGP Peer指定地址 169。 2021 Cisco Sy stems, Inc. All rights reserv ed. Cisco Conf idential Presentation_ID 37 第四條 :ASPath長度 ? 比較原則及配置注意事項 ?優(yōu)選長度小的 ASPath列表 ?其他 ASPath比較原則: ?在做聚合路由時,使用 asset后產(chǎn)生的 ASPath列表中的 {}里的 AS號長度只算一個 AS號的長度 ?在聯(lián)盟內(nèi)的 ASPath列表中的 ()的 AS號長度不做計算依據(jù) ?當(dāng)向 EBGP Peer 通告路由時,將自己的 AS號加在 ASPath列表的最左端,向 IBGP Peer通告路由時,不會對 ASPath列表做任何修改 169。 2021 Cisco Sy stems, Inc. All rights reserv ed. Cisco Conf idential Presentation_ID 38 第四條 :ASPath長度 ? 比較原則及配置注意事項 ?修改 ASPath列表的方法: ?可以通過對 EBGP Peer使用 IN/OUT方向的 Routemap,使用 set aspath prepend命令來添加 AS號。 ?注意,上述操作只能對 EBGP Peer,對 IBGP Peer無法生效。 ?可以在 BGP進程下使用 bgp bestpath aspath ignore命令來跳過 ASPath的長度比較 ?修改 ASPath長度可作為 BGP選路策略的一種。 169。 2021 Cisco Sy stems, Inc. All rights reserv ed. Cisco Conf idential Presentation_ID 39 第四條 :ASPath長度 ? 實驗一:使用 OUT方向的 Routemap來修改 ASPath ?R3訪問 R4的單向數(shù)據(jù)流需求 R1 R2 R3 R4 AS1 AS2 以該方式部署策略 ,對數(shù)據(jù)流控制的作用范圍 169。 2021 Cisco Sy stems, Inc. All rights reserv ed. Cisco Conf idential Presentation_ID 40 第四條 :ASPath長度 ? 實驗一:使用 OUT方向的 Routemap來修改 ASPath ?R R2的路由策略 (R1保持默