Protocol 28 of 81Layer 3FrameAssembly v3.1.2
llms-full.txt
openflowOpenFlow SDN Control Channel (OpenFlow 1.3 / 1.4)

SDN Controller <-> Switch Plumbing (ctrl <-> sw openflow TCP 6653)

Default Port / Protocol
TCP 6653
Host Endpoint Rule
Dual-Stack IPv4/IPv6
Wireshark Display Filter
openflow_v4 || openflow
Standards & Specs
ONF OpenFlow 1.3 (TS-023), OpenFlow 1.4
Wire Stack:Ethernet II[802.1Q / QinQ / MPLS]IPv4 / IPv6OpenFlow SDN (TCP 6653)

What It Does on the Wire

Speak directly to virtual switches and SDN controllers over TCP 6653: openflow builds hello, featuresreply (dpid), packetin, and flowmod headers without booting an entire controller stack.

OpenFlow (openflow) is the Software-Defined Networking (SDN) southbound control protocol used between controllers (ONOS, Ryu, OpenDaylight, OVN ovs-vswitchd) and OpenFlow switches over TCP dstport 6653 (legacy 6633). Every OpenFlow message starts with an 8-byte header (version, type, 16-bit length, and 32-bit Transaction ID xid).

FrameAssembly defaults to OpenFlow 1.3 (version 4), shares 4-tuple TCP sequence tracking with tcp, and encodes structured payloads for hello, echoreq/echoreply, featuresreq/featuresreply (with 64-bit Datapath ID dpid), packetin, packetout, and flowmod (tableid + priority).

OVS / SDN Controller Handshake & Keepalive Debugging

Reproduce full hello -> featuresreq -> featuresreply -> echoreq -> echoreply controller bring-up sequences for Open vSwitch and SDN integration tests.

Out-of-Band Management Segmentation & NDR Detection

Test security alerts detecting unencrypted TCP 6653 / 6633 flowmod or packetout traffic outside designated SDN management VLANs.

Table Pipeline (tableid / priority) Dissector Fixtures

Generate multi-table OpenFlow 1.3 (version 4) and 1.4 (version 5) flowmod captures for Wireshark openflow_v4 / openflow_v5 dissectors.

Minimal Quickstart (openflow_quickstart.frasm)

Hit Preview Packets to compile in-browser and eyeball timestamps + wire byte lengths, or ship it straight to the Playground.

openflow_quickstart.frasm9 lines
Open in Playground
host sdn_ctrl { ip 10.90.0.10 }
host ovs_br0 { ip 10.90.0.21 }
compile {
sdn_ctrl -> ovs_br0 openflow hello xid 1 wait 1ms
sdn_ctrl <- ovs_br0 openflow hello xid 1 wait 1ms
sdn_ctrl -> ovs_br0 openflow featuresreq xid 2 wait 1ms
sdn_ctrl <- ovs_br0 openflow featuresreply xid 2 dpid 0x0000001c73000001
}

What the Compiler Calculates So You Don't Have To

  • Defaults to IANA OpenFlow port TCP 6653, Version 4 (0x04 = OpenFlow 1.3), and shares stateful 4-tuple TCP seq/acknum progression.
  • Computes the exact 16-bit big-endian OpenFlow length field across both 8-byte header-only messages (hello, featuresreq, echoreq) and structured bodies (32B featuresreply, 56B flowmod).
  • Encodes the 64-bit switch Datapath ID (dpid) inside OFPT_FEATURES_REPLY (type 6) and tableid + priority inside OFPT_FLOW_MOD (type 14).
Multi-Frame Lab · Ready to Compile

Complete OpenFlow 1.3 Switch Onboarding, Packet-In Miss & FlowMod Programming

Walks through TCP 6653 connection establishment, OpenFlow 1.3 HELLO + FEATURES_REPLY, a switch table-miss PACKET_IN, controller FLOW_MOD installation in Table 0, and ECHO heartbeat.

openflow_sdn_pipeline.frasm21 lines
Open in Playground
host controller { ip 10.90.0.10 }
host leaf_ovs { ip 10.90.0.51 }
compile {
// 1. TCP handshake on port 6653
leaf_ovs -> controller tcp syn srcport 54653 dstport 6653 win 65535 mss 1460 wait 1ms
leaf_ovs <- controller tcp syn ack win 65535 mss 1460 wait 1ms
leaf_ovs -> controller tcp ack wait 1ms
// 2. OpenFlow 1.3 (version 4) Hello & Features negotiation
leaf_ovs -> controller openflow hello version 4 xid 10 wait 1ms
leaf_ovs <- controller openflow hello version 4 xid 10 wait 1ms
leaf_ovs <- controller openflow featuresreq version 4 xid 11 wait 1ms
leaf_ovs -> controller openflow featuresreply version 4 xid 11 dpid 0x0000001c73aa0051 wait 3ms
// 3. Table-miss PacketIn triggers FlowMod rule installation + PacketOut
leaf_ovs -> controller openflow packetin version 4 xid 0 tableid 0 wait 2ms
leaf_ovs <- controller openflow flowmod version 4 xid 12 tableid 0 priority 1000 wait 1ms
leaf_ovs <- controller openflow packetout version 4 xid 13 wait 5ms
// 4. Liveness Echo Request / Reply
leaf_ovs <- controller openflow echoreq version 4 xid 99 wait 1ms
leaf_ovs -> controller openflow echoreply version 4 xid 99
}
Terminal Commands (FrameAssembly CLI v3.1.2)
# 1. Eyeball relative timestamps, ports & wire lengths in your terminal
frameassembly show openflow_sdn_pipeline.frasm

# 2. Compile .frasm -> classic .pcap (tcpdump/tcpreplay/Suricata) or nanosecond .pcapng
frameassembly openflow_sdn_pipeline.frasm openflow_sdn_pipeline.pcap
frameassembly openflow_sdn_pipeline.frasm openflow_sdn_pipeline.pcapng

# 3. Round-trip .pcap <-> .frasm whenever you want to scrub or tweak an existing capture
frameassembly reverse openflow_sdn_pipeline.pcap openflow_sdn_pipeline_edited.frasm

All openflow Keywords & Header Options

Every sub-keyword and header option is lowercase [a-z0-9]+ with zero underscores — mix and match them in any order after openflow:

src_host -> dst_host openflow [hello | echoreq | echorequest | echoreply | featuresreq | featuresreply | packetin | packetout | flowmod | type <0..255>] [version <0..255>] [xid <number>] [dpid <number>] [tableid <0..255>] [priority <0..65535>]
Keyword / OptionAccepted ValueDefaultEffect on Packet
hello | echoreq | echorequest | echoreply | featuresreq | featuresreply | packetin | packetout | flowmod | type <0..255>OpenFlow message type keyword or u8hello (Type 0)Maps to OpenFlow 1.3 types: hello (0), echoreq/echorequest (2), echoreply (3), featuresreq (5), featuresreply (6), packetin (10), packetout (13), flowmod (14).
version <0..255>8-bit wire version code4 (OpenFlow 1.3)Sets wire protocol version (1 = OF 1.0, 4 = OF 1.3, 5 = OF 1.4, 6 = OF 1.5).
xid <number>32-bit Transaction ID1Correlates controller requests (featuresreq, echoreq) with switch replies.
dpid <number>Whole number (0x hex recommended)1Sets the 8-byte Datapath ID in featuresreply (upper 16 bits vendor/ID + lower 48 bits switch MAC).
tableid <0..255> | priority <0..65535>8-bit Table ID, 16-bit Flow Prioritytableid 0, priority 100Populates pipeline Table ID (flowmod / packetin) and rule match Priority (flowmod).

Cross-Layer Wrappers Valid with openflow

802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol

11 options
OptionRange / FormatDefaultEffect on Packet
wait <number><ns|us|ms|s|m>Time gap (ns, us, ms, s, m)10msAdvances the packet timestamp clock after sending this packet and before the next packet (wait 0ns sends back-to-back).
payload "<text>" | hexpayload "<hex>"Quoted text or hex bytes (choose one)OmittedAppends or overrides raw payload bytes ("deadbeef" or "de:ad:be:ef") and updates packet lengths and checksums.
srcmac <mac> | dstmac <mac>Colon, hyphen, or Cisco dot MACHost MAC / RFC multicast MACOverrides the 14-byte Ethernet II source or destination MAC address for this single packet.
vlan <0..4095> [pcp <0..7>] [dei <0|1>]VLAN ID 0..4095, PCP 0..7, DEI 0..1UntaggedWraps the packet in an IEEE 802.1Q VLAN tag (0x8100) with optional 802.1p QoS priority.
qinq <0..4095> [innervlan <0..4095>]Outer S-VLAN 0..4095, Inner C-VLAN 0..4095Untagged (innervlan 1 when qinq is set)Double-tags the packet with outer IEEE 802.1ad S-Tag (0x88a8) plus inner IEEE 802.1Q C-Tag (0x8100).
mpls <0..1048575> [exp|tc <0..7>] [bos <0|1>] [mplsttl <0..255>]Label 0..1048575, exp/tc 0..7, bos 0..1, ttl 0..255Unlabeled (at most 1 mpls tag per packet)Inserts a 32-bit MPLS label header (0x8847) ahead of the Layer 3 header.
ttl <0..255> [dscp <0..63>] [ecn <0..3>]TTL/Hop Limit 0..255, DSCP 0..63, ECN 0..3ttl 64, dscp 0, ecn 0Sets IPv4 TTL or IPv6 Hop Limit plus DiffServ (DSCP) and ECN QoS markings.
ipid <0..65535> [df] [mf] [fragoffset <0..8191>]IPv4 ID, DF/MF flags, fragment offset 0..8191ipid 1, flags 0, fragoffset 0Sets IPv4 Identification, Do-Not-Fragment (df), More-Fragments (mf), and fragment offset (ignored over IPv6).
flowlabel <0..1048575>20-bit IPv6 Flow Label (0..1048575)0Sets the 20-bit IPv6 Flow Label for ECMP routing tests (ignored when running over IPv4 hosts).
srcport <0..65535> | dstport <0..65535>Port number 0..65535srcport 49152 (remembered), TCP 6653Overrides source or destination port and remembers the port pair automatically on <- replies.
seq <number> | acknum <number> | win <0..65535> | syn | ack | psh | fin | rstTCP sequence/ack numbers, window size, flags & RFC 7323 optionspsh ack, win 65535, automatic TCP seq/acknumOverrides automatic TCP sequence tracking, flags, or RFC 7323 options (mss, wscale, sackperm, tsval, tsecr).

Gotchas & Quick Fixes

Wire Version Numbers Differ From Marketing Version Strings

Avoid
ctrl -> sw openflow hello version "1.3"
Valid v3.1.2 Syntax
ctrl -> sw openflow hello version 4 // 0x04 = OpenFlow 1.3

On the wire, OpenFlow 1.0 is version 1, OpenFlow 1.3 is version 4, and OpenFlow 1.4 is version 5.

Legacy Port 6633 vs IANA Standardized Port 6653

Valid v3.1.2 Syntax
ctrl -> sw openflow hello dstport 6633

FrameAssembly defaults to IANA port 6653; add dstport 6633 when testing older OpenFlow 1.0 controllers.

Field Guide 05
VLANs, QinQ, MPLS, Tunnel Soup & Dual-Stack IPv6