0% found this document useful (0 votes)
8 views24 pages

Comp. Networks Lab Manual 6

The document outlines a lab manual for implementing an FTP server using Cisco Packet Tracer, detailing the setup process and various tasks such as user creation, file upload, and download. It explains the client-server architecture of FTP, the importance of secure transmission, and provides step-by-step examples for configuring FTP on a network. Additionally, it covers commands for file operations and demonstrates how to upload files to both FTP and HTTP directories using the FTP client on a laptop.

Uploaded by

shahsadeem062
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views24 pages

Comp. Networks Lab Manual 6

The document outlines a lab manual for implementing an FTP server using Cisco Packet Tracer, detailing the setup process and various tasks such as user creation, file upload, and download. It explains the client-server architecture of FTP, the importance of secure transmission, and provides step-by-step examples for configuring FTP on a network. Additionally, it covers commands for file operations and demonstrates how to upload files to both FTP and HTTP directories using the FTP client on a laptop.

Uploaded by

shahsadeem062
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 24

COMPUTER NETWORKS (LAB MANUAL)

FTP SERVER IMPLEMENTATION ON CISCO PACKET TRACER – 06

Lab Task:
 FTP Server Implementation

The File Transfer Protocol (FTP) is a standard network protocol used for the transfer
of computer files between a client and server on a computer network

How to Setup FTP Server in Packet Tracer


Introduction
FTP employs a client-server architecture whereby the client machine has an FTP client installed
and establishes a connection to an FTP server running on a remote machine. After the connection
has been established and the user is successfully authenticated, the data transfer phase can begin.
Although FTP does support user authentication, all data is sent in clear text, including usernames
and passwords. For secure transmission that protects the username and password, and encrypts
the content, FTP is often secured with SSL/TLS (FTPS) or replaced with SSH File Transfer
Protocol (SFTP).

Let’s now do FTP configuration in Packet Tracer:

Example 1:
Recall previous HTTP Server Configuration network topology as shown in below figure.
 A user can upload and download file from FTP server. Create user for authorization to
access file from FTP server.
User Name & Password

Existing Available Files


on FTP Server

 Create two users with different names and permission as shown in below figures.
 Now access FTP Server from PC1 with a user name and password as shown in below
figure.

 Type (?) to view all available command


File Serial No.

File Name

File Size

 Download a file from FTP server to PC-0. Steps are shown in below figures.
 Now upload a file on FTP server from PC-0. Steps are shown in below figures.
Now Open PC-0 Command prompt to view newly created text file as shown in next figure.
 Upload this (hello.txt) file on ftp server with FTP server username and password. Steps
are shown in below figures.
 Rename a file on FTP server shown in below figure.
 Now download file from FTP Server on PC-3 as shown in below figures.
 Now again access FTP server with “abc” user name which has least privileges and try to
rename and delete this “DCCN.txt” file. It will not allow due to less user privileges or
rights as shown in below figures.
 Now try to rename and delete this file on pc-0 which has full privileges. It will allow to
change file name as shown in below figures.
****************************************************

Example 2
1. Build the network topology.
2. Configure static IP addresses on the Laptop and the server.

Laptop: IP address: 192.168.1.1 Subnet Mask: 255.255.255.0

Server: IP address: 192.168.1.2 Subnet Mask: 255.255.255.0

3. Now try using an FTP client built in the Laptop to send files to an FTP server configured in
the Server.

From the Laptop’s command prompt, FTP the server using the server IP address by typing:

ftp 192.168.1.2

Provide the username (cisco) and password (cisco) [which are the defaults] for ftp login.

You are now in the FTP prompt .

PC0 has an FTP client which can be used to read, write, delete and rename files present in the
FTP server.

The FTP server can be used to read and write configuration files as well as IOS images.
Additionally, the FTP server also supports file operations
such rename, delete and listing directory.

With that in mind, we can do something extra. So let’s do this:

4. Create a file in the Laptop then upload it to the server using FTP.
To do this, open the Text Editor in the Laptop, create a file and give it your name of choice.

Type any text in the editor then save your file. e.g. myFile.txt.

5. Now upload the file from the Laptop to the server using FTP. (An FTP connection has to be
started first. But this is what we’ve done in step 3). So to do an FTP upload, we’ll type:

put MyFile.txt

6. Once file upload is successful, go to the Server FTP directory to verify if the file sent has been
received. To do this, go to Server-> Services->FTP. Here look for MyFile.txt sent from the
laptop.
Something extra: To check other FTP commands supported by the FTP client running on the Laptop
(or PC), you can use a question mark (?) on the Laptop’s command prompt as shown below:

You can see the put command that we used to upload our file to the FTP server. Other
commands listed include:

get-used to get(download) a file from the server.

For example: get MyFile.txt

delete– to delete a file in the FTP directory with the server

For example: delete MyFile.txt

Rename– used to Rename a file

cd – used to change directory.

For example, we can open an HTTP directory in the server by typing: cd /http. This will change
the current directory from FTP directory to HTTP directory

Once the http directory is open, you can upload a file to the HTTP server. You’re now uploading
a file to an HTTP folder (directory) using FTP.

For example: put MyFile.txt

To see this working, let’s open an HTTP directory and upload(put) a file to it using FTP:
You can now check up in the HTTP directory in the server and verify that the file uploaded from the
Laptop (MyFile.txt) is well received:

Notice that we are uploading files to an HTTP Server directory using File Transfer
Protocol.(FTP). This is what actually happens when you use an FTP client such as FileZilla
client to upload files to a website. In our case here, we are using an FTP client built-in the
Laptop.

This may interest you : T he first FTP client applications were command-
line programs developed before operating systems had graphical user interfaces, and are still
shipped with most Windows and Linux operating systems. (Actually this is what we have been
using this far). Many FTP clients (e.g. FileZilla) and automation utilities have since been
developed for desktops, servers, mobile devices, and hardware. FTP has also been incorporated
into productivity applications, such as HTML EDITORS.

We’ll create an html file in our Laptop, upload it to HTTP server directory using FTP, then try
to access the file from the Laptop’s browser.
On the Laptop, open the text editor, then type some markup (html) and save the file with the
extension .HTML. See all this below:

Save your file as an html file like this:

Now upload the file ( File2.html) to the HTTP server using FTP. If you’re already in the HTTP
directory, you just need to type: put File2.html. If no, first ftp the serve (ftp 192.168.1.2), provide
the login username (cisco) and password(cisco); change the current directory to HTTP(cd /http) ,
and finally upload the html file onto the HTTP directory(put File2.html)
Moving on…

Check whether the html file uploaded has been received in the HTTP directory:

Go to Server->Services-> HTTP. Then look up for the file in the File Manager.
Now edit index.html file in the HTTP directory so as to include a link to File2 that we’ve just
uploaded. This will make File2 accessible from the Laptop’s browser. To do this,
locate index.html then click edit. Proceed to edit it as shown below. Then save and accept
overwrite.

Finally, try to access the newly uploaded file from the Laptop’s browser. So go to the Laptop’s
browser and access the server using the server’s IP address. By doing this, the browser is making
an http request to the server. The server will respond to the Laptop with the index.html file
containing a link to File2 which we’ve uploaded from the Laptop using FTP.
Click File2 link to view the contents of the file in the browser.

You might also like