layer2.ovs

This Model Component contains functionality to install Open vSwitch on an Ubuntu1604Server endpoint. Open vSwitch is useful for many applications. Specific use cases include transparent firewalls and passive taps, among other possible applications.

Model Component Dependencies:

VM Resources

  • openvswitch-switch.tgz – A tarball containing the required debian packages for installing Open vSwitch on a Ubuntu server. Currently, the packages include: openvswitch-common, openvswitch-switch, and python-six (a dependency of OVS).

  • bridge_layer2.sh – A shell script to create a new OVS bridge and then create new taps on the bridge for any passed-in MAC addresses.

Available Objects

class layer2.ovs.OpenvSwitch(*args, **kwargs)[source]

Bases: object

This object installs Open vSwitch on an Ubuntu server endpoint. Open vSwitch is useful for many applications. Specific use cases include transparent firewalls and passive taps, among other possible applications.

__init__(*args, **kwargs)
bridge_layer2(time, bridge_name='br0', interfaces=None)[source]

Create layer 2 connections by putting all the specified interfaces on a newly created bridge with the specified name.

Parameters:
  • time (int) – Schedule time to execute the bridging VM resource on the VM.

  • bridge_name (str) – Name of bridge to create on the VM.

  • interfaces (list) – List of MAC addresses corresponding to the interfaces to be added to the layer 2 bridge. Uses MAC addresses because interface names aren’t guaranteed to be consistent.