3.5 - Link State Routing
3.5 - Link State Routing
tables - Link-
Links with lower costs are preferred to links with higher costs.
If the cost of a link is infinity, it means that the link does not exist
1 or
Example of a link-state database
2
Link-State Database (LSDB)
map of network.
(LSDB).
least-cost tree. 3
Link-State Database (LSDB)
How each node can create this LSDB that contains information of
whole Internet?
This can be done by a process called flooding.
Each node can send some greeting messages to all its immediate
neighbours (those
nodes to which it is connected directly) to collect two pieces of
information for each
neighbouring node:
Identity of the node and cost of the link.
combination of these two pieces of information - LS packet (LSP);
LSP is sent out of each interface. 4
Link-State Database (LSDB)
If newly arrived LSP is older than one it has (found by checking the
sequence number) - it
discards the LSP.
If it is newer or the first one received, node discards old LSP (if there
is one) and keeps
received one.
6
Formation of Least-Cost Trees
To create a least-cost tree for itself - using shared LSDB- each node
needs to run
The algorithm divides the nodes into two sets: tentative and
permanent.
7
Formation of Least-Cost Trees
9
UNICAST ROUTING PROTOCOLS
10
Routing Information Protocol (RIP)
RIP is one of most widely used intra domain routing protocols.
It is based on the distance-vector routing algorithm
Router in AS needs to know how to forward a packet to different
networks (subnets) in
an AS.
RIP routers advertise cost of reaching different networks instead of
reaching other
nodes in a theoretical graph.
In RIP, maximum cost of a path can be 15, which means 16 is
considered as infinity
11
(no connection).
Routing Information Protocol (RIP)
14
How Does RIP Work?
8 routers in a network
Router 1 wants to send the data to
Router 3.
If the network is configured with RIP,
then
It will choose route which has least
number of hops.
There are three routes in network,
Route 1, Route 2, Route 3.
Route 2 contains least number of
hops, i.e., 2
Route 1 contains 3 hops,
15
How Does RIP Work?
18
RIP –Advantages
• It is easy to configure
19
RIP –Routing Updates
RIP updates its Routing table
1 hop (N4)
21
Forwarding tables
20.22
Example of an autonomous system using RIP (Part I)
23
Figure 20.18: Example of an autonomous system using RIP (Part II)
24
Example of an autonomous system using RIP (Part III)
25
RIP Algorithm
2. If cost of received route < cost of old one, received route should be
elected as new one.
3. If26cost of received route > old one, but value of next router is same in
Open Shortest Path First
Open Shortest Path First (OSPF) is also an intra domain routing
protocol like RIP
based on link-state routing protocol.
OSPF is an open protocol - the specification is a public document.
In OSPF - cost of reaching a destination from host is calculated from
source router
to the destination network.
Each link - assigned weight based on throughput, round-trip
time, reliability.
Each OSPF router create forwarding table after finding shortest-
27
Open Shortest Path First
Figure 20.20 shows the forwarding tables for the simple AS in
Figure below.
Comparing the forwarding tables for the OSPF and RIP in the same
AS.
The only difference is the cost values.
If use the hop count for OSPF, the tables will be exactly the same.
Consistency is that both protocols use shortest-path trees to
define the best route from a source to a destination.
28
Figure 20.20: Forwarding tables in OSPF
29
Figure 20.21: Areas in an autonomous
system
30
Link-State Advertisement
to other entities.
Type of advertisement – define address of transient(short lived)
network and cost
of link.
A stub(end) link advertises a link to a stub network,
cost
20.33 to network - when it sends a router link advertisement.
Summary link to network.
This is done by an area border router;
It advertises summary of links collected by the backbone to an
area.
This type of information exchange is needed to glue the areas
together.
Summary link to AS.
This is done by an AS router that
advertises summary links from other ASs
to backbone area of current AS,
This information later can be disseminated
to areas so that they will know about
networks in other ASs.
20.34
Figure 20.23: OSPF message formats (Part I)
Attention
35
Figure 20.23: OSPF message formats (Part II)
Attention
36