20. セキュアチャンネルでコントローラとスイッチを接続
抜粋
The switch must be able to establish communication with a controller
at a user-con?gurable (but otherwise ?xed) IP address, using a user-
speci?ed port. If the switch knows the IP address of the controller,
the switch initiates a standard TLS or TCP connection to the
controller.
出典:OpenFlow Switch Speci?cation version 1.3.0
1 2 3
OpenFlow
コントローラ
tcp://192.168.2.102:6379
!20
21. セキュアチャンネルでコントローラとスイッチを接続
A typical OpenFlow controller manages multiple OpenFlow
channels, each one to a different OpenFlow switch. An OpenFlow
switch may have one OpenFlow channel to a single controller, or
multiple channels for reliability, each to a different controller.
1 2 3
OpenFlow
コントローラ2
OpenFlow
コントローラ1
1 2 3
出典:OpenFlow Switch Speci?cation version 1.3.0
複数コントローラ、スイッチの構成も可能
!21
22. OpenFlowバージョンの確認
When an OpenFlow connection is ?rst established, each side of the
connection must immediately send an OFPT_HELLO message with
the version ?eld set to the highest OpenFlow protocol version
supported by the sender.
出典:OpenFlow Switch Speci?cation version 1.3.0
1 2 3
OpenFlow
コントローラ
バージョン
1.3
バージョン
1.3
サポートしてる最新のバージョンを教えあう
!22
23. スイッチの情報の確認
Features: The controller may request the capabilities of a switch by
sending a features request; the switch must respond with a features
reply that speci?es the capabilities of the switch. This is commonly
performed upon establishment of the OpenFlow channel.
出典:OpenFlow Switch Speci?cation version 1.3.0
1 2 3
OpenFlow
コントローラ
FEATURE_REQUEST
FEATURE_REPLY
? Datapath ID
? ポートの一覧など
Datapath?
スイッチとかブリッジと同じと思ってください
!23
24. パケットの受信
When packets are received by the datapath and sent to the
controller, they use the OFPT_PACKET_IN message:
出典:OpenFlow Switch Speci?cation version 1.3.0
1 2 3
OpenFlow
コントローラ
PACKET_IN
? data?…?パケットの中身
? reason?…?なんでpacket_inしたか
? match?…?どのポートから入ったのかなど
? cookie?…?フロー毎につけられる
!24
39. What is OpenVNet?
? Spin-off project from Wakame-vdc
? 5 developers
? 2279 commits
? Written in Ruby
? 16512 LOCs (5257 LOCs test codes)
? Started March 2013
39
40. Why OpenVNet?
? There are many products offering network virtualization
but not free
? Is there any product to freely try out network
virtualization?
? Wakame-vdc offers network virtualization
? Extract virtual network functionality from Wakame-vdc to
make an independent package
40
41. Advantages of OpenVNet
? Users can create complex networks on top of OpenVNet
? Keep the physical networks simple
Reduce the maintaining cost of the physical networks
? Edge-overlay architecture enables creating complex multi-tenant
networks
No need expensive network switches
? e.g.) quickly preparing an isolated network for experiment
Freely and easily create/destroy networks
41
42. Advantages of OpenVNet
? Virtualizing entire network is dif?cult
? Why not to start network virtualization from smaller
part?
? OpenVNet supports association with legacy network
Seamless network virtualization
42
44. Network model of datacenter
Internet
Datacenter
network
Physical/Virtual server clusters
DNAT / LB
SNAT
DHCP
DNS
44
45. Network model of datacenter
Internet
Datacenter
network
External network
WAN edge network
Datacenter
physical network
LAN edge network
Physical/Virtual server clusters
General
servers
Appliance
servers
Storage
servers
Resources
DNAT / LB
SNAT
DHCP
DNS
45
46. Deployment of agent program
Internet
Datacenter
network
Physical/Virtual server clusters
DNAT / LB
SNAT
DHCP
DNS
Deploy agents for
packet control
agent agent agent
agent agent agent
46
48. Components of OpenVNet
vna (virtual network agent)
vnmgr (virtual network manager)
vnapi (virtual network API)
Agent
other
components
? Con?gure OpenvSwitch (version 1.10.0)
? Include an OpenFlow controller implemented with Trema-edge
? Manage the datacenter network
? Provide database access back-ended by MySQL
? Command vna to do some speci?c actions e.g.) update ?ows
? WebAPI to talk to vnmgr
vnctl (virtual network controller)
? Command line interface to use vnapi
48
50. Model of SDN
Control layer
Resource layer
Application layer
Application Application
Network OS
Network device
Network device
Network device
packet forwardingpacket forwarding
APIAPI
OpenFlow protocol
General applications
Control program that
manages all the network
resources scattered around
the datacenter
Resource pool of network
device
50
51. Model of OpenVNet
Control layer
Resource layer
Application layer
App1 App2
vnmgr
Open
vSwitch
APIAPI
OpenFlow protocol
vna vna vna
Trema-edge Trema-edge Trema-edge
Open
vSwitch
Open
vSwitch
VM VM VM VM VM
} ZeroMQ
via unix socket
51
52. Deployment
External network
WAN edge network
Datacenter
physical network
LAN edge network
General
servers
Appliance
servers
Storage
servers
Resources
52
53. Deployment
External network
WAN edge network
Datacenter
physical network
LAN edge network
General
servers
Appliance
servers
Storage
servers
Resources
Open
vSwitch
eth0 eth1
VM
vna
Open
vSwitch
eth0 eth1
VM
vna
public line
management line
A dedicated line for management
Packets for the service go through
the public line
53
54. Packet forwarding in OpenVNet
? MAC2MAC
? Forward packet based on MAC address
? GRE Tunnel
? Over L3 routing
? VNet edge
? PerformVLAN ID translation
? Associate with legacy network
54
55. Packet forwarding in OpenVNet
? Security Groups
? De?ne packet forwarding rules to achieve
network isolation
? Virtual Router
? Make it possible to route from vnet to vnet
55
72. Advantages of OpenVNet
? Virtualizing entire network is dif?cult
? Why not to start network virtualization from smaller
part?
? OpenVNet supports association with legacy network
Seamless network virtualization
72
73. VNet edge
Open
vSwitch
eth0 eth1
vna
public line
Open
vSwitch
eth0 eth1
vna
eth2
Edge server
Legacy
L2 switch
legacy line
eth0
Legacy machine
PerformVLAN ID translation
VM1
Network ID 2
? Associate the legacy machine to the virtual network ID 2
? Edge server is responsible forVLAN ID translation
? Legacy machine is connected to the edge server over L2 network
73
74. VNet edge
Open
vSwitch
eth0 eth1
VM1
vna
public line
Open
vSwitch
eth0 eth1
vna
eth2
Edge server
Legacy
L2 switch
legacy line
eth0
Legacy machine
Send a packet from a legacy machine
? Suppose the legacy machine is associated withVLAN ID 100
74
75. VNet edge
Open
vSwitch
eth0 eth1
VM1
vna
public line
Open
vSwitch
eth0 eth1
vna
eth2
Edge server
Legacy
L2 switch
legacy line
eth0
Legacy machine
Open vSwitch forwards the packet to the OF
controller
TranslatesVLAN ID 100 to network ID 2
VLAN vnet
100 2
75
76. VNet edge
Open
vSwitch
eth0 eth1
VM1
vna
public line
Open
vSwitch
eth0 eth1
vna
eth2
Edge server
Legacy
L2 switch
legacy line
eth0
Legacy machine
After the translation, the packet is forwarded by
MAC2MAC
VLAN vnet
100 2
76
77. VNet edge
Open
vSwitch
eth0 eth1
VM1
vna
public line
Open
vSwitch
eth0 eth1
vna
eth2
Edge server
Legacy
L2 switch
legacy line
eth0
Legacy machine
VLAN vnet
100 2
The legacy machine can participate in the virtual network
77
78. VNet edge
Open
vSwitch
eth0 eth1
VM1
vna
public line
Open
vSwitch
eth0 eth1
vna
eth2
Edge server
Legacy
L2 switch
legacy line
VLAN vnet
100 2
VM1 sends/receives the packet as if the Legacy machine is in
the same L2 network
78
eth
Legacy