lx9 Routing
lx9 Routing
1-1
Network layer functions
1-2
Network layer functions
1-3
Routing
Routing protocol
Goal: determine “good” path 5
(sequence of routers) thru 3
network from source to dest. B C 5
2
A 2 1 F
3
Graph abstraction for 1 2
routing algorithms: D E
1
graph nodes are
routers “good” path:
graph edges are typically means minimum
Decentralized:
router knows physically-connected neighbors, link costs to
neighbors
iterative process of computation, exchange of info with
neighbors
“distance vector” algorithms (Bellman Ford)
1-5
OSPF (Open Shortest Path First)
link state protocol
link costs between 0 and 65,535
Cisco recommendation - link cost = 1/(link capacity)
rapid, loop-free convergence, scales well
topology map at each node, route computation using
Dijkstra’s algorithm
OSPF advertisement carries one entry per neighbor
router, advertisements flooded to entire Autonomous
System
multiple equal-cost paths allowed: flow equally split
on all outgoing links belonging to shortest paths
IS – IS (intermediate system-intermediate system)
similar
1-6
Routing vs Switching
routing: based on address lookup, max
prefix match
search operation
complexity O(logn) - 0(n)
MPLS
1-7
History: Ipsilon’s IP Switching
1-8
Ipsilon’s IP Switching
ATM VCs setup when new IP “flows” seen, I.e.,
“data-driven” VC setup
1-9
Issues with Ipsilon’s IP
switching
1-10
Tag Switching
1-13
MPLS Terminology
LDP: Label Distribution Protocol
1-14
MPLS Header
IP Packet …
32-bit
MPLS Header
label
used to match packet to LSP
experimental bits
carries packet queuing priority (CoS)
stacking bit: can build “stacks” of labels
qoal: nested tunnels!
time to live
copied from IP TTL
1-16
MPLS Forwarding: Example
IP packet destined to 134.112.1.5/32 arrives to SF
San Francisco has route for 134.112/16
next hop is LSP to New York
134.112/16
IP New York
134.112.1.5
0
San 1965
Francisco 1026
Santa Fe
1-17
MPLS Forwarding Example
San Francisco pre-pends MPLS header onto IP
packet, sends packet to first transit router on path
134.112/16
New York
San 1965 IP
Francisco
Santa Fe
1-18
MPLS Forwarding Example
because packet arrived to Santa Fe with
MPLS header, Santa Fe forwards it using
MPLS forwarding table
134.112/16
New York
San
Francisco 1026 IP
Santa Fe
1-19
MPLS Forwarding Example
packet arrives from penultimate router with label 0
egress router sees label 0, strips MPLS header
egress router performs standard IP forwarding
IP 134.112/16
New York
0 IP
San
Francisco
Santa Fe
1-20
Regular IP Forwarding
Dest Out
47.1 1
Dest Out 47.2 2
47.1 1 47.3 3
47.2 2
47.3 3
1 47.1
IP 47.1.1.1
1 2 IP 47.1.1.1
Dest Out 3
47.1 1 2
47.2 2
47.3 3 IP 47.1.1.1
1
47.3 3 47.2
2
IP 47.1.1.1
1 47.1
3 Request: 47.1
3
Intf Dest Intf Label
t: 4 7. 1
In Out Out ues 2
3 47.1 1 0.50 Req 1
Mapping: 0.40
1
2
. 50
47.3 3
pi n g: 0 47.2
p
2 Ma
1-22
Label Switched Path (LSP)
IP 47.1.1.1
1 47.1
Intf Dest Intf Label 3 3
In Out Out
3 47.1 1 0.50 2
1
1
2
47.3 3 47.2
2
IP 47.1.1.1
1-23
A General Vanilla LSP
#14 #311
#216 #99 #311
#963 #311
#963
#14
#612 #462
#99 #311
#5
1-25
Example
1-26
Label Distribution Protocol (LDP)
1-27
Traffic Engineering
configuring routes to traffic demands so as
to
improve user performance
use network resources more efficiently
1-29
Traffic Engineering Framework
knowledge of topology
traffic matrix
K – set of origin destination flows
k K, d – demand, s – source, t – destination
k k k
optimization criteria
minimize maximum utilization
keep utilizations below 60% 1-30
How does one set link weights?
1-31
Digression – linear programming
1-32
Linear program
minimize c x
i
i j
subject to a
j
i,j x j bi , i 1, , n
x j 0, j 1, , m
polynomial time solution in n,m
1-33
Example: optimal routes
topology G = (V,E)
K – set of origin destination flows
k K, d – demand, s – source, t – destination
k k k
j:( i , j )E
X 1,
k
ij i sk
X 0
k
ij
1-36
Interpretation
let X be optimal solutions
k
ij
if X
k
ijtakes values 0 and 1, corresponds
to shortest paths
if X k
ij takes other values, there exist
multiple shortest paths.
1-37
Linear Program
minimize c x
i
i j
minimize c x T
subject to a
j
i,j x j bi , i 1, , n → subject to Ax b
x j 0, j 1, , m x 0,
1-38
Dual problem.
T T
minimize c x maximize y b
subject to Ax b subject to y A c
T T
x 0,
if {xi} and {yi} are optimal, then the
objective functions are equal
y b c x
i
*
i i
i
i
*
i
1-39
Dual problem: properties.
if x and y are feasible, then cTx > yT b
if x’ and y’ are feasible and if cTx’ > y’T b,
then x’ and y’ are optimal
if either problem has finite solution, so
does other, if either has unbounded
solution, so does other
1-40
Complementary slackness.
Let x and y be feasible solutions. A necessary
and sufficient condition for them to be
optimal is that for all i
1. xi > 0 yT Ai = ci
2. xi = 0 yT Ai < ci
1-41
Example: primal (P-SP)
1-42
Example: dual (D-SP)
max kK U k
tk
kK
s.t. U U wij ,
k
j i
k
(i, j ) E
U 0,
k
sk kK
1-43
Example
max kK U k
tk
kK
s.t. U U wij ,
k
j i
k
(i, j ) E
U 0,
k
sk kK
U ik optimal solution to dual problem
U ik shortest distance from sk to i
U tkk length of shortest path from sk to tk
1-44
Optimal route selection
1-45