WEBVTT

0:00:07.180000 --> 0:00:13.780000
 Now let's go into the alternative of FTP,
 which is the trivial file transfer

0:00:13.780000 --> 0:00:16.500000
 protocol or TFTP.

0:00:16.500000 --> 0:00:22.340000
 Now TFTP is typically used to transfer
 smaller files between devices on

0:00:22.340000 --> 0:00:26.300000
 a network. In reality, the size of the
 file doesn't matter, but this is

0:00:26.300000 --> 0:00:31.540000
 what TFTP was originally back in the
 mid-1970s designed to do, smaller

0:00:31.540000 --> 0:00:38.140000
 files. It is also a layer 7
 application layer program.

0:00:38.140000 --> 0:00:42.260000
 What makes it vastly different is that
 it uses UDP, the user datagram

0:00:42.260000 --> 0:00:44.700000
 protocol at layer
 4, the OSI model.

0:00:44.700000 --> 0:00:47.700000
 This uses UDP port 69.

0:00:47.700000 --> 0:00:50.040000
 You want to memorize
 that UDP port number.

0:00:50.040000 --> 0:00:55.620000
 From a CCT perspective, the most common
 usage that you'll probably see

0:00:55.620000 --> 0:00:59.380000
 is like a Cisco Field Engineer or Field
 Engineer for company troubleshooting

0:00:59.380000 --> 0:01:03.980000
 Cisco devices, is TFTP is typically used,
 as you can see here, to upgrade

0:01:03.980000 --> 0:01:08.460000
 and downgrade software images
 on routers and switches.

0:01:08.460000 --> 0:01:13.260000
 For example, here's where I'm on a
 router and I'm using the Copy TFTP

0:01:13.260000 --> 0:01:17.760000
 Flash command to actually download a
 Cisco iOS software image onto that

0:01:17.760000 --> 0:01:23.840000
 router. Now just like I did before, let
 me just real fast show you a sniffer

0:01:23.840000 --> 0:01:33.380000
 trace of TFTP. Now we saw that with
 FTP, FTP at had authentication built

0:01:33.380000 --> 0:01:36.560000
 in. TFTP does not.

0:01:36.560000 --> 0:01:39.440000
 TFTP is a lot simpler than FTP.

0:01:39.440000 --> 0:01:41.760000
 As a matter of fact, before I show you
 the sniffer trace, let's just go

0:01:41.760000 --> 0:01:45.280000
 into this next slide real quickly to
 compare the differences and then

0:01:45.280000 --> 0:01:47.500000
 I'll show you the sniffer
 trace of TFTP.

0:01:47.500000 --> 0:01:50.420000
 So let's compare the two.

0:01:50.420000 --> 0:01:55.300000
 FTP, rich set of commands to allow files
 to be sent and received, renamed,

0:01:55.300000 --> 0:01:58.660000
 deleted, all kinds of stuff.

0:01:58.660000 --> 0:02:01.280000
 Whereas TFTP, real basic.

0:02:01.280000 --> 0:02:05.760000
 All it's used for is to upload
 a file or download a file.

0:02:05.760000 --> 0:02:08.140000
 That's it. Can't do anything else.


0:02:08.140000 --> 0:02:12.500000
 FTP allows many data representation
 options.

0:02:12.500000 --> 0:02:15.800000
 In other words, with FTP you get to
 choose, do I want to represent the

0:02:15.800000 --> 0:02:19.460000
 data via ASCII, Epsidic,
 local image.

0:02:19.460000 --> 0:02:21.040000
 There's a whole bunch of things.

0:02:21.040000 --> 0:02:24.980000
 Whereas with TFTP, there's really only two
 modes of transferring or representing

0:02:24.980000 --> 0:02:28.100000
 the data, either ASCII mode, which you
 would typically do if you're doing

0:02:28.100000 --> 0:02:30.620000
 like a text file or binary mode.

0:02:30.620000 --> 0:02:34.560000
 For example, when we're doing TFTP
 for a Cisco software image, that's

0:02:34.560000 --> 0:02:36.420000
 being done in binary mode.

0:02:36.420000 --> 0:02:42.240000
 Also, TFTP does not have any login
 or authentication mechanisms.

0:02:42.240000 --> 0:02:47.500000
 You probably will not be able to find
 a publicly accessible TFTP server

0:02:47.500000 --> 0:02:52.360000
 on the internet, because that would
 be highly insecure to do that.

0:02:52.360000 --> 0:02:58.480000
 Alright, so let's take a look real
 quickly here at my TFTP transfer.

0:02:58.480000 --> 0:03:03.800000
 So in this particular case, the TFTP
 transfer was done between my laptop,

0:03:03.800000 --> 0:03:09.840000
 which has the IP address of 1112,
 and my router, which is 1111.

0:03:09.840000 --> 0:03:13.880000
 So I'm simply going to apply display
 filter here, looking for anything

0:03:13.880000 --> 0:03:17.100000
 to and from 1111.

0:03:17.100000 --> 0:03:19.940000
 And here we go. Let's go ahead
 and zoom in on this.

0:03:19.940000 --> 0:03:22.740000
 So here's the very
 first TFTP message.

0:03:22.740000 --> 0:03:25.920000
 This is the router, because remember
 I initiated it on the router with

0:03:25.920000 --> 0:03:28.740000
 the router saying, hey, I need
 to download a software image.

0:03:28.740000 --> 0:03:33.840000
 So we can see it's
 using UDP port 69.

0:03:33.840000 --> 0:03:39.320000
 Here is TFTP, very simple, operation
 code read request.

0:03:39.320000 --> 0:03:40.860000
 Here's what I want to read.

0:03:40.860000 --> 0:03:43.180000
 This is the file I'm looking for.

0:03:43.180000 --> 0:03:44.680000
 And I want to do it as octet.

0:03:44.680000 --> 0:03:48.280000
 In other words, not ASCII, but
 I just want to do octet style.

0:03:48.280000 --> 0:03:53.040000
 Now you might think, oh, well, TFTP
 must be unreliable, because TFTP is

0:03:53.040000 --> 0:03:55.840000
 using UDP. It's not using TCP.

0:03:55.840000 --> 0:03:57.880000
 Well, it's true.

0:03:57.880000 --> 0:04:03.220000
 TFTP does not have the reliability of
 TCP built into it, but TFTP actually

0:04:03.220000 --> 0:04:04.960000
 has its own reliability mechanism.


0:04:04.960000 --> 0:04:08.540000
 And you can see that right
 here in the sniffer trace.

0:04:08.540000 --> 0:04:14.020000
 For every block of data that's sent,
 an acknowledgment has to go back.

0:04:14.020000 --> 0:04:19.080000
 So for example, here is the router saying,
 I would like to read this file,

0:04:19.080000 --> 0:04:23.240000
 this iOS image. Here's my laptop saying,
 OK, I acknowledge that I got

0:04:23.240000 --> 0:04:25.260000
 your read request.

0:04:25.260000 --> 0:04:29.100000
 Actually, no, this is the,
 see here, data block.

0:04:29.100000 --> 0:04:31.860000
 OK, so this is the first data
 block from my laptop.

0:04:31.860000 --> 0:04:35.780000
 So this is my laptop sending,
 knows it's 558 bytes.

0:04:35.780000 --> 0:04:41.160000
 And TFTP is limited to only
 sending blocks of 512 bytes.

0:04:41.160000 --> 0:04:47.640000
 So this 558 is actually the 512 bytes
 of TFTP data, plus the IP and the

0:04:47.640000 --> 0:04:51.120000
 UDP header. So that
 brings it up to 558.

0:04:51.120000 --> 0:04:54.160000
 So we can see here, here
 is opcode data packet.

0:04:54.160000 --> 0:04:57.460000
 It says, OK, here I'm giving
 it to you, block number one.

0:04:57.460000 --> 0:04:59.280000
 And then here's all the data.

0:04:59.280000 --> 0:05:01.520000
 And then the router
 acknowledges that.

0:05:01.520000 --> 0:05:05.540000
 It says, OK, I got block number
 one, see, opcode acknowledgment.

0:05:05.540000 --> 0:05:08.980000
 And now my laptop says, OK, let
 me send you block number two.

0:05:08.980000 --> 0:05:11.900000
 And this just goes
 on and on and on.

0:05:11.900000 --> 0:05:15.920000
 But you can see it's much
 simpler than FTP.

0:05:15.920000 --> 0:05:19.080000
 There was no control connection
 and data connection.

0:05:19.080000 --> 0:05:23.220000
 There's just a very simple starting
 point where the router just says,

0:05:23.220000 --> 0:05:24.540000
 OK, I'm ready to start.

0:05:24.540000 --> 0:05:26.960000
 Port 69, read request.

0:05:26.960000 --> 0:05:28.500000
 This is what I want.

0:05:28.500000 --> 0:05:32.280000
 And if the TFTP server actually
 exists, he says, let's go.

0:05:32.280000 --> 0:05:33.880000
 Here's my first data block.

0:05:33.880000 --> 0:05:38.740000
 So you can see TFTP much
 simpler than FTP does.

0:05:38.740000 --> 0:05:43.580000
 Down sides to it, it's a lot more insecure
 than FTP, because there's no

0:05:43.580000 --> 0:05:45.880000
 authentication mechanisms
 built into it.

0:05:45.880000 --> 0:05:48.880000
 Also, it's not as
 efficient as FTP.

0:05:48.880000 --> 0:05:52.560000
 FTP can once again make use of TCP,
 which means you can send many, many

0:05:52.560000 --> 0:05:55.780000
 TCP segments before an acknowledgment
 comes back.

0:05:55.780000 --> 0:06:00.720000
 Whereas with TFTP, it's just a single
 512 bytes, get an acknowledgment

0:06:00.720000 --> 0:06:03.580000
 512 bytes, get an acknowledgment.

0:06:03.580000 --> 0:06:07.700000
 So FTP is a lot more efficient because
 it can send a lot more data before

0:06:07.700000 --> 0:06:11.480000
 it requires that TCP acknowledgment
 come alongside of it.

0:06:11.480000 --> 0:06:15.140000
 All right, so that takes care of
 our file transfer protocols.

0:06:15.140000 --> 0:06:18.780000
 Now let's go into the next two protocols,
 which are responsible for logging

0:06:18.780000 --> 0:06:24.100000
 into a device. So before Telnet was
 invented, so this is way back in the

0:06:24.100000 --> 0:06:28.440000
 days when there were no laptops, there
 were no PCs, tablets, or smartphones,

0:06:28.440000 --> 0:06:31.780000
 we just had these things called dumb
 terminals, which just looked like

0:06:31.780000 --> 0:06:34.460000
 a basic monitor and a keyboard.

0:06:34.460000 --> 0:06:38.240000
 There was no hard drive in
 here, no memory in here.

0:06:38.240000 --> 0:06:41.880000
 And basically, this dumb terminal was
 physically connected to the back

0:06:41.880000 --> 0:06:45.260000
 of a server. And you'd like, you can
 see here, you might have more than

0:06:45.260000 --> 0:06:48.580000
 one dumb terminal connected
 to a server.

0:06:48.580000 --> 0:06:52.260000
 So the idea was these dumb terminals
 were used to connect to the shell

0:06:52.260000 --> 0:06:56.280000
 of the server. And in case you don't
 know what that term shell means,

0:06:56.280000 --> 0:07:00.120000
 well, right here, this is actually
 taken from Wikipedia.

0:07:00.120000 --> 0:07:01.400000
 I'll expand this a little bit.

0:07:01.400000 --> 0:07:03.640000
 The shell is basically
 the command line.

0:07:03.640000 --> 0:07:09.680000
 So when you're accessing the operating
 systems command line, you are accessing

0:07:09.680000 --> 0:07:11.920000
 what's called the shell.

0:07:11.920000 --> 0:07:13.140000
 So that's what the shell is.

0:07:13.140000 --> 0:07:16.160000
 So for example, when you're logging
 into a Cisco router or switch and

0:07:16.160000 --> 0:07:20.300000
 accessing the iOS command line, you are
 accessing the shell of that router

0:07:20.300000 --> 0:07:26.640000
 or switch. OK, well, back in the old
 days, dumb terminal was physically

0:07:26.640000 --> 0:07:30.740000
 connected to the back of the server,
 or the mainframe, or whatever it

0:07:30.740000 --> 0:07:33.360000
 was. So it connected to
 the shell directly.

0:07:33.360000 --> 0:07:37.000000
 The dumb terminal was like a periphery
 device, or a peripheral device,

0:07:37.000000 --> 0:07:40.240000
 just like a printer is
 a peripheral device.

0:07:40.240000 --> 0:07:44.740000
 Then the question was, OK, but if we
 have a device that's not physically

0:07:44.740000 --> 0:07:48.400000
 connected, maybe it can get
 to that server via IP.

0:07:48.400000 --> 0:07:53.240000
 Is there a way we could use the IP protocol
 so the device that's far removed

0:07:53.240000 --> 0:07:57.380000
 from the server, maybe in the next room,
 maybe in the next country over,

0:07:57.380000 --> 0:08:01.080000
 could still get access
 to that shell.

0:08:01.080000 --> 0:08:03.020000
 And this is what Telnet
 was designed to do.

0:08:03.020000 --> 0:08:08.300000
 Telnet was designed to give a remote
 device IP reachability to the shell

0:08:08.300000 --> 0:08:10.920000
 of another remote device.

0:08:10.920000 --> 0:08:14.560000
 So Telnet, there's the RFC in case
 you want to look up the details of

0:08:14.560000 --> 0:08:19.880000
 it. It is also TCP
-based, TCP port 23.

0:08:19.880000 --> 0:08:21.660000
 You want to remember that?

0:08:21.660000 --> 0:08:26.860000
 Used to access the command line of a
 device typically creates very, very

0:08:26.860000 --> 0:08:30.620000
 small packets. Now, I'll show you that
 in my Wireshark sniffer trace in

0:08:30.620000 --> 0:08:31.920000
 just one second.

0:08:31.920000 --> 0:08:36.980000
 One of the downsides of Telnet is that
 everything is sent in clear text,

0:08:36.980000 --> 0:08:41.580000
 which means if someone has the ability
 to intercept your Telnet packets,

0:08:41.580000 --> 0:08:43.920000
 they can see everything
 that's going on.

0:08:43.920000 --> 0:08:47.000000
 If you're supplying a password,
 they can see that.

0:08:47.000000 --> 0:08:51.980000
 If you're getting confidential or important
 information from the device

0:08:51.980000 --> 0:08:54.420000
 you're Telnetted to,
 they can see that.

0:08:54.420000 --> 0:08:58.840000
 They can see everything
 in clear text.

0:08:58.840000 --> 0:09:01.600000
 So how does Telnet actually work?

0:09:01.600000 --> 0:09:05.760000
 Basically, what happens is when you establish
 the TCP three-way handshake

0:09:05.760000 --> 0:09:09.300000
 and you say, hey, I want to connect
 to you on port number 23.

0:09:09.300000 --> 0:09:14.700000
 Both your laptop or PC and the device you're
 Telnetting to, which is probably

0:09:14.700000 --> 0:09:19.620000
 a server or a router or a switch, sort
 of logically or internally, create

0:09:19.620000 --> 0:09:22.480000
 this thing called a networked
 virtual terminal.

0:09:22.480000 --> 0:09:26.700000
 One way you can think of this is that
 both your laptop and the device

0:09:26.700000 --> 0:09:30.380000
 you're Telnetting to imagine that
 they're creating a dumb terminal.

0:09:30.380000 --> 0:09:33.860000
 They're creating a dumb terminal
 sort of in their brain.

0:09:33.860000 --> 0:09:37.740000
 And this networked virtual terminal is
 what's going to be used to transfer

0:09:37.740000 --> 0:09:42.320000
 the shell commands back and forth.


0:09:42.320000 --> 0:09:45.020000
 So Telnet sends and receives
 basically two things.

0:09:45.020000 --> 0:09:46.920000
 So what's going across
 is Telnet connection.

0:09:46.920000 --> 0:09:51.540000
 Data, so for example, when you type characters
 into your keyboard or when

0:09:51.540000 --> 0:09:56.200000
 you're getting response back, that's
 data, or things are called negotiated

0:09:56.200000 --> 0:10:00.700000
 options, which is how the networked
 virtual terminal will be displayed

0:10:00.700000 --> 0:10:05.040000
 and how it will act.

0:10:05.040000 --> 0:10:07.980000
 OK. So how does Telnet work?

0:10:07.980000 --> 0:10:17.100000
 Well, for example, here is a, just like
 with FTP and TFTP, you can either

0:10:17.100000 --> 0:10:20.540000
 download a client that
 supports Telnet.

0:10:20.540000 --> 0:10:23.380000
 So in this particular case,
 I'm using secure CRT.

0:10:23.380000 --> 0:10:28.060000
 There are a lot of other clients, like
 hyper terminal, putty, lots of

0:10:28.060000 --> 0:10:29.940000
 other ones that support Telnet.

0:10:29.940000 --> 0:10:35.740000
 And even within a lot of times,
 within DOS, you can do Telnet.

0:10:35.740000 --> 0:10:40.620000
 If you're on an Apple or a Mac device,
 an iOS device, I don't remember.

0:10:40.620000 --> 0:10:43.740000
 But there is something built into iOS
 that supports, I think it's called

0:10:43.740000 --> 0:10:46.500000
 the terminal command,
 that supports Telnet.

0:10:46.500000 --> 0:10:51.280000
 But in this particular case, I'm just
 going to Telnet to my router.

0:10:51.280000 --> 0:10:54.160000
 So I've already pre-configured
 the router to accept Telnet.

0:10:54.160000 --> 0:10:58.160000
 So here within secure CRT, I'll
 just go into the quick connect.

0:10:58.160000 --> 0:11:03.840000
 I'll select Telnet as my protocol,
 put in the IP address.

0:11:03.840000 --> 0:11:06.760000
 It knows it should default
 to port number 23.

0:11:06.760000 --> 0:11:10.580000
 And then I'll just connect.

0:11:10.580000 --> 0:11:13.280000
 And now I get a username prompt.

0:11:13.280000 --> 0:11:19.140000
 And now I'm in. So now everything I
 am typing and sending is going back

0:11:19.140000 --> 0:11:22.460000
 and forth over a Telnet
 connection.

0:11:22.460000 --> 0:11:24.100000
 I'm getting the running config.

0:11:24.100000 --> 0:11:28.220000
 Exit. Now my Telnet
 connection is done.

0:11:28.220000 --> 0:11:30.840000
 So just like I did with the previous
 ones, what does this actually look

0:11:30.840000 --> 0:11:32.080000
 like in the background?

0:11:32.080000 --> 0:11:34.520000
 What is Telnet actually doing?

0:11:34.520000 --> 0:11:37.660000
 Let's close this one down.

0:11:37.660000 --> 0:11:42.580000
 And let's bring up a sniffer
 trace of Telnet.

0:11:42.580000 --> 0:11:54.380000
 OK, once again, IP
.address is 1111.

0:11:54.380000 --> 0:11:57.480000
 OK, so here is my laptop.

0:11:57.480000 --> 0:12:01.140000
 And you can see the very first TCP message,
 the TCP sin, is sent to port

0:12:01.140000 --> 0:12:03.540000
 number 23, which is for Telnet.

0:12:03.540000 --> 0:12:05.380000
 So we've got the three
-way handshake.

0:12:05.380000 --> 0:12:07.960000
 That takes care of frames
 10, 11, and 12.

0:12:07.960000 --> 0:12:13.680000
 Now here in frame number 13, this is
 the first Telnet data from my laptop,

0:12:13.680000 --> 0:12:20.620000
 1112. And you can see here, it's just
 sending those negotiated options.

0:12:20.620000 --> 0:12:23.700000
 In this case, it's saying the command
 is do, and the option is suppress

0:12:23.700000 --> 0:12:27.160000
 go ahead. We're not going to really
 talk about what these options are.

0:12:27.160000 --> 0:12:31.120000
 That's beyond the scope
 of this class.

0:12:31.120000 --> 0:12:36.920000
 OK, and now here is a little bit more
 options going back and forth.

0:12:36.920000 --> 0:12:39.460000
 Now here's the router responding back
 to me saying, OK, here's the options

0:12:39.460000 --> 0:12:44.680000
 I want to do. Here's my laptop saying,
 OK, let's just do some more options

0:12:44.680000 --> 0:12:47.900000
 here. Now here is the first.

0:12:47.900000 --> 0:12:49.140000
 Now look at what happened here.

0:12:49.140000 --> 0:12:53.660000
 When I did my Telnet, what
 actually came across?

0:12:53.660000 --> 0:12:59.420000
 I had a space. Look at this.

0:12:59.420000 --> 0:13:04.080000
 Carriage return, so slash r slash n,
 is basically meaning carriage return

0:13:04.080000 --> 0:13:09.940000
 or blank space. So two blank spaces,
 user access verification.

0:13:09.940000 --> 0:13:14.080000
 So the first blank space was sort of
 cut off here, but there was a blank

0:13:14.080000 --> 0:13:19.920000
 space, blank space, user access verification,
 another blank space again,

0:13:19.920000 --> 0:13:23.280000
 and then password.

0:13:23.280000 --> 0:13:27.900000
 Oh, this is a little bit before.

0:13:27.900000 --> 0:13:31.300000
 So this is a different session where
 before I had it set up for username

0:13:31.300000 --> 0:13:34.920000
 and password, I just previously had
 it set up to where the router would

0:13:34.920000 --> 0:13:37.120000
 just say, hey, give me a password.


0:13:37.120000 --> 0:13:38.660000
 There was no username prompt.

0:13:38.660000 --> 0:13:42.220000
 So here's password.

0:13:42.220000 --> 0:13:45.720000
 And then here's my response.

0:13:45.720000 --> 0:13:54.500000
 So this whole bunch of options
 still going back and forth.

0:13:54.500000 --> 0:13:56.860000
 And what I want to
 point out is this.

0:13:56.860000 --> 0:14:01.380000
 OK, so back when I had the router set
 up to only prompt me for a password,

0:14:01.380000 --> 0:14:03.480000
 that password was Cisco.

0:14:03.480000 --> 0:14:11.300000
 And look at this, frame number
 30, just the C in Cisco.

0:14:11.300000 --> 0:14:11.340000
 Acknowledgement.

0:14:11.340000 --> 0:14:17.280000
 The I in Cisco, the S in Cisco, which
 I find kind of interesting here

0:14:17.280000 --> 0:14:22.500000
 is that these telnet packets are just
 carrying just a single letter, but

0:14:22.500000 --> 0:14:23.460000
 it is in plain text.

0:14:23.460000 --> 0:14:26.060000
 So somebody was reading this if they
 captured these packets, they'd be

0:14:26.060000 --> 0:14:28.640000
 able to see the CISCO.

0:14:28.640000 --> 0:14:30.440000
 There's the password.

0:14:30.440000 --> 0:14:34.200000
 And then I hit the enter key
 at the end of the password.

0:14:34.200000 --> 0:14:37.680000
 Now the router responds with,
 OK, here's the router prompt.

0:14:37.680000 --> 0:14:41.920000
 As we go on down, once I actually submitted
 the show run command, notice

0:14:41.920000 --> 0:14:45.400000
 the size of these packets
 are very, very minimal.

0:14:45.400000 --> 0:14:48.700000
 And then eventually, if we get down
 here far enough, we see right here

0:14:48.700000 --> 0:14:52.160000
 telnet data, 493 bytes.

0:14:52.160000 --> 0:14:58.920000
 And we can see here is the beginning
 of the running config that it sent

0:14:58.920000 --> 0:15:03.380000
 me. So that is telnet.

0:15:03.380000 --> 0:15:05.900000
 Pretty simple, pretty
 small size packets.

0:15:05.900000 --> 0:15:10.320000
 And main takeaway is everything
 is sent in clear text.

0:15:10.320000 --> 0:15:13.540000
 Here we can see a static
 route in that device.

0:15:13.540000 --> 0:15:17.580000
 So that is telnet.

0:15:17.580000 --> 0:15:21.100000
 So do we have an alternative
 to telnet?

0:15:21.100000 --> 0:15:25.460000
 Yes, we do. We have something
 called secure shell.

0:15:25.460000 --> 0:15:28.240000
 In other words, I'm trying to get
 into the shell of a device.

0:15:28.240000 --> 0:15:29.680000
 That's what telnet did.

0:15:29.680000 --> 0:15:31.840000
 But I'm trying to do it securely.

0:15:31.840000 --> 0:15:36.840000
 So it's the same objectives as telnet,
 but we're talking about a secure

0:15:36.840000 --> 0:15:40.460000
 session. And how is it secure?

0:15:40.460000 --> 0:15:44.260000
 Because it does authentication
 and encryption.

0:15:44.260000 --> 0:15:50.340000
 So with secure shell, even if somebody
 manages to intercept your packets,

0:15:50.340000 --> 0:15:54.340000
 they're not going to be able to read
 it, because everything is encrypted.

0:15:54.340000 --> 0:15:56.840000
 Big enhancement over telnet.

0:15:56.840000 --> 0:15:59.020000
 It also uses TCP.

0:15:59.020000 --> 0:16:03.220000
 But now instead of port 23, we're
 talking about port number 22.

0:16:03.220000 --> 0:16:04.500000
 And you will want
 to memorize that.

0:16:04.500000 --> 0:16:07.440000
 That is the port reserved
 for secure shell.

0:16:07.440000 --> 0:16:12.620000
 Now, if we're using secure shell to
 log into a Cisco router or switch,

0:16:12.620000 --> 0:16:16.140000
 that router switch has to have
 a cryptographic image.

0:16:16.140000 --> 0:16:20.880000
 It has to have an iOS image that supports
 cryptographic keys, so it can

0:16:20.880000 --> 0:16:23.580000
 actually support SSH.

0:16:23.580000 --> 0:16:26.820000
 So what does that look like?

0:16:26.820000 --> 0:16:32.440000
 Well, once again, let's
 go back here.

0:16:32.440000 --> 0:16:38.000000
 So now what I'm going to do is I'm going
 to, once again, do a quick connection.

0:16:38.000000 --> 0:16:40.660000
 I'm going to use my same application
 of secure CRT.

0:16:40.660000 --> 0:16:43.580000
 But this time I'm going
 to do secure shell.

0:16:43.580000 --> 0:16:46.040000
 I'm going to do SSH version 2.

0:16:46.040000 --> 0:16:49.520000
 Notice that default support 22, I've
 already pre-configured the router

0:16:49.520000 --> 0:16:51.780000
 to have a username of Keith.

0:16:51.780000 --> 0:16:53.800000
 And I believe it's a
 password of I and E.

0:16:53.800000 --> 0:16:54.900000
 We'll check that out
 here in a second.

0:16:54.900000 --> 0:16:56.100000
 So here's my username.

0:16:56.100000 --> 0:16:59.540000
 So I'll type in connect.

0:16:59.540000 --> 0:17:04.260000
 It prompts me for the
 password, I and E.

0:17:04.260000 --> 0:17:13.900000
 And now I'm in. And now everything
 I'm doing is being done via secure

0:17:13.900000 --> 0:17:16.600000
 shell and it is encrypted.

0:17:16.600000 --> 0:17:18.420000
 And how do I know it's encrypted?

0:17:18.420000 --> 0:17:24.620000
 Well, if I go back and open up another
 sniffer trace to show you what

0:17:24.620000 --> 0:17:27.420000
 SSH connections look like.

0:17:27.420000 --> 0:17:38.940000
 All right, so here is my laptop.

0:17:38.940000 --> 0:17:41.600000
 TCP send this time to port 22.

0:17:41.600000 --> 0:17:46.800000
 So frames 24, 25, and 26 are
 my TCP three-way handshake.

0:17:46.800000 --> 0:17:49.240000
 And now here is where
 SSH starts up.

0:17:49.240000 --> 0:17:54.420000
 SSH protocol. It says this is
 the protocol I want to do.

0:17:54.420000 --> 0:18:03.140000
 OK, and here is the router
 responding back to me.

0:18:03.140000 --> 0:18:04.900000
 And now we start up the
 secure part of it.

0:18:04.900000 --> 0:18:07.300000
 We start doing a key exchange.

0:18:07.300000 --> 0:18:11.800000
 And you can see there's
 a lot of stuff in here.

0:18:11.800000 --> 0:18:13.920000
 A lot of stuff to
 make this secure.

0:18:13.920000 --> 0:18:18.120000
 But the basic takeaway from this is
 if I just go down further, you can

0:18:18.120000 --> 0:18:21.260000
 see if I click on any of this stuff,
 there's no way to tell what's inside

0:18:21.260000 --> 0:18:23.020000
 there. It is encrypted.

0:18:23.020000 --> 0:18:26.060000
 Secure shell is entirely
 encrypted.

0:18:26.060000 --> 0:18:30.540000
 Still using TCP, still getting access
 to the shell or the command line,

0:18:30.540000 --> 0:18:33.580000
 but is an encrypted connection.

0:18:33.580000 --> 0:18:39.940000
 Now of the five protocols, let's
 talk about the last one.

0:18:39.940000 --> 0:18:44.240000
 Which is... Ping.

0:18:44.240000 --> 0:18:48.000000
 Now you're not going to be tested on
 this, but if anybody ever asks you,

0:18:48.000000 --> 0:18:49.760000
 does Ping stand for anything?

0:18:49.760000 --> 0:18:52.620000
 Now I'm sure you'll get that question
 by one of your friends or relatives.

0:18:52.620000 --> 0:18:57.460000
 You can say yes, it actually stands
 for packet internet groper.

0:18:57.460000 --> 0:18:58.920000
 Not a lot of people know that.

0:18:58.920000 --> 0:19:03.320000
 So now you're in the top 1% of people
 who know what Ping stands for.

0:19:03.320000 --> 0:19:07.800000
 Ping is used to test the IP reachability
 to remote devices.

0:19:07.800000 --> 0:19:10.960000
 So this is a very common first
 step in troubleshooting.

0:19:10.960000 --> 0:19:13.840000
 If somebody says, hey, I can't
 reach my email server.

0:19:13.840000 --> 0:19:15.120000
 Can't reach my web server.

0:19:15.120000 --> 0:19:16.480000
 Can't get to the router.

0:19:16.480000 --> 0:19:20.340000
 The very first thing that people typically
 do is they ping the device.

0:19:20.340000 --> 0:19:24.780000
 Which means that they are sending
 a special ICMP packet.

0:19:24.780000 --> 0:19:28.420000
 So ICMP is another,
 so we've got...

0:19:28.420000 --> 0:19:30.620000
 So think about an IP packet.

0:19:30.620000 --> 0:19:33.340000
 Normally when we think of an IP packet,
 we think, well, what's behind

0:19:33.340000 --> 0:19:36.280000
 the IP packet? The first thing most people
 think of is, well, it's either

0:19:36.280000 --> 0:19:41.680000
 TCP or UDP. But there's a lot of other
 stuff that an IP header could be

0:19:41.680000 --> 0:19:44.420000
 carrying. For example, ICMP.

0:19:44.420000 --> 0:19:46.940000
 So ICMP sits right behind
 the IP header.

0:19:46.940000 --> 0:19:50.100000
 It stands for the internet
 control messaging protocol.

0:19:50.100000 --> 0:19:53.160000
 ICMP has several different
 things it can do.

0:19:53.160000 --> 0:19:56.840000
 But in the case of ping, when you're
 doing a ping, you're sending what's

0:19:56.840000 --> 0:19:59.560000
 called an ICMP echo request.

0:19:59.560000 --> 0:20:01.680000
 Which means, hey, I'm
 sending this to you.

0:20:01.680000 --> 0:20:03.320000
 Can you respond back to me?

0:20:03.320000 --> 0:20:06.880000
 And you'll get an ICMP
 echo reply back.

0:20:06.880000 --> 0:20:08.860000
 So what does that actually
 look like?

0:20:08.860000 --> 0:20:14.080000
 Well, for example, I'll go ahead and
 bring up my DOS prompt right here.

0:20:14.080000 --> 0:20:20.020000
 Now, if I want to ping my router,
 I would just simply say ping 1111.

0:20:20.020000 --> 0:20:24.560000
 And you can see here, I'm
 getting some replies.

0:20:24.560000 --> 0:20:27.780000
 Now, when you ping something, we know
 that what you're actually transmitting

0:20:27.780000 --> 0:20:32.240000
 is technically called
 an ICMP echo request.

0:20:32.240000 --> 0:20:33.700000
 Now, you might have
 some questions.

0:20:33.700000 --> 0:20:36.580000
 Well, how many echo requests
 will you send?

0:20:36.580000 --> 0:20:39.540000
 What's going to be in the body
 of those echo requests?

0:20:39.540000 --> 0:20:43.620000
 That's all dependent upon what is
 creating those echo requests.

0:20:43.620000 --> 0:20:47.380000
 For example, you can see here, I'm
 running Microsoft Windows 7.

0:20:47.380000 --> 0:20:50.740000
 And when I do a ping from the DOS prompt
 of Windows 7, it's sending a

0:20:50.740000 --> 0:20:54.200000
 default of four echo requests.

0:20:54.200000 --> 0:20:56.880000
 And you can see they're
 pretty small.

0:20:56.880000 --> 0:21:01.120000
 If you do a ping from a Cisco router
 or a switch or something else, you

0:21:01.120000 --> 0:21:04.620000
 might, by default, be sending
 more or less than four.

0:21:04.620000 --> 0:21:07.220000
 And the size of those pings
 might be different.

0:21:07.220000 --> 0:21:10.960000
 And the last thing I want to show you
 is what does that look like in a

0:21:10.960000 --> 0:21:19.960000
 sniffer trace? So
 here is the ping.

0:21:19.960000 --> 0:21:21.100000
 So this is the source.

0:21:21.100000 --> 0:21:23.360000
 This is my laptop, 1112.

0:21:23.360000 --> 0:21:28.480000
 And you can see here in the IP header,
 it's protocol number one.

0:21:28.480000 --> 0:21:34.640000
 Remember, six is for TCP, 17 was for
 UDP, and protocol number one is ICMP.

0:21:34.640000 --> 0:21:39.340000
 And if I go down below that, here's
 the actual ICMP itself.

0:21:39.340000 --> 0:21:40.900000
 So it's type code number eight.

0:21:40.900000 --> 0:21:44.480000
 Remember, ICMP has a lot of different
 things it can do, which corresponds

0:21:44.480000 --> 0:21:46.300000
 to different type codes.

0:21:46.300000 --> 0:21:51.200000
 In this case, type code number
 eight is echo request or ping.

0:21:51.200000 --> 0:21:54.560000
 And you can see here, the data
 is pretty small, only 32 bytes.

0:21:54.560000 --> 0:21:59.840000
 So what I found kind of interesting
 is in my operating system, the data

0:21:59.840000 --> 0:22:01.800000
 that shoves into those 32
 bytes is look at this.

0:22:01.800000 --> 0:22:06.440000
 It's just the alphabet, A, B, C, D,
 E, F, G, all the way up to W, and

0:22:06.440000 --> 0:22:08.200000
 then it repeats itself.

0:22:08.200000 --> 0:22:10.820000
 And that's how it stuffs
 the 32 bytes.

0:22:10.820000 --> 0:22:14.560000
 And then when you send an echo request,
 the other device, if it's responsive

0:22:14.560000 --> 0:22:19.260000
 to ICMP, should send
 an echo reply.

0:22:19.260000 --> 0:22:22.440000
 And here it is, type
 code zero echo reply.

0:22:22.440000 --> 0:22:29.060000
 It actually echoes the exact
 same data back to me.

0:22:29.060000 --> 0:22:32.120000
 And that concludes this video.

