-sys-class-net-bond-bonding-slaves
The /sys/class/net/bond*/bonding/slaves
file is part of the Linux sysfs filesystem and is used to display the list of network interfaces (slaves) currently bonded to a particular bonding interface. The wildcard (*
) in bond*
refers to the name of the bonding interface (e.g., bond0
, bond1
).
Example of Usage
Check bonded slaves for
bond0
:
This will return a list of network interfaces (e.g., eth0
, eth1
) that are currently enslaved (bonded) to bond0
.
Example Output:
This shows that eth0
and eth1
are slaves of bond0
.
Check bonded slaves for any bonding interface:
If you're unsure of the bonding interface name, you can list the slaves for all bond interfaces by using a wildcard:
This command will return the bonded slaves for all available bonding interfaces in your system.
Additional Bonding Information
You can also explore more details about each bonding interface by checking other files under /sys/class/net/bond*/bonding/
. For example:
Mode of the bonding interface:
Status of each bonded interface (including link state):
Link status of each slave:
This structure under /sys/class/net/
provides detailed bonding information, including the performance and status of each slave in a bonding interface.
Summary
The /sys/class/net/bond*/bonding/slaves
file gives a straightforward way to check which network interfaces are currently part of a bond. This is particularly useful in environments where network redundancy and load balancing are configured through network interface bonding.
Last updated