Changes between Version 8 and Version 9 of Internal/OpenFlow/VirtualSwitch
- Timestamp:
- Aug 11, 2009, 3:56:16 PM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Internal/OpenFlow/VirtualSwitch
v8 v9 5 5 This article covers: 6 6 * Virtual switch setup from CLI (as opposed to directly editing openflow.conf) 7 * Making the switch and controller work8 7 * The official NEC guide for the !OpenFlow capable IP8800/S3640 (attachment) 9 8 … … 11 10 The 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. 12 11 12 The 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 13 18 The detailed list of commands and their uses are found on the NEC guide. 14 19 15 == S etup: SW-SB09==20 == Starting virtual switches == 16 21 VLAN 28 on the switch used in the Sandbox 9 setup is made to run a virtual switch. The current port configurations: 17 22 * ports 1-12 : CM (VLAN 3) … … 26 31 }}} 27 32 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. 33 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. 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. 29 34 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. 35 To see the switch: 36 {{{ 37 sw-sb09> showswitch 38 vlan ports secure channel 39 ---- ----- -------------- 40 28 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36 disconnected 41 }}} 32 42 43 Using 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 {{{ 45 sw-sb09> setvsi 45 9-16 tcp 172.16.1.110:6634 dpid 0xdeadbeefface 46 sw-sb09> showswitch 45 detail 47 Virtual 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) == 33 69 * 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. 34 70 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. 36 72 37 == some experimentation withRuby 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) == 74 The 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: 39 75 40 76 {{{ … … 45 81 ofpsock = TCPserver.new("172.16.100.1", 6633) 46 82 83 puts "port peer IP" 47 84 #listen to see what port the switch is using 48 85 while (session = ofpsock.accept) … … 56 93 You get: 57 94 {{{ 95 port peer IP 58 96 55354 172.16.100.10 20:53:22 59 97 55353 172.16.100.10 20:53:37