![](https://csdnimg.cn/release/download_crawler_static/87727750/bg4.jpg)
.....................最新资料整理推荐.....................
[RouterB] display bgp routing-table
Total Number of Routes: 1
BGP Local router ID is 2.2.2.2
Status codes: * - valid, ^ - VPNv4 best, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal
Path/Ogn
*> 8.1.1.0/24 3.1.1.2 0 0 65008i
# 显示 Router C 的 BGP 路由表。
[RouterC] display bgp routing-table
Total Number of Routes: 1
BGP Local router ID is 3.3.3.3
Status codes: * - valid, ^ - VPNv4 best, > - best, d - damped,
h - history, i - internal, s - suppressed, S - Stale
Origin : i - IGP, e - EGP, ? - incomplete
Network NextHop MED LocPrf PrefVal
Path/Ogn
i 8.1.1.0/24 3.1.1.2 0 100 0 65008i
从路由表可以看出,Router A 没有学到 AS 65009 内部的任何路由,Router C 虽然学到了
AS 65008 中的 8.1.1.0 的路由,但因为下一跳 3.1.1.2 不可达,所以也不是有效路由。
(4) 配置 BGP 引入直连路由
在 Router B 上配置 BGP 引入直连路由,以便 Router A 能够获取到网段 9.1.1.0/24
的路由,Router C 能够获取到网段 3.1.1.0/24 的路由。
# 配置 Router B。
[RouterB] bgp 65009
[RouterB-bgp] import-route direct
# 显示 Router A 的 BGP 路由表。
[RouterA] display bgp routing-table
Total Number of Routes: 4
BGP Local router ID is 1.1.1.1
4