Skip to content

Commit

Permalink
図を差し替え (fixes #147)
Browse files Browse the repository at this point in the history
  • Loading branch information
yasuhito committed Jan 8, 2016
1 parent 4febb5a commit 22d35ae
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 6 deletions.
Binary file not shown.
Binary file not shown.
Binary file removed images/learning_switch13/pipeline.jpg
Binary file not shown.
Binary file modified images/learning_switch13/pipeline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/learning_switch13/pipeline.tif
Binary file not shown.
Binary file modified images/learning_switch13/pipeline_goto.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/learning_switch13/pipeline_goto.tif
Binary file not shown.
Binary file modified images/learning_switch13/pipeline_write_actions.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
15 changes: 9 additions & 6 deletions learning_switch13.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@
フローテーブルは 1 つという OpenFlow1.0 の制限は、OpenFlow1.3 でなくなっています。OpenFlow1.3 では 1 つのパケットを処理を複数のフローテーブルを使って処理できます。このようなパケット処理をパイプライン処理と呼びます。ちょうどCPUの命令パイプラインのように、パケット処理を「フィルタリング」→「書き換え」→ ... →「転送」とステージごとに進めていくイメージです。フローテーブルごとに役割を明確にできるので、プログラマから見てフローエントリを整理しやすいというメリットがあります。

[[pipeline]]
image::pipeline.png[caption="図7-1",title="OpenFlow1.3でのマルチプルテーブルによるパイプライン処理"]
.OpenFlow1.3でのマルチプルテーブルによるパイプライン処理
image::pipeline.png[caption="図 7-1: "]

=== テーブルの移動

このパイプライン処理は、テーブル ID が 0 のテーブルから始まり GotoTable インストラクションによって次のテーブルに移動します。パイプライン処理の入口となるテーブル、つまり Packet In したときに最初に入るテーブルの ID は 0 と決まっています。現在のテーブルから次のテーブルへと処理を移行するには GotoTable インストラクションに次のテーブル ID を指定します。なお指定できるテーブル ID は現在のテーブル ID よりも大きい必要があります。

[[pipeline_goto]]
image::pipeline_goto.png[caption="図7-2",title="テーブル ID 0 から始まり GotoTable インストラクションで次のテーブルへ処理を移動"]
.テーブル ID 0 から始まり GotoTable インストラクションで次のテーブルへ処理を移動
image::pipeline_goto.png[caption="図 7-2: "]

=== OpenFlow1.3 のアクション

Expand All @@ -36,7 +38,7 @@ image::pipeline_goto.png[caption="図7-2",title="テーブル ID 0 から始ま
アクションのひとつの用途はパケットの書き換えです。書き換えアクションの種類は OpenFlow1.0 に比べて大幅に増えており、マッチ条件で指定できるフィールドの書き換えや VLAN ヘッダの操作に加え、TTL や MPLS, IPv6 パケット等への操作が追加されています (<<actions1.3_modify_fields,表7-1>>)。

[[actions1.3_modify_fields]]
.表 7-1 OpenFlow 1.3 で使えるアクション一覧 (パケットのフィールド書き換え)
.表 7-1: OpenFlow 1.3 で使えるアクション一覧 (パケットのフィールド書き換え)
|===
| アクションのクラス名 | 説明

Expand All @@ -59,7 +61,7 @@ image::pipeline_goto.png[caption="図7-2",title="テーブル ID 0 から始ま
もうひとつのアクションの用途はパケットの転送です。指定したポートへ転送したりポートに関連付けられたキューにパケットを追加するのに使います (<<actions1.3_output,表7-2>>)。

[[actions1.3_output]]
.表 7-2 OpenFlow 1.3 で使えるアクション一覧 (パケットの転送)
.表 7-2: OpenFlow 1.3 で使えるアクション一覧 (パケットの転送)
|===
| アクションのクラス名 | 説明

Expand Down Expand Up @@ -108,12 +110,13 @@ send_flow_mod_add(
`WriteActions` は指定したアクションを後でまとめて適用するために使います。GotoTable でテーブルを移動しながらパケットに `WriteActions` で指定したアクションを「後で適用するアクション」に追加していきます。そして GotoTable を含まないフローエントリにパケットがマッチしたタイミングで、そのパケットの「後で適用するアクション」をまとめて適用します。

[[pipeline_write_actions]]
image::pipeline_write_actions.png[caption="図7-3",title="WriteActions でアクションを後でまとめて適用"]
.WriteActions でアクションを後でまとめて適用
image::pipeline_write_actions.png[caption="図 7-3: "]

「この後で適用するアクション」をアクションセットと呼びます。アクションセットはいわゆる集合なので、同じアクションを複数入れることはできません。`WriteActions` 以外にも、アクションセットを空にする `Clear` インストラクションがあります。ここまでのインストラクションを含めてインストラクション一覧を紹介しましょう。

[[instructions1.3]]
.表 7-3 OpenFlow 1.3 で使えるインストラクション一覧
.表 7-3: OpenFlow 1.3 で使えるインストラクション一覧
|===
| インストラクションのクラス名 | 説明

Expand Down

0 comments on commit 22d35ae

Please sign in to comment.