OpenFlow Switch:
1.Switch Anatomy
图1 switch anatomy
switch-agent通过OpenFlow协议与一个或多个controllers交互,另外,也通过内部协议与data plane通信。Switch-agent翻译从controller获得的命令到低层的指导发送给data plane模块,并通告内部的data plane模块到controller.
data plane实现包转发和处理,然而,根据配置信息,有的时候会将数据包发送给switch-agent来进一步处理。
2.Switch Agent
图2 switch agent
data plane offload: 通常,控制平面会offload OpenFlow中存在的一些功能,但不提供现有的数据平面来实现。
core logic:管理switch,执行data plane命令,管理data plane offload.
OpenFlow protocol: switch端协议
data plane protocol: 用来配置data plane state的内部协议
3.Data Plane
图3 Data Plane
包括:ports, flow table, flows, classifiers and actions.数据包通过port到达和离开,数据包使用classifiers模块,根据flow tables匹配到flows.
flows包括actions集合,和每个数据包匹配到的相对应
classifier, 将每一个数据包和流表中的流入口匹配.
Instructions and actions:一旦数据包匹配到了流入口(在流表中),管理数据包被如何处理
Data plane- packet lifecycle
Packet Arrival:数据包到达在端口,可以是物理端口或虚拟的。记录到达端口的信息为后续的source-based processing in the pipeline是很重要的。
Key Extraction:每一个数据包都有很小的元数据模块部分,called the key, after arrival. key包括several fields from within the packet as well as side information suck as: location of the buffered packet, header values, arrival port, arrival clock, etc. The key is what is fed to the rest of the pipeline.
Table Selection: key用来查找table,然而,多个table可能存在。这种情况下一个table一定要被首先选择出来,当数据包第一次通过pipeline,默认第一个表将会被选择。后续的表可能被选择通过actions或者table misses.
Flow Selection: key用来在table中选择一个flow, classifier包含匹配key的第一个flow of a table将会是选中的flow.
Action Application: 每一个行包含一个actions集合,来应用到所有的匹配包。当一个流选中了对应的action,将会被执行在相关的数据包上。Actions可能会修改包的state or/and影响treatment of the packet.
http://flowgrammable.org/sdn/openflow/#tab_switch