0% found this document useful (0 votes)
13 views12 pages

Application Layer 1 CNS

Uploaded by

fairykomal993
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views12 pages

Application Layer 1 CNS

Uploaded by

fairykomal993
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 12

Computer Networking: A Top-Down Approach

Definition: The Application Layer is responsible for providing end-user


services and enabling communication between software applications over
the network.
Main Tasks:
•Supports user-facing applications like web browsers, email clients, and file transfer
utilities.
•Defines how messages should be formatted, transmitted, and interpreted between
hosts.
Protocols:
• HTTP: Used for web browsing.
• DNS: Translates domain names to IP addresses.
• SMTP: Used for sending emails.
• FTP: Transfers files between computers.
 Network Application Architectures define how
applications interact and exchange data over a network. Two common
architectures are the Client-Server Model and the Peer-to-
Peer (P2P) Model.

 Client-Server Architecture
• Definition: In a client-server model, clients request services, and
the server responds by providing them. The server is a centralized
entity that handles all the processing and resource distribution.
Characteristics:
•Server: Always on, awaiting requests.
•Client: Requests services from the server.
•Scalability: Can be an issue as the server needs more resources to handle a
growing number of clients.
Examples:

•Web Browsing: A browser (client) sends an HTTP request to a web server.


The web server (such as Apache or Nginx) processes the request and returns
the requested web page.
•Email (SMTP): The mail client sends a message to an SMTP server, which
then forwards it to the recipient's server.
Advantages:
•Centralized control over data and services.
•Easier to manage and enforce security since the server is the single point of
control.
•Reliability: Servers are typically robust and backed up with redundant
systems.
Disadvantages:
• Scalability issues: As client numbers increase, the server can become a
bottleneck.
• Cost: Maintaining high-powered servers is expensive.
• Single Point of Failure: If the server goes down, clients cannot access
the service.
Peer-to-Peer (P2P) Architecture
Definition: In P2P architecture, every node (peer) acts as both a client and
a server. Instead of relying on a central server, peers share resources
directly with each other
Characteristics:
•Peers communicate directly to share files, data, or resources.
•No centralized control; peers contribute and consume resources.
•Dynamic: Peers can join or leave the network at any time without major
disruption.
Examples:
•BitTorrent: File-sharing protocol where users download pieces of a file
from multiple peers simultaneously, rather than from a central server.
•Skype (originally): Used P2P architecture to distribute VoIP traffic
among peers, bypassing centralized servers for call routing.
Peer-to-Peer (P2P) Architecture
Advantages:

•Scalability: Resources increase as more peers join the network.

•Cost Efficiency: No need for centralized infrastructure (servers).

•Fault Tolerance: No single point of failure; if one peer disconnects, others can still
share resources.
Disadvantages:

•Security: Difficult to secure and manage because there’s no centralized control over
what peers share.
•Performance Variability: As peer availability and bandwidth vary, the quality of
service can fluctuate.
Hybrid Architectures
•Some systems use a combination of client-server and P2P models to
benefit from both architectures.
• Example: Modern VoIP services like Zoom use a central server for
authentication and control but establish P2P connections for actual
voice or video transmission when possible.
 Process communication in networking refers to how two programs
(processes) on different devices communicate across a network to
exchange information. This involves sending and receiving data over a
network.
Sockets
Definition:
A socket is the interface between a process and the network that enables
communication. It is the endpoint for sending and receiving data across the
network.
Socket Programming:
• Programs (like web browsers or servers) use sockets to communicate
with other processes.
• The Socket API allows applications to create, use, and manage
sockets for network communication.
Socket Types:
•Stream Sockets (TCP): Used for reliable, connection-oriented
communication (e.g., HTTP, FTP).
•Datagram Sockets (UDP): Used for connectionless, unreliable
communication (e.g., DNS, video streaming).
Addressing in Process Communication
For two processes to communicate, they need to know each other’s
address, which includes both the IP address and port number:
IP Address:
•Uniquely identifies a device (host) on the network.
•IPv4 (e.g., 192.168.1.1) and IPv6 (e.g.,
2001:0db8::85a3:0000:0000:8a2e:0370:7334) are used for identifying
devices.
Port Numbers:
1. Identify specific applications or services running on a host.
2. Well-known Ports:
1. Port 80: HTTP (web traffic).
2. Port 443: HTTPS (secure web traffic).
3. Port 21: FTP.
3. Dynamic/Private Ports: Typically assigned by the OS for client
processes.
Combination:
•The combination of an IP address and a port number is called a socket
address (or endpoint), which uniquely identifies where communication
should be directed.
•Example: 192.168.1.100:80 indicates an HTTP service (port 80) on
the device with IP 192.168.1.100

You might also like