【文章內(nèi)容簡(jiǎn)介】
, local AS number 1BGP table version is 2, main routing table version 21 network entries using 101 bytes of memory1 path entries using 48 bytes of memory1 BGP path attribute entries using 60 bytes of memory0 BGP routemap cache entries using 0 bytes of memory0 BGP filterlist cache entries using 0 bytes of memoryBGP using 209 total bytes of memoryBGP activity 1/0 prefixes, 1/0 paths, scan interval 60 secsNeighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 4 2 5 6 2 0 0 00:01:01 0 網(wǎng)絡(luò)通告要通過(guò)BGP協(xié)議通告目標(biāo)網(wǎng)絡(luò),必須首先把路由條目注入進(jìn)BGP中??偣灿腥N方法:(1) 通過(guò)把從IGP學(xué)習(xí)到的路由條目重分發(fā)進(jìn)BGP中; ?(2) 通過(guò)network命令把網(wǎng)絡(luò)宣告進(jìn)BGP中; i(3) 通過(guò)添加靜態(tài)路由條目,然后再使用network命令把網(wǎng)絡(luò)宣告進(jìn)BGP中; iR2show ip bgp查看當(dāng)前路由器的BGP 轉(zhuǎn)發(fā)表BGP table version is 2, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i internal, r RIBfailure, S StaleOrigin codes: i IGP, e EGP, ? inplete Network Next Hop Metric LocPrf Weight Path* 要給BGP對(duì)端通告一條默認(rèn)路由,總共有三種方法可以實(shí)現(xiàn)。(1) 如果只給特定的對(duì)端通告默認(rèn)路由,那么可以通過(guò)neighbor defaultoriginate命令完成,使用這條命令時(shí),不管本地的路由表中有沒(méi)有默認(rèn)路由都可以實(shí)現(xiàn)。R2sh ip bgp BGP table version is 4, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i internal, r RIBfailure, S StaleOrigin codes: i IGP, e EGP, ? inplete Network Next Hop Metric LocPrf Weight Path* 100 0 i.(2) 如果給所有的BGP鄰居發(fā)送一條默認(rèn)路由,那么要完成這個(gè)任務(wù)我們必須通過(guò)三個(gè)步驟去完成。1:建議默認(rèn)路由2:重分發(fā)進(jìn)BGP3:使用DEFAULTINFORMATION ORIGINNET 命令。ip route null 0redistribute staticdefaultinformation originate*Jul 7 12:53:: BGP: Applying map to find origin for R1sh ip bgp BGP table version is 3, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i internal, r RIBfailure, S StaleOrigin codes: i IGP, e EGP, ? inplete Network Next Hop Metric LocPrf Weight Path* 0 32768 ?* R3sh ip bgp BGP table version is 4, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i internal, r RIBfailure, S StaleOrigin codes: i IGP, e EGP, ? inplete Network Next Hop Metric LocPrf Weight Path* 0 0 1 ?(3) 在IGP表中首先建立指向NULL 0的路由條目,然后使用network命令通告出去。network R1sh ip bgp BGP table version is 2, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i internal, r RIBfailure, S StaleOrigin codes: i IGP, e EGP, ? inplete Network Next Hop Metric LocPrf Weight Path* 0 32768 iR2sh 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 StaleOrigin codes: i IGP, e EGP, ? inplete Network Next Hop Metric LocPrf Weight Path* 100 0 iR3sh ip bgp BGP table version is 7, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i internal, r RIBfailure, S StaleOrigin codes: i IGP, e EGP, ? inplete Network Next Hop Metric LocPrf Weight Path* 0 0 1R3sh ip routeCodes: C connected, S static, R RIP, M mobile, B BGP D EIGRP, EX EIGRP external, O OSPF, IA OSPF inter area N1 OSPF NSSA external type 1, N2 OSPF NSSA external type 2 E1 OSPF external type 1, E2 OSPF external type 2 i ISIS, su ISIS summary, L1 ISIS level1, L2 ISIS level2 ia ISIS inter area, * candidate default, U peruser static route o ODR, P periodic downloaded static routeGateway of last resort is to network , 2 subnetsC is directly connected, Serial1/0S is directly connected, Serial1/0B* [20/0] via , 00:02:117:理解IBGP的防環(huán)機(jī)制及理解同步原則從IBGP學(xué)習(xí)路由時(shí)必須考慮的下一條可達(dá)IGp路由表同步(同步原則)R1router bgp 2 no synchronization bgp logneighborchanges network mask neighbor remoteas 1 no autosummaryR2!router bgp 1 no synchronization bgp logneighborchanges network mask neighbor remoteas 1 neighbor remoteas 2 no autosummary!R3!router bgp 1 no synchronization bgp logneighborchanges neighbor remoteas 1 no autosummary! R2 BGP轉(zhuǎn)發(fā)表和路由表里的情況R1sh ip bgp BGP table version is 3, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i internal, r RIBfailure, S StaleOrigin codes: i IGP, e EGP, ? inplete Network Next Hop Metric LocPrf Weight Path* * R1sh ip routeCodes: C connected, S static, R RIP, M mobile, B BGP D EIGRP, EX EIGRP external, O OSPF, IA OSPF inter area N1 OSPF NSSA external type 1, N2 OSPF NSSA external type 2 E1 OSPF external type 1, E2 OSPF external type 2 i ISIS, su ISIS summary, L1 ISIS level1, L2 ISIS level2 ia ISIS inter area, * candidate default, U peruser static route o ODR, P periodic downloaded static routeGateway of last resort is not set , 1 subnetsC is directly connected, Loopback0 , 1 subnetsB [20/0] via , 00:04:09 , 2 subnetsC is directly connected, FastEthernet0/0C is directly connected, Serial1/1r2sh ip bgp BGP table version is 2, local router ID is Status codes: s suppressed, d damped, h history, * valid, best, i internal, r RI