Routing in the Internet - Clark Science Center

advertisement
Q: Compare & Contrast Routing
q  What is the objective of routing
algorithms?
q  Compare and contrast Link-State and
Distance-Vector
v  What
does each algorithm do?
do the routers do in each case?
v  What does each do the same as the other
algorithm?
v  What do they do differently?
v  What
Smith College, CSC 249
Oct 22, 2014
1
More Comparison of LS and DV
2
Comparison of LS and DV algorithms
Message communication
q  Information requirements
q  LS: with n nodes, E links,
O(nE) msgs sent each
q  Message complexity and volume
q  DV: exchange between
q  Robustness: what happens if router
neighbors only
v  convergence time varies
malfunctions?
q  Convergence time varies
q  Oscillations possible?
q  Loops possible?
Speed of Convergence
q  Start-up v. steady-state
q  LS: O(n2) algorithm requires
3
O(nE) msgs
v  may have oscillations
q  DV: convergence time varies
v  may be routing loops
v  count-to-infinity problem
Robustness: what happens
if router malfunctions?
LS:
v 
v 
node can advertise
incorrect link cost
each node computes its
own table using own info
DV:
v 
v 
DV node can advertise
incorrect path cost
each node’s table used by
others
•  errors propagate
through the network
4
1
Routing Algorithms
Overview of Routing & Recap…
q  The set of routers comprise a
The objective of a routing algorithm is
to :
distributed database
v 
q  Distribute State of Links
v  ‘Advertise’ information about ________
v  Communicates with _______
5
2
u
v
2
1
x
Routers propagate network topology
information to other routers
3
w
3
1
z
1
y
q  Distribute Vectors
v  ‘Advertise’ _________
v  Communicates with ________
5
2
5
Review of Link State
6
Review of Distance Vector
q  Each router advertises:
q  Each router advertises:
v 
v 
v 
q  As information is received, each router adds
it to its own ‘link-data’ database, and passes
it on unchanged
v 
v 
v 
q  The information is processed by each router
before it is passed along.
v 
v 
q  Each router constructs its own complete
topology map and runs the routing algorithm
with itself as the center of the ‘tree’
v 
v 
v 
7
8
2
Problem: Dijkstra’s Algorithm
Problem: LS algorithm pathology
Oscillations possible: (ADAPTING TOO QUICKLY)
q  If Link cost = traffic on link
1.  D initiates sending a packet to A, B to A, and C, a tiny
packet of size ‘e’ also to A
2.  C and B observe ‘clockwise’ is cheaper, so reroute
3.  All observe ‘counter-clockwise’ is cheaper, so reroute…
D
1
A
1
0
0 0
C
1+e
e
B
e
initially
1
2+e
A
0
D 1+e 1 B
0
0
C
… recompute
routing
0
D
1
A
0 0
C
2+e
B
1+e
… recompute
2+e
A
0
adapt too quickly
q  SOLUTION – have routers run
algorithm asynchronously, randomize
the times when a router sends a link
advertisement
D 1+e 1 B
e
0
C
… recompute
9
10
Q: The Hierarchical Structure
Problem: DV algorithm pathology
q  Loops possible:
v 
q  Oscillations possible, if routers
i.e., Route from x to y and back to x to get to z
q  If a link-cost decreases – good news
v  Then
any least-cost path previously using that link
has a decrease in cost, but the path remains
unchanged
q  If a link-cost increases – bad news
v  Then
the path itself is likely to change, as well as
the cost of the path, and this takes forever to
propagate through the network…
v  à Count-to-infinity problem
11
q  What is the hierarchy within the Internet
v  What would be ‘top’ levels, down to the ‘bottom’
levels
q  What decisions need to be made within this
hierarchy
v  …
so that it operates successfully as our unified
Internet
q  For comparison, what could be done poorly,
such that the Internet would not function?
12
3
Internet structure: network of networks
gateway routers
q  aggregate routers into
q  special routers in AS
regions, “autonomous
systems” (AS)
q  routers in same AS run
same routing protocol
can run different intra-AS
routing protocol
v 
run inter-AS routing
protocol with other
gateway routers
access
net
access
net
access
net
access
net
ISP A
…
“intra-AS” routing protocol
q  routers in different AS
…
access
net
access
net
…
v 
q  run intra-AS routing
protocol with all other
routers in AS
q  also responsible for
routing to destinations
outside AS
…
access
net
access
net
access
net
access
net
ISP B
ISP B
access
net
regional net
access
net
…
access
net
access
net
access
net
access
net
…
Hierarchical Routing
13
Internet AS Hierarchy
Intra-AS and Inter-AS routing
C.b
a
Host
h1
C
b
A.a
Inter-AS
routing
between
A and B
A.c
a
d
c
b
A
Intra-AS routing
within AS A
Inter-AS border (gateway) routers
B.a
a
c
B
Host
h2
C.b
B.a
b
Intra-AS routing
within AS B
a
A.a
b
A.c
C
B
a
d
A
b
c
a
b
c
Intra-AS interior routers
15
16
4
RIP (Routing Information Protocol)
Intra-AS Routing
q Also known as interior gateway protocols (IGP)
q  Included in BSD-UNIX distribution in 1982
q  Distance vector algorithm
v  distance metric: # hops (max = 15 hops), each link has cost 1
v  DVs exchanged with neighbors every 30 sec in response message (aka
advertisement)
v  each advertisement: list of up to 25 destination subnets (in IP addressing
sense)
q Most common intra-AS routing protocols:
v RIP:
Routing Information Protocol
•  Distance Vector
•  Used typically in lower tier ISPs – what might
influence this?
v OSPF:
u
Open Shortest Path First
•  Link State
•  Typically in upper tier ISPs
17
v
A
B
w
z C
D
x
y
from router A to destination subnets:
subnet hops
u
1
v
2
w
2
x
3
y
3
z
2
18
OSPF (Open Shortest Path First)
Question: RIP vs. OSPF
q  “open”: publicly available
q  Given what we know of LS and DV
algorithms, compare the advertisements
used by RIP and OSPF
q  OSPF – (link state) router periodically
broadcasts state of only its links to all
other routers in the AS
q  RIP – (distance vector) advertisement
(message) contains information about all
the networks in the AS; is only sent to its
neighboring routers
q  uses link state algorithm
v  LS packet dissemination
v  topology map at each node
v  route computation using Dijkstra’s algorithm
q  OSPF advertisement carries one entry per neighbor
q  advertisements flooded to entire AS
v  carried
in OSPF messages directly over IP (rather than
TCP or UDP
19
20
5
Inter-AS routing
Internet inter-AS routing: BGP
q BGP (Border Gateway Protocol):
C.b
facto standard
q Path Vector protocol:
B.a
A.a
a
b
A.c
C
B
a
d
b
A
v  similar
to Distance Vector protocol
Border Gateway broadcasts to
neighbors (peers) entire path (i.e., a
sequence of ASs) to destination
c
a
the de
v  each
b
c
21
22
BGP basics
v 
Concepts: RIP vs. BGP
BGP session: two BGP routers (“peers”) exchange
BGP messages:
q  RIP ads announce the number of hops to
various destinations while BGP updates
announce the __________ to various
destinations
§  advertising paths to different destination network prefixes
(“path vector” protocol)
§  exchanged over semi-permanent TCP connections
v 
q  Describe how loops in paths can be detected
in BGP.
3c
3b
other
networks
3a
BGP
message
AS3
1c
1a
AS1
1d
2a
1b
2c
2b
v 
other
networks
AS2
23
24
6
Why different Intra- and Inter-AS routing ?
Policy:
q  Inter-AS: admin wants control over how its traffic is
routed, and who routes through its net.
q  Intra-AS: single admin, so no policy decisions needed
Scale:
Broadcast Routing
q Uses? → Link-state routing
algorithms
q Deliver packets from source to all
other nodes
q  hierarchical routing saves table size, reduced update
traffic
Performance:
q  Intra-AS: can focus on performance
q  Inter-AS: policy may dominate over performance
26
25
Multicast Routing
q Uses?
v  Bulk data (software upgrade) transfer
v  Streaming audio-visual media
v  Shared
data application
(teleconference)
v  Data feeds (stock quotes)
v  Interactive gaming
Summary
Forwarding:
q  Leads to questions of addressing
v  Assignment
v  NAT,
of IP addresses (& DHCP)
IPv6 …
Routing:
q  Routing objectives
q  Routing notation
q  Link state v. Distance Vector
q  Hierarchical structure
28
7
Download