cisco_discovery_protocol_cdp
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
cisco_discovery_protocol_cdp [2024/01/19 14:40] – [CDP Neighbors] walkeradmin | cisco_discovery_protocol_cdp [2024/01/19 14:56] (current) – [CDP Neighbors Detail] walkeradmin | ||
---|---|---|---|
Line 12: | Line 12: | ||
\\ | \\ | ||
\\ | \\ | ||
+ | < | ||
CDP shares information with and discovers information about neighbouring devices. | CDP shares information with and discovers information about neighbouring devices. | ||
- | \\ | + | |
CDP shared information can include host name, IP Address, device type, etc. | CDP shared information can include host name, IP Address, device type, etc. | ||
- | \\ | + | |
Because CDP shares information about the network and devices cdp can be considered by some a security risk and some networks turn it off. | Because CDP shares information about the network and devices cdp can be considered by some a security risk and some networks turn it off. | ||
- | \\ | + | |
CDP is enabled on Cisco Devices by default. | CDP is enabled on Cisco Devices by default. | ||
- | \\ | + | |
Only directly connected neighbours can become CDP neighbours. | Only directly connected neighbours can become CDP neighbours. | ||
- | \\ | + | |
By default, CDP messages are sent every 60 seconds out of all interfaces that are in an UP state. | By default, CDP messages are sent every 60 seconds out of all interfaces that are in an UP state. | ||
- | \\ | + | |
When a devices receives a CDP message from a neighbouring device, it adds an entry for that device in its CDP Neighbour table. | When a devices receives a CDP message from a neighbouring device, it adds an entry for that device in its CDP Neighbour table. | ||
- | \\ | + | |
- | When a devices receives a CDP message from a neighboring device, it adds an entry for that device in its CDP Neighbour table. | + | |
- | \\ | + | |
By default, the CDP Holdtime is 180 seconds, so if a neighbour isn't heard from after 180s, it is removed from the CDP Neighbour table. | By default, the CDP Holdtime is 180 seconds, so if a neighbour isn't heard from after 180s, it is removed from the CDP Neighbour table. | ||
- | \\ | + | |
CDPv2 messages are sent by default. | CDPv2 messages are sent by default. | ||
- | \\ | + | |
LLDP (Link Layer Discovery Protocol) is more of an open standard (IEEE 802.1AB) that competes with CDP. | LLDP (Link Layer Discovery Protocol) is more of an open standard (IEEE 802.1AB) that competes with CDP. | ||
- | \\ | + | |
If you have a mixture of switches, say Cisco, Juniper, Netgear etc you should run LLDP and not use CDP. | If you have a mixture of switches, say Cisco, Juniper, Netgear etc you should run LLDP and not use CDP. | ||
+ | </ | ||
\\ | \\ | ||
---- | ---- | ||
Line 80: | Line 80: | ||
\\ | \\ | ||
There have been 2828 output and 1510 input CDP Version 2 advertisements. | There have been 2828 output and 1510 input CDP Version 2 advertisements. | ||
+ | \\ | ||
\\ | \\ | ||
==== CDP Neighbors ==== | ==== CDP Neighbors ==== | ||
Line 89: | Line 90: | ||
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone, | S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone, | ||
D - Remote, C - CVTA, M - Two-port Mac Relay | D - Remote, C - CVTA, M - Two-port Mac Relay | ||
+ | | ||
Device ID Local Intrfce | Device ID Local Intrfce | ||
Switch | Switch | ||
Rack4Control | Rack4Control | ||
\\ | \\ | ||
+ | Look at the diagram below, this is what we have physically: | ||
+ | \\ | ||
+ | \\ | ||
+ | {{ :: | ||
+ | \\ | ||
+ | Device ID Local Intrfce | ||
+ | \\ | ||
+ | Switch | ||
+ | \\ | ||
+ | Rack4Control | ||
+ | \\ | ||
+ | \\ | ||
+ | Looking at the table above, we are looking at the perspective of Switch A. Switch A can see two switches (2 neighbours) that are connected to it. | ||
+ | \\ | ||
+ | \\ | ||
+ | Device ID Local Intrfce | ||
+ | Switch | ||
+ | \\ | ||
+ | \\ | ||
+ | Device ID is the name of the Switch. | ||
+ | \\ | ||
+ | \\ | ||
+ | Local Intrfce is the interface of the switch we are running this command on (So the Switch called Switch is connected to our switch via local interface Gi01) | ||
+ | \\ | ||
+ | \\ | ||
+ | Holdtme is the 180 second time, if this drips down to zero, that device will be removed from the CDP Neighbour table. | ||
+ | \\ | ||
+ | \\ | ||
+ | Capability you can reference to this information at the top of the output: | ||
+ | < | ||
+ | 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 | ||
+ | </ | ||
+ | So Capability S and I means the Switch can be a Switch and use IGMP. | ||
+ | \\ | ||
+ | \\ | ||
+ | Platform - This is the detected Switch Model (WS-C2960-) | ||
+ | \\ | ||
+ | \\ | ||
+ | Port ID is the interface of the Neighbour switch that is connected to this switch. | ||
+ | \\ | ||
+ | \\ | ||
+ | ==== CDP Neighbors Detail ==== | ||
+ | This command gives a more expansive set of information than "sh cdp neighbor" | ||
+ | < | ||
+ | sh cdp neighbor detail | ||
+ | ------------------------- | ||
+ | Device ID: Switch | ||
+ | Entry address(es): | ||
+ | Platform: cisco WS-C2960-48TC-L, | ||
+ | Interface: GigabitEthernet0/ | ||
+ | Holdtime : 159 sec | ||
+ | Version : | ||
+ | Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), | ||
+ | Technical Support: http:// | ||
+ | Copyright (c) 1986-2013 by Cisco Systems, Inc. | ||
+ | Compiled Mon 28-Jan-13 10:22 by prod_rel_team | ||
+ | |||
+ | advertisement version: 2 | ||
+ | Protocol Hello: | ||
+ | VTP Management Domain: '' | ||
+ | Native VLAN: 10 | ||
+ | Duplex: full | ||
+ | Management address(es): | ||
+ | |||
+ | ------------------------- | ||
+ | Device ID: Rack4Control | ||
+ | Entry address(es): | ||
+ | IP address: 192.168.200.128 | ||
+ | Platform: cisco WS-C2960-48TC-L, | ||
+ | Interface: GigabitEthernet0/ | ||
+ | Holdtime : 175 sec | ||
+ | |||
+ | Version : | ||
+ | Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), | ||
+ | Technical Support: http:// | ||
+ | Copyright (c) 1986-2013 by Cisco Systems, Inc. | ||
+ | Compiled Mon 28-Jan-13 10:22 by prod_rel_team | ||
+ | |||
+ | advertisement version: 2 | ||
+ | Protocol Hello: | ||
+ | VTP Management Domain: '' | ||
+ | Native VLAN: 1 (Mismatch) | ||
+ | Duplex: full | ||
+ | Management address(es): | ||
+ | IP address: 192.168.200.128 | ||
+ | </ | ||
+ | \\ | ||
+ | It is easy to see that there is much more detail about our neighbors here. | ||
+ | \\ | ||
+ | \\ | ||
+ | ==== Show CDP Interface ==== | ||
+ | This gives some basic CDP information for every interface in your switch. | ||
+ | < | ||
+ | sh cdp interface | ||
+ | FastEthernet0 is down, line protocol is down | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet0/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet1/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet1/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet1/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | GigabitEthernet1/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | TenGigabitEthernet1/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | TenGigabitEthernet1/ | ||
+ | Encapsulation ARPA | ||
+ | Sending CDP packets every 60 seconds | ||
+ | Holdtime is 180 seconds | ||
+ | </ | ||
+ | \\ | ||
+ | \\ |
cisco_discovery_protocol_cdp.1705675201.txt.gz · Last modified: 2024/01/19 14:40 by walkeradmin