Got it

What is OVS?

Latest reply: Jan 26, 2022 05:34:28 1095 14 9 0 0

Hello, everyone!

Open vSwitch (OVS) is an open-source virtual switch that supports OpenFlow. The working principle is similar to that of a physical switch.

The two ends of a virtual switch are connected to physical network adapters and multiple virtual network adapters. The virtual switch maintains a mapping table and searches for MAC addresses.

Find the corresponding virtual machine link to complete data forwarding.

 1. OVS architecture

OVS architecture

2. Functions of OVS components


The daemon is the protocol control plane of the vSwitch. It processes service configuration data and communicates with the kernel-mode openvswitch.ko (netlink) to forward received packets and learn MAC addresses.


The fast forwarding plane of the vSwitch forwards packets based on the OpenFlow flow table, receives the ovs-vswitchd configuration, and adds bridges, ports, and OpenFlow.


Lightweight database service, which stores the configuration information of the entire OVS, including interfaces, switching content, VLANs, and (excluding OpenFlow data).


A tool that configures the switch kernel module to control forwarding rules.


Obtains or modifies ovs-vswitchd configurations, adds or deletes bridges and ports, and sets interface attributes (interacts only with ovsdb-server).


It sends commands to the OVS daemon,


Open flow configuration of the vSwitch (interacting only with ovs-vswitchd)

3. OVS packet forwarding process

OVS packet forwarding process

Step 1. After the data packet reaches the virtual NIC, it is uploaded to the datapath.

Step 2. The Datapath checks whether the cache can directly forward the packet. If no record is found in the cache, the kernel sends an upcall to the user space vswitchd through the netlink.

Step 3. vswitchd examines the database to see where the destination port of the packet is. To operate the OpenFlow flow table, you need to interact with ovsdb and ovs-ofctl.

Step 4. Update the kernel-mode flow table.

Step 5. Reinject the packet to the datapath and resend the packet.

Step 6. Query the flow table again, obtain the precise forwarding rule of the data packet, and forward the data packet according to the rule.

Step 7. Forward Packets.

4.  Common Commands

Check the network status of the Open vSwitch.

ovs-vsctl show

Add Bridge

ovs-vsctl add-br br0

Deleting a Bridge

ovs-vsctl del-br br0

ovs-vsctl --timeout=2 --if-exists del-br br0

Check whether the bridge exists.

ovs-vsctl br-exists br0

List all bridges

ovs-vsctl list-br

Displays the bridges with VLANs.

ovs-vsctl br-to-vlan br0

Displays the parent bridge of the bridge.

ovs-vsctl br-to-parent br0

Displays port information in the open vSwitch.

ovs-ofctl show ovs-switch

Viewing All Tables on a Switch

ovs-ofctl dump-tables ovs switch

ovs-ofctl dump-tables-desc ovs-switch

Displays all flow entries on the switch.

ovs-ofctl dump-flows ovs-switch

Check the status of each switch port on br0.

ovs-ofctl dump-ports br0

ovs-ofctl dump-ports-desc br0

Viewing Data Paths in the Kernel

ovs-dpctl show

Viewing Flow Tables in the Kernel

ovs-dpctl dump flows

That's all, thanks!

  • x
  • convention:

Created Dec 24, 2021 00:50:44

View more
  • x
  • convention:

olive.zhao Created Dec 25, 2021 00:38:33 (0) (0)
Admin Created Jan 4, 2022 09:37:11

Open vSwitch is a production quality, multilayer virtual switch licensed under the open source Apache 2.0 license. It is designed to enable massive network automation through programmatic extension, while still supporting standard management interfaces and protocols (e.g. NetFlow, sFlow, IPFIX, RSPAN, CLI, LACP, 802.1ag). In addition, it is designed to support distribution across multiple physical servers similar to VMware's vNetwork distributed vswitch.
View more
  • x
  • convention:

olive.zhao Created Jan 5, 2022 03:29:57 (0) (0)
Created Jan 5, 2022 03:16:12

A good overview of the topic.
View more
  • x
  • convention:

olive.zhao Created Jan 5, 2022 03:31:10 (0) (0)
Created Jan 5, 2022 05:42:19

Great one
View more
  • x
  • convention:

Moderator Author Created Jan 10, 2022 05:10:50

Amazing write up for necessary information
View more
  • x
  • convention:

olive.zhao Created Jan 11, 2022 01:05:12 (0) (0)
Moderator Author Created Jan 11, 2022 04:43:54

please must continue to share new info like that
View more
  • x
  • convention:

Created Jan 19, 2022 15:17:34

Good article! Thank you
View more
  • x
  • convention:

MVE Created Jan 22, 2022 12:11:45

View more
  • x
  • convention:

Created Jan 22, 2022 12:13:09

Thanks for sharing
View more
  • x
  • convention:

Back to list


You need to log in to comment to the post Login | Register

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits


Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Please bind your phone number to obtain invitation bonus.
Information Protection Guide
Thanks for using Huawei Enterprise Support Community! We will help you learn how we collect, use, store and share your personal information and the rights you have in accordance with Privacy Policy and User Agreement.