Virtual switching with Open vSwitch

Switching Station

VLANs

You can also implement VLANs with Open vSwitch, and you have two options for doing so. Every Open vSwitch is VLANcapable: If you add a port to the virtual switch, it is always a VLAN trunk port that provides tagged transport of all VLANs. To create an access port that transports a VLAN natively and without tags, you can enter the following command:

ovs vsctl add port extern0 vnet1 tag=1

The brctl command doesn't give you the option of creating this kind of port directly. You'll need a fake bridge as a workaround. Open vSwitch supports fake bridges, which you can then assign to individual VLANs. Every port on a fake bridge is then an access port on the VLAN. To implement this, you first create a fake bridge as the child of a parent bridge. For example, do:

# ovs vsctl add br VLAN1 extern0 1

The new fake bridge now answers to the name of VLAN1 and transports the VLAN with a tag of 1. You need to enable this, and you can assign an IP address at the same time.

# ifconfig VLAN1 192.168.1.1 up

Each port you create on this bridge is an access port for VLAN 1, which means you can again use the brctl command.

Additional Functions

Open vSwitch offers many other functions. For example, it can create a GRE tunnel between multiple systems and run VLAN trunking across it. Thus, you can move virtual machines to other mosts outside of the LAN. Communication takes place through the GRE tunnel.

Open vSwitch can also aggregate ports. The Linux kernel developers call this process bundling; Cisco refers to the same function as EtherChannel. It gives the administrator the ability to combine multiple physical ports as a single logical port, which can then be used for load balancing and high availability.

Open vSwitch is a very interesting project that is currently suffering from a lack of popularity and documentation. I hope the major distributions decide to incorporate the project and integrate it natively with their own tools, such as Libvirt. This functionality would remove the need to use the bridge compatibility daemon.

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus