show lacp sys-id show lacp neighbor show lacp counters show interfaces accounting debug lacp [event|packet|fsm|misc] debug condition <condition>
第一個命令輸出顯示了交換機系統ID及其優先順序(對於LACP)。
switch#show lacp sys-id 32768, f04a.0206.1900 <-- Your system MAC address
檢查LACP鄰居的詳細資訊,如運行模式、鄰居系統 Dev ID及其優先順序。
switch#show lacp 1 neighbor
Flags: S - Device is requesting Slow LACPDUs
F - Device is requesting Fast LACPDUs
A - Device is in Active mode P - Device is in Passive mode
Channel group 1 neighbors
LACP port Admin Oper Port Port
Port Flags Priority Dev ID Age key Key Number State
Gi1/0/1 SA 32768 f04a.0205.d600 12s 0x0 0x1 0x102 0x3D <-- Dev ID: Neighbor MAC Address
Gi1/0/2 SA 32768 f04a.0205.d600 24s 0x0 0x1 0x103 0x3D <-- Dev ID: Neighbor MAC Address
Gi1/0/3 SA 32768 f04a.0205.d600 16s 0x0 0x1 0x104 0x3D <-- Dev ID: Neighbor MAC Address
Gi1/0/4 SA 32768 f04a.0205.d600 24s 0x0 0x1 0x105 0x3D <-- Dev ID: Neighbor MAC Address
switch#show int gi1/0/1 accounting
GigabitEthernet1/0/1
Protocol Pkts In Chars In Pkts Out Chars Out
Other 0 0 10677 640620
PAgP 879 78231 891 79299
Spanning Tree 240 12720 85 5100
CDP 2179 936495 2180 937020
DTP 3545 170160 3545 212700
LACP 3102 384648 3127 387748
調試
當沒有LACP同步或遠端對等體不運行LACP時,將生成系統日誌消息。
%ETC-5-L3DONTBNDL2: Gig1/0/1 suspended: LACP currently not enabled on the remote port.
%ETC-5-L3DONTBNDL2: Gig/1/0/1 suspended: LACP currently not enabled on the remote port.
switch#debug lacp event Link Aggregation Control Protocol events debugging is on switch#debug lacp packet Link Aggregation Control Protocol packet debugging is on switch#debug lacp fsm Link Aggregation Control Protocol fsm debugging is on switch#debug lacp misc Link Aggregation Control Protocol miscellaneous debugging is on
switch#show debugging
Packet Infra debugs:
Ip Address Port
------------------------------------------------------|----------
LACP:
Link Aggregation Control Protocol miscellaneous debugging is on
Link Aggregation Control Protocol packet debugging is on
Link Aggregation Control Protocol fsm debugging is on
Link Aggregation Control Protocol events debugging is on
Condition 1: interface Gi1/0/1 (1 flags triggered)
Flags: Gi1/0/1
switch#show logging LACP :lacp_bugpak: Send LACP-PDU packet via Gi1/0/1
LACP : packet size: 124
LACP: pdu: subtype: 1, version: 1
LACP: Act: tlv:1, tlv-len:20, key:0x1, p-pri:0x8000, p:0x102, p-state:0x3D, s-pri:0x8000, s-mac:f04a.0206.1900
LACP: Part: tlv:2, tlv-len:20, key:0x1, p-pri:0x8000, p:0x102, p-state:0xF, s-pri:0x8000, s-mac:f04a.0205.d600
LACP: col-tlv:3, col-tlv-len:16, col-max-d:0x8000
LACP: term-tlv:0 termr-tlv-len:0
LACP: HA: Attempt to sync events -- no action (event type 0x1) LACP :lacp_bugpak: Receive LACP-PDU packet via Gi1/0/1
LACP : packet size: 124
LACP: pdu: subtype: 1, version: 1
LACP: Act: tlv:1, tlv-len:20, key:0x1, p-pri:0x8000, p:0x102, p-state:0x3D, s-pri:0x8000, s-mac:f04a.0205.d600
LACP: Part: tlv:2, tlv-len:20, key:0x1, p-pri:0x8000, p:0x102, p-state:0x3D, s-pri:0x8000, s-mac:f04a.0206.1900
LACP: col-tlv:3, col-tlv-len:16, col-max-d:0x8000
LACP: term-tlv:0 termr-tlv-len:0
LACP: Gi1/0/1 LACP packet received, processing <-- beginning to process LACP PDU
lacp_rx Gi1/0/1 - rx: during state CURRENT, got event 5(recv_lacpdu)
@@@ lacp_rx Gi1/0/1 - rx: CURRENT -> CURRENT
LACP: Gi1/0/1 lacp_action_rx_current entered
LACP: recordPDU Gi1/0/1 LACP PDU Rcvd. Partners oper state is hex F <-- operational state
LACP: Gi1/0/1 partner timeout mode changed to 0
lacp_ptx Gi1/0/1 - ptx: during state FAST_PERIODIC, got event 2(long_timeout)
@@@ lacp_ptx Gi1/0/1 - ptx: FAST_PERIODIC -> SLOW_PERIODIC
LACP: Gi1/0/1 lacp_action_ptx_fast_periodic_exit entered
LACP: lacp_p(Gi1/0/1) timer stopped
LACP: Gi1/0/1 lacp_action_ptx_slow_periodic entered
LACP: timer lacp_p_s(Gi1/0/1) started with interval 30000.
LACP: recordPDU Gi1/0/1 Partner in sync and aggregating <-- peer is in sync
LACP: Gi1/0/1 Partners oper state is hex 3D <-- operational state update
LACP: timer lacp_c_l(Gi1/0/1) started with interval 90000.
LACP: Gi1/0/1 LAG_PARTNER_UP.
LACP: Gi1/0/1 LAG unchanged
lacp_mux Gi1/0/1 - mux: during state COLLECTING_DISTRIBUTING, got event 5(in_sync) (ignored)
lacp_handle_standby_port_internal called, depth = 1
LACP: lacp_handle_standby_port_internal: No Standby port found for LAG 1
lacp_handle_standby_port_internal called, depth = 1
LACP: lacp_handle_standby_port_internal: No Standby port found for LAG 1
lacp_handle_standby_port_internal called, depth = 1
LACP: lacp_handle_standby_port_internal: No Standby port found for LAG 1
LACP: lacp_t(Gi1/0/1) timer stopped
LACP: lacp_t(Gi1/0/1) expired
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/3, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet1/0/4, changed state to up%LINK-3-UPDOWN: Interface Port-channel1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up
show pagp neighbor show pagp counters show interfaces accounting
檢查PAgP鄰居的詳細資訊,如操作模式、合作夥伴系統ID、主機名和優先順序。
switch#show pagp 1 neighbor
Flags: S - Device is sending Slow hello. C - Device is in Consistent state.
A - Device is in Auto mode. P - Device learns on physical port.
Channel group 1 neighbors
Partner Partner Partner Partner Group
Port Name Device ID Port Age Flags Cap.
Gi1/0/1 switch f04a.0205.d600 Gi1/0/1 16s SC 10001 <-- Dev ID: Neighbor MAC Address
Gi1/0/2 switch f04a.0205.d600 Gi1/0/2 19s SC 10001 <-- Dev ID: Neighbor MAC Address
Gi1/0/3 switch f04a.0205.d600 Gi1/0/3 17s SC 10001 <-- Dev ID: Neighbor MAC Address
Gi1/0/4 switch f04a.0205.d600 Gi1/0/4 15s SC 10001 <-- Dev ID: Neighbor MAC Address
switch#show int gi1/0/1 accounting
GigabitEthernet1/0/1
Protocol Pkts In Chars In Pkts Out Chars Out
Other 0 0 10677 640620
PAgP 879 78231 891 79299
Spanning Tree 240 12720 85 5100
CDP 2179 936495 2180 937020
DTP 3545 170160 3545 212700
LACP 3102 384648 3127 387748
調試
如果您注意到PAgP協商問題,請啟用PAgP debugs以分析原因。
switch#debug pagp event Port Aggregation Protocol events debugging is on switch#debug pagp packet Port Aggregation Protocol packet debugging is on switch#debug pagp fsm Port Aggregation Protocol fsm debugging is on switch#debug pagp misc Port Aggregation Protocol miscellaneous debugging is on
switch#show debugging
Packet Infra debugs:
Ip Address Port
------------------------------------------------------|----------
PAGP:
Port Aggregation Protocol miscellaneous debugging is on
Port Aggregation Protocol packet debugging is on
Port Aggregation Protocol fsm debugging is on
Port Aggregation Protocol events debugging is on
Condition 1: interface Gi1/0/1 (1 flags triggered)
Flags: Gi1/0/1
分析PAgP調試。調試輸出顯示了埠通道介面啟動之前的最後一個PAgP幀:
PAgP: Receive information packet via Gi1/0/1, packet size: 89
flags: 5, my device ID: f04a.0205.d600, learn-cap: 2, port-priority: 128, sent-port-ifindex: 9, group-cap: 10001, group-ifindex: 4E
your device ID: f04a.0206.1900, learn-cap: 2, port-priority: 128, sent-port-ifindex: 9, group-cap: 10001, group-ifindex: 4E
partner count: 1, num-tlvs: 2
device name TLV: switch
port name TLV: Gi1/0/1
PAgP: Gi1/0/1 PAgP packet received, processing <-- Processing ingress PAgP frame
PAgP: Gi1/0/1 proved to be bidirectional <--
PAgP: Gi1/0/1 action_b0 is entered
PAgP: Gi1/0/1 Input = Transmission State, V12 Old State = U5 New State = U5
PAgP: Gi1/0/1 action_a6 is entered
PAgP: Gi1/0/1 action_b9 is entered
PAgP: set hello interval from 1000 to 30000 for port Gi1/0/1 <--
PAgP: Gi1/0/1 Input = Transmission State, V10 Old State = U5 New State = U6 PAgP: set partner 0 interval from 3500 to 105000 for port Gi1/0/1
PAgP: Gi1/0/1 Setting hello flag
PAgP: timer pagp_p(Gi1/0/1) started with interval 105000.
PAgP: pagp_i(Gi1/0/1) timer stopped
PAgP: Gi1/0/1 Input = Port State, E5 Old State = S7 New State = S7
PAgP: pagp_h(Gi1/0/1) expired
PAgP: Send information packet via Gi1/0/1, packet size: 89
flags: 5, my device ID: f04a.0206.1900, learn-cap: 2, port-priority: 128, sent-port-ifindex: 9, group-cap: 10001, group-ifindex: 4E
your device ID: f04a.0205.d600, learn-cap: 2, port-priority: 128, sent-port-ifindex: 9, group-cap: 10001, group-ifindex: 4E
partner count: 1, num-tlvs: 2
device name TLV: switch
port name TLV: Gi1/0/1
PAgP: 89 bytes out Gi1/0/1
PAgP: Gi1/0/1 Transmitting information packetPAgP: timer pagp_h(Gi1/0/1) started with interval 30000 <--
%LINK-3-UPDOWN: Interface Port-channel1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up
show platform software interface switch <switch number or role> r0 br show platform software fed switch <switch number or role> etherchannel group-mask show platform software fed switch <switch number or role> ifm mappings etherchannel show platform software fed switch <switch number or role> ifm if-id <if ID>
檢查埠通道和捆綁介面的ID。
switch#show platform software interface switch active r0 br
Forwarding Manager Interfaces Information
Name ID QFP ID
---------------------------------------------------------------
GigabitEthernet1/0/1 9 0 GigabitEthernet1/0/2 10 0 GigabitEthernet1/0/3 11 0 GigabitEthernet1/0/4 12 0 Port-channel1 76 0
關註IF ID部分,確保值(十六進位制數)與上一命令中觀察到的ID(十進位制數)相等。
switch#show platform software fed switch active etherchannel 1 group-mask
Group Mask Info
Aggport IIF Id: 000000000000004c <-- IfId Hex 0x4c = 76 decimal
Active Port: : 4
Member Ports
If Name If Id local Group Mask
-----------------------------------------------------------------------
GigabitEthernet1/0/4 000000000000000c true 7777777777777777 <-- IfId Hex 0xc = 12 decimal
GigabitEthernet1/0/3 000000000000000b true bbbbbbbbbbbbbbbb <-- IfId Hex 0xb = 11 decimal
GigabitEthernet1/0/2 000000000000000a true dddddddddddddddd <-- IfId Hex 0xa = 10 decimal
GigabitEthernet1/0/1 0000000000000009 true eeeeeeeeeeeeeeee <-- IfId Hex 0x9 = 10 decimal
monitor capture CAP interface GigabitEthernet1/0/1 BOTH monitor capture CAP interface GigabitEthernet1/0/2 BOTH monitor capture CAP interface GigabitEthernet1/0/3 BOTH monitor capture CAP interface GigabitEthernet1/0/4 BOTH monitor capture CAP match mac any host 0180.c200.0002 show monitor capture CAP file location flash:CAP.pcap
注意:在捕獲中定義的目標MAC地址0180.c200.0002可幫助您過濾LACP幀。
驗證Wireshark配置正確:
switch#show mon cap CAP parameter monitor capture CAP interface GigabitEthernet1/0/1 BOTH monitor capture CAP interface GigabitEthernet1/0/2 BOTH monitor capture CAP interface GigabitEthernet1/0/3 BOTH monitor capture CAP interface GigabitEthernet1/0/4 BOTH monitor capture CAP match mac any host 0180.c200.0002 monitor capture CAP file location flash:LACP.pcap
switch#show mon cap CAP
Status Information for Capture CAP
Target Type:
Interface: GigabitEthernet1/0/1, Direction: BOTH
Interface: GigabitEthernet1/0/2, Direction: BOTH
Interface: GigabitEthernet1/0/3, Direction: BOTH
Interface: GigabitEthernet1/0/4, Direction: BOTH
Status : Inactive
Filter Details:
MAC
Source MAC: 0000.0000.0000 mask:ffff.ffff.ffff
Destination MAC: 0180.c200.0002 mask:0000.0000.0000
Buffer Details:
Buffer Type: LINEAR (default)
File Details:
Associated file name: flash:CAP.pcap
Limit Details:
Number of Packets to capture: 0 (no limit)
Packet Capture duration: 0 (no limit)
Packet Size to capture: 0 (no limit)
Packet sampling rate: 0 (no sampling)
啟動捕獲:
switch#mon cap CAP start Started capture point : CAP
如果不使用LACP速率快速計時器,請在30秒後停止它(至少):
switch#mon cap CAP stop
Capture statistics collected at software:
Capture duration - 58 seconds
Packets received - 16
Packets dropped - 0
Packets oversized - 0
Bytes dropped in asic - 0
Stopped capture point : CAP
要調試轉發資訊並在硬體轉發平面中跟蹤資料包路徑,請使用 show platform hardware fed switch
forward interface
指令。此命令模擬使用者定義的資料包,並從硬體轉發平面檢索轉發資訊。根據您在此命令中指定的封包引數,會在輸入連線埠上產生封包。您還可以從儲存在PCAP檔案中的捕獲資料包提供完整資料包。
本主題僅詳細介紹特定於介面轉發的選項,即 show platform hardware fed switch {switch_num|active|standby}forward interface 指令。
show platform hardware fed switch <switch number or role> forward interface <interface ID> <source mac address> <destination mac address> <protocol number | arp | cos | ipv4 | ipv6 | mpls> show platform hardware fed switch <switch number or role> forward interface <interface ID> pcap <pcap file name> number <packet number> data show platform hardware fed switch <switch number or role> forward interface <interface ID> vlan <VLAN ID> <source mac address> <destination mac address> <protocol-number | arp | cos | ipv4 | ipv6 | mpls>
定義平台轉發捕獲。在這種情況下, CAP.pcap 分析幀1。
switch#show platform hardware fed switch active forward interface gigabitEthernet 1/0/1 pcap flash:CAP.pcap number 1 data
show forward is running in the background. After completion, syslog will be generated.
debug platform hardware fed <switch number or role> capture trigger interface ingress debug platform hardware fed <switch number or role> capture trigger layer2 show platform hardware fed <switch number or role> capture trigger show platform hardware fed <switch number or role> capture status show platform hardware fed <switch number or role> capture summary
debug platform software fed sw active punt packet-capture set-filter <filter> debug platform software fed switch active punt packet-capture start debug platform software fed switch active punt packet-capture stop show platform software fed switch active punt packet-capture status show platform software fed switch active punt packet-capture brief
debug platform software fed sw active inject packet-capture set-filter <filter> debug platform software fed switch active inject packet-capture start debug platform software fed switch active inject packet-capture stop show platform software fed switch active inject packet-capture status show platform software fed switch active inject packet-capture brief
點球
定義資料包捕獲以僅過濾LACP資料包。
switch#debug platform software fed sw active punt packet-capture set-filter "eth.dst==0180.c200.0002" Filter setup successful. Captured packets will be cleared
啟動捕獲。
switch#debug platform software fed sw active punt packet-capture start Punt packet capturing started.
如果不使用LACP速率快速計時器,請在30秒後停止它(至少)。
switch#debug platform software fed switch active punt packet-capture stop Punt packet capturing stopped. Captured 11 packet(s)
檢查FED CPU資料包捕獲狀態。
switch#show platform software fed switch active punt packet-capture status Punt packet capturing: disabled. Buffer wrapping: disabled Total captured so far: 11 packets. Capture capacity : 4096 packets Capture filter : "eth.dst==0180.c200.0002"
分析FED CPU資料包捕獲輸出。
switch#show platform software fed switch active punt packet-capture brief
Punt packet capturing: disabled. Buffer wrapping: disabled
Total captured so far: 11 packets. Capture capacity : 4096 packets
Capture filter : "eth.dst==0180.c200.0002"
------ Punt Packet Number: 1, Timestamp: 2023/03/31 00:27:54.141 ------
interface : physical: GigabitEthernet1/0/2[if-id: 0x0000000a], pal: GigabitEthernet1/0/2 [if-id: 0x0000000a] <-- interface that punted the frame
metadata : cause: 96 [Layer2 control protocols], sub-cause: 0, q-no: 1, linktype: MCP_LINK_TYPE_LAYER2 [10] <-- LACP frame was punted due to L2 ctrl protocol to queue 1 (L2 control)
ether hdr : dest mac: 0180.c200.0002, src mac: f04a.0205.d602 <-- source and destination MAC addresses
ether hdr : ethertype: 0x8809
------ Punt Packet Number: 2, Timestamp: 2023/03/31 00:27:58.436 ------
interface : physical: GigabitEthernet1/0/4[if-id: 0x0000000c], pal: GigabitEthernet1/0/4 [if-id: 0x0000000c]
metadata : cause: 96 [Layer2 control protocols], sub-cause: 0, q-no: 1, linktype: MCP_LINK_TYPE_LAYER2 [10]
ether hdr : dest mac: 0180.c200.0002, src mac: f04a.0205.d604
ether hdr : ethertype: 0x8809
------ Punt Packet Number: 3, Timestamp: 2023/03/31 00:28:00.758 ------
interface : physical: GigabitEthernet1/0/1[if-id: 0x00000009], pal: GigabitEthernet1/0/1 [if-id: 0x00000009]
metadata : cause: 96 [Layer2 control protocols], sub-cause: 0, q-no: 1, linktype: MCP_LINK_TYPE_LAYER2 [10]
ether hdr : dest mac: 0180.c200.0002, src mac: f04a.0205.d601
ether hdr : ethertype: 0x8809
------ Punt Packet Number: 4, Timestamp: 2023/03/31 00:28:11.888 ------
interface : physical: GigabitEthernet1/0/3[if-id: 0x0000000b], pal: GigabitEthernet1/0/3 [if-id: 0x0000000b]
metadata : cause: 96 [Layer2 control protocols], sub-cause: 0, q-no: 1, linktype: MCP_LINK_TYPE_LAYER2 [10]
ether hdr : dest mac: 0180.c200.0002, src mac: f04a.0205.d603
ether hdr : ethertype: 0x8809
注入
定義資料包捕獲以僅過濾LACP資料包。
switch#debug platform software fed sw active inject packet-capture set-filter "eth.dst==0180.c200.0002" Filter setup successful. Captured packets will be cleared
啟動捕獲。
switch#debug platform software fed sw active inject packet-capture start Punt packet capturing started.