0% found this document useful (0 votes)
170 views6 pages

Assignment-3 UNIT-3 Network Layer: Q1.What Is Distance Vector Routing Algorithm? Explain With Example

The document discusses various topics related to the network layer, including: 1. Distance vector routing algorithm which uses distance vectors to calculate the best path between routers based on metrics like distance or cost. 2. Congestion control techniques like token bucket algorithm which uses tokens in a virtual bucket to regulate traffic and prevent bursts from causing congestion. 3. Link state routing algorithm where each router learns the full topology and uses shortest path first to calculate routes rather than distance vectors. 4. Different policies for preventing congestion like retransmission, windowing, discarding, acknowledgement, and admission policies. 5. The basic requirements to establish a network between two hosts, which includes switches, routers

Uploaded by

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

Assignment-3 UNIT-3 Network Layer: Q1.What Is Distance Vector Routing Algorithm? Explain With Example

The document discusses various topics related to the network layer, including: 1. Distance vector routing algorithm which uses distance vectors to calculate the best path between routers based on metrics like distance or cost. 2. Congestion control techniques like token bucket algorithm which uses tokens in a virtual bucket to regulate traffic and prevent bursts from causing congestion. 3. Link state routing algorithm where each router learns the full topology and uses shortest path first to calculate routes rather than distance vectors. 4. Different policies for preventing congestion like retransmission, windowing, discarding, acknowledgement, and admission policies. 5. The basic requirements to establish a network between two hosts, which includes switches, routers

Uploaded by

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

ASSIGNMENT-3

UNIT-3
NETWORK LAYER

Q1.What is Distance vector routing algorithm? Explain with example.

Ans:- Historically known as the old ARPANET routing algorithm {or known as
Bellman-Ford (BF) algorithm}.

BF Basic idea: each router maintains a Distance Vector table containing the
distance between itself and ALL possible destination nodes.

Distances, based on the chosen metric, are computed using information from the
neighbors’ distance vectors.

Information kept by DV router

1. each router has an ID

2. associated with each link connected to a router, there is a link cost (static or
dynamic).

3. Distance Vector Table Initialization

4. Distance to itself = 0

5. Distance to ALL other routers = infinity number

1. A router transmits its distance vector to each of its neighbors in a routing


packet.

2. Each router receives and saves the most recently received distance vector
from each of its neighbors.

3. A router recalculates its distance vector when:


a. It receives a distance vector from a neighbor containing different
information than before.

b. It discovers that a link to a neighbor has gone down (i.e., a topology


change).

The DV calculation is based on minimizing the cost to each destination.

EXAMPLE OF DISTANCE ROUTING:-

Figure (a) A subnet. (b) Input from A, I, H, K, and the new routing table for J.

Q.2 Describe the concept of Congestion Control? Also explain Token Bucket
algorithm.

Ans:- Congestion control refers to the techniques used to control or prevent


congestion. Congestion control techniques can be broadly classified into two
categories:

Open Loop Congestion Control

Open loop congestion control policies are applied to prevent congestion before it
happens. The congestion control is handled either by the source or the
destination.

 Token bucket Algorithm

Need of token bucket Algorithm:-


The leaky bucket algorithm enforces output pattern at the average rate, no
matter how bursty the traffic is. So in order to deal with the bursty traffic we need
a flexible algorithm so that the data is not lost. One such algorithm is token
bucket algorithm.
Steps of this algorithm can be described as follows:

1. In regular intervals tokens are thrown into the bucket. ƒ


2. The bucket has a maximum capacity. ƒ
3. If there is a ready packet, a token is removed from the bucket, and the
packet is sent.
4. If there is no token in the bucket, the packet cannot be sent.

Let’s understand with an example,


In figure (A) we see a bucket holding three tokens, with five packets waiting to be
transmitted. For a packet to be transmitted, it must capture and destroy one
token. In figure (B) We see that three of the five packets have gotten through, but
the other two are stuck waiting for more tokens to be generated.
Formula: M * s = C + ρ * s
where S – is time taken
M – Maximum output rate
ρ – Token arrival rate
C – Capacity of the token bucket in byte

Let’s understand with an example,

Q3. Explain link state routing algorithm?

Ans:-Link state bonding is the second family of routine protocols. While distance
vector routers use a distributed algorithm to compute their routing tables, link-
state routing uses link-state routers to exchange messages that allow each router
to learn the entire network topology, each router then able to compute its
routing table by using a shortest path computation.

Features of link state routing protocols :-

1. Link state packet – A small packet that contains routing information.

2. Link state database – A collection information gathered from link state packet.
3. Shortest path first algorithm - A calculation performed on the database results
into shortest path.

4. Routing table – A list of known paths and interface.

Q4. List all the policies which are used to prevent congestion in a network.

Ans:-

1. Retransmission Policy :
It is the policy in which retransmission of the packets are taken care. If the
sender feels that a sent packet is lost or corrupted, the packet needs to be
retransmitted. This transmission may increase the congestion in the network.
To prevent congestion, retransmission timers must be designed to prevent
congestion and also able to optimize efficiency.
2. Window Policy :
The type of window at the sender side may also affect the congestion. Several
packets in the Go-back-n window are resent, although some packets may be
received successfully at the receiver side. This duplication may increase the
congestion in the network and making it worse.
Therefore, Selective repeat window should be adopted as it sends the specific
packet that may have been lost.
3. Discarding Policy :
A good discarding policy adopted by the routers is that the routers may
prevent congestion and at the same time partially discards the corrupted or
less sensitive package and also able to maintain the quality of a message.
In case of audio file transmission, routers can discard less sensitive packets to
prevent congestion and also maintain the quality of the audio file.
4. Acknowledgment Policy :
Since acknowledgement are also the part of the load in network, the
acknowledgment policy imposed by the receiver may also affect congestion.
Several approaches can be used to prevent congestion related to
acknowledgment.
The receiver should send acknowledgement for N packets rather than sending
acknowledgement for a single packet. The receiver should send a
acknowledgment only if it has to sent a packet or a timer expires.
5. Admission Policy :
In admission policy a mechanism should be used to prevent congestion.
Switches in a flow should first check the resource requirement of a network
flow before transmitting it further. If there is a chance of a congestion or there
is a congestion in the network, router should deny establishing a virtual
network connection to prevent further congestion.

Q6. What are basic needs to establish a network between two hosts. Explain
all.

Ans:- Switches , routers , and wireless access points are the essential networking
basics. Though them , devices connected to the network can communicate with
one another and with other networks like the internet.

You might also like