I deliberately sorted out all the commonly used Huawei switch commands during my actual combat, and recited them to new colleagues. I am updating...
System common viewing commands | |||
View device temperature | say tea to | View device alarm information | say to ur |
View cpu status | dis cpu | View memory usage | dis me |
view current configuration | dis with | View port list configuration | dis in br |
View routing table information | dis ip ro |
View VLAN information |
dis vl |
Check mac through network port |
dis mac-a g0/0/8 |
Check the network port through mac |
dis mac-a AABB -BBCC-CCDD |
Check the mac of a certain network segment |
dis arp | in 192.168.6. |
View tree protocol ports |
dis st br |
View IP conflicts | dis arp ip-conf track | ||
Clear configuration YNY |
reset saved-configuration |
Huawei common default passwords |
|
System common setting commands |
|||
enable dhcpsnooping | dh sn en |
Configure trusted ports |
dh sn tr |
Enable Spanning Tree Protocol |
st mo st |
The core of the election is the root bridge |
st ro pr |
enable spanning tree protocol |
st and |
port edge |
st ed in |
Enable BPDU protection |
st bp |
||
Bind IP address and MAC |
ar st 192.168.0.0 mac |
unbind |
one would be 192.168.0.0 |
Disable MAC access |
mac-a bl mac vl 6 |
View the MAC in the black hole |
dis mac-a bl |
clear port configuration |
cl co in g0/0/1 |
clear configuration in port |
cl co th |
Turn off/on POE |
un poe en / poe en |
open close port |
un shut /shut |
Create eth-trunk interface |
int and 1 |
Interface conversion Layer 3 interface |
undo portswitch |
Port joins eth-trunk |
trunkpo g0/0/1 |
Remark information for the port |
de Chenxu |
ACL rules |
|||
set password configure remote |
Set CONSOLE permission |
|||
open telnet | such is in |
Enter CON settings |
us con 0 |
|
Telnet with 5 users |
us vt 0 4 |
Set to no password mode |
one to |
|
authentication mode |
I aaaah |
Configure password mode |
I'm still |
|
user level |
us pr le 15 |
set password |
admin@123 |
|
pr in tel |
||||
quit | quit | |||
Enter aaa configuration mode |
aaa |
|||
set admin password |
lo admin pa and admin@123 |
|||
Set login permissions |
admin before 3pm |
|||
Set login type |
local-user admin se tel ter http |
|||
Address Pool Settings | ||||
New VL | in vl 66 |
New VL | int vl * |
|
set address | ip ad 192.168.66.254 24 |
set address | ip ad 192.168.*.254 24 |
|
global pool | dh set gl |
local gateway | dh se int |
|
quit | quit | Set the lease period |
dh se le day 3 |
|
Create an IP pool |
ip po vl66 |
set DNS |
dh se dns 114.114.114.114 223.5.5.5 |
|
Set gateway address |
ga 192.168.66.254 |
|||
Set the assignable address network segment |
ne 192.168.66.0 mask 24 |
|||
Set exclusion address segment |
ex192.168.1.10 192.168.1.20 |
|||
Set the lease period |
le day 2 |
|||
set DNS |
dns 114.114.114.114 223.5.5.5 |
Actual core configuration | |||
Configuration instructions | VL 2-18为业务VL V19为管理VL | ||
1 | 开启DHCP |
dh en |
开启DHCP |
2 | 选举核心为根桥 |
st ro pri |
设置根协议 |
3 | 开始新建 vlan |
vl ba 3 to 19 |
|
4 | 建立配置vlan |
int vl 3 |
进入已配置的VLAN |
5 | ip ad 192.168.3.254 24 |
设置VLAN IP |
|
6 | dh se int |
设置VLAN IP 为网关 |
|
7 | 保留部分IP | ex192.168.3.10 192.168.3.20 | |
8 | 租期 |
dh se le day 3 |
设置DHCP租期 |
9 | 设置DNS |
dh se dns 114.114.114.114 8.8.8.8 |
设置DHCP的DNS |
10 | 设置交换机管理vlan |
in vl 200 |
数值最好大一些 |
10 | ip ad 192.168.200.254 24 |
管理VLAN的IP |
|
11 | 配置交换机连防火墙 |
ip ro 0.0.0.0 0.0.0.0 192.168.200.253 |
192.168.200.253防火墙IP |
12 | 配接防火墙的交换机网口 |
in x0/0/1 |
|
13 | po li ac |
||
14 | po de vl 200 |
连接管理VLAN |
|
15 | |||
汇聚设置 |
|||
1 | 加端口需要配置vlan |
vl ba * * * |
|
2 | 设置核心下来的进口 |
in x0/0/1 |
|
3 | po li tr |
||
4 | po tr al vl 2 to 4094 |
||
5 | 端口建立组,批量加入成员,配置组的信息 |
po AP |
|
6 | Gr G0/0/1 to G0/0/10 |
||
7 | po li tr |
||
8 | po tr pv vl 19 |
设置无线的管理VL | |
9 | po tr al vl 2 to 4094 |
||
10 | 配置电脑等其他端口 |
in g0/0/11 |
|
11 | po li ac |
||
12 | po de vl 4 |
||
13 | 设置管理VLAN |
in vl 200 |
|
14 | 设置本机管理地址 |
ip ad 192.168.10.254 24 |
设置本机地址 |
15 | 设置静态路由 |
ip ro 0.0.0.0 0.0.0.0 192.168.19.254 |
|