This module provides three resource types that can configure most types of interfaces available on Cumulus Linux.
The module consists of three resources types:
This resource type configures a network interface using ifupdown2. The configuration for the interface is written to a file in the interface configuration file directory. This resource type does not configure VXLAN, bond, or bridge interfaces.
For bridge configuration use the cumulus_bridge
module.
For bond configuration use the cumulus_bond
module.
This resource type configures a network bond using ifupdown2. The configuration for the interface is written to a file in the interface configuration file directory.
This resource type configures a bridge using ifupdown2. The configuration for the interface is written to a file in the interface configuration file directory.
-
This module affects the configuration files located in the interfaces folder and managed by ifupdown2. By default this is
/etc/network/interfaces.d
. -
You need to add
source /etc/network/interfaces.d/*
to/etc/network/interfaces
to make use of the new files. -
To activate the changes, run
/sbin/ifreload -a
.
NOTE: Reloading the interface configuration is not disruptive if there is no change in the configuration.
cumulus_interface Examples:
Loopback interface and the management interface eth0
using DHCP:
cumulus_interface { 'lo':
addr_method => 'loopback'
}
cumulus_interface { 'eth0':
addr_method => 'dhcp'
}
swp33 as a 1GbE port with a single IPv4 address:
cumulus_interface { 'swp33':
ipv4 => ['10.30.1.1/24']
speed => 1000
}
peerlink.4094, a bond sub-interface, as the CLAG peer interface:
cumulus_interface { 'peerlink.4094':
ipv4 => ['10.100.1.0/31']
clagd_enable => true
clagd_peer_ip => '10.100.1.1/31'
clagd_sys_mac => '44:38:39:ff:20:94'
}
cumulus_bond Examples:
Bond named peerlink with the interfaces swp1 and swp2 as bond members:
cumulus_bond { 'peerlink':
slaves => ['swp1-2']
}
Bond named bond0 with the interfaces swp3 and swp4 as bond members, the minimum link count is set to 2 and the CLAG ID is set:
cumulus_bond { 'bond0':
slaves => ['swp3-4'],
min_links => 2,
clag_id => 1
}
cumulus_bridge Examples:
Default ("traditional") bridge driver:
cumulus_bridge { 'br10':
ports => ['swp11-12.1', 'swp32.1']
ipv4 => ['10.1.1.1/24', '10.20.1.1/24']
ipv6 => ['2001:db8:abcd::/48']
alias_name => 'classic bridge'
mtu => 9000
mstpctl_treeprio => 4096
}
cumulus_bridge { 'bridge':
vlan_aware => true
ports => ['peerlink', 'downlink', 'swp10']
vids => ['1-4094']
pvid => 1
stp => true
mstpctl_treeprio => 4096
}
###Types
####Parameters
name
- Identifier for the interface.ipv4
- Array of IPv4 addresses to be applied to the interface.ipv6
- Array of IPv6 addresses to be applied to the interface.alias_name
- Interface alias.addr_method
- Address assignment method,dhcp
orloopback
. Default is empty (no address method is set).speed
- The interface link speed.mtu
- The interface Maximum Transmission Unit (MTU).virtual_ip
- VRR virtual IP address.virtual_mac
- VRR virtual MAC address.vids
- Array of VLANs to be configured for a VLAN-aware trunk interface.pvid
- Native VLAN for a VLAN-aware trunk interface.location
- Location of the configuration snippets directory. Default is/etc/network/interfaces.d/
.mstpctl_portnetwork
- Enables bridge assurance on a VLAN-aware trunk.mstpctl_bpduguard
- Enables BPDU guard on a VLAN-aware trunk.mstpctl_portadminedge
- Enables admin edgeport
The following CLAG-related attributes are also available. If CLAG is enabled, you must specify clagd_enable
,clagd_priority
, clagd_peer_id
and clagd_sys_mac
:
clagd_enable
- Enable theclagd
daemon.clagd_priority
- Set the CLAG priority for this switch.clagd_peer_id
- Address of the CLAG peer switch.clagd_sys_mac
- CLAG system MAC address. The MAC address must be identical on both CLAG peers.clagd_args
- Any additional arguments to be passed to theclagd
deamon.
#####Parameters
name
- Identifier for the bond interface.slaves
- Bond members.min_links
- Minimum number of slave links for the bond to be considered up. Default is 1.mode
- Bond mode. Default is 802.3ad.miimon
- MII link monitoring interval. Default is 100.xmit_hash_policy
- TX hashing policy. Default is layer3+4.lacp_rate
- LACP bond rate. Default is 1 (fast LACP timeout).ipv4
- Array of IPv4 addresses to be applied to the interface.ipv6
- Array of IPv6 addresses to be applied to the interface.alias_name
- Interface alias.addr_method
- Address assignment method. May bedhcp
or empty. Default is empty (no address method is set).mtu
- The interface Maximum Transmission Unit (MTU).virtual_ip
- VRR virtual IP address.virtual_mac
- VRR virtual MAC address.vids
- Array of VLANs to be configured for a VLAN-aware trunk interface.pvid
- Native VLAN for a VLAN-aware trunk interface.location
- Location of the configuration snippets directory. Default is/etc/network/interfaces.d/
.mstpctl_portnetwork
- Enable bridge assurance on a VLAN-aware trunk.mstpctl_bpduguard
- Enable BPDU guard on a VLAN-aware trunk.mstpctl_portadminedge
- Enables admin edgeportclag_id
- Define which bond is in the CLAG. The ID must be the same on both CLAG peers.lacp_bypass_allow
- Enable LACP bypass, valid options are 0 or 1.lacp_bypass_period
- Period for enable lacp_bypass.lacp_bypass_priority
- Array of ports and prioritylacp_bypass_all_active
- Activate all interfaces for bypass: 0 or 1.
name
- Identifier for the bridge interface.ipv4
- Array of IPv4 addresses to be applied to the interface.ipv6
- Array of IPv6 addresses to be applied to the interface.alias_name
- Interface alias.addr_method
- Address assignment method. May bedhcp
or empty. Default is empty (no address method is set).mtu
- The interface Maximum Transmission Unit (MTU).stp
- Enable spanning tree. Default is true.mstpctl_treeprio
- Bridge tree root priority. Must be a multiple of 4096.vlan_aware
- Use the VLAN-aware bridge driver. Default is false.virtual_ip
- VRR virtual IP address.virtual_mac
- VRR virtual MAC address.vids
- Array of VLANs to be configured for a VLAN-aware trunk interface.pvid
- Native VLAN for a VLAN-aware trunk interface.location
- Location of the configuration snippets directory. Default is/etc/network/interfaces.d/
.
This module only works on Cumulus Linux.
The puppet resource
command for cumulus_interface
, cumulus_bond
and
cumulus_bridge
is currently not supported. It may be added in a future release.
- Fork it.
- Create your feature branch (
git checkout -b my-new-feature
). - Commit your changes (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin my-new-feature
). - Create new Pull Request.
Cumulus Linux is a software distribution that runs on top of industry-standard networking hardware. It enables the latest Linux applications and automation tools on networking gear while delivering new levels of innovation and flexibility to the data center.
For further details, please see http://cumulusnetworks.com.