命令1:重命名
<Huawei>system-view //进入系统视图
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname sw1 //设备重新命名
[sw1]
命令2:显示设备配置信息
[sw1]display current-configuration //显示设备配置信息
sysname sw1
cluster enable ntdp enable ndp enable
drop illegal-mac alarm
diffserv domain default
drop-profile default
aaa authentication-scheme default authorization-scheme default accounting-scheme default domain default domain default_admin local-user admin password simple admin local-user admin service-type http
interface Vlanif1
interface MEth0/0/1
interface Ethernet0/0/1
interface Ethernet0/0/2
interface Ethernet0/0/3
interface Ethernet0/0/4
interface Ethernet0/0/5
interface Ethernet0/0/6
interface Ethernet0/0/7
interface Ethernet0/0/8
interface Ethernet0/0/9
interface Ethernet0/0/10
interface Ethernet0/0/11
interface Ethernet0/0/12
interface Ethernet0/0/13
interface Ethernet0/0/14
interface Ethernet0/0/15
interface Ethernet0/0/16
interface Ethernet0/0/17
interface Ethernet0/0/18
interface Ethernet0/0/19
interface Ethernet0/0/20
interface Ethernet0/0/21
interface Ethernet0/0/22
interface GigabitEthernet0/0/1
interface GigabitEthernet0/0/2
interface NULL0
user-interface con 0 user-interface vty 0 4
return
命令3:console明文密钥
[sw1]user-interface console 0 //进入console视图
[sw1-ui-console0]authentication
[sw1-ui-console0]authentication-mode pass
[sw1-ui-console0]authentication-mode password //登录console口选用password方式
Mar 5 2023 16:26:15-08:00 sw1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25
.191.3.1 configurations have been changed. The current change number is 6, the c
hange loop count is 0, and the maximum number of records is 4095.u
[sw1-ui-console0]set authentication password simple huawei //设置明文password
[sw1-ui-console0]
命令4:console密文密钥
[sw1]user-interface conso
[sw1]user-interface console 0
[sw1-ui-console0]au
[sw1-ui-console0]authenti
[sw1-ui-console0]authentication-mode pass
[sw1-ui-console0]authentication-mode password
[sw1-ui-console0]se
[sw1-ui-console0]set aut
[sw1-ui-console0]set authentication pass
[sw1-ui-console0]set authentication password c
[sw1-ui-console0]set authentication password cipher huawei
注意:当明文与密文同时配置时,后配置的生效,先配置的丢失
命令5:查看mac地址表
[sw1]display mac-address
MAC address table of slot 0:
-------------------------------------------------------------------------------
MAC Address VLAN/ PEVLAN CEVLAN Port Type LSP/LSR-ID
VSI/SI MAC-Tunnel
-------------------------------------------------------------------------------
5489-9804-79dd 1 - - Eth0/0/1 dynamic 0/-
5489-98e8-73e9 1 - - Eth0/0/2 dynamic 0/-
-------------------------------------------------------------------------------
Total matching items on slot 0 displayed = 2
命令6:查看历史命令
[sw1]display history-command
system-view
user-interface console 0
authentication-mode password
set authentication password cipher ******
q
display current-configuration
display mac-address
[sw1]