]> git.proxmox.com Git - mirror_ovs.git/blame - utilities/ovs-dpctl.8.in
ovs-appctl: On failure, print the error message output by the server.
[mirror_ovs.git] / utilities / ovs-dpctl.8.in
CommitLineData
b566902b 1.TH ovs\-dpctl 8 "August 2009" "Open vSwitch" "Open vSwitch Manual"
064af421 2.ds PN ovs\-dpctl
a9b4a41a 3.
064af421
BP
4.SH NAME
5ovs\-dpctl \- administer Open vSwitch datapaths
a9b4a41a 6.
064af421
BP
7.SH SYNOPSIS
8.B ovs\-dpctl
9[\fIoptions\fR] \fIcommand \fR[\fIswitch\fR] [\fIargs\fR\&...]
a9b4a41a 10.
064af421 11.SH DESCRIPTION
a9b4a41a 12.PP
064af421
BP
13The \fBovs\-dpctl\fR program can create, modify, and delete Open vSwitch
14datapaths. A single machine may host up to 256 datapaths (numbered 0
15to 255).
a9b4a41a 16.PP
064af421
BP
17A newly created datapath is associated with only one network device, a
18virtual network device sometimes called the datapath's ``local port''.
19A newly created datapath is not, however, associated with any of the
20host's other network devices. To intercept and process traffic on a
21given network device, use the \fBadd\-if\fR command to explicitly add
22that network device to the datapath.
a9b4a41a 23.PP
c3827f61
BP
24If \fBovs\-vswitchd\fR(8) is in use, use \fBovs\-vsctl\fR(8) instead
25of \fBovs\-dpctl\fR.
064af421
BP
26.PP
27Most \fBovs\-dpctl\fR commands that work with datapaths take an argument
28that specifies the name of the datapath, in one of the following
29forms:
064af421 30.so lib/dpif.man
064af421
BP
31.PP
32The following commands manage datapaths.
a9b4a41a 33.
064af421
BP
34.TP
35\fBadd\-dp \fIdp\fR [\fInetdev\fR...]
064af421
BP
36Creates datapath \fIdp\fR. The name of the new datapath's local port
37depends on how \fIdp\fR is specified: if it takes the form
f7ef6533 38\fBdp\fIN\fR, the local port will be named \fBdp\fIN\fR; otherwise,
064af421 39the local port's name will be \fIdp\fR.
a9b4a41a 40.IP
064af421
BP
41This will fail if the host already has 256 datapaths, if a network
42device with the same name as the new datapath's local port already
f7ef6533
BP
43exists, or if \fIdp\fR is given in the form \fBdp\fIN\fR
44and a datapath numbered \fIN\fR already exists.
a9b4a41a 45.IP
064af421 46If \fInetdev\fRs are specified, \fBovs\-dpctl\fR adds them to the datapath.
a9b4a41a 47.
064af421
BP
48.TP
49\fBdel\-dp \fIdp\fR
50Deletes datapath \fIdp\fR. If \fIdp\fR is associated with any network
51devices, they are automatically removed.
a9b4a41a 52.
064af421
BP
53.TP
54\fBadd\-if \fIdp netdev\fR[\fIoption\fR...]...
55Adds each \fInetdev\fR to the set of network devices datapath
56\fIdp\fR monitors, where \fIdp\fR is the name of an existing
57datapath, and \fInetdev\fR is the name of one of the host's
58network devices, e.g. \fBeth0\fR. Once a network device has been added
59to a datapath, the datapath has complete ownership of the network device's
60traffic and the network device appears silent to the rest of the
61system.
a9b4a41a 62.IP
064af421
BP
63A \fInetdev\fR may be followed by a comma-separated list of options.
64The following options are currently supported:
a9b4a41a 65.
064af421 66.RS
c3827f61
BP
67.IP "\fBtype=\fItype\fR"
68Specifies the type of port to add. The default type is \fBsystem\fR.
69.IP "\fIkey\fB=\fIvalue\fR"
70Adds an arbitrary key-value option to the port's configuration.
064af421 71.RE
c3827f61
BP
72.IP
73\fBovs\-vswitchd.conf.db\fR(5) documents the available port types and
74options.
a9b4a41a 75.
064af421
BP
76.TP
77\fBdel\-if \fIdp netdev\fR...
78Removes each \fInetdev\fR from the list of network devices datapath
79\fIdp\fR monitors.
a9b4a41a 80.
b566902b 81.TP
4e312e69 82\fBdump\-dps\fR
b566902b 83Prints the name of each configured datapath on a separate line.
a9b4a41a 84.
064af421
BP
85.TP
86\fBshow \fR[\fIdp\fR...]
87Prints a summary of configured datapaths, including their datapath
88numbers and a list of ports connected to each datapath. (The local
89port is identified as port 0.)
a9b4a41a 90.IP
064af421
BP
91If one or more datapaths are specified, information on only those
92datapaths are displayed. Otherwise, \fBovs\-dpctl\fR displays information
93about all configured datapaths.
a9b4a41a 94.
4e312e69 95.IP "\fBdump\-flows \fIdp\fR"
064af421
BP
96Prints to the console all flow entries in datapath \fIdp\fR's
97flow table.
a9b4a41a 98.IP
064af421
BP
99This command is primarily useful for debugging Open vSwitch. The flow
100table entries that it displays are not
101OpenFlow flow entries. Instead, they are different and considerably
102simpler flows maintained by the Open vSwitch kernel module.
4e312e69 103.IP "\fBdel\-flows \fIdp\fR"
064af421 104Deletes all flow entries from datapath \fIdp\fR's flow table.
a9b4a41a 105.IP
064af421 106This command is primarily useful for debugging Open vSwitch. As
4e312e69 107discussed in \fBdump\-flows\fR, these entries are
064af421
BP
108not OpenFlow flow entries. By deleting them, the process that set them
109up may be confused about their disappearance.
a9b4a41a 110.
064af421
BP
111.SH OPTIONS
112.TP
4e312e69 113\fB\-t\fR, \fB\-\-timeout=\fIsecs\fR
064af421
BP
114Limits \fBovs\-dpctl\fR runtime to approximately \fIsecs\fR seconds. If
115the timeout expires, \fBovs\-dpctl\fR will exit with a \fBSIGALRM\fR
116signal.
a9b4a41a 117.
064af421
BP
118.so lib/vlog.man
119.so lib/common.man
a9b4a41a 120.
064af421 121.SH EXAMPLES
a9b4a41a 122.
064af421
BP
123A typical \fBovs\-dpctl\fR command sequence for controlling an
124Open vSwitch kernel module:
a9b4a41a 125.
064af421
BP
126.TP
127\fBovs\-dpctl add\-dp dp0\fR
128Creates datapath number 0.
a9b4a41a 129.
064af421
BP
130.TP
131\fBovs\-dpctl add\-if dp0 eth0 eth1\fR
132Adds two network devices to the new datapath.
a9b4a41a 133.
064af421 134.PP
8cd4882f 135At this point one would ordinarily start \fBovs\-openflowd\fR(8) on
064af421
BP
136\fBdp0\fR, transforming \fBdp0\fR into an OpenFlow switch. Then, when
137the switch and the datapath is no longer needed:
a9b4a41a 138.
064af421
BP
139.TP
140\fBovs\-dpctl del\-if dp0 eth0 eth1\fR
141Removes network devices from the datapath.
a9b4a41a 142.
064af421
BP
143.TP
144\fBovs\-dpctl del\-dp dp0\fR
145Deletes the datapath.
a9b4a41a 146.
064af421 147.SH "SEE ALSO"
a9b4a41a 148.
064af421 149.BR ovs\-appctl (8),
8cd4882f 150.BR ovs\-openflowd (8),
064af421 151.BR ovs\-vswitchd (8)