1.系统:VRP
2.连接方式:
a.Console b.telnet 3.web
一、内存
ROM:只读存储器,存放启动程序。
FLASH:存放操作系统。
RAM:随机存储器,可读可写,存放运行过程当中需要的数据。
NVRAM:非意式性随机存储器。
二、配置文件
运行配置文件:current-configuration
启动配置:saved-configuration
三、角色关系
四、基本命令
a.交换机命令不需要输入完整,按下Tab键交换机可以自动补全命令
b.对于不清楚的命令,在命令后敲?可以查看命令功能
c.关闭日志:[Quidway]undo info-center enable
设备上产生的Log、Trap和Debug信息都不再记录,包括执行undo info-center enable命令产生的日志信息也不记录
开启日志:[Quidway]info-center enable
查看系统运行配置
<Huawei>display current-configuration
#
sysname Huawei
#
cluster enable
ntdp enable
ndp enable
#
保存配置
<Huawei>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name ( *.cfg, *.zip ) [vrpcfg.zip]:
Mar 4 2022 08:39:51-08:00 Huawei %%01CFM/4/SAVE(l)[0]:The user chose Y when dec
iding whether to save the configuration to the device.
Now saving the current configuration to the slot 0.
Save the configuration successfully.
<Huawei>
进入系统视图
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]
设备命名为R1
[Huawei]sysname R1
[R1]
进入端口视图(以GigabitEthernet 0/0/1为例)
[R1]interface g
[R1]interface GigabitEthernet 0/0/1
[R1-GigabitEthernet0/0/1]
启用telnet并配置vty线路登录验证方式
[Huawei]telnet server enable \\使能telnet服务功能
Info: The Telnet server has been enabled.
[Huawei]user-interface vty 0 4 \\开启vty线路模式,0-15,最多16
[Huawei-ui-vty0-4]protocol inbound telnet \\配置vty支持telnet协议
[Huawei-ui-vty0-4]authentication-mode aaa \\设置认证模式为aaa认证 aaa||password||none
[Huawei-ui-vty0-4]quit
[Huawei]aaa \\进入aaa视图
[Huawei-aaa]local-user user1 password cipher 123456 \\配置用户名和密码
[Huawei-aaa]local-user user1 privilege level 3 \\配置用户权限为3
[Huawei-aaa]return
<Huawei>save
配置console验证方式
[Huawei]user-interface console 0
[Huawei-ui-console0]authentication-mode password \\aaa||password||none
[Huawei-ui-console0]set authentication password cipher 123456
配置端口隔离、二层数据隔离,三层数据互通
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]port-isolate mode ?
all All
l2 L2 only
[Huawei]port-isolate mode l2 \\配置全局端口隔离模式为二层隔离
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]port-isolate enable group 1
\\使能端口隔离功能,并将端口加入隔离组 group1
vlan配置
[Huawei]vlan 2 \\创建vlan2
[Huawei-vlan2]quit
[Huawei]undo vlan 2 \\删除vlan2
[Huawei]vlan batch 2 to 10 \\批量创建vlan2到vlan10
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access \\配置端口为access模式
[Huawei]interface GigabitEthernet 0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type trunk \\配置端口为trunk模式
[Huawei-GigabitEthernet0/0/2]port trunk allow-pass vlan 2 to 8 \\配置端口允许通过vlan的id
[Huawei-GigabitEthernet0/0/2]quit
[Huawei]interface GigabitEthernet 0/0/3
[Huawei-GigabitEthernet0/0/3]port hybrid tagged vlan 9 \\tagged||untagged
[Huawei-GigabitEthernet0/0/3]quit
[Huawei]interface vlan 10
[Huawei-Vlanif10]ip address 192.168.1.1 255.255.255.0 \\配置管理ip地址和子网掩码
[Huawei-Vlanif10]quit
GVRP配置
<Huawei>system-view
[Huawei]vlan batch 2 to 3
[Huawei]gvrp
[Huawei]interface GigabitEthernet 0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type trunk
[Huawei-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[Huawei-GigabitEthernet0/0/1]gvrp
[Huawei-GigabitEthernet0/0/1]gvrp registration normal
[Huawei-GigabitEthernet0/0/1]quit