API Guide

routes 显示从邻居学习的路由
默认 未配置
命令模式
EXEC
使用情况信息
BGP neighbor 显示 BGP 邻居地址及其编号。该行中的最后一个短语指示 BGP 路由器及其邻居之间
的链路是否为外部或内部。如果它们位于相同 AS 则链路为内部否则链路为外部。
BGP version 显示 BGP 版本始终为版本 4和远程路由器 ID
BGP state 显示邻居的 BGP 状态和时间量以小时:分钟:秒为单位的状态。
Last read 显示上次读取的信息
上次读取是指路由器从其邻居中读取消息的时间以小时:分钟:秒为单位
暂存时间是指从其邻居中的消息之间配置的秒数。
保留间隔是保留消息之间的秒数以帮助确保 TCP 会话仍处于活动状态。
Received messages 显示收到的 BGP 消息数、通知数或错误消息数以及队列中等待处理的消息
数。
Sent messages 显示已发送的 BGP 消息数、通知数或错误消息数以及队列中等待处理的消息数。
Description 显示为 BGP 邻居配置的描述性名称。只有当配置说明时才会显示此字段。
Local host 显示本地路由器的对等地址和 TCP 的端口号。
Foreign host 显示邻居的对等地址和 TCP 的端口号。
虽然从 BGP 邻居接收的路由的状态代码可能不会显示在 show ip bgp neighbors ip-address
received-routes 输出中但它们会在 show ip bgp 输出中正确显示。
示例
OS10# show ip bgp neighbors
BGP neighbor is 80.1.1.2, remote AS 800, local AS 102 external link
BGP version 4, remote router ID 12.12.0.2
BGP state ESTABLISHED, in this state for 00:02:51
Last read 00:18:23 seconds
Hold time is 90, keepalive interval is 30 seconds
Configured hold time is 180, keepalive interval is 60 seconds
Fall-over disabled
Received 11 messages
1 opens, 0 notifications, 3 updates
7 keepalives, 0 route refresh requests
Sent 8 messages
1 opens, 0 notifications, 0 updates
7 keepalives, 0 route refresh requests
Minimum time between advertisement runs is 30 seconds
Description: n1_abcd
Capabilities received from neighbor for IPv4 Unicast:
MULTIPROTO_EXT(1)MULTIPROTO_EXT(1)MULTIPROTO_EXT(1)ROUTE_REFRESH(2)
Capabilities advertised to neighbor for IPv4 Unicast:
MULTIPROTO_EXT(1)MULTIPROTO_EXT(1)ROUTE_REFRESH(2)CISCO_ROUTE_REFRESH
(128)4_OCTET_AS(65)
Prefixes accepted 5, Prefixes advertised 0
Connections established 1; dropped 1
Closed by neighbor sent 00:02:51 ago
For address family: IPv4 Unicast
Next hop set to self
Allow local AS number 0 times in AS-PATH attribute
For address family: IPv6 Unicast
Next hop set to self
Allow local AS number 0 times in AS-PATH attribute
Local host: 80.1.1.1, Local port: 57812
Foreign host: 80.1.1.2, Foreign port: 179
通告路由示例
OS10# show ip bgp ipv6 unicast neighbors 192:168:1::2 advertised-routes
BGP local router ID is 100.1.1.1
Status codes: s suppressed, S stale, d dampened, h history, * valid, > best
Origin codes: i - IGP, e - EGP, ? - incomplete
3 593