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

no-prepend

Does not prepend the local AS number to any routes recevied from the EBGP neighbor.

網路架構圖:



根據我們Part 2的實驗結果我們可以知道,當我們加上local-as之後,不論是接收到的EBGP或是轉送出去的IBGP都會被prepend上local-as(在本例中為200)。而在local-as之後再接著no-prepend這個參數的話,則是當接收到EBGP路由時不再prpepdn local-as,我想透過我的中文說明大家會比較了解Cisco的文言文在說些什麼,多說無益,直接作Lab來看結果,大家就可以了解了!

以下是我們在R2上設定步驟:

R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router bgp 100
R2(config-router)#nei
R2(config-router)#neighbor 192.168.1.10 local-as 200 no-pre
R2(config-router)#neighbor 192.168.1.10 local-as 200 no-prepend
R2(config-router)#00:53:03: %BGP-5-ADJCHANGE: neighbor 192.168.1.10 Down Local A
S change => 即使只是修改local-as之後的參數也會導致BGP session中斷喔,所以請小心!!!

接著我們再來看看各個Router上的BGP Table:

R1#sh ip bgp
BGP table version is 20, 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
*>i10.3.3.22/32 192.168.1.2 0 100 0 i
*>i10.3.3.33/32 192.168.1.10 0 100 0 300 i
* i192.168.1.0/30 192.168.1.2 0 100 0 ?
*> 0.0.0.0 0 32768 ?
*>i192.168.1.8/30 192.168.1.2 0 100 0 ?

R2#sh ip bgp
BGP table version is 8, 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
*>i10.3.3.11/32 192.168.1.1 0 100 0 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 0.0.0.0 0 32768 ?
* i 192.168.1.1 0 100 0 ?
* 192.168.1.8/30 192.168.1.10 0 0 300 ?
*> 0.0.0.0 0 32768 ?

R3#sh ip bgp
BGP table version is 24, 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 100 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 100 ?
* 192.168.1.8/30 192.168.1.9 0 0 200 100 ?
*> 0.0.0.0 0 32768 ?

根據這些BGP Table的內容,我想大家都應該已經了解了吧,跟上一個Lab不同的結果,只有在R1,R2上的BGP routes as-path只剩下了AS300,再也看不到AS200的存在了!

Comments

Popular posts from this blog

L2TPv3 Enables Layer 2 Services for IP Networks

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

Q-in-Q(Dot1Q Tunnel) Sample Configuration