Merge branch 'master' of ssh://git.onelab.eu/git/sliver-openvswitch
[sliver-openvswitch.git] / rhel / README.RHEL
1 Red Hat network scripts integration
2 -----------------------------------
3
4 The RPM packages for Open vSwitch provide some integration with Red
5 Hat's network scripts.  Using this integration is optional.
6
7 To use the integration for a Open vSwitch bridge or interface named
8 <name>, create or edit /etc/sysconfig/network-scripts/ifcfg-<name>.
9 This is a shell script that consists of a series of VARIABLE=VALUE
10 assignments.  The following OVS-specific variable names are supported:
11
12     - DEVICETYPE: Always set to "ovs".
13
14     - TYPE: If this is "OVSBridge", then this file represents an OVS
15       bridge named <name>.  Otherwise, it represents a port on an OVS
16       bridge and TYPE must have one of the following values:
17
18         * "OVSPort", if <name> is a physical port (e.g. eth0) or
19           virtual port (e.g. vif1.0).
20
21         * "OVSIntPort", if <name> is an internal port (e.g. a tagged
22           VLAN).
23
24         * "OVSBond", if <name> is an OVS bond.
25
26     - OVS_BRIDGE: If TYPE is anything other than "OVSBridge", set to
27       the name of the OVS bridge to which the port should be attached.
28
29     - OVS_OPTIONS: Optionally, extra options to set in the "Port"
30       table when adding the port to the bridge, as a sequence of
31       column[:key]=value options.  For example, "tag=100" to make the
32       port an access port for VLAN 100.  See the documentation of
33       "add-port" in ovs-vsctl(8) for syntax and the section on the
34       Port table in ovs-vswitchd.conf.db(5) for available options.
35
36     - OVS_EXTRA: Optionally, additional ovs-vsctl commands, separated
37       by "--" (double dash).
38
39     - BOND_IFACES: For "OVSBond" interfaces, a list of physical
40       interfaces to bond together.
41
42 Note
43 ----
44
45 * "ifdown" on a bridge will not bring individual ports on the bridge
46 down.  "ifup" on a bridge will not add ports to the bridge.  This
47 behavior should be compatible with standard bridges (with
48 TYPE=Bridge).
49
50 * If 'ifup' on an interface is called multiple times, one can see
51 "RTNETLINK answers: File exists" printed on the console. This comes from
52 ifup-eth trying to add zeroconf route multiple times and is harmless.
53
54 Examples
55 --------
56
57 Standalone bridge:
58
59 ==> ifcfg-ovsbridge0 <==
60 DEVICE=ovsbridge0
61 ONBOOT=yes
62 DEVICETYPE=ovs
63 TYPE=OVSBridge
64 BOOTPROTO=static
65 IPADDR=A.B.C.D
66 NETMASK=X.Y.Z.0
67 HOTPLUG=no
68
69 Enable DHCP on the bridge:
70 * Needs OVSBOOTPROTO instead of BOOTPROTO.
71 * All the interfaces that can reach the DHCP server
72 as a space separated list in OVSDHCPINTERFACES.
73
74 DEVICE=ovsbridge0
75 ONBOOT=yes
76 DEVICETYPE=ovs
77 TYPE=OVSBridge
78 OVSBOOTPROTO="dhcp"
79 OVSDHCPINTERFACES="eth0"
80 HOTPLUG=no
81
82 Adding physical eth0 to ovsbridge0 described above:
83
84 ==> ifcfg-eth0 <==
85 DEVICE=eth0
86 ONBOOT=yes
87 DEVICETYPE=ovs
88 TYPE=OVSPort
89 OVS_BRIDGE=ovsbridge0
90 BOOTPROTO=none
91 HOTPLUG=no
92
93
94 Tagged VLAN interface on top of ovsbridge0:
95
96 ==> ifcfg-vlan100 <==
97 DEVICE=vlan100
98 ONBOOT=yes
99 DEVICETYPE=ovs
100 TYPE=OVSIntPort
101 BOOTPROTO=static
102 IPADDR=A.B.C.D
103 NETMASK=X.Y.Z.0
104 OVS_BRIDGE=ovsbridge0
105 OVS_OPTIONS="tag=100"
106 OVS_EXTRA="set Interface $DEVICE external-ids:iface-id=$(hostname -s)-$DEVICE-vif"
107 HOTPLUG=no
108
109
110 Bonding:
111
112 ==> ifcfg-bond0 <==
113 DEVICE=bond0
114 ONBOOT=yes
115 DEVICETYPE=ovs
116 TYPE=OVSBond
117 OVS_BRIDGE=ovsbridge0
118 BOOTPROTO=none
119 BOND_IFACES="gige-1b-0 gige-1b-1 gige-21-0 gige-21-1"
120 OVS_OPTIONS="bond_mode=balance-tcp lacp=active"
121 HOTPLUG=no
122
123 ==> ifcfg-gige-* <==
124 DEVICE=gige-*
125 ONBOOT=yes
126 HOTPLUG=no
127
128 Reporting Bugs
129 --------------
130
131 Please report problems to bugs@openvswitch.org.