1ovs-dpctl(8)                  Open vSwitch Manual                 ovs-dpctl(8)
2
3
4

NAME

6       ovs-dpctl - administer Open vSwitch datapaths
7

SYNOPSIS

9       ovs-dpctl [options] command [switch] [args...]
10

DESCRIPTION

12       The ovs-dpctl program can create, modify, and delete Open vSwitch data‐
13       paths.  A single machine may host any number of datapaths.
14
15       A newly created datapath is associated with only one network device,  a
16       virtual  network device sometimes called the datapath's ``local port''.
17       A newly created datapath is not, however, associated with  any  of  the
18       host's  other  network  devices.  To intercept and process traffic on a
19       given network device, use the add-if command  to  explicitly  add  that
20       network device to the datapath.
21
22       If ovs-vswitchd(8) is in use, use ovs-vsctl(8) instead of ovs-dpctl.
23
24       Most  ovs-dpctl commands that work with datapaths take an argument that
25       specifies the name of the  datapath.   Datapath  names  take  the  form
26       [type@]name, where name is the network device associated with the data‐
27       path's local port.   If  type  is  given,  it  specifies  the  datapath
28       provider of name, otherwise the default provider system is assumed.
29
30       The following commands manage datapaths.
31
32       add-dp dp [netdev[,option]...]
33              Creates datapath dp, with a local port also named dp.  This will
34              fail if a network device dp already exists.
35
36              If netdevs are specified, ovs-dpctl adds them to the  new  data‐
37              path, just as if add-if was specified.
38
39       del-dp dp
40              Deletes  datapath  dp.   If  dp  is  associated with any network
41              devices, they are automatically removed.
42
43       add-if dp netdev[,option]...
44              Adds each netdev to the set of network devices datapath dp moni‐
45              tors,  where  dp is the name of an existing datapath, and netdev
46              is the name of one of the host's  network  devices,  e.g.  eth0.
47              Once a network device has been added to a datapath, the datapath
48              has complete ownership of the network device's traffic  and  the
49              network device appears silent to the rest of the system.
50
51              A  netdev  may be followed by a comma-separated list of options.
52              The following options are currently supported:
53
54              type=type
55                     Specifies the type of port to add.  The default  type  is
56                     system.
57
58              port_no=port
59                     Requests  a specific port number within the datapath.  If
60                     this option is not specified then one will  be  automati‐
61                     cally assigned.
62
63              key=value
64                     Adds an arbitrary key-value option to the port's configu‐
65                     ration.
66
67              ovs-vswitchd.conf.db(5) documents the available port  types  and
68              options.
69
70       set-if dp port[,option]...
71              Reconfigures  each  port  in  dp as specified.  An option of the
72              form key=value adds the specified key-value option to  the  port
73              or  overrides  an  existing  key's value.  An option of the form
74              key=, that is, without a value, deletes the key-value named key.
75              The  type  and  port number of a port cannot be changed, so type
76              and port_no are only allowed if they match the existing configu‐
77              ration.
78
79       del-if dp netdev...
80              Removes each netdev from the list of network devices datapath dp
81              monitors.
82
83       dump-dps
84              Prints the name of each configured datapath on a separate line.
85
86       [-s | --statistics] show [dp...]
87              Prints a summary of configured datapaths, including their  data‐
88              path  numbers  and  a  list of ports connected to each datapath.
89              (The local port is identified as port 0.)  If -s or --statistics
90              is specified, then packet and byte counters are also printed for
91              each port.
92
93              If one or more datapaths  are  specified,  information  on  only
94              those  datapaths  are  displayed.  Otherwise, ovs-dpctl displays
95              information about all configured datapaths.
96
97   DEBUGGING COMMANDS
98       The following commands are primarily useful for debugging Open vSwitch.
99       The  flow  table entries (both matches and actions) that they work with
100       are not OpenFlow flow entries.  Instead, they are different and consid‐
101       erably simpler flows maintained by the Open vSwitch kernel module.  Use
102       ovs-ofctl(8), instead, to work with OpenFlow flow entries.
103
104       The dp argument to each of these commands is optional when exactly  one
105       datapath exists, in which case that datapath is the default.  When mul‐
106       tiple datapaths exist, then a datapath name is required.
107
108       [-m | --more] dump-flows [dp]
109              Prints to the console all flow entries in datapath dp's flow ta‐
110              ble.   Without  -m  or  --more, output omits match fields that a
111              flow wildcards entirely; with -m or --more, output includes  all
112              wildcarded fields.
113
114       add-flow [dp] flow actions
115       [--clear] [--may-create] [-s | --statistics] mod-flow [dp] flow actions
116              Adds  or  modifies a flow in dp's flow table that, when a packet
117              matching flow arrives, causes actions to be executed.
118
119              The add-flow command succeeds only  if  flow  does  not  already
120              exist  in  dp.  Contrariwise, mod-flow without --may-create only
121              modifies the actions for an existing flow.   With  --may-create,
122              mod-flow will add a new flow or modify an existing one.
123
124              If  -s  or  --statistics is specified, then mod-flows prints the
125              modified flow's statistics.  A flow's statistics are the  number
126              of  packets  and  bytes  that  have passed through the flow, the
127              elapsed time since the flow last processed a packet  (if  ever),
128              and (for TCP flows) the union of the TCP flags processed through
129              the flow.
130
131              With --clear, mod-flows zeros out the  flow's  statistics.   The
132              statistics  printed  if -s or --statistics is also specified are
133              those from just before clearing the statistics.
134
135       [-s | --statistics] del-flow [dp] flow
136              Deletes the flow from dp's flow table that matches flow.  If  -s
137              or  --statistics is specified, then mod-flows prints the deleted
138              flow's statistics.
139
140       del-flows [dp]
141              Deletes all flow entries from datapath dp's flow table.
142

OPTIONS

144       -s
145       --statistics
146              Causes the show command to print packet and  byte  counters  for
147              each port within the datapaths that it shows.
148
149       -m
150       --more Increases the verbosity of dump-flows output.
151
152       -t
153       --timeout=secs
154              Limits  ovs-dpctl runtime to approximately secs seconds.  If the
155              timeout expires, ovs-dpctl will exit with a SIGALRM signal.
156
157       -v[spec]
158       --verbose=[spec]
159              Sets logging levels.  Without any spec, sets the log  level  for
160              every  module and facility to dbg.  Otherwise, spec is a list of
161              words separated by spaces or commas or colons, up  to  one  from
162              each category below:
163
164              ·      A  valid  module name, as displayed by the vlog/list com‐
165                     mand on ovs-appctl(8), limits the log level change to the
166                     specified module.
167
168              ·      syslog,  console,  or file, to limit the log level change
169                     to only to the system log, to the console, or to a  file,
170                     respectively.
171
172              ·      off,  emer,  err,  warn, info, or dbg, to control the log
173                     level.  Messages of the given severity or higher will  be
174                     logged,  and  messages of lower severity will be filtered
175                     out.  off filters out all  messages.   See  ovs-appctl(8)
176                     for a definition of each log level.
177
178              Case is not significant within spec.
179
180              Regardless  of  the  log  levels set for file, logging to a file
181              will not take place unless --log-file  is  also  specified  (see
182              below).
183
184              For compatibility with older versions of OVS, any is accepted as
185              a word but has no effect.
186
187       -v
188       --verbose
189              Sets the maximum logging verbosity level, equivalent  to  --ver‐
190              bose=dbg.
191
192       --log-file[=file]
193              Enables  logging  to  a  file.  If file is specified, then it is
194              used as the exact name for the log file.  The default  log  file
195              name    used    if    file    is   omitted   is   /var/log/open‐
196              vswitch/ovs-dpctl.log.
197
198       -h
199       --help Prints a brief help message to the console.
200
201       -V
202       --version
203              Prints version information to the console.
204

SEE ALSO

206       ovs-appctl(8), ovs-vswitchd(8)
207
208
209
210Open vSwitch                         2.0.0                        ovs-dpctl(8)
Impressum