Mar 3, 2025

Open vSwitch Configure: A Step-by-Step Guide

Meta Description: Learn how to configure Open vSwitch on Ubuntu 20.04 with this step-by-step guide. Start, stop, restart, check status, and enable protocols with ease.

Author

Faiz Ahmed FarooquiPrincipal Technical Consultant.
Open vSwitch Configure: A Step-by-Step Guide

Understanding the vast array of features and capabilities that Open vSwitch (OVS) offers is only half the battle; properly implementing them in your network architecture is the other. The previous article served as a guide to installing OVS. Building on that, this guide will demonstrate how to initialize and utilize Open vSwitch on Ubuntu 20.04 using ovs-ctl.

OVS-ctl is a controller program that is designed to manage Open vSwitch daemons. It works by internally calling system startup scripts and should not typically be invoked directly by system administrators.

Initialization and Usage Steps

Start Open vSwitch

The simplest way to start OVS in Ubuntu 20.04 is to run the following command:

ovs-ctl --system-id=random start

This command starts Open vSwitch and performs several tasks such as loading the Open vSwitch kernel module, creating a new database file if it doesn't exist, starts ovsdb-server if it's not already running and initializes some values in the database.

Stop Open vSwitch

OVS can be easily stopped in Ubuntu by running the following command:

ovs-ctl stop

This command stops the ovs-vswitchd and ovsdb-server daemons, but it does not unload the Open vSwitch kernel modules. If the OVS daemons aren’t running, this command will simply do nothing and complete successfully.

Restart Open vSwitch

The restart command is used to perform a stop followed by a start command. This can be performed using the following command:

ovs-ctl --system-id=random restart

This command also has the benefit of saving and restoring OpenFlow flows for each individual bridge.

Check Open vSwitch Status

If you want to verify whether the Open vSwitch daemons ovs-vswitchd and ovsdb-server are running, you can use the status command as follows:

ovs-ctl status

This command prints messages that inform you of the daemons' statuses.

Check Open vSwitch Version

You can confirm the version of your Open vSwitch by running:

ovs-ctl version

This command runs ovsdb-server --version and ovs-vswitchd --version and displays the results.

Enable a Protocol

If you want to enable a protocol in the system iptable configuration, enable-protocol command can be used. This command checks for rules related to a specified protocol in the system’s iptables configuration. If there are no rules specifically related to that protocol, then it inserts a rule to accept the specified protocol:

ovs-ctl --protocol=<protocol> enable-protocol

Replace <protocol> with the name of the IP protocol to be enabled. If no protocol is explicitly stated, the command defaults to enabling the gre protocol.

Conclusion

Open vSwitch is a crucial part of modern networking, offering a robust and feature-rich platform for network virtualization. With the above basic commands, you can control the Open vSwitch service on your Ubuntu 20.04 and manage your virtual networking configuration effectively.

Remember that practice makes perfect. As you spend more time with OVS, you will become more comfortable navigating its many features and capabilities. Stay tuned for more in-depth articles detailing advanced Open vSwitch operations and potential use cases. Happy networking!

Source: This blog is authored by Faiz Ahmed, Principal Technical Consultant at GeekyAnts. Originally published on Hashnode: Read here.

Subscribe to Our Newsletter

RELATED ARTICLES

More from the engineering frontline.

Dive deep into our research and insights on design, development, and the impact of various trends to businesses.
The Bug That Doesn't Show Up in Code Review: Why Your Flutter Web App Reloads on Safari

Aug 19, 2026

The Bug That Doesn't Show Up in Code Review: Why Your Flutter Web App Reloads on Safari
A real-world look at how oversized images can trigger Safari reloads and iOS crashes in Flutter apps and how smarter image decoding prevents them.
From Prompting to Process: What Changed When Flutter Shipped Agent Skills

Aug 19, 2026

From Prompting to Process: What Changed When Flutter Shipped Agent Skills
This blog explores how Flutter Agent Skills improve AI-assisted development by combining official framework workflows with project-specific guidance for more consistent development.
Why Everything Your AI Builds Looks the Same

Aug 19, 2026

Why Everything Your AI Builds Looks the Same
This blog explores why AI-generated interfaces often look alike and explains how design systems, product context, and reusable engineering practices help teams build distinctive, scalable
How We Built the Missing Bridge from Code to Figma
Technology

Jul 10, 2026

How We Built the Missing Bridge from Code to Figma
This blog explores how AI-generated React apps get turned into fully editable, designer-ready Figma files by reading React Fiber instead of the DOM.
Building a Resilient Hybrid-Cloud Network with WireGuard HA, Route-Based Failover, and Deep Observability
Technology

Jun 27, 2026

Building a Resilient Hybrid-Cloud Network with WireGuard HA, Route-Based Failover, and Deep Observability
A practical breakdown of building resilient AWS-to-on-premises connectivity with WireGuard HA, active-standby failover, and deep packet-forwarding observability.
We Built a 114-Second AWS-to-Azure Failover. Here’s What We Learned
Technology

Jun 19, 2026

We Built a 114-Second AWS-to-Azure Failover. Here’s What We Learned
A practical guide to building a 114-second multi-cloud disaster recovery failover between AWS and Azure — what we built, what broke, and what we learned.
Cloud-Native and Cloud-Agnostic Are Not Ideologies; They Are Business-Stage Decisions
Technology

Jun 12, 2026

Cloud-Native and Cloud-Agnostic Are Not Ideologies; They Are Business-Stage Decisions
This blog explains how organizations can balance speed, scalability, and operational flexibility as they grow from startup to enterprise scale.

The Right Conversation Can Save You Six Months.

Whether you’re navigating AI adoption, modernizing legacy systems, or scaling a product - we start by listening. No pitch deck. No template. A real conversation.

Open vSwitch Configure: A Step-by-Step Guide for Ubuntu - GeekyAnts