Cloud, SDN & Production Architectures · Study deck

OpenFlow Protocol and Flow Tables

Picture a building sensor whose packets keep taking an old route after a maintenance change.

Cloud Clara is your guide for this deck.

openflowprotocol
Cloud Clara, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Explain the OpenFlow control-channel boundary between controller decisions and switch forwarding.
  • Trace packet-in, flow-mod, packet-out, barrier, stats, and error message roles without mixing them with user traffic.
  • Inspect a flow entry through match fields, priority, instructions, actions, counters, timeout, owner, and cleanup state.
  • Evaluate table-miss behavior, multi-table pipelines, group-style outputs, and meter-style rate controls.
iotclass.org

Major section

Start With a Packet Event

The team must show which rule remained, who installed it, and when it should have ended.

  • A gateway means the boundary system that connects local devices to another network or service.
  • A protocol means shared rules for exchanging messages.
  • OpenFlow carries control messages between a controller and switches.

Key terms

OpenFlow
OpenFlow is easiest to read as a packet event that changes switch state.

Why it matters

The protocol details matter because they decide whether that trace is correct, timely, and reversible.

iotclass.org

Major section

Start With a Packet Event (continued)

The protocol details matter because they decide whether that trace is correct, timely, and reversible.

  • This runway does not prove that the whole software-defined network is correct.
  • OpenFlow is easiest to read as a packet event that changes switch state.
  • A packet misses, the controller evaluates intent, a rule is installed, counters move, and later packets follow the programmed path.
iotclass.org

Major section

In 60 Seconds · Minimum Viable Understanding

OpenFlow is a southbound protocol pattern for letting an SDN controller manage switch behavior with explicit messages and flow-table entries.

  • A switch reports events such as packet misses and port changes.
  • The controller checks state and policy, then installs, modifies, or removes match-action rules.
  • The protocol is not just a message vocabulary.

Key terms

flow-mod
flow-mod is: OpenFlow protocol check route.

Why it matters

The three labels prevent a one-box minimum viable understanding reading.

OpenFlow protocol check route
OpenFlow protocol check route
iotclass.org

Major section

Protocol Boundary · Message Roles

The practical risk in protocol boundary needs a diagram. Summarizes it: OpenFlow control-channel boundary.

  • Proof: acknowledgements, counters, errors, and receiver observations prove whether the change worked.
  • The protocol uses different messages for different check questions.
  • At message roles, Message Roles Answer Different Review Questions makes the architecture testable.

Why it matters

Keeping this boundary clear prevents a controller-side plan from being mistaken for a data-plane result.

OpenFlow control-channel boundary
OpenFlow control-channel boundary
iotclass.org

Major section

Reactive Message Loop

For reactive message loop, inspect at Packet Arrives.

  • No local match: table-miss behavior reports the event, drops it, or follows another configured fallback.
  • Rule is installed: the switch accepts, rejects, times out, or replaces the flow-mod.
  • Later packets match locally: counters move and receiver behavior provides service proof.
  • The first event may need controller involvement.
Reactive OpenFlow message loop
Reactive OpenFlow message loop
iotclass.org

Major section

Switch Components · Flow Entry Anatomy

An OpenFlow-style switch has more than one table of rules.

  • For switch components, inspect at OpenFlow switch: controller programs, data plane forwards.
  • The switch is not a passive wire.
  • It executes checked local behavior and reports proof.
  • A flow entry is traceable only when both behavior and proof fields are explicit.

Why it matters

The three labels prevent a one-box switch components reading.

OpenFlow switch components: flow tables, meters, and ports
OpenFlow switch components: flow tables, meters, and ports
iotclass.org

Major section

Table-Miss Behavior · Pipeline Check

Every table should have defined miss behavior.

  • A checklist alone cannot settle table-miss behavior.
  • becomes useful when No Match is read alongside packet-in event.: Unchecked miss is unsafe adds the remaining acceptance cue.
  • This supports table-miss behavior.
  • Discard traffic that should not leave the table without an explicit approved match.

Key terms

No Match
No Match is read alongside packet-in event.
Unchecked miss
Unchecked miss is unsafe adds the remaining acceptance cue.
OpenFlow table-miss behavior
OpenFlow table-miss behavior
iotclass.org

Major section

Counters and Statistics · Security and Failure Boundaries

Counters are useful proof, but they are not the full service result by themselves.

  • OpenFlow centralizes decision authority, so control-channel safety and failure behavior must be part of the check.
  • Controller identity: switches should accept commands only from approved controller endpoints.
  • Role and request checks: applications should not install rules outside their scope.

Why it matters

Protected control channel : message integrity and confidentiality matter because flow-mods change forwarding behavior.

OpenFlow exposes five statistics types - flow, port, table, queue, and meter - that a controller polls to prove behavior and detect anomalies.
OpenFlow exposes five statistics types - flow, port, table, queue, and meter - that a controller polls to prove behavior and detect anomalies.
iotclass.org

Major section

Build Gateway Update Paths · Proof Loop

A building gateway carries telemetry, door-control events, camera traffic, management access, and update downloads.

  • During a maintenance window, the controller needs to steer update traffic while preserving door-control and management paths.
  • Packet event or operator request identifies update traffic and ingress context.
  • Controller sends a scoped flow-mod for update traffic only.
OpenFlow proof loop
OpenFlow proof loop
iotclass.org

Major section

Common Pitfalls · The Protocol Changes State

Without that chain, a flow rule can look correct in the controller and still be wrong in the network.

  • Confusing control messages with user traffic: packet-in and flow-mod travel on the control channel; application packets still use the forwarding plane.
  • The key distinction is state versus intent.
  • Counters can show whether packets matched.
iotclass.org

Major section

Rule Release Record

This makes the protocol usable in production instead of leaving it as a sequence of controller log lines.

  • A practical release record for wh-gw-update would name the gateway group, update destination, ingress port or VLAN, match fields, target table, priority, meter or output action, idle timeout, hard timeout, and rollback owner.
  • After installation, the record should be updated with the flow-mod result, any error code, barrier result when ordering matters, final table entry, and before/after counters.
  • The exact tooling can vary, but the release record should still show intended state, processed state, observed traffic, receiver result, and cleanup.
iotclass.org

Major section

Ordering Is Correctness

OpenFlow-style control is stateful.

  • It tells the operator where the proof chain is strong and where it is still missing.
  • A flow-mod accepted before an old broad rule is removed may still fail if the old rule has higher priority or an earlier table sends the packet elsewhere.
  • Timeouts are part of the same state comparison.

Key terms

Protocol knowledge
Protocol knowledge is complete only when those states line up.

Why it matters

Otherwise a temporary OpenFlow action can become invisible production policy.

Anatomy of an OpenFlow flow-table entry: match fields, an action set, and metadata including priority, packet and byte counters, idle and hard timeouts, and a controller cookie.
Anatomy of an OpenFlow flow-table entry: match fields, an action set, and metadata including priority, packet and byte counters, idle and hard timeouts, and a controller cookie.
iotclass.org

Major section

Ordering Is Correctness (continued)

The under-the-hood check is a state comparison: controller intent before the change, switch table state after processing, packet path through the pipeline, receiver evidence, and final state after cleanup.

  • Protocol knowledge is complete only when those states line up.
  • If the removal is still pending, or if a table-0 jump bypasses table 10, the narrower rule can be technically present but operationally irrelevant.
  • When the controller reconnects, the same comparison should run again.
iotclass.org

Major section

Ordering Is Correctness (continued)

Otherwise a temporary OpenFlow action can become invisible production policy.

  • An idle timeout cleans up entries that stop matching; a hard timeout removes an entry after a fixed interval even if traffic continues.
  • A maintenance rule should record which timeout applies, what happens on expiry, and whether the controller reconciles switch state after reconnection.
  • The switch may still hold rules, counters, meters, or groups that the controller no longer expects.
iotclass.org

Major section

Summary · Key Takeaway

OpenFlow-style protocols let a controller manage switch behavior through explicit control-channel messages and local match-action tables.

  • Packet-in messages report events, flow-mod messages change rules, packet-out messages handle specific packets, stats messages return proof, and errors expose rejected requests.
  • The proof of success is not the message alone; it is acknowledgement, local forwarding proof, counters, receiver behavior, protected-path checks, and a recorded cleanup path.
  • OpenFlow protocol work should connect match-action rules, table behavior, counters, and controller interactions to concrete network policy.
iotclass.org

Deck summary

Key takeaways

The team must show which rule remained, who installed it, and when it should have ended.

  • The protocol details matter because they decide whether that trace is correct, timely, and reversible.
  • OpenFlow is a southbound protocol pattern for letting an SDN controller manage switch behavior with explicit messages and flow-table entries.
  • The practical risk in protocol boundary needs a diagram. Summarizes it: OpenFlow control-channel boundary.
  • For reactive message loop, inspect at Packet Arrives.
iotclass.org

Retrieval practice

Recall check 1 of 3

Cloud Clara says: answer from memory, then check your reasoning.

Q1During a maintenance window, a controller must steer gateway update downloads without catching telemetry, door-control events, or management access. Which first check keeps the OpenFlow-style rule change traceable?

AName the update class, match fields, table, priority, action, timeout, owner, exceptions, counters, receiver proof, and cleanup path.
BInstall a broad update match first, then narrow it later if telemetry or door-control paths report trouble.
CTreat the flow-mod acknowledgement as proof that update receivers and protected paths stayed clean.
DUse the maintenance calendar's end time as the cleanup plan, letting the operator remove the rule when the window closes.
Show answer

Answer: A A safe OpenFlow-style maintenance rule names the update traffic scope, match fields, table, priority, action, owner, timeout, protected exceptions, counters, receiver result, cleanup path, and review condition before the controller sends the flow-mod.

iotclass.org

Retrieval practice

Recall check 2 of 3

Cloud Clara says: answer from memory, then check your reasoning.

Q2A controller sends a flow-mod to steer update traffic, and the switch accepts it. What proof is still needed before saying the service behavior worked?

ANo more proof is needed because a flow-mod acknowledgement proves the user service worked.
BCheck rule and port counters, receiver behavior, protected-path safety, and cleanup state.
CCompare the controller's requested and acknowledged rule records to confirm the change completed.
DCapture the next packet at the controller to verify the intended update classification.
Show answer

Answer: B A flow-mod acknowledgement is necessary but not sufficient.

iotclass.org

Retrieval practice

Recall check 3 of 3

Cloud Clara says: answer from memory, then check your reasoning.

Q3A controller sends two OpenFlow-style changes for a gateway maintenance window: remove an old broad update rule, then install a narrower rule with protected exceptions. Which proof closes the protocol boundary?

ACheck order, final table state, narrow-rule counters, receiver result, protected paths, and cleanup owner.
BTrust the controller log because it lists both requested changes in the intended order.
CCheck only that update traffic still reaches the receiver after the rule change.
DUse increasing narrow-rule counters as the completion check, since they show the new rule is forwarding traffic.
Show answer

Answer: A OpenFlow protocol proof closes only when requested intent, processed switch state, rule priority and ordering, counters, receiver behavior, protected paths, and cleanup all agree.

iotclass.org

Print reference

Answers

Answer key.

  1. A · A safe OpenFlow-style maintenance rule names the update traffic scope, match fields, table, priority, action, owner, timeout, protected exceptions, counters, receiver result, cleanup path, and review condition before the controller sends the flow-mod.
  2. B · A flow-mod acknowledgement is necessary but not sufficient.
  3. A · OpenFlow protocol proof closes only when requested intent, processed switch state, rule priority and ordering, counters, receiver behavior, protected paths, and cleanup all agree.
iotclass.org