Routing Protocols - PowerPoint PPT Presentation

1 / 82
About This Presentation
Title:

Routing Protocols

Description:

Graph abstraction for routing algorithms: graph nodes are routers ... each node notifies neighbors only when its least cost path to any destination changes ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 83
Provided by: mnil
Category:

less

Transcript and Presenter's Notes

Title: Routing Protocols


1
Routing Protocols
  • RIP, IS-IS, OSPF, RIP and BGP

Prof. Gao ECE697A Fall 2003 Advanced Computer
Networks
2
Outline
  • Internet Structure
  • Router, Hosts
  • Autonomous System (AS)
  • Intra-Domain Routing
  • RIP, IS-IS, OSPF
  • Inter-Domain Routing
  • BGP

3
Routing
Goal determine good path (sequence of routers)
thru network from source to dest.
  • Graph abstraction for routing algorithms
  • graph nodes are routers
  • graph edges are physical links
  • link cost delay, cost, or congestion level
  • good path
  • typically means minimum cost path
  • other defs possible

4
Route Construction
  • Static
  • Listed Manually change route slowly
  • not robust reachability is independent of
    network condition
  • stable
  • Dynamic
  • Learn route via routing protocols
  • React to topology, traffic or configuration
    changes directly
  • Might not converge or oscillate
  • Might have loop

5
Routing Protocols
  • Goal
  • Determine path or route
  • Packet switching networks determine routing
    table
  • Routing Table
  • Used for forwarding each packet
  • Scalable, adaptive, stable

6
Dynamic Routing Algorithms
  • Global or Link state algorithm
  • Use global knowledge about topology and cost
  • Decentralized or Distance Vector algorithm
  • Use only knowledge of attached links and
    neighbors
  • Iterative algorithm

7
Global or Link State Algorithm
  • Dijkstras shortest path algorithm
  • Implementation
  • Each node broadcast its connectivity and link
    costs to all nodes

8
A Link-State Routing Algorithm
  • Dijkstras algorithm
  • net topology, link costs known to all nodes
  • accomplished via link state broadcast
  • all nodes have same info
  • computes least cost paths from one node
    (source) to all other nodes
  • gives routing table for that node
  • iterative after k iterations, know least cost
    path to k dest.s
  • Notation
  • c(i,j) link cost from node i to j. cost infinite
    if not direct neighbors
  • D(v) current value of cost of path from source
    to dest. V
  • p(v) predecessor node along path from source to
    v, that is next v
  • N set of nodes whose least cost path
    definitively known

9
(link state) Dijkstras algorithm example
D(B),p(B) 2,A 2,A 2,A
D(D),p(D) 1,A
Step 0 1 2 3 4 5
D(C),p(C) 5,A 4,D 3,E 3,E
D(E),p(E) infinity 2,D
start N A AD ADE ADEB ADEBC ADEBCF
D(F),p(F) infinity infinity 4,E 4,E 4,E
10
Link State Algorithm Issues
  • Scalability
  • Link cost is traffic carried can cause route
    oscillation

1
1e
0
2e
0
0
0
0
e
0
1
1e
1
1
recompute
recompute
e
recompute
initially
11
Decentralized or Distance Vector Algorithm
  • each node communicates only with
    directly-attached neighbors
  • compute shortest path
  • continues until no nodes exchange information
  • nodes need not exchange info/iterate in lock
    step!

12
Distance Vector Routing overview
Each node
  • Iterative, asynchronous each local iteration
    caused by
  • local link cost change
  • message from neighbor its least cost path change
    from neighbor
  • Distributed
  • each node notifies neighbors only when its least
    cost path to any destination changes
  • neighbors then notify their neighbors if necessary

13
Distance Vector Routing Algorithm
  • Distance Table data structure
  • each node has its own
  • row for each possible destination
  • column for each directly-attached neighbor to
    node
  • example in node X, for dest. Y via neighbor Z
  • iterative
  • continues until no nodes exchange info.
  • self-terminating no signal to stop
  • asynchronous
  • nodes need not exchange info/iterate in lock
    step!
  • distributed
  • each node communicates only with
    directly-attached neighbors

14
Distance Table example
loop!
loop!
15
Distance table gives routing table
Outgoing link to use, cost
A B C D
A,1 D,5 D,4 D,4
destination
Routing table
Distance table
16
Distance Vector Algorithm Issues
  • Robustness
  • node can advertise incorrect path cost
  • each nodes table used by others
  • error propagate thru network
  • may have routing loops
  • Convergence Times
  • count-to-infinity problem

17
Routing in the Internet
  • So far
  • all routers identical
  • network flat
  • not true in practice
  • administrative autonomy
  • internet network of networks
  • each network admin may want to control routing in
    its own network
  • scale with 50 million destinations
  • cant store all dests in routing tables!
  • routing table exchange would swamp links!

18
Internet Structure
  • Thousands of Organizations
  • Many many Routers
  • Lots of Hosts

MCI
AT T
LINX Europe
CW
Microsoft
Company in France
Umass
19
Routing Protocols
  • Divide into Autonomous Systems
  • According to administrative domains
  • Internet Service Providers (ISP)
  • Cooperate networks
  • College campuses
  • Two kinds of routing protocols
  • Intra-Domain Routing (IGP)
  • Within one domain
  • Inter-Domain Routing (EGP)
  • Among different domains

20
Intra-Domain Routing
  • Goal
  • Find a good path (sequence of routers) through
    network from source to destination
  • Delay, loss, bandwidth, cost or other
    definitions
  • Static routing
  • Popular dynamic routing protocols
  • RIP Routing Information Protocol
  • IS-IS Intermediate-System-to-Intermediate System
  • OSPF Open Shortest Path First
  • IGRP Interior Gateway Routing Protocol (Cisco
    proprietary)

21
Inter-AS Routing Protocols
  • Use EGP in NSFNET
  • Border Gateway Protocol (BGP)
  • BGP-4 de facto standard
  • Path Vector Algorithm

22
Intra-AS Routing
  • Routing Information Protocol (RIP)
  • Distance Vector Algorithm
  • Open Shortest Path First (OSPF)
  • Link State Algorithm
  • IS-IS
  • Link State Algorithm

23
Border Gateway Protocol (BGP)
  • Exchange reachability information
  • Apply local policies for announcing and
    selecting route
  • Avoid Route Loops
  • Incremental Update
  • Use TCP

AS701
(1), (7018,1)
MCI
AS7018
AS1
(1), (701, 1)
d
ATT
BBN
24
OSPF
  • Hierarchy
  • Divided into Areas
  • Load balancing
  • Multiple same-cost paths
  • Security
  • Authenticate update messeges

25
Where do link costs and routing policies come
from?
  • Someones head
  • Manually entered
  • Router Configuration
  • Cause failure

26
Routing Protocol Issues
  • Stability
  • Policy Effect
  • Congestion Effect
  • Protocol Design Effect
  • Keep Alive Message
  • Redundant Incremental Update message
  • ?
  • Reliability or Robustness
  • Alternate or Backup route
  • Congestion Effect
  • Human Error

27
More Issues
  • Convergence Speed
  • Security
  • Scalability
  • Hierarchy
  • Traffic Engineering
  • Load Balancing
  • Qos
  • ?

28
RIP
  • Distance vector algorithm
  • Included in BSD-UNIX Distribution in 1982
  • Distance metric
  • of hops (max 15 hops)
  • Distance vectors
  • exchanged among neighbors every 30 sec via
    Response Message (also called advertisement)
  • Each advertisement
  • list of up to 25 destination nets within AS

29
RIP --- Example
z
w
x
y
A
D
B
C
Destination Network Next Router Num. of
hops to dest. w A 2 y B 2
z B 7 x -- 1 . . ....
Routing table in D
30
RIP --- Example
Advertisement from A to D
Dest Next hops z C 4
Destination Network Next Router Num. of
hops to dest. w A 2 y B 2 z B
A 7 5 x -- 1 . . ....
Routing table in D
31
RIP --- Problems
  • Robustness
  • Node can advertise incorrect path cost
  • Each nodes table used by others
  • Error propagate thru network
  • Slow convergence
  • Count-to-infinity problem
  • Part of the network becomes isolated
  • Routing loops are created

32
RIP --- Solutions
  • Set infinity to be a finite number
  • RIP uses 16
  • Use split horizon
  • Dont advertise to X a route to Y if you go
    through X to get to Y
  • Avoid loops
  • Use triggered updates
  • Send updates immediately for fast convergence

33
OSPF
  • Link state routing
  • Each router keeps a complete map of the network
  • Rather than just how to get to each of the other
    routers
  • All routers should have exactly the same map.
  • Routing updates are flooded to all nodes
  • Compute shortest paths between any two points
  • Dijkstras shortest path algorithm
  • Fast convergence when the network topology changes

34
OSPF --- new feature
  • Security
  • all OSPF messages authenticated
  • Multiple same-cost paths allowed
  • only one path in RIP
  • Multiple cost metrics for different TOS for each
    link
  • satellite link cost low for best effort,
    high for real time
  • Integrated uni- and multicast support
  • Hierarchical OSPF in large domains
  • Backbone area and stub areas

35
OSPF --- Message Types
  • HELLO Type 1
  • Identify neighbors
  • Elect a designated route for a multi-access
    network
  • To find out about an existing designated router
  • I am alive signal

36
OSPF --- Message Type
  • Database Description Type 2
  • Exchange information during initialization
  • So that a router can find out what data is
    missing from its topology database
  • Link State Request Type 3
  • Ask for data that a router has discovered is
    missing from its topology databases or to replace
    data that is out of date

37
OSPF --- Message Type
  • Link State Update Type 4
  • Used to reply to a link state request and also to
    dynamically report changes in network topology
  • Link State ACK Type 5
  • Used to confirm receipt of a link state update
  • Sender retransmit until an update is ACKed

38
OSPF --- Overview
Route Processor (CPU)
LSA Processing
OSPF Process
Topology View
LSA Flooding
SPF Calculation
FIB Update
FIB
Forwarding
Forwarding
Switching Fabric
Interface card
Interface card
39
OSPF --- Benefit
  • Link State Algorithm is better than Distance
    vector algorithm
  • Fast convergence
  • Speed is proportional to number of nodes in the
    network
  • Loopless convergence
  • After flooding all routes are stable, no count to
    infinity
  • Support of multiple metrics
  • Throughput, delay, loss, cost, policy, security
  • But all routers should use the same metric,
    otherwise loops may occur
  • Support for multiple equivalent paths
  • In theory, but not so easy in practice

40
OSPF --- Problems
  • Scalability
  • Link cost is traffic carried can cause route
    oscillation

1
1e
0
2e
0
0
0
0
e
0
1
1e
1
1
e
recompute
recompute
recompute
initially
41
OSPF --- Issues
  • Relies on the distributed routing tables to be
    accurate
  • Hackers can still spoof bogus route updates
  • Load balancing between equal metric paths is
    difficult
  • Flooding traffic
  • Complexity
  • Five Messages
  • Hello, exchange, request, flood update and flood
    ack
  • Three algorithms (Dijkstra, flooding, exchange)
  • A lot of code

42
Inter-Domain Routing
  • Border Gateway Routing (BGP)
  • Introduction
  • BGP in general
  • BGP attributes
  • Scalability of BGP
  • Summary

43
BGP-Border Gateway Protocol
  • Inter-domain routing (EGP)
  • Distance Vector (Path Vector)
  • AS level
  • Build on the top of TCP (port 179)
  • Policy based
  • Defined in RFC 1771

44
How Does BGP Work?
  • Between Two BGP Routers
  • BGP peers/neighbors
  • Establish one TCP connection
  • BGP session
  • BGP Routing information is exchanged
  • prefix/AS path/etc.

45
eBGP and iBGP
  • eBGP
  • BGP running between two different ASs
  • iBGP
  • BGP running within the same AS
  • An AS has multiple BGP speakers and provides
    transit service
  • Distribute routing info among BGP routers
  • minor but important difference with eBGP

46
Why do we need iBGP?
  • Some IGP protocols in intra-domain
  • RIP, OSPF
  • No concept of AS
  • Only exchange the routes of intra-domain network
  • BGP routers in same domain need to exchange the
    routes learned from the BGP routers of neighbor
    domains
  • iBGP is needed
  • iBGP must be full-mesh

47
Complete BGP illustration
eBGP
AS100
AS300
iBGP
AS200
48
BGP Messages
  • Open
  • Update
  • Notification
  • Keepalive
  • TCP connection always established throughout the
    BGP session

49
Open Messages
  • The first message sent after TCP established
  • Each peer identify itself to each other
  • Negotiate protocol version/parameters
  • Security (optional)

50
Open Message Format
Version (1 octet)
My Autonomous System (2 octet)
Hold Time (2 octet)
BGP identifier (4 octet)
Optional Parameter Length (1 octet)
Optional parameters (variable length)
51
Update Message
  • Primary message used in a BGP
  • advertises(announce) a prefix to BGP
    neighbors/withdraw a previously advertised
    message
  • Encourage multiple prefixes in a single Update

52
Notification Message
  • Used when error(s) happen(s)
  • TCP will be closed immediately after notification
    is sent
  • Indicates the remote system why BGP was
    terminated

53
Keepalive Message
  • Confirm the connection is still active
  • rate depend on the hold timer negotiated by open
    message and update message frequency
  • A common header with no other data

54
BGP Routing Tables
  • Status codes s suppressed, d damped, h history,
    valid, gt best, i - internal, S Stale
  • Origin codes i - IGP, e - EGP, ? - incomplete
  • Network Next Hop Metric
    LocPrf Weight Path
  • 3.0.0.0 12.123.1.234
    0 7018 80 i
  • 12.123.45.252
    0 7018 80 i
  • 12.123.199.239
    0 7018 80 i
  • 12.123.145.124
    0 7018 80 i
  • gt 12.123.1.236
    0 7018 80 i
  • 12.123.133.124
    0 7018 80 i
  • 4.0.0.0 12.123.45.252
    0 7018 1 i
  • 12.123.9.241
    0 7018 1 i
  • 12.123.13.241
    0 7018 1 i
  • gt 12.123.5.240
    0 7018 1 i
  • 12.123.142.124
    0 7018 1 i

55
BGP attributes
  • AS-path attribute
  • Origin attribute
  • BGP Nexthop attribute
  • Weight Attribute
  • Local preference attribute
  • Metric attribute
  • Community attribute

56
AS-Path Attribute
  • A list of AS numbers that a route has traversed
    in order to reach a destination
  • Whenever a route update pass through a new AS,
    the AS number is prepended
  • AS numbers are listed in order
  • If the AS number is already in the update, the
    route is dropped.

57
AS-PATH Attribute Example
170.10.0.0
AS200
AS100
RtA
RtC
RtD
RtA advertise 170.10.0.0 to RtC, AS-PATH
100 RtB advertise 170.10.0.0 to RtC, AS-PATH
300, 100 RtC advertise 170.10.0.0 to
RtD, AS-PATH 300, 100
RtB
AS300
58
Origin Attribute
  • Mandatory attribute
  • Defines the origin of the path information
  • three typical values
  • i IGP, interior to the originating AS
  • e EGP, learnt via exterior gateway protocol
  • ? incomplete, unknown or via others

59
Origin Attribute Example
ip route 190.10.0.0 255.255.0.0 null 0
190.10.50.1
RtA
RtB
150.10.30.1
175.10.40.2
170.10.20.1
AS100
iBGP
170.10.20.2
RtA -gt 170.10.0.0 300 i RtA -gt 190.10.50.0
i RtE -gt 150.10.0.0 100 i RtE -gt 190.10.0.0 100
?
RtE
AS300
170.10.0.0
60
Nexthop Attribute
  • The next hop IP address that is to use to reach
    destination
  • For eBGP, always the directly connected
    neighbors interface
  • For iBGP, the nexthop advertised by eBGP should
    be carried through into iBGP

61
Nexthop Attribute Example
150.10. 0.0
190.10.50.1
RtA
RtB
150.10.30.1
175.10.40.2
170.10.20.1
iBGP
AS100
170.10.20.2
RtC advertise 170.10.0.0 to RtA, Nexthop
170.10.20.2 RtA advertise 170.10.0.0 to
RtB, Nexthop 170.10.20.2
RtC
AS300
170.10.0.0
62
Synchronizaton
  • In a transit AS, BGP should not advertise a route
    before all routers in the AS learned about the
    route via IGP
  • BGP should wait until all the routes are
    propagated

63
Synchronization Example
150.10. 0.0
190.10.50.1
RtA
RtB
150.10.30.1
175.10.40.2
170.10.20.1
iBGP
AS100
170.10.20.2
RtD
RtC
AS300
AS400
170.10.0.0
64
Weight Attribute
  • Cisco implementation
  • Assigned locally to indicate a router to choose
    best exit path
  • Does not propagate through router updates
  • Higher weight is preferred
  • Default is 0

65
Weight Attribute Example
175.10.0.0
190.10.0.0
AS4
170.10.0.0
AS100
AS200
RtD
RtA
175.10.0.0
175.10.0.0
W200
W100
RtA will be chosen
RtC
AS300
66
Local Preference Attribute
  • Indicate the AS about which exit is preferred
  • Exchanged among routers in the same AS through
    updates
  • Higher value is preferred
  • Default value is 100

67
Local Preference Example
175.10.0.0
AS4
190.10.0.0
170.10.0.0
AS100
AS200
RtB
RtA
175.10.0.0
Set locPref200
Set locPref150
All traffic in AS 300 will be directed to RtD
RtD
AS300
RtC
68
Metric Attribute
  • Also called Multi_exit_discriminator
  • Exchanged between AS, but not carried through
  • Low value of a metric is more preferred
  • Default value is 0
  • Unless specified, router only compare metrics for
    paths from the same neighbor AS

69
Metric Attribute Example
Set Metric 0
AS400
AS100
RtB
RtA
Set Metric 200
RtA will pick RtC as the best route
Set Metric 120
RtC
RtD
AS300
70
Community Attribute
  • Optional attribute
  • Transitive between ASs
  • A label/string that attach to the prefixes
  • Aggregate prefixes into groups
  • So as to apply routing decisions

71
BGP policies
Decide exactly ONE best path
BGP router
Decision Process
Export policy
Import policy
Receive routes for prefixes from multiple
neighbors
Filter out unwanted routes, and manipulate the
attributes of remaining routes
Manipulate attributes of the best route,
influence neighbor's choice, or decide whether to
advertise the route to neighbors
72
Best Path Selection
  • Decision Process
  • Highest local preference
  • Shortest AS path
  • eBGP over iBGP
  • Lowest IGP metric
  • Lowest router id

73
Problems Of BGP
  • Convergence issue
  • Scalability issue
  • etc.

74
Convergence Issue
  • An Analysis of BGP Convergence Properties
  • http//citeseer.nj.nec.com/333036.html
  • Route flap dampenning
  • Suppresses the advertisements of routes close to
    the source until the routes become stable

75
Scalability of BGP
  • eBGP
  • CIDR and aggregate addresses
  • iBGP
  • BGP confederation
  • Router Reflection

76
CIDR Example
160.20.0.0
160.10.0.0
AS200
AS100
AS400
160.0.0.0/8
AS300
77
BGP Confederation
  • Divide an AS into multiple ASs and assign the
    whole group a single confederation
  • Each smaller AS have iBGP fully meshed
  • Connect to other smaller ASs with eBGP
  • but acts as iBGP (nexthop, metric and local
    preference are preserved)
  • Look like a single AS to the outsider

78
BGP Confederation Example
AS100
AS200
AS50
AS60
AS70
AS500
79
Route Reflectors
  • Relax the restriction that iBGP routers dont
    forward routing updates
  • Designate one iBGP router as the route reflector
    (RR), neighbors as RR clients
  • full mesh among neighbors are not necessary
  • RRs are fully meshed, also with other iBGP
    routers

80
RR Example
AS100
AS200
81
The Internet Looks Like?
82
Network Backbone Example
3,800 PoPs 4 continents 2 Million Modem Ports
Write a Comment
User Comments (0)
About PowerShow.com