Intro CN Ch05 Class
Intro CN Ch05 Class
Network Layer:
The Control Plane
Routing
Algorithm
Routing algorithm control
Control plane plane
Data plane
Values in arriving
packet’s header
1
1101
2
3
Remote Controller
control
plane
data
plane
CA
CA CA CA CA
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) }
5 7
notes:
8 Loop 4
9 find i not in N' such that D(i) is a
v construct shortest path tree by 8
minimum
tracing add i to N' nodes
predecessor 3 w z
u y
11 ties
v canD(j)
update exist
for(can
all j be brokento i
adjacent 2
arbitrarily)
and not in N' : 3
D(j) = min( D(j), D(i) + c(i,j) ) 7 4
p(j) = i, if D(i) + c(I,j) smaller
v
15 until all nodes in N'
Network Layer: Control Plane 5-15
Quiz Time
1 Initialization: 5
2 N' = {a}
3 for all nodes b 3
v w 5
4 if b adjacent to a 2
5 then D(b) = c(a,b) u 2 1 z
p(b) = a 3
1 2
6 else D(b) = ∞ x 1
y
1 Initialization: 5
2 N' = {a}
3 for all nodes b 3
v w 5
4 if b adjacent to a 2
5 then D(b) = c(a,b) u 2 1 z
p(b) = a 3
1 2
6 else D(b) = ∞ x 1
y
8 Loop 5
9 find i not in N' such that D(i) is a
minimum add i to N' 3
v w 5
2
11 update D(j) for all j adjacent to i u 2 1 z
and not in N' : 3
1 2
D(j) = min( D(j), D(i) + c(i,j) ) x 1
y
p(j) = i, if D(i) + c(I,j) smaller
15 until all nodes in N'
Network Layer: Control Plane 5-19
Dijkstra s algorithm: another example
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
8 Loop 5
9 find i not in N' such that D(i) is a
minimum add i to N' 3
v w 5
2
11 update D(j) for all j adjacent to i u 2 1 z
and not in N' : 3
1 2
D(j) = min( D(j), D(i) + c(i,j) ) x 1
y
p(j) = i, if D(i) + c(I,j) smaller
15 until all nodes in N'
Network Layer: Control Plane 5-20
Dijkstra s algorithm: another example
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 ∞
8 Loop 5
9 find i not in N' such that D(i) is a
minimum add i to N' 3
v w 5
2
11 update D(j) for all j adjacent to i u 2 1 z
and not in N' : 3
1 2
D(j) = min( D(j), D(i) + c(i,j) ) x 1
y
p(j) = i, if D(i) + c(I,j) smaller
15 until all nodes in N'
Network Layer: Control Plane 5-21
Dijkstra s algorithm: another example
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
8 Loop 5
9 find i not in N' such that D(i) is a
minimum add i to N' 3
v w 5
2
11 update D(j) for all j adjacent to i u 2 1 z
and not in N' : 3
1 2
D(j) = min( D(j), D(i) + c(i,j) ) x 1
y
p(j) = i, if D(i) + c(I,j) smaller
15 until all nodes in N'
Network Layer: Control Plane 5-22
Dijkstra s algorithm: another example
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
8 Loop 5
9 find i not in N' such that D(i) is a
minimum add i to N' 3
v w 5
2
11 update D(j) for all j adjacent to i u 2 1 z
and not in N' : 3
1 2
D(j) = min( D(j), D(i) + c(i,j) ) x 1
y
p(j) = i, if D(i) + c(I,j) smaller
15 until all nodes in N'
Network Layer: Control Plane 5-23
Dijkstra s algorithm: another example
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
8 Loop 5
9 find i not in N' such that D(i) is a
minimum add i to N' 3
v w 5
2
11 update D(j) for all j adjacent to i u 2 1 z
and not in N' : 3
1 2
D(j) = min( D(j), D(i) + c(i,j) ) x 1
y
p(j) = i, if D(i) + c(I,j) smaller
15 until all nodes in N'
Network Layer: Control Plane 5-24
Dijkstra s algorithm: another example
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
8 Loop 5
9 find i not in N' such that D(i) is a
minimum add i to N' 3
v w 5
2
11 update D(j) for all j adjacent to i u 2 1 z
and not in N' : 3
1 2
D(j) = min( D(j), D(i) + c(i,j) ) x 1
y
p(j) = i, if D(i) + c(I,j) smaller
15 until all nodes in N'
Network Layer: Control Plane 5-25
Dijkstra s algorithm: another example
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
8 Loop 5
9 find i not in N' such that D(i) is a
minimum add i to N' 3
v w 5
2
11 update D(j) for all j adjacent to i u 2 1 z
and not in N' : 3
1 2
D(j) = min( D(j), D(i) + c(i,j) ) x 1
y
p(j) = i, if D(i) + c(I,j) smaller
15 until all nodes in N'
Network Layer: Control Plane 5-26
Dijkstra s algorithm: another example
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
8 Loop 5
9 find i not in N' such that D(i) is a
minimum add i to N' 3
v w 5
2
11 update D(j) for all j adjacent to i u 2 1 z
and not in N' : 3
1 2
D(j) = min( D(j), D(i) + c(i,j) ) x 1
y
p(j) = i, if D(i) + c(I,j) smaller
15 until all nodes in N'
Network Layer: Control Plane 5-27
Dijkstra s algorithm: another example
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
8 Loop 5
9 find i not in N' such that D(i) is a
minimum add i to N' 3
v w 5
2
11 update D(j) for all j adjacent to i u 2 1 z
and not in N' : 3
1 2
D(j) = min( D(j), D(i) + c(i,j) ) x 1
y
p(j) = i, if D(i) + c(I,j) smaller
15 until all nodes in N'
Network Layer: Control Plane 5-28
Dijkstra s algorithm: example (2)
resulting shortest-path tree from u:
v w
u z
x y
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
Network Layer: Control Plane 5-30
LS Routing Summary
§ net topology, link costs known to all nodes
• accomplished via “link state broadcast”
• all nodes have the entire topology info
§ computes least cost paths from one node
(‘source’) to all other nodes
• gives forwarding table for that node
let
dx(y) := cost of least-cost path from x to y
then
dx(y) = min
v
{c(x,v) + dv(y) }
recompute estimates
from
y ∞∞ ∞ y 2 0 1
from
z ∞∞ ∞ z 7 1 0
node y cost to
table x y z y
2 1
x ∞ ∞ ∞
x z
from
y 2 0 1 7
z ∞∞ ∞
node z cost to
table x y z
x ∞∞ ∞
from
y ∞∞ ∞
z 7 1 0
time
Network Layer: Control Plane 5-44
Quiz Time!
from
y ∞∞ ∞ y 2 0 1
from
y 2 0 1
from
z ∞∞ ∞ z 7 1 0 z 3 1 0
y 2 0 1 y 2 0 1 7
from
y 2 0 1
from
z ∞∞ ∞ z 7 1 0 z 3 1 0
from
y 2 0 1 y 2 0 1
from
y ∞∞ ∞
z 7 1 0 z 3 1 0 z 3 1 0
time
Network Layer: Control Plane 5-46
Distance vector: link cost changes
link cost changes: 1
v node detects local link cost change y
4 1
v updates routing info, recalculates x z
distance vector 50
v if DV changes, notify neighbors
3c
3a 2c
3b 2a
AS3 2b
1c AS2
1a 1b AS1
1d § forwarding table
configured by both intra-
and inter-AS routing
Intra-AS Inter-AS algorithm
Routing
algorithm
Routing
algorithm • intra-AS routing
determine entries for
Forwarding
table
destinations within AS
• inter-AS & intra-AS
determine entries for
external destinations
Network Layer: Control Plane 5-53
Inter-AS tasks
§ suppose router in AS1 AS1 must:
receives datagram 1. learn which dests are
destined outside of AS1: reachable through AS2,
• router should forward which through AS3
packet to gateway 2. propagate this
router, but which one? reachability info to all
routers in AS1
job of inter-AS routing!
3c
3a
3b
AS3 2c other
1c 2a networks
other
1a 2b
networks 1b AS2
AS1 1d
backbone
area
border
routers
area 3
internal
routers
area 1
area 2
2b
2a 2c
1b 3b
2d
1a 1c 3a 3c
AS 2
1d 3d
AS 1 eBGP connectivity AS 3
iBGP connectivity
AS 3 3b
AS 1 1b
3a 3c
1a 1c
AS 2 2b 3d X
1d
BGP advertisement:
2a 2c AS3, X
2d
Network Layer: Control Plane 5-63
Path attributes and BGP routes
§ advertised prefix includes BGP attributes
• prefix + attributes = route
§ two important attributes:
• AS-PATH: list of ASes through which prefix advertisement
has passed
• NEXT-HOP: indicates specific internal-AS router to next-
hop AS
§ Policy-based routing:
• gateway receiving route advertisement uses import policy to
accept/decline path (e.g., never route through AS Y).
• AS policy also determines whether to advertise path to
other neighboring ASes
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: Control Plane 5-65
BGP path advertisement
AS3 3b
AS1 1b AS3,X
3a 3c
1a 1c
AS2 2b 3d X
1d AS3,X
AS2,AS3,X
2a 2c
2d
AS3 3b
AS1 1b AS3,X
1 AS3,X
3a 3c
1a 2 1c
local link AS2 2b 3d X
interfaces 2 1d 1 AS3,X
at 1a, 1d AS2,AS3,X
2a 2c
physical link
2d
dest interface § recall: 1a, 1b, 1d learn about dest X via iBGP
… … from 1c: “path to X goes through 1c”
X 1 § 1d: OSPF intra-domain routing: to get to 1c,
… … forward over outgoing local interface 1
AS3 3b
AS1 1b
1
3a 3c
1a 2 1c
AS2 2b 3d X
1d
2a 2c
2d
dest interface § recall: 1a, 1b, 1c learn about dest X via iBGP
… … from 1c: “path to X goes through 1c”
X 2 § 1d: OSPF intra-domain routing: to get to 1c,
… … forward over outgoing local interface 1
§ 1a: OSPF intra-domain routing: to get to 1c,
forward over outgoing local interface 2
Network Layer: Control Plane 5-68
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
Algorithm
Routing algorithm control
Control plane plane
Data plane
Values in arriving
packet’s header
1
1101
2
3
Remote Controller
control
plane
data
plane
CA
CA CA CA CA
u 2 1
3 z
1
2
x 1 y
u 2 1
3 z
1
2
x 1 y
v
v
w
w
u zz
xx yy
control
plane
data
plane
CA 2. control,
data plane
CA CA CA CA separation
1: generalized“ flow-
based” forwarding
(e.g., OpenFlow)
Network Layer: Control Plane 5-87
SDN perspective: data plane switches
Data plane switches network-control applications
SDN Controller
Open Flow (network operating system)
§ API for table-based switch control
• defines what is controllable and what southbound API
is not
§ protocol for communicating with data
controller plane
SDN-controlled switches
Network Layer: Control Plane 5-88 Network Layer: Control Plane 5-88
SDN perspective: SDN controller
SDN controller (network OS): network-control applications
scalability, fault-tolerance,
robustness data
plane
SDN-controlled switches
Network Layer: Control Plane 5-89 Network Layer: Control Plane 5-89
SDN perspective: control applications
network-control apps: network-control applications
§ “brains” of control:
routing
…
implement control functions
using lower-level services, API access load
control balance
provided by SND controller
§ unbundled: can be provided by northbound API
control
plane
3rd party: distinct from routing
vendor, or SDN controller SDN Controller
(network operating system)
southbound API
data
plane
SDN-controlled switches
Network Layer: Control Plane 5-90 Network Layer: Control Plane 5-90
Components of SDN controller
routing access load
control balance
Interface layer to
network control Interface, abstractions for network control apps
apps: abstractions
API
network
graph
RESTful
API
… intent
Network-wide state
management layer: statistics … flow tables
state of networks
Network-wide distributed, robust state management
SDN
links, switches,
controller
services: a distributed
database
Link-state info host info … switch info
s2
s1
s4
s3
Network Layer: Control Plane 5-98
SDN: selected challenges
§ hardening the control plane: reliable, secure
distributed system
• robustness to failures: leverage strong theory of
reliable distributed system for control plane
• reliability, security: “baked in” from day one?
§ networks, protocols meeting mission-specific
requirements
• e.g., real-time, ultra-reliable, ultra-secure (TLS)
§ Internet-scaling
• BGP configuration using SDN
3 probes 3 probes
3 probes
Network Layer: Control Plane 5-
102
Chapter 5: outline
5.1 introduction 5.5 The SDN control plane
5.2 routing protocols 5.6 ICMP: The Internet
§ link state Control Message
§ distance vector Protocol
5.3 intra-AS routing in the 5.7 Network management
Internet: OSPF and SNMP
5.4 routing among the ISPs:
BGP
agent data
agent data
managed device
managed device
managing managing
entity entity
request
trap msg
response