Skip to content

OVH networking

OVH uses statically routed addresses with a mandatory virtual MAC per additional IP. Any MAC mismatch makes OVH cut off the server’s network within minutes, so the bridge configuration below clones the physical NIC’s MAC.

These apply to every example below:

  • Bridge name: br0. Avoid virbr0, which libvirt’s default network already uses.
  • IPv4 is /32. OVH gives you a single IPv4 inside a /24, but the host owns one address. Configure it as /32 with an on-link route to the gateway. Using /24 makes the kernel believe other addresses in the block are LAN neighbors when they are not.
  • IPv4 gateway is the .254 of the /24. For 198.51.100.59 the gateway is 198.51.100.254.
  • IPv6 is a routed /64 (High Grade and Scale servers get a /56; Kimsufi servers get a single /128 instead). Configure the host’s IPv6 address with the /64 prefix, not /128. The gateway is the same prefix with the last block of the network part replaced by ff and the host part set to ff:ff:ff:ff: for 2001:db8:303:9a3b::1 the gateway is 2001:db8:303:9aff:ff:ff:ff:ff (leading zeros may be dropped). The gateway sits outside your /64, so the IPv6 default route also needs on-link.
  • Virtual MACs. Each additional IP assigned to an instance needs a virtual MAC generated in the OVH control panel (pick the “vmware” type, any name). The instance NIC must use that MAC, otherwise OVH filters the traffic.
  • One VM, several IPs, one MAC. If a single instance owns more than one OVH IP, every one of those IPs must be tied to the same virtual MAC in the OVH panel.
  • Use OVH resolvers in production: 213.186.33.99 (IPv4) and 2001:41d0:3:163::1 (IPv6).
  • Interface names in the examples (eno1) are examples. Replace with your real default interface from ip route | grep default.

OVH’s own network documentation does not cover a host bridge configuration, since bridging is specific to the hypervisor, not to OVH’s network. The configuration below is VirtConsole’s recommended setup for a KVM host.

Replace the addresses, gateway and MAC below with your own. The examples use documentation values (198.51.100.59, gateway 198.51.100.254, 2001:db8:303:9a3b::1, MAC 02:00:00:aa:bb:cc).

OVH’s Debian 12 templates are cloud-init based and ship netplan, with IPv6 delivered as a routed /64 and IPv4 over DHCP at first boot. Replace the cloud-init netplan file with:

/etc/netplan/50-cloud-init.yaml
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: no
dhcp6: no
optional: true
match:
macaddress: 02:00:00:aa:bb:cc
set-name: eno1
bridges:
br0:
interfaces: [eno1]
macaddress: 02:00:00:aa:bb:cc
addresses:
- 198.51.100.59/32
- 2001:db8:303:9a3b::1/64
routes:
- to: 0.0.0.0/0
via: 198.51.100.254
on-link: true
- to: "::/0"
via: "2001:db8:303:9aff:ff:ff:ff:ff"
on-link: true
nameservers:
addresses: [213.186.33.99, 2001:41d0:3:163::1]
parameters:
stp: false
forward-delay: 0

Apply with netplan apply.

If you installed the server from a custom image rather than an OVH template, there may be no netplan renderer available. Use ifupdown’s /etc/network/interfaces instead, with the same addresses, gateways and pointopoint/on-link equivalents shown on the Hetzner networking page.

Instances also need static configuration; OVH does not offer DHCP for additional IPs. The instance NIC must use the virtual MAC created for that IP in the OVH control panel, never the host’s own MAC. The example below uses the documentation value 198.51.100.80 for the additional IP, with the same .254 gateway as the host.

network:
version: 2
ethernets:
eth0:
dhcp4: no
addresses:
- 198.51.100.80/32
routes:
- to: 0.0.0.0/0
via: 198.51.100.254
on-link: true
nameservers:
addresses: [213.186.33.99]

In VirtConsole, configure the subnet with the .254 of the server’s /24 as the gateway and 255.255.255.255 as the netmask, then attach the additional IP with its virtual MAC to the instance.

  • The server loses network minutes after boot. A MAC mismatch. The bridge must clone the physical NIC’s MAC, and every instance IP needs its virtual MAC from the OVH panel.
  • One instance with several OVH IPs keeps dropping. The IPs are tied to different virtual MACs. Point them all at the same MAC.