Unit 3 Network Layer
Unit 3 Network Layer
The Network Layer is the third layer in the OSI (Open Systems Interconnection) model. It is
responsible for routing, forwarding, addressing, and packet delivery between different
networks. The main role of the network layer is to determine the best path for data to travel
from the source device to the destination device, even if they are on different networks.
o The network layer assigns a logical address (IP address) to each device in the
network.
2. Routing
o The network layer determines the best path for data packets to reach their
destination.
3. Packet Forwarding
o The network layer is responsible for moving packets from one network to
another.
o It ensures packets are forwarded to the correct next-hop device until they
reach the final destination.
o If a packet is too large for a network, the network layer splits (fragments) it
into smaller packets.
o Prioritizes network traffic to ensure critical data (like voice and video calls)
gets better service.
pgsql
CopyEdit
+----------------------+
+----------------------+
+----------------------+
+----------------------+
+----------------------+
+----------------------+
+----------------------+
+----------------------+
1. When you send an email, the network layer assigns an IP address to your computer
and the recipient's computer.
2. It selects the best route for the email to travel through different networks.
Conclusion
The Network Layer is crucial for ensuring that data packets reach their destination efficiently
by handling logical addressing, routing, packet forwarding, and error handling. It is a core
component of how the internet and networks function.
2.router
What is a Router?
A router is a network device that connects multiple networks and directs data packets
between them. It operates at the Network Layer (Layer 3) of the OSI model and determines
the best path for data transmission based on routing tables and protocols.
Routers are essential in both home networks (Wi-Fi routers) and enterprise networks (core
routers, edge routers) to ensure efficient data transfer across the internet.
Functions of a Router:
✔ Forwards Data Packets – Determines the best path for data to reach its destination.
✔ Assigns IP Addresses – Helps in logical addressing and subnetting.
✔ Network Traffic Management – Prevents congestion and optimizes bandwidth.
✔ Connects Different Networks – Bridges LANs, WANs, and the Internet.
✔ Uses Routing Protocols – Determines the best route dynamically or statically.
2. Characteristics of Routing
Routing is the process of selecting the best path for data packets to travel across a network.
The key characteristics of routing are:
1. Path Selection
The next-hop address directs packets to the next router in the path.
4. Load Balancing
Ensures alternate paths are available if one route fails, improving reliability.
6. Scalability
Supports small and large networks by handling multiple routing tables and devices.
3. Routing Protocols
Routing protocols are used by routers to exchange information and determine the best
paths for data packets. They are classified into:
Examples:
✔ RIP (Routing Information Protocol) – Maximum 15 hops.
✔ IGRP (Interior Gateway Routing Protocol) – Cisco proprietary, improved over RIP.
Routers maintain a global network topology map and update each other only when
changes occur.
Examples:
✔ OSPF (Open Shortest Path First) – Uses Dijkstra’s algorithm for path selection.
✔ IS-IS (Intermediate System to Intermediate System) – Similar to OSPF, mainly used
in ISPs.
1. Input Ports – Receive incoming packets, process them, and send them to the
switching fabric.
2. Switching Fabric – Transfers packets from input ports to the correct output ports.
3. Routing Processor – Determines the best path using routing protocols and updates
the routing table.
4. Output Ports – Send packets to their destination, managing buffering and queuing.
A Distance Vector Routing Protocol is a dynamic routing method where routers share their
entire routing table with directly connected neighbors at regular intervals. Each router
determines the best route based on the distance (hop count) and the next-hop router. It
follows the Bellman-Ford Algorithm to calculate the shortest path.
✅ Key Characteristics:
✔ Uses hop count as the primary metric.
✔ Routers exchange routing tables periodically with neighbors.
✔ Follows the Bellman-Ford Algorithm for path calculation.
✔ Prone to routing loops, solved using Split Horizon, Hold-Down Timers, and Route
Poisoning.
✔ General term for routing protocols that use the distance vector algorithm.
✔ Relies on routers sharing routing tables with neighbors.
✔ Uses hop count or other metrics to determine the best route.
✔ Updates routing tables periodically or when network changes occur.
✅ Used in: Basic networking, foundation for protocols like RIP, IGRP, and EIGRP.
4. Conclusion
Distance Vector Routing Protocols are simple and easy to implement, but they have slow
convergence and routing loop issues. Protocols like RIP, IGRP, and EIGRP evolved from the
basic Distance Vector Protocol, with EIGRP being the most efficient for large networks. 🚀
IPv4 (Internet Protocol version 4) is the fourth version of the Internet Protocol (IP) and is the
most widely used protocol for network communication. It provides unique numerical
addresses to devices connected to a network, allowing them to communicate with each
other. IPv4 addresses are 32-bit numbers, typically represented in dotted decimal notation
(e.g., 192.168.1.1).
IPv4 addresses are classified into different methods based on their assignment and network
usage:
1. Static Addressing
o Commonly used for client devices like laptops, mobile phones, and desktops.
o One-to-one communication.
2. Broadcast Addressing
o One-to-all communication.
3. Multicast Addressing
o One-to-many communication.
1. Device Identification
o Determines how data is sent from the source device to the destination
device.
3. Network Segmentation
4. Internet Communication
1. Widely Supported
o Most networking devices and operating systems support IPv4.
3. Efficient Routing
o IPv4 uses routing protocols like OSPF and BGP to optimize data transmission.
o IPv4 has been in use for decades, making it compatible with most networking
infrastructure.
o IPv4 has only 4.3 billion addresses, which is insufficient for the growing
number of internet-connected devices.
2. Security Issues
o Lacks built-in security features; requires additional protocols like IPsec for
secure communication.
3. Network Complexity
4. Broadcast Overhead
Conclusion
IPv4 is still the dominant protocol for networking, but its limitations (such as address
exhaustion) have led to the development of IPv6 as a successor. However, IPv4 remains
essential due to its widespread adoption and compatibility with existing infrastructure.