Application Layer
The Application Layer provides services and interfaces directly to end users or to application software. It acts as the interface between the user and the network.
Network applications are the primary drivers of network growth. Over the decades, the Internet has supported several “killer applications”, including:
1970s–1980s: Email, remote access, file sharing
1990s: World Wide Web, e-commerce
Late 1990s: Instant messaging, P2P file sharing
2000s: VoIP, video conferencing, YouTube, Netflix, online gaming
2010s onward: Social media platforms like Facebook, Twitter
At the core of network applications are distributed programs—software running on multiple end systems (clients and servers) that communicate via a network.
Example: A web browser (client) communicates with a web server.
Application software is developed for end systems (desktops, servers, mobile devices), not for network core devices (like routers which operates below application layer).
Typical programming languages: C, Java, Python.
This end-to-end architecture supports rapid innovation and scalable deployment.
Key Concepts in the Application Layer
- Network Application Architectures
- Processes Communicating
- Transport Services Available to Applications
- Transport Services Provided by the Internet
- Application-Layer Protocols
1. Network Application Architectures
Before developing a network application, it’s essential to select an appropriate architecture, which defines how components are distributed across systems.
Client-Server Architecture
A centralized server is always-on and serves multiple clients.
The server typically has a fixed IP address and is hosted in data centers to handle large-scale requests.
Clients initiate communication; servers respond.
Examples: HTTP (Web), FTP, Email, Telnet
Highly scalable using modern cloud infrastructure (e.g., Amazon, Google).
Peer-to-Peer (P2P) Architecture
No dedicated central server; all peers communicate directly.
Peers act as both clients and servers, sharing bandwidth, storage, and processing.
Examples: BitTorrent (file sharing), Skype (VoIP), IPTV platforms
Advantages: Scalable and cost-effective.
Challenges:
ISP-friendliness: Heavy upload traffic impacts ISPs.
Security: Harder to defend against malicious peers.
Incentives: Encouraging peers to share resources is critical.
2. Processes Communicating
A process is a running program (like a browser or email client).
When processes run on the same system, they use OS-managed inter-process communication (IPC); when on different systems, they use network communication.
In networked systems:
Communication is between processes on different end systems.
They communicate by sending messages across the network such as requesting web page, downloading web file or sending mail.
A client process initiates contact.
A server process waits and responds to incoming requests.
3. Transport Services and Protocols
Network applications rely on transport layer protocols (like TCP or UDP) to send data between processes. The application layer protocols define the format and rules of communication (e.g., HTTP, FTP, SMTP).
File Transfer Protocol (FTP)
FTP (File Transfer Protocol) is an application-layer protocol used for transferring files between systems on a TCP/IP network.
Allows file upload/download between client and server.
Requires authentication (username & password).
FTP uses two TCP connections:
Control connection (port 21) – for sending commands
Data connection (port 20) – for actual file transfer
FTP is stateful: session information is maintained during transfer.
FTP Architecture
Unlike HTTP, which uses a single connection, FTP uses this dual-channel design for greater flexibility in file operations.
Connection Type | Port / Behavior |
---|---|
Control Connection | TCP Port 21 (Persistent) |
Data Connection | Dynamically assigned ports (Non-persistent) |
Common FTP Commands
Command | Description |
---|---|
USER <username> | Sends the username to the server |
PASS <password> | Sends the password for authentication |
LIST | Lists files/directories in the current directory |
RETR <filename> | Downloads the specified file from the server |
STOR <filename> | Uploads the specified file to the server |
FTP Reply Codes
Reply Code | Meaning |
---|---|
331 | Username OK, password required |
125 | Data connection already open; transfer starting |
425 | Can't open data connection |
452 | Error writing file (e.g., insufficient storage space) |