System and method for hierarchically starting network switch
Through a hierarchical startup network switch system, the use of MiniSDK and lightweight operating system cores to achieve rapid startup and seamless switching, solving the problem of long startup time of traditional network switches and improving network continuity and stability.
Patent Information
- Application Number
- CN202411681571.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-04-11
AI Technical Summary
Traditional network switches need to load a complete operating system and software development toolkit during startup, resulting in a long startup time and cannot meet the needs of fast startup.
The hierarchical startup method is adopted, including network switch chips, streamlined software development toolkit MiniSDK, lightweight operating system kernel and switching module. After startup, the MiniSDK completes the initialization of the Layer 2 communication function. The lightweight operating system kernel uses the Layer 2 communication function to forward and process network traffic, loads the Layer 3 communication module in parallel, and the switching module detects the loading status of the Layer 3 communication module and seamlessly switches to the complete system.
It realizes the activation of Layer 2 communication function in a short time and quickly restores basic network services. The switch loads the complete Layer 3 functions in the background without restarting or interrupting services, achieving seamless switching, ensuring the continuity and stability of the network, and shortening the network failure recovery time.
Smart Images

Figure CN119814703A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of network communication, and in particular to a system and method for hierarchically starting a network switch. Background Art
[0002] Traditional network switches need to load a complete operating system and software development kit (SDK) during the startup process.
[0003] Normally, the switch needs to be started through Boot. Boot refers to the first software loaded when the computer starts, namely BIOS (Basic Input Output System). BIOS is responsible for initializing the hardware and loading the operating system; then loading the switch chip driver, upper layer protocol and configuration file in sequence. It will take a long time to start, and cannot meet the user's requirements for fast network startup and connectivity in a specific environment. Summary of the invention
[0004] The present invention provides a system and method for hierarchical startup of a network switch, aiming to solve the problem that the switch startup process in traditional technical solutions takes a long time.
[0005] In a first aspect, a system for a hierarchical startup network switch is provided, comprising:
[0006] Network switch chips, simplified software development kit MiniSDK, lightweight operating system kernel and switching module;
[0007] The network switch chip is used to start the MiniSDK when powered on or restarted;
[0008] MiniSDK, used to initialize the Layer 2 communication function after startup;
[0009] A lightweight operating system kernel that uses Layer 2 communication functions to forward and process network traffic and load Layer 3 communication modules in parallel;
[0010] The switching module is used to detect the loading status of the three-layer communication module. When the loading is completed, it seamlessly switches to the complete system of the network switch.
[0011] Furthermore, the hierarchically-activated network switch system further includes:
[0012] The diskless boot program bootROM in the network switch chip, which contains the boot code;
[0013] BootROM is used to execute the startup code and guide MiniSDK to start when the network switch chip is powered on or restarted.
[0014] Furthermore, MiniSDK includes basic protocol stack, layer 2 communication function and minimized management and control function;
[0015] The basic protocol stack is a basic network protocol stack used to support basic network communication requirements;
[0016] The Layer 2 communication functions include Ethernet frame receiving function, Ethernet frame sending function, MAC address learning function and MAC address forwarding function;
[0017] Minimum management and control functions include basic device management and control functions to support basic management functions.
[0018] Furthermore, MiniSDK also includes:
[0019] The pre-loading and pre-configuration unit is used to pre-load the preset configuration information and preset parameters when the MiniSDK is started to speed up the initialization process;
[0020] Quick startup algorithm program, used to optimize the startup algorithm of MiniSDK to speed up the initialization process;
[0021] Minimize the startup sequence to optimize the startup process of MiniSDK and speed up MiniSDK to reach a state where it can handle basic network communications.
[0022] Furthermore, the lightweight operating system kernel is the Linux kernel.
[0023] Furthermore, the switching module includes:
[0024] A routing table and forwarding table updating unit, used to gradually update the routing table and the layer 2 forwarding table using an incremental update and synchronization mechanism during the seamless switching process;
[0025] Access control list ACL and security policy update unit, used to gradually update ACL and security policy during seamless switching;
[0026] A cache and flow table update unit, used to update and adjust the cache and flow table using a preset intelligent flow table management algorithm during seamless switching;
[0027] The forwarding engine and processing pipeline stabilization unit is used to maintain the stability of the forwarding engine and the processing pipeline during the seamless switching process.
[0028] In a second aspect, a method for hierarchically booting a network switch is provided, which is applied to a system of a hierarchically booting network switch, wherein the system of the hierarchically booting network switch includes a network switch chip, a simplified software development kit MiniSDK, a lightweight operating system kernel, and a switching module, and the method includes:
[0029] When the network switch chip is powered on or restarted, the MiniSDK is started;
[0030] After MiniSDK is started, the initialization of the Layer 2 communication function is completed;
[0031] The lightweight operating system kernel uses the Layer 2 communication function to forward and process network traffic and loads the Layer 3 communication module in parallel;
[0032] The switching module detects the loading status of the three-layer communication module, and when the loading is completed, it seamlessly switches to the complete system of the network switch.
[0033] Further, a diskless boot program bootROM in the network switch chip, the bootROM contains the boot code;
[0034] When the network switch chip is powered on or restarted, the bootROM executes the startup code to guide the MiniSDK to start.
[0035] Furthermore, MiniSDK includes basic protocol stack, layer 2 communication function and minimized management and control function;
[0036] The basic protocol stack is a basic network protocol stack used to support basic network communication requirements;
[0037] The Layer 2 communication functions include Ethernet frame receiving function, Ethernet frame sending function, MAC address learning function and MAC address forwarding function;
[0038] Minimum management and control functions include basic device management and control functions to support basic management functions.
[0039] Furthermore, MiniSDK also includes:
[0040] Preload preconfigured units, fast start algorithm programs and minimized startup sequences;
[0041] When MiniSDK is started, the pre-loading pre-configuration unit pre-loads the preset configuration information and preset parameters to speed up the initialization process;
[0042] Quick startup algorithm program optimization MiniSDK startup algorithm speeds up the initialization process;
[0043] Minimize the startup sequence to optimize the MiniSDK startup process and speed up the MiniSDK to reach a state where it can handle basic network communications.
[0044] Beneficial effects of the present invention:
[0045] The system of the hierarchically started network switch includes a network switch chip, a simplified software development kit MiniSDK, a lightweight operating system kernel and a switching module; the network switch chip is used to start the MiniSDK when powered on or restarted; the MiniSDK is used to complete the initialization of the second-layer communication function after startup; the lightweight operating system kernel is used to forward and process network traffic using the second-layer communication function and load the third-layer communication module in parallel; the switching module is used to detect the loading status of the third-layer communication module and seamlessly switch to the complete system of the network switch when the loading is completed. By using MiniSDK, the second-layer communication function can be started in a short time and the basic network service can be quickly restored; the switch loads the complete third-layer function in the background without restarting or interrupting the service, and can achieve seamless switching, ensuring the continuity and stability of the network; when the network fails or the network switch restarts, the ability of fast startup and seamless switching can shorten the recovery time, reduce the network interruption time, improve network stability, and enhance user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0047] Figure 1 is a structural diagram of a system of a hierarchically enabled network switch of the present invention;
[0048] Figure 2 is a structural diagram of a switching module of the present invention;
[0049] Figure 3 It is a flow chart of the method of hierarchical startup of a network switch of the present invention. DETAILED DESCRIPTION
[0050] To make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be described in detail below. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other implementation methods obtained by ordinary technicians in this field without creative work belong to the scope of protection of the present invention.
[0051] like Figure 1 As shown, this embodiment provides a system of a hierarchical startup network switch, including:
[0052] Network switch chip 101, simplified software development kit MiniSDK 102, lightweight operating system kernel 103 and switching module 104;
[0053] The network switch chip 101 has a diskless boot program bootROM, which contains a boot code. The bootROM is a read-only memory (ROM) in the network switch chip 101. When the network switch chip 101 is powered on or restarted, the boot code is executed to prepare for subsequent boot loading and operating system startup. The BootROM is the lowest and most basic link in the chip's startup chain and cannot be modified.
[0054] The bootROM startup code will first perform hardware initialization (such as processor, memory controller, peripherals, etc.). After completing the hardware initialization, once a valid boot loader is found, the bootROM will copy it to the memory and jump the PC pointer to it, thereby transferring the CPU control to the boot loader. After the boot loader takes over, it is responsible for further initialization and loading the next-level boot program or operating system program and user program, etc.
[0055] BootROM is used to execute the startup code and guide MiniSDK102 to start when the network switch chip is powered on or restarted;
[0056] Compared with the existing SDK, MiniSDK102 has been streamlined, mainly by streamlining and optimizing key network functions so that it can be quickly started and run in a short time;
[0057] MiniSDK102 includes basic protocol stack, Layer 2 communication function and minimized management and control function;
[0058] The basic protocol stack is a basic network protocol stack, such as the core functions of the TCP / IP protocol family (such as IP, TCP, UDP, etc.), which is used to support basic network communication needs;
[0059] The Layer 2 communication functions include Ethernet frame receiving function, Ethernet frame sending function, MAC address learning function and MAC address forwarding function;
[0060] Minimum management and control functions include basic device management and control functions, such as basic remote management interface or configuration interface, to support basic management functions;
[0061] MiniSDK102, used to initialize the Layer 2 communication function after startup;
[0062] The lightweight operating system kernel 103 is the Linux kernel. The Linux kernel is a good platform for producing operating systems and open source software and testing new protocols and their enhancements. The Linux kernel supports a large number of network protocols, including typical TCP / IP protocols and extensions for high-speed networks. The Linux kernel can also support protocols such as the Stream Control Transmission Protocol (SCTP).
[0063] The lightweight operating system kernel 103 can use the layer 2 communication function to forward and process network traffic and load the layer 3 communication module in parallel; the layer 2 communication function is the data link layer communication, located at the second layer of the OSI model, and is mainly responsible for data frames on the transmission medium, using MAC addresses to identify physical devices (such as network cards) and providing direct point-to-point communication, which is suitable for communication between hosts in a local area network (LAN); the layer 3 communication is also called the network layer communication, located at the third layer of the OSI model, and is mainly responsible for communication between networks; it uses IP addresses to identify hosts and subnets on the network and provides logical end-to-end communication, which is suitable for communication between hosts across different networks; therefore, the layer 3 communication module is used to support routing protocols, access control lists (ACLs), etc. for layer 3 communication;
[0064] The switching module 104 is used to detect the loading status of the three-layer communication module, and when the loading is completed, seamlessly switch to the complete system of the network switch. After switching to the complete system of the network switch, the three-layer communication function can be realized, and the forwarding of the network process will not be interrupted during the seamless switching process.
[0065] The implementation principle of the embodiment of the present invention is:
[0066] The system of the hierarchically started network switch includes a network switch chip 101, MiniSDK 102, a lightweight operating system kernel 103 and a switching module 104; the network switch chip 101 is used to start MiniSDK 102 when powered on or restarted; MiniSDK 102 is used to complete the initialization of the second-layer communication function after startup; the lightweight operating system kernel 103 is used to forward and process network traffic using the second-layer communication function and load the third-layer communication module in parallel; the switching module 104 is used to detect the loading status of the third-layer communication module, and when the loading is completed, seamlessly switch to the complete system of the network switch;
[0067] By using MiniSDK, the Layer 2 communication function can be started in a short time and basic network services can be quickly restored;
[0068] The switch loads complete Layer 3 functions in the background, without restarting or interrupting services, and can achieve seamless switching, ensuring the continuity and stability of the network;
[0069] In the event of a network failure or switch restart, the ability to quickly start and seamlessly switch can shorten recovery time, reduce network interruption time, improve network stability, and enhance user experience.
[0070] Combination Figure 1 In the embodiment shown, preferably, in some embodiments of the present invention, MiniSDK102 further includes:
[0071] The pre-loading and pre-configuration unit is used to pre-load preset configuration information and preset parameters when MiniSDK102 is started to speed up the initialization process;
[0072] Quick startup algorithm program, used to optimize the startup algorithm of MiniSDK102 and speed up the initialization process;
[0073] Minimize the startup sequence to optimize the startup process of MiniSDK102 and speed up MiniSDK102 to reach a state where it can handle basic network communications.
[0074] The pre-loaded pre-configuration unit, quick startup algorithm program and minimized startup sequence in MiniSDK102 realize the quick startup and initialization speed optimization of MiniSDK102, which takes less time than the prior art which requires a complete startup SDK.
[0075] Since there are many key data structures and states that need to be synchronized and updated during the switching process to ensure the continuity of network services during the operation of the network switch, the switching module 104 also needs to perform the following actions while performing seamless switching:
[0076] Combination Figure 1 The embodiments shown, preferably, in some embodiments of the present invention, as Figure 2 As shown, the switching module 104 includes:
[0077] The routing table and forwarding table updating unit 201 is used to gradually update the routing table and the layer 2 forwarding table using an incremental update and synchronization mechanism during the seamless switching process; that is, the old state is maintained during the update process and gradually switched to the new state to ensure that the network switch does not cause packet loss or service interruption when updating the routing table;
[0078] The ACL and security policy updating unit 202 is used to gradually update the ACL and security policy during the seamless switching process; ensure that the access rights of existing traffic are maintained when the ACL is updated, and gradually apply the new security policy to achieve;
[0079] The cache and flow table update unit 203 is used to update and adjust the cache and flow table using a preset intelligent flow table management algorithm during the seamless switching process; the network switch usually uses cache and flow table to accelerate the forwarding of data packets, and the cache and flow table update adjustment is to ensure that the new data packet forwarding rules and policies can be correctly applied. It is usually necessary to use an intelligent flow table management algorithm to avoid large-scale flow table reloading during the update process, thereby minimizing the impact on performance;
[0080] The forwarding engine and processing pipeline stabilization unit 204 is used to stabilize the forwarding engine and processing pipeline during seamless switching; in the transition from MiniSDK to the complete system, these components need to be able to seamlessly switch to new configurations and operating modes while maintaining correct processing of the data packets being processed.
[0081] It should be noted that network switches usually use a separate architecture for the control plane and the data plane. During the seamless switching process, the control plane is responsible for updating and managing the network status, while the data plane is responsible for actual packet forwarding and processing. By ensuring that the control plane can effectively manage and synchronize the status of the data plane during the update process, imperceptible switching can be achieved.
[0082] The above embodiments describe a system of a hierarchically-enabled network switch. The following describes a method of hierarchically-enabled network switch applied to the system of a hierarchically-enabled network switch through embodiments.
[0083] like Figure 3 As shown, this embodiment provides a method for hierarchically starting a network switch, including:
[0084] 301, when the network switch chip is powered on or restarted, the MiniSDK is started;
[0085] The diskless boot program bootROM in the network switch chip contains the boot code. When the network switch chip is powered on or restarted, the bootROM executes the boot code and guides the MiniSDK to start.
[0086] 302, after MiniSDK is started, the initialization of the layer 2 communication function is completed;
[0087] MiniSDK includes basic protocol stack, layer 2 communication function and minimal management and control function; the basic protocol stack is a basic network protocol stack used to support basic network communication needs; the layer 2 communication function includes Ethernet frame receiving function, Ethernet frame sending function, MAC address learning function and MAC address forwarding function; the minimal management and control function includes basic device management and control functions to support basic management functions;
[0088] MiniSDK also includes: pre-loaded pre-configured units, fast startup algorithm programs and minimized startup sequences;
[0089] When MiniSDK starts, the pre-loaded pre-configuration unit pre-loads the preset configuration information and preset parameters to speed up the initialization process; the quick startup algorithm optimizes the startup algorithm of MiniSDK to speed up the initialization process; the minimized startup sequence optimizes the startup process of MiniSDK to speed up MiniSDK to reach a state where it can handle basic network communications. Ultimately, the quick startup of MiniSDK and the fast initialization of the second-layer communication function are achieved.
[0090] 303, the lightweight operating system kernel uses the layer 2 communication function to forward and process network traffic and loads the layer 3 communication module in parallel;
[0091] After the initialization of the Layer 2 communication function is completed, the lightweight operating system kernel can use the Layer 2 communication function to forward and process network traffic, and load the Layer 3 communication module in parallel. Only after the Layer 3 communication module is loaded can the Layer 3 communication be realized. At this time, the function of the network switch cannot be fully realized, so it is impossible to switch to the complete system of the network switch.
[0092] 304, the switching module detects the loading status of the layer 3 communication module;
[0093] When the loading is not completed, the loading progress of the layer-3 communication module is continuously detected, and when the loading is completed, step 305 is executed.
[0094] 305, a complete system for seamless switching to a network switch.
[0095] The beneficial effects of the hierarchical startup network switch method of the present invention are:
[0096] When the network switch chip is powered on or restarted, the MiniSDK is started; after the MiniSDK is started, the initialization of the Layer 2 communication function is completed; the lightweight operating system kernel uses the Layer 2 communication function to forward and process network traffic and loads the Layer 3 communication module in parallel; the switching module detects the loading status of the Layer 3 communication module, and when the loading is completed, it seamlessly switches to the complete system of the network switch;
[0097] By using MiniSDK, the Layer 2 communication function can be started in a short time and basic network services can be quickly restored;
[0098] The switch loads complete Layer 3 functions in the background, without restarting or interrupting services, and can achieve seamless switching, ensuring the continuity and stability of the network;
[0099] In the event of a network failure or switch restart, the ability to quickly start and seamlessly switch can shorten recovery time, reduce network interruption time, improve network stability, and enhance user experience.
[0100] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0101] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0102] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0103] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0104] The above are merely embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are included in the scope of the claims of the present invention to be approved.
Claims
1. A system for hierarchical startup of a network switch, characterized in that: include: Network switch chips, simplified software development kit MiniSDK, lightweight operating system kernel and switching module; The network switch chip is used to start the MiniSDK when powered on or restarted; The MiniSDK is used to complete the initialization of the layer 2 communication function after startup; The lightweight operating system kernel is used to forward and process network traffic using the layer 2 communication function and load the layer 3 communication module in parallel; The switching module is used to detect the loading status of the three-layer communication module, and when the loading is completed, seamlessly switch to the complete system of the network switch.
2. The hierarchical startup network switch system according to claim 1, characterized in that: The hierarchical startup network switch system also includes: A diskless boot program bootROM in the network switch chip, wherein the bootROM contains a boot code; The bootROM is used to execute the startup code and guide the MiniSDK to start up when the network switch chip is powered on or restarted.
3. The hierarchical startup network switch system according to claim 2, characterized in that: The MiniSDK includes a basic protocol stack, layer 2 communication functions and minimized management and control functions; The basic protocol stack is a basic network protocol stack used to support basic network communication requirements; The layer 2 communication functions include Ethernet frame receiving function, Ethernet frame sending function, MAC address learning function and MAC address forwarding function; The minimum management and control functions include basic equipment management and control functions, and are used to support basic management functions.
4. The hierarchical startup network switch system according to claim 1, characterized in that: The MiniSDK also includes: A preloading and preconfiguration unit, used to preload preset configuration information and preset parameters when the MiniSDK is started to speed up the initialization process; A quick startup algorithm program is used to optimize the startup algorithm of the MiniSDK to speed up the initialization process; Minimize the startup sequence to optimize the startup process of the MiniSDK and speed up the MiniSDK to reach a state where it can handle basic network communications.
5. The hierarchical startup network switch system according to claim 1, characterized in that: The lightweight operating system kernel is the Linux kernel.
6. The hierarchical startup network switch system according to claim 5, characterized in that: The switching module comprises: A routing table and forwarding table updating unit, used to gradually update the routing table and the layer 2 forwarding table using an incremental update and synchronization mechanism during the seamless switching process; Access control list ACL and security policy update unit, used to gradually update ACL and security policy during seamless switching; A cache and flow table update unit, used to update and adjust the cache and flow table using a preset intelligent flow table management algorithm during seamless switching; The forwarding engine and processing pipeline stabilization unit is used to maintain the stability of the forwarding engine and the processing pipeline during the seamless switching process.
7. A method for hierarchical startup of a network switch, characterized in that: A system for a hierarchically activated network switch, the system for the hierarchically activated network switch comprising a network switch chip, a simplified software development kit MiniSDK, a lightweight operating system kernel and a switching module, the method comprising: When the network switch chip is powered on or restarted, the MiniSDK is started; After the MiniSDK is started, the initialization of the layer 2 communication function is completed; The lightweight operating system kernel utilizes the layer 2 communication function to forward and process network traffic and loads the layer 3 communication module in parallel; The switching module detects the loading status of the three-layer communication module, and when the loading is completed, seamlessly switches to the complete system of the network switch.
8. The method for hierarchical startup of a network switch according to claim 7, characterized in that: A diskless boot program bootROM in the network switch chip, wherein the bootROM contains a boot code; When the network switch chip is powered on or restarted, the bootROM executes the startup code to guide the MiniSDK to start.
9. The method for hierarchical startup of a network switch according to claim 8, characterized in that: The MiniSDK includes a basic protocol stack, layer 2 communication functions and minimized management and control functions; The basic protocol stack is a basic network protocol stack used to support basic network communication requirements; The layer 2 communication functions include Ethernet frame receiving function, Ethernet frame sending function, MAC address learning function and MAC address forwarding function; The minimum management and control functions include basic equipment management and control functions, and are used to support basic management functions.
10. The method for hierarchical startup of a network switch according to claim 7, characterized in that: The MiniSDK also includes: Preload preconfigured units, fast start algorithm programs and minimized startup sequences; When the MiniSDK is started, the preloading and preconfiguration unit preloads preset configuration information and preset parameters to speed up the initialization process; The quick startup algorithm program optimizes the startup algorithm of the MiniSDK to speed up the initialization process; The minimized startup sequence optimizes the startup process of the MiniSDK and speeds up the MiniSDK to reach a state where it can handle basic network communications.