首次配华为交换机,其实比装路由器还简单!

01

准备工作:你需要什么?

首次配华为交换机,其实比装路由器还简单!

 终端软件推荐

  • Windows:PuTTY、Xshell、SecureCRT
  • macOS/Linux:系统自带 screen 或 minicom

02

第一步:通过 Console 连接交换机

1.1 接线

  • 将 Console 线 RJ45 端插入交换机 Console 口
  • USB 端插入电脑

1.2 打开终端软件(以 PuTTY 为例)

  • Connection type: Serial
  • Serial line: COMx(Windows 设备管理器查看)
  • Speed (baud): 9600
  • Data bits: 8
  • Stop bits: 1
  • Parity: None
  • Flow control: None

 注意

首次上电,直接回车即可进入命令行,无默认用户名密码(部分新型号需按回车唤醒)

 

03

第二步:基础配置

提示:以下命令在 用户视图 下执行,输入 system-view 进入系统视图

# 进入系统视图
<Huawei> system-view

# 1. 改主机名(可选但推荐)
[Huawei] sysname SW-Core-01

# 2. 配置管理VLAN和IP(用于Web/SSH访问)
[SW-Core-01] vlan 100
[SW-Core-01-vlan100] quit
[SW-Core-01] interface vlanif 100
[SW-Core-01-Vlanif100] ip address 192.168.100.10 255.255.255.0
[SW-Core-01-Vlanif100] quit

# 3. 将物理端口划入管理VLAN(例如GE0/0/1接管理网)
[SW-Core-01] interface gigabitethernet 0/0/1
[SW-Core-01-GigabitEthernet0/0/1] port link-type access
[SW-Core-01-GigabitEthernet0/0/1] port default vlan 100
[SW-Core-01-GigabitEthernet0/0/1] quit

# 4. 创建Web登录用户
[SW-Core-01] aaa
[SW-Core-01-aaa]&nbsp;local-user admin password irreversible-cipher Admin@2025
[SW-Core-01-aaa]&nbsp;local-user admin service-type http https ssh terminal
[SW-Core-01-aaa]&nbsp;local-user admin level 15
[SW-Core-01-aaa] quit

# 5. 启用HTTP/HTTPS服务(Web管理)
[SW-Core-01] http server&nbsp;enable
[SW-Core-01] https server&nbsp;enable&nbsp; &nbsp;# 推荐开启HTTPS

# 6. (可选)保存配置!
[SW-Core-01] save
Are you sure to save? [Y/N] y

&nbsp;说明

  • 管理 VLAN 建议独立(如 VLAN 100),不要用 VLAN 1
  • irreversible-cipher&nbsp;表示密码加密存储(安全)
  • level 15&nbsp;为最高权限(相当于 root)

04

第三步:通过 Web 登录管理

5.1 电脑配置同网段IP

  • 电脑 IP:192.168.100.100
  • 子网掩码:255.255.255.0
  • 网关:留空或设为&nbsp;192.168.100.10

5.2 浏览器访问

打开 Chrome / Edge,输入:

https://192.168.100.10

 首次访问可能提示证书风险,点击“高级” → “继续前往”

5.3 登录

  • 用户名:admin
  • 密码:Admin@2025(你刚才设置的)

 成功进入 Web 网管界面(SmartAX / eSight Lite 界面)

 

05

常见问题速查

首次配华为交换机,其实比装路由器还简单!

06

结语

华为交换机首次配置,核心不是背命令,而是理解“管理通道如何建立”

Console 是钥匙,IP 是地址,用户是门禁,Web 是操作台。

四者齐备,千里之外也能掌控设备。所有复杂的网络,都始于一次正确的开局配置。

上一篇 【转载】HCIE R&S 备考笔记 Qos拥塞管理原理
下一篇 vcsa或photon-machine无root密码 vcenter无法打开 问题记录