NET323 D: NETWORKS PROTOCOLS - WordPress.com · · 2015-11-27NET323 D: NETWORKS PROTOCOLS ... Lab...
Transcript of NET323 D: NETWORKS PROTOCOLS - WordPress.com · · 2015-11-27NET323 D: NETWORKS PROTOCOLS ... Lab...
NET323 D:
NETWORKS PROTOCOLS
Lab # 10: FTP “File Transfer Protocol” Networks and Communication
Systems Department
TA. Anfal AlHazzaa
1
Lab Objectives 2
To understand how FTP works
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Lab Content
What is FTP (File Transfer Protocol)?
More info about FTP
FTP commands and replies
Common FTP commands
FTP replies
Scenario # 1: FTP (File Transfer Protocol)
3
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
What is FTP (File Transfer Protocol)?
4
The File Transfer Protocol (FTP) is a standard network
protocol used to transfer computer files from one host to
another host over a TCP-based network, such as the
Internet.
FTP is built on a client-server architecture and uses
separate control and data connections between the client
and the server
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
More info about FTP
5
There are two players involved in any FTP transfer
1. The server or the site which is hosting the files
2. The client which contacts the server and requests to transfer a file.
To access FTP sever :
1. Most operating systems have a built in command line FTP client with which you would have to get familiar with the commands.
2. You can use your browser
3. You can download a specific software to run as a FTP client.
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
More info about FTP
6
What you will need:
1. The address of the FTP server you wish to
communicate with (This can be an IP address or
a domain name)
2. The login credentials for a FTP account on the
server (you don’t need this for anonymous or
public FTP).
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
FTP commands and replies
7
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Common FTP commands
8
Command Description
? to request help or information about the FTP commands
cd to change directory on the remote machine
delete to delete (remove) a file in the current remote directory
dir To give a full directory listing on the remote machine
get to find out the pathname of the current directory on the remote machine
help to request a list of all available FTP commands
pwd to find out the pathname of the current directory on the remote machine
put to copy one file from the local machine to the remote machine
quit to exit the FTP environment (same as bye
rename to change the name of file
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
FTP replies
9
Every FTP command generates at least one response.
A response has two parts: a three digit number followed by text.
e.g.
The numeric part defines the code.
The first digit and second defines the status of the command.
The third digit provides additional information
the text part defines needed parameters or extra explanations.
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Scenario # 1: FTP (File Transfer Protocol)
10
1. Create a simple LAN contains two clients and FTP
server connected by switch (as shown in the figure)
2. Configure FTP server
3. Download a file from the FTP server
4. Upload a file to the FTP server
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
1. Open The Packet tracer
2. Add two PCs and one Server-PT to your workspace
3. Rename them and set their IPs as follows:
Step 1 : Create the network
11
Device Type Device name IP Mask
PC Client 1 192.168.1.1 255.255.255.0
PC Client 2 192.168.1.2 255.255.255.0
Server FTP Server 192.168.1.254 255.255.255.0
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 1 : Create the network cont.
12
4. Drag Switch-PT to the workspace
5. Using Copper Straight-through cable connect the
end devices to the switch as follows:
Device name Switch ports
Client 1 Fast Ethernet 0/1
Client 2 Fast Ethernet 1/1
FTP Server Fast Ethernet 2/1
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 2 : FTP Configuration .
13
Click on the FTP Server then do the following steps:
1
2
3. Turn FTP on
4. Create a new user by
typing your name as
username and password
5. Select the permissions
that you want to grant to
the user .
List of files stored on the FTP server
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 2: Connect to FTP server (client 1)
14
Click on client 1 “Desktop” tap Command Prompt
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 2: Connect to FTP server (client 1) cont.
15
To connect to a FTP server, write the following
command
ftp 192.168.1.254
ftp command used to
connect to FTP server IP address of the FTP
server
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 2: Connect to FTP server (client 1) cont.
16
Then type the username and password of the FTP
server
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
List all available FTP commands
17
Use help command to list all available FTP
command
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 3: Download a file
18
Use dir command to list the files stored in the FTP
server
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 3: Download a file
19
Use dir command to list the files stored in the FTP
server
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 3: Download a file
20
We want to download the file number 16 so copy
the name of the file.
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 3: Download a file
21
Use get command followed by the file name to
download it to your computer
Type get followed by the name of
the file (paste the file name which
you copied in the previous step)
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
To view the directory of your computer
22
Use quit command to end the FTP session
Now you are in the C drive of your computer
Use dir command to list the files stored on your
computer.
You should find the file which
you downloaded from the FTP
server
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 4: Upload a file
23
Firstly , we will create a text file using text editor
To open the text editor (Click on client 1
“Desktop” tap Text)
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 4: Upload a file
24
To save your text file ( file menu save)
Name the file “Hello”
Networks and Communication Department - Prepared by : TA. Anfal AlHazzaa
To view the directory of your computer
25
Use dir command to list the files stored on your
computer.
You should find the file which
you created in the previous step
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 4: Upload a file
26
Login again to the FTP server
Use put command followed by the file name to
upload it to your computer
Type put followed by the name of
the file (Hello.txt)
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Step 4: Upload a file
27
Use dir command to list the files stored on FTP
server you should find “Hello.txt” file
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa
Rename and Delate a file
28
Try to rename the Hello.txt file to Hi.txt using
rename command
rename oldname newname
Try to delete the Hello.txt file using delete
command
delete filename
Networks and Communication Systems Department – Prepared By: TA. Anfal AlHazzaa