设为首页收藏本站language→→ 语言切换

鸿鹄论坛

 找回密码
 论坛注册

QQ登录

先注册再绑定QQ

查看: 1291|回复: 0
收起左侧

路由器设置之BGP(Border Gateway Protocol)边界网关协议

[复制链接]
发表于 2013-1-12 15:21:14 | 显示全部楼层 |阅读模式
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状态。
您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2025-1-23 21:29 , Processed in 0.061976 second(s), 13 queries , Redis On.  

  Powered by Discuz!

  © 2001-2025 HH010.COM

快速回复 返回顶部 返回列表