BGP会将BGP的直连路由下发到核心路由表,因此重分发BGP路由的时候,会重分发BGP的直连路由,下面就让我们我们来看一下配置下发BGP和IS-IS缺省路由后下端业务故障的解决方法。
网络环境
NE80-1、NE80-2、NE40-1和NE40-2四台设备构成口字形组网结构。其中,NE80-1与NE80-2为Level-1-2路由器,NE40-1和NE40-2为Level-1路由器。
NE80-1为AS100的出口路由器,与AS200内的路由器NETWORK之间运行EBGP协议,在NE80-1和NE80-2上给NE40-1和NE40-2下发缺省路由后,出现路由环路。
故障分析
步骤 1 在NE80-1设备上执行命令display bgp routing-table,检查NE80-1的BGP路由表,有一条到NETWORK的BGP缺省路由,如下所示,说明BGP缺省路由下发成功。
- [NE80-1] display bgp routing-table
- Total Number of Routes: 1
- BGP Local router ID is 10.10.10.1
- Status codes: * - valid, > - best, d - damped,
- h - history, i - internal, s - suppressed, S - Stale
- Origin : i - IGP, e - EGP, ? - incomplete
- Network NextHop MED LocPrf PrefVal Path/Ogn
- * 0.0.0.0 10.10.10.2 0 0 200i
步骤 2 在NE40-1和NE40-2上分别执行命令display ip routing-table,检查NE40-1和NE40-2的IP路由表,如下所示,NE40-1的缺省路由指向了NE80-1,NE40-2的缺省路由指向了NE80-2,说明NE80-1和NE80-2下发IS-IS缺省路由成功。
- [NE40-1-isis-1] display ip routing-table
- Route Flags: R - relay, D - download to fib
- ------------------------------------------------------------------------------
- Routing Tables: Public
- Destinations : 11 Routes : 11
- Destination/Mask Proto Pre Cost Flags NextHop Interface
- 0.0.0.0/0 ISIS 15 10 D 2.2.2.1 Serial1/0/0
- 1.1.1.0/24 ISIS 15 20 D 2.2.2.1 Serial1/0/0
- 2.2.2.0/24 Direct 0 0 D 2.2.2.2 Serial1/0/0
- 2.2.2.1/32 Direct 0 0 D 2.2.2.1 Serial1/0/0
- 2.2.2.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
- 3.3.3.0/24 ISIS 15 20 D 4.4.4.2 Serial1/0/1
- 4.4.4.0/24 Direct 0 0 D 4.4.4.1 Serial1/0/1
- 4.4.4.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
- 4.4.4.2/32 Direct 0 0 D 4.4.4.2 Serial1/0/1
- 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
- 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
- [NE40-2-isis-1] display ip routing-table
- Route Flags: R - relay, D - download to fib
- ------------------------------------------------------------------------------
- Routing Tables: Public
- Destinations : 11 Routes : 11
- Destination/Mask Proto Pre Cost Flags NextHop Interface
- 0.0.0.0/0 ISIS 15 10 D 3.3.3.1 Serial1/0/0
- 1.1.1.0/24 ISIS 15 20 D 3.3.3.1 Serial1/0/0
- 2.2.2.0/24 ISIS 15 20 D 4.4.4.1 Serial1/0/1
- 3.3.3.0/24 Direct 0 0 D 3.3.3.2 Serial1/0/0
- 3.3.3.1/32 Direct 0 0 D 3.3.3.1 Serial1/0/0
- 3.3.3.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
- 4.4.4.0/24 Direct 0 0 D 4.4.4.2 Serial1/0/1
- 4.4.4.1/32 Direct 0 0 D 4.4.4.1 Serial1/0/1
- 4.4.4.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
- 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
- 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
#p#
步骤 3 在NE80-1和NE80-2上分别执行命令display ip routing-table,检查NE80-1和NE80-2的IP路由表,如下所示,发现NE80-1的缺省路由指向了NE80-2,NE80-2的缺省路由指向了NE80-1,形成了路由环路。
- <NE80-1> display ip routing-table
- Route Flags: R - relay, D - download to fib
- ------------------------------------------------------------------------------
- Routing Tables: Public
- Destinations : 14 Routes : 14
- Destination/Mask Proto Pre Cost Flags NextHop Interface
- 0.0.0.0/0 ISIS 15 10 D 1.1.1.2 Serial1/0/1
- 1.1.1.0/24 Direct 0 0 D 1.1.1.1 Serial1/0/1
- 1.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
- 1.1.1.2/32 Direct 0 0 D 1.1.1.2 Serial1/0/1
- 2.2.2.0/24 Direct 0 0 D 2.2.2.1 Serial1/0/2
- 2.2.2.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
- 2.2.2.2/32 Direct 0 0 D 2.2.2.2 Serial1/0/2
- 3.3.3.0/24 ISIS 15 20 D 1.1.1.2 Serial1/0/1
- 4.4.4.0/24 ISIS 15 20 D 2.2.2.2 Serial1/0/2
- 10.10.10.0/24 Direct 0 0 D 10.10.10.1 Serial1/0/0
- 10.10.10.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
- 10.10.10.2/32 Direct 0 0 D 10.10.10.2 Serial1/0/0
- 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
- 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
- [NE80-2] dislay ip routing-table
- Route Flags: R - relay, D - download to fib
- ------------------------------------------------------------------------------
- Routing Tables: Public
- Destinations : 11 Routes : 11
- Destination/Mask Proto Pre Cost Flags NextHop Interface
- 0.0.0.0/0 ISIS 15 10 D 1.1.1.1 Serial1/0/0
- 1.1.1.0/24 Direct 0 0 D 1.1.1.2 Serial1/0/0
- 1.1.1.1/32 Direct 0 0 D 1.1.1.1 Serial1/0/0
- 1.1.1.2/32 Direct 0 0 D 127.0.0.1 InLoopBack0
- 2.2.2.0/24 ISIS 15 20 D 1.1.1.1 Serial1/0/0
- 3.3.3.0/24 Direct 0 0 D 3.3.3.1 Serial1/0/1
- 3.3.3.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
- 3.3.3.2/32 Direct 0 0 D 3.3.3.2 Serial1/0/1
- 4.4.4.0/24 ISIS 15 20 D 3.3.3.2 Serial1/0/1
- 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
- 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
步骤 4 虽然上行设备通过EBGP给NE80-1下发了BGP缺省路由,但BGP协议的优先级比IS-IS协议的优先级低(BGP的优先级默认为255而IS-IS是10),所以,又将缺省路由的下一跳指向了NE80-2,这样就形成了路由环路。
#p#
处理步骤
在NE80-2设备上执行命令undo default-route-advertise将下发的缺省路由去除后,NE80-1上执行命令display ip routing-table,可以看到NE80-1的缺省路由的下一跳已经变为10.10.10.2,该路由环路被解除,如下所示。
- [RouterA] display ip routing-table
- Route Flags: R - relay, D - download to fib
- ------------------------------------------------------------------------------
- Routing Tables: Public
- Destinations : 14 Routes : 14
- Destination/Mask Proto Pre Cost Flags NextHop Interface
- 0.0.0.0/0 BGP 255 0 D 10.10.10.2 Serial1/0/0
- 1.1.1.0/24 Direct 0 0 D 1.1.1.1 Serial1/0/1
- 1.1.1.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
- 1.1.1.2/32 Direct 0 0 D 1.1.1.2 Serial1/0/1
- 2.2.2.0/24 Direct 0 0 D 2.2.2.1 Serial1/0/2
- 2.2.2.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
- 2.2.2.2/32 Direct 0 0 D 2.2.2.2 Serial1/0/2
- 3.3.3.0/24 ISIS 15 20 D 1.1.1.2 Serial1/0/1
- 4.4.4.0/24 ISIS 15 20 D 2.2.2.2 Serial1/0/2
- 10.10.10.0/24 Direct 0 0 D 10.10.10.1 Serial1/0/0
- 10.10.10.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
- 10.10.10.2/32 Direct 0 0 D 10.10.10.2 Serial1/0/0
- 127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
- 127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
案例总结
对于不同的协议来说,路由的优先级是有区别的,配置缺省路由时要注意避免出现因路由协议优先级而造成的路由环路,尤其是配置IS-IS路由时。
【编辑推荐】