0% found this document useful (0 votes)
25 views9 pages

Unit 3 Network Layer

The document provides an overview of the Network Layer in the OSI model, detailing its functions such as logical addressing, routing, packet forwarding, and error handling. It also explains the role of routers, characteristics of routing, and various routing protocols, particularly focusing on Distance Vector Routing Protocols. Additionally, it covers IPv4 addressing, its methods, functions, advantages, and disadvantages, highlighting its significance despite limitations.

Uploaded by

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

Unit 3 Network Layer

The document provides an overview of the Network Layer in the OSI model, detailing its functions such as logical addressing, routing, packet forwarding, and error handling. It also explains the role of routers, characteristics of routing, and various routing protocols, particularly focusing on Distance Vector Routing Protocols. Additionally, it covers IPv4 addressing, its methods, functions, advantages, and disadvantages, highlighting its significance despite limitations.

Uploaded by

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

UNIT -3 NETWORK LAYER

Network Layer: Definition and Functions

Definition of 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.

Functions of Network Layer

1. Logical Addressing (IP Addressing)

o The network layer assigns a logical address (IP address) to each device in the
network.

o These addresses help identify devices uniquely across different networks.

o Example: IPv4 (e.g., 192.168.1.1) and IPv6 (e.g., 2001:db8::ff00:42:8329).

2. Routing

o The network layer determines the best path for data packets to reach their
destination.

o It uses routing algorithms such as Distance Vector Routing (DVR), Link-State


Routing (LSR), and Path-Vector Routing.

o Routers operate at this layer to forward packets based on routing tables.

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.

4. Fragmentation and Reassembly

o If a packet is too large for a network, the network layer splits (fragments) it
into smaller packets.

o The receiver reassembles the fragments to reconstruct the original data.

5. Error Handling and Congestion Control


o Detects errors in packet transmission and handles network congestion using
techniques like packet dropping, buffering, and retransmission.

6. Quality of Service (QoS) Management

o Prioritizes network traffic to ensure critical data (like voice and video calls)
gets better service.

Diagram of Network Layer

pgsql

CopyEdit

+----------------------+

| Application Layer | (Layer 7)

+----------------------+

| Presentation Layer | (Layer 6)

+----------------------+

| Session Layer | (Layer 5)

+----------------------+

| Transport Layer | (Layer 4)

+----------------------+

| Network Layer | (Layer 3) ---> Responsible for Routing, IP Addressing, Packet


Forwarding

+----------------------+

| Data Link Layer | (Layer 2)

+----------------------+

| Physical Layer | (Layer 1)

+----------------------+

Example of Network Layer in Action

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.

3. The routers forward the data packets toward the destination.


4. If the data packet is too large, the network layer fragments it and reassembles it at
the destination.

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

 Chooses the best route based on network conditions and policies.

 Uses metrics such as hop count, bandwidth, and latency.

2. Dynamic vs. Static Routing

 Static Routing: Manually configured by administrators (fixed paths).


 Dynamic Routing: Automatically updates routes using protocols.

3. Hop Count & Next-Hop Address

 Measures the number of intermediate routers a packet must pass through.

 The next-hop address directs packets to the next router in the path.

4. Load Balancing

 Distributes network traffic evenly to optimize performance and avoid congestion.

5. Redundancy and Fault Tolerance

 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:

1. Distance Vector Routing Protocols

 Routers exchange information with neighboring routers periodically.

 Use hop count as the metric to determine the best route.

 Examples:
✔ RIP (Routing Information Protocol) – Maximum 15 hops.
✔ IGRP (Interior Gateway Routing Protocol) – Cisco proprietary, improved over RIP.

2. Link-State Routing Protocols

 Routers maintain a global network topology map and update each other only when
changes occur.

 Uses bandwidth, delay, and reliability for route selection.

 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.

Architecture design of router


This diagram represents the router architecture, showing how data flows through its main
components:

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.

Distance Vector Routing Protocol and Its Types


1. What is Distance Vector Routing Protocol?

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.

2. Types of Distance Vector Routing Protocols

1️Distance Vector Protocol (DVP)

✔ 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.

2️⃣ Routing Information Protocol (RIP)

✔ One of the oldest distance vector protocols.


✔ Uses hop count as the metric (maximum 15 hops allowed).
✔ Updates are sent every 30 seconds to neighbors.
✔ Problems: Slow convergence, limited scalability.
✔ Versions:

 RIP v1 (Classful, no subnet support).

 RIP v2 (Classless, supports CIDR & authentication).

✅ Used in: Small networks with simple routing needs.

3️⃣ Interior Gateway Routing Protocol (IGRP) (Cisco Proprietary)

✔ Developed by Cisco to overcome RIP’s limitations.


✔ Uses multiple metrics (bandwidth, delay, load, reliability) for better path selection.
✔ Maximum hop count: 255 (default 100).
✔ Faster convergence than RIP.

✅ Used in: Cisco-based medium to large networks.

4️⃣ Enhanced Interior Gateway Routing Protocol (EIGRP) (Cisco Proprietary)


✔ Advanced version of IGRP (Hybrid Protocol – combines Distance Vector & Link-State).
✔ Uses the DUAL (Diffusing Update Algorithm) for fast convergence.
✔ Supports VLSM (Variable Length Subnet Masking) and classless routing.
✔ Sends partial updates instead of entire routing tables (efficient bandwidth usage).

✅ Used in: Large-scale Cisco networks requiring fast convergence.

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 Addressing: Definition, Methods, Functions, Advantages, and Disadvantages

1. Definition of IPv4 Addressing

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).

2. Methods of IPv4 Addressing

IPv4 addresses are classified into different methods based on their assignment and network
usage:

A. Addressing Methods Based on Assignment

1. Static Addressing

o The IP address is manually assigned by a network administrator.

o It remains constant until manually changed.

o Commonly used in servers and networking devices.

2. Dynamic Addressing (DHCP - Dynamic Host Configuration Protocol)

o IP addresses are automatically assigned by a DHCP server.

o The IP address may change over time.

o Commonly used for client devices like laptops, mobile phones, and desktops.

B. Addressing Methods Based on Usage


1. Unicast Addressing

o One-to-one communication.

o Used for identifying a single device in a network.

o Example: A computer accessing a website.

2. Broadcast Addressing

o One-to-all communication.

o Data is sent to all devices in a network.

o Example: Sending an ARP (Address Resolution Protocol) request.

3. Multicast Addressing

o One-to-many communication.

o Data is sent to a specific group of devices.

o Example: Online video streaming to multiple users.

3. Functions of IPv4 Addressing

IPv4 addressing serves several critical functions in network communication:

1. Device Identification

o Each device on a network is assigned a unique IP address for identification.

2. Routing of Data Packets

o Determines how data is sent from the source device to the destination
device.

3. Network Segmentation

o Divides a large network into smaller sub-networks (subnetting) to improve


efficiency.

4. Internet Communication

o Enables devices to access and communicate over the Internet.

5. Security and Access Control

o Helps in implementing security policies, such as firewalls and access control


lists (ACLs).

4. Advantages of IPv4 Addressing

1. Widely Supported
o Most networking devices and operating systems support IPv4.

2. Simple and Easy to Implement

o IPv4 is easy to configure and manage.

3. Efficient Routing

o IPv4 uses routing protocols like OSPF and BGP to optimize data transmission.

4. Compatible with Existing Networks

o IPv4 has been in use for decades, making it compatible with most networking
infrastructure.

5. Supports NAT (Network Address Translation)

o Allows multiple devices to share a single public IP address, conserving address


space.

5. Disadvantages of IPv4 Addressing

1. Limited Address Space

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

o Requires subnetting and NAT to manage address shortages, increasing


complexity.

4. Broadcast Overhead

o Frequent use of broadcast communication can lead to network congestion.

5. Inefficient Address Allocation

o Some IPv4 address blocks are underutilized, leading to wastage.

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.

You might also like