


新交换机上架必做的7步神操作!

<Huawei> system-view[Huawei] sysname Core-SW-01 # 改名是尊严!
[Core-SW-01] user-interface console 0authentication-mode password # 强制控制台密码setauthentication password cipher [email protected][Core-SW-01] telnet serverdisable# 关闭死亡Telnet![Core-SW-01] stelnet serverenable# 开启SSH
[Core-SW-01] vlan batch 10 20 # 创建管理VLAN[Core-SW-01] interface vlanif 10ip address 192.168.100.1 24[Core-SW-01] interface gigabitethernet 0/0/24port link-type accessport default vlan 10 # 管理口
[Core-SW-01] ssh user admin authentication-type password[Core-SW-01] ssh user admin service-type stelnet[Core-SW-01] aaalocal-user admin password irreversible-cipher [email protected]local-user admin privilege level 15local-user admin service-type ssh
[Core-SW-01] undo http serverenable# 关HTTP[Core-SW-01] undo snmp-agent # 未用SNMP时必关![Core-SW-01] dhcpenable # 按需开启DHCP
[Core-SW-01]return<Core-SW-01> save /y # /y避免确认打断
<Core-SW-01> ftp 192.168.100.100Username: backupPassword:ftp> put flash:/vrpcfg.zip /backup/Core-SW-01_20240715.cfg
✅ 开局自检清单:
主机名 ✔️
管理IP ✔️
SSH开启 ✔️
默认密码修改 ✔️
危险服务关闭 ✔️
配置保存 ✔️


堆叠核心价值
单机风险—任意单点故障
堆叠—控制面二合一—毫秒级切换、简化管理
物理连接规范
SW1-1口–SW-2口
SW1-2口–SW-1口
⚠️ 致命细节:
堆叠线必须交叉连接(1的端口1 → 2的端口2)
堆叠卡类型必须相同(如华为ES0D0G48VA00)
优先使用专用堆叠模块,性能远高于电口
配置流程(以两台堆叠为例)
# 交换机1上执行[SW1] stack slot 0 renumber 1 # 指定自身为成员1# 交换机2上执行[SW2] stack slot 0 renumber 2 # 指定自身为成员2
# 两台设备相同操作[SW] interface stack-port 0/1 # 创建逻辑堆叠口[SW-stack-port0/1] port interface gigabitethernet 0/0/49enable[SW-stack-port0/1] port interface gigabitethernet 0/0/50enable
# 在希望成为主设备的交换机上[SW1] stack slot 1 priority 200 # 值越大越优先(默认100)
<SW1> save<SW1> reboot # 两台设备需在5分钟内先后重启
# 查看堆叠状态display stackSlot 1: Master # 主设备标识Slot 2: Standby # 备用设备# 检查物理连接display stack portPortName Status TypeStack1 Up FullStack2 Up Full# 验证配置同步display configuration sync-checkSlot 1: ConsistentSlot 2: Consistent


[SW] interface vlanif 100ip address 192.168.100.254 24[SW] mad detect mode relay # 启用MAD检测
# 跨设备链路聚合interface eth-trunk 10mode lacptrunkport gigabitethernet 1/0/1 to 1/0/2 # 成员1的端口trunkport gigabitethernet 2/0/1 to 2/0/2 # 成员2的端口
<SW> backup startup-configuration to 192.168.100.100<SW> stack upgrade mode smooth # 不中断业务升级<SW> startup system-software new_version.cc



配置要点:
主备堆叠组间跑OSPF/BGP
接入层使用M-LAG技术
防火墙部署双机热备


堆叠失败常见原因






发表回复