Skip to content

Multiple Internet Connections

If you have two internet connections, Weaver can use both at the same time. You tell it how to split each server’s connections between the two lines, and if one line goes down, the other picks up its share.

This builds on Advanced Networking, which is worth a skim first.

The examples on this page use two lines:

  • ISP A on eth0, with this machine at 192.168.1.50 and the router at 192.168.1.1
  • ISP B on eth1, with this machine at 192.168.2.50 and the router at 192.168.2.1

Replace these with your own names and addresses.

Each line has to reach the Weaver machine on its own network port (or its own VLAN), and each port needs a default gateway pointing at that line’s router. If a port has no gateway, Weaver can’t get to the internet through it.

Your news provider’s connection limit covers both lines together. If your plan allows 50 connections and you split them 60/40, you get 30 on one line and 20 on the other.

Follow the section for your platform, then carry on from Adding The Egresses.

Windows doesn’t let a program pick a network adapter by name, so you’ll point Weaver at each adapter’s IP address instead.

Open a command prompt and run ipconfig. Both adapters should list an IPv4 address and a default gateway:

Ethernet adapter Ethernet:
IPv4 Address. . . . . . . . . . . : 192.168.1.50
Default Gateway . . . . . . . . . : 192.168.1.1
Ethernet adapter Ethernet 2:
IPv4 Address. . . . . . . . . . . : 192.168.2.50
Default Gateway . . . . . . . . . : 192.168.2.1

If one of them has a blank default gateway, open that adapter’s IPv4 settings and fill it in.

When you add the egresses, choose Source address and enter 192.168.1.50 for one and 192.168.2.50 for the other.

Check that both ports are up and have addresses:

$ ip -br addr
eth0 UP 192.168.1.50/24
eth1 UP 192.168.2.50/24

Then check that each one has a default route:

$ ip route show default
default via 192.168.1.1 dev eth0 metric 100
default via 192.168.2.1 dev eth1 metric 200

The metrics can differ; that only decides which line the rest of the system prefers. If eth1 is missing from this list, add a gateway for it in whatever manages your network (NetworkManager, netplan, or systemd-networkd), with a higher metric than eth0.

When you add the egresses, choose Network interface and pick eth0 for one and eth1 for the other. On Linux 5.7 or newer this works as a normal user. Older kernels need the CAP_NET_RAW capability.

Binding by source address on Linux

Choosing Source address on Linux doesn’t change which port the traffic leaves from. Linux still follows its main routing table. If you want to bind by address anyway, add a rule that sends traffic from ISP B’s address through ISP B’s router:

sudo ip route add default via 192.168.2.1 dev eth1 table 200
sudo ip rule add from 192.168.2.50 table 200

These are lost on reboot. To keep them, look up “policy routing” or “routing policy rules” in the docs for NetworkManager, netplan, or systemd-networkd.

  1. Plug each line into its own port, and give each port an address and gateway under Settings → Network Settings.
  2. Go to the Docker tab, click the Weaver icon, and choose Edit.
  3. Change Network Type to Host and click Apply.

Host networking lets Weaver see the server’s real ports. On the default bridge network it only sees the container’s own adapter. The WebUI stays on port 9090 of the server.

When you add the egresses, choose Network interface. If bridging is turned on in Unraid, the ports show up as br0 and br1; otherwise they’re eth0 and eth1. Unraid’s kernel is newer than 5.7, so you don’t need to add any capabilities.

The easy way is host networking. Set up the host as described under Linux, then run Weaver with network_mode: host:

services:
weaver:
image: ghcr.io/scryer-media/weaver:latest
network_mode: host

Weaver listens on port 9090 of the host. Docker ignores any ports: entries in host mode, so you can remove them.

On Docker’s default bridge network, Weaver only sees the container’s own adapter, and the Networking page will tell you so. If host networking isn’t an option, you’ll need to give the container one network per line. That setup depends a lot on your host, so we won’t cover it here, but these are good things to search for:

  • “docker macvlan network” or “docker ipvlan network”, to attach the container straight to each physical port
  • “docker compose multiple networks”, to connect one container to two networks
  • “linux policy routing ip rule”, to make traffic from each address leave through its own router

Once the container has an adapter for each line, add the egresses with Network interface, the same as on Linux.

If your host kernel is older than 5.7, the container also needs NET_RAW. The Weaver image drops it at startup unless you ask it to keep it:

cap_add:
- NET_RAW
environment:
WEAVER_RETAIN_NET_RAW: "true"

An egress is a way out of the machine. You need one per line.

Go to Settings → Networking → Egress, click Add egress, and create these two:

NameBindingValue
ISP ANetwork interface (Windows: Source address)eth0 (Windows: 192.168.1.50)
ISP BNetwork interface (Windows: Source address)eth1 (Windows: 192.168.2.50)

Click Test next to each one and enter your news server’s address. The result shows which address the connection really came from. If both egresses report the same address, they’re going out the same line, so go back and check the setup for your platform.

Go to Settings → Networking → Routes and click Edit route next to one of your servers.

  1. Set the first leg’s Egress to ISP A and its Path to Direct.
  2. Click Add leg. Set its Egress to ISP B and its Path to Direct.
  3. Set a Weight for each leg. Try to match the line speeds. For a 1 Gbit line and a 500 Mbit line, 67 and 33 is about right.
  4. Leave When a leg goes down set to Redistribute. That way, if one line drops, the other gets all of the connections until it’s back.
  5. Save the route.

Do the same for each server you want to split.

Open Settings → Networking → Overview while something is downloading. You should see both lines feeding each server, with each line’s ribbon as wide as the number of connections it’s carrying.

To compare the lines directly, run a test from Settings → Networking → Speed test.

If one line has a data cap, open its egress and turn on Enforce a download quota. When the allowance runs out, Weaver moves that line’s connections to the other one. See Download Quotas Per Egress.

To send one line through a VPN, change that leg’s Path to Proxy ladder and pick the VPN.

RSS feeds don’t split by weight. A feed uses the first leg in its route that’s working.

  • Advanced Networking covers egresses, routes, proxies, and platform notes in full.
  • Docker covers the container install and the Unraid template.