exp10

Download as pdf or txt
Download as pdf or txt
You are on page 1of 12

Course: Computer Network Lab

PART A

(PART A: TO BE REFFERED BY STUDENTS)

Experiment No.10

A.1 Objective:

a) Configure FTP Services on Servers


b) Upload a File to the FTP Server
c) Download a File from the FTP Server
A.2 Prerequisite:
• Knowledge about LAN, MAN and WAN and NW Elements.
• Linux NW Commands
• HW and IP Address concepts.
• Concept of Port, Socket, Localhost, Client and Server,
• Client and Server
• Application Layer protocols and application servers
• NW libraries.

A.3 Outcome:
After successful completion of this experiment students will be able to

• Ability to configure FTP server


• Ability to establish connection with server
• Ability to upload a file on the FTP server
• Ability to Download the File from FTP server

A.4 Theory/Tutorial:

File Transfer Protocol (FTP) is a standard Internet protocol for transmitting files between
computers on the Internet over TCP/IP connections.

FTP is a client-server protocol that relies on two communications channels between client and
server: a command channel for controlling the conversation and a data channel for transmitting
file content. Clients initiate conversations with servers by requesting to download a file. Using
FTP, a client can upload, download, delete, rename, move and copy files on a server. A user
typically needs to log on to the FTP server, although some servers make some or all of their
content available without login, also known as anonymous FTP.

FTP sessions work in passive or active modes. In active mode, after a client initiates a session via
a command channel request, the server initiates a data connection back to the client and begins
transferring data. In passive mode, the server instead uses the command channel to send the client
the information it needs to open a data channel. Because passive mode has the client initiating all
connections, it works well across firewalls and Network Address Translation (NAT) gateways.
References:

1. https://static-course-
assets.s3.amazonaws.com/IntroNet50ENU/files/10.2.3.2%20Packet%20T
racer%20-%20FTP%20Instructions.pdf
2. https://www.youtube.com/watch?v=6R7EnoWrw0o
3. https://youtu.be/m8_IP74PEm8

PART B

(PART B : TO BE COMPLETED BY STUDENTS)


B.1 Docent created by the student
B.2 Observations and learning:

We were able to configure FTP server, establish connection with server, upload a file on
the FTP server and download the File from FTP server.

B.3 Conclusion:

In conclusion, the experiment provided valuable insights into the setup and utilization
of FTP services, enhancing practical skills related to file transfer protocols and server
management.

B.4 Question of Curiosity:


1. Write the different protocols used in Application layer.
Ans - Protocols Used in the Application Layer:

1. HTTP (Hypertext Transfer Protocol):


- Used for transmitting hypertext over the internet. The foundation for data
communication on the World Wide Web.

2. HTTPS (Hypertext Transfer Protocol Secure):


- The secure version of HTTP, encrypted with SSL/TLS protocols for secure
data transfer.

3. FTP (File Transfer Protocol):


- Used for transferring files between a client and a server on a computer
network.

4. SMTP (Simple Mail Transfer Protocol):


- Responsible for sending emails.

5. DNS (Domain Name System):


- Resolves domain names to IP addresses, facilitating the translation between
user-friendly domain names and numeric IP addresses.

6. SNMP (Simple Network Management Protocol):


- Used for collecting and organizing information about managed devices on
IP networks and for modifying that information to change device behavior.

7. NTP (Network Time Protocol):


- Synchronizes the clocks of computer systems over a network.
These protocols facilitate various application layer services, enabling
communication and data exchange between software applications.

2. What are the ports used for FTP?


Ans - FTP (File Transfer Protocol) uses two separate channels for
communication: the command channel and the data channel. The default ports
associated with FTP are as follows:

1. FTP Command Channel:


- Port 21 (TCP) is the default port for the FTP command channel.
- This is where commands and responses between the client and server are
exchanged.

2. FTP Data Channel:


- Port 20 (TCP) is the default port for the FTP data channel in active mode.
- In passive mode, a random port within a specified range is used for the data
channel. This range is typically higher port numbers, such as 1024 to 65535.

So, for a standard FTP connection:


- Command Channel: Port 21 (TCP)
- Data Channel (Active Mode): Port 20 (TCP) for data transfer from server to
client
- Data Channel (Passive Mode): Random port within a specified range for data
transfer from client to server

3. Examples of FTP applications?


Ans – Examples of FTP Applications:
1. FileZilla*
- A popular open-source FTP client and server software available for
Windows, Linux, and macOS.

2. WinSCP:
- A free and open-source SFTP, FTP, WebDAV, Amazon S3, and SCP client
for Microsoft Windows.

3. Cyberduck:
- An open-source client for FTP and SFTP, among other protocols. It's
available for both Windows and macOS.

4. File Explorer (Windows):


- Windows File Explorer supports FTP as a network location, allowing users
to access FTP servers directly.

5. Fetch (macOS):
- A full-featured FTP, SFTP, and FTPS client for macOS.
6. Vsftpd (Very Secure FTP Daemon):
- An FTP server software for Unix-like systems, known for its focus on
security.

7. ProFTPD:
- A versatile, modular FTP server software for Unix-like operating systems.

8. CuteFTP:
- A proprietary FTP client application that provides a graphical interface for
file transfers.
9. SmartFTP:
- An FTP client for Windows that supports FTP, FTPS, SFTP, WebDAV,
Amazon S3, Backblaze B2, Google Drive, OneDrive, and more.

10. lftp:
- A powerful command-line FTP client for Unix-like systems.

11. Telnet:

- Allows a user to log into another computer over a network, execute


c commands in a remote machine, and manage network devices.

12. DHCP (Dynamic Host Configuration Protocol):

- Assigns IP addresses dynamically to devices on a network.

4. Which transport layer protocol is used by FTP? Give reason


Ans – FTP (File Transfer Protocol) primarily uses two transport layer protocols:

1. TCP (Transmission Control Protocol):


- Reason: FTP relies on the reliable and connection-oriented features of TCP.
TCP ensures that data is delivered accurately and in the correct order. It
establishes a connection between the FTP client and server before data transfer
begins, and it manages acknowledgments and retransmissions to guarantee
reliable delivery.

2. UDP (User Datagram Protocol):


- Reason: In some cases, FTP can use UDP for the data transfer channel,
especially in active mode FTP. However, UDP is less commonly used in FTP
due to its connectionless nature and lack of built-in reliability features. TCP is
preferred for the control channel and data channel in passive mode because it
provides a more robust and dependable communication method.

In summary, while FTP can technically use both TCP and UDP, TCP is the
more prevalent choice, especially for the control channel, where reliability is
crucial for successful file transfer operations.

5. What are DNS, TELNET, DHCP and HTTP protocols?


Ans – DNS (Domain Name System):
- Purpose: Resolves domain names to IP addresses.
- Port: Typically uses both UDP (Port 53) and TCP (Port 53).

TELNET:
- Purpose: Allows a user to log into another computer over a network, execute
commands in a remote machine, and manage network devices.
- Port: Uses TCP Port 23.

DHCP (Dynamic Host Configuration Protocol):


- Purpose: Assigns IP addresses dynamically to devices on a network.
- Port: Uses UDP Port 67 (server) and Port 68 (client).

HTTP (Hypertext Transfer Protocol):


- Purpose: Foundation for data communication on the World Wide Web, used
for transmitting hypertext.
- Port: Defaults to TCP Port 80, and HTTPS (secured version) uses TCP Port
443.

6. What is SMTP? Where this protocol is used?


Ans - SMTP (Simple Mail Transfer Protocol):
- Purpose: SMTP is a protocol used for sending emails between servers. It
defines the rules and conventions for communication between mail servers to
facilitate the transfer of electronic mail.
- Usage: SMTP is primarily used for sending emails. When you send an email,
your email client (such as Outlook or Gmail) uses SMTP to send the email to
the email server. The recipient's email server also uses SMTP to communicate
and accept the incoming email.

In summary, SMTP is a fundamental protocol for the transmission of emails


over the internet, ensuring that emails are sent, relayed, and received
accurately between mail servers.

You might also like