User can switch between L2/L3 and OVS modes using the picos_boot script already included in PicOS. User can run the script from the Linux shell on user's PicOS switch. The script will modify the PicOS configuration file /etc/picos/picos_start.conf automatically, without user having to edit the file manually.
Warning:
On FS S5810 Series and S5860 Series switches, run "save_config" command when perform picos_boot. Otherwise, the picos_boot configuration will be lost after PicOS reboot. For detail, please refer to Configuration Saving Guide.
Switching from L2/L3 Mode to OVS Mode
This section describes the procedure to switch from the L2/L3 mode to OVS mode on a PicOS switch named LEAF-A. The switch name is arbitrary.
Login with username admin to arrive at the Linux shell prompt.
Username: admin Password: admin@LEAF-A$
NOTE:
For PICOS go2cli version, users go to PICOS CLI prompt after log in:
admin@Xorplus>
At PICOS CLI prompt, run “start shell sh” to enter Linux shell.
admin@Xorplus> start shell sh admin@Xorplus:~$
2. Run the picos_boot script located in /usr/bin directory. The full path does not need to be used because the /usr/bin directory is on the system PATH by default.
3. Enter option 2 to select OVS mode.
4. Choose how the IP address of the management interface should be configured: DHCP or static IP. If Static IP is chosen, values for static IP address, subnet mask, and default gateway must be provided. If DHCP is chosen, no more questions are asked.
admin@LEAF-A$sudo picos_boot Configure the default system start-up options: (Select key 3 if no change) [1] PICOS L2/L3 * default [2] PICOS Open vSwitch/OpenFlow [3] Quit Enter your choice (1,2,3):2 PICOS Open vSwitch/OpenFlow is selected. Configure the IP of management interface: [1] DHCP [2] Static IP Enter your choice(1,2):2 Note: The OVS server, by default, uses static local management IP and port 6640. vSwitch, by default, connects to the server via PTCP. Set a static IP and netmask for the switch (128.0.0.10/24):192.168.42.120/24 Set the gateway IP (172.168.1.2):192.168.42.1 Please restart the PICOS service
5. Restart the picos service to activate PicOS OVS mode.
admin@LEAF-A$sudo systemctl restart picos (No print here, it will cost few minutes for PICOS to restart.) admin@LEAF-A$
As an alternative to restarting the picos service, user can just reboot the switch to bring the PicOS mode change into effect.
admin@LEAF-A$sudo reboot Broadcast message from root@PicOS-OVS (pts/0) (Sun Aug 16 21:18:48 2015): The system is going down for reboot NOW! Username: admin Password: admin@PicOS-OVS$
The picos_boot script has the following options:
Option 1 selects the PICOS L2/L3 (Layer 2 / Layer 3) mode. When user chooses option 1, PICOS will load in L2/L3 mode after a reboot.
Option 2 selects the PICOS OVS (Open vSwitch) mode. When user chooses option 2, PICOS will load in OVS mode after a reboot.
Option 3 does not modify the present PICOS mode.
Switching from OVS Mode to L2/L3 Mode
This section describes the procedure used to switch from OVS mode to L2/L3 mode on a PicOS switch named LEAF-A. The switch name is arbitrary.
Log in with username admin to arrive at the Linux shell prompt.
Username: admin Password: admin@PicOS-OVS$
NOTE:
For PICOS go2cli version, users go to PICOS CLI prompt after log in:
admin@Xorplus>
At PICOS CLI prompt, run “start shell sh” to enter Linux shell.
admin@Xorplus> start shell sh admin@Xorplus:~$
2. Run the picos_boot script located in /usr/bin directory. The full path does not need to be used because the /usr/bin directory is on the system PATH by default.
3. Enter option 1 to select L2/L3 mode.
admin@PicOS-OVS$sudo picos_boot Configure the default system start-up options: (Select key 3 if no change) [1] PICOS L2/L3 [2] PICOS Open vSwitch/OpenFlow * default [3] No start-up change Enter your choice (1,2,3):1 PICOS L2/L3 switch system is selected. Please restart the PICOS service
4. Restart the picos service to activate PicOS L2/L3 mode.
admin@PicOS-OVS$sudo systemctl restart picos (No print here, it will cost few minutes for PICOS to restart.) admin@PicOS-OVS$
5. Optionally, user can run the cli command at the Linux shell to enter the PicOS L2/L3 operation mode.
admin@PicOS-OVS$cli Synchronizing configuration...OK. Welcome to PicOS L2/L3 on LEAF-A admin@LEAF-A>
As an alternative to restarting the picos service, user can just reboot the switch to bring the PicOS mode change into effect.
Enabling CrossFlow in L2/L3 Mode
This section describes the procedure to enable CrossFlow in L2/L3 mode.
Enter L2/L3 operation mode, using the cli command at the Linux shell.
admin@LEAF-A$ cli Synchronizing configuration...OK. Welcome to PicOS L2/L3 on LEAF-A admin@LEAF-A>
NOTE:
This step is not necessary for PICOS go2cli version, as users go to PICOS CLI prompt after log in:
admin@Xorplus>
At PICOS CLI prompt, run “start shell sh” to enter Linux shell.
admin@Xorplus> start shell sh admin@Xorplus:~$
If you want to return from the Linux shell back to the CLI prompt, run "exit".
admin@Xorplus:~$ exit exit admin@Xorplus>
Enter configuration mode, using the configure command in the operation mode.
admin@LEAF-A> configure Entering configuration mode. There are no other users in configuration mode. admin@LEAF-A#
Enable CrossFlow mode, using the set xovs enable true command in configuration mode. Commit the changes, and exit the configuration mode. Then, exit the operation mode.
admin@LEAF-A# set xovs enable true admin@LEAF-A# commit Commit OK. Save done. admin@LEAF-A# exit admin@LEAF-A> exit admin@LEAF-A$
User can now run the OVS mode commands from the Linux shell.
admin@LEAF-A$ovs-vsctl show e8e63632-d96b-409a-89c3-95bb4ef61f46 Bridge "ECODE3" Controller "tcp:65.19.141.118:6633" is_connected: true Port "ge-1/1/1" Interface "ge-1/1/1" type: "pica8" Port "ECODE3" Interface "ECODE3" type: internal Port "ge-1/1/47" Interface "ge-1/1/47" type: "pica8" Port "ge-1/1/48" Interface "ge-1/1/48" type: "pica8" Port "ge-1/1/2" Interface "ge-1/1/2" type: "pica8"