4.4 Video Slides
4.4 Video Slides
• match+action
• OpenFlow: match+action in action
Middleboxes
Summary
Generalized forwarding: match plus action
Review: each router contains a forwarding table (aka: flow table)
“match plus action” abstraction: match bits in arriving packet, take action
• destination-based
values in arriving
packet header
forwarding: forward based on dest. IP address
• generalized forwarding:
0111 1
2
3
• many header fields can determine action
• many action possible: drop/copy/modify/log packet
forwarding table
(aka: flow table)
Flow table abstraction
flow: defined by header field values (in link-, network-, transport-layer fields)
generalized forwarding: simple packet-handling rules
• match: pattern 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
Firewall:
Switch MAC MAC Eth VLAN VLAN IP IP IP IP TCP TCP
Port src dst type ID Pri Src Dst Prot ToS s-port d-port Action
* * * * * * * * * * * 22 drop
Block (do not forward) all datagrams destined to TCP port 22 (ssh port #)
Router Firewall
• match: longest • match: IP addresses and
destination IP prefix TCP/UDP port numbers
• action: forward out a link • action: permit or deny
Switch
• match: destination MAC NAT
address • match: IP address and port
• action: forward or flood • action: rewrite address and
port
OpenFlow example
Host h6 Orchestrated tables can create
10.3.0.6
1 s3 controller
network-wide behavior, e.g.,:
2
4
datagrams from hosts h5 and
Host h5
3
h6 should be sent to h3 or h4,
10.3.0.5 via s1 and from there to s2
1 s1 1 s2
Host h1 2 Host h4
10.1.0.1 4 2 4
10.2.0.4
3 3
Host h3
Host h2
10.2.0.3
10.1.0.2
OpenFlow example
match action
IP Src = 10.3.*.*
forward(3)
Host h6 Orchestrated tables can create
10.3.0.6
IP Dst = 10.2.*.*
1 s3 controller
network-wide behavior, e.g.,:
2
4
datagrams from hosts h5 and
Host h5
3
h6 should be sent to h3 or h4,
10.3.0.5 via s1 and from there to s2
1 s1 1 s2
Host h1 2 Host h4
10.1.0.1 4 2 4
10.2.0.4
3 3
• match+action
• OpenFlow: match+action in action
Middleboxes
Summary