BGP路由学习的前提:
BGP邻居正常建立,因此在定位路由学习相关问题时确保BGP邻居正常建立。
一、BGP路由不活跃
[RT1]display bgp routing-table peer 202.112.146.100 received-routes
Total Number of Routes: 1
BGP Local router ID is 202.112.146.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
i 2.2.2.0/24 100.112.146.100 150 0 i
[RT1]display ip routing-table 2.2.2.0 24 verbose
恢复手段:参考《BGP路由不活跃》
二、由于存在更优的路由,导致目标路由不能优选;由于属性原因,路由不优选
[RT1]display bgp routing-table peer 202.112.146.100 received-routes
Total Number of Routes: 1
BGP Local router ID is 202.112.146.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
*>i 129.1.1.0/24 202.112.146.100 150 0 I
[RT1]display ip routing-table 129.1.1.0
Route Flags: R – relay, D – download to fib
———————————————————————-
Routing Table : Public
Summary Count : 1
Destination/Mask Proto Pre Cost Flags NextHop Interface
129.1.1.0/24 Static 60 0 D 0.0.0.0 NULL0
判断手段:查看路由详细信息,确定路由因为哪个属性不优选。
[Quidway]display ip routing-table 129.1.1.0 24 verbose
Route Flags: R – relay, D – download to fib
————————————————————————-
Routing Table : Public
Summary Count : 2
Destination: 129.1.1.0/24
Protocol: Static Process ID: 0
Preference: 60 Cost: 0
NextHop: 0.0.0.0 Neighbour: 0.0.0.0
State: Active Adv Age: 00h00m34s
Tag: 0 Priority: medium
Label: NULL QoSInfo: 0x0
IndirectID: 0x0
RelayNextHop: 0.0.0.0 Interface: NULL0
TunnelID: 0x0 Flags: D
Destination: 129.1.1.0/24
Protocol: BGP Process ID: 0
Preference: 255 Cost: 0
NextHop: 202.112.146.100 Neighbour: 202.112.146.100
State: Inactive Adv Relied Age: 00h01m02s
Tag: 0 Priority: low
Label: NULL QoSInfo: 0x0
IndirectID: 0x2
RelayNextHop: 0.0.0.0 Interface: Ethernet0/0/0
TunnelID: 0x0 Flags: R
恢复手段:调整路由策略,把期望优选的路由的优先级调高,一般建议调整preferred-value。
具体命令:
1、配置一个新的策略,提高preferred-value值。
route-policy test permit node 10
if-match ip-prefix test
apply preferred-value 10
2、在目标peer上应用入口策略peer route-policy import
三、未知原因
恢复手段:新配置一个入口策略,把异常路由拒掉,然后删除策略,重新学习此路由。
本文由 @哔哩哔哩 发布于弱电智能网 。
题图来自Unsplash,基于CC0协议
内容观点仅代表作者本人,弱电智能网平台仅提供信息存储空间服务。
如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
文章名称:《华为NE路由器BGP故障分析之BGP路由不优选的排错思路》
文章链接:https://www.ruodian360.com/tech/networking/9604.html
添加微信ydian188免费入群,记得备注“弱电智能网”。