SlideShare a Scribd company logo
TCP/IP Protocol Suite 1
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 11
Unicast
Routing
Protocols
TCP/IP Protocol Suite 2
OBJECTIVES:
OBJECTIVES:
 To introduce the idea of autonomous systems (ASs) that divide
the Internet into smaller administrative regions.
 To discuss the idea of distance vector routing and the RIP that is
used to implement the idea.
 To discuss the idea of link state routing as the second intra-AS
routing method and OSPF that is used to implement the idea.
 To discuss the idea of path vector routing as the dominant inter-
AS routing method and BGP that is used to implement the idea.
TCP/IP Protocol Suite 3
Chapter
Chapter
Outline
Outline
11.1 Introduction
11.1 Introduction
11.2 Intra- and Inter-Domain
11.2 Intra- and Inter-Domain
Routing
Routing
11.3 Distance Vector Routing
11.3 Distance Vector Routing
11.4 RIP
11.4 RIP
11.5 Link State Routing
11.5 Link State Routing
11.6 OSPF
11.6 OSPF
11.7 Path Vector Routing
11.7 Path Vector Routing
11.8 BGP
11.8 BGP
TCP/IP Protocol Suite 4
11-1 INTRODUCTION
An internet is a combination of networks connected
by routers. When a datagram goes from a source to
a destination, it will probably pass through many
routers until it reaches the router attached to the
destination network.
TCP/IP Protocol Suite 5
Topics Discussed in the Section
Topics Discussed in the Section
 Cost or Metric
 Static versus Dynamic Routing Table
 Routing Protocol
TCP/IP Protocol Suite 6
11-2 INTER- AND INTRA-DOMAIN
ROUTING
Today, an internet can be so large that one routing
protocol cannot handle the task of updating the
routing tables of all routers. For this reason, an
internet is divided into autonomous systems. An
autonomous system (AS) is a group of networks and
routers under the authority of a single administration.
Routing inside an autonomous system is called intra-
domain routing. Routing between autonomous
systems is called inter-domain routing
TCP/IP Protocol Suite 7
Figure 11.1 Autonomous systems
TCP/IP Protocol Suite 8
Figure 11.2 Popular routing protocols
TCP/IP Protocol Suite 9
11-3 DISTANCE VECTOR ROUTING
Today, an internet can be so large that one routing
protocol cannot handle the task of updating the
routing tables of all routers. For this reason, an
internet is divided into autonomous systems. An
autonomous system (AS) is a group of networks and
routers under the authority of a single administration.
Routing inside an autonomous system is called intra-
domain routing. Routing between autonomous
systems is called inter-domain routing
11-2
TCP/IP Protocol Suite 10
Topics Discussed in the Section
Topics Discussed in the Section
 Bellman-Ford Algorithm
 Distance Vector Routing Algorithm
 Count to Infinity
TCP/IP Protocol Suite 11
Figure 11.3 A graph for Bellman-Ford algorithm
TCP/IP Protocol Suite 12
Figure 11.4 The fact behind Bellman-Ford algorithm
TCP/IP Protocol Suite 13
TCP/IP Protocol Suite 14
TCP/IP Protocol Suite 15
Address of
the sender of R
TCP/IP Protocol Suite 16
TCP/IP Protocol Suite 17
Updating Routing Table
• If the next-node entry is different
– The receiving node chooses the row with
the smaller cost
– If there is a tie, the old one is kept
• If the next-node entry is the same
– i.e. the sender of the new row is the
provider of the old entry
– The receiving node chooses the new row,
even though the new value is infinity.
TCP/IP Protocol Suite 18
When to Share
• Periodic Update
– A node sends its routing table, normally 30
seconds, in a periodic update
• Triggered Update
– A node sends its routing table to its
neighbors any time when there is a change
in its routing table
• 1. After updating its routing table, or
• 2. Detects some failure in the neighboring links
TCP/IP Protocol Suite 19
Figure 11.5 shows the initial routing table for an AS. Note that
the figure does not mean that all routing tables have been
created at the same time; each router creates its own routing
table when it is booted.
Example
Example 11.1
TCP/IP Protocol Suite 20
Figure 11.5 Example 11.1
TCP/IP Protocol Suite 21
Now assume router A sends four records to its neighbors,
routers B, D, and C. Figure 11.6 shows the changes in B’s
routing table when it receives these records. We leave the
changes in the routing tables of other neighbors as exercise.
Example
Example 11.2
TCP/IP Protocol Suite 22
Figure 11.6 Example 11.2
Net4 , 1
3
Net5 , 1
4
Net2 , 1
2
TCP/IP Protocol Suite 23
Figure 11.7 shows the final routing tables for routers in Figure
11.5.
Example
Example 11.3
TCP/IP Protocol Suite 24
Figure 11.7 Example 11.3
TCP/IP Protocol Suite 25
Figure 11.8 Two-node instability
TCP/IP Protocol Suite 26
Two-Node Instability (1)
• Defining Infinity
– Most implementations define 16 as infinity
• Split Horizon
– Instead of flooding the table through each
interface, each node sends only part of its
table through each interface
– E.g. node B thinks that the optimum route
to reach X is via A, it does not need to
advertise this piece of information to A
TCP/IP Protocol Suite 27
Two-Node Instability (2)
• Split Horizon and Poison Reverse
– One drawback of Split Horizon
• Normally, the DV protocol uses a timer and if
there is no news about a route, the node deletes
the route from its table
• In the previous e.g., node A cannot guess that
this is due to split horizon or because B has not
received any news about X recently
– Poison Reverse
• Node B can still advertise the value for X, but is
the source of information is A, it can replace
the distance with infinity as a warning
TCP/IP Protocol Suite 28
Figure 11.9 Three-node instability
Update loop
until infinity
If the instability is btw
three nodes, stability
cannot be guaranteed
TCP/IP Protocol Suite 29
11-4 RIP
The Routing Information Protocol (RIP) is an intra-
domain (interior) routing protocol used inside an
autonomous system. It is a very simple protocol
based on distance vector routing. RIP implements
distance vector routing directly with some
considerations.
TCP/IP Protocol Suite 30
Topics Discussed in the Section
Topics Discussed in the Section
 RIP Message Format
 Request and Response
Timers in RIP
 RIP Version 2
 Encapsulation
TCP/IP Protocol Suite 31
RIP messages
• Request
– A request message is sent by a router that
has just come up or by a router that has
some time-out entries
– A request can ask about specific entries or
all entries
• Response
– A response can be either solicited or
unsolicited (30s or when there is a change
in the routing table)
TCP/IP Protocol Suite 32
RIP Timers
• Periodic timer
– It controls the advertising of regular update
message (25 ~ 30 sec)
• Expiration timer
– It governs the validity of a route (180 sec)
– The route is considered expired and the hop count
of the route is set to 16
• Garbage collection timer
– A invalid route is not purged from the routing
table until this timer expires (120 sec)
TCP/IP Protocol Suite 33
RIPv2 vs. RIPv1
• Classless Addressing
• Authentication
• Multicasting
– RIPv1 uses broadcasting to send RIP messages
to every neighbors. Routers as well as hosts
receive the packets
– RIPv2 uses the all-router multicast address to
send the RIP messages only to RIP routers in
the network
TCP/IP Protocol Suite 34
Figure 11.10 Example of a domain using RIP
TCP/IP Protocol Suite 35
Figure 11.11 RIP message format
TCP/IP Protocol Suite 36
Figure 11.12 Request messages
TCP/IP Protocol Suite 37
Figure 11.13 shows the update message sent from router R1 to
router R2 in Figure 11.10. The message is sent out of interface
130.10.0.2.
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.
Router R2 also increments each hop count by 1 because the
values in the message are relative to R1, not R2.
Example
Example 11.4
TCP/IP Protocol Suite 38
Figure 11.13 Solution to Example 11.4
TCP/IP Protocol Suite 39
Figure 11.14 RIP timers
TCP/IP Protocol Suite 40
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?
Solution
The 21 timers are listed below:
Periodic timer: 1
Expiration timer: 20 − 5 = 15
Garbage collection timer: 5
Example
Example 11.5
TCP/IP Protocol Suite 41
Figure 11.15 RIP version 2 format
TCP/IP Protocol Suite 42
Figure 11.16 Authentication
TCP/IP Protocol Suite 43
RIP uses the services of UDP on well-
known port 520.
Note
TCP/IP Protocol Suite 44
11-5 LINK STATE ROUTING
Link state routing has a different philosophy from
that of distance vector routing. In link state routing, if
each node in the domain has the entire topology of
the domain—the list of nodes and links, how they
are connected including the type, cost (metric), and
the condition of the links (up or down)—the node can
use the Dijkstra algorithm to build a routing table.
TCP/IP Protocol Suite 45
Topics Discussed in the Section
Topics Discussed in the Section
 Building Routing tables
TCP/IP Protocol Suite 46
Figure 11.17 Concept of Link state routing
TCP/IP Protocol Suite 47
Figure 11.18 Link state knowledge
TCP/IP Protocol Suite 48
Building Routing Tables
• Creation of the states of the links by
each node, called the link state
packets (LSP)
• Dissemination of LSPs to every other
routers, called flooding (efficiently)
• Formation of a shortest path tree for
each node
• Calculation of a routing table based on
the shortest path tree
TCP/IP Protocol Suite 49
Creation of LSP
• LSP data: E.g. the node ID, the list of
links, a sequence number, and age.
• LSP Generation
– When there is a change in the
topology of the domain
– On a periodic basis
• There is no actual need for this type of
LSP, normally 60 minutes or 2 hours
TCP/IP Protocol Suite 50
TCP/IP Protocol Suite 51
Continued
TCP/IP Protocol Suite 52
Figure 11.19 Forming shortest path three for router A in a graph
TCP/IP Protocol Suite 53
Figure 11.19 Continued
TCP/IP Protocol Suite 54
Figure 11.19 Continued
TCP/IP Protocol Suite 55
To show that the shortest path tree for each node is different,
we found the shortest path tree as seen by node C (Figure
11.20). We leave the detail as an exercise.
Example
Example 11.6
TCP/IP Protocol Suite 56
Figure 11.20 Example 11.6
TCP/IP Protocol Suite 57
TCP/IP Protocol Suite 58
11-6 OSPF
The Open Shortest Path First (OSPF) protocol is an
intra-domain routing protocol based on link state
routing. Its domain is also an autonomous system.
TCP/IP Protocol Suite 59
Topics Discussed in the Section
Topics Discussed in the Section
 Area
 Metric
 Types of Links
 Graphical Representation
 OSPF Packets
 Link State Update Packet
 Other Packets
 Encapsulation
TCP/IP Protocol Suite 60
Figure 11.21 Areas in an autonomous system
TCP/IP Protocol Suite 61
Area in OSPF (1)
• A collection of networks with area ID
• Routers inside an area flood the area
with routing information
• Area border routers summarize the
information about the area and send
it to other areas
• Backbone area and backbone routers
– All of the area inside an AS must be
connected to the backbone
TCP/IP Protocol Suite 62
Area in OSPF (2)
• Virtual link
– If, because of some problem, the
connectivity between a backbone
and an area is broken, a virtual link
between routers must be created
by the administration to allow
continuity of the functions of the
backbone as the primary area
TCP/IP Protocol Suite 63
Figure 11.22 Types of links
TCP/IP Protocol Suite 64
Figure 11.23 Point-to-point link
TCP/IP Protocol Suite 65
Figure 11.24 Transient link
TCP/IP Protocol Suite 66
Figure 11.25 Stub link
TCP/IP Protocol Suite 67
Figure 11.26 Example of an AS and its graphical representation in OSPF
TCP/IP Protocol Suite 68
Figure 11.27 Types of OSPF packet
TCP/IP Protocol Suite 69
Figure 11.28 OSPF common header
TCP/IP Protocol Suite 70
Figure 11.29 Link state update packet
TCP/IP Protocol Suite 71
Figure 11.30 LSA general header
TCP/IP Protocol Suite 72
LSA General Header (1)
• Link state age
– When a router creates the message, the
value of this field is 0
– When each successive router forwards
this message, it estimates the transit
time and adds it to the cumulative value
of this field
TCP/IP Protocol Suite 73
LSA General Header (2)
• E flag
– If this flag is set to 1, it means the area
is a stub area (an area that is connected
to the backbone area by only one path
• T flag
– If this flag is set to 1, it means the
router can handle multiple types of
services
TCP/IP Protocol Suite 74
LSA General Header (3)
• Advertising router
– The IP address of the router
advertising this message
• Link state sequence number
– A sequence number assigned to each link
state update message
TCP/IP Protocol Suite 75
LS Type and LS ID
Link state type Link state ID
Router link IP address of the router
Network link IP address of the
designated router
Summary link to network Address of the network
Summary link to AS
boundary
IP address of the boundary
router
External link Address of the network
TCP/IP Protocol Suite 76
Figure 11.31 Router link
TCP/IP Protocol Suite 77
Figure 11.32 Router link LSA
TCP/IP Protocol Suite 78
TCP/IP Protocol Suite 79
Figure 11.7 shows the final routing tables for routers in Figure
11.5.
Solution
This router has three links: two of type 1 (point-to-point) and
one of type 3 (stub network). Figure 11.34 shows the router link
LSA.
Example
Example 11.7
TCP/IP Protocol Suite 80
Figure 11.33 Example 11.7
TCP/IP Protocol Suite 81
Figure 11.34 Solution to Example 11.7
TCP/IP Protocol Suite 82
Figure 11.35 Network link
TCP/IP Protocol Suite 83
Figure 11.36 Network link advertisement format
TCP/IP Protocol Suite 84
Give the network link LSA in Figure 11.37.
Solution
Solution
The network for which the network link advertises has three
routers attached. The LSA shows the mask and the router
addresses. Figure 11.38 shows the network link LSA.
Example
Example 11.8
TCP/IP Protocol Suite 85
Figure 11.37 Example 11.8
TCP/IP Protocol Suite 86
Figure 11.38 Solution to Example 11.8
TCP/IP Protocol Suite 87
In Figure 11.39, which router(s) sends out router link LSAs?
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.
Example
Example 11.9
TCP/IP Protocol Suite 88
Figure 11.39 Examples 11.9 and 11.10
TCP/IP Protocol Suite 89
In Figure 11.39, which router(s) sends out the network link
LSAs?
Solution
All three networks 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
Example
Example 11.10
TCP/IP Protocol Suite 90
Figure 11.40 Summary link to network
TCP/IP Protocol Suite 91
Figure 11.41 Summary link to network LSA
TCP/IP Protocol Suite 92
Figure 11.42 Summary link to AS boundary router
TCP/IP Protocol Suite 93
Figure 11.43 Summary link to AS boundary router LSA
TCP/IP Protocol Suite 94
Figure 11.44 External link
TCP/IP Protocol Suite 95
Figure 11.45 External link LSA
TCP/IP Protocol Suite 96
Figure 11.46 Hello packet
OSPF uses the hello message to create neighborhood
relationship and to test the reachability of neighbors.
This is the first step in link state routing. Before a router can
flood all of the other routers with information about its
neighbors, it must first greet it neighbors.
TCP/IP Protocol Suite 97
Figure 11.47 Database description packet
When a router is connected to the system for the first time or
after a failure, it needs the complete link state database
immediately. Therefore, it sends hello packets to greet its
neighbors. If this is the first time that the neighbors hear from
the router, they send a database description message.
The database description packet does not contain complete
database information; it only gives an outline, the title of each
lines in the database.
TCP/IP Protocol Suite 98
Figure 11.48 Link state request packet
TCP/IP Protocol Suite 99
Figure 11.49 Link state acknowledgment packet
TCP/IP Protocol Suite 100
OSPF packets are encapsulated in
IP datagrams.
Note
TCP/IP Protocol Suite 101
11-7 PATH VECTOR ROUTING
Distance vector and link state routing are both interior
routing protocols. They can be used inside an
autonomous system. Both of these routing protocols
become intractable when the domain of operation
becomes large. Distance vector routing is subject to
instability if there is more than a few hops in the
domain of operation. Link state routing needs a huge
amount of resources to calculate routing tables. It also
creates heavy traffic because of flooding. There is a
need for a third routing protocol which we call path
vector routing.
TCP/IP Protocol Suite 102
Topics Discussed in the Section
Topics Discussed in the Section
 Reachability
 Routing Table
TCP/IP Protocol Suite 103
The difference between the distance vector routing and path
vector routing can be compared to the difference between a
national map and an international map. A national map can tell
us the road to each city and the distance to be traveled if we
choose a particular route; an international map can tell us
which cities exist in each country and which countries should
be passed before reaching that city.
Example
Example 11.10
TCP/IP Protocol Suite 104
Figure 11.50 Reachability
WAN
WAN
TCP/IP Protocol Suite 105
Figure 11.51 Stabilized table for three autonomous system
TCP/IP Protocol Suite 106
Figure 11.52 Routing tables after aggregation
TCP/IP Protocol Suite 107
11-8 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 108
Topics Discussed in the Section
Topics Discussed in the Section
 Types of Autonomous Systems
 Path Attributes
 BGP Sessions
 External and Internal BGP
 Types of Packets
 Packet Format
 Encapsulation
TCP/IP Protocol Suite 109
Figure 11.53 Internal and external BGP sessions
A speaker node advertises the path, not the metric of
the nodes, in its AS or other ASs.
TCP/IP Protocol Suite 110
Path Vector Routing (1)
• Sharing
– A speaker in an AS shares its table with
immediate neighbors
• Updating
– Adding the nodes that are not in its
routing table and adding its own AS and
the AS that sent the table
– The routing table shows the path
completely
TCP/IP Protocol Suite 111
Path Vector Routing (2)
• Loop prevention
– A route checks to see if its AS is in the
path list to the destination
• Policy routing
– If one of the ASs listed in the path is
against its policy, it can ignore that path
and that destination
– It does not update its routing table with
the path, and it does not send this message
to its neighbors
TCP/IP Protocol Suite 112
Path Vector Routing (3)
• Optimum path
– Problem: each AS that is included in the
path may use a different criteria for
the metric
– The optimum path is the path that fits
the organization
– For Fig. 14-49, the author chose the one
that had the smaller number of ASs
– Other criteria: security, safety,
reliability, etc.
TCP/IP Protocol Suite 113
Types of AS
• Stub AS
– Only one connection to another AS (only a
source or sink for data traffic)
• Multihomed AS
– More than one connection to other AS, but
it is still only a source or sink for data
traffic
• Transit AS
– Multihomed AS that also allows transient
traffic
TCP/IP Protocol Suite 114
Figure 11.54 Types of BGP messages
TCP/IP Protocol Suite 115
Figure 11.55 BGP packet header
TCP/IP Protocol Suite 116
Figure 11.56 Open message
TCP/IP Protocol Suite 117
Figure 11.57 Update message
TCP/IP Protocol Suite 118
Path Attributes
• ORIGIN
– The source of the routing information
(RIP, OSPF, etc)
• AS_PATH
– The list of ASs through which the
destination can be reached
• NEXT-HOP
– The next router to which the data
packet should be sent
TCP/IP Protocol Suite 119
NLRI
• Network layer reachability
information
– It defines the network that is actually
advertised by this message
– Length field and IP address prefix
– BGP4 supports classless addressing and
CIDR
TCP/IP Protocol Suite 120
BGP supports classless addressing
and CIDR.
Note
TCP/IP Protocol Suite 121
Figure 11.58 Keepalive message
TCP/IP Protocol Suite 122
Figure 11.59 Notification message
TCP/IP Protocol Suite 123
TCP/IP Protocol Suite 124
BGP uses the services of TCP
on port 179.
Note

More Related Content

PPTX
Open shortest path first (ospf)
PPTX
Application layer
PPT
Ipv4 ppt
PPTX
TCP/IP Protocols
PPTX
TCP/IP 3-way Handshake
PPTX
OSPF Basics
PPTX
Spanning tree protocol
PPTX
Ch 18 intro to network layer - section 1
Open shortest path first (ospf)
Application layer
Ipv4 ppt
TCP/IP Protocols
TCP/IP 3-way Handshake
OSPF Basics
Spanning tree protocol
Ch 18 intro to network layer - section 1

What's hot (20)

PPTX
Network standardization
PPTX
TCP/IP Protocol Architeture
PDF
Transport Protocols
PPTX
Network Layer
PPT
transport protocols
PPT
Application layer protocols
PPTX
EIGRP (Enhanced Interior Gateway Routing Protocol)
PPT
OSI Network model ppt
PPT
File replication
PPT
Chapter 1 Introduction (Data Communication by Forouzan)
PPTX
OSI Model
PPTX
Arp (address resolution protocol)
PPT
Chapter 19: Logical Addressing
PPT
Ip addressing classful
PPT
Fisheye State Routing (FSR) - Protocol Overview
DOCX
OsI reference model
PPTX
Computer networking
PDF
VRRP (virtual router redundancy protocol)
PPTX
Error detection and correction
Network standardization
TCP/IP Protocol Architeture
Transport Protocols
Network Layer
transport protocols
Application layer protocols
EIGRP (Enhanced Interior Gateway Routing Protocol)
OSI Network model ppt
File replication
Chapter 1 Introduction (Data Communication by Forouzan)
OSI Model
Arp (address resolution protocol)
Chapter 19: Logical Addressing
Ip addressing classful
Fisheye State Routing (FSR) - Protocol Overview
OsI reference model
Computer networking
VRRP (virtual router redundancy protocol)
Error detection and correction
Ad

Similar to Unicast routing protocols--RIP,OSPF,BGP.ppt (20)

PPT
Rip ospf and bgp
PPT
rip, ospf 13-14
PPT
RIP Routing Information Protocol Extreme Networks
PPT
Unithhhvuuhuuhgjfjfjgjfjfjfjfnfjfjfjfjfjfjfjfjfjfj4-1.ppt
PPTX
Routing Protocols.pptx
PPT
DSR,LSR,IGMP,RIP,OSPF.ppt
PPT
User datagram protocol
PPT
Transportlayer.ppt
PPT
Chap 10 igmp
PPT
Chap 02 osi model
PDF
TCP/IP Training Basic Concepts.
PPT
Multicasting and multicast routing protocols
PPT
Multicasting and multicast routing protocols
PDF
MPLS-based Layer 3 VPNs.pdf
PPT
Chap-13.ppt
PPT
TransportLayerServices.ppt
PPT
PPTX
16 - COMS 525 TCPIP - Routing Protocols -All.pptx
PDF
Routing Protocols
Rip ospf and bgp
rip, ospf 13-14
RIP Routing Information Protocol Extreme Networks
Unithhhvuuhuuhgjfjfjgjfjfjfjfnfjfjfjfjfjfjfjfjfjfj4-1.ppt
Routing Protocols.pptx
DSR,LSR,IGMP,RIP,OSPF.ppt
User datagram protocol
Transportlayer.ppt
Chap 10 igmp
Chap 02 osi model
TCP/IP Training Basic Concepts.
Multicasting and multicast routing protocols
Multicasting and multicast routing protocols
MPLS-based Layer 3 VPNs.pdf
Chap-13.ppt
TransportLayerServices.ppt
16 - COMS 525 TCPIP - Routing Protocols -All.pptx
Routing Protocols
Ad

More from ssuser991de0 (7)

PPT
values-230227214812-5f46000000004c94.ppt
PPTX
121123024210-0000ppppppp01ppppppp01.pptx
PPTX
Values-Presentation________________.pptx
PPT
Intro-network layer-chapter-18_forouzan.ppt
PPT
Chapter 3 Data and Signals fourozan.ppt
PPT
Sec.10--Ad Hoc and Sensor Networks--Ch13.ppt
PPT
Innovative Ideas in Privacy Research.ppt
values-230227214812-5f46000000004c94.ppt
121123024210-0000ppppppp01ppppppp01.pptx
Values-Presentation________________.pptx
Intro-network layer-chapter-18_forouzan.ppt
Chapter 3 Data and Signals fourozan.ppt
Sec.10--Ad Hoc and Sensor Networks--Ch13.ppt
Innovative Ideas in Privacy Research.ppt

Recently uploaded (20)

PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
RMMM.pdf make it easy to upload and study
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PDF
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PPTX
Cell Structure & Organelles in detailed.
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
Pharma ospi slides which help in ospi learning
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
FourierSeries-QuestionsWithAnswers(Part-A).pdf
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
Microbial disease of the cardiovascular and lymphatic systems
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
RMMM.pdf make it easy to upload and study
Module 4: Burden of Disease Tutorial Slides S2 2025
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
OBE - B.A.(HON'S) IN INTERIOR ARCHITECTURE -Ar.MOHIUDDIN.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Cell Structure & Organelles in detailed.
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
Pharma ospi slides which help in ospi learning
human mycosis Human fungal infections are called human mycosis..pptx
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
FourierSeries-QuestionsWithAnswers(Part-A).pdf
Final Presentation General Medicine 03-08-2024.pptx
Final Presentation General Medicine 03-08-2024.pptx
Microbial disease of the cardiovascular and lymphatic systems
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf

Unicast routing protocols--RIP,OSPF,BGP.ppt

  • 1. TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Unicast Routing Protocols
  • 2. TCP/IP Protocol Suite 2 OBJECTIVES: OBJECTIVES:  To introduce the idea of autonomous systems (ASs) that divide the Internet into smaller administrative regions.  To discuss the idea of distance vector routing and the RIP that is used to implement the idea.  To discuss the idea of link state routing as the second intra-AS routing method and OSPF that is used to implement the idea.  To discuss the idea of path vector routing as the dominant inter- AS routing method and BGP that is used to implement the idea.
  • 3. TCP/IP Protocol Suite 3 Chapter Chapter Outline Outline 11.1 Introduction 11.1 Introduction 11.2 Intra- and Inter-Domain 11.2 Intra- and Inter-Domain Routing Routing 11.3 Distance Vector Routing 11.3 Distance Vector Routing 11.4 RIP 11.4 RIP 11.5 Link State Routing 11.5 Link State Routing 11.6 OSPF 11.6 OSPF 11.7 Path Vector Routing 11.7 Path Vector Routing 11.8 BGP 11.8 BGP
  • 4. TCP/IP Protocol Suite 4 11-1 INTRODUCTION An internet is a combination of networks connected by routers. When a datagram goes from a source to a destination, it will probably pass through many routers until it reaches the router attached to the destination network.
  • 5. TCP/IP Protocol Suite 5 Topics Discussed in the Section Topics Discussed in the Section  Cost or Metric  Static versus Dynamic Routing Table  Routing Protocol
  • 6. TCP/IP Protocol Suite 6 11-2 INTER- AND INTRA-DOMAIN ROUTING Today, an internet can be so large that one routing protocol cannot handle the task of updating the routing tables of all routers. For this reason, an internet is divided into autonomous systems. An autonomous system (AS) is a group of networks and routers under the authority of a single administration. Routing inside an autonomous system is called intra- domain routing. Routing between autonomous systems is called inter-domain routing
  • 7. TCP/IP Protocol Suite 7 Figure 11.1 Autonomous systems
  • 8. TCP/IP Protocol Suite 8 Figure 11.2 Popular routing protocols
  • 9. TCP/IP Protocol Suite 9 11-3 DISTANCE VECTOR ROUTING Today, an internet can be so large that one routing protocol cannot handle the task of updating the routing tables of all routers. For this reason, an internet is divided into autonomous systems. An autonomous system (AS) is a group of networks and routers under the authority of a single administration. Routing inside an autonomous system is called intra- domain routing. Routing between autonomous systems is called inter-domain routing 11-2
  • 10. TCP/IP Protocol Suite 10 Topics Discussed in the Section Topics Discussed in the Section  Bellman-Ford Algorithm  Distance Vector Routing Algorithm  Count to Infinity
  • 11. TCP/IP Protocol Suite 11 Figure 11.3 A graph for Bellman-Ford algorithm
  • 12. TCP/IP Protocol Suite 12 Figure 11.4 The fact behind Bellman-Ford algorithm
  • 15. TCP/IP Protocol Suite 15 Address of the sender of R
  • 17. TCP/IP Protocol Suite 17 Updating Routing Table • If the next-node entry is different – The receiving node chooses the row with the smaller cost – If there is a tie, the old one is kept • If the next-node entry is the same – i.e. the sender of the new row is the provider of the old entry – The receiving node chooses the new row, even though the new value is infinity.
  • 18. TCP/IP Protocol Suite 18 When to Share • Periodic Update – A node sends its routing table, normally 30 seconds, in a periodic update • Triggered Update – A node sends its routing table to its neighbors any time when there is a change in its routing table • 1. After updating its routing table, or • 2. Detects some failure in the neighboring links
  • 19. TCP/IP Protocol Suite 19 Figure 11.5 shows the initial routing table for an AS. Note that the figure does not mean that all routing tables have been created at the same time; each router creates its own routing table when it is booted. Example Example 11.1
  • 20. TCP/IP Protocol Suite 20 Figure 11.5 Example 11.1
  • 21. TCP/IP Protocol Suite 21 Now assume router A sends four records to its neighbors, routers B, D, and C. Figure 11.6 shows the changes in B’s routing table when it receives these records. We leave the changes in the routing tables of other neighbors as exercise. Example Example 11.2
  • 22. TCP/IP Protocol Suite 22 Figure 11.6 Example 11.2 Net4 , 1 3 Net5 , 1 4 Net2 , 1 2
  • 23. TCP/IP Protocol Suite 23 Figure 11.7 shows the final routing tables for routers in Figure 11.5. Example Example 11.3
  • 24. TCP/IP Protocol Suite 24 Figure 11.7 Example 11.3
  • 25. TCP/IP Protocol Suite 25 Figure 11.8 Two-node instability
  • 26. TCP/IP Protocol Suite 26 Two-Node Instability (1) • Defining Infinity – Most implementations define 16 as infinity • Split Horizon – Instead of flooding the table through each interface, each node sends only part of its table through each interface – E.g. node B thinks that the optimum route to reach X is via A, it does not need to advertise this piece of information to A
  • 27. TCP/IP Protocol Suite 27 Two-Node Instability (2) • Split Horizon and Poison Reverse – One drawback of Split Horizon • Normally, the DV protocol uses a timer and if there is no news about a route, the node deletes the route from its table • In the previous e.g., node A cannot guess that this is due to split horizon or because B has not received any news about X recently – Poison Reverse • Node B can still advertise the value for X, but is the source of information is A, it can replace the distance with infinity as a warning
  • 28. TCP/IP Protocol Suite 28 Figure 11.9 Three-node instability Update loop until infinity If the instability is btw three nodes, stability cannot be guaranteed
  • 29. TCP/IP Protocol Suite 29 11-4 RIP The Routing Information Protocol (RIP) is an intra- domain (interior) routing protocol used inside an autonomous system. It is a very simple protocol based on distance vector routing. RIP implements distance vector routing directly with some considerations.
  • 30. TCP/IP Protocol Suite 30 Topics Discussed in the Section Topics Discussed in the Section  RIP Message Format  Request and Response Timers in RIP  RIP Version 2  Encapsulation
  • 31. TCP/IP Protocol Suite 31 RIP messages • Request – A request message is sent by a router that has just come up or by a router that has some time-out entries – A request can ask about specific entries or all entries • Response – A response can be either solicited or unsolicited (30s or when there is a change in the routing table)
  • 32. TCP/IP Protocol Suite 32 RIP Timers • Periodic timer – It controls the advertising of regular update message (25 ~ 30 sec) • Expiration timer – It governs the validity of a route (180 sec) – The route is considered expired and the hop count of the route is set to 16 • Garbage collection timer – A invalid route is not purged from the routing table until this timer expires (120 sec)
  • 33. TCP/IP Protocol Suite 33 RIPv2 vs. RIPv1 • Classless Addressing • Authentication • Multicasting – RIPv1 uses broadcasting to send RIP messages to every neighbors. Routers as well as hosts receive the packets – RIPv2 uses the all-router multicast address to send the RIP messages only to RIP routers in the network
  • 34. TCP/IP Protocol Suite 34 Figure 11.10 Example of a domain using RIP
  • 35. TCP/IP Protocol Suite 35 Figure 11.11 RIP message format
  • 36. TCP/IP Protocol Suite 36 Figure 11.12 Request messages
  • 37. TCP/IP Protocol Suite 37 Figure 11.13 shows the update message sent from router R1 to router R2 in Figure 11.10. The message is sent out of interface 130.10.0.2. 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. Router R2 also increments each hop count by 1 because the values in the message are relative to R1, not R2. Example Example 11.4
  • 38. TCP/IP Protocol Suite 38 Figure 11.13 Solution to Example 11.4
  • 39. TCP/IP Protocol Suite 39 Figure 11.14 RIP timers
  • 40. TCP/IP Protocol Suite 40 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? Solution The 21 timers are listed below: Periodic timer: 1 Expiration timer: 20 − 5 = 15 Garbage collection timer: 5 Example Example 11.5
  • 41. TCP/IP Protocol Suite 41 Figure 11.15 RIP version 2 format
  • 42. TCP/IP Protocol Suite 42 Figure 11.16 Authentication
  • 43. TCP/IP Protocol Suite 43 RIP uses the services of UDP on well- known port 520. Note
  • 44. TCP/IP Protocol Suite 44 11-5 LINK STATE ROUTING Link state routing has a different philosophy from that of distance vector routing. In link state routing, if each node in the domain has the entire topology of the domain—the list of nodes and links, how they are connected including the type, cost (metric), and the condition of the links (up or down)—the node can use the Dijkstra algorithm to build a routing table.
  • 45. TCP/IP Protocol Suite 45 Topics Discussed in the Section Topics Discussed in the Section  Building Routing tables
  • 46. TCP/IP Protocol Suite 46 Figure 11.17 Concept of Link state routing
  • 47. TCP/IP Protocol Suite 47 Figure 11.18 Link state knowledge
  • 48. TCP/IP Protocol Suite 48 Building Routing Tables • Creation of the states of the links by each node, called the link state packets (LSP) • Dissemination of LSPs to every other routers, called flooding (efficiently) • Formation of a shortest path tree for each node • Calculation of a routing table based on the shortest path tree
  • 49. TCP/IP Protocol Suite 49 Creation of LSP • LSP data: E.g. the node ID, the list of links, a sequence number, and age. • LSP Generation – When there is a change in the topology of the domain – On a periodic basis • There is no actual need for this type of LSP, normally 60 minutes or 2 hours
  • 51. TCP/IP Protocol Suite 51 Continued
  • 52. TCP/IP Protocol Suite 52 Figure 11.19 Forming shortest path three for router A in a graph
  • 53. TCP/IP Protocol Suite 53 Figure 11.19 Continued
  • 54. TCP/IP Protocol Suite 54 Figure 11.19 Continued
  • 55. TCP/IP Protocol Suite 55 To show that the shortest path tree for each node is different, we found the shortest path tree as seen by node C (Figure 11.20). We leave the detail as an exercise. Example Example 11.6
  • 56. TCP/IP Protocol Suite 56 Figure 11.20 Example 11.6
  • 58. TCP/IP Protocol Suite 58 11-6 OSPF The Open Shortest Path First (OSPF) protocol is an intra-domain routing protocol based on link state routing. Its domain is also an autonomous system.
  • 59. TCP/IP Protocol Suite 59 Topics Discussed in the Section Topics Discussed in the Section  Area  Metric  Types of Links  Graphical Representation  OSPF Packets  Link State Update Packet  Other Packets  Encapsulation
  • 60. TCP/IP Protocol Suite 60 Figure 11.21 Areas in an autonomous system
  • 61. TCP/IP Protocol Suite 61 Area in OSPF (1) • A collection of networks with area ID • Routers inside an area flood the area with routing information • Area border routers summarize the information about the area and send it to other areas • Backbone area and backbone routers – All of the area inside an AS must be connected to the backbone
  • 62. TCP/IP Protocol Suite 62 Area in OSPF (2) • Virtual link – If, because of some problem, the connectivity between a backbone and an area is broken, a virtual link between routers must be created by the administration to allow continuity of the functions of the backbone as the primary area
  • 63. TCP/IP Protocol Suite 63 Figure 11.22 Types of links
  • 64. TCP/IP Protocol Suite 64 Figure 11.23 Point-to-point link
  • 65. TCP/IP Protocol Suite 65 Figure 11.24 Transient link
  • 66. TCP/IP Protocol Suite 66 Figure 11.25 Stub link
  • 67. TCP/IP Protocol Suite 67 Figure 11.26 Example of an AS and its graphical representation in OSPF
  • 68. TCP/IP Protocol Suite 68 Figure 11.27 Types of OSPF packet
  • 69. TCP/IP Protocol Suite 69 Figure 11.28 OSPF common header
  • 70. TCP/IP Protocol Suite 70 Figure 11.29 Link state update packet
  • 71. TCP/IP Protocol Suite 71 Figure 11.30 LSA general header
  • 72. TCP/IP Protocol Suite 72 LSA General Header (1) • Link state age – When a router creates the message, the value of this field is 0 – When each successive router forwards this message, it estimates the transit time and adds it to the cumulative value of this field
  • 73. TCP/IP Protocol Suite 73 LSA General Header (2) • E flag – If this flag is set to 1, it means the area is a stub area (an area that is connected to the backbone area by only one path • T flag – If this flag is set to 1, it means the router can handle multiple types of services
  • 74. TCP/IP Protocol Suite 74 LSA General Header (3) • Advertising router – The IP address of the router advertising this message • Link state sequence number – A sequence number assigned to each link state update message
  • 75. TCP/IP Protocol Suite 75 LS Type and LS ID Link state type Link state ID Router link IP address of the router Network link IP address of the designated router Summary link to network Address of the network Summary link to AS boundary IP address of the boundary router External link Address of the network
  • 76. TCP/IP Protocol Suite 76 Figure 11.31 Router link
  • 77. TCP/IP Protocol Suite 77 Figure 11.32 Router link LSA
  • 79. TCP/IP Protocol Suite 79 Figure 11.7 shows the final routing tables for routers in Figure 11.5. Solution This router has three links: two of type 1 (point-to-point) and one of type 3 (stub network). Figure 11.34 shows the router link LSA. Example Example 11.7
  • 80. TCP/IP Protocol Suite 80 Figure 11.33 Example 11.7
  • 81. TCP/IP Protocol Suite 81 Figure 11.34 Solution to Example 11.7
  • 82. TCP/IP Protocol Suite 82 Figure 11.35 Network link
  • 83. TCP/IP Protocol Suite 83 Figure 11.36 Network link advertisement format
  • 84. TCP/IP Protocol Suite 84 Give the network link LSA in Figure 11.37. Solution Solution The network for which the network link advertises has three routers attached. The LSA shows the mask and the router addresses. Figure 11.38 shows the network link LSA. Example Example 11.8
  • 85. TCP/IP Protocol Suite 85 Figure 11.37 Example 11.8
  • 86. TCP/IP Protocol Suite 86 Figure 11.38 Solution to Example 11.8
  • 87. TCP/IP Protocol Suite 87 In Figure 11.39, which router(s) sends out router link LSAs? 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. Example Example 11.9
  • 88. TCP/IP Protocol Suite 88 Figure 11.39 Examples 11.9 and 11.10
  • 89. TCP/IP Protocol Suite 89 In Figure 11.39, which router(s) sends out the network link LSAs? Solution All three networks 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 Example Example 11.10
  • 90. TCP/IP Protocol Suite 90 Figure 11.40 Summary link to network
  • 91. TCP/IP Protocol Suite 91 Figure 11.41 Summary link to network LSA
  • 92. TCP/IP Protocol Suite 92 Figure 11.42 Summary link to AS boundary router
  • 93. TCP/IP Protocol Suite 93 Figure 11.43 Summary link to AS boundary router LSA
  • 94. TCP/IP Protocol Suite 94 Figure 11.44 External link
  • 95. TCP/IP Protocol Suite 95 Figure 11.45 External link LSA
  • 96. TCP/IP Protocol Suite 96 Figure 11.46 Hello packet OSPF uses the hello message to create neighborhood relationship and to test the reachability of neighbors. This is the first step in link state routing. Before a router can flood all of the other routers with information about its neighbors, it must first greet it neighbors.
  • 97. TCP/IP Protocol Suite 97 Figure 11.47 Database description packet When a router is connected to the system for the first time or after a failure, it needs the complete link state database immediately. Therefore, it sends hello packets to greet its neighbors. If this is the first time that the neighbors hear from the router, they send a database description message. The database description packet does not contain complete database information; it only gives an outline, the title of each lines in the database.
  • 98. TCP/IP Protocol Suite 98 Figure 11.48 Link state request packet
  • 99. TCP/IP Protocol Suite 99 Figure 11.49 Link state acknowledgment packet
  • 100. TCP/IP Protocol Suite 100 OSPF packets are encapsulated in IP datagrams. Note
  • 101. TCP/IP Protocol Suite 101 11-7 PATH VECTOR ROUTING Distance vector and link state routing are both interior routing protocols. They can be used inside an autonomous system. Both of these routing protocols become intractable when the domain of operation becomes large. Distance vector routing is subject to instability if there is more than a few hops in the domain of operation. Link state routing needs a huge amount of resources to calculate routing tables. It also creates heavy traffic because of flooding. There is a need for a third routing protocol which we call path vector routing.
  • 102. TCP/IP Protocol Suite 102 Topics Discussed in the Section Topics Discussed in the Section  Reachability  Routing Table
  • 103. TCP/IP Protocol Suite 103 The difference between the distance vector routing and path vector routing can be compared to the difference between a national map and an international map. A national map can tell us the road to each city and the distance to be traveled if we choose a particular route; an international map can tell us which cities exist in each country and which countries should be passed before reaching that city. Example Example 11.10
  • 104. TCP/IP Protocol Suite 104 Figure 11.50 Reachability WAN WAN
  • 105. TCP/IP Protocol Suite 105 Figure 11.51 Stabilized table for three autonomous system
  • 106. TCP/IP Protocol Suite 106 Figure 11.52 Routing tables after aggregation
  • 107. TCP/IP Protocol Suite 107 11-8 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.
  • 108. TCP/IP Protocol Suite 108 Topics Discussed in the Section Topics Discussed in the Section  Types of Autonomous Systems  Path Attributes  BGP Sessions  External and Internal BGP  Types of Packets  Packet Format  Encapsulation
  • 109. TCP/IP Protocol Suite 109 Figure 11.53 Internal and external BGP sessions A speaker node advertises the path, not the metric of the nodes, in its AS or other ASs.
  • 110. TCP/IP Protocol Suite 110 Path Vector Routing (1) • Sharing – A speaker in an AS shares its table with immediate neighbors • Updating – Adding the nodes that are not in its routing table and adding its own AS and the AS that sent the table – The routing table shows the path completely
  • 111. TCP/IP Protocol Suite 111 Path Vector Routing (2) • Loop prevention – A route checks to see if its AS is in the path list to the destination • Policy routing – If one of the ASs listed in the path is against its policy, it can ignore that path and that destination – It does not update its routing table with the path, and it does not send this message to its neighbors
  • 112. TCP/IP Protocol Suite 112 Path Vector Routing (3) • Optimum path – Problem: each AS that is included in the path may use a different criteria for the metric – The optimum path is the path that fits the organization – For Fig. 14-49, the author chose the one that had the smaller number of ASs – Other criteria: security, safety, reliability, etc.
  • 113. TCP/IP Protocol Suite 113 Types of AS • Stub AS – Only one connection to another AS (only a source or sink for data traffic) • Multihomed AS – More than one connection to other AS, but it is still only a source or sink for data traffic • Transit AS – Multihomed AS that also allows transient traffic
  • 114. TCP/IP Protocol Suite 114 Figure 11.54 Types of BGP messages
  • 115. TCP/IP Protocol Suite 115 Figure 11.55 BGP packet header
  • 116. TCP/IP Protocol Suite 116 Figure 11.56 Open message
  • 117. TCP/IP Protocol Suite 117 Figure 11.57 Update message
  • 118. TCP/IP Protocol Suite 118 Path Attributes • ORIGIN – The source of the routing information (RIP, OSPF, etc) • AS_PATH – The list of ASs through which the destination can be reached • NEXT-HOP – The next router to which the data packet should be sent
  • 119. TCP/IP Protocol Suite 119 NLRI • Network layer reachability information – It defines the network that is actually advertised by this message – Length field and IP address prefix – BGP4 supports classless addressing and CIDR
  • 120. TCP/IP Protocol Suite 120 BGP supports classless addressing and CIDR. Note
  • 121. TCP/IP Protocol Suite 121 Figure 11.58 Keepalive message
  • 122. TCP/IP Protocol Suite 122 Figure 11.59 Notification message
  • 124. TCP/IP Protocol Suite 124 BGP uses the services of TCP on port 179. Note