H3C交换机堆叠简单案例
程序员文章站
2024-03-20 21:48:34
...
需求
由于网络规模迅速扩大,当前中心交换机(Device A)转发能力已经不能满足需求,需要另外增加一台设备Device B。现需要将两台设备配置IRF2堆叠,将网络转发能力提高一倍,并实现网络易管理、易维护。Device A和Device B分别使用自带的两个万兆口做堆叠口。也可以只用一个接口堆叠,根据实际情况而定。
网络拓补
实验思路
# Device A保留缺省编号为1,不需要进行配置。同时,在Device B上将设备的成员编号修改为2。
#配置堆叠口
#**DeviceA和DeviceB的IRF端口配置。
#IRF-port端口编号说明,irf-port 1/2中,第一个数字代表的是设备成员编号,第二个数字是接口编号。堆叠要求使用逻辑端口1对接逻辑端口2。即,如若第一台配置irf-port1/2,则第二台需要是用irf-port2/1对接。如若第一台使用irf-port1/1,则第二台需要配置irf-port2/2。
#设备配置好IRF2配置后,要先保存再**配置。
实验代码
DeviceA
<H3C>system-view
System View: return to User View with Ctrl+Z.
[H3C]undo info-center enable
Information center is disabled.
[H3C]sysname DeviceA //命名设备
[DeviceA]interface range Ten-GigabitEthernet 1/0/49 to Ten-GigabitEthernet 1/0/50
//进入1/0/49-50 万兆口
[DeviceA-if-range]shutdown //将端口停止启动
[DeviceA-if-range]quit
[DeviceA]irf-port 1/2 //进入堆叠端口号 1/2
[DeviceA-irf-port1/2]port group interface Ten-GigabitEthernet 1/0/49 //49端口加入组
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.
[DeviceA-irf-port1/2]port group interface Ten-GigabitEthernet 1/0/50//50端口加入组
[DeviceA-irf-port1/2]quit
[DeviceA]interface range Ten-GigabitEthernet 1/0/49 to Ten-GigabitEthernet 1/0/50
[DeviceA-if-range]undo shutdown //启动两个万兆端口
[DeviceA-if-range]quit
[DeviceA]save force //保存
[DeviceA]irf-port-configuration active//**IRF端口配置
DeviceB
<H3C>
<H3C>sy
System View: return to User View with Ctrl+Z.
[H3C]undo info-center enable
Information center is disabled.
[H3C]sysname DeviceB
[DeviceB]irf member 1 renumber 2
Renumbering the member ID may result in configuration change or loss. Continue?[Y/N]:y
[DeviceB]quit
<DeviceB>reboot
Press ENTER to get started.
<DeviceB>system-view
System View: return to User View with Ctrl+Z.
[DeviceB]interface range Ten-GigabitEthernet 2/0/49 to t
[DeviceB]interface range Ten-GigabitEthernet 2/0/49 to Ten-GigabitEthernet 2/0/50
[DeviceB-if-range]shutdown
[DeviceB-if-range]quit
[DeviceB]irf-port 2/1
[DeviceB-irf-port2/1]port group interface Ten-GigabitEthernet 2/0/49
[DeviceB-irf-port2/1]port group interface Ten-GigabitEthernet 2/0/50
[DeviceB-irf-port2/1]quit
[DeviceB]interface range Ten-GigabitEthernet 2/0/49 to Ten-GigabitEthernet 2/0/50
[DeviceB-if-range]undo shutdown
[DeviceB-if-range]quit
[DeviceB]save force
Validating file. Please wait...
Saved the current configuration to mainboard device successfully.
[DeviceB]irf-port-configuration active
总结
我们用命令display irf发现,Master(主要的)是DeviceA, Standby(备用的)是DeviceB
[DeviceA]display irf
MemberID Role Priority CPU-Mac Description
*+1 Master 1 7ed0-4678-0104 ---
2 Standby 1 7ed0-57d7-0204 ---
--------------------------------------------------
* indicates the device is the master.
+ indicates the device through which the user logs in.
The bridge MAC of the IRF is: 7ed0-4678-0100
Auto upgrade : yes
Mac persistent : 6 min
Domain ID : 0
[DeviceA]
配置完成后,发现两台主机的系统命名都变成了“DeviceA”,因为A是主交换机,都以主交换机为主。
H3C交换机,上面有两种堆叠的方式
假如有三台设备,A,B,C
环叠:A接B,B接C,C接A
直连:A接B,B接C
初学堆叠,以后回来补充说明。
推荐阅读