12.4.4 Packet Tracer - Use FTP Services Answers

Packet Tracer Packet Tracer Labs Original source

Same for: 16.5.3 Packet Tracer - Use FTP Services

12.4.4 Packet Tracer - Use FTP Services Answers

Addressing Table

Device Interface IP Address Subnet Mask
FTP Server (ftp.pka) NIC 209.165.200.226 255.255.255.224

Objectives

Background / Scenario

File Transfer Protocol (FTP) is a commonly used application to transfer files between clients and servers on the network. The server is configured to run the service where clients connect, login, and transfer files. FTP uses port 21 as the server command port to create the connection. FTP then uses port 20 for data transfer.

In this activity, you will upload a file to an FTP server. You will also download a file from an FTP server.

Instructions

Part 1: Upload a file to an FTP server.

In this part, you will locate the file sampleFile.txt and upload it to an FTP server.

Step 1: Locate the file.

a. Click PC-A.

b. Click Desktop.

c. Click Command Prompt.

d. At the prompt, click ? to list the available commands.

e. Enter dir to see the files on the PC. Notice that there is a sampleFile.txt file in the C:\ directory.

Copy

C:\>dir

 

 Volume in drive C has no label.

 Volume Serial Number is 5E12-4AF3

 Directory of C:\



1/1/1970    7:0 PM             26        sampleFile.txt      

                26 bytes            1 File(s)
Step 2: Connect to the FTP server.

a. FTP to the FTP server at 209.165.200.226 or ftp.pka.

Copy

C:\>ftp 209.165.200.226

Trying to connect...209.165.200.226

Connected to 209.165.200.226

220- Welcome to PT Ftp server

Username:

b. Enter the username student and password class to gain access.

Copy

220- Welcome to PT Ftp server

Username:student

331- Username ok, need password

Password:

230- Logged in

(passive mode On)

ftp>
Step 3: Upload a file to an FTP server.

a. Enter ? to see the commands available in the ftp client.

Copy

ftp> ?

        ?

        cd

        delete

        dir

        get

        help

        passive

        put

        pwd

        quit

        rename

ftp>

b. Enter dir to see the files available on the server.

Copy

ftp>dir



Listing /ftp directory from 209.165.200.226: 

0   : asa842-k8.bin                                      5571584

1   : asa923-k8.bin                                      30468096

2   : c1841-advipservicesk9-mz.124-15.T1.bin             33591768

3   : c1841-ipbase-mz.123-14.T7.bin                      13832032

4   : c1841-ipbasek9-mz.124-12.bin                       16599160

5   : c1900-universalk9-mz.SPA.155-3.M4a.bin             33591768

6   : c2600-advipservicesk9-mz.124-15.T1.bin             33591768

7   : c2600-i-mz.122-28.bin                              5571584

8   : c2600-ipbasek9-mz.124-8.bin                        13169700

9   : c2800nm-advipservicesk9-mz.124-15.T1.bin           50938004

10  : c2800nm-advipservicesk9-mz.151-4.M4.bin            33591768

11  : c2800nm-ipbase-mz.123-14.T7.bin                    5571584

12  : c2800nm-ipbasek9-mz.124-8.bin                      15522644

13  : c2900-universalk9-mz.SPA.155-3.M4a.bin             33591768

14  : c2950-i6q4l2-mz.121-22.EA4.bin                     3058048

15  : c2950-i6q4l2-mz.121-22.EA8.bin                     3117390

16  : c2960-lanbase-mz.122-25.FX.bin                     4414921

17  : c2960-lanbase-mz.122-25.SEE1.bin                   4670455

18  : c2960-lanbasek9-mz.150-2.SE4.bin                   4670455

19  : c3560-advipservicesk9-mz.122-37.SE1.bin            8662192

20  : c3560-advipservicesk9-mz.122-46.SE.bin             10713279

21  : c800-universalk9-mz.SPA.152-4.M4.bin               33591768

22  : c800-universalk9-mz.SPA.154-3.M6a.bin              83029236

23  : cat3k_caa-universalk9.16.03.02.SPA.bin             505532849

24  : cgr1000-universalk9-mz.SPA.154-2.CG                159487552

25  : cgr1000-universalk9-mz.SPA.156-3.CG                184530138

26  : ir800-universalk9-bundle.SPA.156-3.M.bin           160968869

27  : ir800-universalk9-mz.SPA.155-3.M                   61750062

28  : ir800-universalk9-mz.SPA.156-3.M                   63753767

29  : ir800_yocto-1.7.2.tar                              2877440

30  : ir800_yocto-1.7.2_python-2.7.3.tar                 6912000

31  : pt1000-i-mz.122-28.bin                             5571584

32  : pt3000-i6q4l2-mz.121-22.EA4.bin                    3117390

c. Enter put sampleFile.txt to send the file to the server.

Copy

ftp> put sampleFile.txt



Writing file sampleFile.txt to 209.165.200.226:

File transfer in progress…



[Transfer complete – 26 bytes]



26 bytes copied in 0.08 secs (325 bytes/sec)

ftp>

d. Use the dir command again to list the contents of the FTP server to verify that the file has been uploaded to the FTP server.

Copy

ftp>dir



Listing /ftp directory from 209.165.200.226: 

0   : asa842-k8.bin                                      5571584

1   : asa923-k8.bin                                      30468096

2   : c1841-advipservicesk9-mz.124-15.T1.bin             33591768

3   : c1841-ipbase-mz.123-14.T7.bin                      13832032

4   : c1841-ipbasek9-mz.124-12.bin                       16599160

5   : c1900-universalk9-mz.SPA.155-3.M4a.bin             33591768

6   : c2600-advipservicesk9-mz.124-15.T1.bin             33591768

7   : c2600-i-mz.122-28.bin                              5571584

8   : c2600-ipbasek9-mz.124-8.bin                        13169700

9   : c2800nm-advipservicesk9-mz.124-15.T1.bin           50938004

10  : c2800nm-advipservicesk9-mz.151-4.M4.bin            33591768

11  : c2800nm-ipbase-mz.123-14.T7.bin                    5571584

12  : c2800nm-ipbasek9-mz.124-8.bin                      15522644

13  : c2900-universalk9-mz.SPA.155-3.M4a.bin             33591768

14  : c2950-i6q4l2-mz.121-22.EA4.bin                     3058048

15  : c2950-i6q4l2-mz.121-22.EA8.bin                     3117390

16  : c2960-lanbase-mz.122-25.FX.bin                     4414921

17  : c2960-lanbase-mz.122-25.SEE1.bin                   4670455

18  : c2960-lanbasek9-mz.150-2.SE4.bin                   4670455

19  : c3560-advipservicesk9-mz.122-37.SE1.bin            8662192

20  : c3560-advipservicesk9-mz.122-46.SE.bin             10713279

21  : c800-universalk9-mz.SPA.152-4.M4.bin               33591768

22  : c800-universalk9-mz.SPA.154-3.M6a.bin              83029236

23  : cat3k_caa-universalk9.16.03.02.SPA.bin             505532849

24  : cgr1000-universalk9-mz.SPA.154-2.CG                159487552

25  : cgr1000-universalk9-mz.SPA.156-3.CG                184530138

26  : ir800-universalk9-bundle.SPA.156-3.M.bin           160968869

27  : ir800-universalk9-mz.SPA.155-3.M                   61750062

28  : ir800-universalk9-mz.SPA.156-3.M                   63753767

29  : ir800_yocto-1.7.2.tar                              2877440

30  : ir800_yocto-1.7.2_python-2.7.3.tar                 6912000

31  : pt1000-i-mz.122-28.bin                             5571584

32  : pt3000-i6q4l2-mz.121-22.EA4.bin                    3117390

33  : sampleFile.txt                                     26

ftp>

Part 2: Download a file from an FTP server.

You can also download a file from an FTP server. In this part, you will rename the file sampleFile.txt and download it from the FTP server.

Step 1: Rename the file on an FTP server.

a. At the ftp> prompt, rename the file sampleFile.txt to sampleFile_FTP.txt.

Copy

ftp> rename sampleFile.txt sampleFile_FTP.txt



Renaming sampleFile.txt

ftp>

[OK Renamed file successfully from sampleFile.txt to sampleFile_FTP.txt]

ftp>

b. At the ftp> prompt, enter dir to verify the file has been renamed.

Copy

ftp>dir



Listing /ftp directory from 209.165.200.226: 

0   : asa842-k8.bin                                      5571584

1   : asa923-k8.bin                                      30468096

2   : c1841-advipservicesk9-mz.124-15.T1.bin             33591768

3   : c1841-ipbase-mz.123-14.T7.bin                      13832032

4   : c1841-ipbasek9-mz.124-12.bin                       16599160

5   : c1900-universalk9-mz.SPA.155-3.M4a.bin             33591768

6   : c2600-advipservicesk9-mz.124-15.T1.bin             33591768

7   : c2600-i-mz.122-28.bin                              5571584

8   : c2600-ipbasek9-mz.124-8.bin                        13169700

9   : c2800nm-advipservicesk9-mz.124-15.T1.bin           50938004

10  : c2800nm-advipservicesk9-mz.151-4.M4.bin            33591768

11  : c2800nm-ipbase-mz.123-14.T7.bin                    5571584

12  : c2800nm-ipbasek9-mz.124-8.bin                      15522644

13  : c2900-universalk9-mz.SPA.155-3.M4a.bin             33591768

14  : c2950-i6q4l2-mz.121-22.EA4.bin                     3058048

15  : c2950-i6q4l2-mz.121-22.EA8.bin                     3117390

16  : c2960-lanbase-mz.122-25.FX.bin                     4414921

17  : c2960-lanbase-mz.122-25.SEE1.bin                   4670455

18  : c2960-lanbasek9-mz.150-2.SE4.bin                   4670455

19  : c3560-advipservicesk9-mz.122-37.SE1.bin            8662192

20  : c3560-advipservicesk9-mz.122-46.SE.bin             10713279

21  : c800-universalk9-mz.SPA.152-4.M4.bin               33591768

22  : c800-universalk9-mz.SPA.154-3.M6a.bin              83029236

23  : cat3k_caa-universalk9.16.03.02.SPA.bin             505532849

24  : cgr1000-universalk9-mz.SPA.154-2.CG                159487552

25  : cgr1000-universalk9-mz.SPA.156-3.CG                184530138

26  : ir800-universalk9-bundle.SPA.156-3.M.bin           160968869

27  : ir800-universalk9-mz.SPA.155-3.M                   61750062

28  : ir800-universalk9-mz.SPA.156-3.M                   63753767

29  : ir800_yocto-1.7.2.tar                              2877440

30  : ir800_yocto-1.7.2_python-2.7.3.tar                 6912000

31  : pt1000-i-mz.122-28.bin                             5571584

32  : pt3000-i6q4l2-mz.121-22.EA4.bin                    3117390

33  : sampleFile_FTP.txt                                 26

ftp>
Step 2: Download the file from the FTP server.

a. Enter the command get sampleFile_FTP.txt to retrieve the file from the server.

Copy

ftp> get sampleFile_FTP.txt



Reading file sampleFile_FTP.txt from 209.165.200.226:

File transfer in progress…



[Transfer complete – 26 bytes]



26 bytes copied in 0.013 secs (2000 bytes/sec)

ftp>

b. Enter quit to exit the FTP client when finished.

c. Display the contents of the directory on the PC again to see the image file from the FTP server.

Copy

ftp>quit



221- Service closing control connection.

C:\>dir

 

 Volume in drive C has no label.

 Volume Serial Number is 5E12-4AF3

 Directory of C:\



1/1/1970    7:0 PM             26        sampleFile.txt      

1/1/1970    7:0 PM             26        sampleFile_FTP.txt  

                52 bytes            2 File(s)     

C:\>
Step 3: Delete the file from the FTP server.

a. Log into the FTP server again to delete the file sampleFile_FTP.txt.

b. Enter the command to delete the file sampleFile_FTP.txt from the server.

What command did you use to remove the file from the FTP server?

ftp> delete sampleFile_FTP.txt

c. Enter quit to exit the FTP client when finished.

Copy

C:\>ftp 209.165.200.226

Trying to connect...209.165.200.226

Connected to 209.165.200.226

220- Welcome to PT Ftp server

Username:student

331- Username ok, need password

Password:

230- Logged in

(passive mode On)

ftp>delete sampleFile_FTP.txt



Deleting file sampleFile_FTP.txt from 209.165.200.226: ftp>

[Deleted file sampleFile_FTP.txt successfully ]

ftp>dir



Listing /ftp directory from 209.165.200.226: 

0   : asa842-k8.bin                                      5571584

1   : asa923-k8.bin                                      30468096

2   : c1841-advipservicesk9-mz.124-15.T1.bin             33591768

3   : c1841-ipbase-mz.123-14.T7.bin                      13832032

4   : c1841-ipbasek9-mz.124-12.bin                       16599160

5   : c1900-universalk9-mz.SPA.155-3.M4a.bin             33591768

6   : c2600-advipservicesk9-mz.124-15.T1.bin             33591768

7   : c2600-i-mz.122-28.bin                              5571584

8   : c2600-ipbasek9-mz.124-8.bin                        13169700

9   : c2800nm-advipservicesk9-mz.124-15.T1.bin           50938004

10  : c2800nm-advipservicesk9-mz.151-4.M4.bin            33591768

11  : c2800nm-ipbase-mz.123-14.T7.bin                    5571584

12  : c2800nm-ipbasek9-mz.124-8.bin                      15522644

13  : c2900-universalk9-mz.SPA.155-3.M4a.bin             33591768

14  : c2950-i6q4l2-mz.121-22.EA4.bin                     3058048

15  : c2950-i6q4l2-mz.121-22.EA8.bin                     3117390

16  : c2960-lanbase-mz.122-25.FX.bin                     4414921

17  : c2960-lanbase-mz.122-25.SEE1.bin                   4670455

18  : c2960-lanbasek9-mz.150-2.SE4.bin                   4670455

19  : c3560-advipservicesk9-mz.122-37.SE1.bin            8662192

20  : c3560-advipservicesk9-mz.122-46.SE.bin             10713279

21  : c800-universalk9-mz.SPA.152-4.M4.bin               33591768

22  : c800-universalk9-mz.SPA.154-3.M6a.bin              83029236

23  : cat3k_caa-universalk9.16.03.02.SPA.bin             505532849

24  : cgr1000-universalk9-mz.SPA.154-2.CG                159487552

25  : cgr1000-universalk9-mz.SPA.156-3.CG                184530138

26  : ir800-universalk9-bundle.SPA.156-3.M.bin           160968869

27  : ir800-universalk9-mz.SPA.155-3.M                   61750062

28  : ir800-universalk9-mz.SPA.156-3.M                   63753767

29  : ir800_yocto-1.7.2.tar                              2877440

30  : ir800_yocto-1.7.2_python-2.7.3.tar                 6912000

31  : pt1000-i-mz.122-28.bin                             5571584

32  : pt3000-i6q4l2-mz.121-22.EA4.bin                    3117390

ftp>quit



221- Service closing control connection.

C:\>

Download Packet Tracer (.pka) file:

Icon

12.4.4 Packet Tracer - Use FTP Services .pka

1 file(s) 355.41 KB

Download

← All Packet Tracer articles Home