BGP Dual AS Configuration : neighbor local-as 參數釋疑(Part 1)

Cisco現在的教材真的是愈來愈難懂,文字一大堆卻又捨不得多放一些Figure或是每個Router的Routing Table來輔助說明,我花了一個晚上的時間才把neighbor local-as後面的幾個參數搞清楚…希望我的努力可以減少各位在學習上的挫折。

首先我利用了Dynamips來架設一個Virtual Lab來加以說明,各位有興趣的話,可以把以下的內容存成一個.net檔案之後來啟動dynamips(請切記要修改IOS實際的存在絕對目錄位址):
===============================================================
[localhost]

[[7200]]
image = C:\Program Files\Dynamips\images\c7200-k91p-mz.122-25.S9.extracted.bin
idlepc = 0x60843c10
npe = npe-400
ram = 128
ghostios = true # Enable or disable IOS ghosting globally for this lab. Can be overridden at the device defaults sections, or the device sections. Defaults to False.
mmap = false # mmap = true(use disk for ghost memory) or false(use real memory)
disk0 = 0
disk1 = 0
confreg = 0x2102

[[ROUTER R1]]
s1/0 = R2 s1/0
s1/1 = R3 s1/0

[[router R2]]
s1/1 = R3 s1/1

[[ROUTER R3]]
===============================================================

網路架構圖:



以下是R1(AS100), R2(原本屬於AS200後來被併購變成AS100) ,R3(AS300原本為AS200的客戶)的running-config(我只節錄重點的部份,其他的設定不重要);實際的Lab規劃連線是兩兩相連,但是為了簡化架構,因此我只讓R1接至R2,R2接至R3;每個Router上的Loopback interface當成是該AS中的BGP Network,藉此來看看BGP AS-Path在不同的參數之下所產生的變化:

R1(ISP A)
===============================================================
hostname R1
!
ip host R2 10.3.3.22
ip host R3 10.3.3.33
!
interface Loopback0
ip address 10.3.3.11 255.255.255.255
no clns route-cache
!
interface Serial1/0
description R2
ip address 192.168.1.1 255.255.255.252
serial restart-delay 0
clockrate 64000
no clns route-cache
!
router bgp 100
no synchronization
bgp log-neighbor-changes
network 10.3.3.11 mask 255.255.255.255
redistribute connected
neighbor 192.168.1.2 remote-as 200
no auto-summary
===============================================================

R2(ISP B)
===============================================================
hostname R2
!
ip host R1 10.3.3.11
ip host R3 10.3.3.33
!
!
interface Loopback0
ip address 10.3.3.22 255.255.255.255
no clns route-cache
!
interface Serial1/0
description R1
ip address 192.168.1.2 255.255.255.252
no fair-queue
serial restart-delay 0
clockrate 64000
no clns route-cache
!
router bgp 200
no synchronization
bgp log-neighbor-changes
network 10.3.3.22 mask 255.255.255.255
redistribute connected
neighbor 192.168.1.1 remote-as 100
neighbor 192.168.1.10 remote-as 300
no auto-summary
===============================================================

R3(Customer of ISP B)
===============================================================
hostname R3
!
ip host R1 10.3.3.11
ip host R2 10.3.3.22
!
interface Loopback0
ip address 10.3.3.33 255.255.255.255
no clns route-cache
!
interface Serial1/1
description R2
ip address 192.168.1.10 255.255.255.252
serial restart-delay 0
clockrate 64000
no clns route-cache
!
router bgp 300
no synchronization
bgp log-neighbor-changes
network 10.3.3.33 mask 255.255.255.255
redistribute connected
neighbor 192.168.1.9 remote-as 200
no auto-summary
===============================================================

好的,接下來我們來看看這三個Router上的BGP Table:

R1#sh ip bgp
BGP table version is 12, local router ID is 10.3.3.11
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 10.3.3.11/32 0.0.0.0 0 32768 i
*> 10.3.3.22/32 192.168.1.2 0 0 200 i
*> 10.3.3.33/32 192.168.1.2 0 200 300 i
* 192.168.1.0/30 192.168.1.2 0 0 200 ?
*> 0.0.0.0 0 32768 ?
*> 192.168.1.8/30 192.168.1.2 0 0 200 ?

R2#sh ip bgp
BGP table version is 6, local router ID is 10.3.3.22
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 10.3.3.11/32 192.168.1.1 0 0 100 i
*> 10.3.3.22/32 0.0.0.0 0 32768 i
*> 10.3.3.33/32 192.168.1.10 0 0 300 i
* 192.168.1.0/30 192.168.1.1 0 0 100 ?
*> 0.0.0.0 0 32768 ?
*> 192.168.1.8/30 0.0.0.0 0 32768 ?
* 192.168.1.10 0 0 300 ?

R3#sh ip bgp
BGP table version is 12, local router ID is 10.3.3.33
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop Metric LocPrf Weight Path
*> 10.3.3.11/32 192.168.1.9 0 200 100 i
*> 10.3.3.22/32 192.168.1.9 0 0 200 i

*> 10.3.3.33/32 0.0.0.0 0 32768 i
*> 192.168.1.0/30 192.168.1.9 0 0 200 ?
* 192.168.1.8/30 192.168.1.9 0 0 200 ?
*> 0.0.0.0 0 32768 ?

以上是我們的事前環境準備工作,請各位看倌再緊接著來看看Part 2,如何啟用local-as參數~

Comments

Popular posts from this blog

TCP/IP 明確擁塞通知 (ECN)

集中式數位交換機(CENTREX)系統

WRR(Weighted Round Robin) vs SRR(Shared/Shaped Round Robin)