| | 33 | 1. Delete the old .conf file. |
| | 34 | {{{ |
| | 35 | > cd /mnt/ |
| | 36 | > rm openflow.conf |
| | 37 | remove 'openflow.conf'? y |
| | 38 | }}} |
| | 39 | |
| | 40 | 2. use `setvsi` to generate virtual switches: |
| | 41 | {{{ |
| | 42 | > setvsi 1 1,3,5,7,9,11,13,15,2.1 tcp 172.16.4.224 dpid 0x0123456789ab |
| | 43 | > setvsi 2 17,19,21,23,25,27,29,31,2.2 tcp 172.16.4.180 dpid 0x012345678abc |
| | 44 | > setvsi 3 33,35,37,39,41,43,45,47,2.3 tcp 172.16.4.64 dpid 0x01234567abcd |
| | 45 | }}} |
| | 46 | |
| | 47 | The changes should take effect immediately. To confirm this, use the `showswitch` command: |
| | 48 | {{{ |
| | 49 | > showswitch |
| | 50 | vlan ports secure channel |
| | 51 | ---- ----- -------------- |
| | 52 | 1 1, 3, 5, 7, 9, 11, 13, 15, 2.1 disconnected |
| | 53 | 2 17, 19, 21, 23, 25, 27, 29, 31, 2.2 disconnected |
| | 54 | 3 33, 35, 37, 39, 41, 43, 45, 47, 2.3 disconnected |
| | 55 | }}} |
| | 56 | |
| | 57 | Details about specific virtual switches may be found by appending `<vlan ID> [detail]` to the command. |
| | 58 | |
| | 59 | The updated contents of openflow.conf: |
| | 60 | {{{ |
| | 61 | setvsi 1 1,3,5,7,9,11,13,15,2.1 tcp 172.16.4.224 dpid 0x0123456789ab |
| | 62 | setvsi 2 17,19,21,23,25,27,29,31,2.2 tcp 172.16.4.180 dpid 0x012345678abc |
| | 63 | setvsi 3 33,35,37,39,41,43,45,47,2.3 tcp 172.16.4.64 dpid 0x01234567abcd |
| | 64 | }}} |
| | 65 | |
| | 66 | 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. |
| | 67 | |
| | 68 | 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: |
| | 69 | {{{ |
| | 70 | # setvsi 5 18,20,48.5 tcp 172.16.4.16 dpid 0x0123456abcde |
| | 71 | # showswitch 5 detail |
| | 72 | Virtual switch 5 |
| | 73 | Datapath ID : 1251000106206(0x123456abcde) |
| | 74 | Port : gigabitethernet 0/18 (link down) |
| | 75 | gigabitethernet 0/20 (link down) |
| | 76 | gigabitethernet 0/48.5 (link up, 100M full) |
| | 77 | Conn mode : tcp |
| | 78 | Controller : 172.16.4.16:6633 (disconnected) |
| | 79 | Exact match : 01-24, 49-50 hw 0 / hw max 1510 |
| | 80 | 25-48 hw 0 / hw max 1512 |
| | 81 | Exact match : sw 0 / sw max 131072 |
| | 82 | Wildcard : sw 0 / sw max 100 |
| | 83 | Packet buff : 256 packets / 4294967295 MB |
| | 84 | Miss sendlen: 128 bytes |
| | 85 | }}} |
| | 86 | Virtual switch 5 is running on ports 18 and 20. |