思科BGP路由聚合配置實(shí)驗(yàn)案例分析

本文講述了思科BGP路由聚合配置實(shí)驗(yàn)。分享給大家供大家參考,具體如下:
如下圖示:
R1:
interface Loopback0
ip address 1.1.1.1 255.255.255.255
interface Loopback11
ip address 11.11.11.1 255.255.255.0
interface Loopback101
ip address 101.1.1.1 255.255.255.0
interface FastEthernet0/0
ip address 12.1.1.1 255.255.255.0
no sh
interface FastEthernet0/1
ip address 13.1.1.1 255.255.255.0
no sh
router ospf 1
network 1.1.1.1 0.0.0.0 area 0
network 12.1.1.0 0.0.0.255 area 0
network 13.1.1.0 0.0.0.255 area 0
router bgp 1
bgp router-id 1.1.1.1
network 11.11.11.0 mask 255.255.255.0
network 101.1.1.0 mask 255.255.255.0
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 update-source Loopback0
neighbor 3.3.3.3 remote-as 1
neighbor 3.3.3.3 update-source Loopback0
R2:
interface Loopback0
ip address 2.2.2.2 255.255.255.255
interface Loopback22
ip address 22.22.22.2 255.255.255.0
interface FastEthernet0/0
ip address 12.1.1.2 255.255.255.0
no sh
interface FastEthernet0/1
ip address 24.1.1.2 255.255.255.0
no sh
router ospf 1
network 2.2.2.2 0.0.0.0 area 0
network 12.1.1.0 0.0.0.255 area 0
network 24.1.1.0 0.0.0.255 area 0
router bgp 1
bgp router-id 2.2.2.2
network 22.22.22.0 mask 255.255.255.0
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback0
neighbor 4.4.4.4 remote-as 4
neighbor 4.4.4.4 ebgp-multihop 255
neighbor 4.4.4.4 update-source Loopback0
R3:
interface Loopback0
ip address 3.3.3.3 255.255.255.255
interface Loopback33
ip address 33.33.33.3 255.255.255.0
interface FastEthernet0/0
ip address 34.1.1.3 255.255.255.0
no sh
interface FastEthernet0/1
ip address 13.1.1.3 255.255.255.0
no sh
router ospf 1
network 3.3.3.3 0.0.0.0 area 0
network 13.1.1.0 0.0.0.255 area 0
network 34.1.1.0 0.0.0.255 area 0
router bgp 1
bgp router-id 3.3.3.3
network 33.33.33.0 mask 255.255.255.0
neighbor 1.1.1.1 remote-as 1
neighbor 1.1.1.1 update-source Loopback0
neighbor 4.4.4.4 remote-as 4
neighbor 4.4.4.4 ebgp-multihop 255
neighbor 4.4.4.4 update-source Loopback0
R4:
interface Loopback0
ip address 4.4.4.4 255.255.255.255
interface Loopback44
ip address 44.44.44.4 255.255.255.0
interface FastEthernet0/0
ip address 34.1.1.4 255.255.255.0
no sh
interface FastEthernet0/1
ip address 24.1.1.4 255.255.255.0
no sh
interface FastEthernet1/0
ip address 45.1.1.4 255.255.255.0
no sh
interface FastEthernet1/1
ip address 46.1.1.4 255.255.255.0
no sh
router ospf 1
network 4.4.4.4 0.0.0.0 area 0
network 24.1.1.0 0.0.0.255 area 0
network 34.1.1.0 0.0.0.255 area 0
network 45.1.1.0 0.0.0.255 area 0
network 46.1.1.0 0.0.0.255 area 0
router bgp 4
bgp router-id 4.4.4.4
network 44.44.44.0 mask 255.255.255.0
//aggregate-address 101.1.0.0 255.255.252.0 as-set summary-only //抑制全部的101.1.0.0/22明細(xì)路由,只發(fā)匯總路由。(在此實(shí)驗(yàn),這一條命令是多余的。)
neighbor 2.2.2.2 remote-as 1
neighbor 2.2.2.2 ebgp-multihop 255
neighbor 2.2.2.2 update-source Loopback0
neighbor 3.3.3.3 remote-as 1
neighbor 3.3.3.3 ebgp-multihop 255
neighbor 3.3.3.3 update-source Loopback0
neighbor 5.5.5.5 remote-as 5
neighbor 5.5.5.5 ebgp-multihop 255
neighbor 5.5.5.5 update-source Loopback0
neighbor 6.6.6.6 remote-as 6
neighbor 6.6.6.6 ebgp-multihop 255
neighbor 6.6.6.6 update-source Loopback0
access-list 1 permit 101.1.1.0 //以下五行命令是抑制101.1.1.0這個(gè)網(wǎng)段不予通告路由。
route-map apple permit 10
match ip address 1
router bgp 4
aggregate-address 101.1.0.0 255.255.252.0 as-set suppress-map apple
R5:
interface Loopback0
ip address 5.5.5.5 255.255.255.255
interface Loopback55
ip address 55.55.55.5 255.255.255.0
interface FastEthernet1/0
ip address 45.1.1.5 255.255.255.0
no sh
router ospf 1
network 5.5.5.5 0.0.0.0 area 0
network 45.1.1.0 0.0.0.255 area 0
router bgp 5
bgp router-id 5.5.5.5
network 55.55.55.0 mask 255.255.255.0
neighbor 4.4.4.4 remote-as 4
neighbor 4.4.4.4 ebgp-multihop 255
neighbor 4.4.4.4 update-source Loopback0
R6:
interface Loopback0
ip address 6.6.6.6 255.255.255.255
interface Loopback66
ip address 66.66.66.6 255.255.255.0
interface Loopback101
ip address 101.1.3.6 255.255.255.0 secondary
ip address 101.1.2.6 255.255.255.0
interface FastEthernet1/1
ip address 46.1.1.6 255.255.255.0
no sh
router ospf 1
network 6.6.6.6 0.0.0.0 area 0
network 46.1.1.0 0.0.0.255 area 0
router bgp 6
bgp router-id 6.6.6.6
network 66.66.66.0 mask 255.255.255.0
network 101.1.2.0 mask 255.255.255.0
network 101.1.3.0 mask 255.255.255.0
neighbor 4.4.4.4 remote-as 4
neighbor 4.4.4.4 ebgp-multihop 255
neighbor 4.4.4.4 update-source Loopback0
R5(config-router)#do show ip bgp
BGP table version is 32, local router ID is 5.5.5.5
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incompleteNetwork Next Hop Metric LocPrf Weight Path
*> 11.11.11.0/24 4.4.4.4 0 4 1 i
*> 22.22.22.0/24 4.4.4.4 0 4 1 i
*> 33.33.33.0/24 4.4.4.4 0 4 1 i
*> 44.44.44.0/24 4.4.4.4 0 0 4 i
*> 55.55.55.0/24 0.0.0.0 0 32768 i
*> 66.66.66.0/24 4.4.4.4 0 4 6 i
*> 101.1.0.0/22 4.4.4.4 0 0 4 {1,6} i
*> 101.1.2.0/24 4.4.4.4 0 4 6 i
*> 101.1.3.0/24 4.4.4.4 0 4 6 iR1(config-router)#do show ip bgp
BGP table version is 52, local router ID is 1.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incompleteNetwork Next Hop Metric LocPrf Weight Path
*> 11.11.11.0/24 0.0.0.0 0 32768 i
*>i22.22.22.0/24 2.2.2.2 0 100 0 i
*>i33.33.33.0/24 3.3.3.3 0 100 0 i
* i44.44.44.0/24 4.4.4.4 0 100 0 4 i
*>i 4.4.4.4 0 100 0 4 i
* i55.55.55.0/24 4.4.4.4 0 100 0 4 5 i
*>i 4.4.4.4 0 100 0 4 5 i
* i66.66.66.0/24 4.4.4.4 0 100 0 4 6 i
*>i 4.4.4.4 0 100 0 4 6 i
*> 101.1.1.0/24 0.0.0.0 0 32768 i
* i101.1.2.0/24 4.4.4.4 0 100 0 4 6 i
*>i 4.4.4.4 0 100 0 4 6 i
* i101.1.3.0/24 4.4.4.4 0 100 0 4 6 i
*>i 4.4.4.4 0 100 0 4 6 i
R1(config-router)#do ping 101.1.2.6
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 101.1.2.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 44/64/112 ms
增加語(yǔ)句:
R1:
router bgp 1
neighbor 3.3.3.3 route-reflector-client //這兩句必須加,否R2和R3不知道對(duì)方的存在。
neighbor 2.2.2.2 route-reflector-client
相關(guān)文章
- 這篇文章主要介紹了思科BGP AS-PATH配置實(shí)驗(yàn),結(jié)合具體實(shí)驗(yàn)案例形式分析了思科BGP AS-PATH配置具體步驟與操作命令,需要的朋友可以參考下2020-04-18
- 這篇文章主要介紹了思科Cisco BGP常用show命令,總結(jié)整理了思科Cisco BGP使用show命令查看BGP路由表與網(wǎng)絡(luò)狀態(tài)相關(guān)操作技巧,需要的朋友可以參考下2020-04-05
BGP邊界網(wǎng)關(guān)路由協(xié)議學(xué)習(xí)筆記之屬性和選路規(guī)則詳解
這篇文章主要介紹了BGP邊界網(wǎng)關(guān)路由協(xié)議學(xué)習(xí)筆記之屬性和選路規(guī)則,詳細(xì)分析了BGP屬性、路由條件及相關(guān)配置命令使用技巧,需要的朋友可以參考下2020-04-08BGP邊界網(wǎng)關(guān)路由協(xié)議學(xué)習(xí)筆記(二)路由聚合操作匯總
這篇文章主要介紹了BGP邊界網(wǎng)關(guān)路由協(xié)議路由聚合操作,匯總整理了BGP邊界網(wǎng)關(guān)路由協(xié)議路由聚合相關(guān)概念、原理、操作命令與使用注意事項(xiàng),需要的朋友可以參考下2020-04-07BGP邊界網(wǎng)關(guān)路由協(xié)議學(xué)習(xí)筆記(一)
這篇文章主要介紹了BGP邊界網(wǎng)關(guān)路由協(xié)議,總結(jié)整理了BGP邊界網(wǎng)關(guān)路由協(xié)議的相關(guān)概念、原理、配置命令及操作注意事項(xiàng),需要的朋友可以參考下2020-04-07最常用路由協(xié)議RIP-1/2 OSPF IS-IS BGP的特點(diǎn)對(duì)比
RIP協(xié)議是最早的路由協(xié)議,OSPF是目前應(yīng)用最廣泛的IGP協(xié)議,IS-IS是另外一種鏈路狀態(tài)型的路由協(xié)議,BGP協(xié)議是唯一的EGP協(xié)議,那么這幾種路由協(xié)議有什么特點(diǎn)和不同呢?下面就2017-04-06理解BGP協(xié)議同步規(guī)則的目的和需求 中文PDF版
在bgp同步打開(kāi)的情況下,一個(gè)BGP路由器不會(huì)把那些通過(guò)ibgp鄰居學(xué)到的bgp路由通告給自己的ebgp鄰居;除非自己的igb路由表中存在這些路由,才可以向ebgp路由器通告;有需要的朋2016-10-16邊緣網(wǎng)關(guān)協(xié)議(BGP)報(bào)頭結(jié)構(gòu)詳解 中文PDF版
路由包括兩個(gè)基本的動(dòng)作:確定最佳路徑和信息群(通常稱為分組)通過(guò)網(wǎng)絡(luò)的傳輸。通過(guò)網(wǎng)絡(luò)傳輸分組相對(duì)較簡(jiǎn)單, 而路徑的確定可以分復(fù)雜。 BGP 就是當(dāng)今網(wǎng)絡(luò)中實(shí)現(xiàn)路徑選擇2016-10-16- BGP作為一種廣泛使用的邊界網(wǎng)關(guān)路由協(xié)議,從設(shè)計(jì)上提供了強(qiáng)大的路由過(guò)濾能力,與一般的訪問(wèn)列表ACL不同的是,基于BGP屬性的路由過(guò)濾是通過(guò)對(duì)路由屬性的控制或修改來(lái)完成的2016-10-16
- 這篇文章主要為大家介紹了邊界網(wǎng)關(guān)協(xié)議BGP的概念,怎么配置BGP?下面文章里有詳細(xì)的BGP基本配置的方法步驟,有興趣的可以和腳本之家的小編一起來(lái)看一下2014-09-24