bgp反射與聯(lián)盟反射器和_第1頁
bgp反射與聯(lián)盟反射器和_第2頁
bgp反射與聯(lián)盟反射器和_第3頁
已閱讀5頁,還剩5頁未讀, 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

1、Bgp反射器和聯(lián)盟Bgp反射器可以減少bgp對等體的數(shù)量。R2這個不需要和r4建立對等體關(guān)系,并且,也不需要在r2上和r4上在配置路由重發(fā)布。即不需要把bgp的路由再發(fā)不到igp中去。這個時候,配置如下R2:bgp 200 router-id 2.2.2.2 peer 3.3.3.3 as-number 200 peer 3.3.3.3 connect-interface LoopBack0 peer 12.1.1.1 as-number 100 # ipv4-family unicast undo synchronization peer 3.3.3.3 enable peer 12.1.1

2、.1 enabler3: (路由反射器)bgp 200 router-id 3.3.3.3 peer 2.2.2.2 as-number 200 peer 2.2.2.2 connect-interface LoopBack0 peer 4.4.4.4 as-number 200 peer 4.4.4.4 connect-interface LoopBack0 # ipv4-family unicast undo synchronization peer 2.2.2.2 enable peer 2.2.2.2 reflect-client peer 4.4.4.4 enable peer 4.

3、4.4.4 reflect-clientr4:bgp 200 router-id 4.4.4.4 peer 3.3.3.3 as-number 200 peer 3.3.3.3 connect-interface LoopBack0 peer 45.1.1.5 as-number 300 ipv4-family unicast undo synchronization peer 3.3.3.3 enable peer 45.1.1.5 enable在r3上看下路由:r3dis bgp routing-table BGP Local router ID is 3.3.3.3 Status cod

4、es: * - valid, - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Total Number of Routes: 2 Network NextHop MED LocPrf PrefVal Path/Ogn i 1.1.1.0/24 12.1.1.1 0 100 0 100i i 5.5.5.0/24 45.1.1.5 0 100 0 300i注意,這個時候兩個路由都沒有號,因為下一跳不可達(dá)。分別到r2和

5、r4增加如下配置:r2-bgppeer 3.3.3.3 next-hop-localr4-bgppeer 3.3.3.3 next-hop-local這個時候再次在r3上看下bgp路由表:r3dis bgp routing-table BGP Local router ID is 3.3.3.3 Status codes: * - valid, - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Total Numbe

6、r of Routes: 2 Network NextHop MED LocPrf PrefVal Path/Ogn *i 1.1.1.0/24 2.2.2.2 0 100 0 100i *i 5.5.5.0/24 4.4.4.4 0 100 0 300i在r4上看下bgp路由:r4dis bgp routing-table BGP Local router ID is 4.4.4.4 Status codes: * - valid, - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin

7、: i - IGP, e - EGP, ? - incomplete Total Number of Routes: 2 Network NextHop MED LocPrf PrefVal Path/Ogn *i 1.1.1.0/24 2.2.2.2 0 100 0 100i * 5.5.5.0/24 45.1.1.5 0 0 300i在r5上看下bgp路由:r5dis bgp routing-table BGP Local router ID is 5.5.5.5 Status codes: * - valid, - best, d - damped, h - history, i - i

8、nternal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Total Number of Routes: 2 Network NextHop MED LocPrf PrefVal Path/Ogn * 1.1.1.0/24 45.1.1.4 0 200 100i * 5.5.5.0/24 0.0.0.0 0 0 i在r5上看下ip路由表:r5dis ip routing-table protocol bgpRoute Flags: R - relay, D - download to fib-Pub

9、lic routing table : BGP Destinations : 1 Routes : 1 BGP routing table status : Destinations : 1 Routes : 1Destination/Mask Proto Pre Cost Flags NextHop Interface 1.1.1.0/24 EBGP 255 0 D 45.1.1.4 GigabitEthernet0/0/1在r1上ping測試r5ping -a 1.1.1.1 5.5.5.5 PING 5.5.5.5: 56 data bytes, press CTRL_C to brea

10、k Reply from 5.5.5.5: bytes=56 Sequence=1 ttl=252 time=80 msReply from 5.5.5.5: bytes=56 Sequence=2 ttl=252 time=30 msBgp聯(lián)盟:聯(lián)盟是在大的as里面在劃分小的asR2:bgp 65001 router-id 2.2.2.2 confederation id 200 peer 3.3.3.3 as-number 65001 peer 3.3.3.3 connect-interface LoopBack0 peer 12.1.1.1 as-number 100 # ipv4-fa

11、mily unicast undo synchronization peer 3.3.3.3 enable peer 3.3.3.3 next-hop-local peer 12.1.1.1 enabler3:bgp 65001 confederation id 200 confederation peer-as 65002 /標(biāo)明這ebgp鄰居關(guān)系是聯(lián)盟內(nèi)部ebgp鄰居關(guān)系 peer 2.2.2.2 as-number 65001 peer 2.2.2.2 connect-interface LoopBack0 peer 4.4.4.4 as-number 65002 peer 4.4.4.

12、4 ebgp-max-hop 2 peer 4.4.4.4 connect-interface LoopBack0 # ipv4-family unicast undo synchronization peer 2.2.2.2 enable peer 4.4.4.4 enabler4:bgp 65002 router-id 4.4.4.4 confederation id 200 confederation peer-as 65001 peer 3.3.3.3 as-number 65001 peer 3.3.3.3 ebgp-max-hop 2 peer 3.3.3.3 connect-in

13、terface LoopBack0 peer 45.1.1.5 as-number 300 # ipv4-family unicast undo synchronization peer 3.3.3.3 enable peer 3.3.3.3 next-hop-local peer 45.1.1.5 enabler3上的bgp路由表:r3dis bgp routing-table BGP Local router ID is 34.1.1.3 Status codes: * - valid, - best, d - damped, h - history, i - internal, s -

14、suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Total Number of Routes: 2 Network NextHop MED LocPrf PrefVal Path/Ogn *i 1.1.1.0/24 2.2.2.2 0 100 0 100i *i 5.5.5.0/24 4.4.4.4 0 100 0 (65002) 30R5上的bgp路由表:r5dis bgp routing-table BGP Local router ID is 5.5.5.5 Status codes: * - valid,

15、- best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Total Number of Routes: 2 Network NextHop MED LocPrf PrefVal Path/Ogn * 1.1.1.0/24 45.1.1.4 0 200 100i * 5.5.5.0/24 0.0.0.0 0 0 i社團(tuán)屬性:知名社團(tuán)在r1上增加三個接口,并且發(fā)布到bgp中interface LoopBack10 ip add

16、ress 192.168.1.1 255.255.255.255 #interface LoopBack11 ip address 192.168.1.2 255.255.255.255 #interface LoopBack12 ip address 192.168.1.3 255.255.255.255 #bgp 100 router-id 1.1.1.1 peer 12.1.1.2 as-number 200 # ipv4-family unicast undo synchronization network 1.1.1.0 255.255.255.0 network 192.168.1

17、.1 255.255.255.255 network 192.168.1.2 255.255.255.255 network 192.168.1.3 255.255.255.255 peer 12.1.1.2 enable然后在r2上對這幾個路由分別加上社團(tuán)屬性第一步:先用acl對幾個網(wǎng)段進(jìn)行挑選acl number 2000 rule 0 permit source 192.168.1.1 0 acl number 2001 rule 0 permit source 192.168.1.2 0 acl number 2002 rule 0 permit source 192.168.1.3

18、0第二步:使用路由策略,打上社團(tuán)標(biāo)記route-policy com permit node 10 if-match acl 2000 apply community no-advertise #route-policy com permit node 20 if-match acl 2001 apply community no-export #route-policy com permit node 30 if-match acl 2002 apply community no-export-subconfed第三步:在對等體上應(yīng)用路由策略bgp 65001peer 12.1.1.1 ro

19、ute-policy com import在r2上檢查路由社團(tuán)屬性dis bgp routing-table community BGP Local router ID is 2.2.2.2 Status codes: * - valid, - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Total Number of Routes: 3 Network NextHop MED LocPrf PrefVal Com

20、munity * 192.168.1.1/32 12.1.1.1 0 0 no-advertise * 192.168.1.2/32 12.1.1.1 0 0 no-export * 192.168.1.3/32 12.1.1.1 0 0 no-export-Subconfed發(fā)現(xiàn)全部帶上了社團(tuán)屬性:在r3上查看bgp路由表:dis bgp routing-table BGP Local router ID is 34.1.1.3 Status codes: * - valid, - best, d - damped, h - history, i - internal, s - suppre

21、ssed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Total Number of Routes: 3 Network NextHop MED LocPrf PrefVal Path/Ogn *i 5.5.5.0/24 4.4.4.4 0 100 0 (65002) 300i *i 192.168.1.2/32 2.2.2.2 0 100 0 100i *i 192.168.1.3/32 2.2.2.2 0 100 0 100i這個發(fā)現(xiàn)192.168.1.1路由已經(jīng)不在了因為它是no-advertise屬性這個時候再看下社團(tuán)屬性:

22、dis bgp routing-table community Total Number of Routes: 0竟然沒有發(fā)現(xiàn)帶社團(tuán)屬性的路由。因為社團(tuán)屬性是默認(rèn)不通告的。r2-bgppeer 3.3.3.3 advertise-community必須手動通告:dis bgp routing-table community BGP Local router ID is 34.1.1.3 Status codes: * - valid, - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin

23、: i - IGP, e - EGP, ? - incomplete Total Number of Routes: 2 Network NextHop MED LocPrf PrefVal Community *i 192.168.1.2/32 2.2.2.2 0 100 0 no-export *i 192.168.1.3/32 2.2.2.2 0 100 0 no-export-Subconfed這個時候社團(tuán)屬性就帶上了R4上看下bgp路由表dis bgp routing-table BGP Local router ID is 4.4.4.4 Status codes: * - valid, - best, d - damped, h - history, i - internal, s - suppressed, S - Stale Origin : i - IGP, e - EGP, ? - incomplete Total Number of Routes: 2 Network NextHop MED LocPrf PrefVal Path/Ogn * 5.5.5.0/24 45.1.1.5 0 0 300i *i 192.168.1.2/32 2.

溫馨提示

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

評論

0/150

提交評論