PowerScale: Come raccogliere informazioni sugli switch utilizzando Tcpdump

Samenvatting: Questo articolo descrive come raccogliere le informazioni di base sugli switch utilizzando gli strumenti di acquisizione dei pacchetti.

Dit artikel is van toepassing op Dit artikel is niet van toepassing op Dit artikel is niet gebonden aan een specifiek product. Niet alle productversies worden in dit artikel vermeld.

Instructies

È comune che gli switch di rete Ethernet trasmettano informazioni sulla porta, ad esempio port name, port description, system name, system descriptione native vlan. Cisco Discovery Protocol (CDP) è proprietario della piattaforma di switch di Cisco. Il protocollo LLDP (Link Layer Discovery Protocol) è più di uno standard di settore. 

Per ulteriori informazioni su questo argomento:
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

Queste informazioni possono aiutare un ingegnere a identificare la porta dello switch a cui potrebbe essere connesso fisicamente l'interfaccia di un nodo. In alcuni casi può capitare che un cavo possa essere collegato alla porta dello switch errata oppure che i canali delle porte possano essere configurati con porte fisiche errate. L'identificazione delle porte può aiutare un ingegnere di rete a vedere rapidamente cosa è configurato su tali interfacce e se sono corrette.  

"Avvertenze/Cavilli"

  • La colonna tcpdump command NON DOVREBBE essere eseguito su interfacce logiche. Ad esempio laggX o vlanX in quanto le informazioni sono pertinenti solo alle interfacce fisiche.
  • La colonna tcpdump Il comando DEVE essere eseguito solo su interfacce fisiche. Si tratta di 1G, 10G, 25G, 40G e così via
  • È preferibile raccogliere i dati in coppie di interfacce. Ciò significa che se si analizza un problema di aggregazione sulle interfacce mce, raccogliere da mce2, quindi da mce3. 
  • Se lo stato dell'interfaccia sul nodo è "no carrier", non è possibile ricevere alcun pacchetto. Questo dovrebbe essere affrontato prima come un problema fisico.
  • Il traffico CDP/LLDP (lento) viene inviato dalla porta dello switch tra 25 e 35 secondi.  
  • Se non c'è uscita dopo 120 secondi dall'avvio, il tcpdump, termina il comando. È probabile che lo switch non stia inviando il pacchetto.


I seguenti servizi ruolo per tcpdump Il comando è in ascolto solo dei pacchetti CDP, stampa il pacchetto, quindi interrompe l'esecuzione (accedere all'interfaccia manualmente):

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

I seguenti servizi ruolo per tcpdump Il comando è in ascolto solo del pacchetto LLDP, stampa il pacchetto, quindi interrompe l'esecuzione (accedere all'interfaccia manualmente):

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

I seguenti servizi ruolo per tcpdump Il comando è in ascolto dei pacchetti LLDP e CDP, stampa il primo pacchetto ricevuto, quindi interrompe l'esecuzione (immettere l'interfaccia manualmente):

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

 

Extra informatie

Il comando da utilizzare varia in base al fornitore dello switch.

Esempio di CDP (l'output può variare):

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

Esempio di LLDP (l'output può variare):

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
Artikeleigenschappen
Artikelnummer: 000157863
Artikeltype: How To
Laatst aangepast: 31 dec. 2025
Versie:  5
Vind antwoorden op uw vragen via andere Dell gebruikers
Support Services
Controleer of uw apparaat wordt gedekt door Support Services.