Netplan Config with Bonded Ethernet and Wifi

Been pulling my hair out over this. I am trying to configure Netplan with Network Manager to use a bonded interface consisting of both Ethernet and Wireless interface. I have been using examples here Netplan Canonical at Github but I seem to get errors at every turn. Where I’m at now… When I run netplan try I get this error

/etc/netplan# netplan try --configure-file 80-test.yaml
Error in network definition: expected sequence
to: 0.0.0.0/0
^
I My .yaml file looks like this…

50-test.yaml

network:
version: 2
renderer: NetworkManager
ethernets:
eno1:
dhcp4: no

60-test.yaml

wifis:
wlp4s0:
dhcp4: no
access-points:
“Kfinity”:
password: “*********”

70-test.yaml

bonds:
bond0:

dhcp4: false

      parameters:
        mode: active-backup
        primary: wlp4s0
      interfaces:
        - wlp4s0
        - eno1
      addresses:
      - 10.0.0.226/24
      nameservers:
        addresses: [8.8.8.8,8.8.4.4,75.75.75.75,75.75.76.76]
      routes:
        to: 0.0.0.0/0
        via: 10.0.0.1
        metric: 50

I’ve fixed several other errors and this one seems to be the last.
Hoping someone can give me a little guidance, or if it’s not possible and I’m wasting time, that would be good to know too.
Also, this is my first time posting to Discord, so if I’m doing something wrong, don’t hesitate to let me know.

Thanks,
Rick

Welcome to Discourse. (Discord is another system entirely)

Ethernet and wifi can’t be combined to create a bridge.

However, I’ve been able to do that by cheating a little and including the wireless interface under ethernets. The following is my netplan config file (minus a number of items that aren’t relevant).

network:  
  version: 2
  renderer: networkd

  ethernets:
    enp1s0: {}
    wlp5s0: {}

  bridges:
    br0:
      dhcp4: no
      addresses: [ 192.168.4.1/24 ]
      interfaces: [ enp1s0, wlp5s0 ]

I’m using straight netplan (no NetWork Manager), the device is a router and wifi access point, and I’m using hostapd for authentication. Without knowing what you’re using your device for, it’s hard to know if a similar setup would work for you.

Hello irihapeti, and thanks for the reply.
First thanks for correcting me on the name, I am only using Discourse for Ubuntu and didn’t realize I had the name wrong, or even that there was a similar site.
The device I’m using is an older Dell Power Edge R720xd server with Ubuntu 24.04 with internal nic and an added wifi card. The server is running a Plex server, and is located in my detached garage. I have Xfinity internet and in order to get a signal in the garage I have to use an Xfinity Pod(?) in the closest part of the garage and then run a cable from the Pod to the server. The Pod is not very reliable and every few days the device will go offline for up to several hours, and often needs rebooting. I can get wifi to the server but the signal is poor because of the distance. If I could bond the the 2 interfaces in active backup mode with the nic having priority that would solve most of the rebooting process. The primary interface will be the internal nic.
I will try incorporating some of your items into my yaml scripts and see if it helps.

Thanks again,
Rick

I suspected this was a server and it is. That’s the main thing, as I don’t know how this setup would work with a client device. The authentication is done separately, using hostapd. The card does need to be able to act as an access point (AP), and not all of them do, so check that as well.

BTW, you’re not the only one who’s got Discourse and Discord mixed up. No harm done.

Thanks Irihapeti, I have tried your suggestion and it didn’t work for me. And after doing a bunch more research I’ve learned that what I’m trying to do just won’t work so I’m going to come up with another plan.
Thanks again, Rick

1 Like

You’re welcome. I hope you find an answer.