close

這篇主要是給BGP初學者看的,BGP軟性重設以下我簡稱BGP軟清、BGP硬性重設簡稱BGP硬清。BGP的軟硬清在此官方文件第2頁有說明不同之處,另外我會再配合舉例、Lab幫助您更方便理解它。

BGP硬清會將session會談中斷,重新建立內部或外部BGP鄰居的連線。但是如果我只要改變BGP屬性,而不造成BGP連線中斷,例如調整weight權重、local-preference本地優先值等各種BGP屬性,卻不能中斷BGP連線,則使用BGP軟清。

※調整BGP屬性的動機是為了影響路徑選擇。

BGP軟清就像你在瀏覽器按下重新整理,將網頁重新載入;BGP硬清就像你關閉瀏覽器,瀏覽器的程序ID被系統關掉了。

[拓樸 & 配置]

0.png

R1和R2為外部BGP鄰居、R2和R3為內部BGP鄰居,在此範例我只使用本地優先值示範BGP軟硬清。

預設下,BGP屬性的本地優先值為100,R1使用BGP通告1.1.1.1/32網段給R2,R2再將網段傳播給R3,在R3下指令「show ip bgp」能看到1.1.1.1/32網段的本地優先值為100。

然後我刻意將本地優先值修改為23,並在R2上軟清。請參考下圖:

[R3]

2.png

[R2 BGP soft reset]

1.png

若不指定內外部BGP鄰居,也不指定出入方向,思科作業系統BGP硬清指令「clear ip bgp *」,BGP軟清指令「clear ip bgp * soft」。

另外也看一下在開啟除錯模式中,BGP硬清的訊息,請參考下圖:

[R2 BGP hard reset]

3.png

您可以看到,當我在R2做了BGP硬清且不指定鄰居或方向,與R1、R3之間的BGP連線被中斷,但是不久又重建了BGP會談。

然而相較之下,BGP軟清比硬清更占用系統資源,但是不影響系統運作。


The writing is for learning BGP beginner. Be related BGP hard & soft reset that in page 2 of official document. There are explain difference points with BGP hard & soft reset.
And I will cooperate example, Lab to help you understand them.

BGP hard reset will break BGP sessions, and re-establish internal or external BGP neighbors connection. However, if I have change BGP attributes only and not cause BGP sessions was break.
Such as to adjust BGP attributes that weight, local-preference and so on. But router can not break BGP session, please use BGP soft reset.

※The motivation for adjust BGP attributes, that is so as to influence routing.
BGP soft reset, it like you press refresh button on browser, to reload web page. BGP hard reset, it like you close the browser, browser process ID was killed by system.

[Topology & configurations]

The R1 and R2 are external BGP neighbor, the R2 and R3 are internal BGP neighbor. In the example, I use local-preference only to demonstrate BGP soft reset.
By default configuration, BGP attribute for local-preference is 100. The R1 has advertise network 1.1.1.1/32 to R2, the R2 has propagate it to R3.
Input command 「show ip bgp」 in R3, you can see the network 1.1.1.1/32 with local-preference is 100.
And then, I have change local-preference be 23, and to do soft reset in R2. Please refer to image:
[R3]

[R2 BGP soft reset]

If I have not specify arguments for internal or external BGP neighbors, nor specify direction for in or out.
On the Cisco operating system, the command 「clear ip bgp *」 is for BGP hard reset. The command 「clear ip bgp * soft」 is for BGP soft reset.
And I can enable debug mode, to read syslog for BGP hard reset. Please refer to image:

[R2 BGP hard reset]

When I have BGP hard reset in R2 and not specify neighbors or direction. The R2 and R1, R3 session were break, but re-establish BGP session soon.
However their compared, BGP soft reset is more use system resource than hard reset. But not affect system working.

arrow
arrow
    全站熱搜

    Chin 發表在 痞客邦 留言(0) 人氣()