溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

43、BGP配置實驗之聚合aggregate-address

發(fā)布時間:2020-06-24 01:33:14 來源:網(wǎng)絡(luò) 閱讀:2898 作者:開源殿堂 欄目:網(wǎng)絡(luò)安全

1、實驗拓?fù)?/p>

43、BGP配置實驗之聚合aggregate-address

2、基礎(chǔ)配置

R1配置

interface Loopback0

 ip address 1.1.1.1 255.255.255.0

interface Serial0/0

 ip address 13.1.1.1 255.255.255.0

interface FastEthernet1/0

 ip address 124.1.1.1 255.255.255.0

router ospf 110

 log-adjacency-changes

 network 1.1.1.0 0.0.0.255 area 0

 network 124.1.1.0 0.0.0.255 area 0

router bgp 1

 no synchronization

 bgp router-id 1.1.1.1

 neighbor 2.2.2.2 remote-as 1

 neighbor 2.2.2.2 update-source Loopback0

 neighbor 2.2.2.2 next-hop-self

 neighbor 13.1.1.3 remote-as 3

 no auto-summary


R2配置

interface Loopback0

 ip address 2.2.2.2 255.255.255.0

interface FastEthernet1/0

 ip address 124.1.1.2 255.255.255.0

router ospf 110

 log-adjacency-changes

 network 2.2.2.0 0.0.0.255 area 0

 network 124.1.1.0 0.0.0.255 area 0

router bgp 1

 no synchronization

 bgp router-id 2.2.2.2

 bgp log-neighbor-changes

 neighbor 1.1.1.1 remote-as 1

 neighbor 1.1.1.1 update-source Loopback0

 neighbor 124.1.1.4 remote-as 4

 no auto-summary


R3配置

interface Loopback0

 ip address 3.3.3.3 255.255.255.0        

interface Loopback16

 ip address 202.1.16.3 255.255.255.0

interface Loopback17

 ip address 202.1.17.3 255.255.255.0

interface Loopback18

 ip address 202.1.18.3 255.255.255.0

interface Loopback19

 ip address 202.1.19.3 255.255.255.0

interface Serial0/0

 ip address 13.1.1.3 255.255.255.0

router bgp 3

 no synchronization

 bgp router-id 3.3.3.3

 bgp log-neighbor-changes

 network 3.3.3.0 mask 255.255.255.0

 network 202.1.16.0

 network 202.1.17.0

 network 202.1.18.0

 network 202.1.19.0

 neighbor 13.1.1.1 remote-as 1

 no auto-summary


R4配置

interface Loopback0

 ip address 4.4.4.4 255.255.255.0

interface FastEthernet1/0

 ip address 124.1.1.4 255.255.255.0

router bgp 4

 no synchronization

 bgp router-id 4.4.4.4

 bgp log-neighbor-changes

 network 4.4.4.0 mask 255.255.255.0

 neighbor 124.1.1.2 remote-as 1

 no auto-summary


3、配置聚合

BGP聚合可以使用兩種方法:

方法一:手動寫一條指向空接口的靜態(tài)匯總路由,再在BGP路由進(jìn)程匯總發(fā)布該匯總路由

方法二:先在BGP路由進(jìn)程中network所有的明細(xì)路由,在用aggregate-address 202.1.16.0 255.255.252.0 做聚合,此時會將聚合路由和明細(xì)路由都通告出去,aggregate-address 202.1.16.0 255.255.252.0 summary-only將會抑制明細(xì)路由,標(biāo)識為s,且不發(fā)給其他BGP鄰居。

此外我們也可以指定不通告特定路由,基本步驟如下:

ip prefix-list 1 permit 202.1.16.0/23 ge 24 le 24


route-map YZ permit 10

match ip address prefix-list 1


router bgp 3

aggregate-address 202.1.16.0 255.255.252.0 suppress-map YZ


方法二是在發(fā)送方做聚合,如果在接收方做聚合,接收方生成聚合路由后會反傳給發(fā)送方,此時將會產(chǎn)生丟包現(xiàn)象,所以不應(yīng)該讓聚合路由回傳。為達(dá)到不會傳的目的,我們采用BGP的水平分割技術(shù),在聚合路由上加入明細(xì)路由的屬性,這樣當(dāng)發(fā)送方收到聚合路由后,由于聚合路由攜帶有自身的AS號而不接受該路由,aggregate-address 202.1.16.0 255.255.252.0 summary-only as-set。

方法一:

R3配置

ip route 202.1.16.0 255.255.252.0 null0

router bgp 3

no network 202.1.16.0

no network 202.1.17.0

no network 202.1.18.0

no network 202.1.19.0

network 202.1.16.0 mask 255.255.252.0


方法二:

R3配置

no ip route 202.1.16.0 255.255.252.0 null0

router bgp 3

no network 202.1.16.0 mask 255.255.252.0

 network 202.1.16.0

 network 202.1.17.0

 network 202.1.18.0

 network 202.1.19.0

 aggregate-address 202.1.16.0 255.255.252.0

43、BGP配置實驗之聚合aggregate-address

aggregate-address 202.1.16.0 255.255.252.0 summary-only將會抑制明細(xì)路由,標(biāo)識為s,且不發(fā)給其他BGP鄰居。

router bgp 3

aggregate-address 202.1.16.0 255.255.252.0 summary-only

43、BGP配置實驗之聚合aggregate-address43、BGP配置實驗之聚合aggregate-address43、BGP配置實驗之聚合aggregate-address


清除R3上的聚合,將聚合做在R1上。

router bgp 3

no aggregate-address 202.1.16.0 255.255.252.0 summary-only


router bgp 1

no aggregate-address 202.1.16.0 255.255.252.0 summary-only

43、BGP配置實驗之聚合aggregate-address

43、BGP配置實驗之聚合aggregate-address

router bgp 1

no aggregate-address 202.1.16.0 255.255.252.0 summary-only as-set

43、BGP配置實驗之聚合aggregate-address

43、BGP配置實驗之聚合aggregate-address

R1不再將聚合路由通告給R3。

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI