A white-box switching device and an open network operating system version switching method thereof

By combining a bootloader and a hardware watchdog, the self-recovery problem of white-box switching devices when the software version is abnormal is solved, realizing automated primary and backup version switching and ensuring the stable operation of network devices in unattended scenarios.

CN122363742APending Publication Date: 2026-07-10NEW H3C TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NEW H3C TECH CO LTD
Filing Date
2026-03-27
Publication Date
2026-07-10

AI Technical Summary

Technical Problem

White-box switching devices are difficult to self-recover in the event of software version upgrades or abnormalities, resulting in network interruptions and service jitter, especially in unattended scenarios where they lack automated processing capabilities.

Method used

The platform firmware bootloader is introduced, which reads the primary/standby switchover enable flag and uses the processor's built-in hardware watchdog to achieve primary/standby version switching. The timeout is modified to automatically execute the version switching process.

Benefits of technology

It enables automated primary/backup version switching in unattended scenarios, reducing manual intervention and ensuring network stability and business continuity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122363742A_ABST
    Figure CN122363742A_ABST
Patent Text Reader

Abstract

The application provides a white box switching device and an open network operating system version switching method thereof. The method comprises the following steps: a platform firmware starts a bootloader; the bootloader is used to load and start an open network operating system; the bootloader reads a master-slave switching enabling flag; when the enabling flag is enabled, the bootloader opens a hardware watchdog in a processor, modifies a default timeout time of the hardware watchdog to a specified timeout time, and executes a master-slave version switching process; or when the enabling flag is not enabled, the bootloader keeps the hardware watchdog in a closed state, and starts a default version of the open network operating system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to communication technology, specifically a white-box switching device and its open network operating system version switching method. Background Technology

[0002] To meet the needs of multi-chip platform adaptation and rapid iteration, white-box switching devices often adopt an open network operating system (NOS) architecture based on Linux (Linux Kernel), and are typically booted by GRUB (GRand Unified Bootloader). During system operation, network functions such as routing, management, and monitoring are deployed in containers. They can interface with application-specific integrated circuit (ASIC) switching chips from different manufacturers through the Switch Abstraction Interface (SAI) to reduce hardware and software coupling.

[0003] However, the open network operating systems (e.g., SONiC systems) used in white-box switching devices typically focus more on SAI-based switching capability abstraction and network protocol stack development. Furthermore, their hardware-software decoupling and platform diversity make it difficult to rely on or coordinate with dedicated board-level hardware such as CPLDs to achieve automatic primary / backup failover / rollback of operating system software versions. Therefore, the existing software version failover mechanism based on "dedicated bootloader + dedicated CPLD" in existing box-type / chassis-type commercial switching devices is difficult to directly migrate or extend to the aforementioned white-box switching device architecture using the general GRUB + Linux boot link.

[0004] White-box switching devices are typically deployed in data center leaf-spine networks, campus aggregation / core networks, and cloud resource pool access scenarios. Anomalies during startup can cause port link interruptions, loss of control plane neighbor relationships, and reconvergence of service traffic, potentially leading to rack-level or network domain-level service jitter. Especially in unattended data centers or large-scale cluster deployments, the devices need self-recovery capabilities in cases of software upgrade failures, image corruption, or configuration anomalies to reduce the need for on-site intervention and troubleshooting time. Summary of the Invention

[0005] The purpose of this application is to provide a method and device for software version master / slave switching in an open network operating system.

[0006] To achieve the above objectives, this application provides a method for switching versions of an open network operating system in a white-box switching device. The method involves a platform firmware bootloader; the bootloader loads and starts the open network operating system; the bootloader reads a primary / standby switchover enable flag; when the enable flag is enabled, the bootloader activates the processor's built-in hardware watchdog, modifies the default timeout of the hardware watchdog to a specified timeout, and performs primary / standby version switchover processing; alternatively, when the enable flag is disabled, the bootloader keeps the hardware watchdog disabled and starts the default version of the open network operating system.

[0007] To achieve the above objectives, this application also provides a white-box switching device; the white-box switching device has a processor and a machine-readable storage medium; the processor executes machine-executable instructions recorded on the machine-readable storage medium to perform the following operations: the platform firmware starts a bootloader; the bootloader is used to load and start an open network operating system; the bootloader reads a primary / standby switchover enable flag; when the enable flag is enabled, the bootloader enables the processor's built-in hardware watchdog, modifies the default timeout of the hardware watchdog to a specified timeout, and performs primary / standby version switchover processing; or, when the enable flag is disabled, the bootloader keeps the hardware watchdog in a disabled state and starts the default version of the open network operating system.

[0008] The beneficial effect of this application is that, based on the software architecture of an open network system that does not require modification of the current white-box switching equipment, it can enable the white-box switching equipment in unattended scenarios to automatically perform primary and backup version switching without human intervention. Attached Figure Description

[0009] Figure 1 A flowchart illustrating an embodiment of the method for switching open network operating system versions of a white-box switching device provided in this application; Figure 2 A flowchart illustrating an embodiment of software version switching of an open network operating system in a historically successful boot state for the white-box switching device provided in this application; Figure 3 A flowchart illustrating an embodiment of software version switching of an open network operating system in a historical boot failure state for the white-box switching device provided in this application; Figure 4 A flowchart illustrating an embodiment of software version switching of an open network operating system for a white-box switching device provided in this application when a historical boot failure reaches a threshold; Figure 5 This is a schematic diagram of an embodiment of the white-box switching device provided in this application. Detailed Implementation

[0010] The following detailed description will be provided with reference to several examples illustrated in the accompanying figures. In this detailed description, numerous specific details are used to provide a comprehensive understanding of the present application. Known methods, steps, components, and circuits are not described in detail in the examples to avoid obscuring their meaning.

[0011] In the terminology used, the term "including" means including but not limited to; the term "containing" means including but not limited to; the terms "above," "within," and "below" include the number itself; the terms "greater than" and "less than" mean not including the number itself. The term "based on" means based on at least a portion of them.

[0012] Figure 1 A flowchart of an embodiment of the method for switching open network operating system versions of a white-box switching device provided in this application; the embodiment includes the following steps: Step 101, the platform firmware starts the bootloader; the bootloader is used to load and start the open network operating system; The BIOS (Basic Input / Output System) or other platform firmware of the white-box switching device boots GRUB.

[0013] Step 102: The bootloader reads the primary / standby switchover enable flag and determines whether the primary / standby version switching process is enabled; if yes, proceed to step 103; otherwise, proceed to step 104. After GRUB starts, it reads the primary / standby switchover enable flag. If the flag is set, it indicates that primary / standby version switching processing has been started; if the flag is not set, it indicates that primary / standby version switching processing has not been started.

[0014] Step 103: The bootloader enables the processor's built-in hardware watchdog, modifies the default timeout of the hardware watchdog to a specified timeout, and performs the primary / backup version switchover. The hardware watchdog is disabled by default with a default timeout of 2 seconds. GRUB determines that the primary / standby failover enable flag is set, and then enables the hardware watchdog, modifying the default timeout to a specified timeout used to trigger a reset of the open network operating system, such as 300 seconds.

[0015] Currently, CPLD watchdogs are commonly used to monitor the current operating status of a system. The maximum timeout of a watchdog is usually in the second range, such as 32 seconds, 64 seconds, 90 seconds, etc., which cannot achieve timeout monitoring for system-level startup. Intel TCO watchdogs support timeouts in the minute range, up to 10 minutes, which meets the startup time requirements of most systems.

[0016] Step 104: The bootloader keeps the hardware watchdog off and starts the default version of the open network operating system.

[0017] GRUB checks that the primary / standby failover enable flag is set, and maintains the default disabled state and default timeout of the hardware watchdog. GRUB then boots the default version of the open network operating system.

[0018] Figure 1 The beneficial effect of this embodiment is that, based on the software architecture of an open network system that does not require modification of the current white-box switching device, this application can enable the white-box switching device to automatically perform primary / backup version switching in unattended scenarios without human intervention.

[0019] Figure 2 A flowchart illustrating an embodiment of software version switching of an open network operating system in a historically successful boot state for a white-box switching device provided in this application; the embodiment includes: Step 201: The bootloader reads the boot failure status flag and determines that the previous boot of the open network operating system was successful based on the unset boot failure flag. After GRUB enables the hardware watchdog and starts the primary / standby version switchover process, it first checks whether boot_failed_flag is set. If boot_failed_flag is set, it means that the previous boot of the open network operating system of the white-box switch device was successful.

[0020] Step 202: The bootloader sets the boot failure flag and starts the current primary version of the open network operating system; GRUB sets the boot_failed_flag flag so that if the current boot of the open operating system fails, GRUB will not clear the boot_failed_flag flag before the hardware watchdog overflows, allowing the bootloader to recognize the previous boot failure.

[0021] GRUB boots the current primary system of the open network operating system.

[0022] Step 203: The open network operating system completes the startup critical service, clears the startup failure flag, and disables the hardware watchdog. Critical services refer to the basic service processes that enable white-box switching devices to provide switching and forwarding capabilities after the open network operating system starts up.

[0023] The open network operating system of the white-box switch has started up successfully, and the critical services of the white-box switch have also started up successfully.

[0024] Once the open network operating system completes its boot process, it clears boot_failed_flag, ensuring that the next time GRUB is loaded and run, the operating system's boot state is based on the previous open network operation's successful boot status in boot_failed_flag.

[0025] An open network operating system disables the hardware watchdog timer, turns it off, and stops the timer.

[0026] Step 204: The bootloader receives a reset signal generated by the hardware watchdog when the specified timeout period is reached, triggering an open network system reset.

[0027] Figure 3 A flowchart illustrating an embodiment of software version switching of an open network operating system in a historical boot failure state for a white-box switching device provided in this application; the embodiment includes: Step 301: The bootloader reads the boot failure status flag and determines the previous boot failure of the open network operating system based on the set boot failure flag. After GRUB enables the hardware watchdog and starts the primary / standby version switchover process, it reads that boot_failed_flag is set; this confirms that the previous boot of the open network operating system of the white-box switch device failed.

[0028] Step 302: The bootloader determines that the total number of boot failures of the open network operating system has not exceeded the threshold, increments the count of the total number of boot failures by 1, sets the boot failure flag, and starts the current primary version of the open network operating system. GRUB reads boot_failed_count to get the total number of boot failures. If the boot_failed_count is not equal to the threshold, such as three times, then boot_failed_flag is set again. In this way, if the current boot of the open operating system fails, GRUB will not clear boot_failed_flag before the hardware watchdog overflows, so GRUB can recognize the previous boot failure.

[0029] Step 303: The open network operating system completes the startup critical service, clears the startup failure flag, and disables the hardware watchdog. Step 304: The bootloader receives a reset signal generated by the hardware watchdog when the specified timeout period is reached, triggering an open network system reset.

[0030] Figure 4 A flowchart illustrating an embodiment of software version switching of an open network operating system in a white-box switching device provided in this application when historical boot failures reach a threshold; this embodiment includes the following steps: Step 401: The bootloader reads the boot failure status flag and determines the previous boot failure of the open network operating system based on the set boot failure flag. After GRUB enables the hardware watchdog and starts the primary / standby version switchover process, it reads that boot_failed_flag is set; this confirms that the previous boot of the open network operating system of the white-box switch device failed.

[0031] Step 402: The bootloader determines that the total number of boot failures of the open network operating system exceeds the threshold, clears the count of the total number of boot failures, and switches the current standby version to the new primary version. GRUB reads boot_failed_count to get the total number of boot failures; if the boot_failed_count value is equal to the threshold, it clears the boot_failed_count value and switches the standby version to the new primary version.

[0032] Step 403: The open network operating system completes the startup critical services, clears the startup failure flag, and disables the hardware watchdog; when Step 404: The bootloader receives a reset signal generated by the hardware watchdog when the specified timeout period is reached, triggering an open network system reset.

[0033] Figure 5 This is a schematic diagram of an embodiment of the white-box switching device provided in this application. The white-box switching device 50 has a processor and a machine-readable storage medium; the processor executes machine-executable instructions recorded on the machine-readable storage medium to perform the following operations: the platform firmware starts a bootloader; the bootloader is used to load and start an open network operating system; the bootloader reads a primary / standby switchover enable flag; when the enable flag is enabled, the bootloader enables the processor's built-in hardware watchdog, modifies the default timeout of the hardware watchdog to a specified timeout, and performs primary / standby version switchover processing; or, when the enable flag is disabled, the bootloader keeps the hardware watchdog in a disabled state and starts the default version of the open network operating system.

[0034] The processor executes the primary / backup version switching process by running machine-executable instructions recorded on a machine-readable storage medium, including the following operations: the bootloader reads the boot failure status flags, determines the previous boot success of the open network operating system based on the unset boot failure flags, the bootloader sets the boot failure flags, and boots the current primary version of the open network operating system. When the open network operating system completes the startup of critical services, it clears the startup failure flag and disables the hardware watchdog; or, when the bootloader receives a reset signal generated by the hardware watchdog when the specified timeout period has elapsed, it triggers a reset of the open network system.

[0035] The processor executes machine-executable instructions recorded on a machine-readable storage medium to perform primary / backup version switching processing, including the following operations: the bootloader reads the boot failure status flags and determines the previous boot failure of the open network operating system based on the set boot failure flags; the bootloader determines that the total number of boot failures of the open network operating system has not exceeded the threshold, increments the total number of boot failures by 1, sets the boot failure flags, and starts the current primary version of the open network operating system; when the open network operating system completes the startup of critical services, it clears the boot failure flags and disables the hardware watchdog; or, the bootloader receives a reset signal generated by the hardware watchdog when a specified timeout period arrives, triggering a reset of the open network system.

[0036] The processor executes machine-executable instructions recorded on a machine-readable storage medium to perform the primary / standby version switching process, including the following operations: the bootloader reads the boot failure status flags and determines the previous boot failure of the open network operating system based on the set boot failure flags; the bootloader determines that the total number of boot failures of the open network operating system exceeds a threshold, clears the total number of boot failures count, and switches the current standby version to the new primary version; when the open network operating system completes the startup of critical services, it clears the boot failure flags and disables the hardware watchdog; or, when the bootloader receives a reset signal generated by the hardware watchdog when a specified timeout period has elapsed, it triggers a reset of the open network system.

[0037] In this application, a machine-readable storage medium can be any electronic, magnetic, optical, or other physical storage device used to store or contain information (such as executable instructions, data, etc.). For example, any machine-readable storage medium herein can be any type of random access memory (RAM), volatile memory, non-volatile memory, flash memory, storage drive (such as a hard disk drive), solid-state drive, any type of optical disc (such as an optical disc, DVD, etc.), and similar devices, or combinations thereof. Furthermore, any machine-readable storage medium described herein can be a non-transitory machine-readable storage medium.

[0038] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for switching versions of an open network operating system in a white-box switching device, characterized in that, The method includes, The platform firmware bootloader is used to load and start an open network operating system. The bootloader reads the primary / standby switchover enable flag; When the enable flag is set to enabled, the bootloader activates the processor's built-in hardware watchdog, modifies the default timeout of the hardware watchdog to a specified timeout, and performs a primary / backup version switchover; or... When the enable flag is disabled, the bootloader keeps the hardware watchdog off and starts the default version of the open network operating system.

2. The method according to claim 1, characterized in that, The process of performing primary / standby version switching includes, The bootloader reads the boot failure status flag and determines that the previous boot of the open network operating system was successful based on the unset boot failure flag. The bootloader sets the startup failure flag and starts the current primary version of the open network operating system; The open network operating system completes the startup of critical services by disabling the hardware watchdog; or... The bootloader receives a reset signal generated by the hardware watchdog when the specified timeout period is reached, triggering a reset of the open network system.

3. The method according to claim 1, characterized in that, The process of performing primary / standby version switching includes, The bootloader reads the boot failure status flag and determines the previous boot failure of the open network operating system based on the set boot failure flag. The bootloader determines that the total number of startup failures of the open network operating system has not exceeded the threshold, increments the count value of the total number of startup failures by 1, sets the startup failure flag bit, and starts the current primary version of the open network operating system. The open network operating system completes the startup of critical services, clears the startup failure flag, and disables the hardware watchdog. or, The bootloader receives a reset signal generated by the hardware watchdog when the specified timeout period is reached, triggering a reset of the open network system.

4. The method according to claim 1, characterized in that, The process of performing primary / standby version switching includes, The bootloader reads the boot failure status flag and determines the previous boot failure of the open network operating system based on the set boot failure flag. The bootloader determines that the total number of boot failures of the open network operating system exceeds a threshold, clears the count of the total number of boot failures to zero, and switches the current backup version to the new primary version. The open network operating system completes the startup of critical services, clears the startup failure flag, and disables the hardware watchdog. or, The reset signal generated by the bootloader when the specified timeout period is reached triggers a reset of the open network system.

5. A white-box switching device, characterized in that, The white-box switching device has a processor and a machine-readable storage medium; The processor performs the following operations by executing machine-executable instructions recorded on the machine-readable storage medium. The platform firmware bootloader is used to load and start an open network operating system. The bootloader reads the primary / standby switchover enable flag; When the enable flag is set to enabled, the bootloader activates the processor's built-in hardware watchdog, modifies the default timeout of the hardware watchdog to a specified timeout, and performs a primary / backup version switchover; or... When the enable flag is disabled, the bootloader keeps the hardware watchdog off and starts the default version of the open network operating system.

6. The white-box switching device according to claim 5, characterized in that, The processor performs the primary / standby version switchover process by executing machine-executable instructions recorded on the machine-readable storage medium, including the following operations. The bootloader reads the boot failure status flag and determines that the previous boot of the open network operating system was successful based on the unset boot failure flag. The bootloader sets the startup failure flag and starts the current primary version of the open network operating system; The open network operating system completes the startup of critical services, clears the startup failure flag, and disables the hardware watchdog. or, The bootloader receives a reset signal generated by the hardware watchdog when the specified timeout period is reached, triggering a reset of the open network system.

7. The white-box switching device according to claim 6, characterized in that, The processor performs the primary / standby version switchover process by executing machine-executable instructions recorded on the machine-readable storage medium, including the following operations. The bootloader reads the boot failure status flag and determines the previous boot failure of the open network operating system based on the set boot failure flag. The bootloader determines that the total number of startup failures of the open network operating system has not exceeded the threshold, increments the count value of the total number of startup failures by 1, sets the startup failure flag bit, and starts the current primary version of the open network operating system. The open network operating system completes the startup of critical services, clears the startup failure flag, and disables the hardware watchdog. or, The bootloader receives a reset signal generated by the hardware watchdog when the specified timeout period is reached, triggering a reset of the open network system.

8. The white-box switching device according to claim 5, characterized in that, The processor performs the primary / standby version switchover process by executing machine-executable instructions recorded on the machine-readable storage medium, including the following operations. The bootloader reads the boot failure status flag and determines the previous boot failure of the open network operating system based on the set boot failure flag. The bootloader determines that the total number of boot failures of the open network operating system exceeds a threshold, clears the count of the total number of boot failures to zero, and switches the current backup version to the new primary version. The open network operating system completes the startup of critical services, clears the startup failure flag, and disables the hardware watchdog; or... The bootloader receives a reset signal generated by the hardware watchdog when the specified timeout period is reached, triggering a reset of the open network system.