1
00:00:00,000 --> 00:00:07,000
On switch 2 show cdp neighbor, sh cdp neighbors

2
00:00:07,000 --> 00:00:13,000
shows me my various neighbors as an example, I can see switch 1

3
00:00:13,000 --> 00:00:20,000
in the table as well as router 3, so on router 3 sh cdp neighbors

4
00:00:20,000 --> 00:00:25,000
allows me to see my neighboring devices.

5
00:00:25,000 --> 00:00:27,000
I can also use option such as interface.

6
00:00:27,000 --> 00:00:34,000
And then see settings for that interface.

7
00:00:34,000 --> 00:00:42,000
So F0/0 I can see that CDP is sent every 60 seconds, holdtimer is 180 seconds.

8
00:00:42,000 --> 00:00:56,000
if I disable CDP on F0/1 and then type sh cdp in f0/1

9
00:00:56,000 --> 00:00:59,000
I can see that there are no values for CDP on that interface.

10
00:00:59,000 --> 00:01:10,000
but there are values on F0/0, so I'll enable CDP on F0/1 again

11
00:01:10,000 --> 00:01:14,000
and now when we look at CDP on that interface

12
00:01:14,000 --> 00:01:18,000
we can see the default is 60 seconds for hellos

13
00:01:18,000 --> 00:01:21,000
and holdtime is 180 seconds

14
00:01:21,000 --> 00:01:26,000
and that’s because I enabled CDP on the interface

15
00:01:26,000 --> 00:01:33,000
I could as an example, enable logging of mismatches in CDP.

16
00:01:33,000 --> 00:01:38,000
So as an example, I could get duplex mismatches

17
00:01:38,000 --> 00:01:42,000
shown in log messages on that interface if I wanted to.

18
00:01:42,000 --> 00:01:49,000
I can also change the holdtime from the default of 180 seconds

19
00:01:49,000 --> 00:01:59,000
I can also change the hello rate which is 60 seconds by default.

20
00:01:59,000 --> 00:02:01,000
So once again do sh cdp

21
00:02:01,000 --> 00:02:05,000
shows me those default values and then I can use commands

22
00:02:05,000 --> 00:02:13,000
such as CDP timer or CDP holdtime to change the advertisements

23
00:02:13,000 --> 00:02:15,000
and holdtime of messages

24
00:02:15,000 --> 00:02:20,000
Now there are other options in the sh cdp command.

25
00:02:20,000 --> 00:02:26,000
sh cdp entry shows me that I need to either specify an individual neighbor

26
00:02:26,000 --> 00:02:31,000
or specify star to  show me information about all neighbors.

27
00:02:31,000 --> 00:02:36,000
so sh cdp entry * shows me all my neighboring devices

28
00:02:36,000 --> 00:02:46,000
such as the core 3750 switch  as well as router 3 and switch 2.

29
00:02:46,000 --> 00:02:52,000
I could as an example, just look at the output of a specific neighbor.

30
00:02:52,000 --> 00:02:58,000
So sh cdp  entry switch 2 only shows me information for switch 2.

31
00:02:58,000 --> 00:03:03,000
This is case sensitive so notice switch 2 with the lower case s

32
00:03:03,000 --> 00:03:07,000
doesn’t work but S2 when  the upper case S does.

33
00:03:07,000 --> 00:03:11,000
And that shows me the information about that neighboring switch

34
00:03:11,000 --> 00:03:14,000
including things like its IP address, its  capabilities

35
00:03:14,000 --> 00:03:18,000
the local interface that I’m using to get to that neighbor

36
00:03:18,000 --> 00:03:22,000
the interface that it's using as its outgoing interface.

37
00:03:22,000 --> 00:03:26,000
the holdtime to that neighbor, do the command again.

38
00:03:26,000 --> 00:03:31,000
Notice its been refreshed but is counting down at the moment

39
00:03:31,000 --> 00:03:37,000
I can see the  operating system used, I can see native VLAN duplex

40
00:03:37,000 --> 00:03:44,000
and CDP advertisement version as well as the VTP management domain configured.

41
00:03:44,000 --> 00:03:49,000
so * shows me all devices

42
00:03:49,000 --> 00:03:55,000
let’s have a look at this core 3750 entry alone

43
00:03:55,000 --> 00:03:59,000
I can see similar information about that physical switch

44
00:03:59,000 --> 00:04:01,000
including its operating system

45
00:04:01,000 --> 00:04:06,000
port that is using to connect to the local GNS3gns3 router and so forth.

46
00:04:06,000 --> 00:04:08,000
sh cdp traffic

47
00:04:08,000 --> 00:04:11,000
allows me to see statistics

48
00:04:11,000 --> 00:04:17,000
so I can see packets output, packets input, I can see version 1 advertisements sent

49
00:04:17,000 --> 00:04:22,000
and received as well as version 2 advertisements sent and received.
