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

  • Container and hardware e-virtualization under one roof
    The Proxmox distribution specializes in virtualization, letting you deploy and manage virtual servers with OpenVZ and KVM at the same time.
  • Virtualization with KVM
    KVM continues to gain popularity in the world of Linux – so much so, that it has become Red Hat and Ubuntu's preferred virtualization solution. In contrast to Xen, setting up KVM involves just a couple of steps, and the guest operating systems can run without special patches.
  • An IP-based load balancing solution
    Red Hat's Piranha load balancing software is based on the Linux Virtual Server concept. We show you how to configure and test your setup.
  • Setting up an OpenNebula Cloud
    The OpenNebula cloud middleware system is one of the easiest private clouds in the sky. We'll show you how to get started.
  • Operating system virtualization with OpenVZ
    The virtualization technology market is currently concentrating on hypervisor-based systems, but hosting providers often use an alternative technology. Container-based solutions such as OpenVZ/Virtuozzo are the most efficient way to go if the guest and host systems are both Linux.
comments powered by Disqus