Network Layer & Remaining OSI Layers
Quick Revision Map
| Layer | Main Responsibility | PDU |
|---|---|---|
| Application | User Services | Data |
| Presentation | Translation, Encryption | Data |
| Session | Session Management | Data |
| Transport | End‑to‑End Delivery | Segments |
| Network | Routing & Logical Addressing | Packets |
| Data Link | Framing & MAC | Frames |
| Physical | Transmission of Bits | Bits |
Network Layer (OSI Layer 3)
Functions
- Logical Addressing (IP Address)
- Routing
- Path Determination
- Packet Forwarding
- Fragmentation and Reassembly
- Congestion Control
PDU: Packet
IP Addressing
IPv4
- 32‑bit Address
- Divided into 4 Octets
Total Addresses: 232
IPv6
- 128‑bit Address
- Solves IPv4 exhaustion problem
Total Addresses: 2128
Classes of IPv4
| Class | First Octet Range | Default Mask |
|---|---|---|
| A | 1–126 | 255.0.0.0 |
| B | 128–191 | 255.255.0.0 |
| C | 192–223 | 255.255.255.0 |
| D | 224–239 | Multicast |
| E | 240–255 | Experimental |
Subnetting
Purpose: Efficient IP utilization, smaller broadcast domains, better security.
Formula
Where h = host bits, s = borrowed bits
Routing
Routing determines the best path from source to destination.
Types
- Static Routing: Manually configured, simple but less scalable.
- Dynamic Routing: Automatically updates routes. Examples: RIP, OSPF, BGP.
Routing Algorithms
Distance Vector
- Example: RIP
- Uses: Bellman‑Ford Algorithm
- Metric: Hop Count
- Maximum: 15 hops
Link State
- Example: OSPF
- Uses: Dijkstra's Algorithm
- Provides faster convergence.
Fragmentation
Occurs when packet size exceeds MTU.
- IPv4 supports fragmentation by routers.
- IPv6 routers do not fragment packets.
ICMP
Internet Control Message Protocol — Error Reporting & Diagnostics. Examples: Ping, Destination Unreachable, Time Exceeded.
ARP
Address Resolution Protocol — IP Address → MAC Address
RARP
Reverse ARP — MAC Address → IP Address (obsolete)
DHCP
Dynamic Host Configuration Protocol — automatically assigns IP, Subnet Mask, Gateway, DNS.
NAT
Network Address Translation — conserves public IP addresses, enables private networks to access the Internet.
Private IP Ranges:
- 10.0.0.0 – 10.255.255.255
- 172.16.0.0 – 172.31.255.255
- 192.168.0.0 – 192.168.255.255
Router
Works at Layer 3. Functions: Routing, Packet Forwarding, Broadcast Domain Separation.
Transport Layer (OSI Layer 4)
Functions
- End‑to‑End Communication
- Segmentation
- Flow Control
- Error Control
- Multiplexing
PDU: Segment
TCP
Transmission Control Protocol — connection‑oriented, reliable, ordered delivery, error recovery.
Three‑Way Handshake
UDP
User Datagram Protocol — connectionless, faster, no reliability guarantee. Used in DNS, VoIP, streaming, gaming.
TCP vs UDP
| Feature | TCP | UDP |
|---|---|---|
| Connection | Yes | No |
| Reliability | High | Low |
| Speed | Slower | Faster |
| Ordering | Yes | No |
| Acknowledgment | Yes | No |
Session Layer (OSI Layer 5)
Session Establishment, Maintenance, Termination. Examples: RPC, NetBIOS.
Presentation Layer (OSI Layer 6)
Data Translation, Encryption, Compression. Examples: JPEG, GIF, MPEG, SSL/TLS.
Application Layer (OSI Layer 7)
Provides services directly to users.
| Protocol | Purpose |
|---|---|
| HTTP | Web Browsing |
| HTTPS | Secure Web |
| FTP | File Transfer |
| SMTP | Email Sending |
| POP3 | Email Receiving |
| IMAP | Email Access |
| DNS | Name Resolution |
| Telnet | Remote Login |
| SSH | Secure Remote Login |
Frequently Asked GATE Facts
| Topic | Remember |
|---|---|
| Network Layer | Layer 3 |
| Transport Layer | Layer 4 |
| Router | Layer 3 |
| IPv4 | 32 bits |
| IPv6 | 128 bits |
| ARP | IP → MAC |
| DHCP | Automatic IP Allocation |
| NAT | Conserves Public IPs |
| TCP | Reliable |
| UDP | Fast |
| RIP | Bellman‑Ford |
| OSPF | Dijkstra |
| ICMP | Ping |
| HTTPS | Secure HTTP |
Last‑Minute Revision (2 Minutes)
- Network Layer = Layer 3
- PDU = Packet
- Router works at Layer 3
- IPv4 = 32 bits
- IPv6 = 128 bits
- ARP = IP to MAC
- DHCP assigns IP automatically
- NAT saves public IP addresses
- RIP uses Bellman‑Ford
- OSPF uses Dijkstra
- TCP = Reliable, Connection‑Oriented
- UDP = Fast, Connectionless
- Session Layer manages sessions
- Presentation: encryption & compression
- Application: user services
- HTTP, HTTPS, FTP, DNS, SMTP = Application Layer
📝 Quick MCQs · Self Check
Click "Reveal Answer" after you attempt each question.
1. Which layer of the OSI model is responsible for routing and logical addressing?
2. What is the size of an IPv4 address?
3. Which protocol is used to map an IP address to a MAC address?
4. Which routing algorithm does OSPF use?
5. Which of the following is a connectionless transport layer protocol?
6. Which layer of the OSI model handles data encryption and compression?
Conclusion
The Network Layer and the remaining OSI layers (Transport, Session, Presentation, Application) form the backbone of modern networking. For GATE CSE, thorough understanding of IP addressing, routing protocols, transport protocols, and application‑layer services is crucial. Practice MCQs and previous‑year questions to solidify these concepts.
Network Layer & OSI Layers · GATE CSE 2026 · Revision ready