0

So i have a server with 2 nics which i linke to have a bond for redundancy. The switch only accepts vlans, so they need to be present. I created the following yaml:

network:
  version: 2
  renderer: networkd 
  ethernets:
    enp101s0:
      dhcp4: false
    enp101s0d1:
      dhcp4: false
  bonds:
    bond0:
      interfaces: 
        - enp101s0
        - enp101s0d1
      parameters:
        mode: balance-tlb
        transmit-hash-policy: layer2
  vlans:
    bond0.10:
      id: 10
      link: bond0
      dhcp4: true

I didn't see the bond0.10 get an ip. However, without the bond this works:

network:
  version: 2
  renderer: networkd 
  ethernets:
    enp101s0:
      dhcp4: false
    enp101s0d1:
      dhcp4: false
  vlans:
    bond0.10:
      id: 10
      link: enp101s0
      dhcp4: true

After doing some research I think i'm running into this problem: Why is Netplan/Networkd not bringing up a static ethernet interface?

I had 2 moments where i tried to apply this information to the 10-netplan-bond0.10.networks file and it got an ip, but lost it after a reboot. It seems a netplan apply or reboot is triggering a netplan generate which overwrites the files.

the troubleshooting is rather tedious because there is no netwerk connectivty and only a dell drac console. The netplan.io version is 0.36.3.

I couldn't find any information on how to keep the edited info in the files without netplan overwriting them, so my questions are:

  • is this indeed a known bug? the same as I found?
  • are there any other workarounds?
  • is it possible to add the parameters in the .yaml instead of the .network files (it's not documented on netplan.io)
  • how to prevent a netplan apply which will overwrite the .network file? Ive created a 20-file equivalent, but that does not seem to do it.

  • another unrelated question. this is the default yaml on the system:

    network: version: 2 renderer: networkd

Why doesn't netplan remove the created interfaces if I apply this yaml?

  • One thing that surprises me about your config is the device names. enp101s0d1 sounds like it would be a subinterface of enp101s0. Is it actually possible to bond these together? – slangasek Feb 12 at 21:12
  • And yes, I think it could be the same as the other bug you linked to. – slangasek Feb 12 at 21:12
  • yes, its a dualport mellanox: store.mellanox.com/products/… So how do i retain the settings in the .network files without netplan overwriting them? – dennis-360ict Feb 13 at 8:03

Your Answer

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

Browse other questions tagged or ask your own question.