Poster of Linux kernelThe best gift for a Linux geek


Section: Open vSwitch Manual (8) Updated: May 2008
Local index Up



ovs-discover - controller discovery utility



ovs-discover [options] netdev [netdev...]



The ovs-discover program attempts to discover the location of an OpenFlow controller on one of the network devices listed on the command line. It repeatedly broadcasts a DHCP request with vendor class identifier OpenFlow on each network device until it receives an acceptable DHCP response. It will accept any valid DHCP reply that has the same vendor class identifier and includes a vendor-specific option with code 1 whose contents are a string specifying the location of the controller in the same format used on the ovs-openflowd command line (e.g. ssl:

When ovs-discover receives an acceptable response, it prints the details of the response on stdout. Then, by default, it configures the network device on which the response was received with the received IP address, netmask, and default gateway, and detaches itself to the background.



With this option, only controllers whose names match POSIX extended regular expression regex will be accepted. Specifying ssl:.* for regex, for example, would cause only SSL controller connections to be accepted.

The regex is implicitly anchored at the beginning of the controller location string, as if it begins with ^.

When this option is not given, the default regex is tcp:.*.

By default, ovs-discover binds the network device that receives the first acceptable response to the IP address received over DHCP. With this option, the configuration of the network device is not changed at all, except to bring it up if it is initially down, and ovs-discover will exit immediately after it receives an acceptable DHCP response.

This option is mutually exclusive with --exit-after-bind and --no-detach.

By default, after it receives an acceptable DHCP response, ovs-discover detaches itself from the foreground session and runs in the background maintaining the DHCP lease as necessary. With this option, ovs-discover will exit immediately after it receives an acceptable DHCP response and configures the network device with the received IP address. The address obtained via DHCP could therefore be used past the expiration of its lease.

This option is mutually exclusive with --exit-without-bind and --no-detach.

By default, ovs-discover runs in the foreground until it obtains an acceptable DHCP response, then it detaches itself from the foreground session and run as a background process. This option prevents ovs-discover from detaching, causing it to run in the foreground even after it obtains a DHCP response.

This option is mutually exclusive with --exit-without-bind and --exit-after-bind.

Causes a file (by default, to be created indicating the PID of the running process. If pidfile is not specified, or if it does not begin with /, then it is created in /var/run/openvswitch.

The pidfile is created when ovs-discover detaches, so this this option has no effect when one of --exit-without-bind, --exit-after-bind, or --no-detach is also given.

By default, when --pidfile is specified and the specified pidfile already exists and is locked by a running process, controller refuses to start. Specify --overwrite-pidfile to cause it to instead overwrite the pidfile.

When --pidfile is not specified, this option has no effect.

-vmodule[:facility[:level]], --verbose=module[:facility[:level]]
Sets the logging level for module in facility to level:
module may be any valid module name (as displayed by the --list action on ovs-appctl(8)), or the special name ANY to set the logging levels for all modules.
facility may be syslog, console, or file to set the levels for logging to the system log, the console, or a file respectively, or ANY to set the logging levels for both facilities. If it is omitted, facility defaults to ANY.
Regardless of the log levels set for file, logging to a file will not take place unless --log-file is also specified (see below).
level must be one of emer, err, warn, info, or dbg, designating the minimum severity of a message for it to be logged. If it is omitted, level defaults to dbg.
-v, --verbose
Sets the maximum logging verbosity level, equivalent to --verbose=ANY:ANY:dbg.
-vPATTERN:facility:pattern, --verbose=PATTERN:facility:pattern
Sets the log pattern for facility to pattern. Refer to ovs-appctl(8) for a description of the valid syntax for pattern.
Enables logging to a file. If file is specified, then it is used as the exact name for the log file. The default log file name used if file is omitted is /var/log/openvswitch/ovs-discover.log.
-h, --help
Prints a brief help message to the console.
-V, --version
Prints version information to the console.



If the network devices specified on the command line have been added to an Open vSwitch datapath with ovs-dpctl add-if, then controller discovery will fail because ovs-discover will not be able to see DHCP responses, even though tools such as tcpdump(8) and wireshark(1) can see them on the wire. This is because of the structure of the Linux kernel networking stack, which hands packets first to programs that listen for all arriving packets, then to Open vSwitch, then to programs that listen for a specific kind of packet. Open vSwitch consumes all the packets handed to it, so tools like tcpdump that look at all packets will see packets arriving on Open vSwitch interfaces, but ovs-discover, which listens only for arriving IP packets, will not.



ovs-openflowd(8), ovs-pki(8)




This document was created by man2html, using the manual pages.
Time: 22:02:05 GMT, April 16, 2011