PowerScale:Tcpdumpを使用してスイッチ情報を収集する方法

Summary: この記事では、パケット キャプチャ ツールを使用して基本的なスイッチ情報を収集する方法について説明します。

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Instructions

Ethernetネットワーク スイッチでは、次のようなポート情報をブロードキャストするのが一般的です。 port nameport descriptionsystem namesystem descriptionnative vlanの詳細を確認してください。Cisco Discovery Protocol(CDP)は、シスコのスイッチ プラットフォーム独自のプロトコルです。Link Layer Discovery Protocol(LLDP)は、どちらかというと業界標準です。

このトピックの詳細については、「
CDP - https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/cdp/configuration/15-mt/cdp-15-mt-book/nm-cdp-discover.html
LLDP - https://www.cisco.com/c/en/us/td/docs/routers/ncs4000/software/configure/guide/configurationguide/configurationguide_chapter_0111011.pdf

この情報は、ノード インターフェイスが物理的に接続されているスイッチ ポートを特定するのに役立ちます。ケーブルが誤ったスイッチ ポートに接続されている場合や、ポート チャネルが誤った物理ポートで構成されている場合があります。ポートを識別すると、ネットワーク エンジニアは、それらのインターフェイスで構成されている内容とそれらが正しいかどうかをすばやく確認できます。  

「注意事項/注意事項」

  • tcpdump コマンドは論理インターフェース上で実行すべきではありません(SHOULD NOT)。laggX や vlanX などの情報は、物理インターフェイスにのみ関連します。
  • tcpdump コマンドは物理インターフェース上でのみ実行すべきです(SHOULD)。1G、10G、25G、40Gなどです
  • インターフェイス ペアでデータを収集するのが最善です。つまり、mceインターフェイスでのアグリゲーションの問題を調査する場合は、mce2から収集し、次にmce3から収集します。 
  • ノードのインターフェイス ステータスが「no carrier」の場合、パケットは正常に受信されません。これは、最初に物理的な問題として対処する必要があります。
  • CDP/LLDPトラフィック(低速)は、25〜35秒の間にスイッチポートから送信されます。  
  • 起動してから120秒経っても出力がない場合は、 tcpdumpで、コマンドを終了します。スイッチがパケットを送信していない可能性があります。


次のような tcpdump コマンドはCDPパケットのみをリッスンし、パケットを出力してから実行を停止します(手動でインターフェイスに入ります)。

tcpdump -ni <iface> -v -s0 -c1 '(ether[20:2]=0x2000)'

次のような tcpdump コマンドはLLDPパケットのみをリッスンし、パケットを出力してから実行を停止します(手動でインターフェイスに入ります)。

tcpdump -ni <iface> -v -s0 -c1 '(ether[12:2]=0x88cc)'

次のような tcpdump コマンドはLLDPおよびCDPパケットをリッスンし、受信した最初のパケットを出力してから、実行を停止します(手動でインターフェイスに入ります)。

tcpdump -ni <iface> -v -s0 -c1 '(ether[12:2]=0x88cc or ether[20:2]=0x2000)'

 

Additional Information

使用するコマンドは、スイッチのベンダーによって異なります。

CDPの例(出力は異なる場合があります):

isilon-1# tcpdump -ni cxgb0 -v -s0 -c1 '(ether[20:2]=0x2000)'
tcpdump: WARNING: cxgb0: no IPv4 address assigned
tcpdump: listening on cxgb0, link-type EN10MB (Ethernet), capture size 65535 bytes
13:09:18.942158 CDPv2, ttl: 180s, checksum: 692 (unverified), length 248
        Device-ID (0x01), length: 25 bytes: 'nx-5k(XXXXXXXXXXX)'
        Address (0x02), length: 13 bytes: IPv4 (1) Y.Y.Y.Y
        Port-ID (0x03), length: 11 bytes: 'Ethernet1/2'
        Capability (0x04), length: 4 bytes: (0x00000228): L2 Switch, IGMP snooping
        Version String (0x05), length: 66 bytes:
          Cisco Nexus Operating System (NX-OS) Software, Version 4.1(3)N2(1)
        Platform (0x06), length: 14 bytes: 'N5K-C5010P-BFS'
        Native VLAN ID (0x0a), length: 2 bytes: 1XX
        Duplex (0x0b), length: 1 byte: full
        MTU (0x11), length: 4 bytes: 1500 bytes
        System Name (0x14), length: 12 bytes: 'nx-5k'
        System Object ID (not decoded) (0x15), length: 14 bytes:
          0x0000:  XYXY XYXY XYXY XYXY XYXY XYXY XYXY
        Management Addresses (0x16), length: 13 bytes: IPv4 (1) Y.Y.Y.Y
        Physical Location (0x17), length: 13 bytes: 0x00/snmplocation
1 packet captured
25 packets received by filter
0 packets dropped by kernel

LLDPの例(出力は異なる場合があります):

isilon-1# tcpdump -ni ix0 -v -s0 -c1 '(ether[12:2]=0x88cc)'
tcpdump: WARNING: ix0: no IPv4 address assigned
tcpdump: listening on ix0, link-type EN10MB (Ethernet), capture size 65535 bytes
18:12:46.442857 LLDP, length 282
		Chassis ID TLV (1), length 7
		Subtype MAC address (4): xy:xy:xy:xy:xy:xy
		Port ID TLV (2), length 13
		Subtype Interface Name (5): Ethernet1/13
		Time to Live TLV (3), length 2: TTL 120s
		Port Description TLV (4), length 12: isi_node
		System Name TLV (5), length xy: XXXXXX
		System Description TLV (6), length 161
		Cisco Nexus Operating System (NX-OS) Software ...truncated
		System Capabilities TLV (7), length 4
		System Capabilities [Bridge, Router] (0x0014)
		Enabled Capabilities [Bridge, Router] (0x0014)
		Management Address TLV (8), length 12
		Management Address length 5, AFI IPv4 (1): Y.Y.Y.Y
		Interface Index Interface Numbering (2): 1
		Organization specific TLV (127), length 5: OUI Unknown (0x000142)
		0x0000: 0001 XYXY XY
		Organization specific TLV (127), length 6: OUI Ethernet bridged (0x0080c2)
		Port VLAN Id Subtype (1)
		port vlan id (PVID): 1XX
		Management Address TLV (8), length 14
		Management Address length 7, AFI 802 (6): xy:xy:xy:xy:xy:xy
		Interface Index Interface Numbering (2): 1
		End TLV (0), length 0
1 packet captured
3 packets received by filter
0 packets dropped by kernel
Article Properties
Article Number: 000157863
Article Type: How To
Last Modified: 31 ديسمبر 2025
Version:  5
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.