|
BGP基于TCP,端口号179. 每隔30S主动发起TCP连接,邻居进入Activefrom OpenSent to OpenConfirm
*Oct ?2 21:43:44.583: BGP: 12.0.0.1 went from OpenConfirm to Established
Active:
BGP尝试与邻居初始化TCP连接,如果TCP连接成功,发送OPEN报文,并迁移到Opensent状态。
OpenSent:
已经发送了Open报文,等待来自邻居的Open消息,然后检查必要参数,如果存在差错则会发送notification消息,并迁移到空闲状态
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? 如果没有错,发送Keeplive消息并协商保持时间和Keeplive定时器。并迁移到openconfirm
Openconfirm:
等待Keeplive或notification消息,如果接收到得是前者,转入established,如果是后者或断开TCP连接的请求,则转入idle状态。
established:
BGP对等连接已经完全建立。
第二台启动的路由器(被动)
*Oct ?2 21:43:21.895: BGP: 12.0.0.2 went from Idle to Active
*Oct ?2 21:43:21.907: BGP: 12.0.0.2 open active delayed 31051ms (35000ms max, 28% jitter)
R1(config-router)#
*Oct ?2 21:43:44.539: BGP: 12.0.0.2 passive open to 12.0.0.1
*Oct ?2 21:43:44.543: BGP: 12.0.0.2 went from Active to Idle
*Oct ?2 21:43:44.543: BGP: 12.0.0.2 went from Idle to Connect
*Oct ?2 21:43:44.555: BGP: 12.0.0.2 rcv message type 1, length (excl. header) 26
*Oct ?2 21:43:44.555: BGP: 12.0.0.2 rcv OPEN, version 4, holdtime 180 seconds
*Oct ?2 21:43:44.555: BGP: 12.0.0.2 went from Connect to OpenSent
*Oct ?2 21:43:44.559: BGP: 12.0.0.2 sending OPEN, version 4, my as: 1, holdtime 180 seconds
*Oct ?2 21:43:44.559: BGP: 12.0.0.2 rcv OPEN w/ OPTION parameter len: 16
*Oct ?2 21:43:44.559: BGP: 12.0.0.2 rcvd OPEN w/ optional parameter type 2 (Capability) len 6
*Oct ?2 21:43:44.559: BGP: 12.0.0.2 OPEN has CAPABILITY code: 1, length 4
*Oct ?2 21:43:44.559: BGP: 12.0.0.2 OPEN has MP_EXT CAP for afi/safi: 1/1
*Oct ?2 21:43:44.563: BGP: 12.0.0.2 rcvd OPEN w/ optional parameter type 2 (Capability) len 2
*Oct ?2 21:43:44.563: BGP: 12.0.0.2 OPEN has CAPABILITY code: 128, length 0
R1(config-router)#
*Oct ?2 21:43:44.563: BGP: 12.0.0.2 OPEN has ROUTE-REFRESH capability(old) for all address-families
*Oct ?2 21:43:44.563: BGP: 12.0.0.2 rcvd OPEN w/ optional parameter type 2 (Capability) len 2
*Oct ?2 21:43:44.563: BGP: 12.0.0.2 OPEN has CAPABILITY code: 2, length 0
*Oct ?2 21:43:44.567: BGP: 12.0.0.2 OPEN has ROUTE-REFRESH capability(new) for all address-families?
BGP: 12.0.0.2 rcvd OPEN w/ remote AS 2
*Oct ?2 21:43:44.567: BGP: 12.0.0.2 went from OpenSent to OpenConfirm
*Oct ?2 21:43:44.567: BGP: 12.0.0.2 send message type 1, length (incl. header) 45
*Oct ?2 21:43:44.611: BGP: 12.0.0.2 went from OpenConfirm to Established
?
idle:
该状态拒绝所有连接,初始化去往邻居的TCP连接。侦听来自邻居的TCP初始化并将状态更改为连接状态。(neighbor以后,会从idle迁移到active,去尝试TCP连接,但这时候已经接受到邻居发来的TCP连接--passive open to 12.0.0.1)
由active状态下,接收到邻居发来的OPEN报文,将状态从active转入到idle,并从idle转入connect,来等待TCP连接完成。
connect:
该状态下,一直等待TCP连接完成,如果TCP连接成功,BGP将发送OPEN报文并进入OPENSENT状态。
|
|