This article mainly introduces the open VSwitch-Virtual Switch overview, reading this article can have a general understanding of OvS (open VSwitch). So this article mainly answers the following questions:
1. What is a virtual switch and what does it do?
2. Virtual Networks and OvS
3. What are the components of the OvS?
4. Create a network topology using OvS
5. Example
First, what is Open vswitch
OvS is a high-quality, multi-tiered virtual switch (layer of network layering) that is designed to allow large-scale network automation to be extended programmatically while still supporting standard management interfaces and protocols: NetFlow. SFlow ... And it also supports a distributed environment for multiple physical machines. Please see http://openvswitch.org/http://lamoop.com/post/2013-11-18/40060149263 for details.
What's the virtual Exchange? is, the use of software to form a switching component, so also known as a software switch, compared with the traditional physical switch, the virtual switch with a lot of a bit: 1. Flexible configuration, because it is software implementation, a physical server can be configured dozens of too or hundreds of virtual switch, and the number of ports can be flexibly selected 2. Low cost, through the software can easily achieve 10Gbps exchange speed.
So OvS is a virtual switch that can be used to make up a virtual network, and there are other different types of architectures for virtual machines.
Second, virtual network
Plain understanding is that the use of Virtual Switch network, is the virtual network (compared with the physical network),: Green dashed within the form of a virtual network. The exchange of information between its virtual machines is through a virtual switch.
Third, OvS components
With the global concept in view, let's learn more about OvS's internal components. In a nutshell, OvS is made up of these three main components:
1. Ovsdb-sever:ovs database server, used to store the configuration information of the virtual switch. It uses the Ovsdb (JSON-RPC) way to exchange information with the manager and Ovs-vswitchd.
2. Ovs-vswitchd:ovs's core component, which communicates with the upper controller to comply with the OpenFlow protocol, uses OVSDB protocol with Ovsdb-server communication, which communicates with the kernel module through NetLink, It supports multiple independent datapath (bridges), and it implements bindings, and VLANs, by changing the flow table.
3. OvS kernel Module:ovs kernel module, handles packet switching and tunneling, caches flow, forwards if a forwarding rule is found in the kernel's cache, or sends to user space to process.
IV. OvS structure in detail there is a ovs about the understanding, we look at OvS exactly what modules, as well as the role of a module.
Ovs-vswitchd main module to implement switch daemon, including a Linux kernel module which supports stream switching;
Ovsdb-server Lightweight database server provides OVS-VSWITCHD access to configuration information;
OVS-BRCOMPATD let Ovs-vswitch replace Linuxbridge, including acquiring the Linux kernel module of bridge IOCTLs;
OVS-DPCTL is used to configure the switch kernel module; some scripts and specs auxiliary OvS are installed on Citrix XenServer as default switch;
Ovs-vsctl Query and update the configuration of Ovs-vswitchd;
Ovs-appctl Send command message, run related daemon;
The Ovsdbmonitor GUI tool allows remote access to OvS databases and OpenFlow flow tables.
In addition, OvS provides feature implementations that support OpenFlow, including
Ovs-openflowd: a simple openflow switch;
Ovs-controller: a simple openflow controller;
Ovs-ofctl Query and control openflow switches and controllers;
Ovs-pki:openflow switches Create and manage public key frameworks;
Ovs-tcpundump:tcpdump Patch, parse OpenFlow message;
Operating principle:
A kernel module implements multiple "Data paths" (similar to a bridge), each of which can have multiple "vports" (similar to a port inside a bridge). Each data path is also associated with the flow table
Flow table to set operations, and the streams in these flow tables are key information that user space maps based on headers and metadata, and the general operation is to forward packets
to another vport. When a packet arrives at a vport, the kernel module does the processing of extracting key information from its stream and finding the key information in the flow table. When there is a match
Stream when it performs the corresponding operation. If there is no match, it sends the packet to the processing queue in the user space (as part of processing, the user space may set a stream
For subsequent encounters with the same type of packet can be performed in the kernel operation).
V. Examples
1. Between physical machines via virtual Switch
You can see that the two NICs of a virtual machine are the two ports that the virtual switch is virtual.
2. Virtual Switch between virtual machines on a physical machine
The example is a bit simple because the virtual switch doesn't know how to apply it. Added later.
Resources:
Official website: http://openvswitch.org/
http://docs.openvswitch.org/en/latest/
http://docs.openvswitch.org/en/latest/intro/install/
Basic Architecture: http://blog.csdn.net/sqx2011/article/details/39344869
"Network" OvS basic knowledge