SlideShare ist ein Scribd-Unternehmen logo
1 von 24
OVN 設定サンプル
Open Virtual Network : OVN Config example
Twitter: @ebiken | ebiken@gmail.com
Open Virtual Network : OVN Config example | 2015/12/27 1
About OVN ~ Open Virtual Network (1/2)
• Open Virtual Network とは?
• 複数の仮想スイッチ(サーバー)を横断する仮想ネットワークを構築するしくみ。
• L2/L3 switch, tunnel, ACL, Security Group 等を提供
Open Virtual Network : OVN Config example | 2015/12/27 2
Server
(Hypervisor)
VM-1 VM-2 VM-A
Server
(Hypervisor)
VM-3 VM-A
Logical Switch Logical Switch
Logical
Switch
VM-1 VM-2 VM-AVM-3 VM-B
Logical Router
物理構成 論理構成
OVN利用
About OVN ~ Open Virtual Network (2/2)
• Open vSwitch (OVS) を利用して構成
• OVSには変更を加えない(既存機能を利用)
• 多くの OpenFlow Extensionを利用するため、現状ではOVSのみサポート。
• ex: resubmit, registry, tunnel metadata, conntrack etc.
• テナントを分ける仮想ネットワークを構築可能。
• ホスト:仮想マシン(KVM, Xen, Hyper-V)、コンテナ(Docker)等
• 仮想スイッチ:Open vSwitch (OVS)
• CMS(Cloud Management System): OpenStack等
• 詳細は次Slide 「OVN参考情報リンク集」 を参照
Open Virtual Network : OVN Config example | 2015/12/27 3
OVN参考情報リンク集
• 「OVN (Open Virtual Network) の紹介」 by 進藤さん
• http://blog.shin.do/2015/12/ovn-open-virtual-network-
%E3%81%AE%E7%B4%B9%E4%BB%8B/
• 日本語の説明BLOG
• Network Heresy: OVN, Bringing Native Virtual Networking to OVS
• http://networkheresy.com/2015/01/13/ovn-bringing-native-virtual-networking-to-ovs/
• 最初の(オフィシャル)アナウンスBLOG
• OVN: Open Virtual Network for Open vSwitch
• Slides (PDF) : http://openvswitch.org/support/slides/OVN-Vancouver.pdf
• Video:
• https://www.openstack.org/summit/vancouver-2015/summit-videos/presentation/ovn-native-virtual-
networking-for-open-vswitch
• OpenStackとの位置づけを含む解説@OpenStack Summit Vancouver
Open Virtual Network : OVN Config example | 2015/12/27 4
OVN アーキテクチャ
Open Virtual Network : OVN Config example | 2015/12/27 5
ovn-northd
Northbound DB
(ovnnb.db)
Southbound DB
(ovnsb.db)
ovn-controller
ovs-vswitchd
OVS DB
(conf.db, vtep.db) .
CMS
(OpenStack etc)
OVSDB
OpenFlow
Communication Protocols ovn-northd
 論理トポロジー( Northbound DB)を物理ト
ポロジー(Southbound DB)に変換&保存
 Logical Flowを生成し SB-DB に保存
ovn-controller
 ローカルスイッチ(OVS)上の物理・
論理ポートの紐づけや状態を
Sourthbound DBに登録
 物理トポロジー(Southbound DB)を
元にOVSを設定(Flow Rule投入等)
 構成情報はデータベースを通じ
て伝達(OVSDB Protocol)
 OVSは同居する ovn-controller
が制御(OVSDB + OpenFlow)
ovn-controller
ovs-vswitchd
管理サーバー
Chassis (Hypervisor) Chassis (Hypervisor)
Chassis (Hypervisor)
 VMとOVSを収容するサーバー
OVS DB
(conf.db, vtep.db) .
OVN構成・設定例
ovn-northd x 1 + ovn-controller(OVS) x2
Configuration examples.
Open Virtual Network : OVN Config example | 2015/12/27 6
構成・設定例:ovn-northd x 1 + ovn-controller(OVS) x2
Open Virtual Network : OVN Config example | 2015/12/27 7
Northbound DB (ovnnb.db)
ovn-northd
vtap1
veth1
172.16.2.1/24
ns: host1
vtap2
veth2
172.16.2.2/24
ns: host2
bridge: br-int
ovn-
controller
vtap3
veth3
172.16.2.3/24
ns: host3
vtap4
veth4
172.16.2.4/24
ns: host4
bridge: br-int
Tunnel
(Geneve)
Southbound DB (ovnsb.db)
構成概要
 物理サーバー3台構成:ovn01/02/03 (但し、
実際はVirtualBoxでVM 3台作成し試験)
 作業簡略化のため namespace (ns) を用いて
VMを作成(実際にはネットワークのコンテナ)
 namespace (ns) は4つ:host1/2/3/4
 Tenant 2つ:青(host1, host4)、赤(host2, host3)
はそれぞれ後述の2つの論理スイッチ(sw0,
sw1)に接続される。
 疎通確認結果をわかりやすくするために
host1~4 全てに異なるIP address を使用。
 実際は異なるテナント間でIPアドレスが重複し
ても動作する。 (当然ですが)
 CMSは利用せず、論理トポロジーは ovn01 上
で ovn-nbctl コマンドを使い設定。
異なるサーバー(Hypervisor)上のVM を
2つのテナントに分け接続する構成・設定例
intent : 172.16.0.0/24
172.16.0.10/24
172.16.0.20/24 172.16.0.30/24
server: ovn02
server: ovn01
server: ovn03
OVS DB
(conf.db, vtep.db)
ovn-
controller
OVS DB
(conf.db, vtep.db)
論理構成
Open Virtual Network : OVN Config example | 2015/12/27 8
veth1
172.16.2.1/24
ns: host1
veth2
172.16.2.2/24
ns: host2
veth3
172.16.2.3/24
ns: host3
veth4
172.16.2.4/24
ns: host4
sw1
sw0
Logical Switch : sw0, sw1
sw-port1
vtap1
sw-port2
vtap2
sw-port3
vtap3
sw-port4
vtap4
構成・設定例:ovn-northd x 1 + ovn-controller(OVS) x2
Open Virtual Network : OVN Config example | 2015/12/27 9
設定手順 (using Ubuntu15.10)
全サーバー共通基本設定
1. Install Ubuntu 15.10 Server
2. Update / Upgrade and install build-essential
3. Download OVS (OVN) source code
4. Install OVS (OVN) prerequisites
5. Build OVS (OVN)
6. Configure hostname
7. Configure network connecting servers (intnet)
8. Confirm you can ping between servers
Server ovn01: ovnsb, ovnnb, ovn-northdの設定&開始
1. Create OVN database (northbound + southbound)
2. Start ovsdb-server
3. Start ovn-northd
Server ovn02,ovn03: ovs-vswitchd, ovn-controller設定・開始
1. Create database (conf.db, vtep.db)
2. Start ovsdb-server & initialize DB
3. Start ovs-vswitchd
4. Set external-ids on conf.db
5. Start ovn-controller, ovn-controller-vtep
Server ovn02,ovn03: namespace (VM) host1/host2の設定
1. vtap / veth の作成
2. create namespace and attach veth
3. change interface status to “up” and assign IP address
OVN Logical Network の設定
1. Create logical switches and ports
2. Check MAC address of VMs
3. Set MAC address to each logical ports (based on 2.)
4. Bind Logical ports and Physical ports
全サーバー共通基本設定(ovn01/02/03 全3台にて実施)
Open Virtual Network : OVN Config example | 2015/12/27 10
1) Install Ubuntu 15.10 Server
Software Selection: OpenSSH server
2) Update/Upgrade and install build-essential
$ sudo -i
# apt-get update
# apt-get upgrade
# apt-get install build-essential
# exit
3) Download OVS (OVN) source code
~$ sudo apt-get install git
~$ git clone https://github.com/openvswitch/ovs.git
Read "INSTALL.md" for steps to installation. (including prerequisites)
インストール手順詳細は “INSTALL.md” を参照
~$ cd ovs
~/ovs$ vi INSTALL.md
4) Install OVS (OVN) prerequisites | 必要なパッケージをインストール
>> autoconf, automake, libtool-bin, perl, python
$ sudo apt-get install autoconf
$ autoconf --version
autoconf (GNU Autoconf) 2.69
$ automake --version
automake (GNU automake) 1.15
$ sudo apt-get install libtool-bin
$ libtool --version
libtool (GNU libtool) 2.4.2
$ perl --version
This is perl 5, version 20, subversion 2 (v5.20.2)
$ sudo apt-get install python
5) Build OVS (OVN) | OVS (OVN) のビルド
$ cd ovs/
~/ovs$ ./boot.sh
~/ovs$ ./configure
~/ovs$ make
全サーバー共通基本設定(ovn01/02/03 全3台にて実施)
Open Virtual Network : OVN Config example | 2015/12/27 11
6) Configure hostname | ホスト名設定
$ sudo vi /etc/hostname
# pick one from ovn01, ovn02, ovn03
ovn0X
$ sudo vi /etc/hosts
127.0.0.1 localhost
# pick one from ovn01, ovn02, ovn03
127.0.1.1 ovn0X
$ sudo reboot
7) Configure network connecting servers (intnet)
サーバー間ネットワークの設定。VirtualBox 5.0.10 on Win で intent
(内部ネットワーク)を設定した際のインターフェース名は “enp0s8”
$ sudo vi /etc/network/interfaces
# interface connecting hosts
auto enp0s8
iface enp0s8 inet static
# pic one from 172.16.0.10, 20, 30
address 172.16.0.XX
netmask 255.255.255.0
$ sudo service networking restart
8) Confirm you can ping between servers | ping で疎通確認
ebiken@ovn01:~$ ping 172.16.0.20
PING 172.16.0.20 (172.16.0.20) 56(84) bytes of data.
64 bytes from 172.16.0.20: icmp_seq=1 ttl=64 time=0.624 ms
...
ebiken@ovn02:~$ ping 172.16.0.10
PING 172.16.0.10 (172.16.0.10) 56(84) bytes of data.
64 bytes from 172.16.0.10: icmp_seq=1 ttl=64 time=0.260 ms
…
ebiken@ovn03:~$ ping 172.16.0.10
PING 172.16.0.10 (172.16.0.10) 56(84) bytes of data.
64 bytes from 172.16.0.10: icmp_seq=1 ttl=64 time=0.260 ms
Server ovn01: ovnsb, ovnnb, ovn-northd の設定&開始
Open Virtual Network : OVN Config example | 2015/12/27 12
1) Create OVN database (northbound + southbound)
ovn-northd と同じサーバー上に作成。
• ovnsb.db: OVN_Northbound // ovn-nb(5)
• ovnnb.db: OVN_Southbound // ovn-sb(5)
~/ovs$ sudo mkdir -p /usr/local/etc/openvswitch
~/ovs$ sudo ovsdb-tool create /usr/local/etc/openvswitch/ovnsb.db ovn/ovn-sb.ovsschema
~/ovs$ sudo ovsdb-tool create /usr/local/etc/openvswitch/ovnnb.db ovn/ovn-nb.ovsschema
2) Start ovsdb-server
$ sudo ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock 
--remote=ptcp:6632 
--detach --pidfile --log-file 
/usr/local/etc/openvswitch/ovnsb.db 
/usr/local/etc/openvswitch/ovnnb.db
• “--remote=ptcp:6632” オプションにより、port 6632 経由で ovn-controllerから接続可能になる。
• ファイル名指定無しで --log-file オプションを指定するとovsdb-server は以下ファイルにログを出力する。
• /usr/local/var/log/openvswitch/ovsdb-server.log
3) Start ovn-northd(8)
$ sudo ovn-northd --pidfile --detach --log-file
Northbound DB (ovnnb.db)
ovn-northd
ovn-controller
Southbound DB (ovnsb.db)
intent : 172.16.0.0/24
172.16.0.10/24
172.16.0.20,30/24
server: ovn02,03
server: ovn01
port 6632
Server ovn02,ovn03: ovs-vswitchd, ovn-controller設定・開始
Open Virtual Network : OVN Config example | 2015/12/27 13
0) Load kernel module
$ lsmod | grep openvswitch
$ sudo /sbin/modprobe openvswitch
• “lsmod | grep openvswitch” でKernel Moduleがロード済みか確認
1) Create database | OVS用データベース(conf.db, vtep.db)の作成
$ sudo mkdir -p /usr/local/etc/openvswitch
~/ovs$ sudo ovsdb-tool create /usr/local/etc/openvswitch/vtep.db vtep/vtep.ovsschema
~/ovs$ sudo ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema
2) Start ovsdb-server & initialize DB
$ sudo ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock 
--detach --pidfile --log-file 
/usr/local/etc/openvswitch/vtep.db 
/usr/local/etc/openvswitch/conf.db
$ sudo ovs-vsctl --no-wait -- init
ovn-
controller
172.16.0.20,30/24
server: ovn02,03
OVS DB
(conf.db, vtep.db)
Server ovn02,ovn03: ovs-vswitchd, ovn-controller設定・開始
Open Virtual Network : OVN Config example | 2015/12/27 14
3) Start ovs-vswitchd
$ sudo ovs-vswitchd --pidfile --detach --log-file
4) Set external-ids on conf.db:Open_vSwitch Table
• conf.db:Open_vSwitch Table にexternal-idsを設定。(”set open” は “set Open_vSwitch” の略)
• ovn-controller 起動時に external-idsを元に ovn-controller は Chassis (Hypervisor/Server) を ovnsb.db: Chassis table に登録。
• Bridge “br-int” はovn-controller 起動時に自動生成(br-int = integration bridge)
Server: ovn02
$ sudo ovs-vsctl set open . external-ids:system-id=56b18105-5706-46ef-80c4-ff20979ab002
$ sudo ovs-vsctl set open . external-ids:ovn-remote=tcp:172.16.0.10:6632
$ sudo ovs-vsctl set open . external-ids:ovn-encap-type=geneve
$ sudo ovs-vsctl set open . external-ids:ovn-encap-ip=172.16.0.20
Server: ovn03
$ sudo ovs-vsctl set open . external-ids:system-id=56b18105-5706-46ef-80c4-ff20979ab003
$ sudo ovs-vsctl set open . external-ids:ovn-remote=tcp:172.16.0.10:6632
$ sudo ovs-vsctl set open . external-ids:ovn-encap-type=geneve
$ sudo ovs-vsctl set open . external-ids:ovn-encap-ip=172.16.0.30
5) Start ovn-controller(8), ovn-controller-vtep(8)
$ sudo ovn-controller --pidfile --detach --log-file
bridge: br-int
ovn-
controller
172.16.0.20,30/24
server: ovn02,03
OVS DB
(conf.db, vtep.db)
Server ovn02,ovn03: namespace (VM) host1 / host2 の設定
Open Virtual Network : OVN Config example | 2015/12/27 15
1) vtap / veth の作成
Server: ovn02
$ sudo ip link add veth1 type veth peer name vtap1
$ sudo ip link add veth2 type veth peer name vtap2
Server: ovn03
$ sudo ip link add veth3 type veth peer name vtap3
$ sudo ip link add veth4 type veth peer name vtap4
2) create namespace and attach veth
• namespaceを作成しvethを紐付け。
• これにより vethX は各namespace(hostY)からのみ参照可能となる。
Server: ovn02
$ sudo ip netns add host1
$ sudo ip netns add host2
$ sudo ip link set veth1 netns host1
$ sudo ip link set veth2 netns host2
Server: ovn03
$ sudo ip netns add host3
$ sudo ip netns add host4
$ sudo ip link set veth3 netns host3
$ sudo ip link set veth4 netns host4
vtap1
veth1
ns: host1
vtap2
veth2
ns: host2
bridge: br-int
ovn-
controller
172.16.0.20,30/24
server: ovn02,03
OVS DB
(conf.db, vtep.db)
Server ovn02,ovn03: namespace (VM) host1 / host2 の設定
Open Virtual Network : OVN Config example | 2015/12/27 16
3) change interface status to “up” and assign IP address
Server: ovn02
$ sudo ip link set dev vtap1 up
$ sudo ip link set dev vtap2 up
$ sudo ip netns exec host1 ip link set veth1 up
$ sudo ip netns exec host2 ip link set veth2 up
$ sudo ip netns exec host1 ifconfig lo up
$ sudo ip netns exec host2 ifconfig lo up
$ sudo ip netns exec host1 ip addr add 172.16.2.1/24 dev veth1
$ sudo ip netns exec host2 ip addr add 172.16.2.2/24 dev veth2
Server: ovn03
$ sudo ip link set dev vtap3 up
$ sudo ip link set dev vtap4 up
$ sudo ip netns exec host3 ip link set veth3 up
$ sudo ip netns exec host4 ip link set veth4 up
$ sudo ip netns exec host3 ifconfig lo up
$ sudo ip netns exec host4 ifconfig lo up
$ sudo ip netns exec host3 ip addr add 172.16.2.3/24 dev veth3
$ sudo ip netns exec host4 ip addr add 172.16.2.4/24 dev veth4
vtap1
veth1
172.16.2.1/24
ns: host1
vtap2
veth2
172.16.2.2/24
ns: host2
bridge: br-int
ovn-
controller
172.16.0.20,30/24
server: ovn02,03
OVS DB
(conf.db, vtep.db)
3) Set MAC address to each logical ports
• “2)” で確認したMAC address を各論理ポートに設定
Server: ovn01
$ sudo ovn-nbctl lport-set-addresses sw-port1 62:1a:d6:91:49:3d
$ sudo ovn-nbctl lport-set-addresses sw-port2 ae:de:c6:a4:f9:e4
$ sudo ovn-nbctl lport-set-addresses sw-port3 c2:5b:26:02:7f:87
$ sudo ovn-nbctl lport-set-addresses sw-port4 92:89:78:df:69:c9
OVN Logical Network の設定
Open Virtual Network : OVN Config example | 2015/12/27 17
1) Create a logical switch named "sw0“ and 4 logical ports on "sw0"
• ovn01 にて2つの論理スイッチ(sw0, sw1)と4つの論理ポートを作成
Server: ovn01
$ sudo -i
# ovn-nbctl lswitch-add sw0
# ovn-nbctl lswitch-add sw1
# ovn-nbctl lport-add sw0 sw-port1
# ovn-nbctl lport-add sw1 sw-port2
# ovn-nbctl lport-add sw1 sw-port3
# ovn-nbctl lport-add sw0 sw-port4
2) Check MAC address of veth1,2,3,4 on Server: ovn02, 03
• veth1,2,3,4 の MAC address を確認。以下はovn02: veth1の例。
root@ovn02:~$ sudo ip netns exec host1 ip a
…
9: veth1@if8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc
pfifo_fast state UP group default qlen 1000
link/ether 62:1a:d6:91:49:3d brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 172.16.2.1/24 scope global veth1
valid_lft forever preferred_lft forever
inet6 fe80::601a:d6ff:fe91:493d/64 scope link
valid_lft forever preferred_lft forever
OVN Logical Network の設定
Open Virtual Network : OVN Config example | 2015/12/27 18
4) Bind Logical ports (sw-portX) and Physical ports (vtapX)
• 論理ポート(sw-portX)と物理ポート(vtapX)の紐づけ
Server: ovn02
$ sudo ovs-vsctl add-port br-int vtap1 -- set Interface vtap1 external_ids:iface-id=sw-port1
sudo ovs-vsctl add-port br-int vtap2 -- set Interface vtap2 external_ids:iface-id=sw-port2
Server: ovn03
$ sudo ovs-vsctl add-port br-int vtap3 -- set Interface vtap3 external_ids:iface-id=sw-port3
$ sudo ovs-vsctl add-port br-int vtap4 -- set Interface vtap4 external_ids:iface-id=sw-port4
5) ping による疎通確認
Server: ovn02
• host1-> host2, host3 :異なる論理スイッチ上のため ping 不可
$ sudo ip netns exec host1 ping 172.16.2.2
PING 172.16.2.2 (172.16.2.2) 56(84) bytes of data.
From 172.16.2.1 icmp_seq=1 Destination Host Unreachable
$ sudo ip netns exec host1 ping 172.16.2.3
PING 172.16.2.3 (172.16.2.3) 56(84) bytes of data.
From 172.16.2.1 icmp_seq=1 Destination Host Unreachable
• OK: host1 -> host4 : 同じ論理スイッチ上のため ping 可能
$ sudo ip netns exec host1 ping 172.16.2.4
PING 172.16.2.4 (172.16.2.4) 56(84) bytes of data.
64 bytes from 172.16.2.4: icmp_seq=1 ttl=64 time=1.58 ms
参考:コマンドアウトプット各種
Open Virtual Network : OVN Config example | 2015/12/27 19
Server: ovn01
$ sudo ovn-nbctl show
lswitch 655db232-136a-4234-b259-b10ea3b0bda5 (sw0)
lport sw-port1
addresses: 62:1a:d6:91:49:3d
lport sw-port4
addresses: 92:89:78:df:69:c9
lswitch 0aafe3cf-832c-404f-9250-894a8dd8f88e (sw1)
lport sw-port3
addresses: c2:5b:26:02:7f:87
lport sw-port2
addresses: ae:de:c6:a4:f9:e4
$ sudo ovn-sbctl show
Chassis "56b18105-5706-46ef-80c4-ff20979ab002"
Encap geneve
ip: "172.16.0.20"
Port_Binding "sw-port2"
Port_Binding "sw-port1"
Chassis "56b18105-5706-46ef-80c4-ff20979ab003"
Encap geneve
ip: "172.16.0.30"
Port_Binding "sw-port4"
Port_Binding "sw-port3“
Server: ovn01
$ sudo ovsdb-client list-dbs
OVN_Northbound
OVN_Southbound
ebiken@ovn01:~/ovs$ sudo ovsdb-client list-tables OVN_Northbound
Table
-------------------
Logical_Router
Logical_Port
Logical_Switch
ACL
Logical_Router_Port
ebiken@ovn01:~/ovs$ sudo ovsdb-client list-tables OVN_Southbound
Table
----------------
Chassis
Encap
Multicast_Group
Logical_Flow
Datapath_Binding
Port_Binding
参考:コマンドアウトプット各種
Open Virtual Network : OVN Config example | 2015/12/27 20
Server: ovn02
$ sudo ovs-vsctl show
db8c7f2f-6112-4aba-af09-6f968fdd348d
Bridge br-int
fail_mode: secure
Port "ovn-56b181-0"
Interface "ovn-56b181-0"
type: geneve
options: {key=flow, remote_ip="172.16.0.30"}
Port "vtap2"
Interface "vtap2"
Port "vtap1"
Interface "vtap1"
Port br-int
Interface br-int
type: internal
Server: ovn03
$ sudo ovs-vsctl show
db15ad7c-0612-4620-b259-042361a5accc
Bridge br-int
fail_mode: secure
Port "ovn-56b181-0"
Interface "ovn-56b181-0"
type: geneve
options: {key=flow, remote_ip="172.16.0.20"}
Port "vtap4"
Interface "vtap4"
Port "vtap3"
Interface "vtap3"
Port br-int
Interface br-int
type: internal
Server: ovn01
$ sudo ovsdb-client dump OVN_Southbound Chassis
Chassis table
_uuid encaps name vtep_logical_switches
------------------------------------ -------------------------------------- -------------------------------------- ---------------------
dfb07059-3f8e-4c6e-8c19-12f9e29d1089 [50e21f4c-1686-4ee3-9a0c-900d1533e422] "56b18105-5706-46ef-80c4-ff20979ab002" []
fe402522-e01a-4f87-8dfa-b91a22ade24b [4714934b-9a67-4d4b-90f0-c49b584ff222] "56b18105-5706-46ef-80c4-ff20979ab003" []
$ sudo ovsdb-client dump OVN_Southbound Datapath_Binding
Datapath_Binding table
_uuid external_ids tunnel_key
------------------------------------ ------------------------------------------------------- ----------
0817de82-4ffe-48c7-86fa-3df901fb1ccb {logical-switch="0aafe3cf-832c-404f-9250-894a8dd8f88e"} 2
185b458b-ba7b-439b-bce8-ba9cedd690f7 {logical-switch="655db232-136a-4234-b259-b10ea3b0bda5"} 1
参考:コマンドアウトプット各種
Open Virtual Network : OVN Config example | 2015/12/27 21
Server: ovn02
$ sudo ovsdb-client dump Open_vSwitch Open_vSwitch
Open_vSwitch table
_uuid bridges cur_cfg datapath_types db_version
------------------------------------ -------------------------------------- ------- ---------------- ----------
db8c7f2f-6112-4aba-af09-6f968fdd348d [f2e00409-d348-45f0-8b6d-d21ef78d2a6a] 6 [netdev, system] []
external_ids
----------------------------------------------------------------------------------------------------------------------------------------
{ovn-encap-ip="172.16.0.20", ovn-encap-type=geneve, ovn-remote="tcp:172.16.0.10:6632", system-id="56b18105-5706-46ef-80c4-ff20979ab002"}
iface_types manager_options next_cfg other_config ovs_version ssl statistics
------------------------------------------------------------------------ --------------- -------- ------------ ----------- --- ----------
[geneve, gre, internal, ipsec_gre, lisp, patch, stt, system, tap, vxlan] [] 6 {} [] [] {}
system_type system_version
----------- --------------
[] []
(見やすいようにフォーマットを一部修正しています)
参考:コマンドアウトプット各種
Open Virtual Network : OVN Config example | 2015/12/27 22
ebiken@ovn02:~/ovs$ sudo ovs-ofctl show br-int
OFPT_FEATURES_REPLY (xid=0x2): dpid:00000a04e0f2f045
n_tables:254, n_buffers:256
capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS
ARP_MATCH_IP
actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan
mod_dl_src mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src
mod_tp_dst
1(ovn-56b181-0): addr:6e:8c:bc:49:f4:6e
config: 0
state: 0
speed: 0 Mbps now, 0 Mbps max
2(vtap1): addr:06:26:83:78:2c:fa
config: 0
state: 0
current: 10GB-FD COPPER
speed: 10000 Mbps now, 0 Mbps max
3(vtap2): addr:46:e4:5a:8c:e3:30
config: 0
state: 0
current: 10GB-FD COPPER
speed: 10000 Mbps now, 0 Mbps max
LOCAL(br-int): addr:0a:04:e0:f2:f0:45
config: PORT_DOWN
state: LINK_DOWN
speed: 0 Mbps now, 0 Mbps max
OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0
参考:コマンドアウトプット各種
Open Virtual Network : OVN Config example | 2015/12/27 23
ebiken@ovn02:~/ovs$ sudo ovs-ofctl dump-tables br-int
OFPST_TABLE reply (xid=0x2):
table 0 ("classifier"):
active=3, lookup=16, matched=16
max_entries=1000000
matching:
in_port: exact match or wildcard
eth_src: exact match or wildcard
eth_dst: exact match or wildcard
eth_type: exact match or wildcard
vlan_vid: exact match or wildcard
vlan_pcp: exact match or wildcard
ip_src: exact match or wildcard
ip_dst: exact match or wildcard
nw_proto: exact match or wildcard
nw_tos: exact match or wildcard
tcp_src: exact match or wildcard
tcp_dst: exact match or wildcard
table 1 ("table1"):
active=0, lookup=0, matched=0
(same features)
table 16 ("table16"):
active=8, lookup=8, matched=8
(same features)
...
table 17 ("table17"):
active=2, lookup=8, matched=8
(same features)
table 18 ("table18"): ditto
table 19 ("table19"):
active=6, lookup=8, matched=8
(same features)
table 20 ("table20"):
active=0, lookup=0, matched=0
(same features)
...
table 32 ("table32"):
active=5, lookup=8, matched=8
(same features)
table 33 ("table33"):
active=4, lookup=10, matched=10
(same features)
table 34 ("table34"):
active=5, lookup=10, matched=10
(same features)
table 35 ("table35"):
active=0, lookup=0, matched=0
(same features)
...
table 48 ("table48"):
active=2, lookup=8, matched=8
(same features)
table 49 ("table49"): ditto
table 50 ("table50"):
active=6, lookup=8, matched=8
(same features)
table 51 ("table51"):
active=0, lookup=0, matched=0
(same features)
...
table 64 ("table64"):
active=2, lookup=8, matched=8
(same features)
table 65 ("table65"):
active=0, lookup=0, matched=0
(same features)
...
Note: Tables not listed here are “ditto”
ex:
table 252 ("table252"): ditto
table 253 ("table253"): ditto
参考:コマンドアウトプット各種
Open Virtual Network : OVN Config example | 2015/12/27 24
ebiken@ovn02:~/ovs$ sudo ovs-ofctl dump-flows
ovs-ofctl: 'dump-flows' command requires at least 1 arguments
ebiken@ovn02:~/ovs$ sudo ovs-ofctl dump-flows br-int
NXST_FLOW reply (xid=0x4):
cookie=0x0, duration=2437.006s, table=0, n_packets=13, n_bytes=770, idle_age=1611, priority=100,in_port=1 actions=move:NXM_NX_TUN_ID[0..23]-
>OXM_OF_METADATA[0..23],move:NXM_NX_TUN_METADATA0[16..30]->NXM_NX_REG6[0..14],move:NXM_NX_TUN_METADATA0[0..15]->NXM_NX_REG7[0..15],resubmit(,33)
cookie=0x0, duration=1713.077s, table=0, n_packets=19, n_bytes=910, idle_age=1602, priority=100,in_port=2 actions=load:0x1->NXM_NX_REG5[],load:0x1->OXM_OF_METADATA[],load:0x1-
>NXM_NX_REG6[],resubmit(,16)
cookie=0x0, duration=1712.380s, table=0, n_packets=3, n_bytes=238, idle_age=1674, priority=100,in_port=3 actions=load:0x2->NXM_NX_REG5[],load:0x2->OXM_OF_METADATA[],load:0x1-
>NXM_NX_REG6[],resubmit(,16)
cookie=0x0, duration=2236.429s, table=16, n_packets=0, n_bytes=0, idle_age=2236, priority=100,metadata=0x1,vlan_tci=0x1000/0x1000 actions=drop
cookie=0x0, duration=2236.407s, table=16, n_packets=0, n_bytes=0, idle_age=2236, priority=100,metadata=0x2,vlan_tci=0x1000/0x1000 actions=drop
cookie=0x0, duration=2236.429s, table=16, n_packets=0, n_bytes=0, idle_age=2236, priority=100,metadata=0x1,dl_src=01:00:00:00:00:00/01:00:00:00:00:00 actions=drop
cookie=0x0, duration=2236.407s, table=16, n_packets=0, n_bytes=0, idle_age=2236, priority=100,metadata=0x2,dl_src=01:00:00:00:00:00/01:00:00:00:00:00 actions=drop
cookie=0x0, duration=2236.429s, table=16, n_packets=19, n_bytes=910, idle_age=1602, priority=50,reg6=0x1,metadata=0x1 actions=resubmit(,17)
cookie=0x0, duration=2236.407s, table=16, n_packets=3, n_bytes=238, idle_age=1674, priority=50,reg6=0x1,metadata=0x2 actions=resubmit(,17)
cookie=0x0, duration=2236.400s, table=16, n_packets=0, n_bytes=0, idle_age=2236, priority=50,reg6=0x2,metadata=0x2 actions=resubmit(,17)
cookie=0x0, duration=2236.385s, table=16, n_packets=0, n_bytes=0, idle_age=2236, priority=50,reg6=0x2,metadata=0x1 actions=resubmit(,17)
cookie=0x0, duration=2236.429s, table=17, n_packets=19, n_bytes=910, idle_age=1602, priority=0,metadata=0x1 actions=resubmit(,18)
cookie=0x0, duration=2236.407s, table=17, n_packets=3, n_bytes=238, idle_age=1674, priority=0,metadata=0x2 actions=resubmit(,18)
cookie=0x0, duration=2236.429s, table=18, n_packets=19, n_bytes=910, idle_age=1602, priority=0,metadata=0x1 actions=resubmit(,19)
cookie=0x0, duration=2236.407s, table=18, n_packets=3, n_bytes=238, idle_age=1674, priority=0,metadata=0x2 actions=resubmit(,19)
cookie=0x0, duration=2236.429s, table=19, n_packets=16, n_bytes=672, idle_age=1602, priority=100,metadata=0x1,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=load:0xffff-
>NXM_NX_REG7[],resubmit(,32)
cookie=0x0, duration=2236.407s, table=19, n_packets=0, n_bytes=0, idle_age=2236, priority=100,metadata=0x2,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=load:0xffff-
>NXM_NX_REG7[],resubmit(,32)
cookie=0x0, duration=1744.254s, table=19, n_packets=0, n_bytes=0, idle_age=1744, priority=50,metadata=0x1,dl_dst=62:1a:d6:91:49:3d actions=load:0x1->NXM_NX_REG7[],resubmit(,32)
cookie=0x0, duration=1744.240s, table=19, n_packets=0, n_bytes=0, idle_age=1744, priority=50,metadata=0x2,dl_dst=ae:de:c6:a4:f9:e4 actions=load:0x1->NXM_NX_REG7[],resubmit(,32)
cookie=0x0, duration=1744.225s, table=19, n_packets=3, n_bytes=238, idle_age=1674, priority=50,metadata=0x2,dl_dst=c2:5b:26:02:7f:87 actions=load:0x2->NXM_NX_REG7[],resubmit(,32)
cookie=0x0, duration=1742.714s, table=19, n_packets=3, n_bytes=238, idle_age=1611, priority=50,metadata=0x1,dl_dst=92:89:78:df:69:c9 actions=load:0x2->NXM_NX_REG7[],resubmit(,32)
cookie=0x0, duration=1701.198s, table=32, n_packets=0, n_bytes=0, idle_age=1701, priority=100,reg7=0xffff,metadata=0x2 actions=load:0x2-
>NXM_NX_TUN_ID[0..23],set_field:0xffff/0xffffffff->tun_metadata0,move:NXM_NX_REG6[0..14]->NXM_NX_TUN_METADATA0[16..30],output:1,resubmit(,33)
cookie=0x0, duration=1701.198s, table=32, n_packets=3, n_bytes=238, idle_age=1674, priority=100,reg7=0x2,metadata=0x2 actions=load:0x2->NXM_NX_TUN_ID[0..23],set_field:0x2/0xffffffff-
>tun_metadata0,move:NXM_NX_REG6[0..14]->NXM_NX_TUN_METADATA0[16..30],output:1
cookie=0x0, duration=1701.178s, table=32, n_packets=3, n_bytes=238, idle_age=1611, priority=100,reg7=0x2,metadata=0x1 actions=load:0x1->NXM_NX_TUN_ID[0..23],set_field:0x2/0xffffffff-
>tun_metadata0,move:NXM_NX_REG6[0..14]->NXM_NX_TUN_METADATA0[16..30],output:1
... snip ...

Weitere ähnliche Inhalte

Was ist angesagt?

OpenStack勉強会
OpenStack勉強会OpenStack勉強会
OpenStack勉強会
Yuki Obara
 

Was ist angesagt? (20)

第20回 OpenStack勉強会 Neutron Deep Dive - DVR
第20回 OpenStack勉強会 Neutron Deep Dive - DVR第20回 OpenStack勉強会 Neutron Deep Dive - DVR
第20回 OpenStack勉強会 Neutron Deep Dive - DVR
 
Openv switchの使い方とか
Openv switchの使い方とかOpenv switchの使い方とか
Openv switchの使い方とか
 
Routed Provider Networks on OpenStack
Routed Provider Networks on OpenStack Routed Provider Networks on OpenStack
Routed Provider Networks on OpenStack
 
TripleO Deep Dive
TripleO Deep DiveTripleO Deep Dive
TripleO Deep Dive
 
OpenStack検証環境構築・トラブルシューティング入門 - OpenStack最新情報セミナー 2014年8月
OpenStack検証環境構築・トラブルシューティング入門 - OpenStack最新情報セミナー 2014年8月OpenStack検証環境構築・トラブルシューティング入門 - OpenStack最新情報セミナー 2014年8月
OpenStack検証環境構築・トラブルシューティング入門 - OpenStack最新情報セミナー 2014年8月
 
OpenStackをコマンドで攻める! 構築・運用とトラブル解決 - OpenStack最新情報セミナー 2014年6月
OpenStackをコマンドで攻める! 構築・運用とトラブル解決 - OpenStack最新情報セミナー 2014年6月OpenStackをコマンドで攻める! 構築・運用とトラブル解決 - OpenStack最新情報セミナー 2014年6月
OpenStackをコマンドで攻める! 構築・運用とトラブル解決 - OpenStack最新情報セミナー 2014年6月
 
L3HA-VRRP-20141201
L3HA-VRRP-20141201L3HA-VRRP-20141201
L3HA-VRRP-20141201
 
コンテナネットワーキング(CNI)最前線
コンテナネットワーキング(CNI)最前線コンテナネットワーキング(CNI)最前線
コンテナネットワーキング(CNI)最前線
 
OpenStack勉強会
OpenStack勉強会OpenStack勉強会
OpenStack勉強会
 
OpenStackトラブルシューティング入門
OpenStackトラブルシューティング入門OpenStackトラブルシューティング入門
OpenStackトラブルシューティング入門
 
OpenStackでも重要な役割を果たすPacemakerを知ろう!
OpenStackでも重要な役割を果たすPacemakerを知ろう!OpenStackでも重要な役割を果たすPacemakerを知ろう!
OpenStackでも重要な役割を果たすPacemakerを知ろう!
 
OpenStackで始めるクラウド環境構築入門
OpenStackで始めるクラウド環境構築入門OpenStackで始めるクラウド環境構築入門
OpenStackで始めるクラウド環境構築入門
 
OpenStackで始めるクラウド環境構築入門(Horizon 基礎編)
OpenStackで始めるクラウド環境構築入門(Horizon 基礎編)OpenStackで始めるクラウド環境構築入門(Horizon 基礎編)
OpenStackで始めるクラウド環境構築入門(Horizon 基礎編)
 
vSRX on Your Laptop : PCで始めるvSRX ~JUNOSをさわってみよう!~
vSRX on Your Laptop : PCで始めるvSRX ~JUNOSをさわってみよう!~vSRX on Your Laptop : PCで始めるvSRX ~JUNOSをさわってみよう!~
vSRX on Your Laptop : PCで始めるvSRX ~JUNOSをさわってみよう!~
 
君にもできる! にゅーとろん君になってみよー!! 「Neutronになって理解するOpenStack Net - OpenStack最新情報セミナー ...
君にもできる! にゅーとろん君になってみよー!!  「Neutronになって理解するOpenStack Net - OpenStack最新情報セミナー ...君にもできる! にゅーとろん君になってみよー!!  「Neutronになって理解するOpenStack Net - OpenStack最新情報セミナー ...
君にもできる! にゅーとろん君になってみよー!! 「Neutronになって理解するOpenStack Net - OpenStack最新情報セミナー ...
 
OpenStackを一発でデプロイ – Juju/MAAS - OpenStack最新情報セミナー 2015年2月
OpenStackを一発でデプロイ – Juju/MAAS  - OpenStack最新情報セミナー 2015年2月OpenStackを一発でデプロイ – Juju/MAAS  - OpenStack最新情報セミナー 2015年2月
OpenStackを一発でデプロイ – Juju/MAAS - OpenStack最新情報セミナー 2015年2月
 
OpenStack マルチノード環境構築
OpenStack マルチノード環境構築OpenStack マルチノード環境構築
OpenStack マルチノード環境構築
 
急速に進化を続けるCNIプラグイン Antrea
急速に進化を続けるCNIプラグイン Antrea 急速に進化を続けるCNIプラグイン Antrea
急速に進化を続けるCNIプラグイン Antrea
 
TripleO Deep Dive 1.1
TripleO Deep Dive 1.1TripleO Deep Dive 1.1
TripleO Deep Dive 1.1
 
日本OpenStackユーザ会 第37回勉強会
日本OpenStackユーザ会 第37回勉強会日本OpenStackユーザ会 第37回勉強会
日本OpenStackユーザ会 第37回勉強会
 

Andere mochten auch

Andere mochten auch (10)

Quick Start Guide using Virtuozzo 7 (β) on AWS EC2
Quick Start Guide using Virtuozzo 7 (β) on AWS EC2Quick Start Guide using Virtuozzo 7 (β) on AWS EC2
Quick Start Guide using Virtuozzo 7 (β) on AWS EC2
 
20120309 cloud mix-public クラウドごった煮
20120309 cloud mix-public クラウドごった煮 20120309 cloud mix-public クラウドごった煮
20120309 cloud mix-public クラウドごった煮
 
plotnetcfg入門 | Introduction to plotnetcfg
plotnetcfg入門 | Introduction to plotnetcfgplotnetcfg入門 | Introduction to plotnetcfg
plotnetcfg入門 | Introduction to plotnetcfg
 
20111015 勉強会 (PCIe / SR-IOV)
20111015 勉強会 (PCIe / SR-IOV)20111015 勉強会 (PCIe / SR-IOV)
20111015 勉強会 (PCIe / SR-IOV)
 
Introduction to Ostinato , network packet crafting and generator.
Introduction to Ostinato, network packet crafting and generator.Introduction to Ostinato, network packet crafting and generator.
Introduction to Ostinato , network packet crafting and generator.
 
FPGAで作るOpenFlow Switch (FPGAエクストリーム・コンピューティング 第6回) FPGAX#6
FPGAで作るOpenFlow Switch (FPGAエクストリーム・コンピューティング 第6回) FPGAX#6FPGAで作るOpenFlow Switch (FPGAエクストリーム・コンピューティング 第6回) FPGAX#6
FPGAで作るOpenFlow Switch (FPGAエクストリーム・コンピューティング 第6回) FPGAX#6
 
ネットワークAPI のあれこれ (ENOG37)
ネットワークAPI のあれこれ (ENOG37)ネットワークAPI のあれこれ (ENOG37)
ネットワークAPI のあれこれ (ENOG37)
 
ネットワーク機器のAPIあれこれ入門 (NetOpsCoding#2)
ネットワーク機器のAPIあれこれ入門(NetOpsCoding#2)ネットワーク機器のAPIあれこれ入門(NetOpsCoding#2)
ネットワーク機器のAPIあれこれ入門 (NetOpsCoding#2)
 
OpenVZ - Linux Containers:第2回 コンテナ型仮想化の情報交換会@東京
OpenVZ - Linux Containers:第2回 コンテナ型仮想化の情報交換会@東京OpenVZ - Linux Containers:第2回 コンテナ型仮想化の情報交換会@東京
OpenVZ - Linux Containers:第2回 コンテナ型仮想化の情報交換会@東京
 
"OPEN NETWORKING" に向けた Management / Data Plane の動向
"OPEN NETWORKING" に向けた Management / Data Plane の動向"OPEN NETWORKING" に向けた Management / Data Plane の動向
"OPEN NETWORKING" に向けた Management / Data Plane の動向
 

Ähnlich wie OVN 設定サンプル | OVN config example 2015/12/27

Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESQuick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Jan Kalcic
 
ByPat博客出品Lvs+keepalived
ByPat博客出品Lvs+keepalivedByPat博客出品Lvs+keepalived
ByPat博客出品Lvs+keepalived
redhat9
 

Ähnlich wie OVN 設定サンプル | OVN config example 2015/12/27 (20)

Install ovs on local pc
Install ovs on local pcInstall ovs on local pc
Install ovs on local pc
 
Openstack Testbed_ovs_virtualbox_devstack_single node
Openstack Testbed_ovs_virtualbox_devstack_single nodeOpenstack Testbed_ovs_virtualbox_devstack_single node
Openstack Testbed_ovs_virtualbox_devstack_single node
 
OpenNebula 5.4 Hands-on Tutorial
OpenNebula 5.4 Hands-on TutorialOpenNebula 5.4 Hands-on Tutorial
OpenNebula 5.4 Hands-on Tutorial
 
ONOS SDN Controller - Clustering Tests & Experiments
ONOS SDN Controller - Clustering Tests & Experiments ONOS SDN Controller - Clustering Tests & Experiments
ONOS SDN Controller - Clustering Tests & Experiments
 
Baylisa - Dive Into OpenStack
Baylisa - Dive Into OpenStackBaylisa - Dive Into OpenStack
Baylisa - Dive Into OpenStack
 
Ovn vancouver
Ovn vancouverOvn vancouver
Ovn vancouver
 
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESQuick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
 
The Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitchThe Basic Introduction of Open vSwitch
The Basic Introduction of Open vSwitch
 
4. open mano set up and usage
4. open mano set up and usage4. open mano set up and usage
4. open mano set up and usage
 
5. hands on - building local development environment with Open Mano
5. hands on - building local development environment with Open Mano5. hands on - building local development environment with Open Mano
5. hands on - building local development environment with Open Mano
 
using Virtualbox NAT and shared folder
using Virtualbox NAT and shared folderusing Virtualbox NAT and shared folder
using Virtualbox NAT and shared folder
 
ByPat博客出品Lvs+keepalived
ByPat博客出品Lvs+keepalivedByPat博客出品Lvs+keepalived
ByPat博客出品Lvs+keepalived
 
OpenDaylight Integration with OpenStack Neutron: A Tutorial
OpenDaylight Integration with OpenStack Neutron: A TutorialOpenDaylight Integration with OpenStack Neutron: A Tutorial
OpenDaylight Integration with OpenStack Neutron: A Tutorial
 
OVS-NFV Tutorial
OVS-NFV TutorialOVS-NFV Tutorial
OVS-NFV Tutorial
 
[OpenInfra Days Korea 2018] Day 1 - T4-7: "Ceph 스토리지, PaaS로 서비스 운영하기"
[OpenInfra Days Korea 2018] Day 1 - T4-7: "Ceph 스토리지, PaaS로 서비스 운영하기"[OpenInfra Days Korea 2018] Day 1 - T4-7: "Ceph 스토리지, PaaS로 서비스 운영하기"
[OpenInfra Days Korea 2018] Day 1 - T4-7: "Ceph 스토리지, PaaS로 서비스 운영하기"
 
Thebasicintroductionofopenvswitch
ThebasicintroductionofopenvswitchThebasicintroductionofopenvswitch
Thebasicintroductionofopenvswitch
 
3. configuring a compute node for nfv
3. configuring a compute node for nfv3. configuring a compute node for nfv
3. configuring a compute node for nfv
 
OVN DBs HA with scale test
OVN DBs HA with scale testOVN DBs HA with scale test
OVN DBs HA with scale test
 
Openstack openswitch basics
Openstack openswitch basicsOpenstack openswitch basics
Openstack openswitch basics
 
Erlang on OSv
Erlang on OSvErlang on OSv
Erlang on OSv
 

Mehr von Kentaro Ebisawa

Mehr von Kentaro Ebisawa (20)

P4 Updates (2020) (Japanese)
P4 Updates (2020) (Japanese)P4 Updates (2020) (Japanese)
P4 Updates (2020) (Japanese)
 
Barefoot Faster™ 日本語紹介
Barefoot Faster™ 日本語紹介Barefoot Faster™ 日本語紹介
Barefoot Faster™ 日本語紹介
 
IETF106 Hackathon 報告 & P4 based Switch の課題と未来
IETF106 Hackathon 報告 & P4 based Switch の課題と未来IETF106 Hackathon 報告 & P4 based Switch の課題と未来
IETF106 Hackathon 報告 & P4 based Switch の課題と未来
 
MPLS Japan 2019 : Data & Control Plane を繋ぐ API
MPLS Japan 2019 : Data & Control Plane を繋ぐ APIMPLS Japan 2019 : Data & Control Plane を繋ぐ API
MPLS Japan 2019 : Data & Control Plane を繋ぐ API
 
Yang Tools Quick Memo
Yang Tools Quick MemoYang Tools Quick Memo
Yang Tools Quick Memo
 
In Network Computing Prototype Using P4 at KSC/KREONET 2019
In Network Computing Prototype Using P4 at KSC/KREONET 2019In Network Computing Prototype Using P4 at KSC/KREONET 2019
In Network Computing Prototype Using P4 at KSC/KREONET 2019
 
Comparison of SRv6 Extensions uSID, SRv6+, C-SRH
Comparison of SRv6 Extensions uSID, SRv6+, C-SRHComparison of SRv6 Extensions uSID, SRv6+, C-SRH
Comparison of SRv6 Extensions uSID, SRv6+, C-SRH
 
Interop2019 Toyota Netcope P4
Interop2019 Toyota Netcope P4Interop2019 Toyota Netcope P4
Interop2019 Toyota Netcope P4
 
IETF 104 Hackathon VPP Prototyping Stateless SRv6/GTP-U Translation
IETF 104 Hackathon VPP Prototyping Stateless SRv6/GTP-U TranslationIETF 104 Hackathon VPP Prototyping Stateless SRv6/GTP-U Translation
IETF 104 Hackathon VPP Prototyping Stateless SRv6/GTP-U Translation
 
p4srv6 (P4-16) design document rev1.0
p4srv6 (P4-16) design document rev1.0p4srv6 (P4-16) design document rev1.0
p4srv6 (P4-16) design document rev1.0
 
SRv6 Mobile User Plane : Initial POC and Implementation
SRv6 Mobile User Plane : Initial POC and ImplementationSRv6 Mobile User Plane : Initial POC and Implementation
SRv6 Mobile User Plane : Initial POC and Implementation
 
JANOG43 Forefront of SRv6, Open Source Implementations
JANOG43 Forefront of SRv6, Open Source ImplementationsJANOG43 Forefront of SRv6, Open Source Implementations
JANOG43 Forefront of SRv6, Open Source Implementations
 
Using GTP on Linux with libgtpnl
Using GTP on Linux with libgtpnlUsing GTP on Linux with libgtpnl
Using GTP on Linux with libgtpnl
 
GTPing, How To
GTPing, How ToGTPing, How To
GTPing, How To
 
"SRv6の現状と展望" ENOG53@上越
"SRv6の現状と展望" ENOG53@上越"SRv6の現状と展望" ENOG53@上越
"SRv6の現状と展望" ENOG53@上越
 
SRv6 Mobile User Plane P4 proto-type
SRv6 Mobile User Plane P4 proto-typeSRv6 Mobile User Plane P4 proto-type
SRv6 Mobile User Plane P4 proto-type
 
Zebra SRv6 CLI on Linux Dataplane (ENOG#49)
Zebra SRv6 CLI on Linux Dataplane (ENOG#49)Zebra SRv6 CLI on Linux Dataplane (ENOG#49)
Zebra SRv6 CLI on Linux Dataplane (ENOG#49)
 
Zebra 2.0 in Hybrid Cloud Era
Zebra 2.0 in Hybrid Cloud EraZebra 2.0 in Hybrid Cloud Era
Zebra 2.0 in Hybrid Cloud Era
 
p4alu: Arithmetic Logic Unit in P4
p4alu: Arithmetic Logic Unit in P4p4alu: Arithmetic Logic Unit in P4
p4alu: Arithmetic Logic Unit in P4
 
zebra & openconfigd Introduction
zebra & openconfigd Introductionzebra & openconfigd Introduction
zebra & openconfigd Introduction
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 

OVN 設定サンプル | OVN config example 2015/12/27

  • 1. OVN 設定サンプル Open Virtual Network : OVN Config example Twitter: @ebiken | ebiken@gmail.com Open Virtual Network : OVN Config example | 2015/12/27 1
  • 2. About OVN ~ Open Virtual Network (1/2) • Open Virtual Network とは? • 複数の仮想スイッチ(サーバー)を横断する仮想ネットワークを構築するしくみ。 • L2/L3 switch, tunnel, ACL, Security Group 等を提供 Open Virtual Network : OVN Config example | 2015/12/27 2 Server (Hypervisor) VM-1 VM-2 VM-A Server (Hypervisor) VM-3 VM-A Logical Switch Logical Switch Logical Switch VM-1 VM-2 VM-AVM-3 VM-B Logical Router 物理構成 論理構成 OVN利用
  • 3. About OVN ~ Open Virtual Network (2/2) • Open vSwitch (OVS) を利用して構成 • OVSには変更を加えない(既存機能を利用) • 多くの OpenFlow Extensionを利用するため、現状ではOVSのみサポート。 • ex: resubmit, registry, tunnel metadata, conntrack etc. • テナントを分ける仮想ネットワークを構築可能。 • ホスト:仮想マシン(KVM, Xen, Hyper-V)、コンテナ(Docker)等 • 仮想スイッチ:Open vSwitch (OVS) • CMS(Cloud Management System): OpenStack等 • 詳細は次Slide 「OVN参考情報リンク集」 を参照 Open Virtual Network : OVN Config example | 2015/12/27 3
  • 4. OVN参考情報リンク集 • 「OVN (Open Virtual Network) の紹介」 by 進藤さん • http://blog.shin.do/2015/12/ovn-open-virtual-network- %E3%81%AE%E7%B4%B9%E4%BB%8B/ • 日本語の説明BLOG • Network Heresy: OVN, Bringing Native Virtual Networking to OVS • http://networkheresy.com/2015/01/13/ovn-bringing-native-virtual-networking-to-ovs/ • 最初の(オフィシャル)アナウンスBLOG • OVN: Open Virtual Network for Open vSwitch • Slides (PDF) : http://openvswitch.org/support/slides/OVN-Vancouver.pdf • Video: • https://www.openstack.org/summit/vancouver-2015/summit-videos/presentation/ovn-native-virtual- networking-for-open-vswitch • OpenStackとの位置づけを含む解説@OpenStack Summit Vancouver Open Virtual Network : OVN Config example | 2015/12/27 4
  • 5. OVN アーキテクチャ Open Virtual Network : OVN Config example | 2015/12/27 5 ovn-northd Northbound DB (ovnnb.db) Southbound DB (ovnsb.db) ovn-controller ovs-vswitchd OVS DB (conf.db, vtep.db) . CMS (OpenStack etc) OVSDB OpenFlow Communication Protocols ovn-northd  論理トポロジー( Northbound DB)を物理ト ポロジー(Southbound DB)に変換&保存  Logical Flowを生成し SB-DB に保存 ovn-controller  ローカルスイッチ(OVS)上の物理・ 論理ポートの紐づけや状態を Sourthbound DBに登録  物理トポロジー(Southbound DB)を 元にOVSを設定(Flow Rule投入等)  構成情報はデータベースを通じ て伝達(OVSDB Protocol)  OVSは同居する ovn-controller が制御(OVSDB + OpenFlow) ovn-controller ovs-vswitchd 管理サーバー Chassis (Hypervisor) Chassis (Hypervisor) Chassis (Hypervisor)  VMとOVSを収容するサーバー OVS DB (conf.db, vtep.db) .
  • 6. OVN構成・設定例 ovn-northd x 1 + ovn-controller(OVS) x2 Configuration examples. Open Virtual Network : OVN Config example | 2015/12/27 6
  • 7. 構成・設定例:ovn-northd x 1 + ovn-controller(OVS) x2 Open Virtual Network : OVN Config example | 2015/12/27 7 Northbound DB (ovnnb.db) ovn-northd vtap1 veth1 172.16.2.1/24 ns: host1 vtap2 veth2 172.16.2.2/24 ns: host2 bridge: br-int ovn- controller vtap3 veth3 172.16.2.3/24 ns: host3 vtap4 veth4 172.16.2.4/24 ns: host4 bridge: br-int Tunnel (Geneve) Southbound DB (ovnsb.db) 構成概要  物理サーバー3台構成:ovn01/02/03 (但し、 実際はVirtualBoxでVM 3台作成し試験)  作業簡略化のため namespace (ns) を用いて VMを作成(実際にはネットワークのコンテナ)  namespace (ns) は4つ:host1/2/3/4  Tenant 2つ:青(host1, host4)、赤(host2, host3) はそれぞれ後述の2つの論理スイッチ(sw0, sw1)に接続される。  疎通確認結果をわかりやすくするために host1~4 全てに異なるIP address を使用。  実際は異なるテナント間でIPアドレスが重複し ても動作する。 (当然ですが)  CMSは利用せず、論理トポロジーは ovn01 上 で ovn-nbctl コマンドを使い設定。 異なるサーバー(Hypervisor)上のVM を 2つのテナントに分け接続する構成・設定例 intent : 172.16.0.0/24 172.16.0.10/24 172.16.0.20/24 172.16.0.30/24 server: ovn02 server: ovn01 server: ovn03 OVS DB (conf.db, vtep.db) ovn- controller OVS DB (conf.db, vtep.db)
  • 8. 論理構成 Open Virtual Network : OVN Config example | 2015/12/27 8 veth1 172.16.2.1/24 ns: host1 veth2 172.16.2.2/24 ns: host2 veth3 172.16.2.3/24 ns: host3 veth4 172.16.2.4/24 ns: host4 sw1 sw0 Logical Switch : sw0, sw1 sw-port1 vtap1 sw-port2 vtap2 sw-port3 vtap3 sw-port4 vtap4
  • 9. 構成・設定例:ovn-northd x 1 + ovn-controller(OVS) x2 Open Virtual Network : OVN Config example | 2015/12/27 9 設定手順 (using Ubuntu15.10) 全サーバー共通基本設定 1. Install Ubuntu 15.10 Server 2. Update / Upgrade and install build-essential 3. Download OVS (OVN) source code 4. Install OVS (OVN) prerequisites 5. Build OVS (OVN) 6. Configure hostname 7. Configure network connecting servers (intnet) 8. Confirm you can ping between servers Server ovn01: ovnsb, ovnnb, ovn-northdの設定&開始 1. Create OVN database (northbound + southbound) 2. Start ovsdb-server 3. Start ovn-northd Server ovn02,ovn03: ovs-vswitchd, ovn-controller設定・開始 1. Create database (conf.db, vtep.db) 2. Start ovsdb-server & initialize DB 3. Start ovs-vswitchd 4. Set external-ids on conf.db 5. Start ovn-controller, ovn-controller-vtep Server ovn02,ovn03: namespace (VM) host1/host2の設定 1. vtap / veth の作成 2. create namespace and attach veth 3. change interface status to “up” and assign IP address OVN Logical Network の設定 1. Create logical switches and ports 2. Check MAC address of VMs 3. Set MAC address to each logical ports (based on 2.) 4. Bind Logical ports and Physical ports
  • 10. 全サーバー共通基本設定(ovn01/02/03 全3台にて実施) Open Virtual Network : OVN Config example | 2015/12/27 10 1) Install Ubuntu 15.10 Server Software Selection: OpenSSH server 2) Update/Upgrade and install build-essential $ sudo -i # apt-get update # apt-get upgrade # apt-get install build-essential # exit 3) Download OVS (OVN) source code ~$ sudo apt-get install git ~$ git clone https://github.com/openvswitch/ovs.git Read "INSTALL.md" for steps to installation. (including prerequisites) インストール手順詳細は “INSTALL.md” を参照 ~$ cd ovs ~/ovs$ vi INSTALL.md 4) Install OVS (OVN) prerequisites | 必要なパッケージをインストール >> autoconf, automake, libtool-bin, perl, python $ sudo apt-get install autoconf $ autoconf --version autoconf (GNU Autoconf) 2.69 $ automake --version automake (GNU automake) 1.15 $ sudo apt-get install libtool-bin $ libtool --version libtool (GNU libtool) 2.4.2 $ perl --version This is perl 5, version 20, subversion 2 (v5.20.2) $ sudo apt-get install python 5) Build OVS (OVN) | OVS (OVN) のビルド $ cd ovs/ ~/ovs$ ./boot.sh ~/ovs$ ./configure ~/ovs$ make
  • 11. 全サーバー共通基本設定(ovn01/02/03 全3台にて実施) Open Virtual Network : OVN Config example | 2015/12/27 11 6) Configure hostname | ホスト名設定 $ sudo vi /etc/hostname # pick one from ovn01, ovn02, ovn03 ovn0X $ sudo vi /etc/hosts 127.0.0.1 localhost # pick one from ovn01, ovn02, ovn03 127.0.1.1 ovn0X $ sudo reboot 7) Configure network connecting servers (intnet) サーバー間ネットワークの設定。VirtualBox 5.0.10 on Win で intent (内部ネットワーク)を設定した際のインターフェース名は “enp0s8” $ sudo vi /etc/network/interfaces # interface connecting hosts auto enp0s8 iface enp0s8 inet static # pic one from 172.16.0.10, 20, 30 address 172.16.0.XX netmask 255.255.255.0 $ sudo service networking restart 8) Confirm you can ping between servers | ping で疎通確認 ebiken@ovn01:~$ ping 172.16.0.20 PING 172.16.0.20 (172.16.0.20) 56(84) bytes of data. 64 bytes from 172.16.0.20: icmp_seq=1 ttl=64 time=0.624 ms ... ebiken@ovn02:~$ ping 172.16.0.10 PING 172.16.0.10 (172.16.0.10) 56(84) bytes of data. 64 bytes from 172.16.0.10: icmp_seq=1 ttl=64 time=0.260 ms … ebiken@ovn03:~$ ping 172.16.0.10 PING 172.16.0.10 (172.16.0.10) 56(84) bytes of data. 64 bytes from 172.16.0.10: icmp_seq=1 ttl=64 time=0.260 ms
  • 12. Server ovn01: ovnsb, ovnnb, ovn-northd の設定&開始 Open Virtual Network : OVN Config example | 2015/12/27 12 1) Create OVN database (northbound + southbound) ovn-northd と同じサーバー上に作成。 • ovnsb.db: OVN_Northbound // ovn-nb(5) • ovnnb.db: OVN_Southbound // ovn-sb(5) ~/ovs$ sudo mkdir -p /usr/local/etc/openvswitch ~/ovs$ sudo ovsdb-tool create /usr/local/etc/openvswitch/ovnsb.db ovn/ovn-sb.ovsschema ~/ovs$ sudo ovsdb-tool create /usr/local/etc/openvswitch/ovnnb.db ovn/ovn-nb.ovsschema 2) Start ovsdb-server $ sudo ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock --remote=ptcp:6632 --detach --pidfile --log-file /usr/local/etc/openvswitch/ovnsb.db /usr/local/etc/openvswitch/ovnnb.db • “--remote=ptcp:6632” オプションにより、port 6632 経由で ovn-controllerから接続可能になる。 • ファイル名指定無しで --log-file オプションを指定するとovsdb-server は以下ファイルにログを出力する。 • /usr/local/var/log/openvswitch/ovsdb-server.log 3) Start ovn-northd(8) $ sudo ovn-northd --pidfile --detach --log-file Northbound DB (ovnnb.db) ovn-northd ovn-controller Southbound DB (ovnsb.db) intent : 172.16.0.0/24 172.16.0.10/24 172.16.0.20,30/24 server: ovn02,03 server: ovn01 port 6632
  • 13. Server ovn02,ovn03: ovs-vswitchd, ovn-controller設定・開始 Open Virtual Network : OVN Config example | 2015/12/27 13 0) Load kernel module $ lsmod | grep openvswitch $ sudo /sbin/modprobe openvswitch • “lsmod | grep openvswitch” でKernel Moduleがロード済みか確認 1) Create database | OVS用データベース(conf.db, vtep.db)の作成 $ sudo mkdir -p /usr/local/etc/openvswitch ~/ovs$ sudo ovsdb-tool create /usr/local/etc/openvswitch/vtep.db vtep/vtep.ovsschema ~/ovs$ sudo ovsdb-tool create /usr/local/etc/openvswitch/conf.db vswitchd/vswitch.ovsschema 2) Start ovsdb-server & initialize DB $ sudo ovsdb-server --remote=punix:/usr/local/var/run/openvswitch/db.sock --detach --pidfile --log-file /usr/local/etc/openvswitch/vtep.db /usr/local/etc/openvswitch/conf.db $ sudo ovs-vsctl --no-wait -- init ovn- controller 172.16.0.20,30/24 server: ovn02,03 OVS DB (conf.db, vtep.db)
  • 14. Server ovn02,ovn03: ovs-vswitchd, ovn-controller設定・開始 Open Virtual Network : OVN Config example | 2015/12/27 14 3) Start ovs-vswitchd $ sudo ovs-vswitchd --pidfile --detach --log-file 4) Set external-ids on conf.db:Open_vSwitch Table • conf.db:Open_vSwitch Table にexternal-idsを設定。(”set open” は “set Open_vSwitch” の略) • ovn-controller 起動時に external-idsを元に ovn-controller は Chassis (Hypervisor/Server) を ovnsb.db: Chassis table に登録。 • Bridge “br-int” はovn-controller 起動時に自動生成(br-int = integration bridge) Server: ovn02 $ sudo ovs-vsctl set open . external-ids:system-id=56b18105-5706-46ef-80c4-ff20979ab002 $ sudo ovs-vsctl set open . external-ids:ovn-remote=tcp:172.16.0.10:6632 $ sudo ovs-vsctl set open . external-ids:ovn-encap-type=geneve $ sudo ovs-vsctl set open . external-ids:ovn-encap-ip=172.16.0.20 Server: ovn03 $ sudo ovs-vsctl set open . external-ids:system-id=56b18105-5706-46ef-80c4-ff20979ab003 $ sudo ovs-vsctl set open . external-ids:ovn-remote=tcp:172.16.0.10:6632 $ sudo ovs-vsctl set open . external-ids:ovn-encap-type=geneve $ sudo ovs-vsctl set open . external-ids:ovn-encap-ip=172.16.0.30 5) Start ovn-controller(8), ovn-controller-vtep(8) $ sudo ovn-controller --pidfile --detach --log-file bridge: br-int ovn- controller 172.16.0.20,30/24 server: ovn02,03 OVS DB (conf.db, vtep.db)
  • 15. Server ovn02,ovn03: namespace (VM) host1 / host2 の設定 Open Virtual Network : OVN Config example | 2015/12/27 15 1) vtap / veth の作成 Server: ovn02 $ sudo ip link add veth1 type veth peer name vtap1 $ sudo ip link add veth2 type veth peer name vtap2 Server: ovn03 $ sudo ip link add veth3 type veth peer name vtap3 $ sudo ip link add veth4 type veth peer name vtap4 2) create namespace and attach veth • namespaceを作成しvethを紐付け。 • これにより vethX は各namespace(hostY)からのみ参照可能となる。 Server: ovn02 $ sudo ip netns add host1 $ sudo ip netns add host2 $ sudo ip link set veth1 netns host1 $ sudo ip link set veth2 netns host2 Server: ovn03 $ sudo ip netns add host3 $ sudo ip netns add host4 $ sudo ip link set veth3 netns host3 $ sudo ip link set veth4 netns host4 vtap1 veth1 ns: host1 vtap2 veth2 ns: host2 bridge: br-int ovn- controller 172.16.0.20,30/24 server: ovn02,03 OVS DB (conf.db, vtep.db)
  • 16. Server ovn02,ovn03: namespace (VM) host1 / host2 の設定 Open Virtual Network : OVN Config example | 2015/12/27 16 3) change interface status to “up” and assign IP address Server: ovn02 $ sudo ip link set dev vtap1 up $ sudo ip link set dev vtap2 up $ sudo ip netns exec host1 ip link set veth1 up $ sudo ip netns exec host2 ip link set veth2 up $ sudo ip netns exec host1 ifconfig lo up $ sudo ip netns exec host2 ifconfig lo up $ sudo ip netns exec host1 ip addr add 172.16.2.1/24 dev veth1 $ sudo ip netns exec host2 ip addr add 172.16.2.2/24 dev veth2 Server: ovn03 $ sudo ip link set dev vtap3 up $ sudo ip link set dev vtap4 up $ sudo ip netns exec host3 ip link set veth3 up $ sudo ip netns exec host4 ip link set veth4 up $ sudo ip netns exec host3 ifconfig lo up $ sudo ip netns exec host4 ifconfig lo up $ sudo ip netns exec host3 ip addr add 172.16.2.3/24 dev veth3 $ sudo ip netns exec host4 ip addr add 172.16.2.4/24 dev veth4 vtap1 veth1 172.16.2.1/24 ns: host1 vtap2 veth2 172.16.2.2/24 ns: host2 bridge: br-int ovn- controller 172.16.0.20,30/24 server: ovn02,03 OVS DB (conf.db, vtep.db)
  • 17. 3) Set MAC address to each logical ports • “2)” で確認したMAC address を各論理ポートに設定 Server: ovn01 $ sudo ovn-nbctl lport-set-addresses sw-port1 62:1a:d6:91:49:3d $ sudo ovn-nbctl lport-set-addresses sw-port2 ae:de:c6:a4:f9:e4 $ sudo ovn-nbctl lport-set-addresses sw-port3 c2:5b:26:02:7f:87 $ sudo ovn-nbctl lport-set-addresses sw-port4 92:89:78:df:69:c9 OVN Logical Network の設定 Open Virtual Network : OVN Config example | 2015/12/27 17 1) Create a logical switch named "sw0“ and 4 logical ports on "sw0" • ovn01 にて2つの論理スイッチ(sw0, sw1)と4つの論理ポートを作成 Server: ovn01 $ sudo -i # ovn-nbctl lswitch-add sw0 # ovn-nbctl lswitch-add sw1 # ovn-nbctl lport-add sw0 sw-port1 # ovn-nbctl lport-add sw1 sw-port2 # ovn-nbctl lport-add sw1 sw-port3 # ovn-nbctl lport-add sw0 sw-port4 2) Check MAC address of veth1,2,3,4 on Server: ovn02, 03 • veth1,2,3,4 の MAC address を確認。以下はovn02: veth1の例。 root@ovn02:~$ sudo ip netns exec host1 ip a … 9: veth1@if8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 62:1a:d6:91:49:3d brd ff:ff:ff:ff:ff:ff link-netnsid 0 inet 172.16.2.1/24 scope global veth1 valid_lft forever preferred_lft forever inet6 fe80::601a:d6ff:fe91:493d/64 scope link valid_lft forever preferred_lft forever
  • 18. OVN Logical Network の設定 Open Virtual Network : OVN Config example | 2015/12/27 18 4) Bind Logical ports (sw-portX) and Physical ports (vtapX) • 論理ポート(sw-portX)と物理ポート(vtapX)の紐づけ Server: ovn02 $ sudo ovs-vsctl add-port br-int vtap1 -- set Interface vtap1 external_ids:iface-id=sw-port1 sudo ovs-vsctl add-port br-int vtap2 -- set Interface vtap2 external_ids:iface-id=sw-port2 Server: ovn03 $ sudo ovs-vsctl add-port br-int vtap3 -- set Interface vtap3 external_ids:iface-id=sw-port3 $ sudo ovs-vsctl add-port br-int vtap4 -- set Interface vtap4 external_ids:iface-id=sw-port4 5) ping による疎通確認 Server: ovn02 • host1-> host2, host3 :異なる論理スイッチ上のため ping 不可 $ sudo ip netns exec host1 ping 172.16.2.2 PING 172.16.2.2 (172.16.2.2) 56(84) bytes of data. From 172.16.2.1 icmp_seq=1 Destination Host Unreachable $ sudo ip netns exec host1 ping 172.16.2.3 PING 172.16.2.3 (172.16.2.3) 56(84) bytes of data. From 172.16.2.1 icmp_seq=1 Destination Host Unreachable • OK: host1 -> host4 : 同じ論理スイッチ上のため ping 可能 $ sudo ip netns exec host1 ping 172.16.2.4 PING 172.16.2.4 (172.16.2.4) 56(84) bytes of data. 64 bytes from 172.16.2.4: icmp_seq=1 ttl=64 time=1.58 ms
  • 19. 参考:コマンドアウトプット各種 Open Virtual Network : OVN Config example | 2015/12/27 19 Server: ovn01 $ sudo ovn-nbctl show lswitch 655db232-136a-4234-b259-b10ea3b0bda5 (sw0) lport sw-port1 addresses: 62:1a:d6:91:49:3d lport sw-port4 addresses: 92:89:78:df:69:c9 lswitch 0aafe3cf-832c-404f-9250-894a8dd8f88e (sw1) lport sw-port3 addresses: c2:5b:26:02:7f:87 lport sw-port2 addresses: ae:de:c6:a4:f9:e4 $ sudo ovn-sbctl show Chassis "56b18105-5706-46ef-80c4-ff20979ab002" Encap geneve ip: "172.16.0.20" Port_Binding "sw-port2" Port_Binding "sw-port1" Chassis "56b18105-5706-46ef-80c4-ff20979ab003" Encap geneve ip: "172.16.0.30" Port_Binding "sw-port4" Port_Binding "sw-port3“ Server: ovn01 $ sudo ovsdb-client list-dbs OVN_Northbound OVN_Southbound ebiken@ovn01:~/ovs$ sudo ovsdb-client list-tables OVN_Northbound Table ------------------- Logical_Router Logical_Port Logical_Switch ACL Logical_Router_Port ebiken@ovn01:~/ovs$ sudo ovsdb-client list-tables OVN_Southbound Table ---------------- Chassis Encap Multicast_Group Logical_Flow Datapath_Binding Port_Binding
  • 20. 参考:コマンドアウトプット各種 Open Virtual Network : OVN Config example | 2015/12/27 20 Server: ovn02 $ sudo ovs-vsctl show db8c7f2f-6112-4aba-af09-6f968fdd348d Bridge br-int fail_mode: secure Port "ovn-56b181-0" Interface "ovn-56b181-0" type: geneve options: {key=flow, remote_ip="172.16.0.30"} Port "vtap2" Interface "vtap2" Port "vtap1" Interface "vtap1" Port br-int Interface br-int type: internal Server: ovn03 $ sudo ovs-vsctl show db15ad7c-0612-4620-b259-042361a5accc Bridge br-int fail_mode: secure Port "ovn-56b181-0" Interface "ovn-56b181-0" type: geneve options: {key=flow, remote_ip="172.16.0.20"} Port "vtap4" Interface "vtap4" Port "vtap3" Interface "vtap3" Port br-int Interface br-int type: internal Server: ovn01 $ sudo ovsdb-client dump OVN_Southbound Chassis Chassis table _uuid encaps name vtep_logical_switches ------------------------------------ -------------------------------------- -------------------------------------- --------------------- dfb07059-3f8e-4c6e-8c19-12f9e29d1089 [50e21f4c-1686-4ee3-9a0c-900d1533e422] "56b18105-5706-46ef-80c4-ff20979ab002" [] fe402522-e01a-4f87-8dfa-b91a22ade24b [4714934b-9a67-4d4b-90f0-c49b584ff222] "56b18105-5706-46ef-80c4-ff20979ab003" [] $ sudo ovsdb-client dump OVN_Southbound Datapath_Binding Datapath_Binding table _uuid external_ids tunnel_key ------------------------------------ ------------------------------------------------------- ---------- 0817de82-4ffe-48c7-86fa-3df901fb1ccb {logical-switch="0aafe3cf-832c-404f-9250-894a8dd8f88e"} 2 185b458b-ba7b-439b-bce8-ba9cedd690f7 {logical-switch="655db232-136a-4234-b259-b10ea3b0bda5"} 1
  • 21. 参考:コマンドアウトプット各種 Open Virtual Network : OVN Config example | 2015/12/27 21 Server: ovn02 $ sudo ovsdb-client dump Open_vSwitch Open_vSwitch Open_vSwitch table _uuid bridges cur_cfg datapath_types db_version ------------------------------------ -------------------------------------- ------- ---------------- ---------- db8c7f2f-6112-4aba-af09-6f968fdd348d [f2e00409-d348-45f0-8b6d-d21ef78d2a6a] 6 [netdev, system] [] external_ids ---------------------------------------------------------------------------------------------------------------------------------------- {ovn-encap-ip="172.16.0.20", ovn-encap-type=geneve, ovn-remote="tcp:172.16.0.10:6632", system-id="56b18105-5706-46ef-80c4-ff20979ab002"} iface_types manager_options next_cfg other_config ovs_version ssl statistics ------------------------------------------------------------------------ --------------- -------- ------------ ----------- --- ---------- [geneve, gre, internal, ipsec_gre, lisp, patch, stt, system, tap, vxlan] [] 6 {} [] [] {} system_type system_version ----------- -------------- [] [] (見やすいようにフォーマットを一部修正しています)
  • 22. 参考:コマンドアウトプット各種 Open Virtual Network : OVN Config example | 2015/12/27 22 ebiken@ovn02:~/ovs$ sudo ovs-ofctl show br-int OFPT_FEATURES_REPLY (xid=0x2): dpid:00000a04e0f2f045 n_tables:254, n_buffers:256 capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP actions: output enqueue set_vlan_vid set_vlan_pcp strip_vlan mod_dl_src mod_dl_dst mod_nw_src mod_nw_dst mod_nw_tos mod_tp_src mod_tp_dst 1(ovn-56b181-0): addr:6e:8c:bc:49:f4:6e config: 0 state: 0 speed: 0 Mbps now, 0 Mbps max 2(vtap1): addr:06:26:83:78:2c:fa config: 0 state: 0 current: 10GB-FD COPPER speed: 10000 Mbps now, 0 Mbps max 3(vtap2): addr:46:e4:5a:8c:e3:30 config: 0 state: 0 current: 10GB-FD COPPER speed: 10000 Mbps now, 0 Mbps max LOCAL(br-int): addr:0a:04:e0:f2:f0:45 config: PORT_DOWN state: LINK_DOWN speed: 0 Mbps now, 0 Mbps max OFPT_GET_CONFIG_REPLY (xid=0x4): frags=normal miss_send_len=0
  • 23. 参考:コマンドアウトプット各種 Open Virtual Network : OVN Config example | 2015/12/27 23 ebiken@ovn02:~/ovs$ sudo ovs-ofctl dump-tables br-int OFPST_TABLE reply (xid=0x2): table 0 ("classifier"): active=3, lookup=16, matched=16 max_entries=1000000 matching: in_port: exact match or wildcard eth_src: exact match or wildcard eth_dst: exact match or wildcard eth_type: exact match or wildcard vlan_vid: exact match or wildcard vlan_pcp: exact match or wildcard ip_src: exact match or wildcard ip_dst: exact match or wildcard nw_proto: exact match or wildcard nw_tos: exact match or wildcard tcp_src: exact match or wildcard tcp_dst: exact match or wildcard table 1 ("table1"): active=0, lookup=0, matched=0 (same features) table 16 ("table16"): active=8, lookup=8, matched=8 (same features) ... table 17 ("table17"): active=2, lookup=8, matched=8 (same features) table 18 ("table18"): ditto table 19 ("table19"): active=6, lookup=8, matched=8 (same features) table 20 ("table20"): active=0, lookup=0, matched=0 (same features) ... table 32 ("table32"): active=5, lookup=8, matched=8 (same features) table 33 ("table33"): active=4, lookup=10, matched=10 (same features) table 34 ("table34"): active=5, lookup=10, matched=10 (same features) table 35 ("table35"): active=0, lookup=0, matched=0 (same features) ... table 48 ("table48"): active=2, lookup=8, matched=8 (same features) table 49 ("table49"): ditto table 50 ("table50"): active=6, lookup=8, matched=8 (same features) table 51 ("table51"): active=0, lookup=0, matched=0 (same features) ... table 64 ("table64"): active=2, lookup=8, matched=8 (same features) table 65 ("table65"): active=0, lookup=0, matched=0 (same features) ... Note: Tables not listed here are “ditto” ex: table 252 ("table252"): ditto table 253 ("table253"): ditto
  • 24. 参考:コマンドアウトプット各種 Open Virtual Network : OVN Config example | 2015/12/27 24 ebiken@ovn02:~/ovs$ sudo ovs-ofctl dump-flows ovs-ofctl: 'dump-flows' command requires at least 1 arguments ebiken@ovn02:~/ovs$ sudo ovs-ofctl dump-flows br-int NXST_FLOW reply (xid=0x4): cookie=0x0, duration=2437.006s, table=0, n_packets=13, n_bytes=770, idle_age=1611, priority=100,in_port=1 actions=move:NXM_NX_TUN_ID[0..23]- >OXM_OF_METADATA[0..23],move:NXM_NX_TUN_METADATA0[16..30]->NXM_NX_REG6[0..14],move:NXM_NX_TUN_METADATA0[0..15]->NXM_NX_REG7[0..15],resubmit(,33) cookie=0x0, duration=1713.077s, table=0, n_packets=19, n_bytes=910, idle_age=1602, priority=100,in_port=2 actions=load:0x1->NXM_NX_REG5[],load:0x1->OXM_OF_METADATA[],load:0x1- >NXM_NX_REG6[],resubmit(,16) cookie=0x0, duration=1712.380s, table=0, n_packets=3, n_bytes=238, idle_age=1674, priority=100,in_port=3 actions=load:0x2->NXM_NX_REG5[],load:0x2->OXM_OF_METADATA[],load:0x1- >NXM_NX_REG6[],resubmit(,16) cookie=0x0, duration=2236.429s, table=16, n_packets=0, n_bytes=0, idle_age=2236, priority=100,metadata=0x1,vlan_tci=0x1000/0x1000 actions=drop cookie=0x0, duration=2236.407s, table=16, n_packets=0, n_bytes=0, idle_age=2236, priority=100,metadata=0x2,vlan_tci=0x1000/0x1000 actions=drop cookie=0x0, duration=2236.429s, table=16, n_packets=0, n_bytes=0, idle_age=2236, priority=100,metadata=0x1,dl_src=01:00:00:00:00:00/01:00:00:00:00:00 actions=drop cookie=0x0, duration=2236.407s, table=16, n_packets=0, n_bytes=0, idle_age=2236, priority=100,metadata=0x2,dl_src=01:00:00:00:00:00/01:00:00:00:00:00 actions=drop cookie=0x0, duration=2236.429s, table=16, n_packets=19, n_bytes=910, idle_age=1602, priority=50,reg6=0x1,metadata=0x1 actions=resubmit(,17) cookie=0x0, duration=2236.407s, table=16, n_packets=3, n_bytes=238, idle_age=1674, priority=50,reg6=0x1,metadata=0x2 actions=resubmit(,17) cookie=0x0, duration=2236.400s, table=16, n_packets=0, n_bytes=0, idle_age=2236, priority=50,reg6=0x2,metadata=0x2 actions=resubmit(,17) cookie=0x0, duration=2236.385s, table=16, n_packets=0, n_bytes=0, idle_age=2236, priority=50,reg6=0x2,metadata=0x1 actions=resubmit(,17) cookie=0x0, duration=2236.429s, table=17, n_packets=19, n_bytes=910, idle_age=1602, priority=0,metadata=0x1 actions=resubmit(,18) cookie=0x0, duration=2236.407s, table=17, n_packets=3, n_bytes=238, idle_age=1674, priority=0,metadata=0x2 actions=resubmit(,18) cookie=0x0, duration=2236.429s, table=18, n_packets=19, n_bytes=910, idle_age=1602, priority=0,metadata=0x1 actions=resubmit(,19) cookie=0x0, duration=2236.407s, table=18, n_packets=3, n_bytes=238, idle_age=1674, priority=0,metadata=0x2 actions=resubmit(,19) cookie=0x0, duration=2236.429s, table=19, n_packets=16, n_bytes=672, idle_age=1602, priority=100,metadata=0x1,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=load:0xffff- >NXM_NX_REG7[],resubmit(,32) cookie=0x0, duration=2236.407s, table=19, n_packets=0, n_bytes=0, idle_age=2236, priority=100,metadata=0x2,dl_dst=01:00:00:00:00:00/01:00:00:00:00:00 actions=load:0xffff- >NXM_NX_REG7[],resubmit(,32) cookie=0x0, duration=1744.254s, table=19, n_packets=0, n_bytes=0, idle_age=1744, priority=50,metadata=0x1,dl_dst=62:1a:d6:91:49:3d actions=load:0x1->NXM_NX_REG7[],resubmit(,32) cookie=0x0, duration=1744.240s, table=19, n_packets=0, n_bytes=0, idle_age=1744, priority=50,metadata=0x2,dl_dst=ae:de:c6:a4:f9:e4 actions=load:0x1->NXM_NX_REG7[],resubmit(,32) cookie=0x0, duration=1744.225s, table=19, n_packets=3, n_bytes=238, idle_age=1674, priority=50,metadata=0x2,dl_dst=c2:5b:26:02:7f:87 actions=load:0x2->NXM_NX_REG7[],resubmit(,32) cookie=0x0, duration=1742.714s, table=19, n_packets=3, n_bytes=238, idle_age=1611, priority=50,metadata=0x1,dl_dst=92:89:78:df:69:c9 actions=load:0x2->NXM_NX_REG7[],resubmit(,32) cookie=0x0, duration=1701.198s, table=32, n_packets=0, n_bytes=0, idle_age=1701, priority=100,reg7=0xffff,metadata=0x2 actions=load:0x2- >NXM_NX_TUN_ID[0..23],set_field:0xffff/0xffffffff->tun_metadata0,move:NXM_NX_REG6[0..14]->NXM_NX_TUN_METADATA0[16..30],output:1,resubmit(,33) cookie=0x0, duration=1701.198s, table=32, n_packets=3, n_bytes=238, idle_age=1674, priority=100,reg7=0x2,metadata=0x2 actions=load:0x2->NXM_NX_TUN_ID[0..23],set_field:0x2/0xffffffff- >tun_metadata0,move:NXM_NX_REG6[0..14]->NXM_NX_TUN_METADATA0[16..30],output:1 cookie=0x0, duration=1701.178s, table=32, n_packets=3, n_bytes=238, idle_age=1611, priority=100,reg7=0x2,metadata=0x1 actions=load:0x1->NXM_NX_TUN_ID[0..23],set_field:0x2/0xffffffff- >tun_metadata0,move:NXM_NX_REG6[0..14]->NXM_NX_TUN_METADATA0[16..30],output:1 ... snip ...