0% found this document useful (0 votes)
11 views78 pages

BCSE308L - Module 5 - Updated

Module 5 covers routing algorithms for IP packets, including unicast and multicast routing, and discusses Internet routing protocols such as RIP, OSPF, and BGP. It explains forwarding processes, routing tables, and the differences between static and dynamic routing tables, as well as distance vector and link state routing methodologies. The document also details the workings of the Routing Information Protocol (RIP), including message types, timers, and the formation of routing tables.

Uploaded by

Jugnu Saini Ju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views78 pages

BCSE308L - Module 5 - Updated

Module 5 covers routing algorithms for IP packets, including unicast and multicast routing, and discusses Internet routing protocols such as RIP, OSPF, and BGP. It explains forwarding processes, routing tables, and the differences between static and dynamic routing tables, as well as distance vector and link state routing methodologies. The document also details the workings of the Routing Information Protocol (RIP), including message types, timers, and the formation of routing tables.

Uploaded by

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

MODULE 5 - ROUTING ALGORITHMS

Forwarding of IP Packets - Routing algorithms – Unicast


and Multicast Routing Algorithms -Internet Routing
protocols - RIP, OSPF and BGP.
Acknowledgement-slides from

Data Communications and Networking by B. Forouzan,


FIFTH Edition , Mc Graw Hill,2007
DELIVERY

The network layer supervises the handling of the


packets by the underlying physical networks. We
define this handling as the delivery of a packet..
Direct and indirect delivery
FORWARDING

Forwarding means to place the packet in its route to its


destination. Forwarding requires a host or a router to have a
routing table.. When a host has a packet to send or when a router
has received a packet to be forwarded, it looks at this table to
find the route to the final destination.
Route method versus next-hop method
Host-specific versus network-specific method
Default method
Simplified forwarding module in classless address

In classless addressing, we need at least


four columns in a routing table.
Example

Make a routing table for router R1, using the


configuration in Figure .
Solution
Following Table shows the corresponding table.
Routing table for router R1 in Figure
Example

Show the forwarding process if a packet arrives at R1 in Figure


(previous slide) with the destination address 180.70.65.140.
Solution
The router performs the following steps:
1. The first mask (/26) is applied to the destination address. The
result is 180.70.65.128, which does not match the
corresponding network address.
2. The second mask (/25) is applied to the destination address.
The result is 180.70.65.128, which matches the corresponding
network address. The next-hop address and the interface
number m0 are passed to ARP for further processing.
Example

Show the forwarding process if a packet arrives at R1 in


Figure with the destination address 18.24.32.78.

Solution
This time all masks are applied, one by one, to the
destination address, but no matching network address is
found. When it reaches the end of the table, the module
gives the next-hop address 180.70.65.200 and interface
number m2 to ARP. This is probably an outgoing package
that needs to be sent, via the default router, to someplace
else in the Internet.
UNICAST ROUTING PROTOCOLS

A routing table can be either static or dynamic. A


static table is one with manual entries.. A dynamic
table is one that is updated automatically when there
is a change somewhere in the Internet.. A routing
protocol is a combination of rules and procedures that
lets routers in the Internet inform each other of
changes..
Autonomous systems
Popular routing protocols
Distance vector routing tables
Distance Vector Routing
The heart of distance-vector routing is the famous Bellman-
Ford equation. This equation is used to find the least cost
(shortest distance) between a source node, x, and a destination
node, y, through some intermediary nodes (a, b, c, . . .) when
the costs between the source and the intermediary nodes and
the least costs between the intermediary nodes and the
destination are given. The following shows the general case in
which Dij is the shortest distance and cij is the cost between
nodes i and j.
Distance Vector Routing
Initialization of tables in distance vector routing
Final Routing tables in distance vector routing
Note

In distance vector routing, each node


shares its routing table with its
immediate neighbors periodically and
when there is a change.
Updating in distance vector routing
Distance Vector Routing
Updating Distance Vectors
Two-node instability
Three-node instability
Split Horizon
Poison Reverse
Exercise
Example of a domain using
RIP
RIP Updating Information
 Routing table is updated on receipt of a RIP response message
 Receipt: a response RIP message
 Add one hop to the hop count for each advertised destination
 Repeat the following steps for each advertised destination
 If (destination not in the routing table)
 Add the advertised information to the table
 Else
 If (next-hop field is the same)
 Replace entry in the table with the advertised one
 Else
 If (advertised hop count smaller than one in the table)
 Replace entry in the routing table
 Return
Example of Updating a Routing Table
Figure 13-6

RIP Message Format


Requests and Response
 RIP uses two type of messages
 Request and response

 Request
 Sent by a router that has just come up or has some
time-out entries
 Can ask specific entries or all entries
Figure 13-7

Request Messages
Requests and Response (Cont.)
 Response: solicited or unsolicited
 A solicited response: sent only in answer to a
request
 Contain information about the destination specified in
the corresponding request
 An unsolicited response: sent periodically
 Every 30s
 Contains information about the entire routing table
 Also called update packet
Timers in RIP
 RIP uses three timers
 Periodic timer

 Expiration timer

 Garbage collection timer


Figure 13-10

RIP Timers
Periodic Timer
 Periodic timer
 Control the advertising of regular update message

 Although protocol specifies 30 s, the working


model uses a random number between 25 and 35 s
 Prevent routers update simultaneously
Expiration Timer
 Govern the validity of a route
 Set to 180 s for a route when a router receives update
information for a route
 If a new update for the route is received, the timer is reset
 In normal operation, this occurs every 30 s

 If timer goes off, the route is considered expired


 The hop count of the route is set to 16, which means
destination is unreachable
Garbage Collection Timer
 When a route becomes invalid, the router does not
immediately purge that route from its table
 It continues advertise the route with a metric value of
16
 A garbage collection timer is set to 120 s for that
route
 When the count reaches zero, the route is purged from
the table
 Allow neighbors to become aware of the invalidity of
a route prior to purging
Example 2

 A routing table has 20 entries.


 It does not receive information about five
routes for 200 seconds.
 How many timers are running at this
time?
Solution

 The timers are listed below:


 Periodic timer: 1
 Expiration timer: 20 - 5 = 15
 Garbage collection timer: 5
Concept of link state routing
Link state knowledge
Link State Routing
Link State Routing
Link-State Database (LSDB)
• To create a least-cost tree with this method, each node needs to
have a complete map of the network, which means it needs to
know the state of each link. The collection of states for all links
is called the link-state database (LSDB)
• Each node can send some greeting messages to all its
immediate neighbors to collect two pieces of information for
each neighboring node:
• the identity of the node and the cost of the link.
• The combination of these two pieces of information is called the
LS packet (LSP)
Building Routing Tables

In link state routing, four sets of actions are required to ensure that
each node has the routing table showing the least-cost node to every
other node.
1. Creation of the states of the links by each node, called the link
state packet (LSP).
2. Dissemination of LSPs to every other router, called flooding, in
an efficient and reliable way.
3. Formation of a shortest path tree for each node.
4. Calculation of a routing table based on the shortest path tree.
Creation of Link State Packet (LSP)
• Each node can send some greeting messages to all its immediate
neighbors to collect two pieces of information for each
neighboring node:
• the identity of the node and the cost of the link.
• The combination of these two pieces of information is called the
LS packet (LSP)
• LSPs are generated on two occasions:
1. When there is a change in the topology of the domain
2. On a periodic basis.
Flooding of Link State Packet (LSP)
• After a node has prepared an LSP, it must be disseminated to all
other nodes, not only to its neighbors.
• The process is called flooding and based on the following:
• 1. The creating node sends a copy of the LSP out of each
interface.
• 2. A node that receives an LSP compares it with the copy it may
already have. If the newly arrived LSP is older than the one it has
(found by checking the sequence number), it discards the LSP. If
it is newer, the node does the following:
• a. It discards the old LSP and keeps the new one.
• b. It sends a copy of it out of each interface except the one from
which the packet arrived. This guarantees that flooding stops
somewhere in the domain (where a node has only one interface)
Formation of Shortest Path Tree: Dijkstra Algorithm

• The Dijkstra algorithm creates a shortest path tree from a


graph.
• The algorithm divides the nodes into two sets:
• tentative and permanent.
• It finds the neighbors of a current node, makes them
tentative, examines them, and if they pass the criteria, makes
them permanent.
Dijkstra algorithm
Link State Routing
Example of formation of shortest path tree
Formation of Shortest Path Tree-Dijkstra algorithm-
Rooted at A
Permanent list: empty Tentative list: A(O)
Permanent list: A(O) Tentative list: B(5), C(2), D(3)
Permanent list: A(O), C(2) Tentative list: B(5), D(3), E(6)
Permanent list: A(O), C(2), D(3) Tentative list: B(5), E(6)
Permanent list: A(O), B(5), C(2), D(3) Tentative list: E(6)
Permanent list: A(O), B(5), C(2), D(3), E(6) Tentative list: empty
Calculation of Routing Table from Shortest Path Tree

Routing table for node A


Routing Information Protocol - RIP

• based on the distance-vector routing


algorithm
• the cost is defined between a router and the
network in which the destination host is
located
• Cost is defined as the number of hops
• In RIP, the maximum cost of a path can be
15, which means 16 is considered as infinity
RIP – Hop Counts
Routing Information Protocol - Forwarding Tables
• A forwarding table in RIP is a three-column table
• first column - address of the destination network,
• second column - address of the next router to which the
packet should be forwarded,
• third column - cost (the number of hops) to reach the
destination network.
Routing Information Protocol - Messages
• Two types
• Request message- sent by a router that has just come up or by
a router that has some time-out entries
• Response message –
• Can be solicited or unsolicited
• A solicited response message - answer to a request
message.
• contains information about the destination specified in the
corresponding request message.
• An unsolicited response message, on the other hand, is
sent periodically, every 30 seconds or when there is a
change in the forwarding table.
Routing Information Protocol - Messages
Areas in an autonomous system
Types of links
Point-to-point link
Transient link
Stub link
Example of an AS and its graphical representation in OSPF
Initial routing tables in path vector routing
Stabilized tables for three autonomous systems
Internal and external BGP sessions
Internal and external BGP sessions
Internal and external BGP sessions
Internal and external BGP sessions
Internal and external BGP sessions

You might also like