Bonding network interface cards, LACP

Howdy. I’m considering a move to RancherOS from CentOS and right now the only limitation is I can’t determine how to bond 2 NICs together.

In CentOS land, I’d have two NIC definitions in /etc/sysconfig/network-scripts for pcie0 and pcie1, setting a master interface to bond0 and defining those NICs as slaves. The bond0 interface was then configured to come up in LACP (mode 4).

I’m seeing bridging and bonding stuff here in netconf:

…however it’s completely undocumented. I also checked the ros config reference here:
http://docs.rancher.com/os/rancheros-tools/ros/config/

… but nothing about bridge or bond network config values. Google search comes up empty so here I am.

I am more than happy to document it and send a pull request if someone can provide a tad bit of help here, even just to point me to the list of relevant ‘ros conf set’ parameters.

Lastly, the reason I have a bonded NIC is because I’m migrating what was an OpenStack deployment and the bonded NICs were the unroutable private side network where I ran ceph replication, etc. I’m expecting to use them for something similar if I can figure out how to get this going on RancherOS.

Thanks in advance.

Found the needle in the haystack here:

I was able to properly configure an LACP bonded NIC pair using that as an example. Here’s my config below, and note that I used hardcoded MAC addresses instead of eth0/1/2 definitions. I wanted to make sure the correct NICs were used.

# cloud-config
hostname: myhostname.mydomain.com
rancher:
  network:
    interfaces:
      eth*:
        dhcp: false
      # eth1, the onbooard NIC tied to our primary network
      "mac=00:11:22:33:44:55":
        address: 1.2.3.4/24
        gateway: 1.2.3.1
        mtu: 1500
      # eth2, one of the bonded NICs
      "mac=00:11:22:33:44:56":
        bond: bond0
      # eth3, one of the bonded NICs
      "mac=00:11:22:33:44:57":
        bond: bond0
      bond0:
        bond_opts:
          mode: 4
          miimon: 100
          lacp_rate: 1
          xmit_hash_policy: 1
        address: 2.3.4.5/24
        mtu: 9000
    dns:
      nameservers:
        - 1.2.3.1
      search:
        - mydomain.com
ssh_authorized_keys:
  - ssh-rsa mykeygoeshere
2 Likes