CN Chapter5
CN Chapter5
Network Layer:
The 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: Computer
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!)
Networking: A Top
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
Down Approach
material.
7th edition
Thanks and enjoy! JFK/KWR
Jim Kurose, Keith Ross
All material copyright 1996-2016 Pearson/Addison Wesley
J.F Kurose and K.W. Ross, All Rights Reserved April 2016
Network Layer: Control 5-1
Plane
Chapter 5: network layer
control plane
chapter goals: understand principles
behind network control plane
traditional routing algorithms
SDN controlllers
Internet Control Message Protocol
network management
Routing
Algorithm
control
plane
data
plane
Remote Controller
control
plane
data
plane
CA
CA CA CA CA
ISP 关心一些全局性指标:
• 网络吞吐量最大、平均包延迟最小、平均通信费用最低、网络负载均衡、路由稳定、健壮
等
路由评价指标通常是矛盾的,需要折衷
图抽象
G = (N,E)
N = 路由器集合 = { u, v, w, x, y, z }
E = 链路集合 ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) }
5
• 令 c(x,x’) = 链路 (x,x’) 的代价
3
v w 5 • 代价可以反映链路长度、延迟、
2
u 负载等各种选路算法关心的因素
2
3
1 z
1 2 • 通常考虑无向图,但实际网络中
x 1
y 边是有方向的(代价不同)
选路算法 : 寻找从源节点到目的节点代价最小的路径
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) }
notes: 5
4
7
construct shortest path
8
tree by tracing
predecessor nodes u
3 w y z
ties can exist (can be 2
broken arbitrarily) 3
7 4
v
Network Layer: Control 5-19
Plane
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
5
3
v w 5
2
u 2 1 z
3
1 2
x 1
y
v w
u z
x y
let
dx(y) := cost of least-cost path from x to
y
then v
from
from
y ∞∞ ∞ y 2 0 1
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 5-29
Plane
Dx(z) = min{c(x,y) +
Dx(y) = min{c(x,y) + Dy(y), c(x,z) + Dz(y)}
= min{2+0 , 7+1} = 2 Dy(z), c(x,z) + Dz(z)}
= min{2+1 , 7+0} = 3
node x cost to cost to cost to
table x y z x y z x y z
x 0 2 7 x 0 2 3 x 0 2 3
from
from
y ∞∞ ∞ y 2 0 1 y 2 0 1
from
z ∞∞ ∞ z 7 1 0 z 3 1 0
node y cost to cost to cost to
table x y z x y z x y z y
2 1
x ∞ ∞ ∞ x 0 2 7 x 0 2 3 x z
from
y 2 0 1 y 2 0 1 7
from
y 2 0 1
from
z ∞∞ ∞ z 7 1 0 z 3 1 0
x ∞∞ ∞ x 0 2 7 x 0 2 3
from
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 5-30
Plane
Distance vector: link cost
changes
link cost changes: 1
node detects local link cost y
4 1
change
updates routing info,
x z
50
recalculates
distance vector
if DV changes, notify
“good t0 : y detects link-cost change, updates its DV, informs its
neighbors
news neighbors.
travels t1 : z receives update from y, updates its table, computes new
fast” least cost to x , sends its neighbors its DV.
t2 : y receives z’s update, updates its distance table. y’s least costs
do not change, so y does not send a message to z.
3c
3a 2c
3b 2a
AS3 2b
1c AS2
1a 1b AS1
1d forwarding table
configured by both
intra- and inter-AS
Intra-AS Inter-AS routing algorithm
Routing
algorithm
Routing
algorithm
• intra-AS routing
determine entries
Forwarding
table
for destinations
within AS
• inter-AS & intra-AS
determine entries
for external
Network Layer: Control 5-37
Plane
Inter-AS tasks
suppose router in AS1 must:
AS1 receives 1. learn which dests
datagram destined are reachable
outside of AS1: through AS2, which
• router should through AS3
forward packet to 2. propagate this
gateway router, reachability info to
but which one? 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
2d
Network Layer: Control 5-47
Plane
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 other neighboring ASes
2d
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
AS3 3b
AS1 1b
1
3a 3c
1a 2 1c
AS2 2b 3d X
1d
2a 2c
2d
Routing
Algorithm
control
plane
data
plane
Remote Controller
control
plane
data
plane
CA
CA CA CA CA
Ap Ap Ap Ap Ap Ap Ap Ap Ap Ap
Specialized App
p p p p p p p p p p
Application
Open Interface
s
Specialized Windows Mac
Operating or Linux or OS
(OS)
System
Open Interface
Specialized
Hardware
Microprocessor
u 2
3
1 z
1
2
x 1 y
u 2
3
1 z
1
2
x 1 y
difficult
5
3
v
v
w
w
2 5
zz
u 2 1
3
1
2
xx yy
1
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 5-68
Plane
SDN perspective: data plane switches
Data plane switches network-control
applications
fast, simple, commodity …
routing
switches implementing
generalized data-plane access load
control balance
forwarding (Section 4.4)
in hardware control
plane
northbound API
switch flow table
computed, installed by SDN Controller
controller (network operating system)
API for table-based switch
control (e.g., OpenFlow) southbound API
• defines what is controllable
and what is not
data
protocol for plane
communicating with
controller (e.g., SDN-controlled switches
OpenFlow)
Network Layer: Control 5-69
Plane
SDN perspective: SDN controller
SDN controller network-control
(network OS): applications
…
routing
maintain network state
access load
information control balance
interacts with network
control
control applications northbound API plane
“above” via northbound
API SDN Controller
interacts with network (network operating system)
switches “below” via
southbound API southbound API
implemented as
distributed system for data
performance, scalability, plane
fault-tolerance,
robustness
Network Layer: Control 5-70
SDN-controlled switches
Plane
SDN perspective: control applications
network-control apps: network-control
applications
“brains” of control: …
routing
implement control
functions using lower- access load
control balance
level services, API
provided by SND control
plane
controller northbound API
unbundled: can be
SDN Controller
provided by 3rd party: (network operating system)
distinct from routing
vendor, or SDN southbound API
controller
data
plane
SDN-controlled switches
Network Layer: Control 5-71
Plane
Components of SDN controller
routing access load
control balance
Interface layer
to network Interface, abstractions for network control apps
control apps:
abstractions API
network
graph
RESTful
API
… intent
Network-wide
state statistics … flow tables
management
Network-wide distributed, robust state management
SDN
layer: state of
controller
networks links,
switches,
Link-state info host info … switch info
services: a
communication
distributed OpenFlow … SNMP
layer:
database Communication to/from controlled devices
communicate
between SDN
controller and
controlled
switches
Network Layer: Control 5-72
Plane
OpenFlow protocol
operates between
OpenFlow Controller controller, switch
TCP used to
exchange
messages
• optional
encryption
three classes of
OpenFlow
messages:
• controller-to-
switch
• asynchronous
(switch to
controller)
Network Layer: Control 5-73
Plane
OpenFlow: controller-to-switch
messages
Key controller-to-switch
messages OpenFlow Controller
features: controller
queries switch features,
switch replies
configure: controller
queries/sets switch
configuration parameters
modify-state: add, delete,
modify flow entries in the
OpenFlow tables
packet-out: controller can
send this packet out of Network Layer: Control 5-74
Plane
OpenFlow: switch-to-controller
messages
Key switch-to-controller
messages OpenFlow Controller
packet-in: transfer packet
(and its control) to controller.
See packet-out message
from controller
flow-removed: flow table
entry deleted at switch
port status: inform controller
of a change on a port.
Fortunately, network operators don’t “program”
switches by creating/sending OpenFlow messages
directly. Instead use higher-level abstraction at
controller Network Layer: Control 5-75
Plane
SDN: control/data plane interaction
example
Dijkstra’s link-state 1 S1, experiencing link
Routing failure using OpenFlow
port status message to
4 5 notify controller
network
graph
RESTful
API
… intent 2 SDN controller receives
OpenFlow message,
statistics
3
… flow tables
updates link status info
3 Dijkstra’s routing
Link-state info host info … switch info algorithm application
2 has previously
OpenFlow … SNMP
registered to be called
when ever link status
changes. It is called.
4 Dijkstra’s routing
6 algorithm access
1
network graph info, link
s2 state info in controller,
computes new routes
s1
s4
s3
Network Layer: Control 5-76
Plane
SDN: control/data plane interaction
example
Dijkstra’s link-state
Routing
4 5
network
graph
RESTful
API
… intent 5 link state routing app
interacts with flow-table-
statistics
3
… flow tables
computation component
in SDN controller, which
Link-state info host info … switch info
computes new flow
tables needed
2 6 Controller uses
OpenFlow … SNMP
OpenFlow to install new
tables in switches that
need updating
6
1
s2
s1
s4
s3
Network Layer: Control 5-77
Plane
OpenDaylight (ODL)
controller…
Traffic
Engineering ODL Lithium
controller
REST
API
network apps
Network Basic Network Service Functions
may be
service apps contained
Access
topology switch stats
manager
within, or be
manager manager
Control external to SDN
forwarding host controller
manager manager
Service
Service Abstraction Layer (SAL) Abstraction
Layer:
OpenFlow 1.0
… SNMP OVSDB
interconnects
internal,
external
applications and
services
Network Layer: Control 5-78
Plane
ONOS controller
Network …
control apps control apps
northbound separate from
abstractions,
REST API Intent
protocols
controller
intent
hosts paths flow rules topology framework:
high-level
ONOS
devices links statistics distributed specification of
core service: what
rather than how
device link host flow packet southbound considerable
abstractions,
OpenFlow Netconf OVSDB protocols
emphasis on
distributed core:
service
reliability,
replication
performance
Network Layer: Control 5-79
Plane
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
Network Layer: Control 5-80
Plane
Chapter 5: outline
5.5 The
5.1 introduction
SDN control plane
5.2 ICMP:
5.6 routingThe
protocols
Internet Control Message Protocol
5.7link
Network
state management and SNMP
distance vector
5.3 intra-AS routing in the Internet: OSPF
5.4 routing among the ISPs: BGP
managing managing
entity entity
request
trap msg
response
PDU Trap
type Enterprise Agent Type
Specific Time
Name Value ….
Addr code stamp
4 (0-7)
Trap header Trap info
SNMP PDU