一、故障现象
R1和R4都可以互相学到对端BGP内网的路由,但是192.168.10.1 ping 192.168.20.1不通
二、组网拓扑

拓扑描述:
R1和R2属于不同的AS,通过物理接口的IP建立EBGP邻居。R2、R3、R4属于相同AS,通过IGP路由协议(本例中为OSPF)实现环回口的可达性后,通过环回口进行IBGP邻居的建立。
三、可能原因
1、黑洞路由导致不通
2、ACL过滤导致不通
四、排查步骤
步骤一:检查是否是黑洞路由导致不通
如果R2和R4直接建立IBGP邻居,R3没有同R2和R4建立BGP邻居,这时候R3将不存在BGP路由,流量转发到R3的时候,R3就因为没有路由丢包了。这种现象叫作路由黑洞。
解决方式1:R2、R3、R4两两之间全互联建立IBGP邻居,这样就可以规避黑洞路由问题。
解决方式2:R2仍然只和R4建立IBGP邻居,但是R2--R3--R4的互联接口上运行mpls协议,通过mpls标签转发,不走目标路由转发,就不存在R3丢包问题。基本配置如下:
R2、R3、R4—— mpls ip //全局开启mpls mpls router ldp ldp router-id interface Loopback 0 force //设置ldp的router-id为环回口地址 R2 int Gi0/1 mpls ip //接口开启mpls label-switching //接口开启标签识别 R3 int Gi0/0 mpls ip label-switching int Gi0/1 mpls ip label-switching R4 int Gi0/0 mpls ip label-switching
步骤二:ACL过滤导致不通
在沿途路由器上,通过【show run | in ip fpm session filter】和【show access-group】中是否有ACL过滤,并通过【show access-list】检查是否有相关ACL条目过滤了对应流量;
如发现相应互访流量被过滤,则需要放通对应流量。
五、信息收集
信息收集命令参考
ter len 0
show version
show slot
show version slot
show run
show log
show cpu
show memory
show ip interface brief
show interface
show ip fpm count
show ip fpm st
show ip route
show ip ref route
show ip ref adj
show ip route summary
show arp
show ip int brief
show ip protocol
show ip bgp neighbors
show ip bgp summary
show ip bgp
show ip f f | in 179
show mpls ldp discovery
show mpls ldp neighbor
show mpls forwarding-table
ter no len
六、总结与建议
BGP目标路由无法访问时,需注意以下几点:
1、黑洞路由导致不通
2、ACL过滤导致不通