第一台交换机的配置
1、 首先进入并关闭万兆堆叠口
[H3C]irf domain 0 //同一拓扑内如果有其它堆叠组,domain不能重复
[H3C]irf member 1 priority 20 //优先级大的为主交换,其余为备,默认值为1
[H3C]int range xge1/0/7 to xge1/0/8
[H3C-if-range]shutdown
[H3C-if-range]quit
2、配置IRF模式端口组
[H3C]irf-port 1/2 #创建1号机的第一个虚拟堆叠口
[H3C -irf-port 1/2] port group interface xge1/0/7
[H3C -irf-port 1/2] port group interface xge1/0/8
[H3C -irf-port 1/2]qu
3、打开万兆堆叠口并激活IRF
[H3C]interface range xge1/0/7 to xge1/0/8
[H3C-if-range]undo shutdown
[H3C-if-range]qu
[H3C]save force
[H3C]irf-port-c active #激活IRF
第二台交换机的配置
1、重命名主机序号
[H3C]irf domain 0
[H3C]irf member 1 renumber 2 #将1号机重命名为2号机
[H3C]quit
<H3C>reboot
2、首先进入并关闭万兆堆叠口
[H3C]int range xge2/0/7 to xge2/0/8
[H3C-if-range]shutdown
[H3C-if-range]qu
3、配置IRF模式端口组
[H3C]irf-port 2/1 #创建1号机的第一个虚拟堆叠口 1对应2,即1/2和2/1 或1/1 和2/2
[H3C -irf-port 2/1] port group int xge1/0/7
[H3C -irf-port 2/1] port group int xge1/0/8
[H3C -irf-port 2/1]qu
4、打开万兆堆叠口并激活IRF
[H3C]int range xge1/0/7 to xge1/0/8
[H3C-if-range]undo shutdown
[H3C-if-range]qu
[H3C]save force
[H3C]irf-port-c active #激活IRF,这时两台交换机会进行竞争,竞争失败的会重启,一般第二台会重启
5、查看配置
[H3C]dis irf
[H3C]dis irf link
[H3C]dis irf topology
[H3C]dis irf configuration
配置链路聚合
int Bridge-Aggregation 91 //创建聚合组,任意名称
link-aggregation mode dynamic
qu
int xge1/0/1
port link-aggregation group 91
qu
int xge2/0/1
port link-aggregation group 91
int Bridge-Aggregation 91
port link-type trunk
port trunk permit vlan all
//同样方法
int Bridge-Aggregation 92 //创建聚合组
link-aggregation mode dynamic
qu
int g1/0/2
port link-aggregation group 92
qu
int g2/0/2
port link-aggregation group 92
qu
int Bridge-Aggregation 92
port link-type trunk
port trunk permit vlan all
//查看配置
display int bridge-aggregation 92
dis link-a su
dis link-a ver
//删除聚合组
int xge1/0/1
undo port link-a group 91
port link-type acc
qu
undo int b 91