0

Here is my netplan yaml file:

network:
version: 2
renderer: NetworkManager
ethernets:
    eth0:
        dhcp4: true
        optional: true
wifis:
    wlan0:
        optional: true
        access-points:
             "redacted":
                 password: "redacted"
        dhcp4: true
bonds:
    bond0:
        dhcp4: true
        interfaces: [ eth0, wlan0 ]
        nameservers:
            addresses: [ 192.168.1.5, 8.8.8.8, 8.8.4.4 ]
        parameters:
            mode: active-backup
            primary: wlan0
bridges:
    br0:
        addresses: [ 10.0.1.1/24 ]
        interfaces: [ bond0 ]
        dhcp4: false
        nameservers:
            search: [ local ]
            addresses: [ 192.168.1.5, 8.8.8.8, 8.8.4.4 ]

I'm trying to use bond0 as a "backup". If the wifi fails to connect then it tries to use ethernet.
I want to use bond0 as the interface for my bridge so that it can switch between the two.
No matter what I do, bridging kills the wifi. I'm not sure if it kills the ethernet or not.
Also, netplan didn't use my DNS configuration correctly unless I set the renderer to NetworkManager.
There was the same issue with brctl. Bridging ethernet and wifi was unsupported and hacks needed to be used.
Is there something I can do to use br0 with bond0? I don't mind if it's pretty technical(or hacky).

0

Made it work by wrapping the bond in a vlan:

bonds:
    bond0:
        dhcp4: true
        interfaces: [ eth0, wlan0 ]
        nameservers:
            addresses: [ 192.168.1.5, 8.8.8.8, 8.8.4.4 ]
        parameters:
            mode: active-backup
            primary: wlan0
vlans:
    vlan0:
        id: 0
        link: bond0
bridges:
    br0:
        addresses: [ 10.0.1.1/24 ]
        interfaces: [ vlan0 ]

I love how StackExchange punishes you for posting easy questions but never answers the hard ones! It's definitely not what it used to be.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.