Cdp cisco
Author: k | 2025-04-24
CDP is a Cisco proprietary protocol that collects ciscocdp CiscoDiscoveryProtocolIn this video, you will learn about Cisco CDP (Cisco Discovery Protocol). CDP is a Cisco proprietary
Cisco Discovery Protocol, CDP Cisco, Cisco CDP, CDP Monitor, Monitor CDP
Address(es): IPv4 Address: 10.10.10.1Platform: N77-C7706, Capabilities: Router Switch IGMP Filtering Supports-STP-DisputeInterface: Ethernet6/20, Port ID (outgoing port): Ethernet2/6Holdtime: 145 secVersion:Cisco Nexus Operating System (NX-OS) Software, Version 8.3(1)Advertisement Version: 2Native VLAN: 500Duplex: fullshow cdp traffic interface show cdp traffic interface import requestsimport json """Modify these please"""url=' myheaders={'content-type':'application/json'}payload={"ins_api":{ "version": "1.0", "type": "cli_show", "chunk": "0", "sid": "1", "input": "show cdp traffic interface ethernet 6/20", "output_format": "json"} response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()output = json.dumps(response, indent=4, sort_keys=True){ "intf_id": "Ethernet6/20", "total_input_packets": "8649", "valid_cdp_packets": "8649", "input_v1_packets": "0", "input_v2_packets": "8649", "invalid_cdp_packets": "0", "unsupported_version": "0", "checksum_errors": "0", "malformed_packets": "0", "total_output_packets": "8652", "output_v1_packets": "0", "output_v2_packets": "8652", "send_errors": "0"}switch# show cdp traffic interface ethernet 6/20 detail | xml Ethernet6/20 Ethernet6/20 8649 8649 0 8649 0 0 0 0 8652 0 8652 0 ]]>]]>For command descriptions, see the Cisco Nexus 7000 Series Switches Command References. Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).CLI Outputswitch# show cdp traffic interface ethernet 6/20switch# show cdp traffic interface ethernet 6/20Traffic statistics for Ethernet6/20Input Statistics: Total Packets: 8649 Valid CDP Packets: 8649 CDP v1 Packets: 0 CDP v2 Packets: 8649 Invalid CDP Packets: 0 Unsupported Version: 0 Checksum Errors: 0 Malformed Packets: 0Output Statistics: Total Packets: 8652 CDP v1 Packets: 0 CDP v2 Packets: 8652 Send Errors: 0show cdp entry allshow cdp entry allimport requestsimport json """Modify these please"""url=' myheaders={'content-type':'application/json'}payload={"ins_api":{ "version": "1.0", "type": "cli_show", "chunk": "0", "sid": "1", "input": "show cdp entry all", "output_format": "json"} response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()output = json.dumps(response, indent=4, sort_keys=True){ "TABLE_cdp_entry_all": { "ROW_cdp_entry_all": [ { "device_id": "SW-JWALA-ECBU-I12", "platform_id": "cisco WS-C2960G-48TC-L", "capability": [ "Switch", "IGMP Filtering" ], "intf_id": "mgmt0", "port_id": "GigabitEthernet0/10", "ttl": 162, "version": "Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(55)SE5, RELEASE SOFTWARE (fc1)\nTechnical Support: (c) 1986-2012 by Cisco Systems, Inc.\nCompiled Thu 09-Feb-12 19:11 by prod_rel_team", "version_no": "2", "nativevlan": 1, "vtpname": null, "duplexmode": "full" }, { "device_id": "N7706-vpc1(FXS1813Q0VY)", "sysname": "N7706-vpc1", "v4addr": "10.10.10.1", "platform_id": "N77-C7706", "capability": [ "Router", "Switch", "IGMP Filtering", "Supports-STP-Dispute" ], "intf_id": "Ethernet6/20", "port_id": "Ethernet2/6", "ttl": 178, "version": "Cisco Nexus Operating System (NX-OS) Software, Version 8.3(1)", "version_no": "2", "nativevlan": 500, "duplexmode": "full" } ] }}switch# show cdp entry all | xml SW-JWALA-ECBU-I12 cisco WS-C2960G-48TC-L Switch IGMP Filtering mgmt0 GigabitEthernet0/10 126 Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(55)SE5, RELEASE SOFTWARE (fc1)Technical Support: (c) 1986-2012 by Cisco Systems, Inc.Compiled Thu 09-Feb-12 19:11 by prod_rel_team 2 1 full N7706-vpc1(FXS1813Q0VY) N7706-vpc1 10.10.10.1 N77-C7706 Router Switch IGMP Filtering Supports-STP-Dispute Ethernet6/20 Ethernet2/6 141 Cisco Nexus Operating System (NX-OS) Software, Version 8.3(1) 2 500 full ]]>]]>For command descriptions, see the Cisco Nexus 7000 Series Switches Command References. Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).CLI Outputswitch# show cdp entry allswitch# show cdp entry allDevice ID:SW-JWALA-ECBU-I12System Name:Interface address(es):Platform: cisco WS-C2960G-48TC-L, Capabilities: Switch IGMP Filtering Interface: mgmt0, Port ID (outgoing port): GigabitEthernet0/10Holdtime: 163 secVersion:Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(55)SE5, RELEASE SOFTWARE (fc1)Technical Support: (c) 1986-2012 by Cisco Systems, Inc.Compiled Thu 09-Feb-12 19:11 by prod_rel_teamAdvertisement Version: 2Native VLAN: 1VTP Management Domain: Duplex: fullDevice ID:N7706-vpc1(FXS1813Q0VY)System Name:N7706-vpc1Interface address(es): IPv4 Address: 10.10.10.1Platform: N77-C7706, Capabilities: Router Switch IGMP Filtering Supports-STP-Dispute Interface: Ethernet6/20, Port ID CDP is a Cisco proprietary protocol that collects ciscocdp CiscoDiscoveryProtocolIn this video, you will learn about Cisco CDP (Cisco Discovery Protocol). CDP is a Cisco proprietary Download CISCO-CDP-MIB MIB for Free. This is the MIB module CISCO-CDP-MIB from Cisco We currently have 7669 unique MIBs online!This area is free for all Network Management enthusiasts. Last updated on 11/17/2014 9:57:13 AM Search MIB Database Search any MIB-MODULE, OID, VARIABLE throughout our entire database!! Search MIBs --> Download Cisco ASN.1 MIBs from OiDViEW SaaS - now in the cloud! FREE online MIB Database Instant MIB Downloads FREE online MIB Browser This OID tree represents the compiled SNMP MIB module CISCO-CDP-MIB and includes only high-level compiled information. For more detail (mib object descriptions, Unit Types, Textual Conventions, Macro-definitions, etc.), please download the raw SNMP ASN.1 mib test file by clicking on the ZIP icon above. To query a live agent with SNMP for objects in module CISCO-CDP-MIB, use OidView Network Management Tools or SNMP SNMP MIB Browser. To capture and analyze snmp traps from a live agent with objects loaded from module CISCO-CDP-MIB, use OidView Trap Manager SNMP Fault Management Statistics for MIB CISCO-CDP-MIB: Objects: 77 OIDS: 72 Object Groups: 9 Traps: 0 Notifications: 0 Notification Groups: 0 Tables: 4 Tabulars: 35 Scalars/Other: 24Comments
Address(es): IPv4 Address: 10.10.10.1Platform: N77-C7706, Capabilities: Router Switch IGMP Filtering Supports-STP-DisputeInterface: Ethernet6/20, Port ID (outgoing port): Ethernet2/6Holdtime: 145 secVersion:Cisco Nexus Operating System (NX-OS) Software, Version 8.3(1)Advertisement Version: 2Native VLAN: 500Duplex: fullshow cdp traffic interface show cdp traffic interface import requestsimport json """Modify these please"""url=' myheaders={'content-type':'application/json'}payload={"ins_api":{ "version": "1.0", "type": "cli_show", "chunk": "0", "sid": "1", "input": "show cdp traffic interface ethernet 6/20", "output_format": "json"} response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()output = json.dumps(response, indent=4, sort_keys=True){ "intf_id": "Ethernet6/20", "total_input_packets": "8649", "valid_cdp_packets": "8649", "input_v1_packets": "0", "input_v2_packets": "8649", "invalid_cdp_packets": "0", "unsupported_version": "0", "checksum_errors": "0", "malformed_packets": "0", "total_output_packets": "8652", "output_v1_packets": "0", "output_v2_packets": "8652", "send_errors": "0"}switch# show cdp traffic interface ethernet 6/20 detail | xml Ethernet6/20 Ethernet6/20 8649 8649 0 8649 0 0 0 0 8652 0 8652 0 ]]>]]>For command descriptions, see the Cisco Nexus 7000 Series Switches Command References. Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).CLI Outputswitch# show cdp traffic interface ethernet 6/20switch# show cdp traffic interface ethernet 6/20Traffic statistics for Ethernet6/20Input Statistics: Total Packets: 8649 Valid CDP Packets: 8649 CDP v1 Packets: 0 CDP v2 Packets: 8649 Invalid CDP Packets: 0 Unsupported Version: 0 Checksum Errors: 0 Malformed Packets: 0Output Statistics: Total Packets: 8652 CDP v1 Packets: 0 CDP v2 Packets: 8652 Send Errors: 0show cdp entry allshow cdp entry allimport requestsimport json """Modify these please"""url=' myheaders={'content-type':'application/json'}payload={"ins_api":{ "version": "1.0", "type": "cli_show", "chunk": "0", "sid": "1", "input": "show cdp entry all", "output_format": "json"} response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()output = json.dumps(response, indent=4, sort_keys=True){ "TABLE_cdp_entry_all": { "ROW_cdp_entry_all": [ { "device_id": "SW-JWALA-ECBU-I12", "platform_id": "cisco WS-C2960G-48TC-L", "capability": [ "Switch", "IGMP Filtering" ], "intf_id": "mgmt0", "port_id": "GigabitEthernet0/10", "ttl": 162, "version": "Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(55)SE5, RELEASE SOFTWARE (fc1)\nTechnical Support: (c) 1986-2012 by Cisco Systems, Inc.\nCompiled Thu 09-Feb-12 19:11 by prod_rel_team", "version_no": "2", "nativevlan": 1, "vtpname": null, "duplexmode": "full" }, { "device_id": "N7706-vpc1(FXS1813Q0VY)", "sysname": "N7706-vpc1", "v4addr": "10.10.10.1", "platform_id": "N77-C7706", "capability": [ "Router", "Switch", "IGMP Filtering", "Supports-STP-Dispute" ], "intf_id": "Ethernet6/20", "port_id": "Ethernet2/6", "ttl": 178, "version": "Cisco Nexus Operating System (NX-OS) Software, Version 8.3(1)", "version_no": "2", "nativevlan": 500, "duplexmode": "full" } ] }}switch# show cdp entry all | xml SW-JWALA-ECBU-I12 cisco WS-C2960G-48TC-L Switch IGMP Filtering mgmt0 GigabitEthernet0/10 126 Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(55)SE5, RELEASE SOFTWARE (fc1)Technical Support: (c) 1986-2012 by Cisco Systems, Inc.Compiled Thu 09-Feb-12 19:11 by prod_rel_team 2 1 full N7706-vpc1(FXS1813Q0VY) N7706-vpc1 10.10.10.1 N77-C7706 Router Switch IGMP Filtering Supports-STP-Dispute Ethernet6/20 Ethernet2/6 141 Cisco Nexus Operating System (NX-OS) Software, Version 8.3(1) 2 500 full ]]>]]>For command descriptions, see the Cisco Nexus 7000 Series Switches Command References. Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).CLI Outputswitch# show cdp entry allswitch# show cdp entry allDevice ID:SW-JWALA-ECBU-I12System Name:Interface address(es):Platform: cisco WS-C2960G-48TC-L, Capabilities: Switch IGMP Filtering Interface: mgmt0, Port ID (outgoing port): GigabitEthernet0/10Holdtime: 163 secVersion:Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(55)SE5, RELEASE SOFTWARE (fc1)Technical Support: (c) 1986-2012 by Cisco Systems, Inc.Compiled Thu 09-Feb-12 19:11 by prod_rel_teamAdvertisement Version: 2Native VLAN: 1VTP Management Domain: Duplex: fullDevice ID:N7706-vpc1(FXS1813Q0VY)System Name:N7706-vpc1Interface address(es): IPv4 Address: 10.10.10.1Platform: N77-C7706, Capabilities: Router Switch IGMP Filtering Supports-STP-Dispute Interface: Ethernet6/20, Port ID
2025-04-03Download CISCO-CDP-MIB MIB for Free. This is the MIB module CISCO-CDP-MIB from Cisco We currently have 7669 unique MIBs online!This area is free for all Network Management enthusiasts. Last updated on 11/17/2014 9:57:13 AM Search MIB Database Search any MIB-MODULE, OID, VARIABLE throughout our entire database!! Search MIBs --> Download Cisco ASN.1 MIBs from OiDViEW SaaS - now in the cloud! FREE online MIB Database Instant MIB Downloads FREE online MIB Browser This OID tree represents the compiled SNMP MIB module CISCO-CDP-MIB and includes only high-level compiled information. For more detail (mib object descriptions, Unit Types, Textual Conventions, Macro-definitions, etc.), please download the raw SNMP ASN.1 mib test file by clicking on the ZIP icon above. To query a live agent with SNMP for objects in module CISCO-CDP-MIB, use OidView Network Management Tools or SNMP SNMP MIB Browser. To capture and analyze snmp traps from a live agent with objects loaded from module CISCO-CDP-MIB, use OidView Trap Manager SNMP Fault Management Statistics for MIB CISCO-CDP-MIB: Objects: 77 OIDS: 72 Object Groups: 9 Traps: 0 Notifications: 0 Notification Groups: 0 Tables: 4 Tabulars: 35 Scalars/Other: 24
2025-03-31Show cdp globalshow cdp globalimport requestsimport json """Modify these please"""url=' myheaders={'content-type':'application/json'}payload={"ins_api":{ "version": "1.0", "type": "cli_show", "chunk": "0", "sid": "1", "input": "show cdp global", "output_format": "json"} response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()output = json.dumps(response, indent=4, sort_keys=True){ "cdp_global_enabled": "enabled", "refresh_time": "60", "ttl": 180, "v2_advertisement": "enabled", "deviceid_format": "DeviceID TLV in System-Name(Default) Format"}switch# show cdp global | xml enabled 60 180 enabled DeviceID TLV in System-Name(Default) Format ]]>]]>For command descriptions, see the Cisco Nexus 7000 Series Switches Command References. Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).CLI Outputswitch# **show cdp global**switch# show cdp globalGlobal CDP information: CDP enabled globally Refresh time is 60 seconds Hold time is 180 seconds CDPv2 advertisements is enabled DeviceID TLV in System-Name(Default) Format show cdp neighborsshow cdp neighborsimport requestsimport json """Modify these please"""url=' myheaders={'content-type':'application/json'}payload={"ins_api":{ "version": "1.0", "type": "cli_show", "chunk": "0", "sid": "1", "input": "show cdp neighbors", "output_format": "json"} response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()output = json.dumps(response, indent=4, sort_keys=True){ "TABLE_cdp_neighbor_brief_info": { "ROW_cdp_neighbor_brief_info": [ { "ifindex": 83886080, "device_id": "SW-JWALA-ECBU-I12", "intf_id": "mgmt0", "ttl": 139, "capability": [ "switch", "IGMP_cnd_filtering" ], "platform_id": "cisco WS-C2960G-48TC-L", "port_id": "GigabitEthernet0/10" }, { "ifindex": 438906880, "device_id": "ethpm-f4100g-sw1-vpc1(FXS1813Q0VY)", "intf_id": "Ethernet6/20", "ttl": 35, "capability": [ "router", "switch", "IGMP_cnd_filtering", "Supports-STP-Dispute" ], "platform_id": "N77-C7706", "port_id": "Ethernet2/6" }, { "ifindex": 438906880, "device_id": "N7706-vpc1(FXS1813Q0VY)", "intf_id": "Ethernet6/20", "ttl": 155, "capability": [ "router", "switch", "IGMP_cnd_filtering", "Supports-STP-Dispute" ], "platform_id": "N77-C7706", "port_id": "Ethernet2/6" } ] }, "neigh_count": 3}switch# show cdp neighbors | xml 83886080 SW-JWALA-ECBU-I12 mgmt0 145 switch IGMP_cnd_filtering cisco WS-C2960G-48TC-L GigabitEthernet0/10 438906880 ethpm-f4100g-sw1-vpc1(FXS1813Q0VY) Ethernet6/20 41 router switch IGMP_cnd_filtering Supports-STP-Dispute N77-C7706 Ethernet2/6 438906880 N7706-vpc1(FXS1813Q0VY) Ethernet6/20 161 router switch IGMP_cnd_filtering Supports-STP-Dispute N77-C7706 Ethernet2/6 3 ]]>]]>For command descriptions, see the Cisco Nexus 7000 Series Switches Command References. Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).CLI Outputswitch# **show cdp neighbors**switch# show cdp neighborsCapability Codes: R - Router, T - Trans-Bridge, B - Source-Route-Bridge S - Switch, H - Host, I - IGMP, r - Repeater, V - VoIP-Phone, D - Remotely-Managed-Device, s - Supports-STP-DisputeDevice-ID Local Intrfce Hldtme Capability Platform Port IDSW-JWALA-ECBU-I12 mgmt0 149 S I WS-C2960G-48TC-L Gig0/10ethpm-f4100g-sw1-vpc1(FXS1813Q0VY) Eth6/20 45 R S I s N77-C7706 Eth2/6N7706-vpc1(FXS1813Q0VY) Eth6/20 165 R S I s N77-C7706 Eth2/6 Total entries displayed: 3show cdp neighbors [interface ]show cdp neighbors [interface ]import requestsimport json """Modify these please"""url=' myheaders={'content-type':'application/json'}payload={"ins_api":{ "version": "1.0", "type": "cli_show", "chunk": "0", "sid": "1", "input": "show cdp neighbors interface ethernet6/20", "output_format": "json"} response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()output = json.dumps(response, indent=4, sort_keys=True){ "TABLE_cdp_neighbor_brief_info": { "ROW_cdp_neighbor_brief_info": { "ifindex": 438906880, "device_id": "N7706-vpc1(FXS1813Q0VY)", "intf_id": "Ethernet6/20", "ttl": 143, "capability": [ "router", "switch", "IGMP_cnd_filtering", "Supports-STP-Dispute" ], "platform_id": "N77-C7706", "port_id": "Ethernet2/6" } }, "neigh_count": 1}switch# show cdp neighbors interface ethernet6/20 | xml Ethernet6/20 438906880 N7706-vpc1(FXS1813Q0VY) Ethernet6/20 154 router switch IGMP_cnd_filtering Supports-STP-Dispute N77-C7706 Ethernet2/6 1 ]]>]]>For command descriptions, see the Cisco Nexus 7000 Series Switches Command References. Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).CLI Outputswitch# **show cdp neighbors interface ethernet6/20**switch# show cdp neighbors interface ethernet6/20Global CDP information: CDP enabled globally Refresh time is 60 seconds Hold time is 180 seconds CDPv2 advertisements is enabled DeviceID TLV in System-Name(Default) Format show cdp
2025-04-20目次1CDPの概要CDPでやり取りする情報CDPの無効化CDPの確認LLDPの概要CiscoルータやCatalystスイッチはCDP(Cisco Discovery Protocol)によって、自身を起点として直接接続されている他のCisco機器を検出することができます。直接接続されているデバイスのことを近接デバイスあるいは隣接デバイスと呼んでいます。CDPはデータリンク層で動作するCisco独自のプロトコルで、SNAPカプセル化をサポートする物理メディアで利用可能です。SNAPカプセル化をサポートする物理メディアは、イーサネット、フレームリレー、ATM、PPP/HDLCなどがあります。また、上位プロトコルには依存しません。Cisco独自のプロトコルなので、他のベンダのネットワーク機器やホストは検出できないので注意してください。CDPはデータリンク層のプロトコルなので、CDPで直接接続されている機器を検出できれば、データリンク層までは問題なく動作していることも確認できます。図 CDPの概要他のベンダのデバイスでもCDPをサポートしているものであれば検出可能です。Ciscoルータ/Catalystスイッチは、デフォルトでCDPが有効になっています。60秒ごとにCDPの情報を送信します。CDPの情報を送受信する際は、予約されたマルチキャストアドレス「01-00-0c-cc-cc-cc」を利用しています。CDPの情報を受信すれば、その内容をCDPのキャッシュに格納します。これを参照すれば、どのようなデバイスがどのポートに接続されているかがわかります。CDPのキャッシュを参照するには、show cdp neighborコマンドを利用します。定期的なCDPの情報を一定時間受信することができなければ、その情報をキャッシュから削除します。この時間のことをホールドタイムといい、デフォルトは180秒です。また、CDPはCatalystスイッチに接続されているCisco IP Phoneを検出するためにも利用します。Catalystスイッチに接続されているCisco IP PhoneへVoice VLANなどといったIP Phoneに必要な情報を通知できます。図 CDPとCisco IP PhoneCDPにはバージョン1とバージョン2があります。現在のCiscoデバイスはデフォルトでCDPバージョン2が有効になっています。CDPバージョン1では、次の情報が送受信されています。隣接デバイスIDローカルインタフェース隣接デバイスのケイパビリティ隣接デバイスのプラットフォームリモートインタフェース隣接デバイスのネットワーク層アドレス隣接デバイスのIOSバージョン情報これに加えて、CDPバージョン2では次の情報が追加されています。VTPドメイン名ネイティブVLANインタフェースの2重モードCDPでやり取りされる情報は、IOSバージョンやIPアドレスの情報が含まれています。そのため、不用意にCDPで情報を送信すると悪意のあるクラッカーに不正アクセスの足がかりとなる情報を与えてしまう可能性もあります。また、直接接続されている機器がCisco製以外であれば、CDPの情報を送信することは意味がありません。そこで、CDPの有効化/無効化をコントロールする必要があります。CDPを無効化するには、グローバルコンフィグレーションモードで次のコマンドを入力します。(config)#no cdp run再びCDPを有効にするには、cdprunコマンドを入力します。そして、インタフェース単位でもCDPを無効化することができます。CDPを無効にしたいインタフェースコンフィグレーションモードで次のコマンドを入力します。(config-if)#no cdp enableこの設定により、該当のインタフェースからCDPの情報を送信することをとめることができます。再びCDPを有効にするにはcdp enableコマンドを入力してください。CDPで直接接続されているCisco機器を確認するには、主に次のコマンドを利用します。#show cdp neighbor [detail]#show cdp entry 以下は、show cdp neighborの出力例です。CenterRT#show cdp neighbors Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone, D - Remote, C - CVTA, M - Two-port Mac Relay Device ID Local Intrfce Holdtme Capability Platform Port IDSwitch Gig 0 179 S I WS-C2960S Gig 1/0/1show cdp neighborコマンドを実行している機器のホスト名はCenterRTです。CenterRTはSwitchと直接接続されています。接続しているインタフェースは、以下のとおりです。CenterRT GigabitEthernet0 (Local Intrfce)Switch GigabitEthernet1/0/1(Port ID)また、PlatformからSwitchはCatalyst2960Sであることもわかります。図 CDPで確認した機器同士の接続CDPの詳細な情報を確認するには、show cdp neighbor detailまたはshow cdp entry コマンドです。CenterRT#show cdp neighbors detail -------------------------Device ID: SwitchEntry address(es): 10.0.0.100Platform: cisco WS-C2960S-24TS-L, Capabilities: Switch IGMP Interface: GigabitEthernet0, Port ID (outgoing port): GigabitEthernet1/0/1Holdtime : 177 secVersion :Cisco IOS Software, C2960S Software (C2960S-UNIVERSALK9-M), Version 15.0(2)SE2, RELEASE SOFTWARE (fc1)Technical Support: (c) 1986-2013 by Cisco Systems, Inc.Compiled Tue 05-Feb-13 12:48 by prod_rel_teamadvertisement version: 2Protocol Hello: OUI=0x00000C, Protocol ID=0x0112; payload len=27, value=00000000FFFFFFFF010231FF00000000000070105C247880FF0000VTP Management Domain: 'cisco'Native VLAN: 1Duplex: fullshow cdp neighbor detailコマンドでは、IPアドレスやIOSバージョン、VTPドメイン、ネイティブVLAN、デュプレックスなどのさまざまな情報もわかります。CiscoのCDPに相当する標準化されたプロトコルがLLDP(Link Layer Discovery Protocol)です。LLDPはIEEE802.1ABで標準化されています。LLDPはCDPと同様にデータリンク層で動作します。LLDPが有効な機器同士でLLDPフレームを交換することで、直接接続している機器を検出したり、追加の設定情報を通知することができます。Cisco Catalystスイッチでは、LLDPをサポートしているモデルでもデフォルトでは、LLDPは無効化されています。LLDPを有効にするには、グローバルコンフィグレーションモードで次のコマンドを利用します。(config)#lldp runまた、CDPと同様にインタフェース単位での設定も可能です。インタフェース単位でLLDPを設定するには、インタフェースコンフィグレーションモードで次のコマンドを利用します。(config-if)#lldp [transmit | recieve]
2025-04-14Neighbors detailshow cdp neighbors detailimport requestsimport json """Modify these please"""url=' myheaders={'content-type':'application/json'}payload={"ins_api":{ "version": "1.0", "type": "cli_show", "chunk": "0", "sid": "1", "input": "show cdp neighbors detail", "output_format": "json"} response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()output = json.dumps(response, indent=4, sort_keys=True){ "TABLE_cdp_neighbor_detail_info": { "ROW_cdp_neighbor_detail_info": [ { "ifindex": 83886080, "device_id": "SW-JWALA-ECBU-I12", "vtpname": "null", "numaddr": 0, "platform_id": "cisco WS-C2960G-48TC-L", "capability": [ "switch", "IGMP_cnd_filtering" ], "intf_id": "mgmt0", "port_id": "GigabitEthernet0/10", "ttl": 124, "version": "Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(55)SE5, RELEASE SOFTWARE (fc1)\nTechnical Support: (c) 1986-2012 by Cisco Systems, Inc.\nCompiled Thu 09-Feb-12 19:11 by prod_rel_team", "version_no": "v2", "nativevlan": 1, "duplexmode": "full", "mtu": 0, "num_mgmtaddr": 0 }, { "ifindex": 438906880, "device_id": "N7706-vpc1(FXS1813Q0VY)", "sysname": "N7706-vpc1", "numaddr": 1, "v4addr": "10.10.10.1", "platform_id": "N77-C7706", "capability": [ "router", "switch", "IGMP_cnd_filtering", "Supports-STP-Dispute" ], "intf_id": "Ethernet6/20", "port_id": "Ethernet2/6", "ttl": 139, "version": "Cisco Nexus Operating System (NX-OS) Software, Version 8.3(1)", "version_no": "v2", "nativevlan": 500, "duplexmode": "full", "mtu": 0, "num_mgmtaddr": 0 } ] }}switch# show cdp neighbors detail | xml 83886080 SW-JWALA-ECBU-I12 null 0 cisco WS-C2960G-48TC-L switch IGMP_cnd_filtering mgmt0 GigabitEthernet0/10 130 Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(55)SE5, RELEASE SOFTWARE (fc1)Technical Support: (c) 1986-2012 by Cisco Systems, Inc.Compiled Thu 09-Feb-12 19:11 by prod_rel_team v2 1 full 0 0 438906880 N7706-vpc1(FXS1813Q0VY) N7706-vpc1 1 10.10.10.1 N77-C7706 router switch IGMP_cnd_filtering Supports-STP-Dispute Ethernet6/20 Ethernet2/6 146 Cisco Nexus Operating System (NX-OS) Software, Version 8.3(1) v2 500 full 0 0 ]]>]]>For command descriptions, see the Cisco Nexus 7000 Series Switches Command References. Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).CLI Outputswitch# show cdp neighbors detailswitch# show cdp neighbors detailDevice ID:SW-JWALA-ECBU-I12VTP Management Domain Name: nullInterface address(es):Platform: WS-C2960G-48TC-L, Capabilities: Switch IGMP Filtering Interface: mgmt0, Port ID (outgoing port): GigabitEthernet0/10Holdtime: 135 secVersion:Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(55)SE5, RELEASE SOFTWARE (fc1)Technical Support: (c) 1986-2012 by Cisco Systems, Inc.Compiled Thu 09-Feb-12 19:11 by prod_rel_teamAdvertisement Version: 2Native VLAN: 1Duplex: fullDevice ID:N7706-vpc1(FXS1813Q0VY)System Name: N7706-vpc1Interface address(es): IPv4 Address: 10.10.10.1Platform: N77-C7706, Capabilities: Router Switch IGMP Filtering Supports-STP-DisputeInterface: Ethernet6/20, Port ID (outgoing port): Ethernet2/6Holdtime: 150 secVersion:Cisco Nexus Operating System (NX-OS) Software, Version 8.3(1)Advertisement Version: 2Native VLAN: 500Duplex: full show cdp neighbors [interface ] detailshow cdp neighbors [interface ] detailimport requestsimport json """Modify these please"""url=' myheaders={'content-type':'application/json'}payload={"ins_api":{ "version": "1.0", "type": "cli_show", "chunk": "0", "sid": "1", "input": "show cdp neighbors interface ethernet6/20 detail", "output_format": "json"} response = requests.post(url,data=json.dumps(payload), headers=myheaders,auth=(switchuser,switchpassword)).json()output = json.dumps(response, indent=4, sort_keys=True){ "TABLE_cdp_neighbor_detail_info": { "ROW_cdp_neighbor_detail_info": { "ifindex": 438906880, "device_id": "N7706-vpc1(FXS1813Q0VY)", "sysname": "N7706-vpc1", "numaddr": 1, "v4addr": "10.10.10.1", "platform_id": "N77-C7706", "capability": [ "router", "switch", "IGMP_cnd_filtering", "Supports-STP-Dispute" ], "intf_id": "Ethernet6/20", "port_id": "Ethernet2/6", "ttl": 137, "version": "Cisco Nexus Operating System (NX-OS) Software, Version 8.3(1)", "version_no": "v2", "nativevlan": 500, "duplexmode": "full", "mtu": 0, "num_mgmtaddr": 0 } }}switch# show cdp neighbors interface ethernet6/20 detail | xml Ethernet6/20 438906880 N7706-vpc1(FXS1813Q0VY) N7706-vpc1 1 10.10.10.1 N77-C7706 router switch IGMP_cnd_filtering Supports-STP-Dispute Ethernet6/20 Ethernet2/6 142 Cisco Nexus Operating System (NX-OS) Software, Version 8.3(1) v2 500 full 0 0 ]]>]]>For command descriptions, see the Cisco Nexus 7000 Series Switches Command References. Note: This sample output is generated for Cisco Nexus 7000 Series NX-OS Release 8.3(1).CLI Outputswitch# show cdp neighbors interface ethernet6/20 detailswitch# show cdp neighbors interface ethernet6/20 detailDevice ID:N7706-vpc1(FXS1813Q0VY)System Name: N7706-vpc1Interface
2025-04-01