Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 18: support Netplan configuration #19

Open
troyengel opened this issue May 14, 2018 · 2 comments
Open

Ubuntu 18: support Netplan configuration #19

troyengel opened this issue May 14, 2018 · 2 comments

Comments

@troyengel
Copy link
Contributor

The new Ubuntu 18 release uses Netplan (a Canonical invention) to configure networking, as outlined here in these links:

Bonding will require code updates to support writing the YAML, etc.

@terackspace
Copy link

Sorting out the desired end state, I ran into this shenanigan:

It's unclear if being required to name the slaves with dummy data to define them is per design, or if it's a bug in implementation. It's enough to set dhcp4: false on the definition of the slave (which is already the default) to satisfy it's needs.

I also have found that an attempt to install ifenslave will trigger an install of ifupdown which is undesirable; unpacking the DEB file and using the script directly works fine, it seems to be a packaging thing. I'm going to engage Canonical about this item under our company login.

@terackspace
Copy link

Starting configuration - this device has a quad-port NIC, eno1 and eno2 are the bonding pair. The eno3 interface is a secondary network not associated with bonding, however provides a bit of context about the config itself on a real life server.

network:
  version: 2
  renderer: networkd
  ethernets:
    eno1:
      addresses: [ 172.24.16.188/22 ]
      gateway4: 172.24.16.1
      nameservers:
          search: [ domain.com ]
          addresses:
              - "8.8.8.8"
              - "1.1.1.1"
    eno3:
      optional: true
      addresses: [ 10.132.99.73/27 ]
      routes:
        - to: 10.191.192.0/18
          via: 10.132.99.65
          on-link: true

The resulting bonded configuration which works with netplan generate and netplan apply on the fly (while logged in over SSH).

network:
  version: 2
  renderer: networkd
  ethernets:
    eno1:
      dhcp4: false
      dhcp6: false
    eno2:
      dhcp4: false
      dhcp6: false
    eno3:
      optional: true
      addresses: [ 10.132.99.73/27 ]
      routes:
        - to: 10.191.192.0/18
          via: 10.132.99.65
          on-link: true
  bonds:
    bond0:
      addresses: [ 172.24.16.188/22 ]
      gateway4: 172.24.16.1
      nameservers:
          search: [ domain.com ]
          addresses:
            - "8.8.8.8"
            - "1.1.1.1"
      interfaces:
        - eno1
        - eno2
      parameters:
        mode: active-backup
        mii-monitor-interval: 100

The use of primary: <interface> is not required in the configuration of the bond.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants