1、實驗拓?fù)?/p>
創(chuàng)新互聯(lián)專注于企業(yè)全網(wǎng)營銷推廣、網(wǎng)站重做改版、寒亭網(wǎng)站定制設(shè)計、自適應(yīng)品牌網(wǎng)站建設(shè)、H5頁面制作、商城網(wǎng)站制作、集團(tuán)公司官網(wǎng)建設(shè)、外貿(mào)營銷網(wǎng)站建設(shè)、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁設(shè)計等建站業(yè)務(wù),價格優(yōu)惠性價比高,為寒亭等各大城市提供網(wǎng)站開發(fā)制作服務(wù)。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
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
清除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
router bgp 1
no aggregate-address 202.1.16.0 255.255.252.0 summary-only as-set
R1不再將聚合路由通告給R3。
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務(wù)可用性高、性價比高”等特點(diǎn)與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場景需求。