CN114513433B - Message processing method and device - Google Patents

Message processing method and device Download PDF

Info

Publication number
CN114513433B
CN114513433B CN202210014026.6A CN202210014026A CN114513433B CN 114513433 B CN114513433 B CN 114513433B CN 202210014026 A CN202210014026 A CN 202210014026A CN 114513433 B CN114513433 B CN 114513433B
Authority
CN
China
Prior art keywords
bfd
message
sending interval
packet
interval
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210014026.6A
Other languages
Chinese (zh)
Other versions
CN114513433A (en
Inventor
武伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN202210014026.6A priority Critical patent/CN114513433B/en
Publication of CN114513433A publication Critical patent/CN114513433A/en
Application granted granted Critical
Publication of CN114513433B publication Critical patent/CN114513433B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • 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

Abstract

The application provides a message processing method and device. The method is applied to the CPU in the routing equipment and comprises the following steps: receiving a first BFD message which is sent by opposite-end routing equipment, is DOWN and carries a first message sending interval and is aimed at a target BFD session; if the second message sending interval of the corresponding second BFD message configured locally is smaller than the first message sending interval, judging whether the first message sending interval is the NP-supported message sending interval corresponding to the target BFD session; if not, judging whether the current BFD session load value reaches a set threshold value, if so, determining a third message sending interval; generating first session information and sending a related second BFD message to opposite-end routing equipment; and when the state of the target BFD session is the UP state, the session information is sent to the NP, and the NP sends a relevant second BFD message to the opposite-end routing equipment according to the third message sending interval. The application can avoid the concussion of BFD session.

Description

Message processing method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for processing a message.
Background
Bidirectional forwarding detection (Bidirectional Forwarding Detection, BFD) is a generic, standardized, media independent and protocol independent fast failure detection mechanism for detecting link connectivity conditions in IP networks, ensuring that communication failures can be detected quickly between network devices in order to take relevant measures in time, ensuring continued operation of the service. BFD may rapidly detect failures of bi-directional forwarding paths between two network devices for various upper layer protocols (e.g., routing protocols, etc.). The upper layer protocol typically employs a Hello message mechanism to detect faults and may provide millisecond level detection.
In the case that the network device is a routing device, thousands of BFD sessions, even tens of thousands of BFD sessions, are often maintained, and a message transmission interval of BFD messages corresponding to each BFD session is typically between 10ms and 100ms, if the BFD sessions are processed by a central processing unit (Central Processing Unit, CPU) in the routing device in a conventional manner, a large number of BFD sessions cannot be processed at a shorter message transmission interval due to limited message processing performance of the CPU.
Therefore, the CPU in the routing device generally compares the first message sending interval with the second message sending interval of the BFD message corresponding to the BFD session configured locally after obtaining the first message sending interval of the BFD message corresponding to any BFD session between the opposite-end routing device and the local-end routing device; under the condition that the comparison result is that the first message sending interval is not smaller than the second message sending interval, a corresponding network processor (Network Processor, NP) sends corresponding BFD messages to opposite-end routing equipment according to the first message sending interval; under the condition that the comparison result is that the first message sending interval is smaller than the second message sending interval, judging whether the first message sending interval is the NP-supported message sending interval in the local end routing equipment; when the judgment result is yes, the corresponding NP sends corresponding BFD messages to the opposite-end routing equipment according to the first message sending interval; and if the judgment result is negative, the CPU sends corresponding BFD messages to the opposite-end routing equipment according to the first message sending interval.
However, in the above processing manner, there still exists a phenomenon that a CPU in the routing device needs to process a large number of BFD sessions, and thus a problem that a related BFD packet is lost and a related BFD session oscillates occurs.
Disclosure of Invention
In order to overcome the problems in the related art, the application provides a message processing method and a message processing device.
According to a first aspect of an embodiment of the present application, there is provided a method for processing a packet, where the method is applied to a CPU in a routing device, the method including:
receiving a first BFD message which is sent by opposite-end routing equipment and is not ready (DOWN) for the target BFD session, wherein the first BFD message carries a first message sending interval;
if the second message sending interval of the second BFD message corresponding to the target BFD session configured locally is smaller than the first message sending interval, judging whether the first message sending interval is an NP-supported message sending interval corresponding to the target BFD session in the routing equipment;
if the judging result is no, further judging whether the current BFD session load value of the CPU reaches a set threshold value, and if the judging result is yes, selecting a third message sending interval meeting a preset condition from all message sending intervals supported by the NP, wherein the current BFD session load value is the number value of third BFD messages received by the CPU in a set time before the CPU receives the first BFD messages, and the third message sending interval is smaller than the first message sending interval;
generating first session information at least comprising the first message sending interval, the third message sending interval and a first session timeout time calculated by the CPU based on the first message sending interval, and sending a second BFD message which is ready (INIT) and carries the first message sending interval to the opposite-end routing equipment;
and when the state of the target BFD session is an established (UP) state, sending the first session information to the NP so that the NP sends a second BFD message which is in the UP state and carries the first message sending interval to the opposite terminal routing equipment according to the third message sending interval.
According to a second aspect of an embodiment of the present application, there is provided a packet processing apparatus, the apparatus being applied to a CPU in a routing device, the apparatus including:
a receiving module, configured to receive a first BFD packet sent by an opposite-end routing device for a target BFD session, where the first BFD packet carries a first packet sending interval;
a first judging module, configured to judge whether the first packet transmission interval is an NP-supported packet transmission interval corresponding to the target BFD session in the routing device if the second packet transmission interval of the second BFD packet corresponding to the target BFD session configured locally is smaller than the first packet transmission interval;
the second judging module is used for further judging whether the current BFD session load value of the CPU reaches a set threshold value or not when the judging result of the first judging module is negative;
the selecting module is configured to select, when the determination result of the second determining module is yes, a third packet sending interval that meets a preset condition from all packet sending intervals supported by the NP, where the current BFD session load value is a number value of third BFD packets received by the CPU within a set period of time before the CPU receives the first BFD packet, and the third packet sending interval is smaller than the first packet sending interval;
a first sending module, configured to generate first session information at least including the first packet sending interval, the third packet sending interval, and a first session timeout time calculated by the CPU based on the first packet sending interval, and send a second BFD packet having an INIT state and carrying the first packet sending interval to the peer routing device;
and the second sending module is used for sending the first session information to the NP when the state of the target BFD session is an UP state, so that the NP sends a second BFD message which is in the UP state and carries the first message sending interval to the opposite-end routing equipment according to the third message sending interval.
The technical scheme provided by the embodiment of the application can comprise the following beneficial effects:
in the embodiment of the application, for a CPU in a routing device, when a first BFD packet sent by an opposite-end routing device and aiming at a target BFD session is received, wherein the state of the first BFD packet is DOWN and the first BFD packet carries a first packet sending interval, and the second packet sending interval of a locally configured second BFD packet corresponding to the target BFD session is smaller than the first packet sending interval, once the first packet sending interval is judged not to be the packet sending interval supported by an NP corresponding to the target BFD session in the routing device, the CPU does not directly send the corresponding second BFD packet according to the first packet sending interval, but further judges whether the current BFD session load value of the CPU reaches a set threshold, and in the case that the judgment result is yes, the corresponding BFD packet is still sent by the corresponding NP according to the packet sending interval selected by the CPU, so that the CPU needs to process a large number of BFD sessions can be avoided, and the problem that the relevant BFD packet is lost and the relevant BFD session is oscillated can be avoided.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application as claimed.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
FIG. 1 is a flow chart of a message processing method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a message processing apparatus according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the application. Rather, they are merely examples of apparatus and methods consistent with aspects of the application as detailed in the accompanying claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the application. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
The embodiments of the present application will be described in detail.
The embodiment of the application provides a message processing method, which is applied to a CPU in routing equipment, as shown in figure 1, and can comprise the following steps:
s11, receiving a first BFD message of which the state of the BFD session is not ready DOWN, which is sent by opposite-end routing equipment and aims at target bidirectional forwarding detection.
In this step, the first BFD packet carries a first packet sending interval. Of course, other contents are carried in the first BFD packet, which are all of the prior art and are not listed here.
S12, if the second message sending interval of the second BFD message corresponding to the target BFD session configured locally is smaller than the first message sending interval, judging whether the first message sending interval is the NP-supported message sending interval corresponding to the target BFD session in the routing equipment; if not, executing step S13; if the determination result is yes, the conventional flow is executed, that is, steps S19 to S20 are executed.
S13, judging whether the current BFD session load value of the CPU reaches a set threshold value; if the judgment result is negative, executing the steps S14 to S15; when the determination result is yes, step S16 is performed.
In this step, the current BFD session load value is a quantity value of the third BFD packet received by the CPU within a set period of time before the first BFD packet is received.
S14, sending a second BFD message with the INIT state and carrying the first message sending interval to the opposite-end routing equipment.
And S15, when the state of the target BFD session is the UP state, sending a second BFD message which is in the UP state and carries the first message sending interval to opposite-end routing equipment according to the first message sending interval.
S16, selecting a third message sending interval meeting preset conditions from all message sending intervals supported by the NP.
In this step, the third packet transmission interval is smaller than the first packet transmission interval.
S17, generating first session information at least comprising a first message sending interval, a third message sending interval and a first session timeout time calculated based on the first message sending interval, and sending a second BFD message with the state INIT and carrying the first message sending interval to opposite-end routing equipment.
And S18, when the state of the target BFD session is the UP state, the first session information is sent to the NP so that the NP can send a second BFD message which is the UP state and carries the first message sending interval to the opposite terminal routing equipment according to the third message sending interval.
S19, generating third session information at least comprising a first message sending interval and a first session timeout time, and sending a second BFD message with the state INIT and carrying the first message sending interval to opposite-end routing equipment.
And S20, when the state of the target BFD session is the UP state, third session information is sent to the NP so that the NP can send a second BFD message which is the UP state and carries the first message sending interval to the opposite-end routing equipment according to the first message sending interval.
In step S12, the determination method of the NP corresponding to the target BFD session is a prior art, and is not described in detail herein. Here, for the NP corresponding to the target BFD session, other BFD sessions may also be corresponding.
In the step S13, the set threshold and the set duration may be set according to the actual requirement of the network where the routing device is located.
Specifically, in the above step S16, when the CPU selects the third packet transmission interval satisfying the preset condition from all the packet transmission intervals supported by the NP, the CPU may implement the following procedure:
and selecting a message transmission interval which is smaller than the first message transmission interval and has the smallest absolute value of the difference value between the first message transmission interval and the first message transmission interval from all message transmission intervals supported by the NP, and taking the message transmission interval as a third message transmission interval.
In step S17 described above, the CPU may calculate the first session timeout time in accordance with existing calculation methods. For example, the CPU calculates a first message transmission interval N times, and uses the calculated result as a first session timeout time. Here, the value of N may be set according to the actual requirement of the network where the routing device is located, for example, the value of N is 3, etc.
In addition, in the step S17, the first session information may further include the IP address of the routing device, the IP address of the opposite-end routing device, the local identifier (Local Discriminator, LD) of the target BFD session, the remote identifier (Remote Discriminator, RD) of the target BFD session, and the like, which are not listed here.
After the step of "sending the second BFD packet with the status of INIT and the first packet sending interval to the peer routing device" in step S17, the CPU performs the existing procedure until the status of the target BFD session is UP. The specific flow is as follows: the CPU receives a first BFD message which is sent by opposite terminal equipment, has INIT and carries a first message sending interval; and finally, when receiving the first BFD message which is sent by the opposite terminal equipment and is in the state of UP and carries the first message sending interval, the CPU determines that the state of the target BFD session is in the UP state.
After the CPU performs the above step S18, for the NP corresponding to the target BFD session, the CPU performs the step of sending, to the peer routing device, the second BFD packet having the UP state and carrying the first packet sending interval according to the third packet sending interval, and monitors, according to the first session timeout time included in the first session information, the first BFD packet having the UP state from the peer device.
It should be further noted that, in the embodiment of the present application, after receiving the first BFD packet, the CPU may further perform the following existing operations:
if the second message sending interval is not smaller than the first message sending interval, generating second session information at least comprising the second message sending interval and a second session timeout time calculated by the CPU based on the second message sending interval, and sending a second BFD message with INIT and carrying the second message sending interval to opposite-end routing equipment;
and when the state of the target BFD session is the UP state, sending second session information to the NP so that the NP sends a second BFD message which is in the UP state and carries the second message sending interval to the opposite-end routing equipment according to the second message sending interval.
The above message processing method is described in detail below with reference to specific embodiments.
Assume that a routing device 1 and a routing device 2 in a certain network need to establish a BFD session 1. The message sending interval 1 of the BFD message 1 corresponding to the BFD session 1 configured by the CPU2 in the routing equipment 2 is 33ms, and the message sending intervals supported by all NPs in the routing equipment 2 are 11ms, 22ms, 33ms and 44ms; the message transmission interval 2 of the BFD message 2 corresponding to the BFD session 1 configured by the CPU1 in the routing device 1 is 30ms, and all NP-supported message transmission intervals in the routing device 1 are 10ms, 20ms, 30ms, and 40ms.
Assume that CPU1 in routing device 1 receives BFD message 1 sent by routing device 2 for BFD session 1 having a state of DOWN and carrying message sending interval 1.
The CPU1 finds that the message transmission interval 2 is smaller than the message transmission interval 1, at this time, the CPU1 determines whether the message transmission interval 1 is a message transmission interval supported by NP (for example, NP 1) corresponding to the BFD session 1 in the routing apparatus 1.
Since the message sending intervals supported by NP1 are 10ms, 20ms, 30ms and 40ms, the judgment result is no, and in this case, the CPU1 further judges whether the current BFD session load value of the CPU reaches the set threshold.
Assuming that the current BFD session load value is a value of the number of BFD messages received by the CPU1 within 1 second before receiving the BFD message 1 with the state DOWN sent by the routing device 2, and assuming that the determination result is yes, at this time, the CPU1 selects, as the message transmission interval 3, a message transmission interval (i.e., 30ms, which can be understood as a message transmission interval closest to 33 ms) that is smaller than 33ms and has the smallest absolute value of the difference value from 33ms, from all message transmission intervals (i.e., 10ms, 20ms, 30ms, and 40 ms) supported by the NP 1.
Next, the CPU1 generates session information 1 including at least a message transmission interval 1 (i.e., 33 ms), a message transmission interval 3 (i.e., 30 ms), and a session timeout time 1 (e.g., 99ms,3 times the message transmission interval 1) calculated by the CPU based on the message transmission interval 1, and transmits a BFD message 2 having the state INIT and carrying the message transmission interval 1 to the routing device 2.
Finally, when the state of the BFD session 1 is UP, the CPU1 sends session information 1 to the NP1 in the routing apparatus 1, so that the NP1 sends, to the routing apparatus 2, a BFD packet 2 having UP and carrying a packet sending interval 1 (i.e., 33 ms) at a third packet sending interval 3 (i.e., 30 ms), and subsequently, if the BFD packet 1 having UP sent by the routing apparatus 2 is not received when the session timeout time 1 (i.e., 99 ms) arrives, a failure notification message is reported to the CPU 1.
As can be seen from the above technical solutions, in the embodiments of the present application, for a CPU in a routing device, when a first BFD packet sent by an opposite-end routing device and aiming at a target BFD session is received and the state of the target BFD session is DOWN and the first BFD packet carries a first packet sending interval, and the second packet sending interval of a locally configured second BFD packet corresponding to the target BFD session is smaller than the first packet sending interval, once it is determined that the first packet sending interval is not the packet sending interval supported by an NP corresponding to the target BFD session in the routing device, the CPU does not directly send the corresponding second BFD packet according to the first packet sending interval, but further determines whether the current BFD session load value of the CPU reaches a set threshold, and if the determination result is yes, the corresponding BFD packet is still sent by the corresponding NP according to the packet sending interval selected by the CPU, so that the CPU needs to process a large number of BFD sessions can be avoided, and the problem of lost packets of related BFD packets and related BFD sessions are avoided.
Based on the same inventive concept, the application also provides a message processing device, which is applied to a CPU in the routing equipment, and the structural schematic diagram of the device is shown in fig. 2, and specifically comprises:
a receiving module 21, configured to receive a first BFD packet sent by an opposite-end routing device for a target BFD session, where the first BFD packet carries a first packet sending interval;
a first judging module 22, configured to judge whether the first packet transmission interval is an NP-supported packet transmission interval corresponding to the target BFD session in the routing device if the second packet transmission interval of the second BFD packet corresponding to the target BFD session configured locally is smaller than the first packet transmission interval;
a second judging module 23, configured to further judge whether a current BFD session load value of the CPU reaches a set threshold when the judging result of the first judging module 22 is no;
a selecting module 24, configured to select, when the determination result of the second determining module 23 is yes, a third packet sending interval that meets a preset condition from all packet sending intervals supported by the NP, where the current BFD session load value is a number of third BFD packets received by the CPU within a set period of time before the CPU receives the first BFD packet, and the third packet sending interval is smaller than the first packet sending interval;
a first sending module 25, configured to generate first session information including at least the first packet sending interval, the third packet sending interval, and a first session timeout time calculated by the CPU based on the first packet sending interval, and send, to the peer routing device, a second BFD packet having an INIT state and carrying the first packet sending interval;
and the second sending module 26 is configured to send the first session information to the NP when the state of the target BFD session is an UP state, so that the NP sends, according to the third packet sending interval, a second BFD packet that is UP and carries the first packet sending interval, to the peer routing device.
Preferably, the apparatus further comprises:
a third sending module (not shown in fig. 2), configured to, after the receiving module 21 receives the first BFD packet, generate second session information including at least the second packet sending interval and a second session timeout time calculated by the CPU based on the second packet sending interval if the second packet sending interval is not less than the first packet sending interval, and send a second BFD packet having an INIT state and carrying the second packet sending interval to the peer routing device;
and a fourth sending module (not shown in fig. 2), configured to send the second session information to the NP when the state of the target BFD session is an UP state, so that the NP sends, to the peer routing device, a second BFD packet that is in an UP state and carries the second packet sending interval according to the second packet sending interval.
Preferably, the apparatus further comprises:
a fifth sending module (not shown in fig. 2), configured to generate third session information at least including the first packet sending interval and the first session timeout period when the determination result of the first determining module 22 is yes, and send a second BFD packet with the state of INIT and carrying the first packet sending interval to the peer routing device;
and a sixth sending module (not shown in fig. 2), configured to send the third session information to the NP when the state of the target BFD session is an UP state, so that the NP sends, according to the first packet sending interval, a second BFD packet that is in an UP state and carries the first packet sending interval to the peer routing device.
Preferably, the apparatus further comprises:
a seventh sending module (not shown in fig. 2) configured to send, when the determination result of the second determining module 23 is no, a second BFD packet having an INIT state and carrying the first packet sending interval to the peer routing device;
and an eighth sending module (not shown in fig. 2) configured to send, when the state of the target BFD session is an UP state, a second BFD packet that is in an UP state and carries the first packet sending interval to the peer routing device according to the first packet sending interval.
Preferably, the selection module 24 is specifically configured to:
and selecting a message sending interval which is smaller than the first message sending interval and has the smallest absolute value of the difference value between the first message sending interval and the first message sending interval from all message sending intervals supported by the NP, and taking the message sending interval as a third message sending interval.
As can be seen from the above technical solutions, in the embodiments of the present application, for a CPU in a routing device, when a first BFD packet sent by an opposite-end routing device and aiming at a target BFD session is received and the state of the target BFD session is DOWN and the first BFD packet carries a first packet sending interval, and the second packet sending interval of a locally configured second BFD packet corresponding to the target BFD session is smaller than the first packet sending interval, once it is determined that the first packet sending interval is not the packet sending interval supported by an NP corresponding to the target BFD session in the routing device, the CPU does not directly send the corresponding second BFD packet according to the first packet sending interval, but further determines whether the current BFD session load value of the CPU reaches a set threshold, and if the determination result is yes, the corresponding BFD packet is still sent by the corresponding NP according to the packet sending interval selected by the CPU, so that the CPU needs to process a large number of BFD sessions can be avoided, and the problem of lost packets of related BFD packets and related BFD sessions are avoided.
The foregoing description of the preferred embodiments of the application is not intended to be limiting, but rather to enable any modification, equivalent replacement, improvement or the like to be made within the spirit and principles of the application.

Claims (10)

1. A method for processing a message, wherein the method is applied to a CPU in a routing device, the method comprising:
receiving a first BFD message which is sent by opposite-end routing equipment and is not ready for DOWN aiming at a target Bidirectional Forwarding Detection (BFD) session, wherein the first BFD message carries a first message sending interval;
if the second message sending interval of the second BFD message corresponding to the target BFD session configured locally is smaller than the first message sending interval, judging whether the first message sending interval is a message sending interval supported by a network processor NP corresponding to the target BFD session in the routing equipment;
if the judging result is no, further judging whether the current BFD session load value of the CPU reaches a set threshold value, and if the judging result is yes, selecting a third message sending interval meeting a preset condition from all message sending intervals supported by the NP, wherein the current BFD session load value is the number value of third BFD messages received by the CPU in a set time before the CPU receives the first BFD messages, and the third message sending interval is smaller than the first message sending interval;
generating first session information at least comprising the first message sending interval, the third message sending interval and a first session timeout time calculated by the CPU based on the first message sending interval, and sending a second BFD message which is ready INIT and carries the first message sending interval to the opposite-end routing equipment;
and when the state of the target BFD session is the established UP state, sending the first session information to the NP so that the NP sends a second BFD message which is in the UP state and carries the first message sending interval to the opposite-end routing equipment according to the third message sending interval.
2. The method according to claim 1, wherein the method further comprises:
after receiving the first BFD message, if the second message sending interval is not less than the first message sending interval, generating second session information at least comprising the second message sending interval and a second session timeout time calculated by the CPU based on the second message sending interval, and sending a second BFD message which is INIT in a state and carries the second message sending interval to the opposite-end routing equipment;
and when the state of the target BFD session is the UP state, sending the second session information to the NP so that the NP sends a second BFD message which is in the UP state and carries the second message sending interval to the opposite-end routing equipment according to the second message sending interval.
3. The method according to claim 1, wherein the method further comprises:
after judging whether the first message sending interval is a message sending interval supported by any NP in the routing equipment, if so, generating third session information at least comprising the first message sending interval and the first session timeout time, and sending a second BFD message which is in INIT and carries the first message sending interval to the opposite-end routing equipment;
and when the state of the target BFD session is an UP state, sending the third session information to the NP so that the NP sends a second BFD message which is in the UP state and carries the first message sending interval to the opposite-end routing equipment according to the first message sending interval.
4. The method according to claim 1, wherein the method further comprises:
after judging whether the current BFD session load value of the CPU reaches a set threshold value, if not, sending a second BFD message which is in INIT state and carries the first message sending interval to the opposite-end routing equipment;
and when the state of the target BFD session is the UP state, sending a second BFD message which is in the UP state and carries the first message sending interval to the opposite-end routing equipment according to the first message sending interval.
5. The method of claim 1, wherein selecting a third message transmission interval satisfying a preset condition from all message transmission intervals supported by the NP specifically includes:
and selecting a message sending interval which is smaller than the first message sending interval and has the smallest absolute value of the difference value between the first message sending interval and the first message sending interval from all message sending intervals supported by the NP, and taking the message sending interval as a third message sending interval.
6. A message processing apparatus, wherein the apparatus is applied to a CPU in a routing device, the apparatus comprising:
a receiving module, configured to receive a first BFD packet sent by an opposite-end routing device for a target bidirectional forwarding detection BFD session, where the first BFD packet has a first packet sending interval;
a first judging module, configured to judge whether a second message sending interval of a second BFD message corresponding to the target BFD session configured locally is a message sending interval supported by a network processor NP corresponding to the target BFD session in the routing device, if the second message sending interval is smaller than the first message sending interval;
the second judging module is used for further judging whether the current BFD session load value of the CPU reaches a set threshold value or not when the judging result of the first judging module is negative;
the selecting module is configured to select, when the determination result of the second determining module is yes, a third packet sending interval that meets a preset condition from all packet sending intervals supported by the NP, where the current BFD session load value is a number value of third BFD packets received by the CPU within a set period of time before the CPU receives the first BFD packet, and the third packet sending interval is smaller than the first packet sending interval;
a first sending module, configured to generate first session information at least including the first packet sending interval, the third packet sending interval, and a first session timeout time calculated by the CPU based on the first packet sending interval, and send, to the peer routing device, a second BFD packet having a ready INIT and carrying the first packet sending interval;
and the second sending module is used for sending the first session information to the NP when the state of the target BFD session is an established UP state, so that the NP sends a second BFD message which is in the UP state and carries the first message sending interval to the opposite-end routing equipment according to the third message sending interval.
7. The apparatus of claim 6, wherein the apparatus further comprises:
a third sending module, configured to generate, after the receiving module receives the first BFD packet, second session information including at least the second packet sending interval and a second session timeout time calculated by the CPU based on the second packet sending interval if the second packet sending interval is not less than the first packet sending interval, and send, to the opposite-end routing device, a second BFD packet in which a state is INIT and the second packet sending interval is carried;
and a fourth sending module, configured to send the second session information to the NP when the state of the target BFD session is an UP state, so that the NP sends, to the peer routing device, a second BFD packet that is in an UP state and carries the second packet sending interval according to the second packet sending interval.
8. The apparatus of claim 6, wherein the apparatus further comprises:
a fifth sending module, configured to generate third session information at least including the first packet sending interval and the first session timeout time when the determination result of the first determining module is yes, and send a second BFD packet with the state of INIT and carrying the first packet sending interval to the opposite end routing device;
and a sixth sending module, configured to send the third session information to the NP when the state of the target BFD session is an UP state, so that the NP sends, according to the first packet sending interval, a second BFD packet that is in an UP state and carries the first packet sending interval, to the peer routing device.
9. The apparatus of claim 6, wherein the apparatus further comprises:
a seventh sending module, configured to send, when the determination result of the second determining module is no, a second BFD packet having an INIT state and carrying the first packet sending interval to the peer routing device;
and an eighth sending module, configured to send, when the state of the target BFD session is an UP state, a second BFD packet that is in an UP state and carries the first packet sending interval to the peer routing device according to the first packet sending interval.
10. The apparatus of claim 6, wherein the selection module is specifically configured to:
and selecting a message sending interval which is smaller than the first message sending interval and has the smallest absolute value of the difference value between the first message sending interval and the first message sending interval from all message sending intervals supported by the NP, and taking the message sending interval as a third message sending interval.
CN202210014026.6A 2022-01-06 2022-01-06 Message processing method and device Active CN114513433B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210014026.6A CN114513433B (en) 2022-01-06 2022-01-06 Message processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210014026.6A CN114513433B (en) 2022-01-06 2022-01-06 Message processing method and device

Publications (2)

Publication Number Publication Date
CN114513433A CN114513433A (en) 2022-05-17
CN114513433B true CN114513433B (en) 2023-10-24

Family

ID=81550604

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210014026.6A Active CN114513433B (en) 2022-01-06 2022-01-06 Message processing method and device

Country Status (1)

Country Link
CN (1) CN114513433B (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101237452A (en) * 2008-02-20 2008-08-06 杭州华三通信技术有限公司 Transmission method, system and device for bidirectional forward detection report
CN101800677A (en) * 2010-02-24 2010-08-11 中兴通讯股份有限公司 Processing device and method of bidirectional forwarding detection (BFD) messages
CN112448877A (en) * 2019-09-05 2021-03-05 华为技术有限公司 SBFD session establishment method, device and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7978614B2 (en) * 2007-01-11 2011-07-12 Foundry Network, LLC Techniques for detecting non-receipt of fault detection protocol packets
US9485175B2 (en) * 2014-08-04 2016-11-01 Ciena Corporation Continuity check protocol optimization systems and methods

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101237452A (en) * 2008-02-20 2008-08-06 杭州华三通信技术有限公司 Transmission method, system and device for bidirectional forward detection report
CN101800677A (en) * 2010-02-24 2010-08-11 中兴通讯股份有限公司 Processing device and method of bidirectional forwarding detection (BFD) messages
CN112448877A (en) * 2019-09-05 2021-03-05 华为技术有限公司 SBFD session establishment method, device and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ASIC芯片中BFD定时器协商机制改进设计与实现;蒋建锋;蒋建峰;孙金霞;;软件导刊(第08期);全文 *
S. Aldrin ; Google, Inc. ; C. Pignataro ; Cisco ; G. Mirsky ; Ericsson ; N. Kumar ; Cisco ; .Seamless Bidirectional Forwarding Detection (S-BFD) Use Cases.IETF .2016,全文. *

Also Published As

Publication number Publication date
CN114513433A (en) 2022-05-17

Similar Documents

Publication Publication Date Title
EP3824599B1 (en) Fault detection methods
EP2187565B1 (en) Detecting and processing method and device of node fault within a peer-to-peer network
US8902762B2 (en) Troubleshooting method and apparatus
EP2361468B1 (en) Congestion control method and devices
CN102480753B (en) Link state detection method and device
JP5088239B2 (en) Congestion control system, boundary gateway device, and congestion control method used therefor
WO2008148334A1 (en) Method, system and apparatus thereof for detecting abnormal receipt of message
US20090003241A1 (en) A Method and System For Obtaining Path Maximum Transfer Unit in Network
CN110908872B (en) Method and system for detecting server state
US7472200B1 (en) Arrangement in a multi-homed transport endpoint for selecting a source address based on source-destination address pair metrics
EP2509260A1 (en) Method, apparatus and communication system for protecting signaling transmission
US8477655B2 (en) Method, device, and system for establishing label switching path in fast rerouting switching
CN112104557B (en) Method and device for detecting link
EP3001615A1 (en) Bit error rate detecting method and network device
CN111447101A (en) Link detection method and device, computer equipment and storage medium
CN104852809A (en) Method and system for processing SD (signal degradation) fault
CN101640672A (en) Internet protocol network fault location test method, system and device
CN114513433B (en) Message processing method and device
CN108259254B (en) Path quality detection method and network equipment
CN112714060A (en) Link detection method and device
CN106301835B (en) BFD link establishing method and device and router
CN106789639B (en) Message processing method and device
EP2030379B1 (en) Efficient restoration of connections in communication networks having an ip-based control plane
US20110216668A1 (en) Node apparatus, route control method, route computation system, and route computation apparatus
CN102752206B (en) A kind of bidirectional forwarding detection (BFD) method and routing forwarding equipment

Legal Events

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