1. Open (code 1):用于建立连接,包含版本号(如BGP3/BGP4)Hold Time=180s(是一个协商的过程,以较小的Hold Time为准),Router-ID(OSPF和BGP可以手动配置),AS号(范围从1~65535,其中64512~
65535 的AS编号范围留作私有);
2. KeepAlives(code 4):周期发送用于维护连接检查路径(这个包是不可靠的),T=Hold Time/3, Hold Time=0 => No KeepAlive.,keepalive 是个19 字节周期发送的BGP 消息头标,没有数据域。
3. Update(code 2):消息包含了三个组件:网络层可达性消息(NLRI)、路径属性和被撤销的路由。包括到达目的网络的路径和属性,更新路由信息用,一次更新只有一条路径,但可以有多条网络。Update可以删除(宣告不可达)和增加(宣告可达)路由.其内容是前缀的长度。
4. Notification(code 3):网络中出现错误(Error),检测到后断开连接并发送通知给对方。
5.Route-Reflesh message:一个可选的message (negotiated during capability advertisement) that is sent to request dynamic BGP route updates from the Adj-RIB-Out table of a remote BGP speaker
协商过程基本上是:Idel,connect,open sent,open confirm,establish。
BGP邻居建立会话的5种状态: