Merge citrix into master.
[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
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
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
24 Do not use \fBovs\-dpctl\fR commands to modify datapaths if
25 \fBovs\-vswitchd\fR(8) is in use.  Instead, modify the
26 \fBovs\-vswitchd\fR configuration file and send \fBSIGHUP\fR to the
27 \fBovs\-vswitchd\fR process.
28
29 .PP
30 Most \fBovs\-dpctl\fR commands that work with datapaths take an argument
31 that specifies the name of the datapath, in one of the following
32 forms:
33
34 .so lib/dpif.man
35
36 .PP
37 The following commands manage datapaths.
38
39 .TP
40 \fBadd\-dp \fIdp\fR [\fInetdev\fR...]
41
42 Creates datapath \fIdp\fR.  The name of the new datapath's local port
43 depends on how \fIdp\fR is specified: if it takes the form
44 \fBdp\fIN\fR, the local port will be named \fBdp\fIN\fR; otherwise,
45 the local port's name will be \fIdp\fR.
46
47 This will fail if the host already has 256 datapaths, if a network
48 device with the same name as the new datapath's local port already
49 exists, or if \fIdp\fR is given in the form \fBdp\fIN\fR
50 and a datapath numbered \fIN\fR already exists.
51
52 If \fInetdev\fRs are specified, \fBovs\-dpctl\fR adds them to the datapath.
53
54 .TP
55 \fBdel\-dp \fIdp\fR
56 Deletes datapath \fIdp\fR.  If \fIdp\fR is associated with any network
57 devices, they are automatically removed.
58
59 .TP
60 \fBadd\-if \fIdp netdev\fR[\fIoption\fR...]...
61 Adds each \fInetdev\fR to the set of network devices datapath
62 \fIdp\fR monitors, where \fIdp\fR is the name of an existing
63 datapath, and \fInetdev\fR is the name of one of the host's
64 network devices, e.g. \fBeth0\fR.  Once a network device has been added
65 to a datapath, the datapath has complete ownership of the network device's
66 traffic and the network device appears silent to the rest of the
67 system.
68
69 A \fInetdev\fR may be followed by a comma-separated list of options.
70 The following options are currently supported:
71
72 .RS
73 .IP "\fBinternal\fR"
74 Instead of attaching an existing \fInetdev\fR, creates an internal
75 port (analogous to the local port) with that name.
76 .RE
77
78 .TP
79 \fBdel\-if \fIdp netdev\fR...
80 Removes each \fInetdev\fR from the list of network devices datapath
81 \fIdp\fR monitors.
82
83 .TP
84 \fBdump-dps\fR
85 Prints the name of each configured datapath on a separate line.
86
87 .TP
88 \fBshow \fR[\fIdp\fR...]
89 Prints a summary of configured datapaths, including their datapath
90 numbers and a list of ports connected to each datapath.  (The local
91 port is identified as port 0.)
92
93 If one or more datapaths are specified, information on only those
94 datapaths are displayed.  Otherwise, \fBovs\-dpctl\fR displays information
95 about all configured datapaths.
96
97 .IP "\fBdump-flows \fIdp\fR"
98 Prints to the console all flow entries in datapath \fIdp\fR's
99 flow table.
100
101 This command is primarily useful for debugging Open vSwitch.  The flow
102 table entries that it displays are not
103 OpenFlow flow entries.  Instead, they are different and considerably
104 simpler flows maintained by the Open vSwitch kernel module.
105
106 .IP "\fBdel-flows \fIdp\fR"
107 Deletes all flow entries from datapath \fIdp\fR's flow table.
108
109 This command is primarily useful for debugging Open vSwitch.  As
110 discussed in \fBdump-flows\fR, these entries are
111 not OpenFlow flow entries.  By deleting them, the process that set them
112 up may be confused about their disappearance.
113
114 .IP "\fBdump-groups \fIdp\fR"
115 Prints to the console the sets of port groups maintained by datapath
116 \fIdp\fR.  Ordinarily there are at least 2 port groups in a datapath
117 that \fBovs\-openflowd\fR or \fBovs\-vswitch\fR is controlling: group
118 0 contains
119 all ports except those disabled by STP, and group 1 contains all
120 ports.  Additional or different groups might be used in the future.
121
122 This command is primarily useful for debugging Open vSwitch.  OpenFlow
123 does not have a concept of port groups.
124
125 .SH OPTIONS
126 .TP
127 \fB-t\fR, \fB--timeout=\fIsecs\fR
128 Limits \fBovs\-dpctl\fR runtime to approximately \fIsecs\fR seconds.  If
129 the timeout expires, \fBovs\-dpctl\fR will exit with a \fBSIGALRM\fR
130 signal.
131
132 .so lib/vlog.man
133 .so lib/common.man
134
135 .SH EXAMPLES
136
137 A typical \fBovs\-dpctl\fR command sequence for controlling an
138 Open vSwitch kernel module:
139
140 .TP
141 \fBovs\-dpctl add\-dp dp0\fR
142 Creates datapath number 0.
143
144 .TP
145 \fBovs\-dpctl add\-if dp0 eth0 eth1\fR
146 Adds two network devices to the new datapath.
147
148 .PP
149 At this point one would ordinarily start \fBovs\-openflowd\fR(8) on
150 \fBdp0\fR, transforming \fBdp0\fR into an OpenFlow switch.  Then, when
151 the switch and the datapath is no longer needed:
152
153 .TP
154 \fBovs\-dpctl del\-if dp0 eth0 eth1\fR
155 Removes network devices from the datapath.
156
157 .TP
158 \fBovs\-dpctl del\-dp dp0\fR
159 Deletes the datapath.
160
161 .SH "SEE ALSO"
162
163 .BR ovs\-appctl (8),
164 .BR ovs\-openflowd (8),
165 .BR ovs\-vswitchd (8)