bondadm

bondadm is a tool used to create and activate aggregated link. It will load the bonding driver when it is first run, in case the driver is not already loaded, it will create the appropriate bonding scripts in /etc/sysconfig/ov-net/ which will be called at boot by the sysvinit scripts.


cluster1:~ # bondadm  

The command bondsetup creates a bonded interface using one
or more physical interfaces.

Syntax: bondsetup -[l|n|m|i|r|h|v]

OPTIONS:
       -l : lists all bonded interfaces and their physical interfaces

       -n : name of the interface to be created.

       -m : aggergation mode of the new bond.
       Possible options are: 0 1 2 3 4 5 6
                       0 = balance-rr (default)
                       1 = active-backup
                       2 = balance-xor
                       3 = broadcast
                       4 = 802.3ad
                       5 = balance-tlb
                       6 = balance-alb

       -i : physical interfaces to bond. If more than one, enter
                -i multiple times. Ex: -i eth0 -i eth2

       -r : removes a bonded interface. Requires bond name.

       -h : print usage
       
       -v : print version
cluster1:~ #

1. Create a bonded interface:
It requires all of these options: -n -i -m

-n defines the name of the new interface. It must be a name not already existing in the system, as a physical or bonded interface.

-i defines the physical interfaces to be bonded. Usually there are more than one which will be used, use -i multiple times.

-m is the mode of the aggregation. Enter numbers between 0 and 6. See the description for each mode above. make sure you switch and NICs support the chosen mode.

-l lists all bonded interfaces, with status, mode and physical interfaces used as slaves. Must be the only option given.

-r removes a bond. Must be followed by the name of the bond.

-h prints the help menu.

-v prints version information.

Examples:
Create a new bonded interface eth1 using 2 physical interfaces, and list them after.

bash-4.3# bondadm -n eth1 -i eno33554976 -i eno50332200 -m 3
 *  Adding eno33554976 as slave...                                                                                        [  OK  ]
 *  Adding eno50332200 as slave...                                                                                        [  OK  ]
    Finished setting up eth1
    Run : netsetup : to set up the IPs. 


bash-4.3# bondadm -l
1 ==>> eth0 : STATE: up : MODE: balance-xor 2
       Physical interfaces:
       1 ==> eno16777736
       2 ==> eno67109424

2 ==>> eth1 : STATE: down : MODE: broadcast 3
       Physical interfaces:
       1 ==> eno33554976
       2 ==> eno50332200

bash-4.3# 


The order in which the options are given is not important:

bash-4.3# bondadm -i eno50332200 -m 1 -n eth1 -i eno33554976
 *  Adding eno50332200 as slave...                                                                                             [  OK  ]
 *  Adding eno33554976 as slave...                                                                                             [  OK  ]
    Finished setting up eth1
    Run : netsetup : to set up the IPs. 


bash-4.3# bondadm -l     
1 ==>> eth0 : STATE: up : MODE: balance-xor 2
       Physical interfaces:
       1 ==> eno16777736
       2 ==> eno67109424

2 ==>> eth1 : STATE: down : MODE: active-backup 1
       Physical interfaces:
       1 ==> eno50332200
       2 ==> eno33554976

bash-4.3# 


In ovios-shell, the command operates in it's own mini CLI. One must only enter the options:

ovios-shell> bondadm  

Type only the command arguments, like: -l | -h | -n etc.
To exit the bondadm CLI enter quit.

bondadm > -l
1 ==>> eth0 : STATE: up : MODE: balance-xor 2
       Physical interfaces:
       1 ==> eno16777736
       2 ==> eno67109424

2 ==>> eth1 : STATE: down : MODE: active-backup 1
       Physical interfaces:
       1 ==> eno50332200
       2 ==> eno33554976


Type only the command arguments, like: -l | -h | -n etc.
To exit the bondadm CLI enter quit.

bondadm > -r eth1
 *  Removing eth1..                                                                                                             [  OK  ]

Type only the command arguments, like: -l | -h | -n etc.
To exit the bondadm CLI enter quit.

bondadm > -l
1 ==>> eth0 : STATE: up : MODE: balance-xor 2
       Physical interfaces:
       1 ==> eno16777736
       2 ==> eno67109424


Type only the command arguments, like: -l | -h | -n etc.
To exit the bondadm CLI enter quit.

bondadm > quit
ovios-shell>