CE交换机常见故障 & 如何使用Display命令排查问题 您所在的位置:网站首页 江门到郴州的火车票 CE交换机常见故障 & 如何使用Display命令排查问题

CE交换机常见故障 & 如何使用Display命令排查问题

2023-08-10 22:57| 来源: 网络整理| 查看: 265

BGP配置错误、路由不可达、路由策略配置错误、硬件故障均有可能造成BGP配置失败和BGP状态异常。下面列举了常见的故障原因以及相应的定位命令,更详细的故障处理案例可以参考维护宝典相关内容。

表1-9 BGP故障定位常用命令

可能原因

执行命令

BGP邻居未建立

display bgp peer

BGP邻居无法互通

ping

ACL过滤了TCP的179端口

display acl all

邻居的Router ID冲突

display bgp peer

配置的邻居的AS号错误

display bgp peer

用Loopback口建立邻居时没有配置peer connect-interface

peer connect-interface

用Loopback口建立EBGP邻居未配置peer ebgp-max-hop

peer ebgp-max-hop

Peer valid-ttl-hops配置错误

peer valid-ttl-hops hops

对端配置了peer ignore

undo peer ignore

地址族能力

peer enable

路由下一跳不可达导致路由不活跃

display bgp routing-table network { mask | mask-length }

路由策略配置不当导致路由无法发布/接收

display current-configuration configuration bgp

路由数量超限导致收到的路由被丢弃

display current-configuration configuration bgp | include peer destination-address

display current-configuration configuration bgp | include peer group-name

标签超限导致私网路由无法发布

display bgp vpnv4 all routing-table ipv4-address [ mask | mask-length ]

ERT/IRT不匹配导致路由无法交叉到私网路由表中

display current-configuration configuration vpn-instance

对端(路由接收者)没有配置peer上的ip-prefix入口策略

display current-configuration configuration bgp

对端(路由接收者)没有配置peer上的ip-prefix入口策略对应的前缀列表

display ip ip-prefix ip-prefix-name

BGP邻居未建立

执行display bgp peer命令,查看BGP邻居状态是否是Established状态。

如果不是Established状态,请检查AS号、Router-ID、loopback口等BGP配置。如果是Eastablished状态,说明BGP邻居已成功建立。 BGP邻居无法互通

使用ping命令检测BGP邻居之间是否可以Ping通。

如果可以Ping通,则说明BGP邻居之间有可达的路由并且链路传输也没有问题。

请使用命令ping -a source-ip-address –s packetsize host或ping ipv6 -a source-ipv6-address -s packetsize destination-ipv6-address来检测两端的互通性,因为带源地址可以同时检测两端路由是否正常,指定ping的字节可以检查大包在链路上传输是否正常。

如果不能Ping通,请参考维护宝典Ping不通部分处理Ping不通问题,排除链路传输的故障问题。 ACL过滤了TCP的179端口

在两端执行display acl all命令查看是否禁止TCP的179端口。

display acl all Advanced ACL 3001, 2 rules ACL's step is 5 ACL's match-order is config rule 5 deny tcp source-port eq bgp rule 10 deny tcp destination-port eq bgp

如果有禁止TCP的179端口的ACL,请执行undo rule rule-id命令取消配置。

邻居的Router ID冲突

在两端分别查看无法建立的BGP邻居的情况,例如ipv4单播邻居无法建立可以执行display bgp peer命令,查看Router ID是否冲突。显示Router ID信息的命令行示例如下:

display bgp peer BGP local router ID : 1.1.1.1 Local AS number : 65001 Total number of peers : 12 Peers in established state : 4 Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv 10.9.0.8 4 100 1601 1443 0 23:21:56 Established 10000 10.10.0.10 4 200 1565 1799 0 23:15:30 Established 9999 查看其他地址族的邻居可以使用如下命令:display bgp vpnv4 all peer查看所有VPNv4的对等体信息。display bgp ipv6 peer查看IPv6的对等体信息。display bgp vpnv6 all peer查看所有VPNv6的对等体信息。

如果Router ID冲突,请在BGP视图下运行命令router id将Router ID修改为不同(一般会用Loopback口的地址作为本端的Router ID)。

配置的邻居的AS号错误

在邻居两端分别执行display bgp peer,检查邻居的AS号是否是对端的AS号。

display bgp peer BGP local router ID : 223.5.0.109 Local AS number : 41976 Total number of peers : 12 Peers in established state : 4 Peer V AS MsgRcvd MsgSent OutQ Up/Down State PrefRcv 10.9.0.8 4 100 1601 1443 0 23:21:56 Established 10000 10.10.0.10 4 200 1565 1799 0 23:15:30 Established 9999 查看其他地址族的邻居可以使用如下命令:display bgp vpnv4 all peer查看所有VPNv4的对等体信息。display bgp ipv6 peer用来查看IPv6的对等体信息。display bgp vpnv6 all peer查看所有VPNv6的对等体信息。

如果AS号配置错误,请将AS号配置为对端的AS。

用Loopback口建立邻居时没有配置peer connect-interface

如果邻居两端使用Loopback口建立邻居,则需要使用命令peer connect-interface指定相应的Loopback口为发送BGP报文的源接口或者指定相应的ip地址为相应的源地址。

用Loopback口建立EBGP邻居未配置peer ebgp-max-hop

如果直连设备用Loopback口建立EBGP邻居,或者非直连多跳设备建立EBGP邻居,则需要配置命令peer ebgp-max-hop指定允许的最大跳数hop-count。

直连设备使用Loopback口建立连接时,hop-count只要大于1即可。

非直连设备建立连接时需要指定hop-count为相应的跳数。

命令peer ebgp-max-hop的配置是对称的,即需要在BGP会话两端同时使能该命令。

Peer valid-ttl-hops配置错误

如果有该配置,请确认peer valid-ttl-hops hops是否正确:如果配置为hops,则被检测的报文的TTL值有效范围为[255-hops+1, 255]。

其中hops是BGP会话两端之间的跳数值,直连设备之间的hops为1。

命令peer valid-ttl-hops的配置是对称的,即需要在BGP会话两端同时配置该命令。

对端配置了peer ignore

如果对端配置了peer ignore,说明由于某种原因对端暂时不想和本端建立邻居。如果想建立邻居时,将对端的undo peer ignore配置去使能即可。

地址族能力

请检查BGP会话两端的地址族能力是否匹配。例如,建立BGP VPNv4邻居时,需要两端都要在BGP-VPNv4地址族下配置命令peer enable

如果一端已配置而另一端没有配置时,配置的一端BGP邻居状态为“No neg”,表示对端BGP对等体没有使能该地址族。

路由下一跳不可达

在路由的发送端执行display bgp routing-table network { mask | mask-length }命令查看目标路由(network表示目标路由前缀),确认路由是否活跃,并且查看此路由是否已经被发送给路由接收端。

display bgp routing-table 10.0.0.0 8 BGP local router ID : 10.1.1.2 Local AS number : 100 Paths: 1 available, 1 best, 1 select BGP routing table entry information of 10.0.0.0/8: From: 10.1.1.1 (121.1.1.1) Route Duration: 4d21h29m39s Relay IP Nexthop: 172.16.1.1 Relay IP Out-Interface: Vlanif50 Original nexthop: 10.1.1.1 Qos information : 0x0 AS-path Nil, origin incomplete, localpref 100, pref-val 0, valid, internal, best, select, active, pre 255 Aggregator: AS 100, Aggregator ID 121.1.1.1 Advertised to such 1 peers: 10.3.3.3 如果目标路由不活跃,请确认IP路由表中是否存在到BGP下一跳(Original nexthop)的路由,如果不存在说明BGP路由不发布是由于路由下一跳不可达导致,请确认为何没有到BGP下一跳(Original nexthop)的路由(一般属于IGP或静态路由问题)。如果目标路由活跃且被优选,但没有显示发送给路由接收端,请检查路由发送端的出口策略。在路由接收端执行display bgp routing-table network { mask | mask-length }查看是否收到目标路由。如果收到目标路由,请重复执行上述步骤判断路由下一跳是否可达并且是否被优选。如果没有收到目标路由,请检查路由策略配置是否正确。

在BGP4+的组网环境中,请使用display bgp routing-table ipv6-address prefix-length查看是否收到目标路由。

路由策略配置不当导致路由无法发布/接收

在路由的发送端/接收端执行display current-configuration configuration bgp命令查看BGP配置,确认是否配置邻居的出口/入口策略。

display current-configuration configuration bgp # bgp 100 peer 10.1.1.1 as-number 100 # ipv4-family unicast filter-policy ip-prefix aaa import filter-policy ip-prefix aaa export peer 10.1.1.1 enable peer 10.1.1.1 filter-policy acl-name acl-name import peer 10.1.1.1 filter-policy acl-name acl-name export peer 10.1.1.1 as-path-filter 1 import peer 10.1.1.1 as-path-filter 1 export peer 10.1.1.1 ip-prefix prefix-name import peer 10.1.1.1 ip-prefix prefix-name export peer 10.1.1.1 route-policy policy-name import peer 10.1.1.1 route-policy policy-name export # ipv4-family vpnv4 policy vpn-target peer 10.1.1.1 enable # return 如果两端配置了出口/入口策略,则需要确认这些策略是否会把目标路由过滤掉,导致该路由无法正常收发。如果两端没有配置相应的出口/入口策略,请检查路由超限问题。 路由数量超限导致收到的路由被丢弃

在路由接收端执行display current-configuration configuration bgp | include peer destination-address和display current-configuration configuration bgp | include peer group-name(如果Peer被加入到对等体组中)命令查看BGP配置,确认是否配置邻居路由限制。

例如,限制只能从邻居10.1.1.1收5条路由,超限之后将丢弃路由并记录日志。

display current-configuration configuration bgp | include peer 10.1.1.1 peer 10.1.1.1 as-number 100 peer 10.1.1.1 route-limit 5 alert-only peer 10.1.1.1 enable

如果BGP邻居被加入到组中,显示信息中有可能没有route-limit的配置。

display current-configuration configuration bgp | include peer 10.1.1.1 peer 10.1.1.1 as-number 100 peer 10.1.1.1 group IBGP peer 10.1.1.1 enable peer 10.1.1.1 group IBGP

这种情况下,需要使用display current-configuration configuration bgp | include peer group-name来查看该对等体组的配置。

display current-configuration configuration bgp | include peer IBGP peer IBGP route-limit 5 alert-only peer IBGP enable

如果流量中断时,产生了路由超限告警BGP_1.3.6.1.4.1.2011.5.25.177.1.3.6 hwBgpPeerRouteExceed,表示路由超限导致目标路由被丢弃,则需要扩大本端的路由限制数值。

修改BGP邻居限制的最大路由数量时会中断邻居,建议在路由发送端通过路由聚合以减少路由数量来解决。

标签超限导致私网路由无法发布

首先在路由发送端(本端PE)确认是否使能了mpls。然后,使用display bgp vpnv4 all routing-table ipv4-address [ mask | mask-length ]查看目标路由,确定该目标路由是否分到私网标签。如果显示信息中没有Label information字段,则可能是标签资源不足,导致无法为该路由申请到标签而不会给其它对等体。

display bgp vpnv4 all routing-table 10.10.1.1 BGP local router ID : 10.1.1.2 Local AS number : 100 Total routes of Route Distinguisher(1:1): 1 BGP routing table entry information of 10.10.1.0/24: Imported route. Label information (Received/Applied): NULL/13312 From: 0.0.0.0 (0.0.0.0) Route Duration: 00h21m24s Direct Out-interface: NULL0 Original nexthop: 0.0.0.0 Qos information : 0x0 Ext-Community:RT AS-path Nil, origin incomplete, MED 0, pref-val 0, valid, local, best, select, pre 255 Advertised to such 1 peers: 10.1.1.1 Total routes of vpn-instance vpna: 1 BGP routing table entry information of 10.10.1.0/24: Imported route. From: 0.0.0.0 (0.0.0.0) Route Duration: 00h21m24s Direct Out-interface: NULL0 Original nexthop: 0.0.0.0 Qos information : 0x0 AS-path Nil, origin incomplete, MED 0, pref-val 0, valid, local, best, select, pre 60 Not advertised to any peer yet

如果是标签不足,可在VPN实例视图下通过命令apply-label per-instance配置每实例每标签,来减少标签的使用量。也可以通过路由聚合来减少路由数量。

如果标签没有超限,请检查路由是否超限。

ERT/IRT不匹配导致路由无法交叉到私网路由表中

在路由的发送端(本端PE)/接收端(远端PE)执行display current-configuration configuration vpn-instance命令查看是否本端VPN实例的ERT与远端VPN实例的IRT不匹配,导致路由发送到远端PE后无法交叉到远端VPN实例中。

export-extcommunity表示ERT, import-extcommunity表示IRT。

display current-configuration configuration vpn-instance # ip vpn-instance vpna route-distinguisher 1:1 apply-label per-instance vpn-target 1:1 export-extcommunity vpn-target 1:1 import-extcommunity ip vpn-instance vpnb route-distinguisher 1:2 vpn-target 1:1 export-extcommunity vpn-target 1:1 import-extcommunity # return 如果ERT和IRT不匹配,请在VPN实例下配置匹配的vpn-target。如果ERT和IRT匹配,请检查标签是否超限。 对端(路由接收者)没有配置peer上的ip-prefix入口策略

在对端执行display current-configuration configuration bgp命令,检查显示信息中IPv4单播地址族中是否有peer ipv4-address ip-prefix ip-prefix-name import配置。

display current-configuration configuration bgp # bgp 100 peer 7.1.1.1 as-number 100 # ipv4-family unicast peer 7.1.1.1 ip-prefix in import peer 7.1.1.1 capability-advertise orf ip-prefix both # 如果对端没有配置peer上的ip-prefix入口策略,则进入BGP IPv4单播地址族视图,执行peer ipv4-address ip-prefix ip-prefix-name import命令,在对端配置peer上的ip-prefix入口策略。 system-view [~HUAWEI] bgp 100 [~HUAWEI-bgp] ipv4-family unicast [~HUAWEI-bgp-af-ipv4] peer 7.1.1.1 ip-prefix in import 如果对端已经配置peer上的ip-prefix入口策略,但是本端仍然不能收到对端的ORF前缀信息,请检查对端入口策略前缀列表。 对端(路由接收者)没有配置peer上的ip-prefix入口策略对应的前缀列表

在对端执行display ip ip-prefix ip-prefix-name命令,检查对应BGP邻居ip-prefix入口策略的前缀列表是否配置。

display ip ip-prefix in Info: The specified filter list does not exist.

出现上述提示信息,表示前缀列表in没有配置成功。请进入系统视图,执行ip ip-prefix ip-prefix-name index index-number permit ipv4-address mask-length命令配置前缀列表。

system-view [~HUAWEI] ip ip-prefix in index 10 permit 10.1.1.0 24

配置完成后,在对端执行display ip ip-prefix ip-prefix-name命令,检查对应BGP邻居ip-prefix入口策略的前缀列表是否配置成功。



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

      专题文章
        CopyRight 2018-2019 实验室设备网 版权所有