Software-Defined Networking & NFV

OpenFlow

/ OPEN-flow /

Suppose a head office wants to control the mailrooms of hundreds of branches directly, but each branch buys its sorting machines from a different vendor. It needs one common language so the head office can tell any machine, of any brand, exactly how to sort the mail. OpenFlow is that common language for networks. It is a standard protocol that lets an SDN controller program the flow tables of switches from many different manufacturers, so the controller can install forwarding rules without caring whose hardware it is talking to.

Concretely, OpenFlow models a switch as one or more flow tables, where each entry is a match-action rule: match on packet fields (such as source and destination MAC, IP addresses, ports, VLAN tag), and apply actions (forward out a port, drop, rewrite a field, send to the controller, or push to the next table). The controller opens a connection to each switch and uses OpenFlow messages to add, modify, and remove these entries, to query counters, and to receive packet-in events when a packet matches no rule. When a packet arrives, the switch finds the highest-priority matching entry and does what it says — and if nothing matches, it typically asks the controller. That single match-then-act loop is the whole forwarding model.

Why it matters: OpenFlow was the protocol that made early SDN concrete and proved you could separate control from forwarding with a vendor-neutral interface. Be honest about its limits, though. OpenFlow matches against a fixed, growing list of known header fields — it cannot, by itself, parse a brand-new protocol the standard does not know about; that limitation is exactly what motivated fully programmable data planes and the P4 language. So OpenFlow is one important southbound API, not the definition of SDN, and newer designs often go beyond it.

A controller wants to block all traffic to TCP port 23 (Telnet). Over OpenFlow it installs one flow entry in each switch: match TCP destination port 23, action = drop. From then on the switches silently discard those packets in hardware, with no software in the loop — the controller never sees the dropped traffic again.

One OpenFlow rule turns a policy (block Telnet) into hardware behaviour on every switch.

OpenFlow matches against predefined header fields; it does not let you invent how a packet is parsed. Defining brand-new packet formats and processing is what P4 and programmable data planes add — a different layer from OpenFlow.

Also called
OpenFlow protocolOpenFlow 協定