CN114513433A - Message processing method and device - Google Patents

Message processing method and device Download PDF

Info

Publication number
CN114513433A
CN114513433A CN202210014026.6A CN202210014026A CN114513433A CN 114513433 A CN114513433 A CN 114513433A CN 202210014026 A CN202210014026 A CN 202210014026A CN 114513433 A CN114513433 A CN 114513433A
Authority
CN
China
Prior art keywords
bfd
message
packet
interval
sending 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.)
Granted
Application number
CN202210014026.6A
Other languages
Chinese (zh)
Other versions
CN114513433B (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

Images

Classifications

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

Landscapes

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

Abstract

The application provides a message processing method and device. The method is applied to a CPU in the routing equipment and comprises the following steps: receiving a first BFD message which is sent by opposite-end routing equipment, has a DOWN state aiming at a target BFD session and carries a first message sending interval; 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 a message sending interval supported by the NP 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 an UP state, transmitting the session information to the NP, and transmitting a related second BFD message to opposite-end routing equipment by the NP according to a third message transmission interval. The BFD session oscillation can be avoided.

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 packet.
Background
Bidirectional Forwarding Detection (BFD) is a general, standardized, media independent, and protocol independent fast failure Detection mechanism, and is used to detect link connectivity status in an IP network, and ensure that communication failures can be detected quickly between network devices, so as to take relevant measures in time and ensure continuous operation of services. BFD may quickly detect a failure of a bidirectional forwarding path 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 detection.
Under the condition that the network device is a routing device, thousands or even tens of thousands of BFD sessions often need to be maintained, and the message sending interval of a BFD message corresponding to each BFD session is usually between 10ms and 100ms, if a Central Processing Unit (CPU) in the routing device processes the BFD sessions in a conventional manner, a large number of BFD sessions cannot be processed at a short message sending interval due to the limited message Processing performance of the CPU.
Therefore, currently, after acquiring a first packet transmission interval of a BFD packet corresponding to any BFD session between the opposite-end routing device and the home-end routing device, a CPU in the routing device generally compares the first packet transmission interval with a second packet transmission interval of a locally configured BFD packet corresponding to the BFD session; 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 (NP) sends a corresponding BFD message to the opposite-end routing equipment according to the first message sending interval; judging whether the first message sending interval is a message sending interval supported by NP in the local end routing equipment or not under the condition that the comparison result is that the first message sending interval is smaller than the second message sending interval; if so, the corresponding NP sends a corresponding BFD message to the opposite-end routing equipment according to the first message sending interval; and if not, the CPU sends a corresponding BFD message 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 further, there occur problems of packet loss of related BFD messages and oscillation of related BFD sessions.
Disclosure of Invention
In order to overcome the problems in the related art, the application provides a message processing method and device.
According to a first aspect of an embodiment of the present application, a method for processing a packet is provided, where the method is applied to a CPU in a routing device, and the method includes:
receiving a first BFD message which is sent by opposite-end routing equipment and has a non-ready (DOWN) state aiming at a target BFD session, wherein the first BFD message carries a first message sending interval;
if a second message sending interval of a second BFD message corresponding to the locally configured target BFD session is smaller than the first message sending interval, judging whether the first message sending interval is a message sending interval supported by an NP corresponding to the target BFD session in the routing equipment;
if not, further judging whether the current BFD session load value of the CPU reaches a set threshold value, and if yes, selecting a third message transmission interval meeting a preset condition from all message transmission intervals supported by the NP, wherein the current BFD session load value is the quantity value of third BFD messages received by the CPU within a set time length before the first BFD messages are received, and the third message transmission interval is smaller than the first message transmission interval;
generating first session information at least comprising the first message sending interval, the third message sending interval and first session timeout calculated by the CPU based on the first message sending interval, and sending a second BFD message which is in a ready (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 an established (UP) state, sending the first session information to the NP so that the NP sends a second BFD message which is UP and carries the first message sending interval to the opposite end routing equipment according to the third message sending interval.
According to a second aspect of the embodiments of the present application, there is provided a packet processing apparatus, where the apparatus is applied to a CPU in a routing device, and the apparatus includes:
a receiving module, configured to receive a first BFD packet sent by an opposite-end routing device and in a DOWN state for a target BFD session, where the first BFD packet carries a first packet sending interval;
a first determining module, configured to determine whether a first packet sending interval is a packet sending interval supported by an NP corresponding to the target BFD session in the routing device, if a second packet sending interval of a second BFD packet corresponding to the locally configured target BFD session is smaller than the first packet 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;
a selecting module, configured to select a third packet transmission interval meeting a preset condition from all packet transmission intervals supported by the NP when a determination result of the second determining module is yes, where the current BFD session load value is a quantity value of third BFD packets received by the CPU within a set time period before the first BFD packet is received, and the third packet transmission interval is smaller than the first packet transmission interval;
a first sending module, configured to generate first session information that at least includes 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 that is in an INIT state and carries the first packet sending interval;
and a second sending module, 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, to the opposite-end routing device, a second BFD packet that is in an UP state and carries the first packet sending interval according to the third packet sending interval.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
in this embodiment, for a CPU in a routing device, when receiving a first BFD packet sent by an opposite-end routing device and directed to a target BFD session, where the state of the target BFD session is DOWN and carries a first packet transmission interval, and a second packet transmission interval of a second BFD packet corresponding to a locally configured target BFD session is smaller than the first packet transmission interval, once it is determined that the first packet transmission interval is not a packet transmission interval supported by an NP corresponding to the target BFD session in the routing device, the CPU does not directly send a corresponding second BFD packet according to the first packet transmission interval, but further determines whether a current BFD session load value of the CPU reaches a set threshold, and if the determination result is yes, the corresponding NP still sends a corresponding BFD packet according to a packet transmission interval selected by the CPU, so that a phenomenon that the CPU needs to process a large number of BFD sessions can be avoided, and further, the problems of packet loss of related BFD messages and oscillation of related BFD sessions are 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.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this application, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application.
Fig. 1 is a schematic flowchart 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 the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended 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 application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Next, examples of the present application will be described in detail.
An embodiment of the present application provides a packet processing method, which is applied to a CPU in a routing device, and as shown in fig. 1, the method may include the following steps:
s11, receiving a first BFD message which is sent by the opposite end routing equipment and aims at the state of the target bidirectional forwarding detection BFD conversation and is not ready DOWN.
In this step, the first BFD packet carries the first packet sending interval. Of course, the first BFD packet also carries other contents, which are all in the prior art, and are not listed here.
S12, if the second message sending interval of the second BFD message corresponding to the locally configured target BFD session is smaller than the first message sending interval, judging whether the first message sending interval is the message sending interval supported by the NP corresponding to the target BFD session in the routing equipment; if the determination result is no, step S13 is executed; if 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 step S14 to the step S15; if the determination result is yes, step S16 is executed.
In this step, the current BFD session load value is the quantity value of the third BFD packet received by the CPU within the set time period before the first BFD packet is received.
And S14, sending a second BFD message which is in an INIT state and carries the first message sending interval to opposite end routing equipment.
And S15, when the state of the target BFD session is UP, sending a second BFD message which is UP and carries the first message sending interval to the opposite end routing equipment according to the first message sending interval.
S16, selecting a third message transmission interval meeting the preset condition from all message transmission intervals supported by the NP.
In this step, the third message transmission interval is smaller than the first message transmission interval.
S17, generating first session information at least comprising a first message sending interval, a third message sending interval and first session timeout time calculated based on the first message sending interval, and sending a second BFD message which is in an INIT state and carries the first message sending interval to opposite-end routing equipment.
And S18, when the state of the target BFD session is UP, sending the first session information to the NP, so that the NP sends a second BFD message which is UP and carries the first message sending interval to the opposite end routing equipment according to the third message sending interval.
And S19, 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 an INIT state and carries the first message sending interval to the opposite-end routing equipment.
And S20, when the state of the target BFD session is UP, sending third session information to the NP, so that the NP sends a second BFD message which is UP and carries the first message sending interval to the opposite end routing equipment according to the first message sending interval.
In step S12, the target BFD session uniquely corresponds to one NP in the routing device, and the determination method of the NP corresponding to the target BFD session is the prior art and will not be described in detail herein. Here, other BFD sessions may also be associated with the NP corresponding to the target BFD session.
In step S13, the setting threshold and the setting time period are both set according to the actual requirement of the network where the routing device is located.
Specifically, in 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 following process may be performed:
and selecting the message sending interval which is smaller than the first message sending interval and has the smallest absolute value of the difference value with the first message sending interval from all the message sending intervals supported by the NP, and taking the selected message sending interval as a third message sending interval.
In the above step S17, the CPU may calculate the first session timeout time in an existing calculation manner. For example, the CPU calculates N times the first packet transmission interval, and takes the calculated result as the 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.
In step S17, the first session information may further include an IP address of the routing device, an IP address of the peer routing device, a Local identifier (LD) of the target BFD session, a Remote identifier (RD) of the target BFD session, and so on, which are not listed here.
After the step of sending the second BFD packet with the state of INIT and carrying the first packet sending interval to the peer routing device in step S17 is executed, the CPU executes the existing flow until the state of the target BFD session is the UP state. The specific process is as follows: the CPU receives a first BFD message which is sent by opposite-end equipment and has an INIT state and carries a first message sending interval; and finally, when receiving the first BFD message which is in the state of UP and carries the first message sending interval and is sent by the opposite terminal equipment, determining that the state of the target BFD session is in the state of UP.
It should be noted that after the CPU executes step S18, for the NP corresponding to the target BFD session, in addition to executing the step of sending the second BFD packet with the state UP and carrying the first packet sending interval to the peer routing device according to the third packet sending interval, the CPU may also monitor the first BFD packet with the state UP from the peer device according to the first session timeout time included in the first session information.
It should be further noted that, in this 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, second session information at least comprising the second message sending interval and second session timeout time calculated by the CPU based on the second message sending interval is generated, and a second BFD message which is in an INIT state and carries the second message sending interval is sent to the opposite-end routing equipment;
and when the state of the target BFD session is an UP state, sending second session information to the NP so that the NP sends a second BFD message which is UP and carries a second message sending interval to opposite-end routing equipment according to the second message sending interval.
The following describes the above message processing method in detail with reference to specific embodiments.
Assume that routing device 1 and routing device 2 in a certain network need to establish 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 device 2 is 33ms, and the message sending intervals supported by all NPs in the routing device 2 are 11ms, 22ms, 33ms, and 44 ms; the message sending 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 the message sending intervals supported by all NPs in the routing device 1 are 10ms, 20ms, 30ms, and 40 ms.
Assume that the CPU1 in the routing device 1 receives a BFD packet 1 which is sent by the routing device 2 and has a state of DOWN for the BFD session 1 and carries a packet sending interval 1.
The CPU1 finds that the messaging interval 2 is smaller than the messaging interval 1, and at this time, the CPU1 determines whether the messaging interval 1 is supported by an NP (e.g., NP1) corresponding to the BFD session 1 in the routing device 1.
Since the message transmission intervals supported by the NP1 are all 10ms, 20ms, 30ms, and 40ms, the determination result is no, and in this case, the CPU1 further determines whether the current BFD session load value of the CPU reaches the set threshold.
Assume that the current BFD session load value is the quantity value of BFD packets received by the CPU1 within 1 second before receiving the BFD packet 1 in the DOWN state sent by the routing device 2, and assume that the determination result is yes, at this time, the CPU1 selects, as the packet transmission interval 3, a packet transmission interval smaller than 33ms and having the smallest absolute value of the difference from 33ms (i.e., 30ms, which can be understood as the packet transmission interval closest to 33ms) from all the packet transmission intervals (i.e., 10ms, 20ms, 30ms, and 40ms) supported by the NP 1.
Next, the CPU1 generates session information 1 including at least a packet transmission interval 1 (i.e., 33ms), a packet transmission interval 3 (i.e., 30ms), and a session timeout time 1 (e.g., 99ms, 3 times the packet transmission interval 1) calculated by the CPU based on the packet transmission interval 1, and transmits a BFD packet 2 in the state INIT and carrying the packet transmission interval 1 to the routing device 2.
Finally, when the state of the BFD session 1 is the UP state, the CPU1 sends the session information 1 to the NP1 in the routing device 1, so that the NP1 sends the BFD packet 2 with the UP state and carrying the packet sending interval 1 (i.e., 33ms) to the routing device 2 according to the third packet sending interval 3 (i.e., 30ms), and subsequently, if the BFD packet 1 with the UP state sent by the routing device 2 is not received when the session timeout time 1 (i.e., 99ms) arrives, reports the failure notification message to the CPU 1.
As can be seen from the above technical solutions, in the embodiment of the present application, for a CPU in a routing device, when receiving a first BFD packet sent by an opposite-end routing device and having a DOWN state for a target BFD session and carrying a first BFD packet with a first packet sending interval, and a second packet sending interval of a second BFD packet corresponding to the locally configured target BFD session is smaller than the first packet sending interval, once it is determined that the first packet sending interval is not a 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 a current BFD session load value of the CPU reaches a set threshold, and in case that the determination result is yes, the corresponding NP still sends the corresponding BFD packet according to the packet sending interval selected by the CPU, and thus, the phenomenon that a CPU needs to process a large number of BFD sessions can be avoided, and the problems of packet loss of related BFD messages and oscillation of related BFD sessions are further avoided.
Based on the same inventive concept, the present application further provides a packet processing apparatus, where the apparatus is applied to a CPU in a routing device, and a schematic structural diagram of the apparatus is shown in fig. 2, and specifically includes:
a receiving module 21, configured to receive a first BFD packet that is sent by an opposite-end routing device and is in a DOWN state for a target BFD session, where the first BFD packet carries a first packet sending interval;
a first determining module 22, configured to determine, if a second packet sending interval of a second BFD packet corresponding to the locally configured target BFD session is smaller than the first packet sending interval, whether the first packet sending interval is a packet sending interval supported by an NP corresponding to the target BFD session in the routing device;
a second judging module 23, configured to further judge whether the current BFD session load value of the CPU reaches a set threshold value when the judgment result of the first judging module 22 is negative;
a selecting module 24, configured to select, when the determination result of the second determining module 23 is yes, a third packet transmission interval that meets a preset condition from all packet transmission intervals supported by the NP, where the current BFD session load value is a quantity value of third BFD packets received by the CPU within a set time period before the first BFD packet is received, and the third packet transmission interval is smaller than the first packet transmission interval;
a first sending module 25, configured to generate first session information that at least includes 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 that is in an INIT state and carries the first packet sending interval;
a second sending module 26, 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, to the opposite-end routing device, a second BFD packet which is in an UP state and carries the first packet sending interval according to the third packet sending interval.
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, if the second packet sending interval is not smaller than the first packet sending interval, generate second session information that at least includes the second packet sending interval and a second session timeout time calculated by the CPU based on the second packet sending interval, and send, to the peer routing device, a second BFD packet that is in an INIT state and carries the second packet sending interval;
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 opposite-end routing device, a second BFD packet which 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 that at least includes the first packet sending interval and the first session timeout time when the determination result of the first determining module 22 is yes, and send, to the peer routing device, a second BFD packet that is in an INIT state and carries the first packet sending interval;
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, to the opposite-end routing device, a second BFD packet that is in an UP state and carries the first packet sending interval according to the first packet sending interval.
Preferably, the apparatus further comprises:
a seventh sending module (not shown in fig. 2), configured to send, to the opposite-end routing device, a second BFD packet that is in an INIT state and carries the first packet sending interval when the determination result of the second determining module 23 is negative;
an eighth sending module (not shown in fig. 2), configured to send, 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 opposite-end routing device when the state of the target BFD session is an UP state.
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 with the first message sending interval from all message sending intervals supported by the NP, and taking the selected message sending interval as a third message sending interval.
As can be seen from the above technical solutions, in the embodiment of the present application, for a CPU in a routing device, when receiving a first BFD packet sent by an opposite-end routing device and having a DOWN state for a target BFD session and carrying a first BFD packet with a first packet sending interval, and a second packet sending interval of a second BFD packet corresponding to the locally configured target BFD session is smaller than the first packet sending interval, once it is determined that the first packet sending interval is not a 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 a current BFD session load value of the CPU reaches a set threshold, and in case that the determination result is yes, the corresponding NP still sends the corresponding BFD packet according to the packet sending interval selected by the CPU, and thus, the phenomenon that a CPU needs to process a large number of BFD sessions can be avoided, and the problems of packet loss of related BFD messages and oscillation of related BFD sessions are further avoided.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (10)

1. A message processing method is applied to a CPU in a routing device, and is characterized in that the method comprises the following steps:
receiving a first BFD message which is sent by opposite-end routing equipment and aims at that the state of a target Bidirectional Forwarding Detection (BFD) session is not ready DOWN, 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 locally configured target BFD session is smaller than the first message sending interval, judging whether the first message sending interval is the message sending interval supported by a network processor NP corresponding to the target BFD session in the routing equipment;
if not, further judging whether the current BFD session load value of the CPU reaches a set threshold value, and if yes, selecting a third message transmission interval meeting a preset condition from all message transmission intervals supported by the NP, wherein the current BFD session load value is the quantity value of third BFD messages received by the CPU within a set time length before the first BFD messages are received, and the third message transmission interval is smaller than the first message transmission interval;
generating first session information at least comprising the first message sending interval, the third message sending interval and first session timeout calculated by the CPU based on the first message sending interval, and sending a second BFD message which is in a ready 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 established UP state, sending the first session information to the NP so that the NP sends a second BFD message which is in a 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 of claim 1, further comprising:
after receiving the first BFD message, 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 second session timeout time calculated by the CPU based on the second message sending interval, and sending a second BFD message which is in an INIT state and carries the second message sending interval to the opposite-end routing equipment;
and when the state of the target BFD session is an UP state, sending the second session information to the NP so that the NP sends a second BFD message which is in an 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 of claim 1, further comprising:
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 an 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 an UP state, sending the third session information to the NP so that the NP sends a second BFD message which is UP and carries the first message sending interval to the opposite end routing equipment according to the first message sending interval.
4. The method of claim 1, further comprising:
after judging whether the current BFD session load value of the CPU reaches a set threshold value, if the judgment result is negative, sending a second BFD message which is in an 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 an UP state, sending a second BFD message which is UP 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 packet transmission interval satisfying a predetermined condition from all the packet transmission intervals supported by the NP specifically comprises:
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 with the first message sending interval from all message sending intervals supported by the NP, and taking the selected 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, and the apparatus comprises:
a receiving module, configured to receive a first BFD packet sent by an opposite-end routing device and indicating that a target bidirectional forwarding detection BFD session is in an off-ready DOWN state, where the first BFD packet carries a first packet sending interval;
a first determining module, configured to determine, if a second packet transmission interval of a second BFD packet corresponding to the locally configured target BFD session is smaller than the first packet transmission interval, whether the first packet transmission interval is a packet transmission interval supported by a network processor NP corresponding to the target BFD session in the routing device;
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;
a selecting module, configured to select a third packet transmission interval meeting a preset condition from all packet transmission intervals supported by the NP when a determination result of the second determining module is yes, where the current BFD session load value is a quantity value of third BFD packets received by the CPU within a set time period before the first BFD packet is received, and the third packet transmission interval is smaller than the first packet transmission interval;
a first sending module, configured to generate first session information that at least includes 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 that is in a ready INIT state and carries the first packet sending interval;
and a second sending module, configured to send the first session information to the NP when the state of the target BFD session is the established UP state, so that the NP sends, to the opposite-end routing device, a second BFD packet that is in the UP state and carries the first packet sending interval according to the third packet sending interval.
7. The apparatus of claim 6, further comprising:
a third sending module, configured to, after the receiving module receives the first BFD packet, if the second packet sending interval is not smaller than the first packet sending interval, generate second session information that at least includes the second packet sending interval and a second session timeout calculated by the CPU based on the second packet sending interval, and send, to the peer routing device, a second BFD packet that is in an INIT state and carries the second packet sending interval;
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 opposite-end 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, further comprising:
a fifth sending module, configured to generate third session information that at least includes the first packet sending interval and the first session timeout time when the determination result of the first determining module is yes, and send, to the peer routing device, a second BFD packet that is in an INIT state and carries the first packet sending interval;
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, to the opposite-end routing device, a second BFD packet that is in an UP state and carries the first packet sending interval according to the first packet sending interval.
9. The apparatus of claim 6, further comprising:
a seventh sending module, configured to send, to the peer routing device, a second BFD packet that is in an INIT state and carries the first packet sending interval when the determination result of the second determining module is negative;
and an eighth sending module, configured to send, 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 opposite-end routing device when the state of the target BFD session is an UP state.
10. The apparatus according to 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 with the first message sending interval from all message sending intervals supported by the NP, and taking the selected 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 true CN114513433A (en) 2022-05-17
CN114513433B 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 (5)

* 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
US20090279541A1 (en) * 2007-01-11 2009-11-12 Foundry Networks, Inc. Techniques for detecting non-receipt of fault detection protocol packets
CN101800677A (en) * 2010-02-24 2010-08-11 中兴通讯股份有限公司 Processing device and method of bidirectional forwarding detection (BFD) messages
US20160036694A1 (en) * 2014-08-04 2016-02-04 Ciena Corporation Continuity check protocol optimization systems and methods
CN112448877A (en) * 2019-09-05 2021-03-05 华为技术有限公司 SBFD session establishment method, device and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090279541A1 (en) * 2007-01-11 2009-11-12 Foundry Networks, Inc. Techniques for detecting non-receipt of fault detection protocol packets
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
US20160036694A1 (en) * 2014-08-04 2016-02-04 Ciena Corporation Continuity check protocol optimization systems and methods
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
S. ALDRIN;GOOGLE, INC.; C. PIGNATARO;CISCO; G. MIRSKY;ERICSSON;N. KUMAR; CISCO;: "Seamless Bidirectional Forwarding Detection (S-BFD) Use Cases", IETF *
蒋建锋;蒋建峰;孙金霞;: "ASIC芯片中BFD定时器协商机制改进设计与实现", 软件导刊 *

Also Published As

Publication number Publication date
CN114513433B (en) 2023-10-24

Similar Documents

Publication Publication Date Title
US8902762B2 (en) Troubleshooting method and apparatus
EP2187565B1 (en) Detecting and processing method and device of node fault within a peer-to-peer network
US20110255410A1 (en) Congestion control method and devices
US20090003241A1 (en) A Method and System For Obtaining Path Maximum Transfer Unit in Network
CN110908872B (en) Method and system for detecting server state
CN101247321A (en) Method, device and system for routing diagnosis in network based on diameter protocol
US8477655B2 (en) Method, device, and system for establishing label switching path in fast rerouting switching
EP3001615A1 (en) Bit error rate detecting method and network device
US20230199534A1 (en) Service producer health-check
CN101808021A (en) Fault detection method, device and system, message statistical method and node equipment
CN104283711A (en) Fault detection method based on BFD, nodes and system
CN104852809A (en) Method and system for processing SD (signal degradation) fault
EP2129042B1 (en) A multicast network system, node and a method for detecting a fault of a multicast network link
CN106453074A (en) Switching method and apparatus
CN114172798B (en) BIER network fault detection method, device, equipment and readable storage medium
CN101420342A (en) Method, apparatus and system for positioning failure network
CN105703967B (en) Method and device for detecting connectivity of label switched path
CN114513433B (en) Message processing method and device
CN112714060B (en) Link detection method and device
CN108259254B (en) Path quality detection method and network equipment
CN108141406B (en) Method, device and equipment for processing service fault
CN106992878B (en) Multicast detection method and device
CN106789639B (en) Message processing method and device
CN105763409A (en) Flow forwarding method and device
US20120250497A1 (en) Methods for sending and processing an sip response

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