'bonding interfaces, can't reach the outside world
I am trying to bond two physical ifaces together with netplan/ubuntu 20.04. The first iface, eth0 has a public routable ip provided my cloud provider. eth1 is used for my private network. The goal is to bind these together in round robin mode. However, I also need to allow inbound and outbound (default gw) to the internet. Here is what I have so far.
network:
version: 2
renderer: networkd
ethernets:
eports:
match:
name: e*
bonds:
bond0:
interfaces: [eports]
addresses: [10.0.1.1/24]
parameters:
mode: balance-rr
lacp-rate: fast
mii-monitor-interval: 100
vlans:
bond0.0:
id: 0
link: bond0
addresses:
- 1xx.2xx.2x.2x/31
gateway4: 1x.2xx.2x.2xx
nameservers:
addresses:
- 8.8.8.8
- 1.1.1.1
bond0.1:
id: 1
link: bond0
addresses:
- 10.0.0.5/24
the intent is to create vlans, that would act like normal interfaces, before the bonding. When I look at ip a everything show up and running. The context is a kubernetes cluster on baremetal, but from what I read that should not be an issue. K8s doesn't care. Would love some advice on the topic.
Thanks Brad
Solution 1:[1]
ok so here is a partial answer. No vlans is not the way to go, I think. here is what i have so far.
version: 2
renderer: networkd
ethernets:
eports:
match:
name: e*
bonds:
bond0:
interfaces: [eports]
addresses:
- 1xx.2xx.2x.2xx/31
- 10.0.0.5/24
gateway4: 1xx.2xx.2x.2x0
nameservers:
addresses:
- 8.8.8.8
- 1.1.1.1
parameters:
mode: balance-rr
lacp-rate: fast
mii-monitor-interval: 100
This does work, however the routing is messed up. if i ping yahoo.ca I get 33% packet loss. If i ping a local box I get 66% packet loss. With round robin this makes sense. Now the new question is how to route all the internet taffic for that host to the public iface, that is part of the bond.
Here are the routes..
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |