天天看點

OpenFlow協定-OpenFlow Switch篇1.Switch Anatomy 2.Switch Agent 3.Data Plane

OpenFlow Switch:

1.Switch Anatomy

OpenFlow協定-OpenFlow Switch篇1.Switch Anatomy 2.Switch Agent 3.Data Plane

                                                               圖1 switch anatomy                                                                                                

switch-agent通過OpenFlow協定與一個或多個controllers互動,另外,也通過内部協定與data plane通信。Switch-agent翻譯從controller獲得的指令到低層的指導發送給data plane子產品,并通告内部的data plane子產品到controller.

data plane實作包轉發和處理,然而,根據配置資訊,有的時候會将資料包發送給switch-agent來進一步處理。

2.Switch Agent

OpenFlow協定-OpenFlow Switch篇1.Switch Anatomy 2.Switch Agent 3.Data Plane

圖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

OpenFlow協定-OpenFlow Switch篇1.Switch Anatomy 2.Switch Agent 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

OpenFlow協定-OpenFlow Switch篇1.Switch Anatomy 2.Switch Agent 3.Data Plane

每個資料包在穿越交換機data plane時具有相同的行為,當資料包到達時,key被建立,包含從資料包獲得的資訊,例如幾個協定域的值,以及從資料包收集到的metadata,例如到達arrival port, arrival time, etc. The key被用來在flow table中選擇一個particular flow,以及相關的action。action包括drop, mutate, queue, forward, or direct that packet to a new flow table。

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

繼續閱讀