Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

8.6. Converting a Bond to a Team

It is possible to convert existing bonding configuration files to team configuration files using the bond2team tool. It can convert bond configuration files in ifcfg format to team configuration files in either ifcfg or JSON format. Note that firewall rules, alias interfaces, and anything that might be tied to the original interface name can break after the renaming because the tool will only change the ifcfg file, nothing else.
To see some examples of the command format, issue the following command:
~]$ bond2team --examples
New files will be created in a directory whose name starts with /tmp/bond2team.XXXXXX/, where XXXXXX is a random string. After creating the new configuration files, move the old bonding files to a backup folder and then move the new files to the /etc/sysconfig/network-scripts/ directory.

Example 8.1. Convert a Bond to a Team

To convert a current bond0 configuration to team ifcfg, issue a command as root:
~]# /usr/bin/bond2team --master bond0
Note that this will retain the name bond0. To use a new name to save the configuration, use the --rename as follows:
~]# /usr/bin/bond2team --master bond0 --rename team0
add the --json option to output JSON format files instead of ifcfg files. See the teamd.conf(5) man page for examples of JSON format.

Example 8.2. Convert a Bond to a Team and Specify the File Path

To convert a current bond0 configuration to team ifcfg, and to manually specify the path to the ifcfg file, issue a command as root:
~]# /usr/bin/bond2team --master bond0 --configdir /path/to/ifcfg-file
add the --json option to output JSON format files instead of ifcfg files.

Example 8.3. Create a Team Configuration Using Bond2team

It is also possible to create a team configuration by supplying the bond2team tool with a list of bonding parameters. For example:
~]# /usr/bin/bond2team --bonding_opts "mode=1 miimon=500"
Ports can also be supplied on the command line as follows:
~]# /usr/bin/bond2team --bonding_opts "mode=1 miimon=500 primary=enp1s0 \
  primary_reselect-0" --port enp1s0 --port enp2s0 --port enp3s0 --port enp4s0
See the bond2team(1) man page for further details. For an explanation of bonding parameters, see Section 7.7, “Using Channel Bonding”