Host Network Setup
Wire each Spinifex node for VPC networking: the br-wan Linux bridge, the br-ext and br-int OVS bridges, setup-ovn.sh, and the clustered OVN control plane.
Overview
Each node needs a Linux bridge on its WAN NIC and two OVS bridges before VPC networking can operate. This page gives the physical wiring, the setup-ovn.sh options, the OVN database layout on a multi-node cluster, and the commands that verify the result. For a node on WiFi, WWAN or a cloud VNIC, use routed nat mode instead: see External Connectivity Modes.
Instructions
Bridge Setup: Physical Network Wiring
The WAN NIC must be enslaved to a Linux bridge. This is a hard requirement — setup-ovn.sh will not move the NIC that carries the default route into OVS, and macvlan is no longer supported. The Linux bridge owns the host IP, default route, and any DHCP lease, so SSH and management traffic stay up while OVS/OVN are configured underneath. A dedicated WAN NIC that does not carry SSH or the default route is the only exception: --wan-bridge=br-wan --wan-iface=<nic> adds it directly to an OVS bridge br-wan, and the NIC then has no host IP.
The full datapath chain looks like this:
physical NIC (e.g. `wan`)
└─ enslaved to ─▶ br-wan (Linux bridge — host IP, default route, DHCP)
│
└─ veth pair ─▶ br-ext (OVS bridge — OVN external uplink)
│
└─ localnet ─▶ br-int (OVS integration bridge)
│
└─▶ TAP devices (VM NICs)
setup-ovn.sh auto-detects the Linux bridge that owns the default route (typically br-wan, provisioned by cloud-init / netplan / systemd-networkd). You can override the detection with --wan-bridge=<name>. Once detected, the script creates the OVS bridge br-ext and links it to the WAN bridge with a veth pair. The Linux bridge keeps its IP and routes — no interruption. Bridge-mapping is set to external:br-ext.
If the default route is on a bare physical NIC (no bridge), setup-ovn.sh stops and prints guidance on how to convert the NIC to a bridge before re-running.
Example: Required br-wan State
The host must have something resembling this before setup-ovn.sh is run:
7: br-wan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 26:df:3c:de:d0:c2 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.31/23 brd 192.168.1.255 scope global br-wan
valid_lft forever preferred_lft forever
inet6 fe80::24df:3cff:fede:d0c2/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
The physical NIC (e.g. wan, eth0, eno1) is enslaved to br-wan and has no IP of its own — all L3 state lives on the bridge.
Example netplan that produces this:
network:
version: 2
ethernets:
wan:
dhcp4: false
bridges:
br-wan:
interfaces: [wan]
dhcp4: true
Three Bridges, Three Jobs
Every Spinifex node has three bridges in the datapath:
| Bridge | Type | Created By | Purpose | Ports |
|---|---|---|---|---|
br-wan | Linux bridge | Host (cloud-init / netplan) | Host WAN uplink — owns host IP and default route | Physical WAN NIC, veth peer |
br-ext | OVS bridge | setup-ovn.sh | OVN external uplink (localnet) | veth peer to br-wan |
br-int | OVS bridge | setup-ovn.sh | VM overlay traffic (Geneve tunnels) | VM TAP devices, tunnel ports |
br-wan is provisioned by your distro's network configuration (cloud-init, netplan, systemd-networkd, ifupdown). br-int and br-ext are always created by setup-ovn.sh. setup-ovn.sh accepts a Linux bridge of any name, but vpcd expects the name br-wan. On a veth uplink, vpcd does not start if the master of veth-wan-br is not br-wan.
The link between br-ext and the VM datapath is logical, not physical: OVN's localnet port type maps the logical external switch to br-ext via ovn-bridge-mappings. Frames egressing a VM travel TAP → br-int → OVN pipeline → br-ext → veth → br-wan → physical NIC → wire.
Running setup-ovn.sh
# Auto-detect the WAN bridge (recommended)
sudo setup-ovn.sh
# Explicitly specify the WAN bridge name
sudo setup-ovn.sh --wan-bridge=br-wan
In environments where the WAN IP comes from a router's DHCP server (homelab, small office), add --dhcp to obtain a gateway IP from the router automatically:
sudo setup-ovn.sh --dhcp
This requests an IP from the router's DHCP (e.g., 192.168.1.1 serving addresses on the LAN). This is not Spinifex's internal OVN DHCP that assigns private IPs to VMs — it's your network's existing DHCP server.
| Flags | Result |
|---|---|
| (no flags) | Auto-detect WAN bridge from default route, create br-int + br-ext |
--wan-bridge=<name> | Use the specified Linux bridge as the WAN uplink |
--wan-iface=<name> | With --wan-bridge, add a dedicated WAN NIC directly to an OVS bridge |
--nat-uplink | Routed nat mode: bridge no WAN NIC, create the spx-nat-host transit veth and host masquerade rules |
--dhcp | Obtain the OVN gateway IP from the router's DHCP (ignored with --nat-uplink) |
If no Linux bridge owns the default route, setup-ovn.sh exits with guidance rather than silently breaking host connectivity.
OVN Control Plane on Multi-Node Clusters
How OVN is deployed depends on the size of the cluster, and this is the main reason three servers is the recommended minimum for a multi-server deployment.
| Cluster size | OVN databases | Tolerates |
|---|---|---|
| 1–2 servers | standalone, on the first node | nothing — that node is a single point of failure for the control plane |
| 3 or more | clustered (RAFT) across the first three nodes | loss of any one database node |
Servers beyond the third run the full set of Spinifex services, but do not join the OVN database cluster — they connect to it as clients. The quorum stays at three however large the cluster gets, which is what keeps control-plane write latency stable.
What a control-plane outage actually costs
Less than it sounds. ovn-controller has already programmed the forwarding rules into each host, so running instances keep full networking — east-west, north-south, NAT and security groups all continue to work with the databases down.
What stops is change. Creating a VPC, launching an instance, and updating a security group all need the control plane, because each has to write new logical topology before anything can program it.
So a standalone OVN deployment is a reasonable choice for a lab or a single-server install. It is a poor one for production, where the inability to launch an instance during an outage is usually as bad as the instances being down.
Clustering the databases
The three database nodes are set up with --db-cluster-local-addr, and nodes 2 and 3 additionally point at node 1 with --db-cluster-remote-addr. Compute nodes take --ovn-remote listing all three, so they survive any one of them failing. See Multi-Node Install for the exact commands in sequence.
A clustered database can only be created from scratch — the ovn-central package starts a standalone one on install, so the cluster setup passes --recreate-db to replace it. Confirm the result with:
sudo ovn-appctl -t /var/run/ovn/ovnnb_db.ctl cluster/status OVN_Northbound
Three servers should be listed with exactly one leader. A report of a standalone database means the cluster flags did not take.
Per-Node Configuration
Different nodes in a cluster can have different WAN NICs under the br-wan bridge:
[nodes.node1.vpcd]
external_interface = "br-wan" # br-wan enslaving eno1
[nodes.node2.vpcd]
external_interface = "br-wan" # br-wan enslaving eth1
[nodes.node3.vpcd]
external_interface = "br-wan" # br-wan enslaving bond0
external_interface is the Linux bridge that owns the WAN uplink on this node — not the physical NIC. The physical NIC lives underneath the bridge. spx admin init writes the interface that owns the default route. OVN only requires ovn-bridge-mappings to point at br-ext. The bridge name must be br-wan on every node, because vpcd checks the veth pair against that name.
Bridge Verification
# OVS bridges created by setup-ovn.sh
sudo ovs-vsctl br-exists br-int && echo "br-int OK" || echo "br-int MISSING"
sudo ovs-vsctl br-exists br-ext && echo "br-ext OK" || echo "br-ext MISSING"
# Linux WAN bridge owns the host IP and default route
ip -br addr show br-wan
ip route show default
# Default route's dev should be br-wan (or your WAN bridge name)
# br-ext should have one veth port linking it to br-wan
sudo ovs-vsctl list-ports br-ext
# Expect: a veth name (e.g. "veth-wan-ovs")
# Confirm the matching peer is enslaved to the Linux WAN bridge
sudo bridge link show | grep br-wan
# Bridge mappings must point at br-ext
sudo ovs-vsctl get Open_vSwitch . external-ids:ovn-bridge-mappings
# Output: "external:br-ext"
# Physical NIC is enslaved to br-wan (master should be br-wan)
ip -d link show wan
Network Flow Diagram
Troubleshooting
- WAN NIC not enslaved to a bridge:
setup-ovn.shstops because the default route is on a physical NIC. - Public IP not reachable from WAN: verify the OVS wiring and the bridge mappings.
- OVN DB RAFT cluster: check the database cluster when the control plane stops.