Skip to content
Wireshark Wiki 中文翻译整理专题首页原始页面

OpenFlow

Software Defined Networking (SDN) 南向 API 标准协议。

历史

OpenFlow dissector 在当前 Wireshark 稳定版本(v1.12.x)中可用。截至 2014-11-04,它支持:

| OpenFlow version | Protocol version | Status | File | OpenFlow 1.0 | 0x01 | 约 50% | epan/dissectors/packet-openflow_v1.c | OpenFlow 1.1 | 0x02 | 0% | | OpenFlow 1.2 | 0x03 | 0% | | OpenFlow 1.3 | 0x04 | 100% | epan/dissectors/packet-openflow_v4.c | OpenFlow 1.4 | 0x05 | 约 90% | epan/dissectors/packet-openflow_v5.c | OpenFlow 1.5 | 0x06 | 0% |

协议依赖

  • TCP:OpenFlow 使用 TCP 作为其传输协议。OpenFlow 流量的知名 TCP 端口为 6633

以及 6653(自 2013-07-18 起的官方 IANA 端口)。

示例流量

SampleCaptures 页面有示例抓包文件。

首选项设置

你需要将默认端口(0)改为类似 6633 或 6653 的值。

用户首选项文件(~/.wireshark/preferences)中的 OpenFlow TCP port:

# openflow TCP port if other than the default# A decimal numberopenflow.tcp.port: 6633

显示过滤器

完整的 OpenFlow 显示过滤器字段列表可在显示过滤器参考中找到,或使用以下命令列出:

tshark -G fields | grep -i openflow

仅显示基于 OpenFlow 的流量:

 openflow

仅显示基于 OpenFlow 1.3 的流量:

 openflow_v4

抓包过滤器

抓包时无法直接过滤 OpenFlow 协议。不过,如果你知道所使用的 TCP 端口(见上文),则可以基于该端口进行过滤。仅抓取默认端口(6633 或 6653)上的 OpenFlow 流量:

 tcp port 6633

OpenFlow 协议规范变更

  • OpenFlow 1.4.0 Spec - Section B.14.17 - TCP 端口号现在必须为 6653(2013-08)

  • OpenFlow 1.3.3 Spec - Section B.14.2 - 将 OpenFlow protocol 替换为 OpenFlow switch protocol(EXT-357)(2013-09-27)

  • OpenFlow 1.3.3 Spec - Section B.14.2 - 将 wire protocol 替换为 protocol version(2013-09-27)

外部链接

  • Open Networking Foundation

  • OpenFlow Switch Specifications

  • IANA OpenFlow port number

讨论

我如何知道我的 Wireshark 版本是否支持解析 OpenFlow 数据包?

检查以下命令的输出:

$ tshark -G protocols | grep -i openflowOpenFlow openflow openflowOpenFlow 1.0 openflow_v1 openflow_v1OpenFlow 1.3 openflow_v4 openflow_v4OpenFlow 1.4 openflow_v5 openflow_v5

Wireshark 不解析我的 OpenFlow 数据包

你可能需要进入 Preferences,更改与 OpenFlow dissector 关联的默认端口。目前 dissector 随附的默认端口是 6653,但过去随附的默认端口是 0(在 Wireshark 1.11 中)。请参见上面的 Preferences Settings 部分。

Wireshark 使用的 OpenFlow 端口是什么?

检查以下命令的输出:

$ tshark -G decodes | grep -i openflowtcp.port 6653 openflow

TShark 不解析我的 OpenFlow 数据包

即使没有在 Wireshark 首选项中更改 OpenFlow TCP 默认端口,你也可以使用类似以下命令,强制 TShark 将其他端口上的数据包解码为 OpenFlow:

tshark -d tcp.port==6633,openflow -r file.pcapng

于 2020-08-11 23:17:40 UTC 从 https://wiki.wireshark.org/OpenFlow 导入

相关 Wireshark Wiki 页面

网络分析技术档案