五杀摇滚小拉夫

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

irf堆叠,是指将多台设备通过线缆连接组合在一起,虚拟化成一台设备,可以简化网络配置与运维管理,结合链路聚合技术,实现高可靠网络架构。

堆叠使用时,各个厂家的设备不能混用。irf堆叠由多台成员设备组成,一个irf中同时只能存在一台Master,其他成员设备都是Standy/Slave。

Master设备负责irf的运行管理和维护,Standy/Slave设备作为备份的同时也处理业务。Master故障时,系统会迅速自动选举新的Master,以保证通信业务正常。

Master设备竞选规则:优先级越高越优先;交换机MAC地址小的优先;在系统中运行时间长的优先,一般通过调整设备优先级来决定Master设备。

 

实现功能效果拓扑图:通过irf以及聚合技术,实现设备与线路冗余备份。

 

①、sw1-irf设置

[sw1]irf member 1 priority 5   #设置修改优先级别,member-id表示设备在irf中的成员编号,priority:表示优先级,取值范围1-32.优先值越大表示优先级越高,优先级高的设备竞选时成为主设备的可能性越大。
[sw1]interface range Ten-GigabitEthernet 1/0/51 Ten-GigabitEthernet 1/0/52   #批量进入交换机接口
[sw1-if-range]shutdown   #关闭交换机接口
[sw1-if-range]%Jun 28 04:35:30:262 2023 sw1 LAGG/6/LAGG_INACTIVE_PHYSTATE: Member port XGE1/0/51 of aggregation group BAGG1 changed to the inactive state, because the physical or line protocol state of the port was down.
%Jun 28 04:35:30:263 2023 sw1 IFNET/3/PHY_UPDOWN: Physical state on the interface Ten-GigabitEthernet1/0/51 changed to down.
%Jun 28 04:35:30:263 2023 sw1 IFNET/5/LINK_UPDOWN: Line protocol state on the interface Ten-GigabitEthernet1/0/51 changed to down.
%Jun 28 04:35:30:288 2023 sw1 LAGG/6/LAGG_INACTIVE_PHYSTATE: Member port XGE1/0/52 of aggregation group BAGG1 changed to the inactive state, because the physical or line protocol state of the port was down.
%Jun 28 04:35:30:293 2023 sw1 IFNET/3/PHY_UPDOWN: Physical state on the interface Ten-GigabitEthernet1/0/52 changed to down.
%Jun 28 04:35:30:294 2023 sw1 IFNET/5/LINK_UPDOWN: Line protocol state on the interface Ten-GigabitEthernet1/0/52 changed to down.
%Jun 28 04:35:30:294 2023 sw1 IFNET/3/PHY_UPDOWN: Physical state on the interface Bridge-Aggregation1 changed to down.
%Jun 28 04:35:30:294 2023 sw1 IFNET/5/LINK_UPDOWN: Line protocol state on the interface Bridge-Aggregation1 changed to down.

[sw1-if-range]quit
[sw1]irf-port 1/2   #创建堆叠逻辑接口
[sw1-irf-port1/2]port group interface Ten-GigabitEthernet 1/0/51   #江堆叠接口加入逻辑接口
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/2]port group interface Ten-GigabitEthernet 1/0/52   #批量进入交换机接口
[sw1-irf-port1/2]quit
[sw1]interface range Ten-GigabitEthernet 1/0/51 Ten-GigabitEthernet 1/0/52
[sw1-if-range]undo shutdown
[sw1-if-range]%Jun 28 04:38:19:449 2023 sw1 IFNET/3/PHY_UPDOWN: Physical state on the interface Ten-GigabitEthernet1/0/51 changed to up.
%Jun 28 04:38:19:450 2023 sw1 IFNET/5/LINK_UPDOWN: Line protocol state on the interface Ten-GigabitEthernet1/0/51 changed to up.
%Jun 28 04:38:19:450 2023 sw1 LLDP/6/LLDP_CREATE_NEIGHBOR: Nearest bridge agent neighbor created on port Ten-GigabitEthernet1/0/51 (IfIndex 52), neighbor's chassis ID is 9afe-425d-0200, port ID is Ten-GigabitEthernet1/0/51.
%Jun 28 04:38:19:485 2023 sw1 IFNET/3/PHY_UPDOWN: Physical state on the interface Ten-GigabitEthernet1/0/52 changed to up.
%Jun 28 04:38:19:485 2023 sw1 IFNET/5/LINK_UPDOWN: Line protocol state on the interface Ten-GigabitEthernet1/0/52 changed to up.
%Jun 28 04:38:19:486 2023 sw1 LLDP/6/LLDP_CREATE_NEIGHBOR: Nearest bridge agent neighbor created on port Ten-GigabitEthernet1/0/52 (IfIndex 53), neighbor's chassis ID is 9afe-425d-0200, port ID is Ten-GigabitEthernet1/0/52.

[sw1-if-range]quit
[sw1]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...
The startup.cfg file already exists.
Compared with the startup.cfg file, The current configuration adds 4 commands and deletes 5 commands.
If you want to see the configuration differences, please cancel this operation, and then use the display diff command to show the details.
If you continue the save operation, the file will be overwritten.
Are you sure you want to continue the save operation? [Y/N]:Y
Saving the current configuration to the file. Please wait...
Saved the current configuration to mainboard device successfully.

②、sw2-irf设置

[sw2]irf member 1 renumber 2   #修改交换机接口编号,由1修改为2。
Renumbering the member ID may result in configuration change or loss. Continue?[Y/N]:Y
Please reboot the device for the new member ID to take effect.
[sw2]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...
The startup.cfg file already exists.
Compared with the startup.cfg file, The current configuration adds 1 commands and deletes 1 commands.
If you want to see the configuration differences, please cancel this operation, and then use the display diff command to show the details.
If you continue the save operation, the file will be overwritten.
Are you sure you want to continue the save operation? [Y/N]:Y
Saving the current configuration to the file. Please wait...
Saved the current configuration to mainboard device successfully.

<sw2>reboot   #重启交换机
Start to check configuration with next startup configuration file, please wait.........DONE!
This command will reboot the device. Continue? [Y/N]:Y
Now rebooting, please wait....%Jun 28 04:50:31:977 2023 sw2 DEV/5/SYSTEM_REBOOT: System is rebooting now.
..

 

<sw2>dis interface brief
Brief information on interfaces in route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface Link Protocol Primary IP Description
InLoop0 UP UP(s) --
MGE0/0/0 DOWN DOWN --
NULL0 UP UP(s) --
REG0 UP -- --

Brief information on interfaces in bridge mode:
Link: ADM - administratively down; Stby - standby
Speed: (a) - auto
Duplex: (a)/A - auto; H - half; F - full
Type: A - access; T - trunk; H - hybrid
Interface Link Speed Duplex Type PVID Description
BAGG1 DOWN auto A T 1
FGE2/0/53 DOWN 40G A A 1
FGE2/0/54 DOWN 40G A A 1
GE2/0/1 DOWN auto A A 1
GE2/0/2 DOWN auto A A 1
GE2/0/3 DOWN auto A A 1
GE2/0/4 DOWN auto A A 1
GE2/0/5 DOWN auto A A 1
---- More ----

 


[sw2]interface range Ten-GigabitEthernet 2/0/51 Ten-GigabitEthernet 2/0/52

[sw2-if-range]shutdown

[sw2]irf-port 2/1

[sw2-irf-port2/1]port group interface Ten-GigabitEthernet 2/0/51
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-port2/1]port group interface Ten-GigabitEthernet 2/0/52
[sw2-irf-port2/1]quit

 

查询sw2交换机端口变化,编号全部由1变为2

 待完善sw1、sw2 重启无法启动。

posted on 2023-06-28 16:02  五杀摇滚小拉夫  阅读(1544)  评论(0编辑  收藏  举报