Changes between Version 4 and Version 5 of Internal/OpenFlow/VirtualSwitch
- Timestamp:
- Jul 16, 2009, 3:01:28 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Internal/OpenFlow/VirtualSwitch
v4 v5 2 2 Not 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. 3 3 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. 4 Each virtual switch can be assigned a controller and a set of flow tables, and are associated with their !OpenFlow VLANs. 7 5 8 6 == Overview == 9 7 This article contains the following topics: 10 8 * 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 13 12 * The official NEC guide for the !OpenFlow capable IP8800/S3640 (attachment) 14 13 15 14 == 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.15 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. 17 16 18 17 * '' 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 20 21 * '' 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. 21 22 … … 24 25 This is the list of commands used in virtual switching that is accessible from the CLI: 25 26 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. 27 28 * ` deletevsi <vlan ID> ` - Deletes an instance of virtual switch. 28 29 * ` showswitch <vlan ID> <detail> ` - Gives you a list of virtual switches running on your switch. 29 30 * ` showflow <vlan ID> <detail> ` - Gives you information about the flow tables applied to the virtual switches. 30 31 31 ''' The !OpenFlow commands can be used even when you aren't in privileged mode. This may be a security issue worth considering. '''32 The !OpenFlow commands can be used even when you aren't in privileged mode. 32 33 33 34 == Setup == 34 The following list can be followed as a guideline for setting up virtual switches .35 The following list can be followed as a guideline for setting up virtual switches after your switch is booted into !OpenFlow capable firmware. 35 36 36 1. Disable spanning tree protocol37 37 1. Create VLANs 38 38 1. Assign ports to VLANs … … 41 41 The details can be found in the NEC !OpenFlow capable switch guide attached to this article. 42 42 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 isunnecessary, 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) === 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. 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. 45 45 46 1. Delete the old .conf file.47 46 {{{ 48 47 > cd /mnt/ 49 48 > rm openflow.conf 50 49 remove 'openflow.conf'? y 51 }}}52 53 2. use `setvsi` to generate virtual switches:54 {{{55 50 > setvsi 1 1,3,5,7,9,11,13,15,2.1 tcp 172.16.4.224 dpid 0x0123456789ab 56 51 > setvsi 2 17,19,21,23,25,27,29,31,2.2 tcp 172.16.4.180 dpid 0x012345678abc 57 52 > 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 {{{62 53 > showswitch 63 54 vlan ports secure channel … … 68 59 }}} 69 60 70 Details about specific virtual switches may be found by appending `<vlan ID> [detail]` to the command.71 72 61 The updated contents of openflow.conf: 73 62 {{{ … … 77 66 }}} 78 67 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. 68 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. 80 69 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. 100 72 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. 102 74 103 75