1. 华为网络设备基础配置入门
作为一名网络工程师,第一次接触华为设备时往往会被其丰富的功能和复杂的命令行界面所震撼。与思科设备不同,华为网络设备采用VRP(Versatile Routing Platform)操作系统,这套系统经过20多年的迭代已经形成了自己独特的配置逻辑。
1.1 初始连接与基础配置
拿到一台全新的华为交换机或路由器时,首先需要通过Console口进行初始连接。这里有个小技巧:使用SecureCRT或Putty等终端工具时,建议将波特率设置为9600,数据位8,停止位1,无校验位。连接后按Enter键如果没反应,很可能是流控设置问题,需要在终端软件中关闭RTS/CTS选项。
登录后首次配置建议按以下顺序进行:
code复制system-view # 进入系统视图
sysname SW1 # 设置设备名称
interface vty 0 4 # 配置远程登录
user privilege level 3
authentication-mode aaa
quit
aaa # 配置认证
local-user admin password cipher Huawei@123
local-user admin privilege level 15
local-user admin service-type ssh telnet
quit
stelnet server enable # 开启SSH服务
ssh user admin authentication-type password
ssh user admin service-type stelnet
注意:华为设备默认密码策略要求复杂度,建议使用包含大小写字母、数字和特殊字符的组合。我曾遇到过因为密码太简单导致配置无法保存的情况。
1.2 接口基础配置
华为设备的接口配置有其独特之处。以最常见的S5735系列交换机为例,配置接入端口的基本步骤:
code复制interface GigabitEthernet0/0/1
description TO-PC1 # 建议为每个接口添加描述
port link-type access # 设置端口模式
port default vlan 10 # 分配VLAN
undo negot
