簡介
本文說明在Cisco Nexus 6000交換機上執行嵌入式邏輯分析器模組(ELAM)的步驟,說明最相關的輸出,並說明如何解釋結果。
拓撲
IP:12.12.12.2 SVI vlan 100 IP:12.12.12.3 IP:13.13.13.2
(Mac 78da.6e71.95ff)SVI vlan 200 IP:13.13.13.3(Mac 78da.6e71.9b7f)
上例中使用的是Nexus 6001T交換機,但用於故障排除的以下過程和命令適用於Nexus 6000交換機的任何型號。
Vlan100中IP地址為12.12.2的主機1連線到埠Ethernet2/1上的Nexus 6000交換機。Nexus 6000交換機的另一端連線到Vlan200埠ethernet2/4上IP地址為13.13.2的主機2。
在這種情況下,主機1向Vlan200中的主機2傳送位址解析通訊協定(ARP)要求。使用ELAM可擷取來自12.12.12.2(目的地為13.13.2)的這個單一廣播封包。請記住,ELAM允許您擷取一個訊框。
確定ASIC例項
Nexus6k-11.25-2-ESC# show platform fwm info pif ethernet 2/1 | inc slot_asic
Eth2/1 pd: slot 1 logical port num 0 slot_asic_num 0 global_asic_num 5 fw_ins
t 8 phy_fw_inst 2 fc 0
Nexus6k-11.25-2-ESC# show platform fwm info pif ethernet 2/4 | inc slot_asic
Eth2/4 pd: slot 1 logical port num 3 slot_asic_num 1 global_asic_num 6 fw_ins
t 4 phy_fw_inst 1 fc 0
上一個輸出顯示eth2/1和eth2/4都對應於「slot 1」。
附註:插槽編號從0開始,而大型例項從1開始。因此,在本範例中,插槽1對應於bigsur執行個體2。
配置觸發器
Nexus6k-11.25-2-ESC(config)# elam slot 2 asic bigsur instance ?
*** No matching command found in current mode, matching in (exec) mode ***
<0-5> ASIC Instance Number
all All the ASICs in this slot.
由於ASIC例項為0和1,因此在這種情況下,您可以使用所有例項。
此觸發器擷取符合以下引數的資料包:
- 源mac地址78da.6e71.95ff
- VLAN 100
Nexus6k-11.25-2-ESC(config)# elam slot 2 asic bigsur instance 0
Nexus6k-11.25-2-ESC(bigsur-elam)# trigger lu ingress arp if source-mac-address
78da.6e71.95ff vlan 0x64
附註:VLAN在ELAM觸發器中輸入為十六進位制值。輸入hex 100命令將小數轉換為十六進位制。
開始捕獲
12.12.12.3Nexus6k-11.25-2-ESC(bigsur-elam)# start capture
Nexus6k-11.25-2-ESC(bigsur-elam)# show elam asic bigsur
+-------------------------------+
| Slot | Instance | State |
+-------------------------------+
| -- | -- | -- |
| -- | -- | -- |
| -- | -- | -- |
| -- | -- | -- |
| -- | -- | -- |
| 02 | 00 | Start |
| 02 | 01 | Start |
| 02 | 02 | Start |
| 02 | 03 | Start |
| 02 | 04 | Start |
Nexus6k-11.25-2-ESC(bigsur-elam)# show capture lu
Things of interest in elam capture
Ethernet2/1 IS NOT A PC
+-----------------------------------------+
| Lookup Vector |
+--------------------+--------------------+
| Field | Raw Value |
+--------------------+--------------------+
...
...
...
| CE_DA | 0x002a6a570401 |
| CE_SA | 0x78da6e7195ff |
...
...
| CE_Q0_ETYPE | 0x8100 |
| CE_Q0_VLAN | 100 |
| CE_Q0_VLAN | 100 |
...
...
| ARP_SHA | 0x78da6e7195ff |
| ARP_SPA | 12.12.12.2 |
| ARP_THA | 0x002a6a570401 |
| ARP_TPA | 12.12.12.3 |
Egress Interface: Ethernet2/4 IS NOT A PC
+-----------------------------------------+
| Lookup Vector |
+--------------------+--------------------+
| Field | Raw Value |
+--------------------+--------------------+
| CE_DA | 0xffffffffffff |
| CE_SA | 0x002a6a570401 |
...
...
| ARP_SHA | 0x002a6a570401 |
| ARP_SPA | 13.13.13.3 |
| ARP_THA | 0xffffffffffff |
| ARP_TPA | 13.13.13.2 |
解釋結果
此輸出顯示捕獲的資料包的詳細資訊。
Nexus6k-11.25-2-ESC(bigsur-elam)# show capture rs
+------------------------------------------+
| Result Vector |
+---------------------+--------------------+
| Field | Raw Value |
+---------------------+--------------------+
| NSH_WORD2 | 0x20640 |
| CE_DA | 0x002a6a570401 |
| CE_DA_RW | 0 |
| CE_SA | 0x78da6e7195ff | <<<<<<<<<< source mac address
| CE_SA_RW | 0 |
...
...
EXT_VLAN | 100 |
| CDCE_DA | 0x020abc000002 |
| CDCE_DA_RW | 1 |
| CDCE_SA | 0x020abc000033 |
| CDCE_SA_RW | 1 |
| CDCE_DTAG_ETYPE | 0x0000 |
| CDCE_QTAG_ETYPE | 0x0000 |
| CDCE_DTAG_TTL | 32 |
| CDCE_DTAG_TTL_RW | 1 |
| CDCE_DTAG_FTAG | 1023 |
| CDCE_DTAG_FTAG_RW | 1 |
其他驗證
您還可以修改觸發器,以便基於這些引數捕獲以進行其他驗證:
- 源IP地址12.12.12.2
- 目的IP地址13.13.13.2
trigger lu ingress ipv4 if source-ipv4-address_ipv4 12.12.12.2
destination-ipv4-address_ipv4 13.13.13.2
Nexus 6000 ELAM支援的不同幀格式
除IPv4資料包外,Nexus 6000 ELAM還可以配置為捕獲以下幀型別:
arp ARP Frame Format
ce CE Frame Format
fc FC Frame Format
ELAM中用於IPv4和ARP的一些常見觸發器
除了提供的示例外,還可以根據這些引數編寫ELAM觸發器以進行捕獲:
ce_q0_etype Ce_q0_etype
destination-ipv4-address_ipv4 Destination-ipv4-address_ipv4
destination-mac-address L2 destination address
l2_cos L2 cos (valid for lu ingress trigger only)
l3_ah L3_ah
l3_esp L3_esp
l3_frag L3_frag
l3_ipv6 L3_ipv6
l3_length L3_length
l3_mf L3_mf
l3_none_dest L3_none_dest
l3_none_frag L3_none_frag
l3_none_hbh L3_none_hbh
l3_none_route L3_none_route
l3_opt_none L3_opt_none
l3_prot L3_prot
l3_tos L3_tos
l3_ttl L3_ttl
l4_dp L4_dp
l4_sp L4_sp
l4_tcp_udp L4_tcp_udp
l4_tcpflags L4_tcpflags
max_ipv6_frag Max_ipv6_frag
max_ipv6_hbh Max_ipv6_hbh
pkt_id Pkt_id
sid Sid
source-ipv4-address_ipv4 Source-ipv4-address_ipv4
source-mac-address L2 source address
vlan L2 vlan (valid for lu ingress trigger only)
arp_hlen Arp_hlen
arp_htype Arp_htype
arp_oper Arp_oper
arp_plen Arp_plen
arp_ptype Arp_ptype
arp_sha Arp_sha
arp_spa Arp_spa
arp_tha Arp_tha
arp_tpa Arp_tpa
ce_q0_etype Ce_q0_etype
destination-mac-address L2 destination address
l2_cos L2 cos
pkt_id Pkt_id
sid Sid
source-mac-address L2 source address
vlan Vlan
相關資訊