1 .TH ovs\-dpctl 8 "August 2009" "Open vSwitch" "Open vSwitch Manual"
5 ovs\-dpctl \- administer Open vSwitch datapaths
9 [\fIoptions\fR] \fIcommand \fR[\fIswitch\fR] [\fIargs\fR\&...]
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
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.
24 If \fBovs\-vswitchd\fR(8) is in use, use \fBovs\-vsctl\fR(8) instead
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
32 The following commands manage datapaths.
35 \fBadd\-dp \fIdp\fR [\fInetdev\fR...]
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
38 \fBdp\fIN\fR, the local port will be named \fBdp\fIN\fR; otherwise,
39 the local port's name will be \fIdp\fR.
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
43 exists, or if \fIdp\fR is given in the form \fBdp\fIN\fR
44 and a datapath numbered \fIN\fR already exists.
46 If \fInetdev\fRs are specified, \fBovs\-dpctl\fR adds them to the datapath.
50 Deletes datapath \fIdp\fR. If \fIdp\fR is associated with any network
51 devices, they are automatically removed.
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
63 A \fInetdev\fR may be followed by a comma-separated list of options.
64 The following options are currently supported:
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.
73 \fBovs\-vswitchd.conf.db\fR(5) documents the available port types and
77 \fBdel\-if \fIdp netdev\fR...
78 Removes each \fInetdev\fR from the list of network devices datapath
83 Prints the name of each configured datapath on a separate line.
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.)
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.
95 .IP "\fBdump\-flows \fIdp\fR"
96 Prints to the console all flow entries in datapath \fIdp\fR's
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.
103 .IP "\fBdel\-flows \fIdp\fR"
104 Deletes all flow entries from datapath \fIdp\fR's flow table.
106 This command is primarily useful for debugging Open vSwitch. As
107 discussed in \fBdump\-flows\fR, these entries are
108 not OpenFlow flow entries. By deleting them, the process that set them
109 up may be confused about their disappearance.
113 \fB\-t\fR, \fB\-\-timeout=\fIsecs\fR
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
123 A typical \fBovs\-dpctl\fR command sequence for controlling an
124 Open vSwitch kernel module:
127 \fBovs\-dpctl add\-dp dp0\fR
128 Creates datapath number 0.
131 \fBovs\-dpctl add\-if dp0 eth0 eth1\fR
132 Adds two network devices to the new datapath.
135 At this point one would ordinarily start \fBovs\-openflowd\fR(8) on
136 \fBdp0\fR, transforming \fBdp0\fR into an OpenFlow switch. Then, when
137 the switch and the datapath is no longer needed:
140 \fBovs\-dpctl del\-if dp0 eth0 eth1\fR
141 Removes network devices from the datapath.
144 \fBovs\-dpctl del\-dp dp0\fR
145 Deletes the datapath.
150 .BR ovs\-openflowd (8),
151 .BR ovs\-vswitchd (8)