多多色-多人伦交性欧美在线观看-多人伦精品一区二区三区视频-多色视频-免费黄色视屏网站-免费黄色在线

國內最全IT社區平臺 聯系我們 | 收藏本站
阿里云優惠2
您當前位置:首頁 > 服務器 > CCNP實驗:BGP路由聚合基礎

CCNP實驗:BGP路由聚合基礎

來源:程序員人生   發布時間:2014-04-17 18:05:28 閱讀次數:3032次

【實驗環境】

C3640-IK9O3S-M Version 12.4(10)

【實驗目的】

驗證BGP的路由聚合

【實驗拓撲】

【實驗描述】

1、在R2上使用手工創建聚合靜態路由并宣告靜態路由實現BGP路由聚合

2、在R2上使用BGP路由聚合命令aggregate-address實現實現BGP路由聚合

3、在R1上使用BGP路由聚合命令aggregate-address實現實現BGP路由聚合

4、在R1上結合使用suppress-map實現部分BGP路由集合

【實驗步驟】

1、R1基本配置

!
interface Serial0/0
ip address 12.0.0.1 255.255.255.0
serial restart-delay 0
clock rate 64000
!
router bgp 1
no synchronization
bgp router-id 1.1.1.1
neighbor 12.0.0.2 remote-as 2
no auto-summary
!

2、R2基本配置

!
interface Loopback0
ip address 200.1.16.1 255.255.255.0
!
interface Loopback1
ip address 200.1.17.1 255.255.255.0
!
interface Loopback2
ip address 200.1.18.1 255.255.255.0
!
interface Loopback3
ip address 200.1.19.1 255.255.255.0
!
interface Serial0/0
ip address 12.0.0.2 255.255.255.0
!
router bgp 2
no synchronization
bgp router-id 2.2.2.2
neighbor 12.0.0.1 remote-as 1
no auto-summary
!

3、在R2上使用手工創建聚合靜態路由并宣告靜態路由實現BGP路由聚合

該方法只能使用在產生明細路由的路由器R2上,并且無需在R2上通告明細路由,首先創建一條指向NULL0接口的匯總靜態路由:

R2(config)#ip route 200.1.16.0 255.255.252.0 Null0

接著將匯總的靜態路由從BGP發布出去

R2(config)#router bgp 2
R2(config-router)#network 200.1.16.0 mask 255.255.252.0

此時在R1上就可以看到匯總路由了

R1#sh ip bgp
BGP table version is 2, local router ID is 1.1.1.1
Network          Next Hop            Metric LocPrf Weight Path
*> 200.1.16.0/22    12.0.0.2                 0             0 2 i

4、清除3的配置,在R2上使用BGP路由聚合命令aggregate-address實現實現BGP路由聚合

R2(config)#no ip route 200.1.16.0 255.255.252.0 null 0
R2(config)#router bgp 2
R2(config-router)#no network 200.1.16.0 mask 255.255.252.0

需要先將明細路由通告進BGP:

R2(config)#router bgp 2
R2(config-router)#network 200.1.16.0
R2(config-router)#network 200.1.17.0
R2(config-router)#network 200.1.18.0
R2(config-router)#network 200.1.19.0

不帶mask參數,默認為網絡號的主類子網掩碼

使用aggregate-address宣告聚合路由:

R2(config)#router bgp 2
R2(config-router)#aggregate-address 200.1.16.0 255.255.252.0 summary-only

summary-only參數表示只宣告聚合路由,抑制明細路由

在R2上查看BGP路由表,明細路由被抑制:

R2#sh ip bgp
BGP table version is 12, local router ID is 2.2.2.2
Network          Next Hop            Metric LocPrf Weight Path
s> 200.1.16.0       0.0.0.0                  0         32768 i
*> 200.1.16.0/22    0.0.0.0                            32768 i
s> 200.1.17.0       0.0.0.0                  0         32768 i
s> 200.1.18.0       0.0.0.0                  0         32768 i
s> 200.1.19.0       0.0.0.0                  0         32768 i

在R1上查看BGP路由表,只有一條聚合路由:

R1#sh ip bgp
BGP table version is 4, local router ID is 1.1.1.1
Network          Next Hop            Metric LocPrf Weight Path
*> 200.1.16.0/22    12.0.0.2                 0             0 2 i

5、保留明細路由,清除R2上的聚合路由配置,在R1上使用BGP路由聚合命令aggregate-address實現實現BGP路由聚合

R2(config)#router bgp 2
R2(config-router)#no aggregate-address 200.1.16.0 255.255.252.0 summary-only

在R1上執行路由匯總命令:

R1(config)#router bgp 1
R1(config-router)#aggregate-address 200.1.16.0 255.255.252.0 summary-only

在R1上查看BGP路由表:

R1#sh ip bgp
BGP table version is 14, local router ID is 1.1.1.1
Network          Next Hop            Metric LocPrf Weight Path
s> 200.1.16.0       12.0.0.2                 0             0 2 i
*> 200.1.16.0/22    0.0.0.0                            32768 i
s> 200.1.17.0       12.0.0.2                 0             0 2 i
s> 200.1.18.0       12.0.0.2                 0             0 2 i
s> 200.1.19.0       12.0.0.2                 0             0 2 i

在R2上查看BGP路由表:

R2#sh ip bgp
BGP table version is 18, local router ID is 2.2.2.2
Network          Next Hop            Metric LocPrf Weight Path
*> 200.1.16.0       0.0.0.0                  0         32768 i
*> 200.1.16.0/22    12.0.0.1                 0             0 1 i
*> 200.1.17.0       0.0.0.0                  0         32768 i
*> 200.1.18.0       0.0.0.0                  0         32768 i
*> 200.1.19.0       0.0.0.0                  0         32768 i

問題:R1的匯總路由Path屬性為空,由于EBGP的水平分割是基于Path屬性的,因此該路由條目不滿足水平分割,將會回傳給R2,所以在R2上可以看到Next Hop值為R1的匯總路由。如果明細路由中的某一條down掉,將有可能導致一些帶寬流量的浪費。因此我們需要在aggregate-address命令后加多另外一個參數as-set,這個參數會將明細路由中的一些屬性保留給匯總路由,其中包括了as-path屬性。

R1(config)#router bgp 1
R1(config-router)#no aggregate-address 200.1.16.0 255.255.252.0 summary-only
R1(config-router)#aggregate-address 200.1.16.0 255.255.252.0 summary-only as-set

重新在R1上查看BGP路由表:

R1#sh ip bgp
BGP table version is 20, local router ID is 1.1.1.1
Network          Next Hop            Metric LocPrf Weight Path
s> 200.1.16.0       12.0.0.2                 0             0 2 i
*> 200.1.16.0/22    0.0.0.0                       100  32768 2 i
s> 200.1.17.0       12.0.0.2                 0             0 2 i
s> 200.1.18.0       12.0.0.2                 0             0 2 i
s> 200.1.19.0       12.0.0.2                 0             0 2 i

重新在R2上查看BGP路由表:

R2#sh ip bgp
BGP table version is 19, local router ID is 2.2.2.2
Network          Next Hop            Metric LocPrf Weight Path
*> 200.1.16.0       0.0.0.0                  0         32768 i
*> 200.1.17.0       0.0.0.0                  0         32768 i
*> 200.1.18.0       0.0.0.0                  0         32768 i
*> 200.1.19.0       0.0.0.0                  0         32768 i

EBGP水平分割起作用了,R2上不會出現回傳的聚合路由

6、清除R1上的聚合路由配置,結合使用suppress-map實現部分BGP路由聚合。需求為抑制200.1.18.0/24和200.1.19.0/24網段,其他網段及聚合路由顯示。

R1(config)#router bgp 1
R1(config-router)#no aggregate-address 200.1.16.0 255.255.252.0 summary-only as-set

使用前綴列表抓取路由條目:

R1(config)#ip prefix-list 10 permit 200.1.18.0/23 ge 24 le 24

創建route-map處理路由條目

R1(config)#route-map SU permit 10
R1(config-route-map)#match ip address prefix-list 10
R1(config-route-map)#exit

使用suppress-map創建聚合路由

R1(config)#router bgp 1
R1(config-router)#aggregate-address 200.1.16.0 255.255.252.0 suppress-map SU as-set

硬清除BGP路由表

R1#clear ip bgp *

在R1上查看BGP路由表:

R1#sh ip bgp
BGP table version is 8, local router ID is 1.1.1.1
Network          Next Hop            Metric LocPrf Weight Path
*> 200.1.16.0       12.0.0.2                 0             0 2 i
*> 200.1.16.0/22    0.0.0.0                       100  32768 2 i
*> 200.1.17.0       12.0.0.2                 0             0 2 i
s> 200.1.18.0       12.0.0.2                 0             0 2 i
s> 200.1.19.0       12.0.0.2                 0             0 2 i

可以發現18、19兩個網段被抑制,其余網段best

生活不易,碼農辛苦
如果您覺得本網站對您的學習有所幫助,可以手機掃描二維碼進行捐贈
程序員人生
------分隔線----------------------------
分享到:
------分隔線----------------------------
關閉
程序員人生
主站蜘蛛池模板: 亚洲精品资源在线 | 国产乱码精品一区二区三区卡 | free娇小性video | 精品亚洲永久免费精品 | 欧美秋霞特色大片2020 | 亚洲国产精品久久久久久网站 | 中文字幕日韩欧美一区二区三区 | 欧美一区二区三区高清视频 | 另类专区国产在线视频 | 91久久偷偷做嫩草影院免费 | 精品视频一区二区三区在线观看 | xxxxx性视频免费播放 | 久久性网| 日韩免费精品 | sss欧美一区二区三区 | 91伊人国产| 国内精品久久影视 | 色人阁网站 | 欧美精品免费一区欧美久久优播 | 伊人网在线免费视频 | 国产精品热久久毛片 | 国产视频中文字幕 | 国产福利乳摇在线播放 | 动漫精品一级毛片动漫 | 免费成年人在线观看视频 | 亚洲成人免费看 | 欧美巨大另类极品video | 一级做a爰片性色毛片男 | xh98hx国产免费 | 日本无卡码免费一区二区三区 | 91人人| 亚洲成人bt | 午夜影院在线视频 | 国产成人综合一区人人 | 亚州在线播放 | 午夜福利毛片 | 黄色网址免费大全 | 我爱我色成人网 | 国产性生活 | 亚洲第一网站 | 91日韩 |