H3C二层以太网链路聚合配合IRF典型配置举例
	        客户组网需求:接入层和汇聚层都有两台设备,现要求使用链路聚合特性和IRF特性实现以下需求:
	        ·     由于公司人员不断增加,要求接入层具有易管理能力和强扩展能力,可以提供更多的端口来满足PC的接入需求。
	        ·     由于接入层的流量增加,要求增强接入层到汇聚层的链路具有较高可靠性,且可实现流量的负载分担。
	以太网链路聚合配置IRF配置组网图
	 
	        配置思路
	        ·     要使接入层具有易管理能力和强扩展能力,可通过配置IRF功能,轻松扩展接入层端口数量、带宽。
	        ·     为了提高链路可靠性,可通过配置链路聚合配合IRF功能实现,每台接入层设备双上行连到汇聚层上,并且将四条上行链路进行聚合,当某个成员设备离开IRF,其它成员设备上的链路仍能收发报文,从而提高了链路的可靠性。
	        ·     可通过配置链路聚合的负载分担功能以实现流量均衡转发。
	        ·     可在汇聚层IRF和接入层IRF上同时开启LACP MAD功能,使两个IRF相互作为中间设备,完成各自的LACP MAD检测。以快速排查IRF分裂原因并及时恢复成员设备IRF状态。
	 
	        产品软件版本
	        S12500X-AF系列交换机
	        S12500X-CMW710-R2712
	        S12500-X系列交换机
	        S12500X-CMW710-R2712
	        S9800系列交换机
	        S9800-CMW710-R2712
	 
	        配置注意事项:
	        ·     IRF物理端口必须工作在二层模式下,才能与IRF端口进行绑定。
	        ·     与同一个IRF端口绑定的多个IRF物理端口必须工作在相同模式。
	        ·     IRF中成员设备间相连的IRF物理端口必须配置为同一种工作模式。关于配置IRF物理端口的工作模式的介绍,请参见“IRF配置指导”。
	        ·     配置聚合组的成员端口过程中,建议配置顺序:在端口视图下使用display this命令查看端口上是否存在属性类配置(包括端口隔离配置、VLAN配置、VLAN映射),如果有这类配置,请使用对应的undo命令删除这些配置,使端口保持在缺省属性类配置状态,然后再把端口加入到新创建的聚合组内。
	        ·     由于静态聚合组中成员端口选中状态不受对端端口是否在聚合组中及是否处于选中状态的影响。这样有可能导致两端设备所确定的Selected状态端口不一致,并且LACP MAD必须在动态聚合接口上应用才能生效。所以本例要求用户选择配置动态聚合组。
	        ·     缺省情况下,S12500X-AF系列、S12500-X系列、S9800系列交换机的接口处于ADM(Administratively Down)状态,请根据实际需要在对应接口视图下使用undo shutdown命令开启接口。
	 
	配置步骤
	(1)     Device A的IRF相关配置
	 
	# 关闭HundredGigE1/0/1。关于IRF配置的介绍,请参见“IRF配置指导”。
	 
	<DeviceA> system-view
	 
	[DeviceA] interface hundredgige 1/0/1
	 
	[DeviceA-HundredGigE1/0/1] shutdown
	 
	[DeviceA-HundredGigE1/0/1] quit
	 
	# 配置IRF端口1/1,并将它与物理端口HundredGigE1/0/1绑定。
	 
	[DeviceA] irf-port 1/1
	 
	[DeviceA-irf-port1/1] port group interface hundredgige 1/0/1
	 
	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/1] quit
	 
	# 开启HundredGigE1/0/1端口,并保存配置。
	 
	[DeviceA] interface hundredgige 1/0/1
	 
	[DeviceA-HundredGigE1/0/1] undo shutdown
	 
	[DeviceA-HundredGigE1/0/1] quit
	 
	[DeviceA] save
	 
	# 激活IRF端口下的配置。
	 
	[DeviceA] irf-port-configuration active
	 
	(2)     Device B的IRF相关配置
	 
	# 将Device B的成员编号配置为2,并重启设备使新编号生效。
	 
	<DeviceB> system-view
	 
	[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
	 
	# IRF物理端口绑定要求与Device A相同,本例中以HundredGigE2/0/1为例,关闭该端口。关于IRF配置的介绍,请参见“IRF配置指导”。
	 
	<DeviceB> system-view
	 
	[DeviceB] interface hundredgige 2/0/1
	 
	[DeviceB-HundredGigE2/0/1] shutdown
	 
	[DeviceB-HundredGigE2/0/1] quit
	 
	# 配置IRF端口2/2,并将它与物理端口HundredGigE2/0/1绑定。
	 
	[DeviceB] irf-port 2/2
	 
	[DeviceB-irf-port2/2] port group interface hundredgige 2/0/1
	 
	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.
	 
	[DeviceB-irf-port2/2] quit
	 
	# 开启HundredGigE2/0/1端口,并保存配置。
	 
	[DeviceB] interface hundredgige 2/0/1
	 
	[DeviceB-HundredGigE2/0/1] undo shutdown
	 
	[DeviceB-HundredGigE2/0/1] quit
	 
	[DeviceB] save
	 
	# 激活IRF端口下的配置。
	 
	[DeviceB] irf-port-configuration active
	 
	# Device A和Device B间将会进行Master竞选,竞选失败的一方将重启,重启完成后,IRF形成。
	 
	# 通过display irf命令来显示IRF相关信息,Device A为Master主设备。
	 
	[DeviceA] display irf
	 
	MemberID    Role    Priority  CPU-Mac         Description
	 
	 *+1        Master   1        00a0-fc00-5801  ---
	 
	   2        Standby  1        00e0-fc58-1235  ---
	 
	--------------------------------------------------
	 
	 * indicates the device is the master.
	 + indicates the device through which the user logs in.
	 
	 The bridge MAC of the IRF is: 00a0-fc00-5800
	 Auto upgrade                : yes
	 Mac persistent              : 6 min
	 Domain ID                   : 0
	 Auto merge                  : yes
	 
	(3)     Device A的二层动态聚合组相关配置
	 
	# 创建二层动态聚合组1,并配置该接口对应的聚合组逐包进行聚合负载分担。
	 
	[DeviceA] interface bridge-aggregation 1
	 
	[DeviceA-Bridge-Aggregation1] link-aggregation mode dynamic
	 
	[DeviceA-Bridge-Aggregation1] link-aggregation load-sharing mode flexible
	 
	[DeviceA-Bridge-Aggregation1] quit
	 
	# 将HundredGigE1/0/9、HundredGigE1/0/10、HundredGigE2/0/9、HundredGigE2/0/10加入该聚合组中。
	 
	[DeviceA] interface range hundredgige 1/0/9 to hundredgige 1/0/10
	 
	hundredgige 2/0/9 to hundredgige 2/0/10
	 
	[DeviceA-if-range] port link-aggregation group 1
	 
	[DeviceA-if-range] quit
	 
	(4)     Device A的LACP MAD相关配置
	 
	# 设置IRF域编号为1。
	 
	[DeviceA] irf domain 1
	 
	# 在动态聚合组1上使能LACP MAD检测功能。
	 
	[DeviceA] interface Bridge-Aggregation 1
	 
	[DeviceA-Bridge-Aggregation1] mad enable
	 
	You need to assign a domain ID (range: 0-4294967295)
	 
	[Current domain is: 1]:
	 
	The assigned domain ID is: 1
	 
	MAD LACP only enable on dynamic aggregation interface.
	 
	(5)     Device C的IRF相关配置
	# Device C上的IRF相关配置与Device A完全相同,此处不再赘述。
	(6)     Device D的IRF相关配置
	# Device D上的IRF相关配置与Device B完全相同,此处不再赘述。
	# Device C和Device D间将会进行Master竞选,竞选失败的一方将重启,重启完成后,IRF形成,Device C为Master主设备。
	(7)     Device C的二层动态聚合组相关配置。
	# Device C上的二层动态聚合组相关配置与Device A完全相同,此处不再赘述。
	(8)     Device C的LACP MAD相关配置
	 
	# 设置IRF域编号为2。
	 
	<DeviceC> system-vie
	[DeviceC] irf domain 2
	 
	# 在动态聚合组1上使能LACP MAD检测功能。
	 
	[DeviceC] interface Bridge-Aggregation 1
	[DeviceC-Bridge-Aggregation1] mad enable
	You need to assign a domain ID (range: 0-4294967295)
	[Current domain is: 2]:
	The assigned domain ID is: 2
	MAD LACP only enable on dynamic aggregation interface.
	 
	验证配置
	# 在Device A上通过display link-aggregation verbose命令来显示聚合组的相关信息,以验证配置是否成功。
	 
	[DeviceA] display link-aggregation verbose
	 
	Loadsharing Type: Shar -- Loadsharing, NonS -- Non-Loadsharing
	 
	Port Status: S -- Selected, U -- Unselected, I -- Individual
	 
	Port: A -- Auto port, M -- Management port, R -- Reference port
	 
	Flags:  A -- LACP_Activity, B -- LACP_Timeout, C -- Aggregation,
	        D -- Synchronization, E -- Collecting, F -- Distributing,
	        G -- Defaulted, H -- Expired
	 
	Aggregate Interface: Bridge-Aggregation1
	Creation Mode: Manual
	Aggregation Mode: Dynamic
	Loadsharing Type: Shar
	Management VLANs: None
	System ID: 0x8000, 00a0-fc00-5800
	 
	Local:
	  Port                Status   Priority Index    Oper-Key               Flag
	  HGE1/0/9(R)         S        32768    10       1                      {ACG}
	  HGE1/0/10           S        32768    11       1                      {ACG}
	  HGE2/0/9            S        32768    138      1                      {ACG}
	  HGE2/0/10           S        32768    139      1                      {ACG}
	 
	Remote:
	  Actor               Priority Index    Oper-Key SystemID               Flag
	  HGE1/0/9            32768    0        0        0x8000, 0000-0000-0000 {EF}
	  HGE1/0/10           32768    0        0        0x8000, 0000-0000-0000 {EF}
	  HGE2/0/9            32768    0        0        0x8000, 0000-0000-0000 {EF}
	  HGE2/0/10           32768    0        0        0x8000, 0000-0000-0000 {EF}
	 
	结果说明:本端和对端设备上聚合组内的成员端口都处于Selected状态。原因是在动态链路聚合中通过LACP协议报文交互,可使两端聚合组内的成员端口选中状态达成一致,可顺利实现对用户数据的转发。
	 
	# 显示聚合负载分担类型
	[DeviceA] display link-aggregation load-sharing mode interface Bridge-Aggregation 1
	Bridge-Aggregation1 load-sharing mode:
	packet type-based sharing
	 
	结果说明:Bridge-aggregation 1的聚合负载分担方式为逐包进行聚合负载分担。
	 
	# 由于配置了LACP MAD功能,当IRF分裂时,设备会收到相关日志信息,提示IRF分裂原因。
	[DeviceA]%Jul  9 16:52:41:734 2016 DeviceA STM/3/STM_LINK_DOWN: -MDC=1; IRF port 1 went down.
	%Jul  9 16:52:41:800 2016 DeviceA IFNET/3/PHY_UPDOWN: -MDC=1; Physical state on the interface HundredGigE1/0/1 changed to down.
	%Jul  9 16:52:41:854 2016 DeviceA IFNET/5/LINK_UPDOWN: -MDC=1; Line protocol state on the interface HundredGigE1/0/1 changed to down.
	%Jul  9 16:52:41:867 2016 DeviceA DEV/3/BOARD_REMOVED: -MDC=1; Board was removed from slot 2, type is Simware.
	 
	结果说明:因为与IRF端口2/2绑定的HundredGigE2/0/1物理端口的物理状态为关闭,造成汇聚层IRF分裂。可通过检查物理连线或者线路故障来解决此问题。
	 
	配置文件
	·     Device A:
	#
	 irf domain 1
	 irf mac-address persistent timer
	 irf auto-update enable
	 irf auto-merge enable
	 undo irf link-delay
	 irf member 1 priority 1
	 irf member 2 priority 1
	 
	#
	irf-port 1/1
	 port group interface HundredGigE1/0/1 mode enhanced
	#
	 
	irf-port 2/2
	 port group interface HundredGigE1/0/1 mode enhanced
	#
	 
	 
	interface Bridge-Aggregation1
	 link-aggregation mode dynamic
	 link-aggregation load-sharing mode flexible
	#
	interface HundredGigE1/0/9
	 port link-mode bridge
	 port link-aggregation group 1
	#
	interface HundredGigE1/0/10
	 port link-mode bridge
	 port link-aggregation group 1
	#
	interface HundredGigE2/0/9
	 port link-mode bridge
	 port link-aggregation group 1
	#
	interface HundredGigE2/0/10
	 port link-mode bridge
	 port link-aggregation group 1
	#
	 
	·     Device C:
	Device C上的配置文件与Device A类似。