On switch 2 show cdp neighbor, sh cdp neighbors
shows me my various neighbors as an example, I can see switch 1
in the table as well as router 3, so on router 3 sh cdp neighbors
allows me to see my neighboring devices.
I can also use option such as interface.
And then see settings for that interface.
So F0/0 I can see that CDP is sent every 60 seconds, holdtimer is 180 seconds.
if I disable CDP on F0/1 and then type sh cdp in f0/1
I can see that there are no values for CDP on that interface.
but there are values on F0/0, so I'll enable CDP on F0/1 again
and now when we look at CDP on that interface
we can see the default is 60 seconds for hellos
and holdtime is 180 seconds
and that’s because I enabled CDP on the interface
I could as an example, enable logging of mismatches in CDP.
So as an example, I could get duplex mismatches
shown in log messages on that interface if I wanted to.
I can also change the holdtime from the default of 180 seconds
I can also change the hello rate which is 60 seconds by default.
So once again do sh cdp
shows me those default values and then I can use commands
such as CDP timer or CDP holdtime to change the advertisements
and holdtime of messages
Now there are other options in the sh cdp command.
sh cdp entry shows me that I need to either specify an individual neighbor
or specify star to show me information about all neighbors.
so sh cdp entry * shows me all my neighboring devices
such as the core 3750 switch as well as router 3 and switch 2.
I could as an example, just look at the output of a specific neighbor.
So sh cdp entry switch 2 only shows me information for switch 2.
This is case sensitive so notice switch 2 with the lower case s
doesn’t work but S2 when the upper case S does.
And that shows me the information about that neighboring switch
including things like its IP address, its capabilities
the local interface that I’m using to get to that neighbor
the interface that it's using as its outgoing interface.
the holdtime to that neighbor, do the command again.
Notice its been refreshed but is counting down at the moment
I can see the operating system used, I can see native VLAN duplex
and CDP advertisement version as well as the VTP management domain configured.
so * shows me all devices
let’s have a look at this core 3750 entry alone
I can see similar information about that physical switch
including its operating system
port that is using to connect to the local GNS3gns3 router and so forth.
sh cdp traffic
allows me to see statistics
so I can see packets output, packets input, I can see version 1 advertisements sent
and received as well as version 2 advertisements sent and received.