View
33
Download
5
Category
Preview:
Citation preview
Unicast Routing Protocols
(RIP, OSPF, and BGP)
Chapter 11
2
Routing Protocol is combination of rules and
procedures lets routers in internet inform each
other of route changes
Autonomous System (AS) is group of networks
and routers under authority of single administration
Intradomain routing is routing inside AS
Handled by interior routing protocol
Interdomain routing is routing between AS’s
Handled by exterior routing protocol
Routing Protocols
3
Autonomous Systems
4
Routing Protocols
5
Distance Vector Routing
Uses Bellman-Ford algorithm for creating
routing table for routers in AS
Each node shares its routing table with its
immediate neighbors periodically and when
there is a change
6
Bellman-Ford Algorithm
7
Distance Vector Routing
8
Distance Vector Routing
Net4 , 1
3
Net5 , 1
4
Net2 , 1
2
9
Count to Infinity -- Two-Node Instability
10
Defining Infinity
Define 16 as infinity
Split Horizon
If node B reaches X via A, then B does not need
to advertise to A its (B's) distance to X
Split Horizon and Poison Reverse
If node B reaches X via A, then B will advertise
to A that its (B's) distance to X is infinity
Solutions to Instability
11
Three-Node Instability
12
Intradomain routing protocol
Based on distance vector routing
Uses hop count as metric (cost)
Infinite distance defined as 16 hops
Routing Information Protocol (RIP)
13
Example of a domain using RIP
14
RIP Message Format
Command: Request (1), Response (2)
Version: 1
Family: TCP/IP (2)
Request Message
Response (Update) Message
Solicited response: sent only in answer to request
Unsolicited response: sent periodically (every 30 sec)
15
Requests and Responses
16
Update Message – Example
Update message
from R1 to R2:
17
RIP Timers
Periodic timer: How frequent to send update message
Expiration timer: How long to wait for update message
Garbage collection timer: How long to wait before purging route from table
18
RIP Version 2
Route tag: AS number
Uses all-router multicast address to send RIP messages
Supports classless addressing
Message Format
19
RIP Version 2
Supports authentication
20
RIP messages encapsulated in UDP
datagrams
UDP uses well-known port (520) for RIP
Encapsulation
IP
header
UDP
header RIP message
20 bytes 8bytes
UDP datagram
IP datagram
21
Link State Routing
Each node advertises its links state to all other
nodes (flooding)
Link state packet (LSP) carries node identity,
list of links, sequence number, and age
Each node uses same topology to create its
routing table
Each node constructs its routing table using
Dijkstra algorithm
22
Link State Routing
23
Dijkstra Algorithm: Forming Shortest Path Tree
24
Open Shortest Path First (OSPF) Protocol
Intradomain routing protocol
Based on link state routing
Metric can be based on type of service (min delay,
max throughput, …)
Divides autonomous system into areas
25
Types of Links
26
Types of Links
27
Virtual Link
When link between two routers is broken, virtual link
created using path probably goes through several routers
28
Types of OSPF Packet
29
OSPF Common Header
Type: Defines the packet type (1 to 5)
Checksum: On entire packet excluding authentication
Authentication: None (0), Password (1)
64
(Router ID)
30
Link State Update Packet
Used by router to advertise its links states
Each packet contains several different LSAs
(LSA)
31
Link State Update Packet
# of LSAs
32
LSA General Header
Link State Type Link State ID
Type 1: Router link Address of router
Type 2: Network link Address of designated router
Type 3: Summary link to network Address of network
Type 4: Summary link to AS boundary router Address of AS boundary router
Type 5: External link Address of external network
33
Router Link LSA
Announce all router links
34
Router Link LSA
35
Router Link LSA Example
36
Router Link LSA Example
37
Network Link LSA
Announce network and all routers connected to it
Distributed by designated router on behalf of
transient network
38
Network Link LSA
39
Network Link LSA Example
0
40
Network Link LSA Example
Router-link LSA
R1 has two links (N1, N2)
R2 has one link (N2)
R3 has two links (N2, N3)
Network-link LSA
N1 advertised by R1
N2 advertised by designated
router (R1, R2, or R3)
N3 advertised by R3
41
Summary Link to Network LSA
Announce networks outside the area
Flooded by area boarder router
42
Summary Link to Network LSA
43
Summary Link to AS Boundary Router LSA
Announce AS boundary router
Flooded by area boarder router
44
Summary Link to AS Boundary Router LSA
45
External Link LSA
Announce networks outside AS
Flooded by AS boundary router
46
External Link LSA
47
Hello Packet
To create neighborhood relationships
To test reachability of neighbors
Determine the selection of designated router
48
Database Description Packet
Sent by neighbors to new connected router
Contains outline (LSA header) of each link in
link-state database
49
Link State Request Packet
Sent by router needs information about specific link
Can be used by newly connected router to request
more information after receiving database
description packet
50
Link State Acknowledgment Packet
To acknowledge receipt of every link state update
packet
51
OSPF packets encapsulated in IP datagrams
Encapsulation
IP
header OSPF packet
20 bytes
IP datagram
52
Path Vector Routing
Exterior routing protocol for inter-domain or inter-AS routing
Router has list of networks can be reached
with path (list of ASs to pass)
Prevents looping using path information
Allows routing based on router policy
Optimum path is one that fits organization
needs (security, safety, reliability, …)
53
Reachability
54
Routing Tables
55
Routing Tables After Aggregation
14 14 14
56
Loop Prevention
57
Border Gateway Protocol (BGP)
Interdomain routing protocol
Uses path vector routing
Supports classless addressing (CIDR)
Path is presented as list of attributes
58
Path Attributes
AS_PATH
Defines list of ASs to reach destination
NEXT-HOP
Defines next router to which packet sent
ORIGIN
Defines source of routing information (IGP: interior,
EGP: exterior)
59
BGP Sessions
External BGP (E-BGP) session Exchange information between BGP routers
in different ASs
Internal BGP (I-BGP) session Exchange information between BGP routers
inside AS
60
Types of BGP Messages
61
BGP Packet Header
Marker: reserved for authentication
62
Open Message
To create neighborhood relationship
Neighbor responds with keepalive message
Hold time: waiting time until receiving keepalive or update message
BGP identifier: defines sending router (its IP address)
63
Update Message
To withdraw destinations advertised previously
To announce route to new destination
64
Network layer reachability information
Network to be advertised
(Length, Prefix) tuple Length: number of bits in prefix
Prefix: common part of network address
Example: IP address 153.18.7.0/24
Length: 24 Prefix: 153.18.7
Withdrawn routes
Destinations to be deleted from previously advertised list
(Length, Prefix) tuple
Update Message
65
Keepalive Message
Exchanged between peers regularly before hold
time expires
66
Notification Message
Sent by router whenever error detected or to close
connection
Error Code: Message header error (1), Open message error (2),
Update message error (3), Hold time expired (4).
67
BGP messages encapsulated in TCP segments
TCP uses well-known port (179) for BGP
Encapsulation
Recommended