79-IRF替换典型配置举例
本章节下载: 79-IRF替换典型配置举例 (323.18 KB)
本文档介绍了IRF替换的典型配置举例。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文档假设您已了解IRF特性。
本举例针对IRF未分裂,但因为从设备故障等原因,需要替换从设备,替换过程中会出现IRF分裂的场景。本举例的配置步骤对于IRF未分裂,需要替换主设备的场景也适用,可参考执行。
如图3-1所示,Device A、Device B组成IRF设备,其中Device A为主设备,成员编号为1,Device B为从设备,成员编号为2,使用BFD MAD进行分裂检测。现Device B故障,但IRF未分裂,需要将Device B替换成新的设备。
图3-1 IRF替换配置组网图
表3-1 适用产品及版本
产品 |
软件版本 |
S6812系列 S6813系列 |
Release 6615Pxx系列、Release 6628Pxx系列 |
S6550XE-HI系列 |
Release 6008及以上版本、Release 8106Pxx |
S6525XE-HI系列 |
Release 6008及以上版本、Release 8106Pxx |
S5850系列 |
Release 8005及以上版本、Release 8106Pxx |
S5570S-EI系列 |
Release 11xx |
S5560X-EI系列 |
Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx |
S5560X-HI系列 |
Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx |
S5500V2-EI系列 |
Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列 |
MS4520V2-30F |
Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列 |
MS4520V2-30C MS4520V2-54C |
Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列 |
MS4520V2-28S MS4520V2-24TP |
Release 63xx系列 |
S6520X-HI系列 S6520X-EI系列 |
Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列 |
S6520X-SI系列 S6520-SI系列 |
Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列 |
S5000-EI系列 |
Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列 |
MS4600系列 |
Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列 |
ES5500系列 |
Release 63xx系列、Release 65xx系列、Release 6615Pxx系列、Release 6628Pxx系列 |
S5560S-EI系列 S5560S-SI系列 |
Release 63xx系列 |
S5500V3-24P-SI S5500V3-48P-SI |
Release 63xx系列 |
S5500V3-SI系列(除S5500V3-24P-SI、S5500V3-48P-SI) |
Release 11xx |
S5170-EI系列 |
Release 11xx |
S5130S-HI系列 S5130S-EI[-R]系列 S5130S-SI系列 S5130S-LI系列 |
Release 63xx系列 |
S5120V2-SI系列 S5120V2-LI系列 |
Release 63xx系列 |
S5120V3-EI系列 |
Release 11xx |
S5120V3-36F-SI S5120V3-28P-HPWR-SI S5120V3-54P-PWR-SI |
Release 11xx |
S5120V3-SI系列(除S5120V3-36F-SI、S5120V3-28P-HPWR-SI、S5120V3-54P-PWR-SI) |
Release 63xx系列 |
S5120V3-LI系列 |
Release 63xx系列 |
S3600V3-EI系列 |
Release 11xx |
S3600V3-SI系列 |
Release 11xx |
S3100V3-EI系列 S3100V3-SI系列 |
Release 63xx系列 |
S5110V2系列 |
Release 63xx系列 |
S5110V2-SI系列 |
Release 63xx系列 |
S5000V3-EI系列 S5000V5-EI系列 |
Release 63xx系列 |
S5000E-X系列 S5000X-EI系列 |
Release 63xx系列 |
E128C E152C E500C系列 E500D系列 |
Release 63xx系列 |
MS4320V2系列 MS4320V3系列 MS4300V2系列 MS4320系列 MS4200系列 |
Release 63xx系列 |
WS5850-WiNet系列 |
Release 63xx系列 |
WS5820-WiNet系列 WS5810-WiNet系列 |
Release 63xx系列 |
WAS6000系列 |
Release 63xx系列 |
IE4300-12P-AC & IE4300-12P-PWR IE4300-M系列 IE4320系列 |
Release 63xx系列 |
IE4520系列 |
Release 66xx系列 |
S5135S-EI |
Release 6810及以上版本 |
在IRF替换过程中,需要特别注意的是:
(1) 请提前修改新设备的IRF成员编号并重启该设备使其生效。
(2) 通过提前写好的配置脚本关闭/打开Device B上下行业务接口,请确保脚本包含所有业务接口,避免遗漏业务接口导致替换过程中出现异常。
(3) 在IRF分裂的情况下,禁止在任何一台IRF成员设备上执行save命令,以免配置丢失。
(4) IRF合并后,需确保所有成员设备状态恢复正常,确认display interface brief的显示信息中能查看到所有接口后,延迟2分钟,再进行下一步操作。
在进行IRF替换操作之前,必须进行一些准备操作,以确保业务运行正常,可以进行替换操作。
(1) 记录操作过程
整个IRF替换过程中,建议全程记录操作日志,便于及时发现问题并进行分析定位处理。
超级终端、putty等登录软件均支持会话记录功能,可自动记录用户在该登录终端上执行的所有操作的过程,然后保存为一个txt文件。如果您使用的登录终端不支持会话记录功能,建议您手工全程记录操作日志。
(2) 检查设备的NSR配置
在整个IRF替换过程中可能会出现路由协议(例如BGP、OSPF等)进程级别的主备倒换。从而引发路由协议邻居出现震荡,对报文转发产生不必要的影响。可通过配置NSR(Nonstop Routing,不间断路由)来进行提高路由协议的可靠性。如果替换操作前未配置NSR,请先配置NSR并保存配置,再执行替换操作。以下为OSPF和BGP NSR功能的配置示例。
# 在OSPF进程100中使能NSR功能。
<IRF> system-view
[IRF] ospf 100
[IRF-ospf-100] non-stop-routing
[IRF-ospf-100] display ospf non-stop-routing status
OSPF Process 100 with Router ID 1.1.1.1
Non Stop Routing information
Non Stop Routing capability : Enabled
Upgrade phase : Normal
[IRF-ospf-100] quit
[IRF] quit
# 开启BGP进程100的NSR功能。
[IRF] bgp 100
[IRF-bgp-default] non-stop-routing
[IRF-bgp-default] display bgp non-stop-routing status
BGP NSR status: Ready
Location of preferred standby process: Slot 2
TCP NSR status: Ready
[IRF-bgp-default] quit
[IRF-bgp] quit
[IRF] quit
(3) 检查Device B上是否存在单挂业务链路
因替换过程会将Device B从现网中拆分出来,请确认Device B上是否存在单挂链路(单挂指的是邻居设备仅和Device B相连,没有和IRF中的其它成员设备相连)。对于单挂链路,在IRF替换过程中会不可避免地出现流量中断,请提前增加备份链路。
(4) 检查IRF状态并收集相关信息
IRF替换前需要对设备状态、HA状态、IRF状态及MAD状态进行检查。
除需要替换的成员设备(Device B)外,IRF中其他成员设备的State状态必须为Stable,即稳态,除Stable外的其他状态均需确认原因,在其他成员设备恢复为Stable状态之前禁止进行替换操作。
# 显示设备信息。
<IRF> display device
Slot Type State Subslot Soft Ver Patch Ver
1 S5560X-30C-PWR-EI Master 0 S5560X-6530P01 None
2 S5560X-30C-PWR-EI Standby 0 S5560X-6530P01 None
# 显示系统的稳定状态。
<IRF> display system stable state
System state : Stable
Redundancy state : Stable
Slot CPU Role State
1 0 Active Stable
2 0 Standby Stable
# 显示系统稳定状态的汇总信息,该信息包括CPU的运行状态、主备状态和NSR的稳定状态。
<IRF> display system stable state summary
System state : Stable
Redundancy state : Stable
NSR state : Ready
# 显示IRF的相关信息。
<IRF> display irf
MemberID Role Priority CPU-Mac Description
*+1 Master 1 f010-90db-7402 ---
2 Standby 1 f010-90db-8100 ---
--------------------------------------------------
* indicates the device is the master.
+ indicates the device through which the user logs in.
The bridge MAC of the IRF is: ae05-0607-eaaa
Auto upgrade : yes
Mac persistent : 6 min
Domain ID : 0
# 显示IRF中所有成员设备的IRF配置。
<IRF> display irf configuration
MemberID NewID IRF-Port1 IRF-Port2
1 1 Ten-GigabitEthernet1/0/25 disable
Ten-GigabitEthernet1/0/26
2 2 disable Ten-GigabitEthernet2/0/25
Ten-GigabitEthernet2/0/26
# 显示IRF链路信息。
<IRF> display irf link
Member 1
IRF Port Interface Status
1 Ten-GigabitEthernet1/0/25 UP
Ten-GigabitEthernet1/0/26 UP
2 disable --
Member 2
IRF Port Interface Status
1 disable --
2 Ten-GigabitEthernet2/0/25 UP
Ten-GigabitEthernet2/0/26 UP
# 显示IRF的拓扑信息。
<IRF> display irf topology
Topology Info
-------------------------------------------------------------------------
IRF-Port1 IRF-Port2
MemberID Link neighbor Link neighbor Belong To
2 DIS --- UP 1 f010-90db-7402
1 UP 2 DIS --- f010-90db-7402
# 显示MAD配置的详细信息。
<IRF> display mad verbose
Multi-active recovery state: No
Excluded ports (user-configured):
Excluded ports (system-configured):
IRF physical interfaces:
Ten-GigabitEthernet1/0/25
Ten-GigabitEthernet1/0/26
Ten-GigabitEthernet2/0/25
Ten-GigabitEthernet2/0/26
BFD MAD interfaces:
Vlan-interface2
MAD ARP disabled.
MAD ND disabled.
MAD LACP disabled.
MAD BFD enabled interface: Vlan-interface2
MAD status : Normal
Member ID MAD IP address Neighbor MAD status
1 192.168.2.1/24 2 Normal
2 192.168.2.2/24 1 Normal
# 显示BFD会话信息。
<IRF> display bfd session
Total Sessions: 1 Up Sessions: 0 Init mode: Active
IPv4 session working in control packet mode:
LD/RD SourceAddr DestAddr State Holdtime Interface
32833/0 192.168.2.1 192.168.2.2 Down / Vlan2
(5) 确认IRF中License授权情况。如果Device B上安装了正式授权,则在进行替换操作前,需要将Device B上的授权迁移到新设备上,或者为新设备申请安装相同规格的授权,以免影响授权相关功能的正常运行。关于授权的迁移和申请安装操作请参见产品的《License使用指南》文档。(临时授权不支持迁移)
<IRF> display license
Slot 1:
flash:/license/210235A1XE00000000012020062314252639903.ak
Feature: OPENXCVR
Product Description: H3C Open Optical Transceiver Module Support License for 40G/10G(or Lower) Fixed-Port Campus Switches
Registered at: 2021-12-10 06:03:27
License Type: Permanent
Current State: In use
Slot 2:
flash:/license/210235A1XE00000000012020062314252631110.ak
Feature: OPENXCVR
Product Description: H3C Open Optical Transceiver Module Support License for 40G/10G(or Lower) Fixed-Port Campus Switches
Registered at: 2021-12-10 06:03:27
License Type: Permanent
Current State: In use
(6) 检查协议、端口、表项等状态并收集相关信息,以便与替换后对比检查,如下列出常见信息收集命令,显示信息略。
# 显示系统版本信息。
<IRF> display version
# 显示设备生效的配置。
<IRF> display current-configuration
# 显示接口简要信息。
<IRF> display interface brief
# 显示ARP表项。
<IRF> display arp
# 显示MAC地址表信息。
<IRF> display mac-address
# 显示OSPF中各区域邻居的信息。
<IRF> display ospf peer
# 显示路由表的信息。
<IRF> display ip routing-table
# 显示链路聚合详细信息。
<IRF> display link-aggregation verbose
# 显示最近一个统计周期内处于up状态的接口的报文速率统计信息。
<IRF> display counters rate inbound interface
(7) 备份配置文件
待设备状态检查均正常,设备具备升级条件下,保存配置,并将配置导出进行备份。
# 将配置保存到下次启动配置文件。
<IRF> 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 0 commands and deletes 0 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.
Slot 2:
Save next configuration file successfully.
# 显示用于本次及下次启动的配置文件的名称。
<IRF> display startup
MainBoard:
Current startup saved-configuration file: NULL
Next main startup saved-configuration file: flash:/startup.cfg
Next backup startup saved-configuration file: NULL
Slot 2:
Current startup saved-configuration file: NULL
Next main startup saved-configuration file: flash:/startup.cfg
Next backup startup saved-configuration file: NULL
# 备份下次启动配置文件startup.cfg。
<IRF> tftp 2.2.2.3 put startup.cfg
Press CTRL+C to abort.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 8128 0 0 100 8128 0 170k --:--:-- --:--:-- --:--:-- 233k
<IRF>
(8) 提前准备新设备
¡ 确认新设备的型号和软件版本,请使用相同型号相同软件版本的设备进行替换。如果新设备的软件版本和IRF当前运行的软件版本不一致,请先升级新设备,再执行下一步的操作。
<newDeviceB> display version
H3C Comware Software, Version 7.1.070, Release 6530P01
Copyright (c) 2004-2021 New H3C Technologies Co., Ltd. All rights reserved.
H3C S5560X-30C-PWR-EI uptime is 0 weeks, 0 days, 17 hours, 19 minutes
Last reboot reason : User reboot
其它显示信息略……
¡ 确认新设备的其它参数,例如系统⼯作模式、最⼤等价路由条数等,保证这些参数的配置⼀致,不同型号设备组建IRF对成员设备的要求不同,具体请参考产品资料中“虚拟化配置指导”中的“IRF”。
¡ 修改新设备的IRF成员编号为2,与替换前的编号⼀致。
[newDeviceB] irf member 1 renumber 2
Renumbering the member ID may result in configuration change or loss. Continue?[Y/N]:y
[newDeviceB] quit
¡ 保存配置,并重启设备使新成员编号⽣效。
<newDeviceB> 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 20 commands and deletes 121 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.
<newDeviceB> 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.......
¡ 完成IRF接口配置,将Ten-GigabitEthernet2/0/25和Ten-GigabitEthernet2/0/26和IRF端口2/2绑定。
<newDeviceB> system-view
[newDeviceB] interface ten-gigabitethernet 2/0/25
[newDeviceB-Ten-GigabitEthernet2/0/25] shutdown
[newDeviceB-Ten-GigabitEthernet2/0/25] quit
[newDeviceB] int ten-gigabitethernet 2/0/26
[newDeviceB-Ten-GigabitEthernet2/0/26] shutdown
[newDeviceB-Ten-GigabitEthernet2/0/26] quit
[newDeviceB] irf-port 2/2
[newDeviceB-irf-port2/2] port group interface ten-gigabitethernet 2/0/25
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.
[newDeviceB-irf-port2/2] port group interface ten-gigabitethernet 2/0/26
[newDeviceB-irf-port2/2] quit
[newDeviceB] interface ten-gigabitethernet 2/0/25
[newDeviceB-Ten-GigabitEthernet2/0/25] undo shutdown
[newDeviceB-Ten-GigabitEthernet2/0/25] quit
[newDeviceB] int ten-gigabitethernet 2/0/26
[newDeviceB-Ten-GigabitEthernet2/0/26] undo shutdown
[newDeviceB-Ten-GigabitEthernet2/0/26] quit
[newDeviceB] irf-port-configuration active
[newDeviceB] save
¡ 将新设备断电备用。
(1) 关闭需要替换的成员设备上的业务端口并保存配置
a. 关闭Device B上所有上行及下行业务端⼝(IRF物理端口Ten-GigabitEthernet2/0/25和Ten-GigabitEthernet2/0/26、BFD MAD检测的接口GigabitEthernet2/0/1不关闭)。
[IRF] interface range name yewu interface gigabitethernet 2/0/2 to gigabitethernet 2/0/24 ten-gigabitethernet 2/0/27 to ten-gigabitethernet 2/0/28
[IRF-if-range-yewu] shutdown
[IRF-if-range-yewu] quit
b. 在Device D上ping Device C,在Device C上ping Device D。如果均能ping通,则说明Device C和Device D之间通信正常。如果不能ping通,请先定位通信故障问题。
c. 确保业务成功从Device B切到Device A上,并测试正常后,保存当前配置。
[IRF] 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 0 commands and deletes 0 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.
Slot 2:
Save next configuration file successfully.
(2) 将Device B断电,然后再拔出IRF线缆和业务线缆等
在Device B断电后,IRF处于分裂状态,此时,禁止在Device A和Device B上执行save命令,以免配置丢失。
(3) 将新设备移入IRF,插入IRF线缆,给新设备上电
# 将新设备在断电状态下移入IRF,在Ten-GigabitEthernet1/0/25和Ten-GigabitEthernet1/0/26接口插入IRF线缆,BFD MAD检测接口GigabitEthernet2/0/1插入普通业务线缆,给新设备上电。新Device B会以从设备的身份和Device A合并成一个IRF,Device A仍为主设备。
# 新Device B启动完成后,执行以下display命令检查Device B和IRF状态是否正常。显示信息应该和IRF替换前的显示信息一致,显示信息不再罗列。如果不正常,请先定位相关问题。
[IRF] display system stable state
[IRF] display irf
[IRF] display irf configuration
[IRF] display irf link
[IRF] display irf topology
[IRF] display mad verbose
(4) 待新Device B稳定运行,插入业务线缆,恢复新Device B上的业务接口
a. 用display device确认Device B状态为Standby。
b. 用display interface能够看到Device B上的所有物理接⼝后,延迟2分钟,重新插入Device B之前拔出的业务线缆。
c. 打开Device B上的所有业务接口,观察业务是否正常。
[IRF] interface range name yewu interface gigabitethernet 2/0/2 to gigabitethernet 2/0/24 ten-gigabitethernet 2/0/27 to ten-gigabitethernet 2/0/28
[IRF-if-range-yewu] undo shutdown
[IRF-if-range-yewu] quit
d. 保存配置。
[IRF] save
(1) 可根据需要进行无用配置(比如:range接口)删除并保存配置。
[IRF] undo interface range yewu
[IRF] quit
<IRF> save
(2) 检查设备状态,以及与替换前的设备状态对比。
# 使用如下常用命令,查看当前设备状态,收集相关表项信息,并与替换前的显示结果进行对比。如果对比结果不同,请定位对应问题。下列各命令的显示结果请以实际情况为准,本文不做罗列。
<IRF> display version
<IRF> display current-configuration
<IRF> display interface brief
<IRF> display arp
<IRF> display mac-address
<IRF> display ospf peer
<IRF> display ip routing-table
<IRF> display link-aggregation verbose
<IRF> display counters rate inbound interface
# 查看IRF的设备信息,可以看到Device A为Master,Device B为Standby。
<IRF> display device
Slot Type State Subslot Soft Ver Patch Ver
1 S5560X-30C-PWR-EI Master 0 S5560X-6530P01 None
2 S5560X-30C-PWR-EI Standby 0 S5560X-6530P01 None
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!