Enable Level Commands

This page describes the commands available at the enable prompt level of the FlexSwitch CLI. These commands are available only at the enable level.

Clear

Use the clear command to reset various counters in FlexSwtich.

The clear command has four options:

  • counters
  • ip
  • ipv6
  • mac_address_table

Clear Counters

Use the clear counters command to clear interface and queue counters.

Available Commands

Command Purpose
clear counters interface fpPort <PortID> Clear counters on given interface default: All
clear counters queue interface fpPort <PortID> Clear counters on given interface default: All
clear counters queue interface fpPort <PortID> CosqId <value> Clear counters for the specified CosqId.

Examples

Clear Interface Counters

Use the clear counters interface fpPort <num> command to clear interface counters as shown in the following example.

Command:

localhost#clear counters interface fpPort 1

Resonse:

Applying action:
id: 1   object: AsicdClearCounters   status: APPLIED CONFIG  valid: True delete: False num user cmds: 1
 command                     attr      value    model attr    iskey    required    userprov    time provisioned         
------------------------------------------------------------------------------------------------------------------------
 clear counters interface    fpPort    1        IntfRef       True     X           X           Tue Aug 15 16:53:29 2017 
 fpPort 1                                                                                                               

sdk:executeAsicdClearCounters(,IntfRef=fpPort1,Type=Port) result: SUCCESS: http status code: 200
Clear Queue Counters

Use the clear queue option to interface queue counters. You can clear them by individual eth ID, clear all, or clear by CosqId. The following is an example of clearing the fpPort 1 interface queue counter by ID.

localhost#clear counters queue interface fpPort 1
Applying action:
id: 1   object: AsicdClearQueueCounters   status: APPLIED CONFIG  valid: True delete: False num user cmds: 1
 command                           attr      value    model attr    iskey    required    userprov    time provisioned         
------------------------------------------------------------------------------------------------------------------------------
 clear counters queue interface    fpPort    1        IntfRef       True     X           X           Tue Aug 15 16:57:13 2017 
 fpPort 1                                                                                                                     

sdk:executeAsicdClearQueueCounters(,IntfRef=fpPort1,CosqId=All) result: SUCCESS: http status code: 200

Clear IP

Available Commands

Command Purpose
clear ip arp <IP Address> Clears the arp entries related to the host IP address specified.
clear ip bgp neighbor <IP Address> Resets the bgp session with the specified BGP neighbor.
clear ip bgp neighbor interface fpPort <PortID> Resets the session and resends the routes to the peer.

Clear ARP Entries

FlexSwitch#clear ip arp 10.10.10.1
Applying action:
id: 1   object: ArpDeleteByIPv4Addr   status: APPLIED CONFIG  valid: True delete: False num user cmds: 1
 command                    attr    value         model attr    iskey    required    userprov    time provisioned         
--------------------------------------------------------------------------------------------------------------------------
 clear ip arp 10.10.10.1    arp     10.10.10.1    IpAddr        True     X           X           Thu Aug 31 09:40:32 2017 

sdk:executeArpDeleteByIPv4Addr(10.10.10.1,) result: SUCCESS: http status code: 200

Clear BGP Neighbor Counters

Use the clear ip command to reset the counters as shown in the example below.

Command:

FlexSwitch#clear ip bgp neighbor 192.168.1.1

Response:

Applying action:
id: 1   object: ResetBGPv4NeighborByIPAddr   status: APPLIED CONFIG  valid: True delete: False num user cmds: 1
 command                  attr        value          model attr    iskey    required    userprov    time provisioned         
-----------------------------------------------------------------------------------------------------------------------------
 clear ip bgp neighbor    neighbor    192.168.1.1    IPAddr        True     X           X           Thu Aug 31 16:50:48 2017 
 192.168.1.1                                                                                                                 

sdk:executeResetBGPv4NeighborByIPAddr(192.168.1.1,) result: SUCCESS: http status code: 200

Command:

localhost#clear ip bgp neighbor interface pfPort 1

Response:

Applying action:
id: 7   object: ResetBGPv4NeighborByInterface   status: APPLIED CONFIG  valid: True delete: False num user cmds: 1
 command                  attr    value    model attr    iskey    required    userprov    time provisioned         
-------------------------------------------------------------------------------------------------------------------
 clear ip bgp neighbor    fpPort     1       IntfRef       True     X           X           Wed May  3 22:17:31 2017 
 interface eth 25                                                                                                  

sdk:executeResetBGPv4NeighborByInterface(fpPort1,) result: SUCCESS: http status code: 200

Clear Counters

Available Commands

Command Purpose
clear counters interface fpPort <PortID> Clear counters on given interface default: All
clear counters queue interface fpPort <PortID> Clear counters on given interface default: All
clear counters queue interface fpPort <PortID> CosqId <value> Clear counters for the specified CosqId.

Clear Interface Counters

Command:

FlexSwitch#clear counters interface fpPort 1

Response:

Applying action:
id: 1   object: AsicdClearCounters   status: APPLIED CONFIG  valid: True delete: False num user cmds: 1
 command                     attr      value    model attr    iskey    required    userprov    time provisioned         
------------------------------------------------------------------------------------------------------------------------
 clear counters interface    fpPort    1        IntfRef       True     X           X           Thu Aug 31 17:33:12 2017 
 fpPort 1                                                                                                               

sdk:executeAsicdClearCounters(,IntfRef=fpPort1,Type=Port) result: SUCCESS: http status code: 200

Clear Queue Counters

Command:

FlexSwitch#clear counters queue interface fpPort 1

Response:

Applying action:
id: 1   object: AsicdClearQueueCounters   status: APPLIED CONFIG  valid: True delete: False num user cmds: 1
 command                           attr      value    model attr    iskey    required    userprov    time provisioned         
------------------------------------------------------------------------------------------------------------------------------
 clear counters queue interface    fpPort    1        IntfRef       True     X           X           Thu Aug 31 17:45:53 2017 
 fpPort 1                                                                                                                     

sdk:executeAsicdClearQueueCounters(,IntfRef=fpPort1,CosqId=All) result: SUCCESS: http status code: 200

Command:

FlexSwitch#clear counters queue interface fpPort 1 CosqId 1

Response:

Applying action:
id: 1   object: AsicdClearQueueCounters   status: APPLIED CONFIG  valid: True delete: False num user cmds: 2
 command                           attr      value    model attr    iskey    required    userprov    time provisioned         
------------------------------------------------------------------------------------------------------------------------------
 clear counters queue interface    fpPort    1        IntfRef       True     X           X           Thu Aug 31 17:47:58 2017 
 fpPort 1 CosqId 1                                                                                                            
 clear counters queue interface    CosqId    1        CosqId        True     X           X           Thu Aug 31 17:47:58 2017 
 fpPort 1 CosqId 1                                                                                                            

sdk:executeAsicdClearQueueCounters(,IntfRef=fpPort1,CosqId=1) result: SUCCESS: http status code: 200

Clear IPv6

Available Commands

Command Purpose
clear ipv6 bgp neighbor <IPv6 Address> Resets the bgp session with the specified BGP neighbor.
clear ipv6 bgp neighbor interface fpPort <PortID> Resets the session and resends the routes to the peer.

Clear Mac_address_table

Available Commands

Command Purpose
clear mac_address_table dynamic mac_address <MAC Address> Flush specific Mac Address from MAC Table Entry default: All
clear mac_address_table dynamic vlan <VlanID> Flush Mac Table Entry for given Vlan default: All
clear mac_address_table dynamic fpPort <PortId> Flush Mac Table Entry for given Port default: All

Command:


Response:


Command:


Response:


Command:


Response:


Config

Use the config command to enter the CLI configuration mode. You must first be in the privileged (enable) mode

906270e8396b#config

*** Configuration will only be applied once 'apply' command is entered ***

Reset

Use the reset command to reset FlexSwitch back to a factory default state.

Save

Use the save command to save the current running configuration of FlexSwitch in a specified filename on a specified path.

Default:
If no path or filename is specified then the configuration is saved as:

    \opt\flexswitch\startup-config

For more details on how to use the Save command see the Working with Configuration Archives page.

Show

Use the show command to view object states.

906270e8396b(config)#show vlan
Applying Show:

 VLAN    Name       Status    Ports 
------------------------------------
 100     vlan100    DOWN      ,     
sdk:printCombinedVlanStates() result: SUCCESS