Routing Protocols - PowerPoint PPT Presentation

1 / 86
About This Presentation
Title:

Routing Protocols

Description:

Graph abstraction for routing algorithms: graph nodes are routers ... Link State Algorithm Issues. Scalability ... Decentralized or Distance Vector Algorithm ... – PowerPoint PPT presentation

Number of Views:96
Avg rating:3.0/5.0
Slides: 87
Provided by: mnil
Category:

less

Transcript and Presenter's Notes

Title: Routing Protocols


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

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

3
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

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

5
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

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
Step 0 1 2 3 4 5
D(B),p(B) 2,A 2,A 2,A
D(C),p(C) 5,A 4,D 3,E 3,E
D(D),p(D) 1,A
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
e
recompute
recompute
recompute
initially
11
Decentralized or Distance Vector Algorithm
  • each node communicates only with
    directly-attached neighbors
  • computes 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
Count-To-Infinity Problem
  • Assume we use hop count as metric
  • A uses B to reach D with cost 3
  • B uses C to reach D with cost 2
  • C reaches D with cost 1

D
A/3
B/2
C/1
18
Count-To-Infinity Problem (cont.)
  • Suppose link between C and D breaks
  • C switches to B,
  • increase its cost to Bs 1 3

D
A/3
B/2
C/3
19
Count-To-Infinity Problem (cont.)
  • Bs path cost is now 4
  • A has not realized what has happened yet
  • Then, As and Cs cost are now 5
  • Bs path cost is changed to 6
  • Cycle repeats while counting to infinity

A/3
B/4
C/3
D
D
A/5
B/4
C/5
20
Routing Loops
  • In this cases, the packets with destination of D
    in A network
  • Go to router B
  • Then go to router C
  • Then go back to router B

D
A
B
C
21
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!

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

MCI
AT T
LINX Europe
CW
Microsoft
Company in France
Umass
23
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

24
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)

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

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

27
Routing Protocol Issues
  • Stability
  • Policy
  • Congestion
  • Protocol Design
  • Keep Alive Message
  • Redundant Incremental Update message
  • Update timers
  • Convergence Speed
  • Reliability or Robustness
  • Alternate or Backup route
  • Congestion
  • Human Error

28
More Issues
  • Security
  • Scalability
  • Hierarchy
  • Traffic Engineering
  • Load Balancing
  • Qos
  • ?

29
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 up to 25 destination nets within AS

30
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
31
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
32
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

33
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
  • But it might cause update flooding

34
Split Horizon
  • In this case, B does not announce the route to
    destination D to C
  • Once C-D link breaks
  • C would not switch to B
  • Avoid count-to-infinity problem

D
A/3
B/2
C/1
35
Split Horizon --- Might Not Work
  • But can not solve loops in all cases
  • Suppose the link between C and D breaks

A
  • A and B do not send its current route to
    destination D to router C
  • But A learns that B can reach destination D, so
    sends new route to C
  • C sends route learned from A to B
  • B sends route learned from C to A
  • A sends route learned from B to C
  • Routing loop still exists

C
B
D
36
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
  • Converge fast when the network topology changes

37
How OSPF Works
  • Link failure detection
  • Not receiving HELLO message for long time
  • Default, 40 seconds or 4 HELLO Intervals
  • If neighboring routers discover each other for
    the first time
  • Exchange their link-state databases
  • Synchronizing two neighbors link-state databases
  • Default refresh information every 30 minutes

38
How OSPF Works
  • The direct connected routers detect state change
    of the link
  • Trigger the Link State Update to neighbors
  • Compute the shortest path
  • Other routers flood the updates to whole network
  • Use sequence number to detect redundant updates
  • Confirm the updates (Link State Acknowledge)
  • Compute the shortest path

39
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

40
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

41
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

42
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

43
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

44
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
45
Where do link costs and routing policies come
from?
  • Someones head
  • Manually entered
  • Router Configuration
  • Cause failure

46
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

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

48
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

49
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.

50
eBGP and iBGP
  • eBGP
  • BGP running between two different ASs
  • iBGP
  • BGP running within the same AS
  • An AS has multiple BGP speakers
  • Distribute routing info among BGP routers
  • Minor but important difference with eBGP

51
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 each pair of BGP speaking
    routers has an iBGP session

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

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

55
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)
56
Update Message
  • Primary message used in a BGP
  • Advertises (announces) a prefix to BGP
    neighbors/withdraw a previously advertised
    message
  • Encourage multiple prefixes in a single Update

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

58
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

59
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

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

61
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.

62
AS-PATH Attribute Example
170.10.0.0
AS200
AS100
RtA
RtC
RtD
RtA advertise 170.10.0.0 to RtB, 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
63
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

64
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
65
Nexthop Attribute
  • The next hop IP address used to reach destination
  • For eBGP, always the directly connected
    neighbors interface
  • For iBGP, the nexthop advertised by eBGP should
    be carried through into iBGP

66
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
67
Synchronizaton
  • In a transit AS, eBGP should not advertise a
    route before all routers in the AS learned about
    the route via IGP
  • eBGP should wait until all the routes are
    propagated

68
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
69
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

70
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
71
Local Preference Attribute
  • Indicate which route is preferred
  • Exchanged among routers in the same AS through
    updates
  • Higher value is preferred
  • Default value is 100

72
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
73
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

74
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
75
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

76
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
77
Best Path Selection
  • Decision Process
  • Highest local preference
  • Shortest AS path
  • eBGP over iBGP
  • Lowest IGP metric
  • Lowest router id

78
Convergence Issue
  • Route flap dampenning
  • Suppresses the advertisements of routes until the
    routes become stable

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

80
CIDR Example
160.20.0.0
160.10.0.0
AS200
AS100
AS400
160.0.0.0/8
AS300
81
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

82
BGP Confederation Example
AS100
AS200
AS50
AS60
AS70
AS500
83
Route Reflectors
  • Relax the restriction that iBGP routers have to
    be fully meshed
  • Designate one iBGP router as the route reflector
    (RR), neighbors as RR clients
  • RRs are fully meshed, also with other iBGP
    routers

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