FreeBSD: NIC Bonding / Link Aggregation / Trunking / Link Failover Tutorial

www.lautt‮moc.iru‬
FreeBSD: NIC Bonding / Link Aggregation / Trunking / Link Failover Tutorial

NIC bonding, also known as link aggregation or trunking, is a technique that allows you to combine multiple network interfaces into a single logical interface, providing increased bandwidth and link failover.

On a FreeBSD system, you can use the ifconfig utility to configure NIC bonding.

Here is an example of how to configure NIC bonding on a FreeBSD system:

  1. Make sure that the network interfaces you want to bond are connected and properly configured on the system.

  2. Create a new bonding device using the ifconfig utility.

For example, to create a new bonding device named bond0, you can run the following command:

# ifconfig bond0 create
  1. Add the network interfaces you want to bond to the bonding device using the ifconfig utility.

For example, to add the em0 and em1 interfaces to the bond0 bonding device, you can run the following command:

# ifconfig bond0 em0 em1
  1. Configure the bonding options using the ifconfig utility.

For example, to enable active-backup failover mode and set the link monitoring interval to 1 second, you can run the following command:

# ifconfig bond0 -failover active-backup -link-monitoring 1
  1. Bring the bonding device up using the ifconfig utility.

For example, to bring the bond0 bonding device up, you can run the following command:

# ifconfig bond0 up
  1. Configure the bonding device in the /etc/rc.conf file so that it will be activated at boot time.

For example, to configure the bond0 bonding device in the /etc/rc.conf file, you can add the following lines:

cloned_interfaces="bond0"
ifconfig_bond0="up"

This will configure the bond0 bonding device to be brought up at boot time.

For more information about configuring NIC bonding on a FreeBSD system, you can refer to the FreeBSD documentation and the ifconfig man page by running man ifconfig on the command line.

You can also refer to the rc.conf man page by running man rc.conf for more information about configuring network interfaces in the /etc/rc.conf file.

Created Time:2017-10-28 20:40:38  Author:lautturi