Article ID: 5542
Products
DFE
Matrix C1
Matrix E1
SecureStack C3
SecureStack C2
SecureStack B3
SecureStack B2
SecureStack A2
Related to
Command line interface
CLI management
Goals
Reverse / negate / clear / back out a CLI command
Navigate the CLI
CLI help
Cause
With the Command Line Interface based products, it is not always obvious how to back out a command which is displayed via a '
'.
This article presents some simple guidelines for CLI navigation.
Solution
On the CLI-based products; for reversal purposes in some cases one would '
' the value back to its default, in some cases one would use '
' instead of '
', and in more rare instances one would preface the command with "
". This is based on the rules established for each command set, complicated by the fact that these products have at least subtle differences from each other.
Unless you are familiar with a given product or plan to spend significant amounts of time parsing the
Configuration Guide, when navigating the CLI the "
" parameter is your friend.
As an example, assume that you are unsure how to change a port which has been hard-set for speed and duplex, and configure it back to its default auto-negotiating, 10HD state. Matrix N3 Platinum(su)->
show config port
This command shows non-default configurations only.
Use 'show config all' to show both default and non-default configurations.
begin
!
# ***** NON-DEFAULT CONFIGURATION *****
!
!
# port
set port duplex ge.1.1 full
set port negotiation ge.1.1 disable
set port speed ge.1.1 1000
!
end
Matrix N3 Platinum(su)->
clear port ?
advertise Auto-neg advertised capabilities (default: all modes
cleared)
broadcast Reset port broadcast threshold and/or clear peak rate &
time values.
discard Reset the types of frames being discarded to the factory
default setting.
inlinepower Clear inlinepower parameters.
jumbo Reset jumbo frame support on specified port(s)
lacp 8023ad Link Aggregation
mirroring Remove port mirroring configuration .
priority Priority associated.
priority-queue Priority to transmit queue mapping.
ratelimit Clear ratelimiting parameters
txq Individual transmit queue values.
vlan 802.1Q VLAN/port association.
Matrix N3 Platinum(su)->clear port
Given the lack of '
', '
', and '
' options available with the '
' command, one can infer from this that the proper approach is to use the '
' command. Matrix N3 Platinum(su)->
set port negotiation ge.1.1 ?
enable Enable auto-negotiation.
disable Disable auto-negotiation.
Matrix N3 Platinum(su)->
set port speed ge.1.1 ?
10 10 Mbps.
100 100 Mbps.
1000 1000 Mbps.
Matrix N3 Platinum(su)->
set port duplex ge.1.1 ?
full Full duplex mode.
half Half duplex mode.
Matrix N3 Platinum(su)->set port duplex ge.1.1
For our purposes here, the reversal commands would be
'
code:set port negotiation ge.1.1 enable
'
'
code:set port speed ge.1.1 10
'
'
code:set port duplex ge.1.1 half
'
A subsequent '
' (or '
') should demonstrate that the original commands are now missing, since the settings are in agreement with the system defaults.
When unsure of the default value for a command, consult the relevant Configuration Guide, which will list the
code:Factory Default Settings
.
For a discussion about clearing SNMP commands, please refer to
10308.