]> git.proxmox.com Git - ovs.git/blame - utilities/ovs-discover.8.in
ovs-vsctl: Add tests that adding duplicate bridges or ports fails.
[ovs.git] / utilities / ovs-discover.8.in
CommitLineData
064af421
BP
1.TH ovs\-discover 8 "May 2008" "Open vSwitch" "Open vSwitch Manual"
2.ds PN ovs\-discover
3
4.SH NAME
5ovs\-discover \- controller discovery utility
6
7.SH SYNOPSIS
8.B ovs\-discover
9[\fIoptions\fR] \fInetdev\fR [\fInetdev\fR...]
10
11.SH DESCRIPTION
12The \fBovs\-discover\fR program attempts to discover the location of
13an OpenFlow controller on one of the network devices listed on the
14command line. It repeatedly broadcasts a DHCP request with vendor
15class identifier \fBOpenFlow\fR on each network device until it
16receives an acceptable DHCP response. It will accept any valid DHCP
17reply that has the same vendor class identifier and includes a
18vendor-specific option with code 1 whose contents are a string
19specifying the location of the controller in the same format used on
8cd4882f 20the \fBovs\-openflowd\fR command line (e.g. \fBssl:192.168.0.1\fR).
064af421
BP
21
22When \fBovs\-discover\fR receives an acceptable response, it prints
23the details of the response on \fBstdout\fR. Then, by default, it
24configures the network device on which the response was received with
25the received IP address, netmask, and default gateway, and detaches
26itself to the background.
27
28.SH OPTIONS
29.TP
30\fB--accept-vconn=\fIregex\fR
12fb742b
BP
31With this option, only controllers whose names match POSIX extended
32regular expression \fIregex\fR will be accepted. Specifying
33\fBssl:.*\fR for \fIregex\fR, for example, would cause only SSL
34controller connections to be accepted.
064af421
BP
35
36The \fIregex\fR is implicitly anchored at the beginning of the
37controller location string, as if it begins with \fB^\fR.
38
12fb742b
BP
39When this option is not given, the default \fIregex\fR is
40\fBtcp:.*\fR.
064af421
BP
41.TP
42\fB--exit-without-bind\fR
43By default, \fBovs\-discover\fR binds the network device that receives
44the first acceptable response to the IP address received over DHCP.
45With this option, the configuration of the network device is not
46changed at all, except to bring it up if it is initially down, and
47\fBovs\-discover\fR will exit immediately after it receives an
48acceptable DHCP response.
49
50This option is mutually exclusive with \fB--exit-after-bind\fR and
51\fB--no-detach\fR.
52
53.TP
54\fB--exit-after-bind\fR
55By default, after it receives an acceptable DHCP response,
56\fBovs\-discover\fR detaches itself from the foreground session and
57runs in the background maintaining the DHCP lease as necessary. With
58this option, \fBovs\-discover\fR will exit immediately after it
59receives an acceptable DHCP response and configures the network device
60with the received IP address. The address obtained via DHCP could
61therefore be used past the expiration of its lease.
62
63This option is mutually exclusive with \fB--exit-without-bind\fR and
64\fB--no-detach\fR.
65
66.TP
67\fB--no-detach\fR
68By default, \fBovs\-discover\fR runs in the foreground until it obtains
69an acceptable DHCP response, then it detaches itself from the
70foreground session and run as a background process. This option
71prevents \fBovs\-discover\fR from detaching, causing it to run in the
72foreground even after it obtains a DHCP response.
73
74This option is mutually exclusive with \fB--exit-without-bind\fR and
75\fB--exit-after-bind\fR.
76
77.TP
e7bd7d78 78\fB--pidfile\fR[\fB=\fIpidfile\fR]
064af421
BP
79Causes a file (by default, \fBovs\-discover.pid\fR) to be created indicating
80the PID of the running process. If \fIpidfile\fR is not specified, or
81if it does not begin with \fB/\fR, then it is created in
82\fB@RUNDIR@\fR.
83
84The \fIpidfile\fR is created when \fBovs\-discover\fR detaches, so
85this this option has no effect when one of \fB--exit-without-bind\fR,
86\fB--exit-after-bind\fR, or \fB--no-detach\fR is also given.
87
88.TP
e7bd7d78
JP
89\fB--overwrite-pidfile\fR
90By default, when \fB--pidfile\fR is specified and the specified pidfile
91already exists and is locked by a running process, \fBcontroller\fR refuses
92to start. Specify \fB--overwrite-pidfile\fR to cause it to instead
93overwrite the pidfile.
94
95When \fB--pidfile\fR is not specified, this option has no effect.
064af421
BP
96
97.so lib/vlog.man
98.so lib/common.man
99
100.SH BUGS
101
102If the network devices specified on the command line have been added
103to an Open vSwitch datapath with \fBovs\-dpctl add\-if\fR, then controller
104discovery will fail because \fBovs\-discover\fR will not be able to
105see DHCP responses, even though tools such as \fBtcpdump\fR(8) and
106\fBwireshark\fR(1) can see them on the wire. This is because of the
107structure of the Linux kernel networking stack, which hands packets
108first to programs that listen for all arriving packets, then to
109Open vSwitch, then to programs that listen for a specific kind of packet.
110Open vSwitch consumes all the packets handed to it, so tools like
111\fBtcpdump\fR that look at all packets will see packets arriving on
112Open vSwitch interfaces, but \fRovs\-discover\fR, which listens only for
113arriving IP packets, will not.
114
115.SH "SEE ALSO"
116
8cd4882f
BP
117.BR ovs\-openflowd (8),
118.BR ovs\-pki (8)