]> git.proxmox.com Git - mirror_ovs.git/blame - INSTALL.bridge
tests: Add more tests for VLAN match encoding and decoding.
[mirror_ovs.git] / INSTALL.bridge
CommitLineData
5fca1acd
BP
1 Replacing a Linux Bridge with Open vSwitch
2 ==========================================
3
4This file documents how Open vSwitch may be used as a drop-in
5replacement for a Linux kernel bridge in an environment that includes
6elements that are tightly tied to the Linux bridge tools
e5660bae
KA
7(e.g. "brctl") and architecture. We recommend directly using the
8management tools provided with Open vSwitch rather than these
9compatibility hooks for environments that are not tightly tied to the
10Linux bridging tools; they are more efficient and better reflect the
11actual operation and status.
12
5fca1acd
BP
13Installation Procedure
14----------------------
15
16The procedure below explains how to use the Open vSwitch bridge
17compatibility support. This procedure is written from the perspective
18of a system administrator manually loading and starting Open vSwitch
19in bridge compatibility mode, but of course in practice one would want
63567098
BP
20to update system scripts to follow these steps. If you do edit your
21system configuration files to start Open vSwitch at boot time, make
22sure that it starts up before any bridge configuration (e.g. before
23any calls to "brctl" or "ifup" of any bridge interfaces), to ensure
24that the Open vSwitch kernel modules are loaded before the Linux
25kernel bridge module.
5fca1acd 26
63567098
BP
271. Build, install, and start up the Open vSwitch kernel modules and
28 userspace programs as described in INSTALL.Linux.
5fca1acd
BP
29
30 It is important to run "make install", because some Open vSwitch
31 programs expect to find files in locations selected at installation
63567098
BP
32 time. The instructions below assume that files are installed in
33 their default locations, under /usr/local.
5fca1acd 34
63567098 352. Load the brcompat kernel module (which was built in step 1), e.g.:
5fca1acd 36
9b80f761 37 % insmod datapath/linux/brcompat.ko
5fca1acd 38
9b80f761 39 (openvswitch.ko should already have been loaded.)
5fca1acd 40
63567098 413. Start ovs-brcompatd:
7ddda086 42
f948cd95 43 % ovs-brcompatd --pidfile --detach
63567098
BP
44
45 (ovsdb-server and ovs-vswitchd should already have been loaded.)
5fca1acd 46
63567098 474. Now you should be able to manage the Open vSwitch using brctl and
5fca1acd
BP
48 related tools. For example, you can create an Open vSwitch bridge,
49 add interfaces to it, then print information about bridges with the
50 commands:
51
52 % brctl addbr br0
53 % brctl addif br0 eth0
54 % brctl addif br0 eth1
55 % brctl show
56
57 Each of these commands actually uses or modifies the Open vSwitch
3b12adda
BP
58 configuration database, then notifies the ovs-vswitchd daemon of
59 the change. For example, after executing the commands above
60 starting from an empty configuration file, "ovs-vsctl list-ports
61 br0" should show that bridge br0 contains two ports, eth0 and eth1.