CRI Reti 08 Network Layer-Control Plane
CRI Reti 08 Network Layer-Control Plane
Contents:
We will follow more or less (we’ll cut quite a lot) the corresponding chapter of the textbook:
“Computer Networking: a Top-Down Approach” by Jim Kurose and Keith Ross, 8th Ed. (7th is fine as well)
Disclaimers - Changelog
copyright 1996-2020 J.F Kurose and K.W. Ross, All Rights Reserved
▪ 1999-2020 Original slides are courtesy of the textbook authors
Network Layer = Control Plane: 5-1
▪ 2021 Main content selection made by dott. Luca Tagliapietra
▪ 2022 Compacting action by prof. Michele Geronazzo
Network layer control plane: our goals
▪understand principles ▪ instantiation, implementation
behind network control in the Internet:
plane: • OSPF, BGP
• traditional routing algorithms • OpenFlow, ODL and ONOS
• SDN controllers controllers
• network management, • Internet Control Message
configuration Protocol: ICMP
• SNMP, YANG/NETCONF
Routing
Algorithm
control
plane
Local forwarding
table
data
header output
plane
0100 3
0110 2
0111 2
1001 1
values in arriving
packet header
0111 1
2
3
Remote Controller
control
plane
data
plane
CA
CA CA CA CA
values in arriving
packet header
0111 1
2
3
graph: G = (N,E)
N: set of routers = { u, v, w, x, y, z }
E: set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }
Network Layer: 5-9
Routing algorithm classification
global: all routers have complete
topology, link cost info
• “link state” algorithms
dynamic: routes change
static: routes change more quickly
slowly over time • periodic updates or in
How fast response to link cost
do routes changes
change? decentralized: iterative process of
computation, exchange of info with neighbors
• routers initially only know link costs to
attached neighbors
• “distance vector” algorithms
notes: 5
4
7
❖ construct shortest path tree by
8
tracing predecessor nodes
ties can exist (can be broken 3 w z
❖ u y
arbitrarily) 2
3
7 4
v
Network Layer: Control Plane 5-14
Dijkstra’s algorithm: an example
v w x y z
Step N' D(v),p(v) D(w),p(w) D(x),p(x) D(y),p(y) D(z),p(z)
0 u 2,u 5,u 1,u ∞ ∞
1 ux 2,u 4,x 2,x ∞
2 uxy 2,u 3,y 4,y
3 uxyv 3,y 4,y
4 uxyvw 4,y
5 uxyvwz
Initialization (step 0): For all a: if a adjacent to then D(a) = cu,a
5
find a not in N' such that D(a) is a minimum
v 3 w
2 5 add a to N'
u 2 z update D(b) for all b adjacent to a and not in N' :
1
3 D(b) = min ( D(b), D(a) + ca,b )
1 2
x y
1
Network Layer: 5-15
Dijkstra’s algorithm: an example
5
v 3 w
2 5
u 2 1 z
3
1 2
x y
1
1
A 1+e A A A
2+e 0 0 2+e 2+e 0
D 0 0 B D 1+e 1 B D B D 1+e 1 B
0 0
0 e 0 0
C 0 1 1+e 0
1 C C C
1
e
given these costs, given these costs, given these costs,
initially find new routing…. find new routing…. find new routing….
resulting in new costs resulting in new costs resulting in new costs
g h i
1 1
a b c
8 1
t=1 1 1
All nodes:
▪ receive distance
vectors from
neighbors d e f
▪ compute their new 1 1
local distance
vector
▪ send their new 1 1 1
local distance
vector to neighbors
g h i
1 1
t=1 1 1
All nodes:
▪ receive distance
vectors from
neighbors comdpute comepute comfpute
▪ compute their new 1 1
local distance
vector
▪ send their new 1 1 1
local distance
vector to neighbors
comgpute 1
comhpute 1
comp
i ute
a b c
8 1
t=1 1 1
All nodes:
▪ receive distance
vectors from
neighbors d e f
▪ compute their new 1 1
local distance
vector
▪ send their new 1 1 1
local distance
vector to neighbors
g h i
1 1
a b c
8 1
t=2 1 1
All nodes:
▪ receive distance
vectors from
neighbors d e f
▪ compute their new 1 1
local distance
vector
▪ send their new 1 1 1
local distance
vector to neighbors
g h i
1 1
t=2 1 1
All nodes:
▪ receive distance
vectors from
neighbors com
dpute comepute comf pute
▪ compute their new 1 1
local distance
vector
▪ send their new 1 1 1
local distance
vector to neighbors
a b c
8 1
t=2 1 1
All nodes:
▪ receive distance
vectors from
neighbors d e f
▪ compute their new 1 1
local distance
vector
▪ send their new 1 1 1
local distance
vector to neighbors
g h i
1 1
…. and so on
g h i
1 1
g h i
1 1
d b(a}} = 1 + 8 = 9
Dc(a) = min{cc,b+D e f
DV in c:
Dc(b) = min{cc,b+Db(b)} = 1 + 0 = 1
Dc(a) = 9
Dc(d) = min{cc,b+Db(d)} = 1+ ∞ = ∞ Dc(b) = 1
Dc(e) = min{cc,b+Db(e)} = 1 + 1 = 2 Dc(c) = 0
Dc(d) = 2
Dc(f) = min{cc,b+Db(f)} = 1+ ∞ = ∞
Dc(e) = ∞
Dc(g) = min{cc,b+Db(g)} = 1+ ∞ = ∞ Dc(f) = ∞
Dc(h) = min{cbc,bg+Db(h)} = 1+ ∞ = ∞ Dc(g) = ∞
h Dc(h) = ∞
Dc(i) = min{cc,b+Db(i)} = 1+ ∞ = ∞
Dc(i) = ∞
Network Layer: 5-44
1
link cost changes: y
4 1
▪ node detects local link cost change x z
▪ updates routing info, recalculates local DV 50
60
link cost changes: y
4 1
▪ node detects local link cost change x z
▪ “bad news travels slow” – count-to-infinity problem: 50
• y sees direct link to x has new cost 60, but z has said it has a path at cost of 5. So y
computes “my new cost to x will be 6, via z); notifies z of new cost of 6 to x.
• z learns that path to x via y has new cost 6, so z computes “my new cost to x
will be 7 via y), notifies y of new cost of 7 to x.
• y learns that path to x via z has new cost 7, so y computes “my new cost to x
will be 8 via y), notifies z of new cost of 8 to x.
• z learns that path to x via y has new cost 8, so z computes “my new cost to x
will be 9 via y), notifies y of new cost of 9 to x.
…
▪ see text for solutions. Distributed algorithms are tricky!
Network Layer: 5-48
Comparison of LS and DV algorithms
robustness: what happens if router
message complexity malfunctions, or is compromised?
LS: n routers, O(n2) messages sent LS:
DV: exchange between neighbors; • router can advertise incorrect link cost
convergence time varies • each router computes only its own
table
speed of convergence DV:
LS: O(n2) algorithm, O(n2) messages • DV router can advertise incorrect path
• may have oscillations cost (“I have a really low cost path to
DV: convergence time varies everywhere”): black-holing
• may have routing loops • each router’s table used by others: error
• count-to-infinity problem propagate thru network
intra-AS
routing3a intra-AS
3b 2a routing
2b
AS3 intra-AS
1a routing 1b AS2
1
d AS1
2a 2∂c
1b 3b
2d
1a 1c 3∂a 3c
AS 2
1d 3d
AS 1 eBGP connectivity AS 3
logical iBGP connectivity
1a 1c AS 2 3d
2b
1d BGP advertisement:
2a 2c X
AS3, X
2d
Network Layer: 5-62
BGP: achieving policy via advertisements
A,w B provider
x network
w A legend:
A,w C y customer
network:
ISP only wants to route traffic to/from its customer networks (does not want to
carry transit traffic between other ISPs – a typical “real world” policy)
▪ A advertises path A,w to B and to C
▪ B chooses not to advertise BAw to C!
▪ B gets no “revenue” for routing CBAw, since none of C, A, w are B’s customers
▪ C does not learn about CBAw path
▪ C will route CAw (not using B) to get to w Network Layer: 5-67
Why different Intra-, Inter-AS routing ?
policy:
▪ inter-AS: admin wants control over how its traffic routed, who
routes through its network
▪ intra-AS: single admin, so policy less of an issue
scale:
▪ hierarchical routing saves table size, reduced update traffic
performance:
▪ intra-AS: can focus on performance
▪ inter-AS: policy dominates over performance