2009-08-04 15:13:40 -07:00
|
|
|
.TH ovs\-dpctl 8 "August 2009" "Open vSwitch" "Open vSwitch Manual"
|
2009-07-08 13:19:16 -07:00
|
|
|
.ds PN ovs\-dpctl
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
.SH NAME
|
|
|
|
|
ovs\-dpctl \- administer Open vSwitch datapaths
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
.SH SYNOPSIS
|
|
|
|
|
.B ovs\-dpctl
|
|
|
|
|
[\fIoptions\fR] \fIcommand \fR[\fIswitch\fR] [\fIargs\fR\&...]
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
.SH DESCRIPTION
|
2010-02-24 13:42:43 -08:00
|
|
|
.PP
|
2009-07-08 13:19:16 -07:00
|
|
|
The \fBovs\-dpctl\fR program can create, modify, and delete Open vSwitch
|
|
|
|
|
datapaths. A single machine may host up to 256 datapaths (numbered 0
|
|
|
|
|
to 255).
|
2010-02-24 13:42:43 -08:00
|
|
|
.PP
|
2009-07-08 13:19:16 -07:00
|
|
|
A newly created datapath is associated with only one network device, a
|
|
|
|
|
virtual network device sometimes called the datapath's ``local port''.
|
|
|
|
|
A newly created datapath is not, however, associated with any of the
|
|
|
|
|
host's other network devices. To intercept and process traffic on a
|
|
|
|
|
given network device, use the \fBadd\-if\fR command to explicitly add
|
|
|
|
|
that network device to the datapath.
|
2010-02-24 13:42:43 -08:00
|
|
|
.PP
|
2010-12-03 14:41:38 -08:00
|
|
|
If \fBovs\-vswitchd\fR(8) is in use, use \fBovs\-vsctl\fR(8) instead
|
|
|
|
|
of \fBovs\-dpctl\fR.
|
2009-07-08 13:19:16 -07:00
|
|
|
.PP
|
|
|
|
|
Most \fBovs\-dpctl\fR commands that work with datapaths take an argument
|
|
|
|
|
that specifies the name of the datapath, in one of the following
|
|
|
|
|
forms:
|
|
|
|
|
.so lib/dpif.man
|
|
|
|
|
.PP
|
|
|
|
|
The following commands manage datapaths.
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
.TP
|
|
|
|
|
\fBadd\-dp \fIdp\fR [\fInetdev\fR...]
|
|
|
|
|
Creates datapath \fIdp\fR. The name of the new datapath's local port
|
|
|
|
|
depends on how \fIdp\fR is specified: if it takes the form
|
2009-06-16 11:05:00 -07:00
|
|
|
\fBdp\fIN\fR, the local port will be named \fBdp\fIN\fR; otherwise,
|
2009-07-08 13:19:16 -07:00
|
|
|
the local port's name will be \fIdp\fR.
|
2010-02-24 13:42:43 -08:00
|
|
|
.IP
|
2009-07-08 13:19:16 -07:00
|
|
|
This will fail if the host already has 256 datapaths, if a network
|
|
|
|
|
device with the same name as the new datapath's local port already
|
2009-06-16 11:05:00 -07:00
|
|
|
exists, or if \fIdp\fR is given in the form \fBdp\fIN\fR
|
|
|
|
|
and a datapath numbered \fIN\fR already exists.
|
2010-02-24 13:42:43 -08:00
|
|
|
.IP
|
2009-07-08 13:19:16 -07:00
|
|
|
If \fInetdev\fRs are specified, \fBovs\-dpctl\fR adds them to the datapath.
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
.TP
|
|
|
|
|
\fBdel\-dp \fIdp\fR
|
|
|
|
|
Deletes datapath \fIdp\fR. If \fIdp\fR is associated with any network
|
|
|
|
|
devices, they are automatically removed.
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
.TP
|
|
|
|
|
\fBadd\-if \fIdp netdev\fR[\fIoption\fR...]...
|
|
|
|
|
Adds each \fInetdev\fR to the set of network devices datapath
|
|
|
|
|
\fIdp\fR monitors, where \fIdp\fR is the name of an existing
|
|
|
|
|
datapath, and \fInetdev\fR is the name of one of the host's
|
|
|
|
|
network devices, e.g. \fBeth0\fR. Once a network device has been added
|
|
|
|
|
to a datapath, the datapath has complete ownership of the network device's
|
|
|
|
|
traffic and the network device appears silent to the rest of the
|
|
|
|
|
system.
|
2010-02-24 13:42:43 -08:00
|
|
|
.IP
|
2009-07-08 13:19:16 -07:00
|
|
|
A \fInetdev\fR may be followed by a comma-separated list of options.
|
|
|
|
|
The following options are currently supported:
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
.RS
|
2010-12-03 14:41:38 -08:00
|
|
|
.IP "\fBtype=\fItype\fR"
|
|
|
|
|
Specifies the type of port to add. The default type is \fBsystem\fR.
|
|
|
|
|
.IP "\fIkey\fB=\fIvalue\fR"
|
|
|
|
|
Adds an arbitrary key-value option to the port's configuration.
|
2009-07-08 13:19:16 -07:00
|
|
|
.RE
|
2010-12-03 14:41:38 -08:00
|
|
|
.IP
|
|
|
|
|
\fBovs\-vswitchd.conf.db\fR(5) documents the available port types and
|
|
|
|
|
options.
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
.TP
|
|
|
|
|
\fBdel\-if \fIdp netdev\fR...
|
|
|
|
|
Removes each \fInetdev\fR from the list of network devices datapath
|
|
|
|
|
\fIdp\fR monitors.
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-08-04 15:13:40 -07:00
|
|
|
.TP
|
2010-06-29 14:29:40 -07:00
|
|
|
\fBdump\-dps\fR
|
2009-08-04 15:13:40 -07:00
|
|
|
Prints the name of each configured datapath on a separate line.
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
.TP
|
|
|
|
|
\fBshow \fR[\fIdp\fR...]
|
|
|
|
|
Prints a summary of configured datapaths, including their datapath
|
|
|
|
|
numbers and a list of ports connected to each datapath. (The local
|
|
|
|
|
port is identified as port 0.)
|
2010-02-24 13:42:43 -08:00
|
|
|
.IP
|
2009-07-08 13:19:16 -07:00
|
|
|
If one or more datapaths are specified, information on only those
|
|
|
|
|
datapaths are displayed. Otherwise, \fBovs\-dpctl\fR displays information
|
|
|
|
|
about all configured datapaths.
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2010-06-29 14:29:40 -07:00
|
|
|
.IP "\fBdump\-flows \fIdp\fR"
|
2009-07-08 13:19:16 -07:00
|
|
|
Prints to the console all flow entries in datapath \fIdp\fR's
|
|
|
|
|
flow table.
|
2010-02-24 13:42:43 -08:00
|
|
|
.IP
|
2009-07-08 13:19:16 -07:00
|
|
|
This command is primarily useful for debugging Open vSwitch. The flow
|
|
|
|
|
table entries that it displays are not
|
|
|
|
|
OpenFlow flow entries. Instead, they are different and considerably
|
|
|
|
|
simpler flows maintained by the Open vSwitch kernel module.
|
2010-06-29 14:29:40 -07:00
|
|
|
.IP "\fBdel\-flows \fIdp\fR"
|
2009-07-08 13:19:16 -07:00
|
|
|
Deletes all flow entries from datapath \fIdp\fR's flow table.
|
2010-02-24 13:42:43 -08:00
|
|
|
.IP
|
2009-07-08 13:19:16 -07:00
|
|
|
This command is primarily useful for debugging Open vSwitch. As
|
2010-06-29 14:29:40 -07:00
|
|
|
discussed in \fBdump\-flows\fR, these entries are
|
2009-07-08 13:19:16 -07:00
|
|
|
not OpenFlow flow entries. By deleting them, the process that set them
|
|
|
|
|
up may be confused about their disappearance.
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
.SH OPTIONS
|
|
|
|
|
.TP
|
2010-06-29 14:29:40 -07:00
|
|
|
\fB\-t\fR, \fB\-\-timeout=\fIsecs\fR
|
2009-07-08 13:19:16 -07:00
|
|
|
Limits \fBovs\-dpctl\fR runtime to approximately \fIsecs\fR seconds. If
|
|
|
|
|
the timeout expires, \fBovs\-dpctl\fR will exit with a \fBSIGALRM\fR
|
|
|
|
|
signal.
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
.so lib/vlog.man
|
|
|
|
|
.so lib/common.man
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
.SH EXAMPLES
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
A typical \fBovs\-dpctl\fR command sequence for controlling an
|
|
|
|
|
Open vSwitch kernel module:
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
.TP
|
|
|
|
|
\fBovs\-dpctl add\-dp dp0\fR
|
|
|
|
|
Creates datapath number 0.
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
.TP
|
|
|
|
|
\fBovs\-dpctl add\-if dp0 eth0 eth1\fR
|
|
|
|
|
Adds two network devices to the new datapath.
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
.PP
|
2009-07-08 10:30:42 -07:00
|
|
|
At this point one would ordinarily start \fBovs\-openflowd\fR(8) on
|
2009-07-08 13:19:16 -07:00
|
|
|
\fBdp0\fR, transforming \fBdp0\fR into an OpenFlow switch. Then, when
|
|
|
|
|
the switch and the datapath is no longer needed:
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
.TP
|
|
|
|
|
\fBovs\-dpctl del\-if dp0 eth0 eth1\fR
|
|
|
|
|
Removes network devices from the datapath.
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
.TP
|
|
|
|
|
\fBovs\-dpctl del\-dp dp0\fR
|
|
|
|
|
Deletes the datapath.
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
.SH "SEE ALSO"
|
2010-02-24 13:42:43 -08:00
|
|
|
.
|
2009-07-08 13:19:16 -07:00
|
|
|
.BR ovs\-appctl (8),
|
2009-07-08 10:30:42 -07:00
|
|
|
.BR ovs\-openflowd (8),
|
2009-07-08 13:19:16 -07:00
|
|
|
.BR ovs\-vswitchd (8)
|