vtep-ctl(8)

NAME
vtep-ctl - utility for querying and configuring a VTEP database

SYNOPSIS
vtep-ctl [options] -- [options] command [args] [-- [options] command [args]]...

DESCRIPTION
The vtep-ctl program configures a VTEP database. See vtep(5) for comprehensive documentation of the database schema.

vtep-ctl connects to an ovsdb-server process that maintains a VTEP configuration database. Using this connection, it queries and possibly applies changes to the database, depending on the supplied commands.

vtep-ctl can perform any number of commands in a single run, implemented as a single atomic transaction against the database.

The vtep-ctl command line begins with global options (see OPTIONS below for details). The global options are followed by one or more commands. Each command should begin with -- by itself as a command-line argument, to separate it from the following commands. (The -- before the first command is optional.) The command itself starts with command-specific options, if any, followed by the command name and any arguments. See EXAMPLES below for syntax examples.

OPTIONS
The following options affect the behavior vtep-ctl as a whole. Some individual commands also accept their own options, which are given just before the command name. If the first command on the command line has options, then those options must be separated from the global options by --.

--db=server
    Sets server as the database server that vtep-ctl contacts to query or modify configuration. The default is unix:@RUNDIR@/db.sock. server must take one of the following forms:

--no-syslog
    By default, vtep-ctl logs its arguments and the details of any changes that it makes to the system log. This option disables this logging.

    This option is equivalent to --verbose=vtep_ctl:syslog:warn.

--oneline
    Modifies the output format so that the output for each command is printed on a single line. New-line characters that would otherwise separate lines are printed as \n, and any instances of \ that would otherwise appear in the output are doubled. Prints a blank line for each command that has no output. This option does not affect the formatting of output from the list or find commands; see Table Formatting Options below.

--dry-run
    Prevents vtep-ctl from actually modifying the database.

-t secs
    By default, or with a secs of 0, vtep-ctl waits forever for a response from the database. This option limits runtime to approximately secs seconds. If the timeout expires, vtep-ctl will exit with a SIGALRM signal. (A timeout would normally happen only if the database cannot be contacted, or if the system is overloaded.)

  Table Formatting Options
These options control the format of output from the list and find commands.

  Public Key Infrastructure Options

COMMANDS
The commands implemented by vtep-ctl are described in the sections below.

  Physical Switch Commands
These commands examine and manipulate physical switches.

[--may-exist] add-ps pswitch
    Creates a new physical switch named pswitch. Initially the switch will have no ports.

    Without --may-exist, attempting to create a switch that exists is an error. With --may-exist, this command does nothing if pswitch already exists.

[--if-exists] del-ps pswitch
    Deletes pswitch and all of its ports.

    Without --if-exists, attempting to delete a switch that does not exist is an error. With --if-exists, attempting to delete a switch that does not exist has no effect.

list-ps
    Lists all existing physical switches on standard output, one per line.

ps-exists pswitch
    Tests whether pswitch exists. If so, vtep-ctl exits successfully with exit code 0. If not, vtep-ctl exits unsuccessfully with exit code 2.

  Port Commands
These commands examine and manipulate VTEP physical ports.

list-ports pswitch
    Lists all of the ports within pswitch on standard output, one per line.

[--may-exist] add-port pswitch port
    Creates on pswitch a new port named port from the network device of the same name.

    Without --may-exist, attempting to create a port that exists is an error. With --may-exist, this command does nothing if port already exists on pswitch.

[--if-exists] del-port [pswitch] port
    Deletes port. If pswitch is omitted, port is removed from whatever switch contains it; if pswitch is specified, it must be the switch that contains port.

    Without --if-exists, attempting to delete a port that does not exist is an error. With --if-exists, attempting to delete a port that does not exist has no effect.

  Logical Switch Commands
These commands examine and manipulate logical switches.

[--may-exist] add-ls lswitch
    Creates a new logical switch named lswitch. Initially the switch will have no locator bindings.

    Without --may-exist, attempting to create a switch that exists is an error. With --may-exist, this command does nothing if lswitch already exists.

[--if-exists] del-ls lswitch
    Deletes lswitch.

    Without --if-exists, attempting to delete a switch that does not exist is an error. With --if-exists, attempting to delete a switch that does not exist has no effect.

list-ls
    Lists all existing logical switches on standard output, one per line.

ls-exists lswitch
    Tests whether lswitch exists. If so, vtep-ctl exits successfully with exit code 0. If not, vtep-ctl exits unsuccessfully with exit code 2.

bind-ls pswitch port vlan lswitch
    Bind logical switch lswitch to the port/vlan combination on the physical switch pswitch.

unbind-ls pswitch port vlan
    Remove the logical switch binding from the port/vlan combination on the physical switch pswitch.

list-bindings pswitch port
    List the logical switch bindings for port on the physical switch pswitch.

set-replication-mode lswitch replication-mode
    Set logical switch lswitch replication mode to replication-mode; the only valid values for replication mode are "service_node" and "source_node". For handling L2 broadcast, multicast and unknown unicast traffic, packets can be sent to all members of a logical switch referenced by a physical switch. There are different modes to replicate the packets. The default mode of replication is to send the traffic to a service node, which can be a hypervisor, server or appliance, and let the service node handle replication to other transport nodes (hypervisors or other VTEP physical switches). This mode is called service node replication. An alternate mode of replication, called source node replication involves the source node sending to all other transport nodes. Hypervisors are always responsible for doing their own replication for locally attached VMs in both modes. Service node mode is the default, if the replication mode is not explicitly set. Service node replication mode is considered a basic requirement because it only requires sending the packet to a single transport node.

get-replication-mode lswitch
    Get logical switch lswitch replication mode. The only valid values for replication mode are "service_node" and "source_node". An empty reply for replication mode implies a default of "service_node".

  Logical Router Commands
These commands examine and manipulate logical routers.

[--may-exist] add-lr lrouter
    Creates a new logical router named lrouter.

    Without --may-exist, attempting to create a router that exists is an error. With --may-exist, this command does nothing if lrouter already exists.

[--if-exists] del-lr lrouter
    Deletes lrouter.

    Without --if-exists, attempting to delete a router that does not exist is an error. With --if-exists, attempting to delete a router that does not exist has no effect.

list-lr
    Lists all existing logical routers on standard output, one per line.

lr-exists lrouter
    Tests whether lrouter exists. If so, vtep-ctl exits successfully with exit code 0. If not, vtep-ctl exits unsuccessfully with exit code 2.

  Local MAC Binding Commands
These commands examine and manipulate local MAC bindings for the logical switch. The local maps are written by the VTEP to refer to MACs it has learned on its physical ports.

add-ucast-local lswitch mac [encap] ip
    Map the unicast Ethernet address mac to the physical location ip using encapsulation encap on lswitch. If encap is not specified, the default is "vxlan_over_ipv4". The local mappings are used by the VTEP to refer to MACs learned on its physical ports.

del-ucast-local lswitch mac
    Remove the local unicast Ethernet address mac map from lswitch. The local mappings are used by the VTEP to refer to MACs learned on its physical ports.

add-mcast-local lswitch mac [encap] ip
    Add physical location ip using encapsulation encap to the local mac binding table for multicast Ethernet address mac on lswitch. If encap is not specified, the default is "vxlan_over_ipv4". The local mappings are used by the VTEP to refer to MACs learned on its physical ports.

del-mcast-local lswitch mac [encap] ip
    Remove physical location ip using encapsulation encap from the local mac binding table for multicast Ethernet address mac on lswitch. If encap is not specified, the default is "vxlan_over_ipv4". The local mappings are used by the VTEP to refer to MACs learned on its physical ports.

clear-local-macs lswitch
    Clear the local MAC bindings for lswitch.

list-local-macs lswitch
    List the local MAC bindings for lswitch, one per line.

  Remote MAC Binding Commands
These commands examine and manipulate local and remote MAC bindings for the logical switch. The remote maps are written by the network virtualization controller to refer to MACs that it has learned.

add-ucast-remote lswitch mac [encap] ip
    Map the unicast Ethernet address mac to the physical location ip using encapsulation encap on lswitch. If encap is not specified, the default is "vxlan_over_ipv4". The remote mappings are used by the network virtualization platform to refer to MACs that it has learned.

del-ucast-remote lswitch mac
    Remove the remote unicast Ethernet address mac map from lswitch. The remote mappings are used by the network virtualization platform to refer to MACs that it has learned.

add-mcast-remote lswitch mac [encap] ip
    Add physical location ip using encapsulation encap to the remote mac binding table for multicast Ethernet address mac on lswitch. If encap is not specified, the default is "vxlan_over_ipv4". The remote mappings are used by the network virtualization platform to refer to MACs that it has learned.

del-mcast-remote lswitch mac [encap] ip
    Remove physical location ip using encapsulation encap from the remote mac binding table for multicast Ethernet address mac on lswitch. If encap is not specified, the default is "vxlan_over_ipv4". The remote mappings are used by the network virtualization platform to refer to MACs that it has learned.

clear-remote-macs lswitch
    Clear the remote MAC bindings for lswitch.

list-remote-macs lswitch
    List the remote MAC bindings for lswitch, one per line.

  Manager Connectivity
These commands manipulate the managers column in the Global table and rows in the Managers table. When ovsdb-server is configured to use the managers column for OVSDB connections (as described in INSTALL.Linux and in the startup scripts provided with Open vSwitch), this allows the administrator to use vtep-ctl to configure database connections.

get-manager
    Prints the configured manager(s).

del-manager
    Deletes the configured manager(s).

set-manager target...
    Sets the configured manager target or targets. Each target may use any of the following forms:

  Database Commands
These commands query and modify the contents of ovsdb tables. They are a slight abstraction of the ovsdb interface and as such they operate at a lower level than other vtep-ctl commands.

Each of these commands has a table parameter to identify a table within the database. Many of them also take a record parameter that identifies a particular record within a table. The record parameter may be the UUID for a record, and many tables offer additional ways to identify records. Some commands also take column parameters that identify a particular field within the records in a table.

The following tables are currently defined:

Global
    Top-level configuration for a hardware VTEP. This table contains exactly one record, identified by specifying . as the record name.

Manager
    Configuration for an OVSDB connection. Records may be identified by target (e.g. tcp:1.2.3.4).

Physical_Switch
    A physical switch that implements a VTEP. Records may be identified by physical switch name.

Physical_Port
    A port within a physical switch.

Logical_Binding_Stats
    Reports statistics for the logical switch with which a VLAN on a physical port is associated.

Logical_Switch
    A logical Ethernet switch. Records may be identified by logical switch name.

Ucast_Macs_Local
    Mapping of locally discovered unicast MAC addresses to tunnels.

Ucast_Macs_Remote
    Mapping of remotely programmed unicast MAC addresses to tunnels.

Mcast_Macs_Local
    Mapping of locally discovered multicast MAC addresses to tunnels.

Mcast_Macs_Remote
    Mapping of remotely programmed multicast MAC addresses to tunnels.

Physical_Locator_Set
    A set of one or more physical locators.

Physical_Locator
    Identifies an endpoint to which logical switch traffic may be encapsulated and forwarded. Records may be identified by physical locator name.

Record names must be specified in full and with correct capitalization. Names of tables and columns are not case-sensitive, and -- and _ are treated interchangeably. Unique abbreviations are acceptable, e.g. man or m is sufficient to identify the Manager table.

EXIT STATUS

0   Successful program execution.

1   Usage, syntax, or configuration file error.

2   The switch argument to ps-exists specified the name of a physical switch that does not exist.

SEE ALSO
ovsdb-server(1), vtep(5).