I can't get bonds working

Hello!

I would like to set up a bond on incusos, but it seems to not work. I tried copying the example for bond/vlan verbatim (changing only the interface names) into the install seed, and it just went with the normal non-bonded DHCP setup. I also tried converting it to YAML and putting it into the network config, but it gives me an error that udev can’t rename the interface. Since I can’t get a shell on the machine, I can’t really troubleshoot it.

Could anyone give me a working example configuration with two bonded interfaces, with either the IP address set directly or vlans on the bond? Would much appreciate it! YAML would be fine.

What does your YAML look like?

Here it looks like this:


  bonds:
    - name: uplink
      mode: 802.3ad
      mtu: 9000
      members:
        - 10:70:fd:e8:9a:c8
        - 10:70:fd:e8:9a:c9
      roles:
        - cluster
        - instances
        - storage
      lldp: true

Though the config I just pulled from here doesn’t yet have IP configuration applied yet, but it will be done through VLANs, so something like:

vlans:
 - name: management
   parent: uplink
   id: 10
   addresses:
   - 10.5.10.100/24
   routes:
   - to: 0.0.0.0/0
     via: 10.5.10.1

The example at: Network - IncusOS documentation should generally be fine, except that most folks use LACP (802.3ad) rather than basic active-backup.

Thank you so much. After changing the interfaces to be specified by MAC address, it works.

I’ll now try to get it working with the pre-seed. Thanks again!

This was the working yaml for me:

config:
  bonds:
  - lldp: true
    members:
    - bc:24:11:90:02:c6
    - bc:24:11:6e:a6:69
    mode: active-backup
    mtu: 1500
    name: uplink
    roles:
    - cluster
    - instances
    - storage
  time:
    timezone: UTC
  vlans:
  - addresses:
    - dhcp4
    - slaac
    id: 10
    name: homenet
    parent: uplink

I converted it into json like so:

{
  "config": {
    "bonds": [
      {
        "lldp": true,
        "members": [
          "bc:24:11:90:02:c6",
          "bc:24:11:6e:a6:69"
        ],
        "mode": "active-backup",
        "mtu": 1500,
        "name": "uplink",
        "roles": [
          "cluster",
          "instances",
          "storage"
        ]
      }
    ],
    "time": {
      "timezone": "UTC"
    },
    "vlans": [
      {
        "addresses": [
          "dhcp4",
          "slaac"
        ],
        "id": 10,
        "name": "homenet",
        "parent": "uplink"
      }
    ]
  }
}

And attempted to use it to create an image here:

Unfortunately, the network part seems to have been completely ignored, as the resulted installed system just looks for DHCP addresses from the individual interfaces, and not creating the bond or using the vlan. It’s not a big problem, because now I can go in and set it up afterwards, but I’m wondering if there’s a way I could have this working from the beginning.

I think your problem here is your nested config block.

If you look at the example in the IncusOS download site, it directly uses the content of that block.

So using something like this:

{
    "bonds": [
      {
        "lldp": true,
        "members": [
          "bc:24:11:90:02:c6",
          "bc:24:11:6e:a6:69"
        ],
        "mode": "active-backup",
        "mtu": 1500,
        "name": "uplink",
        "roles": [
          "cluster",
          "instances",
          "storage"
        ]
      }
    ],
    "time": {
      "timezone": "UTC"
    },
    "vlans": [
      {
        "addresses": [
          "dhcp4",
          "slaac"
        ],
        "id": 10,
        "name": "homenet",
        "parent": "uplink"
      }
    ]
}