Contents
How to create Linux bridges and Open vSwitch bridges with?
As mentioned above, by default the Linux bridge will get an address via DHCP. If you don’t want it to be on the network (you might have another dedicated interface) then disable DHCP on it. sudo nmcli con modify br0 ipv4.method disabled ipv6.method disabled Or, if you need set a static IP you can do that too.
How to set static address on VLAN interface?
If you need to set a static address on the VLAN interface instead, you can do so by modifying the interface. Show the switch config and bridge with OVS tools. It’s not really necessary, but you can disable the current NetworkManager config for the device so that it doesn’t conflict with the bridge, if you want to.
What happens if you restart OVS-vswitchd daemon?
Restarting the daemons means that the OpenFlow flows in the ovs-vswitchd daemon will be lost. One way to restore the flows is to let the controller re-populate it. Another way is to save the previous flows using a utility like ovs-ofctl and then re-add them after the restart.
How to connect different namespaces to different VLANs?
Place one or more physical interfaces as well as one of the veth interfaces in the bridge, and—bam!—there you go. Naturally, if you had different namespaces, you’d probably want/need to connect them to different physical networks or different VLANs on the physical network.
Can you use Veth to connect network namespaces?
As a result, you can use veth interfaces to connect a network namespace to the outside world via the “default” or “global” namespace where physical interfaces exist. Let’s see how that’s done. First, you’d create the veth pair:
How to connect a network namespace to a physical network?
To connect a network namespace to the physical network, just use a bridge. In my case, I used an Open vSwitch (OVS) bridge, but a standard Linux bridge would work as well. Place one or more physical interfaces as well as one of the veth interfaces in the bridge, and—bam!—there you go.