Table of contents
- 1. Introduction to IRF
-
- 1.1 Experimental environment
- 1.2 Add switch
- 1.3 Add connecting lines
- 1.4 Start the device
- 1.5 Modify device name
- 1.6 Close the IRF physical port
- 1.7 Set IRF domain number
- 1.8 Set member number
- 1.9 Configure IRF port and bind it to physical port
- 1.10 Open the IRF physical port and save the configuration
- 1.11 Activate the configuration under the IRF port
- 1.12 Check irf status
- 2. IRF role election
- 3. Case
1. Introduction to IRF
The core idea of IRF is to connect multiple devices together, and after making necessary configurations, virtualize them into one device.
1.1 Experimental environment
H3C simulator version
1.2 Add switch
1.3 Add connecting lines
1.4 Start the device
1.5 Modify device name
SW1:
<H3C>system-view
[H3C]sysname SW1
[SW1]
SW2:
<H3C>system-view
[H3C]sysname SW2
[SW2]
1.6 Close the IRF physical port
SW1:
[SW1]interface Ten-GigabitEthernet1/0/49
[SW1-Ten-GigabitEthernet1/0/49]shutdown
[SW1-Ten-GigabitEthernet1/0/49]quit
SW2:
[SW2]interface Ten-GigabitEthernet1/0/49
[SW2-Ten-GigabitEthernet1/0/49]shutdown
[SW2-Ten-GigabitEthernet1/0/49]quit
1.7 Set IRF domain number
SW1:
[SW1]irf domain 10
SW2:
[SW2]irf domain 10
1.8 Set member number
SW1:
[SW1]irf member 1 renumber 1
Renumbering the member ID may result in configuration change or loss. Continue?[Y/N]:y
SW2:
[SW2]irf member 1 renumber 2
Renumbering the member ID may result in configuration change or loss. Continue?[Y/N]:y
1.9 Configure IRF port and bind it to physical port
If SW1 uses 1/1, then SW2 can only use 1/2
SW1:
[SW1]irf-port 1/1
[SW1-irf-port1/1]port group interface Ten-GigabitEthernet 1/0/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.
[SW1-irf-port1/1]quit
SW2:
[SW2]irf-port 1/2
[SW2-irf-port1/2]port group interface Ten-GigabitEthernet 1/0/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.
[SW2-irf-port1/2]quit
1.10 Open the IRF physical port and save the configuration
SW1:
[SW1]interface Ten-GigabitEthernet1/0/49
[SW1-Ten-GigabitEthernet1/0/49]un
[SW1-Ten-GigabitEthernet1/0/49]undo shu
[SW1-Ten-GigabitEthernet1/0/49]undo shutdown
[SW1-Ten-GigabitEthernet1/0/49]quit
[SW1]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.
SW2:
[SW2]interface Ten-GigabitEthernet 1/0/49
[SW2-Ten-GigabitEthernet1/0/49]undo shutdown
[SW2-Ten-GigabitEthernet1/0/49]quit
[SW2]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.
1.11 Activate the configuration under the IRF port
SW1:
[SW1]irf-port-configuration active
SW2:
[SW2]irf-port-configuration active
Restart SW2
1.12 Check irf status
SW1 is Master, SW2 is Standby
* indicates Master device
+ indicates which device you are currently logging in through
2. IRF role election
The process of determining the role of a member device as master or slave is called role election. Role election will occur under the following circumstances: IRF establishment, primary device leaving or failing, two IRFs merging, etc.
The rules for role election are as follows:
- The current master device takes priority, and the IRF will not re-elect the master device because a new member device joins. However, when the IRF is formed, because there is no master device, all participating devices consider themselves to be the master device, and then continue the comparison of the next rule.
- Members with higher priorities are given priority. If the priorities are the same, continue the comparison with the next rule.
- Priority will be given to systems that have a long running time. In IRF, the accuracy of the startup time interval of member devices is 10 minutes, that is, devices that are started within 10 minutes are considered to be started at the same time, and the comparison continues with the next rule.
- The smaller CPU MAC is given priority. The optimal member device selected through the above rules is the master device, and the other member devices are all slave devices.
2.1 Change the priority and change the master
The default priority is 1. After changing, there will be no re-election. Member 1 needs to be restarted (caution)
[SW1]irf member 2 priority 10
2.2 member 2 becomes Master
3. Case
Topology
3.1 SW1
#irf区域设置
[H3C]sysname SW1
[SW1]irf domain 10
#设置member 1优先级
[SW1]irf member 1 priority 10
#关闭irf物理端口
[SW1]interface range Ten-GigabitEthernet 1/0/49 to Ten-GigabitEthernet 1/0/50
[SW1-if-range]shutdown
[SW1-if-range]quit
#创建irf-port 1/1 ( member号/逻辑口编号),然后加入irf物理端口
[SW1]irf-port 1/1
[SW1-irf-port1/1]port group interface Ten-GigabitEthernet 1/0/49
[SW1-irf-port1/1]port group interface Ten-GigabitEthernet 1/0/50
[SW1-irf-port1/1]quit
#开启irf物理端口,保存配置
[SW1]interface range Ten-GigabitEthernet 1/0/49 to Ten-GigabitEthernet 1/0/50
[SW1-if-range]undo shutdown
[SW1-if-range]quit
[SW1]save
#激活irf端口下的配置
[SW1]irf-port-configuration active
3.2 SW2
#irf区域设置
[H3C]sysname SW2
[SW2]irf domain 10
#设置member成员编号(irf内两台设备成员编号不能一致)
[SW2]irf member 1 renumber 2
#重启
<SW2>reboot
#关闭irf物理端口
[SW2]interface range Ten-GigabitEthernet 2/0/49 to Ten-GigabitEthernet 2/0/50
[SW2-if-range]shutdown
[SW2-if-range]quit
#创建irf-port 2/2 ( member号/逻辑口编号,逻辑口编号两台设备之间只能选1或者2,不能同时1或者同时2),然后加入irf物理端口
[SW2]irf-port 2/2
[SW2-irf-port2/2]port group interface Ten-GigabitEthernet 2/0/49
[SW2-irf-port2/2]port group interface Ten-GigabitEthernet 2/0/50
[SW2-irf-port2/2]quit
#开启irf物理端口,保存配置
[SW2]interface range Ten-GigabitEthernet 2/0/49 to Ten-GigabitEthernet 2/0/50
[SW2-if-range]undo shutdown
[SW2-if-range]quit
[SW2]save
#激活irf端口下的配置
[SW2]irf-port-configuration active
SW2 will automatically restart and join irf
3.3 View irf
3.4 IRF-SW configures link aggregation
将SW1的g1/0/1与g2/0/1端口做聚合1
[SW1]interface Bridge-Aggregation 1
[SW1-Bridge-Aggregation1]quit
#将物理接口加入到聚合口1
[SW1]interface GigabitEthernet 1/0/1
[SW1-GigabitEthernet1/0/1]port link-aggregation group 1
[SW1-GigabitEthernet1/0/1]quit
[SW1]interface GigabitEthernet 2/0/1
[SW1-GigabitEthernet2/0/1]port link-aggregation group 1
[SW1-GigabitEthernet2/0/1]quit
[SW1]interface Bridge-Aggregation 1
[SW1-Bridge-Aggregation1]port link-type trunk
[SW1-Bridge-Aggregation1]port trunk permit vlan 10
[SW1-Bridge-Aggregation1]quit
将SW1的g1/0/2与g2/0/2端口做聚合2
[SW1]interface Bridge-Aggregation 2
[SW1-Bridge-Aggregation2]quit
[SW1]interface GigabitEthernet 1/0/2
[SW1-GigabitEthernet1/0/2]port link-aggregation group 2
[SW1-GigabitEthernet1/0/2]quit
[SW1]interface GigabitEthernet 2/0/2
[SW1-GigabitEthernet2/0/2]port link-aggregation group 2
[SW1-GigabitEthernet2/0/2]quit
[SW1]interface Bridge-Aggregation 2
[SW1-Bridge-Aggregation2]port link-type trunk
[SW1-Bridge-Aggregation2]port trunk permit vlan 10
[SW1-Bridge-Aggregation2]quit
3.5 View aggregate port results
3.6 Configure the aggregation port on the access layer switch
SW3:
[H3C]sysname SW3
[SW3]interface Bridge-Aggregation 1
[SW3-Bridge-Aggregation1]quit
[SW3]interface GigabitEthernet 1/0/1
[SW3-GigabitEthernet1/0/1]port link-aggregation group 1
[SW3-GigabitEthernet1/0/1]quit
[SW3]interface GigabitEthernet 1/0/2
[SW3-GigabitEthernet1/0/2]port link-aggregation group 1
[SW3-GigabitEthernet1/0/2]quit
[SW3]interface Bridge-Aggregation 1
[SW3-Bridge-Aggregation1]port link-type trunk
[SW3-Bridge-Aggregation1]port trunk permit vlan 10
[SW3-Bridge-Aggregation1]quit
SW4:
[H3C]sysname SW4
[SW4]interface Bridge-Aggregation 2
[SW4-Bridge-Aggregation2]quit
[SW4]interface GigabitEthernet 1/0/1
[SW4-GigabitEthernet1/0/1]port link-aggregation group 2
[SW4-GigabitEthernet1/0/1]quit
[SW4]interface GigabitEthernet 1/0/2
[SW4-GigabitEthernet1/0/2]port link-aggregation group 2
[SW4-GigabitEthernet1/0/2]quit
[SW4]interface Bridge-Aggregation 2
[SW4-Bridge-Aggregation2]port link-type trunk
[SW4-Bridge-Aggregation2]port trunk permit vlan 10
[SW4-Bridge-Aggregation2]quit
3.7 Access layer switch configuration vlan
SW3
[SW3]vlan 10
[SW3-vlan10]quit
[SW3]interface GigabitEthernet 1/0/3
[SW3-GigabitEthernet1/0/3]port access vlan 10
[SW3-GigabitEthernet1/0/3]quit
SW4
[SW4]vlan 10
[SW4-vlan10]port GigabitEthernet 1/0/3
[SW4-vlan10]quit
PC1 ping PC2 will not be affected if any line failure of the aggregation port