您好,登錄后才能下訂單哦!
1、as-path選路解析
屬性 | 傳播范圍 | 默認(rèn)值 | 優(yōu)先值 | 方向 | 備注 |
weight | 本路由器 | 本路由器32768,其他路由器0 | 大值優(yōu)先 | IN | CISCO私有 |
Local preference | AS內(nèi)部 | 100:邊界路由器,通告給IBGP鄰居,告知如何離開本AS | 大值優(yōu)先 | OUT | |
As path | AS之間 | 無 | 短優(yōu)先 | IN、OUT | |
MED | AS內(nèi)部 | 0:通告給EBGP,告知如何進(jìn)入本AS | 小優(yōu)先 | OUT |
修改MED值的方法:
2、實(shí)驗拓?fù)?/p>
3、基礎(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 Serial0/1
ip address 14.1.1.1 255.255.255.0
router ospf 110
router-id 1.1.1.1
log-adjacency-changes
network 1.1.1.0 0.0.0.255 area 0
network 14.1.1.0 0.0.0.255 area 0
router bgp 4
no synchronization
bgp router-id 1.1.1.1
neighbor 4.4.4.4 remote-as 4
neighbor 4.4.4.4 update-source Loopback0
neighbor 4.4.4.4 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 Serial0/1
ip address 23.1.1.2 255.255.255.0
interface FastEthernet1/0
ip address 24.1.1.2 255.255.255.0
router ospf 110
router-id 2.2.2.2
network 2.2.2.0 0.0.0.255 area 0
network 24.1.1.0 0.0.0.255 area 0
router bgp 4
no synchronization
bgp router-id 2.2.2.2
neighbor 4.4.4.4 remote-as 4
neighbor 4.4.4.4 update-source Loopback0
neighbor 4.4.4.4 next-hop-self
neighbor 23.1.1.3 remote-as 3
no auto-summary
R3配置
interface Loopback0
ip address 3.3.3.3 255.255.255.0
interface Loopback1
ip address 33.33.33.33 255.255.255.0
interface Serial0/0
ip address 13.1.1.3 255.255.255.0
interface Serial0/1
ip address 23.1.1.3 255.255.255.0router bgp 3
no synchronization
bgp router-id 3.3.3.3
network 3.3.3.0 mask 255.255.255.0
network 33.33.33.0 mask 255.255.255.0
neighbor 13.1.1.1 remote-as 4
neighbor 23.1.1.2 remote-as 4
no auto-summary
R4配置
interface Loopback0
ip address 4.4.4.4 255.255.255.0
interface Serial0/1
ip address 14.1.1.4 255.255.255.0
interface FastEthernet1/0
ip address 24.1.1.4 255.255.255.0
router ospf 110
router-id 4.4.4.4
network 4.4.4.0 0.0.0.255 area 0
network 14.1.1.0 0.0.0.255 area 0
network 24.1.1.0 0.0.0.255 area 0
router bgp 4
no synchronization
bgp router-id 4.4.4.4
network 4.4.4.0 mask 255.255.255.0
neighbor 1.1.1.1 remote-as 4
neighbor 1.1.1.1 update-source Loopback0
neighbor 2.2.2.2 remote-as 4
neighbor 2.2.2.2 update-source Loopback0
no auto-summary
4、默認(rèn)選路
根據(jù)BGP選路原則第十條可以知道,R3到達(dá)4.4.4.0/24默認(rèn)經(jīng)過R1。
5、修改MED值讓R3訪問4.4.4.0/24的時候從R2經(jīng)過
R1配置
ip prefix-list 1 seq 5 permit 4.4.4.0/24
route-map MED permit 10
match ip address prefix-list 1
set metric 10
route-map MED permit 20
router bgp 4
neighbor 13.1.1.3 route-map MED out
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。