irf区域设置为10,IRFSW1为member 1,优先级设置为10;IRFSW2为member 2,优先级保持默认 1,最大的优先级为32.
irf 区域设置,并设置member 1的优先级。(默认编号也是1,最大是32)
[IRFSW1]irf domain 10
[IRFSW1]irf member 1 priority 10
先关闭端口,然后创建irf-port 1/1(member号/逻辑口编号),然后将物理口加入,再开启刚关闭的端口。
[IRFSW1]interface range FastEthernet 1/0/53 to FastEthernet1/0/54
[IRFSW1-if-range]shutdown
[IRFSW1]irf-port 1/1
[IRFSW1-irf-port1/1]port group interface FastEthernet 1/0/53
[IRFSW1-irf-port1/1]port group interface FastEthernet 1/0/54
[IRFSW1]interface range FastEthernet 1/0/53 to FastEthernet1/0/54
[IRFSW1-if-range]undo shutdown
配置结果
更改成员编号后需要保存配置后,重启使其生效。次时端口号变为2/0/50,2/0/51…
[IRFSW2]irf domain 10
[IRFSW2]irf member 1 renumber 2
<IRFSW2>save
The current configuration will be written to the device. Are you sure? [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.
<IRFSW2>reboot
这步和IRFSW1差不多,但是有一点很重要,特别是对多层堆叠:
irf-port 后面跟的1/1,2/2不是随便弄的,前者(数字)是交换机的成员编号,后者是成员编号对应的逻辑口号,每台只有1,2两个,你可以是n/1,n/2,但是如果你是n/1的话,那你下一个就只能是n+1/2,如果是n/2就和n/1配对,不可以两个都是1或者都是2。
[IRFSW2]interface range FastEthernet 2/0/53 to FastEthernet 2/0/54
[IRFSW2-if-range]shutdown
[IRFSW2]irf-port 2/2
[IRFSW2-irf-port2/2]port group interface FastEthernet 2/0/53
[IRFSW2-irf-port2/2]port group interface FastEthernet 2/0/54
[IRFSW2]interface range FastEthernet 2/0/53 to FastEthernet 2/0/54
[IRFSW2-if-range]undo shut
[IRFSW2-if-range]undo shutdown
配置结果
[IRFSW2]irf-port-configuration active
<IRFSW2>reboot
<IRFSW1>reboot
成功以后每台设备的名称会自动变成主设备的名称。
二.配置了堆叠后的设备链路验的配置
SW1]dis irf
MemberID Role Priority CPU-Mac Description
*1 Master 1 2e92-6b04-0104 ---
+2 Standby 1 2e92-832c-0204 ---
//在IRF-SW上配置,将SW1的g0/1与SW2的g0/1做聚合
[IRF-SW]interface Bridge-Aggregation 1 //创建聚合口
[TRF-SW1]port link-type trunk //接口类型配置为Trunk
[TRF-SW1]port trunk permit vlan 10 //Trunk接口允许VLAN10通过
[IRF-SW-Bridge-Aggregation1]int g1/0/1 //进入物理接口(第一台核心交换机的物理接口)
[IRF-SW-GigabitEthernet1/0/1]port link-aggregation group 1 //将物理接口加入聚合口
[IRF-SW-GigabitEthernet1/0/1]int g2/0/1 //进入物理接口(第二台核心的物理接口因为是做了堆叠修改为了是2/0/1开头的)
[IRF-SW-GigabitEthernet2/0/1]port link-aggregation group 1 //将物理接口加入聚合口
[IRF-SW-GigabitEthernet2/0/1]display link-aggregation summary //检查两个端口是否都被加入到聚合口,简写dis link-a su //同样方法将SW1的g0/2与SW2的g0/2做聚合
//在IRF-SW上配置,将SW1的g0/1与SW2的g0/1做聚合
[IRF-SW]interface Bridge-Aggregation 2 //创建聚合口
[TRF-SW1]port link-type trunk //接口类型配置为Trunk
[TRF-SW1]port trunk permit vlan 10 //Trunk接口允许VLAN10通过
[IRF-SW-Bridge-Aggregation1]int g1/0/2 //进入物理接口(第一台核心交换机的物理接口)
[IRF-SW-GigabitEthernet1/0/2]port link-aggregation group 1 //将物理接口加入聚合口
[IRF-SW-GigabitEthernet1/0/2]int g2/0/2 //进入物理接口(第二台核心的物理接口因为是做了堆叠修改为了是2/0/1开头的)
[IRF-SW-GigabitEthernet2/0/2]port link-aggregation group 1 //将物理接口加入聚合口
[IRF-SW-GigabitEthernet2/0/2]display link-aggregation summary //检查两个端口是否都被加入到聚合口,简写dis link-a su
接入层的交换机配置
在SW3上将g0/1与g0/2做聚合
[SW3]int Bridge-Aggregation 1
[SW3]int Bridge-Aggregation 1 //创建聚合口
[SW3-Bridge-Aggregation1]port link-type trunk //接口类型配置为Trunk
[SW3-Bridge-Aggregation1]port trunk permit vlan 10 //Trunk接口允许VLAN10通过
[SW3-Bridge-Aggregation1]int g1/0/1
[SW3-GigabitEthernet1/0/1]port link-aggregation group 1
[SW3-Bridge-Aggregation1]int g1/0/2
[SW3-GigabitEthernet1/0/2]port link-aggregation group 1
[SW3-GigabitEthernet1/0/2]qu //同样方法在SW4上将g0/1与g0/2做聚合
[SW3]vlan 10
[SW3-vlan10]port g1/0/3
[SW3-vlan10]qu
//同样方法将SW4接PC端的接口划分到VLAN10
[SW3]int Bridge-Aggregation 2 //创建聚合口
[SW3-Bridge-Aggregation1]port link-type trunk //接口类型配置为Trunk
[SW3-Bridge-Aggregation1]port trunk permit vlan 10 //Trunk接口允许VLAN10通过
[SW3]dis link-aggregation summary /检查聚合口
//同样方法将SW4聚合端口配置为Trunk类型
//在IRF-SW上将两个聚合口均配置为Trunk类型,并配置放行VLAN10
[IRF-SW]vlan 10 //划分VLAN10
[IRF-SW]int Bridge-Aggregation 2 //进入1聚合接口
[IRF-SW-Bridge-Aggregation1]port link-type trunk //聚合接口1配置为Trunk类型
[IRF-SW-Bridge-Aggregation1]port trunk permit vlan 10 //放行VLAN10
[IRF-SW-Bridge-Aggregation1]qu
[IRF-SW]dis link-aggregation summary //检查聚合接口
[SW3]vlan 10
[SW3-vlan10]port g1/0/3
[SW3-vlan10]qu
原文:https://www.cnblogs.com/bawxfiw/p/14243588.html