BGP的消息報文類型

 BGP的消息報文有以下5種報文

    open消息

keepalive消息

update消息

notifacation消息

route-refresh消息


jOpen消息

主要包含的內容:

BGP版本、AS號(可用其判斷是EBGP還是IBGP);

Holdtime(表示路由器在收到Keeplive消息等待最長時間,cisco默認爲180s,如果雙方的holdtime時間不一樣,鄰居不會down,這點與OSPF不同,在BGP中將會協商,採用最小的holdtime時間作爲雙方的holdtime時間,一般情況下,該值爲keepalive的三臺,默認情況下keepalive時間爲60s);

BGP標識符(router-id);

可選項optionalpareameter(包含多協議支持的地址簇等);

wKioL1SD3rWSxDy_AAED0mcNUkk946.jpg


kKeepalive消息

是響應Open消息,用於保持鄰居關係,沒有攜帶什麼消息及數據,默認情況下,60s發送一次keepalive消息;

wKioL1SD3tyhvnw4AADYU7s0Exk781.jpg


lnotification消息

對錯誤的配置進行響應,具有差錯檢測功能,當檢測到錯誤時,會向對等體發送notification消息,並關閉BGP連接;

wKioL1SD3y_yFWJSAADwp6Ddlz4814.jpg

從中可知,有錯誤類型、錯誤代碼、錯誤子代碼(錯誤原因)

*Dec  7 11:35:38.747: %BGP_SESSION-5-ADJCHANGE:neighbor 12.1.1.1 IPv4 Unicast topology base removed from session  BGP Notificationsent


mUpdate消息

用於對等體之間通告路由、已撤消的前輟路由、NLRI(網絡可達性消息)、路徑屬性值;

wKioL1SD32XAYnvtAAGjdA-jphg208.jpg

Withdrawn routeslength 表示不可達路由長度

Total pathattribute length 總路徑屬性長度,如果是0表示沒有path attributes字段;


nroute-Refresh消息

要求對等體重新發送路由更新信息,可用clearip bgp * soft in軟清讓路由器重新發送路由更新信息;

wKiom1SD3z3BGZJYAAEe3xSniRM976.jpg

Address familyidentifier AFI: 地址族標識

Subsequesnt addressfamily identifierSAFI)子地址族標識


R2#show ip bgp neighbors  //用此命令可查看refresh報文的情況

BGP neighbor is4.4.4.4,  remote AS 100, internal link

  BGP version 4, remote router ID 4.4.4.4

  BGP state = Established, up for 00:11:33

  Last read 00:00:40, last write 00:00:08, holdtime is 180, keepalive interval is 60 seconds

  Neighbor sessions:

    1 active, is not multisession capable(disabled)

  Neighbor capabilities:

    Route refresh: advertised and received(new)

    Four-octets ASN Capability: advertised andreceived

    Address family IPv4 Unicast: advertised andreceived

    Enhanced Refresh Capability: advertised andreceived

    Multisession Capability:

    Stateful switchover support enabled: NO forsession 1

  Message statistics:

    InQ depth is 0

    OutQ depth is 0

                             Sent       Rcvd

    Opens:                  1          1

    Notifications:          0          0

    Updates:                4          1

    Keepalives:            14         14

    Route Refresh:          0          0

    Total:                 19         16

在上面可知,route refresh的報文數爲零,執行命令後

R2#clear ip bgp* soft in

R2#show ip bgpneighbors  //再次查看情況

BGP neighbor is4.4.4.4,  remote AS 100, internal link

  BGP version 4, remote router ID 4.4.4.4

  BGP state = Established, up for 00:11:33

  Last read 00:00:40, last write 00:00:08, holdtime is 180, keepalive interval is 60 seconds

  Neighbor sessions:

    1 active, is not multisession capable(disabled)

  Neighbor capabilities:

    Route refresh: advertised and received(new)

    Four-octets ASN Capability: advertised andreceived

    Address family IPv4 Unicast: advertised andreceived

    Enhanced Refresh Capability: advertised andreceived

    Multisession Capability:

    Stateful switchover support enabled: NO forsession 1

  Message statistics:

    InQ depth is 0

    OutQ depth is 0

                             Sent       Rcvd

    Opens:                  1          1

    Notifications:          0          0

    Updates:                5          1

    Keepalives:            24         25

    Route Refresh:          1          0

    Total:                 33         31



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章