Hi, welcome to CertificationKits CCNA Training video on Telnet and CDP.  We are going to be talking about the telnet and the Cisco Discovery Protocol.  As far as telnet goes, we are going to be talking about just telnetting from the router; not telnetting into the router.  So this is strictly managing telnet from inside the router and telnetting to other devices. How do we initiate that telnet session to another device, suspending telnet sessions, managing telnet sessions and how do we end telnet sessions.  And not only telnet sessions that we have initiated from the router, but also outside telnet sessions that have telnetted into the router.  After telnet, we are going to be talking about Cisco Discovery Protocol and how we use Cisco Discovery Protocol and what it’s for.  As well as enabling and disabling the Cisco Discovery Protocol.

In my CCNA simulator, I have set up two routers in a back-to-back connection; Palaestra1 and Palaestra2.  I have full connectivity; I have set the IPs; I can ping back and forth, and I have set some passwords.  So let’s take a look at connecting to Palaestra1 and then going and telnetting to Palaestra to router.  I get into user mode or privilege, and all I have to do to type to the other device or to telnet to the other device is type telnet 192.168.1.2.  This just happens to be the IP address of Palaestra2.  Again, I just want to put the IP address of the device I am trying to telnet to.  This is telnetting from the router, again not telnetting to it.

So I type in telnet, the IP, hit Enter and I have connected to Palaestra2.  Now to be able to do this, there has to be a password on Palaestra2, underline vty 0 4.  If I were to try to telnet in to this device, which I have just done successfully, and there was no password here, what would happen is you would get an error saying password required but none set.  By default, the Cisco routers are not going to let anyone telnet in unless there has been a password set.  It’s a security issue.  So again, there has got to be a password here.

Now once I have telnetted in, I can go in and manage Palaestra2 just like I was sitting there at the prompt or connected through the Line Console.  If I want to suspend my telnet session, I have to hold the keys down ctrl+shift+6 and hit the letter X and look what happens to my prompt.  I go back to Palaestra1.  The telnet session is still active.  I am just not using it.  Let me show you that control sequence.

I have brought up a slide with the commands you are going to be using for your telnet.  (Telnet the IP address) gets you in, but when you want to get out without exiting all the way out and ending your session you have to use this escape sequence ctrl+shift+6 X.  And what you do is you hold these three keys down first, I hold ctrl then shift, then 6, I let go and then tap the X.  So I just ctrl+shift+6 let go, tap the X.  It takes a little practice.  If I want to see who I have telnetted into, I can go in and do the show sessions, and I can take a look at where I have telnetted.  I can also use the command where.  Either one will work.  This is an older command; where is an older command.  So show sessions.  I am not going to go in and see what I have connected to.

Let me bring the prompt back up and I will type in show sessions.  If I spell it right, then it shows me that I have telnetted into router 1 and router 2.  I have actually telnetted into two; I have telnetted into myself, and I have telnetted into router 2, Palaestra2 right here.  If I want to end the connection to Palaestra2 and get rid of it, what I do is I use the command disconnect.  So I am in Palaestra1; I have telnetted Palaestra2 and suspended the session.  So what I use, I use a command disconnect, disconnect to kill the session, real quick though.  Notice there is an asterisk right next to both of these connections here.  Typically, again, I am in a simulator sometimes, things are a little different, on a real router, I would only have an asterisk next to one of these sessions.

And what the session would be is it would show me where I have telnetted the last.  So this little asterisk here would be the telnet session that I have telnetted into last.  So I type disconnect 2, hit Enter, close the connection.  Show sessions, and it shows me I only have one session going on.  If I hit disconnect 1, it will kill that session.  So I do show sessions and no connections are open.  That disconnect command isn’t the only way to kill my session.  If I want to go back in and telnet to Palaestra2 again, and in Palaestra2, so I am in the Palaestra2 router, I have telnetted in, I could use the ctrl+shift+6 X sequence and get back out.  Notice my prompt says Palaestra1 now.

But if I am Palaestra2 and I want to end the session, I want to – let me type – let get back in there, show sessions.  I do show sessions.  See it shows me my connection #1 here.  If I want to get back into it, I type resume 1.  The simulator didn’t like the space.  Again, on a normal router, that is something I could put in there.  These things are a little big fickle.  So I type resume connection 1 and it gets me back in.  So I am back in.  If I want to exit out, and I am not worried about leaving the session open, I am not planning on going back in there, I just type in exit.  It will disconnect me from Palaestra2 and kill the session.  So if I do show sessions, no connections are open.

Now I have brought up my CCNA slide again and we have talked about this ctrl+shift+6 X.  The show sessions command allows us to see our open sessions and the disconnect command.  There is one command I left off of here and that’s resume.  Resume allows us to go in and resume a session.  So if I have gone in and I have telnetted to multiple devices, I have used by show sessions command or I have typed in where and I want to get back into an existing connection, I can use this resume command and then I would specify the session number.  So based on the number of the session, I type resume session number and it will take me back in.  Let’s take a look it using that.

I have telnetted in the Palaestra2, set it up and then I used ctrl+shift+6 X and exited out.  So right now, I am at Palaestra1 again but I have an active connection to Palaestra2.  I type show sessions, and then it will show me that I have that session going on right now.  So what I can do is I can use a resume command.  I type resume, the number and hit Enter and it takes me back to Palaestra2.  Again ctrl+shift+6 X exits me out, and I can use my show sessions command to view the session.  So resume and then the session number will get me back in.

On a normal router as well, if you have active telnet sessions, a lot of times you can just hit the session number like you have got to just put in the number 1 whatever the session number is and hit Enter without the resume command. Also I can just hit Enter and whatever the last telnet session I had was it would take me back into it.  But the proper way is just using the resume command and the session number to get back into a suspended telnet session.

I have brought the CCNA command slide back up, and there are two other commands I want to go over real quick, the show users command and the clear line command.  Now the show users command is the command that we use to show who has telnetted into our router.  So if I am at Palaestra1 and I type in an old command would be who or show users, it will show me who has telnetted into me.  And what I can do is with the clear line command, I can type in clear line, then the line number and kick come out.  So we have gone over the telnet ctrl+shift+6 X, show sessions, disconnect, the resume command, show users, and clear line.

Now I want to talk a little bit more about the Cisco Discovery Protocol and what that will do for us from a CCNA perspective.  I have brought up my CCNA simulator and in my simulator, I have gone in and configured three routers.  I set up Palaestra1, Palaestra2 and Palaestra3.  I am going to be using these to demonstrate what CDP can do for you, Cisco Discovery Protocol.  And as you might guess by the name of the protocol, Cisco Discovery Protocol allows us to identify directly connected Cisco devices.  So we can go and check out what devices made by Cisco we are directly connected to.

Right now, I am at Palaestra1 and I type in enable, I am going into privilege mode here.  There are a few different commands we can use with CDP.  Let’s type in show CDP and hit Enter.  What this shows me is that by default, my Cisco device is sending CDP packets out every 60 seconds, so all up and up interfaces is going to send the CDP packets out every 60 seconds.  It tells the remote devices or the next top devices to hold on to that information saying, “Hey, this information is good for 180 seconds” and CDP Version 2 advertisements is enabled.  There are two different versions of CDP.

Now what we can do is I can type in show cdp and put a question mark and I see four different options for Cisco Discovery Protocol.  , I just hit Enter and that’s where I get this information sending CDP packets out every 60 seconds, hold 180, Version 2 advertisements, enable.  If I type in neighbors, what it will do is it will show me brief information about all neighboring Cisco devices.  I can hit tab to complete it since I don’t like to type and I can go in and type that out.  I am at Palaestra1 and what this is showing me, and again if I look at my NetMap, I have Palaestra1 and it shows me connection to Palaestra2 and Palaestra3.

So this device right here has a direct connection with Palaestra2 and Palaestra3.  And that’s what it shows me here, Palaestra2.  I connect to Palaestra2 on Ser0 of my router, and the next top device is a router, the type of router it is and I connect to Palaestra2’s Sr0 interface.  This can be very helpful when you are trying to figure out how things are physically connected.  It can help you map out a network.  So Sr0 on my router connects to Sr0 on Palaestra2.  Sr1 on my router connects to Sr0 on Palaestra3.  So that shows CDP neighbors.

I can also get detailed information about my neighboring devices by show CDP neighbors detail command.  Here is the output from the show CDP neighbors detail command.  So I type in show CDP neighbors detail and it gives me detailed information about these directly connected devices.  Palaestra2 I am directly connected to has an IP address of 192.168.1.2.  It shows me what type of router it is, what capabilities it’s got, what port I connect to on it, as well as operating system information about that directly connected device.

Now let’s look at Palaestra3.  Notice on this one, address, if you look at Palaestra2 here, the address is 192.168.1.2.  Here, it doesn’t show an IP address under entry addresses.  There is no IP address and the reason there isn’t an IP address showing is because I did not bother to configure an IP address on Palaestra3.  The reason I didn’t bother to configure an IP address on Palaestra3 is I wanted to let you know that this is not reliant on layer 3 being up; you do not need to be able to ping for this to work.  So I don’t need an IP address.  All I need is layer1 and layer2 functioning and I will get the CDP information.

What’s nice about that is while I am troubleshooting, I am checking out my IP address and I see on Se0 here, I have got 192.168.1.1, 192.168.1.2.  I am trying to troubleshoot IP connectivity.  I am going in and I do show interfaces, and my interfaces are in up and up state.  So I know layer1 is good and I know layer2 is good.  So this is layer1, this is layer2, they are both good.  I want to check out IPs.  I can use my show CDP details to check out the IP addresses of the next top devices.  And what that can tell me is whether or not my IP address is configured correctly and their IP address is configured correctly.  They must share the same network address for this to work.

So show CDP, neighbor detail shows me that information.  Here, I am trying to ping Palaestra3 and I can’t and I go, “Oh, let me check it out.”  They don’t have an IP address.  So since they don’t have an IP address, I can’t ping.  So I will have to go in and set one up.  So very helpful that this is not reliant on layer 3 information to function.

Let’s take a look at some of these other CCNA level CDP commands.  Show CDP, question mark, entry, I can do show CDP entry, and what it wants is it will ask me basically for the name of a Cisco device.  If I do show CDP entry and actually put an asterisk, it gives me detailed information about all neighboring Cisco devices.  This command is the equivalent of the show CDP neighbors detail.  That command is exactly the same as this command right here.  The only difference is in the CCNA simulator, show CDP neighbor detail works, show CDP entry asterisk does not.  But if it did work on the simulator, this is what we will be getting, the exact same information, detailed information about all neighboring devices.

I can also do show CDP entry and then type in the name of directly connected device.  Let’s say I know what device I am troubleshooting, Palaestra2, and it gives me detailed information only about Palaestra2.  And that’s something I can’t do with the CDP neighbors command.  It always shows me all directly connected devices.  Let’s take a look at a couple of others as well.  Show CDP interface, right now, it shows me all the interfaces that CDP is enabled on, Sr0, Sr1, Ethernet0.  Even though Ethernet0 is down, it’s enabled for CDP.

I might not want CDP running on all interfaces.  If I have an interface that connects to a service provider, I might not want to send out my IP address, my platform, my operating system version; I might not want to be broadcasting that information out.  So I can go in and turn CDP off based on an interface value, or I can turn it off for the entire device if I want.  Let’s go in and shut CDP off on the Sr0 interface.  So I go interface, Sr0 and what I do at the interface is I type in no CDP enable, and it turns CDP off at the interface.  If I do show CDP interface, what happens is it shows me Sr1 is up and Ethernet0 is down and that CDP is running for Sr1 and it’s running for Ethernet0 even though Ethernet0 is down.  It’s enabled on those interfaces, but I don’t see Sr0 in here.  So I have shut it off for Sr0 interface only.

But I want to turn it back on for that interface; I go back to that interface, and I type CDP enable, and that turns it back on.  Now when I do show CDP interface and hit Enter, it shows me Sr0 again.  So now it’s enabled for Sr0, Sr1, Ethernet0.  If I want to turn it off for the whole router, it is no CDP run in global mode.  Things that affect the entire router are going to be done in global mode here.  I know I am in global mode which says (config) as well as the #.  So no CDP run, Enter, ctrl+z, show CDP, interface, I don’t get anything.  It says CDP not running.  Show CDP, CDP not enable.

So on a lot of devices, especially if you are working for service providers and things like that, CDP will not be enabled because it broadcasts information you might not want everybody to get.  If I want to turn it back on, I type no CDP run before.  So now I just type CDP run.  It turns it back on.  Show CDP, it’s up, show CDP interface, and it’s running.  The last command I do show CDP question mark traffic just shows me CDP traffic statistics, how many packets, how many input packets, information like that.  So good information.

Now one other thing I want to talk to you about before we end this discussion about CDP and how it works.  I know we have already talked about how it works but if I do show CDP neighbors, I see Palaestra2 and Palaestra3, directly connected Cisco devices.  If we look at our NetMap, Palaestra1 is directly connected to 2 and directly connected to 3.  This is important because I want you to know if you go to Palaestra2, which we will do, if I go over to Palaestra2 and I type show CDP neighbors, I will only see Palaestra1, I will not see Palaestra3.  It only shows me directly connected Cisco devices.  Let’s take a look.  Palaestra2 show CDP neighbors, the only directly connected Cisco device is Palaestra1.  If I go to Palaestra3, its only directly connected Cisco device again is Palaestra1.  So it only shows you directly connected Cisco devices.

I have brought this CCNA CDP slide up and I just want to go over those commands again.  We have gone over show CDP which shows us directly — actually just shows us that CDP is running and again, Cisco Discovery Protocol is used to find directly connected Cisco devices.  Show CDP Interface shows us what interfaces CDP is running on, shows CDP neighbors with the detail option.  Now show CDP neighbors without the detail option just gives us brief information about neighboring devices with detail.  It gives us detailed information such as IP, platform as well as other things so lot of detailed information.  Show CDP entry with a router name will give us detailed information about one device, or with the asterisk, gives us the same output as show CDP neighbors detail, detailed information about all neighboring Cisco devices.  Show CDP traffic shows us traffic statistics.  CDP run and CDP enable show us or allow us to turn on or off CDP.  If we do No CDP Run, it turns it for the whole device, that’s global mode.  If we do No CDP Enable, it turns it off per interface.  If you want to turn it back on, we just do CDP run or just do CDP enable.

Now I have brought up my CCNA outline slide and just want to go over again what we have talked about in this CCNA video.  We have talked about Telnetting from the router not to the router, how we initiate those telnet sessions, how we can suspend and manage those telnet sessions and how we can end telnet sessions, not only telnet sessions from our router but telnet sessions into our router while we are at the router itself using the show users and clear line command.  Cisco Discovery Protocol allowing us to find out about directly connected Cisco devices, switches and routers.  Using CDP, all our show commands for it as well as enabling and disabling CDP.  Again, if you have a public interface connected to a service provider, you probably want to disable CDP because that broadcasts information about your device out the public domain or out that public interface.  So I hope you have enjoyed this CertificatoinKits CCNA Training Video on telnet and CDP.