A method and network device for establishing sbfd

CN116566850BActive Publication Date: 2026-08-07NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
NEW H3C TECH CO LTD
Filing Date
2023-05-30
Publication Date
2026-08-07

AI Technical Summary

Technical Problem

目前整机16k的硬件SBFD规格已经无法满足SRv6 Policy业务的增长需求,至少需要40k的硬件SBFD规格

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116566850B_ABST
    Figure CN116566850B_ABST
Patent Text Reader

Abstract

The present specification provides a method and network device for establishing an SBFD, the method comprising: obtaining a first session descriptor, first detection path information and first session actual parameters of a first session; obtaining a target session resource index Index according to the matching result of the first detection path information and the first session actual parameters, a first corresponding relationship; adding the first session descriptor and the first Index to a second corresponding relationship; and saving the first session descriptor to a session resource table corresponding to the first Index, to complete the establishment of the SBFD. Through the method, the SBFD session software and hardware resources can be saved, and the growing SBFD session specifications can be met as much as possible in the case of limited software and hardware resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of communication technology, and in particular to a method and network device for establishing SBFD. Background Technology

[0002] Bidirectional Forwarding Detection (BFD) is a general, standardized, media-independent, and protocol-independent fast fault detection mechanism used to detect the connectivity of forwarding paths. Typical routing protocols, such as OSPF / IS-IS / BGP, use Hello message mechanisms to detect faults, which takes seconds. BFD, however, can provide millisecond-level detection, quickly identifying communication failures and switching to backup links to ensure uninterrupted service operation.

[0003] SBFD (Seamless BFD) is an improvement on BFD, which simplifies the state machine of BFD, shortens the session negotiation time, and has a faster detection speed than BFD.

[0004] With the development of high-performance routers in large single units and multiple clusters, the number of boards and links supported by the entire system is increasing. Services such as MPLS and SRv6 Policy require SBFD sessions, and as service specifications increase, the specifications of SBFD sessions must also increase. Currently, the 16k hardware SBFD specification for the entire system is insufficient to meet the growing demands of SRv6 Policy services; at least a 40k hardware SBFD specification is needed. This poses a significant challenge to both software resources (memory usage, task scheduling) and hardware resources (NP table resources, interface bandwidth). Summary of the Invention

[0005] This disclosure provides a method and network device for establishing SBFD. This method can save SBFD session hardware and software resources and strive to meet the ever-growing SBFD session specifications under limited hardware and software resources.

[0006] This disclosure provides a method for establishing an SBFD, the method comprising:

[0007] Obtain the first session descriptor, the first detection path information, and the actual parameters of the first session;

[0008] Based on the first detection path information and the actual parameters of the first session, and the matching result with the first correspondence, obtain the target session resource index.

[0009] Add the first session descriptor and the first index to the second correspondence, and save the first session descriptor to the session resource table corresponding to the first index to complete the establishment of SBFD;

[0010] Among them, the first correspondence is used to record the correspondence between each detection path information, actual session parameters and Index;

[0011] The second mapping is used to record the mapping between session descriptors and indexes.

[0012] Optionally, after obtaining the first session descriptor, the first detection path information, and the actual parameters of the first session, the method further includes:

[0013] Match the first session descriptor with the second correspondence;

[0014] If the matching result indicates that a match exists, an error message is returned;

[0015] If the matching result is that no match is found, proceed with the next steps.

[0016] Optionally, obtaining the target session resource index based on the matching result of the first detection path information and the actual parameters of the first session with the first correspondence relationship includes:

[0017] If the matching result indicates that a match exists, the match will be used as the first index.

[0018] If the matching result is that no matching item exists, request the first index from the Index resource pool, and at the same time request the corresponding software / hardware resources.

[0019] Optionally, the method further includes:

[0020] When a link fails, SBFD triggers the invocation of the hardware and software resources corresponding to the first index;

[0021] The first session descriptor is obtained by using the first index through the session resource table, and the first session descriptor is then notified to the upper layer application.

[0022] Optionally, the method further includes:

[0023] When the deletion of the established SBFD is triggered, the first session descriptor of the SBFD is obtained;

[0024] Use the first session descriptor to match the second correspondence and obtain the first index that was matched. Delete the item corresponding to the first index from the second correspondence.

[0025] Remove the linked list node corresponding to the first session descriptor from the session resource table corresponding to the first index.

[0026] The method further includes, when identifying the first detection path information of the established SBFD and / or changes in the actual parameters of the first session:

[0027] The first index is obtained by matching the first session descriptor with the second correspondence.

[0028] Using the changed first detection path information and / or the actual parameters of the first session, the second index is obtained by matching it with the first correspondence.

[0029] When the first index and the second index are the same, no processing is performed; or,

[0030] When the first index and the second index are not the same, change the first index in the second correspondence to the second index, or delete the correspondence between the first session descriptor and the first index in the second correspondence and establish the correspondence between the second index and the second session descriptor.

[0031] As can be seen from the above method, when establishing an SBFD, software and hardware resources with the same first detection path information and actual parameters of the first session can be reused, without each SBFD occupying software and hardware resources independently. This saves software and hardware resources for SBFD sessions and strives to meet the ever-growing SBFD session specifications under the condition of limited software and hardware resources.

[0032] This disclosure also provides a network device, the method device comprising:

[0033] The acquisition module is used to acquire the first session descriptor, the first detection path information, and the actual parameters of the first session.

[0034] The acquisition module is also used to acquire the target session resource index Index based on the matching result of the first detection path information and the actual parameters of the first session with the first correspondence relationship;

[0035] The processing module is used to add the first session descriptor and the first index to the second correspondence, and to save the first session descriptor to the session resource table corresponding to the first index, thereby completing the establishment of SBFD;

[0036] Among them, the first correspondence is used to record the correspondence between each detection path information, actual session parameters and Index;

[0037] The second mapping is used to record the mapping between session descriptors and indexes.

[0038] The processing module is further configured to match the first session descriptor with the second correspondence. If the matching result indicates that a match exists, an error message is returned. If the matching result indicates that no match exists, subsequent steps are executed.

[0039] The processing module is further configured to, when a link failure occurs, trigger the invocation of the hardware and software resources corresponding to the first index by SBFD, obtain the corresponding first session descriptor through the session resource table using the first index, and notify the upper layer application of the first session descriptor.

[0040] The processing module is further configured to, when the deletion of the established SBFD is triggered, obtain the first session descriptor of the SBFD, match the second correspondence using the first session descriptor, obtain the matched first index, delete the corresponding item of the first index from the second correspondence, and delete the linked list node corresponding to the first session descriptor from the session resource table corresponding to the first index. Attached Figure Description

[0041] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this specification and, together with the description, serve to explain the principles of this specification.

[0042] Figure 1 This is a flowchart illustrating a method for establishing an SBFD according to an embodiment of the present disclosure.

[0043] Figure 2 This is a schematic diagram of a process for establishing an SBFD, provided as an embodiment of the present disclosure.

[0044] Figure 3 This is a schematic diagram of a process for establishing an SBFD, provided as an embodiment of the present disclosure. Detailed Implementation

[0045] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this specification as detailed in the appended claims.

[0046] The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of this specification. The singular forms “a,” “the,” and “the” as used in this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any and all possible combinations of one or more of the associated listed items.

[0047] It should be understood that although the terms first, second, third, etc., may be used in this specification to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this specification, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."

[0048] Currently, a 40k 10ms*3 hardware SBFD session has a packet sending rate of 4,096,000pps (40*1024*100). Calculated at 256 bytes per packet, this occupies 8.38Gbps of bandwidth, which has a significant impact on the line-speed forwarding of service packets.

[0049] To address the aforementioned technical problems, this disclosure provides a method for establishing an SBFD, such as... Figure 1 As shown, the method includes:

[0050] S101 Obtains the first session descriptor, the first detection path information, and the actual parameters of the first session;

[0051] S102 Based on the first detection path information and the actual parameters of the first session, and the matching result with the first correspondence, obtain the target session resource index Index;

[0052] S103 Add the first session descriptor and the first index to the second correspondence, and save the first session descriptor to the session resource table corresponding to the first index, thus completing the establishment of SBFD;

[0053] Among them, the first correspondence is used to record the correspondence between each detection path information, actual session parameters and Index;

[0054] The second mapping is used to record the mapping between session descriptors and indexes.

[0055] In this embodiment, when SBFD needs to be established, the upper-layer application (MPLS / SRv6 Policy) is unaware of it and, according to the normal policy, notifies the SBFD module of the first session descriptor and the first detection path (source and destination IP addresses, MPLS label stack / SRv6 label stack, outgoing interface, and other information).

[0056] In step S101, after receiving the information sent by the upper-layer application, the SBFD module obtains the first session descriptor, the first detection path, and the actual parameters of the first session.

[0057] The SBFD module acquires session parameters (default parameters at system startup / user command-line configuration / issued by network management software), including minimum packet sending interval, minimum packet receiving interval, and detection multiplier. After completing session parameter negotiation, it can obtain the actual parameters of the first session.

[0058] In this embodiment, in order to enable sessions with the same detection path information and actual session parameters to share a single effective hardware and software resource (including information such as timed packet sending, timeout detection, and a linked list of session descriptors), the SBFD module can be configured with a first correspondence relationship. This first correspondence relationship stores the correspondence between the established SBFD detection path information, actual session parameters, and session resource index.

[0059] In one example, the first correspondence can be achieved through a hash table. For example, configure hash table B, where the key is a combination of "detection path information" and "actual session parameters" (MixParam), and the result is also the index of the session resource table.

[0060] like Figure 2 As shown, the SBFD module uses the "first detection path information" and "first session actual parameters" group Key to look up hash table B. If a match is found, it indicates that there are shareable software / hardware resources. In this case, the matching session resource index is used as the first index. In another case, no match is found, indicating that there are no shareable software / hardware resources. In this case, the first index can be requested from the index resource pool, and the corresponding software / hardware resources can be requested and occupied. Then, the first session descriptor and the first index are added to the second correspondence (hash table A).

[0061] To prevent erroneous SBFD session establishment, before executing step S102, a first session descriptor can be matched against a second mapping. This second mapping records the correspondence between session descriptors and indices of established SBFD sessions. This second mapping can be implemented using hash table A. For example, in hash table A, the key is the session descriptor Discr, and the result is the index of the session resource table. When a match is successful between the first session descriptor and the second mapping, an error message is returned; otherwise, if the match fails, subsequent steps are executed.

[0062] In this embodiment, when a link fails, the SBFD timeout detection will trigger the processing of the hardware and software resources corresponding to the first index. The corresponding session resource table is obtained through the first index, the first session descriptor linked list is traversed, and all first session descriptors are notified to the upper layer application.

[0063] In another instance, when the SBFD session detects a fault, or when the user actively deletes the configuration or disables the upper-layer application, the SBFD session deletion will be triggered. The first session descriptor is used to look up hash table A, find the valid first index, and delete the mapping between the first session descriptor and the first index in hash table A.

[0064] Specifically, when deleting the linked list node corresponding to the session descriptor in the session resource table corresponding to the Index, the number of nodes in the linked list is determined.

[0065] In one scenario, if the number of nodes in the linked list is 0, continue deleting hardware and software resources, delete the session resource table, and release the first index resource.

[0066] In another scenario, if the number of nodes in the linked list is not zero, the processing ends.

[0067] In this embodiment, there are situations where the SBFD session changes, for example:

[0068] During the normal operation of an SBFD session, the upper-layer application may notify that the "detection path information" has changed, or the user may notify / the primary / backup path may switch, causing the "actual session parameters" to change, which may trigger changes to the SBFD session corresponding to the session descriptor.

[0069] The SBFD module uses the first session descriptor to look up hash table A and finds the first index. Then, it uses the changed detection path information (hereinafter referred to as the second detection path information) and the actual session parameters (the second actual session parameters) group Key to look up hash table B and find the second index. It then determines whether the second index is the same as the first index. If they are the same, it means that the first detection path information and the first actual session parameters have not changed, and the processing ends.

[0070] Otherwise, it indicates that the first detection path information and the actual parameters of the first session have changed, but a shared session can still be found. The mapping between the first session descriptor and the first index in hash table A is changed to the mapping between the second session descriptor and the second index. The second session descriptor is saved as a linked list node to the session descriptor linked list of the session resource table corresponding to the second index.

[0071] If no shared session is found, it indicates that the first detection path information or the actual parameters of the first session have changed and no shared session can be found. In this case, steps S102 and S103 should be re-executed.

[0072] As can be seen from the above embodiments, the technical solution provided by this disclosure can enable SBFDs with the same first detection path information and first session actual parameters to share the same software / hardware resources, effectively saving SBFD session software and hardware resources, and striving to meet the ever-growing SBFD session specifications under the condition of limited software and hardware resources.

[0073] Based on the same method implementation, this disclosure also provides a network device, the network device comprising:

[0074] The acquisition module is used to acquire the first session descriptor, the first detection path information, and the actual parameters of the first session.

[0075] The acquisition module is also used to acquire the target session resource index Index based on the matching result of the first detection path information and the actual parameters of the first session with the first correspondence relationship;

[0076] The processing module is used to add the first session descriptor and the first index to the second correspondence, and to save the first session descriptor to the session resource table corresponding to the first index, thereby completing the establishment of SBFD;

[0077] Among them, the first correspondence is used to record the correspondence between each detection path information, actual session parameters and Index;

[0078] The second mapping is used to record the mapping between session descriptors and indexes.

[0079] The processing module is further configured to match the first session descriptor with the second correspondence. If the matching result indicates that a match exists, an error message is returned. If the matching result indicates that no match exists, subsequent steps are executed.

[0080] The processing module is further configured to, when a link failure occurs, trigger the invocation of the hardware and software resources corresponding to the first index by SBFD, obtain the corresponding first session descriptor through the session resource table using the first index, and notify the upper layer application of the first session descriptor.

[0081] The processing module is further configured to, when the deletion of the established SBFD is triggered, obtain the first session descriptor of the SBFD, match the second correspondence using the first session descriptor, obtain the matched first index, delete the corresponding item of the first index from the second correspondence, and delete the linked list node corresponding to the first session descriptor from the session resource table corresponding to the first index.

[0082] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0083] Other embodiments of this specification will readily occur to those skilled in the art upon consideration of the specification and practice of the invention claimed herein. This specification is intended to cover any variations, uses, or adaptations that follow the general principles of this specification and include common knowledge or customary techniques in the art not claimed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this specification are indicated by the following claims.

[0084] It should be understood that this specification is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this specification is limited only by the appended claims.

[0085] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of protection of this specification.

Claims

1. A method for establishing an SBFD, characterized in that, The method includes: Obtain the first session descriptor, the first detection path information, and the actual parameters of the first session; Based on the first detection path information and the actual parameters of the first session, and the matching result with the first correspondence, obtain the first session resource index Index; Add the first session descriptor and the first index to the second correspondence, and save the first session descriptor to the session resource table corresponding to the first index to complete the establishment of SBFD; Among them, the first correspondence is used to record the correspondence between each detection path information, actual session parameters and Index; The second mapping is used to record the mapping between session descriptors and indexes.

2. The method according to claim 1, characterized in that, After obtaining the first session descriptor, the first detection path information, and the actual parameters of the first session, the method further includes: Match the first session descriptor with the second correspondence; If the matching result indicates that a match exists, an error message is returned; If the matching result is that no match is found, proceed with the next steps.

3. The method according to claim 1, characterized in that, The step of obtaining the first session resource index based on the matching result of the first detection path information and the actual parameters of the first session with the first correspondence relationship includes: If the matching result indicates that a match exists, the match will be used as the first index. If the matching result is that no matching item exists, request the first index from the Index resource pool, and at the same time request the corresponding software / hardware resources.

4. The method according to claim 1, characterized in that, The method further includes: When a link fails, SBFD triggers the invocation of the hardware and software resources corresponding to the first index; The first session descriptor is obtained by using the first index through the session resource table, and the first session descriptor is then notified to the upper layer application.

5. The method according to claim 1, characterized in that, The method further includes: When the deletion of the established SBFD is triggered, the first session descriptor of the SBFD is obtained; Use the first session descriptor to match the second correspondence and obtain the first index that was matched. Delete the item corresponding to the first index from the second correspondence. Remove the linked list node corresponding to the first session descriptor from the session resource table corresponding to the first index.

6. The method according to claim 1, characterized in that, When the first detection path information of the established SBFD and / or the actual parameter changes of the first session are identified, the method further includes: The first index is obtained by matching the first session descriptor with the second correspondence. Using the changed first detection path information and / or the actual parameters of the first session, the second index is obtained by matching it with the first correspondence. When the first index and the second index are the same, no processing is performed; or, When the first index and the second index are not the same, change the first index in the second correspondence to the second index, or delete the correspondence between the first session descriptor and the first index in the second correspondence and establish the correspondence between the second index and the second session descriptor.

7. A network device, characterized in that, The network device includes: The acquisition module is used to acquire the first session descriptor, the first detection path information, and the actual parameters of the first session. The acquisition module is also used to acquire the first session resource index Index based on the first detection path information and the actual parameters of the first session, and the matching result with the first correspondence relationship; The processing module is used to add the first session descriptor and the first index to the second correspondence, and to save the first session descriptor to the session resource table corresponding to the first index, thereby completing the establishment of SBFD; Among them, the first correspondence is used to record the correspondence between each detection path information, actual session parameters and Index; The second mapping is used to record the mapping between session descriptors and indexes.

8. The network device according to claim 7, characterized in that, The processing module is further configured to match the first session descriptor with the second correspondence. If the matching result indicates that a match exists, an error message is returned. If the matching result indicates that no match exists, subsequent steps are executed.

9. The network device according to claim 7, characterized in that, The processing module is also used to trigger the invocation of the hardware and software resources corresponding to the first index when a link failure occurs, obtain the corresponding first session descriptor through the session resource table using the first index, and notify the upper layer application of the first session descriptor.

10. The network device according to claim 7, characterized in that, The processing module is further configured to, when the deletion of the established SBFD is triggered, obtain the first session descriptor of the SBFD, use the first session descriptor to match the second correspondence, obtain the matched first index, delete the corresponding item of the first index from the second correspondence, and delete the linked list node corresponding to the first session descriptor from the session resource table corresponding to the first index.

Citation Information

Patent Citations

  • Seamless bidirectional forwarding detection method and device for segmented routing tunnel

    CN111917643A

  • SBFD detection method and network equipment

    CN113726650A