b1b257086e6fee2e2301dd1c72f4dab43e68ee41
[sliver-openvswitch.git] / utilities / ovs-dpctl.8.in
1 .de IQ
2 .  br
3 .  ns
4 .  IP "\\$1"
5 ..
6 .TH ovs\-dpctl 8 "@VERSION@" "Open vSwitch" "Open vSwitch Manual"
7 .ds PN ovs\-dpctl
8 .
9 .SH NAME
10 ovs\-dpctl \- administer Open vSwitch datapaths
11 .
12 .SH SYNOPSIS
13 .B ovs\-dpctl
14 [\fIoptions\fR] \fIcommand \fR[\fIswitch\fR] [\fIargs\fR\&...]
15 .
16 .SH DESCRIPTION
17 .PP
18 The \fBovs\-dpctl\fR program can create, modify, and delete Open vSwitch
19 datapaths.  A single machine may host any number of datapaths.
20 .PP
21 A newly created datapath is associated with only one network device, a
22 virtual network device sometimes called the datapath's ``local port''.
23 A newly created datapath is not, however, associated with any of the
24 host's other network devices.  To intercept and process traffic on a
25 given network device, use the \fBadd\-if\fR command to explicitly add
26 that network device to the datapath.
27 .PP
28 If \fBovs\-vswitchd\fR(8) is in use, use \fBovs\-vsctl\fR(8) instead
29 of \fBovs\-dpctl\fR.
30 .PP
31 Most \fBovs\-dpctl\fR commands that work with datapaths take an
32 argument that specifies the name of the datapath.  Datapath names take
33 the form [\fItype\fB@\fR]\fIname\fR, where \fIname\fR is the network
34 device associated with the datapath's local port.  If \fItype\fR is
35 given, it specifies the datapath provider of \fIname\fR, otherwise the
36 default provider \fBsystem\fR is assumed.
37 .PP
38 The following commands manage datapaths.
39 .
40 .TP
41 \fBadd\-dp \fIdp\fR [\fInetdev\fR[\fB,\fIoption\fR]...]
42 Creates datapath \fIdp\fR, with a local port also named \fIdp\fR.
43 This will fail if a network device \fIdp\fR already exists.
44 .IP
45 If \fInetdev\fRs are specified, \fBovs\-dpctl\fR adds them to the
46 new datapath, just as if \fBadd\-if\fR was specified.
47 .
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.
52 .
53 .TP
54 \fBadd\-if \fIdp netdev\fR[\fB,\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.
62 .IP
63 A \fInetdev\fR may be followed by a comma-separated list of options.
64 The following options are currently supported:
65 .
66 .RS
67 .IP "\fBtype=\fItype\fR"
68 Specifies the type of port to add.  The default type is \fBsystem\fR.
69 .IP "\fBport_no=\fIport\fR"
70 Requests a specific port number within the datapath.  If this option is
71 not specified then one will be automatically assigned.
72 .IP "\fIkey\fB=\fIvalue\fR"
73 Adds an arbitrary key-value option to the port's configuration.
74 .RE
75 .IP
76 \fBovs\-vswitchd.conf.db\fR(5) documents the available port types and
77 options.
78 .
79 .IP "\fBset\-if \fIdp port\fR[\fB,\fIoption\fR]..."
80 Reconfigures each \fIport\fR in \fIdp\fR as specified.  An
81 \fIoption\fR of the form \fIkey\fB=\fIvalue\fR adds the specified
82 key-value option to the port or overrides an existing key's value.  An
83 \fIoption\fR of the form \fIkey\fB=\fR, that is, without a value,
84 deletes the key-value named \fIkey\fR.  The type and port number of a
85 port cannot be changed, so \fBtype\fR and \fBport_no\fR are only allowed if
86 they match the existing configuration.
87 .TP
88 \fBdel\-if \fIdp netdev\fR...
89 Removes each \fInetdev\fR from the list of network devices datapath
90 \fIdp\fR monitors.
91 .
92 .TP
93 \fBdump\-dps\fR
94 Prints the name of each configured datapath on a separate line.
95 .
96 .TP
97 [\fB\-s\fR | \fB\-\-statistics\fR] \fBshow \fR[\fIdp\fR...]
98 Prints a summary of configured datapaths, including their datapath
99 numbers and a list of ports connected to each datapath.  (The local
100 port is identified as port 0.)  If \fB\-s\fR or \fB\-\-statistics\fR
101 is specified, then packet and byte counters are also printed for each
102 port.
103 .IP
104 If one or more datapaths are specified, information on only those
105 datapaths are displayed.  Otherwise, \fBovs\-dpctl\fR displays information
106 about all configured datapaths.
107 .
108 .IP "\fBdump\-flows\fR [\fIdp\fR]"
109 Prints to the console all flow entries in datapath \fIdp\fR's
110 flow table.  If \fIdp\fR is not specified and exactly one datapath
111 exists, the flows for that datapath will be printed.
112 .IP
113 This command is primarily useful for debugging Open vSwitch.  The flow
114 table entries that it displays are not
115 OpenFlow flow entries.  Instead, they are different and considerably
116 simpler flows maintained by the Open vSwitch kernel module.  If you wish
117 to see the OpenFlow flow entries, use \fBovs\-ofctl dump\-flows\fR.
118 .
119 .IP "\fBdel\-flows\fR [\fIdp\fR]"
120 Deletes all flow entries from datapath \fIdp\fR's flow table.  If
121 \fIdp\fR is not specified and exactly one datapath exists, the flows for
122 that datapath will be deleted.
123 .IP
124 This command is primarily useful for debugging Open vSwitch.  As
125 discussed in \fBdump\-flows\fR, these entries are
126 not OpenFlow flow entries.  By deleting them, the process that set them
127 up may be confused about their disappearance.
128 .
129 .SH OPTIONS
130 .IP "\fB\-s\fR"
131 .IQ "\fB\-\-statistics\fR"
132 Causes the \fBshow\fR command to print packet and byte counters for
133 each port within the datapaths that it shows.
134 .
135 .IP "\fB\-t\fR"
136 .IQ "\fB\-\-timeout=\fIsecs\fR"
137 Limits \fBovs\-dpctl\fR runtime to approximately \fIsecs\fR seconds.  If
138 the timeout expires, \fBovs\-dpctl\fR will exit with a \fBSIGALRM\fR
139 signal.
140 .
141 .so lib/vlog.man
142 .so lib/common.man
143 .
144 .SH "SEE ALSO"
145 .
146 .BR ovs\-appctl (8),
147 .BR ovs\-vswitchd (8)