VOIP HOME LAB - Part 1.5.2 Open vSwitch and VMware Workstation Configuration

In a previous tutorial we described how are the network devices and virtual machines connected in our VoIP home lab network. We will continue with Open vSwitch and VMware Workstation configuration.

1. VMware Workstation Configuration

Start VMware Workstation.

$ sudo vmware

a) Create new host-only interfaces

By default three VMware interfaces - vmnet0, vmnet1 a vmnet8 are created after VMware Workstation installation. Although these three interfaces match the number of interfaces needed by our VMs we will create another 3 interfaces vmnet10,vmnet11 and vmnet100 that reflect our VLAN ID labeling. To do this select option Edit -> Virtual Network Editor. Clicking on Remove Network button delete all existing interfaces. Then click on Add network button. Enter Network name and select Host-only option.


Picture 1 - Adding a new virtual network

Uncheck option Use local DHCP service to distribute IP adresses to VMs and save settings with Save button. Repeat the same procedure for all remaining vment interfaces. Once you finish, the Virtual Network Editor should look like following.


Picture 2 - Virtual Network Editor

Selecting Host-only option we instruct VMware to create a network connection only between a particular guest and host interface. Normally, is is a private network with no access to any other network. However, we will configure Openvswitch to connect a host network interface to switch itself. In other words, we will connect VM to the rest of our network.

b) Assign a virtual interface to the virtual machine

To let Openvswitch bridge a correct vmnet interface to Openvswitch port we must assign our new created virtual interface to the particular virtual machine. For instance let's assign the interface vmnet10 to the VM with installed Windows 7. Left click on the virtual machine and select Settings option. Navigate to Network Adapter settings. Select an option - Custom: Specific virtual network and choose device /dev/vmnet10 from the list.


Picture 3 - VM settings with installed Windows 7

Continue with assigning a network interface /dev/vmnet11 to the VM with installed Core Linux. Assigning a network interface /dev/vmnet100 to the VM with installed Cisco Unified Communication Manager - CUCM will be done after CUCM installation on VM.

2. Openvswitch Configuration

Even we partly configured Openvswitch in this tutorial we will delete a previous configuration and configure Openvswitch from scratch.

a) Create Openvswitch startup script

In order to get Openvswitch working, an openvswitch kernel module has to be loaded in Linux kernel, configuration database started and openvswitch daemon running. We could configure Debian to perform these tasks at its boot time as it is shown here . Once Debian booted up, Openvswitch would be fully operational. However, it is not preferable method for us to run Openvswitch as we want a virtual switch working only if it is needed. For this reason we will create a startup script start_openvswitch.sh that we start manually. The script is script.

Create a blank file start_openvswitch.sh, copy the rows in to the file and assign execute privileges to the file.

$ chmod +x start_openvswitch.sh

Afterward start the script.

$ ./start_openvswitch.sh

Once the script is started it is probably a good idea to check if openvswitch module is loaded in Linux kernel.

$ lsmod | grep open

openvswitch 61107 0
gre 12475 1 openvswitch
libcrc32c 12394 1 openvswitch
2) Openvswitch Configuration

b) Delete previously configured bridge br0 from database

$ sudo ovs-vsctl del-br br0

c) Create a new bridge br0

$ sudo ovs-vsctl add-br br0

d) Configure a trunk port

We will configure a network interface eth0 to become a trunk port. The trunk port is carrying only the VLAN traffic with ID 10,11 and 100.

$ sudo ovs-vsctl add-port br0 eth0 trunks=10,11,100

e) Configure Access ports

The commands assign virtual machine interfaces to the bridge br0.

$ sudo ovs-vsctl add-port br0 vmnet10 tag=10
$ sudo ovs-vsctl add-port br0 vmnet100 tag=100
$ sudo ovs-vsctl add-port br0 vmnet11 tag=11

f) Create SVI ports – VLAN interfaces

$ sudo ovs-vsctl add-port br0 vlan10 tag=10 -- set interface vlan10 type=internal
$ sudo ovs-vsctl add-port br0 vlan11 tag=11 -- set interface vlan11 type=internal
$ sudo ovs-vsctl add-port br0 vlan100 tag=100 -- set interface vlan100 type=internal

Note Use command /sbin/ifconfig to check if VLAN interfaces has been created.

g) Assign IP addresses to VLAN interfaces

$ sudo /sbin/ifconfig vlan10 netmask up
$ sudo /sbin/ifconfig vlan11 netmask up
$ sudo /sbin/ifconfig vlan100 netmask up

h) Display Openvswitch configuration

The following command displays Openvswitch configuration.

$ sudo ovs-vsctl show


Picture 4 - Openvswitch Configuration

3) Openvswitch Startup Script

Finally we will finish article with adding IP address configuration of VLAN ports to the Openvswitch startup script.




2 thoughts on “VOIP HOME LAB - Part 1.5.2 Open vSwitch and VMware Workstation Configuration

Leave a comment

Your email address will not be published. Required fields are marked *