Unicast Routing Protocols:
RIP, OSPF, and BGP
Objectives
Upon completion you will be able to:
Distinguish between intra and interdomain routing
Understand distance vector routing and RIP
Understand link state routing and OSPF
Understand path vector routing and BGP
TCP/IP Protocol Suite
14.1 INTRA- AND INTERDOMAIN
ROUTING
Routing inside an autonomous system is referred to
routing. Routing between autonomous systems is
interdomain routing.
TCP/IP Protocol Suite
as intradomain
referred to as
Figure 14.1
TCP/IP Protocol Suite
Autonomous systems
Figure 14.2
TCP/IP Protocol Suite
Popular routing protocols
14.2 DISTANCE VECTOR ROUTING
In distance vector routing, the least cost route between any two nodes is
the route with minimum distance. In this protocol each node maintains a
vector (table) of minimum distances to every node
The topics discussed in this section include:
Initialization
Sharing
Updating
When to Share
Two-Node Loop Instability
Three-Node Instability
TCP/IP Protocol Suite
Figure 14.3
TCP/IP Protocol Suite
Distance vector routing tables
Figure 14.4
TCP/IP Protocol Suite
Initialization of 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.
TCP/IP Protocol Suite
Figure 14.5
TCP/IP Protocol Suite
Updating in distance vector routing
Figure 14.6
TCP/IP Protocol Suite
Two-node instability
10
Figure 14.7
TCP/IP Protocol Suite
Three-node instability
11
14.3 RIP
The Routing Information Protocol (RIP) is an intradomain routing
protocol used inside an autonomous system. It is a very simple protocol
based on distance vector routing.
The destination in a routing table is a network, which means the first
column defines a network address.
The metric used by RIP is very simple; the distance is defined as the
number of links (networks) to reach the destination. For this reason, the
metric in RIP is called a hop count.
Infinity is defined as 16, which means that any route in an autonomous
system using RIP cannot have more than 15 hops.
The next-node column defines the address of the router to which the packet
is to be sent to reach its destination.
TCP/IP Protocol Suite
12
Figure 14.8
TCP/IP Protocol Suite
Example of a domain using RIP
13
14.4 LINK STATE ROUTING
In link state routing, if each node in the domain has the entire topology
of the domain, the node can use Dijkstras algorithm to build a routing
table.
The topics discussed in this section include:
Building Routing Tables
TCP/IP Protocol Suite
14
Figure 14.15
TCP/IP Protocol Suite
Concept of link state routing
15
Figure 14.16
TCP/IP Protocol Suite
Link state knowledge
16
Building Routing Tables
FOUR ACTIONS TO BE PERFORMED FOR
CREATING A ROUTING TABLE
Creation of Link State Packet(LSP)
Flooding of LSPs
Formation of Shortest path Trees: Dijkstra Algorithm
Calculation of Routing Table
TCP/IP Protocol Suite
17
Figure 14.17
TCP/IP Protocol Suite
Dijkstra algorithm
18
Figure 14.18
TCP/IP Protocol Suite
Example of formation of shortest path tree
19
Table 14.1 Routing table for node A
TCP/IP Protocol Suite
20
14.5 OSPF
The Open Shortest Path First
routing protocol based on link
autonomous system.
(OSPF) protocol
state routing. Its
is an intradomain
domain is also an
Divided into areas-A collection of networks, hosts, routers.
Special Routers-Area Border Routers at the borders.
Special Areas- Backbone with Backbone routers.
TCP/IP Protocol Suite
21
Figure 14.19
TCP/IP Protocol Suite
Areas in an autonomous system
22
Figure 14.20
TCP/IP Protocol Suite
Types of links
23
Figure 14.21
TCP/IP Protocol Suite
Point-to-point link
24
Figure 14.22
TCP/IP Protocol Suite
Transient link
25
Figure 14.23
TCP/IP Protocol Suite
Stub link
26
14.6 PATH VECTOR ROUTING
Path vector routing is similar to distance vector routing. There is at least
one node, called the speaker node, in each AS that creates a routing
table and advertises it to speaker nodes in the neighboring ASs..
The topics discussed in this section include:
Initialization
Sharing
Updating
TCP/IP Protocol Suite
27
Figure 14.48
TCP/IP Protocol Suite
Initial routing tables in path vector routing
28
Figure 14.49
TCP/IP Protocol Suite
Stabilized tables for four autonomous systems
29
14.7 BGP
Border Gateway Protocol (BGP) is an interdomain routing protocol
using path vector routing. It first appeared in 1989 and has gone
through four versions.
TCP/IP Protocol Suite
30
Figure 14.50
TCP/IP Protocol Suite
Internal and external BGP sessions
31