Changes for page Open vSwitch
Last modified by Sebastian Marsching on 2022/05/29 14:05
From version 1.1
edited by Sebastian Marsching
on 2022/03/27 14:29
on 2022/03/27 14:29
Change comment:
There is no comment for this version
To version 6.1
edited by Sebastian Marsching
on 2022/05/29 14:05
on 2022/05/29 14:05
Change comment:
There is no comment for this version
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 -Open VSwitch1 +Open vSwitch - Tags
-
... ... @@ -1,0 +1,1 @@ 1 +Linux|Network - Content
-
... ... @@ -35,7 +35,7 @@ 35 35 ovs-vsctl set interface ovsbr0p1 mac="00\:01\:02\:03\:04\:05" 36 36 ``` 37 37 38 -Please note that some of the attributes are set in the _port_ table, while others are set in the _interface_ table. Obviously the MAC address should be replaced by a proper random MAC address. The page about KVM describes [[how to generate a random MAC address|doc:Linux.KVM.WebHome|anchor="Generating _a_random_MAC_address"]]. You do not have to set a MAC address explicitly, however in this case the MAC address will change after each reboot, which typically is not desirable for the network interface of a server.38 +Please note that some of the attributes are set in the _port_ table, while others are set in the _interface_ table. Obviously the MAC address should be replaced by a proper random MAC address. The page about KVM describes [[how to generate a random MAC address|doc:Linux.KVM.WebHome|anchor="HGeneratingarandomMACaddress"]]. You do not have to set a MAC address explicitly, however in this case the MAC address will change after each reboot, which typically is not desirable for the network interface of a server. 39 39 40 40 Now we change the network configuration in `/etc/network/interfaces`. We have to make sure that each virtual interface is brought up, even if we only use it as a bridge. We do this by bringing it up but disabling any IP configuration on it: 41 41 ... ... @@ -109,7 +109,7 @@ 109 109 110 110 You also do not have to make the changes to `failsafe.conf`. The system will boot fine without those changes. 111 111 112 -# Using Open vSwitch for a high-availability / fail-over interface 112 +# {{id name="fail-over-interface"/}}Using Open vSwitch for a high-availability / fail-over interface 113 113 114 114 A simple HA setup for an IP address can easily be created using [Pacemaker](http://clusterlabs.org/) and the `ocf:heartbeat:IPaddr2` and `ocf:heartbeat:IPv6addr` scripts. However, this kind of setup has one weakness: During fail-over, the MAC address changes because the IP address is now associated with a different computer and thus a different NIC. This can cause problems with old entries in ARP tables. Linux systems will typically deal with this correctly (they will see the unsolicited ARP message and update their caches), but some other operating systems or dedicated network equipment might cause trouble. For example, I had problems with the ARP cache of a Netgear GSM7328v2 switch, which could only be resolved by waiting a long time or manually clearing the ARP cache. Obviously, both options are not viable for an HA setup, where fail-over has to happen automatically and within seconds. 115 115 ... ... @@ -199,7 +199,7 @@ 199 199 The name of the OVS bridge that the port is added to. 200 200 </longdesc> 201 201 <shortdesc lang="en">Bridge name</shortdesc> 202 - <content type="string" default="" /> 202 + <content type="string" default="" ></content> 203 203 </parameter> 204 204 <parameter name="interface" unique="1" required="1"> 205 205 <longdesc lang="en"> ... ... @@ -206,7 +206,7 @@ 206 206 The name of the port and the corresponding interface. 207 207 </longdesc> 208 208 <shortdesc lang="en">Interface/port name</shortdesc> 209 - <content type="string" default="" /> 209 + <content type="string" default="" ></content> 210 210 </parameter> 211 211 <parameter name="mac" unique="1" required="0"> 212 212 <longdesc lang="en"> ... ... @@ -214,15 +214,15 @@ 214 214 a random MAC address is used. 215 215 </longdesc> 216 216 <shortdesc lang="en">Interface MAC address</shortdesc> 217 - <content type="string" default="" /> 217 + <content type="string" default="" ></content> 218 218 </parameter> 219 219 </parameters> 220 220 <actions> 221 - <action name="start" timeout="20s" /> 222 - <action name="stop" timeout="20s" /> 223 - <action name="monitor" depth="0" timeout="20s" interval="15s" /> 224 - <action name="validate-all" timeout="20s" /> 225 - <action name="meta-data" timeout="5s" /> 221 + <action name="start" timeout="20s" ></action> 222 + <action name="stop" timeout="20s" ></action> 223 + <action name="monitor" depth="0" timeout="20s" interval="15s" ></action> 224 + <action name="validate-all" timeout="20s" ></action> 225 + <action name="meta-data" timeout="5s" ></action> 226 226 </actions> 227 227 </resource-agent> 228 228 EOF ... ... @@ -342,7 +342,7 @@ 342 342 exit $? 343 343 ``` 344 344 345 - 345 +We can now define a resource using `crm`: 346 346 347 347 primitive iface-ovsbr0p1 ocf:marsching:OVSPort \ 348 348 params bridge="ovsbr0" interface="ovsbr0p1" mac="02:00:00:00:00:01" \