CN112187578A - Table entry generation method, device and equipment - Google Patents

Table entry generation method, device and equipment Download PDF

Info

Publication number
CN112187578A
CN112187578A CN202011040484.4A CN202011040484A CN112187578A CN 112187578 A CN112187578 A CN 112187578A CN 202011040484 A CN202011040484 A CN 202011040484A CN 112187578 A CN112187578 A CN 112187578A
Authority
CN
China
Prior art keywords
control board
main control
table entry
hardware
message
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
CN202011040484.4A
Other languages
Chinese (zh)
Other versions
CN112187578B (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.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security 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 New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN202011040484.4A priority Critical patent/CN112187578B/en
Publication of CN112187578A publication Critical patent/CN112187578A/en
Application granted granted Critical
Publication of CN112187578B publication Critical patent/CN112187578B/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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0852Delays
    • 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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0823Errors, e.g. transmission errors
    • H04L43/0829Packet loss
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • H04L43/106Active monitoring, e.g. heartbeat, ping or trace-route using time related information in packets, e.g. by adding timestamps

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Environmental & Geological Engineering (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a method, a device and equipment for generating table items, wherein the method comprises the following steps: receiving a detection message sent by a main master control board, and storing the detection message in a message queue; aiming at each detection message in the message queue, generating a software table entry according to the detection message, wherein the software table entry comprises an enabling mark; for each software table entry, determining an enabling mark included by the software table entry; if the enabling mark is a first value, generating a hardware table according to the software table, and issuing the hardware table to a hardware chip; and if the enabling mark is a second value, forbidding to generate a hardware table item according to the software table item. According to the technical scheme, a large number of hardware table entries are prevented from being issued to the hardware chip, time for issuing the hardware table entries to the hardware chip is saved, the detection task is rapidly switched from the original main control board to the new main control board, and time for restoring the service to be normal is shortened.

Description

Table entry generation method, device and equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, an apparatus, and a device for generating a table entry.
Background
TWAMP (Two Way Active Measurement Protocol) is a performance test technology of a network link, and can perform bidirectional performance test in both forward and reverse directions. For example, the home network device periodically (for example, sends a detection message every 1 millisecond) to the peer network device, after receiving the detection message, the peer network device returns the detection message to the home network device, and the home network device determines, according to the sending condition and the receiving condition of the detection message, network link performance between the home network device and the peer network device, such as link delay, link packet loss rate, and other network link performance.
If the local network device is a distributed network device, the local network device includes a main control board, a standby main control board and a service board, when the main control board fails, the main and standby switching is triggered, and the standby main control board takes over the operation, so as to ensure the normal operation of the service. If the active-standby switching is required, after the standby main control board becomes the new active main control board, the TWAMP detection task configured on the service board by the original active main control board will also perform the active-standby switching accordingly, that is, the TWAMP detection task needs to be switched from the original active main control board to the new active main control board. However, the processing time for switching the TWAMP detection task from the original main control board to the new main control board is long, so that the time for recovering the service is prolonged, and the service experience is affected.
Disclosure of Invention
The application provides a table entry generating method, a home network device comprises a main control board, a standby control board and a service board, the method is applied to the service board, and the method comprises the following steps:
receiving a detection message sent by a main master control board, and storing the detection message in a message queue;
aiming at each detection message in the message queue, generating a software table entry according to the detection message, wherein the software table entry comprises an enabling mark; before the local-end network equipment is switched from the main control board to the standby main control board, the enabling mark is a first value; after the local-end network equipment is switched from the main control board to the standby main control board, the enabling mark is a first value or a second value;
for each software table entry, determining an enabling mark included by the software table entry; if the enabling mark is a first value, generating a hardware table item according to the software table item, and sending the hardware table item to a hardware chip, so that the hardware chip sends a detection message to the opposite-end network device according to the hardware table item, wherein the detection message is used for detecting the network link performance between the local-end network device and the opposite-end network device;
and if the enabling mark is a second value, forbidding to generate a hardware table item according to the software table item.
The application provides a table item generating device, a home network device includes a main control board, a standby control board and a service board, the device is applied to the service board, the device includes:
the receiving module is used for receiving the detection message sent by the main control board;
the storage module is used for storing the detection message to a message queue;
a generating module, configured to generate, for each probe message in the message queue, a software table entry according to the probe message, where the software table entry includes an enable flag; before the local-end network equipment is switched from the main control board to the standby main control board, the enabling mark is a first value; after the local-end network equipment is switched from the main control board to the standby main control board, the enabling mark is a first value or a second value;
the processing module is used for determining an enabling mark included by each software table entry; if the enabling mark is a first value, generating a hardware table item according to the software table item, and sending the hardware table item to a hardware chip, so that the hardware chip sends a detection message to the opposite-end network device according to the hardware table item, wherein the detection message is used for detecting the network link performance between the local-end network device and the opposite-end network device; and if the enabling mark is a second value, forbidding to generate a hardware table item according to the software table item.
The application provides a home terminal network device, which comprises a main control board, a standby main control board and a service board;
the main master control board is used for sending a detection message to the service board;
the service board is used for storing the detection message to a message queue;
aiming at each detection message in the message queue, generating a software table entry according to the detection message, wherein the software table entry comprises an enabling mark; before the local-end network equipment is switched from the main control board to the standby main control board, the enabling mark is a first value; after the local-end network equipment is switched from the main control board to the standby main control board, the enabling mark is a first value or a second value;
for each software table entry, determining an enabling mark included by the software table entry; if the enabling mark is a first value, generating a hardware table item according to the software table item, and sending the hardware table item to a hardware chip, so that the hardware chip sends a detection message to the opposite-end network device according to the hardware table item, wherein the detection message is used for detecting the network link performance between the local-end network device and the opposite-end network device;
and if the enabling mark is a second value, forbidding to generate a hardware table item according to the software table item.
Based on the above technical solution, in the embodiment of the present application, when the hardware table entry needs to be generated according to the software table entry, determining the enabling mark included in the software table item, if the enabling mark is the second value (indicating that the local network device has been switched from the main control board to the standby main control board), forbidding to generate the hardware table item according to the software table item, the TWAMP detection task can be quickly switched from the original main control board to the new main control board, the time for switching the TWAMP detection task from the original main control board to the new main control board is short, the time for restoring the service to normal is shortened, and the service experience is improved. The method effectively avoids redundant issuing and deleting operation of hardware table entries, improves the processing speed of the main/standby switching, reduces the time required for restoring the normal service after the main/standby switching, improves the utilization efficiency of the hardware and reduces the energy consumption.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments of the present application or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art according to the drawings of the embodiments of the present application.
FIG. 1 is a schematic diagram of an application scenario in an embodiment of the present application;
FIGS. 2A-2D are schematic diagrams of a message queue in one embodiment of the present application;
FIG. 3 is a flow diagram of a method for entry generation in one embodiment of the present application;
FIG. 4 is a diagram of a message queue in one embodiment of the present application;
fig. 5 is a block diagram of an entry generation and transmission apparatus according to an embodiment of the present application.
Detailed Description
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the 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 is meant to encompass 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 in the embodiments of the present application to describe various information, the information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. Depending on the context, moreover, the word "if" as used may be interpreted as "at … …" or "when … …" or "in response to a determination".
Referring to fig. 1, a home network device (e.g., a router, a switch, etc.) may be a distributed network device, that is, the home network device may include an active main control board, a standby main control board, and a service board (the number of the service boards may be multiple, and herein, one service board is taken as an example, and a service board may also be referred to as a line card).
For example, the active main control board may create a large number of TWAMP detection tasks, where each TWAMP detection task is used to determine network link performance, such as link delay, link packet loss rate, and the like, between the local-end network device and an opposite-end network device (the opposite-end network device is a distributed network device or the opposite-end network device is not a distributed network device, which is not limited to this). For example, the TWAMP probe task 1 is configured to determine a network link performance between the local network device and the peer network device 1, the TWAMP probe task 2 is configured to determine a network link performance between the local network device and the peer network device 2, the TWAMP probe task 3 is configured to determine a network link performance between the local network device and the peer network device 3, and so on.
For each TWAMP probe task, the active main control board may obtain a packet sending parameter (which may be referred to as packet sending configuration) and a packet receiving parameter (which may be referred to as packet receiving configuration) of the TWAMP probe task, where the packet sending parameter may include, but is not limited to, a source IP address, a destination IP address, a source port, a destination port, a packet sending rate, a packet sending size, and the like, and the packet sending parameter is not limited. The packet receiving parameter may include, but is not limited to, a source IP address, a destination IP address, a source port, a destination port, and the like. Illustratively, the source IP address (hereinafter referred to as IPa1) in the packet sending parameter is the same as the destination IP address (hereinafter referred to as IPb2) in the packet receiving parameter, the destination IP address (hereinafter referred to as IPa2) in the packet sending parameter is the same as the source IP address (hereinafter referred to as IPb1) in the packet receiving parameter, the source port (hereinafter referred to as port c1) in the packet sending parameter is the same as the destination port (hereinafter referred to as port d2) in the packet receiving parameter, and the destination port (hereinafter referred to as port c2) in the packet sending parameter is the same as the source port (hereinafter referred to as port d1) in the packet receiving parameter.
For each TWAMP probe task, the active main control board sends a probe message to the service board, where the probe message includes a packet sending parameter and a packet receiving parameter of the TWAMP probe task, and the probe message is used to trigger the service board to execute the TWAMP probe task. And after receiving the detection message, the service board stores the detection message into a message queue. Because the main control board creates a large number of TWAMP detection tasks, and each TWAMP detection task corresponds to one detection message, the service board can receive a large number of detection messages and store the detection messages in the message queue. Referring to fig. 2A, a schematic diagram of a message queue is shown, where the message queue includes 512 probe messages, each of which includes a packet sending parameter and a packet receiving parameter.
For each probe message of the message queue, the service board may generate a software table entry based on a packet sending parameter and a packet receiving parameter in the probe message, taking the example that the software table entry includes three software sub-table entries, where the software sub-table entry 1 includes a source IP address, a destination IP address, a source port, and a destination port in the packet sending parameter, the software sub-table entry 2 includes a packet sending rate and a packet sending size in the packet sending parameter, and the software sub-table entry 3 includes a source IP address, a destination IP address, a source port, and a destination port in the packet receiving parameter. Of course, the above is only an example of the software table entry, and the software table entry is not limited. Since there are 512 probe messages in the message queue, the service board will generate 512 software entries, and each software entry may include three software sub-entries.
For each software entry, the service board may further generate a hardware entry corresponding to the software entry, and issue the hardware entry to a hardware chip (such as an NP (NetWork Processor) chip) of the service board, taking the example that the hardware entry includes three hardware sub-entries, where the hardware sub-entry 1 includes a source IP address, a destination IP address, a source port, and a destination port in a packet sending parameter, the hardware sub-entry 2 includes a packet sending rate and a packet sending size in the packet sending parameter, and the hardware sub-entry 3 includes a source IP address, a destination IP address, a source port, and a destination port in a packet receiving parameter. Of course, the above is only an example of the hardware table entry, and the hardware table entry is not limited, for example, the hardware table entry may be different from the software table entry. Because 512 probe messages exist in the message queue, the service board generates 512 software entries, generates 512 hardware entries, and issues the 512 hardware entries to the hardware chip.
For example, the hardware chip may maintain various types of tables, such as an Access Control List (ACL) table, an Operation Administration and Maintenance (OAM) table, a Real Time Clock (RTC) table, and the like, without limitation.
When the hardware table entry is issued to the hardware chip, the three hardware sub-tables of the hardware table entry may be issued to the same table of the hardware chip or to different tables of the hardware chip.
For example, see table 1 for an example of issuing a hardware entry to a hardware chip. In table 1, taking a hardware table entry as an example, in practical application, many hardware table entries are issued to the hardware chip.
TABLE 1
Figure BDA0002706471080000061
For the hardware chip of the service board, after obtaining the hardware table entry, TWAMP detection task 1 may be executed based on the hardware table entry, and the following describes the process. The hardware chip generates a detection message 1 based on the hardware table entry (e.g., hardware sub-table entry 1), the source IP address of the detection message 1 is IPa1 (i.e., the IP address of the home-end network device), the destination IP address of the detection message 1 is IPa2 (i.e., the IP address of the peer-end network device), the source port of the detection message 1 is port c1, and the destination port of the detection message 1 is port c 2.
The hardware chip sets a timer based on the hardware table item (such as the hardware sub-table item 2), the timeout time of the timer is determined based on the rate x1, and if the rate x1 indicates that the detection message is sent every N milliseconds, the timeout time of the timer is N milliseconds, so that the hardware chip sends the detection message every N milliseconds.
When the timer times out each time, the hardware chip may send a detection message, for example, the hardware chip adds a timestamp (denoted as a sending timestamp) of the current time to the detection message 1, organizes the detection message with the sending timestamp into a detection message with a size of x2 (known based on the hardware table entry), records the detection message as a detection message 2, and sends the detection message 2. Obviously, the source IP address of the detection packet 2 is IPa1, the destination IP address is IPa2, the source port is port c1, and the destination port is port c2, and the detection packet 2 carries the sending timestamp of the current time, where the sending timestamp represents the sending time of the detection packet 2.
After receiving the detection message 2, the opposite-end network device modifies the detection message 2 into a detection message 3, and returns the detection message 3 to the home-end network device, and a hardware chip of a service board of the home-end network device can receive the detection message 3. The source IP address of the detection packet 3 is IPa2 (i.e., the destination IP address of the detection packet 2), the destination IP address is IPa1 (i.e., the source IP address of the detection packet 2), the source port is port c2 (i.e., the destination port of the detection packet 2), the destination port is port c1 (i.e., the source port of the detection packet 2), and the detection packet 3 also carries the sending timestamp in the detection packet 2.
After receiving the detection message 3, the hardware chip determines whether the detection message 3 is a legal message based on the hardware table entry (e.g., the hardware sub-table entry 3), where the legal message indicates that the network link performance needs to be determined based on the detection message 3. For example, if the source IP address of the detection packet 3 is the same as the source IP address of the hardware sub-table 3, the destination IP address of the detection packet 3 is the same as the destination IP address of the hardware sub-table 3, the source port of the detection packet 3 is the same as the source port of the hardware sub-table 3, and the destination port of the detection packet 3 is the same as the destination port of the hardware sub-table 3, it is determined that the detection packet 3 is a valid packet, otherwise, it is determined that the detection packet 3 is not a valid packet.
When the detection message 3 is not a legal message, the hardware chip may discard the detection message 3.
When the detection packet 3 is a legal packet, the hardware chip may add a timestamp (denoted as a receiving timestamp) of the current time to the detection packet 3 to obtain a detection packet 4, and store the detection packet 4 in a storage device (such as a register).
The service board can determine the network link performance between the local terminal network device and the opposite terminal network device according to the sending condition and the receiving condition of the detection message. For example, the service board reads all detection messages in the register, each detection message includes a sending timestamp and a receiving timestamp, for each detection message, a difference value between the receiving timestamp of the detection message and the sending timestamp of the detection message is used as a transmission time of the detection message, and a link delay between the local terminal network device and the opposite terminal network device can be determined based on the transmission time of all the detection messages, for example, an average value of the transmission time of all the detection messages is the link delay. In addition, the service board may count the transmission number and the reception number of the detection packet, and determine the link packet loss rate between the local network device and the opposite network device according to the transmission number and the reception number, where the ratio of the reception number to the transmission number is the link packet loss rate. For example, the service board may determine the sending number of the detection packets based on the packet sending rate, and determine the receiving number of the detection packets based on the number of all the detection packets in the register.
Of course, the above is only an example of determining the network link performance by the service board, and the determination method is not limited as long as the network link performance can be obtained. After obtaining the network link performance, the service board may send the network link performance to the main control board, so that the main control board can learn and store the network link performance.
In a possible implementation manner, when the active main control board fails, the active-standby switching is triggered, and the standby main control board takes over the operation, so as to ensure normal operation of the service. If the active-standby switching is required, after the standby main control board becomes the new active main control board, the TWAMP detection task configured on the service board by the original active main control board will also perform the active-standby switching accordingly, that is, the TWAMP detection task needs to be switched from the original active main control board to the new active main control board, and the switching process of the TWAMP detection task will be described below.
After the standby main control board becomes the new main control board, aiming at each detection message in the message queue of the service board, the standby main control board sends a stop message aiming at the detection message to the service board, wherein the stop message is used for triggering the service board to delete the software table entry and the hardware table entry generated by the detection message. For example, as shown in fig. 2A, the message queue includes 512 probe messages, and therefore, the standby master control board needs to send 512 stop messages to the service board, and store all the stop messages in the message queue. Referring to fig. 2B, a diagram of a message queue is shown, the message queue including 512 probe messages and 512 stop messages.
For each stop message of the message queue, the service board deletes the software table entry and the hardware table entry based on the stop message. For example, based on the stop message 1 corresponding to the probe message 1, the service board deletes the software table entry 1 and the hardware table entry 1, where the software table entry 1 is a software table entry generated based on the probe message 1, the hardware table entry 1 is a hardware table entry generated based on the software table entry 1, and so on, based on the stop message 512 corresponding to the probe message 512, the service board deletes the software table entry 512 and the hardware table entry 512, where the software table entry 512 is a software table entry generated based on the probe message 512, and the hardware table entry 512 is a hardware table entry generated based on the software table entry 512.
After the standby main control board sends the stop message for all the probe messages to the service board, the standby main control board may create a large number of TWAMP probe tasks (the same as the TWAMP probe tasks created by the main control board), and for each TWAMP probe task, obtain the packet sending parameters and the packet receiving parameters of the TWAMP probe task (the packet sending parameters and the packet receiving parameters of the TWAMP probe tasks created by the standby main control board are the same as the packet sending parameters and the packet receiving parameters of the TWAMP probe tasks created by the main control board). After receiving the probe message, the service board stores the probe message in a message queue, which is shown in fig. 2C and is a schematic diagram of the message queue.
Based on the above detection message and stop message of the message queue, the service board adopts the following processing mode: the service board processes the former 512 probe messages, and based on the 512 probe messages, the service board needs to generate 512 software table entries and 512 hardware table entries, and issue 512 hardware table entries to the hardware chip. Then, the service board processes the middle 512 stop messages, and based on the 512 stop messages, the service board needs to delete 512 software entries and 512 hardware entries from the hardware chip. Then, the service board processes the following 512 probe messages, based on the 512 probe messages, the service board needs to generate 512 software table entries and 512 hardware table entries, and issues the 512 hardware table entries to the hardware chip. Based on the above processing, after the active/standby switching is performed, the TWAMP detection task can be switched from the original active main control board to the new active main control board.
In the above process, the service board needs to issue 512 hardware table entries to the hardware chip first, then delete 512 hardware table entries from the hardware chip, and after deleting 512 hardware table entries, can issue new 512 hardware table entries to the hardware chip to complete the switching of the TWAMP detection task, as shown in fig. 2D.
However, the process of issuing the hardware table entry to the hardware chip and deleting the hardware table entry from the hardware chip is a relatively time consuming process, that is, it takes a relatively long time to switch the TWAMP detection task from the original main control board to the new main control board, and the time for switching the TWAMP detection task from the original main control board to the new main control board is relatively long, so that the time for recovering the service is prolonged, and the service experience is affected.
In addition, before the service board deletes the hardware table entry from the hardware chip, the service board still needs to determine the network link performance (such as link delay, link packet loss rate, etc.) between the local network device and the opposite network device according to the sending condition and the receiving condition of the detected packet, and after obtaining the network link performance, the service board finds that the main control board has failed and cannot send the network link performance to the main control board, so the network link performance is discarded, that is, the obtained network link performance is invalid.
However, the operation of the service board for determining the network link performance also needs to consume a relatively long time, and consumes a relatively large amount of processing resources of the service board, thereby resulting in a waste of processing resources of the service board, and further resulting in a relatively long time for switching the TWAMP detection task from the original main control board to the new main control board.
In view of the above discovery, an embodiment of the present application provides a table entry generating method, which is used to increase a processing speed of switching a TWAMP detection task from an original main control board to a new main control board when main/standby switching occurs, increase a main/standby switching processing rate, and reduce time required for a service to recover to a normal state after the main/standby switching. In this embodiment, the original processing flow of the service board is improved, and by adding a main/standby switching flag (used to indicate whether main/standby switching occurs), adding a recovery message (used to indicate main/standby switching recovery), and adding an enable flag (used to indicate whether a hardware entry is issued) to each software entry, operations of the hardware entries are differentiated, so that redundant issuing and deleting operations of the hardware entries are effectively avoided, invalid collection and uploading of network link performance are avoided, and the purposes of increasing the main/standby switching processing speed and reducing service recovery time are achieved.
The technical solutions of the embodiments of the present application are described below with reference to specific embodiments.
An embodiment of the present application provides a table entry generating method, where the method may be applied to a service board (also referred to as a line card) of a home network device, and the home network device further includes an active main control board and a standby main control board, and as shown in fig. 3, the method is a flowchart of the table entry generating method, and the method may include:
step 301, receiving a probe message sent by the active main control board, and storing the probe message in a message queue.
For each probe message in the message queue, a software table entry is generated from the probe message, and the software table entry may include an enable flag, step 302. Before the local-end network device is switched from the main control board to the standby main control board, the enabling mark can be a first value, and the first value is used for indicating that a hardware table item corresponding to the software table item needs to be issued to the hardware chip. After the home network device is switched from the main control board to the standby control board, the enabling flag may be a first value or a second value, where the second value is used to indicate that a hardware table entry corresponding to the software table entry does not need to be issued to the hardware chip.
For example, regarding the value of the enable flag in the software table entry, the following method may be adopted: before the local-end network equipment is switched from the main control board to the standby main control board, when a software table entry is generated according to the detection message, a first value is set for an enabling mark included in the software table entry. After the local-end network device is switched from the main control board to the standby main control board, when the software table entry is generated according to the detection message, a second value is set for the enabling mark included in the software table entry. When the local-end network equipment is switched from the main control board to the standby main control board, the enabling mark included in the target software table entry in the generated software table entry is modified into a second value; the service board does not generate the hardware table entry according to the target software table entry, that is, when the active main control board is switched to the standby main control board, the service board does not generate the hardware table entry according to the target software table entry.
For example, when switching from the main control board to the standby control board, it is determined whether a hardware table entry has been generated according to the software table entry for each currently generated software table entry, if not, the software table entry is used as a target software table entry, and if so, the software table entry is not used as the target software table entry.
For convenience of distinction, in the subsequent embodiment, the software table entry that is not used as the target software table entry is recorded as a first type of software table entry, and the software table entry that is used as the target software table entry is recorded as a second type of software table entry, so the generated software table entries can be distinguished as the first type of software table entry and the second type of software table entry, and the service board has generated the hardware table entry according to the first type of software table entry, but has not generated the hardware table entry according to the second type of software table entry. On this basis, the enabling mark included in the second type of software table entry can be modified from the first value to the second value.
The following describes values of the enable flag in the software table entry in conjunction with several specific cases.
In case one, assuming that the message queue includes 512 probe messages, the service board needs to generate software entries according to each probe message, that is, 512 software entries are generated. If the local-end network device is not switched from the main control board to the standby main control board, aiming at each detection message, when the service board generates a software table entry according to the detection message, a first value is set for an enabling mark included in the software table entry. Of course, the software table entry may also include other contents, such as a packet sending parameter and a packet receiving parameter in the probe message, which is not limited herein.
And in case that the local-end network device is switched from the main master control board to the standby master control board, and the local-end network device is switched from the main master control board to the standby master control board, the service board does not generate any software table entry, and after the local-end network device is switched from the main master control board to the standby master control board, the service board needs to generate 512 software table entries, and for each detection message, when the service board generates a software table entry according to the detection message, the service board sets a second value for an enable flag included in the software table entry, that is, the enable flags of all the software table entries are the second values.
And in a third case, if the local-end network device is switched from the main master control board to the standby master control board, and before the local-end network device is switched from the main master control board to the standby master control board, the service board already generates M software table entries, and after the local-end network device is switched from the main master control board to the standby master control board, the service board also needs to generate 512-M software table entries, where M is an integer greater than or equal to 1 and less than or equal to 512, and when M is 512, after the local-end network device is switched from the main master control board to the standby master control board, the service board does not generate software table entries.
For each detection message in the M detection messages in front of the message queue, when the service board generates a software table entry according to the detection message, a first value is set for an enable flag included in the software table entry, that is, before the home-end network device is switched from the active main control board to the standby main control board, the first value is set for the enable flag.
For each of 512-M probe messages behind the message queue, when the service board generates a software table entry according to the probe message, the service board sets a second value for an enable flag included in the software table entry, that is, after the local-end network device is switched from the active main control board to the standby main control board, the service board sets a second value for the enable flag.
Furthermore, when the local-end network device is switched from the main master control board to the standby master control board, the software table entries generated by the service board can be further divided into a first type of software table entries and a second type of software table entries. When the local-end network device is switched from the main control board to the standby main control board, M software table entries are already generated, so that the M software table entries are divided into a first type of software table entry and a second type of software table entry, but 512-M software table entries generated after switching do not need to be divided into the first type of software table entry and the second type of software table entry.
For example, for each software entry, the service board may generate a hardware entry according to the software entry and issue the hardware entry to the hardware chip, and since the generation and the issue of the hardware entry are slow, after M software entries are generated, it is possible to generate hardware entries only for a part of software entries (e.g., N software entries, where N is less than M) and issue the hardware entries to the hardware chip, while the remaining part of software entries (i.e., M-N software entries) do not generate hardware entries yet and do not issue the hardware entries to the hardware chip.
Based on this, in this embodiment, the software table entry that has generated the hardware table entry may be used as the first type of software table entry, that is, the service board has generated the hardware table entry according to the first type of software table entry, such as the above N software table entries. The software table entry that does not generate the hardware table entry may be used as the second type of software table entry, that is, the service board does not generate the hardware table entry according to the second type of software table entry, such as the above M-N software table entries.
The enabling marks of the M software table entries are all first values, after the M software table entries are divided into a first class of software table entries and a second class of software table entries, the enabling marks of the first class of software table entries are kept unchanged from the first values, the enabling marks of the second class of software table entries are changed from the first values to the second values, for example, the enabling marks of the N software table entries are the first values, and the enabling marks of the M-N software table entries are the second values.
Step 303, determining, for each software table entry, an enable flag included in the software table entry; if the enabling mark is a first value, generating a hardware table item according to the software table item, and sending the hardware table item to a hardware chip, so that the hardware chip sends a detection message to the opposite-end network device according to the hardware table item, wherein the detection message is used for detecting the network link performance between the local-end network device and the opposite-end network device; and if the enabling mark is a second value, forbidding to generate a hardware table item according to the software table item.
For example, for each software entry, the service board may generate a hardware entry according to the software entry and issue the hardware entry to the hardware chip. If the enabling mark is the first value, the service board generates a hardware table according to the software table and sends the hardware table to the hardware chip. If the enable flag is the second value, the service board prohibits the hardware table entry from being generated according to the software table entry, that is, the hardware table entry is not generated any more, and the service board does not need to issue the hardware table entry to the hardware chip.
For example, taking the case three in step 302 as an example, for a first type of software table entry in the M software table entries, the enabling flag of the first type of software table entry is a first value, so that the service board generates a hardware table entry according to the first type of software table entry and issues the hardware table entry to the hardware chip. Aiming at the second type software table entry in the M software table entries, the enabling mark of the second type software table entry is a second value, so that the service board does not need to generate a hardware table entry according to the second type software table entry and does not issue the hardware table entry to a hardware chip. For each software table entry in the 512-M software table entries, the enabling flag of the software table entry is a second value, so that the service board does not need to generate a hardware table entry according to the software table entry, and does not issue the hardware table entry to the hardware chip.
In the above embodiments, the software table entry may include, but is not limited to, a software table entry of the TWAMP probe task, and the hardware table entry may include, but is not limited to, a hardware table entry of the TWAMP probe task.
Based on the above technical solution, in the embodiment of the present application, when a hardware table entry needs to be generated according to a software table entry, an enable flag included in the software table entry is determined first, and if the enable flag is a second value, generation of the hardware table entry according to the software table entry is prohibited, that is, the hardware table entry is not generated any more, and the hardware table entry is not required to be issued to a hardware chip, thereby avoiding issuing a large number of hardware table entries to the hardware chip, reducing the number of hardware table entries issued to the hardware chip, saving the time for issuing the hardware table entries to the hardware chip, being capable of quickly switching a TWAMP detection task from an original main control board to a new main control board, shortening the time for switching the TWAMP detection task from the original main control board to the new main control board, reducing the time for recovering normal services, and improving service experience. The method effectively avoids redundant issuing and deleting operations of hardware table entries, improves the processing speed of the main/standby switching, reduces the time required for restoring the service to normal after the main/standby switching, improves the utilization efficiency of the hardware and reduces the energy consumption.
In a possible implementation manner, in order to know whether the local network device is switched from the active main control board to the standby main control board, the following manner may be adopted: and configuring a main/standby switching mark on the service board, wherein the main/standby switching mark is used for indicating whether main/standby switching occurs or not. For example, the active-standby switching flag is a third value or a fourth value, where the third value indicates that active-standby switching has occurred, and the fourth value indicates that active-standby switching has not occurred.
Illustratively, when the service board configures the main/standby switching flag, the initial value of the main/standby switching flag is a third value, and when the service board receives the main/standby switching message sent by the standby main control board, the main/standby switching flag is modified from the third value to a fourth value, where the main/standby switching message indicates that main/standby switching occurs in the local network device. For example, when the standby main control board learns that the main/standby switching occurs in the local network device, the standby main control board may send a main/standby switching message to the service board, indicating that the standby main control board is upgraded to a new main control board to replace the main control board to operate.
After the main/standby switching flag is modified to the fourth value, when the service board receives a recovery message (regarding the content of the recovery message, see the subsequent embodiments) sent by the standby main control board, it may be determined that the main/standby switching is recovered, and the service board modifies the main/standby switching flag from the fourth value to the third value again.
In summary, the service board may determine whether the local network device is switched from the active main control board to the standby main control board based on the active/standby switching flag. For example, if the active-standby switching flag is the third value, the service board may determine that the local network device is not switched from the active main control board to the standby main control board, and if the active-standby switching flag is the fourth value, the service board may determine that the local network device is switched from the active main control board to the standby main control board.
Illustratively, when the service board generates the software table entry according to the probe message, the service board may further query the main/standby switching flag, and set a first value for the enable flag of the software table entry if the main/standby switching flag has a third value. If the main/standby switching flag is the fourth value, the second value is set for the enable flag of the software table entry.
When the master/standby switching mark is changed from the third value to the fourth value, it indicates that the home network device switches from the master main control board to the standby main control board, divides the generated software table items into a first type of software table items and a second type of software table items, and changes the enabling mark of the second type of software table items from the first value to the second value.
In a possible implementation manner, after the home network device is switched from the active main control board to the standby main control board, for each probe message in the message queue, the standby main control board sends a stop message for the probe message to the service board, where the stop message is used to trigger the service board to delete the software table entry and the hardware table entry generated by the probe message. On this basis, in this embodiment, the service board may receive the stop message sent by the standby main control board, and store the stop message in the message queue. For each stop message in the message queue, determining a software table entry corresponding to the stop message, for example, the stop message corresponds to a probe message one to one, and taking the software table entry generated by the probe message as the software table entry corresponding to the stop message.
Then, if the enabling mark included in the software table entry is a first value, deleting the hardware table entry corresponding to the software table entry from the hardware chip, and deleting the software table entry; and if the enabling mark included in the software table entry is a second value, deleting the software table entry. Referring to the above embodiment, when the enable flag is the first value (indicating that the hardware table entry needs to be issued to the hardware chip), it indicates that the hardware table entry has been issued to the hardware chip, and therefore the hardware table entry and the software table entry are deleted, and when the enable flag is the second value (indicating that the hardware table entry does not need to be issued to the hardware chip), it indicates that the hardware table entry has not been issued to the hardware chip, and therefore the software table entry is deleted.
For example, the service board generates 512 software table entries, the enabling marks of the first N software table entries are the first values, and the enabling marks of the second 512-N software table entries are the second values. Deleting a hardware table entry corresponding to the software table entry from a hardware chip aiming at each software table entry in the previous N software table entries, and deleting the software table entry; for each of the following 512-N software table entries, only the software table entry is deleted.
In a possible implementation manner, after the local-end network device is switched from the active main control board to the standby main control board, the service board may determine whether the active-standby switching is recovered. Before the main/standby switching is recovered, stopping detecting the network link performance between the local terminal network equipment and the opposite terminal network equipment, and stopping sending the detected network link performance to the main control board; after the main/standby switching is recovered, the network link performance between the local network device and the opposite network device is re-detected, and the detected network link performance is sent to the standby main control board.
For example, before the active/standby switching is resumed, the service board stops the TWAMP detection task, that is, the detection packet is not read from the register, and determines the network link performance between the local network device and the peer network device based on the detection packet. For the detected network link performance, the service board will not send the network link performance to the main master control board. After the main/standby switching is recovered, the service board recovers the TWAMP detection task, that is, reads the detection packet from the register, determines the network link performance between the local network device and the opposite network device based on the detection packet, and sends the network link performance to the standby main control board.
In a possible implementation manner, after the local-end network device is switched from the active main control board to the standby main control board, if the service board receives a recovery message sent by the standby main control board, it may be determined that the active-standby switching is recovered, where the recovery message is sent after the standby main control board sends a stop message for all the detection messages.
For example, after the local network device is switched from the active main control board to the standby main control board, the standby main control board first sends the active/standby switching message to the service board, then sends the stop message for all the detection messages to the service board, then sends the recovery message to the service board, and then sends the detection message to the service board again. On this basis, when the service board receives the recovery message, it determines that the main/standby switching is recovered, re-determines the network link performance between the local network device and the opposite network device, and sends the network link performance to the standby main control board.
The above technical solution of the embodiment of the present application is described below with reference to specific application scenarios.
Referring to fig. 4, the primary main control board creates a large number of TWAMP probe tasks, and for each TWAMP probe task, the primary main control board sends a probe message to the service board, where the probe message includes a packet sending parameter and a packet receiving parameter, and the service board stores the probe message in a message queue, taking 512 probe messages as an example.
The service board configures a main/standby switch flag (e.g., switch flag) for the message queue, where an initial value of the main/standby switch flag is a third value (e.g., false, 0, 1, a, b, etc., which is not limited).
When the main control board has a fault, the main/standby switching is triggered, the standby main control board takes over the work, and after the standby main control board becomes a new main control board, the main/standby switching message is sent to the service board. When receiving the main/standby switching message, the service board determines that main/standby switching occurs, and sets the main/standby switching flag to a fourth value (e.g., true, 0, 1, a, b, etc., which is not limited to this, as long as it is different from the third value).
For each probe message of the message queue, the service board may generate a software table entry based on the packet sending parameter and the packet receiving parameter in the probe message. When each software table entry is generated, the service board first determines the main/standby switching flag, and if the main/standby switching flag is the third value, the enable flag (e.g., hard flag) of the software table entry is the first value (e.g., true, 0, 1, a, b, etc., which is not limited). If the active/standby switching flag is the fourth value, the enabling flag of the software table entry is the second value (e.g., false, 0, 1, a, b, etc., which is not limited to this, as long as the second value is different from the first value). In addition, the software table entry may also include contents such as a packet sending parameter and a packet receiving parameter in the probe message, and the software table entry is not limited.
When the active/standby switching flag is modified from the third value to the fourth value, the service board may further divide the generated software table entries (i.e., all software table entries whose enable flags are the first value) into a first class of software table entries and a second class of software table entries, modify the enable flag of the second class of software table entries from the first value to the second value, and keep the enable flag of the first class of software table entries unchanged from the first value.
For each software table entry, the service board may also generate a hardware table entry corresponding to the software table entry, and issue the hardware table entry to a hardware chip of the service board. In this embodiment, before generating the hardware entry according to the software entry, the service board determines the enable flag of the software entry. If the enabling mark is a first value, the service board generates a hardware table item according to the software table item and sends the hardware table item to a hardware chip; and if the enabling mark is a second value, the service board forbids to generate a hardware table item according to the software table item.
As shown in fig. 4, because 512 probe messages exist in the message queue, the service board generates 512 software entries, and assuming that the enabling flags of the first 12 software entries are a first value and the enabling flags of the second 500 software entries are a second value, the service board only needs to generate hardware entries for the first 12 software entries, that is, to generate 12 hardware entries in total, and issue the 12 hardware entries to the hardware chip.
In summary, only 12 hardware entries need to be generated, and 12 hardware entries are issued to the hardware chip instead of issuing 512 hardware entries to the hardware chip, so that a large number of hardware entries are prevented from being issued to the hardware chip, the number of hardware entries issued to the hardware chip is reduced, redundant issuing and deleting operations of hardware entries are effectively avoided, and the TWAMP detection task can be quickly switched from the original main control board to the new main control board.
For a hardware chip, after obtaining hardware table entries (e.g., 12 hardware table entries), a TWAMP probe task may be executed based on the hardware table entries, that is, a detection packet is sent to an opposite-end network device according to the hardware table entries, where the detection packet is used to detect network link performance between the local-end network device and the opposite-end network device.
For example, the hardware chip generates a detection message based on the hardware table entry, adds a sending timestamp in the detection message, and sends the detection message to the opposite-end network device, and the hardware chip receives the detection message returned by the opposite-end network device, and if the detection message is a legal message, adds a receiving timestamp in the detection message, and stores the detection message in the register, so that the service board determines the network link performance based on the detection message.
For example, the service board may also determine a main/standby switching flag, and if the main/standby switching flag is a fourth value, it indicates that the main/standby switching is not recovered, the service board stops detecting the network link performance, and stops sending the network link performance to the main control board, that is, the service board does not perform the following operations: the service board reads the detection message in the register and determines the link delay based on the receiving time stamp and the sending time stamp of the detection message; and the service board counts the sending quantity and the receiving quantity of the detection messages, and determines the link packet loss rate according to the sending quantity and the receiving quantity. Obviously, when the active-standby switching flag is the fourth value, the service board performs invalidation processing on currently collected network link performance (such as link delay and link packet loss rate), and performs invalidation processing on inter-board communication messages between the service board and the active main control board without performing collection operation on the network link performance.
Referring to fig. 4, after the standby main control board becomes the new main control board, for each probe message in the message queue, the standby main control board sends a stop message for the probe message to the service board, that is, 512 stop messages are sent to the service board, and the service board stores all the stop messages in the message queue.
For each stop message of the message queue, the service board needs to delete the software table entry and the hardware table entry based on the stop message. In this embodiment, before deleting the software table entry and the hardware table entry, the service board determines the software table entry corresponding to the stop message, and if the enable flag of the software table entry is the first value, deletes the hardware table entry corresponding to the software table entry from the hardware chip, and deletes the software table entry; and if the enabling mark of the software table entry is the second value, deleting the software table entry. For example, referring to FIG. 4, the service board deletes software table entry 1 and hardware table entry 1, … based on stop message 1, and the service board deletes software table entry 12 and hardware table entry 12 based on stop message 12. The service board deletes the software table entry 13, … based on the stop message 13, and the service board deletes the software table entry 512 based on the stop message 512. Obviously, the hardware table entries 13-512 are not issued to the hardware chip, so the service board does not need to delete the hardware table entries 13-512.
As shown in fig. 4, after the standby main control board sends 512 stop messages to the service board, a recovery message (such as a recovery message) may also be sent to the service board, and after the service board receives the recovery message sent by the standby main control board, the main/standby switching recovery is determined, and the main/standby switching flag is modified from the fourth value to the third value.
The TWAMP detection task is also recovered to be normal by changing the main/standby switching mark from the fourth value to the third value, indicating that the normal adding operation of the software table items and the hardware table items is recovered, the normal deleting operation of the software table items and the hardware table items is recovered, and the normal collecting operation of the network link performance is recovered.
Referring to fig. 4, after sending the recovery message to the service board, the standby master control board sends 512 probe messages to the service board, and after receiving the probe messages, the service board stores the probe messages in the message queue. Aiming at each detection message of the message queue, the service board generates a software table entry based on the detection message, and when each software table entry is generated, the active/standby switching mark is restored to a third value, so that the enabling mark of the software table entry is a first value. For each software table entry, the service board may determine an enable flag of the software table entry, and since the enable flag is a first value, the service board generates a hardware table entry according to the software table entry and issues the hardware table entry to the hardware chip. Obviously, the service board may generate 512 software entries, generate 512 hardware entries, and issue 512 hardware entries to the hardware chip. For the hardware chip, after obtaining the hardware table entry, the TWAMP detection task may be executed based on the hardware table entry.
The service board may also determine a main/standby switching flag, and since the main/standby switching flag is a third value, that is, the main/standby switching is recovered, the service board recovers to detect the network link performance and sends the network link performance to the standby main control board, that is, the service board may perform the following operations: the service board reads the detection message in the register and determines the link delay based on the receiving time stamp and the sending time stamp of the detection message; and the service board counts the sending quantity and the receiving quantity of the detection messages, and determines the link packet loss rate according to the sending quantity and the receiving quantity.
In summary, for the operations of sending (sending hardware table items to a hardware chip), deleting (deleting hardware table items from the hardware chip), and then sending (sending hardware table items to the hardware chip) that are required for the original main/standby switching, in this embodiment, 2 hardware operations that take a long time are simplified, the previous sending and deleting only aim at software table items, but do not operate hardware table items, thereby saving two thirds of hardware table item operation processing time, accelerating about 60% of time, directly saving all message processing time after directly invalidating messages communicated between boards, and greatly improving the processing efficiency of TWAMP detection main/standby switching.
Based on the same application concept as the above method, an embodiment of the present application further provides an entry generating apparatus, where a home network device includes an active main control board, a standby main control board, and a service board, and the apparatus is applied to the service board, and as shown in fig. 5, is a schematic structural diagram of the apparatus, and the apparatus includes:
a receiving module 51, configured to receive a probe message sent by the master control board;
a storage module 52, configured to store the probe message in a message queue;
a generating module 53, configured to generate, for each probe message in the message queue, a software table entry according to the probe message, where the software table entry includes an enable flag; before the local-end network equipment is switched from the main control board to the standby main control board, the enabling mark is a first value; after the local-end network equipment is switched from the main control board to the standby main control board, the enabling mark is a first value or a second value;
a processing module 54, configured to determine, for each software table entry, an enable flag included in the software table entry; if the enabling mark is a first value, generating a hardware table item according to the software table item, and sending the hardware table item to a hardware chip, so that the hardware chip sends a detection message to the opposite-end network device according to the hardware table item, wherein the detection message is used for detecting the network link performance between the local-end network device and the opposite-end network device; and if the enabling mark is a second value, forbidding to generate a hardware table item according to the software table item.
The generating module 53 is further configured to: before the local-end network equipment is switched from the main control board to the standby main control board, when a software table entry is generated according to a detection message, setting a first value for an enabling mark included in the software table entry; after the local-end network equipment is switched from the main control board to the standby main control board, when a software table entry is generated according to a detection message, setting a second value for an enabling mark included in the software table entry; when the local-end network equipment is switched from the main control board to the standby main control board, modifying the enabling mark included in the target software table entry in the generated software table entry into a second value;
and the service board does not generate a hardware table entry according to the target software table entry.
The receiving module 51 is further configured to: receiving a stop message sent by the standby main control board;
the storage module 52 is further configured to: storing the stop message to a message queue;
the processing module 54 is further configured to: for each stop message in the message queue, determining a software table entry corresponding to the stop message; if the enabling mark included in the software table entry is a first value, deleting the hardware table entry corresponding to the software table entry from the hardware chip, and deleting the software table entry;
and if the enabling mark included in the software table entry is a second value, deleting the software table entry.
Based on the same application concept as the method, the embodiment of the application also provides the home terminal network equipment, wherein the home terminal network equipment comprises a main control board, a standby main control board and a service board; wherein:
the main master control board is used for sending a detection message to the service board;
the service board is used for storing the detection message to a message queue;
aiming at each detection message in the message queue, generating a software table entry according to the detection message, wherein the software table entry comprises an enabling mark; before the local-end network equipment is switched from the main control board to the standby main control board, the enabling mark is a first value; after the local-end network equipment is switched from the main control board to the standby main control board, the enabling mark is a first value or a second value;
for each software table entry, determining an enabling mark included by the software table entry; if the enabling mark is a first value, generating a hardware table item according to the software table item, and sending the hardware table item to a hardware chip, so that the hardware chip sends a detection message to the opposite-end network device according to the hardware table item, wherein the detection message is used for detecting the network link performance between the local-end network device and the opposite-end network device;
and if the enabling mark is a second value, forbidding to generate a hardware table item according to the software table item.
Illustratively, the service board is further configured to: before the local-end network equipment is switched from the main control board to the standby main control board, when a software table entry is generated according to a detection message, setting a first value for an enabling mark included in the software table entry; after the local-end network equipment is switched from the main control board to the standby main control board, when a software table entry is generated according to a detection message, setting a second value for an enabling mark included in the software table entry; when the local-end network equipment is switched from the main control board to the standby main control board, modifying the enabling mark included in the target software table entry in the generated software table entry into a second value;
and the service board does not generate a hardware table entry according to the target software table entry.
Illustratively, the standby main control board is configured to send a stop message to the service board after the home network device is switched from the active main control board to the standby main control board; the service board is further configured to: storing the stop message to a message queue; for each stop message in the message queue, determining a software table entry corresponding to the stop message; if the enabling mark included in the software table entry is a first value, deleting the hardware table entry corresponding to the software table entry from the hardware chip, and deleting the software table entry; and if the enabling mark included in the software table entry is a second value, deleting the software table entry.
Based on the same application concept as the method described above, the service board of the embodiment of the present application includes, from a hardware level, a machine-readable storage medium and a processor, where:
a machine-readable storage medium: the instruction code is stored.
A processor: the method for generating forwarding table entries disclosed in the above examples of the present application is implemented by communicating with a machine-readable storage medium, reading and executing the instruction codes stored in the machine-readable storage medium.
Here, a machine-readable storage medium may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and so forth. For example, the machine-readable storage medium may be: a RAM (random Access Memory), a volatile Memory, a non-volatile Memory, a flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. A typical implementation device is a computer, which may take the form of a personal computer, laptop computer, cellular telephone, camera phone, smart phone, personal digital assistant, media player, navigation device, email messaging device, game console, tablet computer, wearable device, or a combination of any of these devices.
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 present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
Furthermore, these computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
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 table entry generating method is characterized in that a home network device comprises an active main control board, a standby main control board and a service board, the method is applied to the service board, and the method comprises the following steps:
receiving a detection message sent by a main master control board, and storing the detection message in a message queue;
aiming at each detection message in the message queue, generating a software table entry according to the detection message, wherein the software table entry comprises an enabling mark; before the local-end network equipment is switched from the main control board to the standby main control board, the enabling mark is a first value; after the local-end network equipment is switched from the main control board to the standby main control board, the enabling mark is a first value or a second value;
for each software table entry, determining an enabling mark included by the software table entry; if the enabling mark is a first value, generating a hardware table item according to the software table item, and sending the hardware table item to a hardware chip, so that the hardware chip sends a detection message to the opposite-end network device according to the hardware table item, wherein the detection message is used for detecting the network link performance between the local-end network device and the opposite-end network device;
and if the enabling mark is a second value, forbidding to generate a hardware table item according to the software table item.
2. The method of claim 1, further comprising:
before the local-end network equipment is switched from the main control board to the standby main control board, when a software table entry is generated according to a detection message, setting a first value for an enabling mark included in the software table entry;
after the local-end network equipment is switched from the main control board to the standby main control board, when a software table entry is generated according to a detection message, setting a second value for an enabling mark included in the software table entry;
when the local-end network equipment is switched from the main control board to the standby main control board, modifying the enabling mark included in the target software table entry in the generated software table entry into a second value;
and the service board does not generate a hardware table entry according to the target software table entry.
3. The method of claim 2, wherein the service board is configured with a main/standby switching flag, an initial value of the main/standby switching flag is a third value, and the method further comprises:
when receiving a main/standby switching message sent by a standby main control board, modifying the main/standby switching flag to a fourth value, wherein the main/standby switching message indicates that main/standby switching occurs in the local network device;
determining whether the local network equipment is switched from the main control board to the standby main control board based on the main/standby switching marks; if the active-standby switching mark is a third value, determining that the local network equipment is not switched from the active main control board to the standby main control board; and if the main/standby switching mark is a fourth value, determining that the local network equipment is switched from the main control board to the standby main control board.
4. The method of claim 1, wherein after the local network device is switched from the active main control board to the standby main control board, the method further comprises:
receiving a stop message sent by the standby main control board, and storing the stop message in a message queue;
for each stop message in the message queue, determining a software table entry corresponding to the stop message;
if the enabling mark included in the software table entry is a first value, deleting the hardware table entry corresponding to the software table entry from the hardware chip, and deleting the software table entry;
and if the enabling mark included in the software table entry is a second value, deleting the software table entry.
5. The method of claim 1, wherein after the local network device is switched from the active main control board to the standby main control board, the method further comprises:
before the main/standby switching is recovered, stopping detecting the network link performance between the local terminal network device and the opposite terminal network device, and stopping sending the detected network link performance to the main control board;
if receiving the recovery message sent by the standby main control board, determining the main/standby switching recovery, detecting the network link performance between the local terminal network equipment and the opposite terminal network equipment again, and sending the detected network link performance to the standby main control board; and the recovery message is sent after the standby main control board sends the stop message aiming at all the detection messages.
6. The method according to any one of claims 1 to 5,
the software table entry comprises a software table entry of a TWAMP detection task;
the hardware table entry comprises a hardware table entry of a TWAMP detection task.
7. An entry generating device, wherein a home network device includes an active main control board, a standby main control board, and a service board, and the device is applied to the service board, and the device includes:
the receiving module is used for receiving the detection message sent by the main control board;
the storage module is used for storing the detection message to a message queue;
a generating module, configured to generate, for each probe message in the message queue, a software table entry according to the probe message, where the software table entry includes an enable flag; before the local-end network equipment is switched from the main control board to the standby main control board, the enabling mark is a first value; after the local-end network equipment is switched from the main control board to the standby main control board, the enabling mark is a first value or a second value;
the processing module is used for determining an enabling mark included by each software table entry; if the enabling mark is a first value, generating a hardware table item according to the software table item, and sending the hardware table item to a hardware chip, so that the hardware chip sends a detection message to the opposite-end network device according to the hardware table item, wherein the detection message is used for detecting the network link performance between the local-end network device and the opposite-end network device; and if the enabling mark is a second value, forbidding to generate a hardware table item according to the software table item.
8. A home terminal network device is characterized by comprising a main control board, a standby main control board and a service board; wherein: the main master control board is used for sending a detection message to the service board;
the service board is used for storing the detection message to a message queue;
aiming at each detection message in the message queue, generating a software table entry according to the detection message, wherein the software table entry comprises an enabling mark; before the local-end network equipment is switched from the main control board to the standby main control board, the enabling mark is a first value; after the local-end network equipment is switched from the main control board to the standby main control board, the enabling mark is a first value or a second value;
for each software table entry, determining an enabling mark included by the software table entry; if the enabling mark is a first value, generating a hardware table item according to the software table item, and sending the hardware table item to a hardware chip, so that the hardware chip sends a detection message to the opposite-end network device according to the hardware table item, wherein the detection message is used for detecting the network link performance between the local-end network device and the opposite-end network device;
and if the enabling mark is a second value, forbidding to generate a hardware table item according to the software table item.
9. The apparatus of claim 8, wherein the service board is further configured to:
before the local-end network equipment is switched from the main control board to the standby main control board, when a software table entry is generated according to a detection message, setting a first value for an enabling mark included in the software table entry;
after the local-end network equipment is switched from the main control board to the standby main control board, when a software table entry is generated according to a detection message, setting a second value for an enabling mark included in the software table entry;
when the local-end network equipment is switched from the main control board to the standby main control board, modifying the enabling mark included in the target software table entry in the generated software table entry into a second value;
and the service board does not generate a hardware table entry according to the target software table entry.
10. The apparatus of claim 8,
the standby main control board is used for sending a stop message to the service board after the local network equipment is switched from the main control board to the standby main control board;
the service board is further configured to: storing the stop message to a message queue; for each stop message in the message queue, determining a software table entry corresponding to the stop message; if the enabling mark included in the software table entry is a first value, deleting the hardware table entry corresponding to the software table entry from the hardware chip, and deleting the software table entry; and if the enabling mark included in the software table entry is a second value, deleting the software table entry.
CN202011040484.4A 2020-09-28 2020-09-28 Table entry generation method, device and equipment Active CN112187578B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011040484.4A CN112187578B (en) 2020-09-28 2020-09-28 Table entry generation method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011040484.4A CN112187578B (en) 2020-09-28 2020-09-28 Table entry generation method, device and equipment

Publications (2)

Publication Number Publication Date
CN112187578A true CN112187578A (en) 2021-01-05
CN112187578B CN112187578B (en) 2022-11-25

Family

ID=73944726

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011040484.4A Active CN112187578B (en) 2020-09-28 2020-09-28 Table entry generation method, device and equipment

Country Status (1)

Country Link
CN (1) CN112187578B (en)

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2459512A1 (en) * 1979-06-19 1981-01-09 Vidalin Jacques METHOD FOR CONTROLLING RECONCILIATION TO BE MADE BETWEEN LOGICAL REFERENCE ENTITIES AND LOGICAL ENTITIES OBTAINED FROM A FILE
EP1107168A1 (en) * 1999-12-09 2001-06-13 BRITISH TELECOMMUNICATIONS public limited company Method and apparatus for updating a training set
DE10110208A1 (en) * 2001-03-02 2002-09-19 Siemens Production & Logistics Method for specifying, executing and analyzing processes in recognition
GB0325419D0 (en) * 2003-10-30 2003-12-03 Esselte B V B A Printing device
CN1529459A (en) * 2003-10-16 2004-09-15 港湾网络有限公司 Main-standby rotation realizing method facing to high-side exchange board
CN1852144A (en) * 2005-09-06 2006-10-25 华为技术有限公司 Main/standby board back-up in access-in apparatus and rearranging method therefor
CN101572666A (en) * 2009-06-05 2009-11-04 杭州华三通信技术有限公司 Method and device for flow switching in Virtual Private LAN Service (VPLS) network
CN102136930A (en) * 2010-09-03 2011-07-27 华为技术有限公司 Version upgrading method and routing equipment
CN104301146A (en) * 2014-10-23 2015-01-21 杭州华三通信技术有限公司 Link switching method and device in software defined network
CN105975364A (en) * 2016-05-03 2016-09-28 杭州迪普科技有限公司 Data backup method and device
CN105991315A (en) * 2015-02-03 2016-10-05 华为技术有限公司 Link protection method applied to SDN (software defined network), switching device and network controller
CN106330699A (en) * 2015-07-10 2017-01-11 中兴通讯股份有限公司 Multicast link switching method, multicast link switching device and routing equipment
CN106850268A (en) * 2016-12-29 2017-06-13 瑞斯康达科技发展股份有限公司 A kind of linear protection switching realizes device and method
CN108011828A (en) * 2017-12-07 2018-05-08 北京东土军悦科技有限公司 A kind of multicast switching method, device, core layer switch and storage medium
CN109451087A (en) * 2018-10-26 2019-03-08 新华三技术有限公司 MAC address entries ageing method and device
CN109525681A (en) * 2017-09-19 2019-03-26 中兴通讯股份有限公司 MAC address learning method, line card and distributed apparatus
US20190394119A1 (en) * 2017-01-25 2019-12-26 New H3C Technologies Co., Ltd. Establishing entry corresponding to equal-cost paths

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
FR2459512A1 (en) * 1979-06-19 1981-01-09 Vidalin Jacques METHOD FOR CONTROLLING RECONCILIATION TO BE MADE BETWEEN LOGICAL REFERENCE ENTITIES AND LOGICAL ENTITIES OBTAINED FROM A FILE
EP1107168A1 (en) * 1999-12-09 2001-06-13 BRITISH TELECOMMUNICATIONS public limited company Method and apparatus for updating a training set
DE10110208A1 (en) * 2001-03-02 2002-09-19 Siemens Production & Logistics Method for specifying, executing and analyzing processes in recognition
CN1529459A (en) * 2003-10-16 2004-09-15 港湾网络有限公司 Main-standby rotation realizing method facing to high-side exchange board
GB0325419D0 (en) * 2003-10-30 2003-12-03 Esselte B V B A Printing device
CN1852144A (en) * 2005-09-06 2006-10-25 华为技术有限公司 Main/standby board back-up in access-in apparatus and rearranging method therefor
CN101572666A (en) * 2009-06-05 2009-11-04 杭州华三通信技术有限公司 Method and device for flow switching in Virtual Private LAN Service (VPLS) network
CN102136930A (en) * 2010-09-03 2011-07-27 华为技术有限公司 Version upgrading method and routing equipment
CN104301146A (en) * 2014-10-23 2015-01-21 杭州华三通信技术有限公司 Link switching method and device in software defined network
CN105991315A (en) * 2015-02-03 2016-10-05 华为技术有限公司 Link protection method applied to SDN (software defined network), switching device and network controller
CN106330699A (en) * 2015-07-10 2017-01-11 中兴通讯股份有限公司 Multicast link switching method, multicast link switching device and routing equipment
CN105975364A (en) * 2016-05-03 2016-09-28 杭州迪普科技有限公司 Data backup method and device
CN106850268A (en) * 2016-12-29 2017-06-13 瑞斯康达科技发展股份有限公司 A kind of linear protection switching realizes device and method
US20190394119A1 (en) * 2017-01-25 2019-12-26 New H3C Technologies Co., Ltd. Establishing entry corresponding to equal-cost paths
CN109525681A (en) * 2017-09-19 2019-03-26 中兴通讯股份有限公司 MAC address learning method, line card and distributed apparatus
CN108011828A (en) * 2017-12-07 2018-05-08 北京东土军悦科技有限公司 A kind of multicast switching method, device, core layer switch and storage medium
CN109451087A (en) * 2018-10-26 2019-03-08 新华三技术有限公司 MAC address entries ageing method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
"Application of the Henon Chaotic Model on to the Design of Low Density Parity Check Codes", 《WUHAN UNIVERSITY JOURNAL OF NATURAL SCIENCES》 *
虞乐: "IXIA单端口百万级BGP随机路由测试解决方案", 《电信网技术》 *

Also Published As

Publication number Publication date
CN112187578B (en) 2022-11-25

Similar Documents

Publication Publication Date Title
CN108512703B (en) Backup method, device and equipment for BRAS transfer control separation and machine readable storage medium
CN108848034B (en) Network equipment and table entry learning method
CN107104824B (en) Network topology determination method and device
CN106254100A (en) A kind of data disaster tolerance methods, devices and systems
CN106878164B (en) Message transmission method and device
CN107786450B (en) Data message transmission method and device and machine-readable storage medium
CN112910802B (en) Message processing method and device
CN111953564A (en) Fault detection method, device, equipment and machine readable storage medium
CN104580107A (en) Hostile attack detection method and controller
CN108259348B (en) Message transmission method and device
CN102571458A (en) Switching method and device for tunnel protection sets
CN110784339A (en) LACP message overtime fault detection method and device, and electronic equipment
CN112187578B (en) Table entry generation method, device and equipment
CN109617821B (en) Transmission method, main control board and equipment of multicast message
CN111431921B (en) Configuration synchronization method
CN101420327B (en) Method for avoiding routing oscillation in smooth restarting process and smooth restarting equipment
CN109257185B (en) Network equipment, service card, logic device and notification information transmission method
CN111314432B (en) Message processing method and device
CN111064622B (en) Network device, synchronization apparatus, and information transmission method
CN112383471A (en) Method, device and equipment for managing knife box link and machine readable storage medium
CN113794631B (en) Port redundancy processing method, device, equipment and machine-readable storage medium
CN117278345B (en) Energy saving method and device applied to network equipment
CN109218135B (en) BFD detection method and device
CN112769693B (en) Method and device for maintaining multicast group
CN111654434B (en) Flow switching method and device and forwarding equipment

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