标签:bgp 消息报文 类型
BGP的消息报文有以下5种报文
open消息
keepalive消息
update消息
notifacation消息
route-refresh消息
j、Open消息
主要包含的内容:
BGP版本、AS号(可用其判断是EBGP还是IBGP);
Holdtime(表示路由器在收到Keeplive消息等待最长时间,cisco默认为180s,如果双方的holdtime时间不一样,邻居不会down,这点与OSPF不同,在BGP中将会协商,采用最小的holdtime时间作为双方的holdtime时间,一般情况下,该值为keepalive的三台,默认情况下keepalive时间为60s);
BGP标识符(router-id);
可选项optionalpareameter(包含多协议支持的地址簇等);
k、Keepalive消息
是响应Open消息,用于保持邻居关系,没有携带什么消息及数据,默认情况下,60s发送一次keepalive消息;
l、notification消息
对错误的配置进行响应,具有差错检测功能,当检测到错误时,会向对等体发送notification消息,并关闭BGP连接;
从中可知,有错误类型、错误代码、错误子代码(错误原因)
*Dec 7 11:35:38.747: %BGP_SESSION-5-ADJCHANGE:neighbor 12.1.1.1 IPv4 Unicast topology base removed from session BGP Notificationsent
m、Update消息
用于对等体之间通告路由、已撤消的前辍路由、NLRI(网络可达性消息)、路径属性值;
Withdrawn routeslength 表示不可达路由长度
Total pathattribute length 总路径属性长度,如果是0表示没有path attributes字段;
n、route-Refresh消息
要求对等体重新发送路由更新信息,可用clearip bgp * soft in软清让路由器重新发送路由更新信息;
Address familyidentifier AFI: 地址族标识
Subsequesnt addressfamily identifier(SAFI)子地址族标识
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
本文出自 “暮云风潇” 博客,请务必保留此出处http://muyun.blog.51cto.com/952166/1587261
标签:bgp 消息报文 类型
原文地址:http://muyun.blog.51cto.com/952166/1587261