CN113992581B - Message processing method and device - Google Patents

Message processing method and device Download PDF

Info

Publication number
CN113992581B
CN113992581B CN202111090838.0A CN202111090838A CN113992581B CN 113992581 B CN113992581 B CN 113992581B CN 202111090838 A CN202111090838 A CN 202111090838A CN 113992581 B CN113992581 B CN 113992581B
Authority
CN
China
Prior art keywords
sbfd
detection
message
path information
network device
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
CN202111090838.0A
Other languages
Chinese (zh)
Other versions
CN113992581A (en
Inventor
荀硕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN202111090838.0A priority Critical patent/CN113992581B/en
Publication of CN113992581A publication Critical patent/CN113992581A/en
Application granted granted Critical
Publication of CN113992581B publication Critical patent/CN113992581B/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering

Abstract

The application provides a message processing method and a device, the method is applied to network equipment serving as an SBFD receiving terminal, and comprises the following steps: receiving an SBFD detection message sent by opposite-end network equipment serving as an SBFD sending end; when the SBFD probe message is the SBFD probe message received for the first time, acquiring path information carried in a designated field, recording the corresponding relation between the path information and an identifier and an IP address of opposite-end network equipment carried by the path information, generating an SBFD probe response message according to the path information, and returning the SBFD probe response message to the opposite-end network equipment; when the SBFD detection message is a non-first-received SBFD detection message, if the SBFD detection message does not carry the specified field, the path information corresponding to the identifier carried by the SBFD detection message is searched in the corresponding relation of the local record, and an SBFD detection response message is generated according to the searched path information and returned to the opposite-end network equipment. The method and the device can avoid path oscillation.

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
At present, when a network device detects whether a Segment Routing Traffic Engineering (SR-TE) tunnel or a Segment Routing Traffic Engineering (SRv 6) tunnel between the network device and an opposite-end network device fails by using a Seamless Bidirectional Forwarding Detection (SBFD) technology, the network device serves as an SBFD to send an SBFD Detection message to the opposite-end network device serving as an SBFD receiving end by using a Detection path, and after receiving the SBFD Detection message, a subsequent opposite-end network device searches for a relevant egress interface based on a local Routing table and returns an SBFD Detection response message to the network device through the found egress interface.
In the detection process, since the outbound interface found by the peer network device may not be the interface that receives the SBFD probe packet by itself, the probe path may be inconsistent with the backhaul path, and thus, when the probe path is normal but the backhaul path fails, path oscillation may occur, which causes unnecessary route convergence and affects network experience.
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 network device serving as an SBFD receiving end, and the method includes:
receiving an SBFD detection message which is sent by opposite-end network equipment serving as an SBFD sending end and is used for detecting whether a specified tunnel established between the network equipment and the opposite-end network equipment fails or not;
when the SBFD detection message is judged to be the SBFD detection message received for the first time, acquiring path information included in a designated field carried in the SBFD detection message, recording the corresponding relation between the path information and a local identifier and a source IP address carried in the SBFD detection message, generating an SBFD detection response message according to the path information, and returning the SBFD detection response message to the opposite-end network equipment, wherein the path information is the path information of a return route corresponding to a detection path used when the opposite-end network equipment sends the SBFD detection message;
when the SBFD probe message is judged to be the SBFD probe message which is not received for the first time, if the SBFD probe message does not carry the specified field, the path information corresponding to the identifier carried in the SBFD probe message is searched in the corresponding relation between the path information recorded locally and the local identifier and the source IP address, and an SBFD probe response message is generated according to the searched path information and returned to the opposite-end network device.
According to a second aspect of the embodiments of the present application, there is provided a packet processing method, where the method is applied to a network device serving as an SBFD transmitting end, and the method includes:
when whether a specified tunnel established between the network equipment and opposite-end network equipment serving as an SBFD receiving end fails needs to be detected for the first time, generating a first SBFD probe message, wherein specified fields carried in the first SBFD probe message comprise path information of a backhaul path corresponding to a probe path used when the network equipment needs to send the first SBFD probe message;
using the detection path, sending the first SBFD detection message to the peer network device, so that when the peer network device determines that the first SBFD detection message is a first received SBFD detection message, the peer network device obtains the path information included in the specified field carried in the first SBFD detection message, records a correspondence between the path information and a local identifier and a source IP address carried in the first SBFD detection message, generates a first SBFD detection response message according to the path information, and returns the first SBFD detection response message to the network device;
after receiving a first SBFD detection response message returned by the opposite-end network equipment, if it is required to continuously detect whether the specified tunnel has a fault and the detection path does not need to be changed, generating a second SBFD detection message, wherein the specified field is not carried in the second SBFD detection message;
and sending the second SBFD detection message to the opposite-end network equipment by using the detection path, so that the opposite-end network equipment searches the local identifier carried in the second SBFD detection message and the path information corresponding to the source IP address in the corresponding relation of the path information, the local identifier and the source IP address when judging that the second SBFD detection message is the SBFD detection message which is not received for the first time and does not carry the specified field, generates a second SBFD detection response message according to the searched path information, and returns the second SBFD detection response message to the network equipment.
According to a third aspect of the embodiments of the present application, there is provided a packet processing apparatus, where the apparatus is applied to a network device serving as an SBFD receiving end, and the apparatus includes:
a receiving module, configured to receive an SBFD detection packet sent by an opposite-end network device serving as an SBFD sending end, where the SBFD detection packet is used to detect whether a specified tunnel established between the network device and the opposite-end network device fails;
a first response module, configured to, when determining that the SBFD detection message is a first received SBFD detection message, obtain path information included in a specified field carried in the SBFD detection message, record a correspondence between the path information and a local identifier and a source IP address carried in the SBFD detection message, generate an SBFD detection response message according to the path information, and return the SBFD detection response message to the peer network device, where the path information is path information of a backhaul path corresponding to a detection path used by the peer network device when sending the SBFD detection message;
and the second response module is configured to, when it is determined that the SBFD detection message is a non-first-received SBFD detection message, if the SBFD detection message does not carry the specified field, search for the local identifier carried in the SBFD detection message and the path information corresponding to the source IP address in the correspondence between the locally-recorded path information and the local identifier and the source IP address, generate an SBFD detection response message according to the searched path information, and return the SBFD detection response message to the peer network device.
According to a fourth aspect of the embodiments of the present application, there is provided a packet processing apparatus, where the apparatus is applied to a network device serving as an SBFD transmitting end, and the apparatus includes:
a first generating module, configured to generate a first SBFD probe packet when it is first required to detect whether a specified tunnel established between the network device and an opposite-end network device serving as an SBFD receiving end fails, where a specified field carried in the first SBFD probe packet includes path information of a backhaul path corresponding to a probe path used by the network device when the network device needs to send the first SBFD probe packet;
a first sending module, configured to send the first SBFD detection packet to the peer network device by using the detection path, so that when the peer network device determines that the first SBFD detection packet is a first received SBFD detection packet, the peer network device obtains the path information included in the specified field carried in the first SBFD detection packet, records a correspondence between the path information and a local identifier and a source IP address carried in the first SBFD detection packet, generates a first SBFD detection response packet according to the path information, and returns the first SBFD detection response packet to the network device;
a second generating module, configured to, after receiving a first SBFD detection response message returned by the peer network device, if it is necessary to continue to detect whether the specified tunnel fails and it is not necessary to change the detection path, generate a second SBFD detection message, where the second SBFD detection message does not carry the specified field;
a second sending module, configured to send the second SBFD detection packet to the peer network device by using the detection path, so that the peer network device searches, in a correspondence between path information recorded locally and a local identifier and a source IP address, for path information corresponding to the local identifier and the source IP address carried in the second SBFD detection packet when determining that the second SBFD detection packet is a non-first-received SBFD detection packet and does not carry the specified field, generates a second SBFD detection response packet according to the found path information, and returns the second SBFD detection response packet to the network device.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
in this embodiment, for a network device serving as an SBFD sending end, when it is first required to detect whether a specified tunnel established between the network device and an opposite-end network device serving as an SBFD receiving end fails, an SBFD probe packet carrying a specified field is sent to the opposite-end network device, where the specified field includes path information of a backhaul path corresponding to a probe path used by the network device when sending the SBFD probe packet, so that, after the opposite-end network device first receives the SBFD probe packet, the path information is obtained, a correspondence between the path information and a local identifier (i.e., an identifier of the network device) carried in the SBFD probe packet and a source IP address is recorded, and then an SBFD probe response packet is generated according to the path information and returned to the network device.
After receiving the SBFD detection response message returned by the peer network device, the subsequent network device sends an SBFD detection message not carrying a specified field to the peer network device as soon as it needs to continuously detect whether the specified tunnel fails and does not need to change the detection path, so that the peer network device finds that the SBFD detection message does not carry the specified field when receiving the SBFD detection message, searches for the local identifier carried in the SBFD detection message and the path information corresponding to the source IP address in the correspondence between the locally recorded path information and the local identifier and the source IP address, generates an SBFD detection response message again according to the found path information, and returns the SBFD detection response message to the network device.
Therefore, in the interaction process between the network device and the opposite-end network device, the backhaul path of the SBFD detection response message returned by the opposite-end network device is always consistent with the detection path of the SBFD detection message sent by the network device, no path oscillation occurs, and unnecessary route convergence is not caused, thereby improving network experience.
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 disclosure;
fig. 2 is a second schematic flowchart of a message processing method according to an embodiment of the present application;
fig. 3 is a schematic diagram of a format of an SBFD probe packet according to an embodiment of the present disclosure;
fig. 4 is a schematic content diagram of a TLV field provided in an embodiment of the present application;
fig. 5 is a schematic structural diagram of a message processing apparatus according to an embodiment of the present application;
fig. 6 is a second schematic structural diagram of a message processing apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device 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 implementations described in the following exemplary examples do not represent all implementations 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" \8230; "or" when 8230; \8230; "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 message processing method, which is applied to a network device serving as an SBFD receiving end, and as shown in fig. 1, the method may include the following steps:
s11, receiving an SBFD detection message which is sent by opposite-end network equipment serving as an SBFD sending end and is used for detecting whether a specified tunnel established between the network equipment and the opposite-end network equipment has a fault.
S12, when the SBFD detection message is judged to be the SBFD detection message received for the first time, the path information included in the appointed field carried in the SBFD detection message is obtained, the corresponding relation between the path information and the local identifier and the source IP address carried in the SBFD detection message is recorded, an SBFD detection response message is generated according to the path information, and the SBFD detection response message is returned to the opposite-end network equipment.
In this step, the path information is path information of a backhaul path corresponding to a detection path used when the opposite-end network device sends the SBFD detection packet.
S13, when the SBFD detection message is judged to be the SBFD detection message which is not received for the first time, if the SBFD detection message does not carry the specified field, the local identifier carried in the SBFD detection message and the path information corresponding to the source IP address are searched in the corresponding relation between the path information recorded locally and the local identifier and the source IP address, and an SBFD detection response message is generated according to the searched path information and returned to the opposite-end network device.
It should be noted that, the SBFD probe message in step S11 may be generated and sent by an opposite network device serving as an SBFD sending end under the following several conditions:
the first case: whether a specified tunnel established between the network device and the network device fails needs to be detected for the first time.
In a first situation, the opposite-end network device generates an SBFD probe packet carrying a specified field, where the specified field includes path information of a backhaul path corresponding to a probe path used by the opposite-end network device when the opposite-end network device needs to send the SBFD probe packet generated in this situation; then, the peer network device sends the SBFD probe message generated under the condition to the network device by using the probe path, so that the network device executes the step S12, so that the backhaul path of the network device returning the SBFD probe response message is consistent with the probe path of the peer network device sending the SBFD probe message.
The second case: after the SBFD detection response message sent by the network device is received for the first time, it is necessary to detect whether the specified tunnel fails and change the detection path is not needed.
Under the second condition, the opposite-end network equipment generates an SBFD detection message which does not carry a specified field so as to accelerate the message processing speed; then, the opposite-end network device sends the SBFD probe message generated under the condition to the network device by using the probe path, and after receiving the SBFD probe message under the condition, the subsequent network device may execute step S13, so that the backhaul path of the network device returning the SBFD probe response message is consistent with the probe path of the opposite-end network device sending the SBFD probe message.
The third situation: after the SBFD probe response message sent by the network device is received for the first time, it needs to detect whether the specified tunnel fails and a probe path needs to be changed.
In a third situation, the opposite-end network device generates an SBFD probe packet carrying a specified field, where the specified field in the SBFD probe packet in this situation includes path information of a backhaul path corresponding to a modified probe path used when the opposite-end network device needs to send the SBFD probe packet generated in this situation; then, the network device at the opposite end uses the changed detection path to send the SBFD detection message generated under the condition to the network device.
After receiving the SBFD probe message under such a situation, the subsequent network device, when determining that the SBFD probe message is not a first received SBFD probe message and carries a specified field, obtains path information included in the specified field, and updates the path information corresponding to the local identifier and the source IP address carried in the SBFD probe message in the correspondence between the locally recorded path information and the local identifier and the source IP address to the obtained path information; and generating an SBFD detection response message according to the acquired path information, and returning the SBFD detection response message to the opposite-end network equipment.
It should be further noted that, in any of the above situations, the peer network device may determine when it needs to detect whether the specified tunnel fails by using an existing determination method. For example, the peer network device may determine and the like based on the detection period set for the above-described specified tunnel. Here, the detection period may be set according to an actual situation of the network in which the network device is located.
In any of the above cases, the designated tunnels may be SR-TE tunnels or SRv6 tunnels.
In addition, in the first and third cases, when the designated tunnel is an SR-TE tunnel, the path information included in the designated field may include Multiprotocol Label Switching (MPLS) Label information.
When the designated tunnel is an SRv6 tunnel, the path information in the designated field may include Segment Identifier (SID) list information.
In either the first case or the third case, the designated field may be a newly added Tag Length Value (TLV) field and may include a Type (Type) field, a Length (Length) field, and a Value (Value) field. Wherein, the Value field is used for storing path information; the Type field is used for storing the information Type to which the path information belongs, and can be customized according to actual requirements, for example, when the content in the Type field is xC1, the Type field represents that the path information stored in the Value field is MPLS label information; the Length field is used to store the Length of the path information.
An embodiment of the present application further provides a message processing method, where the method is applied to a transmitting end as an SBFD, and as shown in fig. 2, the method may include the following steps:
s21, when whether a specified tunnel established between the network equipment and the opposite terminal network equipment serving as the SBFD receiving terminal is in fault needs to be detected for the first time, a first SBFD detection message is generated.
In this step, the specified field carried in the first SBFD probing message includes path information of a backhaul path corresponding to a probing path used by the network device when the network device needs to send the first SBFD probing message.
S22, a detection path is used for sending a first SBFD detection message to opposite-end network equipment, so that when the opposite-end network equipment judges that the first SBFD detection message is the SBFD detection message received for the first time, path information contained in a specified field carried in the first SBFD detection message is obtained, the corresponding relation between the path information and a local identifier and a source IP address carried in the first SBFD detection message is recorded, and a first SBFD detection response message is generated according to the path information and is returned to the network equipment.
S23, after receiving a first SBFD detection response message returned by the opposite-end network equipment, if the specified tunnel needs to be continuously detected whether to have a fault and the detection path does not need to be changed, generating a second SBFD detection message.
In this step, the second SBFD probing message does not carry a specific field.
S24, a detection path is used for sending a second SBFD detection message to the opposite terminal network equipment, so that when the opposite terminal network equipment judges that the second SBFD detection message is a non-first-received SBFD detection message and does not carry a specified field, the opposite terminal network equipment searches the path information corresponding to the identifier carried in the second SBFD detection message in the corresponding relation between the locally-recorded path information and the local identifier and the source IP address, generates a second SBFD detection response message according to the searched path information, and returns the second SBFD detection response message to the network equipment.
Further, in this embodiment of the present application, the network device may further perform the following operations:
after receiving a first SBFD detection response message returned by an opposite-end network device, if whether a specified tunnel fails or not needs to be detected continuously and a detection path needs to be changed, generating a third SBFD detection message, wherein a specified field carried in the third SBFD detection message comprises path information of a return path corresponding to the changed detection path used when the network device needs to send the third SBFD detection message;
using the changed detection path, sending a third SBFD detection message to the opposite-end network equipment, so that the opposite-end network equipment acquires path information included in a designated field when judging that the third SBFD detection message is a non-first-received SBFD detection message and carries the designated field, and updating a local identifier carried in the SBFD detection message in a corresponding relation and the path information corresponding to the source IP address into the acquired path information;
and generating a third SBFD detection response message according to the acquired path information, and returning the third SBFD detection response message to the network equipment.
It should be noted that, in this embodiment of the application, when the designated tunnel is an SR-TE tunnel, the path information may include MPLS label information.
When the designated tunnel is an SRv6 tunnel, the path information may include SID list information.
It should be further noted that the presentation format of the specified field is the same as the presentation manner when the network device side standing at the SBFD receiving end describes the flow content of the message processing method, and details are not described here.
The following describes the above message processing method in detail with reference to specific embodiments.
Taking network device 1 and network device 2 as an example, assuming that SR-TE tunnel 1 has been established between network device 1 and network device 2, network device 1 is used as an SBFD transmitting end, network device 2 is used as an SBFD receiving end, and network device 1 needs to detect whether SR-TE tunnel 1 fails every 5 minutes (i.e., a detection period).
When the detection period is reached for the first time, the network device 1 generates an SBFD probe message 1 that needs to be sent using the probe path 1. Wherein, the SBFD detection packet 1 carries a newly added TLV field (i.e., the above-mentioned designated field), as shown in fig. 3; the added TLV field includes path information of the backhaul path 2 corresponding to the probe path 1, and the specific content may be as shown in fig. 4.
Then, the network device 1 sends an SBFD probe message 1 to the network device 2 using the probe path 1.
After receiving the SBFD probing message 1, the network device 2 determines that the SBFD probing message 1 is the SBFD probing message received for the first time, and at this time, the network device 2 obtains the path information included in the newly added TLV field carried in the SBFD probing message 1, and records the corresponding relationship between the path information and the local identifier (content of My descriptor field shown in fig. 3) and the source IP address carried in the SBFD probing message 1; then, the network device 2 generates an SBFD detection response message 1 according to the path information, and returns the SBFD detection response message to the network device 1. Here, the local identifier is actually an identifier of the network device 1.
After receiving the SBFD detection response message returned by the network device 2, the network device 1 assumes that a detection period is reached and the network device 1 does not need to change the detection path, and then the network device 1 directly generates the SBFD detection message 2. The SBFD detection message 2 does not carry a new TLV field, that is, the format of the SBFD detection message 2 is completely the same as that of the existing SBFD detection message.
Then, the network device 1 continues to use the detection path 1 and sends an SBFD detection packet 2 to the network device 2.
After receiving the SBFD detection message 2, the network device 2 determines that the SBFD detection message 2 is not the SBFD detection message received for the first time and does not carry a newly added TLV field, at this time, the network device 2 searches for path information corresponding to the source IP address of the local identifier (i.e., the identifier of the network device 1) carried in the SBFD detection message 2 in the correspondence between the locally recorded path information and the local identifier and source IP address, generates a second SBFD detection response message 2 according to the searched path information, and returns the SBFD detection response message 2 to the network device 1.
Next, assuming that a certain detection period is reached after a period of time, the network device 1 needs to change the detection path, for example, the detection path 2 needs to be changed, then the network device 1 will generate the SBFD detection packet 3 carrying the newly added TLV field again, where the newly added TLV field in the SBFD detection packet 3 includes the path information of the backhaul path corresponding to the detection path 2 used when the network device 1 needs to send the SBFD detection packet 3.
Then, the network device 1 sends an SBFD probe message 3 to the network device 2 using the probe path 2.
After receiving the SBFD detection message 3, the network device 2 determines that the SBFD detection message 3 is not the SBFD detection message received for the first time and carries a newly added TLV field, acquires path information included in the newly added specified field, and updates the path information corresponding to the local identifier (i.e., the identifier of the network device 1) and the source IP address carried in the SBFD detection message 3 in the correspondence between the locally recorded path information and the local identifier and the source IP address to the acquired path information; then, the network device 2 generates an SBFD detection response message 3 according to the acquired path information, and returns the SBFD detection response message to the network device 1.
It can be seen from the foregoing technical solutions that, in the embodiment of the present application, for a network device serving as an SBFD sending end, when it is first required to detect whether a specified tunnel established between the network device and an opposite network device serving as an SBFD receiving end fails, an SBFD detection packet carrying a specified field is sent to the opposite network device, where the specified field includes path information of a backhaul path corresponding to a detection path used by the network device when sending the SBFD detection packet, so that, after the opposite network device first receives the SBFD detection packet, the opposite network device obtains the path information, records a corresponding relationship between the path information and a local identifier (i.e., an identifier of the network device) and a source IP address carried in the SBFD detection packet, and then generates an SBFD detection response packet according to the path information, and returns the SBFD detection response packet to the network device.
After receiving the SBFD detection response message returned by the peer network device, the subsequent network device sends an SBFD detection message not carrying a specified field to the peer network device as soon as it needs to continuously detect whether the specified tunnel fails and does not need to change the detection path, so that the peer network device finds that the SBFD detection message does not carry the specified field when receiving the SBFD detection message, searches for the local identifier carried in the SBFD detection message and the path information corresponding to the source IP address in the correspondence between the locally recorded path information and the local identifier and the source IP address, generates an SBFD detection response message again according to the found path information, and returns the SBFD detection response message to the network device.
Therefore, in the interaction process between the network device and the opposite-end network device, the backhaul path of the SBFD detection response message returned by the opposite-end network device is always consistent with the detection path of the SBFD detection message sent by the network device, no path oscillation occurs, and unnecessary route convergence is not caused, thereby improving network experience.
Based on the same inventive concept, the present application further provides a message processing apparatus, where the apparatus is applied to a network device at an SBFD receiving end, and a schematic structural diagram of the apparatus is shown in fig. 5, and the apparatus specifically includes:
a receiving module 51, configured to receive an SBFD detection message, sent by an opposite-end network device serving as an SBFD sending end, for detecting whether a specified tunnel established between the network device and the opposite-end network device fails;
a first response module 52, configured to, when determining that the SBFD probe packet is a first received SBFD probe packet, obtain path information included in a specified field carried in the SBFD probe packet, record a correspondence between the path information and a local identifier and a source IP address carried in the SBFD probe packet, generate an SBFD probe response packet according to the path information, and return the SBFD probe response packet to the peer network device, where the path information is path information of a backhaul path corresponding to a probe path used by the peer network device when sending the SBFD probe packet;
the second response module 53 is configured to, when it is determined that the SBFD probe packet is a non-first-received SBFD probe packet, if the SBFD probe packet does not carry the specified field, search, in a correspondence between path information recorded locally and a local identifier and a source IP address, path information corresponding to the local identifier and the source IP address carried in the SBFD probe packet, generate an SBFD probe response packet according to the searched path information, and return the SBFD probe response packet to the peer network device.
Preferably, the apparatus further comprises:
a third response module (not shown in fig. 5), configured to, when it is determined that the SBFD probe packet is a non-first-received SBFD probe packet and the SBFD probe packet carries the specified field, obtain path information included in the specified field, and update the local identifier carried in the SBFD probe packet and the path information corresponding to the source IP address in the correspondence to the obtained path information; and generating an SBFD detection response message according to the acquired path information, and returning the SBFD detection response message to the opposite terminal network equipment.
Preferably, when the designated tunnel is an SR-TE tunnel, the path information includes MPLS label information;
and when the specified tunnel is an SRv6 tunnel, the path information comprises SID list information.
The present application further provides a packet processing apparatus, where the apparatus is applied to a network device at an SBFD receiving end, and a schematic structural diagram of the apparatus is shown in fig. 6, and specifically includes:
a first generating module 61, configured to generate a first SBFD probe packet when it is first required to detect whether a specified tunnel established between the network device and an opposite-end network device serving as an SBFD receiving end fails, where a specified field carried in the first SBFD probe packet includes path information of a backhaul path corresponding to a probe path used by the network device when the network device needs to send the first SBFD probe packet;
a first sending module 62, configured to send the first SBFD detection packet to the peer network device by using the detection path, so that the peer network device obtains the path information included in the specified field carried in the first SBFD detection packet when determining that the first SBFD detection packet is a first received SBFD detection packet, records a correspondence between the path information and a local identifier and a source IP address carried in the first SBFD detection packet, generates a first SBFD detection response packet according to the path information, and returns the first SBFD detection response packet to the network device;
a second generating module 63, configured to generate a second SBFD detection packet if it is necessary to continuously detect whether the specified tunnel fails and the detection path does not need to be changed after receiving a first SBFD detection response packet returned by the peer network device, where the second SBFD detection packet does not carry the specified field;
a second sending module 64, configured to send the second SBFD detection packet to the peer network device by using the detection path, so that when the peer network device determines that the second SBFD detection packet is a non-first-received SBFD detection packet and does not carry the specified field, in a correspondence between path information recorded locally and a local identifier and a source IP address, the peer network device searches for path information corresponding to the identifier carried in the second SBFD detection packet, generates a second SBFD detection response packet according to the found path information, and returns the second SBFD detection response packet to the network device.
Preferably, the apparatus further comprises:
a third generating module (not shown in fig. 6), configured to generate a third SBFD detection message after receiving a first SBFD detection response message returned by the peer network device, if it is necessary to continuously detect whether the specified tunnel fails and the detection path needs to be changed, where a specified field carried in the third SBFD detection message includes path information of a backhaul path corresponding to the changed detection path used when the network device needs to send the third SBFD detection message;
a third sending module (not shown in fig. 6), configured to send the third SBFD probe packet to the peer network device by using the changed probe path, so that the peer network device obtains path information included in the specified field when determining that the third SBFD probe packet is a non-first-received SBFD probe packet and carries the specified field, and updates the path information corresponding to the local identifier and the source IP address carried in the SBFD probe packet in the corresponding relationship to the obtained path information; and generating a third SBFD detection response message according to the acquired path information, and returning the third SBFD detection response message to the network equipment.
Preferably, when the designated tunnel is an SR-TE tunnel, the path information includes MPLS label information;
and when the specified tunnel is an SRv6 tunnel, the path information comprises SID list information.
It can be seen from the foregoing technical solutions that, in the embodiment of the present application, for a network device serving as an SBFD sending end, when it is first required to detect whether a specified tunnel established between the network device and an opposite network device serving as an SBFD receiving end fails, an SBFD detection packet carrying a specified field is sent to the opposite network device, where the specified field includes path information of a backhaul path corresponding to a detection path used by the network device when sending the SBFD detection packet, so that, after the opposite network device first receives the SBFD detection packet, the opposite network device obtains the path information, records a corresponding relationship between the path information and a local identifier (i.e., an identifier of the network device) and a source IP address carried in the SBFD detection packet, and then generates an SBFD detection response packet according to the path information, and returns the SBFD detection response packet to the network device.
After receiving the SBFD detection response message returned by the peer network device, the subsequent network device sends an SBFD detection message not carrying a specified field to the peer network device as soon as it needs to continuously detect whether the specified tunnel fails and does not need to change the detection path, so that the peer network device finds that the SBFD detection message does not carry the specified field when receiving the SBFD detection message, searches for the path information corresponding to the identifier carried in the SBFD detection message in the correspondence between the path information recorded locally and the local identifier and source IP address, regenerates the SBFD detection response message according to the found path information, and returns the SBFD detection response message to the network device.
Therefore, in the interaction process between the network device and the opposite-end network device, the backhaul path of the SBFD detection response message returned by the opposite-end network device is always consistent with the detection path of the network device sending the SBFD detection message, no path oscillation occurs, and unnecessary route convergence is not caused, thereby improving network experience.
An electronic device is further provided in an embodiment of the present application, as shown in fig. 7, including a processor 71 and a machine-readable storage medium 72, where the machine-readable storage medium 72 stores machine-executable instructions that can be executed by the processor 71, and the processor 71 is caused by the machine-executable instructions to: and implementing the steps of any message processing method.
The machine-readable storage medium may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Alternatively, the machine-readable storage medium may be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In another embodiment provided by the present application, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program, when executed by a processor, implements the steps of any of the message processing methods described above.
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 network device serving as a Seamless Bidirectional Forwarding Detection (SBFD) receiving end, and comprises the following steps:
receiving an SBFD detection message which is sent by opposite-end network equipment serving as an SBFD sending end and is used for detecting whether a specified tunnel established between the network equipment and the opposite-end network equipment fails or not;
when the SBFD detection message is judged to be the SBFD detection message received for the first time, acquiring path information included in a designated field carried in the SBFD detection message, recording the corresponding relation between the path information and a local identifier and a source IP address carried in the SBFD detection message, generating an SBFD detection response message according to the path information, and returning the SBFD detection response message to the opposite-end network equipment, wherein the path information is the path information of a return route corresponding to a detection path used when the opposite-end network equipment sends the SBFD detection message;
when the SBFD probe message is judged to be a non-first-received SBFD probe message, if the SBFD probe message does not carry the specified field, searching the local identifier carried in the SBFD probe message and the path information corresponding to the source IP address in the corresponding relation between the path information recorded locally and the local identifier and the source IP address, generating an SBFD probe response message according to the searched path information, and returning the SBFD probe response message to the opposite-end network device.
2. The method of claim 1, further comprising:
when the SBFD detection message is judged to be the SBFD detection message which is not received for the first time and the SBFD detection message carries the designated field, acquiring the path information included in the designated field, and updating the local identifier carried in the SBFD detection message and the path information corresponding to the source IP address in the corresponding relation into the acquired path information;
and generating an SBFD detection response message according to the acquired path information, and returning the SBFD detection response message to the opposite terminal network equipment.
3. The method according to claim 1 or 2, wherein when the designated tunnel is a segment routing traffic engineering, SR-TE, tunnel, the path information comprises multiprotocol label switching, MPLS, label information;
and when the specified tunnel is a segment route and an SRv6 tunnel of the sixth version of the Internet protocol, the path information comprises Segment Identification (SID) list information.
4. A message processing method is applied to a network device serving as a Seamless Bidirectional Forwarding Detection (SBFD) sending end, and comprises the following steps:
generating a first SBFD detection message when whether a specified tunnel established by the network equipment and opposite-end network equipment serving as an SBFD receiving end fails needs to be detected for the first time, wherein a specified field carried in the first SBFD detection message comprises path information of a return path corresponding to a detection path used when the network equipment needs to send the first SBFD detection message;
using the detection path, sending the first SBFD detection message to the peer network device, so that when the peer network device determines that the first SBFD detection message is a first received SBFD detection message, the peer network device obtains the path information included in the specified field carried in the first SBFD detection message, records a correspondence between the path information and a local identifier and a source IP address carried in the first SBFD detection message, generates a first SBFD detection response message according to the path information, and returns the first SBFD detection response message to the network device;
after receiving a first SBFD detection response message returned by the opposite-end network equipment, if whether the specified tunnel fails or not needs to be detected continuously and the detection path does not need to be changed, generating a second SBFD detection message, wherein the specified field is not carried in the second SBFD detection message;
and sending the second SBFD detection message to the opposite-end network equipment by using the detection path, so that the opposite-end network equipment searches the local identifier carried in the second SBFD detection message and the path information corresponding to the source IP address in the corresponding relation of the path information, the local identifier and the source IP address when judging that the second SBFD detection message is the SBFD detection message which is not received for the first time and does not carry the specified field, generates a second SBFD detection response message according to the searched path information, and returns the second SBFD detection response message to the network equipment.
5. The method of claim 4, further comprising:
after receiving a first SBFD detection response message returned by the peer network device, if it is necessary to continuously detect whether the specified tunnel fails and the detection path needs to be changed, generating a third SBFD detection message, where a specified field carried in the third SBFD detection message includes path information of a backhaul path corresponding to the changed detection path used when the network device needs to send the third SBFD detection message;
sending the third SBFD probe message to the opposite-end network equipment by using the changed probe path, so that the opposite-end network equipment acquires path information included in the designated field when judging that the third SBFD probe message is a non-first-received SBFD probe message and carries the designated field, and updates the path information corresponding to the local identifier and the source IP address carried in the SBFD probe message in the corresponding relation into the acquired path information; and generating a third SBFD detection response message according to the acquired path information, and returning the third SBFD detection response message to the network equipment.
6. The method according to claim 4 or 5, wherein when the designated tunnel is a segment routing traffic engineering, SR-TE, tunnel, the path information comprises multiprotocol Label switching, MPLS, label information;
and when the specified tunnel is a segment route and an SRv6 tunnel of the sixth version of the Internet protocol, the path information comprises Segment Identification (SID) list information.
7. A message processing apparatus, wherein the apparatus is applied to a network device as a Seamless Bidirectional Forwarding Detection (SBFD) receiving end, the apparatus comprising:
a receiving module, configured to receive an SBFD detection packet sent by an opposite-end network device serving as an SBFD sending end, where the SBFD detection packet is used to detect whether a specified tunnel established between the network device and the opposite-end network device fails;
a first response module, configured to, when determining that the SBFD detection message is a first received SBFD detection message, obtain path information included in a specified field carried in the SBFD detection message, record a correspondence between the path information and a local identifier and a source IP address carried in the SBFD detection message, generate an SBFD detection response message according to the path information, and return the SBFD detection response message to the peer network device, where the path information is path information of a backhaul path corresponding to a detection path used by the peer network device when sending the SBFD detection message;
and the second response module is configured to, when it is determined that the SBFD detection message is a non-first-received SBFD detection message, if the SBFD detection message does not carry the specified field, search, in a correspondence between path information of a local record and a local identifier and a source IP address, path information corresponding to the local identifier carried in the SBFD detection message, generate an SBFD detection response message according to the searched path information, and return the SBFD detection response message to the peer network device.
8. The apparatus of claim 7, further comprising:
a third response module, configured to, when it is determined that the SBFD probe packet is a non-first-received SBFD probe packet and the SBFD probe packet carries the specified field, obtain path information included in the specified field, and update, in the correspondence, a local identifier carried in the SBFD probe packet and path information corresponding to a source IP address to the obtained path information; and
and generating an SBFD detection response message according to the acquired path information, and returning the SBFD detection response message to the opposite terminal network equipment.
9. A message processing apparatus, wherein the apparatus is applied to a network device as a seamless bidirectional forwarding detection SBFD sender, the apparatus comprising:
a first generating module, configured to generate a first SBFD probe packet when it is first required to detect whether a specified tunnel established between the network device and an opposite-end network device serving as an SBFD receiving end fails, where a specified field carried in the first SBFD probe packet includes path information of a backhaul path corresponding to a probe path used when the network device needs to send the first SBFD probe packet;
a first sending module, configured to send the first SBFD detection packet to the peer network device by using the detection path, so that when the peer network device determines that the first SBFD detection packet is a first received SBFD detection packet, the peer network device obtains the path information included in the specified field carried in the first SBFD detection packet, records a correspondence between the path information and a local identifier and a source IP address carried in the first SBFD detection packet, generates a first SBFD detection response packet according to the path information, and returns the first SBFD detection response packet to the network device;
a second generating module, configured to generate a second SBFD detection packet if it is necessary to continuously detect whether the specified tunnel fails and the detection path does not need to be changed after receiving a first SBFD detection response packet returned by the peer network device, where the second SBFD detection packet does not carry the specified field;
a second sending module, configured to send the second SBFD detection packet to the peer network device by using the detection path, so that the peer network device searches, in a correspondence between path information recorded locally and a local identifier and a source IP address, for path information corresponding to the local identifier and the source IP address carried in the second SBFD detection packet when determining that the second SBFD detection packet is a non-first-received SBFD detection packet and does not carry the specified field, generates a second SBFD detection response packet according to the found path information, and returns the second SBFD detection response packet to the network device.
10. The apparatus of claim 9, further comprising:
a third generating module, configured to generate a third SBFD detection message if it is necessary to continuously detect whether the specified tunnel fails and the detection path needs to be changed after receiving a first SBFD detection response message returned by the peer network device, where a specified field carried in the third SBFD detection message includes path information of a backhaul path corresponding to the changed detection path used when the network device needs to send the third SBFD detection message;
a third sending module, configured to send the third SBFD detection packet to the peer network device by using the changed detection path, so that when the peer network device determines that the third SBFD detection packet is a non-first-received SBFD detection packet and carries the specified field, the peer network device obtains path information included in the specified field, and updates, in the correspondence, the path information corresponding to the local identifier and the source IP address carried in the SBFD detection packet to the obtained path information; and generating a third SBFD detection response message according to the acquired path information, and returning the third SBFD detection response message to the network equipment.
CN202111090838.0A 2021-09-17 2021-09-17 Message processing method and device Active CN113992581B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111090838.0A CN113992581B (en) 2021-09-17 2021-09-17 Message processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111090838.0A CN113992581B (en) 2021-09-17 2021-09-17 Message processing method and device

Publications (2)

Publication Number Publication Date
CN113992581A CN113992581A (en) 2022-01-28
CN113992581B true CN113992581B (en) 2023-03-31

Family

ID=79735961

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111090838.0A Active CN113992581B (en) 2021-09-17 2021-09-17 Message processing method and device

Country Status (1)

Country Link
CN (1) CN113992581B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020134739A1 (en) * 2018-12-28 2020-07-02 华为技术有限公司 Method and device for configuring seamless bidirectional forwarding detection (sbfd) mechanism
CN111917643A (en) * 2020-07-17 2020-11-10 中盈优创资讯科技有限公司 Seamless bidirectional forwarding detection method and device for segmented routing tunnel
CN112104557A (en) * 2020-08-27 2020-12-18 新华三技术有限公司 Method and device for detecting link
WO2021043086A1 (en) * 2019-09-05 2021-03-11 华为技术有限公司 Method, device and system for establishing sbfd session
WO2021170092A1 (en) * 2020-02-26 2021-09-02 华为技术有限公司 Message processing method and apparatus, and network device and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11032197B2 (en) * 2016-09-15 2021-06-08 Cisco Technology, Inc. Reroute detection in segment routing data plane
US20200076724A1 (en) * 2018-08-31 2020-03-05 Cisco Technology, Inc. Path management for segment routing based mobile user-plane using seamless bfd

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020134739A1 (en) * 2018-12-28 2020-07-02 华为技术有限公司 Method and device for configuring seamless bidirectional forwarding detection (sbfd) mechanism
CN111385165A (en) * 2018-12-28 2020-07-07 华为技术有限公司 Method and device for configuring Seamless Bidirectional Forwarding Detection (SBFD) mechanism
WO2021043086A1 (en) * 2019-09-05 2021-03-11 华为技术有限公司 Method, device and system for establishing sbfd session
WO2021170092A1 (en) * 2020-02-26 2021-09-02 华为技术有限公司 Message processing method and apparatus, and network device and storage medium
CN111917643A (en) * 2020-07-17 2020-11-10 中盈优创资讯科技有限公司 Seamless bidirectional forwarding detection method and device for segmented routing tunnel
CN112104557A (en) * 2020-08-27 2020-12-18 新华三技术有限公司 Method and device for detecting link

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
网络信息主动探测技术的研究与实现;张涛等;《计算机工程与应用》;20060701(第31期);全文 *

Also Published As

Publication number Publication date
CN113992581A (en) 2022-01-28

Similar Documents

Publication Publication Date Title
US7280486B2 (en) Detection of forwarding problems for external prefixes
US9374304B2 (en) End-to end route tracing over a named-data network
CN108809759A (en) Detect the method, apparatus and router of link state
WO2016008322A1 (en) Path connectivity test method and device
US8599858B1 (en) System and method for keep alive message aging
CN109218200B (en) Message processing method and device
CN109379241B (en) Path information determination method and device
JP2012249212A5 (en) Portable network connection device, method, computer program, and recording medium
CA3104756C (en) Loop avoidance communications method, device, and system
CN101188530B (en) Method and device for IPv4 and IPv6 network failure detection and location
WO2013026336A1 (en) Method for path detection and node
US20220166706A1 (en) Method and Apparatus for Processing Link State Information
CN107547311B (en) Flow statistical method and device
CN108206767A (en) A kind of network equipment failure detection method and device
CN113992581B (en) Message processing method and device
WO2012106914A1 (en) Dynamic tunnel fault diagnosis method, device and system
WO2016054966A1 (en) Message routing method and apparatus
CN113726650B (en) SBFD detection method and network equipment
CN107222359B (en) Link abnormity detection method and system in IS-IS network
CN111385195B (en) Information processing method, device and storage medium
US20060133387A1 (en) Route tracing in wireless networks
CN114500173A (en) Message processing method and device, electronic equipment and storage medium
CN108521336B (en) Method and device for controlling IP address conflict of routing networking
CN114697160A (en) Tunnel message processing method and device
CN106453080B (en) Tracing method and device for link state clearing message

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