QOS Openvswitch - en
QOS Openvswitch - en
QOS Openvswitch - en
October 2010
Open vSwitch
Server
Open vSwitch Datapath Open vSwitch Controller
Flexibility for Networking in Virtualised Environments Flexible Controller in User-Space Fast Datapath in Kernel
Available from openvswitch.org Development code is available in git Announce, discussion and development mailing lists User-space (controller and tools) is under the Apache license Kernel (datapath) is under the GPLv2 Shared headers are dual-licensed
The rst packet of a ow is sent to the controller The controller programs the datapaths actions for a ow
Usually one, but may be a list Actions include:
Forward to a port or ports, mirror Encapsulate and forward to controller Drop
3 4
And returns the packet to the datapath Subsequent packets are handled directly by the datapath
Server
Open vSwitch Datapath
1 2 4 3
Migration
KVM and Xen provide Live Migration With bridging, IP address migration must occur with in the same L2 network Open vSwitch avoids this problem using GRE tunnels
VLANs
Per-Customer VLANs are desirable for security reasons But there is a limit of 4094 VLANs
More VLANs
IETF / Cisco
RFC5517 Private VLANs
IEEE
802.1ad Provider Bridges (Q-in-Q) 802.1ah Provider Backbone Brides (MAC-in-MAC)
Community
May only communicate with endpoints on promiscuous ports or ports belonging to the same comunity e.g.: Dierent hosts belonging to the same customer
Isolated
May only communicate with endpoints on promiscuous ports e.g.: Hosts that only require access to the gateway
P C1 C2 I
Current standard is 802.1ad-2005, Approved December 2005 Builds on 802.1Q New Framing
C-VID (inner)
Renamed 802.1Q VID There may be more than one C-VID (inner-inner, ...)
S-VID (outer)
Dierent ether-type to C-VID May be translated
DA SA Payload
DA SA VID Payload
802.1 802.1Q
802.1ad
Current standard is 802.1ah-2008, Approved August 2008 Builds on 802.1ad New Framing
MAC encapsulation provides full Client VLAN isolation
Inner MAC is unknown outside of its scope
I-SID: Up to 224 16million backbone services I-VID semantics are the same as the S-VLAN
Only edge switches need to be Provider Backbone Bridge aware Core switches need only be Provider Bridge (802.1ad) aware
802.1 802.1Q
802.1ad
802.1ah
QoS
A rate and burst can be assigned to an Interface Conceptually similar to Xens netback credit scheduler # ovs-vsctl set Interface tap0 ingress_policing_rate=100000 # ovs-vsctl set Interface tap0 ingress_policing_burst=10000 Simple Appears to work as expected
# netperf -4 -t UDP_STREAM -H 172.17.50.253 -- -m 8972 UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_ to +172.17.50.253 (172.17.50.253) port 0 AF_INET Socket Message Elapsed Messages Size Size Time Okay Errors Throughput bytes bytes secs # # 10^6bits/sec 120832 109568 8972 10.01 10.01 146797 146620 0 1052.60 1051.33
tap networking used jumbo frames required to reach line speed (210Mbits/s with 1500 byte frames) virtio should do better?
# netperf -4 -t UDP_STREAM -H 172.17.50.253 UDP UNIDIRECTIONAL SEND TEST from 0.0.0.0 (0.0.0.0) port 0 AF_ to 172.17.50.253 (172.17.50.253) port 0 AF_INET Socket Message Elapsed Messages Size Size Time Okay Errors Throughput bytes bytes secs # # 10^6bits/sec 120832 109568 8972 10.01 10.01 149735 14684 0 1073.66 105.29
Dierence in sent and received packets indicates a ow control problem. virtio should do better?
A port may be assigned one ore more QoS policy Each QoS policy consists of a class and a qdisc
Classes and qdisc use the Linux kernels tc implementation Only HTB classes are supported at this time Each class has a single qdisc associated with it The class of a ow is chosen by the controller
Hard-coding the controller # ovs-ofctl add-flow br0 "in_port=2 ip nw_dst=172.17.50.253 \ idle_timeout=0 actions=enqueue:1:0" # ovs-ofctl add-flow br0 "in_port=3 ip nw_dst=172.17.50.253 \ idle_timeout=0 actions=enqueue:1:1" Only suitable for testing
Add a default queue to the Port table Add enqueue to the FLOOD and NORMAL ports or use NOX (a dierent controller)
Conclusion
Open vSwitch is aimed at addressing short-comings in using bridging in virtualised environments It is a young project and there is much scope to contribute
Extended VLAN support
Private VLANs 802.1ad 802.1ah
Improved QoS
Add a default queue to the Port table Add enqueue to the FLOOD and NORMAL ports or use NOX (a dierent controller)
High-Level Management