Changes between Version 4 and Version 5 of Internal/OpenFlow/VirtualSwitch


Ignore:
Timestamp:
Jul 16, 2009, 3:01:28 PM (15 years ago)
Author:
akoshibe
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Internal/OpenFlow/VirtualSwitch

    v4 v5  
    22Not to be mistaken for [wiki:Documentation/OpenFlow/VartualSwitch vartual switches], virtual switches, or !OpenFlow switches, are the main service offered by the !OpenFlow capable switch.
    33
    4 Several virtual switches may exist on a single physical device, or a single virtual switch may encompass a whole switch. In the latter case the switch will just be referred to as an !OpenFlow switch.
    5 
    6 Each virtual switch may be assigned a controller and a set of flow tables, and are associated with their !OpenFlow VLANs.
     4Each virtual switch can be assigned a controller and a set of flow tables, and are associated with their !OpenFlow VLANs.
    75
    86== Overview ==
    97This article contains the following topics:
    108 * Definitions of Legacy VLANs, !OpenFlow VLANs, and virtual switches
    11  * CLI commands used in virtual switching
    12  * Virtual switch setup
     9 * Summary of CLI commands used in virtual switching
     10 * Virtual switch setup from CLI (as opposed to directly editing openflow.conf)
     11 * Making the switch and controller work
    1312 * The official NEC guide for the !OpenFlow capable IP8800/S3640 (attachment)
    1413   
    1514== Legacy VLANs, !OpenFlow VLANs, and virtual switches ==
    16   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.
     15Legacy 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.
    1716
    1817 * '' Legacy VLANs '' are the familiar technology usually associated with 802.1q, and can be configured in any standard switch.
    19  * '' !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 switch's information using the `showswitch` or  `showflow` commands. 
     18
     19 * '' !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. 
     20
    2021 * '' 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.
    2122 
     
    2425This is the list of commands used in virtual switching that is accessible from the CLI:
    2526
    26  * ` setvsi ` -  Creates an instance of virtual switch. Comes with parameters.
     27 * ` setvsi ` -  Creates an instance of virtual switch. Comes with a bunch of parameters.
    2728 * ` deletevsi <vlan ID> ` - Deletes an instance of virtual switch. 
    2829 * ` showswitch <vlan ID> <detail> ` - Gives you a list of virtual switches running on your switch.
    2930 * ` showflow <vlan ID> <detail> ` - Gives you information about the flow tables applied to the virtual switches.
    3031
    31 ''' The !OpenFlow commands can be used even when you aren't in privileged mode. This may be a security issue worth considering. '''
     32The !OpenFlow commands can be used even when you aren't in privileged mode.
    3233
    3334== Setup ==
    34 The following list can be followed as a guideline for setting up virtual switches.
     35The following list can be followed as a guideline for setting up virtual switches after your switch is booted into !OpenFlow capable firmware.
    3536
    36  1. Disable spanning tree protocol
    3737 1. Create VLANs
    3838 1. Assign ports to VLANs
     
    4141The details can be found in the NEC !OpenFlow capable switch guide attached to this article.
    4242
    43 == Example Setup - the weird .conf file incident ==
    44 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. Usually this is unnecessary, but it happened to be effective when old configurations did not seem to go away despite editing the .conf file using a PC.
     43=== when openflow.conf gets messed up (6/22) ===
     44One 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.
    4545
    46  1. Delete the old .conf file.
    4746{{{
    4847> cd /mnt/
    4948> rm openflow.conf
    5049remove 'openflow.conf'? y
    51 }}}
    52 
    53  2. use `setvsi` to generate virtual switches:
    54 {{{
    5550> setvsi 1 1,3,5,7,9,11,13,15,2.1 tcp 172.16.4.224 dpid 0x0123456789ab
    5651> setvsi 2 17,19,21,23,25,27,29,31,2.2 tcp 172.16.4.180 dpid 0x012345678abc
    5752> setvsi 3 33,35,37,39,41,43,45,47,2.3 tcp 172.16.4.64 dpid 0x01234567abcd
    58 }}}
    59 
    60  The changes should take effect immediately. To confirm this, use the `showswitch` command:
    61 {{{
    6253> showswitch
    6354vlan    ports                                           secure channel     
     
    6859}}}
    6960
    70 Details about specific virtual switches may be found by appending `<vlan ID> [detail]` to the command.
    71 
    7261The updated contents of openflow.conf:
    7362{{{
     
    7766}}}
    7867
    79 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.  
     68However, 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.
    8069
    81 There seems to be no need for 1:1 mapping between VLANs and virtual switches. Here, VLAN 5 encompasses ports 18.20.22.and 24:
    82 {{{
    83 # setvsi 5 18,20,48.5 tcp 172.16.4.16 dpid 0x0123456abcde
    84 # showswitch 5 detail
    85 Virtual switch 5
    86   Datapath ID : 1251000106206(0x123456abcde)
    87   Port        : gigabitethernet 0/18 (link down)                               
    88                 gigabitethernet 0/20 (link down)                               
    89                 gigabitethernet 0/48.5 (link up, 100M full)                     
    90   Conn mode   : tcp             
    91   Controller  : 172.16.4.16:6633 (disconnected)
    92   Exact match : 01-24, 49-50 hw 0 / hw max 1510
    93                 25-48        hw 0 / hw max 1512
    94   Exact match : sw 0 / sw max 131072
    95   Wildcard    : sw 0 / sw max 100
    96   Packet buff : 256 packets / 4294967295 MB
    97   Miss sendlen: 128 bytes
    98 }}}
    99 Virtual switch 5 is running on ports 18 and 20. 
     70== Virtual switches without controllers (7/8) ==
     71 *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.   
    10072
    101 VLANs not associated with virtual switches will behave as regular switches.
     73 *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.
    10274
    10375