forked from openvswitch/ovs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL.bridge
78 lines (60 loc) · 3.2 KB
/
INSTALL.bridge
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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.
1. Build and install 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.
2. Load both the openvswitch and brcompat kernel modules (which were
built in step 1), e.g.:
% insmod datapath/linux-2.6/openvswitch_mod.ko
% insmod datapath/linux-2.6/brcompat_mod.ko
These kernel modules cannot be loaded if the Linux bridge module is
already loaded. Thus, you may need to remove any existing bridges
and unload the bridge module with "rmmod bridge" before you can do
this. In addition, if you edit your system configuration files to
load these modules at boot time, it should happen 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.
3. Create an initial version of the configuration file, for example
/etc/ovs-vswitchd.conf. This file may be empty initially or may
contain add any valid configuration directives described in
ovs-vswitchd.conf(5). However, it must exist when you start
ovs-vswitchd.
To create an empty configuration file:
% touch /etc/ovs-vswitchd.conf
4. Start ovs-vswitchd and ovs-brcompatd, e.g.:
% ovs-vswitchd -P -D -vANY:console:EMER /etc/ovs-vswitchd.conf
% ovs-brcompatd -P -D -vANY:console:EMER /etc/ovs-vswitchd.conf
5. 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 file, then notifies the ovs-vswitchd daemon of the
change. For example, after executing the commands above starting
from an empty configuration file, "cat /etc/ovs-vswitchd.conf"
should show that the configuration file now contains the following:
bridge.br0.port=br0
bridge.br0.port=eth0
bridge.br0.port=eth1