H3C交换机堆叠简单案例

需求

由于网络规模迅速扩大,当前中心交换机(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

初学堆叠,以后回来补充说明。

BFD-MAD分裂检测方法(必配,为了业务)

IRF设备一旦分裂,会变成两台配置完全相同的设备,导致业务转发有问题。为了避免此类问题出现,可以配置分裂检测。设备一旦检测到IRF2分裂,则自动关闭备设备的所有非保留端口。在此介绍BFD MAD分裂检测配置方法。使用网线Device A上的端口GigabitEthernet1/0/1和Device B上的端口GigabitEthernet2/0/1连接起来。

[gaomin]vlan 1000 //创建vlan1000
[gaomin-vlan1000]port GigabitEthernet 1/0/1//将两个端口加入此vlan
[gaomin-vlan1000]port GigabitEthernet 2/0/1
[gaomin-vlan1000]quit


[gaomin]interface Vlan-interface 1000

[gaomin-Vlan-interface1000]mad bfd enable
[gaomin-Vlan-interface1000]mad ip address 10.1.1.1 30 member 1//此处IP地址可以随意设置
[gaomin-Vlan-interface1000]mad ip address 10.1.1.2 30 member 2//但是要和成员1IP地址在一个网段
[gaomin-Vlan-interface1000]quit

[gaomin]interface GigabitEthernet 1/0/1
[gaomin-GigabitEthernet1/0/1]undo stp en//生成树和BFD-MAD功能互斥,所以要关闭STP服务
[gaomin-GigabitEthernet1/0/1]quit

[gaomin]interface GigabitEthernet 2/0/1
[gaomin-GigabitEthernet2/0/1]undo stp enable
[gaomin-GigabitEthernet2/0/1]

心跳线:就是BFD-MAD配置的那两个端口,即G1/0/1和G2/0/1端口物理上所连的LC的光纤跳线,就称为心跳线。

堆叠线:就是本案例中万兆口G1/0/49.G1/0/50和G2/0/49,G2/0/50端口物理上所连的线,称为堆叠线,实际中由于价格昂贵,也可以用普通LC光纤跳线代替。

  • 10
    点赞
  • 100
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
H3C交换机堆叠是一种将多台交换机通过特定的堆叠链路连接在一起,形成一个逻辑上的单一设备的技术。通过堆叠,可以实现交换机之间的高可用性、冗余备份和灵活的端口扩展等功能。 以下是H3C交换机堆叠的基本命令介绍: 1. 创建堆叠: - stack enable:启用堆叠功能。 - stack member {member-id} type {type} mac-address {mac-address}:添加成员交换机到堆叠中。 2. 查看堆叠状态: - display stack:显示堆叠的状态信息,包括成员交换机的编号、型号、MAC地址等。 - display stack configuration:显示堆叠的配置信息,包括成员交换机的优先级、链路状态等。 3. 配置堆叠参数: - stack priority {priority}:设置成员交换机的优先级,用于选举主交换机。 - stack link-reduce {member-id}:设置指定成员交换机的链路冗余模式。 4. 管理堆叠成员: - stack member {member-id} renumber {new-member-id}:重新编号指定成员交换机。 - stack member {member-id} remove:从堆叠中移除指定成员交换机。 5. 堆叠链路管理: - stack port {interface-type interface-number} enable:启用指定接口作为堆叠链路。 - stack port {interface-type interface-number} disable:禁用指定接口作为堆叠链路。 请注意,以上只是H3C交换机堆叠命令的基本介绍,具体的配置和使用方法可能会因不同的交换机型号和软件版本而有所差异。建议在实际操作中参考相关的H3C交换机文档或官方手册。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值