This is basic howto introduction to team.


-------------------------------------------------------------------------------
1) PREFERRED Using teamd

# cat teamd_test.conf
{
        "device":       "team0",
        "runner":       {"name": "activebackup"},
        "link_watch":   {"name": "ethtool"},
        "ports":        {
                "eth1": {
                        "prio": -10,
                        "sticky": true
                },
                "eth2": {
                        "prio": 100
                }
        }
}
# teamd -f teamd_test.conf -d
# ip addr add 192.168.252.2/24 dev team0

Finally to remove interface team0:
# teamd -f teamd_test.conf -k

See "man teamd" for more details.


-------------------------------------------------------------------------------
2) Using teamnl and ip utils

# ip link add team0 type team
# teamnl team0 getoption mode
*NOMODE*
# teamnl team0 setoption mode activebackup
# teamnl team0 getoption mode
activebackup
# ip link set dev eth1 master team0
# ip link set dev eth2 master team0
# teamnl team0 ports
6: eth2: up 100 fullduplex
5: eth1: up 100 fullduplex
# ip addr add 192.168.252.2/24 dev team0
# ip link set team0 up
# teamnl team0 getoption activeport
0
# teamnl team0 setoption activeport 5
teamnl team0 getoption activeport
5

You can do link changes on ports and push some traffic through now to see
what happens. Note you also need to alter mac addresses manualy!

See "man teamnl" for more details.


-------------------------------------------------------------------------------
3) Using example c applications and ip util

Note: Used applications are part of this project but their main purpose
      is to act as examples. Also they are usually not part of distribution
      packages

First create team device:
# ip link add team0 type team

Then spawn monitor app on second console:
# team_monitor team0

You will see incoming events there.
Now do couple of commands:

# team_manual_control team0 get mode
*NOMODE*
# team_manual_control team0 set mode activebackup
# team_manual_control team0 get mode
activebackup
# ip link set dev eth1 master team0
# ip link set dev eth2 master team0
# ip addr add 192.168.252.2/24 dev team0
# ip link set team0 up
# team_manual_control team0 get activeport
NONE
# team_manual_control team0 set activeport eth1
# team_manual_control team0 get activeport
eth1

You can do link changes on ports and push some traffic through now to see
what happens. Note you also need to alter mac addresses manualy!


-------------------------------------------------------------------------------
4) Using example python daemon

To create and manage active backup team device:
# ./examples/python/team_daemon.py --port eth1 --port eth2 -m activebackup --active-port eth2 --team-name team0

Or simply just following command to create roundrobin team device with default name:
# ./examples/python/team_daemon.py --port eth1 --port eth2 -m roundrobin

And setup addr and bring team up:
# ip addr add 192.168.252.2/24 dev team0
# ip link set team0 up
