8.11. Controlling teamd with teamdctl
8.11. Controlling teamd with teamdctl In order to query a running instance of teamd for statistics or configuration information, or to make changes, the control tool teamdctl is used. To view the current team state of a team team0 , enter the following command as root : For a more verbose output: For a complete state dump in JSON format (useful for machine processing) of team0 , use the following command: For a configuration dump in JSON format of team0 , use the following command: To view the configuration of a port em1 , that is part of a team team0 , enter the following command: 8.11.1. Add a Port to a Network Team To add a port em1 to a network team team0 , issue the following command as root : Important If using teamdctl directly to add a port, the port must be set to down . Otherwise the teamdctl team0 port add em1 command will fail. 8.11.2. Remove a Port From a Network Team To remove an interface em1 from a network team team0 , issue the following command as root : 8.11.3. Applying a Sticky Setting to a Port in a Network Team You can use the teamdctl command to apply a sticky setting to ensure that a specific port is used as an active link when it is available. Prerequisites You already created a team of network interfaces. As a result, you have a port ( em1 ) that you want to update the configuration of. Procedure To apply a JSON format configuration to a port em1 in a network team team0 , run the following commands: Update the configuration of the sticky setting for em1 : Remove em1 : Add em1 again so that the sticky setting takes effect: Note that the old configuration will be overwritten and that any options omitted will be reset to the default values. See the teamdctl(8) man page for more team daemon control tool command examples. 8.11.4. View the Configuration of a Port in a Network Team To copy the configuration of a port em1 in a network team team0 , issue the following command as root : This will dump the JSON format configuration of the port to standard output.
~]# teamdctl team0 state view ~]# teamdctl team0 state view -v ~]# teamdctl team0 state dump ~]# teamdctl team0 config dump ~]# teamdctl team0 port config dump em1 ~]# teamdctl team0 port add em1 ~]# teamdctl team0 port remove em1 ~]# teamdctl team0 port config update em1 '{ "prio": 100, "sticky": true }' ~]# teamdctl team0 port remove em1 ~]# teamdctl team0 port add em1 ~]# teamdctl team0 port config dump em1