0

I'm on Ubuntu Server 19.10, using netplan, and I have 4 bonded nics in a balance-rr bond. It is configured in Netplan as a static IP. After applying netplan or rebooting I cannot ping the gateway. When I run "ip a" I can see my 4 slave nics and my bond, however the slave nics have an IP on my guest subnet from DHCP. When I run a ping at the gateway, I'm getting destination unreachable but the source IP is the DHCP one, not my static bonded IP. Cloud-init is not in play; it is not installed and neither is network manager. This is a similar issue to this one: Configure bonded 802.3ad network using netplan on Ubuntu 18.04

I have tried many configurations, but this is what I'm working off of now: https://gist.github.com/PhilipSchmid/54e17f53c15e3bd2c922ec6ff9ee434f

Here is my /etc/netplan/01-netcfg.yaml:

network: 
  version: 2
  renderer: networkd
  ethernets:
    eno1: 
      addresses: []
      dhcp4: false
      dhcp6: false
      optional: true
    eno2: 
      addresses: []
      dhcp4: false
      dhcp6: false
      optional: true
    eno3: 
      addresses: []
      dhcp4: false
      dhcp6: false
      optional: true
    eno4: 
      addresses: []
      dhcp4: false
      dhcp6: false
      optional: true

Here is my /etc/netplan/02-bondings.yaml

network:
  version: 2
  renderer: networkd
  bonds:
    bond0:
      dhcp4: false
      dhcp6: false
      addresses:
        - 10.1.2.10/16
      gateway4: 10.1.1.1
      interfaces:
        - eno1
        - eno2
        - eno3
        - eno4
      nameservers:
        addresses: 
          - 127.0.0.1
          - 8.8.8.8
        search:
          - domain.com
      parameters:
        mode: balance-rr

After applying that (with debug, no errors) I get the following when I run "ip a"

root@hostname:/etc/netplan# ip a 
1: lo: <LOOPBACK,UP, LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
        valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mo master bond0 state UP group default qlen 1000
    link/ether b2:98:f1:5b:59:d9 brd ff:ff:ff:ff:ff:ff 
    inet 10.1.100.38/16 brd 10.1.255.255 scope global noprefixroute eno1
        valid_lft forever preferred_lft forever 
3: eno2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mo master bond0 state UP group default qlen 1000
    link/ether b2:98:f1:5b:59:d9 brd ff:ff:ff:ff:ff:ff
    inet 10.1.100.38/16 brd 10.1.255.255 scope global noprefixroute eno2
        valid_lft forever preferred_lft forever 
4: eno3: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mo master bond0 state UP group default qlen 1000
    link/ether b2:98:f1:5b:59:d9 brd ff:ff:ff:ff:ff:ff
    inet 10.1.100.38/16 brd 10.1.255.255 scope global noprefixroute eno3
        valid_ift forever preferred_lft forever 
5: eno4: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond0 state UP group default qlen 1000
    link/ether b2:98:f1:5b:59:d9 brd ff:ff:ff:ff:ff:ff
    inet 10.1.100.38/16 brd 10.1.255.255 scope global noprefixroute eno4
        valid_ift forever preferred_lft forever 
6: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether b2:98:f1:5b:59:09 brd ff:ff:ff:ff:ff:ff
    inet 10.1.2.10/16 brd 10.1.255.255 scope global bondo
        valid_lft forever preferred_lft forever 
7: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:07:ff:se:05 brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 brd 172. 17.255.255 scope global docker0
        valid_lft forever preferred_lft forever 

If I do "ping -4 -I bond0 10.1.1.1" I can ping the gateway, so it seems like a default route issue...so why is dhcp active on my slave nics? It's explicitly disabled?

I'm stumped, any guidance is appreciated

2 Answers2

1

In this line of output:

inet 10.1.100.38/16 brd 10.1.255.255 scope global noprefixroute eno1

Notably, the dynamic flag is NOT set. So whatever is configuring this address on your system, it is neither NetworkManager nor networkd (the two netplan backends), since both of those network configurators will correctly set the dynamic flag.

So something else, outside of netplan, appears to be running on your system and configuring addresses on your interfaces. You would have to locally investigate what, since it's not a component of the default Ubuntu install.

slangasek
  • 5,562
1

I found it; I had installed a desktop environment (MATE to use as a remote x2go endpoint) and though I removed NetworkManager I didn't know that dhcpcd had been enabled. I disabled that and I was good to go. Nothing in the config had indicated that dhcpcd was in play so it was nasty to troubleshoot, I hope this can help someone else out in the future.