WO2020177471A1 - Message transmission method, apparatus and storage medium - Google Patents

Message transmission method, apparatus and storage medium Download PDF

Info

Publication number
WO2020177471A1
WO2020177471A1 PCT/CN2019/130613 CN2019130613W WO2020177471A1 WO 2020177471 A1 WO2020177471 A1 WO 2020177471A1 CN 2019130613 W CN2019130613 W CN 2019130613W WO 2020177471 A1 WO2020177471 A1 WO 2020177471A1
Authority
WO
WIPO (PCT)
Prior art keywords
resource board
resource
network device
board
status
Prior art date
Application number
PCT/CN2019/130613
Other languages
French (fr)
Chinese (zh)
Inventor
汪寅
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2020177471A1 publication Critical patent/WO2020177471A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • 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/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • 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

Definitions

  • the present disclosure relates to the field of communication technology, and in particular to a method, device and storage medium for message transmission.
  • a peer-to-peer Bidirectional Forwarding Detection (BFD) connection can be established between two network devices, so that BFD service packets between the two network devices are transmitted through respective resource boards. If the resource board used to carry BFD service packets in one of the network devices is offline, the network device at the opposite end will not be able to receive the BFD service packets sent by the network device within the preset period of time, and then disconnect from the network device.
  • the peer-to-peer BFD connection established by the network device causes the service interruption between the two network devices.
  • One aspect of the embodiments of the present disclosure provides a message transmission method, including: querying a resource board status table to obtain a query result; wherein the resource board status table includes the active/standby status and online status of at least one resource board of the first network device, The online status of the at least one resource board is determined by the transmission result of the heartbeat detection session between the at least one resource board and the at least one other resource board; according to the query result, it is determined that the current bearer connection between the first network device and the second network device The first resource board of the first network device of the service message; and, in response to determining that the first resource board is offline according to the query result, the second resource board of the first network device is selected according to the query result to transmit the service message.
  • a message transmission device including: a query unit configured to query a resource board status table to obtain a query result; wherein the resource board status table includes the master of at least one resource board of the first network device
  • the online status of the at least one resource board is determined by the transmission result of the heartbeat detection session between the at least one resource board and at least one other resource board; the determining unit is configured to determine the current bearer status according to the query result.
  • a first resource board of the first network device of a service message between a network device and a second network device; and the transmission unit is configured to respond to determining that the first resource board is offline according to the query result, and select according to the query result
  • the second resource board of the first network device transmits the service message.
  • a message transmission device including: a processor and a memory configured to store a computer program that can run on the processor, wherein the processor is configured to run the computer program to execute the present disclosure At least one step of the message transmission method provided in the embodiment.
  • Another aspect of the embodiments of the present disclosure provides a storage medium on which a computer program is stored.
  • the computer program is executed by a processor, at least one step of the message transmission method provided in the embodiment of the present disclosure is implemented.
  • FIG. 1 is a schematic diagram of service message transmission in a virtual private network (Virtual Private Network, VPN) Fast Reroute (Fast Reroute, FRR) service scenario.
  • VPN Virtual Private Network
  • FRR Fast Reroute
  • Figure 2 is another schematic diagram of service message transmission in the VPN FRR service scenario.
  • FIG. 3 is a schematic structural diagram of a first network device provided by an embodiment of the disclosure.
  • FIG. 4 is a schematic flowchart of a message transmission method provided by an embodiment of the disclosure.
  • FIG. 5 is another schematic structural diagram of the first network device provided by an embodiment of the disclosure.
  • FIG. 6 is a schematic diagram of the main resource board transmitting service messages according to an embodiment of the disclosure.
  • FIG. 7a is a schematic diagram of a backup resource board provided by an embodiment of the disclosure sending service packets.
  • FIG. 7b is a schematic diagram of receiving service packets by the backup resource board provided by an embodiment of the disclosure.
  • FIG. 8 is a schematic structural diagram of a message transmission apparatus provided by an embodiment of the disclosure.
  • FIG. 9 is a schematic structural diagram of another message transmission device provided by an embodiment of the disclosure.
  • the reliability of the network and link can be ensured through hardware redundancy, protection switching strategies, and link detection at each layer of the network; the overall protection strategy is adopted to ensure the reliability of network equipment, that is, a stand-by device is independently arranged The network equipment protects the main network equipment.
  • FIG. 1 and Figure 2 are schematic diagrams of service message transmission in the VPN FRR business scenario.
  • Figure 1 shows three Provider Edge (PE) devices and one Customer Edge (CE) using a distributed system architecture.
  • PE Provider Edge
  • CE Customer Edge
  • Equipment the three PE equipments are PE equipment 1, main PE equipment, and backup PE equipment.
  • a peer-to-peer BFD connection is established between PE device 1 and the main PE device, so that BFD service packets (also called BFD fast packets) between the two network devices can be transmitted through their respective line cards; among them, BFD fast packets are sent and received
  • the line card is also called a resource board.
  • PE device 1 If the resource board used to carry BFD fast packets in the master PE device fails and goes offline, PE device 1 will not be able to receive the BFD fast packets sent by the master PE device within the preset time period. Device 1 will disconnect the peer-to-peer BFD connection with the primary PE device and switch the link to the standby PE device. As shown in Figure 2, when the main PE device transmits BFD fast packets through line card 1 (resource board), if line card 1 is offline, the peer PE device 1 will not be able to receive the BFD fast packet sent by the main PE device within the preset time. Packets, the VPN FRR switch is triggered through the fast sensing mechanism of the packet receiving timeout, and the peer PE device 1 will disconnect the peer BFD connection with the primary PE device and establish a peer BFD connection with the standby PE device.
  • line card 1 resource board
  • the embodiment of the present disclosure provides a message transmission method, which can query the resource board status table to obtain the query result.
  • the resource board status table includes the active and standby status and online status of the resource board.
  • the active and standby status and online status of the resource board are determined by The transmission result of the heartbeat detection session between the resource boards is determined; the first resource board carrying service packets between the first network device and the second network device is determined according to the query result; the first resource board is determined to be offline according to the query result In the state, select the second resource board of the first network device to transmit the service message according to the query result.
  • Fig. 3 is a schematic structural diagram of a first network device provided by an embodiment of the present disclosure.
  • the first network device may include: a main control board, a resource board, and a message transmission board.
  • the main control board may include a first switching chip
  • the resource board may include a second switching chip
  • the message transmission board may include a network processing chip.
  • the message transmission board and the resource board can be set on the same circuit board, or they can be set independently.
  • the embodiment of the present disclosure provides a message transmission method, which can be applied to a first network device.
  • FIG. 4 it is a schematic flowchart of a message transmission method provided by an embodiment of the present disclosure, and the method may include step 401 to step 403.
  • the resource board status table is queried to obtain the query result.
  • the resource board status table includes the active and standby status and online status of the resource boards.
  • the online status of the resource boards is determined by the transmission result of the heartbeat detection session between the resource boards.
  • the first network device may specifically be a PE device that adopts a distributed system architecture; wherein, the PE device that adopts a distributed system architecture can independently receive and send service packets by a line card.
  • the resource board may refer to the line card used in the first network device to carry the service messages transmitted between the first network device and the second network device; among them, the service may refer to the function of short packet transmission interval and fast detection of packet receiving timeout.
  • the business messages include but are not limited to BFD messages and so on.
  • the message transmission board of the first network device needs to establish a resource board status table before querying the resource board status table.
  • the method may further include: assigning corresponding index identifiers to multiple resource boards of the first network device; determining the active/standby status and online status of each resource board; establishing index identifiers and active/standby status for each resource board Correspondence between and online status to obtain the resource board status table.
  • the resource board status table may include three entries, namely, index identification, active/standby status, and online status; if the value of the active/standby status includes 0 and 1, then 0 may indicate the active use of the resource board, 1 can indicate that the resource board is standby; if the value of the online status includes 0 and 1, then 0 can indicate that the resource board is online, and 1 can indicate that the resource board is offline.
  • the active and standby status of the resource board is for the business.
  • Session A is carried by the resource board with index identification 01
  • session B is carried by the resource board with index identification 02
  • the resource board bearing session A and index identification 01 can be used as the main resource board
  • the resource board bearing session B and index identification 02 can be used as the backup resource board.
  • the backup resource board is used to guarantee when the main resource board is offline
  • the service of session A is not interrupted; alternatively, the resource board bearing session B and index identification 02 can be the main resource board, and the resource board bearing session A and index identification 01 is the backup resource board, and the backup resource board is used for Ensure that the services of session B are not interrupted when the main resource board is offline.
  • Table 1 is an example of the established resource board status table. As shown in Table 1, assume that the first network device includes 3 resource boards, and the assigned index identifiers are 01, 02, and 03 respectively. Assign the initial active/standby status and online status to the three resource boards: the active/standby status corresponding to the resource board numbered 01 is "active” and the online status is "online”; the active/standby status corresponding to the resource board numbered 02 is “Standby", the online status is "Online”; the active/standby status corresponding to the resource board numbered 03 is “Standby”, and the online status is "Offline”.
  • one resource board of the first network device can establish a heartbeat detection session connection with other resource boards respectively, so that the connection between the two resources
  • the boards exchange heartbeat detection sessions.
  • the other resource board can quickly detect that the resource board is offline ; Otherwise, the other resource board can quickly detect that the resource board is online.
  • the resource board of the first network device can send the transmission result of the heartbeat detection session to the message transmission board of the first network device, so the message transmission board of the first network device can use the heartbeat detection session transmission between the resource boards As a result, the resource board status table is updated.
  • the heartbeat detection session may include a message header and message data.
  • the internal private header can be used to encapsulate the message header.
  • the message header can include the queue number, the index identification of the source resource board, the index identification of the destination resource board, the heartbeat detection session mark, etc.; the message data can be determined according to actual needs.
  • the length of the heartbeat detection session should be as fixed as possible and not too long.
  • the packet sending interval of the heartbeat detection session can be determined by comprehensively considering factors such as hardware overhead, bandwidth limitation, and the degree of support of the resource board.
  • the message transmission board of the first network device can determine the active resource board and whether the resource board is online by querying the resource board status table; it can also determine the backup resource board and the resource Whether the board is online.
  • querying the resource board status table to obtain the query result may include: querying the resource board status table to obtain the active/standby status and online status of the first resource board, and the active/standby status of the second resource board Status and online status. For example, suppose that the main resource board is queried from the resource board status table, and the main resource board is in the online state, and the corresponding index identifier is 01.
  • step 402 a first resource board carrying service packets between the first network device and the second network device is determined according to the query result.
  • the message transmission board of the first network device may use the index identifier 01
  • the main resource board is used to carry service messages between the first network device and the second network device.
  • step 403 in response to determining that the first resource board is offline according to the query result, select the second resource board of the first network device to transmit the service message according to the query result.
  • the message transmission board of the first network device when the message transmission board of the first network device queries from the resource board status table that the primary resource board is offline, the message transmission board of the first network device queries the standby Resource board, if the index identifier corresponding to the online backup resource board is found to be 02, then the backup resource board with the index identifier 02 is used instead of the first resource board to transmit the service message.
  • the second resource board of the first network device may communicate between itself and the first resource board.
  • the transmission result of the heartbeat detection session determines whether the first resource board is offline.
  • the resource boards of the first network device except the second resource board communicate with the first resource board through itself. The transmission result of the heartbeat detection session between the resource boards determines whether the first resource board is offline.
  • the method may further include: determining that the heartbeat detection session sent by the first resource board is not received within a set time period, and updating the online status of the first resource board in the resource board status table.
  • the second resource board of the first network device determines that the heartbeat detection session sent by the first resource board is not received within the set time, the second resource board of the first network device determines that the first resource board is offline, and The transmission result of the heartbeat detection session is sent to the message transmission board of the first network device, and the message transmission board of the first network device updates the online status of the first resource board in the resource board status table. In this way, when the message transmission board of the first network device queries the resource board status table, it can be determined that the first resource board is offline according to the query result.
  • the value of the online status of the first resource board includes 0 and 1, 0 means the resource board is online, 1 means the resource board is offline; after determining that the first resource board is offline, you can set the The value of online status is changed from 0 to 1.
  • the message transmission board of the first network device needs to reselect the available The backup resource board uses the newly selected backup resource board to transmit service messages.
  • the method may further include: when it is determined that the third resource board is offline according to the query result, Determine at least one resource board in an online state from the resource boards of the first network device except the first resource board, determine the service volume carried by each resource board in the at least one resource board, and determine according to the determined The service volume selects a second resource board from the at least one resource board, and the second resource board transmits service packets.
  • the resource board carrying the smallest service volume may be determined; and the determined resource board may be used as the second resource board.
  • the message transmission board of the first network device may also select a spare resource board for the second resource board. Specifically, it may be determined that it is online from the resource boards of the first network device except the second resource board.
  • At least one resource board in the state determine the service volume carried by each resource board in the at least one resource board, and select the resource board with the smallest service volume from the at least one resource board according to the determined service volume as the backup resource of the second resource board board.
  • the message transmission board of the first network device can select the second resource board to send the service message to the second network device. 2.
  • the network device sends a service message.
  • selecting the second resource board of the first network device to transmit the service message may include: sending the service message to the second network device through the second resource board.
  • the information carried in the service message sent by the second resource board may include: the index identifier of the resource board, service data, and so on.
  • the index identification of the resource board may specifically refer to the line card number of the resource board.
  • the main control board of the first network device can create the service message to be sent; carry the index identification and service data of the second resource board in the created service Message: Send the created service message to the second resource board of the first network device.
  • the second resource board may send to the second network device a service message carrying the index identifier and service data of the second resource board.
  • the second resource board When the first resource board is offline, the second resource board sends service packets to the second network device, which can ensure that the second network device can receive the service packets sent by the first network device within a preset time period, and then The connection established with the first network device will not be disconnected, and the service between the two network devices will not be interrupted.
  • the message transmission board of the first network device can select the second resource board to receive Service message sent by the second network device.
  • selecting the second resource board of the first network device to transmit the service message may further include: receiving the service message sent by the second network device through the second resource board.
  • the second resource board receives the service packet sent by the second network device, which can ensure that the first network device can receive the service packet sent by the second network device within the preset time period. Furthermore, the connection established with the second network device will not be disconnected, and the service between the two network devices will not be interrupted.
  • the first network device when the first network device receives the service message sent by the second network device, if the second resource board in the online state does not have the packet receiving or packet receiving timeout detection function, the first resource When the board is offline, neither the first resource board nor the second resource board can receive the service packets sent by the second network device, which may cause the first network device to disconnect the connection established with the second network device, resulting in two The service between the two network devices is interrupted; therefore, the first resource board and the second resource board need to have packet receiving or packet receiving timeout detection functions.
  • receiving the service message sent by the second network device through the second resource board may include: copying the received service message sent by the second network device to obtain the copied service Message; and, sending the received service message sent by the second network device to the first resource board, and sending the copied service message to the second resource board.
  • the message transmission board of the first network device may query the service forwarding table, and the service forwarding table includes the online information of the main resource board. Status and forwarding outlet, where the forwarding outlet is determined by the online status of the main resource board; the resource board pointed to by the queried forwarding outlet receives the service message sent by the second network device.
  • the message transmission board of the first network device Before the message transmission board of the first network device queries the service forwarding table, the message transmission board of the first network device needs to use the online status of the first resource board to update the query service forwarding table; that is, on the first network When the message transmission board of the device determines that the first resource board is offline, the message transmission board of the first network device needs to update the resource board pointed to by the forwarding outlet in the service forwarding table from the first resource board to the standby second resource board; , The message transmission board of the first network device can query the second resource board from the service forwarding table, and the second resource board receives the service message sent by the second network device.
  • the message transmission board of the first network device determines that the first resource board is offline, if the message transmission board of the first network device does not update the service forwarding table in time, that is, the forwarding exit in the service forwarding table still points to the first resource board.
  • a resource board after the message transmission board of the first network device queries the service forwarding table, in addition to sending service messages to the first resource board, in order to ensure uninterrupted services between the first network device and the second network device, It is also necessary to copy the received service message sent by the second network device, and send the copied service message to the second resource board.
  • the service forwarding table needs to be established.
  • the method may further include: establishing the online status of the main resource board, the index identification of the main resource board, and the corresponding relationship between the forwarding outlets, and obtaining the service forwarding table.
  • Table 2 is an example of the established service forwarding table.
  • the forwarding outlet points to the main resource board, which is about to receive the service packets sent by the second network device and transfers to the main resource board; if the main resource board is offline, the forwarding outlet points to the standby resource board, i.e. Receive the service message sent by the second network device and transmit it to the backup resource board.
  • the message transmission board of the first network device may transfer the data of the second resource board in the resource board status table.
  • the status of master and slave is updated.
  • the method may further include: updating the active/standby status of the second resource board in the resource board status table.
  • the message transmission board of the first network device can transfer the resource board status table The value of the active/standby status of the second resource board is changed from 0 to 1.
  • the second resource board After updating the active/standby status of the second resource board in the resource board status table, the second resource board serves as the new primary resource board.
  • the process of selecting the new standby resource board may include: removing the first resource board from the resource board of the first network device. 2. Determine at least one resource board that is online among other resource boards; determine the service volume carried by each resource board in the at least one resource board; determine the service from the at least one resource board according to the determined service volume The resource board with the smallest volume; and the determined resource board with the smallest business volume as the new backup resource board.
  • the second resource board of the first network device transmits service messages; therefore, the second network device can The service packet sent by the first network device can be received within the preset time period, and the first network device can also receive the service packet sent by the second network device within the preset time period, thereby ensuring that the first network device and The business between the second network devices is not interrupted.
  • a heartbeat detection session can be established between each resource board of the first network device, so that it can quickly detect whether each resource board is online according to the transmission result of the heartbeat detection session, so that the first resource board can be used quickly when the first resource board is offline.
  • the second resource board transmits service messages, thereby improving message transmission efficiency.
  • Fig. 5 is another schematic structural diagram of the first network device provided by an embodiment of the present disclosure.
  • the first network device may include: a service message creation module, a service transmission module, a service module, a heartbeat detection module, an alarm processing module, and a table maintenance module.
  • the business message creation module can be set on the main control board and used to create business messages carrying the index identifier of the resource board on each resource board.
  • the service transmission module can be set on the message transmission board to determine whether the main resource board and the backup resource board are online according to the resource board status table when the first network device sends a service message to the second network device; if the main resource If the board is online, select the main resource board to send service messages to the second network device; if the main resource board is offline and the backup resource board is online, select the backup resource board to send service messages to the second network device; if the main resource board is offline, If the backup resource board is offline, the available backup resource board is reselected, and the newly selected backup resource board sends a service message to the second network device.
  • the service transmission module can also be used to determine whether the main resource board and the backup resource board are online according to the resource board status table when the first network device receives the service message sent by the second network device; if the main resource board is online, select the main resource board Receive the business message sent by the second network device; if the main resource board is offline and the backup resource board is online, copy the received business message sent by the second network device to obtain the copied business message, which is received by the backup resource board The copied business message; if the main resource board is offline and the backup resource board is offline, then the available backup resource board is reselected, and the newly selected backup resource board receives the copied business message.
  • the business module can be set on the resource board for the sending and receiving and processing of business messages.
  • the business module set on the main resource board may be called the main business module
  • the business module set on the standby resource board may be called the standby business module.
  • the heartbeat detection module can be set on the resource board to activate the heartbeat detection session, send heartbeat detection sessions to other resource boards, and receive heartbeat detection sessions sent by other resource boards at the same time.
  • the heartbeat detection module can also be configured to trigger the alarm processing module to interrupt alarm processing once the heartbeat detection session times out.
  • the activation process of the heartbeat detection session may include: Step 1. During the initialization process of the resource board, the first resource board creates a heartbeat detection session; after enabling the service message sending function, the first resource board sends the heartbeat detection session. Step 2. After the first resource board receives the heartbeat detection session sent by the second resource board, it uses the source resource board information carried in the heartbeat detection report session to activate the session timeout detection function to complete the connection between the first resource board and the second resource board. Heartbeat detection session activation.
  • the forwarding queue where the heartbeat detection session is located may be different from the forwarding queue where the service packet is located.
  • the alarm processing module can be set on the resource board to send alarm information to the table maintenance module when the heartbeat detection session times out; the alarm information can carry the heartbeat detection session transmission result indicating that the resource board is offline.
  • the table maintenance module can be set on the message transmission board to receive the alarm information sent by the alarm processing module; use the heartbeat detection session transmission result carried by the alarm information to update the resource board status table.
  • the table maintenance module can also be configured to use the heartbeat detection session transmission result carried in the alarm information to determine the online status of the main resource board, and to update the service forwarding table using the determined online status of the main resource board.
  • the main control board may include a first switching chip, which is implemented by the central processing unit; the resource board may include a second switching chip, which is implemented by a coprocessor; and the message transmission board may include a network processing chip, which is implemented by a network processor.
  • the message transmission board and the resource board can be set on the same circuit board.
  • the application scenario of this example is: the first network device in FIG. 5 sends a service packet to the second network device.
  • the line card 1 in FIG. 5 is the main resource board, and the line card 3 is the backup resource board of the line card 1; the line card 1 corresponds to the aforementioned first resource board, and the line card 3 corresponds to the aforementioned second resource board.
  • the sending process of the service message may specifically include the following steps.
  • the service transmission module queries the resource board status table to obtain the query result, and the query result of the resource board status table may specifically include the following situations.
  • the process of reselecting the backup resource board by the service transmission module may include: suppose that the first network device includes line card 1 (main resource board), line card 2, line card 3 (backup resource board), and line card 4; among them, line card 1 Offline, line card 3 is offline, line card 2 and line card 4 are both online, and the business volume carried by line card 2 is greater than the business volume carried by line card 4; then line card 4 can be used as a reselected backup resource board.
  • the main service module of line card 1 can send service messages to the second network device after enabling the service message sending function; the service messages can carry the line card corresponding to the resource board (line card 1) Number, represented by 01.
  • the service module of line card 2 can also send service messages to the second network device after enabling the service message sending function; the service messages can carry the line card number corresponding to the resource board (line card 2), which is represented by 02 .
  • the standby service module of line card 3 can also send service messages to the second network device after enabling the service message sending function; the service messages can carry the line card number corresponding to the resource board (line card 3), using 03 Said.
  • the business message creation module can create business messages on line card 1, line card 2, and line card 3, and carry the corresponding line card number in the business message.
  • the line card 3 can send a service message to the second network device to ensure that the second network device receives the service message sent by the first network device within a preset time period, and then The connection established with the first network device is maintained, thereby ensuring that the service between the two network devices is not interrupted.
  • the application scenario of this example is: the first network device in FIG. 5 receives a service packet sent by the second network device.
  • the line card 1 in FIG. 5 is the main resource board, and the line card 3 is the backup resource board of the line card 1; the line card 1 corresponds to the aforementioned first resource board, and the line card 3 corresponds to the aforementioned second resource board.
  • the process of receiving a service message may specifically include the following steps.
  • the service transmission module queries the resource board status table to obtain the query result, and the query result of the resource board status table may specifically include the following situations.
  • the service transmission module sends the received service message sent by the second network device to the main service module of the line card 1.
  • Case 2 If the main resource board (line card 1) is found to be offline, and the backup resource board (line card 3) is found to be online, then after the service forwarding table is queried, the service transmission module will receive the data received and sent by the second network device The service message is sent to the main service module of the line card 1; and, the received service message sent by the second network device is copied to obtain the copied service message, and the copied service message is sent to The standby service module of line card 3 is shown in Figure 7b.
  • Case 3 If the main resource board (line card 1) is found to be offline, and the backup resource board (line card 3) is found to be offline, the service transmission module re-selects the backup resource board, which is received by the service module of the newly selected backup resource board Business packets after copying.
  • the process of reselecting the backup resource board by the service transmission module may include: suppose that the first network device includes line card 1 (main resource board), line card 2, line card 3 (backup resource board), and line card 4; among them, line card 1 Offline, line card 3 is offline, line card 2 and line card 4 are both online, and the business volume carried by line card 2 is greater than the business volume carried by line card 4; then line card 4 can be used as a reselected backup resource board.
  • the standby service module of the line card 3 has the function of closing the packet receiving or receiving timeout detection function, which can avoid empty windows in the service receiving during the process of switching from the line card 1 to the line card 3. The issue of the period.
  • the line card 3 can receive the service message sent by the second network device to ensure that the first network device receives the service message sent by the second network device within a preset time period. Furthermore, the connection established with the first network device is maintained, thereby ensuring that the service between the two network devices is not interrupted.
  • line card 1 in Figure 5 is the main resource board, and line card 1 is offline. Among them, the line card 1 corresponds to the aforementioned first resource board.
  • the process of updating the resource board status table by the table maintenance module may include the following steps 1 to 3.
  • step 1 the heartbeat detection module of line card 3 determines that the heartbeat detection session sent by the heartbeat detection module of line card 1 has not been received within a predetermined period of time, and triggers the alarm processing module of line card 3 to perform interruption alarm processing.
  • step 2 the alarm processing module of the line card 3 generates alarm information, and reports the alarm information to the table maintenance module.
  • the alarm information may carry the line card number corresponding to the cable card 1 and is used to characterize the offline session status of the line card 1.
  • the session status may include UP and DOWN; where UP indicates that the resource board is online, and DOWN indicates that the resource board is offline.
  • the table maintenance module receives the alarm information sent by the alarm processing module of the line card 3, and uses the line card number of the line card 1 carried in the alarm information to characterize the offline session status of the linear 1 and compare the resource board status table The online status of line card 1 is updated.
  • the embodiment of the present disclosure also provides a message transmission device, which can be set on the first network device.
  • the message transmission device may include a query unit 81, a determination unit 82 and a transmission unit 83.
  • the query unit 81 may be configured to query the resource board status table to obtain the query result.
  • the resource board status table includes the active and standby status and online status of the resource boards.
  • the online status of the resource boards is determined by the transmission result of the heartbeat detection session between the resource boards.
  • the determining unit 82 may be configured to determine the first resource board carrying service packets between the first network device and the second network device according to the query result.
  • the transmission unit 83 may be configured to select the second resource board of the first network device to transmit the service message according to the query result when it is determined that the first resource board is offline according to the query result.
  • the first network device may specifically be a PE device that adopts a distributed system architecture; wherein, the PE device that adopts a distributed system architecture can independently receive and send service packets by a line card.
  • the resource board may refer to the line card used in the first network device to carry the service messages transmitted between the first network device and the second network device; among them, the service may refer to the function of short packet transmission interval and fast detection of packet receiving timeout.
  • the business messages include but are not limited to BFD messages and so on.
  • the device before querying the resource board status table, a resource board status table needs to be established.
  • the device may further include: a table building unit (not shown in FIG. 8), which may be configured to allocate corresponding index identifiers for multiple resource boards of the first network device; determine the active and standby status and online status of each resource board Status: For each resource board, establish the corresponding relationship between the index identification, the active/standby status and the online status to obtain the resource board status table.
  • the resource board status table may include three entries, namely, index identification, active/standby status, and online status; if the value of the active/standby status includes 0 and 1, then 0 may indicate the active use of the resource board, 1 can indicate that the resource board is standby; if the value of the online status includes 0 and 1, then 0 can indicate that the resource board is online, and 1 can indicate that the resource board is offline.
  • the active and standby status of the resource board is for the business.
  • Session A is carried by the resource board with index identification 01
  • session B is carried by the resource board with index identification 02
  • the resource board bearing session A and index identification 01 can be used as the main resource board
  • the resource board bearing session B and index identification 02 can be used as the backup resource board.
  • the backup resource board is used to guarantee when the main resource board is offline
  • the service of session A is not interrupted; alternatively, the resource board bearing session B and index identification 02 can be the main resource board, and the resource board bearing session A and index identification 01 is the backup resource board, and the backup resource board is used for Ensure that the services of session B are not interrupted when the main resource board is offline.
  • one resource board of the first network device can establish a heartbeat detection session connection with other resource boards respectively, so that the connection between the two resources
  • the boards exchange heartbeat detection sessions.
  • the other resource board can quickly detect that the resource board is offline ; Otherwise, the other resource board can quickly detect that the resource board is online.
  • the resource board of the first network device can send the transmission result of the heartbeat detection session to the message transmission board of the first network device, so the message transmission board of the first network device can use the heartbeat detection session transmission between the resource boards As a result, the resource board status table is updated.
  • the message transmission board of the first network device can query the resource board status table to determine the active resource board and whether the resource board is online; it can also determine the backup resource board and the Whether the resource board is online.
  • the query unit 81 may be specifically configured to query the resource board status table to obtain the active/standby status and online status of the first resource board, and the active/standby status and online status of the second resource board. .
  • the second resource board of the first network device may communicate between itself and the first resource board.
  • the transmission result of the heartbeat detection session determines whether the first resource board is offline.
  • the resource boards of the first network device except the second resource board communicate with the first resource board through itself. The transmission result of the heartbeat detection session between the resource boards determines whether the first resource board is offline.
  • the device may further include: an update unit (not shown in FIG. 8), which may be configured to determine that the heartbeat detection session sent by the first resource board is not received within a set time period, Update the online status of the first resource board in the resource board status table.
  • an update unit (not shown in FIG. 8), which may be configured to determine that the heartbeat detection session sent by the first resource board is not received within a set time period, Update the online status of the first resource board in the resource board status table.
  • the message transmission board of the first network device needs to reselect an available spare resource board, The service message is transmitted by the newly selected backup resource board.
  • the device may further include: a selection unit (not shown in FIG. 8), which may be configured to download from the resource board of the first network device when it is determined that the third resource board is offline according to the query result Determine at least one resource board in an online state among other resource boards except the first resource board; determine the service volume carried by each resource board in the at least one resource board, and determine the service volume from the at least one resource board according to the determined service volume
  • the second resource board is selected in the, and the second resource board transmits service messages.
  • the resource board carrying the smallest service volume may be determined; and the determined resource board may be used as the second resource board.
  • the message transmission board of the first network device may also select a spare resource board for the second resource board. Specifically, it may be determined that it is online from the resource boards of the first network device except the second resource board.
  • At least one resource board in the state determine the service volume carried by each resource board in the at least one resource board, and select the resource board with the smallest service volume from the at least one resource board according to the determined service volume as the backup resource of the second resource board board.
  • the message transmission board of the first network device when the first network device sends a service message to the second network device, if the message transmission board of the first network device inquires that the first resource board is offline, the report of the first network device The message transmission board may select the second resource board to send the service message to the second network device.
  • the transmission unit 83 may be specifically configured to send service packets to the second network device through the second resource board.
  • the information carried in the service message sent by the second resource board may include: the index identifier of the resource board, service data, and so on.
  • the index identification of the resource board may specifically refer to the line card number of the resource board.
  • the main control board of the first network device can create the service message to be sent; carry the index identification and service data of the second resource board in the created service Message: Send the created service message to the second resource board of the first network device.
  • the second resource board may send to the second network device a service message carrying the index identifier and service data of the second resource board.
  • the second resource board When the first resource board is offline, the second resource board sends service packets to the second network device, which can ensure that the second network device can receive the service packets sent by the first network device within a preset time period, and then The connection established with the first network device will not be disconnected, and the service between the two network devices will not be interrupted.
  • the message transmission board of the first network device can select the second resource board to receive Service message sent by the second network device.
  • the transmission unit 83 may be specifically configured to receive the service message sent by the second network device through the second resource board.
  • the first network device when the first network device receives the service message sent by the second network device, if the second resource board in the online state does not have the packet receiving or packet receiving timeout detection function, the first resource When the board is offline, neither the first resource board nor the second resource board can receive the service packets sent by the second network device, which may cause the first network device to disconnect the connection established with the second network device, resulting in two The service between the two network devices is interrupted; therefore, the first resource board and the second resource board need to have packet receiving or packet receiving timeout detection functions.
  • the transmission unit 83 may be specifically configured to copy the received service message sent by the second network device to obtain the copied service message; and send to the first resource board The received service message sent by the second network device sends the copied service message to the second resource board.
  • the message transmission board of the first network device may query the service forwarding table, and the service forwarding table includes the online information of the main resource board. Status and forwarding outlet, where the forwarding outlet is determined by the online status of the main resource board; the resource board pointed to by the queried forwarding outlet receives the service message sent by the second network device.
  • the message transmission board of the first network device Before the message transmission board of the first network device queries the service forwarding table, the message transmission board of the first network device needs to use the online status of the first resource board to update the query service forwarding table; that is, on the first network When the message transmission board of the device determines that the first resource board is offline, the message transmission board of the first network device needs to update the resource board pointed to by the forwarding outlet in the service forwarding table from the first resource board to the standby second resource board; , The message transmission board of the first network device can query the second resource board from the service forwarding table, and the second resource board receives the service message sent by the second network device.
  • the message transmission board of the first network device determines that the first resource board is offline, if the message transmission board of the first network device does not update the service forwarding table in time, that is, the forwarding exit in the service forwarding table still points to the first resource board.
  • a resource board after the message transmission board of the first network device queries the service forwarding table, in addition to sending service messages to the first resource board, in order to ensure uninterrupted services between the first network device and the second network device, It is also necessary to copy the received service message sent by the second network device, and send the copied service message to the second resource board.
  • the service forwarding table needs to be established.
  • the table building unit may also be configured to establish the online status of the main resource board, the index identification of the main resource board, and the corresponding relationship between the forwarding outlets, and obtain the service forwarding table.
  • the message transmission board of the first network device may transfer the data of the second resource board in the resource board status table.
  • the status of master and slave is updated.
  • the update unit may also be configured to update the active/standby status of the second resource board in the resource board status table.
  • the second resource board After updating the active/standby status of the second resource board in the resource board status table, the second resource board serves as the new primary resource board.
  • the process of selecting the new standby resource board may include: removing the first resource board from the resource board of the first network device. 2. Determine at least one resource board that is online among other resource boards; determine the service volume carried by each resource board in the at least one resource board, and determine the service from the at least one resource board according to the determined service volume The resource board with the smallest volume; and the determined resource board with the smallest business volume as the new backup resource board.
  • the query unit 81, the determination unit 82, the transmission unit 83, the table creation unit, the update unit, and the selection unit may all be implemented by a processor in the message transmission device.
  • the embodiment of the present disclosure also provides another message transmission device, as shown in FIG. 9, which is a schematic structural diagram of the other message transmission device provided by the embodiment of the disclosure.
  • the message transmission device 90 may include :Communication interface 91, processor 92, memory 93; among them, the communication interface 91 can interact with other devices; the processor 92 is connected with the communication interface 91 to realize the information interaction with the second network device, which can be configured as
  • the computer program is run, at least one step of the message transmission method provided in the embodiment of the present disclosure is executed; the computer program may be stored in the memory 93.
  • the various components in the message transmission device 90 may be coupled together through the bus system 94. It can be understood that the bus system 94 may be configured to implement connection and communication between these components.
  • the bus system 94 also includes a power bus, a control bus, and a status signal bus. However, for clarity of description, various buses are marked as the bus system 94 in FIG. 9.
  • the memory 93 in the embodiment of the present disclosure may be configured to store various types of data to support the operation of the message transmission device 90. Examples of these data include: any computer program for operating on the message transmission device 90.
  • the methods disclosed in the foregoing embodiments of the present disclosure may be applied to the processor 92 or implemented by the processor 92.
  • the processor 92 may be an integrated circuit chip with signal processing capability. In the implementation process, the steps of the foregoing method can be completed by hardware integrated logic circuits in the processor 92 or instructions in the form of software.
  • the aforementioned processor 92 may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the processor 92 may implement or execute various methods, steps, and logical block diagrams disclosed in the embodiments of the present disclosure.
  • the general-purpose processor may be a microprocessor or any conventional processor.
  • the steps of the method disclosed in the embodiments of the present disclosure may be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor.
  • the software module may be located in a storage medium, and the storage medium is located in the memory 93.
  • the processor 92 reads the information in the memory 93 and completes the steps of the foregoing method in combination with its hardware.
  • the message transmission device 90 may be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, ASIC), DSP, programmable logic device (Programmable Logic Device, PLD), complex programmable logic Device (Complex Programmable Logic Device, CPLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller (Micro Controller Unit, MCU), microprocessor (Microprocessor), Or implemented by other electronic components to perform the foregoing method.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Signal Processing
  • PLD programmable logic device
  • Complex programmable logic Device Complex Programmable Logic Device
  • CPLD Complex Programmable Logic Device
  • Field-Programmable Gate Array Field-Programmable Gate Array
  • FPGA Field-Programmable Gate Array
  • general-purpose processor controller, microcontroller (Micro Controller Unit, MCU), microprocessor (Microprocessor), Or implemented by other electronic components to perform the

Landscapes

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

Abstract

Provided in the present disclosure are a message transmission method, an apparatus and a storage medium. The message transmission method may be used in a first network device, and may comprise: querying a resource card state table, obtaining a query result; the resource card state table comprising an active or stand by state and an online state of at least one resource card of a first network device, said online state of at least one resource card being determined by a transmission result of a heartbeat detection session between said at least one resource card and at least one other resource card; according to the query result, determining a current first resource card of the first network device carrying a service message between the first network device and a second network device; in response to determining according to the query result that the first resource card is in an offline state, then, according to the query result, selecting a second resource card of the first network device to transmit a service message.

Description

报文传输方法、装置及存储介质Message transmission method, device and storage medium 技术领域Technical field
本公开涉及通信技术领域,尤其涉及一种报文传输方法、装置及存储介质。The present disclosure relates to the field of communication technology, and in particular to a method, device and storage medium for message transmission.
背景技术Background technique
在一些情形下,两个网络设备之间可以建立对等(peer)双向转发检测(Bidirectional Forwarding Detection,BFD)连接,从而通过各自的资源板传输这两个网络设备之间的BFD业务报文。如果其中一个网络设备中的用于承载BFD业务报文的资源板处于离线状态,则对端的网络设备在预设时长内将无法接收到该网络设备发送的BFD业务报文,进而断开与该网络设备建立的对等BFD连接,从而导致两个网络设备之间的业务中断。In some situations, a peer-to-peer Bidirectional Forwarding Detection (BFD) connection can be established between two network devices, so that BFD service packets between the two network devices are transmitted through respective resource boards. If the resource board used to carry BFD service packets in one of the network devices is offline, the network device at the opposite end will not be able to receive the BFD service packets sent by the network device within the preset period of time, and then disconnect from the network device. The peer-to-peer BFD connection established by the network device causes the service interruption between the two network devices.
发明内容Summary of the invention
本公开实施例的一个方面提供一种报文传输方法,包括:查询资源板状态表得到查询结果;其中,资源板状态表包括第一网络设备的至少一个资源板的主备状态和在线状态,该至少一个资源板的在线状态由该至少一个资源板与至少一个其它资源板之间的心跳检测会话的传输结果确定;根据查询结果,确定当前承载第一网络设备与第二网络设备之间的业务报文的第一网络设备的第一资源板;以及,响应于根据查询结果确定第一资源板处于离线状态,根据查询结果选择第一网络设备的第二资源板传输业务报文。One aspect of the embodiments of the present disclosure provides a message transmission method, including: querying a resource board status table to obtain a query result; wherein the resource board status table includes the active/standby status and online status of at least one resource board of the first network device, The online status of the at least one resource board is determined by the transmission result of the heartbeat detection session between the at least one resource board and the at least one other resource board; according to the query result, it is determined that the current bearer connection between the first network device and the second network device The first resource board of the first network device of the service message; and, in response to determining that the first resource board is offline according to the query result, the second resource board of the first network device is selected according to the query result to transmit the service message.
本公开实施例的另一方面提供一种报文传输装置,包括:查询单元,配置为查询资源板状态表得到查询结果;其中,资源板状态表包括第一网络设备的至少一个资源板的主备状态和在线状态,该至少一个资源板的在线状态由该至少一个资源板与至少一个其它资源板之间的心跳检测会话的传输结果确定;确定单元,配置为根据查询结果,确定当前承载第一网络设备与第二网络设备之间的业务报文的第 一网络设备的第一资源板;以及,传输单元,配置为响应于根据查询结果确定第一资源板处于离线状态,根据查询结果选择第一网络设备的第二资源板传输业务报文。Another aspect of the embodiments of the present disclosure provides a message transmission device, including: a query unit configured to query a resource board status table to obtain a query result; wherein the resource board status table includes the master of at least one resource board of the first network device The online status of the at least one resource board is determined by the transmission result of the heartbeat detection session between the at least one resource board and at least one other resource board; the determining unit is configured to determine the current bearer status according to the query result. A first resource board of the first network device of a service message between a network device and a second network device; and the transmission unit is configured to respond to determining that the first resource board is offline according to the query result, and select according to the query result The second resource board of the first network device transmits the service message.
本公开实施例的又一方面提供一种报文传输装置,包括:处理器和配置为存储能够在处理器上运行的计算机程序的存储器,其中,处理器配置为运行计算机程序时,执行本公开实施例提供的报文传输方法的至少一个步骤。Another aspect of the embodiments of the present disclosure provides a message transmission device, including: a processor and a memory configured to store a computer program that can run on the processor, wherein the processor is configured to run the computer program to execute the present disclosure At least one step of the message transmission method provided in the embodiment.
本公开实施例的再一方面提供一种存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现本公开实施例提供的报文传输方法的至少一个步骤。Another aspect of the embodiments of the present disclosure provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, at least one step of the message transmission method provided in the embodiment of the present disclosure is implemented.
附图说明Description of the drawings
图1为虚拟专用网络(Virtual Private Network,VPN)快速重路由(Fast Reroute,FRR)业务场景中的业务报文传输的一种示意图。FIG. 1 is a schematic diagram of service message transmission in a virtual private network (Virtual Private Network, VPN) Fast Reroute (Fast Reroute, FRR) service scenario.
图2为VPN FRR业务场景中的业务报文传输的另一种示意图。Figure 2 is another schematic diagram of service message transmission in the VPN FRR service scenario.
图3为本公开实施例提供的第一网络设备的一种结构示意图。FIG. 3 is a schematic structural diagram of a first network device provided by an embodiment of the disclosure.
图4为本公开实施例提供的报文传输方法的一种流程示意图。FIG. 4 is a schematic flowchart of a message transmission method provided by an embodiment of the disclosure.
图5为本公开实施例提供的第一网络设备的又一种结构示意图。FIG. 5 is another schematic structural diagram of the first network device provided by an embodiment of the disclosure.
图6为本公开实施例提供的主资源板传输业务报文的一种示意图。FIG. 6 is a schematic diagram of the main resource board transmitting service messages according to an embodiment of the disclosure.
图7a为本公开实施例提供的备资源板发送业务报文的一种示意图。FIG. 7a is a schematic diagram of a backup resource board provided by an embodiment of the disclosure sending service packets.
图7b为本公开实施例提供的备资源板接收业务报文的一种示意图。FIG. 7b is a schematic diagram of receiving service packets by the backup resource board provided by an embodiment of the disclosure.
图8为本公开实施例提供的报文传输装置的一种结构示意图。FIG. 8 is a schematic structural diagram of a message transmission apparatus provided by an embodiment of the disclosure.
图9为本公开实施例提供的另一种报文传输装置的一种结构示意图。FIG. 9 is a schematic structural diagram of another message transmission device provided by an embodiment of the disclosure.
具体实施方式detailed description
下面结合附图及实施例对本公开作进一步详细的描述。The present disclosure will be further described in detail below with reference to the drawings and embodiments.
在一些情形下,可以通过硬件冗余、保护倒换策略、网络各层的链路检测等方式保证网络、链路的可靠性;采用整体保护策略保证网络设备的可靠性,即独立布置一台备用网络设备对主网络设备进行保护。In some cases, the reliability of the network and link can be ensured through hardware redundancy, protection switching strategies, and link detection at each layer of the network; the overall protection strategy is adopted to ensure the reliability of network equipment, that is, a stand-by device is independently arranged The network equipment protects the main network equipment.
图1和图2为VPN FRR业务场景中的业务报文传输的示意图,图1示出采用分布式系统架构的三个运营商边缘(Provider Edge,PE)设备和一个用户边缘(Customer Edge,CE)设备,三个PE设备分别为PE设备1、主PE设备、备PE设备。PE设备1和主PE设备之间建立对等BFD连接,从而可通过各自的线卡传输这两个网络设备之间的BFD业务报文(也称为BFD快包);其中,收发BFD快包的线卡也称为资源板。如果主PE设备中的用于承载BFD快包的资源板故障离线时,则PE设备1在预设时长内将无法接收到主PE设备发送的BFD快包,通过收包超时快速感知机制,PE设备1将断开与主PE设备的对等BFD连接,同时将链路切换到备PE设备上。如图2所示,当主PE设备通过线卡1(资源板)传输BFD快包时,如果线卡1离线,对端的PE设备1在预设时长内将无法接收到主PE设备发送的BFD快包,通过收包超时快速感知机制触发VPN FRR切换,对端的PE设备1将断开与主PE设备的对等BFD连接,与备PE设备建立对等BFD连接。Figure 1 and Figure 2 are schematic diagrams of service message transmission in the VPN FRR business scenario. Figure 1 shows three Provider Edge (PE) devices and one Customer Edge (CE) using a distributed system architecture. ) Equipment, the three PE equipments are PE equipment 1, main PE equipment, and backup PE equipment. A peer-to-peer BFD connection is established between PE device 1 and the main PE device, so that BFD service packets (also called BFD fast packets) between the two network devices can be transmitted through their respective line cards; among them, BFD fast packets are sent and received The line card is also called a resource board. If the resource board used to carry BFD fast packets in the master PE device fails and goes offline, PE device 1 will not be able to receive the BFD fast packets sent by the master PE device within the preset time period. Device 1 will disconnect the peer-to-peer BFD connection with the primary PE device and switch the link to the standby PE device. As shown in Figure 2, when the main PE device transmits BFD fast packets through line card 1 (resource board), if line card 1 is offline, the peer PE device 1 will not be able to receive the BFD fast packet sent by the main PE device within the preset time. Packets, the VPN FRR switch is triggered through the fast sensing mechanism of the packet receiving timeout, and the peer PE device 1 will disconnect the peer BFD connection with the primary PE device and establish a peer BFD connection with the standby PE device.
在上述方式中,其中一个网络设备的用于承载BFD业务报文的资源板处于离线状态时,对端的网络设备无法接收到BFD业务报文,因而会引起两个网络设备之间的业务发生中断的问题。In the above method, when the resource board used to carry BFD service packets of one of the network devices is offline, the opposite network device cannot receive the BFD service packets, which will cause service interruption between the two network devices The problem.
基于此,本公开实施例提供一种报文传输方法,可查询资源板状态表得到查询结果,资源板状态表包括资源板的主备状态和在线状态,资源板的主备状态和在线状态由资源板之间的心跳检测会话传输结果确定;根据该查询结果确定第一网络设备与第二网络设备之间承载业务报文的第一资源板;根据该查询结果确定在第一资源板处于离线状态时,根据该查询结果选择第一网络设备的第二资源板传输业务报文。Based on this, the embodiment of the present disclosure provides a message transmission method, which can query the resource board status table to obtain the query result. The resource board status table includes the active and standby status and online status of the resource board. The active and standby status and online status of the resource board are determined by The transmission result of the heartbeat detection session between the resource boards is determined; the first resource board carrying service packets between the first network device and the second network device is determined according to the query result; the first resource board is determined to be offline according to the query result In the state, select the second resource board of the first network device to transmit the service message according to the query result.
为了能够更加详尽地了解本公开实施例的特点与技术内容,下面结合附图对本公开实施例的实现进行详细阐述,所附附图仅供参考说明之用,并非用来限定本公开。In order to have a more detailed understanding of the features and technical content of the embodiments of the present disclosure, the implementation of the embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. The attached drawings are for reference only and are not used to limit the present disclosure.
图3是本公开实施例提供的第一网络设备的一种结构示意图。如图3所示,第一网络设备可包括:主控板、资源板、报文传输板。其中,主控板可以包括第一交换芯片,资源板可以包括第二交换芯片,报文传输板可以包括网络处理芯片。报文传输板与资源板可以设置在同一个电路板上,也可以各自独立设置。Fig. 3 is a schematic structural diagram of a first network device provided by an embodiment of the present disclosure. As shown in Figure 3, the first network device may include: a main control board, a resource board, and a message transmission board. The main control board may include a first switching chip, the resource board may include a second switching chip, and the message transmission board may include a network processing chip. The message transmission board and the resource board can be set on the same circuit board, or they can be set independently.
本公开实施例提供一种报文传输方法,可应用于第一网络设备。如图4所示,其为本公开实施例提供的报文传输方法的一种流程示意图,该方法可包括步骤401-步骤403。The embodiment of the present disclosure provides a message transmission method, which can be applied to a first network device. As shown in FIG. 4, it is a schematic flowchart of a message transmission method provided by an embodiment of the present disclosure, and the method may include step 401 to step 403.
在步骤401中,查询资源板状态表得到查询结果,资源板状态表包括资源板的主备状态和在线状态,资源板的在线状态由资源板之间的心跳检测会话传输结果确定。In step 401, the resource board status table is queried to obtain the query result. The resource board status table includes the active and standby status and online status of the resource boards. The online status of the resource boards is determined by the transmission result of the heartbeat detection session between the resource boards.
在一示例性实施例中,第一网络设备具体可以为采用分布式系统架构的PE设备;其中,采用分布式系统架构的PE设备可以由线卡独立完成业务报文的接收和发送。资源板可以是指第一网络设备中用于承载第一网络设备与第二网络设备之间传输的业务报文的线卡;其中,业务可以是指具有发包间隔短、收包超时快速感知功能的业务,业务报文包括但不限于BFD报文等等。In an exemplary embodiment, the first network device may specifically be a PE device that adopts a distributed system architecture; wherein, the PE device that adopts a distributed system architecture can independently receive and send service packets by a line card. The resource board may refer to the line card used in the first network device to carry the service messages transmitted between the first network device and the second network device; among them, the service may refer to the function of short packet transmission interval and fast detection of packet receiving timeout. The business messages include but are not limited to BFD messages and so on.
在一示例性实施例中,第一网络设备的报文传输板在查询资源板状态表之前,需要建立资源板状态表。相应地,该方法还可包括:针对第一网络设备的多个资源板,分配对应的索引标识;确定各个资源板的主备状态和在线状态;针对各个资源板,建立索引标识、主备状态和在线状态之间的对应关系,以得到资源板状态表。In an exemplary embodiment, the message transmission board of the first network device needs to establish a resource board status table before querying the resource board status table. Correspondingly, the method may further include: assigning corresponding index identifiers to multiple resource boards of the first network device; determining the active/standby status and online status of each resource board; establishing index identifiers and active/standby status for each resource board Correspondence between and online status to obtain the resource board status table.
在一示例性实施例中,资源板状态表可以包括三个条目,即索引标识、主备状态和在线状态;如果主备状态的取值包括0和1,则0可以表示资源板主用,1可以表示资源板备用;如果在线状态的取值包括0和1,则0可以表示资源板在线,1可以表示资源板离线。In an exemplary embodiment, the resource board status table may include three entries, namely, index identification, active/standby status, and online status; if the value of the active/standby status includes 0 and 1, then 0 may indicate the active use of the resource board, 1 can indicate that the resource board is standby; if the value of the online status includes 0 and 1, then 0 can indicate that the resource board is online, and 1 can indicate that the resource board is offline.
需要说明的是,资源板的主备状态是针对业务而言的,假设该 业务存在会话A和B,会话A由索引标识为01的资源板承载,会话B由索引标识为02的资源板承载;则可以将承载会话A、索引标识为01的资源板作为主资源板,将承载会话B、索引标识为02的资源板作为备资源板,该备资源板用于在主资源板离线时保证会话A的业务不中断;或者,也可以将承载会话B、索引标识为02的资源板为主资源板,承载会话A、索引标识为01的资源板为备资源板,该备资源板用于在主资源板离线时保证会话B的业务不中断。It should be noted that the active and standby status of the resource board is for the business. Assume that the service has sessions A and B. Session A is carried by the resource board with index identification 01, and session B is carried by the resource board with index identification 02 ; The resource board bearing session A and index identification 01 can be used as the main resource board, and the resource board bearing session B and index identification 02 can be used as the backup resource board. The backup resource board is used to guarantee when the main resource board is offline The service of session A is not interrupted; alternatively, the resource board bearing session B and index identification 02 can be the main resource board, and the resource board bearing session A and index identification 01 is the backup resource board, and the backup resource board is used for Ensure that the services of session B are not interrupted when the main resource board is offline.
表1为建立的资源板状态表的一种示例。如表1所示,假设第一网络设备包括3个资源板,分配的索引标识分别为01、02、03。为3个资源板分配初始的主备状态和在线状态:编号为01的资源板对应的主备状态为“主”、在线状态为“在线”;编号为02的资源板对应的主备状态为“备”、在线状态为“在线”;编号为03的资源板对应的主备状态为“备”、在线状态为“离线”。Table 1 is an example of the established resource board status table. As shown in Table 1, assume that the first network device includes 3 resource boards, and the assigned index identifiers are 01, 02, and 03 respectively. Assign the initial active/standby status and online status to the three resource boards: the active/standby status corresponding to the resource board numbered 01 is "active" and the online status is "online"; the active/standby status corresponding to the resource board numbered 02 is "Standby", the online status is "Online"; the active/standby status corresponding to the resource board numbered 03 is "Standby", and the online status is "Offline".
索引标识Index ID 主备状态Active and standby status 在线状态online status
0101 the Lord 在线Online
0202 Prepare 在线Online
0303 Prepare 离线Offline
表1Table 1
在一示例性实施例中,在第一网络设备的报文传输板建立资源板状态表之后,第一网络设备的一个资源板可以与其它资源板分别建立心跳检测会话连接,从而在两个资源板之间互发心跳检测会话。当其中一个资源板向另外一个资源板发送心跳检测会话,另外一个资源板在预定时长内未收到该资源板发送的心跳检测会话时,该另外一个资源板可以快速检测该资源板处于离线状态;否则,该另外一个资源板可以快速检测该资源板处于在线状态。这样,第一网络设备的资源板可以将心跳检测会话的传输结果发送至第一网络设备的报文传输板,因此第一网络设备的报文传输板可以利用资源板之间的心跳检测会话传输结果对资源板状态表进行更新。In an exemplary embodiment, after the message transmission board of the first network device establishes the resource board status table, one resource board of the first network device can establish a heartbeat detection session connection with other resource boards respectively, so that the connection between the two resources The boards exchange heartbeat detection sessions. When one resource board sends a heartbeat detection session to another resource board, and the other resource board does not receive the heartbeat detection session sent by the resource board within a predetermined period of time, the other resource board can quickly detect that the resource board is offline ; Otherwise, the other resource board can quickly detect that the resource board is online. In this way, the resource board of the first network device can send the transmission result of the heartbeat detection session to the message transmission board of the first network device, so the message transmission board of the first network device can use the heartbeat detection session transmission between the resource boards As a result, the resource board status table is updated.
在一示例性实施例中,心跳检测会话可以包含报文头、报文数据。实际应用时,可使用内部私有头封装报文头。报文头可以包含队 列号、源资源板的索引标识、目的资源板的索引标识、心跳检测会话标记等等;报文数据可根据实际需要确定。为节省硬件开销,心跳检测会话的长度应尽量固定,不宜过长。心跳检测会话的发包间隔可以综合考虑硬件开销、带宽限制以及资源板的支持程度等因素进行确定。In an exemplary embodiment, the heartbeat detection session may include a message header and message data. In actual applications, the internal private header can be used to encapsulate the message header. The message header can include the queue number, the index identification of the source resource board, the index identification of the destination resource board, the heartbeat detection session mark, etc.; the message data can be determined according to actual needs. To save hardware overhead, the length of the heartbeat detection session should be as fixed as possible and not too long. The packet sending interval of the heartbeat detection session can be determined by comprehensively considering factors such as hardware overhead, bandwidth limitation, and the degree of support of the resource board.
在一示例性实施例中,第一网络设备的报文传输板可以通过查询资源板状态表,确定主用的资源板,以及该资源板是否在线;还可以确定备用的资源板,以及该资源板是否在线。In an exemplary embodiment, the message transmission board of the first network device can determine the active resource board and whether the resource board is online by querying the resource board status table; it can also determine the backup resource board and the resource Whether the board is online.
基于此,在一示例性实施例中,查询资源板状态表得到查询结果,可包括:查询资源板状态表,得到第一资源板的主备状态和在线状态、以及第二资源板的主备状态和在线状态。例如,假设从资源板状态表中查询到作为主用的资源板,并查询到该主资源板处于在线状态,对应的索引标识为01。Based on this, in an exemplary embodiment, querying the resource board status table to obtain the query result may include: querying the resource board status table to obtain the active/standby status and online status of the first resource board, and the active/standby status of the second resource board Status and online status. For example, suppose that the main resource board is queried from the resource board status table, and the main resource board is in the online state, and the corresponding index identifier is 01.
在步骤402中,根据查询结果确定第一网络设备与第二网络设备之间承载业务报文的第一资源板。In step 402, a first resource board carrying service packets between the first network device and the second network device is determined according to the query result.
在一示例性实施例中,如果第一网络设备的报文传输板查询到处于在线状态的主资源板对应的索引标识为01,则第一网络设备的报文传输板可以使用索引标识为01的主资源板来承载第一网络设备与第二网络设备之间的业务报文。In an exemplary embodiment, if the message transmission board of the first network device finds that the index identifier corresponding to the main resource board in the online state is 01, the message transmission board of the first network device may use the index identifier 01 The main resource board is used to carry service messages between the first network device and the second network device.
在步骤403中,响应于根据查询结果确定第一资源板处于离线状态,根据查询结果选择第一网络设备的第二资源板传输业务报文。In step 403, in response to determining that the first resource board is offline according to the query result, select the second resource board of the first network device to transmit the service message according to the query result.
在一示例性实施例中,当第一网络设备的报文传输板从资源板状态表中查询到作为主用的第一资源板处于离线状态时,第一网络设备的报文传输板查询备资源板,如果查询到处于在线状态的备资源板对应的索引标识为02,则使用索引标识为02的备资源板代替第一资源板进行传输业务报文。In an exemplary embodiment, when the message transmission board of the first network device queries from the resource board status table that the primary resource board is offline, the message transmission board of the first network device queries the standby Resource board, if the index identifier corresponding to the online backup resource board is found to be 02, then the backup resource board with the index identifier 02 is used instead of the first resource board to transmit the service message.
在一示例性实施例中,在第一网络设备的报文传输板根据查询结果确定第一资源板处于离线状态之前,第一网络设备的第二资源板可以通过自身与第一资源板之间的心跳检测会话传输结果确定第一资源板是否处于离线状态。或者,在第一网络设备的报文传输板根据查询结果确定第一资源板处于离线状态之前,第一网络设备的资源板 中除第二资源板之外的其它资源板通过其自身与第一资源板之间的心跳检测会话传输结果确定第一资源板是否处于离线状态。In an exemplary embodiment, before the message transmission board of the first network device determines that the first resource board is offline according to the query result, the second resource board of the first network device may communicate between itself and the first resource board. The transmission result of the heartbeat detection session determines whether the first resource board is offline. Or, before the message transmission board of the first network device determines that the first resource board is offline according to the query result, the resource boards of the first network device except the second resource board communicate with the first resource board through itself. The transmission result of the heartbeat detection session between the resource boards determines whether the first resource board is offline.
基于此,在一示例性实施例中,该方法还可包括:确定在设定时长内未接收到第一资源板发送的心跳检测会话,更新资源板状态表中第一资源板的在线状态。Based on this, in an exemplary embodiment, the method may further include: determining that the heartbeat detection session sent by the first resource board is not received within a set time period, and updating the online status of the first resource board in the resource board status table.
如果第一网络设备的第二资源板确定在设定时长内未接收到第一资源板发送的心跳检测会话,则第一网络设备的第二资源板确定第一资源板处于离线状态,并将该心跳检测会话传输结果发送至第一网络设备的报文传输板,由第一网络设备的报文传输板更新资源板状态表中第一资源板的在线状态。这样,当第一网络设备的报文传输板查询资源板状态表时,可以根据查询结果确定第一资源板处于离线状态。If the second resource board of the first network device determines that the heartbeat detection session sent by the first resource board is not received within the set time, the second resource board of the first network device determines that the first resource board is offline, and The transmission result of the heartbeat detection session is sent to the message transmission board of the first network device, and the message transmission board of the first network device updates the online status of the first resource board in the resource board status table. In this way, when the message transmission board of the first network device queries the resource board status table, it can be determined that the first resource board is offline according to the query result.
举例来说,假设第一资源板的在线状态的取值包括0和1,0表示资源板在线,1表示资源板离线;在确定第一资源板处于离线状态后,可以将第一资源板的在线状态的取值由0更改为1。For example, suppose the value of the online status of the first resource board includes 0 and 1, 0 means the resource board is online, 1 means the resource board is offline; after determining that the first resource board is offline, you can set the The value of online status is changed from 0 to 1.
在一示例性实施例中,如果第一资源板离线、且用于接替第一资源板的备用资源板以及第三资源板不可用,则第一网络设备的报文传输板需要重新选择可用的备用资源板,以由重新选取的备用资源板传输业务报文。In an exemplary embodiment, if the first resource board is offline and the backup resource board used to take over the first resource board and the third resource board are unavailable, the message transmission board of the first network device needs to reselect the available The backup resource board uses the newly selected backup resource board to transmit service messages.
基于此,在一示例性实施例中,在根据查询结果选择第一网络设备的第二资源板传输业务报文之前,该方法还可包括:根据查询结果确定第三资源板处于离线状态时,从第一网络设备的资源板中除第一资源板之外的其它资源板中确定处于在线状态的至少一个资源板,确定该至少一个资源板中各个资源板承载的业务量,以及根据确定的业务量从该至少一个资源板中选择第二资源板,由该第二资源板传输业务报文。Based on this, in an exemplary embodiment, before selecting the second resource board of the first network device to transmit the service message according to the query result, the method may further include: when it is determined that the third resource board is offline according to the query result, Determine at least one resource board in an online state from the resource boards of the first network device except the first resource board, determine the service volume carried by each resource board in the at least one resource board, and determine according to the determined The service volume selects a second resource board from the at least one resource board, and the second resource board transmits service packets.
为了实现负载均衡,可以基于该至少一个资源板中各个资源板承载的业务量,确定承载的业务量最小的资源板;并将确定的资源板作为第二资源板。第一网络设备的报文传输板还可以为第二资源板选择备用的资源板,具体地,可从第一网络设备的资源板中除第二资源板之外的其它资源板中确定处于在线状态的至少一个资源板,确定该 至少一个资源板中各个资源板承载的业务量,以及根据确定的业务量从该至少一个资源板中选择业务量最小的资源板作为第二资源板的备用资源板。In order to achieve load balancing, based on the service volume carried by each resource board in the at least one resource board, the resource board carrying the smallest service volume may be determined; and the determined resource board may be used as the second resource board. The message transmission board of the first network device may also select a spare resource board for the second resource board. Specifically, it may be determined that it is online from the resource boards of the first network device except the second resource board. At least one resource board in the state, determine the service volume carried by each resource board in the at least one resource board, and select the resource board with the smallest service volume from the at least one resource board according to the determined service volume as the backup resource of the second resource board board.
在一示例性实施例中,第一网络设备向第二网络设备发送业务报文时,如果第一资源板处于离线状态,则第一网络设备的报文传输板可以选择第二资源板向第二网络设备发送业务报文。In an exemplary embodiment, when the first network device sends a service message to the second network device, if the first resource board is offline, the message transmission board of the first network device can select the second resource board to send the service message to the second network device. 2. The network device sends a service message.
基于此,在一示例性实施例中,选择第一网络设备的第二资源板传输业务报文,可包括:通过第二资源板,向第二网络设备发送业务报文。Based on this, in an exemplary embodiment, selecting the second resource board of the first network device to transmit the service message may include: sending the service message to the second network device through the second resource board.
在一示例性实施例中,第二资源板发送的业务报文中携带的信息可包括:资源板的索引标识、业务数据等等。资源板的索引标识具体可以是指资源板的线卡编号。In an exemplary embodiment, the information carried in the service message sent by the second resource board may include: the index identifier of the resource board, service data, and so on. The index identification of the resource board may specifically refer to the line card number of the resource board.
在由第二资源板向第二网络设备发送业务报文之前,第一网络设备的主控板可以创建待发送的业务报文;将第二资源板的索引标识、业务数据携带在创建的业务报文中;将创建的业务报文发送至第一网络设备的第二资源板。如此,第一网络设备的报文传输板在选择第二资源板后,可以由第二资源板向第二网络设备发送携带有第二资源板的索引标识、业务数据的业务报文。Before the second resource board sends the service message to the second network device, the main control board of the first network device can create the service message to be sent; carry the index identification and service data of the second resource board in the created service Message: Send the created service message to the second resource board of the first network device. In this way, after the message transmission board of the first network device selects the second resource board, the second resource board may send to the second network device a service message carrying the index identifier and service data of the second resource board.
当第一资源板处于离线状态时,由第二资源板向第二网络设备发送业务报文,可以确保第二网络设备在预设时长内能够接收到第一网络设备发送的业务报文,进而不会断开与第一网络设备建立的连接,也就不会导致两个网络设备之间的业务中断。When the first resource board is offline, the second resource board sends service packets to the second network device, which can ensure that the second network device can receive the service packets sent by the first network device within a preset time period, and then The connection established with the first network device will not be disconnected, and the service between the two network devices will not be interrupted.
在一示例性实施例中,第一网络设备接收第二网络设备发送的业务报文时,如果第一资源板处于离线状态,则第一网络设备的报文传输板可选择第二资源板接收第二网络设备发送的业务报文。In an exemplary embodiment, when the first network device receives the service message sent by the second network device, if the first resource board is offline, the message transmission board of the first network device can select the second resource board to receive Service message sent by the second network device.
基于此,在一示例性实施例中,选择第一网络设备的第二资源板传输业务报文,还可包括:通过第二资源板接收第二网络设备发送的业务报文。Based on this, in an exemplary embodiment, selecting the second resource board of the first network device to transmit the service message may further include: receiving the service message sent by the second network device through the second resource board.
当第一资源板处于离线状态时,由第二资源板接收第二网络设备发送的业务报文,可以确保第一网络设备在预设时长内能够接收到 第二网络设备发送的业务报文,进而不会断开与第二网络设备建立的连接,也就不会导致两个网络设备之间的业务中断。When the first resource board is offline, the second resource board receives the service packet sent by the second network device, which can ensure that the first network device can receive the service packet sent by the second network device within the preset time period. Furthermore, the connection established with the second network device will not be disconnected, and the service between the two network devices will not be interrupted.
在一示例性实施例中,在第一网络设备接收第二网络设备发送的业务报文时,如果处于在线状态的第二资源板不具备收包或者收包超时检测功能,则在第一资源板处于离线状态时,第一资源板、第二资源板均无法接收到第二网络设备发送的业务报文,可能会使第一网络设备断开与第二网络设备建立的连接,从而导致两个网络设备之间的业务中断;因此,第一资源板、第二资源板需要均具备收包或者收包超时检测功能。In an exemplary embodiment, when the first network device receives the service message sent by the second network device, if the second resource board in the online state does not have the packet receiving or packet receiving timeout detection function, the first resource When the board is offline, neither the first resource board nor the second resource board can receive the service packets sent by the second network device, which may cause the first network device to disconnect the connection established with the second network device, resulting in two The service between the two network devices is interrupted; therefore, the first resource board and the second resource board need to have packet receiving or packet receiving timeout detection functions.
基于此,在一示例性实施例中,通过第二资源板接收第二网络设备发送的业务报文,可包括:复制接收到的、第二网络设备发送的业务报文,得到复制后的业务报文;以及,向第一资源板发送接收到的、第二网络设备发送的业务报文,向第二资源板发送复制后的业务报文。Based on this, in an exemplary embodiment, receiving the service message sent by the second network device through the second resource board may include: copying the received service message sent by the second network device to obtain the copied service Message; and, sending the received service message sent by the second network device to the first resource board, and sending the copied service message to the second resource board.
在一示例性实施例中,在由第二资源板接收第二网络设备发送的业务报文之前,第一网络设备的报文传输板可以查询业务转发表,业务转发表包括主资源板的在线状态、转发出口,其中,转发出口由主资源板的在线状态确定;由查询到的转发出口指向的资源板接收第二网络设备发送的业务报文。In an exemplary embodiment, before the second resource board receives the service message sent by the second network device, the message transmission board of the first network device may query the service forwarding table, and the service forwarding table includes the online information of the main resource board. Status and forwarding outlet, where the forwarding outlet is determined by the online status of the main resource board; the resource board pointed to by the queried forwarding outlet receives the service message sent by the second network device.
在第一网络设备的报文传输板查询业务转发表之前,第一网络设备的报文传输板需要利用第一资源板的在线状态对查询业务转发表进行更新;也就是说,在第一网络设备的报文传输板确定第一资源板离线时,第一网络设备的报文传输板需要将业务转发表中转发出口指向的资源板由第一资源板更新为备用的第二资源板;这样,第一网络设备的报文传输板才能够从业务转发表查询到第二资源板,由第二资源板接收第二网络设备发送的业务报文。Before the message transmission board of the first network device queries the service forwarding table, the message transmission board of the first network device needs to use the online status of the first resource board to update the query service forwarding table; that is, on the first network When the message transmission board of the device determines that the first resource board is offline, the message transmission board of the first network device needs to update the resource board pointed to by the forwarding outlet in the service forwarding table from the first resource board to the standby second resource board; , The message transmission board of the first network device can query the second resource board from the service forwarding table, and the second resource board receives the service message sent by the second network device.
需要说明的是,在第一网络设备的报文传输板确定第一资源板离线后,如果第一网络设备的报文传输板未及时更新业务转发表,即业务转发表中转向出口仍指向第一资源板,则第一网络设备的报文传输板查询业务转发表后,除了向第一资源板发送业务报文外,为了保 证第一网络设备与第二网络设备之间的业务不中断,还需要复制接收到的、第二网络设备发送的业务报文,向第二资源板发送复制的业务报文。It should be noted that after the message transmission board of the first network device determines that the first resource board is offline, if the message transmission board of the first network device does not update the service forwarding table in time, that is, the forwarding exit in the service forwarding table still points to the first resource board. A resource board, after the message transmission board of the first network device queries the service forwarding table, in addition to sending service messages to the first resource board, in order to ensure uninterrupted services between the first network device and the second network device, It is also necessary to copy the received service message sent by the second network device, and send the copied service message to the second resource board.
在一示例性实施例中,在第一网络设备的报文传输板查询业务转发表之前,需要建立业务转发表。In an exemplary embodiment, before the message transmission board of the first network device queries the service forwarding table, the service forwarding table needs to be established.
基于此,在一示例性实施例中,该方法还可包括:建立主资源板的在线状态、主资源板的索引标识以及转发出口的对应关系,得到业务转发表。Based on this, in an exemplary embodiment, the method may further include: establishing the online status of the main resource board, the index identification of the main resource board, and the corresponding relationship between the forwarding outlets, and obtaining the service forwarding table.
表2是建立的业务转发表的一个示例。表2中,如果主资源板在线,则转发出口指向主资源板,即将接收第二网络设备发送的业务报文传输给主资源板;如果主资源板离线,则转发出口指向备资源板,即将接收第二网络设备发送的业务报文传输给备资源板。Table 2 is an example of the established service forwarding table. In Table 2, if the main resource board is online, the forwarding outlet points to the main resource board, which is about to receive the service packets sent by the second network device and transfers to the main resource board; if the main resource board is offline, the forwarding outlet points to the standby resource board, i.e. Receive the service message sent by the second network device and transmit it to the backup resource board.
Figure PCTCN2019130613-appb-000001
Figure PCTCN2019130613-appb-000001
表2Table 2
在一示例性实施例中,在第一网络设备的第二资源板传输业务报文之后,为了节省硬件开销,第一网络设备的报文传输板可以将资源板状态表中第二资源板的主备状态进行更新。In an exemplary embodiment, after the second resource board of the first network device transmits service messages, in order to save hardware overhead, the message transmission board of the first network device may transfer the data of the second resource board in the resource board status table. The status of master and slave is updated.
基于此,在选择第一网络设备的第二资源板传输业务报文之后,该方法还可包括:更新资源板状态表中第二资源板的主备状态。Based on this, after selecting the second resource board of the first network device to transmit the service message, the method may further include: updating the active/standby status of the second resource board in the resource board status table.
举例来说,假设第二资源板的主备状态的取值包括0和1,0表示主资源板,1表示备资源板,则第一网络设备的报文传输板可以将资源板状态表中第二资源板的主备状态的取值由0更改为1。For example, suppose that the values of the active and standby states of the second resource board include 0 and 1, where 0 represents the primary resource board, and 1 represents the standby resource board. Then the message transmission board of the first network device can transfer the resource board status table The value of the active/standby status of the second resource board is changed from 0 to 1.
在更新资源板状态表中第二资源板的主备状态之后,第二资源板作为新的主资源板,选择新的备资源板的过程可以包括:从第一网络设备的资源板中除第二资源板之外的其它资源板中确定处于在线状态的至少一个资源板;确定该至少一个资源板中各个资源板承载的业务量;根据确定的业务量,从该至少一个资源板中确定业务量最小 的资源板;以及将确定的业务量最小的资源板作为新的备资源板。After updating the active/standby status of the second resource board in the resource board status table, the second resource board serves as the new primary resource board. The process of selecting the new standby resource board may include: removing the first resource board from the resource board of the first network device. 2. Determine at least one resource board that is online among other resource boards; determine the service volume carried by each resource board in the at least one resource board; determine the service from the at least one resource board according to the determined service volume The resource board with the smallest volume; and the determined resource board with the smallest business volume as the new backup resource board.
采用本公开实施例提供的报文传输方法,当第一网络设备的第一资源板处于离线状态时,由第一网络设备的第二资源板传输业务报文;因此,可使第二网络设备在预设时长内能够接收到第一网络设备发送的业务报文,同时使第一网络设备在预设时长内也能够接收到第二网络设备发送的业务报文,进而保证第一网络设备与第二网络设备之间的业务不发生中断。Using the message transmission method provided by the embodiments of the present disclosure, when the first resource board of the first network device is offline, the second resource board of the first network device transmits service messages; therefore, the second network device can The service packet sent by the first network device can be received within the preset time period, and the first network device can also receive the service packet sent by the second network device within the preset time period, thereby ensuring that the first network device and The business between the second network devices is not interrupted.
另外,可以在第一网络设备的各个资源板之间建立心跳检测会话,从而可以根据心跳检测会话传输结果快速检测各资源板是否在线,从而在第一资源板处于离线状态时,可以快速使用第二资源板传输业务报文,进而提高报文传输效率。In addition, a heartbeat detection session can be established between each resource board of the first network device, so that it can quickly detect whether each resource board is online according to the transmission result of the heartbeat detection session, so that the first resource board can be used quickly when the first resource board is offline. The second resource board transmits service messages, thereby improving message transmission efficiency.
下面结合应用实例对本公开实施例提供的报文传输方法作详细的说明。The message transmission method provided by the embodiments of the present disclosure will be described in detail below in conjunction with application examples.
图5是本公开实施例提供的第一网络设备的又一种结构示意图。如图5所示,第一网络设备可包括:业务报文创建模块、业务传输模块、业务模块、心跳检测模块、告警处理模块、表维护模块。Fig. 5 is another schematic structural diagram of the first network device provided by an embodiment of the present disclosure. As shown in FIG. 5, the first network device may include: a service message creation module, a service transmission module, a service module, a heartbeat detection module, an alarm processing module, and a table maintenance module.
业务报文创建模块,可以设置在主控板上,用于在各个资源板上创建携带有资源板的索引标识的业务报文。The business message creation module can be set on the main control board and used to create business messages carrying the index identifier of the resource board on each resource board.
业务传输模块,可以设置在报文传输板上,用于在第一网络设备向第二网络设备发送业务报文时,根据资源板状态表判断主资源板、备资源板是否在线;如果主资源板在线,则选择主资源板向第二网络设备发送业务报文;如果主资源板离线、备资源板在线,则选择备资源板向第二网络设备发送业务报文;如果主资源板离线、备资源板离线,则重新选择可用的备资源板,由重新选择的备资源板向第二网络设备发送业务报文。业务传输模块还可用于在第一网络设备接收第二网络设备发送的业务报文时,根据资源板状态表判断主资源板、备资源板是否在线;如果主资源板在线,则选择主资源板接收第二网络设备发送的业务报文;如果主资源板离线、备资源板在线,则复制接收的、第二网络设备发送的业务报文,得到复制后的业务报文,由备资源板接收复制后的业务报文;如果主资源板离线、备资源板离线,则 重新选择可用的备资源板,由重新选择的备资源板接收复制后的业务报文。The service transmission module can be set on the message transmission board to determine whether the main resource board and the backup resource board are online according to the resource board status table when the first network device sends a service message to the second network device; if the main resource If the board is online, select the main resource board to send service messages to the second network device; if the main resource board is offline and the backup resource board is online, select the backup resource board to send service messages to the second network device; if the main resource board is offline, If the backup resource board is offline, the available backup resource board is reselected, and the newly selected backup resource board sends a service message to the second network device. The service transmission module can also be used to determine whether the main resource board and the backup resource board are online according to the resource board status table when the first network device receives the service message sent by the second network device; if the main resource board is online, select the main resource board Receive the business message sent by the second network device; if the main resource board is offline and the backup resource board is online, copy the received business message sent by the second network device to obtain the copied business message, which is received by the backup resource board The copied business message; if the main resource board is offline and the backup resource board is offline, then the available backup resource board is reselected, and the newly selected backup resource board receives the copied business message.
业务模块,可以设置在资源板上,用于业务报文的收发、处理。设置在主资源板上的业务模块可以称为主业务模块,设置在备资源板上的业务模块可以称为备业务模块。The business module can be set on the resource board for the sending and receiving and processing of business messages. The business module set on the main resource board may be called the main business module, and the business module set on the standby resource board may be called the standby business module.
心跳检测模块,可以设置在资源板上,用于激活心跳检测会话,向其它资源板发送心跳检测会话,同时接收其它资源板发送的心跳检测会话。心跳检测模块还可配置为心跳检测会话一旦超时,触发告警处理模块进行中断告警处理。The heartbeat detection module can be set on the resource board to activate the heartbeat detection session, send heartbeat detection sessions to other resource boards, and receive heartbeat detection sessions sent by other resource boards at the same time. The heartbeat detection module can also be configured to trigger the alarm processing module to interrupt alarm processing once the heartbeat detection session times out.
心跳检测会话的激活过程可以包括:步骤一、在资源板初始化过程中,第一资源板创建心跳检测会话;在开启业务报文发送功能后,第一资源板将心跳检测会话发出。步骤二、第一资源板接收到第二资源板发送的心跳检测会话后,通过该心跳检测报会话携带的源资源板信息,激活会话超时检测功能,完成第一资源板与第二资源板之间心跳检测会话的激活。The activation process of the heartbeat detection session may include: Step 1. During the initialization process of the resource board, the first resource board creates a heartbeat detection session; after enabling the service message sending function, the first resource board sends the heartbeat detection session. Step 2. After the first resource board receives the heartbeat detection session sent by the second resource board, it uses the source resource board information carried in the heartbeat detection report session to activate the session timeout detection function to complete the connection between the first resource board and the second resource board. Heartbeat detection session activation.
需要说明的是,考虑到心跳检测会话的转发不能受业务报文的影响,心跳检测会话所在的转发队列与业务报文所在的转发队列可不同。It should be noted that, considering that the forwarding of the heartbeat detection session cannot be affected by the service packet, the forwarding queue where the heartbeat detection session is located may be different from the forwarding queue where the service packet is located.
告警处理模块,可以设置在资源板上,用于当心跳检测会话超时时,向表维护模块发送告警信息;告警信息可携带有表征资源板离线的心跳检测会话传输结果。The alarm processing module can be set on the resource board to send alarm information to the table maintenance module when the heartbeat detection session times out; the alarm information can carry the heartbeat detection session transmission result indicating that the resource board is offline.
表维护模块,可以设置在报文传输板上,用于接收告警处理模块发送的告警信息;利用告警信息携带的心跳检测会话传输结果,对资源板状态表进行更新。表维护模块还可配置为利用告警信息携带的心跳检测会话传输结果,确定主资源板的在线状态,利用确定的主资源板的在线状态对业务转发表进行更新。The table maintenance module can be set on the message transmission board to receive the alarm information sent by the alarm processing module; use the heartbeat detection session transmission result carried by the alarm information to update the resource board status table. The table maintenance module can also be configured to use the heartbeat detection session transmission result carried in the alarm information to determine the online status of the main resource board, and to update the service forwarding table using the determined online status of the main resource board.
需要说明的是,主控板可以包括第一交换芯片,由中央处理器实现;资源板可以包括第二交换芯片,由协处理器实现;报文传输板可以包括网络处理芯片,由网络处理器实现。报文传输板和资源板可以设置在同一个电路板上。It should be noted that the main control board may include a first switching chip, which is implemented by the central processing unit; the resource board may include a second switching chip, which is implemented by a coprocessor; and the message transmission board may include a network processing chip, which is implemented by a network processor. achieve. The message transmission board and the resource board can be set on the same circuit board.
实例一Example one
本实例的应用场景为:图5中的第一网络设备向第二网络设备发送业务报文。其中,图5中的线卡1为主资源板,线卡3为线卡1的备资源板;线卡1对应上述的第一资源板,线卡3对应上述的第二资源板。The application scenario of this example is: the first network device in FIG. 5 sends a service packet to the second network device. Among them, the line card 1 in FIG. 5 is the main resource board, and the line card 3 is the backup resource board of the line card 1; the line card 1 corresponds to the aforementioned first resource board, and the line card 3 corresponds to the aforementioned second resource board.
结合图5所示的第一网络设备的结构示意图,业务报文的发送过程具体可以包括以下步骤。With reference to the schematic structural diagram of the first network device shown in FIG. 5, the sending process of the service message may specifically include the following steps.
业务传输模块查询资源板状态表得到查询结果,资源板状态表的查询结果具体可以包括以下几种情况。The service transmission module queries the resource board status table to obtain the query result, and the query result of the resource board status table may specifically include the following situations.
情况一,如果查询到主资源板(线卡1)在线,则业务传输模块选择线卡1,由线卡1的主业务模块将业务报文发送至第二网络设备,如图6所示。Case 1: If the main resource board (line card 1) is found to be online, the service transmission module selects line card 1, and the main service module of line card 1 sends the service message to the second network device, as shown in FIG.
情况二,如果查询到主资源板(线卡1)离线、且查询到备资源板(线卡3)在线,则业务传输模块选择线卡3,由线卡3的备业务模块将业务报文发送至第二网络设备,如图7a所示。Case 2: If the main resource board (line card 1) is found to be offline, and the backup resource board (line card 3) is found to be online, the service transmission module selects line card 3, and the backup service module of line card 3 transfers the service message Send to the second network device, as shown in Figure 7a.
情况三,如果查询到主资源板(线卡1)离线、且查询到备资源板(线卡3)离线,则业务传输模块重新选择备资源板,由重新选择的备资源板的业务模块将业务报文发送至第二网络设备。Case 3: If the main resource board (line card 1) is found to be offline and the backup resource board (line card 3) is found to be offline, the service transmission module reselects the backup resource board, and the service module of the newly selected backup resource board will The service message is sent to the second network device.
业务传输模块重新选择备资源板的过程可以包括:假设第一网络设备包括线卡1(主资源板)、线卡2、线卡3(备资源板)和线卡4;其中,线卡1离线、线卡3离线,线卡2和线卡4均在线,且线卡2承载的业务量大于线卡4承载的业务量;则可将线卡4作为重新选择的备资源板。The process of reselecting the backup resource board by the service transmission module may include: suppose that the first network device includes line card 1 (main resource board), line card 2, line card 3 (backup resource board), and line card 4; among them, line card 1 Offline, line card 3 is offline, line card 2 and line card 4 are both online, and the business volume carried by line card 2 is greater than the business volume carried by line card 4; then line card 4 can be used as a reselected backup resource board.
需要说明的是:线卡1的主业务模块可以在开启业务报文发送功能后,向第二网络设备发送业务报文;业务报文可以携带有该资源板(线卡1)对应的线卡编号,用01表示。线卡2的业务模块也可以在开启业务报文发送功能后,向第二网络设备发送业务报文;业务报文可以携带有该资源板(线卡2)对应的线卡编号,用02表示。线卡3的备业务模块也可以在开启业务报文发送功能后,向第二网络设备发送业务报文;业务报文可以携带有该资源板(线卡3)对应的 线卡编号,用03表示。其中,业务报文创建模块可以在线卡1、线卡2、线卡3上创建业务报文,并将对应的线卡编号携带在业务报文中。It should be noted that the main service module of line card 1 can send service messages to the second network device after enabling the service message sending function; the service messages can carry the line card corresponding to the resource board (line card 1) Number, represented by 01. The service module of line card 2 can also send service messages to the second network device after enabling the service message sending function; the service messages can carry the line card number corresponding to the resource board (line card 2), which is represented by 02 . The standby service module of line card 3 can also send service messages to the second network device after enabling the service message sending function; the service messages can carry the line card number corresponding to the resource board (line card 3), using 03 Said. Among them, the business message creation module can create business messages on line card 1, line card 2, and line card 3, and carry the corresponding line card number in the business message.
在本实例中,当线卡1离线时,可由线卡3向第二网络设备发送业务报文,以保证第二网络设备在预设时长内接收到第一网络设备发送的业务报文,进而保持与第一网络设备建立的连接,从而保证两个网络设备之间的业务不中断。In this example, when the line card 1 is offline, the line card 3 can send a service message to the second network device to ensure that the second network device receives the service message sent by the first network device within a preset time period, and then The connection established with the first network device is maintained, thereby ensuring that the service between the two network devices is not interrupted.
实例二Example two
本实例的应用场景为:图5中的第一网络设备接收第二网络设备发送的业务报文。其中,图5中的线卡1为主资源板,线卡3为线卡1的备资源板;线卡1对应上述的第一资源板,线卡3对应上述的第二资源板。The application scenario of this example is: the first network device in FIG. 5 receives a service packet sent by the second network device. Among them, the line card 1 in FIG. 5 is the main resource board, and the line card 3 is the backup resource board of the line card 1; the line card 1 corresponds to the aforementioned first resource board, and the line card 3 corresponds to the aforementioned second resource board.
结合图5所示的第一网络设备的结构示意图,业务报文的接收过程具体可以包括以下步骤。With reference to the schematic structural diagram of the first network device shown in FIG. 5, the process of receiving a service message may specifically include the following steps.
业务传输模块查询资源板状态表得到查询结果,资源板状态表的查询结果具体可以包括以下几种情况。The service transmission module queries the resource board status table to obtain the query result, and the query result of the resource board status table may specifically include the following situations.
情况一,如果查询到主资源板(线卡1)在线,则查询业务转发表后,业务传输模块将接收到的、第二网络设备发送的业务报文发送至线卡1的主业务模块。In case 1, if the main resource board (line card 1) is found to be online, and after the service forwarding table is checked, the service transmission module sends the received service message sent by the second network device to the main service module of the line card 1.
情况二,如果查询到主资源板(线卡1)离线、且查询到备资源板(线卡3)在线,则查询业务转发表后,业务传输模块将接收到的、第二网络设备发送的业务报文发送至线卡1的主业务模块;以及,复制接收到的、第二网络设备发送的该业务报文,得到复制后的业务报文,并将该复制后的业务报文发送至线卡3的备业务模块,如图7b所示。Case 2: If the main resource board (line card 1) is found to be offline, and the backup resource board (line card 3) is found to be online, then after the service forwarding table is queried, the service transmission module will receive the data received and sent by the second network device The service message is sent to the main service module of the line card 1; and, the received service message sent by the second network device is copied to obtain the copied service message, and the copied service message is sent to The standby service module of line card 3 is shown in Figure 7b.
情况三,如果查询到主资源板(线卡1)离线、且查询到备资源板(线卡3)离线,则业务传输模块重新选择备资源板,由重新选择的备资源板的业务模块接收复制后的业务报文。Case 3: If the main resource board (line card 1) is found to be offline, and the backup resource board (line card 3) is found to be offline, the service transmission module re-selects the backup resource board, which is received by the service module of the newly selected backup resource board Business packets after copying.
业务传输模块重新选择备资源板的过程可以包括:假设第一网络设备包括线卡1(主资源板)、线卡2、线卡3(备资源板)和线 卡4;其中,线卡1离线、线卡3离线,线卡2和线卡4均在线,且线卡2承载的业务量大于线卡4承载的业务量;则可将线卡4作为重新选择的备资源板。The process of reselecting the backup resource board by the service transmission module may include: suppose that the first network device includes line card 1 (main resource board), line card 2, line card 3 (backup resource board), and line card 4; among them, line card 1 Offline, line card 3 is offline, line card 2 and line card 4 are both online, and the business volume carried by line card 2 is greater than the business volume carried by line card 4; then line card 4 can be used as a reselected backup resource board.
需要说明的是,当线卡1离线时,线卡3的备业务模块具备关闭收包或收包超时检测功能,能够避免在由线卡1切换至线卡3的过程中业务接收出现空窗期的问题。It should be noted that when the line card 1 is offline, the standby service module of the line card 3 has the function of closing the packet receiving or receiving timeout detection function, which can avoid empty windows in the service receiving during the process of switching from the line card 1 to the line card 3. The issue of the period.
在本实例中,当线卡1离线时,可由线卡3接收第二网络设备发送的业务报文,以保证第一网络设备在预设时长内接收到第二网络设备发送的业务报文,进而保持与第一网络设备建立的连接,从而保证两个网络设备之间的业务不中断。In this example, when the line card 1 is offline, the line card 3 can receive the service message sent by the second network device to ensure that the first network device receives the service message sent by the second network device within a preset time period. Furthermore, the connection established with the first network device is maintained, thereby ensuring that the service between the two network devices is not interrupted.
实例三Example three
本实例的应用场景为:图5中的线卡1为主资源板,线卡1离线。其中,线卡1对应上述的第一资源板。The application scenario of this example is: line card 1 in Figure 5 is the main resource board, and line card 1 is offline. Among them, the line card 1 corresponds to the aforementioned first resource board.
结合图5所示的第一网络设备的结构示意图,表维护模块对资源板状态表进行更新过程可以包括以下步骤一至步骤三。With reference to the schematic structural diagram of the first network device shown in FIG. 5, the process of updating the resource board status table by the table maintenance module may include the following steps 1 to 3.
在步骤一中,线卡3的心跳检测模块确定在预定时长内未接收到线卡1的心跳检测模块发送的心跳检测会话,触发线卡3的告警处理模块进行中断告警处理。In step 1, the heartbeat detection module of line card 3 determines that the heartbeat detection session sent by the heartbeat detection module of line card 1 has not been received within a predetermined period of time, and triggers the alarm processing module of line card 3 to perform interruption alarm processing.
在步骤二中,线卡3的告警处理模块生成告警信息,并将该告警信息上报至表维护模块。In step 2, the alarm processing module of the line card 3 generates alarm information, and reports the alarm information to the table maintenance module.
其中,告警信息可以携带有线卡1对应的线卡编号、用于表征线卡1离线的会话状态,该会话状态可以包括UP、DOWN;其中,UP表示资源板在线,DOWN表示资源板离线。The alarm information may carry the line card number corresponding to the cable card 1 and is used to characterize the offline session status of the line card 1. The session status may include UP and DOWN; where UP indicates that the resource board is online, and DOWN indicates that the resource board is offline.
在步骤三中,表维护模块接收线卡3的告警处理模块发送的告警信息,利用该告警信息携带的线卡1的线卡编号、用于表征线性1离线的会话状态,对资源板状态表中的线卡1的在线状态进行更新。In step three, the table maintenance module receives the alarm information sent by the alarm processing module of the line card 3, and uses the line card number of the line card 1 carried in the alarm information to characterize the offline session status of the linear 1 and compare the resource board status table The online status of line card 1 is updated.
本公开实施例还提供一种报文传输装置,其可设置在第一网络设备上。如图8所示,其为本公开实施例提供的报文传输装置的一种结构示意图,该报文传输装置可包括查询单元81、确定单元82和传输单元83。The embodiment of the present disclosure also provides a message transmission device, which can be set on the first network device. As shown in FIG. 8, which is a schematic structural diagram of a message transmission device provided by an embodiment of the disclosure, the message transmission device may include a query unit 81, a determination unit 82 and a transmission unit 83.
查询单元81,可配置为查询资源板状态表得到查询结果,资源板状态表包括资源板的主备状态和在线状态,资源板的在线状态由资源板之间的心跳检测会话传输结果确定。The query unit 81 may be configured to query the resource board status table to obtain the query result. The resource board status table includes the active and standby status and online status of the resource boards. The online status of the resource boards is determined by the transmission result of the heartbeat detection session between the resource boards.
确定单元82,可配置为根据查询结果确定第一网络设备与第二网络设备之间承载业务报文的第一资源板。The determining unit 82 may be configured to determine the first resource board carrying service packets between the first network device and the second network device according to the query result.
传输单元83,可配置为响应于根据查询结果确定第一资源板处于离线状态时,根据查询结果选择第一网络设备的第二资源板传输业务报文。The transmission unit 83 may be configured to select the second resource board of the first network device to transmit the service message according to the query result when it is determined that the first resource board is offline according to the query result.
在一示例性实施例中,第一网络设备具体可以为采用分布式系统架构的PE设备;其中,采用分布式系统架构的PE设备可以由线卡独立完成业务报文的接收和发送。资源板可以是指第一网络设备中用于承载第一网络设备与第二网络设备之间传输的业务报文的线卡;其中,业务可以是指具有发包间隔短、收包超时快速感知功能的业务,业务报文包括但不限于BFD报文等等。In an exemplary embodiment, the first network device may specifically be a PE device that adopts a distributed system architecture; wherein, the PE device that adopts a distributed system architecture can independently receive and send service packets by a line card. The resource board may refer to the line card used in the first network device to carry the service messages transmitted between the first network device and the second network device; among them, the service may refer to the function of short packet transmission interval and fast detection of packet receiving timeout. The business messages include but are not limited to BFD messages and so on.
在一示例性实施例中,在查询资源板状态表之前,需要建立资源板状态表。相应地,装置还可包括:建表单元(图8中未示出),可配置为针对第一网络设备的多个资源板,分配对应的索引标识;确定各个资源板的主备状态和在线状态;针对各个资源板,建立索引标识、主备状态和在线状态之间的对应关系,以得到资源板状态表。In an exemplary embodiment, before querying the resource board status table, a resource board status table needs to be established. Correspondingly, the device may further include: a table building unit (not shown in FIG. 8), which may be configured to allocate corresponding index identifiers for multiple resource boards of the first network device; determine the active and standby status and online status of each resource board Status: For each resource board, establish the corresponding relationship between the index identification, the active/standby status and the online status to obtain the resource board status table.
在一示例性实施例中,资源板状态表可以包括三个条目,即索引标识、主备状态和在线状态;如果主备状态的取值包括0和1,则0可以表示资源板主用,1可以表示资源板备用;如果在线状态的取值包括0和1,则0可以表示资源板在线,1可以表示资源板离线。In an exemplary embodiment, the resource board status table may include three entries, namely, index identification, active/standby status, and online status; if the value of the active/standby status includes 0 and 1, then 0 may indicate the active use of the resource board, 1 can indicate that the resource board is standby; if the value of the online status includes 0 and 1, then 0 can indicate that the resource board is online, and 1 can indicate that the resource board is offline.
需要说明的是,资源板的主备状态是针对业务而言的,假设该业务存在会话A和B,会话A由索引标识为01的资源板承载,会话B由索引标识为02的资源板承载;则可以将承载会话A、索引标识为01的资源板作为主资源板,将承载会话B、索引标识为02的资源板作为备资源板,该备资源板用于在主资源板离线时保证会话A的业务不中断;或者,也可以将承载会话B、索引标识为02的资源板为主资源板,承载会话A、索引标识为01的资源板为备资源板,该备资 源板用于在主资源板离线时保证会话B的业务不中断。It should be noted that the active and standby status of the resource board is for the business. Assume that the service has sessions A and B. Session A is carried by the resource board with index identification 01, and session B is carried by the resource board with index identification 02 ; The resource board bearing session A and index identification 01 can be used as the main resource board, and the resource board bearing session B and index identification 02 can be used as the backup resource board. The backup resource board is used to guarantee when the main resource board is offline The service of session A is not interrupted; alternatively, the resource board bearing session B and index identification 02 can be the main resource board, and the resource board bearing session A and index identification 01 is the backup resource board, and the backup resource board is used for Ensure that the services of session B are not interrupted when the main resource board is offline.
在一示例性实施例中,在第一网络设备的报文传输板建立资源板状态表之后,第一网络设备的一个资源板可以与其它资源板分别建立心跳检测会话连接,从而在两个资源板之间互发心跳检测会话。当其中一个资源板向另外一个资源板发送心跳检测会话,另外一个资源板在预定时长内未收到该资源板发送的心跳检测会话时,该另外一个资源板可以快速检测该资源板处于离线状态;否则,该另外一个资源板可以快速检测该资源板处于在线状态。这样,第一网络设备的资源板可以将心跳检测会话的传输结果发送至第一网络设备的报文传输板,因此第一网络设备的报文传输板可以利用资源板之间的心跳检测会话传输结果对资源板状态表进行更新。In an exemplary embodiment, after the message transmission board of the first network device establishes the resource board status table, one resource board of the first network device can establish a heartbeat detection session connection with other resource boards respectively, so that the connection between the two resources The boards exchange heartbeat detection sessions. When one resource board sends a heartbeat detection session to another resource board, and the other resource board does not receive the heartbeat detection session sent by the resource board within a predetermined period of time, the other resource board can quickly detect that the resource board is offline ; Otherwise, the other resource board can quickly detect that the resource board is online. In this way, the resource board of the first network device can send the transmission result of the heartbeat detection session to the message transmission board of the first network device, so the message transmission board of the first network device can use the heartbeat detection session transmission between the resource boards As a result, the resource board status table is updated.
在一示例性实施例中,第一网络设备的报文传输板可以通过查询资源板状态表,以确定主用的资源板,以及该资源板是否在线;还可以确定备用的资源板,以及该资源板是否在线。In an exemplary embodiment, the message transmission board of the first network device can query the resource board status table to determine the active resource board and whether the resource board is online; it can also determine the backup resource board and the Whether the resource board is online.
基于此,在一示例性实施例中,查询单元81,具体可配置为查询资源板状态表,得到第一资源板的主备状态和在线状态、以及第二资源板的主备状态和在线状态。Based on this, in an exemplary embodiment, the query unit 81 may be specifically configured to query the resource board status table to obtain the active/standby status and online status of the first resource board, and the active/standby status and online status of the second resource board. .
在一示例性实施例中,在第一网络设备的报文传输板根据查询结果确定第一资源板处于离线状态之前,第一网络设备的第二资源板可以通过自身与第一资源板之间的心跳检测会话传输结果确定第一资源板是否处于离线状态。或者,在第一网络设备的报文传输板根据查询结果确定第一资源板处于离线状态之前,第一网络设备的资源板中除第二资源板之外的其它资源板通过其自身与第一资源板之间的心跳检测会话传输结果确定第一资源板是否处于离线状态。In an exemplary embodiment, before the message transmission board of the first network device determines that the first resource board is offline according to the query result, the second resource board of the first network device may communicate between itself and the first resource board. The transmission result of the heartbeat detection session determines whether the first resource board is offline. Or, before the message transmission board of the first network device determines that the first resource board is offline according to the query result, the resource boards of the first network device except the second resource board communicate with the first resource board through itself. The transmission result of the heartbeat detection session between the resource boards determines whether the first resource board is offline.
基于此,在一示例性实施例中,该装置还可包括:更新单元(图8中未示出),可配置为确定在设定时长内未接收到第一资源板发送的心跳检测会话,更新资源板状态表中第一资源板的在线状态。Based on this, in an exemplary embodiment, the device may further include: an update unit (not shown in FIG. 8), which may be configured to determine that the heartbeat detection session sent by the first resource board is not received within a set time period, Update the online status of the first resource board in the resource board status table.
在一示例性实施例中,如果第一资源板离线、且用于接替第一资源板的第三资源板不可用,则第一网络设备的报文传输板需要重新选择可用的备用资源板,以由重新选取的备用资源板传输业务报文。In an exemplary embodiment, if the first resource board is offline and the third resource board used to replace the first resource board is unavailable, the message transmission board of the first network device needs to reselect an available spare resource board, The service message is transmitted by the newly selected backup resource board.
基于此,在一实施例中,该装置还可包括:选择单元(图8中未示出),可配置为根据查询结果确定第三资源板处于离线状态时,从第一网络设备的资源板中除第一资源板之外的其它资源板中确定处于在线状态的至少一个资源板;确定该至少一个资源板中各个资源板承载的业务量,以及根据确定的业务量从该至少一个资源板中选择第二资源板,由该第二资源板传输业务报文。Based on this, in an embodiment, the device may further include: a selection unit (not shown in FIG. 8), which may be configured to download from the resource board of the first network device when it is determined that the third resource board is offline according to the query result Determine at least one resource board in an online state among other resource boards except the first resource board; determine the service volume carried by each resource board in the at least one resource board, and determine the service volume from the at least one resource board according to the determined service volume The second resource board is selected in the, and the second resource board transmits service messages.
为了实现负载均衡,可以基于该至少一个资源板中各个资源板承载的业务量,确定承载的业务量最小的资源板;并将确定的资源板作为第二资源板。第一网络设备的报文传输板还可以为第二资源板选择备用的资源板,具体地,可从第一网络设备的资源板中除第二资源板之外的其它资源板中确定处于在线状态的至少一个资源板,确定该至少一个资源板中各个资源板承载的业务量,以及根据确定的业务量从该至少一个资源板中选择业务量最小的资源板作为第二资源板的备用资源板。In order to achieve load balancing, based on the service volume carried by each resource board in the at least one resource board, the resource board carrying the smallest service volume may be determined; and the determined resource board may be used as the second resource board. The message transmission board of the first network device may also select a spare resource board for the second resource board. Specifically, it may be determined that it is online from the resource boards of the first network device except the second resource board. At least one resource board in the state, determine the service volume carried by each resource board in the at least one resource board, and select the resource board with the smallest service volume from the at least one resource board according to the determined service volume as the backup resource of the second resource board board.
在一示例性实施例中,第一网络设备向第二网络设备发送业务报文时,如果第一网络设备的报文传输板查询到第一资源板处于离线状态,则第一网络设备的报文传输板可以选择第二资源板向第二网络设备发送业务报文。In an exemplary embodiment, when the first network device sends a service message to the second network device, if the message transmission board of the first network device inquires that the first resource board is offline, the report of the first network device The message transmission board may select the second resource board to send the service message to the second network device.
基于此,在一示例性实施例中,传输单元83,具体可配置为通过第二资源板向第二网络设备发送业务报文。Based on this, in an exemplary embodiment, the transmission unit 83 may be specifically configured to send service packets to the second network device through the second resource board.
在一示例性实施例中,第二资源板发送的业务报文中携带的信息可包括:资源板的索引标识、业务数据等等。资源板的索引标识具体可以是指资源板的线卡编号。In an exemplary embodiment, the information carried in the service message sent by the second resource board may include: the index identifier of the resource board, service data, and so on. The index identification of the resource board may specifically refer to the line card number of the resource board.
在由第二资源板向第二网络设备发送业务报文之前,第一网络设备的主控板可以创建待发送的业务报文;将第二资源板的索引标识、业务数据携带在创建的业务报文中;将创建的业务报文发送至第一网络设备的第二资源板。如此,第一网络设备的报文传输板在选择第二资源板后,可以由第二资源板向第二网络设备发送携带有第二资源板的索引标识、业务数据的业务报文。Before the second resource board sends the service message to the second network device, the main control board of the first network device can create the service message to be sent; carry the index identification and service data of the second resource board in the created service Message: Send the created service message to the second resource board of the first network device. In this way, after the message transmission board of the first network device selects the second resource board, the second resource board may send to the second network device a service message carrying the index identifier and service data of the second resource board.
当第一资源板处于离线状态时,由第二资源板向第二网络设备 发送业务报文,可以确保第二网络设备在预设时长内能够接收到第一网络设备发送的业务报文,进而不会断开与第一网络设备建立的连接,也就不会导致两个网络设备之间的业务中断。When the first resource board is offline, the second resource board sends service packets to the second network device, which can ensure that the second network device can receive the service packets sent by the first network device within a preset time period, and then The connection established with the first network device will not be disconnected, and the service between the two network devices will not be interrupted.
在一示例性实施例中,第一网络设备接收第二网络设备发送的业务报文时,如果第一资源板处于离线状态,则第一网络设备的报文传输板可选择第二资源板接收第二网络设备发送的业务报文。In an exemplary embodiment, when the first network device receives the service message sent by the second network device, if the first resource board is offline, the message transmission board of the first network device can select the second resource board to receive Service message sent by the second network device.
基于此,在一示例性实施例中,传输单元83,具体可配置为通过第二资源板接收第二网络设备发送的业务报文。Based on this, in an exemplary embodiment, the transmission unit 83 may be specifically configured to receive the service message sent by the second network device through the second resource board.
在一示例性实施例中,在第一网络设备接收第二网络设备发送的业务报文时,如果处于在线状态的第二资源板不具备收包或者收包超时检测功能,则在第一资源板处于离线状态时,第一资源板、第二资源板均无法接收到第二网络设备发送的业务报文,可能会使第一网络设备断开与第二网络设备建立的连接,从而导致两个网络设备之间的业务中断;因此,第一资源板、第二资源板需要均具备收包或者收包超时检测功能。In an exemplary embodiment, when the first network device receives the service message sent by the second network device, if the second resource board in the online state does not have the packet receiving or packet receiving timeout detection function, the first resource When the board is offline, neither the first resource board nor the second resource board can receive the service packets sent by the second network device, which may cause the first network device to disconnect the connection established with the second network device, resulting in two The service between the two network devices is interrupted; therefore, the first resource board and the second resource board need to have packet receiving or packet receiving timeout detection functions.
基于此,在一示例性实施例中,传输单元83,具体可配置为复制接收到的、第二网络设备发送的业务报文,得到复制后的业务报文;以及,向第一资源板发送接收到的、第二网络设备发送的业务报文,向第二资源板发送复制后的业务报文。Based on this, in an exemplary embodiment, the transmission unit 83 may be specifically configured to copy the received service message sent by the second network device to obtain the copied service message; and send to the first resource board The received service message sent by the second network device sends the copied service message to the second resource board.
在一示例性实施例中,在由第二资源板接收第二网络设备发送的业务报文之前,第一网络设备的报文传输板可以查询业务转发表,业务转发表包括主资源板的在线状态、转发出口,其中,转发出口由主资源板的在线状态确定;由查询到的转发出口指向的资源板接收第二网络设备发送的业务报文。In an exemplary embodiment, before the second resource board receives the service message sent by the second network device, the message transmission board of the first network device may query the service forwarding table, and the service forwarding table includes the online information of the main resource board. Status and forwarding outlet, where the forwarding outlet is determined by the online status of the main resource board; the resource board pointed to by the queried forwarding outlet receives the service message sent by the second network device.
在第一网络设备的报文传输板查询业务转发表之前,第一网络设备的报文传输板需要利用第一资源板的在线状态对查询业务转发表进行更新;也就是说,在第一网络设备的报文传输板确定第一资源板离线时,第一网络设备的报文传输板需要将业务转发表中转发出口指向的资源板由第一资源板更新为备用的第二资源板;这样,第一网络设备的报文传输板才能够从业务转发表查询到第二资源板,由第二 资源板接收第二网络设备发送的业务报文。Before the message transmission board of the first network device queries the service forwarding table, the message transmission board of the first network device needs to use the online status of the first resource board to update the query service forwarding table; that is, on the first network When the message transmission board of the device determines that the first resource board is offline, the message transmission board of the first network device needs to update the resource board pointed to by the forwarding outlet in the service forwarding table from the first resource board to the standby second resource board; , The message transmission board of the first network device can query the second resource board from the service forwarding table, and the second resource board receives the service message sent by the second network device.
需要说明的是,在第一网络设备的报文传输板确定第一资源板离线后,如果第一网络设备的报文传输板未及时更新业务转发表,即业务转发表中转向出口仍指向第一资源板,则第一网络设备的报文传输板查询业务转发表后,除了向第一资源板发送业务报文外,为了保证第一网络设备与第二网络设备之间的业务不中断,还需要复制接收到的、第二网络设备发送的业务报文,向第二资源板发送复制的业务报文。It should be noted that after the message transmission board of the first network device determines that the first resource board is offline, if the message transmission board of the first network device does not update the service forwarding table in time, that is, the forwarding exit in the service forwarding table still points to the first resource board. A resource board, after the message transmission board of the first network device queries the service forwarding table, in addition to sending service messages to the first resource board, in order to ensure uninterrupted services between the first network device and the second network device, It is also necessary to copy the received service message sent by the second network device, and send the copied service message to the second resource board.
在一示例性实施例中,在第一网络设备的报文传输板查询业务转发表之前,需要建立业务转发表。In an exemplary embodiment, before the message transmission board of the first network device queries the service forwarding table, the service forwarding table needs to be established.
基于此,在一示例性实施例中,建表单元还可配置为建立主资源板的在线状态、主资源板的索引标识以及转发出口的对应关系,得到业务转发表。Based on this, in an exemplary embodiment, the table building unit may also be configured to establish the online status of the main resource board, the index identification of the main resource board, and the corresponding relationship between the forwarding outlets, and obtain the service forwarding table.
在一示例性实施例中,在第一网络设备的第二资源板传输业务报文之后,为了节省硬件开销,第一网络设备的报文传输板可以将资源板状态表中第二资源板的主备状态进行更新。In an exemplary embodiment, after the second resource board of the first network device transmits service messages, in order to save hardware overhead, the message transmission board of the first network device may transfer the data of the second resource board in the resource board status table. The status of master and slave is updated.
基于此,更新单元还可配置为更新资源板状态表中第二资源板的主备状态。Based on this, the update unit may also be configured to update the active/standby status of the second resource board in the resource board status table.
在更新资源板状态表中第二资源板的主备状态之后,第二资源板作为新的主资源板,选择新的备资源板的过程可以包括:从第一网络设备的资源板中除第二资源板之外的其它资源板中确定处于在线状态的至少一个资源板;确定该至少一个资源板中各个资源板承载的业务量,根据确定的业务量,从该至少一个资源板中确定业务量最小的资源板;以及将确定的业务量最小的资源板作为新的备资源板。After updating the active/standby status of the second resource board in the resource board status table, the second resource board serves as the new primary resource board. The process of selecting the new standby resource board may include: removing the first resource board from the resource board of the first network device. 2. Determine at least one resource board that is online among other resource boards; determine the service volume carried by each resource board in the at least one resource board, and determine the service from the at least one resource board according to the determined service volume The resource board with the smallest volume; and the determined resource board with the smallest business volume as the new backup resource board.
在一示例性实施例中,查询单元81、确定单元82、传输单元83、建表单元、更新单元、选择单元均可由报文传输装置中的处理器实现。In an exemplary embodiment, the query unit 81, the determination unit 82, the transmission unit 83, the table creation unit, the update unit, and the selection unit may all be implemented by a processor in the message transmission device.
本公开实施例还提供另一种报文传输装置,如图9所示,其为本公开实施例提供的该另一种报文传输装置的一种结构示意图,该报文传输装置90可包括:通信接口91、处理器92、存储器93;其中,通信接口91,能够与其它设备进行信息交互;处理器92,与通信接 口91连接,以实现与第二网络设备进行信息交互,可配置为运行计算机程序时,执行本公开实施例提供的报文传输方法的至少一个步骤;该计算机程序可存储在存储器93上。The embodiment of the present disclosure also provides another message transmission device, as shown in FIG. 9, which is a schematic structural diagram of the other message transmission device provided by the embodiment of the disclosure. The message transmission device 90 may include :Communication interface 91, processor 92, memory 93; among them, the communication interface 91 can interact with other devices; the processor 92 is connected with the communication interface 91 to realize the information interaction with the second network device, which can be configured as When the computer program is run, at least one step of the message transmission method provided in the embodiment of the present disclosure is executed; the computer program may be stored in the memory 93.
在一示例性实施例中,报文传输装置90中的各个组件可通过总线系统94耦合在一起。可理解,总线系统94可配置为实现这些组件之间的连接通信。总线系统94除包括数据总线之外,还包括电源总线、控制总线和状态信号总线。但是为了清楚说明起见,在图9中将各种总线都标为总线系统94。In an exemplary embodiment, the various components in the message transmission device 90 may be coupled together through the bus system 94. It can be understood that the bus system 94 may be configured to implement connection and communication between these components. In addition to the data bus, the bus system 94 also includes a power bus, a control bus, and a status signal bus. However, for clarity of description, various buses are marked as the bus system 94 in FIG. 9.
本公开实施例中的存储器93可配置为存储各种类型的数据以支持报文传输装置90的操作。这些数据的示例包括:用于在报文传输装置90上操作的任何计算机程序。The memory 93 in the embodiment of the present disclosure may be configured to store various types of data to support the operation of the message transmission device 90. Examples of these data include: any computer program for operating on the message transmission device 90.
上述本公开实施例揭示的方法可以应用于处理器92中,或者由处理器92实现。处理器92可能是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器92中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器92可以是通用处理器、数字信号处理器(Digital Signal Processor,DSP),或者其它可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。处理器92可以实现或者执行本公开实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者任何常规的处理器等。结合本公开实施例所公开的方法的步骤,可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于存储介质中,该存储介质位于存储器93,处理器92读取存储器93中的信息,结合其硬件完成前述方法的步骤。The methods disclosed in the foregoing embodiments of the present disclosure may be applied to the processor 92 or implemented by the processor 92. The processor 92 may be an integrated circuit chip with signal processing capability. In the implementation process, the steps of the foregoing method can be completed by hardware integrated logic circuits in the processor 92 or instructions in the form of software. The aforementioned processor 92 may be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 92 may implement or execute various methods, steps, and logical block diagrams disclosed in the embodiments of the present disclosure. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the embodiments of the present disclosure may be directly embodied as being executed and completed by a hardware decoding processor, or executed and completed by a combination of hardware and software modules in the decoding processor. The software module may be located in a storage medium, and the storage medium is located in the memory 93. The processor 92 reads the information in the memory 93 and completes the steps of the foregoing method in combination with its hardware.
在一示例性实施例中,报文传输装置90可以被一个或多个应用专用集成电路(Application Specific Integrated Circuit,ASIC)、DSP、可编程逻辑器件(Programmable Logic Device,PLD)、复杂可编程逻辑器件(Complex Programmable Logic Device,CPLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器(Micro Controller Unit,MCU)、微处理器(Microprocessor)、或者其它电子元件实现,用于执行前述 方法。In an exemplary embodiment, the message transmission device 90 may be implemented by one or more application specific integrated circuits (Application Specific Integrated Circuit, ASIC), DSP, programmable logic device (Programmable Logic Device, PLD), complex programmable logic Device (Complex Programmable Logic Device, CPLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), general-purpose processor, controller, microcontroller (Micro Controller Unit, MCU), microprocessor (Microprocessor), Or implemented by other electronic components to perform the foregoing method.
需要说明的是:“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。It should be noted that: "first", "second", etc. are used to distinguish similar objects, and not necessarily used to describe a specific sequence or sequence.
另外,本公开实施例所记载的技术方案之间,在不冲突的情况下,可以任意组合。In addition, the technical solutions described in the embodiments of the present disclosure may be combined arbitrarily without conflict.
以上所述,仅为本公开的较佳实施例而已,并非用于限定本公开的保护范围。The above are only preferred embodiments of the present disclosure, and are not used to limit the protection scope of the present disclosure.

Claims (18)

  1. 一种报文传输方法,应用于第一网络设备,包括:A message transmission method, applied to a first network device, includes:
    查询资源板状态表得到查询结果;其中,所述资源板状态表包括所述第一网络设备的至少一个资源板的主备状态和在线状态,所述至少一个资源板的在线状态由所述至少一个资源板与至少一个其它资源板之间的心跳检测会话的传输结果确定;Query the resource board status table to obtain the query result; wherein, the resource board status table includes the active/standby status and online status of at least one resource board of the first network device, and the online status of the at least one resource board is determined by the at least one resource board. The transmission result of the heartbeat detection session between one resource board and at least one other resource board is determined;
    根据所述查询结果,确定当前承载所述第一网络设备与第二网络设备之间的业务报文的所述第一网络设备的第一资源板;以及According to the query result, determine the first resource board of the first network device that currently carries the service message between the first network device and the second network device; and
    响应于根据所述查询结果确定所述第一资源板处于离线状态,根据所述查询结果选择所述第一网络设备的第二资源板传输所述业务报文。In response to determining that the first resource board is offline according to the query result, selecting the second resource board of the first network device to transmit the service message according to the query result.
  2. 根据权利要求1所述的方法,在根据所述查询结果选择所述第二资源板传输所述业务报文之前,还包括:The method according to claim 1, before selecting the second resource board to transmit the service message according to the query result, further comprising:
    响应于根据所述查询结果确定所述第一网络设备的第三资源板处于离线状态;In response to determining that the third resource board of the first network device is in an offline state according to the query result;
    从所述第一网络设备的多个资源板中除所述第一资源板之外的其它资源板中,确定至少一个处于在线状态的资源板;Determine at least one resource board that is online from among the resource boards of the first network device other than the first resource board;
    确定所述至少一个处于在线状态的资源板中各个资源板承载的业务量;以及Determining the service volume carried by each resource board in the at least one resource board in an online state; and
    根据确定的业务量,从所述至少一个处于在线状态的资源板中选择所述第二资源板。According to the determined business volume, the second resource board is selected from the at least one resource board in an online state.
  3. 根据权利要求1所述的方法,其中,选择所述第二资源板传输所述业务报文,包括:The method according to claim 1, wherein selecting the second resource board to transmit the service message comprises:
    通过所述第二资源板向所述第二网络设备发送所述业务报文;或Sending the service message to the second network device through the second resource board; or
    通过所述第二资源板接收所述第二网络设备发送的所述业务报文。Receiving the service message sent by the second network device through the second resource board.
  4. 根据权利要求3所述的方法,其中,通过所述第二资源板接收所述第二网络设备发送的所述业务报文,包括:The method according to claim 3, wherein the receiving the service message sent by the second network device through the second resource board comprises:
    复制接收到的、所述第二网络设备发送的所述业务报文,得到复制后的业务报文;Copy the received service message sent by the second network device to obtain a copied service message;
    向所述第一资源板发送所述接收到的、所述第二网络设备发送的所述业务报文;以及Sending the received service message sent by the second network device to the first resource board; and
    向所述第二资源板发送所述复制后的业务报文。Sending the copied service message to the second resource board.
  5. 根据权利要求1所述的方法,其中,查询所述资源板状态表得到所述查询结果,包括:The method according to claim 1, wherein querying the resource board status table to obtain the query result comprises:
    查询所述资源板状态表,得到所述第一资源板的主备状态和在线状态以及所述第二资源板的主备状态和在线状态。Query the resource board status table to obtain the active/standby status and online status of the first resource board and the active/standby status and online status of the second resource board.
  6. 根据权利要求1所述的方法,还包括:The method according to claim 1, further comprising:
    针对所述第一网络设备的多个资源板,分别分配对应的索引标识;For the multiple resource boards of the first network device, respectively assign corresponding index identifiers;
    确定所述多个资源板中的所述至少一个资源板的主备状态和在线状态;以及Determining the active/standby status and online status of the at least one resource board among the multiple resource boards; and
    针对所述至少一个资源板,建立索引标识、主备状态和在线状态之间的对应关系,以得到所述资源板状态表。For the at least one resource board, a correspondence relationship between index identification, active/standby status, and online status is established to obtain the resource board status table.
  7. 根据权利要求1所述的方法,还包括:The method according to claim 1, further comprising:
    确定在设定时长内未接收到所述第一资源板发送的心跳检测会话;以及Determining that the heartbeat detection session sent by the first resource board is not received within a set time period; and
    更新所述资源板状态表中所述第一资源板的在线状态。Update the online status of the first resource board in the resource board status table.
  8. 根据权利要求1所述的方法,在选择所述第二资源板传输所述业务报文之后,还包括:The method according to claim 1, after selecting the second resource board to transmit the service message, further comprising:
    更新所述资源板状态表中所述第二资源板的主备状态。Update the active/standby status of the second resource board in the resource board status table.
  9. 一种报文传输装置,包括:A message transmission device includes:
    查询单元,配置为查询资源板状态表得到查询结果;其中,所述资源板状态表包括第一网络设备的至少一个资源板的主备状态和在线状态,所述至少一个资源板的在线状态由所述至少一个资源板与至少一个其它资源板之间的心跳检测会话的传输结果确定;The query unit is configured to query the resource board status table to obtain the query result; wherein the resource board status table includes the active/standby status and online status of at least one resource board of the first network device, and the online status of the at least one resource board is determined by Determining the transmission result of the heartbeat detection session between the at least one resource board and at least one other resource board;
    确定单元,配置为根据所述查询结果,确定当前承载所述第一网络设备与第二网络设备之间的业务报文的所述第一网络设备的第 一资源板;以及The determining unit is configured to determine, according to the query result, the first resource board of the first network device that currently carries the service message between the first network device and the second network device; and
    传输单元,配置为响应于根据所述查询结果确定所述第一资源板处于离线状态,根据所述查询结果选择所述第一网络设备的第二资源板传输所述业务报文。The transmission unit is configured to, in response to determining that the first resource board is offline according to the query result, select the second resource board of the first network device to transmit the service message according to the query result.
  10. 根据权利要求9所述的装置,还包括选择单元,配置为:The device according to claim 9, further comprising a selection unit configured to:
    响应于根据所述查询结果确定所述第一网络设备的第三资源板处于离线状态;In response to determining that the third resource board of the first network device is in an offline state according to the query result;
    从所述第一网络设备的多个资源板中除所述第一资源板之外的其它资源板中,确定至少一个处于在线状态的资源板;Determine at least one resource board that is online from among the resource boards of the first network device other than the first resource board;
    确定所述至少一个处于在线状态的资源板中各个资源板承载的业务量;以及Determining the service volume carried by each resource board in the at least one resource board in an online state; and
    根据确定的业务量,从所述至少一个处于在线状态的资源板中选择所述第二资源板。According to the determined business volume, the second resource board is selected from the at least one resource board in an online state.
  11. 根据权利要求9所述的装置,其中,所述传输单元,具体配置为通过所述第二资源板向所述第二网络设备发送所述业务报文;或通过所述第二资源板接收所述第二网络设备发送的所述业务报文。The apparatus according to claim 9, wherein the transmission unit is specifically configured to send the service message to the second network device through the second resource board; or to receive the service message through the second resource board. The service message sent by the second network device.
  12. 根据权利要求11所述的装置,其中,所述传输单元,具体配置为:The apparatus according to claim 11, wherein the transmission unit is specifically configured as follows:
    复制接收到的、所述第二网络设备发送的所述业务报文,得到复制后的业务报文;Copy the received service message sent by the second network device to obtain a copied service message;
    向所述第一资源板发送所述接收到的、所述第二网络设备发送的所述业务报文;以及Sending the received service message sent by the second network device to the first resource board; and
    向所述第二资源板发送所述复制后的业务报文。Sending the copied service message to the second resource board.
  13. 根据权利要求9所述的装置,其中,所述查询单元,具体配置为查询所述资源板状态表,得到所述第一资源板的主备状态和在线状态以及所述第二资源板的主备状态和在线状态。The device according to claim 9, wherein the query unit is specifically configured to query the resource board status table to obtain the active/standby status and online status of the first resource board and the master of the second resource board Standby status and online status.
  14. 根据权利要求9所述的装置,还包括建表单元,配置为:The device according to claim 9, further comprising a table building unit configured to:
    针对所述第一网络设备的多个资源板,分别分配对应的索引标识;For the multiple resource boards of the first network device, respectively assign corresponding index identifiers;
    确定所述多个资源板中的所述至少一个资源板的主备状态和在 线状态;以及Determining the active/standby status and the online status of the at least one resource board among the multiple resource boards; and
    针对所述至少一个资源板,建立索引标识、主备状态和在线状态之间的对应关系,以得到所述资源板状态表。For the at least one resource board, a correspondence relationship between index identification, active/standby status, and online status is established to obtain the resource board status table.
  15. 根据权利要求9所述的装置,还包括更新单元,配置为:The device according to claim 9, further comprising an update unit configured to:
    确定在设定时长内未接收到所述第一资源板发送的心跳检测会话;以及Determining that the heartbeat detection session sent by the first resource board is not received within a set time period; and
    更新所述资源板状态表中所述第一资源板的在线状态。Update the online status of the first resource board in the resource board status table.
  16. 根据权利要求15所述的装置,其中,所述更新单元,还配置为在所述传输单元选择所述第二资源板传输所述业务报文之后,更新所述资源板状态表中所述第二资源板的主备状态。The apparatus according to claim 15, wherein the update unit is further configured to update the first resource board in the resource board status table after the transmission unit selects the second resource board to transmit the service message 2. The active and standby status of the resource board.
  17. 一种报文传输装置,包括:处理器和配置为存储能够在所述处理器上运行的计算机程序的存储器,其中,所述处理器配置为运行所述计算机程序时,执行根据权利要求1至8任一项所述的方法的步骤。A message transmission device, comprising: a processor and a memory configured to store a computer program that can run on the processor, wherein the processor is configured to execute the computer program according to claims 1 to 8. The steps of any one of the methods.
  18. 一种存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现根据权利要求1至8任一项所述的方法的步骤。A storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are realized.
PCT/CN2019/130613 2019-03-06 2019-12-31 Message transmission method, apparatus and storage medium WO2020177471A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910169080.6A CN111669280B (en) 2019-03-06 2019-03-06 Message transmission method, device and storage medium
CN201910169080.6 2019-03-06

Publications (1)

Publication Number Publication Date
WO2020177471A1 true WO2020177471A1 (en) 2020-09-10

Family

ID=72338356

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/130613 WO2020177471A1 (en) 2019-03-06 2019-12-31 Message transmission method, apparatus and storage medium

Country Status (2)

Country Link
CN (1) CN111669280B (en)
WO (1) WO2020177471A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1464396A (en) * 2002-06-27 2003-12-31 深圳市中兴通讯股份有限公司 Method for realizing backup between servers
CN101110776A (en) * 2007-07-05 2008-01-23 华为技术有限公司 Backup method, backup device and backup system for data business
CN102025541A (en) * 2010-12-08 2011-04-20 中兴通讯股份有限公司 Method and system for realizing multicast protection
CN104158733A (en) * 2013-05-13 2014-11-19 华为技术有限公司 Rapid rerouting method and device and transmission network
US20160036625A1 (en) * 2013-04-09 2016-02-04 Huawei Technologies Co., Ltd. Method and device for protecting service reliability and network virtualization system

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100388703C (en) * 2003-11-27 2008-05-14 中兴通讯股份有限公司 A method and system for Ethernet interface node backup
CN101616033A (en) * 2009-07-17 2009-12-30 中兴通讯股份有限公司 A kind of method of relay resource board back-up protection
CN101860491B (en) * 2010-06-23 2013-08-14 迈普通信技术股份有限公司 Aggregation type link bidirectional forwarding detection method and device thereof
CN102710466B (en) * 2012-06-11 2015-09-30 烽火通信科技股份有限公司 Standby usage board switches protection system and two-way converting detects seamless switching method and apparatus
CN105429814B (en) * 2014-09-17 2020-08-04 南京中兴软件有限责任公司 Method and equipment for protecting BFD (bidirectional forwarding detection) by using multiple board cards
CN107612754B (en) * 2017-10-30 2021-07-06 新华三技术有限公司 Bidirectional forwarding link fault detection method and device and network node equipment
CN108462529B (en) * 2018-04-27 2023-12-19 上海欣诺通信技术股份有限公司 Main and standby board card switching method, optical transmission network equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1464396A (en) * 2002-06-27 2003-12-31 深圳市中兴通讯股份有限公司 Method for realizing backup between servers
CN101110776A (en) * 2007-07-05 2008-01-23 华为技术有限公司 Backup method, backup device and backup system for data business
CN102025541A (en) * 2010-12-08 2011-04-20 中兴通讯股份有限公司 Method and system for realizing multicast protection
US20160036625A1 (en) * 2013-04-09 2016-02-04 Huawei Technologies Co., Ltd. Method and device for protecting service reliability and network virtualization system
CN104158733A (en) * 2013-05-13 2014-11-19 华为技术有限公司 Rapid rerouting method and device and transmission network

Also Published As

Publication number Publication date
CN111669280A (en) 2020-09-15
CN111669280B (en) 2023-05-16

Similar Documents

Publication Publication Date Title
US10938710B2 (en) Protection switching method and system, and network device
CN112868206A (en) Method, system and computer readable medium for providing service broker functionality in a telecommunications network core using a service based architecture
US10404773B2 (en) Distributed cluster processing system and packet processing method thereof
US9455916B2 (en) Method and system for changing path and controller thereof
US10530669B2 (en) Network service aware routers, and applications thereof
CN109088818B (en) Equipment linkage switching method and device
US10447652B2 (en) High availability bridging between layer 2 networks
EP3316555A1 (en) Mac address synchronization method, device and system
US20160205033A1 (en) Pool element status information synchronization method, pool register, and pool element
WO2020057445A1 (en) Communication system, method, and device
CN107948063B (en) Method for establishing aggregation link and access equipment
WO2021072130A1 (en) Dynamic discovery of service nodes in a network
CN104104596A (en) Intelligent resilient framework (IRF) split processing method and device
CN110311861B (en) Method and device for guiding data flow
WO2020177471A1 (en) Message transmission method, apparatus and storage medium
EP3232617B1 (en) Protection switching method and system, and nodes
CN115333991A (en) Cross-device link aggregation method, device, system and computer-readable storage medium
CN110545240B (en) Method for establishing label forwarding table and forwarding message based on distributed aggregation system
CN115514698A (en) Protocol calculation method, switch, cross-device link aggregation system and storage medium
US10277700B2 (en) Control plane redundancy system
WO2021259097A1 (en) Communication method, communication device, and storage medium
US11212217B2 (en) Spanning tree enabled link aggregation system
CN115701031A (en) Service processing method and related device
CN116668352A (en) State indication method, device and storage medium
CN117955895A (en) Switch, forwarding table item updating method thereof, storage medium and computing device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19918315

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19918315

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 25/01/2022)

122 Ep: pct application non-entry in european phase

Ref document number: 19918315

Country of ref document: EP

Kind code of ref document: A1