Osi Model
Osi Model
The Physical layer is responsible for the actual transmission of raw bits (0s and 1s) over a
communication medium.
Functions:
1. Bit Transmission: Converts digital data into electrical, optical, or radio signals for
transmission.
2. Defines Media Characteristics: Specifies characteristics of transmission media (e.g.,
cables, radio frequencies).
3. Synchronization of Bits: Ensures proper timing of data transmission so the sender
and receiver stay synchronized.
4. Data Rate Control: Determines transmission speed (bit rate) based on medium and
hardware capabilities.
5. Physical Topologies: Defines network layouts (e.g., bus, star, ring, mesh) and their
connectivity.
The Data Link layer ensures reliable node-to-node data transfer by organizing raw bits into
frames and handling error detection.
Functions:
1. Framing: Encapsulates packets into frames for transmission over the physical
medium.
2. Error Detection & Correction: Uses mechanisms like CRC (Cyclic Redundancy
Check) to detect and correct transmission errors.
3. Flow Control: Prevents a fast sender from overwhelming a slow receiver using
methods like stop-and-wait or sliding window.
4. Media Access Control (MAC): Controls how devices access and use the network
medium (e.g., CSMA/CD for Ethernet).
5. MAC Addressing: Assigns unique MAC addresses to devices for proper
identification and communication.
The Network layer is responsible for routing, addressing, and delivering packets across
multiple networks.
Functions:
The Transport layer ensures end-to-end communication, reliability, and proper data
segmentation.
Functions:
1. Segmentation & Reassembly: Breaks data into smaller segments at the sender and
reassembles them at the receiver.
2. Error Control: Detects and corrects errors using checksums and acknowledgments.
3. Flow Control: Manages data flow between sender and receiver to prevent buffer
overflow (e.g., TCP's sliding window).
4. Connection Management: Establishes, maintains, and terminates connections (e.g.,
TCP three-way handshake).
5. Multiplexing & Demultiplexing: Allows multiple applications to share a single
transport layer connection using port numbers.
The Session layer manages sessions between applications and ensures continuous
communication.
Functions:
The Presentation layer translates, encrypts, and compresses data for application-layer
processing.
Functions:
The Application layer is the closest to the user and provides network services directly to
applications.
Functions:
1. Network Services: Provides services such as email (SMTP), file transfer (FTP), and
web browsing (HTTP).
2. User Interface: Facilitates communication between the user and network-based
applications.
3. Data Exchange Protocols: Defines rules for applications to communicate (e.g.,
HTTP, HTTPS, FTP, DNS).
4. Resource Sharing: Enables file sharing, remote access, and distributed computing.
5. Error Reporting: Sends error messages to users when network issues occur.
Summary Table:
The TCP/IP suite is a set of protocols that governs communication over the internet. It is
structured into four layers, each responsible for different aspects of data transmission. The
four layers are:
1. Application Layer
2. Transport Layer
3. Internet Layer
4. Network Access Layer (Link Layer)
This layer provides network services to applications and ensures proper communication
between different devices. It includes protocols like HTTP, FTP, SMTP, and DNS.
Key Points:
This layer ensures reliable data transmission between devices. It includes TCP (reliable,
connection-oriented) and UDP (unreliable, connectionless) protocols.
Key Points:
3. Internet Layer
This layer handles logical addressing and routing of packets across networks. It includes
protocols such as IP, ICMP, and ARP.
Key Points:
Key Points:
1. Physical Transmission – Converts data into electrical, optical, or radio signals for
transmission.
2. MAC Addressing – Uses unique MAC addresses for device identification on a local
network.
3. Data Link Control – Manages how data is framed and transmitted between devices.
4. Error Detection (CRC) – Uses Cyclic Redundancy Check (CRC) to detect errors in
transmitted frames.
5. Ethernet & Wireless Standards – Supports Ethernet (wired) and Wi-Fi (wireless)
communication.
6. Frame Synchronization – Ensures that the sender and receiver are synchronized for
accurate data transmission.
7. Collision Handling – Uses protocols like CSMA/CD (for wired networks) and
CSMA/CA (for wireless networks) to avoid data collisions.
8. Point-to-Point Communication – Supports direct communication between two
devices, such as in PPP (Point-to-Point Protocol).
9. MTU (Maximum Transmission Unit) Handling – Determines the largest data
packet that can be transmitted without fragmentation.
10. Device-to-Network Communication – Facilitates communication between network
devices like routers, switches, and modems.
TCP Features
UDP Features
Online gaming
VoIP (Voice over IP) calls
Video streaming (YouTube, Netflix)
DNS lookups
DHCP (Dynamic Host Configuration Protocol)
When the user types https://www.example.com and presses Enter, the browser starts the
process of retrieving the webpage. The URL consists of three main parts:
Before making a DNS query, the browser looks for the IP address of www.example.com in
cache (stored records). The cache is checked in the following order:
If the IP address is found in cache, the browser skips the DNS lookup and proceeds to Step
5. If not, a DNS resolution request is made.
Since the IP address is not cached, the browser asks the DNS resolver to translate
www.example.com into an IP address. The DNS lookup follows a hierarchical process:
The browser sends a DNS request to the Recursive Resolver (usually provided by the ISP or
a public DNS like Google DNS 8.8.8.8 or Cloudflare 1.1.1.1). If the resolver has the IP in
its cache, it returns the result immediately. Otherwise, it queries the Root DNS Server.
The Recursive Resolver caches the IP for future requests and sends it back to the browser.
Now that the browser has the IP it initiates a TCP handshake with the web server:
Step 5: Browser Sends an HTTP Request
Once the connection is established, the browser sends an HTTP request (or HTTPS request
for secure sites) to fetch the web page.
If the request is for a static page, the server retrieves the HTML file and sends it back.
If it’s a dynamic request, the server processes it (e.g., fetching data from a database).
The server then sends an HTTP response with the requested resource.
IP Versions
How IP Works
IP Features
IP Use Cases
Internet communication
Local and wide-area networking
Cloud computing and VPNs
5. BitTorrent Protocol
BitTorrent is a peer-to-peer (P2P) file-sharing protocol that distributes data across multiple
users instead of relying on a central server.
1. Torrent File: Users download a small .torrent file containing metadata about the shared
content.
2. Tracker Communication: The tracker (a central server) helps users find peers sharing the
file.
3. Swarming: The file is divided into small pieces. Users download pieces from multiple peers
simultaneously.
4. Seeding: Once a user has downloaded the entire file, they continue sharing it with others.
5. DHT (Distributed Hash Table): Some BitTorrent clients use DHT to find peers without a