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

Unicast Routing Protocols: Unicast Routing Protocols: Rip, Ospf, and BGP Rip, Ospf, and BGP

RIP, OSPF, and BGP are the most widely used routing protocols in the world. RIP is a protocol that enables routing Information to be shared between nodes. OSPF is the most commonly used routing protocol.

Uploaded by

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

Unicast Routing Protocols: Unicast Routing Protocols: Rip, Ospf, and BGP Rip, Ospf, and BGP

RIP, OSPF, and BGP are the most widely used routing protocols in the world. RIP is a protocol that enables routing Information to be shared between nodes. OSPF is the most commonly used routing protocol.

Uploaded by

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

TCP/IP Protocol Suite 1

Chapter 14 Chapter 14
Upon completion you will be able to:
Unicast Routing Protocols: Unicast Routing Protocols:
RIP, OSPF, and BGP RIP, OSPF, and BGP
Distinguish between intra and interdomain routing
Understand distance vector routing and RIP
Understand link state routing and OSPF
Understand path vector routing and BGP
Objectives
TCP/IP Protocol Suite 2
14.1 INTRA- AND INTERDOMAIN
ROUTING
Routing Routing inside inside an an autonomous autonomous system system is is referred referred to to as as intradomain intradomain
routing routing.. Routing Routing between between autonomous autonomous systems systems is is referred referred to to as as
interdomain interdomain routing routing..
TCP/IP Protocol Suite 3
Figure 14.1 Autonomous systems
TCP/IP Protocol Suite 4
Figure 14.2 Popular routing protocols
TCP/IP Protocol Suite 5
14.2 DISTANCE VECTOR ROUTING
In In distance distance vector vector routing, routing, the the least least cost cost route route between between any any two two nodes nodes is is
the the route route with with minimum minimum distance distance.. In In this this protocol protocol each each node node maintains maintains aa
vector vector (table) (table) of of minimum minimumdistances distances to to every every node node
The topics discussed in this section include: The topics discussed in this section include:
Initialization Initialization
Sharing Sharing
Updating Updating
When to Share When to Share
Two Two--Node Loop Instability Node Loop Instability
Three Three--Node Instability Node Instability
TCP/IP Protocol Suite 6
Figure 14.3 Distance vector routing tables
TCP/IP Protocol Suite 7
Figure 14.4 Initialization of tables in distance vector routing
TCP/IP Protocol Suite 8
In distance vector routing, each node
shares its routing table with its
immediate neighbors periodically and
when there is a change.
Note: Note:
TCP/IP Protocol Suite 9
Figure 14.5 Updating in distance vector routing
TCP/IP Protocol Suite 10
Figure 14.6 Two-node instability
TCP/IP Protocol Suite 11
Figure 14.7 Three-node instability
TCP/IP Protocol Suite 12
14.3 RIP
The The Routing Routing Information Information Protocol Protocol (RIP) (RIP) is is an an intradomain intradomain routing routing
protocol protocol used used inside inside an an autonomous autonomous system system.. It It is is aa very very simple simple protocol protocol
based based on on distance distance vector vector routing routing..
The topics discussed in this section include: The topics discussed in this section include:
RIP Message Format RIP Message Format
Requests and Responses Requests and Responses
Timers in RIP Timers in RIP
RIP Version 2 RIP Version 2
Encapsulation Encapsulation
TCP/IP Protocol Suite 13
Figure 14.8 Example of a domain using RIP
TCP/IP Protocol Suite 14
Figure 14.9 RIP message format
TCP/IP Protocol Suite 15
Figure 14.10 Request messages
TCP/IP Protocol Suite 16
Figure 14.11 shows the update message sent from router R1 to
router R2 in Figure 14.8. The message is sent out of interface
130.10.0.2.
Example 1
See Next Slide
The message is prepared with the combination of split horizon
and poison reverse strategy in mind. Router R1 has obtained
information about networks 195.2.4.0, 195.2.5.0, and 195.2.6.0
from router R2. When R1 sends an update message to R2, it
replaces the actual value of the hop counts for these three
networks with 16 (infinity) to prevent any confusion for R2.
The figure also shows the table extracted from the message.
Router R2 uses the source address of the IP datagram carrying
the RIP message from R1 (130.10.02) as the next hop address.
TCP/IP Protocol Suite 17
Figure 14.11 Solution to Example 1
TCP/IP Protocol Suite 18
Figure 14.12 RIP timers
TCP/IP Protocol Suite 19
A routing table has 20 entries. It does not receive information
about five routes for 200 s. How many timers are running at
this time?
Example 2
Solution
The 21 timers are listed below:
Periodic timer: 1
Expiration timer: 20 5 = 15
Garbage collection timer: 5
TCP/IP Protocol Suite 20
Figure 14.13 RIP version 2 format
TCP/IP Protocol Suite 21
Figure 14.14 Authentication
TCP/IP Protocol Suite 22
RIP uses the services of UDP on
well-known port 520.
Note: Note:
TCP/IP Protocol Suite 23
14.4 LINK STATE ROUTING
In In link link state state routing, routing, if if each each node node in in the the domain domain has has the the entire entire topology topology
of of the the domain, domain, the the node node can can use use Dijkstras Dijkstras algorithm algorithm to to build build aa routing routing
table table..
The topics discussed in this section include: The topics discussed in this section include:
Building Routing Tables Building Routing Tables
TCP/IP Protocol Suite 24
Figure 14.15 Concept of link state routing
TCP/IP Protocol Suite 25
Figure 14.16 Link state knowledge
TCP/IP Protocol Suite 26
Figure 14.17 Dijkstra algorithm
TCP/IP Protocol Suite 27
Figure 14.18 Example of formation of shortest path tree
TCP/IP Protocol Suite 28
Table 14.1 Table 14.1 Routing table for node A Routing table for node A
TCP/IP Protocol Suite 29
14.5 OSPF
The The Open Open Shortest Shortest Path Path First First (OSPF) (OSPF) protocol protocol is is an an intradomain intradomain routing routing
protocol protocol based based on on link link state state routing routing.. Its Its domain domain is is also also an an autonomous autonomous
system system..
The topics discussed in this section include: The topics discussed in this section include:
Areas Areas
Metric Metric
Types of Links Types of Links
Graphical Representation Graphical Representation
OSPF Packets OSPF Packets
Link State Update Packet Link State Update Packet
Other Packets Other Packets
Encapsulation Encapsulation
TCP/IP Protocol Suite 30
Figure 14.19 Areas in an autonomous system
TCP/IP Protocol Suite 31
Figure 14.20 Types of links
TCP/IP Protocol Suite 32
Figure 14.21 Point-to-point link
TCP/IP Protocol Suite 33
Figure 14.22 Transient link
TCP/IP Protocol Suite 34
Figure 14.23 Stub link
TCP/IP Protocol Suite 35
Figure 14.24 Example of an AS and its graphical representation in OSPF
TCP/IP Protocol Suite 36
Figure 14.25 Types of OSPF packets
TCP/IP Protocol Suite 37
Figure 14.26 OSPF common header
TCP/IP Protocol Suite 38
Figure 14.27 Link state update packet
TCP/IP Protocol Suite 39
Figure 14.28 LSA general header
TCP/IP Protocol Suite 40
Figure 14.29 Router link
TCP/IP Protocol Suite 41
Figure 14.30 Router link LSA
TCP/IP Protocol Suite 42
Table 14.2 Table 14.2 Link types, link identification, and link data Link types, link identification, and link data
TCP/IP Protocol Suite 43
Give the router link LSA sent by router 10.24.7.9 in
Figure 14.31.
Example 3
Solution
This router has three links: two of type 1 (point-to-
point) and one of type 3 (stub network). Figure 14.32
shows the router link LSA.
See Next Slide
See Figure 14.32
TCP/IP Protocol Suite 44
Figure 14.31 Example 3
TCP/IP Protocol Suite 45
Figure 14.32 Solution to Example 3
TCP/IP Protocol Suite 46
Figure 14.33 Network link
TCP/IP Protocol Suite 47
Figure 14.34 Network link advertisement format
TCP/IP Protocol Suite 48
Give the network link LSAin Figure 14.35.
Example 4
Solution.
See Next Slide
See Figure 14.36
TCP/IP Protocol Suite 49
Figure 14.35 Example 4
TCP/IP Protocol Suite 50
Figure 14.36 Solution to Example 4
TCP/IP Protocol Suite 51
In Figure 14.37, which router(s) sends out router link LSAs?
Example 5
Solution
All routers advertise router link LSAs.
a. R1 has two links, N1 and N2.
b. R2 has one link, N1.
c. R3 has two links, N2 and N3.
See Next Slide
TCP/IP Protocol Suite 52
Figure 14.37 Example 5 and Example 6
TCP/IP Protocol Suite 53
In Figure 14.37, which router(s) sends out the network link
LSAs?
Example 6
Solution
All three network must advertise network links:
a. Advertisement for N1 is done by R1 because it is the only
attached router and therefore the designated router.
b. Advertisement for N2 can be done by either R1, R2, or R3,
depending on which one is chosen as the designated router.
c. Advertisement for N3 is done by R3 because it is the only
attached router and therefore the designated router.
TCP/IP Protocol Suite 54
Figure 14.38 Summary link to network
TCP/IP Protocol Suite 55
Figure 14.39 Summary link to network LSA
TCP/IP Protocol Suite 56
Figure 14.40 Summary link to AS boundary router
TCP/IP Protocol Suite 57
Figure 14.41 Summary link to AS boundary router LSA
TCP/IP Protocol Suite 58
Figure 14.42 External link
TCP/IP Protocol Suite 59
Figure 14.43 External link LSA
TCP/IP Protocol Suite 60
Figure 14.44 Hello packet
TCP/IP Protocol Suite 61
Figure 14.45 Database description packet
TCP/IP Protocol Suite 62
Figure 14.46 Link state request packet
TCP/IP Protocol Suite 63
Figure 14.47 Link state acknowledgment packet
TCP/IP Protocol Suite 64
OSPF packets are encapsulated in IP
datagrams.
Note: Note:
TCP/IP Protocol Suite 65
14.6 PATH VECTOR ROUTING
Path Path vector vector routing routing is is similar similar to to distance distance vector vector routing routing.. There There is is at at least least
one one node, node, called called the the speaker speaker node, node, in in each each AS AS that that creates creates aa routing routing table table
and and advertises advertises it it to to speaker speaker nodes nodes in in the the neighboring neighboring ASs ASs.. ..
The topics discussed in this section include: The topics discussed in this section include:
Initialization Initialization
Sharing Sharing
Updating Updating
TCP/IP Protocol Suite 66
Figure 14.48 Initial routing tables in path vector routing
TCP/IP Protocol Suite 67
Figure 14.49 Stabilized tables for four autonomous systems
TCP/IP Protocol Suite 68
14.7 BGP
Border Border Gateway Gateway Protocol Protocol (BGP) (BGP) is is an an interdomain interdomain routing routing protocol protocol
using using path path vector vector routing routing.. It It first first appeared appeared in in 1989 1989 and and has has gone gone through through
four four versions versions..
The topics discussed in this section include: The topics discussed in this section include:
Types of Autonomous Systems Types of Autonomous Systems
Path Attributes Path Attributes
BGP Sessions BGP Sessions
External and Internal BGP External and Internal BGP
Types of Packets Types of Packets
Packet Format Packet Format
Encapsulation Encapsulation
TCP/IP Protocol Suite 69
Figure 14.50 Internal and external BGP sessions
TCP/IP Protocol Suite 70
Figure 14.51 Types of BGP messages
TCP/IP Protocol Suite 71
Figure 14.52 BGP packet header
TCP/IP Protocol Suite 72
Figure 14.53 Open message
TCP/IP Protocol Suite 73
Figure 14.54 Update message
TCP/IP Protocol Suite 74
BGP supports classless addressing and
CIDR.
Note: Note:
TCP/IP Protocol Suite 75
Figure 14.55 Keepalive message
TCP/IP Protocol Suite 76
Figure 14.56 Notification message
TCP/IP Protocol Suite 77
Table 14.3 Table 14.3 Error codes Error codes
TCP/IP Protocol Suite 78
BGP uses the services of TCP
on port 179.
Note: Note:

You might also like