Setting tag sliver-openvswitch-2.2.90-1
[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         * "OVSTunnel", if <name> is an OVS tunnel.
27
28         * "OVSPatchPort", if <name> is a patch port
29
30     - OVS_BRIDGE: If TYPE is anything other than "OVSBridge", set to
31       the name of the OVS bridge to which the port should be attached.
32
33     - OVS_OPTIONS: Optionally, extra options to set in the "Port"
34       table when adding the port to the bridge, as a sequence of
35       column[:key]=value options.  For example, "tag=100" to make the
36       port an access port for VLAN 100.  See the documentation of
37       "add-port" in ovs-vsctl(8) for syntax and the section on the
38       Port table in ovs-vswitchd.conf.db(5) for available options.
39
40     - OVS_EXTRA: Optionally, additional ovs-vsctl commands, separated
41       by "--" (double dash).
42
43     - BOND_IFACES: For "OVSBond" interfaces, a list of physical
44       interfaces to bond together.
45
46     - OVS_TUNNEL_TYPE: For "OVSTunnel" interfaces, the type of the tunnel.
47       For example, "gre", "vxlan", etc.
48
49     - OVS_TUNNEL_OPTIONS: For "OVSTunnel" interfaces, this field should be
50       used to specify the tunnel options like remote_ip, key, etc.
51
52     - OVS_PATCH_PEER: For "OVSPatchPort" devices, this field specifies
53       the patch's peer on the other bridge.
54
55 Note
56 ----
57
58 * "ifdown" on a bridge will not bring individual ports on the bridge
59 down.  "ifup" on a bridge will not add ports to the bridge.  This
60 behavior should be compatible with standard bridges (with
61 TYPE=Bridge).
62
63 * If 'ifup' on an interface is called multiple times, one can see
64 "RTNETLINK answers: File exists" printed on the console. This comes from
65 ifup-eth trying to add zeroconf route multiple times and is harmless.
66
67 Examples
68 --------
69
70 Standalone bridge:
71
72 ==> ifcfg-ovsbridge0 <==
73 DEVICE=ovsbridge0
74 ONBOOT=yes
75 DEVICETYPE=ovs
76 TYPE=OVSBridge
77 BOOTPROTO=static
78 IPADDR=A.B.C.D
79 NETMASK=X.Y.Z.0
80 HOTPLUG=no
81
82 Enable DHCP on the bridge:
83 * Needs OVSBOOTPROTO instead of BOOTPROTO.
84 * All the interfaces that can reach the DHCP server
85 as a space separated list in OVSDHCPINTERFACES.
86
87 DEVICE=ovsbridge0
88 ONBOOT=yes
89 DEVICETYPE=ovs
90 TYPE=OVSBridge
91 OVSBOOTPROTO="dhcp"
92 OVSDHCPINTERFACES="eth0"
93 HOTPLUG=no
94
95
96 Adding Internal Port to ovsbridge0:
97
98 ==> ifcfg-intbr0 <==
99 DEVICE=intbr0
100 ONBOOT=yes
101 DEVICETYPE=ovs
102 TYPE=OVSIntPort
103 OVS_BRIDGE=ovsbridge0
104 HOTPLUG=no
105
106
107 Internal Port with fixed IP address:
108
109 DEVICE=intbr0
110 ONBOOT=yes
111 DEVICETYPE=ovs
112 TYPE=OVSIntPort
113 OVS_BRIDGE=ovsbridge0
114 BOOTPROTO=static
115 IPADDR=A.B.C.D
116 NETMASK=X.Y.Z.0
117 HOTPLUG=no
118
119 Internal Port with DHCP:
120 * Needs OVSBOOTPROTO or BOOTPROTO.
121 * All the interfaces that can reach the DHCP server
122 as a space separated list in OVSDHCPINTERFACES.
123
124 DEVICE=intbr0
125 ONBOOT=yes
126 DEVICETYPE=ovs
127 TYPE=OVSIntPort
128 OVS_BRIDGE=ovsbridge0
129 OVSBOOTPROTO="dhcp"
130 OVSDHCPINTERFACES="eth0"
131 HOTPLUG=no
132
133 Adding physical eth0 to ovsbridge0 described above:
134
135 ==> ifcfg-eth0 <==
136 DEVICE=eth0
137 ONBOOT=yes
138 DEVICETYPE=ovs
139 TYPE=OVSPort
140 OVS_BRIDGE=ovsbridge0
141 BOOTPROTO=none
142 HOTPLUG=no
143
144
145 Tagged VLAN interface on top of ovsbridge0:
146
147 ==> ifcfg-vlan100 <==
148 DEVICE=vlan100
149 ONBOOT=yes
150 DEVICETYPE=ovs
151 TYPE=OVSIntPort
152 BOOTPROTO=static
153 IPADDR=A.B.C.D
154 NETMASK=X.Y.Z.0
155 OVS_BRIDGE=ovsbridge0
156 OVS_OPTIONS="tag=100"
157 OVS_EXTRA="set Interface $DEVICE external-ids:iface-id=$(hostname -s)-$DEVICE-vif"
158 HOTPLUG=no
159
160
161 Bonding:
162
163 ==> ifcfg-bond0 <==
164 DEVICE=bond0
165 ONBOOT=yes
166 DEVICETYPE=ovs
167 TYPE=OVSBond
168 OVS_BRIDGE=ovsbridge0
169 BOOTPROTO=none
170 BOND_IFACES="gige-1b-0 gige-1b-1 gige-21-0 gige-21-1"
171 OVS_OPTIONS="bond_mode=balance-tcp lacp=active"
172 HOTPLUG=no
173
174 ==> ifcfg-gige-* <==
175 DEVICE=gige-*
176 ONBOOT=yes
177 HOTPLUG=no
178
179 An Open vSwitch Tunnel:
180
181 ==> ifcfg-gre0 <==
182 DEVICE=ovs-gre0
183 ONBOOT=yes
184 DEVICETYPE=ovs
185 TYPE=OVSTunnel
186 OVS_BRIDGE=ovsbridge0
187 OVS_TUNNEL_TYPE=gre
188 OVS_TUNNEL_OPTIONS="options:remote_ip=A.B.C.D"
189
190
191 Patch Ports:
192
193 ==> ifcfg-patch-ovs-0 <==
194 DEVICE=patch-ovs-0
195 ONBOOT=yes
196 DEVICETYPE=ovs
197 TYPE=OVSPatchPort
198 OVS_BRIDGE=ovsbridge0
199 OVS_PATCH_PEER=patch-ovs-1
200
201 ==> ifcfg-patch-ovs-1 <==
202 DEVICE=patch-ovs-1
203 ONBOOT=yes
204 DEVICETYPE=ovs
205 TYPE=OVSPatchPort
206 OVS_BRIDGE=ovsbridge1
207 OVS_PATCH_PEER=patch-ovs-0
208
209
210 Reporting Bugs
211 --------------
212
213 Please report problems to bugs@openvswitch.org.