WO2025124162A1 - 一种基于白盒交换机的隔离故障方法、装置、电子设备以及可读存储介质 - Google Patents
一种基于白盒交换机的隔离故障方法、装置、电子设备以及可读存储介质 Download PDFInfo
- Publication number
- WO2025124162A1 WO2025124162A1 PCT/CN2024/135499 CN2024135499W WO2025124162A1 WO 2025124162 A1 WO2025124162 A1 WO 2025124162A1 CN 2024135499 W CN2024135499 W CN 2024135499W WO 2025124162 A1 WO2025124162 A1 WO 2025124162A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- port
- white box
- state
- box switch
- monitoring group
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/55—Prevention, detection or correction of errors
- H04L49/557—Error correction, e.g. fault recovery or fault tolerance
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/06—Management of faults, events, alarms or notifications
- H04L41/0654—Management of faults, events, alarms or notifications using network fault recovery
- H04L41/0659—Management of faults, events, alarms or notifications using network fault recovery by isolating or reconfiguring faulty entities
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L49/00—Packet switching elements
- H04L49/55—Prevention, detection or correction of errors
- H04L49/555—Error detection
Definitions
- the monitoring group is configured with preset ports and data, and status data of the monitoring group is configured;
- portmgrd determines the port admin value sent to the hardware based on the shutdown status configured by the user and MG_PORT
- FIG. 1 is a schematic diagram of a fault isolation method based on a white box switch provided in an embodiment of the present application. As shown in FIG. 1 , a fault isolation method based on a white box switch includes:
- the SONIC system whose full name is Software for Open Networking in the Cloud, is an open source network operating system.
- the monitoring group is configured with preset ports and data, and status data of the monitoring group is configured;
- the monitoring group configures preset ports and data, including:
- redis is a database in the form of key-value pairs.
- redis hash type and key filed value structure to configure the preset port and data includes:
- the configuration monitoring group status data includes:
- port ⁇ include:
- portmgrd determines the port admin value sent to the hardware based on the shutdown status configured by the user and MG_PORT
- port ⁇ data configured by the user include:
- the white box switch is initialized, the program enters the working state, and starts subscribing to the redis STATE_DB database MonitorGroup*;
- the default state of MG is init, which is the initial state. It initializes the soft data and does not perform other operations.
- the MONITOR_GROUP_STATE state After receiving the subscription information, when the MONITOR_GROUP_STATE state is up, set the port's corresponding MG_PORT
- the portmgr process determines the port admin status that is ultimately sent to the hardware. Based on the user configuration and admin status, and the status of each monitoring group in MG_PORT
- the white box switch When the white box switch detects a fault of itself or a protocol anomaly, it triggers the monitoring group to perform batch shutdown on the preset ports to isolate the fault;
- shutdown means to close.
- no shutdown means not shutting down.
- FIG5 is a schematic diagram of a fault isolation device based on a white box switch provided by an embodiment of the present application. As shown in FIG5 , a fault isolation device based on a white box switch includes:
- Establish monitoring group module used to establish monitoring group on white box switch
- a configuration data module is used for configuring preset ports and data for the monitoring group and configuring status data of the monitoring group;
- the monitoring group executes a batch shutdown module on the preset ports, which is used to trigger the monitoring group to execute a batch shutdown on the preset ports to isolate the fault when the white box switch detects its own fault or detects a protocol abnormality;
- the preset port executes a batch no shutdown module, which is used to execute a batch no shutdown on the preset port after the fault or protocol abnormality is recovered, and the white box switch can continue to provide services.
- FIG3 is a schematic diagram of message transmission logic provided by an embodiment of the present application. As shown in FIG3 , the message transmission logic, TOR switch, when all northbound BGP peers are down, the specific steps of isolating all southbound ports of the device include:
- APP writes MG_STATE, writes down when a fault occurs, and writes up when it recovers;
- MonitorGroup will write the status of the preset port to MG_PORT immediately or after a delay based on the status decision;
- the portmgrd process receives the subscription message and determines the final hardware admin value based on the port shutdown status configured by the user and the status of each MG group in MG_port sent to this port.
- FIG4 is a schematic diagram of a TOR switch MR monitoring a complete disconnection of a northbound BGP peer and shutting down a southbound port provided by an embodiment of the present application.
- the TOR switch MR monitoring a complete disconnection of a northbound BGP peer and shutting down a southbound port specifically includes:
- the TOR switch is the gateway of the server.
- the northbound BGP peer When the northbound BGP peer is connected, the northbound export routes have all been deleted, and the traffic from south to north will continue to lose packets.
- add a monitoring group MonitorGroup to monitor all northbound BGP peers, and the preset ports are all southbound ports.
- MonitorGroup When the status of all northbound BGP peers is not ESTABLISHED, set the MonitorGroup status to down, triggering all southbound interfaces to admin down.
- the TOR device is isolated, the server traffic will go through other TORs, the packet loss will disappear, and the network will recover.
- MCLAG master/slave disconnection dual-master scenario, isolate all ports of the device except peerlink.
- MCLAG When MCLAG is networked, the protocol between the master and standby devices is interrupted, and dual masters appear, causing continuous packet loss at the dual masters.
- a connection line is added to detect the role of the peer device, and the role information of the local device (master ⁇ standy) is sent to the peer.
- a monitoring group MonitorGroup is added to monitor the peer role and the local role.
- both roles are master, if the local iccpd uses a device with a smaller IP (indicating that it was previously standby), the MonitorGroup status is set to down, triggering non-peerlink ports, all admin down, the original standby machine is isolated, and the network is restored.
- the full name of MCLAG is Mclag Multichassis Link Aggregation Group, which is a cross-device link aggregation group.
- the device may have various unexpected errors, such as the hardware forwarding table and software forwarding table being inconsistent when swss exits, resulting in network packet loss. Add a monitoring group MonitorGroup. When key dockers and processes exit abnormally, trigger all ports admin down to isolate the device.
- MonitorGroup Monitor the primary port, and set the default port as the standby port.
- the standby port When the primary port is up, the standby port is down, and when the primary port is down, the standby port is up.
- FIG6 is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application.
- an electronic device 500 is also provided.
- the electronic device 500 may include one or more processors and one or more memories.
- the memory stores a computer readable code, and when the computer readable code is run by one or more processors, a method for isolating faults based on a white box switch can be executed.
- the electronic device 500 may include a bus 501, one or more CPUs 502, a read-only memory (ROM) 503, a random access memory (RAM) 504, a communication port 505 connected to the network, an input/output component 506, a hard disk 507, etc.
- the storage device in the electronic device 500 such as ROM 503 or hard disk 507, can store a method for isolating faults based on a white box switch provided in the present application.
- a method for isolating faults based on a white box switch may, for example, include: establishing a monitoring group on the white box switch; the monitoring group configures preset ports and data, and configures status data of the monitoring group; when the white box switch detects its own fault or detects a protocol abnormality, the monitoring group is triggered to perform a batch shutdown on the preset port to isolate the fault; after the fault or protocol abnormality is restored, a batch no shutdown is performed on the preset port, and the white box switch can continue to provide services.
- the electronic device 500 may also include a user interface 508.
- the architecture shown in FIG. 6 is merely exemplary, and when implementing different devices, one or more components in the electronic device shown in FIG. 6 may be omitted according to actual needs.
- FIG7 is a schematic diagram of the structure of a computer-readable storage medium provided by an embodiment of the present application.
- a computer-readable storage medium 600 is provided according to an embodiment of the present application.
- Computer-readable instructions are stored on the computer-readable storage medium 600.
- the storage medium 600 includes, but is not limited to, for example, volatile memory and/or non-volatile memory.
- Volatile memory may include, for example, random access memory (RAM) and cache memory (cache), etc.
- Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本申请公开一种基于白盒交换机的隔离故障方法、装置、电子设备以及可读存储介质,包括:在白盒交换机上建立监控组;所述监控组配置预设端口和数据,配置监控组的状态数据;所述白盒交换机检测到自身故障或检测到协议异常时,触发监控组对预设端口执行批量shutdown,隔离故障;故障或协议异常恢复后,对预设端口执行批量no shutdown,所述白盒交换机可以继续供提供服务。本申请在数据中心中数量庞大的白盒交换机,自动完成故障的发现和隔离,同时消除人工操作带来的安全隐患,以提高数据中心网络服务的故障自愈能力,无须和网管平台进行过网络请求交互,在白盒交换机上完成操作,有着较高的时效性,极大缩短故障隔离时间,加快网络恢复。
Description
相关申请的交叉引用
本申请要求在2023年12月12日提交中国专利局、申请号为202311703073.2、发明名称为“一种基于白盒交换机的隔离故障方法”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及数据通信白盒交换机监控运维技术领域,特别涉及一种基于白盒交换机的隔离故障方法、装置、电子设备以及可读存储介质。
DCN网络,全称为数据通信网络,是一种支持网络七层协议栈中第一层为物理层、第二层为数据链路层和第三层为网络层功能的网络,主要承载管理信息和分布式信令消息。DCN网络具有分布式网络计算环境和多级分布式数据仓库。在当前的DCN网络中,交换机数量增长不断加快,同时白盒交换机的占比越来越大。白盒交换机具有易于个性化开发的特点,因此提供一个较为通用的故障隔离方法变得尤为重要。
本申请旨在至少在一定程度上解决相关技术中的技术问题之一。为此,本申请的一个目的在于提出一种基于白盒交换机的隔离故障方法、装置、电子设备以及可读存储介质,本申请可以在数据中心中数量庞大的白盒交换机,自动完成故障的发现和隔离,同时消除人工操作带来的安全隐患,以提高数据中心网络服务的故障自愈能力。
本申请公开的第一个方面,提供一种基于白盒交换机的隔离故障方法,所述方法包括:
在白盒交换机上建立监控组;
所述监控组配置预设端口和数据,配置监控组的状态数据;
所述白盒交换机检测到自身故障或检测到协议异常时,触发监控组对预设端口执行批量shutdown,隔离故障;
故障或协议异常恢复后,对预设端口执行批量no shutdown,所述白盒交换机可以继续提供服务。
所述在白盒交换机上建立监控组的步骤,包括:
在白盒交换机SONIC系统中建立监控组;
登录到所述白盒交换机SONIC系统的控制界面;
点击控制界面上“监控组”选项;
点击“新建”按钮,输入监控组的名称和描述;
点击“确定”按钮建立监控组。
所述监控组配置预设端口和数据,包括:
使用redis的hash(哈希)类型和key filed value结构配置预设端口和数据,将所述监控组配置预设端口和数据保存在CONFIG_DB。
所述使用redis的hash(哈希)类型和key filed value结构配置预设端口和数据,包括:
Key="MONITOR_GROUP|MGxx"
Field Value
"ports" <list_value>
"up_delay_time" <value>
"MGxx":其中xx为int型数字,标识监控组的序号;
"ports":预设端口,执行shutdown、no shutdown的端口组,可为一个或多个端口;
"up_delay_time":由admin down切换为admin up时,执行延迟操作。
所述配置监控组的状态数据,包括:
将所述配置监控组的状态数据存储在STATE_DB数据库中,存在三种状态init、up、down;
Key="MONITOR_GROUP_STATE|MGxx";
Field Value
"state" <init/up/down>
MG端口状态,存储在STATE_DB数据库中;
Key="MG_PORT|{port}";
Field Value
"MonitorGroupxx" <up/down>
订阅MONITOR_GROUP_STATE|MGxx状态,设置MG|port}的状态。
所述订阅MONITOR_GROUP_STATE|MGxx状态,设置MG|port}的状态,包括:
订阅MONITOR_GROUP_STATE|MGxx状态,设置MG|port}的状态,portmgrd根据用户配置的shutdown状态和MG_PORT|port}数据,决定下发到硬件的端口admin值。
所述订阅MONITOR_GROUP_STATE|MGxx状态,设置MG|port}的状态;portmgrd根据用户配置的shutdown状态和MG_PORT|port}数据,决定下发到硬件的端口admin值的步骤,包括:
白盒交换机完成初始化,程序进入工作状态,开启订阅redis的STATE_DB数据库MonitorGroup*;
MG默认状态为init,为初始状态,对软数据初始化,不做其他操作;
收到订阅信息,MONITOR_GROUP_STATE状态为down时,对预设端口ports中的列表,每个port写入shutdown标记,记录到STATE_DB中,设置对应port的MG_PORT|port}为MonitorGroupxx down;
收到订阅信息,MONITOR_GROUP_STATE状态为up时,设置端口对应的MG_PORT|{port}为MonitorGroupxx down;如果STATE是有down变为up的,会执行延迟流程,延迟时间为配置中的up_delay_time时间,这样可以有效防止频繁的updown端口引起的网络抖动;如果是从init状态到up状态则无需延迟;
portmgr进程来决定最终下发到硬件的端口admin状态;根据用户配置和admin状态,和MG_PORT|port}中每个监控组的状态,如果有一个标记为down,则下发到硬件admin为down;全为up时,下发到硬件admin为up。
本申请公开的第二个方面,提供一种基于白盒交换机的隔离故障装置,所述装置包括:
建立监控组模块,用于在白盒交换机上建立监控组;
配置数据模块,用于所述监控组配置预设端口和数据,配置监控组的状态数据;
监控组对预设端口执行批量shutdown模块,用于所述白盒交换机检测到自身故障或检测到协议异常时,触发监控组对预设端口执行批量shutdown,隔离故障;
预设端口执行批量no shutdown模块,用于故障或协议异常恢复后,对预设端口执行批量no shutdown,所述白盒交换机可以继续供提供服务。
本申请公开的第三个方面,一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时,以实现一种基于白盒交换机的隔离故障方法中的步骤。
本申请公开的第四个方面,一种可读存储介质,所述可读存储介质存储有计算机程序,所述计算机程序适于处理器进行加载,以执行所述的一种基于白盒交换机的隔离故障方法中的步骤。
与现有技术相比,本申请提出的一种基于白盒交换机的隔离故障方法,本申请的优点在于:
本申请基于端口admin up、down状态完成故障收敛,不依赖协议交互、收敛速度更快更彻底。支持延迟up,有效防止故障频繁抖动的场景;
本申请无须依赖控制器以及其他外部设备,仅在白盒交换机上即可完成所有功能操作,故迭代开发效率高,部署快;
本申请中支持配置多个监控组,且完全解耦,易于动态增扩和收缩监控组。同时显示命令,也可一目了然查看各监控组的自身状态信息;
本申请无须和网管平台进行过网络请求交互,在白盒交换机上完成操作,有着较高的时效性,极大缩短故障隔离时间,加快网络恢复;
本申请可以根据不同场景的网络模型,灵活增加,监控组的状态来源还可以是探针结果、BUFFER状态和主备发现,有着较高的灵活性。
图1是本申请一个实施例提供的一种基于白盒交换机的隔离故障方法示意图;
图2是本申请一个实施例提供的MG三者的状态转换示意图;
图3是本申请一个实施例提供的消息传递逻辑示意图;
图4是本申请一个实施例提供的TOR交换机MR监控北向BGP peer全断连和shutdown南向端口示意图;
图5是本申请一个实施例提供的一种基于白盒交换机的隔离故障装置示意图;
图6是本申请一个实施例提供的电子设备结构示意图;
图7是本申请一个实施例提供的计算机可读存储介质结构示意图。
为了更好地理解本申请,将参考附图对本申请的各个方面作出更详细的说明。应理解,这些详细说明只是对本申请的示例性实施方式的描述,而非以任何方式限制本申请的范围。在说明书全文中,相同的附图标号指代相同的元件。表述“和/或”包括相关联的所列项目中的一个或多个的任何和全部组合。
在附图中,为了便于说明,已稍微调整了元素的大小、尺寸和形状。附图仅为示例而并非严格按比例绘制。如在本文中使用的,用语“大致”“大约”以及类似的用语用作表近似的用语,而不用作表程度的用语,并且旨在说明将由本领域普通技术人员认识到的、测量值或计算值中的固有偏差。另外,在本申请中,各步骤处理描述的先后顺序并不必然表示这些处理在实际操作中出现的顺序,除非有明确其它限定或者能够从上下文推导出的除外。
还应理解的是,诸如“包括”“包括有”“具有”“包含”和/或“包含有”等表述在本说明书中是开放性而非封闭性的表述,其表示存在所陈述的特征、元件和/或部件,但不排除一个或多个其它特征、元件、部件和/或它们的组合的存在。此外,当诸如“...中的至少一个”的表述出现在所列特征的列表之后时,其修饰整列特征,而非仅仅修饰列表中的单独元件。此外,当描述本申请的实施方式时,使用“可”表示“本申请的一个或多个实施方式”。并且,用语“示例性的”旨在指代示例或举例说明。
除非另外限定,否则本文中使用的所有措辞(包括工程术语和科技术语)均具有与本申请所属领域普通技术人员的通常理解相同的含义。还应理解的是,除非本申请中有明确的说明,否则在常用词典中定义的词语应被解释为具有与它们在相关技术的上下文中的含义一致的含义,而不应以理想化或过于形式化的意义解释。
需要说明的是,在不冲突的情况下,本申请中的实施方式及实施方式中的特征可以相互组合。下面将参考附图并结合实施方式来详细说明本申请。
实施例1
图1是本申请一个实施例提供了一种基于白盒交换机的隔离故障方法示意图,如图1所示,一种基于白盒交换机的隔离故障方法,包括:
在白盒交换机上建立监控组;
所述在白盒交换机上建立监控组的步骤,包括:
在白盒交换机SONIC系统中建立监控组;
登录到所述白盒交换机SONIC系统的控制界面;
点击控制界面上“监控组”选项;
点击“新建”按钮,输入监控组的名称和描述;
点击“确定”按钮建立监控组。
其中,SONIC系统,全称为Software for Open Networking in the Cloud,一款开源网络操作系统。
所述监控组配置预设端口和数据,配置监控组的状态数据;
所述监控组配置预设端口和数据,包括:
使用redis的hash哈希类型和key filed value结构配置预设端口和数据,将所述监控组配置预设端口和数据保存在CONFIG_DB。
其中,redis是一种键值对形式的数据库。
所述使用redis的hash哈希类型和key filed value结构配置预设端口和数据,包括:
Key="MONITOR_GROUP|MGxx"
Field Value
"ports" <list_value>
"up_delay_time" <value>
"MGxx":其中xx为int型数字,标识监控组的序号;
"ports":预设端口,执行shutdown、no shutdown的端口组,可为一个或多个端口;
"up_delay_time":由admin down切换为admin up时,执行延迟操作;
其中,MG全称为Monitor Group,指监控组。
所述配置监控组的状态数据,包括:
将所述配置监控组的状态数据存储在STATE_DB数据库中,存在三种状态init、up、down,如图2所示,MG三者的状态转换;
Key="MONITOR_GROUP_STATE|MGxx";
Field Value
"state" <init/up/down>
MG端口状态,存储在STATE_DB数据库中;
Key="MG_PORT|{port}";
Field Value
"MonitorGroupxx" <up/down>
订阅MONITOR_GROUP_STATE|MGxx状态,设置MG|port}的状态。
所述订阅MONITOR_GROUP_STATE|MGxx状态,设置MG|port}的状态,包括:
订阅MONITOR_GROUP_STATE|MGxx状态,设置MG|port}的状态,portmgrd根据用户配置的shutdown状态和MG_PORT|port}数据,决定下发到硬件的端口admin值;
所述订阅MONITOR_GROUP_STATE|MGxx状态,设置MG|port}的状态;portmgrd根据用户配置的shutdown状态和MG_PORT|port}数据,决定下发到硬件的端口admin值的步骤,包括:
白盒交换机完成初始化,程序进入工作状态,开启订阅redis的STATE_DB数据库MonitorGroup*;
MG默认状态为init,为初始状态,对软数据初始化,不做其他操作;
收到订阅信息,MONITOR_GROUP_STATE状态为down时,对预设端口ports中的列表,每个port写入shutdown标记,记录到STATE_DB中,设置对应port的MG_PORT|port}为MonitorGroupxx down;
收到订阅信息,MONITOR_GROUP_STATE状态为up时,设置端口对应的MG_PORT|{port}为MonitorGroupxx down;如果STATE是有down变为up的,会执行延迟流程,延迟时间为配置中的up_delay_time时间,这样可以有效防止频繁的updown端口引起的网络抖动;如果是从init状态到up状态则无需延迟;
portmgr进程来决定最终下发到硬件的端口admin状态;根据用户配置和admin状态,和MG_PORT|port}中每个监控组的状态,如果有一个标记为down,则下发到硬件admin为down;全为up时,下发到硬件admin为up。
所述白盒交换机检测到自身故障或检测到协议异常时,触发监控组对预设端口执行批量shutdown,隔离故障;
其中,shutdown是关闭的意思。
故障或协议异常恢复后,对预设端口执行批量no shutdown,所述白盒交换机可以继续提供服务。
其中,no shutdown是不关闭的意思。
实施例2
图5是本申请一个实施例提供的一种基于白盒交换机的隔离故障装置示意图,如图5所示,一种基于白盒交换机的隔离故障装置,所述装置包括:
建立监控组模块,用于在白盒交换机上建立监控组;
配置数据模块,用于所述监控组配置预设端口和数据,配置监控组的状态数据;
监控组对预设端口执行批量shutdown模块,用于所述白盒交换机检测到自身故障或检测到协议异常时,触发监控组对预设端口执行批量shutdown,隔离故障;
预设端口执行批量no shutdown模块,用于故障或协议异常恢复后,对预设端口执行批量no shutdown,所述白盒交换机可以继续供提供服务。
实施例3
图3是本申请一个实施例提供的消息传递逻辑示意图,如图3所示,消息传递逻辑,TOR交换机,北向BGP peer全down时,隔离设备所有南向端口具体步骤包括:
阅配置数据库,读取配置,状态为init;
APP写MG_STATE,故障出现时写down,恢复时写up;
MonitorGroup进程订阅到MG状态变化,触发状态机变化;
MonitorGroup将根据状态决策,立即或者是延迟后,将预设端口的状态写入MG_PORT;
portmgrd进程,收到订阅消息,根据用户配置的端口shutdown状态和MG_port中各MG组的下发给此端口的状态,决定最终硬件的admin值。
其中,TOR全称为Top of Rack机柜顶部设备,通常为接入交换机。BGP全称为Border Gateway Protocol,边界网关协议。
实施例4
图4是本申请一个实施例提供的TOR交换机MR监控北向BGP peer全断连和shutdown南向端口示意图,如图4所示,TOR交换机MR监控北向BGP peer全断连和shutdown南向端口,具体包括:
TOR交换机作为服务器的网关,当北向BGP peer时,此时北向出口的路由已经全部删除,由南向北的流量会持续丢包。此故障场景,增加监控组MonitorGroup,监控北向所有BGP peer,预设端口为所有南向端口。当所有北向BGP peer状态都不为ESTABLISHED时,设置MonitorGroup状态为down,触发所有南向接口admin down。TOR设备完成隔离,服务器流量会走其他TOR,丢包消失,网络恢复。
实施例5
MCLAG主备断连,双master场景,隔离设备除peerlink的所有端口。
当MCLAG组网时,主备设备间的协议中断,出现双master,导致网络在双master处出现持续丢包。此故障场景,新增探测对端设备角色的连接线,发送本机的角色信息(master\standy)给对端,增加监控组MonitorGroup,监控对端角色和本机角色,当两个角色都为master时,若本端iccpd使用的ip较小的设备(说明之前为standy),则设置MonitorGroup状态为down,触发非peerlink端口,全部admin down,原备机被隔离,网络恢复。其中,MCLAG全称为Mclag Multichassis Link Aggregation Group,跨设备链路聚合组。
实施例6
关键docker、进程异常,隔离设备。
关键docker、进程出现异常退出时,设备可能会出现各种不可预期的错误,如swss退出出现硬件转发表和软件转发表不一致,导致网络丢包。增加监控组MonitorGroup,关键docker、进程异常退出时,触发所有端口admin down,将设备隔离。
实施例7
主备端口组。
对于存在网元工作在主备模式下的场景,增加监控组MonitorGroup。监控主端口,预设端口为备端口。主端口up时,备端口down,主端口down时,备端口up。
实施例8
图6是本申请一个实施例提供的电子设备结构示意图。如图6所示,根据本申请的又一方面还提供了一种电子设备500。该电子设备500可包括一个或多个处理器以及一个或多个存储器。其中,存储器中存储有计算机可读代码,计算机可读代码当由一个或多个处理器运行时,可以执行一种基于白盒交换机的隔离故障方法。
根据本申请实施方式的方法或系统也可以借助于图6所示的电子设备的架构来实现。如图6所示,电子设备500可包括总线501、一个或多个CPU502、只读存储器(ROM)503、随机存取存储器(RAM)504、连接到网络的通信端口505、输入/输出组件506、硬盘507等。电子设备500中的存储设备,例如ROM503或硬盘507可存储本申请提供的一种基于白盒交换机的隔离故障方法。一种基于白盒交换机的隔离故障方法可例如包括:在白盒交换机上建立监控组;所述监控组配置预设端口和数据,配置监控组的状态数据;所述白盒交换机检测到自身故障或检测到协议异常时,触发监控组对预设端口执行批量shutdown,隔离故障;故障或协议异常恢复后,对预设端口执行批量no shutdown,所述白盒交换机可以继续供提供服务。进一步地,电子设备500还可包括用户界面508。当然,图6所示的架构只是示例性的,在实现不同的设备时,根据实际需要,可以省略图6示出的电子设备中的一个或多个组件。
实施例9
图7是本申请一个实施例提供的计算机可读存储介质结构示意图。如图7所示,是根据本申请一个实施方式的计算机可读存储介质600。计算机可读存储介质600上存储有计算机可读指令。当计算机可读指令由处理器运行时,可执行参照以上附图描述的根据本申请实施方式的一种基于白盒交换机的隔离故障方法。存储介质600包括但不限于例如易失性存储器和/或非易失性存储器。易失性存储器例如可包括随机存取存储器(RAM)和高速缓冲存储器(cache)等。非易失性存储器例如可包括只读存储器(ROM)、硬盘、闪存等。
应当理解,以许多方式来实现本申请的方法和装置、设备。例如,可通过软件、硬件、固件或者软件、硬件、固件的任何组合来实现本申请的方法和装置、设备。用于方法的步骤的上述顺序仅是为了进行说明,本申请的方法的步骤不限于以上具体描述的顺序,除非以其他方式特别说明。此外,在一些实施例中,还可将本申请实施为记录在记录介质中的程序,这些程序包括用于实现根据本申请的方法的机器可读指令。因而,本申请还覆盖存储用于执行根据本申请的方法的程序的记录介质。
另外,本申请的实施方式中提供的上述技术方案中与现有技术中对应技术方案实现原理一致的部分并未详细说明,以免过多赘述。
如上所述的具体实施方式,对本申请的目的、技术方案和有益效果进行了进一步详细说明。应理解的是,以上所述仅为本申请的具体实施方式,并不用于限制本申请。凡在本申请的精神和原则之内,所做的任何修改、等同替换、改进等均应包含在本申请的保护范围之内。
Claims (10)
- 一种基于白盒交换机的隔离故障方法,其特征在于,包括以下步骤:在白盒交换机上建立监控组;所述监控组配置预设端口和数据,配置监控组的状态数据;所述白盒交换机检测到自身故障或检测到协议异常时,触发监控组对预设端口执行批量shutdown,隔离故障;故障或协议异常恢复后,对预设端口执行批量no shutdown,所述白盒交换机可以继续提供服务。
- 根据权利要求1所述的基于白盒交换机的隔离故障方法,其特征在于,所述在白盒交换机上建立监控组的步骤,包括:在白盒交换机SONIC系统中建立监控组;登录到所述白盒交换机SONIC系统的控制界面;点击控制界面上“监控组”选项;点击“新建”按钮,输入监控组的名称和描述;点击“确定”按钮建立监控组。
- 根据权利要求1所述的基于白盒交换机的隔离故障方法,其特征在于,所述监控组配置预设端口和数据,包括:使用redis的hash(哈希)类型和key filed value结构配置预设端口和数据,将所述监控组配置预设端口和数据保存在CONFIG_DB。
- 根据权利要求3所述的基于白盒交换机的隔离故障方法,其特征在于,所述使用redis的hash(哈希)类型和key filed value结构配置预设端口和数据,包括:Key="MONITOR_GROUP|MGxx"Field Value
"ports" <list_value>
"up_delay_time" <value>"MGxx":其中xx为int型数字,标识监控组的序号;"ports":预设端口,执行shutdown、no shutdown的端口组,可为一个或多个端口;"up_delay_time":由admin down切换为admin up时,执行延迟操作。 - 根据权利要求1所述的基于白盒交换机的隔离故障方法,其特征在于,所述配置监控组的状态数据,包括:将所述配置监控组的状态数据存储在STATE_DB数据库中,存在三种状态init、up、down;Key="MONITOR_GROUP_STATE|MGxx";Field Value"state" <init/up/down>MG端口状态,存储在STATE_DB数据库中;Key="MG_PORT|{port}";Field Value"MonitorGroupxx" <up/down>订阅MONITOR_GROUP_STATE|MGxx状态,设置MG|port}的状态。
- 根据权利要求5所述的基于白盒交换机的隔离故障方法,其特征在于,所述订阅MONITOR_GROUP_STATE|MGxx状态,设置MG|port}的状态,包括:订阅MONITOR_GROUP_STATE|MGxx状态,设置MG|port}的状态,portmgrd根据用户配置的shutdown状态和MG_PORT|port}数据,决定下发到硬件的端口admin值。
- 根据权利要求6所述的基于白盒交换机的隔离故障方法,其特征在于,所述订阅MONITOR_GROUP_STATE|MGxx状态,设置MG|port}的状态;portmgrd根据用户配置的shutdown状态和MG_PORT|port}数据,决定下发到硬件的端口admin值的步骤,包括:白盒交换机完成初始化,程序进入工作状态,开启订阅redis的STATE_DB数据库MonitorGroup*;MG默认状态为init,为初始状态,对软数据初始化,不做其他操作;收到订阅信息,MONITOR_GROUP_STATE状态为down时,对预设端口ports中的列表,每个port写入shutdown标记,记录到STATE_DB中,设置对应port的MG_PORT|port}为MonitorGroupxx down;收到订阅信息,MONITOR_GROUP_STATE状态为up时,设置端口对应的MG_PORT|{port}为MonitorGroupxx down;如果STATE是有down变为up的,会执行延迟流程,延迟时间为配置中的up_delay_time时间,这样可以有效防止频繁的updown端口引起的网络抖动;如果是从init状态到up状态则无需延迟;portmgr进程来决定最终下发到硬件的端口admin状态;根据用户配置和admin状态,和MG_PORT|port}中每个监控组的状态,如果有一个标记为down,则下发到硬件admin为down;全为up时,下发到硬件admin为up。
- 一种基于白盒交换机的隔离故障装置,其特征在于,所述装置包括:建立监控组模块,用于在白盒交换机上建立监控组;配置数据模块,用于所述监控组配置预设端口和数据,配置监控组的状态数据;监控组对预设端口执行批量shutdown模块,用于所述白盒交换机检测到自身故障或检测到协议异常时,触发监控组对预设端口执行批量shutdown,隔离故障;预设端口执行批量no shutdown模块,用于故障或协议异常恢复后,对预设端口执行批量no shutdown,所述白盒交换机可以继续供提供服务。
- 一种电子设备,其特征在于,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时,以实现如权利要求1-7中任一项所述的基于白盒交换机的隔离故障方法中的步骤。
- 一种可读存储介质,其特征在于,所述可读存储介质存储有计算机程序,所述计算机程序适于处理器进行加载,以执行如权利要求1-7中任一项所述的基于白盒交换机的隔离故障方法。
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311703073.2 | 2023-12-12 | ||
| CN202311703073.2A CN117857486B (zh) | 2023-12-12 | 2023-12-12 | 一种基于白盒交换机的隔离故障方法 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2025124162A1 true WO2025124162A1 (zh) | 2025-06-19 |
Family
ID=90535682
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2024/135499 Pending WO2025124162A1 (zh) | 2023-12-12 | 2024-11-29 | 一种基于白盒交换机的隔离故障方法、装置、电子设备以及可读存储介质 |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN117857486B (zh) |
| WO (1) | WO2025124162A1 (zh) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN117857486B (zh) * | 2023-12-12 | 2025-08-12 | 天翼云科技有限公司 | 一种基于白盒交换机的隔离故障方法 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104486119A (zh) * | 2014-12-16 | 2015-04-01 | 盛科网络(苏州)有限公司 | 通过改进openflow协议实现批量管理交换机的方法及系统 |
| US20210067539A1 (en) * | 2019-09-03 | 2021-03-04 | At&T Intellectual Property I, L.P. | Software defined network whitebox infection detection and isolation |
| CN115834517A (zh) * | 2022-11-18 | 2023-03-21 | 北京东土军悦科技有限公司 | 故障隔离方法、装置、交换机及存储介质 |
| CN115865742A (zh) * | 2022-11-16 | 2023-03-28 | 天翼云科技有限公司 | 一种白盒交换机单向链路故障检测方法及系统 |
| CN117857486A (zh) * | 2023-12-12 | 2024-04-09 | 天翼云科技有限公司 | 一种基于白盒交换机的隔离故障方法 |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103973560B (zh) * | 2013-02-04 | 2018-01-12 | 新华三技术有限公司 | 一种irf系统中堆叠链路故障处理的方法和装置 |
| US11997026B2 (en) * | 2021-03-22 | 2024-05-28 | Nokia Solutions And Networks Oy | Safe port removal |
| CN115827382B (zh) * | 2022-11-30 | 2025-08-29 | 苏州浪潮智能科技有限公司 | 一种交换机状态信息监控系统、方法、装置及存储介质 |
| CN116319264A (zh) * | 2023-04-07 | 2023-06-23 | 北京达佳互联信息技术有限公司 | 处理多端口故障的方法和装置 |
-
2023
- 2023-12-12 CN CN202311703073.2A patent/CN117857486B/zh active Active
-
2024
- 2024-11-29 WO PCT/CN2024/135499 patent/WO2025124162A1/zh active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104486119A (zh) * | 2014-12-16 | 2015-04-01 | 盛科网络(苏州)有限公司 | 通过改进openflow协议实现批量管理交换机的方法及系统 |
| US20210067539A1 (en) * | 2019-09-03 | 2021-03-04 | At&T Intellectual Property I, L.P. | Software defined network whitebox infection detection and isolation |
| CN115865742A (zh) * | 2022-11-16 | 2023-03-28 | 天翼云科技有限公司 | 一种白盒交换机单向链路故障检测方法及系统 |
| CN115834517A (zh) * | 2022-11-18 | 2023-03-21 | 北京东土军悦科技有限公司 | 故障隔离方法、装置、交换机及存储介质 |
| CN117857486A (zh) * | 2023-12-12 | 2024-04-09 | 天翼云科技有限公司 | 一种基于白盒交换机的隔离故障方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN117857486A (zh) | 2024-04-09 |
| CN117857486B (zh) | 2025-08-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20200267069A1 (en) | Link switching method, link switching device, network communication system, and computer-readable storage medium | |
| US9507678B2 (en) | Non-disruptive controller replacement in a cross-cluster redundancy configuration | |
| JP5187249B2 (ja) | 冗長化システム用コネクションリカバリ装置,方法および処理プログラム | |
| US11057275B1 (en) | Method and system for achieving high availability of a primary network controller in a network controller cluster using distributed network device state information | |
| CN109101196A (zh) | 主节点切换方法、装置、电子设备及计算机存储介质 | |
| CN113839862B (zh) | Mclag邻居之间同步arp信息的方法、系统、终端及存储介质 | |
| CN115333991A (zh) | 跨设备链路聚合方法、装置、系统及计算机可读存储介质 | |
| CN100407646C (zh) | 一种实现数据业务备份的方法 | |
| CN106330786A (zh) | Mac地址的同步方法、装置及系统 | |
| CN112165429B (zh) | 分布式交换设备的链路聚合收敛方法和设备 | |
| TW202103475A (zh) | 終端設備管理方法、伺服器及終端設備 | |
| WO2021185169A1 (zh) | 一种切换方法、装置、设备和存储介质 | |
| WO2017113929A1 (zh) | 一种软件定义网络中控制转发设备集群的方法及控制器 | |
| CN108574583A (zh) | 一种设备升级方法及接入设备 | |
| CN117221216A (zh) | 网络设备故障处理方法、装置、电子设备及存储介质 | |
| CN117857486B (zh) | 一种基于白盒交换机的隔离故障方法 | |
| CN116248581B (zh) | 一种基于sdn的云场景网关集群主备切换方法及系统 | |
| CN115499296B (zh) | 一种云桌面热备管理方法、装置及系统 | |
| WO2024113894A1 (zh) | 一种远程复制关系的建立方法及相关装置 | |
| WO2024027217A1 (zh) | 一种虚拟化核心网的时间敏感实现方法及系统 | |
| CN112003929B (zh) | 一种基于RabbitMQ集群热修复的方法、系统、设备及介质 | |
| CN116155795B (zh) | 路由更新方法及装置 | |
| CN118540306A (zh) | Mlag环境下的mac实时迁移与探测更新方法、设备及介质 | |
| US11994992B2 (en) | Takeover method and apparatus for cache partition recovery, device and readable medium | |
| CN118069719A (zh) | 一种适用于复合形态的云数据库虚拟ip绑定方法 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 24902584 Country of ref document: EP Kind code of ref document: A1 |