CN111211927A - Resource synchronization method and device - Google Patents

Resource synchronization method and device Download PDF

Info

Publication number
CN111211927A
CN111211927A CN201911414354.XA CN201911414354A CN111211927A CN 111211927 A CN111211927 A CN 111211927A CN 201911414354 A CN201911414354 A CN 201911414354A CN 111211927 A CN111211927 A CN 111211927A
Authority
CN
China
Prior art keywords
main control
control board
resource
board
interface
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.)
Granted
Application number
CN201911414354.XA
Other languages
Chinese (zh)
Other versions
CN111211927B (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.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech Technologies Co Ltd
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 Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN201911414354.XA priority Critical patent/CN111211927B/en
Publication of CN111211927A publication Critical patent/CN111211927A/en
Application granted granted Critical
Publication of CN111211927B publication Critical patent/CN111211927B/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
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • 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/084Configuration by using pre-existing information, e.g. using templates or copying from other elements
    • H04L41/0846Configuration by using pre-existing information, e.g. using templates or copying from other elements based on copy from other elements

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Hardware Redundancy (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a resource synchronization method and device. A resource synchronization method is applied to a network device, the network device comprises at least one interface board, and the method comprises the following steps: the interface board receives resource information of the interface board issued by a first main control board serving as a main control board in the network equipment when the first main control board is normal; the interface board receives a main-standby switching end instruction sent by a second main control board, wherein the second main control board is used as a standby main control board of the first main control board and is used for performing main-standby switching with the first main control board when the first main control board is detected to be abnormal, and sending the main-standby switching end instruction when the main-standby switching is completed; the interface board sends the recorded resource information to the second main control board so as to realize the resource information synchronization between the first main control board and the second main control board. By the method, the resource information between the double main controls is synchronized under the condition that the channel between the double main controls is not occupied.

Description

Resource synchronization method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a resource synchronization method and apparatus.
Background
In order to ensure higher reliability, a network device usually has two main control boards, one of which is used as an active main control board and the other is used as a standby main control board. The main control board is responsible for communicating with the interface board, such as issuing entries, receiving and sending messages, and the like. When the main control board is abnormal, the standby main control board can be switched to a new main control board and takes over the work of the main control board.
In order to enable the standby main control board to correctly take over the work of the main control board, it is necessary to ensure that the resource information on the two main control boards is consistent. Therefore, after the upper layer application operates the resources of the interface board recorded on the main control board, the main control board synchronizes the resource information related to the operation to the standby main control board through the channel between the main control board and the standby main control board. However, this means that if the upper layer application performs frequent operations on the resources of the interface board recorded on the main control board, a large amount of resource information is continuously transmitted to the standby main control board through the channel between the two main control boards, which may possibly cause channel congestion and further cause data loss and other problems.
Disclosure of Invention
The application provides a resource synchronization method and a resource synchronization device, which are used for solving the problem of channel congestion caused by the synchronization of a large amount of resource information between two main control boards. The technical scheme provided by the application comprises the following steps:
in a first aspect, the present application provides a resource synchronization method, applied to a network device, where the network device includes at least one interface board, and the method includes:
the interface board receives the resource information of the interface board issued by a first main control board serving as a main control board in the network equipment when the first main control board is normal;
the interface board receives a main-standby switching end instruction sent by a second main control board, wherein the second main control board is used as a standby main control board of the first main control board and is used for performing main-standby switching with the first main control board when the first main control board is detected to be abnormal, and sending the main-standby switching end instruction when the main-standby switching is completed;
the interface board sends the recorded resource information to the second main control board to realize resource information synchronization between the first main control board and the second main control board:
in a second aspect, the present application provides a resource synchronization apparatus, which is applied to a network device, where the network device includes at least one interface board, and the apparatus includes:
an information receiving module, configured to enable an interface board to receive resource information of the interface board issued by a first main control board, which is a main control board, of the network device when the first main control board is normal;
an instruction receiving module, configured to enable an interface board to receive a main/standby switching end instruction sent by a second main control board, where the second main control board is used as a standby main control board of the first main control board, and is configured to perform main/standby switching with the first main control board when detecting that the first main control board is abnormal, and send a main/standby switching end instruction when the main/standby switching is completed;
and the information sending module is used for enabling the interface board to send the recorded resource information to the second main control board so as to realize resource information synchronization between the first main control board and the second main control board.
According to the method and the device, the interface board receives the resource information sent by the main control board, and after the main and standby switching is completed, the interface board sends the recorded resource information to the new main control board, so that the resource information recorded by the two main control boards is synchronized under the condition that a channel between the two main control boards is not occupied, and the problem of channel congestion caused by the fact that a large amount of resource information passes through the channel between the two main control boards is avoided.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic relationship diagram of a main control board, a standby control board, and an interface board according to an embodiment of the present application;
FIG. 2 is a flowchart of a resource synchronization method provided herein;
fig. 3 is a schematic relationship diagram of another active main control board, a standby main control board, and an interface board according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a resource synchronization apparatus provided in the present application;
FIG. 5 is a schematic diagram of another resource synchronization apparatus provided in the present application;
fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present specification. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Generally, in order to improve the reliability of the network device, the network device may simultaneously operate two main control boards, one as a main control board and one as a standby control board. In order to ensure that when a first main control board serving as an active main control board needs to be switched between active and standby due to abnormal operation and the like, a second main control board serving as a standby main control board can correctly take over the work of the active main control board after being switched to the active main control board, it is necessary to ensure that information managed by the two main control boards is consistent.
The information managed by the main control board generally includes resource information, configuration information, protocol information, and the like, where the resource information is used to indicate a use condition of a resource, and may indicate whether any entry resource is occupied, for example. Generally, after an upper layer application operates the resources of the interface board recorded by the main control board, the main control board will issue specific operation contents to the interface board, and synchronize the recorded resource information of the interface board related to the operation to the standby main control board through a channel between the main control board and the standby main control board. For example, if the upper layer application selects an idle entry from the resources of the interface board recorded by the main control board for storing data, the main control board will issue the operation content of "selecting the idle entry for storing data" to the interface board, and synchronize the information of "the idle entry is occupied" to the standby main control board. In this process, the relationship between the main control board, the standby main control board and the interface board can be seen in fig. 1.
However, according to the above process, if the upper layer application frequently operates the resources of the interface board recorded on the main control board, and the main control board synchronizes the relevant resource information to the standby main control board for each operation, a large amount of resource information is continuously transmitted to the standby main control board through the channel between the two main control boards. The channel bandwidth between the two main control boards is limited, and besides transmitting the resource information, the channel is also used for transmitting some other information, such as database information configured by an upper layer application, state information of a protocol, state information of a port, a heartbeat message, and the like, so that the transmission of a large amount of resource information in the channel is highly likely to cause channel congestion, cause problems of low transmission efficiency, low transmission stability, and the like, and even cause data loss.
Therefore, the application provides a resource synchronization method, which realizes the synchronization of the resource information between two main control boards by enabling an interface board to receive the resource information sent by the main control board and sending the resource information to a new main control board after the main and standby switching of the equipment is completed.
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in detail below with reference to the accompanying drawings and specific embodiments.
Referring to fig. 2, fig. 2 is a flowchart of a resource synchronization method provided in the present application. As an embodiment, the method may be applied to a network device including at least one interface board, and the structure of the network device may be as shown in fig. 3. As shown in fig. 2, the process includes the following steps:
step 201, an interface board receives resource information of the interface board issued by a first main control board, which is a main control board, of the network device when the first main control board is normal.
The network device in this embodiment includes two main control boards, one main control board is used as a main control board, and the other main control board is used as a standby main control board, where the main control board is responsible for communicating with an interface board of the network device (for example, issuing various entries such as routing entries, and receiving and sending messages), and controlling the operation of the entire network device.
In step 201, a first main control board, which is a main control board, issues resource information of an interface board to the interface board. In a specific implementation, there are multiple situations when the first main control board issues the resource information of the interface board to the interface board, for example, after the upper layer application operates the resource of the interface board recorded on the first main control board, the resource usage related to the operation may be issued to the interface board. This example will be described below, and will not be described herein.
As an embodiment, after receiving the resource information sent by the first main control board, the interface board updates the resource information recorded by the interface board according to the resource information. For example, if the resource information sent by the first main control board is "40 th entry resource is occupied", the interface board will modify the resource usage of the 40 th entry resource in the resource information recorded by the interface board to be used.
Step 202, an interface board receives a main/standby switching end instruction sent by a second main control board, where the second main control board is used as a standby main control board of the first main control board, and is used to perform main/standby switching with the first main control board when detecting that the first main control board is abnormal, and send a main/standby switching end instruction when completing the main/standby switching.
When the first main control board as the main control board works normally, the second main control board as the standby main control board does not communicate with the interface board and participate in managing the operation of the network device, but is mainly responsible for receiving various kinds of information synchronized by the first main control board, such as state information of ports, initialized hardware resource information, and the like. The purpose of the method is to keep various information stored in the second main control board consistent with the first main control board, so as to ensure that the second main control board can take over all work of the main control board correctly after the second main control board is switched to the main control board for maintaining the operation of the network equipment when the first main control board fails.
Generally, when an abnormality occurs in a first main control board as an active main control board, a second main control board detects the abnormality and performs active-standby switching with the first main control board, that is, the second main control board as a standby main control board is switched to the active main control board, and the first main control board is switched to the standby main control board. The possible abnormality of the first main control board includes power failure and other abnormality which makes the first main control board unable to work normally.
As an embodiment, since the first main control board and the second main control board usually send heartbeat messages at regular time to detect the operating condition of the other side, the second main control board can determine whether the first main control board is abnormal by judging whether the heartbeat messages sent by the first main control board are received within a preset time. For example, if the preset time is T1 and the second main control board does not receive the heartbeat message sent by the first main control board in T1, it may be determined that the first main control board is abnormal, and the main/standby switching operation is performed accordingly.
As an embodiment, after the main/standby switching is finished, the second main control board sends a main/standby switching end instruction to each interface board of the network device.
Step 203, the interface board sends the recorded resource information to the second main control board, so as to implement resource information synchronization between the first main control board and the second main control board.
As an embodiment, the interface board may send all the resource information that is sent by the first main control board serving as the main control board and is recorded by the interface board, and the initial resource condition of the interface board to the second main control board serving as the main control board. The initial resource condition here may include the total amount of resources of the interface board, the default resource usage amount, and the like. Taking the table entry resource as an example, the initial resource condition specifically may include: the total table entry amount of the table entry resources, the table entry resources reserved for specific functions in the table entry resources, and the like.
As a simple example, if the total amount of table entry resources on an interface board is one thousand table entry resources when the interface board is started, where 0 to 20 th table entries are reserved for a certain function module, the interface board may send the initial resource condition to the first main control board.
As another embodiment, if the second main control board already records the initial resource condition of the interface board, the interface board may send only the resource information issued when the first main control board is used as the active main control board to the second main control board.
In this embodiment, the manner for the second main control board to obtain the initial resource condition of the interface board may be: when the interface board is started, the interface board sends the initial resource condition of the interface board to the second main control board.
The following steps can be also included: when the interface board is started, the initial resource condition of the interface board is sent to a first main control board serving as a main control board, and the initial resource information is synchronously sent to a second main control board by the first main control board. This is not particularly limited by the present application.
Through this step 203, the synchronization of the resource information between the first main control board and the second main control board is realized, so that the second main control board can take over the work of the main control board correctly, that is, in the network device, the second main control board is used as the main control board to perform the work of communicating with the interface board, managing the operation of the network device, and the like.
Thus, the flow shown in fig. 2 is completed.
As can be seen from the flow shown in fig. 2, in the present application, the interface board receives the resource information sent by the first main control board serving as the main control board, and sends the resource information to the second main control board switched to the main control board after the main-standby switching is completed, so that under the condition that a channel between two main controls is not occupied to transmit the resource information, synchronization of the resource information recorded by the two main control boards is achieved, and the problem of channel congestion possibly caused by the transmission of a large amount of resource information through the channel between the two main control boards is avoided.
In the above step 201, the resource information of the sending interface board of the first main control board in the normal state is described as follows:
in one example, the resource information of the interface board herein includes a resource usage of the interface board recorded on the first main control board as the main control board by the upper layer application after the upper layer application operates the resource.
In this embodiment, after the upper layer application operates the resources of the interface board recorded on the first main control board, the first main control board changes the recorded resource usage of the interface board according to the operation, and issues the specific content of the operation and the resource usage related to the operation to the interface board.
In this embodiment, the resource usage may include idle, occupied, reserved, and the like.
For a resource whose resource usage is occupied, the resource usage may further include an identifier of data occupying the resource, such as a routing identifier, a VLAN identifier, and the like;
for a resource whose resource usage is reserved, the resource usage may further include which functional module of the network device the reserved resource is allocated to, and so on.
Since the network device usually has a plurality of interface boards, if the upper layer application operates on the resources of all the interface boards at the same time, in this embodiment, the first main control board may issue the resource usage of the interface board after the operation is executed to each interface board.
If the upper layer application operates on the resource of a certain interface board alone, in this embodiment, the first main control board may issue the resource condition of the interface board after the operation is executed to the interface board only for the interface board.
As an embodiment, the operation performed by the upper layer application on the resources of the interface board may be used to select a free resource with a size of N1 from the resources of the interface board recorded by the first main control board, and occupy the selected free resource for data storage. In this embodiment, the resource usage is information that the selected idle resource is occupied.
With reference to step 201, specifically, in this embodiment, after the upper layer application operates the resource of the interface board recorded by the first main control board, the first main control board selects information that the idle resource with size N1 is occupied according to the operation record, and sends the information to the interface board.
N1 in this embodiment can be selected according to actual needs, for example, according to the size of data to be stored.
To facilitate understanding of the present embodiment, a simple example is as follows:
assuming that an upper application performs an operation on resources of an interface board to select a free resource with a size of N1 from the resources of the interface board recorded by the first master control board for storing a route, for example, 20 to 25 table resource in a routing table of the interface board are selected for storing a route, after performing the operation, the first master control board may record information that "20 to 25 table resource in the routing table of the interface board is occupied" or "20 table resource is used for storing ID1(ID1 is used for identifying a route), 21 table resource is used for storing ID2(ID2 is used for identifying a route and the route is different from the route identified by ID 1) … …" and the like can be used for indicating that the table resource is occupied, and issue the information to the interface board.
In this embodiment, the upper layer application can directly select an idle resource with a size of N1 from the interface board resources recorded by the first main control board, and occupy the idle resource for data storage; or the upper layer application issues the data to be stored to the first main control board, and the first main control board selects the idle resource with the size of N1 from the recorded interface board resources and stores the data issued by the upper layer application. The application is not particularly limited as to how the upper layer application selects free resources for storing data.
As an embodiment, the operation performed by the upper layer application on the resource of the interface board may be used to release the occupied resource of size N2 in the resource of the interface board recorded by the first master control board. In this embodiment, the resource usage is information of the released resource.
N2 in this embodiment is the size of the occupied resource of the interface board that actually needs to be released as indicated by the operation of the upper layer application.
To facilitate understanding of the present embodiment, a simple example is as follows:
assume that the operation of the upper layer application on the resource of the interface board is used to release the occupied resource of size N2 in the resource of the interface board recorded by the first master control board. For example, the upper layer application operates on the resources of the interface board to release resources of 101 to 103 entries in the routing table of the interface board, after the operation is executed, the first main control board records information that can indicate the released resources, such as "data in 101 to 103 entries in the routing table of the interface board is released" or "101 to 103 entries in the routing table of the interface board are idle entries", and sends the information to the interface board.
In this embodiment, the upper layer application can specify to release the occupied resource with the size of N2 in the interface board resources recorded by the first main control board to release the occupied resource; or the upper layer application issues a resource release condition to the first main control board, and the first main control board releases the occupied resource with the size of N2 in the recorded interface board resources according to the resource release condition. The present application does not specifically limit how the upper layer application releases the occupied interface board resources.
As an embodiment, the operation performed by the upper layer application on the resources of the interface board may be used to select a free resource with a size of N3 from the recorded resources of the interface board by the first master control board as a reserved resource. In this embodiment, the resource usage is the information of the reserved resource.
N3 in this embodiment may be set according to the size of the resource that needs to be reserved actually.
To facilitate understanding of the present embodiment, a simple example is as follows:
assuming that the operation performed by the upper layer application on the resources of the interface board is used to select an idle resource with a size of N3 from the resources of the interface board recorded by the first main control board as a reserved resource, for example, 0 to 100 entries in the table a of the interface board are selected and used as the reserved resource of the first function module of the network device, after the upper layer application performs the operation, the first main control board may record information that can be used to indicate the reserved resource, such as "0 to 100 entries in the table a of the interface board are reserved", and issue the information to the interface board.
In this embodiment, the upper layer application may directly select an idle resource with a size of N3 from the interface board resources recorded by the first main control board, and use the idle resource as a reserved resource; the upper layer application may also issue a condition related to selecting reserved resources to the first main control board, and the first main control board selects an idle resource with a size of N3 from the recorded interface board resources as the reserved resource accordingly. The application is not particularly limited as to how the upper layer application selects free resources for storing data.
In practical applications, the resource size in the above embodiments may be specifically represented by a start address and an end address of the resource, an identifier of the resource, and the like, and there is no necessary connection between N1, N2, and N3 for indicating the resource size in the above embodiments.
In another example, when the resource information sent by the first main control board to the interface board includes that the first main control board learns new data, an idle resource with a size of N4 is selected from the resources of the interface board, and the selected idle resource is occupied for storing the resource usage of the data.
For example, when the first main control board learns a new route, a free entry may be selected from entries for storing routes of recorded interface boards, the free entry is occupied for storing the learned new route, and information that the selected free entry is occupied is sent to the interface board.
So far, the description of the resource information of the sending interface board of the first main control board in the step 201 is completed in a normal time. It should be noted that the foregoing embodiments are only examples, and are not intended to limit the present application, and in particular, other situations may exist when the first main control board sends the resource information of the interface board at normal time, and are not listed here.
In an example, before the first main control board issues the resource information of the interface board to the interface board, an initial resource condition of the interface board may also be obtained first, which is described in the following example:
as an embodiment, before performing the step 201, when the interface board is started, the interface board may send its initial resource condition to the first main control board, so that the first main control board records the initial resource condition and synchronizes to the second main control board. The initial resource situation here may include: the total amount of resources, the usage of default resources, etc. have been described above by way of example, and are not described herein again.
By the embodiment, the first main control board can acquire the initial resource condition of the interface board, so that the first main control board can be used as a reference when issuing the resource information of the interface board, for example, when the upper layer application instructs the first main control board to select a free resource from the recorded interface board resources for data storage, the first main control board can determine the free resource which can be used for storing data from the resources of the interface board according to the acquired initial resource condition of the interface board.
For example, the upper layer application instructs the first main control board to select an idle resource from the recorded interface board resources for storing three routes, and the initial resource condition of the interface board acquired by the first main control board is as follows: the total number of the table item resources is 0-999, wherein 0-160 table item resources are occupied, and then the first main control board can select three routes from 161-999 table item resources for storing the three routes indicated and stored by the upper layer application.
By the embodiment, the initial resource conditions of the interface boards recorded by the first main control board and the second main control board can be ensured to be consistent.
As another embodiment, before executing step 201, when the interface board is started, the interface board may send its initial resource status to the first main control board and the second main control board respectively. The present embodiment can achieve the advantageous effects similar to those of the previous embodiment.
So far, the description has been made on the initial resource condition of the interface board obtained before the first main control board issues the resource information of the interface board to the interface board.
The method provided by the present application is described above, and the device provided by the present application is described below:
referring to fig. 4, fig. 4 is a schematic structural diagram of a resource synchronization apparatus provided in the present application. In one embodiment, the apparatus is applied to a network device including at least one interface board. As shown in fig. 4, the apparatus includes an information receiving module 401, an instruction receiving module 402, and an information transmitting module 403.
In an example, the information receiving module 401 is configured to enable an interface board to receive resource information of the interface board issued by a first main control board, which is an active main control board in the network device, when the first main control board is normal;
an instruction receiving module 402, configured to enable an interface board to receive a main/standby switching end instruction sent by a second main control board, where the second main control board is used as a standby main control board of the first main control board, and is configured to perform main/standby switching with the first main control board when detecting that the first main control board is abnormal, and send a main/standby switching end instruction when the main/standby switching is completed;
an information sending module 403, configured to enable an interface board to send the recorded resource information to the second main control board, so as to implement resource information synchronization between the first main control board and the second main control board.
As an embodiment, the resource information of the interface board includes:
and the upper layer application operates the resource use condition of the interface board recorded on the first main control board.
As an embodiment, the operation is configured to select an idle resource with a size of N1 from the resources of the interface board recorded by the first main control board, and occupy the selected idle resource for data storage;
the resource usage is the information that the selected free resource is occupied.
As another embodiment, the operation is used to release the occupied resource with the size N2 from the recorded resources of the interface board of the first main control board;
the resource usage is the information of the released resource;
as another embodiment, the operation is to release the occupied resource with the size N2 from the recorded resources of the interface board of the first main control board;
the resource usage is information of the released resource.
Referring to fig. 5, fig. 5 is a schematic structural diagram of another resource synchronization apparatus provided in the present application. As shown in fig. 5, the apparatus further comprises:
an initial synchronization module 404, configured to send an initial resource condition of the interface board to the first main control board when the interface board is started, so that the first main control board records the initial resource condition and synchronizes the initial resource condition to the second main control board.
The implementation process of the functions and actions of the modules in the apparatus is specifically described in the implementation process of the corresponding steps in the method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the components shown as modules may or may not be physical modules, may be located in one place, or may be distributed over a plurality of network modules. The modules can be selected according to actual needs to achieve the purpose of the scheme in the specification. One of ordinary skill in the art can understand and implement it without inventive effort.
Referring to fig. 6, fig. 6 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure. The electronic device may include a processor 601, memory 602, and a communication bus 603. The processor 601 and the memory 602 communicate with each other via a communication bus 603. Wherein, the memory 602 stores a computer program; the processor 601 may perform the resource synchronization method described above by executing a program stored on the memory 602.
The memory 602 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the memory 602 may be: RAM (random access memory), volatile memory, non-volatile memory, flash memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, dvd, etc.), or similar storage medium, or a combination thereof.
Embodiments of the present application also provide a machine-readable storage medium, such as the memory 602 in fig. 6, storing a computer program, which can be executed by the processor 601 in the electronic device shown in fig. 6 to implement the resource synchronization method described above.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (10)

1. A resource synchronization method is applied to a network device, the network device comprises at least one interface board, and the method comprises the following steps:
the interface board receives resource information of the interface board issued by a first main control board serving as a main control board in the network equipment when the first main control board is normal;
the interface board receives a main-standby switching end instruction sent by a second main control board, wherein the second main control board is used as a standby main control board of the first main control board and is used for performing main-standby switching with the first main control board when the first main control board is detected to be abnormal, and sending the main-standby switching end instruction when the main-standby switching is completed;
the interface board sends the recorded resource information to the second main control board so as to realize the resource information synchronization between the first main control board and the second main control board.
2. The method of claim 1, wherein the resource information of the interface board comprises:
and the upper layer application operates the resource use condition of the interface board recorded on the first main control board.
3. The method according to claim 2, wherein the operation is to select a free resource with a size of N1 from the recorded resources of the interface boards of the first master control board, and occupy the selected free resource for data storage;
the resource usage condition is the occupied information of the selected free resource.
4. The method according to claim 2, wherein the operation is to release occupied resources of size N2 from the recorded resources of the interface boards of the first master control board;
the resource usage is the information of the released resource.
5. The method according to claim 2, wherein the operation is to select a free resource with a size of N3 as a reserved resource from the recorded resources of the interface boards of the first master control board;
the resource use condition is the information of the reserved resource.
6. The method of claim 1, further comprising:
when the interface board is started, the initial resource condition of the interface board is sent to the first main control board, so that the first main control board records the initial resource condition and synchronizes the initial resource condition to the second main control board.
7. A resource synchronization apparatus is applied to a network device, the network device includes at least one interface board, and the apparatus includes:
an information receiving module, configured to enable an interface board to receive resource information of the interface board issued by a first main control board, which is a main control board, of the network device when the first main control board is normal;
the instruction receiving module is used for enabling the interface board to receive a main/standby switching end instruction sent by a second main control board, wherein the second main control board is used as a standby main control board of the first main control board and is used for performing main/standby switching with the first main control board when the first main control board is detected to be abnormal, and sending the main/standby switching end instruction when the main/standby switching is completed;
and the information sending module is used for enabling the interface board to send the recorded resource information to the second main control board so as to realize resource information synchronization between the first main control board and the second main control board.
8. The apparatus of claim 7, wherein the resource information of the interface board comprises:
and the upper layer application operates the resource use condition of the interface board recorded on the first main control board.
9. The apparatus of claim 8,
the operation is used for selecting idle resources with the size of N1 from the recorded resources of the interface board of the first main control board, and occupying the selected idle resources for data storage; the resource use condition is the occupied information of the selected idle resource; or,
the operation is used for releasing occupied resources with the size of N2 in the recorded resources of the interface board of the first main control board; the resource use condition is the information of the released resource; or,
the operation is used for releasing occupied resources with the size of N2 in the recorded resources of the interface board of the first main control board; the resource usage is the information of the released resource.
10. The apparatus of claim 1, further comprising:
and the initial synchronization module is used for sending the initial resource condition of the interface board to the first main control board when the interface board is started, so that the first main control board records the initial resource condition and synchronizes the initial resource condition to the second main control board.
CN201911414354.XA 2019-12-31 2019-12-31 Resource synchronization method and device Active CN111211927B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911414354.XA CN111211927B (en) 2019-12-31 2019-12-31 Resource synchronization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911414354.XA CN111211927B (en) 2019-12-31 2019-12-31 Resource synchronization method and device

Publications (2)

Publication Number Publication Date
CN111211927A true CN111211927A (en) 2020-05-29
CN111211927B CN111211927B (en) 2023-01-24

Family

ID=70788336

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911414354.XA Active CN111211927B (en) 2019-12-31 2019-12-31 Resource synchronization method and device

Country Status (1)

Country Link
CN (1) CN111211927B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113126479A (en) * 2021-03-23 2021-07-16 广东芬尼克兹节能设备有限公司 Coordination control method of double-master-control-board circuit
CN115766625A (en) * 2022-09-07 2023-03-07 迈普通信技术股份有限公司 Interface resource synchronization method and device and distributed switch

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488844A (en) * 2009-02-23 2009-07-22 中兴通讯股份有限公司 Method and system for communication link switching control between boards
CN101931550A (en) * 2009-06-23 2010-12-29 中兴通讯股份有限公司 Method and device for synchronizing main and standby main control boards
CN102255798A (en) * 2011-06-15 2011-11-23 福建星网锐捷网络有限公司 Method and line card for synchronizing route forwarding table items
CN102843264A (en) * 2012-09-21 2012-12-26 中国航空无线电电子研究所 Control method of double hosts in high-speed serial bus network
CN105391629A (en) * 2014-09-05 2016-03-09 杭州迪普科技有限公司 Resource backup method and device
US20160105320A1 (en) * 2014-10-14 2016-04-14 Cisco Technology, Inc. Automated network configuration in a closed network topology
CN109739622A (en) * 2018-12-29 2019-05-10 杭州迪普科技股份有限公司 Active and standby master control configuration and synchronization method and device based on frame type equipment

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488844A (en) * 2009-02-23 2009-07-22 中兴通讯股份有限公司 Method and system for communication link switching control between boards
CN101931550A (en) * 2009-06-23 2010-12-29 中兴通讯股份有限公司 Method and device for synchronizing main and standby main control boards
CN102255798A (en) * 2011-06-15 2011-11-23 福建星网锐捷网络有限公司 Method and line card for synchronizing route forwarding table items
CN102843264A (en) * 2012-09-21 2012-12-26 中国航空无线电电子研究所 Control method of double hosts in high-speed serial bus network
CN105391629A (en) * 2014-09-05 2016-03-09 杭州迪普科技有限公司 Resource backup method and device
US20160105320A1 (en) * 2014-10-14 2016-04-14 Cisco Technology, Inc. Automated network configuration in a closed network topology
CN109739622A (en) * 2018-12-29 2019-05-10 杭州迪普科技股份有限公司 Active and standby master control configuration and synchronization method and device based on frame type equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113126479A (en) * 2021-03-23 2021-07-16 广东芬尼克兹节能设备有限公司 Coordination control method of double-master-control-board circuit
CN115766625A (en) * 2022-09-07 2023-03-07 迈普通信技术股份有限公司 Interface resource synchronization method and device and distributed switch

Also Published As

Publication number Publication date
CN111211927B (en) 2023-01-24

Similar Documents

Publication Publication Date Title
CN105939365B (en) Master control borad User space obtains the method and device of data from business intralaminar nuclei state
CN103618621B (en) A kind of software defined network SDN method of automatic configuration, equipment and system
US9455898B2 (en) System and method for facilitating protection against run-away subnet manager instances in a middleware machine environment
CN110635987B (en) Message transmission method, device, equipment and machine readable storage medium
US20140026000A1 (en) Highly available server system based on cloud computing
CN109376197B (en) Data synchronization method, server and computer storage medium
CN102231682B (en) Stacking conflict processing method and equipment
EP3316555B1 (en) Mac address synchronization method, device and system
EP3506562B1 (en) Method for registering single board, single board, and forwarding device
CN110601903A (en) Data processing method and device based on message queue middleware
CN111211927B (en) Resource synchronization method and device
CN102238093A (en) Service interruption prevention method and device
US20160191647A1 (en) Method, device and computer storage medium for implementing interface cache dynamic allocation
CN103546315A (en) System, method and equipment for backing up DHCP (dynamic host configuration protocol) server
CN104753707A (en) System maintenance method and network switching equipment
CN114679349A (en) Data communication method and device
CN109150709B (en) Method, equipment and system for realizing Mux machine
CN102404339B (en) Fire wall system and data processing method based on fire wall system
CN105450679A (en) Method and system for performing data cloud storage
CN108574587A (en) The capacity update method and device of distributed apparatus
CN114124803B (en) Device management method and device, electronic device and storage medium
CN111510336B (en) Network equipment state management method and device
CN107145408A (en) A kind of method and system for realizing active and standby clustered deploy(ment)
CN111464346B (en) Main and standby control board synchronization method and system based on ATCA (advanced telecom computing architecture)
KR102251407B1 (en) Duplex control system and method for control in software defined network

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