0% found this document useful (0 votes)
26 views18 pages

Unit - 3 DCCN

The document discusses the Network Layer's design issues, including routing algorithms (IPv4, IPv6), addressing, packet forwarding, and congestion control. It categorizes routing algorithms into adaptive, non-adaptive, and hybrid types, explaining their characteristics and differences. Additionally, it covers various routing protocols and the Address Resolution Protocol (ARP) family, emphasizing their roles in network communication.
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)
26 views18 pages

Unit - 3 DCCN

The document discusses the Network Layer's design issues, including routing algorithms (IPv4, IPv6), addressing, packet forwarding, and congestion control. It categorizes routing algorithms into adaptive, non-adaptive, and hybrid types, explaining their characteristics and differences. Additionally, it covers various routing protocols and the Address Resolution Protocol (ARP) family, emphasizing their roles in network communication.
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/ 18

UNIT – 3

Network Layer: Design issues, Routing algorithms: IPV4, IPV6, Address mapping: ARQ, RARQ, Congestion
control, Unicast, Multicast, Broadcast routing protocols, Quality of Service, Internetworking

Network Layer: Design issues


The Network Layer is responsible for the delivery of packets from the source to the destination across
multiple networks. While designing this layer, several key issues must be addressed to ensure efficient,
secure, and reliable data transmission.

Design Issues in the Network Layer

1. Routing
o Determining the best path for data to travel from the source to the destination.
o Algorithms like Dijkstra, Bellman-Ford, and OSPF are commonly used.
o Balancing between optimal path selection, load balancing, and fault tolerance is crucial.
2. Addressing
o Ensuring unique identification for devices in a network.
o IP addressing (IPv4, IPv6) is used to assign addresses to devices.
o Efficient address allocation and management are key challenges.
3. Packet Forwarding
o The process of moving packets through routers to reach their destination.
o Efficient forwarding mechanisms like table lookups, caching, and hardware acceleration are critical.
4. Fragmentation and Reassembly
o Networks may have different maximum transmission unit (MTU) sizes.
o Large packets may need to be fragmented, transmitted, and reassembled at the destination.
5. Error Handling
o Detecting and recovering from transmission errors.
o Techniques like checksums, error correction codes, and retransmission protocols are employed.
6. Congestion Control
o Managing network traffic to avoid bottlenecks and ensure smooth data flow.
o Algorithms like TCP congestion control and traffic shaping are used.
7. Quality of Service (QoS)
o Ensuring reliable and consistent performance for critical applications like video conferencing, VoIP,
etc.
o Techniques like bandwidth reservation, prioritization, and traffic management are key.
8. Security
o Preventing threats such as IP spoofing, denial-of-service (DoS) attacks, and eavesdropping.
o Protocols like IPsec enhance security at the network layer.
9. Inter-networking
o Connecting heterogeneous networks with different protocols and architectures.
o Gateways and protocol conversion are essential for seamless connectivity.
10. Multicasting and Broadcasting
o Efficient data delivery to multiple recipients.
o Techniques like multicast routing protocols (e.g., PIM) ensure optimized data distribution.
11. Mobility Support
o Managing devices that frequently change their network connection points (e.g., mobile devices).

1
o Protocols like Mobile IP are designed to handle this.

Classification of Routing Algorithms


Routing is the process of establishing the routes that data packets must follow to reach the destination. In
this process, a routing table is created which contains information regarding routes that data packets
follow. Various routing algorithms are used for the purpose of deciding which route an incoming data
packet needs to be transmitted on to reach the destination efficiently.
Classification of Routing Algorithms
The routing algorithms can be classified as follows:
1. Adaptive Algorithms
2. Non-Adaptive Algorithms
3. Hybrid Algorithms

Types of Routing Algorithm

Routing algorithms can be classified into various types such as distance vector, link state, and hybrid
routing algorithms. Each has its own strengths and weaknesses depending on the network structure.
1. Adaptive Algorithms
These are the algorithms that change their routing decisions whenever network topology or traffic load
changes. The changes in routing decisions are reflected in the topology as well as the traffic of the
network. Also known as dynamic routing, these make use of dynamic information such as current
topology, load, delay, etc. to select routes. Optimization parameters are distance, number of hops, and
estimated transit time.
Further, these are classified as follows:
 Isolated: In this method each, node makes its routing decisions using the information it has without
seeking information from other nodes. The sending nodes don’t have information about the status of a
particular link. The disadvantage is that packets may be sent through a congested network which may
result in delay. Examples: Hot potato routing, and backward learning.
 Centralized: In this method, a centralized node has entire information about the network and makes
all the routing decisions. The advantage of this is only one node is required to keep the information of
the entire network and the disadvantage is that if the central node goes down the entire network is

2
done. The link state algorithm is referred to as a centralized algorithm since it is aware of the cost of
each link in the network.
 Distributed: In this method, the node receives information from its neighbors and then takes the
decision about routing the packets. A disadvantage is that the packet may be delayed if there is a
change in between intervals in which it receives information and sends packets. It is also known as a
decentralized algorithm as it computes the least-cost path between source and destination.
2. Non-Adaptive Algorithms
These are the algorithms that do not change their routing decisions once they have been selected. This is
also known as static routing as a route to be taken is computed in advance and downloaded to routers
when a router is booted.
Further, these are classified as follows:
 Flooding: This adapts the technique in which every incoming packet is sent on every outgoing line
except from which it arrived. One problem with this is that packets may go in a loop and as a result of
which a node may receive duplicate packets. These problems can be overcome with the help of
sequence numbers, hop count, and spanning trees.
 Random walk: In this method, packets are sent host by host or node by node to one of its neighbors
randomly. This is a highly robust method that is usually implemented by sending packets onto the link
which is least queued.

Random Walk

3. Hybrid Algorithms
As the name suggests, these algorithms are a combination of both adaptive and non-adaptive algorithms.
In this approach, the network is divided into several regions, and each region uses a different algorithm.
Further, these are classified as follows:
 Link-state: In this method, each router creates a detailed and complete map of the network which is
then shared with all other routers. This allows for more accurate and efficient routing decisions to be
made.
 Distance vector: In this method, each router maintains a table that contains information about the
distance and direction to every other node in the network. This table is then shared with other routers
in the network. The disadvantage of this method is that it may lead to routing loops.
Difference between Adaptive and Non-Adaptive Routing Algorithms
The main difference between Adaptive and Non-Adaptive Algorithms is:

3
Adaptive Algorithms are the algorithms that change their routing decisions whenever network topology or
traffic load changes. It is called Dynamic Routing. Adaptive Algorithm is used in a large amount of data,
highly complex network, and rerouting of data.
Non-Adaptive Algorithms are algorithms that do not change their routing decisions once they have been
selected. It is also called static Routing. Non-Adaptive Algorithm is used in case of a small amount of
data and a less complex network.
For more differences, you can refer to Differences between Adaptive and Non-Adaptive Routing
Algorithms.
Types of Routing Protocol in Computer Networks
1. Routing information protocol (RIP)
One of the earliest protocols developed is the inner gateway protocol, or RIP. we can use it with local area
networks (LANs), that are linked computers in a short range, or wide area networks (WANs), which are
telecom networks that cover a big range. Hop counts are used by the Routing Information Protocol (RIP)
to calculate the shortest path between networks.
2. Interior gateway protocol (IGRP)
IGRP was developed by the multinational technology corporation Cisco. It makes use of many of the core
features of RIP but raises the maximum number of supported hops to 100. It might therefore function
better on larger networks. IGRPs are elegant and distance-vector protocols. In order to work, IGRP
requires comparisons across indicators such as load, reliability, and network capacity. Additionally, this
kind updates automatically when things change, such as the route. This aids in the prevention of routing
loops, which are mistakes that result in an unending data transfer cycle.
3. Exterior Gateway Protocol (EGP)
Exterior gateway protocols, such as EGP, are helpful for transferring data or information between several
gateway hosts in autonomous systems. In particular, it aids in giving routers the room they need to
exchange data between domains, such as the internet.
4. Enhanced interior gateway routing protocol (EIGRP)
This kind is categorised as a classless protocol, inner gateway, and distance vector routing. In order to
maximise efficiency, it makes use of the diffusing update method and the dependable transport protocol.
A router can use the tables of other routers to obtain information and store it for later use. Every router
communicates with its neighbour when something changes so that everyone is aware of which data paths
are active. It stops routers from miscommunicating with one another. The only external gateway protocol
is called Border Gateway Protocol (BGP).
5. Open shortest path first (OSPF)
OSPF is an inner gateway, link state, and classless protocol that makes use of the shortest path first (SPF)
algorithm to guarantee effective data transfer. Multiple databases containing topology tables and details
about the network as a whole are maintained by it. The ads, which resemble reports, provide thorough
explanations of the path’s length and potential resource requirements. When topology changes, OSPF
recalculates paths using the Dijkstra algorithm. In order to guarantee that its data is safe from
modifications or network intrusions, it also employs authentication procedures. Using OSPF can be
advantageous for both large and small network organisations because to its scalability features.
6. Border gateway protocol (BGP)
Another kind of outer gateway protocol that was first created to take the role of EGP is called BGP. It is
also a distance vector protocol since it performs data package transfers using the best path selection
technique. BGP defines communication over the internet. The internet is a vast network of interconnected
autonomous systems. Every autonomous system has autonomous system number (ASN) that it receives by
registering with the Internet Assigned Numbers Authority.
Difference between Routing and Flooding
The difference between Routing and Flooding is listed below:

4
Routing Flooding

A routing table is required. No Routing table is required.

May give the shortest path. Always gives the shortest path.

Less Reliable. More Reliable.

Traffic is less. Traffic is high.

No duplicate packets. Duplicate packets are present.

Shortest Path Algorithm in Computer Network


In between sending and receiving data packets from the sender to the receiver, it will
go through many routers and subnets. So as a part of increasing the efficiency in
routing the data packets and decreasing the traffic, we must find the shortest path. In
this article, we are discussing the shortest path algorithms.
What is Shortest Path Routing?
It refers to the algorithms that help to find the shortest path between a sender and
receiver for routing the data packets through the network in terms of shortest
distance, minimum cost, and minimum time.
 It is mainly for building a graph or subnet containing routers as nodes and edges
as communication lines connecting the nodes.
 Hop count is one of the parameters that is used to measure the distance.
 Hop count: It is the number that indicates how many routers are covered. If the
hop count is 6, there are 6 routers/nodes and the edges connecting them.
 Another metric is a geographic distance like kilometers.
 We can find the label on the arc as the function of bandwidth, average traffic,
distance, communication cost, measured delay, mean queue length, etc.
Common Shortest Path Algorithms
 Dijkstra’s Algorithm
 Bellman Ford’s Algorithm
 Floyd Warshall’s Algorithm

Dijkstra’s Algorithm
The Dijkstra’s Algorithm is a greedy algorithm that is used to find the minimum
distance between a node and all other nodes in a given graph. Here we can consider
node as a router and graph as a network. It uses weight of edge .ie, distance between
the nodes to find a minimum distance route.

5
Algorithm:
1: Mark the source node current distance as 0 and all others as infinity.
2: Set the node with the smallest current distance among the non-visited nodes as the
current node.
3: For each neighbor, N, of the current node:
 Calculate the potential new distance by adding the current distance of the current
node with the weight of the edge connecting the current node to N.
 If the potential new distance is smaller than the current distance of node N, update
N's current distance with the new distance.
4: Make the current node as visited node.
5: If we find any unvisited node, go to step 2 to find the next node which has the
smallest current distance and continue this process.
Example:
Consider the graph G:

Graph G

Now,we will start normalising graph one by one starting from node 0.

step 1

Nearest neighbour of 0 are 2 and 1 so we will normalize them first .

6
step 3

Similarly we will normalize other node considering it should not form a cycle and will
keep track in visited nodes.

ARP, Reverse ARP(RARP), Inverse ARP (InARP),


Proxy ARP and Gratuitous ARP
Prerequisite IP Addressing, Introduction of MAC Addresses, Basics of Address Resolution
Protocol (ARP) In this article, we will discuss about whole ARP-family, which are ARP, RARP,
InARP, Proxy ARP and Gratuitous ARP. Let’s try to understand each one by one.
1. Address Resolution Protocol (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.
7
Before sending the IP packet, the MAC address of destination must be known. If not so, then
sender broadcasts the ARP-discovery packet requesting the MAC address of intended
destination. Since ARP-discovery is broadcast, every host inside that network will get this
message but the packet will be discarded by everyone except that intended receiver host whose
IP is associated. Now, this receiver will send a unicast packet with its MAC address (ARP-
reply) to the sender of ARP-discovery packet. After the original sender receives the ARP-reply,
it updates ARP-cache and start sending unicast message to the destination.

Grasping the concepts of ARP and its variants is critical for understanding network protocols, a
key area for GATE CS. If you’re looking to dive deeper into networking topics like these,
the GATE CS Self-Paced Course offers comprehensive study materials and exercises to help
you strengthen your understanding and excel in the GATE exam.
Example –GATE CS 2005, Question 24 (ARP Based).
2. Reverse Address Resolution Protocol (RARP) –
Reverse ARP is a networking protocol used by a client machine in a local area network to
request its Internet Protocol address (IPv4) from the gateway-router’s ARP table. The network
administrator creates a table in gateway-router, which is used to map the MAC address to

8
corresponding IP address. When a new machine is setup or any machine which don’t have
memory to store IP address, needs an IP address for its own use. So the machine sends a RARP
broadcast packet which contains its own MAC address in both sender and receiver hardware
address field.

A special host configured inside the local area network, called as RARP-server is responsible to
reply for these kind of broadcast packets. Now the RARP server attempt to find out the entry in
IP to MAC address mapping table. If any entry matches in table, RARP server send the response
packet to the requesting device along with IP address.
 LAN technologies like Ethernet, Ethernet II, Token Ring and Fiber Distributed Data
Interface (FDDI) support the Address Resolution Protocol.
 RARP is not being used in today’s networks. Because we have much great featured
protocols like BOOTP (Bootstrap Protocol) and DHCP( Dynamic Host Configuration
Protocol).
3. Inverse Address Resolution Protocol (InARP) –
Instead of using Layer-3 address (IP address) to find MAC address, Inverse ARP uses MAC
address to find IP address. As the name suggests, InARP is just inverse of ARP. Reverse ARP
has been replaced by BOOTP and later DHCP but Inverse ARP is solely used for device
configuration. Inverse ARP is enabled by default in ATM(Asynchronous Transfer Mode)
networks. InARP is used to find Layer-3 address from Layer-2 address (DLCI in frame relay).
Inverse ARP dynamically maps local DLCIs to remote IP addresses when you configure Frame
Relay. When using inverse ARP, we know the DLCI of remote router but don’t know its IP
address. InARP sends a request to obtain that IP address and map it to the Layer-2 frame-relay
DLCI.

9
4. Proxy ARP –
Proxy ARP was implemented to enable devices which are separated into network segments
connected by a router in the same IP network or sub-network to resolve IP address to MAC
addresses. When devices are not in same data link layer network but are in the same IP network,
they try to transmit data to each other as if they were on the local network. However, the router
that separates the devices will not send a broadcast message because routers do not pass
hardware-layer broadcasts. Therefore, the addresses cannot be resolved. Proxy ARP is enabled
by default so the “proxy router” that resides between the local networks responds with its MAC
address as if it were the router to which the broadcast is addressed. When the sending device
receives the MAC address of the proxy router, it sends the datagram to the proxy router, which
in turns sends the datagram to the designated device.

10
5. Gratuitous ARP –
Gratuitous Address Resolution Protocol is used in advance network scenarios. It is something
performed by computer while booting up. When the computer booted up (Network Interface
Card is powered) for the first time, it automatically broadcast its MAC address to the entire
network. After Gratuitous ARP MAC address of the computer is known to every switch and
allow DHCP servers to know where to send the IP address if requested. Gratuitous ARP could
mean both Gratuitous ARP request and Gratuitous ARP reply, but not needed in all cases.
Gratuitous ARP request is a packet where source and destination IP are both set to IP of the
machine issuing the packet and the destination MAC is the broadcast address ff:ff:ff:ff:ff:ff ; no
reply packet will occur. Gratuitous ARP is ARP-Reply that was not prompted by an ARP-
Request. Gratuitous Address Resolution Protocol is useful to detect IP conflict. Gratuitous ARP
is also used to update ARP mapping table and Switch port MAC address table.

11
What is ARP poisoning (ARP spoofing) –
ARP spoofing is a type of network attack in which the attacker sends the falsified ARP request
over the LAN (say to the default gateway), which results connecting attacker’s MAC address to
the legitimate server on that victim network. Now, the attacker will start receiving the data
which was intended for that IP address. With the help of ARP Poisoning (or ARP Spoofing)
attacker is able to intercept data frames, modify traffic or even stop data in-transit.

ARP poisoning can act as the opening for other major attacks, such as Man in the middle, denial
of service, or session hijacking attacks. We will discuss about ARP Spoofing later in depth.

Congestion control, Unicast, Multicast, Broadcast routing protocols

These terms are related to network communication and data transmission methods, each serving distinct
purposes in ensuring efficient and reliable data delivery. Let's break them down:

1. Congestion Control

 Definition: Congestion control is a network mechanism used to prevent network congestion by managing
data flow between devices. It ensures optimal data transmission rates to avoid packet loss and excessive
delays.
 Common Algorithms:

12
o TCP Tahoe/Reno – Uses slow start, congestion avoidance, and fast recovery.
o Additive Increase Multiplicative Decrease (AIMD) – Gradually increases throughput and reduces it
sharply during congestion.
o Random Early Detection (RED) – Randomly drops packets before congestion occurs to signal devices
to slow down.

2. Unicast Routing Protocols

 Definition: Unicast routing protocols are designed to send data from one source to one specific destination.
 Examples:
o RIP (Routing Information Protocol) – Distance-vector protocol suitable for small networks.
o OSPF (Open Shortest Path First) – Link-state protocol used for complex networks.
o EIGRP (Enhanced Interior Gateway Routing Protocol) – Cisco proprietary protocol that combines
best features of distance-vector and link-state protocols.

3. Multicast Routing Protocols

 Definition: Multicast routing sends data from one source to multiple specific receivers (members of a
multicast group). It’s ideal for streaming media, video conferencing, etc.
 Examples:
o PIM (Protocol Independent Multicast) – Used in both sparse and dense networks.
o DVMRP (Distance Vector Multicast Routing Protocol) – Uses RIP-based routing for multicast.
o IGMP (Internet Group Management Protocol) – Manages group memberships for multicast
receivers.

4. Broadcast Routing Protocols

 Definition: Broadcast routing sends data from one source to all devices in a network. Efficient for
transmitting identical data across multiple nodes.
 Examples:
o Flooding – Sends data to every node without optimization.
o ARP (Address Resolution Protocol) – Resolves IP addresses to MAC addresses using broadcast.

Key Differences
Aspect Unicast Multicast Broadcast

Scope One-to-one One-to-many One-to-all

Resource-efficient for direct Efficient for group May overwhelm the


Efficiency
communication communication network

Common ARP requests, DHCP


Web browsing, emails Live streaming, conferencing
Use discovery

13
When a device has multiple paths to reach a destination, it always selects one path by
preferring it over others. This selection process is termed as Routing. Routing is done by
special network devices called routers or it can be done by means of software
processes.The software based routers have limited functionality and limited scope.

A router is always configured with some default route. A default route tells the router
where to forward a packet if there is no route found for specific destination. In case there
are multiple path existing to reach the same destination, router can make decision based
on the following information:

 Hop Count
 Bandwidth
 Metric
 Prefix-length
 Delay

Routes can be statically configured or dynamically learnt. One route can be configured to
be preferred over others.

Unicast routing

Most of the traffic on the internet and intranets known as unicast data or unicast traffic is
sent with specified destination. Routing unicast data over the internet is called unicast
routing. It is the simplest form of routing because the destination is already known.
Hence the router just has to look up the routing table and forward the packet to next
hop.

Broadcast routing

By default, the broadcast packets are not routed and forwarded by the routers on any
network. Routers create broadcast domains. But it can be configured to forward
14
broadcasts in some special cases. A broadcast message is destined to all network
devices.

Broadcast routing can be done in two ways (algorithm):

 A router creates a data packet and then sends it to each host one by one. In this case,
the router creates multiple copies of single data packet with different destination
addresses. All packets are sent as unicast but because they are sent to all, it simulates as
if router is broadcasting.
This method consumes lots of bandwidth and router must destination address of each
node.
 Secondly, when router receives a packet that is to be broadcasted, it simply floods those
packets out of all interfaces. All routers are configured in the same way.

This method is easy on router's CPU but may cause the problem of duplicate packets
received from peer routers.
Reverse path forwarding is a technique, in which router knows in advance about its
predecessor from where it should receive broadcast. This technique is used to detect and
discard duplicates.

Multicast Routing

Multicast routing is special case of broadcast routing with significance difference and
challenges. In broadcast routing, packets are sent to all nodes even if they do not want
it. But in Multicast routing, the data is sent to only nodes which wants to receive the
packets.

15
The router must know that there are nodes, which wish to receive multicast packets (or
stream) then only it should forward. Multicast routing works spanning tree protocol to
avoid looping.

Multicast routing also uses reverse path Forwarding technique, to detect and discard
duplicates and loops.

Anycast Routing

Anycast packet forwarding is a mechanism where multiple hosts can have same logical
address. When a packet destined to this logical address is received, it is sent to the host
which is nearest in routing topology.

16
Anycast routing is done with help of DNS server. Whenever an Anycast packet is received
it is enquired with DNS to where to send it. DNS provides the IP address which is the
nearest IP configured on it.

Unicast Routing Protocols

There are two kinds of routing protocols available to route unicast packets:

 Distance Vector Routing Protocol


Distance Vector is simple routing protocol which takes routing decision on the number of
hops between source and destination. A route with less number of hops is considered as
the best route. Every router advertises its set best routes to other routers. Ultimately, all
routers build up their network topology based on the advertisements of their peer
routers,
For example Routing Information Protocol (RIP).
 Link State Routing Protocol
Link State protocol is slightly complicated protocol than Distance Vector. It takes into
account the states of links of all the routers in a network. This technique helps routes
build a common graph of the entire network. All routers then calculate their best path for
routing purposes.for example, Open Shortest Path First (OSPF) and Intermediate System
to Intermediate System (ISIS).

Multicast Routing Protocols

Unicast routing protocols use graphs while Multicast routing protocols use trees, i.e.
spanning tree to avoid loops. The optimal tree is called shortest path spanning tree.

 DVMRP - Distance Vector Multicast Routing Protocol


 MOSPF - Multicast Open Shortest Path First
 CBT - Core Based Tree
 PIM - Protocol independent Multicast

Protocol Independent Multicast is commonly used now. It has two flavors:

 PIM Dense Mode


This mode uses source-based trees. It is used in dense environment such as LAN.
 PIM Sparse Mode
This mode uses shared trees. It is used in sparse environment such as WAN.

Routing Algorithms

The routing algorithms are as follows:

17
Flooding
Flooding is simplest method packet forwarding. When a packet is received, the routers
send it to all the interfaces except the one on which it was received. This creates too
much burden on the network and lots of duplicate packets wandering in the network.

Time to Live (TTL) can be used to avoid infinite looping of packets. There exists another
approach for flooding, which is called Selective Flooding to reduce the overhead on the
network. In this method, the router does not flood out on all the interfaces, but selective
ones.

Shortest Path
Routing decision in networks, are mostly taken on the basis of cost between source and
destination. Hop count plays major role here. Shortest path is a technique which uses
various algorithms to decide a path with minimum number of hops.

Common shortest path algorithms are:

 Dijkstra's algorithm
 Bellman Ford algorithm
 Floyd Warshall algorithm

18

You might also like