0% found this document useful (0 votes)
4 views57 pages

CN Unit-3 Notes

The document covers the fundamentals of the network layer, focusing on Internet addressing, classful addressing, subnetting, routing, and DHCP. It explains the structure of IP addresses, the different classes of addressing, the problems associated with classful addressing, and the processes involved in subnetting and routing. Additionally, it details the workings of DHCP in automatically assigning IP addresses to devices on a network.

Uploaded by

almighty.aytul
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)
4 views57 pages

CN Unit-3 Notes

The document covers the fundamentals of the network layer, focusing on Internet addressing, classful addressing, subnetting, routing, and DHCP. It explains the structure of IP addresses, the different classes of addressing, the problems associated with classful addressing, and the processes involved in subnetting and routing. Additionally, it details the workings of DHCP in automatically assigning IP addresses to devices on a network.

Uploaded by

almighty.aytul
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
You are on page 1/ 57

UNIT:- 3

NETWORK LAYER

INTERNET ADDRESS
• IP address is an address having information about how to reach
a specific host, especially outside the LAN. An IP address is a
32-bit unique address having an address space of 232.
• Generally, there are two notations in which IP address is written,
dotted decimal notation and hexadecimal notation.

Dotted Decimal Notation:

Hexadecimal Notation:

Some points to be noted about dotted decimal notation:


• The value of any segment (byte) is between 0 and 255 (both
included).
• There are no zeroes preceding the value in any segment (054 is
wrong, 54 is correct).

CLASSFUL ADDRESSING
Classful Addressing is a way of dividing the 32-bit IPv4 address into
five different classes. Each class is designed to serve different sizes
of networks from very large to very small or for special purposes.
IPv4 address is divided into two parts:
• Network ID
• Host ID
The Network ID identifies the overall network, and the Host ID
identifies the specific device (like a computer or printer) on that
network.
Note: IP addresses are globally managed by Internet Assigned
Numbers Authority (IANA) and regional Internet registries (IR).

CLASSES OF IP ADDRESSING

The 32-bit IP address is divided into five sub-classes. These are given
below:

• Class A
• Class B
• Class C
• Class D
• Class E

Class A:
IP address belonging to class A are assigned to the networks that
contain many hosts.
• The network ID is 8 bits long.
• The host ID is 24 bits long.
The first number in a Class A address ranges from 1 to 126. For
example, the IP address 10.0.0.1 would fall under Class A. These
addresses are suitable for networks that require a huge number of
connected devices.

Class B:
IP address belonging to class B are assigned to the networks that
ranges from medium-sized to large-sized networks.
• The network ID is 16 bits long.
• The host ID is 16 bits long.

The first number in a Class B address ranges from 128 to 191. An


example might be 172.16.0.1. This class offers more network IDs
than Class A but fewer host IDs per network.

Class C:
IP address belonging to class C are assigned to small-sized networks.
• The network ID is 24 bits long.
• The host ID is 8 bits long.
The first number in a Class C address ranges from 192 to 223. For
example, 192.168.1.1 is a common Class C address used in home
routers.

Class D:
Class D addresses are not used for regular network
communication. Instead, they are reserved for a special use called
multicasting. In multicasting, data is sent from one source to
multiple destinations at the same time. These addresses are not
divided into network and host parts. Class D addresses start with the
numbers 224 to 239 in the first part.
They are used mostly for audio or video streaming, online gaming, or
other services that need to send the same data to many users.

Class E:
Class E addresses are reserved for experimental or research
purposes. These are not used in everyday networking and are kept
for testing new technologies. Just like Class D, Class E addresses are
also not divided into network and host parts. They start from 240 up
to 255. Because they are experimental, you will rarely see Class E
addresses used in practice.

PROBLEMS OF CLASSFUL ADDRESSING

1. Wastage of IP Addresses
• In classful addressing, many IP addresses go unused.
• For example, Class A provides millions of addresses per
network, but most organizations don’t need that many.
• This leads to wasting many IPs, especially in Class A and Class
B.
2. Fixed Size Blocks
• The classes (A, B, C) have fixed sizes of network and host
portions.
• You can’t customize the size of the network or number of hosts
based on your needs.
• A small company might get a Class B address, which is too big,
or a Class C address, which might be too small.

3. Limited Number of Networks


• In Class A, the number of available networks is very small
(only 128).
• As the internet grew, this became a big limitation for assigning
addresses efficiently.

4. Uneven Distribution
• Most Class A and B addresses were given to early
organizations and big companies.
• Smaller networks were forced to use Class C, even if it wasn't
enough for their needs.
• This created an unfair and unbalanced allocation of IP
addresses.

5. No Support for Efficient Routing


• Since classful addressing doesn’t support route
summarization (grouping IPs together),
• It causes a lot of entries in routing tables, making internet
routing slower and more complicated.

6. No Flexibility or Scalability
• Classful addressing lacks flexibility to divide networks based
on actual requirements.
• As networks grew, this rigid structure couldn’t scale well,
which became a problem.

SUBNETTING

Subnetting is the process of dividing a large computer network into


smaller, more manageable parts called subnets or subnetworks.
Think of it like splitting a big classroom of students into small groups
so that the teacher can manage them better. Similarly, subnetting
helps in organizing and managing large networks more efficiently.

When a network is sub netted, it means we are breaking a big block


of IP addresses into smaller blocks. Each of these smaller blocks
becomes a subnet, and each subnet has its own subnet address,
which helps identify it separately from other subnets. Inside each
subnet, the IP addresses are divided into two parts: the Subnet ID
(which tells which subnet it belongs to) and the Host ID (which
identifies the individual device inside that subnet).

Subnetting changes the way the IP address is used. It increases the


number of bits used for the network (or subnet) part and decreases
the number of bits left for the host part. This means fewer devices can
exist in each subnet, but the network becomes more organized and
secure.

SUBNET ADDRESS

The Subnet Address is the first IP address in a subnet. It is special


because it acts like the name or label for that subnet. Routers and
other networking devices use this address to figure out where to send
data. So, when a device wants to send a message to another device
in a particular subnet, it uses the subnet address to make sure the
message goes in the right direction.

ROUTING

Routing is the process of finding the best path for data to travel from
one computer to another across a network. Just like how a delivery
person chooses the shortest or fastest route to deliver a package,
routers (special devices on the internet or in a network) decide which
path data should take to reach its destination. When you send a
message or open a website, your data is broken into small pieces
called packets. These packets are sent through various devices and
paths, and routing helps guide each packet correctly until it reaches
the right device or server. Routing ensures that data moves efficiently,
even if there are many different routes it could take.
TYPES/TECHNIQUES OF ROUTING

Routing is typically of 2 types, each serving its purpose and offering


different functionalities.

1. Static Routing
2. Dynamic Routing

1. Static Routing

Static routing is also called as "non-adaptive routing". In this,


routing configuration is done manually by the network administrator.
Let's say for example, we have 5 different routes to transmit data
from one node to another, so the network administrator will have to
manually enter the routing information by assessing all the routes.

• A network administrator has full control over the network,


routing the data packets to their concerned destinations
• Routers will route packets to the destination configured
manually by the network administrator.
• Although this type of routing gives fine-grained control over the
routes, it may not be suitable for large-scale enterprise
networks.

Advantages:

1. Simple to set up – Easy to configure in small networks.


2. More secure – Since no automatic updates happen, it’s harder
for unwanted changes to occur.
3. Uses less bandwidth – No need to send extra data to discover
routes.

Disadvantages:

1. Manual work needed – Every route must be added and updated


by hand.
2. No automatic updates – Routes don’t change even if the
network goes down.
3. Not good for big networks – Too much effort to manage many
routes.

2. Dynamic Routing

Dynamic routing is a smarter, more flexible way of routing where the


router can automatically find and update the best path for sending
data. It does not need manual configuration for every route. Instead,
routers use special algorithms and rules to calculate the shortest
and most efficient path based on current network conditions.
• It is also known as adaptive routing.
• In this, if there is a change in the network like a new route
becoming available or an old one failing the router will
automatically update its routing table to adapt.
• Although, this makes dynamic routing perfect for large,
complex, or constantly changing networks because it can
respond quickly without human help. That’s why most modern
networks prefer dynamic routing over static routing.
Advantages:

1. Auto-updates routes – Changes paths automatically when the


network changes.
2. Easier for large networks – Can handle complex and growing
networks smoothly.
3. Less manual work – Reduces the need for constant admin
involvement.

Disadvantages:

1. More complex – Setup and management can be harder to


understand.
2. Uses more bandwidth – Needs to send routing updates
between routers.
3. Slightly slower decisions – Takes some time to calculate the
best route.

DIFFERENCE BETWEEN STATIC AND DYNAMIC ROUTING

Static routing and dynamic routing are two fundamental concepts


in network communication. Static routing uses preconfigured paths,
while dynamic routing automatically adjusts paths based on current
network conditions.

Static Routing Dynamic Routing


In static routing routes are user In dynamic routing, routes are
defined. updated according to the topology.
Static routing does not use complex Dynamic routing uses complex
routing algorithms. routing algorithms.
Static routing provides high or more Dynamic routing provides less
security. security.
Static routing is manual. Dynamic routing is automated.
Static routing is implemented in Dynamic routing is implemented in
small networks. large networks.
In static routing, additional In dynamic routing, additional
resources are not required. resources are required.
In static routing, failure of the link In dynamic routing, failure of the link
disrupts the rerouting. does not interrupt the rerouting.
Static Routing is difficult to Dynamic Routing is easy to
configure. configure.
Less Bandwidth is required in Static More Bandwidth is required in
Routing. Dynamic Routing.
Another name for static routing is Another name for dynamic routing is
non-adaptive routing. adaptive routing.

ROUTING TABLE

A routing table is a set of rules, often viewed in table format, that is


used to determine where data packets traveling over an Internet
Protocol (IP) network will be directed. All IP-enabled devices,
including routers and switches, use routing tables.

See below a Routing Table:

Destination Subnet Mask Interface

128.75.43.0 255.255.255.0 Eth0

128.75.43.0 255.255.255.128 Eth1


192.12.17.5 255.255.255.255 Eth3

Default 0.0.0.0 Eth2

The entry corresponding to the default gateway configuration is a


network destination of 0.0.0.0 with a network mask (netmask) of
0.0.0.0. The Subnet Mask of default route is always 0.0.0.0.

ENTRIES OF AN IP ROUTING TABLE

A routing table contains the information necessary to forward a


packet along the best path toward its destination. Each packet
contains information about its origin and destination. Routing Table
provides the device with instructions for sending the packet to the
next hop on its route across the network. Each entry in the routing
table consists of the following entries:

1. Network ID: The network ID or destination corresponding to the


route.
2. Subnet Mask: The mask that is used to match a destination IP
address to the network ID.
3. Next Hop: The IP address to which the packet is forwarded.
4. Outgoing Interface: Outgoing interface the packet should go
out to reach the destination network.
5. Metric: A common use of the metric is to indicate the minimum
number of hops (routers crossed) to the network ID.
Routing table entries can be used to store the following types of
routes:
• Directly Attached Network IDs
• Remote Network IDs
• Host Routes
• Default Route
• Destination

When a router receives a packet, it examines the destination IP


address and looks up into its Routing Table to figure out which
interface packet will be sent out.

DHCP

Dynamic Host Configuration Protocol (DHCP) is a system used in


computer networks to automatically assign IP addresses and other
network settings to devices like computers, phones, and printers.
When a device connects to a network, it needs an IP address to
communicate. Instead of someone manually assigning an IP to each
device (which would take a lot of time and effort), DHCP
automatically gives out IP addresses to every device that joins the
network.

This makes it easier to manage and maintain large networks,


ensuring devices can communicate effectively without conflicts in
their network settings. DHCP plays a crucial role in modern networks
by simplifying the process of connecting devices and managing
network resources efficiently.
WORKING OF DHCP

When a device like a computer, phone, or printer connects to a


network, it needs an IP address to communicate with other devices
or access the internet. Instead of assigning this IP address manually,
the Dynamic Host Configuration Protocol (DHCP) automatically
takes care of this task. This is where the working of DHCP comes into
play. The process of DHCP is carried out through an 8-step message
exchange, explained as follows:

1. DHCP Discover Message

This is the first message sent by a device (called the client) when it
connects to a network and is looking for a DHCP server. Since the
device doesn’t yet have an IP address, it sends out a broadcast
message to everyone on the network asking, “Is there any DHCP
server out there who can give me an IP address?” This message uses
a special IP address 0.0.0.0 as the source (because the device has
no IP yet) and 255.255.255.255 as the destination (which means
broadcast to all devices). The goal is to find any available DHCP
server in the network.

2. DHCP Offer Message

Once a DHCP server receives the discover message, it responds with


a DHCP Offer message. In this message, the server says, “Yes, I’m
a DHCP server and here’s an IP address you can use, along with some
network settings.” This message is also broadcast, and it includes
details like the IP address being offered, the subnet mask, lease time
(how long the device can use the IP), and the server’s ID. If multiple
DHCP servers respond, the client will accept the first offer it receives.

3. DHCP Request Message

After receiving an offer, the client device sends a DHCP Request


message back to the server. This is to say, “Thanks! I’d like to use the
IP address you offered.” But before sending this request, the client
first checks using a method called Gratuitous ARP to see if any other
device is already using that IP. If there is no response, the IP is safe to
use, and the request is broadcast to the server. This message
confirms the client wants to accept the given IP address and network
settings.

4. DHCP Acknowledgement Message (ACK)

Once the server receives the DHCP Request from the client, it sends
back a DHCP Acknowledgement (ACK) message. This confirms that
the IP address and settings are now officially assigned to that client.
The server also stores the information (like client ID, IP address,
lease time) in its memory so that it doesn’t give that same IP to
anyone else until the lease ends or is released.
5. DHCP Negative Acknowledgment Message (NAK)

If the client sends a request for an IP address that is not valid—for


example, if the address is already in use or not part of the server’s
available range—the server replies with a DHCP NAK (Negative
Acknowledgment). This message tells the client that the requested
IP address can’t be assigned, and the client must start the process
over again by sending another Discover message.

6. DHCP Decline Message

Sometimes, after receiving an IP address offer and doing the ARP


check, the client may find that the IP address is already being used
by another device. In this case, the client sends a DHCP Decline
message back to the server to inform it that the offered IP address is
not valid or is already in use. The server then removes that IP from its
available pool.

7. DHCP Release Message

When the client no longer needs the IP address—for example, it’s


shutting down or leaving the network—it sends a DHCP Release
message to the server. This tells the server, “I’m done using this IP,
you can give it to someone else now.” This helps manage IP
addresses more efficiently by freeing up unused ones.
8. DHCP Inform Message

Sometimes a device may already have a manually assigned IP


address (not given by DHCP), but it still needs other settings like the
DNS server or domain name. In this case, the client sends a DHCP
Inform message to the server to ask for just the additional
information. The server responds with a DHCP ACK containing only
the required settings, without assigning a new IP address.

ROUTING ALGORITHMS

A routing algorithm is a procedure that Lays down the route or path


to transfer data packet from source to the destination. To transfer the
packet from Source to the destination, the network Layer must
determine the best route through which packets Can be transmitted.
The routing protocol is a routing algorithm that provides the best path
from the Source to the destination. The best path is the path that has
the "least-Cost path" from Source to the destination.

1. SHORTEST PATH ROUTING ALGORITHM

Shortest Path Routing Algorithms are methods used in networking to


determine the most efficient path for data to travel from a source to
a destination. These algorithms are crucial for optimizing network
performance and ensuring that data packets reach their destination
in the least amount of time or with the least amount of resource
usage.
Working of Shortest Path Routing Algorithm:

1. Graph Representation: The network is represented as a graph


where nodes (vertices) represent routers or switches, and
edges (links) represent the connections between them. Each
edge has a weight, which can represent distance, time, or cost.

2. Algorithm Execution: The algorithm is designed to process a


graph to determine the shortest path from a source node to a
destination node. One commonly used method for this is
Dijkstra's Algorithm. It begins at the source node and
systematically explores all possible paths to identify the
shortest route. To do this efficiently, it uses a priority queue that
helps select the next node to explore based on the currently
known shortest distance from the source.

3. Path Selection: Once the algorithm completes, it provides the


shortest path along with the total cost (distance, time, etc.)
associated with that path.

Advantages of Shortest Path Routing Algorithm:

1. Efficiency: They help in finding the most efficient route for data
transmission, reducing latency and improving overall network
performance.
2. Resource Optimization: By minimizing the distance or cost,
these algorithms help in conserving network resources, such as
bandwidth and energy.
3. Scalability: Many shortest path algorithms can be adapted to
work with large networks, making them suitable for various
applications, from small local networks to large-scale internet
routing.
4. Flexibility: They can be modified to account for different
metrics (e.g., bandwidth, delay) depending on the specific
needs of the network.

Disadvantages of Shortest Path Routing Algorithm:

1. Complexity: Some algorithms, like Dijkstra's, can become


computationally intensive for very large networks, leading to
longer processing times.
2. Static Nature: Many shortest path algorithms do not adapt well
to dynamic changes in the network, such as link failures or
changes in traffic patterns, unless they are specifically
designed to do so.
3. Overhead: Maintaining and updating the routing tables can
introduce overhead, especially in large networks where
frequent updates are necessary.

2. FLOODING ROUTING ALGORITHM


Flooding is one of the most basic and straightforward routing
algorithms used in computer networks. In this method, when a data
packet arrives at a node (like a router or switch), that node sends the
same packet out on all available paths or outgoing links except the
one from which the packet was received. This means that the
algorithm doesn't analyze or calculate the shortest or most efficient
path to the destination. Instead, it simply spreads or “floods” the
packet across the entire network.

Working of Flooding Routing Algorithm:

• In this process, when a source node wants to send data to a


destination node, it doesn’t select a specific path. Instead, it
transmits the same data packet to all its neighboring nodes.
• Each of these neighbors, in turn, receives the packet and again
forwards it to all of their neighboring nodes excluding the one
from which they received the packet. This forwarding process
continues repeatedly throughout the network.
• However, to avoid the risk of packets endlessly circulating in a
loop, the flooding mechanism includes a control mechanism
like a Time-to-Live (TTL) or hop count limit. TTL is a value that
decreases each time the packet passes through a router; when
TTL reaches zero, the packet is discarded. This ensures that the
flooding stops after a certain number of hops, protecting the
network from being overwhelmed.

Advantages of Flooding Routing Algorithm:

1. Simplicity: Flooding is easy to implement because it does not


require complex routing tables or algorithms. Each node simply
forwards messages to its neighbors.
2. Robustness: The method is highly resilient to network changes,
such as node failures or changes in topology, since messages
are sent to all nodes.
3. Guaranteed Delivery: Flooding ensures that the message will
reach the destination if there is a path available, making it
reliable for certain applications.
4. No Need for Prior Knowledge: Flooding does not require any
prior knowledge of the network topology, making it suitable for
dynamic or ad-hoc networks.

Disadvantages of Flooding Routing Algorithm:

1. Network Congestion: Flooding can lead to excessive traffic


and congestion, as multiple copies of the same message are
sent throughout the network, potentially overwhelming nodes
and links.
2. Inefficiency: The method can be inefficient in terms of
bandwidth usage, as many duplicate messages may traverse
the same paths, wasting resources.
3. Scalability Issues: In large networks, flooding can become
impractical due to the high volume of messages being sent,
leading to delays and increased latency.
4. Lack of Control: Since every node forwards messages
indiscriminately, there is little control over the routing process,
which can lead to unpredictable behavior in the network.

3. DISTANCE VECTOR ROUTING ALGORITHM

Distance Vector Routing is a type of dynamic routing algorithm


commonly used in computer networks to determine the best path for
data to travel. In this method, each router maintains a routing table
that holds information about how far each destination is (typically
measured in "hops" or cost) and through which neighboring router
the destination can be reached.

• Instead of having a complete map of the network, each router


only knows about its directly connected neighbors and the
routes they share.
• At regular intervals, every router exchanges its routing table with
its neighbors. This shared information helps routers update
their own tables based on what their neighbors know.

Working of Distance Vector Routing Algorithm:


• The working process starts with each router being aware of only
the distances to its directly connected neighbors. For instance,
if Router A is connected to Router B and Router C, it knows the
distance to B and C, but not to other routers in the network.
• During the exchange process, Router A will receive routing
tables from B and C. It then checks whether it can reach any
destination more efficiently (i.e., in fewer hops) by going
through B or C.
• If it finds a better route, it updates its table with the new
information. This exchange and update process repeats
continuously, allowing all routers in the network to gradually
learn the best paths to every destination.

This entire mechanism is based on the Bellman-Ford algorithm,


which calculates the shortest paths by repeatedly comparing known
routes and updating them when better options are found. The goal is
to always select the path with the lowest cost or fewest hops. While
the algorithm is simple and easy to implement, it can face challenges
like slow convergence and the count-to-infinity problem,
especially in large or changing networks. Nonetheless, Distance
Vector Routing is an important foundational technique in networking.

Advantages of Distance Vector Routing Algorithm:

1. Simple and Easy to Understand: The algorithm is


straightforward to implement.
2. Requires Less Processing Power: Routers only need to share
information with neighbors.
3. Good for Small Networks: Works efficiently in small to
medium-sized networks.

Disadvantages of Distance Vector Routing Algorithm:

1. Slow Convergence: It can take time for all routers to have


accurate information after a network change.
2. Count-to-Infinity Problem: In case of broken paths, routers
may keep increasing the hop count forever unless there are
rules to prevent it.
3. Limited Scalability: Not ideal for very large or complex
networks due to delayed updates and routing loops.

4. LINK STATE ROUTING ALGORITHM

Link State Routing is a type of dynamic routing algorithm used in


computer networks, designed to give each router a complete and
accurate map of the entire network's structure, also known as the
network topology. Unlike Distance Vector Routing, where routers rely
on information from neighbors and may not know the full path, Link
State Routing allows each router to independently calculate the
shortest and most efficient path to every other router in the network.
To achieve this, each router only needs to share details about its
directly connected links which routers it is connected to and how
costly (in terms of distance, delay, or bandwidth) it is to reach them.
Working of Link State Routing Algorithm:

• The working process begins with a router looks around and finds
out which other routers it is directly connected to. It also checks
how good or bad the connection is, like how long it takes or how
busy the path is. Then, the router puts all this information into a
small message called a Link State Packet (LSP). This packet is
sent (or flooded) to all other routers in the network so that
everyone has the same information.
• Once all routers have received LSPs from everyone else, they
store this data to build a full map of the network.
• With this complete map in hand, each router then uses a
special method called Dijkstra's algorithm, each router uses
that map to figure out the shortest and best path to send data
to any other router.

Advantages Link State Routing Algorithm:

1. Fast Convergence: Changes in the network are quickly shared


and used to update paths.
2. More Accurate: Each router calculates the best route using a
complete view of the network.
3. Avoids Routing Loops: Since all routers have consistent and
up-to-date data, loops are less likely.
Disadvantages Link State Routing Algorithm:

1. High Memory and CPU Usage: Storing the full network map
and calculating paths takes more resources.
2. Complex Implementation: The algorithm is harder to set up
and maintain compared to distance vector.
3. More Bandwidth Used Initially: Flooding LSPs uses more
bandwidth, especially in large networks.

Comparison between Distance Vector Routing Algorithm and


Link State Routing Algorithm:

Distance Vector Routing Algorithm Link State Routing Algorithm


Each node shares its routing table Each node shares info about its
with immediate neighbors to update directly connected links to build a full
path distances iteratively. network map and computes paths.
Simple to implement, uses less It requires more processing and
memory and CPU. memory to maintain full map.
Make use of Bellman Ford
Make use of Dijkstra's algorithm.
Algorithm.
Traffic is less. Traffic is more.

Converges slowly. Converges faster.

Count of infinity problem. No count of infinity problem.


Better suited for smaller to medium- Scales well for larger networks due to
sized networks. precise updates.
Practical implementation is RIP and Practical implementation is OSPF
IGRP. and ISIS.
ARP PROTOCOL

The Address Resolution Protocol (ARP) is an important


communication protocol used in computer networks to map an IP
address to a physical address, also known as a MAC (Media Access
Control) address. In simpler terms, when a device (like a computer,
printer, or router) wants to send data to another device on the same
local network, it needs the receiver’s MAC address to deliver the
data correctly. However, devices usually communicate using IP
addresses, and they don’t always know each other’s MAC addresses.
That’s where ARP comes in, it helps find the MAC address that
matches a given IP address.

Working of ARP Protocol:


Suppose your computer wants to send data to another computer on
the same LAN and knows only its IP address. First, your computer
checks its ARP cache (a small memory table where recently
discovered IP-to-MAC address mappings are stored). If the MAC
address is not found there, it sends an ARP Request as a broadcast
message to all the devices on the network. This message says, “Who
has this IP address?” Every device on the local network receives this
message, but only the one with the matching IP address responds
with an ARP Reply, saying, “I have that IP, and here is my MAC
address.” Once your computer receives this reply, it stores the
information in the ARP cache for future use and sends the data
directly to the correct MAC address.

This process is fast and happens behind the scenes every time you
use your network. It is especially useful in IPv4 networks and is a
core part of how devices talk to each other in a LAN. However, ARP
only works within the local network. If the destination IP is not on the
same network, your device sends the data to the default gateway
(usually a router), which then takes care of forwarding it further.
Overall, ARP helps ensure that devices can translate human-friendly
IP addresses into the hardware addresses that are used to deliver
data on a physical network.

Advantages of ARP Protocol:

1. Automatic IP-to-MAC Resolution:


ARP works automatically and dynamically resolves IP
addresses to MAC addresses without manual configuration,
making communication easier on local networks.

2. Efficient Communication on LAN:

It enables efficient communication between devices in a local


network by ensuring that data is delivered to the correct
physical address.

3. Simple and Lightweight Protocol:

ARP is a simple and lightweight protocol that doesn’t use a lot


of system resources, which makes it fast and efficient for small
networks.

Disadvantages of ARP Protocol:

1. Limited to Local Networks:

ARP works only within a single local area network (LAN). It


cannot resolve addresses outside of the local network without
the help of routers.

2. Vulnerable to ARP Spoofing Attacks:

Since ARP has no built-in security, it is vulnerable to attacks like


ARP spoofing or poisoning, where a malicious device can send
fake ARP replies and intercept or misroute network traffic.

3. Broadcast Traffic Overhead:


In large networks, frequent ARP requests can create
unnecessary broadcast traffic, which may slow down network
performance.

RARP PROTOCOL

The Reverse Address Resolution Protocol (RARP) is a network


protocol that works in the opposite way of ARP. While ARP is used to
find the MAC address of a device using its IP address, RARP is used
to find the IP address of a device using its MAC address. This is
helpful in situations where a device only knows it's hardware (MAC)
address but does not know what IP address it should use, such as a
diskless computer or device that has no storage to save an IP
configuration.
Working of RARP Protocol:

• When a device starts up and wants to join a network but doesn’t


know its IP address, it sends out a RARP request using its MAC
address.
• This request is broadcast on the network, asking, “Can anyone
tell me my IP address?” A special server on the network, called
a RARP server, listens for such requests.
• If the server has a record of that MAC address, it responds with
the correct IP address.
• Once the device receives this response, it can use that IP
address to communicate on the network.

Note: However, RARP has limitations, it requires a dedicated RARP


server and can only provide basic IP address assignment. Because of
this, more advanced protocols like BOOTP and DHCP have replaced
RARP in modern networks. Still, RARP played an important role in the
early days of networking, especially for devices that could not store
configuration data.

Advantages of RARP Protocol:

1. Helps Diskless Devices Get IP Address:

RARP is especially useful for diskless devices or workstations


that do not have permanent storage to save their IP
configuration. It allows them to automatically get an IP address
at startup using only their MAC address.
2. Automatic IP Assignment:

Devices don’t need to be manually configured. RARP


automatically assigns an IP address based on the device’s MAC
address, reducing manual effort in network management.

3. Simple Protocol:

RARP is a lightweight and simple protocol, which makes it


easy to implement and understand in smaller networks.

Disadvantages of RARP Protocol:

1. Requires a Dedicated RARP Server:

RARP depends on a special server that maintains the MAC-to-


IP mapping. If the RARP server is not available or goes down,
devices won’t be able to obtain their IP addresses.

2. Provides Only IP Address:

Unlike modern protocols like DHCP, RARP does not provide


other network information like subnet mask, default gateway,
or DNS server, which limits its functionality.

3. Only Works on Local Network (LAN):

RARP messages are broadcast, so they can only be used within


a local area network (LAN). It cannot assign IPs across
different networks or routers.
Difference between ARP and RARP:

Let us see that the difference between ARP and RARP that are as
follows:

ARP RARP
A protocol used to map an IP A protocol used to map a physical
address to a physical address address to an IP address
To obtain the MAC address of a To obtain the IP address of a network
network device when only its IP device when only its MAC address is
address is known. known.
ARP stands for Address Resolution Whereas RARP stands for Reverse
Protocol. Address Resolution Protocol.
In ARP, broadcast MAC address is While in RARP, broadcast IP address
used. is used.
While in RARP, RARP table is
In ARP, ARP table is managed or
managed or maintained by RARP
maintained by local host.
server.
In Address Resolution Protocol,
While in RARP, IP address is fetched.
Receiver's MAC address is fetched.
ARP is used in sender's side to map RARP is used in receiver's side to
the receiver's MAC address. map the sender's IP.

ICMP PROTOCOL

ICMP (Internet Control Message Protocol) is like a messaging


system used by computers and network devices to send error
messages and status updates about network communication.
• Since IP does not have an inbuilt mechanism for sending error
and control messages. It depends on Internet Control Message
Protocol (ICMP) to provide an error control.
• It is used for reporting errors and management queries.
• It is a supporting protocol and used by networks devices like
routers for sending the error messages and operations
information.
• For example, the requested service is not available or that a
host or router could not be reached.

Working of ICMP Protocol:

The Internet Control Message Protocol (ICMP) works like a


communication helper within a network. It doesn't send user data
(like emails or files) but instead sends important messages about the
health of the network.

When a problem occurs, like a device not being reachable, a packet


getting lost, or a router being overloaded, ICMP steps in to send a
message back to the source, explaining what went wrong.

For example, if your computer sends data to a website and the router
can’t find the best path, ICMP may reply with a “Destination
Unreachable” message. Similarly, if a packet takes too long to travel,
ICMP sends a “Time Exceeded” message.

These messages help computers and routers understand and fix


network issues. Tools like Ping and Traceroute use ICMP to check if
devices are working and how data travels between them. Overall,
ICMP helps keep the network running smoothly by quickly reporting
issues so they can be resolved.

ICMP Messages:

ICMP (Internet Control Message Protocol) sends different types of


messages to help manage and troubleshoot network
communication. These messages are used to report errors, provide
information, and suggest better routes for data transmission. Below
are some of the commonly used ICMP messages:

1. Source Quench Message

A source quench message is sent by a device (like a router or


destination host) when it feels overwhelmed by the amount of data
being sent to it. This message tells the sender to slow down because
the receiver is struggling to handle the traffic. ICMP takes the source
IP address from the packet that caused the issue and sends this
warning. This helps prevent packet loss due to congestion. In case
the congestion is far from the source, ICMP may send this message
hop-by-hop so that every device on the path reduces the traffic rate.

2. Parameter Problem

When a router receives a packet, it checks if the packet's header is


valid by comparing checksums. If the header is incorrect or
confusing, the router cannot process the packet and drops it. ICMP
then sends a parameter problem message back to the sender,
informing it about the issue with the packet’s structure so it can be
fixed.

3. Time Exceeded Message

A time exceeded message is sent when a packet takes too long to


reach its destination. In IP headers, there’s a field called “Time to Live”
(TTL), which limits how many hops (routers) a packet can pass
through. If the TTL reaches zero before arriving at the destination, the
packet is discarded, and ICMP sends a time exceeded message to
the sender to let them know that the packet was not delivered in time.

4. Destination Unreachable

If a packet cannot be delivered to its destination for any reason (such


as no route, port is closed, or the device is offline), ICMP sends a
destination unreachable message to the sender. This lets the
sender know that its data won’t reach the target. This message can
come from routers or even the destination device itself, depending
on where the problem occurred.

5. Redirection Message

A redirection message is sent when a router notices that there's a


better path available for sending data. Suppose a host sends packets
through Router R1, but R1 knows there's a more direct route through
Router R2. R1 will send an ICMP redirection message to the host,
telling it to send future packets directly through R2. This helps
optimize routing paths in the network.

Advantages of ICMP:

• Helps in identifying network problems quickly using tools like


Ping and Traceroute.
• Allows routers and hosts to report issues like unreachable
destinations or congestion.
• Useful for monitoring network performance and maintaining
connectivity.
• Makes it easy to test whether a device is active or not.

Disadvantages of ICMP:

• Some packet drops or errors may not be reported due to


limitations in IP design.
• If a packet expires (TTL reaches 0), it is discarded, and the
sender may not always be notified in time.
• No standard way for devices to constantly check each other's
status through IP alone.
• ICMP can be misused in network attacks (e.g., ping flood), so
some firewalls block it, limiting its usefulness.
Uses of ICMP Protocol:

The Internet Control Message Protocol (ICMP) is mainly used for


network diagnostics, error reporting, and communication control.
Here are some of its key uses:

1. ICMP is used for error reporting if two devices connect over the
internet and some error occurs, So, the router sends an ICMP
error message to the source informing about the error.

2. Another important use of ICMP protocol is used to perform


network diagnosis by making use of traceroute and ping utility.

• Traceroute: Traceroute utility is used to know the route


between two devices connected over the internet. It routes
the journey from one router to another, and a traceroute is
performed to check network issues before data transfer.

• Ping: Ping is a simple kind of traceroute known as the echo-


request message, it is used to measure the time taken by
data to reach the destination and return to the source, these
replies are known as echo-replies to messages.

3. ICMP is widely used to test network connections and availability


of devices, helping administrators quickly detect problems in
the network.

IGMP PROTOCOL
IGMP (Internet Group Management Protocol) is a communication
protocol used by computers and network devices to manage group
memberships for multicast communication. In simple terms, IGMP
helps devices join or leave a group that receives the same
information at the same time, like live video streams, online games,
or real-time data feeds. Instead of sending multiple copies of the
same data to each device individually, multicast allows one copy to
be sent to a group, and IGMP keeps track of which devices are part of
that group. Routers use IGMP to know which devices want to receive
multicast traffic and make sure it is delivered to the right group
members only. This makes data transmission more efficient,
especially when the same content needs to reach many devices at
once.

Working of IGMP Protocol:

The Internet Group Management Protocol (IGMP) works by


allowing devices on a network, like computers or smart TVs, to tell
routers that they want to join or leave a multicast group, a group of
devices interested in receiving the same type of data, such as a live
video stream or an online broadcast.

When a device wants to receive multicast data, it sends an IGMP


“membership report” message to the router. The router keeps track
of which devices are part of which multicast groups.

If no devices are interested in a certain group, the router stops


forwarding that data, which helps save bandwidth. Routers also send
IGMP queries from time to time to check if the devices still want to
stay in the group.

If a device no longer wants the data, it sends a "leave group" message.


In this way, IGMP helps efficiently manage how multicast traffic is
sent and received, making sure that only interested devices get the
data.

IGMP Messages:

IGMP (Internet Group Management Protocol) uses different types of


messages to manage how devices join or leave multicast groups.
Here's an easy-to-understand explanation of the main IGMP
messages:

1. Membership Query

The Membership Query message is sent by a router to check if any


devices on the network still want to receive data from a particular
multicast group. Think of it as the router calling out to all the devices
and asking, "Is anyone still interested in this group?" This helps the
router avoid sending data to devices that are no longer interested,
which saves bandwidth. There are two types of membership queries:
General Query, which asks about all multicast groups, and Group-
Specific Query, which asks about a specific group. Devices that are
part of the group must respond to show they still want the data.
2. Membership Report

The Membership Report message is sent by a host (device) when it


wants to join a multicast group or respond to a query from the router.
It’s like the device is raising its hand and saying, "Yes, I want to
receive this multicast stream!" For example, if you're watching a live
sports broadcast on your smart TV, the TV sends a membership
report to join that group and start receiving the video stream. To
reduce unnecessary traffic, if multiple devices are interested in the
same group, only one of them needs to send a report. The router then
records that the group is still active and continues sending the
multicast data.

3. Leave Group Message

The Leave Group Message is sent by a host (device) when it no


longer wants to be part of a multicast group. This message tells the
router, "I’m done with this group, I don’t need this data anymore."
Once the router receives this message, it checks to see if any other
devices are still interested in that group by sending out a Group-
Specific Query. If no devices respond, the router stops forwarding the
multicast traffic for that group, saving bandwidth and reducing
unnecessary network load.

Uses of IGMP Protocol:

1. Multicast Group Management:


IGMP helps devices join or leave multicast groups, so data (like
live video or updates) can be sent to multiple devices at once.

2. Efficient Streaming:

Used in applications like live video broadcasts, IPTV, and online


gaming to send one copy of data to many users, saving
bandwidth.

3. Router Communication:

Helps routers know which devices are interested in receiving


multicast data, so they can forward traffic only to those devices.

4. Network Efficiency:

Reduces network congestion by avoiding the need to send


duplicate data streams to every device individually.

Advantages of IGMP Protocol:

1. Saves Bandwidth:

By sending one copy of data to multiple users, IGMP reduces


the amount of data being sent across the network.

2. Improves Performance:

Multicast using IGMP is faster and more efficient than sending


separate data to each user (called unicast).

3. Easy Device Management:


Devices can easily join or leave a multicast group without
affecting others, making the network dynamic and flexible.

4. Supports Real-Time Applications:

Ideal for live video, real-time updates, and online gaming where
multiple users need the same data at the same time.

Disadvantages of IGMP Protocol:

1. Not Secure by Default:

IGMP does not have built-in security. Malicious users can


misuse it to flood the network or join groups without permission.

2. Network Overhead:

In large networks, managing many multicast groups and


sending regular IGMP messages can add extra load to routers.

3. Limited to Local Networks:

IGMP works within a local area network (LAN). To multicast over


the internet, additional protocols (like multicast routing) are
needed.

4. Complex Configuration in Large Networks:

In bigger setups, configuring multicast and IGMP properly can


be tricky and requires skilled network administrators.
Difference between ICMP and IGMP

ICMP IGMP
ICMP stands for Internet Control While IGMP stands for Internet
Message Protocol. Group Message Protocol.
Internet control message protocol is While internet group message
unicasting. protocol is multicasting.
ICMP can be operate between host to
While IGMP can be used between
host or host to router or router to
client to multicast router.
router.
It controls the unicast communication It controls the multicast
and used for reporting error. communication.
While IGMP is used in group
ICMP is used to test reachability to a
packet transmission like DTS
host or network.
service.
ICMP is primarily used for diagnostic IGMP is primarily used for
and error reporting purposes. multicasting purposes.
ICMP messages are typically sent in IGMP messages are sent by hosts
response to errors or diagnostic to multicast routers to join or
requests. leave multicast groups.

IPv6 PROTOCOL

The Internet Protocol version 6, or IPv6, is the latest version of the


Internet Protocol (IP), which is the system used for identifying and
locating computers on the Internet. IPv6 was developed by the
Internet Engineering Task Force (IETF) to deal with the problem of
IPv4 exhaustion. IPv6 is a 128-bit address having an address space of
2128, which is way bigger than IPv4. IPv6 uses a Hexa-Decimal format
separated by a colon (:).
The older version, IPv4, only had about 4.3 billion possible addresses,
which are not enough for the growing number of internet-connected
devices. IPv6 solves this problem by providing a much larger address
space, enough to give every device in the world a unique IP address
for a long time to come. It also includes improved features like faster
data routing, better security, and simpler network configuration. In
short, IPv6 helps the internet continue to grow while offering better
performance and security.

Working of IPv6 Protocol:

The IPv6 protocol works by assigning a unique IP address to every


device connected to a network, allowing them to send and receive
data. When a device wants to communicate, it uses its IPv6 address
to identify itself and the destination device.

The data is broken into small packets, and each packet includes the
source and destination IPv6 addresses. These packets travel across
the internet, hopping through different routers, until they reach their
destination. IPv6 uses 128-bit addresses, which are much longer
than IPv4’s, allowing trillions of unique combinations.

It also simplifies how addresses are assigned (often automatically)


and includes built-in features like IPsec for security and better
support for mobile devices.

Unlike IPv4, which sometimes needs NAT (Network Address


Translation) due to limited addresses, IPv6 lets devices
communicate directly. IPv6 ensures smooth, secure, and large-scale
communication over the internet with minimal manual setup.

IPv6 Header

The IPv6 header is the first part of an IPv6 packet and contains all the
important instructions needed to deliver the data across the internet.
It includes information like where the data is coming from, where it’s
going, how important the packet is, and how it should be handled
along the way. The IPv6 header is always 40 bytes long and has a
fixed structure, which helps routers and devices process data more
efficiently compared to IPv4. Because of its simpler design and larger
address space, IPv6 is better suited for the growing internet of the
future.
Fields in the IPv6 Fixed Header:

1. Version (4 bits):

This field shows which version of IP is being used. For IPv6, the
value is always 6 (binary: 0110).

2. Traffic Class (8 bits):

This is like a priority label for the packet. It helps routers decide
which packets should be sent first when the network is busy.
Data like audio or video (real-time content) often gets higher
priority. The source device sets this value, but routers along the
path can adjust it.

3. Flow Label (20 bits):

This field helps to group packets that are part of the same "flow"
as a video stream or voice call. It allows routers to handle them
in a special way (e.g., give them consistent quality). If the flow
label isn’t being used, the value is set to 0.

4. Payload Length (16 bits):

This shows how much actual data (not including the header) is
inside the packet. If the data is very large (more than 65,535
bytes), a special option called Jumbo Payload is used instead,
and this field is set to 0.

5. Next Header (8 bits):

This tells what comes next after the main IPv6 header. It could
be an extension header (extra information) or the start of the
actual data, like a TCP or UDP segment.

6. Hop Limit (8 bits):

Like TTL (Time to Live) in IPv4, this field shows how many routers
the packet can pass through. Each time it goes through a router,
the number decreases by 1. If it reaches zero, the packet is
dropped to prevent it from looping forever.

7. Source Address (128 bits):

This is the IPv6 address of the device that is sending the packet.

8. Destination Address (128 bits):

This is the IPv6 address of the device that is supposed to receive


the packet. Routers use this to forward the packet correctly
through the network.
Difference Between IPv4 and IPv6

IPv4 IPv6
IPv4 has a 32-bit address length IPv6 has a 128-bit address length
It Supports Manual and DHCP It supports Auto and renumbering
address configuration address configuration
Address representation of IPv4 is in Address representation of IPv6 is in
decimal. hexadecimal.
Fragmentation performed by Sender In IPv6 fragmentation is performed
and forwarding routers. only by the sender.
In IPv4 Packet flow identification is In IPv6 packet flow identification are
not available. Available.
In IPv6 multicast and anycast
It has a broadcast Message
message transmission scheme is
Transmission Scheme
available
In IPv6 Encryption and
In IPv4 Encryption and Authentication
Authentication are provided
facility not provided

IPv6 has a header of 40 bytes fixed


IPv4 has a header of 20-60 bytes.

IPv4 consists of 4 fields which are IPv6 consists of 8 fields, which are
separated by addresses dot (.) separated by a colon (:)
IPv4's IP addresses are divided into
IPv6 does not have any classes of
five different classes. Class A, Class
the IP address.
B, Class C, Class D, Class E.
Example of IPv6:
Example of IPv4: 66.94.29.13 2001:0000:3238:DFE1:0063:0000:0
000:FEFB
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 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.
UNICAST

Unicast is a type of network communication where data is sent from


one sender to one specific receiver. Unicast is the most common
type of communication used in everyday activities such as browsing
websites, sending emails, or chatting through instant messaging
apps.

In unicast communication, there are two ways to send data:


connection-oriented and connectionless.

• In connection-oriented unicast, a stable connection is first


established between the sender and the receiver before the
actual data is sent. This ensures that the data is delivered
reliably and in the correct order, which is useful for tasks like file
transfers or email.

• On the other hand, connectionless unicast sends data without


first making a connection. It is faster but may not be as reliable
and is often used in applications where speed matters more
than perfect delivery, such as web browsing or online chatting.

Advantages of Unicast

• Simplicity: Unicast is very simple to implement as well as to


manage since the data is transferred to a particular and explicit
recipient.
• Reliable Communication: As the data is sent to one receiver it
provides the assurance of delivery and the acknowledgment
from the receiver end which makes it ideal for reliable methods
of communication such as TCP.
• Security: Since these are one-to-one communications, it is
safer than the broadcast or multicast and can be used for
transferring data.

Disadvantages of Unicast

• Inefficiency for Group Communication: For that reason, with


the same data that needs to be sent to multiple receivers,
Unicast may prove highly inefficient because each requires a
separate transmission.
• Increased Bandwidth Usage: When data is sent to many
receivers individually in large networks it leads to the wastage
of bandwidth.
MULTICAST

Multicast is a communication method in which a single sender sends


data to multiple receivers at the same time. Instead of sending
individual copies to each recipient like in unicast, the sender sends
one copy of the data, and the network takes care of delivering it to
all intended users. This method is efficient and helps reduce
network traffic and save bandwidth, especially in applications like
live video streaming, online broadcasting, or virtual classrooms.

Like unicast, multicast can also be connection-oriented or


connectionless.

• In connection-oriented multicast, a connection is established


between the sender and all recipients before sending data,
making it more reliable. This is useful in applications such as
video conferencing, where losing data could affect the quality
of the communication.
• In connectionless multicast, data is sent directly to a
multicast group without setting up a connection. It is quicker
but may lose some data along the way, which is acceptable in
scenarios like live video or audio streaming where speed and
low delay are more important than accuracy.

Advantages of Multicast

• Efficiency: Compared with unicast communication, multicast


helps in cutting down the number of data that is transmitted
across the network since the data transmitted can be received
by several persons; this is otherwise known as ‘Broadcast’.
• Scalability: Multicast is suitable for application that requires
distribution of information or sharing resource to many users
that can elicit the flood the network principle to narrow scale
thus making it opportune for scalable applications.
• Cost-Effective: Being a method that reduces the number of
data set transmitted across the network, multicast helps in
cutting down the overall expenditure on networks especially for
the large-scale broadcasts.

Disadvantages of Multicast

• Complex Implementation: Whereas in multicast setting, up


and managing a multicast network is a little bit more
complicated than unicast since an appropriate routing
protocols and settings are necessary.
• Less Reliable: Multicast unfortunately can use connectionless
protocols such as UDP unlike unicast thus making it incur in
reliability as far as delivery is concerned.
• Security Challenges: Multicast communication is less secure
as compared to unicast as the data is sent to multiple recipients
thus posing a high risk of interception by unauthorized persons.

Difference between Unicast and Multicast

Unicast Multicast
It has one or more senders and
It has one sender and one receiver.
multiple receivers.
It sends data from one device to It sends data from one device to
single device. multiple devices.
It works on star, mesh, tree and
It works on Single Node Topology.
hybrid topology.
It does not scale well for streaming It does not scale well across large
media. networks.
Multiple unicasting utilizes more
It utilizes bandwidth efficiently.
bandwidth as compared.
Web surfing, file transfer is an Video Streaming, Online gaming is
example of a unicast. an example of a multicast.
It has one-to-one mapping. It has one-to-many mapping.

Network traffic is high. Network traffic is low.

--------------------------------------Finish---------------------------------------

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy