ipaggcreate
Create an InfiniBand Partition Key Access Group
TLDR
Count the number of packets sent from each source address appearing in a PCAP file
Group and count packets read from a network interface by IP packet length
Count the number of bytes sent between each address pair appearing in a PCAP file
SYNOPSIS
ip aggcreate NAME [ OPTION ... ]
PARAMETERS
NAME
The desired name for the new bonding interface (e.g., bond0).
mode
Specifies the bonding policy. Common modes include balance-rr (round-robin), active-backup (failover), balance-xor (XOR sum), broadcast, 802.3ad (LACP), balance-tlb (transmit load balancing), balance-alb (adaptive load balancing).
miimon
Frequency in milliseconds to check the link status of each slave. Set to 0 to disable MII monitoring.
updelay
Delay in milliseconds before bringing a slave online after its link is detected.
downdelay
Delay in milliseconds before taking a slave offline after its link is lost.
lacp_rate
Specifies the rate at which LACPDU packets are transmitted to partners. Can be slow (default, 30 seconds) or fast (1 second). Only valid for 802.3ad mode.
xmit_hash_policy
For balance-xor and 802.3ad modes, specifies how outgoing traffic is distributed. Options include layer2, layer2+3, layer3+4.
arp_interval
Frequency in milliseconds for ARP link monitoring. Set to 0 to disable.
arp_ip_target
One or more IP addresses to target for ARP link monitoring. Required if arp_interval is set.
primary
Specifies a preferred slave interface. This interface will be used if available, even if other slaves are up.
fail_over_mac
Determines MAC address handling on failover in active-backup mode. Can be none, active, follow.
primary_reselect
Policy for reselecting the primary slave. Can be always, better, failure.
DESCRIPTION
The ip aggcreate command, part of the iproute2 utility suite, is used to dynamically create a new network bonding (or link aggregation) interface in the Linux kernel. A bonding interface aggregates multiple network interfaces (slaves) into a single logical interface, providing benefits such as load balancing, fault tolerance, and increased bandwidth.
This command allows administrators to specify various bonding parameters at creation time, such as the bonding mode, link monitoring options, and LACP configuration. Once created, individual physical interfaces can be added as slaves to this new bond interface using the ip link set command. This approach offers a flexible way to manage network aggregation without requiring manual editing of configuration files or system reboots, making it a powerful tool for configuring resilient and high-performance network setups.
CAVEATS
- The bonding kernel module must be loaded for this command to function.
- The created bond interface is not persistent across reboots unless configured via system-specific network configuration files (e.g., /etc/network/interfaces, NetworkManager profiles, or systemd-networkd).
- ip aggcreate only creates the bond device; physical interfaces must be added as slaves using ip link set <slave_dev> master <bond_dev>.
- Incorrect bonding modes or parameters can lead to network connectivity issues or performance degradation.
BONDING MODES
The mode parameter is critical and dictates how the bond behaves. Each mode offers different features for redundancy and load balancing. For example, active-backup is for simple failover, while 802.3ad (LACP) requires switch support for advanced aggregation and traffic distribution.
SLAVE INTERFACES
After creating the bond with ip aggcreate, you must assign physical network interfaces as slaves to it. This is done using the ip link set command. For example: ip link set eth0 master bond0. These slave interfaces will then be managed by the bonding driver.
LINK MONITORING
Parameters like miimon, arp_interval, and arp_ip_target are essential for reliable link monitoring. These mechanisms ensure the bond can react quickly to link failures (e.g., cable unplugged, switch port down) and maintain network connectivity by switching to healthy slave interfaces.
HISTORY
The iproute2 utility suite, which includes ip aggcreate, was developed to replace older network configuration tools like ifconfig and route. It provides a more robust, flexible, and powerful way to manage network interfaces, routing, and traffic control. The aggcreate subcommand specifically addresses the need for dynamic creation and configuration of bonding interfaces, leveraging the kernel's bonding driver capabilities. Its integration into iproute2 reflects a shift towards a more unified and modern network management framework in Linux, offering granular control over network device parameters.