Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Link State Routing

Since the distance vector routing does not consider the bandwidth of the line, hence it is
not suitable for modern network scenario. An entirely new algorithm was developed to solve this
problem, which is known as Link State Routing Algorithm.
The link state routing is divided into five parts. Each router must-
• Discover it’s neighbors and learn their network addresses.
• Measure the delay or cost to each of it’s neighbors.
• Construct a packet telling every other ones about the above informations.
• Send the packet to all other routers.
• Compute the shortest path to every other router.
Now let us consider each of them one by one.
1) Learning about neighbors: When a router is booted, it’s first task is to learn
who it’s neighbors are. It accomplishes this goal by sending a special HELLO
packet on each line. The router on the other end sends back a reply telling who it
is. The address of each router must be globally unique.
2) Measuring the line cost: The most direct way to determine the delay to each of
it’s neighbor is to send a special ECHO packet over the line and the other side
router is required to send back the reply immediately. By measuring the round-
trip time and dividing it by two, the delay is calculated. This process can be
conducted several times and the average can be used for better result. The load of
the line may or may not be considered.
3) Building Link State Packets: Once the information has been collected, the next
step is for each router to build a packet containing all the data. The packet starts
with the identity of the sender, followed by a sequence number and age. An
example is given below-

B 2 C
4 3
A
1 6 D
5 7
E 8 F

A B C D E F
Seq Seq Seq Seq Seq Seq
Age Age Age Age Age Age

B 4 A 4 B 2 C 3 A 5 B 6
E 5 C 2 D 3 F 7 C 1 D 7
F 6 E 1 F 8 E 8

Name of router B, delay 4


4) Distributing the Link State Packets: The technique known as flooding is
used to distribute the link state packets. Each packet contains a sequence
number which is incremented for each new packet sent. When a new link
state packet comes in, it is checked against the list of packets already seen.
If it is new, it is forwarded on all lines except the one it arrived one. If it is
a duplicate, it is discarded. If a packet with a sequence number lower than
the highest one seen so far ever arrives, it is discarded. To discard older
packet from staying in the network indefinitely, an age field is included in
each packet. This field is decremented by 1 in every second and when it
hits zero, the packet is discarded. The sequence number is maintained in
the router and somehow, that router crashed, the sequence would be lost.
Flooding creates multiple instances of the same packet.
5) Computing the new routes: Once the packets are exchanged among
routers, each router will have the information of every other one. Now
Dijkstra’s algorithm can be run locally to construct the shortest path to all
possible destinations. The result of the algorithm is installed in the routing
table.
Two packets that uses the link state routing are OSPF (Open Shortest Path First)
and IS-IS (Intermediate System-Intermediate System).

You might also like