1 Red Hat network scripts integration
2 -----------------------------------
4 The RPM packages for Open vSwitch provide some integration with Red
5 Hat's network scripts. Using this integration is optional.
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:
12 - DEVICETYPE: Always set to "ovs".
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:
18 * "OVSPort", if <name> is a physical port (e.g. eth0) or
19 virtual port (e.g. vif1.0).
21 * "OVSIntPort", if <name> is an internal port (e.g. a tagged
24 * "OVSBond", if <name> is an OVS bond.
26 * "OVSTunnel", if <name> is an OVS tunnel.
28 * "OVSPatchPort", if <name> is a patch port
30 Additionally the following DPDK port types may be available,
31 depends on OVS build- and runtime configuration:
33 * "OVSDPDKPort", if <name> is a physical DPDK NIC port (name
34 must start with "dpdk" and end with portid, eg "dpdk0")
36 * "OVSDPDKRPort", if <name> is a DPDK ring port (name must
37 start with dpdkr and end with portid, eg "dpdkr0")
39 * "OVSDPDKVhostPort" if <name> is a DPDK vhost-cuse port
41 * "OVSDPDKVhostUserPort" if <name> is a DPDK vhost-user port
43 - OVS_BRIDGE: If TYPE is anything other than "OVSBridge", set to
44 the name of the OVS bridge to which the port should be attached.
46 - OVS_OPTIONS: Optionally, extra options to set in the "Port"
47 table when adding the port to the bridge, as a sequence of
48 column[:key]=value options. For example, "tag=100" to make the
49 port an access port for VLAN 100. See the documentation of
50 "add-port" in ovs-vsctl(8) for syntax and the section on the
51 Port table in ovs-vswitchd.conf.db(5) for available options.
53 - OVS_EXTRA: Optionally, additional ovs-vsctl commands, separated
54 by "--" (double dash).
56 - BOND_IFACES: For "OVSBond" interfaces, a list of physical
57 interfaces to bond together.
59 - OVS_TUNNEL_TYPE: For "OVSTunnel" interfaces, the type of the tunnel.
60 For example, "gre", "vxlan", etc.
62 - OVS_TUNNEL_OPTIONS: For "OVSTunnel" interfaces, this field should be
63 used to specify the tunnel options like remote_ip, key, etc.
65 - OVS_PATCH_PEER: For "OVSPatchPort" devices, this field specifies
66 the patch's peer on the other bridge.
71 * "ifdown" on a bridge will not bring individual ports on the bridge
72 down. "ifup" on a bridge will not add ports to the bridge. This
73 behavior should be compatible with standard bridges (with
76 * If 'ifup' on an interface is called multiple times, one can see
77 "RTNETLINK answers: File exists" printed on the console. This comes from
78 ifup-eth trying to add zeroconf route multiple times and is harmless.
85 ==> ifcfg-ovsbridge0 <==
95 Enable DHCP on the bridge:
96 * Needs OVSBOOTPROTO instead of BOOTPROTO.
97 * All the interfaces that can reach the DHCP server
98 as a space separated list in OVSDHCPINTERFACES.
105 OVSDHCPINTERFACES="eth0"
109 Adding Internal Port to ovsbridge0:
116 OVS_BRIDGE=ovsbridge0
120 Internal Port with fixed IP address:
126 OVS_BRIDGE=ovsbridge0
132 Internal Port with DHCP:
133 * Needs OVSBOOTPROTO or BOOTPROTO.
134 * All the interfaces that can reach the DHCP server
135 as a space separated list in OVSDHCPINTERFACES.
141 OVS_BRIDGE=ovsbridge0
143 OVSDHCPINTERFACES="eth0"
146 Adding physical eth0 to ovsbridge0 described above:
153 OVS_BRIDGE=ovsbridge0
158 Tagged VLAN interface on top of ovsbridge0:
160 ==> ifcfg-vlan100 <==
168 OVS_BRIDGE=ovsbridge0
169 OVS_OPTIONS="tag=100"
170 OVS_EXTRA="set Interface $DEVICE external-ids:iface-id=$(hostname -s)-$DEVICE-vif"
181 OVS_BRIDGE=ovsbridge0
183 BOND_IFACES="gige-1b-0 gige-1b-1 gige-21-0 gige-21-1"
184 OVS_OPTIONS="bond_mode=balance-tcp lacp=active"
192 An Open vSwitch Tunnel:
199 OVS_BRIDGE=ovsbridge0
201 OVS_TUNNEL_OPTIONS="options:remote_ip=A.B.C.D"
206 ==> ifcfg-patch-ovs-0 <==
211 OVS_BRIDGE=ovsbridge0
212 OVS_PATCH_PEER=patch-ovs-1
214 ==> ifcfg-patch-ovs-1 <==
219 OVS_BRIDGE=ovsbridge1
220 OVS_PATCH_PEER=patch-ovs-0
239 DPDK vhost-user port:
250 TYPE=OVSDPDKVhostUserPort
256 Please report problems to bugs@openvswitch.org.