Example of filtering output information
Example of using the begin keyword
1.
# Display the configuration from the line containing "user-interface" to the last line in the current
configuration (the output information depends on the current configuration).
<Sysname> display current-configuration | begin user-interface
user-interface aux 0
user-interface vty 0 15
authentication-mode none
user privilege level 3
#
return
Example of using the exclude keyword
2.
# Display the non-direct routes in the routing table (the output depends on the current configuration).
<Sysname> display ip routing-table | exclude Direct
Routing Tables: Public
Destination/Mask
10.1.1.0/24
Example of using the include keyword
3.
# Display the route entries that contain Vlan in the routing table (the output depends on the current
configuration).
<Sysname> display ip routing-table | include Vlan
Routing Tables: Public
Destination/Mask
192.168.1.0/24
Configuring user privilege and command levels
To avoid unauthorized access, the switch defines user privilege levels and command levels. User privilege
levels correspond to command levels. When a user at a specific privilege level logs in, the user can only use
commands at that level, or lower levels.
All commands are categorized into four levels: visit, monitor, system, and manage, and are identified from
low to high, respectively by 0 through 3.
Table 2 Default command levels
Level
0
Proto
Pre
Cost
OSPF
10
2
Proto
Pre
Cost
Direct 0
0
Privilege
Description
Involves commands for network diagnosis and accessing an external device.
Configuration of commands at this level cannot survive a device restart. Upon
Visit
device restart, the commands at this level are restored to the default settings.
Commands at this level include ping, tracert, telnet and ssh2.
NextHop
10.1.1.2
NextHop
192.168.1.42
Table 2
describes the command levels.
14
Interface
Vlan2
Interface
Vlan999