- 2073 Bhadra · 4+6 marks
Client/server architecture and FTP operation
Short answer
Client/server architecture splits work between requesting clients and a central server, giving central control and scalability but a single point of failure and server cost. FTP uses a control connection on port 21 and a separate data connection; active mode has the server initiate data, passive mode has the client initiate, with anonymous and authenticated variants.
Define client/server architecture with its benefits and drawbacks. Discuss the FTP client/server operation with its types.
Client/server architecture
In client/server architecture the work is divided between two kinds of programs. A server provides a service (files, web pages, database, mail) and waits for requests. A client starts the communication, sends a request and displays the result. They communicate over a network by a protocol; one server serves many clients.
Client 1 --\
Client 2 ---+--request--> [ Server ] <--> data
Client 3 --/ <-response-
Benefits
- Central control of data, security and backup.
- Easy to manage, update and upgrade the server.
- Resources and expensive hardware are shared by many clients.
- Scalable: servers can be added or upgraded.
- Clients and servers can be of different platforms; roles are clear.
Drawbacks
- The server is a single point of failure; if it is down, clients cannot work.
- Heavy load on the server and network can cause congestion.
- Servers and administration are costly.
- Needs skilled staff and strong security for the server.
- Clients depend on the network.
FTP client/server operation
File Transfer Protocol (FTP) (RFC 959) transfers files between a client and a server over TCP. It uses two connections:
- Control connection: TCP port 21; stays open for the whole session and carries commands (USER, PASS, LIST, RETR, STOR, QUIT) and replies (220 ready, 331 password needed, 230 logged in, 226 transfer complete).
- Data connection: opened for each file transfer or directory listing (TCP port 20 in active mode) and closed after the transfer.
FTP Client FTP Server
[User interface]---control (21)---[Server PI]
[Data transfer ]---data (20/n)----[Data transfer]
Steps: (1) client connects to port 21; (2) client logs in; (3) client sends a command such as RETR file; (4) a data connection is opened and the file is sent; (5) the data connection closes; (6) QUIT closes the session.
Types of FTP
- Active mode: client sends PORT with its address and port; the server opens the data connection from port 20 to the client. Firewalls and NAT on the client side often block it.
- Passive mode: client sends PASV; the server opens a random port and the client makes both connections. This works through firewalls and is the default today.
- Anonymous FTP: public access with user "anonymous" and an e-mail as password; for public downloads.
- Authenticated FTP: needs a user name and password.
- Secure variants: FTPS (FTP over TLS) and SFTP (file transfer over SSH).
- Transfer modes: ASCII (text) and binary (images, programs).
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Conditional GET; 3-tier architecture components · Internet and Intranet, chapter 4
- Redundant hierarchical network design for bank · Internet and Intranet, chapter 5
- N-tier challenges and tiered ISP backbone · Internet and Intranet, chapter 1
- Redundant network design for insurance company · Internet and Intranet, chapter 5
- Redundant network for IOE Pulchowk campus · Internet and Intranet, chapter 5
- Features of client/server architecture · Computer Networks and Security, chapter 1
- Architecture before specification; client-server · Software Engineering, chapter 3
- Client-server versus distributed object architecture · Software Engineering, chapter 3
- Multiprocessor versus client-server architecture · Software Engineering, chapter 3