簡介
本文說明如何驗證虛擬隊列索引(VQI),以及如何在Aggregation Services Router 9000(ASR9K)的Cisco Express Forwarding(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> hardware ingress detail loc <ingress lc>檢查輸入LC | I vqi命令和使用show cef <dst prefix> hardware egress detail loc <egress lc> I vqi命令的輸出LC。
此資訊提供如何程式設計每個NP以到達輸出介面的資訊。在這種情況下,由於輸入LC上有8個NP,輸出LC上有2個等價多重路徑(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