WEBVTT

0:00:07.280000 --> 0:00:12.000000
 This video, which is part of the CCT
 routing and switching series, is

0:00:12.000000 --> 0:00:17.520000
 called describing FTP, TFTP,
 Telnet, SSH, and Ping.

0:00:17.520000 --> 0:00:21.480000
 My name is Keith Bogart, and I will
 be your instructor for this video

0:00:21.480000 --> 0:00:24.920000
 session. Now in this particular video,
 I'm actually going to be covering

0:00:24.920000 --> 0:00:29.120000
 five different things from the CCT routing
 and switching blueprint, but

0:00:29.120000 --> 0:00:32.980000
 each thing was so small that it just
 made more sense to put it all in

0:00:32.980000 --> 0:00:34.940000
 one video and do it
 all in one shot.

0:00:34.940000 --> 0:00:39.340000
 So what are the five things from section
 three of the CCT routing and

0:00:39.340000 --> 0:00:40.420000
 switching that I'm going to cover?


0:00:40.420000 --> 0:00:43.560000
 Well, it's all talking about five different
 protocols and just understanding

0:00:43.560000 --> 0:00:48.900000
 what they're designed to do, which is
 describing what FTP does, describing

0:00:48.900000 --> 0:00:55.460000
 what TFTP does, describing what telnet
 does, describing what SSH does,

0:00:55.460000 --> 0:00:57.680000
 and describing what Ping does.

0:00:57.680000 --> 0:01:00.360000
 So the idea here is that you should be
 familiar with these five different

0:01:00.360000 --> 0:01:04.960000
 things, have an idea of when you would
 use them, how you would use them,

0:01:04.960000 --> 0:01:07.840000
 and that's what we're going
 to go into in this section.

0:01:07.840000 --> 0:01:11.540000
 Now, all five of these protocols, before
 we get into some of the details,

0:01:11.540000 --> 0:01:16.660000
 can be broadly categorized as falling into
 one of three different categories.

0:01:16.660000 --> 0:01:21.420000
 Some of those protocols are designed strictly
 for uploading and downloading

0:01:21.420000 --> 0:01:26.980000
 files. For example, FTP and TFTP, that
 is their primary purpose to upload

0:01:26.980000 --> 0:01:30.380000
 and download files, but they
 do it slightly differently.

0:01:30.380000 --> 0:01:34.680000
 A couple of these protocols are designed
 to allow a user to log in to

0:01:34.680000 --> 0:01:36.680000
 the command line of an interface.

0:01:36.680000 --> 0:01:40.280000
 For example, if you're trying to remotely
 log in to a router or switch,

0:01:40.280000 --> 0:01:43.980000
 you could use telnet or SSH, and I'll
 talk about what the differences

0:01:43.980000 --> 0:01:45.080000
 are between those.

0:01:45.080000 --> 0:01:48.280000
 And then the fifth protocol, the last
 one we're going to talk about Ping,

0:01:48.280000 --> 0:01:53.500000
 is really designed to verify
 IP reachability of a device.

0:01:53.500000 --> 0:01:58.260000
 So with that being said, let's go into
 the first of these, which is FTP.

0:01:58.260000 --> 0:02:02.900000
 So the acronym FTP stands for
 the File Transfer Protocol.

0:02:02.900000 --> 0:02:07.760000
 And like the name so eloquently describes,
 it's used to transfer files

0:02:07.760000 --> 0:02:10.500000
 between devices on a network.

0:02:10.500000 --> 0:02:14.680000
 Now, all of these things that we're going
 to look at reside at layer seven

0:02:14.680000 --> 0:02:18.820000
 or the application layer
 of the OSI model.

0:02:18.820000 --> 0:02:22.440000
 FTP utilizes TCP at
 the transport layer.

0:02:22.440000 --> 0:02:26.440000
 So as such, it has all of the bells
 and whistles built into it that TCP

0:02:26.440000 --> 0:02:32.180000
 brings to the table, such as sequencing,
 acknowledgments, window size,

0:02:32.180000 --> 0:02:38.200000
 that so because FTP is riding on top of
 TCP, we say it's a reliable protocol.

0:02:38.200000 --> 0:02:40.980000
 It's also built into
 many web browsers.

0:02:40.980000 --> 0:02:45.740000
 So I'll show you here in just a second
 that if you are the FTP client,

0:02:45.740000 --> 0:02:49.800000
 which is your laptop, is the FTP client,
 and you want to either push a

0:02:49.800000 --> 0:02:54.820000
 file or upload a file to an FTP server,
 you know, put one on there, or

0:02:54.820000 --> 0:02:58.340000
 you want to get a file from an FTP server
 and download it to your laptop,

0:02:58.340000 --> 0:03:00.520000
 there's basically two
 ways you can do that.

0:03:00.520000 --> 0:03:03.880000
 You could actually do it from right within
 your web browser itself instead

0:03:03.880000 --> 0:03:08.460000
 of typing in colon, whatever.

0:03:08.460000 --> 0:03:13.080000
 You would just simply type
 in FTP colon, whatever.

0:03:13.080000 --> 0:03:17.500000
 Or alternatively, you can download
 an FTP client application.

0:03:17.500000 --> 0:03:18.840000
 There's many free ones.

0:03:18.840000 --> 0:03:22.380000
 I'll show you one in just a second
 that I'm going to demonstrate, and

0:03:22.380000 --> 0:03:24.800000
 you can just use a standalone
 client as well.

0:03:24.800000 --> 0:03:29.280000
 Some of the benefits of using a standalone
 client is FTP has a lot of

0:03:29.280000 --> 0:03:33.000000
 bells and whistles, a lot of options,
 a lot of things that can do, and

0:03:33.000000 --> 0:03:36.220000
 if you're just doing it within the browser,
 you're just getting a stripped

0:03:36.220000 --> 0:03:39.200000
 down bare bones FTP functionality.


0:03:39.200000 --> 0:03:42.860000
 So to get some of the other options,
 you would need to have your own FTP

0:03:42.860000 --> 0:03:45.860000
 standalone client software
 application.

0:03:45.860000 --> 0:03:48.520000
 So it is a client server
 architecture.

0:03:48.520000 --> 0:03:51.460000
 FTP was designed to be secure.

0:03:51.460000 --> 0:03:57.260000
 So the client is typically you, you know,
 the user, the human being who's

0:03:57.260000 --> 0:03:58.680000
 asking for something.

0:03:58.680000 --> 0:04:00.040000
 So that is the client.

0:04:00.040000 --> 0:04:03.780000
 And the server is obviously the server
 that either has the data that you're

0:04:03.780000 --> 0:04:07.080000
 trying to retrieve, or the servers
 where you're trying to upload data

0:04:07.080000 --> 0:04:09.340000
 to store it remotely.

0:04:09.340000 --> 0:04:12.820000
 Now in FTP, there is
 a logging in process.

0:04:12.820000 --> 0:04:16.180000
 And this is one of the benefits
 of FTP is that it is secure.

0:04:16.180000 --> 0:04:19.900000
 The person who's in control of the
 FTP server can set up the username

0:04:19.900000 --> 0:04:23.240000
 and passwords so that when someone's
 logging in, they have to have those

0:04:23.240000 --> 0:04:27.900000
 credentials. And dependent upon the username
 and password, the FTP administrator

0:04:27.900000 --> 0:04:32.260000
 can decide what file will be accessible,
 what directory is that person

0:04:32.260000 --> 0:04:36.480000
 can see and not see, whether they're
 allowed to write to something or

0:04:36.480000 --> 0:04:38.660000
 they're just allowed to
 read from something.

0:04:38.660000 --> 0:04:42.580000
 Now there is something called anonymous
 FTP, which is actually kind of

0:04:42.580000 --> 0:04:46.320000
 misleading because with anonymous FTP,
 you might think, oh, okay, well

0:04:46.320000 --> 0:04:48.140000
 then there's no username
 and password.

0:04:48.140000 --> 0:04:49.520000
 That's actually not true.

0:04:49.520000 --> 0:04:53.440000
 It's just that with anonymous FTP, for
 example, there's a lot of servers

0:04:53.440000 --> 0:04:58.480000
 out there, like on the web, on the internet,
 where the, the administrative

0:04:58.480000 --> 0:05:02.220000
 of the server has decided, well, I want
 to make this publicly accessible.

0:05:02.220000 --> 0:05:06.840000
 Maybe this is just a PDF I want people
 to read or a document that, you

0:05:06.840000 --> 0:05:09.020000
 know, I don't really
 care about security.

0:05:09.020000 --> 0:05:12.000000
 So they would set that
 up with anonymous FTP.

0:05:12.000000 --> 0:05:15.160000
 And what that simply means is that when
 the client or the user is logged

0:05:15.160000 --> 0:05:20.160000
 in, when they're logging in, they still
 have to supply a username, but

0:05:20.160000 --> 0:05:23.020000
 the username is simply
 the word anonymous.

0:05:23.020000 --> 0:05:26.760000
 And as far as the password, they don't
 have to type in any password.

0:05:26.760000 --> 0:05:31.580000
 The FTP client program itself, whether
 it be your browser or whether it

0:05:31.580000 --> 0:05:35.960000
 be some standalone client, will just
 provide some random thing as far

0:05:35.960000 --> 0:05:36.660000
 as the password.

0:05:36.660000 --> 0:05:40.420000
 For example, you'll see that when I
 do it, when I do it via anonymous,

0:05:40.420000 --> 0:05:44.140000
 it sends anonymous as a username, and
 then it will actually send the name

0:05:44.140000 --> 0:05:50.480000
 and software version of my FTP
 program as the password.

0:05:50.480000 --> 0:05:54.420000
 Although I myself as a human, I'm not
 going to see any password prompt.

0:05:54.420000 --> 0:05:59.260000
 All right, so let's talk a little bit
 more about how FTP and TCP work

0:05:59.260000 --> 0:06:03.700000
 together. So that we know with TCP, anything
 that uses TCP has to go through

0:06:03.700000 --> 0:06:09.340000
 the three-way handshake first, the
 sin, sin, act, and then act, right?

0:06:09.340000 --> 0:06:13.380000
 And then during that process, whoever
 is establishing the connection,

0:06:13.380000 --> 0:06:16.460000
 whoever is opening it, when they send
 their initial sin, so for example,

0:06:16.460000 --> 0:06:21.240000
 if I'm establishing a TCP connection
 to you, that means I'm sending you

0:06:21.240000 --> 0:06:26.020000
 a TCP sin, and in my layer four header,
 as I'm sending that to you, I

0:06:26.020000 --> 0:06:29.840000
 specify a destination
 TCP port number.

0:06:29.840000 --> 0:06:34.120000
 So for example, if I'm trying to get
 to your web browsing software, I

0:06:34.120000 --> 0:06:36.980000
 would send a TCP sin to
 your port number 80.

0:06:36.980000 --> 0:06:40.580000
 And if you actually have some sort
 of web browser, some web server set

0:06:40.580000 --> 0:06:44.920000
 up, you are listening on port number
 80 for incoming connections.

0:06:44.920000 --> 0:06:50.540000
 So with FTP, when I establish a connection
 to you, I'm going to initially

0:06:50.540000 --> 0:06:53.420000
 establish what's called
 a control connection.

0:06:53.420000 --> 0:07:00.600000
 And that's going to be used simply to
 pass back and forth FTP commands.

0:07:00.600000 --> 0:07:03.300000
 So it's a TCP connection that's created
 when the session is established,

0:07:03.300000 --> 0:07:07.820000
 just for passing control information,
 such as commands and replies.

0:07:07.820000 --> 0:07:12.120000
 And there is a well-known, reserved
 TCP port number, which you see here

0:07:12.120000 --> 0:07:16.820000
 is TCP port number 21, which is
 used for the control connection.

0:07:16.820000 --> 0:07:21.120000
 So once again, if I'm the FTP client
 and I'm opening an FTP session with

0:07:21.120000 --> 0:07:27.000000
 you, I will initially send my first
 TCP sin to you on destination port

0:07:27.000000 --> 0:07:30.460000
 number 21. And because you're an FTP
 server, that means you're sitting

0:07:30.460000 --> 0:07:34.240000
 back and you're listening for anybody
 trying to talk to you on port number

0:07:34.240000 --> 0:07:43.080000
 21. And then you'll respond back
 to me with the sin plus ACK.

0:07:43.080000 --> 0:07:48.780000
 So now your TCP port number 21, it will
 be coming to me on whatever random

0:07:48.780000 --> 0:07:53.560000
 ephemeral port number I decided to use
 when I started up this connection.

0:07:53.560000 --> 0:07:57.700000
 Because remember, vast majority of
 times when connections are started,

0:07:57.700000 --> 0:08:01.360000
 only the destination port number is
 a well-known port number for like

0:08:01.360000 --> 0:08:04.060000
 telnet or web browsing or FTP.

0:08:04.060000 --> 0:08:07.700000
 The source port number is typically just
 some random ephemeral port number

0:08:07.700000 --> 0:08:10.420000
 that's a pretty large number, which
 could be it's unpredictable.

0:08:10.420000 --> 0:08:12.800000
 You can't tell what
 that's going to be.

0:08:12.800000 --> 0:08:17.060000
 Okay, so once the control connection is
 established, then the data connection

0:08:17.060000 --> 0:08:22.420000
 happens. Now, there's actually two ways
 this data connection can occur.

0:08:22.420000 --> 0:08:27.980000
 In what's called active mode FTP, it's
 actually the server that initiates

0:08:27.980000 --> 0:08:31.540000
 the TCP data connection, which you might
 think is kind of weird, but let's

0:08:31.540000 --> 0:08:34.120000
 think about this for a moment.

0:08:34.120000 --> 0:08:41.480000
 So when I as a client open up an FTP
 control connection to you, okay,

0:08:41.480000 --> 0:08:45.200000
 so when I do that and that's done,
 you will open up a data connection

0:08:45.200000 --> 0:08:49.000000
 to me and in that data connection is
 where you will show me like your

0:08:49.000000 --> 0:08:52.700000
 directory listing, like the
 display of what you've got.

0:08:52.700000 --> 0:08:59.740000
 So you as the server in an active mode
 FTP actually create a new TCP session

0:08:59.740000 --> 0:09:03.420000
 with me. This is a totally separate
 TCP session now distinct from the

0:09:03.420000 --> 0:09:04.900000
 control connection.

0:09:04.900000 --> 0:09:09.540000
 In this case, you as the FTP
 server are initiating it.

0:09:09.540000 --> 0:09:15.240000
 So when you're initiating it from your
 perspective, your TCP source port

0:09:15.240000 --> 0:09:18.360000
 is source port number 20.

0:09:18.360000 --> 0:09:21.180000
 Now, this is kind of different because
 normally when we think of reserved

0:09:21.180000 --> 0:09:25.400000
 ports, TCP or UDP ports, we think
 of it being a destination.

0:09:25.400000 --> 0:09:29.020000
 But in this particular case, when you're
 opening up the data connection,

0:09:29.020000 --> 0:09:32.720000
 you as a server are using a source port
 of 20 and then you're responding

0:09:32.720000 --> 0:09:39.980000
 to whatever ephemeral port I chose back
 when I initiated my control connection.

0:09:39.980000 --> 0:09:44.060000
 So when I initially create my control
 connection, for example, if it looked

0:09:44.060000 --> 0:09:49.400000
 like this, if this is me establishing
 a control connection and it was

0:09:49.400000 --> 0:09:56.480000
 going to TCP port 21, but the source
 port that I selected was let's say

0:09:56.480000 --> 0:10:03.700000
 5, 5, 1, 1, 1. Okay, so now the
 control connection is done.

0:10:03.700000 --> 0:10:09.620000
 Now you as the server, you will
 initiate the data connection.

0:10:09.620000 --> 0:10:16.040000
 Your source port will be 20 and your
 destination port will be that random

0:10:16.040000 --> 0:10:20.440000
 ephemeral port that I chose way back
 in the beginning when I was doing

0:10:20.440000 --> 0:10:24.400000
 my control connection, which
 will be 5, 5, 1, 1.

0:10:24.400000 --> 0:10:28.360000
 So that is an active
 mode data connection.

0:10:28.360000 --> 0:10:31.320000
 Now there's also something
 called FTP passive mode.

0:10:31.320000 --> 0:10:37.120000
 What's that? So in FTP passive mode,
 what's going to happen is once the

0:10:37.120000 --> 0:10:41.360000
 control connection is done, as part of
 that control connection, I'll actually

0:10:41.360000 --> 0:10:43.440000
 send you a message called passive.


0:10:43.440000 --> 0:10:48.080000
 It's like a command saying passive,
 which means, hey, I want to open up

0:10:48.080000 --> 0:10:49.100000
 the data connection.

0:10:49.100000 --> 0:10:50.360000
 I don't want you to do it.

0:10:50.360000 --> 0:10:51.560000
 I want to do it.

0:10:51.560000 --> 0:10:54.000000
 Now as part of that, when I send you
 the passive command, now this is

0:10:54.000000 --> 0:10:56.200000
 still happening in the control
 connection here.

0:10:56.200000 --> 0:10:58.380000
 We just have this one TCP session.


0:10:58.380000 --> 0:11:01.340000
 When you get the passive command as
 a server, you're going to respond

0:11:01.340000 --> 0:11:06.140000
 back to me with some random ephemeral
 port number that you create.

0:11:06.140000 --> 0:11:07.440000
 That you create.

0:11:07.440000 --> 0:11:08.100000
 What does that mean?

0:11:08.100000 --> 0:11:13.260000
 Well, that means that now when I open
 up another TCP connection, when

0:11:13.260000 --> 0:11:17.760000
 I now open up my data connection, I will
 not be opening up to port number

0:11:17.760000 --> 0:11:21.280000
 20. As a matter of fact, port number 20
 won't be in any part of that second

0:11:21.280000 --> 0:11:26.080000
 stream. I'll be using some random ephemeral
 port number, and I'll be opening

0:11:26.080000 --> 0:11:30.940000
 up my connection to whatever port number
 you previously told me you wanted

0:11:30.940000 --> 0:11:34.540000
 me to use back in that
 control connection.

0:11:34.540000 --> 0:11:40.700000
 So that's how the passive
 FTP passive works.

0:11:40.700000 --> 0:11:43.100000
 All right, so let's
 talk about TFTP.

0:11:43.100000 --> 0:11:47.840000
 Actually, before I do TFTP, before
 we leave FTP, let me just show you

0:11:47.840000 --> 0:11:49.760000
 a quick example of that.

0:11:49.760000 --> 0:11:55.400000
 So there are lots of FTP applications
 that you can download, and like

0:11:55.400000 --> 0:11:57.340000
 I said, you can do
 it in the browser.

0:11:57.340000 --> 0:12:02.100000
 I've got one here that I use,
 which is called Cyberduck.

0:12:02.100000 --> 0:12:05.680000
 This is also free.

0:12:05.680000 --> 0:12:10.600000
 But you can see here with Cyberduck,
 if I go into Open Connection, it

0:12:10.600000 --> 0:12:12.720000
 defaults to FTP.

0:12:12.720000 --> 0:12:15.320000
 Let me zoom in on that a little
 bit so you can see it.

0:12:15.320000 --> 0:12:16.840000
 Get rid of that.

0:12:16.840000 --> 0:12:18.520000
 So here it says FTP.

0:12:18.520000 --> 0:12:24.740000
 I can specify either an IP address,
 or I could specify like a URL name

0:12:24.740000 --> 0:12:26.860000
 of a server I want to go to.

0:12:26.860000 --> 0:12:30.360000
 Notice it's defaulting to port 21, because
 that's for the control connection.

0:12:30.360000 --> 0:12:34.740000
 And then here's where I put my username
 and password, or I could just

0:12:34.740000 --> 0:12:38.440000
 select anonymous, and notice it grays out
 the password, and it will automatically

0:12:38.440000 --> 0:12:42.360000
 send anonymous as the username.

0:12:42.360000 --> 0:12:51.140000
 Now, if you actually want to try out
 FTP, there is actually a website

0:12:51.140000 --> 0:12:54.600000
 that you can go to.

0:12:54.600000 --> 0:13:02.200000
 That is like a, like a, not a website,
 it's a public FTP server, and it's

0:13:02.200000 --> 0:13:04.520000
 right here. Let me
 zoom in on this.

0:13:04.520000 --> 0:13:13.160000
 This first one, speedtest
.teletoo, so T-E-L-E-2.net.

0:13:13.160000 --> 0:13:16.920000
 That's speedtest.teletoo.net.

0:13:16.920000 --> 0:13:21.420000
 And if you go to that, that
 is set up for anonymous.

0:13:21.420000 --> 0:13:25.400000
 Hey, and right now, when I did
 that, just go back to this.

0:13:25.400000 --> 0:13:30.980000
 So if I go to bookmark,
 and then let's see here.

0:13:30.980000 --> 0:13:36.280000
 Well, anyway, this one was set
 up for, can I see it in here?

0:13:36.280000 --> 0:13:41.420000
 Bookmark, demo. I'm not sure how to
 do that in here, but I did set it

0:13:41.420000 --> 0:13:44.220000
 up previously, so what I did
 was I did new connection.

0:13:44.220000 --> 0:13:48.160000
 I put right in here that
 speedtest.teletoo.net.

0:13:48.160000 --> 0:13:52.020000
 I change it to anonymous, and
 that's all I had to do.

0:13:52.020000 --> 0:13:56.620000
 And then when I connected to it, it's
 basically just a simple public FTP

0:13:56.620000 --> 0:13:59.220000
 server where you can upload files.


0:13:59.220000 --> 0:14:02.380000
 I've never actually tried to upload something
 to it, and you can download

0:14:02.380000 --> 0:14:05.480000
 files. And you can see here, there's,
 I would not suggest opening any

0:14:05.480000 --> 0:14:08.420000
 of these, because that might be a little
 risky, but you can at least download

0:14:08.420000 --> 0:14:10.980000
 something to prove that
 FTP is working.

0:14:10.980000 --> 0:14:17.340000
 And I want to show you also in the
 background what it looks like when

0:14:17.340000 --> 0:14:25.680000
 I did that. So here is a wire shark
 snipper capture that I did of the

0:14:25.680000 --> 0:14:31.720000
 FTP process. So this is a whole bunch
 of stuff going on right here.

0:14:31.720000 --> 0:14:37.500000
 So step number one is in order to identify
 the FTP session, well, we know

0:14:37.500000 --> 0:14:40.340000
 that it is TCP, right?

0:14:40.340000 --> 0:14:43.000000
 So I'm going to go here, protocol.


0:14:43.000000 --> 0:14:44.740000
 Now this is UDP, but
 watch what I'm doing.

0:14:44.740000 --> 0:14:49.260000
 Set applies a filter, but I'm going
 to change that from IP protocol.

0:14:49.260000 --> 0:14:54.500000
 Let me zoom in on this
 from a 17 to a six.

0:14:54.500000 --> 0:14:58.300000
 So number one, that just shows
 me all of my TCP based stuff.

0:14:58.300000 --> 0:15:04.420000
 All right. Now, secondly, I know that
 FTP, when it starts, it starts a

0:15:04.420000 --> 0:15:08.100000
 control connection, and that
 starts to TCP port 21.

0:15:08.100000 --> 0:15:11.860000
 So I'll just pick one of
 these random things here.

0:15:11.860000 --> 0:15:20.600000
 And in the TCP header, I'll look for
 right here, TCP header, destination

0:15:20.600000 --> 0:15:24.040000
 port. Now I will add
 this as a filter.

0:15:24.040000 --> 0:15:26.820000
 So select and selected.

0:15:26.820000 --> 0:15:29.740000
 And then once again, I'm going to change
 that because I don't really want

0:15:29.740000 --> 0:15:35.220000
 5, 5, 3, 7. I want port number 21.


0:15:35.220000 --> 0:15:42.580000
 All right. So now this shows me when
 I established the control connection,

0:15:42.580000 --> 0:15:44.300000
 but I want to go even
 further than that.

0:15:44.300000 --> 0:15:46.720000
 I want to see both the control
 and the data connection.

0:15:46.720000 --> 0:15:47.640000
 So I've narrowed it down.

0:15:47.640000 --> 0:15:50.540000
 All of my sniffer trace, I've
 narrowed it down to TCP.

0:15:50.540000 --> 0:15:52.460000
 I narrowed down to port number 21.


0:15:52.460000 --> 0:15:58.080000
 Now what I want to do is I want to
 get rid of my TCP port, and I want

0:15:58.080000 --> 0:16:04.100000
 to see everything to and
 from this IP address.

0:16:04.100000 --> 0:16:07.060000
 Now, of course, I could have done an
 NS lookup and just gotten the IP

0:16:07.060000 --> 0:16:12.740000
 address from the beginning, but this
 is just sort of showing you the steps

0:16:12.740000 --> 0:16:15.020000
 here. And I want to do IP.

0:16:15.020000 --> 0:16:16.540000
 So let's go into this.

0:16:16.540000 --> 0:16:20.040000
 So first of all, do IP.address.

0:16:20.040000 --> 0:16:24.260000
 So that's everything to
 and from that address.

0:16:24.260000 --> 0:16:37.540000
 And now let's get rid
 of port number 21.

0:16:37.540000 --> 0:16:41.760000
 Okay. So this should give
 me the entire process.

0:16:41.760000 --> 0:16:45.860000
 So you can see here, this
 is me 192.168.40.4.

0:16:45.860000 --> 0:16:52.380000
 And you can see that the very first
 it's going to TCP port 21.

0:16:52.380000 --> 0:16:54.080000
 And it is a sin.

0:16:54.080000 --> 0:16:56.120000
 Here's a sin plus ACK.

0:16:56.120000 --> 0:17:01.860000
 So here and here in frame number 81,
 the TCP three way handshake is done.

0:17:01.860000 --> 0:17:05.080000
 And now we begin with FTP.

0:17:05.080000 --> 0:17:13.200000
 So here is the server sending
 a quick response to me.

0:17:13.200000 --> 0:17:18.860000
 Let's bring this up a little bit
 so we can see a little bit more.

0:17:18.860000 --> 0:17:24.640000
 Okay. So in this particular case, I'm
 not going to go into all the gory

0:17:24.640000 --> 0:17:27.480000
 details, but you can see the server
 is responding with the code saying,

0:17:27.480000 --> 0:17:29.380000
 okay, I am ready.

0:17:29.380000 --> 0:17:34.380000
 And I send the command user
 and I send anonymous.

0:17:34.380000 --> 0:17:37.660000
 And then the server responds back
 saying, please give me a password.

0:17:37.660000 --> 0:17:40.020000
 Well, there is no password
 with anonymous.

0:17:40.020000 --> 0:17:44.560000
 So my, in this particular case, cyber
 duck just chose to send a password

0:17:44.560000 --> 0:17:47.920000
 of cyber duck at example.net.

0:17:47.920000 --> 0:17:50.740000
 So now I am logged in.

0:17:50.740000 --> 0:17:56.120000
 And so you can see there's all sorts
 of commands here, EPTR EPSV MDTM.

0:17:56.120000 --> 0:17:59.060000
 You know, what the heck is that stuff
 for the purposes of this video?

0:17:59.060000 --> 0:18:00.380000
 We don't need to know.

0:18:00.380000 --> 0:18:07.440000
 But what I want to show you here is
 that there's a lot more comments.

0:18:07.440000 --> 0:18:10.020000
 So it's a little more complex than
 what you see on the surface.

0:18:10.020000 --> 0:18:15.760000
 Here is where the server is saying, hey,
 I would like to do passive mode.

0:18:15.760000 --> 0:18:22.020000
 Now, if we scroll down a little bit
 more, what we want to see is number

0:18:22.020000 --> 0:18:26.380000
 333. If I scroll down a
 little bit right here.

0:18:26.380000 --> 0:18:30.500000
 This is where the client, this is where
 me, I say, I want to do passive

0:18:30.500000 --> 0:18:33.400000
 mode. Now we learned from the, what
 I just talked about that when the

0:18:33.400000 --> 0:18:37.780000
 client specifies passive mode,
 then the server responds back.

0:18:37.780000 --> 0:18:42.480000
 So no, it's in all this time.

0:18:42.480000 --> 0:18:48.240000
 In all this time, if we, if I
 go back to TCP, it's been 21.

0:18:48.240000 --> 0:18:53.100000
 And this was the random ephemeral port
 that my client selected 54 714.

0:18:53.100000 --> 0:18:55.500000
 It's always going to be 54714.

0:18:55.500000 --> 0:18:56.700000
 Everything up here.

0:18:56.700000 --> 0:19:05.540000
 54714. 54 714. Now at point number 335,
 at frame number 335, at 333, my

0:19:05.540000 --> 0:19:09.880000
 client says, hey, I would like to take
 charge of opening the data connection.

0:19:09.880000 --> 0:19:11.440000
 I would like to do that.

0:19:11.440000 --> 0:19:14.140000
 Okay, now this is all in
 the control connection.

0:19:14.140000 --> 0:19:16.980000
 Now the server responds back
 saying, okay, no problem.

0:19:16.980000 --> 0:19:19.040000
 But here's what I'd like to do.

0:19:19.040000 --> 0:19:21.340000
 So this is the server responding
 back right here.

0:19:21.340000 --> 0:19:26.020000
 He's saying, I would like
 down here under FTP.

0:19:26.020000 --> 0:19:30.740000
 He says, we've been using, you
 know, 54714 the whole time.

0:19:30.740000 --> 0:19:34.300000
 Because Mr. Client, that's the random
 ephemeral port number you started

0:19:34.300000 --> 0:19:38.600000
 with. If you're going to open a new
 connection to me, a data connection,

0:19:38.600000 --> 0:19:46.120000
 says right here, I would like you to
 open it to my port number 24696.

0:19:46.120000 --> 0:19:54.240000
 24696. So from this point on, as
 we go down, we can see 24696.

0:19:54.240000 --> 0:19:58.840000
 So we're not actually using TCP port
 number 20, which is what we would

0:19:58.840000 --> 0:20:02.600000
 see in an active mode
 FTP connection.

0:20:02.600000 --> 0:20:06.620000
 But in a passive mode FTP connection,
 because the client initiated it,

0:20:06.620000 --> 0:20:09.220000
 the server said, fine, I
 can let you initiate it.

0:20:09.220000 --> 0:20:11.980000
 However, let's move over to
 a different port number.

0:20:11.980000 --> 0:20:13.920000
 This is a little bit more secure.

0:20:13.920000 --> 0:20:16.140000
 And so we can see
 here all the data.

0:20:16.140000 --> 0:20:20.620000
 So what was happening right here
 is I was actually doing an FTP.

0:20:20.620000 --> 0:20:24.780000
 And this was just that what I chose
 on the website, if I still have it.

0:20:24.780000 --> 0:20:27.200000
 Let's see here. Do
 I still have it?

0:20:27.200000 --> 0:20:32.580000
 Yeah, I chose to download the smallest
 size possible, the 512 kilobyte

0:20:32.580000 --> 0:20:37.360000
.zip file. And you can see
 this is that download.

0:20:37.360000 --> 0:20:39.420000
 It's going on right here.

0:20:39.420000 --> 0:20:43.520000
 So what's the main takeaway from this
 from a CCT routing and switching

0:20:43.520000 --> 0:20:48.180000
 perspective? Number one, FTP
 is used for file transfers.

0:20:48.180000 --> 0:20:52.320000
 Number two, it utilizes
 TCP to do that.

0:20:52.320000 --> 0:20:58.580000
 Number three, it starts out by creating
 an FTP control connection on port

0:20:58.580000 --> 0:21:02.940000
 21, the reserve TCP port 21
 for the control connection.

0:21:02.940000 --> 0:21:07.620000
 After that, the data is actually
 exchanged on a data connection.

0:21:07.620000 --> 0:21:17.960000
 And the data connection can
 happen in one of two ways.

0:21:17.960000 --> 0:21:22.000000
 The TCP means that the client
 initiates the data connection.

0:21:22.000000 --> 0:21:26.100000
 And I guess the sixth point would be
 FTP is a lot more complicated than

0:21:26.100000 --> 0:21:29.780000
 you need to know for the CCT
 routing and switching exam.

0:21:29.780000 --> 0:21:33.180000
 There's a lot of things that FTP can do,
 a lot of commands, a lot of options

