]>
Commit | Line | Data |
---|---|---|
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 |
5 | ovs\-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 |
13 | The \fBovs\-dpctl\fR program can create, modify, and delete Open vSwitch |
14 | datapaths. A single machine may host up to 256 datapaths (numbered 0 | |
15 | to 255). | |
a9b4a41a | 16 | .PP |
064af421 BP |
17 | A newly created datapath is associated with only one network device, a |
18 | virtual network device sometimes called the datapath's ``local port''. | |
19 | A newly created datapath is not, however, associated with any of the | |
20 | host's other network devices. To intercept and process traffic on a | |
21 | given network device, use the \fBadd\-if\fR command to explicitly add | |
22 | that network device to the datapath. | |
a9b4a41a | 23 | .PP |
c3827f61 BP |
24 | If \fBovs\-vswitchd\fR(8) is in use, use \fBovs\-vsctl\fR(8) instead |
25 | of \fBovs\-dpctl\fR. | |
064af421 BP |
26 | .PP |
27 | Most \fBovs\-dpctl\fR commands that work with datapaths take an argument | |
28 | that specifies the name of the datapath, in one of the following | |
29 | forms: | |
064af421 | 30 | .so lib/dpif.man |
064af421 BP |
31 | .PP |
32 | The following commands manage datapaths. | |
a9b4a41a | 33 | . |
064af421 BP |
34 | .TP |
35 | \fBadd\-dp \fIdp\fR [\fInetdev\fR...] | |
064af421 BP |
36 | Creates datapath \fIdp\fR. The name of the new datapath's local port |
37 | depends 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 | 39 | the local port's name will be \fIdp\fR. |
a9b4a41a | 40 | .IP |
064af421 BP |
41 | This will fail if the host already has 256 datapaths, if a network |
42 | device with the same name as the new datapath's local port already | |
f7ef6533 BP |
43 | exists, or if \fIdp\fR is given in the form \fBdp\fIN\fR |
44 | and a datapath numbered \fIN\fR already exists. | |
a9b4a41a | 45 | .IP |
064af421 | 46 | If \fInetdev\fRs are specified, \fBovs\-dpctl\fR adds them to the datapath. |
a9b4a41a | 47 | . |
064af421 BP |
48 | .TP |
49 | \fBdel\-dp \fIdp\fR | |
50 | Deletes datapath \fIdp\fR. If \fIdp\fR is associated with any network | |
51 | devices, they are automatically removed. | |
a9b4a41a | 52 | . |
064af421 BP |
53 | .TP |
54 | \fBadd\-if \fIdp netdev\fR[\fIoption\fR...]... | |
55 | Adds each \fInetdev\fR to the set of network devices datapath | |
56 | \fIdp\fR monitors, where \fIdp\fR is the name of an existing | |
57 | datapath, and \fInetdev\fR is the name of one of the host's | |
58 | network devices, e.g. \fBeth0\fR. Once a network device has been added | |
59 | to a datapath, the datapath has complete ownership of the network device's | |
60 | traffic and the network device appears silent to the rest of the | |
61 | system. | |
a9b4a41a | 62 | .IP |
064af421 BP |
63 | A \fInetdev\fR may be followed by a comma-separated list of options. |
64 | The following options are currently supported: | |
a9b4a41a | 65 | . |
064af421 | 66 | .RS |
c3827f61 BP |
67 | .IP "\fBtype=\fItype\fR" |
68 | Specifies the type of port to add. The default type is \fBsystem\fR. | |
69 | .IP "\fIkey\fB=\fIvalue\fR" | |
70 | Adds 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 | |
74 | options. | |
a9b4a41a | 75 | . |
064af421 BP |
76 | .TP |
77 | \fBdel\-if \fIdp netdev\fR... | |
78 | Removes 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 | 83 | Prints the name of each configured datapath on a separate line. |
a9b4a41a | 84 | . |
064af421 BP |
85 | .TP |
86 | \fBshow \fR[\fIdp\fR...] | |
87 | Prints a summary of configured datapaths, including their datapath | |
88 | numbers and a list of ports connected to each datapath. (The local | |
89 | port is identified as port 0.) | |
a9b4a41a | 90 | .IP |
064af421 BP |
91 | If one or more datapaths are specified, information on only those |
92 | datapaths are displayed. Otherwise, \fBovs\-dpctl\fR displays information | |
93 | about all configured datapaths. | |
a9b4a41a | 94 | . |
4e312e69 | 95 | .IP "\fBdump\-flows \fIdp\fR" |
064af421 BP |
96 | Prints to the console all flow entries in datapath \fIdp\fR's |
97 | flow table. | |
a9b4a41a | 98 | .IP |
064af421 BP |
99 | This command is primarily useful for debugging Open vSwitch. The flow |
100 | table entries that it displays are not | |
101 | OpenFlow flow entries. Instead, they are different and considerably | |
102 | simpler flows maintained by the Open vSwitch kernel module. | |
4e312e69 | 103 | .IP "\fBdel\-flows \fIdp\fR" |
064af421 | 104 | Deletes all flow entries from datapath \fIdp\fR's flow table. |
a9b4a41a | 105 | .IP |
064af421 | 106 | This command is primarily useful for debugging Open vSwitch. As |
4e312e69 | 107 | discussed in \fBdump\-flows\fR, these entries are |
064af421 BP |
108 | not OpenFlow flow entries. By deleting them, the process that set them |
109 | up 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 |
114 | Limits \fBovs\-dpctl\fR runtime to approximately \fIsecs\fR seconds. If |
115 | the timeout expires, \fBovs\-dpctl\fR will exit with a \fBSIGALRM\fR | |
116 | signal. | |
a9b4a41a | 117 | . |
064af421 BP |
118 | .so lib/vlog.man |
119 | .so lib/common.man | |
a9b4a41a | 120 | . |
064af421 | 121 | .SH EXAMPLES |
a9b4a41a | 122 | . |
064af421 BP |
123 | A typical \fBovs\-dpctl\fR command sequence for controlling an |
124 | Open vSwitch kernel module: | |
a9b4a41a | 125 | . |
064af421 BP |
126 | .TP |
127 | \fBovs\-dpctl add\-dp dp0\fR | |
128 | Creates datapath number 0. | |
a9b4a41a | 129 | . |
064af421 BP |
130 | .TP |
131 | \fBovs\-dpctl add\-if dp0 eth0 eth1\fR | |
132 | Adds two network devices to the new datapath. | |
a9b4a41a | 133 | . |
064af421 | 134 | .PP |
8cd4882f | 135 | At 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 |
137 | the switch and the datapath is no longer needed: | |
a9b4a41a | 138 | . |
064af421 BP |
139 | .TP |
140 | \fBovs\-dpctl del\-if dp0 eth0 eth1\fR | |
141 | Removes network devices from the datapath. | |
a9b4a41a | 142 | . |
064af421 BP |
143 | .TP |
144 | \fBovs\-dpctl del\-dp dp0\fR | |
145 | Deletes 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) |