Config Level Control Commands

The commands described in this page are available in the config mode of the FlexSwitch CLI.

Apply

Use the apply command to apply configuration settings. See also, Showunapplied and Clearunapplied.

Command

FlexSwitch(config-vlan)#apply

Response

Applying Config:
id: 1   object: Vlan   status: APPLIED CONFIG  valid: True delete: False num user cmds: 2
 command                     attr           value           model attr     iskey    required    userprov    time provisioned         
-------------------------------------------------------------------------------------------------------------------------------------
 vlan 1                      vlan           1               VlanId         True     X           X           Tue Aug 29 22:06:22 2017 
 Description Example vlan    Description    Example vlan    Description    False                X           Tue Aug 29 22:06:37 2017 

sdk:createVlan(1,None,None,AdminState=UP,Description=Example vlan,AutoState=UP) result: SUCCESS: http status code: 201

Clearunapplied

Use the clearunapplies command to clear any unapplied configuration. See also, Showunapplied.

Command:

FlexSwitch(config)#clearunapplied 

Response:

Clearing Pending Config
FlexSwitch(config)#

End

The end command returns you to the enable mode.

Command:

FlexSwitch(config)#end

Response:

FlexSwitch#

Exit

The exit command causes you to exit the current CLI tree position (see example below). If you are in the config mode you will exit to the enable mode, if in the enable mode you will exit the privilege mode, exiting from the privilege mode exits the CLI and returns you to the shell.

FlexSwitch(config)#vlan 100
FlexSwitch(config-vlan)#exit
FlexSwitch(config)#

Help

The help command displays built-in help for a command. You may use the question mark (?) as a short-cut.

Example:

FlexSwitch(config)#acl help
-----------------------------------
 Command               Description 
-----------------------------------
 control:                          
 context:                          
   <value>                
                       Acl name.   

Image

Note

This command is only supported on machines with a monolihic image installed.

Use the image command to switch between FlexSwitch images.

Command:


Response:


No

No deletes only objects and not parameters within an object.

Using no to change states.

The following commands can be used to change object states:

  • no shutdown
  • no tacacs enable

### Exceptions Certain items cannot be deleted or turned off:

  • Interfaces cannot be deleted (example: no interface fpPort1 won't work)
  • no logging doesn't work

Ping

Use the ping command to ping another node in the network.

Command:

FlexSwitch(config)#ping 172.17.0.3

Response:

FlexSwitch(config)#PING 172.17.0.3 (172.17.0.3) 56(84) bytes of data.
64 bytes from 172.17.0.3: icmp_seq=1 ttl=64 time=0.122 ms
64 bytes from 172.17.0.3: icmp_seq=2 ttl=64 time=0.091 ms
64 bytes from 172.17.0.3: icmp_seq=3 ttl=64 time=0.071 ms
64 bytes from 172.17.0.3: icmp_seq=4 ttl=64 time=0.087 ms

--- 172.17.0.3 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2998ms
rtt min/avg/max/mdev = 0.071/0.092/0.122/0.021 ms

Quit

Use the quit command to exit the CLI and terminate the CLI session.

FlexSwitch(config)#quit
Quiting Shell
root@FlexSwitch:/#

Reboot

Use the reboot command to restart FlexSwitch.

Reload_cli_model

The reload_cli_model command reloads causes the CLI to reload and places you at the intitial CLI prompt.

Save

Use the save command to save the current FlexSwitch configuration.

For more information about this topic, see Working with Configuration Archives

Options

Context Description
DstFile Base destination filename on server before timestamp is appended, default: /opt/flexswitch/startup-config
Interval interval value for config archive in minutes. default: 1440
Nonce Nonce used in the encryption algorithm (see note below)
OnChange True/False Automatically create an archive when a configuration change is made. default:false
Passphrase Passphrase for encrypting secure configurations (see note below)
Password password of config archive server user.
RetryCount Number of times to try to archvive the config before giving up default: 3
Timeout Time to wait before giving up on archiving (in seconds) default: 30
Timestamp append/prepend/disabled Option to indicate whether the file needs to be saved with timestamp. default: disabled
Username Username of config archive server.

Note

Nonce and passphrase must be specified as a pair.

Scp

Use the scp command to securely transfer files from one location to another (scp ). The source/destination can be local or a remote dirctory path.

Command:

scp root@192.168.100.3:/usr/share/doc1 ~/.

Set

Use the set command to set the system date and time.

Options

Context Description
date System date. Format: yyyy-mm-dd
time System clock time. Format: hh:mm:ss

Command:

FlexSwitch#set datetime date 2017-08-30 time 10:21:00

Response:

Applying action:
id: 1   object: SetDateTime   status: APPLIED CONFIG  valid: True delete: False num user cmds: 2
 command                         attr    value         model attr    iskey    required    userprov    time provisioned         
-------------------------------------------------------------------------------------------------------------------------------
 set datetime date 2017-08-30    date    2017-08-30    Date          True     X           X           Wed Aug 30 17:21:46 2017 
 time 10:21:00                                                                                                                 
 set datetime date 2017-08-30    time    10:21:00      Time          True     X           X           Wed Aug 30 17:21:46 2017 
 time 10:21:00                                                                                                                 

sdk:executeSetDateTime(2017-08-30,10:21:00,) result: SUCCESS: http status code: 200

Shell

Use the shell command to exit the CLI and enter the bash shell.

Command:

FlexSwitch#shell

Response:

bash-4.3# ^C

Showunapplied

Use the showunapplied command to show what configuration items have not been applied. Use this feature to check your configuration settings before they are applied. See also, Clearunapplied.

Command:

FlexSwitch(config)#showunapplied 

Response:

Pending Config
NOTE: If attribute is not user provisioned default values shown, when config is applied a
read before write action will occur to fill in values of attributes not set by user.

id: 1   object: Vlan   status: PENDING CONFIG  valid: True delete: False num user cmds: 4
 command                     attr           value           model attr     iskey    required    userprov    time provisioned         
-------------------------------------------------------------------------------------------------------------------------------------
 vlan 100                    vlan           100             VlanId         True     X           X           Tue Aug 29 21:25:12 2017 
 AdminState UP               AdminState     UP              AdminState     False                X           Tue Aug 29 21:25:21 2017 
 AutoState UP                AutoState      UP              AutoState      False                X           Tue Aug 29 21:25:25 2017 
 Description Example VLAN    Description    Example VLAN    Description    False                X           Tue Aug 29 21:25:35 2017 

Stty

Where