bond2team command examples

bond2team command examples

bond2team — Converts bonding configuration to team

To convert the current ‘bond0’ ifcfg configuration to team ifcfg:

# bond2team --master bond0

To convert the current ‘bond0’ ifcfg configuration to team ifcfg renaming the interface name to ‘team0’. Caution : firewall rules, alias interfaces, etc., 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.

# bond2team --master bond0 --rename team0

To convert given bonding parameters with ports without any ifcfg:

# bond2team --bonding_opts 'mode=1 miimon=500 primary=eth1 primary_reselect=0' \
--port eth1 --port eth2 --port eth3 --port eth4

 

The following commands will deliver the ifcfg files into a temporary directory. You can review the files and copy to the right location.

Add the following argument to the commands below to print the output to the screen instead of writing to files.

--stdout

Add the following arguments to the commands below to set the destination directory for the output files.

--outputdir </path/to/dir>

Add the following argument to the commands below to output the files in teamd format (JSON) instead of the default ifcfg format.

--json

To convert the current “bond0” ifcfg configuration to team ifcfg:

# /usr/bin/bond2team --master bond0

To convert the current “bond0” ifcfg configuration out of the standard ifcfg-:

# /usr/bin/bond2team --master bond0 --configdir </path/to/ifcfg>

To convert the current “bond0” ifcfg configuration to team ifcfg renaming the interface name to “team0”. (carefull: firewall rules, aliases interfaces, etc., will break after the renaming because the tool will only change the ifcfg file, nothing else)

# /usr/bin/bond2team --master bond0 --rename team0

To convert given bonding parameters without any ifcfg:

# /usr/bin/bond2team --bonding_opts "mode=1 miimon=500"

To convert given bonding parameters without any ifcfg with ports:

# /usr/bin/bond2team --bonding_opts "mode=1 miimon=500 primary=eth1 primary_reselect-0" \
--port eth1 --port eth2 --port eth3 --port eth4

Leave a Reply

Your email address will not be published. Required fields are marked *