0

I try to setup a bridge and bonding port on Ubuntu 18.04 server, got a error message:

/etc/netplan/00-netcfg.yaml:15:33: Error in network definition: unknown key 'interfaces'
                                interfaces:
                                ^            

 

Anyone can help what's wrong? the yaml file detail as:

network:
        bridges:
                br0:
                        addresses:
                                - 10.1.1.100/24
                        dhcp4: false
                        dhcp6: false
                        gateway4: 10.1.1.254
                        nameservers:
                                addresses:
                                        - 8.8.8.8
                                        - 8.8.4.4
                                search: []
                                interfaces:
                                        - bond0
                                bonds:
                                        bond0:
                                                interfaces:
                                                        - enp2s0f0
                                                        - enp2s0f1
                                                parameters:
                                                        mode: balance-rr
        ethernets:
                enp2s0f0:
                        addresses: []
                        dhcp4: false
                        dhcp6: false
                enp2s0f1:
                        addresses: []
                        dhcp4: false
                        dhcp6: false
3
  • Please see my answer. If it's helpful, please remember to accept it by clicking on the checkmark icon that appears just to the left of my answer. Thanks!
    – heynnema
    Jun 4, 2021 at 22:45
  • Status please...
    – heynnema
    Jun 11, 2021 at 2:25
  • Status please...
    – heynnema
    Jun 19, 2021 at 13:47

2 Answers 2

1

Your yaml shows that you have interfaces indented under nameservers. The interface list is clearly not part of the nameserver configuration. It needs to be indented so that it is in line with the other top-level properties of br0.

Your bonds section also needs to be indented at the same level as ethernets and bridges.

1

Use this .yaml. Keep the EXACT same spacing and indentation...

network:
  version: 2
  renderer: networkd
  ethernets:
    enp2s0f0:
      addresses: []
    enp2s0f1:
      addresses: []
  bridges:
    br0:
      addresses:
        - 10.1.1.100/24
      gateway4: 10.1.1.254
      nameservers:
        addresses:
          - 8.8.8.8
          - 8.8.4.4
        search: []
      interfaces:
        - bond0
  bonds:
    bond0:
      interfaces:
        - enp2s0f0
        - enp2s0f1
      parameters:
        mode: balance-rr

sudo netplan generate

sudo netplan apply

reboot

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .