堆叠的概述
在此之前了解一下什么是堆叠,堆叠是指将多台交换机设备通过线缆连接后组合在一起,虚拟化成一台设备,是一种横向虚拟化技术。堆叠作为一种横向虚拟化技术,将多台设备在逻辑上虚拟成一台设备,可以简化网络的配置和管理。华三的虚拟化技术叫IRF,锐捷的虚拟化技术叫VSU,华为虚拟化技术叫iStack(盒式交换机)和CSS(框式交换机),本文以H3C的IRF为实验进行配置。
H3C堆叠的配置
H3C官方配置文档:https://www.h3c.com/cn/d_202205/1609013_30005_0.htm
实验拓扑图:
H3C IRF配置思路
- 准备两台交换机
- 通过40G接口(Forty接口)直连交换机
- 将主交换机接口编号为1备用交换机接口编号变更为2
- 通过irf配置实现两台交换机逻辑上成为一台
IRF基础配置
Switch0配置
[H3C]sysname Switch0
[Switch0]irf member 1 priority 32
[Switch0]interface FortyGigE 1/0/53
[Switch0-FortyGigE1/0/53]shutdown
[Switch0-FortyGigE1/0/53]quit
[Switch0-irf-port1/1]port group interface FortyGigE 1/0/53
[Switch0]interface FortyGigE 1/0/53
[Switch0-FortyGigE1/0/53]undo shutdown
[Switch0]write force
Validating file. Please wait...
Saved the current configuration to mainboard device successfully.
[Switch0]irf-port-configuration active
Switch1配置
# 将switch系统编号修改成2
[Switch1]irf member 1 renumber 2
Renumbering the member ID may result in configuration change or loss. Continue?[Y/N]:y
Please reboot the device for the new member ID to take effect.
[Switch1]quit
# 更改编号后保存并重启
<Switch1>reboot
Start to check configuration with next startup configuration file, please wait.........DONE!
Current configuration may be lost after the reboot, save current configuration? [Y/N]:y
Please input the file name(*.cfg)[flash:/startup.cfg]
(To leave the existing filename unchanged, press the enter key):
Validating file. Please wait...
Saved the current configuration to mainboard device successfully.
This command will reboot the device. Continue? [Y/N]:y
# 将接口加入到堆叠端口
[Switch1]interface FortyGigE 2/0/53
[Switch1-FortyGigE2/0/53]shutdown
[Switch1-FortyGigE2/0/53]quit
[Switch1]irf-port 2/1
[Switch1-irf-port2/1]irf-port 2/2
[Switch1-irf-port2/2]port group interface FortyGigE 2/0/53
You must perform the following tasks for a successful IRF setup:
Save the configuration after completing IRF configuration.
Execute the "irf-port-configuration active" command to activate the IRF ports.
[Switch1-irf-port2/2]quit
[Switch1]interface FortyGigE 2/0/53
[Switch1-FortyGigE2/0/53]undo shutdown
#!!!一定要先执行保存
[Switch1-FortyGigE2/0/53]write force
#激活irf后,这台交换机将会自动重启
[Switch1]irf-port-configuration active
诊断命令
查看irf设备成员列表
<Switch0>dis irf
MemberID Role Priority CPU-Mac Description
*1 Master 32 505e-4cd7-0104 ---
+2 Standby 1 505e-4f4c-0204 ---
--------------------------------------------------
* indicates the device is the master.
+ indicates the device through which the user logs in.
The bridge MAC of the IRF is: 505e-4cd7-0100
Auto upgrade : yes
Mac persistent : 6 min
Domain ID : 0
<Switch0>
查看irf链路信息
<Switch0>dis irf link
Member 1
IRF Port Interface Status
1 FortyGigE1/0/53 UP
2 disable --
Member 2
IRF Port Interface Status
1 disable --
2 FortyGigE2/0/53 UP
<Switch0>
查看irf拓扑情况
<Switch0>dis irf topology
Topology Info
-------------------------------------------------------------------------
IRF-Port1 IRF-Port2
MemberID Link neighbor Link neighbor Belong To
2 DIS --- UP 1 505e-4cd7-0104
1 UP 2 DIS --- 505e-4cd7-0104
标签:H3C,Switch1,Switch0,53,IRF,网络设备,configuration,irf
From: https://www.cnblogs.com/mo-x/p/18133836