简介
本文档介绍如何验证虚拟队列索引(VQI)并在聚合服务路由器9000(ASR9K)的思科快速转发(CEF)中正确分配它们。
背景信息
为了使数据包从ASR9K中的一个接口转发到另一个接口,数据包必须通过交换矩阵。ASR9K中没有本地交换。数据包如何从一个接口传输到另一个接口?这可以通过使用分配给每个接口的VQI来完成。这样,交换矩阵就可以知道路由数据包的线卡(LC)和网络处理器(NP)。
但有时候,如CSCvc83681 ,可能会分配错误的VQI,流量可能会在路由器内部被黑洞。
检验VQI分配
请参阅本节以验证VQI分配。
首先,使用show cef <prefix> detail命令确定流、源和目标Internet协议(IP)地址的入口和出口接口。
这有助于确定需要查看哪些LC来进行VQI分配。
源地址如下:
RP/0/RSP0/CPU0:ASR9006-H#show cef 123.29.62.12 detail
Tue May 1 10:54:50.356 EDT
123.29.62.12/32, version 325561, internal 0x1000001 0x0 (ptr 0x76a07a40) [1], 0x0 (0x73ffbf50), 0xa28 (0x75e3133c)
Updated May 1 10:26:51.592
remote adjacency to TenGigE0/1/0/5
Prefix Len 32, traffic index 0, precedence n/a, priority 1
gateway array (0x74bff484) reference count 3, flags 0x68, source lsd (5), 1 backups
[2 type 5 flags 0x8401 (0x7216f3d0) ext 0x0 (0x0)]
LW-LDI[type=5, refc=3, ptr=0x73ffbf50, sh-ldi=0x7216f3d0]
gateway array update type-time 1 May 1 10:26:51.592
LDI Update time May 1 10:26:51.592
LW-LDI-TS May 1 10:26:51.592
via 10.94.1.182/32, TenGigE0/1/0/5, 6 dependencies, weight 0, class 0 [flags 0x0]
path-idx 0 NHID 0x0 [0x7181cfc4 0x0]
next hop 10.94.1.182/32
remote adjacency
local label 24088 labels imposed {86}
via 10.94.1.150/32, TenGigE0/1/0/7, 6 dependencies, weight 0, class 0 [flags 0x0]
path-idx 1 NHID 0x0 [0x7181d018 0x0]
next hop 10.94.1.150/32
remote adjacency
local label 24088 labels imposed {86}
Load distribution: 0 1 (refcount 2)
Hash OK Interface Address
0 Y TenGigE0/1/0/5 remote
1 Y TenGigE0/1/0/7 remote
以下是目的地址:
RP/0/RSP0/CPU0:ASR9006-H#show cef 123.29.62.1 detail
Tue May 1 10:53:14.531 EDT
123.29.62.1/32, version 334286, internal 0x1000001 0x0 (ptr 0x74bf1a04) [1], 0x0 (0x73ffbeb0), 0xa20 (0x75e310d4)
Updated May 1 10:53:12.459
remote adjacency to TenGigE0/0/0/2
Prefix Len 32, traffic index 0, precedence n/a, priority 1
gateway array (0x74c025ec) reference count 27, flags 0x68, source lsd (5), 1 backups
[19 type 4 flags 0x8401 (0x7216f390) ext 0x0 (0x0)]
LW-LDI[type=1, refc=1, ptr=0x73ffbeb0, sh-ldi=0x7216f390]
gateway array update type-time 1 Apr 30 17:03:05.246
LDI Update time Apr 30 17:03:05.246
LW-LDI-TS Apr 30 17:03:05.247
via 10.94.0.10/32, TenGigE0/0/0/2, 4 dependencies, weight 0, class 0 [flags 0x0]
path-idx 0 NHID 0x0 [0x7181ce20 0x7181d06c]
next hop 10.94.0.10/32
remote adjacency
local label 24012 labels imposed {ImplNull}
via 10.94.2.9/32, TenGigE0/0/0/3, 4 dependencies, weight 0, class 0 [flags 0x0]
path-idx 1 NHID 0x0 [0x7181ce74 0x7181d0c0]
next hop 10.94.2.9/32
remote adjacency
local label 24012 labels imposed {ImplNull}
Load distribution: 0 1 (refcount 19)
Hash OK Interface Address
0 Y TenGigE0/0/0/2 remote
1 Y TenGigE0/0/0/3 remote
从这些输出中,您可以看到LC 1是入口LC,LC 0是出口LC,两者都具有两个端口以对流量进行负载均衡。
接下来,您需要使用show controller np ports all loc <LC> 命令确定入口和出口LC上有多少个NP。
入口LC有8个NP:
RP/0/RSP0/CPU0:ASR9006-H#show controller np ports all loc 0/1/CPU0
Tue May 1 10:56:57.996 EDT
Node: 0/1/CPU0:
----------------------------------------------------------------
NP Bridge Fia Ports
-- ------ --- ---------------------------------------------------
0 -- 0 TenGigE0/1/0/0 - TenGigE0/1/0/2
1 -- 0 TenGigE0/1/0/3 - TenGigE0/1/0/5
2 -- 1 TenGigE0/1/0/6 - TenGigE0/1/0/8
3 -- 1 TenGigE0/1/0/9 - TenGigE0/1/0/11
4 -- 2 TenGigE0/1/0/12 - TenGigE0/1/0/14
5 -- 2 TenGigE0/1/0/15 - TenGigE0/1/0/17
6 -- 3 TenGigE0/1/0/18 - TenGigE0/1/0/20
7 -- 3 TenGigE0/1/0/21 - TenGigE0/1/0/23
出口LC有2个NP:
RP/0/RSP0/CPU0:ASR9006-H#show controller np ports all loc 0/0/cPU0
Tue May 1 10:55:27.661 EDT
Node: 0/0/CPU0:
----------------------------------------------------------------
NP Bridge Fia Ports
-- ------ --- ---------------------------------------------------
0 -- 0 TenGigE0/0/0/0 - TenGigE0/0/0/3
1 -- 1 TenGigE0/0/1/0 - TenGigE0/0/1/3
接下来,使用show cef <destination prefix>硬件入口详细信息loc <ingress lc>检查入口LC | I vqi命令和带show cef <dst prefix>硬件出口详细信息块<egress lc> I vqi命令的出口LC。
此信息提供有关如何编程每个NP以到达出口接口的信息。在这种情况下,因为入口LC上有八个NP,出口LC上有两个等价多路径(ECMP)链路,所以有16个条目。前八个条目用于第一个ECMP链路,后八个条目用于第二个ECMP链路。每组8个应该匹配,这意味着每个NP被编程为执行相同的操作。尽管有两个单独的接口,但每个接口集应不同。如果它们相同,则您可能遇到VQI CEF误编程问题。
RP/0/RSP0/CPU0:ASR9006-H#show cef 123.29.62.1 hardware ingress loc 0/1/CPU0 | i vqi
Tue May 1 10:56:27.064 EDT
sfp/vqi : 0x58
sfp/vqi : 0x58
sfp/vqi : 0x58
sfp/vqi : 0x58
sfp/vqi : 0x58
sfp/vqi : 0x58
sfp/vqi : 0x58
sfp/vqi : 0x58
sfp/vqi : 0x59
sfp/vqi : 0x59
sfp/vqi : 0x59
sfp/vqi : 0x59
sfp/vqi : 0x59
sfp/vqi : 0x59
sfp/vqi : 0x59
sfp/vqi : 0x59
检查出口LC以确保其编程正确。在本例中,有两个NP和两个ECMP链路,因此有两组两个VQI需要编程。
RP/0/RSP0/CPU0:ASR9006-H#show cef 123.29.62.1 hardware egress loc 0/0/CPU0 | i vqi
Tue May 1 10:57:29.221 EDT
out_lbl_invalid: 0 match: 0 vqi/lag-id: 0x0
out_lbl_invalid: 0 match: 0 vqi/lag-id: 0x0
sfp/vqi : 0x58
sfp/vqi : 0x58
out_lbl_invalid: 0 match: 0 vqi/lag-id: 0x0
out_lbl_invalid: 0 match: 0 vqi/lag-id: 0x0
sfp/vqi : 0x59
sfp/vqi : 0x59
最后要检查的是接口上的VQI分配。
此处,您可以检查switch_fabric_port变量并从十进制转换为十六进制。88(58)和89(59),这些值与来自这些命令的VQI分配匹配,这意味着CEF已正确编程用于ASR9K中的VQI传输。
RP/0/RSP0/CPU0:ASR9006-H#show controller pm interface ten 0/0/0/2
Tue May 1 10:58:52.024 EDT
Ifname(1): TenGigE0_0_0_2, ifh: 0x4000140 :
iftype 0x1e
egress_uidb_index 0x7, 0x7
ingress_uidb_index 0x7, 0x7
port_num 0x2
subslot_num 0x0
ifsubinst 0x0
ifsubinst port 0x2
phy_port_num 0x2
channel_id 0x0
channel_map 0x0
lag_id 0x0
virtual_port_id 0x0
switch_fabric_port 88
in_tm_qid_fid0 0x20002
in_tm_qid_fid1 0xffffffff
in_qos_drop_base 0x690001
out_tm_qid_fid0 0x20022
out_tm_qid_fid1 0xffffffff
np_port 0x6
out_qos_drop_base 0x6900a1
bandwidth 10000000 kbps
ing_stats_ptrs 0x53016a, 0x0
egr_stats_ptrs 0x53017b, 0x0
l2_transport 0x0
ac_count 0x0
parent_ifh 0x0
parent_bundle_ifh 0x0
L2 protocols bmap 0x1000000
Cluster interface 0
RP/0/RSP0/CPU0:ASR9006-H#show controller pm interface ten 0/0/0/3
Tue May 1 10:59:08.886 EDT
Ifname(1): TenGigE0_0_0_3, ifh: 0x4000180 :
iftype 0x1e
egress_uidb_index 0x8, 0x8
ingress_uidb_index 0x8, 0x8
port_num 0x3
subslot_num 0x0
ifsubinst 0x0
ifsubinst port 0x3
phy_port_num 0x3
channel_id 0x0
channel_map 0x0
lag_id 0x0
virtual_port_id 0x0
switch_fabric_port 89
in_tm_qid_fid0 0x30002
in_tm_qid_fid1 0xffffffff
in_qos_drop_base 0x6e0001
out_tm_qid_fid0 0x30022
out_tm_qid_fid1 0xffffffff
np_port 0x7
out_qos_drop_base 0x6e00a1
bandwidth 10000000 kbps
ing_stats_ptrs 0x530183, 0x0
egr_stats_ptrs 0x530194, 0x0
l2_transport 0x0
ac_count 0x0
parent_ifh 0x0
parent_bundle_ifh 0x0
L2 protocols bmap 0x1000000
Cluster interface 0