wiki:Internal/OpenFlow/VirtualSwitch

Version 5 (modified by akoshibe, 15 years ago) ( diff )

The virtual switch

Not to be mistaken for vartual switches, virtual switches, or OpenFlow switches, are the main service offered by the OpenFlow capable switch.

Each virtual switch can be assigned a controller and a set of flow tables, and are associated with their OpenFlow VLANs.

Overview

This article contains the following topics:

  • Definitions of Legacy VLANs, OpenFlow VLANs, and virtual switches
  • Summary of CLI commands used in virtual switching
  • Virtual switch setup from CLI (as opposed to directly editing openflow.conf)
  • Making the switch and controller work
  • The official NEC guide for the OpenFlow capable IP8800/S3640 (attachment)

Legacy VLANs, OpenFlow VLANs, and virtual switches

Legacy VLANs, OpenFlow VLANs, and virtual switches all seem to serve a similar function: to provide a means to split up broadcast domains at the data link layer. This may cause some confusion as to what the exact differences are between these things without having definitions, so before going on, definitions had to be established.

  • Legacy VLANs are the familiar technology usually associated with 802.1q, and can be configured in any standard switch.
  • OpenFlow VLANs are legacy VLANs on which the virtual switches will run as overlay infrastructure. the VLAN number becomes the virtual switch's VLAN ID that can be used to pull up a specific virtual switch's information using the showswitch or showflow commands.
  • Virtual switches are VLANs that implement OpenFlow protocol and have OpenFlow controllers, flow tables, and datapath identifiers (basically the virtual switch's "name," the 12-digit hex number labeled as the dpid in the manual) associated with them. they will not function without the controller.

CLI Commands

The commands regarding virtual switching will not be found among the usual list of commands when you type ? at the terminal. This is the list of commands used in virtual switching that is accessible from the CLI:

  • setvsi - Creates an instance of virtual switch. Comes with a bunch of parameters.
  • deletevsi <vlan ID> - Deletes an instance of virtual switch.
  • showswitch <vlan ID> <detail> - Gives you a list of virtual switches running on your switch.
  • showflow <vlan ID> <detail> - Gives you information about the flow tables applied to the virtual switches.

The OpenFlow commands can be used even when you aren't in privileged mode.

Setup

The following list can be followed as a guideline for setting up virtual switches after your switch is booted into OpenFlow capable firmware.

  1. Create VLANs
  2. Assign ports to VLANs
  3. Use setvsi to create virtual switches from the ports assigned to VLANs

The details can be found in the NEC OpenFlow capable switch guide attached to this article.

when openflow.conf gets messed up (6/22)

One method to rewrite the OpenFlow configuration is to delete openflow.conf directly through the switch, then use the setvsi command to set the new virtual switches up. This should be unnecessary, but it happened to be effective when old configurations did not seem to go away despite editing the .conf file using a PC.

> cd /mnt/
> rm openflow.conf 
remove 'openflow.conf'? y
> setvsi 1 1,3,5,7,9,11,13,15,2.1 tcp 172.16.4.224 dpid 0x0123456789ab
> setvsi 2 17,19,21,23,25,27,29,31,2.2 tcp 172.16.4.180 dpid 0x012345678abc
> setvsi 3 33,35,37,39,41,43,45,47,2.3 tcp 172.16.4.64 dpid 0x01234567abcd
> showswitch
vlan    ports                                           secure channel      
----    -----                                           --------------      
1       1, 3, 5, 7, 9, 11, 13, 15, 2.1                  disconnected        
2       17, 19, 21, 23, 25, 27, 29, 31, 2.2             disconnected        
3       33, 35, 37, 39, 41, 43, 45, 47, 2.3             disconnected        

The updated contents of openflow.conf:

setvsi 1 1,3,5,7,9,11,13,15,2.1 tcp 172.16.4.224 dpid 0x0123456789ab
setvsi 2 17,19,21,23,25,27,29,31,2.2 tcp 172.16.4.180 dpid 0x012345678abc
setvsi 3 33,35,37,39,41,43,45,47,2.3 tcp 172.16.4.64 dpid 0x01234567abcd

However, it seems like it is not possible to set double-wide-mode, or no-save through the CLI. These have to be added by editing openflow.conf using the PC.

Virtual switches without controllers (7/8)

*Without the controller, virtual switches basically don't do anything. Plus, if you have a group of ports, and they share a VLAN, if even one port out of the group is configured to be a virtual switch, the whole group of ports cease to function as a regular switch.

*If some ports of the switch are meant to be left as legacy switches, it seems better to not include the trunk info when using the setvsi command. Including the trunk port in setvsi when there is no controller will mess up functionality of the trunk as well.

go back to OpenFlow index

Attachments (2)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.