Professional Documents
Culture Documents
Chapter 5
Chapter 5
Network Layer:
Control Plane
A note on the use of these PowerPoint slides:
We’re making these slides freely available to all (faculty, students,
readers). They’re in PowerPoint form so you see the animations; and
can add, modify, and delete slides (including this one) and slide content
to suit your needs. They obviously represent a lot of work on our part.
In return for use, we only ask the following:
▪ If you use these slides (e.g., in a class) that you mention their
source (after all, we’d like people to use our book!)
▪ If you post any slides on a www site, that you note that they are
adapted from (or perhaps identical to) our slides, and note our
copyright of this material.
Computer Networking: A
For a revision history, see the slide note for this page.
Top-Down Approach
Thanks and enjoy! JFK/KWR 8th edition
Jim Kurose, Keith Ross
All material copyright 1996-2020
J.F Kurose and K.W. Ross, All Rights Reserved Pearson, 2020
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
data
plane
values in arriving
packet header
0111 1
2
3
Remote Controller
control
plane
data
plane
C
A
CA CA CA CA
values in arriving
packet header
0111 1
2
3
congested” application
notes:
▪ construct least-cost-path tree by tracing predecessor nodes
▪ ties can exist (can be broken arbitrarily)
Network Layer: 5-16
Dijkstra’s algorithm: discussion
algorithm complexity: n nodes
▪ each of n iteration: need to check all nodes, w, not in N
▪ n(n+1)/2 comparisons: O(n2) complexity
▪ more efficient implementations possible: O(nlogn)
message complexity:
▪ each router must broadcast its link state information to other n routers
▪ efficient (and interesting!) broadcast algorithms: O(n) link crossings to disseminate a
broadcast message from one source
▪ each router’s message crosses O(n) links: overall message complexity: O(n2)
a 2+
a 0
a 2+ a
1 1+e 0 2+ 0
e
d b d 1+ 1 b d 0 0
e
b de
1+ 1 b
0 0
0 e 1
1 0 e 1 c 0 1 1
c 1+ 1 1 0 e 0 1
c 1 e
c
e e e
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
t=0 Da(e) = ∞
Da(f) = ∞ 1 1
Da(g) = ∞
▪ All nodes have Da(h) = ∞
distance estimates
Da(i) = ∞ A few asymmetries:
to nearest
▪ missing link
d e f
neighbors (only) 1 1
▪ larger cost
▪ All nodes send
their local
distance vector to 1 1 1
their neighbors
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
a
compute compute
b compute
c
8 1
t=1 1 1
All nodes:
▪ receive distance
vectors from
neighbors d
compute compute
e compute
f
▪ compute their new 1 1
local distance
vector
▪ send their new 1 1 1
local distance
vector to neighbors
g
compute h
compute compute
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
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
compute
a compute
b compute
c
2 1
t=2 1 1
All nodes:
▪ receive distance
vectors from
neighbors d
compute compute
e compute
f
▪ compute their new 1 1
local distance
vector
▪ send their new 1 1 1
local distance
vector to neighbors
g
compute compute
h compute
i
8 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
…. and so on
t=1 Da(e) = ∞
Da(f) = ∞ 1 1
Dc(h) = ∞
Dc(i) = ∞
▪ b receives DVs Da(g) = ∞ DV in e:
from a, c, e Da(h) = ∞ De(a) = ∞
Da(i) = ∞ De(b) = 1
d e f De(c) = ∞
1 1
De(d) = 1
De(e) = 0
De(f) = 1
1 1 1
De(g) = ∞
De(h) = 1
De(i) = ∞
g h i
1 1
t=1 Da(e) = ∞
Da(f) = ∞ 1 1
Dc(h) = ∞
Dc(i) = ∞
▪ b receives DVs Da(g) = ∞ DV in e:
from a, c, e, Da(h) = ∞ De(a) = ∞
computes: e
Da(i) = ∞ De(b) = 1
d e f De(c) = ∞
1
Db(a) = min{cb,a+Da(a), cb,c +Dc(a), cb,e+De(a)} = min{8,∞,∞} =8 1
De(d) = 1
Db(c) = min{cb,a+Da(c), cb,c +Dc(c), c b,e +De(c)} = min{∞,1,∞} = 1
De(e) = 0
Db(d) = min{cb,a+Da(d), cb,c +Dc(d), c b,e +De(d)} = min{9,2,∞} = 2 De(f) = 1
1 1 1
Db(e) = min{cb,a+Da(e), cb,c +Dc(e), c b,e +De(e)} = min{∞,∞,1} = 1 De(g) = ∞
Db(f) = min{cb,a+Da(f), cb,c +Dc(f), c b,e +De(f)} = min{∞,∞,2} = 2
DV in b: De(h) = 1
Db(g) = min{cb,a+Da(g), cb,c +Dc(g), c b,e+De(g)} = min{∞, ∞, ∞} = ∞ Db(a) = 8 Db(f) =2 De(i) = ∞
g h 1Db(c) = 1 Db(g)i = ∞
1 ∞, 2} = 2
Db(h) = min{cb,a+Da(h), cb,c +Dc(h), c b,e+De(h)} = min{∞,
Db(d) = 2 Db(h) = 2
Db(i) = min{cb,a+Da(i), cb,c +Dc(i), c b,e+De(i)} = min{∞, ∞, ∞} = ∞ Db(e) = 1 Db(i) = ∞
Network Layer: 5-33
Distance vector example: computation DV in b: DV in c:
Dc(a) = ∞
Db(a) = 8 Db(f) = ∞
Db(c) = 1 Db(g) = ∞ Dc(b) = 1
DV in a: Db(d) = ∞ Db(h) = ∞ Dc(c) = 0
Da(a)=0 Db(e) = 1 Db(i) = ∞ Dc(d) = ∞
Da(b) = 8 Dc(e) = ∞
Da(c) = ∞ a b c Dc(f) = ∞
8 1
Da(d) = 1 Dc(g) = ∞
t=1 Da(e) = ∞
Da(f) = ∞ 1 1
Dc(h) = ∞
Dc(i) = ∞
▪ c receives DVs Da(g) = ∞ DV in e:
from b Da(h) = ∞ De(a) = ∞
Da(i) = ∞ De(b) = 1
d e f De(c) = ∞
1 1
De(d) = 1
De(e) = 0
De(f) = 1
1 1 1
De(g) = ∞
De(h) = 1
De(i) = ∞
g h i
1 1
t=1 1 1
Dc(h) = ∞
Dc(i) = ∞
▪ c receives DVs
from b computes:
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(f) = min{cc,b+Db(f)} = 1+ ∞ = ∞ Dc(d) = 2
Dc(g) = min{cc,b+Db(g)} = 1+ ∞ = ∞ Dc(e) = ∞ * Check out the online interactive
Dc(f) = ∞ exercises for more examples:
Dc(h) = min{cbc,bg
+Db(h)} = 1+ ∞ = ∞ h i http://gaia.cs.umass.edu/kurose_ross/interactive/
Dc(g) = ∞
Dc(i) = min{cc,b+Db(i)} = 1+ ∞ = ∞
Dc(h) = ∞
Network Layer: 5-35
Dc(i) = ∞
Distance vector example: computation DV in b:
Db(a) = 8 Db(f) = ∞
Db(c) = 1 Db(g) = ∞
Db(d) = ∞ Db(h) = ∞ DV in e:
DV in d:
Db(e) = 1 Db(i) = ∞ De(a) = ∞
Dc(a) = 1
De(b) = 1
Dc(b) = ∞ a b c De(c) = ∞
Dc(c) = ∞ 8 1
De(d) = 1
Dc(d) = 0
t=1 Dc(e) = 1
1
Q: what is new DV computed in e at
1t=1?
De(e) = 0
De(f) = 1
▪ e receives DVs Dc(f) = ∞
De(g) = ∞
from b, d, f, h Dc(g) = 1
De(h) = 1
Dc(h) = ∞
De(i) = ∞
Dc(i) = ∞ d compute
e f DV in f:
1 1
DV in h: Dc(a) = ∞
Dc(a) = ∞ Dc(b) = ∞
Dc(b) = ∞ Dc(c) = ∞
Dc(c) = ∞ 1 1 1
Dc(d) = ∞
Dc(d) = ∞ Dc(e) = 1
Dc(e) = 1 Dc(f) = 0
Dc(f) = ∞ g h i Dc(g) = ∞
1 1
Dc(g) = 1 Dc(h) = ∞
Dc(h) = 0 Dc(i) = 1 Network Layer: 5-36
Distance vector: state information diffusion
Iterative communication, computation steps diffuses information through network:
t=0 c’s state at t=0 is at c only
a b c
8 1
c’s state at t=0 has propagated to b, and
t=1 may influence distance vector computations
up to 1 hop away, i.e., at b 1 1 t=1
t=2
c’s state at t=0 may now influence distance
t=2 vector computations up to 2 hops away, i.e.,
d e f
at b and now at a, e as well 1 1
c’s state at t=0 may influence distance vector
t=3 computations up to 3 hops away, i.e., at b,a,e
1 1 1 t=3
and now at c,f,h as well
c’s state at t=0 may influence distance vector
t=4 computations up to 4 hops away, i.e., at g h i
b,a,e, c, f, h and now at g,i as well 1 1
t=4
Distance vector: link cost changes
1
link cost changes: y
▪node detects local link cost change
4 1
x z
▪ updates routing info, recalculates local DV 50
•problem:
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-39
Comparison of LS and DV algorithms
message complexity robustness: what happens if router
LS: n routers, O(n2) messages sent malfunctions, or is compromised?
DV: exchange between neighbors; LS:
convergence time varies • router can advertise incorrect link cost
• each router computes only its own
speed of convergence table
LS: O(n2) algorithm, O(n2) messages DV:
• may have oscillations
• DV router can advertise incorrect path
DV: convergence time varies cost (“I have a really low cost path to
• may have routing loops everywhere”): black-holing
• count-to-infinity problem
• each router’s table used by others:
error propagate thru network
intra-AS
3
routing
c 3a inter-AS routing intra-AS
2c
3b 2a routing
2
1c
AS3 intra-AS b
1a routing 1b AS2
1d
AS1
3
3a other
2c
3b c 2a network
2 s
1c
AS3 b
other 1a 1b AS2
network
s
1d
AS1
intra-AS
3c
routing3a inter-AS routing intra-AS
2c
3b 2a routing
2b
1c
AS3 intra-AS
1a routing 1b AS2
1d
AS1
2a 2c
∂
1b 3b
2d
1a 1c 3a
∂ 3c
AS 2
1d 3d
AS 1 eBGP connectivity AS 3
logical iBGP connectivity
2d
AS2 router 2c receives path advertisement AS3,X (via eBGP) from AS3 router
3a
based on AS2 policy, AS2 router 2c accepts path AS3,X, propagates (via
iBGP) to all AS2 routers
based on AS2 policy, AS2 router 2a advertises (via eBGP) path AS2,
AS3, X to AS1 router 1c
Network Layer: 5-56
BGP path advertisement: multiple paths
AS 3 3b
AS 1 1b AS3,X 3a 3c
AS3,X
AS3,X
1a 1c AS 2 3d X
2b
AS3,X
1d AS3, X
AS2,AS3,X 2a 2c
2d
2d
dest interface recall: 1a, 1b, 1d learn via iBGP from 1c: “path to X goes through 1c”
… …
1c 1
at 1d: OSPF intra-domain routing: to get to 1c, use interface 1
X 1 at 1d: to get to X, use interface 1
… …
BGP: populating forwarding tables
AS 3 3b
AS 1 1b 3a 3c
1
1a 1c AS 2 3d X
2 2b
1d
2a 2c
2d
dest interface
… … recall: 1a, 1b, 1d learn via iBGP from 1c: “path to X goes through 1c”
1c 2
at 1d: OSPF intra-domain routing: to get to 1c, use interface 1
X 2
… … at 1d: to get to X, use interface 1
at 1a: OSPF intra-domain routing: to get to 1c, use interface 2
at 1a: to get to X, use interface 2
Hot potato routing
AS 3 3b
AS 1 1b 3a 3c
1a 1c AS 2 3d X
2b 112
1d AS1,AS3,X AS3,X
2a 2c
201 263
2d
OSPF link weights
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 Aw 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-61
BGP: achieving policy via advertisements (more)
B provider
x network
w A legend:
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,B,C are provider networks
x,w,y are customer (of provider networks)
x is dual-homed: attached to two networks
policy to enforce: x does not want to route from B to C via
x
.. so x will not advertise to B a route to C
Network Layer: 5-62
BGP route selection
▪ router may learn about more than one route to destination
AS, selects route based on:
1. local preference value attribute: policy decision
2. shortest AS-PATH
3. closest NEXT-HOP router: hot potato routing
4. additional criteria
Routing
Algorith contro
m l
plane
data
plan
e
values in arriving
packet header
0111 1
2
3
Remote Controller
contro
l
plane
data
plan
e
C
A
CA CA CA CA
values in arriving
packet header
0111 1
2
3
Specialized
Operating or or
System
Windows Linux MAC OS
Specialized Open Interface
Hardware
Microprocessor
u 2
3
1 z
1
2
x 1 y
u 2
3
1 z
1
2
x 1 y
u 2
3
1 z
1
2
x 1 y
contro
l
plane
data
plan
e
C 2. control, data plane
A
CA CA
separation
CA CA
1: generalized “flow-based”
forwarding (e.g., OpenFlow)
Network Layer: 5-74
Software defined networking (SDN)
network-control
Data-plane switches: …
applications
d
a
t
a
SDN-controlled switches p Network Layer: 5-77
l
SDN: selected challenges
▪ hardening the control plane: dependable, reliable, performance-
scalable, secure distributed system
• robustness to failures: leverage strong theory of reliable distributed
system for control plane
• dependability, security: “baked in” from day one?
▪ networks, protocols meeting mission-specific requirements
• e.g., real-time, ultra-reliable, ultra-secure
▪ Internet-scaling: beyond a single AS
▪ SDN critical in 5G cellular networks
3 probes
request
PDU Trap
message type 4 type Enterprise Agent Type
Specific Time
Name Value ….
Addr code stamp
4 (0-7)
SNMP PDU
…
<rp
c>
<rpc-
reply>
…
…
<rp
c>
<rpc-
reply>
…
…
<notificati
on>
…
…
<rp
c>
<rpc-
reply>
…
…
Session close: <close-
session>
Network Layer: 5-92
Selected NETCONF Operations
NETCONF Operation Description
<get-config> Retrieve all or part of a given configuration. A device may have multiple
configurations.
<get> Retrieve all or part of both configuration state and operational state data.
<edit-config> Change specified (possibly running) configuration at managed device.
Managed device <rpc-reply> contains <ok> or <rpcerror> with rollback.
<lock>, <unlock> Lock (unlock) configuration datastore at managed device (to lock out
NETCONF, SNMP, or CLIs commands from other sources).
<create-subscription>, Enable event notification subscription from managed device
<notification>
change a configuration