0% found this document useful (0 votes)
6 views103 pages

Unit 3 Part B

The document provides an overview of computer networks, focusing on the differences between IPv4 and IPv6, including their characteristics, benefits, and drawbacks. It explains the process of address mapping using protocols like ARP and RARP, highlighting their roles in translating between logical and physical addresses. Additionally, it discusses the network layer functions, encapsulation of ARP packets, and the concept of Proxy ARP.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views103 pages

Unit 3 Part B

The document provides an overview of computer networks, focusing on the differences between IPv4 and IPv6, including their characteristics, benefits, and drawbacks. It explains the process of address mapping using protocols like ARP and RARP, highlighting their roles in translating between logical and physical addresses. Additionally, it discusses the network layer functions, encapsulation of ARP packets, and the concept of Proxy ARP.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Computer Networks

By,

Ass. Prof. Kunal D Gaikwad


Pursuing PHD (AIML)
M.E(Computer Networks)
B.E(Computer Science & Engineering)
Diploma(Computer Engineering)

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
What is IPv4?
IPv4, or Internet Protocol version 4, is the original addressing system of the Internet, introduced in 1983. It
uses a 32-bit address scheme, which theoretically allows for over 4 billion unique addresses (232). IPv4
addresses are typically displayed in decimal format, divided into four octets separated by dots. For
example, [Link] is a common IPv4 address you might find in a home network.
IPv4 Address Format is a 32-bit Address that comprises binary digits separated by a dot (.).

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
Characteristics of IPv4
1. 32-bit address length: Allows for approximately 4.3 billion unique addresses.
2. Dot-decimal notation: IP addresses are written in a format of four decimal numbers separated by dots,
such as [Link].
3. Packet structure: Includes a header and payload; the header contains information essential for routing
and delivery.
4. Checksum fields: Uses checksums in the header for error-checking the header integrity.
5. Fragmentation: Allows packets to be fragmented at routers along the route if the packet size exceeds the
maximum transmission unit (MTU).
6. Address Resolution Protocol (ARP): Used for mapping IP network addresses to the hardware addresses
used by a data link protocol.
7. Manual and DHCP configuration: Supports both manual configuration of IP addresses and dynamic
configuration through DHCP (Dynamic Host Configuration Protocol).
8. Limited address space: The main limitation which has led to the development of IPv6 to cater to more
devices.
9. Network Address Translation (NAT): Used to allow multiple devices on a private network to share a single
public IP address.
10. Security: Lacks inherent security features, requiring additional protocols such as IPSec for secure
communications.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Drawbacks of IPv4
1. Limited Address Space : IPv4 has a limited number of addresses, which is not enough for the growing
number of devices connecting to the internet.
2. Complex Configuration : IPv4 often requires manual configuration or DHCP to assign addresses, which
can be time-consuming and prone to errors.
3. Less Efficient Routing : The IPv4 header is more complex, which can slow down data processing and
routing.
4. Security Issues : IPv4 does not have built-in security features, making it more vulnerable to attacks unless
extra security measures are added.
5. Limited Support for Quality of Service (QoS) : IPv4 has limited capabilities for prioritizing certain types of
data, which can affect the performance of real-time applications like video streaming and VoIP.
6. Fragmentation : IPv4 allows routers to fragment packets, which can lead to inefficiencies and increased
chances of data being lost or corrupted.
7. Broadcasting Overhead : IPv4 uses broadcasting to communicate with multiple devices on a network,
which can create unnecessary network traffic and reduce performance.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
What is IPv6?
It is a widely used version of the Internet Protocol today is IPv6. It is becoming more common, especially in
areas like mobile networks, where the demand for IP addresses keeps growing. IPv6 was developed by
the Internet Engineering Task Force (IETF) in December 1998 to replace IPv4, which couldn’t handle the
rapidly increasing number of internet users and connected devices.
IPv6 stands for Internet Protocol version 6. It’s the newer and more advanced version of IP, offering
improvements in address space, efficiency, and security. IPv6 addresses are written in eight groups of
hexadecimal numbers, separated by colons.

IPv6 Address Format


IPv6 Address Format is a 128-bit IP Address, which is written in a group of 8 hexadecimal numbers separated
by colon (:).

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Characteristics of IPv6
128-bit Addressing: Uses a 128-bit address format, allowing for an almost unlimited number of unique IP
addresses.
Hexadecimal Notation: IP addresses are written in eight groups of four hexadecimal digits, separated by
colons (e.g., 2001:0db8:85a3:8a2e:0370:7334).
Connectionless and Connection-Oriented Support: Supports both connectionless (like UDP) and connection-
oriented (like TCP) communications.
No Broadcast: Does not use broadcasting; instead, uses multicast and anycast for efficient data delivery.
Simplified Header Format: Has a simpler and more efficient packet header compared to IPv4, improving
processing speed.
Integrated Security (IPSec): Includes built-in support for IPSec to provide confidentiality, authentication, and
data integrity.
Auto-Configuration: Supports stateless and stateful address configuration, including automatic address
assignment.
No Need for NAT(Network Address Translation : Eliminates the need for Network Address Translation due to its
vast address space.
Improved Routing Efficiency: Reduces routing table size and simplifies network structure for faster data
delivery.
Support for New Services: Designed to work better with modern internet services like mobile IP, VoIP, and IoT
devices.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Benefits of IPv6 over IPv4
The recent Version of IP IPv6 has a greater advantage over IPv4. Here are some of the mentioned benefits:
•Larger Address Space: IPv6 has a greater address space than IPv4, which is required for expanding the IP
Connected Devices. IPv6 has 128 bit IP Address rather and IPv4 has a 32-bit Address.

•Improved Security: IPv6 has some improved security which is built in with it. IPv6 offers security like Data
Authentication, Data Encryption, etc. Here, an Internet Connection is more Secure.

•Simplified Header Format: As compared to IPv4, IPv6 has a simpler and more effective header Structure, which is
more cost-effective and also increases the speed of Internet Connection.

•Prioritize: IPv6 contains stronger and more reliable support for QoS features, which helps in increasing traffic over
websites and increases audio and video quality on pages.

•Improved Support for Mobile Devices: IPv6 has increased and better support for Mobile Devices. It helps in making
quick connections over other Mobile Devices and in a safer way than IPv4.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Feature IPv4 IPv6
Address Length 32-bit address 128-bit address

Address Format Decimal format (e.g., [Link]) Hexadecimal format (e.g., 2001:0db8::1)

Configuration Manual and DHCP configuration Auto-configuration and renumbering supported

Connection Integrity End-to-end integrity is unachievable End-to-end integrity is achievable

Security No built-in security; external tools like IPSec needed IPSec is built-in for encryption and authentication

Fragmentation Performed by sender and routers Performed only by the sender

Flow Identification Not available Uses Flow Label field in header for packet flow identification

Checksum Field Present Not present

Transmission Scheme Supports broadcast Uses multicast and anycast; no broadcast

Header Size Variable: 20–60 bytes Fixed: 40 bytes

Conversion Can be converted to IPv6 Not all IPv6 addresses can be converted to IPv4

Field Structure 4 fields separated by dots (.) 8 fields separated by colons (:)

Address Classes Has address classes (A, B, C, D, E) No concept of address classes

VLSM Support Supports Variable Length Subnet Mask (VLSM) Does not support VLSM

Example [Link] 2001:0000:3238:DFE1:0063:0000:0000:FEFB


Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
Network Layer Function

Address Mapping
The network layer deals with IP addresses, but delivery at the data link layer requires MAC (hardware)
addresses.
Address mapping translates between the two:
ARP (Address Resolution Protocol): Maps an IP address → MAC address.
RARP (Reverse ARP): Maps a MAC address → IP address.
Example: If host A wants to send data to host B, it uses ARP to find B’s MAC address from its IP.

Error Reporting
•The network layer itself is not responsible for error correction (that’s transport/data link’s job).
•But it does report errors and diagnostic information using ICMP (Internet Control Message Protocol).
•Common ICMP messages:
•Destination Unreachable (e.g., host not reachable).
•Time Exceeded (e.g., TTL expired).
•Echo Request & Echo Reply (used in ping).

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Address Mapping
Address mapping is a process of determining a logical address knowing the physical address of the
device and determining the physical address by knowing the logical address of the device. Address
mapping is required when a packet is routed from source host to destination host in the same or
different network.

Why Address Mapping?


Internet = many physical networks interconnected with routers.
Devices have two addresses:
Logical (IP Address): Unique universally, used for routing.
Physical (MAC Address): Unique locally, used within a network.
Both are essential:
Physical → identifies actual hardware connection.
Logical → enables end-to-end communication across networks.
Address Mapping is needed to relate logical and physical addresses for successful packet
delivery.
Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
Types of Address Mapping

1️ Static Mapping
Devices keep a routing table (logical ↔ physical address).
Issues:
Physical address may change (NIC change, reboot, VPN, etc.).
Logical address may change (network switch, modem reset).
Drawback: Frequent updates → overhead & poor performance.

2️ Dynamic Mapping
Uses protocols to resolve addresses automatically.
ARP: Finds physical (MAC) from logical (IP).
RARP: Finds logical (IP) from physical (MAC).
Advantage: No manual updates, efficient communication.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Process of Address Mapping

1️Logical → Physical (Using ARP)


Source gets destination IP (from DNS/routing table).
Packet encapsulated at data link layer → needs MAC address.
Source sends ARP query (broadcast with dest. IP).
Target host replies with its MAC address → mapping complete.

2️ Physical → Logical (Using RARP/BOOTP/DHCP)


Used by diskless stations or when IPs are leased dynamically.
Host knows its MAC (from NIC) but not IP.
Sends RARP request → server responds with host’s IP address.
✅ Dynamic mapping (ARP/RARP/BOOTP/DHCP) is more efficient than static mapping.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Mapping Logical to Physical Address: ARP
Address Resolution Protocol is a communication protocol used for discovering physical address associated
with given network address. Typically, ARP is a network layer to data link layer mapping process, which is
used to discover MAC address for given Internet Protocol Address. In order to send the data to destination,
having IP address is necessary but not sufficient; we also need the physical address of the destination
machine. ARP is used to get the physical address (MAC address) of destination machine.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Characteristics of ARP
(Address Resolution Protocol )
•ARP is used for the purpose of
determining the MAC equivalent of a
given IP.
•ARP is applicable on IPv4 operated
systems.
•It is limited to a Local Area Network.
•Address mappings for ARP are stored
for a limited time in ARP tables.
ARP(Address Resolution Protocol)

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
ARP Packet Fields
Hardware Type (16-bit): Network type (Ethernet =
1).
Protocol Type (16-bit): Higher-level protocol (IPv4
= 0x0800).
Hardware Length (8-bit): Size of physical address
(Ethernet = 6).
Protocol Length (8-bit): Size of logical address
(IPv4 = 4).
Operation (16-bit): Request (1) / Reply (2).
Sender Hardware Addr: Sender’s MAC (e.g., 6
bytes in Ethernet).
Sender Protocol Addr: Sender’s IP (4 bytes in IPv4).
Target Hardware Addr: Target’s MAC (unknown in
request → all 0s).
Target Protocol Addr: Target’s IP (4 bytes in IPv4).

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Encapsulation of ARP Packet
ARP packet is directly encapsulated in a data link frame (e.g., Ethernet).
Type field (0x0806): Indicates ARP request/reply.
ARP Operation Steps
Sender knows IP of target.
ARP creates request: fills sender’s MAC & IP, target’s IP (MAC = 0).
Frame formed → sender MAC (src), broadcast (dest).
All hosts receive; only target recognizes its IP.
Target replies with ARP Reply (MAC) → unicast.
Sender stores target’s MAC.
IP datagram is now sent in a unicast frame to destination.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Four Cases Using ARP

1 Host → Host (Same Network)


Destination IP in datagram mapped to target’s
MAC.
2 Host → Host (Different Network)
Host sends to router’s IP (from routing table /
default gateway).
3 Router → Host (Different Network)
Router forwards to next router’s IP (from routing
table).
4 Router → Host (Same Network)
Router maps destination IP directly to host’s
MAC.
👉 Note: ARP Request = Broadcast, ARP Reply =
Unicast

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Proxy ARP(Address Resolution Protocol )
•Definition: A router replies to ARP requests on behalf of other hosts.
•Working:
[Link] receives ARP request for a host in its subnet.
[Link] replies with its own MAC address.
[Link] then forwards the actual IP packet to the correct host.
•Use Case:
•Allows subnetting without reconfiguring all systems.
•Router acts as a proxy for multiple hosts.
Example:
If ARP request is for IP [Link] / .22 / .23, the Proxy ARP router replies with its MAC and then forwards packets to the correct host.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Mapping Physical to Logical Address: RARP, BOOTP, and DHCP

There are occasions in which a host knows its physical address, but needs to know its
logical address. This may happen in two cases:

1. A diskless station is just booted. The station can find its physical address by checking
its interface, but it does not know its IP address.

2. An organization does not have enough IP addresses to assign to each station; it needs
to assign IP addresses on demand. The station can send its physical address and
ask for a short time lease.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
RARP (Reverse Address Resolution Protocol) :
RARP (Reverse ARP): Maps physical address → logical (IP)
address
Use case: Diskless machines (booted from ROM) that don’t
store IP
Process:
Machine knows its physical (MAC) address
Sends RARP request (broadcast)
RARP server replies with IP address
Requirement: Client runs RARP client, server runs RARP server
Limitation: Works only within the local network (broadcast can’t
cross routers)
Problem: Needs RARP server per subnet
Status: Obsolete – replaced by BOOTP and DHCP
Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
ARP(Address Resolution Protocol) RARP Reverse Address Resolution Protocol

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
RARP (Reverse Address Resolution
Factors ARP (Address Resolution Protocol)
Protocol)
To obtain the MAC address of a
To obtain the IP address of a device
Purpose device when its IP address is
when its MAC address is known
known
Direction From IP address to MAC address From MAC address to IP address

The client broadcasts its IP address The client broadcasts its MAC address
Request
and requests a MAC address and requests an IP address

The server responds with the The server responds with the
Response
corresponding MAC address corresponding IP address
Widely used in modern networks to It is rarely used in modern networks as
Usage resolve IP addresses to MAC most devices have a pre-assigned IP
addresses address
The ARP table is maintained by the The RARP table is maintained by the
Table local host and updated using the RARP server and used for the
ARP reply. configuration of IP addresses.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Bootstrap Protocol (BOOTP)
The Bootstrap Protocol (BOOTP) is an older computer networking protocol that allows a device, such as
a diskless workstation, to automatically obtain an IP address and other necessary network configurations
from a central server upon network connection.
It operates using a client-server model and relies on UDP ports 67 and 68, assigning a stable IP address
to a device based on its MAC address.
While largely superseded by DHCP, BOOTP is still sometimes used for specialized purposes, particularly
in industrial automation or in systems that need to boot with minimal initial configuration.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
Dynamic Host Configuration Protocol (DHCP)
The Dynamic Host Configuration Protocol (DHCP) is a networking protocol that
automatically assigns IP addresses and other network configuration parameters
(like subnet masks and default gateways) to devices on a network.
Operating on a client-server model, a device (the client) requests information
from a DHCP server, which then provides an IP address from a pool of available
addresses, known as the "scope".
This automation simplifies network administration by eliminating the need for
manual configuration of each device and ensures efficient management of IP
addresses.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Working of DHCP
DHCP works on the Application layer of the UDP Protocol. The main task of DHCP is to dynamically assigns IP
Addresses to the Clients and allocate information on TCP/IP configuration to Clients.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Working of DHCP
DHCP works on the Application layer of the UDP Protocol. The main task of DHCP is to dynamically assigns IP
Addresses to the Clients and allocate information on TCP/IP configuration to Clients.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
Error Reporting
•The network layer itself is not responsible for error correction (that’s transport/data link’s job).
•But it does report errors and diagnostic information using ICMP (Internet Control Message Protocol).
•Common ICMP messages:
•Destination Unreachable (e.g., host not reachable).
•Time Exceeded (e.g., TTL expired).
•Echo Request & Echo Reply (used in ping).

What is the Internet Control Message Protocol (ICMP)?


•The Internet Control Message Protocol (ICMP) is a network layer protocol used by network devices to
diagnose network communication issues.
•ICMP is mainly used to determine whether or not data is reaching its intended destination in a timely
manner.
•Commonly, the ICMP protocol is used on network devices, such as routers.
•ICMP is crucial for error reporting and testing, but it can also be used in distributed denial-of-service (DDoS)
attacks.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Type (8-bit): The initial 8-bit of the packet is for message type, it provides a brief description of the message
so that receiving network would know what kind of message it is receiving and how to respond to it.
Code (8-bit): Code is the next 8 bits of the ICMP packet format, this field carries some additional information
about the error message and type.
Checksum (16-bit): Last 16 bits are for the checksum field in the ICMP packet header. The checksum is used
to check the number of bits of the complete message and enable the ICMP tool to ensure that complete
data is delivered.
The next 32 bits of the ICMP Header are Extended Header which has the work of pointing out the problem in
IP Message. Byte locations are identified by the pointer which causes the problem message and receiving
device looks here for pointing to the problem.
The last part of the ICMP packet is Data or Payload of variable length. The bytes included in IPv4 are 576
bytes and in IPv6, 1280 bytes.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Type Code Description
0 - Echo Reply 0 Echo reply
0 Destination network unreachable
1 Destination host unreachable

3 - Destination 2 Destination protocol unreachable


Unreachable 3 Destination port unreachable
4 Fragmentation is needed and the DF flag set
5 Source route failed
0 Redirect the datagram for the network
1 Redirect datagram for the host
5 - Redirect Message
2 Redirect the datagram for the Type of Service and Network

3 Redirect datagram for the Service and Host


8 - Echo Request 0 Echo request
9 - Router Advertisement 0
Use to discover the addresses of operational routers
10 - Router Solicitation 0
0 Time to live exceeded in transit
11 - Time Exceeded
1 Fragment reassembly time exceeded.
0 The pointer indicates an error.
12 - Parameter Problem 1 Missing required option
2 Bad length
13 - Timestamp 0 Used for time synchronization
14 - Timestamp Reply 0 Reply to Timestamp message

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Source Quench Message
A source quench message is a request to decrease the traffic rate for messages sent to the host destination)
or we can say when receiving host detects that the rate of sending packets (traffic rate) to it is too fast it
sends the source quench message to the source to slow the pace down so that no packet can be lost.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Parameter Problem
Whenever packets come to the router then the calculated header checksum should be equal to the
received header checksum then only the packet is accepted by the router.
If there is a mismatch packet will be dropped by the router.
ICMP will take the source IP from the discarded packet and inform the source by sending a parameter
problem message.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Time Exceeded Message
A notification with the subject line "Time Exceeded" is typically generated by routers or gateways. You need
to know what an IP header is in a packet in order to comprehend this ICMP message in its entirety.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Destination Un-reachable
The destination is unreachable and is generated by the host or its inbound gateway to inform the client that
the destination is unreachable for some reason.
There is no necessary condition that only the router gives the ICMP error message time the destination host
sends an ICMP error message when any type of failure (link failure, hardware failure, port failure, etc)
happens in the network.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Redirection Message
Redirect requests data packets are sent on an alternate route. The message informs a host to update its
routing information (to send packets on an alternate route).

Example: If the host tries to send data through a router R1 and R1 sends data on a router R2 and there is a
direct way from the host to R2. Then R1 will send a redirect message to inform the host that there is the best
way to the destination directly through R2 available. The host then sends data packets for the destination
directly to R2.
The router R2 will send the original datagram to the intended destination.
But if the datagram contains routing information then this message will not be sent even if a better route is
available as redirects should only be sent by gateways and should not be sent by Internet hosts.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Advantages of ICMP
Network devices use ICMP to send error messages, and administrators can use
the Ping and Tracert commands to debug the network.
These alerts are used by administrators to identify issues with network
connectivity.

A prime example is when a destination or gateway host notifies the source host
via an ICMP message if there is a problem or a change in network connectivity
that needs to be reported. Examples include when a destination host or
networking becomes unavailable, when a packet is lost during transmission, etc.
Furthermore, network performance and connection monitoring tools commonly
employ ICMP to identify the existence of issues that the network team has to
resolve.

One quick and simple method to test connections and find the source is to use
the ICMP protocol, which consists of queries and answers.
Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
Disadvantages of ICMP
If the router drops a packet, it may be due to an error; but, because
to the way the IP (internet protocol) is designed, there is no way for
the sender to be notified of this problem.

Assume, while a data packet is being transmitted over the internet,


that its lifetime is over and that the value of the time to live field has
dropped to zero. In this case, the data packet is destroyed.

Although devices frequently need to interact with one another,


there isn't a standard method for them to do so in Internet Protocol.
For instance, the host needs to verify the destination's vital signs to
see if it is still operational before transmitting data.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
IGMP(Internet Group Management Protocol)
IGMP is a communication protocol used by IPv4 hosts and routers to
establish and manage multicast group memberships.

🔹 Purpose:
It allows a computer (host) to inform its local router that it wants to
join or leave a multicast group (i.e., receive traffic for a specific
multicast IP address).

🔹 Where it works:
Operates at the Network Layer (Layer 3 of the OSI model).
Works between hosts and the nearest multicast router.
Used only in IPv4 networks (for IPv6, MLD – Multicast Listener Discovery
– is used).
Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
•Host ↔ Local Multicast Router: IGMP manages join/leave requests for multicast
groups.
•Class D Addresses (224–239) are used for multicast group communication.
•Switch with IGMP Snooping: Listens to IGMP messages, updates its table, and
forwards only necessary multicast traffic.
•Local → Remote Routers: Multicast traffic is forwarded using PIM (Protocol
Independent Multicast).
•Result: Only interested clients receive multicast data, saving bandwidth.
Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
The IP protocol supports two types of communication:

1. Unicasting- It is a communication between one sender and one receiver. Therefore, we can
say that it is one-to-one communication.
2. Multicasting: Sometimes the sender wants to send the same message to a large of receivers
simultaneously. This process is known as multicasting which has one-to-many communication.

Applications:

1. Streaming - Multicast routing protocols are used for audio and video streaming over the
network i.e., either one-to-many or many-to-many.
2. Gaming - Internet group management protocol is often used in simulation games which has
multiple users over the network such as online games.
3. Web Conferencing tools - Video conferencing is a new method to meet people from your own
convenience and IGMP connects to the users for conferencing and transfers the
message/data packets efficiently.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
What Types of IGMP Messages Are There?
The IGMP uses several types of messages to manage multicast group memberships:
IGMP Membership Query: The Sent by routers to determine which multicast groups have members on a
particular network segment. This query helps routers maintain accurate multicast group membership
information.
IGMP Membership Report: Sent by hosts to indicate their interest in joining a multicast group. This report
informs the router of the presence of a host that wants to receive multicast traffic.
IGMP Leave Group(Leave Report): Sent by hosts to indicate that they are leaving a multicast group. This
message informs the router that the host no longer wants to receive traffic for that group.
IGMP V3 Membership Report (in IGMPv3): This allows hosts to specify the exact multicast group addresses
they want to join or leave and can include source-specific multicast (SSM) information.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
IGMP Message Fields
[Link] (8-bit)
•Identifies the message type:
•0x11 (00010001) → General/Special Query
•0x16 (00010110) → Membership Report
•0x17 (00010111) → Leave Report
[Link] Response Time (8-bit)
•Time (in tenths of a second) to reply to a query.
•Nonzero only in query messages; zero in others.
[Link] (16-bit)
•Error-checking field, calculated over the 8-byte message.
[Link] Address (32-bit)
•0 for general query.
•Contains multicast group address for special query, membership report, and leave report.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
IGMP Operation
1. Host Join:
Host sends Membership Report to join a multicast group.
2. Router Query:
Local multicast router sends Query messages to check if members are still
interested.
3. Host Response:
Hosts respond with Membership Reports within the Maximum Response Time.
4. Leave Group:
When a host leaves, it sends a Leave Report.
Router checks if other members still exist before stopping multicast forwarding.
5. Switch Role (IGMP Snooping):
Switch listens to IGMP messages and forwards multicast only to interested
hosts.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
ICMPv6
•ICMPv6 is the control message protocol for IPv6.
•It handles error reporting, diagnostics, and network management in IPv6 networks.
•Defined as an integral part of IPv6, unlike ICMP in IPv4 which is separate.

Functions of ICMPv6
[Link] Reporting
•Destination Unreachable
•Packet Too Big
•Time Exceeded
•Parameter Problem
[Link] Messages
•Echo Request & Reply (Ping in IPv6).
[Link] Discovery (ND) Protocol
•Replaces ARP in IPv6.
•Handles address resolution, router discovery, and neighbor reachability.
[Link] Listener Discovery (MLD)
•Equivalent to IGMP in IPv4.
•Manages multicast group membership in IPv6.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
NETWORK LAYER DESIGN ISSUES

1. Store-and-Forward Packet Switching

2. Services Provided to the Transport Layer

3. Implementation of Connectionless
Service

4. Implementation of Connection-Oriented
Service

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
NETWORK LAYER DESIGN ISSUES
1. Store-and-Forward Packet Switching
•Packets are transmitted hop by hop from source to destination.
•Each router receives the entire packet, stores it temporarily,
checks for errors, and then forwards it to the next node.
•Ensures reliable delivery but adds latency at each hop.
•Example: Internet routing.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
NETWORK LAYER DESIGN ISSUES
2. Services Provided to the Transport Layer
The network layer provides services to the transport layer above it. Key design
choices:

Connectionless Service (Datagram Service) (UDP)


No setup required before sending packets.
Each packet (datagram) is routed independently.
Unreliable, best-effort delivery.
Example: IP.

Connection-Oriented Service (Virtual Circuit Service) (TCP)


Path is established before data transfer.
All packets follow the same route (virtual circuit).
Provides sequencing and reliability.
Example: ATM, MPLS.
Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
NETWORK LAYER DESIGN ISSUES
3. Implementation of Connectionless Service(UDP)
Packets are called datagrams.
Each datagram carries:
Destination address (for routing).
Optional sequence number (to reassemble at
receiver).
Routers use routing algorithms to forward
independently.
No guarantee of delivery, order, or duplicate
protection.
Example protocol: IP (Internet Protocol).

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
NETWORK LAYER DESIGN ISSUES

4. Implementation of Connection-Oriented
Service(TCP)
Uses the concept of a virtual circuit (VC).
Three phases:
Connection Establishment – path set up across
routers.
Data Transfer – all packets follow the VC with
assigned identifiers (not full addresses).
Connection Release – resources freed after
transmission.
Provides order, reliability, and congestion control.
Example protocols: X.25, ATM, Frame Relay.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Comparison of Virtual-Circuit and Datagram Networks

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
Routing Algorithm
1. A routing algorithm is a procedure that lays down the route or path to
transfer data packets from source to the destination.
2. They help in directing Internet traffic efficiently.
3. After a data packet leaves its source, it can choose among the many
different paths to reach its destination.
4. Routing algorithm mathematically computes the best path, i.e. least cost
path that the packet can be routed through.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
The Optimality Principle
The purpose of a routing algorithm at a router is to decide which output line an incoming packet should go.
The optimal path from a particular router to another may be the least cost path, the least distance path, the
least time path, the least hops path or a combination of any of the above.
The optimality principle can be logically proved as follows

If a better route could be found between router J and router K, the path from router I to router K via J would
be updated via this route. Thus, the optimal path from J to K will again lie on the optimal path from I to K.
Example
Consider a network of routers, {G, H, I, J, K, L, M, N} as shown in the figure. Let the optimal route from I to K be
as shown via the green path, i.e. via the route I-G-J-L-K. According to the optimality principle, the optimal
path from J to K with be along the same route, i.e. J-L-K.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Now, suppose we find a better route from J to K is found, say along J-M-N-K. Consequently, we will also need
to update the optimal route from I to K as I-GJ- M-N-K, since the previous route ceases to be optimal in this
situation. This new optimal path is shown line orange lines in the following figure

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Types of Routing Algorithms
Routing algorithms can be broadly categorized into two types, adaptive and nonadaptive routing
algorithms. They can be further categorized as shown in the following diagram

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Adaptive Routing Algorithms
Adaptive routing algorithms, also known as dynamic routing algorithms,
makes routing decisions dynamically depending on the network conditions. It
constructs the routing table depending upon the network traffic
and topology. They try to compute the optimized route depending upon the
hop count, transit time and distance.

The three popular types of adaptive routing algorithms are

1. Centralized algorithm It finds the least-cost path between source and


destination nodes by using global knowledge about the network. So, it
is also known as global routing algorithm.

2. Isolated algorithm This algorithm procures the routing information by


using local information instead of gathering information from other
nodes.

3. Distributed algorithm This is a decentralized algorithm that computes


the least-cost path between source and destination iteratively in a
distributed manner.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Non Adaptive Routing Algorithms
Non-adaptive Routing algorithms, also known as static
routing algorithms, construct a static routing table to
determine the path through which packets are to be sent.
The static routing table is constructed based upon the
routing information stored in the routers when the network
is booted up.

The two types of non adaptive routing algorithms are


1. Flooding In flooding, when a data packet arrives at
a router, it is sent to all the outgoing links except the
one it has arrived on. Flooding may be uncontrolled,
controlled or selective flooding.
2. Random walks This is a probabilistic algorithm where
a data packet is sent by the router to any one of its
neighbours randomly.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
Shortest path algorithms
Shortest path algorithms are a class of routing algorithms used to find
the most efficient route between two points in a network, where
"efficiency" is defined by a specific metric.
This metric could be distance, cost, delay, bandwidth, or any other
factor that needs to be minimized.
These algorithms are fundamental in various applications, including
computer networks (e.g., IP routing), transportation planning, and
logistics.

Common Shortest Path Algorithms


1. Dijkstra’s Algorithm
2. Bellman Ford’s Algorithm
3. Floyd Warshall’s Algorithm
Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
(Dijkstra’s Algorithm ):
The Shortest Path Algorithm is used in networks to find the most efficient route between two nodes. It is
widely applied in routing to ensure data travels along the best path.
1. Model the Network as a Graph
1. Nodes → routers (A, B, C, etc.).
2. Edges → communication links with weights (distance, delay, cost, etc.).
2. Initialization
1. Start node (source) gets distance = 0.
2. All other nodes are labeled ∞ (unknown distance).
3. Labels are tentative at first.
3. Iteration
1. Pick the node with the smallest tentative distance (make it permanent).
2. Update its neighbors:
If distance(current node) + edge weight < current label of neighbor , update the neighbor’s label.
4. Repeat
1. Continue selecting the smallest labeled node, making it permanent, and updating neighbors.
2. This ensures each permanent node is at its shortest possible distance from the source.
5. Reconstruct Path
1. Each node keeps track of its predecessor.
2. Once the destination is reached, follow predecessors backward to build the shortest path.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
We need the shortest path from A to
D.
Start at A (0). Neighbors:
B = 2, G = 6.
Choose B (2) as next working node.
Update neighbors:
C = 9, E = 4.
Choose E (4). Update:
F = 6.
Choose G (5). Update:
H = 9.
Choose F (6). Update:
D = 8.
Choose D (8) → destination reached.
Result: Shortest path is A → B → E → F
→ D with total cost = 8.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Flooding (Routing Technique):
Definition:
Each router forwards every incoming packet to all outgoing links (except the one it came from).
Problem:
Creates many duplicate packets → risk of infinite loops.
Solutions to Control Flooding:
Hop Counter: Each packet has a hop limit (decremented at every router, discarded when it hits zero).
Sequence Numbers: Each packet has a unique ID; routers keep track of packets already seen and
avoid forwarding duplicates.
Advantages:
Guarantees delivery (packet reaches every node if a path exists).
Very robust (works even if many routers fail).
Simple (routers only need to know their neighbors).
Naturally achieves shortest path delivery (since all possible paths are tried in parallel).
Disadvantages:
Generates huge overhead (many unnecessary duplicate packets).
Not efficient for normal data transmission.
Uses:
Broadcasting (send to all nodes).
Military / disaster networks (high robustness needed).
As a baseline for comparing routing algorithms.
Wireless networks (where signals naturally reach all stations within range).
Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
Distance Vector Routing
Definition:
Distance Vector Routing is a dynamic routing algorithm in which each router maintains a table (called a
routing table) containing the best-known distance to each destination and the direction (next hop) to reach
it.

Key Concepts
[Link] (Metric):
•Typically measured in hops (number of routers to cross).
•Other metrics like delay, bandwidth, or cost can also be used.
[Link]:
•Refers to the “direction” (next hop router) to reach a destination.
[Link] Table:
Each router keeps entries of the form:
Destination | Distance (Cost) | Next Hop
[Link] Mechanism:
•Routers periodically exchange their routing tables with their immediate neighbors.
•Each router updates its own table based on the information received using the Bellman-Ford
Algorithm.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Finally the routing table for all
Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
Link State Routing
Link State Routing is a dynamic routing algorithm used in computer networks. Unlike Distance Vector Routing
(which relies on neighbors’ information), each router builds a complete map of the network topology and
independently computes the shortest path to every other node using Dijkstra’s algorithm.

Steps in Link State Routing


1. Discover neighbors & learn their addresses
Each router finds out who its directly connected neighbors are.
2. Measure the cost (delay, bandwidth, hops, etc.) to each neighbor
For example, link cost may depend on bandwidth or traffic load.
3. Construct a Link State Packet (LSP)
An LSP contains:
Router ID
List of neighbors and their costs
Sequence number (to avoid old information)
Time-to-live (TTL)
4. Flood the LSP to all routers
Each router sends its LSP to every other router in the network (using controlled flooding).
This way, every router eventually learns the entire network topology.
5. Build the Link State Database (LSDB)
Each router stores all received LSPs → giving a full picture of the network graph.
6. Compute shortest paths using Dijkstra’s Algorithm
From its own perspective, each router computes the shortest path tree (SPT).
Then it fills its routing table with the next-hop for each destination.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Link State Routing

Flooding of LSP
Dijkstra Algorithm

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Link State Routing

Flooding of LSP
Dijkstra Algorithm

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Hierarchical Routing

1. Hierarchical routing divides a large network into smaller regions or layers, with
routers in each layer only needing to know about routes within their region and
to other regions, rather than every individual device.
2. This "divide and conquer" strategy significantly reduces the size of routing
tables, minimizes routing complexity, and improves scalability and efficiency
for large networks by localizing routing information and speeding up
communication.

Divide various networks into Subnets(Regions)

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
How it Works
1. Network Division:
The network is partitioned into distinct regions or "domains".
2. Layered Routing:
Local Level: Routers within a region handle traffic for devices inside that
same region.
Network Level: Routers at higher levels view each region as a single node,
managing traffic between regions through gateway or border routers.
3. Reduced Routing Tables:
Each router maintains detailed routing information only for its local region and
provides only summary information for other regions, drastically shrinking the
size of its routing table.
4. Efficient Communication:
Data packets are first routed to the appropriate region and then delivered to
the final destination within that region, similar to how a postal service works.
Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
Example
Consider an example of two-level hierarchy with five
regions as shown in figure

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Key Benefits
Scalability:
It allows networks to scale efficiently by managing complexity in structured layers.
Reduced Table Size:
The most significant advantage is the substantial reduction in the size of routing tables, leading to lower
memory requirements and faster processing.
Improved Performance:
Less communication between regions speeds up overall network communication.
Simplified Administration:
Dividing the network into smaller, manageable units simplifies network administration.
Drawbacks
Non-Optimal Paths:
By forcing packets through the hierarchy, it can sometimes lead to longer, non-optimal paths compared to
a flat routing system.
Implementation Complexity:
Implementing these layered systems can introduce additional complexities into network design and
management.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Broadcast Routing
Broadcast routing is a computer networking method for sending a data packet from a source node to all
other nodes within a network simultaneously. Unlike one-to-one unicast or one-to-many multicast routing,
broadcast routing delivers a single message to every device on the local network. Common methods for
achieving broadcast include the spanning tree method, where packets are forwarded along a tree structure
to avoid loops, and flooding, where packets are sent to every adjacent node.

How it Works
Packet Creation: A source node creates a data packet.
Targeted Delivery: Instead of a single destination address, the packet is addressed to all nodes on the
network.
Forwarding: Routers or other network devices forward this packet to all connected devices.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
Use Cases
1. ARP (Address Resolution Protocol): In local area networks,
broadcast is used to find a device's physical (MAC) address based
on its IP address.
2. DHCP (Dynamic Host Configuration Protocol): DHCP clients
broadcast a request to find a DHCP server on the local network to
obtain an IP address.
3. Local Network Discovery: Some network discovery protocols use
broadcasts to find other devices and services on the network.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Multicast Routing

What it is:
Multicasting means sending packets from a sender to a specific
group of receivers (not everyone like broadcast, and not one-to-one
like unicast).
Example: live sports streaming, online gaming.

Why needed:
Unicast to many → wasteful (duplicate packets).
Broadcast → also wasteful (reaches uninterested nodes).
Multicast → efficient, only to interested group members.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Techniques
1. Spanning Tree–Based Multicasting
Start with a broadcast spanning tree.
Pruning: remove links that do not lead to group members.
Different groups → different multicast trees.
Example protocols:
MOSPF (Multicast OSPF – link state).
DVMRP (Distance Vector Multicast Routing Protocol – distance vector + prune).
📌 Fig. 5-16 shows:
(a) Network
(b) Broadcast spanning tree
(c) Pruned tree for group 1
(d) Pruned tree for group 2

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
[Link]-Based Trees (Shared Trees)
Instead of many sender-based trees, build one tree per group with a core (rendezvous point).
All senders forward packets to the core → core distributes down the tree.
Reduces storage and computation (only 1 tree per group, not per sender).
Efficient for sparse groups.
Example protocol: PIM (Protocol Independent Multicast).
📌 Fig. 5-17 shows:
(a) Core-based tree for group 1
(b) How packets flow via the core

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Anycast Routing

Anycast is a delivery model where a packet is delivered to the nearest member


of a group (not all members like multicast).
Use cases:
Services where any node can reply (not a specific one).
Examples:
DNS servers (query goes to the closest server).
Content Delivery Networks (CDNs).
Time servers.
How it works:
•Nodes offering the same service share a common address (e.g., "1").
•Routing protocols (distance vector or link state) treat all these nodes as if they
were a single destination.
•The protocol automatically routes packets to the nearest instance of that
destination.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Figures Explained:
Fig. 5-18(a):
Shows multiple instances of node "1" → packets from sources are routed to the
nearest one.
Fig. 5-18(b):
From the routing protocol’s view, all "1"s appear as one node (abstracted), so it
just builds normal shortest paths.
Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
Routing for Mobile Hosts
Problem:
Mobile hosts move between networks but still need to be reachable using their
fixed home address.
Key Idea:
Use a Home Agent (HA) at the host’s permanent home location.
The mobile host gets a temporary Care-of Address (CoA) in the foreign network
and registers it with the HA.

Notes:
Triangle Routing: Path goes sender → home agent → mobile host → sender.
Tunneling: Encapsulation technique used to forward packets to CoA.
Security: Registration and tunneling must be authenticated.
Applications: Used in Mobile IPv6 and IP-based cellular networks.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Routing for Mobile Hosts
Steps (as in Fig. 5-19):
1. Register Care-of Address → Mobile host tells HA its current location.
2. Send to Home Address → Sender sends packets to the host’s fixed home address.
3. Tunnel to Care-of Address → HA intercepts and tunnels packets to CoA.
4. Reply to Sender → Mobile host replies directly to sender.
5. Direct Routing → Later, packets may be tunneled directly to CoA (avoiding triangle routing).

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Routing in Ad Hoc Networks
Definition: Ad hoc networks (MANETs) are wireless networks where each node acts as both a host
and a router. The topology changes frequently because nodes move or turn off.

Challenge: Unlike wired networks, routes may become invalid anytime due to node mobility,
making routing more complex.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Routing in Ad Hoc Networks
Routing Protocol Example – AODV (Ad hoc On-demand Distance Vector):
On-demand: Routes are discovered only when needed (saves bandwidth and energy).
Route Discovery: A node broadcasts a Route Request (RREQ). The destination (or a node with
a valid route) replies with a Route Reply (RREP), creating a path.
Route Maintenance: Nodes send Hello messages to check neighbors. If a node becomes
unreachable, affected routes are purged, and new discovery is triggered.
Sequence Numbers: Used to avoid old/invalid routes and ensure loop-free, fresh paths.

Other Protocols:
DSR (Dynamic Source Routing): Uses source routing with route caches.
GPSR (Geographic Routing): Uses node positions to forward packets greedily toward the
destination.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Ass. Prof. Kunal D Gaikwad
Pursuing PHD, M.E, B.E, Diploma
Distance-Vector Routing

A dynamic routing algorithm used in computer networks.

Each router maintains a routing table (vector of distances) that stores


the best-known distance to every other router.

Routers periodically exchange their tables with neighbors and


update their own using the Bellman–Ford equation.

✅ Advantages:
•Simple to implement.
•Works well in small networks.

❌ Disadvantages:
•Count-to-infinity problem (slow convergence when a link fails).
•Not scalable for large networks.
•Requires periodic updates → extra bandwidth usage.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
The Bellman–Ford algorithm is used to find the shortest path from a single source to all other vertices in a
weighted graph.
It can handle negative edge weights (unlike Dijkstra), but not negative weight cycles.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Path-Vector Routing
Path-Vector Routing is an extension of Distance-Vector Routing used for inter-domain routing (between
autonomous systems, AS).
Instead of just sending distance (cost), routers send the entire path (sequence of AS numbers) to reach a
destination.
This avoids problems like count-to-infinity and routing loops.

🔹 How It Works
1. Each router (AS) maintains a routing table with entries like:
1. Destination network
2. Path (list of AS numbers to reach it)
3. Next hop
4. Other attributes (policy, preference, etc.)
2. Routers exchange these paths with their neighbors.
3. When a router receives a path:
1. It appends its own AS number to the path before advertising further.
2. If its own AS number is already in the path → discard (prevents loops).
4. Path selection is based on policies (not just shortest distance).
1. For example, an ISP may prefer one provider over another, even if the path is longer.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Path-Vector Routing

🔹 Example
AS1 wants to reach Network X.
AS1 → AS2 → AS3 → X (path is stored and advertised).
If AS3 advertises to AS4: Path = {AS3, AS2, AS1, X}.
AS4 sees complete path and avoids loops by checking AS numbers.

🔹 Used In
Border Gateway Protocol (BGP) → the Internet’s main inter-domain routing protocol.
🔹 Advantages
✅ Prevents routing loops using path information.
✅ Flexible – can use routing policies (not only shortest path).
✅ Scales to the global Internet.
🔹 Disadvantages
❌ More complex than Distance-Vector.
❌ Convergence can be slow.
❌ Path information requires more storage.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
UNICAST ROUTING PROTOCOLS

What is Unicast Routing?


Unicast routing means sending packets from one source to one destination (host-
to-host communication).
To do this efficiently, the Internet uses unicast routing protocols that are based on
routing algorithms but also define message formats, communication rules, and
domains of operation.

🔹 Key Internet Unicast Routing Protocols


1. Routing Information Protocol RIP → Distance-Vector (small networks, IGP).
2. Open Shortest Path First OSPF → Link-State (large networks, IGP).
3. Border Gateway Protocol BGP → Path-Vector (between ASes, EGP).

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Routing Information Protocol (RIP)

Routing Information Protocol (RIP)


Based on: Distance-Vector Algorithm.
Operation:
Each router exchanges its routing table with neighbors every 30
seconds.
Uses hop count as metric (max 15 hops → limits network size).
Domain: Used inside small networks (Interior Gateway Protocol, IGP).
Weakness: Slow convergence, count-to-infinity problem.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Open Shortest Path First (OSPF)

Open Shortest Path First (OSPF)


Based on: Link-State Algorithm.
Operation:
Each router discovers its neighbors and floods link-state information.
All routers build a map of the network topology and compute shortest paths
using Dijkstra’s algorithm.
Domain: Interior Gateway Protocol (IGP), used within an Autonomous System
(AS).
Strength: Scales well, supports hierarchy (areas), fast convergence, supports
authentication and QoS.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Border Gateway Protocol Version 4 (BGP4)

Border Gateway Protocol (BGP)


Based on: Path-Vector Algorithm.
Operation:
Routers exchange entire AS-level paths to destinations.
Prevents loops by rejecting routes that already contain the AS.
Routing decisions based on policies (not just shortest path).
Domain: Exterior Gateway Protocol (EGP), used between ASes
(inter-domain routing).
Importance: BGP is the backbone of the Internet.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
INTERNETWORKING

🔹 What is Internetworking?
Internetworking = Connecting multiple different networks together so
they function as a single, large network.
Example: LANs, WANs, Wi-Fi, satellite links all combined to form the
Internet.
It requires a common protocol so that devices in different networks
can communicate → this is where the Network Layer (IP) comes in.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Need for Network Layer

Need for Network Layer


Different networks use different technologies (Ethernet, Wi-Fi, etc.).
The Network Layer (IP) provides:
Uniform addressing (IP addresses) so devices can identify each
other.
Routing: Deciding the path packets take across interconnected
networks.
Packet delivery: Host-to-host communication across
heterogeneous networks.
Without a network layer, communication would only work within a
single local network.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Internet as a Datagram Network

The Internet uses the datagram approach (like postal mail).


Each packet is independent and carries:
Source IP address
Destination IP address
Routers forward packets individually, possibly along different paths.
No guarantee that packets will arrive in order or even arrive at all.
Connectionless service → Best-effort delivery (unreliable).

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
Internet as a Connectionless Network

Unlike connection-oriented networks (like telephone


systems), the Internet is connectionless at the Network Layer:
No dedicated path is established before sending packets.
Each packet is routed independently.
Benefits:
Simple, scalable, efficient use of resources.
Drawback:
Reliability, ordering, error control → handled by Transport
Layer (TCP), not the Network Layer.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma
✅ In summary:
Internetworking allows multiple networks to function as one.
The Network Layer (IP) is essential for addressing and routing.
The Internet uses a datagram, connectionless model →
packets are sent independently with best-effort delivery.

Ass. Prof. Kunal D Gaikwad


Pursuing PHD, M.E, B.E, Diploma

You might also like