CN111683022B - White box switch, method for upgrading forwarding function of white box switch and readable storage medium - Google Patents

White box switch, method for upgrading forwarding function of white box switch and readable storage medium Download PDF

Info

Publication number
CN111683022B
CN111683022B CN202010804990.XA CN202010804990A CN111683022B CN 111683022 B CN111683022 B CN 111683022B CN 202010804990 A CN202010804990 A CN 202010804990A CN 111683022 B CN111683022 B CN 111683022B
Authority
CN
China
Prior art keywords
forwarding
forwarding function
unit
box switch
new version
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.)
Active
Application number
CN202010804990.XA
Other languages
Chinese (zh)
Other versions
CN111683022A (en
Inventor
郑坤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Communications and Networks Institute
Original Assignee
Guangdong Communications and Networks Institute
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Guangdong Communications and Networks Institute filed Critical Guangdong Communications and Networks Institute
Priority to CN202010804990.XA priority Critical patent/CN111683022B/en
Publication of CN111683022A publication Critical patent/CN111683022A/en
Application granted granted Critical
Publication of CN111683022B publication Critical patent/CN111683022B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/55Prevention, detection or correction of errors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/082Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a white box switch, an upgrading method of a forwarding function of the white box switch and a readable storage medium, wherein the upgrading method of the forwarding function comprises the following steps: when the forwarding function of the white box switch needs to be upgraded, forwarding logic and a forwarding table defined by a software driving library of a new version forwarding function are acquired; storing the forwarding logic and forwarding table defined by the new version forwarding function software driving library to the standby forwarding unit; and converting the standby forwarding unit into a main forwarding unit, wherein the white box switch adopts the main forwarding unit to forward the message. The invention can solve the problem that the forwarding function is interrupted when the existing upgrading method of the forwarding function of the white box switch is upgraded.

Description

White box switch, method for upgrading forwarding function of white box switch and readable storage medium
Technical Field
The invention relates to the technical field of communication, in particular to a white box switch, an upgrading method of a forwarding function of the white box switch and a readable storage medium.
Background
A white box switch is a switch assembled from standard commodity parts. White-box switches have three basic attributes: the hardware for constructing the switch is commercialized, and a forwarding chip of a mature manufacturer and a Network Operating System (NOS) that allows selection of an operation on the switch are used. Because the white box switch decouples hardware and software, the right of selecting hardware and software is provided for users, and the users can freely select different switch hardware and network operating systems.
Decoupling typically defines a standardized forwarding function interface between the forwarding chip and the NOS. Firstly, each manufacturer establishes a standardization organization for discussion to reach a uniform issuing and forwarding function standard, and the standardization organization issues and forwards a function software interface based on the standard. The switch forwarding chip manufacturer realizes a standard forwarding function and provides a forwarding function software driving library, an interface provided by the library complies with a software interface issued by a standard organization, so that the forwarding function software driving library can be correctly connected when an NOS software package is constructed, finally, the NOS manufacturer realizes the calling of the forwarding function based on the forwarding function interface issued by the standard organization and connects the forwarding function software driving library when the NOS software package is constructed, the NOS software package constructed in the way can be correctly loaded to a white box switch provided by a hardware manufacturer, and the forwarding function is completed through the connected forwarding function software driving library.
When a standardization organization issues a new version of NOS and a forwarding plane forwarding function interface standard and a white box switch running on a network needs to upgrade a forwarding function defined by the new version of the standard, the existing upgrading method generally acquires a forwarding function software driver library of the new version of the standard, then modifies the NOS, supports the software function defined by the new version of the standard, then constructs an NOS software package, connects the forwarding function software driver library of the new version of the standard, supports a new forwarding function, and finally copies the new NOS software package to the white box switch running on the network and restarts the white box switch, so that the white box switch loads the new NOS software package to complete the upgrading of the forwarding function. This upgrade method causes the forwarding function to be interrupted because the white box switch must be restarted.
Disclosure of Invention
The invention mainly aims to provide a white box switch, an upgrading method of a forwarding function of the white box switch and a readable storage medium, and solves the problem that the forwarding function is interrupted when the forwarding function of the white box switch is upgraded.
In order to achieve the above object, the present invention provides a method for upgrading a forwarding function, where the method for upgrading a forwarding function includes:
when the forwarding function of the white box switch needs to be upgraded, forwarding logic and a forwarding table defined by a software driving library of a new version forwarding function are acquired;
storing the forwarding logic and forwarding table defined by the new version forwarding function software driving library to the standby forwarding unit;
and converting the standby forwarding unit into a main forwarding unit, wherein the white box switch adopts the main forwarding unit to forward the message.
Optionally, the forwarding chip is provided with a cache unit, the cache unit is in communication connection with the forwarding unit, and the step of converting the standby forwarding unit into the active forwarding unit includes:
disconnecting the cache unit from the main forwarding unit;
and establishing the connection between the cache unit and the standby forwarding unit so as to convert the standby forwarding unit into an active forwarding unit.
Optionally, the white box switch is provided with a forwarding management unit, the forwarding management unit is in communication connection with the active forwarding unit, and the step of acquiring the forwarding logic and the forwarding table defined by the software-driven library of the new-version forwarding function when the forwarding function of the white box switch needs to be updated includes:
when the forwarding function of the white box switch needs to be upgraded, acquiring a new version forwarding function software driving library;
disconnecting a first forwarding function software driver library in a memory from network operating system software, and unloading the first forwarding function software driver library in the memory;
upgrading the network operating system software;
loading the new version forwarding function software driver library into the memory, and connecting the upgraded network operating system software;
updating the forwarding function of the forwarding management unit according to the new version forwarding function software driver library loaded to the memory;
and determining the forwarding logic and the forwarding table defined by the software driving library of the new version forwarding function according to the forwarding management unit after the forwarding function is updated.
Optionally, the white box switch is provided with a hardware storage unit, the hardware storage unit stores a forwarding function software driver library, and the step of loading the new version of the forwarding function software driver library into the memory includes:
and extracting the new version forwarding function software driver library stored in the hardware storage unit, and loading the extracted new version forwarding function software driver library into the memory, wherein when the forwarding function of the white box switch needs to be upgraded, the new version forwarding function software driver library is stored in the hardware storage unit.
Optionally, the step of upgrading the network operating system software includes:
verifying whether the version of the new version forwarding function software driving library and each interface contained in the new version forwarding function software driving library meet preset conditions or not;
and when the version of the new version forwarding function software driver library and each interface contained in the new version forwarding function software driver library meet preset conditions, executing the step of loading the new version forwarding function software driver library into the memory and connecting the upgraded network operating system software.
Optionally, after the step of verifying whether the version of the new version forwarding function software driver library and each interface included in the new version forwarding function software driver library satisfy a preset condition, the method further includes:
when the version of the new version forwarding function software driver library or any interface contained in the new version forwarding function software driver library does not meet a preset condition, acquiring a second forwarding function software driver library in the hardware storage unit, wherein the second forwarding function software driver library defines a currently running forwarding function;
and loading the current forwarding function software driver library into the memory, and connecting the upgraded network operating system software.
Optionally, when the forwarding function of the white box switch needs to be updated, the step of obtaining the software driver library of the new version forwarding function includes:
constructing a network operating system software package, wherein the network operating system software package comprises network operating system software to be installed and a forwarding function software driver library to be loaded, and the network operating system software to be installed is not connected with the forwarding function software driver library to be loaded;
installing the network operating system software to be installed to the white box switch;
and loading the forwarding function software driver library to be loaded into the internal memory of the white box switch, and connecting the forwarding function software driver library in the internal memory and the network operating system software of the white box switch.
In order to achieve the above object, the present invention further provides a white box switch, where the white box switch is provided with a forwarding chip, the forwarding chip is provided with a forwarding unit, the forwarding unit includes a main forwarding unit and a standby forwarding unit, the white box switch includes a memory, a processor, and an upgrading program of a forwarding function that is stored in the memory and can be run on the processor, and the upgrading program of the forwarding function is executed by the processor to implement the steps of the above method for upgrading a forwarding function.
In order to achieve the above object, the present invention further provides a readable storage medium, on which an upgrade program of a forwarding function is stored, and the upgrade program of the forwarding function, when executed by a processor, implements the steps of the method for upgrading a forwarding function as described above.
The invention provides a white box switch and an upgrading method of a forwarding function thereof, and a readable storage medium. The scheme provides a standby forwarding unit on a forwarding chip, and a new version of forwarding function software drives forwarding logic and forwarding tables defined by a library to be stored in the standby forwarding unit and converted into a main forwarding unit during upgrading, and the original main forwarding unit is converted into the standby forwarding unit. Due to the fact that the main forwarding unit and the standby forwarding unit are provided, the forwarding function of the white box switch is upgraded when the white box switch runs, and the forwarding function is not interrupted during the upgrading of the forwarding function, so that the problem that the forwarding function is interrupted due to the fact that the white box switch needs to be restarted when the forwarding function of the white box switch is upgraded is solved.
Drawings
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Fig. 1 is a hardware architecture diagram of a white box switch to which an embodiment of the present invention relates;
fig. 2 is a schematic flow chart of a first embodiment of a method for upgrading a forwarding function according to the present invention;
fig. 3 is a flowchart illustrating a second embodiment of a method for upgrading a forwarding function according to the present invention;
FIG. 4 is a flowchart illustrating a third method for upgrading a forwarding function according to the present invention;
fig. 5 is a flowchart illustrating a fourth method for upgrading a forwarding function according to the present invention.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, fig. 1 is a hardware architecture diagram of a white box switch according to an embodiment of the present invention.
As shown in fig. 1, the white box switch may include: the processor 1001 includes, for example, a CPU, a network interface 1004, a user interface 1003, a memory 1005, a communication bus 1002, an active forwarding unit 1006, and a standby forwarding unit 1007. Wherein the communication bus 1002 is used for implementing connection communication between these components, and the memory 1005 may also be a storage device independent of the processor 1001.
Those skilled in the art will appreciate that the configuration of the white box switch shown in fig. 1 does not constitute a limitation of the white box switch and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
As shown in fig. 1, a memory 1005, which is a kind of computer storage medium, may include therein an operating system and an upgrade program of a forwarding function of the white box switch.
In the white box switch shown in fig. 1, the network interface 1004 is mainly used for connecting to a backend server and performing data communication with the backend server; the user interface 1003 is mainly used for connecting a client (user side) and performing data communication with the client; and the processor 1001 may be configured to invoke an upgrade program of the forwarding function stored in the memory 1005 and perform the following operations:
when the forwarding function of the white box switch needs to be upgraded, forwarding logic and a forwarding table defined by a software driving library of a new version forwarding function are acquired;
storing the forwarding logic and forwarding table defined by the new version forwarding function software driving library to the standby forwarding unit;
and converting the standby forwarding unit into a main forwarding unit, wherein the white box switch adopts the main forwarding unit to forward the message.
Further, the processor 1001 may call an upgrade program of the forwarding function of the white box switch stored in the memory 1005, and also perform the following operations:
disconnecting the cache unit from the main forwarding unit;
and establishing the connection between the cache unit and the standby forwarding unit so as to convert the standby forwarding unit into an active forwarding unit.
Further, the processor 1001 may call an upgrade program of the forwarding function of the white box switch stored in the memory 1005, and also perform the following operations:
when the forwarding function of the white box switch needs to be upgraded, acquiring a new version forwarding function software driving library;
disconnecting a first forwarding function software driver library in a memory from network operating system software, and unloading the first forwarding function software driver library in the memory;
upgrading the network operating system software;
loading the new version forwarding function software driver library into the memory, and connecting the upgraded network operating system software;
updating the forwarding function of the forwarding management unit according to the new version forwarding function software driver library loaded to the memory;
and determining the forwarding logic and the forwarding table defined by the software driving library of the new version forwarding function according to the forwarding management unit after the forwarding function is updated.
Further, the processor 1001 may call an upgrade program of the forwarding function of the white box switch stored in the memory 1005, and also perform the following operations:
and extracting the new version forwarding function software driver library stored in the hardware storage unit, and loading the extracted new version forwarding function software driver library into the memory, wherein when the forwarding function of the white box switch needs to be upgraded, the new version forwarding function software driver library is stored in the hardware storage unit.
Further, the processor 1001 may call an upgrade program of the forwarding function of the white box switch stored in the memory 1005, and also perform the following operations:
verifying whether the version of the new version forwarding function software driving library and each interface contained in the new version forwarding function software driving library meet preset conditions or not;
and when the version of the new version forwarding function software driver library and each interface contained in the new version forwarding function software driver library meet preset conditions, executing the step of loading the new version forwarding function software driver library into the memory and connecting the upgraded network operating system software.
Further, the processor 1001 may call an upgrade program of the forwarding function of the white box switch stored in the memory 1005, and also perform the following operations:
when the version of the new version forwarding function software driver library or any interface contained in the new version forwarding function software driver library does not meet a preset condition, acquiring a second forwarding function software driver library in the hardware storage unit, wherein the second forwarding function software driver library defines a currently running forwarding function;
and loading the current forwarding function software driver library into the memory, and connecting the upgraded network operating system software.
Further, the processor 1001 may call an upgrade program of the forwarding function of the white box switch stored in the memory 1005, and also perform the following operations:
constructing a network operating system software package, wherein the network operating system software package comprises network operating system software to be installed and a forwarding function software driver library to be loaded, and the network operating system software to be installed is not connected with the forwarding function software driver library to be loaded;
installing the network operating system software to be installed to the white box switch;
and loading the forwarding function software driver library to be loaded into the internal memory of the white box switch, and connecting the forwarding function software driver library in the internal memory and the network operating system software of the white box switch.
Referring to fig. 2, fig. 2 is a flowchart illustrating a first embodiment of a method for upgrading a forwarding function according to the present invention, where the method for upgrading a forwarding function includes the following steps:
step S10, when the forwarding function of the white box switch needs to be upgraded, the forwarding logic and forwarding table defined by the software driving library of the new version forwarding function are obtained;
the upgrading method of the forwarding function in the implementation is applied to a white box switch, a new version of forwarding function software driving library defines forwarding logic and a forwarding table for realizing a new forwarding function, the forwarding table is also called a forwarding database or a routing directory, and the white box switch forwards a message according to the forwarding logic and the forwarding table, wherein the message is a data unit which is switched and transmitted in a network, namely a data block which is to be sent by a station at one time. The message contains complete data information to be sent, and the length of the message is very inconsistent, unlimited and variable.
Specifically, when the white box switch needs to be upgraded, the forwarding logic and the forwarding table defined by the software driving library with the new version forwarding function need to be acquired first, wherein the manner of acquiring the forwarding logic and the forwarding table is that the software automatically acquires the forwarding logic and the forwarding table.
Step S20, storing the forwarding logic and forwarding table defined by the new version forwarding function software driving library to the standby forwarding unit;
in this embodiment, the white box switch is provided with a forwarding chip, the forwarding chip is provided with a primary forwarding unit and a standby forwarding unit, the forwarding unit is configured to store forwarding logic and a forwarding table, the forwarding logic and the forwarding table embody a forwarding function of the forwarding chip of the white box switch, the forwarding chip is provided with a cache unit, the cache unit stores a message to be forwarded, and the cache unit is in communication connection with the primary forwarding unit to implement the forwarding function of the message by the primary forwarding unit.
Specifically, after the forwarding logic and the forwarding table defined by the new version forwarding function software driving library are obtained, the forwarding logic and the forwarding table defined by the new version forwarding function software driving library are stored in the standby forwarding unit.
Step S30, the standby forwarding unit is converted into a main forwarding unit, where the white box switch uses the main forwarding unit to forward the packet.
In this embodiment, a forwarding management unit is disposed in the white-box switch, and when a forwarding logic and a forwarding table defined by a new version of forwarding function software driver library are stored in the standby forwarding unit, the forwarding management unit of the white-box switch notifies the cache unit to disconnect from the primary forwarding unit, establishes a connection with the standby forwarding unit, and converts the standby forwarding unit into the primary forwarding unit, and the white-box switch forwards a packet according to the forwarding logic and the forwarding table in the primary forwarding unit, so as to upgrade the forwarding function of the white-box switch during online operation.
It should be noted that, if an abnormality occurs in the process of converting the standby forwarding unit into the active forwarding unit, the white box switch may execute a fallback, that is, the original forwarding logic and forwarding table are still used to forward the packet, and the forwarding function is not interrupted.
In the technical scheme provided by this embodiment, when the forwarding function of the white box switch needs to be updated, the forwarding logic and the forwarding table defined by the new version forwarding function software driver library are obtained, and then the obtained forwarding logic and forwarding table defined by the new version forwarding function software driver library are stored to the standby forwarding unit, and then the standby forwarding unit is converted into the primary forwarding unit, and the white box switch performs packet forwarding by using the primary forwarding unit. The forwarding chip is provided with a standby forwarding unit, the forwarding logic and the forwarding table defined by the new version forwarding function software driving library are stored in the standby forwarding unit, and are converted into a main forwarding unit when being upgraded, and the original main forwarding unit is converted into the standby forwarding unit. Due to the provision of the main forwarding unit and the standby forwarding unit, the forwarding function of the white box switch is upgraded when the white box switch operates, and the forwarding function is not interrupted during the upgrading of the forwarding function, so that the problem that the forwarding function is interrupted due to the fact that the white box switch needs to be restarted when the forwarding function of the white box switch is upgraded is solved.
Referring to fig. 3, fig. 3 is a flowchart illustrating a second embodiment of the upgrading method for a forwarding function according to the present invention, where based on the first embodiment, the step of S10 includes:
step S11, when the forwarding function of the white box switch needs to be upgraded, a new version forwarding function software driving library is obtained;
step S12, disconnecting the first transfer function software driving library in the memory from the network operation system software, and unloading the first transfer function software driving library in the memory;
in this embodiment, the first forwarding function software driver library is a forwarding function software driver library that has been loaded into the memory before the upgrade of the forwarding function of the white box switch, that is, the forwarding function software driver library currently running on the white box switch, and before the upgrade of the forwarding function of the white box switch, the first forwarding function software driver library is connected to the Network Operating System (NOS) software, so that the network operating system software (NOS) provides a function of modifying the forwarding function.
Specifically, in order to upgrade the forwarding function of the white box switch, after a new version of the forwarding function software driver library is obtained, the connection between the currently running forwarding function software driver library in the memory and the network operating system software needs to be disconnected, and the currently running forwarding function software driver library in the memory is unloaded at the same time, so that the network operating system software (NOS) does not provide a function of modifying the forwarding function any more, but the original forwarding function still runs normally, wherein when unloading, the master control unit sends an unloading request by transmitting the name of the currently running forwarding function software driver library to be unloaded to the loading unit, and the loading unit obtains the description file by indexing the currently running forwarding function software driver library of the name and unloads the currently running forwarding function software driver library of the name.
In this embodiment, the white box switch is provided with a hardware storage unit, the hardware storage unit stores a forwarding function software driver library, the forwarding function software driver library on the hardware storage unit cannot be automatically deleted, that is, after the currently running forwarding function software driver library loaded in the memory is unloaded, the forwarding function software driver library with the original forwarding function defined still exists on the hardware storage unit and is not loaded, if the white box switch fails to upgrade the forwarding function, the white box switch can back up through the forwarding function software driver library with the original forwarding function defined on the hardware storage unit, that is, the white box switch can still forward the message with the original forwarding function. Of course, it can be understood that the forwarding function software driver library on the hardware storage unit may be manually deleted according to actual needs, and the rollback operation after deletion cannot be executed.
Step S13, upgrading the network operating system software;
in this embodiment, in order to enable the network operating system software to support the new version forwarding function software driver library, the network operating system software needs to be upgraded, it should be noted that the upgraded network operating system software still supports the old version forwarding function software driver library, and of course, if the network operating system software is abnormally upgraded, the white box switch still can forward the packet with the original forwarding function.
Step S14, loading the new version forwarding function software driver library into the memory, and connecting the upgraded network operating system software;
in this embodiment, after the network operating system software is upgraded, the master control unit sends a loading request by transmitting the name of the new version forwarding function software driver library to be loaded to the loading unit, the loading unit obtains a description file by indexing the new version forwarding function software driver library of the name, and loads the new version forwarding function software driver library to the memory, and after the loading is successful, the new version forwarding function software driver library loaded to the memory is connected with the upgraded network operating system software; if the loading is abnormal, the white box switch executes the rollback operation, namely, the original forwarding function software driving library is loaded, and the white box switch can still forward the message by the original forwarding function.
Specifically, when the forwarding function of the white box switch needs to be upgraded, the software driver library of the new version forwarding function is stored in the hardware storage unit. The method comprises the steps of extracting a new version forwarding function software driving library stored in a hardware storage unit, and loading the extracted new version forwarding function software driving library into a memory.
Step S15, updating the forwarding function of the forwarding management unit according to the new version forwarding function software driver library loaded into the memory;
step S16, determining the forwarding logic and forwarding table defined by the software-driven library of the new-version forwarding function according to the forwarding management unit after updating the forwarding function.
In this embodiment, the forwarding management unit interacts with the forwarding unit, and the forwarding function can be upgraded by the forwarding management unit.
Specifically, after the new version forwarding function software driver library is loaded into the memory and connected with the upgraded network operating system software, the master control unit sends a request for refreshing the forwarding function to the forwarding management unit, and the forwarding management unit receives the request and updates the content of the forwarding management unit into the related content of the new version forwarding function software driver library according to the forwarding function defined by the new version forwarding function software driver library, and determines the forwarding logic and the forwarding table of the updated forwarding function.
In the technical scheme provided by this embodiment, when the forwarding function of the white box switch needs to be updated, a new version forwarding function software driver library is obtained; disconnecting the first forwarding function software driver library in the memory from the network operating system software, and unloading the first forwarding function software driver library in the memory; upgrading network operating system software; loading the new version forwarding function software driving library into the memory, and connecting the upgraded network operating system software; updating the forwarding function of the forwarding management unit according to the new version forwarding function software driver library loaded to the memory; and determining forwarding logic and forwarding table defined by the software driving library of the new version forwarding function according to the forwarding management unit with updated forwarding function. Because a new version forwarding function software driving library and the upgraded network operating system software are established in the memory, the forwarding management unit can refresh the forwarding function, and further determine the forwarding logic and the forwarding table of the new forwarding function.
Referring to fig. 4, fig. 4 is a flowchart illustrating a third embodiment of the upgrading method for forwarding function according to the present invention, and based on the second embodiment, the step of S13 includes:
step S17, verifying whether the version of the new version forwarding function software driving library and each interface contained in the new version forwarding function software driving library meet preset conditions;
step S18, when the version of the new version forwarding function software driver library and each interface included in the new version forwarding function software driver library satisfy a preset condition, loading the new version forwarding function software driver library into the memory, and connecting the upgraded network operating system software;
step S19, when the version of the new version forwarding function software driver library or any interface included in the new version forwarding function software driver library does not satisfy a preset condition, acquiring a second forwarding function software driver library in the hardware storage unit, where a currently running forwarding function is defined in the second forwarding function software driver library;
and step S100, loading the second forwarding function software driver library into the memory, and connecting the upgraded network operating system software.
In this embodiment, the preset condition is whether the version of the new version forwarding function software driver library is the required version, and whether each interface included in the new version forwarding function software driver library supports the version and the upgraded network operating system software.
Specifically, after the network operating system software is upgraded, the new version forwarding function software driver library needs to be verified, in the network operating system software (NOS), the network operating system software (NOS) provides a function of checking the new version forwarding function software driver library, specifically checking includes checking whether the version of the library and all interfaces included in the library meet preset conditions, if the preset conditions are met, loading the new version forwarding function software driver library into a memory, and connecting the upgraded network operating system software, and specific contents refer to the step of step S14 in the embodiment, which is not described herein again.
Further, if the version of the new version forwarding function software driver library or any interface included in the new version forwarding function software driver library does not meet the preset condition, a second forwarding function software driver library is acquired from the hardware storage unit, the second forwarding function software driver library is a forwarding function software driver library which is not loaded to the memory and is defined with the currently running forwarding function, the second forwarding function software driver library is loaded to the memory, and the upgraded network operating system software is connected.
In the technical scheme provided by this embodiment, whether the new version forwarding function software driver library or the second forwarding function software driver library is loaded into the memory is determined by verifying the version of the new version forwarding function software driver library and whether each interface included in the new version forwarding function software driver library meets a preset condition, if the preset condition is met, the new version forwarding function software driver library is loaded, and if the preset condition is not met, the second forwarding function software driver library is loaded, so that it is ensured that the forwarding function is not interrupted in the upgrading process of the white box switch.
Referring to fig. 5, fig. 5 is a flowchart illustrating a fourth embodiment of the upgrading method for forwarding function according to the present invention, where based on the second embodiment, the step of S11 includes:
step S200, constructing a network operating system software package, wherein the network operating system software package comprises network operating system software to be installed and a forwarding function software driver library to be loaded, and the network operating system software to be installed is not connected with the forwarding function software driver library to be loaded;
in this embodiment, a network operating system software package is constructed, the network operating system software package includes not only network operating system software but also a forwarding function software driver library provided by a forwarding chip manufacturer, when the network operating system software package is constructed, network operating system software to be installed is not connected with the forwarding function software driver library to be loaded, the network operating system software and the forwarding function software driver library are independent from each other and do not affect each other, and because the network operating system software is not connected with the forwarding function software driver library in the construction stage, the forwarding function cannot be provided only by using the network operating system software.
Step S300, installing the network operating system software to be installed to the white box switch;
in this embodiment, after the network operating system software package is constructed, the white box switch is started to enter an installation operating system, and the installation operating system to which the white box switch belongs is an operating system for installing network operating system software. And installing a network operating system software package in the installation operating system, installing the network operating system software of the network operating system software package, and copying the forwarding function software driver library to the hardware storage unit of the white box switch without installation.
Step S400, loading the forwarding function software driver library to be loaded into the internal memory of the white box switch, and connecting the forwarding function software driver library in the internal memory and the network operating system software of the white box switch.
In this embodiment, after the network operating system software to be installed is installed in the white box switch, the white box switch is restarted to enter the network operating system, and since the network operating system software is installed, the network operating system software can successfully enter the system to which the white box switch belongs.
Further, the network operating system software checks whether the forwarding function software driver library is loaded, and if so, the complete forwarding function can be provided, and the white box switch is started up. If not, the forwarding function can not be provided, and the loading unit loads the forwarding function software driver library of the hardware storage unit into the memory and connects with the network operating system software of the white box switch, so that the white box switch provides the forwarding function.
In the technical scheme provided by this embodiment, when a network operating system software package is constructed, to-be-installed network operating system software is not connected to a forwarding function software driver library to be loaded, the to-be-installed network operating system software is installed to the white box switch, the forwarding function software driver library to be loaded is only copied to a hardware storage unit of the white box switch, and the white box switch is started to determine whether the forwarding function software driver library is loaded so as to determine whether the white box switch is started. When the network operating system software package is constructed, the network operating system software is not connected with the forwarding function software driver library to be loaded, so that the independence of a hardware system and a software system is ensured.
Based on the foregoing embodiments, the present invention further provides a white box switch, where the white box switch is provided with a forwarding chip, the forwarding chip is provided with a forwarding unit, the forwarding unit includes a main forwarding unit and a standby forwarding unit, the white box switch may include a memory, a processor, and an upgrading program of a forwarding function that is stored in the memory and is capable of running on the processor, and when the processor executes the upgrading program of the forwarding function, the steps of the method for upgrading a forwarding function according to any one of the foregoing embodiments are implemented.
Based on the foregoing embodiments, the present invention further provides a readable storage medium, on which an upgrade program of a forwarding function is stored, where the upgrade program of the forwarding function, when executed by a processor, implements the steps of the method for upgrading a forwarding function according to any of the foregoing embodiments.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) as described above and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (8)

1. A method for upgrading a forwarding function is applied to a white-box switch, the white-box switch is provided with a forwarding chip, the forwarding chip is provided with a forwarding unit, the forwarding unit comprises a main forwarding unit and a standby forwarding unit, the white-box switch is provided with a forwarding management unit, and the forwarding management unit is in communication connection with the main forwarding unit, and the method comprises the following steps:
when the forwarding function of the white box switch needs to be upgraded, acquiring a new version forwarding function software driving library;
disconnecting a first forwarding function software driver library in a memory from network operating system software, and unloading the first forwarding function software driver library in the memory;
upgrading the network operating system software;
loading the new version forwarding function software driver library into the memory, and connecting the upgraded network operating system software;
updating the forwarding function of the forwarding management unit according to the new version forwarding function software driver library loaded to the memory;
determining forwarding logic and forwarding table defined by the software driving library of the new version forwarding function according to the forwarding management unit after updating the forwarding function;
storing the forwarding logic and forwarding table defined by the new version forwarding function software driving library to the standby forwarding unit;
and converting the standby forwarding unit into a main forwarding unit, wherein the white box switch adopts the main forwarding unit to forward the message.
2. The method for upgrading a forwarding function according to claim 1, wherein the forwarding chip is provided with a cache unit, the cache unit is in communication connection with the forwarding unit, and the step of converting the standby forwarding unit into the active forwarding unit includes:
disconnecting the cache unit from the main forwarding unit;
and establishing the connection between the cache unit and the standby forwarding unit so as to convert the standby forwarding unit into an active forwarding unit.
3. The method for upgrading a forwarding function of claim 1, wherein the white box switch is provided with a hardware storage unit, the hardware storage unit stores a forwarding function software driver library, and the step of loading the new version of the forwarding function software driver library into the memory comprises:
and extracting the new version forwarding function software driver library stored in the hardware storage unit, and loading the extracted new version forwarding function software driver library into the memory, wherein when the forwarding function of the white box switch needs to be upgraded, the new version forwarding function software driver library is stored in the hardware storage unit.
4. The method for upgrading a forwarding function according to claim 1, wherein the step of upgrading the network operating system software is followed by:
verifying whether the version of the new version forwarding function software driving library and each interface contained in the new version forwarding function software driving library meet preset conditions or not;
and when the version of the new version forwarding function software driver library and each interface contained in the new version forwarding function software driver library meet preset conditions, executing the step of loading the new version forwarding function software driver library into the memory and connecting the upgraded network operating system software.
5. The method for upgrading a forwarding function of claim 4, wherein the white box switch is provided with a hardware storage unit, the hardware storage unit stores a forwarding function software driver library, and the step of verifying whether the version of the new version of the forwarding function software driver library and each interface included in the new version of the forwarding function software driver library satisfy a preset condition further comprises:
when the version of the new version forwarding function software driver library or any interface contained in the new version forwarding function software driver library does not meet a preset condition, acquiring a second forwarding function software driver library in the hardware storage unit, wherein the second forwarding function software driver library defines a currently running forwarding function;
and loading the second forwarding function software driver library into the memory, and connecting the upgraded network operating system software.
6. The method for upgrading a forwarding function of claim 1, wherein the step of obtaining a software driver library of a new version of the forwarding function when the forwarding function of the white box switch needs to be upgraded comprises:
constructing a network operating system software package, wherein the network operating system software package comprises network operating system software to be installed and a forwarding function software driver library to be loaded, and the network operating system software to be installed is not connected with the forwarding function software driver library to be loaded;
installing the network operating system software to be installed to the white box switch;
and loading the forwarding function software driver library to be loaded into the internal memory of the white box switch, and connecting the forwarding function software driver library in the internal memory and the network operating system software of the white box switch.
7. A white-box switch, characterized in that the white-box switch is provided with a forwarding chip, the forwarding chip is provided with a forwarding unit, the forwarding unit comprises a main forwarding unit and a standby forwarding unit, the white-box switch comprises a memory, a processor and an upgrading program of a forwarding function stored on the memory and operable on the processor, and the upgrading program of the forwarding function is executed by the processor to implement the steps of the method for upgrading a forwarding function as claimed in any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon an upgrade program of a forwarding function, which when executed by a processor, implements the steps of the method of upgrading a forwarding function according to any one of claims 1 to 6.
CN202010804990.XA 2020-08-12 2020-08-12 White box switch, method for upgrading forwarding function of white box switch and readable storage medium Active CN111683022B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010804990.XA CN111683022B (en) 2020-08-12 2020-08-12 White box switch, method for upgrading forwarding function of white box switch and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010804990.XA CN111683022B (en) 2020-08-12 2020-08-12 White box switch, method for upgrading forwarding function of white box switch and readable storage medium

Publications (2)

Publication Number Publication Date
CN111683022A CN111683022A (en) 2020-09-18
CN111683022B true CN111683022B (en) 2020-11-27

Family

ID=72458318

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010804990.XA Active CN111683022B (en) 2020-08-12 2020-08-12 White box switch, method for upgrading forwarding function of white box switch and readable storage medium

Country Status (1)

Country Link
CN (1) CN111683022B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112328268B (en) * 2020-11-20 2023-05-19 苏州浪潮智能科技有限公司 Method, device, equipment and readable medium for upgrading white-box switch software

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101697128A (en) * 2009-10-10 2010-04-21 中兴通讯股份有限公司 Version upgrading method and device
US9038053B2 (en) * 2012-08-27 2015-05-19 Lenovo Enterprise Solutions (Singapore) Pte. Ltd Non-disruptive software updates for servers processing network traffic
CN105320534A (en) * 2014-08-01 2016-02-10 中兴通讯股份有限公司 BOOT remote updating method, BOOT remote updating device and BOOT remote updating system for single board
CN109714205A (en) * 2018-12-28 2019-05-03 郑州云海信息技术有限公司 A kind of guard method of BIOS dual redundant, device and computer for whitepack interchanger
CN110166355A (en) * 2018-02-13 2019-08-23 华为技术有限公司 A kind of message forwarding method and device
CN111182033A (en) * 2019-12-09 2020-05-19 苏州浪潮智能科技有限公司 Method and equipment for restoring switch

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102219B (en) * 2007-07-30 2010-06-23 华为技术有限公司 Software update system and software update method
CN102136930B (en) * 2010-09-03 2014-02-19 华为技术有限公司 Version upgrading method and routing equipment
CN107548091A (en) * 2016-06-28 2018-01-05 中兴通讯股份有限公司 Multi-standard base station system, increase or upgrading standard and corresponding fault detection method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101697128A (en) * 2009-10-10 2010-04-21 中兴通讯股份有限公司 Version upgrading method and device
US9038053B2 (en) * 2012-08-27 2015-05-19 Lenovo Enterprise Solutions (Singapore) Pte. Ltd Non-disruptive software updates for servers processing network traffic
CN105320534A (en) * 2014-08-01 2016-02-10 中兴通讯股份有限公司 BOOT remote updating method, BOOT remote updating device and BOOT remote updating system for single board
CN110166355A (en) * 2018-02-13 2019-08-23 华为技术有限公司 A kind of message forwarding method and device
CN109714205A (en) * 2018-12-28 2019-05-03 郑州云海信息技术有限公司 A kind of guard method of BIOS dual redundant, device and computer for whitepack interchanger
CN111182033A (en) * 2019-12-09 2020-05-19 苏州浪潮智能科技有限公司 Method and equipment for restoring switch

Also Published As

Publication number Publication date
CN111683022A (en) 2020-09-18

Similar Documents

Publication Publication Date Title
US9229707B2 (en) Zero downtime mechanism for software upgrade of a distributed computer system
US9195480B2 (en) Associated plug-in management method, device and system
US20090119092A1 (en) Ensuring product correctness in a multilingual environment
US20140128054A1 (en) Method, software and apparatus for performing actions on a wireless device using action lists and versioning
WO2001002954A1 (en) Reconfiguration manager for controlling upgrades of electronic devices
US20130152069A1 (en) Method, apparatus and system for initiating terminal operation
US11956114B2 (en) Device management method, apparatus, and system, device, and storage medium
US11995706B2 (en) Coordination process restart device and coordination process restart method
CN107947981B (en) Network equipment management method and device
CN111683022B (en) White box switch, method for upgrading forwarding function of white box switch and readable storage medium
WO2023165307A1 (en) Function calling method and apparatus
CN111464603B (en) Server capacity expansion method and system
CN115150226A (en) Intelligent gateway adaptation system based on object model and operation method thereof
US20160378553A1 (en) Resource Management Method and Device for Terminal System
CN113836155A (en) Data processing method and device based on distributed system and storage medium
CN102707976A (en) ATCA (advanced telecom computing architecture) system and method for managing firmware versions by ATCA system
CN113612814A (en) Method, device, terminal and storage medium for screening session information
WO2016074460A1 (en) Data processing method and device
CN112732292A (en) Method, system, equipment and readable storage medium for software upgrading
CN111049938B (en) Message notification method and device, electronic equipment and readable storage medium
CN111444047B (en) Configuration synchronization method for dual-engine hot standby, dual-engine hot standby system and readable storage medium
CN114020368A (en) Information processing method and device based on state machine and storage medium
US7984433B2 (en) Program distribution method and computer system
JP2007011645A (en) Module update program
CN113704005B (en) Method, device and system capable of remotely calling application and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant