The virtual networking we will focus on here will all be Linux based as we only use Linux for virtualization at Host Africa. Virtual networking or Software Defined Networking (SDN) is the way we set up networks in cloud environments. SDN is a method to provide the same functionality in a virtual environment as you can build in an actual physical infrastructure.

The Switch

Virtual Switches

To enable virtual networks, we need virtual switches. While there are very complex software switches available as Virtual Images, the fastest and most efficient method is to use Linux Bridging. A Linux bridge is really a virtual switch. The Bridge module is a Linux kernel module first introduced in kernel version 2.2 around 2000. We use the brctl (bridge control) command to administer the Linux bridge.

How does this work?

A few basic concepts are needed first:

  1. Every bridge (VSwitch) must be associated or bound to a physical interface. This is how virtual traffic is routed to physical networks. As you can only ever bind ONE bridge to ONE interface and you often need many more bridges than interfaces, this can be an issue. For this, we have a solution (discussed later).
  2. Multiple virtual interfaces are bound to a single bridge by IP Pools (each IP pool is bound to a bridge).
  3. Different bridges cannot communicate with each other unless the traffic is routed. Public IP’s are usually routed, but  Private IP ranges usually need a virtual router to communicate with other Private IP ranges. A routing entry on the Linux host can also allow this.
  4. Each bridge is in effect a VLAN (Virtual Lan) and thus an isolated switch.
  5. Bridges on separate hosts need to meet two requirements to communicate:
    1. They must share the same name and thus be bound to the same IP pool
    2. Each bridge must have an IP that is part of the IP pool it belongs to.

The Bridge – Physical interface bond

As we usually need many bridges that route over the same physical interface, and we can only bond on a one to one ratio, we need a solution. Luckily Linux has the perfect solution – virtual interfaces. The main/physical interfaces usually get a base number i.e eth0, eth1, eth2 or eno0, eno1, eno2. Virtual interfaces reference this base number but add a tag i.e eth0.100 or eth0.0.

Using this, we usually create a virtual interface with a name relating to the bridge bonded to it i.e eth0.123 is bonded to br_123. This helps keep thing clearer for the other sysadmins who need to maintain the system.

The Bridge – VPS Interface

To each bridge, all the VPS’s that need to see each other or need to connect to the same REALM (i.e internet) have an interface bound to the specific bridge. One can see this if you run the command “brctl show” on the host system.

In summary, The basics of virtual networking are not really complicated. All that is needed is the same care in planning that you would use with any decent network build.

Host AfricaHappy Hosting!


we're happy to help!

Talk to a hosting specialist today and discover which options will work best for you.

Call us on +27 21 554 3096
Copyright © 2020 HOSTAFRICA - All rights reserved.

By visiting this website, you agree to its terms of use, which can be accessed by clicking on the following link: Website Terms of use
We Accept: EFT, Debit Cards, Credit Cards and Mobile Payments
Accepted payment methods