0% found this document useful (0 votes)
19 views2 pages

rd1 Merged

Distance vector routing protocols determine the best route for data packets based on the number of hops to reach each destination. Each router maintains a table with the distances to all other routers and shares this table with its neighbors. By exchanging updates with neighbors, routers are able to build up routing tables showing the next hop and cost to every destination on the network.

Uploaded by

Manjeet Mrinal
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)
19 views2 pages

rd1 Merged

Distance vector routing protocols determine the best route for data packets based on the number of hops to reach each destination. Each router maintains a table with the distances to all other routers and shares this table with its neighbors. By exchanging updates with neighbors, routers are able to build up routing tables showing the next hop and cost to every destination on the network.

Uploaded by

Manjeet Mrinal
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/ 2

Topic - Distance vector routing

By – Ranadeep Dey

A distance-vector routing protocol in data networks determines the best route for data packets
based on distance. Distance-vector routing protocols measure the distance by the number of
routers a packet has to pass, one router counts as one hop.

Distance vector routing protocol is easy to implement in small networks. Debugging is very easy
in the distance vector routing protocol. This protocol has a very limited dependency in a small
network.

Distance vector routing is a dynamic routing algorithm in which each router computes distance
between itself and each possible destination i.e. its immediate neighbors.

Distance-Vector Routing with example –


Each node constructs a one-dimensional array containing the "distances"(costs) to all other
nodes and distributes that vector to its immediate neighbors.

1. The starting assumption for distance-vector routing is that each node knows the cost of
the link to each of its directly connected neighbors.
2. A link that is missing is assigned an infinite cost.

figure -1

Information Distance to Reach Node


A B C D E F G
Stored at
Node
A 0 1 1 x 1 1 x
B 1 0 1 x x x x
C 1 1 0 1 x x x
D x x 1 0 x x 1
E 1 x x x 0 x x
F 1 x x x x 0 1
G x x x 1 x 1 0

Table 1. Initial distances stored at each node

We can represent each node's knowledge about the distances to all other nodes as a table like
the one given in Table 1.

Note that each node only knows the information in one row of the table.

Every node sends a message to its directly connected neighbors containing its personal list of
distance. After every node has exchanged a few updates with it’s directly connected neighbors,
all nodes will know the least-cost path to all the other nodes. When they receive updates, the
nodes need to keep track of which node told them about the path that they used to calculate
the cost, so that they can create their forwarding table.

Information Distance to Reach Node


A B C D E F G
Stored at
Node
A 0 1 1 2 1 1 2
B 1 0 1 2 2 2 3
C 1 1 0 1 2 2 2
D  2 1 0 3 2 1
E 1 2 2 3 0 2 3
F 1 2 2 2 2 0 1
G  3 2 1 3 1 0

Table 2. final distances stored at each node

In practice, each node's forwarding table consists of a set of triples of the form:

( Destination, Cost, NextHop).

For example, Table 3 shows the complete routing table maintained at node B for the network in
figure1.

Destination Cost NextHop


A 1 A
C 1 C
D 2 C
E 2 A
F 2 A
G 3 A

Table 3. Routing table maintained at node B

It is the use of Bellman Ford Algorithm for making routing tables.

Topic - Link State Routing Q1: What is Pure ALOHA?

By – Ranadeep Dey Link State Routing has two phases: Pure ALOHA is a random access protocol used in data communication
networks. It was one of the earliest multiple access protocols developed for
Reliable Flooding
It is a dynamic routing algorithm in which each router shares knowledge of its neighbors shared communication channels.
with every other router in the network. A router sends its information about its neighbors o Initial state: Each node knows the cost of its neighbors.
only to all the routers through flooding. Information sharing takes place only whenever
o Final state: Each node knows the entire graph. Q2: How does Pure ALOHA work?
there is a change.
Route Calculation Pure ALOHA allows stations to transmit data frames whenever they have data
It makes use of Dijkastra’s Algorithm for making routing tables.
Each node uses Dijkstra's algorithm on the graph to calculate the optimal routes to all nodes, to send. There is no coordination between stations. If two stations transmit at
Distance vector routers use a distributed algorithm to compute their routing tables, link-
which is actually used to find the shortest path from one node to every other node in the the same time, a collision occurs.
state routing uses link-state routers to exchange messages that allow each router to learn
network.
the entire network topology. Based on this learned topology, each router is then able to
compute its routing table by using a shortest path computation. Differences between Distance Vector Routing with Link State Routing - Q3: What happens when a collision occurs in Pure ALOHA?
Features of link state routing protocols – When a collision occurs, the data frames become corrupted, and the stations
 Link state packet – A small packet that contains routing information. involved must wait for a random amount of time before attempting
retransmission.
 Link state database – A collection information gathered from link state packet.
 Shortest path first algorithm (Dijkstra algorithm) – A calculation performed on the
database results into shortest path Q4: What is the efficiency of Pure ALOHA?
 Routing table – A list of known paths and interfaces. The efficiency of Pure ALOHA is low, around 18.4%, as it suffers from a high
collision rate, leading to frequent retransmissions.

Link State protocols in comparison to Distance Vector protocols have:


Slotted ALOHA:
1. It requires large amount of memory.
Q1: What is Slotted ALOHA?
2. Shortest path computations require many CPU circles.
Slotted ALOHA is an improved version of Pure ALOHA. It divides time into
3. If network use the little bandwidth ; it quickly reacts to topology changes
discrete slots, ensuring that transmissions start at the beginning of each slot.
4. All items in the database must be sent to neighbors to form link state packets.

5. All neighbors must be trusted in the topology.


Q2: How does Slotted ALOHA work?
6. Authentication mechanisms can be used to avoid undesired adjacency and problems.
In Slotted ALOHA, stations are synchronized to the time slots. They can
7. No split horizon techniques are possible in the link state routing. transmit data only at the beginning of a slot. This reduces the chances of
collisions.
Q4: What is the main advantage of Slotted ALOHA over Pure ALOHA? Q2: How does CSMA/CA work? Line coding
By- Ranadeep Dey
Slotted ALOHA has a higher channel utilization and lower collision rate than In CSMA/CA, stations listen to the channel before transmitting. If the channel is
Pure ALOHA due to synchronized time slots. busy, they wait. If it's idle, they transmit. However, unlike CSMA/CD, collision
Line coding is the process of converting digital data to digital signals. By this technique we convert a sequence of
detection is challenging in wireless networks, so CSMA/CA focuses on avoiding bits to a digital signal. At the sender side digital data are encoded into a digital signal and at the receiver side the
collisions. digital data are recreated by decoding the digital signal.
CSMA/CD (Carrier Sense Multiple Access with Collision Detection): The waveform pattern of voltage or current used to represent the 1s and 0s of a digital signal on a transmission
Q1: What is CSMA/CD? link is called line encoding. The common types of line encoding are unipolar, polar, bipolar and Manchester
Q3: What are the key features of CSMA/CA? encoding. Line codes are used commonly in computer communication networks over short distances.
CSMA/CD is a network protocol used in Ethernet LANs. It stands for Carrier
Sense Multiple Access with Collision Detection.
Carrier Sense: Stations listen to the channel.

Collision Avoidance: Stations use techniques like RTS/CTS (Request to


Q2: How does CSMA/CD work?
Send/Clear to Send) to reserve the channel before transmitting.
CSMA/CD stations first listen to the channel to check if it's idle. If it's clear, they
Acknowledgments: Stations expect acknowledgments for successful data frame
start transmitting. While transmitting, they continuously listen for collisions. If
delivery.
a collision is detected, they stop transmitting immediately.
Exponential Backoff: After a collision or unsuccessful transmission, stations use
an exponential backoff algorithm to retry.
Q3: What happens after a collision is detected in CSMA/CD?
Q4: Why is collision avoidance important in wireless networks?
After detecting a collision, CSMA/CD stations initiate a backoff algorithm to
Collision avoidance is crucial in wireless networks because once a collision
avoid retransmitting at the same time. This helps in reducing collisions.
occurs, it's challenging to detect and recover from it due to the "hidden node"
problem. Collision avoidance helps reduce the probability of collisions in the
Q4: Is CSMA/CD still widely used today? first place.

CSMA/CD was more prevalent in older Ethernet networks (e.g., 10BASE5 and
10BASE2). With the advent of modern Ethernet technologies like Gigabit and
10 Gigabit Ethernet, CSMA/CD is rarely used because full-duplex
communication eliminates the need for collision detection.

CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance):

Q1: What is CSMA/CA? In telecommunication, a line code (also called digital baseband modulation, also called digital baseband
transmission method) is a code chosen for use within a communications system for baseband transmission
CSMA/CA is a network protocol used in wireless LANs (Wi-Fi) for multiple purposes. Line coding is often used for digital data transport.
access. It stands for Carrier Sense Multiple Access with Collision Avoidance.

Try any string for your own practice…

Layer 2 - Data Link Layer


Layer 7- Application Layer At the data link layer, data packets are placed into frames for subsequent transmission
The application layer is the user-interaction layer, enabling the software and end-user across the network. The data link layer provides the transmission protocol knowledge
Topic- OSI LAYERS processes. Everything at this layer is application specific. For example, a web browser and management and handles physical layer errors, flow control, and frame
BY- Ranadeep Dey application for surfing the Internet would user this layer. The application layer provides synchronization.
application services for file transfers, e-mail, and other network-based software The data link layer is divided into two smaller sublayers: the Media Access Control
services, such as your web browser or e-mail software. (MAC) layer and the logical link control (LLC) layer. The MAC sublayer controls how a
Layer 6 - Presentation Layer computer on the network gains access to the data and permission to transmit it. The LLC
OSI Layers
The presentation layer provides for data representation to the user, such as a document layer controls frame synchronization, flow control, and error checking.
(.doc) or spreadsheet (.xls). The presentation layer also "translates" the user data into a Think of the MAC and LLC sublayers as the pilot and copilot of an aircraft. The MAC
This general overview of the Open System Interconnection (OSI) model lays the format that can be carried by the network, such as the segments and packets required sublayer prepares the frame for physical transmission, much as the pilot focuses on the
foundation for the rest of this book, but do not consider it exhaustive. The OSI model at the lower layers. The presentation layer converts your data into a form that the physical aspects of flying the aircraft. The LLC sublayer is concerned with the logical
defines a networking framework in seven layers. Control of the data passes from one application layer can accept, such as converting a string of data into a recognizable file aspects of the transmission, not with the physical aspects of the transmission. The LLC
layer to the next; starting at the sending station's application layer and then working format, such as .doc (word processing document) or .jpeg (graphics format). The layer acts like the copilot, who focuses on navigation, leaving the physical aspects of
down through the model to the bottom layer. Control of the data then passes across the presentation layer formats and encrypts data (when required by the user's application) flying to the pilot.
physical connection between each station along the path and then back up the model to be sent across the network.
layers to the top layer at the receiving (destination) station.
Layer 1- Physical Layer
Layer 5 - Session Layer The physical layer carries the bit stream through the network. The bit stream can be
OSI Model Sending and Receiving
The session layer establishes, manages, and terminates virtual communications carried as an electrical, light, or radio signal. This layer provides the hardware means of
connections between applications. In other words, the session layer starts and stops sending and receiving data on a carrier, including defining the cables, cards, and physical
communication sessions between network devices. When you place a telephone call, for aspects. Gigabit Ethernet, wireless, dense wavelength-division multiplexing (DWDM),
example, you are establishing a communication session with another person. When you Synchronous Optical Network (SONET), Electronic Industries
are finished with the call, you hang up the telephone, which terminates the session. Alliance/Telecommunications Industry Alliance 232 (EIA/TIA-232; formerly RS-232), and
Layer 4 -Transport Layer Asynchronous Transfer Mode (ATM) are all protocols with physical layer components.

The transport layer provides data transfer between end systems and is responsible for
end-to-end error recovery and flow control. Flow control ensures complete data
transfer and provides transparent checking for data that might have been dropped
along the way from sender to receiver. Error recovery retrieves lost data if it is dropped
or suffers from errors while in transit from source to destination.
Layer 3 -Network Layer
The network layer provides the routing technologies, creating a forwarding table or a
logical path between the source and destination. These logical paths are known as
virtual circuits and are considered to be point-to-point network connections. Routing
and forwarding are functions of the network layer. Network addressing, error handling,
congestion control, and packet sequencing are all functions of the network layer.

Data link Layer – Error Control


By-Ranadeep Dey
GO-BACK-N ARQ
Error Control Protocols The go-back-N ARQ deals with errors that occur when the sliding window protocol is used. When a
We now consider mechanisms that deal with errors that occur in the transmission of a frame. NAK is received for a particular frame, the source resends that frame and all the frames that have
These mechanisms deal with error correction by retransmission; that is, when an error occurs, the been transmitted since that frame was sent as well as any new frames, provided the total number
receiver will detect it and inform the source, and the source will have to retransmit the frame of frames being sent does not exceed N. Consider the example in figure below, where ,
either on account of an explicit negative acknowledgment (NAK) from the receiver or after a which is essentially the window size. Frame F4 is received in error, but the sender got this
timeout period with no positive ACK. Three error control schemes based on the automatic repeat information after it had already sent frames F5 and F6. Thus, these frames will be ignored by the
request (ARQ) are used depending on how retransmission is done when errors occur: receiver and the sender resends frames F4, F5, F6, and additionally frame F7 since its window size
is 4.
(a) Stop-and-wait ARQ

(b) Go-back-N ARQ

(c) Selective repeat ARQ.

The stop-and-wait ARQ is based on the stop-and-wait flow control protocol, while the other two
are based on the sliding window flow control protocol.

Stop-and-Wait ARQ
As stated earlier, the stop-and-wait ARQ is used to deal with errors that occur when the stop-and-
wait flow control protocol is used. Errors can occur in four ways:
SELECTIVE REPEAT ARQ
(a) The frame was corrupted in transit when going from source to sink.
One of the problems with the go-back-N scheme is that once a frame is found to be in error, all
(b) The frame was OK, but the ACK was corrupted in transit. subsequent frames, including those that were not in error, are retransmitted. When the round-
trip delay is high, as in satellite communication, the throughput of the channel becomes low. The
(c) The frame was lost in transit.
selective repeat ARQ addresses this problem. Under this scheme, only the frame in error is
(d) The ACK was lost in transit. retransmitted. The drawback is that the receiver must provide enough buffer to store the frames
that were transmitted after the erroneous frame until the frame has been retransmitted. The
Under the stop-and-wait ARQ, the source sends a frame and waits for a response, which can be an reason for this is that the destination must re-sequence the frames and deliver them in the same
ACK or a NAK that can also be in the form of a timeout. When a NAK is received, the source order that they appear at the source. Thus, until the error frame has been retransmitted and
resends the frame and keeps resending it until it receives an ACK after the frame has been correctly received, the frames that are not error must be stored in the buffer at the receiver.
correctly received at the destination. Some protocols permit a fixed maximum number of
retransmissions after which the link is declared unusable. Figure below is an illustration of the Consider the operation of the scheme in the previous example assuming window = 4. This is
scheme. In the figure, frame 1 is received in error and is retransmitted after the sender received illustrated in Figure below where unlike the go-back-4 (where N=4) scheme, only frame F4 is
the NAK. retransmitted instead of F4, F5, and F6 as in the go-back-4 scheme.

You might also like