Your SlideShare is downloading. ×
Lagopus, raw socket build
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Introducing the official SlideShare app

Stunning, full-screen experience for iPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Lagopus, raw socket build

169
views

Published on

Tutorial of raw socket build of Lagopus openflow switch.

Tutorial of raw socket build of Lagopus openflow switch.

Published in: Technology

0 Comments
5 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
169
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
1
Comments
0
Likes
5
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Lagopus, raw socket build Feb 28, 2015 Masaru OKI twitter @masaru0714
  • 2. Lagopusとは(おさらい) ● OpenFlow対応ソフトウェアスイッチです ● (もちろん)オープンソースです ○ http://lagopus.github.io ● よく言われている特徴 ○ x86 Linuxで動きます ○ DPDKを使っていて、内部の工夫もあり速いです ○ マルチコア・マルチスレッドで動作します ○ OpenFlowの仕様のカバー範囲が大きいです
  • 3. OpenFlowソフトウェアスイッチ? OpenFlowコントローラと組み合わせて使います 別の言い方をすると、コントローラが必要です Lagopus コントローラ (別プロセス) パケット パケット TCP or SSL Lagopusがつなぎにいく 受信パケットをどう処理する か、Lagopusに教える (フローエントリの投入) OpenFlow Protocol
  • 4. ソフトウェアスイッチ? ● 一番身近なハードウェアスイッチ: SW-HUB ● あるポートで受信したパケットをどこかに転送 ● 特徴(H/Wだとお値段が張る製品でできる) ○ パケットヘッダを見て自在にフィルタリングができます ○ パケットヘッダの加工ができます ○ 転送先を自由に決めることができます
  • 5. Lagopusを動かすまでのイロイロ ● DPDKの利用準備が必要 ○ hugepageの予約、確保 ○ UIOモジュールの組み込み ○ NICのデバイスドライバ割り当ての切り替え(unbind) ● マルチコア+Intel NIC環境が必要 ○ 仮想マシンという手もあるけれど…… ● unbindするとLinuxからNICが見えなくなる ● 手間がかかる、ハードルが高い
  • 6. raw socket版Lagopus ● DPDKを使わないLagopus ● AF_PACKET socketを使いパケットを送受信 ○ Intel NICじゃなくても大丈夫! ○ ip(8)で作った仮想NIC(gretapやvxlan等)でもOK ● データプレーンは現在シングルスレッド動作 ● 煩わしいセットアップは不要 ● ARM等の非x86アーキテクチャでも動かせます
  • 7. DPDK版とraw socket版 現状raw socket版Lagopusは ● セットアップが簡単 ● 小規模システムでも動く 半面、 ● 規模が大きな環境でもスケールしません。 単一プロセスで動くので手軽に試せます。
  • 8. 入手とビルド方法 ● 同一ソースコードです ○ https://github.com/lagopus/lagopus ● ./configureで切り替えます ○ パラメータを何もつけなければraw socket版 ○ --with-dpdk-dir=をつければDPDK版 ● make && sudo make install
  • 9. lagopus.conf(記述例) interface ethernet { p1p1; p2p2; } bridge-domain br0 { port { p1p1 port-no 1; p1p2 port-no 2; } controller { 127.0.0.1; } } Lagopusで使用する、ip(8)で見えるインタフェース名を列 挙します。 インタフェース名と、対応する OpenFlowポート番号(1以 上)を列挙します。 接続先コントローラの IPアドレスを記述します。
  • 10. 起動、その前に コントローラが必要です。 OSSなものは例えば下記。お好みでどうぞ ○ Trema (Ruby) ○ Ryu (Python) ○ Floodlight (Java) Ryuの例 sudo pip install ryu ryu-manager simple_switch_13.py
  • 11. 起動方法、終了方法 起動 sudo lagopus -d -C ./lagopus.conf 終了 sudo lagosh > configure # stop-process -dでフォアグラウンド動作。 もちろんsudo pkill lagopus でも終了します
  • 12. リファレンス Lagopus http://lagopus.github.io ONF (OpenFlowの総本山) http://www.opennetworking.org/ Lagopus User Community http://www.lagopus.community/cms/ DPDK http://dpdk.org/