CDP & LLDP
Synchronized Transcript
170 cues indexed • Click dialogue or words to jumpWelcome to Jeremy's IT Lab this is a free complete course for the CCNA if you like these videos please subscribe to follow along with the series also please like and leave a comment and share the video to help spread this free series of videos thanks for your help in this.
Video we will cover two layer 2 Discovery protocols CDP and LLDP you might not have heard of a layer 2 Discovery protocol before.
But I'll EXP explain what they are in this video CDP and llddp are exam topic 2.3 which says You must be able to configure and verify layer 2 Discovery protocols CDP and CDP and LLDP CDP and llddp are important topics.
For the CCNA but there's not as much information to absorb compared to topics like ACLS IPv6 and OPF so hopefully this video will be a little easier to get through.
Here's what we'll cover in this video first I'll give a brief overview of layer 2 Discovery protocols then I'll cover Cisco Discovery protocol Discovery protocol CDP.
Finally I'll cover link layer Discovery protocol llddp CDP and llddp are very similar in terms of function and configuration but there are some key differences.
Watch until the end of today's video for a bonus practice question from Bon software's xim for CCNA CCNA XM simulates the style and difficulty of the real CCNA exam better than any other practice exams and I highly recommend xim to anyone preparing for the CCNA.
Let's get started with a brief intro to layer 2 Discovery protocols layer 2 Discovery protocols such as CDP and LLDP share information with and discover information about neighboring connected devices they are called layer 2 Discovery protocols.
Because the protocols themselves operate at layer 2 they don't use IP addresses we'll look at some wire shark captures later and you'll see that there are no IP packets inside of the frames sent by CDP and LLDP although they are layer 2 Discovery protocols they can be.
Used to share layer three information such as IP addresses addresses 2 the shared information includes host name IP address device type Etc CD p is a Cisco proprietary protocol developed by Cisco for Cisco.
Devices llddp is an industry standard protocol I e 802.1 AB so if your network uses only Cisco devices CDP is fine however.
If there is a mix of vendors for example Cisco routers Juniper switches and poo Alto firewalls you will have to use LLDP if you want to use a layer 2 Discovery protocol in your network Network however.
Because these protocols share information about the devices in the network they can be considered a security risk and are often not used it's up to the network engineer or admin to decide.
If they want to use them in the network or not at my workplace for example we always disable these protocols but I'm sure many networks make use of them to demonstrate how these protocols work here are two devices R1 and switch one directly connected R1 will periodically send.
Frames to switch one telling it information like r1's host name device type interface ID IP address Etc switch 1 will do the same periodically sending frames to frames to R1 note that switch one doesn't include an IP address in the information.
It sends to R1 because it's a switch its interface doesn't have an IP address so let's move on to talk about CDP specifically to repeat CDP is a Cisco proprietary protocol it is enabled on Cisco devices by default.
For example Cisco routers Cisco switches Cisco firewalls Cisco IP phones Etc all of these devices have CDP enabled by default CDP messages are periodically sent to multicast MAC address 0100 0 CCC cccc.
Remember that MAC address it will be in the flashcards I know the MAC MAC addresses used by different protocols such as CDP STP PVST HSRP VRRP Etc are difficult to memorize the eny flashcards are very helpful.
For this you can add a specific tag to these MAC address cards and use the tag to review those specific cards whenever you want this will help you.
Remember all of these MAC addresses and which is used for which protocol anyway if you want to learn Anki functions like that do a Google search let's continue with CDP.
Because the messages use a multicast MAC address you might think the message is forwarded to multiple devices but it isn't when a device receives a CDP message it processes and discards the message it does not forward it to other devices.
So only directly connected neighbors can become CDP neighbors by default CDP messages are sent once every 60 seconds out of all interfaces which are in an up state these are the messages that contain the information like host name IP address Etc.
That I summarized in the previous slide when a device receives these CDP messages from a neighboring device it adds an entry for the device in its CDP neighbor table.
If a neighbor is disconnected there is a default CDP hold time of 180 seconds so if a message isn't received from a neighbor for 180 seconds the neighbor is removed from the CDP neighbor neighbor table this makes sure the CDP neighbor table doesn't have entries from old neighbors which.
Used to be connected but no longer are CDP version 2 messages are sent by default there are two versions of CDP version one and version two.
But version two is used by default CDP version one is very old so you'll probably never need to use it you don't need to know the differences between version one and version two.
But basically version two provides a few more advanced features like the ability to identify native VLAN mismatches okay let's get right into the CLI to.
See exactly what information is shared by CDP to demonstrate CDP as well as LLDP later I'll use this network two routers and two multi-layer switches although I'm not using any layer 3 functions on the the switches before looking at the CDP neighbor table.
Here are a few other basic CDP show commands show CDP tells us the CDP timer 60 seconds by default the CDP hold time 180 seconds by default and it also shows which version of CDP is being used version two by default note that.
If CDP isn't enabled on the device you'll get a message like this when you try to use the show CDP command CDP is not enabled.
Okay next I use the command show CDP traffic this command tells us how many CDP packets how many CDP advertisements the device has sent and received at the time that I used this command R1 had sent 105 CDP messages and.
Received 112 CDP messages and all of those messages were CDP version 2 messages finally you can use the show CDP interface command which gives some basic information about each interface you can also specify a certain interface.
When entering the command but if you just enter show CDP interface you'll get information about all interfaces here you can see the info for g0000 you can.
See the same CDP message timer and hold time as above but what does encapsulation arpa mean arpa is actually a type of Ethernet encapsulation I haven't talked about the different types of Ethernet in this course I'm pretty sure.
That's beyond the scope of the CCNA but I just wanted to point that out because I'm sure some of you would be wondering about it this type of Ethernet is also known as Ethernet 2.
So if you want to learn more try a Google search for Ethernet 2 okay finally down here you can see a basic summary of how many interfaces are CDP enabled and how many interfaces are in an up State and a down state.
So remember these three commands show CDP show CDP traffic and show CDP interface finally let's look at the CDP neighbor table here it is on R1 I used the command show CDP neighbors to view it.
Let's look at what you can learn from this this command first the device ID column list the host name of each of r1's CDP neighbors.
So R1 has received CDP messages from switch 1 and R2 next is the local interface column this States the interface on the local device on R1.
So if we didn't have a proper Network diagram and wanted to know which devices are connected to which interface on R1 we can use this command switch 1 is connected to r1's g0000 interface and R2 is connected to r1's g01 interface as shown in the.
Network diagram below next is the hold time column this will reset to 180 each time R1 receives a CDP message from the neighbor with the default timers it should count down to 120 then R1 will receive a CDP message and reset.
It to 180 180 and that cycle will repeat if this timer reaches zero the neighbor will be removed from the CDP neighbor table next is the capability column this helps you identify what kind of device you are connected to.
For example switch one has the letters r s and I what do these codes mean you can check up here first off.
Let me point out that I means igmp this is related to multicast and is beyond the CCNA don't worry about it for.
Now then R means router and s means switch switch is obvious switch one is a switch but why router it's because.
This is a multi-layer switch so it has routing capabilities that's why it's listed as both a router and a switch.
Now how about R2 it has R and B in its capability column once again R stands for router which is expected because R2 is a router and b means Source route bridge.
This is another thing that isn't necessary for the CCNA so don't worry about memorizing it so I recommend just remembering R for router and S for switch.
Next is the platform column this displays the model of the neighboring device as you know Cisco has various models of routers switches firewalls Etc and the model will be displayed here however for for these lessons I use Virtual devices running in gns3 and.
As you can see nothing is displayed here since they aren't physical physical devices so let's refer to Packet Tracer which actually does display information here.
For example in the Packet Tracer Network I made R1 was connected to a c2900 series router R2 and a catalyst 2960 series switch switch one.
Okay last column is Port ID this tells you the Port ID on the neighboring device so R1 is connected to switch 1's g0000 interface and r2's g0000 interface make sure you know the difference between the local interface field the interface.
On this device and the port ID field the interface on the neighboring neighboring device okay those are all of the fields of show CDP neighbors.
But there is more information you can learn via CDP to view that additional information you can use this command show CDP neighbors neighbors detail as you can.
See more information is displayed for each neighbor for example here's switch 1's entry some of the information you can see here that you couldn't see with the Regular Show CDP neighbors command is the software version the version of IOS running on the neighbor device.
Because switch one is a switch you can also see VTP information here this is something CDP can do but llddp can't can't VTP is a Cisco proprietary protocol.
So only Cisco CDP can share information about it you can also see the native vline of switch 1's interface currently it's the default of one the duplex setting of switch 1's interface is displayed also.
So with these last two Fields CDP helps identify any mismatches of native VLAN or interface interface duplex actually.
If a mismatch is found CDP will display messages on the device to let you know next here's r2's entry I just wanted to point out that you can.
See r2's IP address here 10.0.2 switch one doesn't have any IP addresses so none were displayed above but the show CDP neighbors detail command lets you view the neighbors IP address.
Now if the device has a lot of CDP neighbors the output of this command can get quite long however there is another command which lets you this detailed information for just a single neighbor that is this command show CDP entry followed by the neighbor's host name.
I used R2 in this case the output here is exactly the same as in show CDP neighbors detail but it only shows the specified specified neighbor.
Here's a brief summary of each of the commands I just showed you I want to go over them individually feel free to pause the video here if you want to review them.
Because CDP is enabled by default if you want to use CDP in your network you don't have to do any configuration you can just use these show show commands.
But now let's take a look at some basic CDP configurations as I just said CDP is globally enabled by default Cisco devices have CDP activated by default each interface also has CDP enabled by default.
If you want to enable or disable CDP globally use the CDP run command command from Global config mode use CDP run to enable it which is default or no CDP run to disable it to enable CDP on an interface which is the default State.
Use CDP enable and use no in front of the command to disable it these commands are done from interface config mode you can configure the CDP timer how often CDP messages are sent with the CDP timer command from Global config mode you can also.
Configure the hold time with CDP hold time and you can enable CDP version 2 which is the default state with CDP advertise V2 or use no in front of the command to disable it and use version one you'll probably never use that last command.
But I included it anyway so these are the CDP configuration commands you should know for the CCNA CDP run CDP enable CDP timer CDP hold time and CDP advertise V2.
Finally let's move on to LLDP link layer Discovery protocol LLDP is an industry standard protocol so many different vendors implement it on their devices CDP was the original and llddp was later invented to have an industry Standard Standard Version.
It is usually disabled on Cisco devices by default so it must be manually manually enabled a device can run CDP and llddp at the same time.
So you don't have to choose between them although usually you'll just use one here's another MAC address to remember llddp messages are periodically sent to multicast MAC address address 0180 0180 c200 e again use the flash cards to.
Remember that one this is the same as for CDP when a device receives an LLDP message it processes and discards the message it does not forward it to other devices.
So only directly connected devices can become llddp neighbors by default llddp messages are sent once every 30 seconds.
This is half the time of CDP's default 60 seconds ldp's default hold time is 120 seconds llddp also has an additional timer called the reinitialization delay I don't think you need to know this for the CCNA.
But here's a very brief explanation if LLDP is enabled either globally or on a specific interface this timer will delay the actual initialization of llddp and the timer is 2 seconds by default I believe the purpose of this timer is to help in cases of flapping.
When LLDP is rapidly enabled or disabled for some reason so the device won't send llddp messages out of its interfaces immediately when llddp is enabled it will wait for the initialization timer to expire as I said you probably don't have to know that for the CCNA.
But you'll see that timer in the output of the commands I'm going to show you so I wanted to give a brief explanation because llddp is disabled by default before checking out the show commands.
Let's see the configuration commands you should know for LLDP to review llddp is usually globally disabled by default and it's also disabled on each interface by default.
So to enable llddp you need to enable it globally and then enable it on each each interface you'll see that the interface configuration is a little different than CDP to enable it globally use llddp run.
This is the same as CDP just replace the word CDP with llddp if you want to disable it again after use no in front of the command.
Now the interface configurations to enable llddp Transmissions TX on an interface use l L LP transmit on the interface this causes the interface to start sending llddp messages however it won't receive llddp messages it will.
Simply discard them to enable llddp in the receive Direction RX use the llddp receive command on the interface so CDP had only one command CDP enable which enables the interface to both send and receive CDP messages in LLDP you need to use two.
Separate Comm commands but still the configuration is quite simple now let's see how to configure each LLDP timer the timer used to send messages is configured with llddp timer than the timer in seconds the llddp hold time is configured with llddp.
Hold time then the hold time in seconds finally you can configure the llddp reinitialization timer which I briefly mentioned earlier with llddp reinit than the timer in seconds.
So these commands are all fairly similar to the CDP commands the biggest difference is the interface configuration make sure you enable both transmit and receive unless for some reason you want the interface to only be able to send or receive not send and receive.
LLDP messages so I've enabled LLDP on all of these devices with the command LLDP run from Global config mode and LLDP transmit and receive on all interfaces they are.
Now running both CDP and and LLDP usually LLDP would be used in a multivendor network not just Cisco but this setup is good enough for our purposes to demonstrate how llddp works on Cisco devices.
So let's check out some llddp show commands the llddp versions of the ones I used for CDP first show llddp gives the same information as show CDP does for CDP it shows that llddp is enabled and displays each of the LLDP timers which.
Are currently at the default settings of 30 120 and 2 seconds then show LLDP traffic similar to show CDP traffic shows statistics about how many llddp frames were sent and received in this case I use the command quickly after enabling llddp.
Only four frames have been sent and only three have been received by R1 then I used show LLDP interface this shows whether transmit and receive are enabled or disabled on each interface as well as the current TX and RX state.
For example for g0000 both TX and RX are enabled the TX state is Idle it's waiting before it sends the next LLDP frame to switch one and the RX state is wait for frame it's waiting to receive the.
Next llddp frame from switch one okay so those commands are very similar to their CDP equivalents although there are some differences in the output.
Now let's check out r1's LLDP neighbor neighbor table here's r1's llddp neighbor table the command is show llddp Neighbors.
First up the device ID the host name of each neighbor is displayed then the local interface just like in show CDP neighbors.
This is the interface of the local device R1 in this case then the hold time this is a little different than in Show CDP Neighbors in show CDP neighbors you could.
Watch the timer count down from 180 and then reset to 180 when a CDP message is received however show llddp neighbors simply displays the hold time that is configured on this device 120 seconds it won't count down as R1 waits for an llddp message from each neighbor.
Then the capability column the output here is a little odd switch one shows nothing and R2 shows r R means router which you would expect from R2.
Because it's a router however why doesn't the switch capability display for switch for switch one actually there is no switch capability code instead LLDP uses B for bridge.
Remember I told you in the spanning tree lessons that sometimes the word bridge is used instead of switch well here's another case of that however B isn't displaying for switch one I think.
This is just because I'm running these virtual devices in gns3 it isn't detecting that switch one is an active switch but in the next slide when we.
Look at show llddp neighbors detail you will see this bridge code for switch one okay and just like in show CDP neighbors the last column is the port ID the interface ID of the neighboring device R1 is connected to switch 1's g0000 interface and r2's g0000.
Interface so this command is very similar to show CDP neighbors but there are are a few differences okay here's show llddp neighbors detail on R1 the output is too long to show on one screen.
So r2's entry is cut off a little at the bottom let's check out switch one's entry it gives us additional information like the operating system version running on switch one we can also.
See the time remaining this is the hold time if you want to actually see it counting down for each neighbor you have to use the detail version of the command and here is the main thing I want to show you CDP had one field for the devices capabilities.
But LLDP has two when you use show llddp neighbors detail system capabilities and enabled capabilities if you.
Look at system capabilities you can see B and R B is for bridge meaning switch and R is for router so this is what you would expect.
Because switch one is a multi-layer switch it has the functions of both a router and a switch however in this case the enabled capabilities field simply displays not advertised.
So none of switch one's capabilities are enabled if we use the IP routing command on switch one switch 1's router functionality will be enabled and the r from system capabilities will be copied to enabled capabilities however I think the reason B isn't displayed.
Next to enabled capabilities is simply because switch one is a virtual device running in gns3 it's not recognized as an active switch you don't have to worry about these details.
But I just wanted to explain why it's displaying like this note that this command doesn't display VTP information like show CDP neighbors detail did VTP is a Cisco proprietary protocol.
So only Cisco's proprietary CDP can display info about VTP the industry standard llddp can't.
Okay just like for CDP there's a command you can use to view the exact same output as show llddp neighbors detail but for a single neighbor instead of all neighbors that command is show LLDP entry followed by the neighbor's host name by the way before using this.
Command I enabled IP routing on switch one and now you can see R for router is displayed next to enabled capabilities for switch one.
Here's the same show command summary as before but this time for LLDP the commands are the same just replace the word CDP with LLDP the output for these commands is similar to the output for CDP.
But as you saw already there are a few differences pause the video if you want to review these commands but let's move on let's briefly look at a couple wire shark captures one for CDP and one for llddp.
First this this is a CDP message sent from R1 to switch 1 notice the CDP destination MAC address 010 0 CCC cccc.
But notice that wi shark describes this destination MAC as CDP slvp DTP SL PAgP SL UDLD.
That's because this same multicast MAC address is actually used for multiple protocols not just CDP now here's the actual CDP information you can.
See here that CDP version 2 is being used the TTL time to live is actually the CDP hold time here are some other fields such as the device ID.
This is being sent from R1 the version platform addresses and Port ID I could expand each of these fields in wire shark to view more details.
But then the capture wouldn't fit on one screen so I just expanded the capability field and you can see there is a one for router and Source route Bridge those are the capabilities of R1.
Finally notice that there is no IP packet inside of this Ethernet frame these layer 2 Discovery protocols don't use IP addresses only MAC addresses and.
Here's an llddp frame capture this time a message that switch one sent to R1 first up here's the destination MAC address I showed you earlier 0180 c2000 c2000 00e and.
Here's the actual LLDP information the time to live TTL is the LLDP hold time of 120 seconds and you can.
See the system name the host name of the device which sent this message switch switch one here's the LLDP capabilities field just like we saw before switch one's capabilities are bridge and router.
But its only enabled capability is router okay you don't have to look into these captures into too much detail I just wanted to show you some real examples of CDP and llddp messages before moving on to the quiz.
Let's review what we studied in today's video first I gave a brief intro to layer 2 Discovery protocols and their purpose basically they enable directly connected neighbors to share various information with each other such as host name device type IP address software.
Version version Etc they can be very useful and convenient but remember that they can also be considered a security risk because of the information they share with connected devices.
So many Network admins choose to disable them in their networks then I introduced CDP Cisco's layer 2 Discovery protocol after that I introduced llddp which was developed after CDP as an industry standard alternative LLDP is supported by many vendors.
So if your network uses a mix of Cisco Juniper poo Alto fortunet whatever you'll have to use LLDP not CDP make sure to watch until the end of the quiz for a bonus question from Bon software's xim for CCNA the best practice exams for the CCNA.
And the practice exams I used to prepare for my CCNA CCNA exam okay let's move on to the quiz here's question one which of the following commands show the configured CDP timers select two a show CDP B show CDP traffic C show.
CDP interface or D show CDP neighbors pause the video to think about your answers select two the answers are A and C both of these commands show the configured CDP message time and hold time D.
Show CDP neighbors does show the current hold time counting down as the device waits for a CDP message from its neighbor but it doesn't show the actual configured hold time it also doesn't display the CDP message timer.
So it's not one of the best best answers okay let's go to question two which of the following commands represent the default CDP State select two a no CDP run B CDP holdtime 120 C CDP enable from interface config.
Mode or D CDP timer 60 pause the video to think about your answers select two the answers are C and D CDP enable enables CDP on an interface which is the default State D sets the.
CDP message timer to 60 seconds which is the default a no CDP run disables CDP on the router and that is not the default State CDP is enabled by default B CDP hold time 120 sets the hold time to 120 seconds which is.
Not the default the default CDP hold time is 180 seconds so A and B are incorrect let's go to question three you issue the show LLDP entry switch one command on R1 r1's neighbor switch one is a multi-layer switch what do you expect to.
See in the system capabilities field of the output here are the options pause the video to think about your answer the answer is B system capabilities BR r b is for bridge which is.
Another word for switch R is for router because switch one is a multi-layer switch it has the functionalities of both a switch and a router S as shown in options c and d means switch in CDP.
But it does not mean switch in switch in llddp okay let's go to question four which of the following statements about llddp are true select two here are the options pause the video.
Now read each option and select the two correct choices okay the correct answers are B and F.
When configuring LLDP unlike CDP you must enable transmit TX and receive RX separately on each interface.
So B is correct and LLP can be used to learn the OS version of a neighboring device so f is also correct the other options are incorrect statements about LLDP llddp is an industry standard protocol.
So a is incorrect its default message timer is 30 seconds so C is incorrect it can't be used to learn the OPF settings of a neighbor.
So D is incorrect and it can't be used to learn the VTP settings of a neighbor although CDP can be used to do that so e is incorrect.
Okay let's go to question five which interface on R 2 is switch to connected to is it g0000 g01 g02 or g03 pause the video to examine r2's CDP neighbor table and.
Select the correct answer is g01 it is shown here in the local interface column of the output this shows the interface on R2 that switch to is connected to.
Okay that's all for the quiz now let's try a bonus question from Bon software's XM for CCNA okay here's today's Bon xim practice practice question you issue the following command on your router show CDP Neighbors which of the following information.
Will be displayed select four choices a the IP address of the neighboring device B the interface on the neighboring device that is connected to router a c the device ID of the neighboring device D the software version running on.
The neighboring device e the interface on router a that is connected to the neighboring device or F the capabilities and product number of the neighboring device.
Okay pause the video now to think about your answer select four choices okay let's check let's go through one by one and.
See which answers are correct so a the IP address of the neighboring neighboring device I think that is not displayed by show CDP neighbors to view that you have to use show CDP neighbors detail.
So a is not not correct B the interface on the neighboring device that is connected to router a that is correct you can see that with show CDP neighbors C the device ID of the neighboring device you can also.
See that that is the host name of the neighboring device device D the software version running on the neighboring neighboring device I think you cannot.
See that in show CDP neighbors once again you have to use show CDP neighbors detail to view the software version the operating system version of the neighboring device.
Okay e the interface on router a that is connected to the neighboring device you can see that with show CDP neighbors and how about F the capabilities which is like router switch Etc and product number.
This is the model of the device of the neighboring device and yes you can so I think these are the four choices you cannot.
See the IP address of the neighboring device or the software version of the neighboring device to view those two you have to use show CDP neighbors detail.
Okay so to check my answer I will click down here show answer and that is correct so here is Ban's explanation I'll scroll through it you can pause the video to read their explanation and I really recommend you do ban gives great.
Explanations not just why each correct answer is correct but also why each incorrect answer is incorrect so they are a great resource to improve your understanding.
Okay and at the bottom there are a few references to the official C guide by Wendel Odum this is a great book for studying for the the CCNA and also some Cisco documentation about CDP which is free to read online.
Okay so that's ban xim for the CCNA if you want to get exim please follow the link in the video description these are by far the best practice exams for the CCNA once again follow that link in the video description there.
Are supplementary materials for this video there is a flash card deck to use with the software eny there will also be a Packet Tracer practice lab.
So you can get some Hands-On practice that will be in the next video sign up for my mailing list via the link in the description and I'll send you all of the flashcards and Packet Tracer lab files for the course before finishing today's video I want to thank my jcmp level channel members.
To join please click the join button under the video thank you to Mia samil Erin junong unj Benjamin tapiso Justin prash nir erison apy Marco daming Joshua jilmar Ed value John funny Dart velv jacum SE mode.
Mark Yousef ban software Devin Leto yonathan and Vance sorry if I pronounced your name incorrectly but thank you so much for your support.
This is the list of jcmp level members at the time of recording by the way December 13th 2020 if you signed up recently and your name isn't on here don't worry you'll be in future videos thank you for watching please subscribe to the channel like the video leave a comment and share.
The video with anyone else studying for the CCNA if you want to leave a tip check the links in the description I'm also a brave verified publisher and accept bat or basic attention token tips via the brave browser.
That's all for now.