15 | | The P-3290 can operate in 2 basic modes: as a L2 switching/L3 routing element using Pica8's PicOS protocol stack, or as a multi-layer open virtual switch (OVS) where the control path is open to experimentation. In addition, the U-Boot bootloader on the switch can load custom images via NFS/TFTP enabling other compatible switch OS solutions, such as the Indigo. For Openflow experimentation, this means the 3 possible options described below. |
| 15 | The P-3290 can operate in 2 basic modes: as a L2 switching/L3 routing element using Pica8's PicOS protocol stack, or as a multi-layer virtual switch enabled by porting open vSwitch (OVS), where the control path is open to experimentation. In addition, since the U-Boot bootloader on the switch can load custom images via NFS/TFTP, one can load any compatible switch OS solutions (e.g., Indigo), presenting a third path for !OpenFlow experimentation. |
| 20 | |
| 21 | |
| 22 | || [[Image(P3290-Crossflow-HW-Structures.jpg, 200px, align=center)]]|| |
| 23 | ||Figure 2: Hardware structures used to store flow rules in the TCAM and L2/L3 crossflow modes in P-3290 || |
| 24 | |
| 25 | There are two further distinct modes within the crossflow mode, L2/L3 mode and TCAM mode, that use different hardware lookup structures during forwarding. If you enable L2/L3 mode, all flows will be installed in the routing table and the FDB table in the hardware. If you enable TCAM mode, all flows will be installed in the TCAM table. In each of these sub-modes, there are limitations on what flow patterns can be specified - refer to the attached configuration guide for these constraints. |
| 26 | |
| 27 | |
| 28 | Preparing the switch for !OpenFlow mode includes: assigning h/w resources for !OpenFlow flows, enabling !OpenFlow mode and enabling specific versions (e.g., 1.1, 1.2 or 1.3), setting required ports as crossflow, and finally adding the 'match' and 'action' details for each flow. As a more standard alternative to the last step of introducing flow rules through the CLI, detailed for a remote !OpenFlow controller can be configured that will then receive headers/packets that are not handled locally on the designated crossflow ports. An example of each step is shown in the following excerpt from a CLI session: |
| 29 | |
| 30 | {{{ |
| 31 | |
| 32 | -- set tcam/routing table resources |
| 33 | |
| 34 | XorPlus# set interface max-acl-rule-limit ingress 400 |
| 35 | [edit] |
| 36 | XorPlus# set interface max-route-limit 6000 |
| 37 | [edit] |
| 38 | |
| 39 | -- (globally) enable OpenFlow, and set the working mode, i.e., either L2/L3 or TCAM modes |
| 40 | |
| 41 | XorPlus# set open-flow |
| 42 | [edit] |
| 43 | XorPlus# set open-flow working-mode tcam-mode |
| 44 | [edit] |
| 45 | |
| 46 | -- enable specific OF version, e.g., v 1.3 |
| 47 | |
| 48 | XorPlus# set open-flow allowed-versions openflow-v1.3 disable false |
| 49 | [edit] |
| 50 | |
| 51 | -- set required ports in crossflow mode, with or without local control |
| 52 | |
| 53 | XorPlus# set interface gigabit-ethernet ge-1/1/1 crossflow enable true |
| 54 | [edit] |
| 55 | XorPlus# set interface gigabit-ethernet ge-1/1/2 crossflow enable true |
| 56 | [edit] |
| 57 | XorPlus# set interface gigabit-ethernet ge-1/1/2 crossflow local-control false |
| 58 | [edit] |
| 59 | |
| 60 | -- add flow rules directly from CLI |
| 61 | |
| 62 | XorPlus# set open-flow flow f1 match-field ethernet-destination-address 22:22:22:22:22:22 |
| 63 | [edit] |
| 64 | XorPlus# set open-flow flow f1 match-field vlan-id 100 |
| 65 | [edit] |
| 66 | XorPlus# set open-flow flow f1 match-field ip-destination-address 192.168.1.0/24 |
| 67 | [edit] |
| 68 | XorPlus# set open-flow flow f1 match-field ethernet-type 2048 |
| 69 | [edit] |
| 70 | XorPlus# set open-flow flow f1 action output interface ge-1/1/1 |
| 71 | |
| 72 | -- configure controller IP/port/transport for non-local control |
| 73 | |
| 74 | XorPlus# set open-flow controller contr-serv address 10.19.0.11 |
| 75 | [edit] |
| 76 | XorPlus# set open-flow controller contr-serv port 6633 |
| 77 | [edit] |
| 78 | XorPlus# set open-flow controller contr-serv protocol tcp |
| 79 | [edit] |
| 80 | XorPlus# commit |
| 81 | |
| 82 | }}} |
| 83 | |
| 84 | |
| 91 | == Switching Modes using Web Service == |
| 92 | |
| 93 | |
| 94 | == Access to Switch CLI == |
| 95 | |
| 96 | Access to the switch CLI while the switch is in the L2/L3 mode or the OVS mode is enabled through ssh using the following account credentials: |
| 97 | |
| 98 | {{{ |
| 99 | ssh host/IP: sw-sb-09.orbit-lab.org/10.19.0.253 |
| 100 | username: sb9user |
| 101 | passwd: sb9passwd |
| 102 | }}} |
| 103 | |
| 104 | Note that the ssh works from within sb9 only, and would therefore require the experimenter to have reserved a SB9 time slot. |
| 105 | |
| 106 | While in L2/L3 mode, the XorPlus CLI under the above account grants complete control to configure the switch and also to load/store configuration files on the root file system. However, it is requested that experimenters who want to preserve their configs to copy out their configurations files using tftp, etc., to external locations and load them when required again. Below are the relevant CLI steps with further details in the attached configuration guide. Please exercise prudence and caution when saving or moving configuration files in/out of the root file system. |
| 107 | |
| 108 | {{{ |
| 109 | -- retrieve config file from external location; scp can be used in place of tftp |
| 110 | XorPlus> file tftp get remote-file basic.conf local-file /pica/config/sb9user/ychen.conf <server IP> |
| 111 | XorPlus> configure |
| 112 | -- load previously stored config file |
| 113 | XorPlus# load ychen.conf |
| 114 | -- make any number of changes and commit |
| 115 | ... |
| 116 | -- save current configuration changes to specific file |
| 117 | XorPlus# save ychen-latest.conf |
| 118 | Save done. |
| 119 | [edit] |
| 120 | -- transfer out config file to safe location for later use |
| 121 | XorPlus# exit |
| 122 | XorPlus> file tftp put local-file /pica/config/sb9user/ychen-latest.conf remote-file updated.conf <server IP> |
| 123 | |
| 124 | }}} |