mirror of
https://github.com/openvswitch/ovs
synced 2025-08-22 01:51:26 +00:00
This commit cleans up the locations of a number of files and directories used. These include: - Config file lives in /etc/openvswitch/conf.db - Logs go into /var/log/openvswitch - ovsdb-server socket is /var/run/openvswitch/db.sock - Schema goes into /usr/share/openvswitch/vswitch.ovsschema - PID files go in /var/run/openvswitch For XenServer, these additional changes are made: - Cores go in /var/xen/openvswitch - OVS binaries run in /var/xen/openvswitch In addition, it attempts to cleanup the XenServer packaging. This includes referring to the project as "openvswitch" as opposed to the somewhat presumptuous "vswitch". Note: Changes to the Debian packaging will be forthcoming.
63 lines
2.7 KiB
Plaintext
63 lines
2.7 KiB
Plaintext
Replacing a Linux Bridge with Open vSwitch
|
|
==========================================
|
|
|
|
This file documents how Open vSwitch may be used as a drop-in
|
|
replacement for a Linux kernel bridge in an environment that includes
|
|
elements that are tightly tied to the Linux bridge tools
|
|
(e.g. "brctl") and architecture. We recommend directly using the
|
|
management tools provided with Open vSwitch rather than these
|
|
compatibility hooks for environments that are not tightly tied to the
|
|
Linux bridging tools; they are more efficient and better reflect the
|
|
actual operation and status.
|
|
|
|
Installation Procedure
|
|
----------------------
|
|
|
|
The procedure below explains how to use the Open vSwitch bridge
|
|
compatibility support. This procedure is written from the perspective
|
|
of a system administrator manually loading and starting Open vSwitch
|
|
in bridge compatibility mode, but of course in practice one would want
|
|
to update system scripts to follow these steps. If you do edit your
|
|
system configuration files to start Open vSwitch at boot time, make
|
|
sure that it starts up before any bridge configuration (e.g. before
|
|
any calls to "brctl" or "ifup" of any bridge interfaces), to ensure
|
|
that the Open vSwitch kernel modules are loaded before the Linux
|
|
kernel bridge module.
|
|
|
|
1. Build, install, and start up the Open vSwitch kernel modules and
|
|
userspace programs as described in INSTALL.Linux.
|
|
|
|
It is important to run "make install", because some Open vSwitch
|
|
programs expect to find files in locations selected at installation
|
|
time. The instructions below assume that files are installed in
|
|
their default locations, under /usr/local.
|
|
|
|
2. Load the brcompat kernel module (which was built in step 1), e.g.:
|
|
|
|
% insmod datapath/linux-2.6/brcompat_mod.ko
|
|
|
|
(openvswitch_mod.ko should already have been loaded.)
|
|
|
|
3. Start ovs-brcompatd:
|
|
|
|
% ovs-brcompatd --pidfile --detach -vANY:console:EMER \
|
|
unix:/usr/local/var/run/openvswitch/db.sock
|
|
|
|
(ovsdb-server and ovs-vswitchd should already have been loaded.)
|
|
|
|
4. Now you should be able to manage the Open vSwitch using brctl and
|
|
related tools. For example, you can create an Open vSwitch bridge,
|
|
add interfaces to it, then print information about bridges with the
|
|
commands:
|
|
|
|
% brctl addbr br0
|
|
% brctl addif br0 eth0
|
|
% brctl addif br0 eth1
|
|
% brctl show
|
|
|
|
Each of these commands actually uses or modifies the Open vSwitch
|
|
configuration database, then notifies the ovs-vswitchd daemon of
|
|
the change. For example, after executing the commands above
|
|
starting from an empty configuration file, "ovs-vsctl list-ports
|
|
br0" should show that bridge br0 contains two ports, eth0 and eth1.
|