BGP表的确认方法

1,BGP的三张表

 邻居表(adjancy table)
 BGP表(forwarding database):BGP默认不做负载均衡,会选出一条最优的,放入路由表
 路由表(routing table)

 查询命令:
 BGP表:show ip bgp
 路由表:show ip route
 邻居表:show ip bgp summary(简单邻居),show ip bgp neighbor(详细邻居)

2, BGP转发表的确认方法

R18#show ip bgp 
BGP table version is 43, local router ID is 18.18.18.18
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal, 
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, 
              x best-external, a additional-path, c RIB-compressed, 
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>i 1.1.1.1/32       19.19.19.19              0    100      0 100 i
 *>  2.2.2.2/32       192.168.188.8                          0 400 200 i
 * i                  19.19.19.19              0    100      0 100 200 i
 *>  18.18.18.18/32   0.0.0.0                  0         32768 i
 r>i 19.19.19.19/32   19.19.19.19              0    100      0 i
 *>i 192.168.12.0     19.19.19.19              0    100      0 100 ?
 *>i 192.168.13.0     19.19.19.19              0    100      0 100 ?
 *>  192.168.118.0    0.0.0.0                  0         32768 ?
 *>i 192.168.119.0    19.19.19.19              0    100      0 ?
 *>  192.168.188.0    0.0.0.0                  0         32768 ?
 *>  192.168.189.0    0.0.0.0                  0         32768 ?
 *>i 192.168.193.0    19.19.19.19              0    100      0 ?

1. BGP table version is 43
BGP表版本,随着BGP表的变更而递增

2. local router ID is 18.18.18.18
路由器IP地址

3. Status codes
3.1 常见

  • * - 有效路由,即可达,但不一定是最优
  • > - 最优路由
  • i - 通过iBGP学到的路由
  • r - 未进入RIB表的路由
    ★该路由在IGP中已经拥有比BGP更高优先级的AD值。
    ★内存错误
    ★超出VRF中的路由限制数。
R18#sh ip bgp rib-failure 
  Network            Next Hop                      RIB-failure   RIB-NH Matches
19.19.19.19/32     19.19.19.19         Higher admin distance              n/a

3.2 不常见(待进一步查资料

  • m - 具有用于该网络的多路径
  • b - 具有用于该网络的备份路径
  • x - 具有用于网络的最佳外部路由
  • d - 被惩罚的路由,当前正常
  • h - 被惩罚的路由,有历史记录但没有最佳路由
  • s - 被抑制的路由,例如路由汇总而抑制了明细
  • S - 过期路由

4. Origin codes

  • i - IBGP
  • e - EBGP
  • ? - 通过重分布学习到的路由

5. 其它

  • Network - 目的网段
  • Next Hop - 下一跳
  • Metric - MED值
  • LocPrf - 本地优先级
  • Weight - 权重

6. 举例

     Network          Next Hop            Metric LocPrf Weight Path
 *>  2.2.2.2/32       192.168.188.8                          0 400 200 i
 * i                  19.19.19.19              0    100      0 100 200 i
  • 2.2.2.2/32这条路由有两个下一跳192.168.188.8和19.19.19.19。
  • 下一跳为192.168.188.8的路由有效且是最佳路由,穿越的AS为400和200。
    即2.2.2.2/32这条路由是由AS 200宣告的。
  • 下一跳为19.19.19.19的路由有效且是通过iBGP学习到的。穿越的AS为100 200。
     Network          Next Hop            Metric LocPrf Weight Path
 *>  18.18.18.18/32   0.0.0.0                  0         32768 i
  • Weight为32867,下一跳为0.0.0.0也就是自己,表示此路由由自己发出。

参考链接:
http://www.cnblogs.com/guxh/p/8467760.html
https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/command/iproute_bgp-xe-3se-3850-cr-book/iproute_bgp-xe-3se-3850-cr-book_chapter_0100.html#wp1745539073
http://ccie.edufly.cn/ccieziliao/6356.html
https://blog.csdn.net/hrl7752/article/details/78084299

你可能感兴趣的:(BGP表的确认方法)