Documentation

cl_bond - Configures a bond port on Cumulus Linux

New in version 2.1.

Synopsis

Configures a bond interface on Cumulus Linux To configure a bridge port use the cl_bridge module. To configure any other type of interface use the cl_interface module. Follow the guidelines for bonding found in the Cumulus User Guide at http://docs.cumulusnetworks.com

Requirements (on host that executes module)

  • Alternate Debian network interface manager - ifupdown2 @ github.com/CumulusNetworks/ifupdown2

Options

parameter required default choices comments
addr_method
no
  • dhcp
configures the port to use DHCP. To enable this feature use the option 'dhcp'
alias_name
no
    add a port description
    clag_id
    no
      specify a unique clag_id for every dual connected bond on each peer switch. The value must be between 1 and 65535 and must be the same on both peer switches in order for the bond to be considered dual-connected
      ipv4
      no
        list of IPv4 addresses to configure on the interface. use X.X.X.X/YY syntax.
        ipv6
        no
          list of IPv6 addresses to configure on the interface. use X:X:X::X/YYY syntax
          lacp_bypass_all_active
          no
            Activate all interfaces for bypass. It is recommended to configure all_active instead of using bypass_priority.
            lacp_bypass_allow
            no
              Enable LACP bypass.
              lacp_bypass_period
              no
                Period for enabling LACP bypass. Max value is 900.
                lacp_bypass_priority
                no
                  List of ports and priorities. Example "swp1=10, swp2=20"
                  lacp_rate
                  no 1
                    lacp rate
                    location
                    no [u'/etc/network/interfaces.d']
                      interface directory location
                      miimon
                      no 100
                        mii link monitoring interval
                        min_links
                        no 1
                          minimum number of links
                          mode
                          no 802.3ad
                            bond mode. as of Cumulus Linux 2.5 only LACP bond mode is supported
                            mstpctl_bpduguard
                            no
                              Enables BPDU Guard on a port in vlan-aware mode
                              mstpctl_portadminedge
                              no
                                Enables admin edge port
                                mstpctl_portnetwork
                                no
                                  Enables bridge assurance in vlan-aware mode
                                  mtu
                                  no
                                    set MTU. Configure Jumbo Frame by setting MTU to 9000.
                                    name
                                    yes
                                      name of the interface
                                      pvid
                                      no
                                        in vlan aware mode, defines vlan that is the untagged vlan
                                        slaves
                                        yes
                                          bond members
                                          vids
                                          no
                                            in vlan aware mode, lists vlans defined under the interface
                                            virtual_ip
                                            no
                                              define IPv4 virtual IP used by the Cumulus Linux VRR feature
                                              virtual_mac
                                              no
                                                define Ethernet mac associated with Cumulus Linux VRR feature
                                                xmit_hash_policy
                                                no layer3+4
                                                  transmit load balancing algorithm. As of Cumulus Linux 2.5 only layer3+4 policy is supported

                                                  Examples

                                                  # Options ['virtual_mac', 'virtual_ip'] are required together
                                                  # configure a bond interface with IP address
                                                  cl_bond: name=bond0  slaves="swp4-5" ipv4=10.1.1.1/24
                                                  notify: reload networking
                                                  
                                                  # configure bond as a dual-connected clag bond
                                                  cl_bond: name=bond1 slaves="swp1s0 swp2s0" clag_id=1
                                                  notify: reload networking
                                                  
                                                  # define cl_bond once in tasks file
                                                  # then write inteface config in variables file
                                                  # with just the options you want.
                                                  cl_bond:
                                                    name: "{{ item.key }}"
                                                    slaves: "{{ item.value.slaves }}"
                                                    clag_id: "{{ item.value.clag_id|default(omit) }}"
                                                    ipv4:  "{{ item.value.ipv4|default(omit) }}"
                                                    ipv6: "{{ item.value.ipv6|default(omit) }}"
                                                    alias_name: "{{ item.value.alias_name|default(omit) }}"
                                                    addr_method: "{{ item.value.addr_method|default(omit) }}"
                                                    mtu: "{{ item.value.mtu|default(omit) }}"
                                                    vids: "{{ item.value.vids|default(omit) }}"
                                                    virtual_ip: "{{ item.value.virtual_ip|default(omit) }}"
                                                    virtual_mac: "{{ item.value.virtual_mac|default(omit) }}"
                                                    mstpctl_portnetwork: "{{ item.value.mstpctl_portnetwork|default('no') }}"
                                                    mstpctl_portadminedge: "{{ item.value.mstpctl_portadminedge|default('no') }}"
                                                    mstpctl_bpduguard: "{{ item.value.mstpctl_bpduguard|default('no') }}"
                                                  with_dict: cl_bonds
                                                  notify: reload networking
                                                  
                                                  # In vars file
                                                  # ============
                                                  cl_bonds:
                                                      bond0:
                                                          alias_name: 'uplink to isp'
                                                          slaves: ['swp1', 'swp3']
                                                          ipv4: '10.1.1.1/24'
                                                      bond2:
                                                          vids: [1, 50]
                                                          clag_id: 1
                                                  

                                                  Return Values

                                                  Common return values are documented here Common Return Values, the following are the fields unique to this module:

                                                  name description returned type sample
                                                  msg human-readable report of success or failure always string interface bond0 config updated
                                                  changed whether the interface was changed changed bool True


                                                  Notes

                                                  Note

                                                  because the module writes the interface directory location. Ensure that /etc/network/interfaces has a ‘source /etc/network/interfaces.d/*’ or whatever path is mentioned in the location attribute.

                                                  Note

                                                  For the config to be activated, i.e installed in the kernel, “service networking reload” needs be be executed. See EXAMPLES section.

                                                  This is a Core Module

                                                  For more information on what this means please read Core Modules

                                                  For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.