Config Level Commands

This page describes the commands available at the config prompt level of the FlexSwitch CLI.

Apply

Configured objects (vlans, interfaces, spanning trees, etc.) do not take effect until you execute the apply command.

805a3f93ff84(config)#apply
Applying Config:
id: 65    object: Vlan   status: APPLIED CONFIG  valid: True delete: False num user cmds: 2
 command                          attr           value                model attr     iskey    required    userprov    time provisioned         
-----------------------------------------------------------------------------------------------------------------------------------------------
 vlan 250                         vlan           250                  VlanId         True     X           X           Tue May  2 22:52:28 2017 
 Description just another vlan    Description    just another vlan    Description    False                X           Tue May  2 22:52:44 2017 

sdk:createVlan(250,None,None,AdminState=UP,Description=just another vlan,AutoState=UP) result: SUCCESS: http status code: 201

Showunapplied

Use this command to display the objects you have configured but not yet applied to the system. Showunapplied affords you the oportunity to review your configurations before you apply them.

805a3f93ff84(config)#showunapplied 
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: 32    object: CosQ   status: PENDING CONFIG  valid: True delete: False num user cmds: 2
 command            attr     value    model attr    iskey    required    userprov    time provisioned         
--------------------------------------------------------------------------------------------------------------
 interface eth 0    eth      0        IntfRef       True     X           X           Tue May  2 23:49:04 2017 
 queue 0            queue    0        CosqId        True     X           X           Tue May  2 23:49:04 2017 

id: 65    object: Vlan   status: PENDING CONFIG  valid: True delete: False num user cmds: 2
 command                          attr           value                model attr     iskey    required    userprov    time provisioned         
-----------------------------------------------------------------------------------------------------------------------------------------------
 vlan 250                         vlan           250                  VlanId         True     X           X           Tue May  2 22:52:28 2017 
 Description just another vlan    Description    just another vlan    Description    False                X           Tue May  2 22:52:44 2017

Clearunapplied

Use this command to clear a specific unapplied configuration or all of them. The following example shows two unapplied VLANS (VLAN 101 and VLAN 102) when the showunapplied command is executed.

805a3f93ff84(config-vlan)#showunapplied 
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: 32    object: Vlan   status: PENDING CONFIG  valid: True delete: False num user cmds: 2
 command                 attr           value       model attr     iskey    required    userprov    time provisioned         
-----------------------------------------------------------------------------------------------------------------------------
 vlan 101                vlan           101         VlanId         True     X           X           Wed May  3 17:13:20 2017 
 Description VLAN 101    Description    VLAN 101    Description    False                X           Wed May  3 17:14:09 2017 

id: 65    object: Vlan   status: PENDING CONFIG  valid: True delete: False num user cmds: 2
 command                 attr           value       model attr     iskey    required    userprov    time provisioned         
-----------------------------------------------------------------------------------------------------------------------------
 vlan 102                vlan           102         VlanId         True     X           X           Wed May  3 17:15:09 2017 
 Description VLAN 102    Description    VLAN 102    Description    False                X           Wed May  3 17:15:18 2017

To remove VLAN 102, which has an id of 65, execute the clearunapplied command with an argument of 65 as shown below.

805a3f93ff84(config-vlan)#clearunapplied 65
Clearing Pending Config
805a3f93ff84(config)#showunapplied 
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: 32    object: Vlan   status: PENDING CONFIG  valid: True delete: False num user cmds: 2
 command                 attr           value       model attr     iskey    required    userprov    time provisioned         
-----------------------------------------------------------------------------------------------------------------------------
 vlan 101                vlan           101         VlanId         True     X           X           Wed May  3 17:13:20 2017 
 Description VLAN 101    Description    VLAN 101    Description    False                X           Wed May  3 17:14:09 2017

Show

Use this command to show the running configuration of your system. To see the current running (applied) configuration, execute the show command with the run argument.

05a3f93ff84(config)#show run
printing without defaults
!
interface eth 25
!
router bgp 500
   router_id 10.1.10.2
   neighbor ip 40.1.1.2
     timers_keep_alive 60
     peer_as 500
     timers_hold_time 180
     connect_retry_time 60
!
vlan 100
   Description This is my VLAN
!
vlan 200
   Description untagged_vlan_200

You can also use it to show the configuration of other objects, such as VLANs, as shown in the following example.

805a3f93ff84(config)#show vlan
Applying Show:

 VLAN    Name       Status    Ports 
------------------------------------
 100     vlan100    UP        ,eth0 
 200     vlan200    DOWN      ,     
 250     vlan250    DOWN      ,     
sdk:printCombinedVlanStates() result: SUCCESS

Exit

Executing the exit command moves you up one level in command tree. For example, if you are configuring an aclIPv4filter and are at the config-aclIPv4filter and want to move back to the config prompt, execute the exit command.

805a3f93ff84(config-aclIPv4Filter)#exit
805a3f93ff84(config)#?

End

The end command returns you to the enable mode.

805a3f93ff84(config)#end
805a3f93ff84#

No

Note

The object specified in the argument to the no command will not be deleted until the apply command is executed. You must also be in the config mode of the CLI to use no.

In the following example:

  • no is executed against vlan 200
  • the showunapplied command is used to confirm that vlan 200 is scheduled to be deleted.
  • apply is executed to permanently delete vlan 200.
805a3f93ff84(config)#no vlan 200
805a3f93ff84(config)#showunapplied
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: 65    object: Vlan   status: PENDING CONFIG  valid: True delete: True num user cmds: 1
 command        attr    value    model attr    iskey    required    userprov    time provisioned         
---------------------------------------------------------------------------------------------------------
 no vlan 200    vlan    200      VlanId        True     X           X           Wed May  3 18:59:53 2017 

805a3f93ff84(config)#apply
Applying Config:
id: 65    object: Vlan   status: APPLIED CONFIG  valid: True delete: True num user cmds: 1
 command        attr    value    model attr    iskey    required    userprov    time provisioned         
---------------------------------------------------------------------------------------------------------
 no vlan 200    vlan    200      VlanId        True     X           X           Wed May  3 18:59:53 2017 

sdk:deleteVlan(200,) result: SUCCESS:   http status code: 410