cisco_discovery_protocol_cdp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
cisco_discovery_protocol_cdp [2024/01/19 14:40] – [CDP Neighbors] walkeradmincisco_discovery_protocol_cdp [2024/01/19 14:56] (current) – [CDP Neighbors Detail] walkeradmin
Line 12: Line 12:
 \\  \\ 
 \\  \\ 
 +<file>
 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.
 +</file>
 \\  \\ 
 ---- ----
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 94: Line 95:
   Rack4Control     Gig 0/2           152              S I   WS-C2960- Fas 0/2   Rack4Control     Gig 0/2           152              S I   WS-C2960- Fas 0/2
 \\  \\ 
 +Look at the diagram below, this is what we have physically:
 +\\ 
 +\\ 
 +{{ ::cdp_001.png?900 |}}
 +\\ 
 +Device ID        Local Intrfce     Holdtme    Capability  Platform  Port ID
 +\\ 
 +Switch           Gig 0/1           135              S I   WS-C2960- Fas 0/1
 +\\ 
 +Rack4Control     Gig 0/2           152              S I   WS-C2960- Fas 0/2
 +\\ 
 +\\ 
 +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     Holdtme    Capability  Platform  Port ID
 +Switch           Gig 0/1           135              S I   WS-C2960- Fas 0/1
 +\\ 
 +\\ 
 +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:
 +<file>
 +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
 +</file>
 +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"
 +<file>
 +sh cdp neighbor detail
  
 +-------------------------
 +Device ID: Switch
 +Entry address(es):
 +Platform: cisco WS-C2960-48TC-L,  Capabilities: Switch IGMP
 +Interface: GigabitEthernet0/1,  Port ID (outgoing port): FastEthernet0/1
 +Holdtime : 159 sec
  
 +Version :
 +Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(55)SE7, RELEASE SOFTWARE (fc1)
 +Technical Support: http://www.cisco.com/techsupport
 +Copyright (c) 1986-2013 by Cisco Systems, Inc.
 +Compiled Mon 28-Jan-13 10:22 by prod_rel_team
 +
 +advertisement version: 2
 +Protocol Hello:  OUI=0x00000C, Protocol ID=0x0112; payload len=27, value=00000000FFFFFFFF010221FF0000000000001CDEA7556980FF0000
 +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,  Capabilities: Switch IGMP
 +Interface: GigabitEthernet0/2,  Port ID (outgoing port): FastEthernet0/2
 +Holdtime : 175 sec
 +
 +Version :
 +Cisco IOS Software, C2960 Software (C2960-LANBASEK9-M), Version 12.2(55)SE7, RELEASE SOFTWARE (fc1)
 +Technical Support: http://www.cisco.com/techsupport
 +Copyright (c) 1986-2013 by Cisco Systems, Inc.
 +Compiled Mon 28-Jan-13 10:22 by prod_rel_team
 +
 +advertisement version: 2
 +Protocol Hello:  OUI=0x00000C, Protocol ID=0x0112; payload len=27, value=00000000FFFFFFFF010221FF0000000000001CDEA7556B80FF0000
 +VTP Management Domain: ''
 +Native VLAN: 1 (Mismatch)
 +Duplex: full
 +Management address(es):
 +  IP address: 192.168.200.128
 +</file>
 +\\ 
 +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.
 +<file>
 +sh cdp interface
 +FastEthernet0 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/1 is up, line protocol is up
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/2 is up, line protocol is up
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/3 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/4 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/5 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/6 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/7 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/8 is up, line protocol is up
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/9 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/10 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/11 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/12 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/13 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/14 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/15 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/16 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/17 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/18 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/19 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/20 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/21 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/22 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/23 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/24 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/25 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/26 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/27 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/28 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/29 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/30 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/31 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/32 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/33 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/34 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/35 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/36 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/37 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/38 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/39 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/40 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/41 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/42 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/43 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/44 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/45 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/46 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/47 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet0/48 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet1/1 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet1/2 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet1/3 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +GigabitEthernet1/4 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +TenGigabitEthernet1/1 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +TenGigabitEthernet1/2 is down, line protocol is down
 +  Encapsulation ARPA
 +  Sending CDP packets every 60 seconds
 +  Holdtime is 180 seconds
 +</file>
 +\\ 
 +\\ 
cisco_discovery_protocol_cdp.1705675209.txt.gz · Last modified: 2024/01/19 14:40 by walkeradmin