C5.2. The Networ Layer (Control Plane)
C5.2. The Networ Layer (Control Plane)
1-1
Chapter 5: outline
5.1 Overview of Network layer 5.4 routing protocols
• data plane – link state
• control plane – distance vector
5.2 What’s inside a router 5.5 intra-AS routing in the
5.3 IP: Internet Protocol Internet: OSPF
• datagram format 5.6 routing among the ISPs:
• fragmentation BGP
• IPv4 addressing 5.7 The SDN control plane
• network address 5.8 ICMP: The Internet Control
translation Message Protocol
• IPv6 5.9 Network management and
• NAT SNMP
Routing
Algorithm
control
plane
data
plane
Remote Controller
control
plane
data
plane
CA
CA CA CA CA
v 3 w
2 5
u 2 1 z
3
1 2
x 1
y
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) }
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-13
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
v 3 w
2 5
u 2 1 z
3
1 2
x 1
y
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-16
Chapter 5: outline
5.1 Overview of Network layer 5.4 routing protocols
• data plane – link state
• control plane – distance vector
5.2 What’s inside a router 5.5 intra-AS routing in the
5.3 IP: Internet Protocol Internet: OSPF
• datagram format 5.6 routing among the ISPs:
• fragmentation BGP
• IPv4 addressing 5.7 The SDN control plane
• network address 5.8 ICMP: The Internet Control
translation Message Protocol
• IPv6 5.9 Network management and
• NAT SNMP
let
dx(y) := cost of least-cost path from x to y
then
dx(y) = min
v
{c(x,v) + dv (y) }
from
from
y ∞∞ ∞ y 2 0 1
z ∞∞ ∞ z 7 1 0
node y cost to
DV table x y z y
2 1
x ∞ ∞ ∞
x z
from
y 2 0 1 7
z ∞∞ ∞
node z cost to
DV table x y z
x ∞∞ ∞
from
y ∞∞ ∞
z 7 1 0
time
Network Layer: Control Plane 5-23
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
from
y 2 0 1
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
from
y 2 0 1 y 2 0 1 7
from
y 2 0 1
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 Plane 5-24
Distance vector: link cost changes
link cost changes: 1
❖ node detects local link cost change y
4 1
❖ updates routing info, recalculates x z
distance vector 50
❖ if DV changes, notify neighbors
“good t0 : y detects link-cost change, updates its DV, informs its neighbors.
news
travels t1 : z receives update from y, updates its table, computes new least
fast” 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
1d AS1 ▪ forwarding table configured
by both intra- and inter-AS
routing algorithm
Intra-AS Inter-AS • intra-AS routing
Routing
algorithm
Routing
algorithm determine entries for
destinations within AS
Forwarding
table • inter-AS & intra-AS
determine entries for
external destinations
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-42
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
▪ 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-44
BGP path advertisement
AS3 3b
AS1 1b
3a 3c
1a 1c
AS2 2b 3d X
1d AS3,X
AS2,AS3,X
2a 2c
2d
AS3 3b
AS1 1b
1
3a 3c
1a 2 1c
local link
1
AS2 2b 3d X
interfaces 2
1d AS3,X
at 1a, 1d AS2,AS3,X
2a 2c
physical link
2d
dest interface ▪ recall: 1a, 1b, 1c 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-48
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
Suppose an ISP only wants to route traffic to/from its customer networks
(does not want to carry transit traffic between other ISPs)
▪ 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: Control Plane 5-51
BGP: achieving policy via advertisements
legend: provider
B network
X
W A
customer
C network:
Suppose an ISP only wants to route traffic to/from its customer networks
(does not want to carry transit traffic between other ISPs)
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
App
Specialized p p p p p p p p p p
Applications Open Interface
5
3
2 v w 5
u 2 1
3 z
1
2
x 1 y
u 2 1
3 z
1
2
x 1 y
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 Plane 5-63
SDN perspective: data plane switches
Data plane switches network-control applications
SDN-controlled switches
Network Layer: Control Plane 5-64
SDN perspective: SDN controller
SDN controller (network OS): network-control applications
robustness
data
plane
SDN-controlled switches
Network Layer: Control Plane 5-65
SDN perspective: control applications
network-control apps: network-control applications
southbound API
data
plane
SDN-controlled switches
Network Layer: Control Plane 5-66
Components of SDN controller
Network-wide state
management layer: statistics … flow tables
state of networks SDN
links, switches, Network-wide distributed, robust state management
controller
services: a distributed
database
Link-state info host info … switch info
4 5
network
graph
RESTful
API
… intent 5 link state routing app interacts
with flow-table-computation
statistics
3
… flow tables
component in SDN controller,
which computes new flow tables
Link-state info host info … switch info
needed
s2
s1
s4
s3
Network Layer: Control Plane 5-72
OpenDaylight (ODL) controller
Traffic …
Engineering ▪ ODL Lithium
controller
REST API
▪ network apps may be
Network service Basic Network Service Functions
contained within, or be
apps external to SDN
Access
topology
manager
switch
manager
stats
manager
controller
Control
host
▪ Service Abstraction
forwarding
manager manager Layer: interconnects
internal, external
Service Abstraction Layer (SAL) applications and
services
OpenFlow 1.0
… SNMP OVSDB
3 probes 3 probes
3 probes
Network Layer: Control Plane 5-78
Chapter 5: outline
5.1 Overview of Network layer 5.4 routing protocols
• data plane – link state
• control plane – distance vector
5.2 What’s inside a router 5.5 intra-AS routing in the
5.3 IP: Internet Protocol Internet: OSPF
• datagram format 5.6 routing among the ISPs:
• fragmentation BGP
• IPv4 addressing 5.7 The SDN control plane
• network address 5.8 ICMP: The Internet Control
translation Message Protocol
• IPv6 5.9 Network management and
• NAT SNMP
agent data
agent data
managed device
managed device
managing managing
entity entity
request
trap msg
response
PDU Trap
Agent Specific Time
type Enterprise Type Name Value ….
Addr code stamp
4 (0-7)
Trap header Trap info
SNMP PDU