Open VSwitch (hereinafter referred to as OVS) is a virtual switch led by Nicira NX, running on a virtualized platform such as Kvm,xen. On the virtualization platform, OVS can provide 2-layer switching function for the dynamically changing endpoints, and control the access strategy, network isolation, http://www.aliyun.com/zixun/aggregation/12060.html "" and traffic monitoring in the virtual network.
OVS follows the Apache 2.0 license and supports a wide range of standard management interfaces and protocols. OVS also provides support for the OpenFlow protocol, which allows remote management control of OVS using any controller that supports the OpenFlow protocol.
Open VSwitch Overview
In OVS, there are several very important concepts:
Bridge:bridge represents an Ethernet switch (switch) where one or more bridge devices can be created in one host. Port: Ports are similar to the port concept of a physical switch, with each port attached to a bridge. Interface: A network interface device connected to Port. In general, port and Interface are one-to-one relationships, and port and Interface are one-to-many relationships only after the port is configured with the bond mode. Controller:openflow Controller. OVS can accept the administration of one or more OpenFlow controllers at the same time. DataPath: In OVS, DataPath is responsible for data interchange, which is to match the packets received from the receiving port in the flow table and perform the matching action. Flow table: Each datapath is associated with a "flow table", and when DataPath receives the data, OVS looks in the flow table to match the flow, performing the corresponding action, such as forwarding the data to another port.
Open VSwitch Experimental Environment configuration
OVS can be installed in the mainstream Linux operating system, users can choose to install a compiled package directly, or download the source code to compile the installation.
In our lab environment, the operating system used is 64-bit Ubuntu Server 12.04.3 LTS, and the Open VSwitch is installed via the source code 1.11.0
$ Lsb_release-ano LSB modules are available. Distributor ID:UbuntuDescription:Ubuntu 12.04.3 lts920.html ">release:12.04codename:precise
OVS source code Compilation installation method can refer to the official documentation how to Install Open vSwitch on Linux, FreeBSD and NetBSD.
After installation, check the operation of OVS:
$ Ps-ea | grep ovs12533? Unlimited ovs_workq12549? 00:00:04 ovsdb-server12565? 00:00:48 ovs-vswitchd12566? Unlimited Ovs-vswitchd
View OVS version information, we installed the version of the 1.11.0
$ ovs-appctl--versionovs-appctl (Open vSwitch) 1.11.0Compiled Oct 28 2013 14:17:16
View the version of the OpenFlow protocol supported by OVS
$ ovs-ofctl--versionovs-ofctl (Open vSwitch) 1.11.0Compiled Oct 2013 14:17:17openflow versions 0x1:0x4
OpenFlow practice based on Open VSwitch
OpenFlow is the protocol used to manage the switch flow table, Ovs-ofctl is the command-line tool provided by OvS. In a mode where the OpenFlow controller is not configured, users can use the OVS-OFCTL command to connect OvS through the OpenFlow protocol, create, modify, or delete flow table entries in OvS, and dynamically monitor the health of the OvS.
Figure 1. OpenFlow Matching Process