Show Table of Contents
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:
~]# teamdctl team0 state view
For a more verbose output:
~]# teamdctl team0 state view -v
For a complete state dump in JSON format (useful for machine processing) of team0, use the following command:
~]# teamdctl team0 state dump
For a configuration dump in JSON format of team0, use the following command:
~]# teamdctl team0 config dump
To view the configuration of a port em1, that is part of a team team0, enter the following command:
~]# teamdctl team0 port config dump em1
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:
~]# teamdctl team0 port add em1
Important
If using
teamdctl directly to enslave a port, the slave 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:
~]# teamdctl team0 port remove em1
8.11.3. Apply a Configuration to a Port in a Network Team
To apply a JSON format configuration to a port em1 in a network team team0, issue a command as
root in the following format:
~]# teamdctl team0 port config update em1 JSON-config-string
Where JSON-config-string is the configuration as a string of text in JSON format. This will update the configuration of the port using the JSON format string supplied. An example of a valid JSON string for configuring a port would be the following:
{
"prio": -10,
"sticky": true
}
Use single quotes around the JSON configuration string and omit the line breaks.
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:
~]# teamdctl team0 port config dump em1
This will dump the JSON format configuration of the port to standard output.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.