Changes between Version 8 and Version 9 of Internal/OpenFlow/VirtualSwitch


Ignore:
Timestamp:
Aug 11, 2009, 3:56:16 PM (15 years ago)
Author:
akoshibe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/VirtualSwitch

    v8 v9  
    55This article covers:
    66 * Virtual switch setup from CLI (as opposed to directly editing openflow.conf)
    7  * Making the switch and controller work
    87 * The official NEC guide for the !OpenFlow capable IP8800/S3640 (attachment)
    98   
     
    1110The commands for virtual switching will not be found among the usual list of commands that are listed when you type `?` at the terminal. Command completion doesn't work either, so you have to type out the whole command. In addition, if `no-save` was specified in openflow.conf, you will not be able to use `setvsi` or `deletevsi` from the CLI.   
    1211
     12The commands, summarized (ignoring the flags)
     13 * `setvsi` - starts a virtual switch
     14 * `deletevsi` - deletes a virtual switch
     15 * `showswitch` - shows the configurations of a virtual switch
     16 * `showflow` - shows the flows currently being implemented
     17
    1318The detailed list of commands and their uses are found on the NEC guide.
    1419
    15 == Setup: SW-SB09 ==
     20== Starting virtual switches ==
    1621VLAN 28 on the switch used in the Sandbox 9 setup is made to run a virtual switch. The current port configurations:
    1722 * ports 1-12 : CM (VLAN 3)
     
    2631}}}   
    2732
    28 This starts a virtual switch with the VLAN ID 28 encompassing all 12 VLAN 28 ports, that uses a TCP connection to the controller at port 6633.  
     33This starts a virtual switch with the VLAN ID 28 encompassing all 12 VLAN 28 ports, that uses a TCP connection to the controller at port 6633. The dpid is a 12-digit hex number used by the controller to identify a virtual switch. The entry is automatically added to openflow.conf. In that respect, it is not necessary to boot the switch with a pre-written .conf file; as long as you have the VLANs, you can just start the virtual switches through the CLI.   
    2934
    30 == Important notes about virtual switches (7/8) ==
    31  * Because a virtual switch uses the VLAN ID of the legacy VLAN it overlays, you can't have one virtual switch encompass the ports belonging to more than one VLAN. 
     35To see the switch:
     36{{{
     37sw-sb09> showswitch
     38vlan    ports                                           secure channel     
     39----    -----                                           --------------     
     4028      25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36  disconnected       
     41}}}
    3242
     43Using the VLAN ID as the virtual switch's ID is not really necessary, nor is it to limit a virtual switch to one VLAN. Here, a switch of VLAN ID 45 is started across ports from VLANs 3 and 27.
     44{{{
     45sw-sb09> setvsi 45 9-16 tcp 172.16.1.110:6634 dpid 0xdeadbeefface
     46sw-sb09> showswitch 45 detail
     47Virtual switch 45
     48  Datapath ID : 244837814106830(0xdeadbeefface)
     49  Port        : gigabitethernet 0/9 (link down)                                 
     50                gigabitethernet 0/10 (link down)                               
     51                gigabitethernet 0/11 (link down)                               
     52                gigabitethernet 0/12 (link down)                               
     53                gigabitethernet 0/13 (link down)                               
     54                gigabitethernet 0/14 (link down)                               
     55                gigabitethernet 0/15 (link down)                               
     56                gigabitethernet 0/16 (link down)                               
     57  Conn mode   : tcp             
     58  Controller  : 172.16.1.110:6634 (disconnected)
     59  Exact match : 01-24, 49-50 hw 0 / hw max 1510
     60                25-48        hw 0 / hw max 1510
     61  Exact match : sw 0 / sw max 131072
     62  Wildcard    : sw 0 / sw max 100
     63  Packet buff : 256 packets / 4294967295 MB
     64  Miss sendlen: 128 bytes
     65  Wcard mode  : S/W only
     66}}}
     67
     68== Some troubleshooting (7/8) ==
    3369 * 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.   
    3470
    35  * 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.
     71 * If some ports of the switch are meant to be left as legacy switches, it is 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.
    3672
    37 == some experimentation with Ruby sockets (8/4) ==
    38 The switch will keep trying to contact a controller, regardless of whether the controller is active. This happens once every 15 seconds or so, and can be seen with a very simple script that listens on TCP 6633 (the default !OpenFlow port) on the console's !OpenFlow VLAN interface, which has the IP address 172.16.100.1:
     73== The virtual switch in idle state - an experiment using Ruby sockets (8/4) ==
     74The switch will keep trying to contact a controller, regardless of whether the controller is active or not. This happens once every 15 seconds or so, and can be seen with a very simple script that listens on TCP 6633 (the default !OpenFlow port) on the console's !OpenFlow VLAN interface, which has the IP address 172.16.100.1:
    3975
    4076{{{
     
    4581ofpsock = TCPserver.new("172.16.100.1", 6633)
    4682
     83puts "port    peer IP"
    4784#listen to see what port the switch is using
    4885while (session = ofpsock.accept)
     
    5693You get:
    5794{{{
     95port    peer IP     
    589655354   172.16.100.10     20:53:22
    599755353   172.16.100.10     20:53:37