rd1 Merged
rd1 Merged
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.
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
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.
In practice, each node's forwarding table consists of a set of triples of the form:
For example, Table 3 shows the complete routing table maintained at node B for the network in
figure1.
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.
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.
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.
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.
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.