Professional Documents
Culture Documents
Network Layer:
The Data Plane
Computer
Networking: A Top
Down Approach
7th edition
Jim Kurose, Keith Ross
Pearson/Addison Wesley
April 2016
Routing
Algorithm
control
plane
data
plane
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
control plane
data plane
local flow table
headers counters actions
1
0100 1101
3 2
values in arriving
4-8
packet’s header
OpenFlow data plane abstraction
flow: defined by header fields
generalized forwarding: simple packet-handling rules
• Pattern: match values in packet header fields
• Actions: for matched packet: drop, forward, modify, matched
packet or send matched packet to controller
• Priority: disambiguate overlapping patterns
• Counters: #bytes and #packets
local flow table
headers counters actions
* : wildcard
1. src=1.2.*.*, dest=3.4.5.* drop
2. src = *.*.*.*, dest=3.4.*.* forward(2)
3. src=10.1.2.3, dest=*.*.*.* send to controller
OpenFlow: Flow Table Entries
Rule/Pattern
Action Stats/counter
Header
NAT
3 4
Host h5
10.3.0.5
Src: 10.3.0.6
Src: 10.3.0.6 Src: 10.3.0.6 Dst:10.2.0.4
Dst:10.2.0.4 Dst:10.2.0.4
1 s1 1 s2
2 Host h4
4 2 4
Host h1 10.2.0.4
3 3
10.1.0.1
Host h2
10.1.0.2 match action
match action Host h3
ingress port = 2
10.2.0.3 forward(3)
ingress port = 1 IP Dst = 10.2.0.3
IP Src = 10.3.*.* forward(4) ingress port = 2
forward(4)
IP Dst = 10.2.*.* IP Dst = 10.2.0.4
Chapter 4: done!
4.1 Overview of Network 4.4 Generalized Forward and
layer: data plane and SDN
control plane • match plus action
4.2 What’s inside a router • OpenFlow example
4.3 IP: Internet Protocol
• datagram format
• fragmentation
Question: how do forwarding
• IPv4 addressing tables (destination-based
• NAT forwarding) or flow tables
• IPv6 (generalized forwarding)
computed?
Answer: by the control plane (next
chapter)
Network Layer: Data Plane 4-16
Chapter 5
Network Layer:
The Control Plane
Routing
Algorithm
control
plane
data
plane
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) }
LSu{(u,x)=5,
(u,w)=3, (u,v)=7} x
9
LSz{(z,x)=9, (z, y)=2} 5 7
Step2: Each node 4
8
broadcasts/floods its
3
LS to all nodes in the u w y
2
z
network 3
Step3: Construct graph 7 4
from LS of all nodes v
5 7
4
8
3 w z
u y
2
3
7 4
v
notes: 5
4
7
Step5, construct forwarding
8
table
Destination| next hope| distance 3 w z
u y
w | w |3 2
x |x |5 3
V | w |6 7 4
Y |w | 10 v
z |w | 12 Network Layer: Control Plane 5-31
A link-state routing algorithm
Dijkstra’s algorithm
notation:
c(x,y):
net topology, link from
link cost costsnode x to y; = ∞ if not direct
neighbors
known to all nodes
D(v):
• accomplished via “link
current value ofstate
cost of path from source to dest. v
broadcast”
p(v): predecessor
• all nodes have samenode
info along path from source to v
N': set of nodes
computes whose
least cost least cost path definitively known
paths
from one node (‘source”)
to all other nodes
• gives forwarding table for
that node
iterative: after k iterations,
know least cost path to k
dest.’s
v w
u z
x y