Skip to content

Configuring a bridged network on Debian for OVH & SYS hypervisors

OVH and So You Start are extremely popular choices for hypervisors due to cost, speed and availability of IPs. However, these providers run strict networking and require explicit MAC address assignment (with the exception of vrack subnets) when bridging networks.

At the time of writing, OVH and SYS offer a Debian 11 template and that's what this guide is based off.

You can either install the hypervisor software first or after you have configured the bridged networking.

One thing that must be installed to configure the bridge is brctl which is part of the bridge-utils package. Make sure its installed.

apt install bridge-utils -y

Bridge Setup

On the OVH Debian 11 template install a standard /etc/network/interfaces file will look similar to this.

source-directory /etc/network/interfaces.d

And will have a corresponding cloud-init configuration in /etc/network/interfaces.d.

The templates used by OVH are provisioned using cloud-init which is not really required once the hypervisor has been set up. It's wise to remove cloud-init and set a persistent network.

To remove cloud-init run the following:

apt-get purge cloud-init
rm -rf /etc/cloud/
rm -rf /var/lib/cloud/

To set up the persistent network (including the bridge) the /etc/network/interfaces file should be as follows (it should not contain source-directory /etc/network/interfaces.d):

auto lo
  iface lo inet loopback

auto <INTERFACE>
  iface <INTERFACE> inet manual

auto br0
  iface br0 inet static
   bridge_ports <INTERFACE>
   address <IPADDRESS>
   gateway <GATEWAY>
   netmask <NETMASK>
   dns-nameservers <DNS1> <DNS2>
   hwaddress ether <MACADDRESS>
   bridge_stp off
   bridge_waitport 0
   bridge_fd 0

<INTERFACE> should be replaced with the main interface name of the server. It's most likely eno1 but to be sure run ip a to list the interfaces on the server.

<IPADDRESS> should be the main ipv4 address of the server. which can also be double-checked using ip a.

<GATEWAY> should be set to the correct gateway. This is usually the last ip in the primary ips subnet (.254).

<NETMASK> can be set to 255.255.255.0 or 255.255.255.255.

<DNS1> <DNS2> can be set to your favorite public nameserver. 8.8.8.8 & 8.8.4.4 for Google.

<MACADDRESS> MUST be set to the MAC address of the primary network interface which again can also be found using ip a.

Once you have it configured. It should look something along the lines of this:

auto lo
  iface lo inet loopback

auto eno1
  iface eno1 inet manual

auto br0
  iface br0 inet static
   bridge_ports eno1
   address 100.100.100.25
   gateway 100.100.100.254
   netmask 255.255.255.0
   dns-nameservers 8.8.8.8 8.8.4.4
   hwaddress ether 00:25:90:ed:c1:d0
   bridge_stp off
   bridge_waitport 0
   bridge_fd 0

You can now restart the networking. It's also wise to reboot the server at this point.

systemctl restart networking

If you've not already installed the hypervisor software, you should do that now.

VirtFusion Configuration

IPv4 addresses need to be configured correctly in VirtFusion for them to work. You must generate MAC addresses for each of your IPs in the OVH/SYS control panel and update the IPs in VirtFusion to match (Admin -> IP Addresses -> + MAC).

IPv6 does not require any special treatment. The supplied /64 that OVH offer will subnet down correctly.

Back to top