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