H3C switch stack (IRF)

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.

Insert image description here

1.1 Experimental environment

H3C simulator version

Insert image description here

1.2 Add switch

Insert image description here

1.3 Add connecting lines

Insert image description here

1.4 Start the device

Insert image description here

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
Insert image description here

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:

  1. 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.
  2. Members with higher priorities are given priority. If the priorities are the same, continue the comparison with the next rule.
  3. 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.
  4. 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

Insert image description here

2.2 member 2 becomes Master

Insert image description here

3. Case

Topology
Insert image description here

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

Insert image description here

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

Insert image description here

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

Guess you like

Origin blog.csdn.net/tladagio/article/details/131890034
IRF