How to install

Appliance usage

Appliance documentation

Open vSwitch appliances for GNS3

Use Open vSwitch

Last updated
January 13, 2017

Contributors
Julien Duponchelle
Edit this Article
Last updated
January 13, 2017

Contributors
Julien Duponchelle
Edit this Article

Open vSwitch appliance

Open vSwitch is a production quality, multilayer virtual switch licensed under the open source Apache 2.0 license. It is designed to enable massive network automation through programmatic extension, while still supporting standard management interfaces and protocols (e.g. NetFlow, sFlow, IPFIX, RSPAN, CLI, LACP, 802.1ag). In addition, it is designed to support distribution across multiple physical servers similar to VMware's vNetwork distributed vswitch or Cisco's Nexus 1000V.

More informations on http://openvswitch.org/

How to install

Appliance usage

By default all interfaces are connected to the br0

Appliance documentation

Documentation for using the appliance is available on http://openvswitch.org/support/

Open vSwitch appliances for GNS3

GNS3 propose two Open vSwitch appliance.

Without management interface:

https://docs.gns3.com/appliances/openvswitch.html

With management interface:

http://docs.gns3.com/appliances/openvswitch-management.html

The difference is in the appliance with management interface the eth0 is used for managing the switch (via a SDN controller for example) and not connected to the Open vSwitch

You don’t need additional images. GNS3 will download from the docker hub the Open vSwitch images. It’s totally free.

The appliance will simulate a switch with 16 adapters. Internally all this adapters are connected to an Open vSwitch bridge named br0. Three additional bridge are also created: br1, br2 and br3.

The source code of the container is available here:

https://github.com/GNS3/gns3-registry/tree/master/docker/openvswitch

Use Open vSwitch

After the wizard end you will found the appliance in the switch categorie:

We will start by a very simple topology:

You can ignore warning you will see in the Open vSwitch console.

Set IP address on both VPCS:

PC1> ip 192.168.1.1
Checking for duplicate address...
PC1 : 192.168.1.1 255.255.255.0

PC2> ip 192.168.1.2
Checking for duplicate address...
PC1 : 192.168.1.2 255.255.255.0

PC2> ping 192.168.1.1
84 bytes from 192.168.1.1 icmp_seq=1 ttl=64 time=0.787 ms

You see that by default Open vSwitch in GNS3 is a working switch.

You can apply Open Flow rules in the Open vSwitch console, like dropping all the ICMP traffic:

# ovs-ofctl add-flow br0 "dl_src=*, icmp, actions=drop"

Ping will no longer work using ICMP

PC2> ping 192.168.1.1          
192.168.1.1 icmp_seq=1 timeout

But you can ping using UDP (-P 17 is the VPCS option for UDP ping)

PC2> ping 192.168.1.1 -P 17
84 bytes from 192.168.1.1 udp_seq=1 ttl=64 time=2.345 ms
84 bytes from 192.168.1.1 udp_seq=2 ttl=64 time=0.999 ms