CN116319521A - Method for selecting forwarding path, network equipment and storage medium - Google Patents

Method for selecting forwarding path, network equipment and storage medium Download PDF

Info

Publication number
CN116319521A
CN116319521A CN202310288823.8A CN202310288823A CN116319521A CN 116319521 A CN116319521 A CN 116319521A CN 202310288823 A CN202310288823 A CN 202310288823A CN 116319521 A CN116319521 A CN 116319521A
Authority
CN
China
Prior art keywords
forwarding path
forwarded
prefix
value
cost value
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.)
Pending
Application number
CN202310288823.8A
Other languages
Chinese (zh)
Inventor
武伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN202310288823.8A priority Critical patent/CN116319521A/en
Publication of CN116319521A publication Critical patent/CN116319521A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/247Multipath using M:N active or standby paths

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present specification provides a method of selecting a forwarding path, a network device, and a storage medium, the method including: the method comprises the steps that head node equipment obtains a first forwarding path of a message to be forwarded, and obtains a plurality of first PREFIX labels corresponding to the first forwarding path; obtaining a COST value of the first forwarding path by using the plurality of first pre labels and the corresponding relation between the pre labels and the COST value; and comparing the COST value of the first forwarding path with a configured threshold value, obtaining a comparison result, and judging whether to forward the message through the first forwarding path or not by using the comparison result. The method can effectively reduce the condition that the path control is required to depend on the SDN controller.

Description

Method for selecting forwarding path, network equipment and storage medium
Technical Field
The present disclosure relates to the field of communications technologies, and in particular, to a method for selecting a forwarding path, a network device, and a storage medium.
Background
At present, the SR technology is the most popular technology in the SDN field, and according to the actual needs of the user, the user can issue the desired route forwarding path to the forwarding path of the SR TE of the network device through the controller, and then the device is labeled with a corresponding label, and performs path forwarding according to the instruction of the controller.
However, from the current development situation of the SDN controller, the automatic computing capability of the controller on the path cannot be flexible enough, and the requirement of individual users still needs to wait for the custom development of the controller or manually set the path by the network administrator. And from the user demand point of view, too much development cost is not willing to be spent on the controller.
Disclosure of Invention
The embodiment of the disclosure provides a method for selecting a forwarding path, network equipment and a storage medium, by which the condition that path control needs to depend on an SDN controller can be effectively reduced.
The embodiment of the disclosure provides a method for selecting a forwarding path, which is applied to head node equipment, and comprises the following steps:
the method comprises the steps that head node equipment obtains a first forwarding path of a message to be forwarded, and obtains a plurality of first PREFIX labels corresponding to the first forwarding path;
obtaining a COST value of the first forwarding path by using the plurality of first pre labels and the corresponding relation between the pre labels and the COST value;
comparing the COST value of the first forwarding path with a configured threshold value, and obtaining a comparison result;
if the comparison result is not greater than the threshold value, forwarding the message to be forwarded through a first forwarding path; or alternatively, the process may be performed,
if the comparison result is greater than the threshold value, the message to be forwarded is not forwarded through the first forwarding path.
The method for acquiring the corresponding relation comprises the following steps:
and obtaining COST values corresponding to each PREFIX label in the routing table, and recording the corresponding relation between each PREFIX label and the COST value.
The method for configuring the threshold value comprises the following steps:
obtaining a COST value corresponding to the PREFIX tag, and adding a custom value N to the COST value base to obtain a threshold value corresponding to the PREFIX tag, wherein N is a value greater than or equal to 0.
Optionally, when the routing oscillation is detected, the step of obtaining the COST value of the first forwarding path by using the plurality of first PREFIX labels and the correspondence between the PREFIX labels and the COST value is re-executed.
Optionally, after the comparison result is greater than the threshold, forwarding the message to be forwarded through the first forwarding path is not performed, the method further includes:
judging whether a standby path for forwarding the message to be forwarded exists or not, and forwarding the message to be forwarded through the first path if the standby path does not exist.
It can be seen from any of the above embodiments that, without the need for SDN controller control, a better forwarding path may be obtained by comparing the COST value of the selected path with a threshold value.
The embodiment of the disclosure also provides a network device, which is a head node device, and includes:
the SR-TE module is used for acquiring a first forwarding path of the message to be forwarded and acquiring a plurality of first PREFIX labels corresponding to the first forwarding path;
the SR-TE module is further configured to obtain a COST value of the first forwarding path by using the plurality of first pre labels and a correspondence between the pre labels and the COST value;
the SR-TE module is also used for comparing the COST value of the first forwarding path with a configured threshold value and obtaining a comparison result;
the sending module is used for forwarding the message to be forwarded through the first forwarding path if the comparison result is not greater than the threshold value; or alternatively, the process may be performed,
if the comparison result is greater than the threshold value, the message to be forwarded is not forwarded through the first forwarding path.
Wherein the network device further comprises:
and the IGP module is used for acquiring COST values corresponding to each PREFIX label in the routing table and recording the corresponding relation between each PREFIX label and the COST value.
Wherein the network device further comprises:
the configuration module is used for obtaining the COST value corresponding to the PREFIX tag, and adding the custom value N to the COST value base to obtain the threshold value corresponding to the PREFIX tag, wherein N is a value greater than or equal to 0.
The embodiment of the disclosure also provides a network device, which includes: a memory, a processor, and a program stored on the memory and executable on the processor, which when executed by the processor, performs the method steps of any of the embodiments described above.
The disclosed embodiments also provide a computer readable storage medium having a program stored thereon, which when executed by a processor, implements the method steps of any of the embodiments described above.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the specification and together with the description, serve to explain the principles of the specification.
Fig. 1 is a schematic diagram of a network architecture according to an embodiment of the disclosure.
Fig. 2 is a logic schematic diagram of a method for selecting a forwarding path according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present description as detailed in the accompanying claims.
The terminology used in the description presented herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any or all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, third, etc. may be used in this specification to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present description. The word "if" as used herein may be interpreted as "at … …" or "at … …" or "responsive to a determination", depending on the context.
As shown in FIG. 1, a left user sends a packet to a right user, an SR-TE tunnel is established by taking A as a head node on an A-F router, SEGLIST is a one-hop PREFIX label and directly connected to D, and then the SEGLIST is forwarded to the user. IGP is initiated between any nodes, with the COST of each link being the same. At this time, if the link between the nodes C and D fails, the traffic will still go to the node D, but the path is changed from A-B-C-D to A-B-C-E-F-D. In this networking, the slave node F may actually reach the user, so that the client does not want the traffic to occupy bandwidth through the link of F-D, but wants the SR-TE tunnel to switch to the backup path a-B-C-E-F forwarding. However, since IGP converges faster, the tunnel main path cannot detect the failure, and thus occupies more bandwidth of F-D.
To solve the above technical problem, an embodiment of the present disclosure provides a method for selecting a forwarding path, where the method is applied to a head node device, as shown in fig. 2, and the method includes:
s201, the head node equipment acquires a first forwarding path of a message to be forwarded, and acquires a plurality of first PREFIX labels corresponding to the first forwarding path;
s202, acquiring a COST value of the first forwarding path by utilizing the plurality of first PREFIX labels and the corresponding relation between the PREFIX labels and the COST value;
s203, comparing the COST value of the first forwarding path with a configured threshold value, and obtaining a comparison result;
s204, if the comparison result is not greater than the threshold value, forwarding the message to be forwarded through a first forwarding path; or if the comparison result is greater than the threshold value, the message to be forwarded is not forwarded through the first forwarding path.
In this embodiment, the COST value includes an IGP COST value, and the head node IGP module may obtain an IGP COST value corresponding to a PREFIX label in the routing table, and record the IGP COST value in a label-COST correspondence table, so as to establish a correspondence between each PREFIX label and the COST value.
In step S201, the SR-TE module may obtain a first forwarding path according to a destination node of the message to be forwarded, where the first forwarding path generally includes a plurality of intermediate nodes, and each PREFIX label corresponds to a section of interval path, so as to distinguish the PREFIX label corresponding to the first forwarding path, which is called a first PREFIX label. It should be noted that, the first PREFIX label corresponds to the PREFIX label of the first forwarding path, and the first PREFIX label may actually include a plurality (2 or more) of PREFIX labels.
In step S202, the first PREFIX labels (first PREFIX labels) are used to obtain the COST value of the first forwarding path corresponding to the first PREFIX label, through the correspondence relationship.
In this embodiment, the administrator may set a corresponding threshold value for each PREFIX tag in the correspondence table (or newly set a record table), where the threshold value may be obtained by obtaining a PREFIX tag corresponding COST value and adding a custom value N to a COST value base when the network is not faulty, where N is a value greater than or equal to 0.
After the first PREFIX label is obtained in step S202, the COST value corresponding to the first PREFIX label may be compared with the threshold value, and if the COST value is higher than the threshold value, the whole path is considered to be invalid. If the COST value is below the threshold, the threshold comparison of the next tag is checked.
In general, if the forwarding path is the main path, the COST value corresponding to the obtained first PREFIX label is at least the same as the threshold value, or smaller than the threshold value, as shown in fig. 1, the COST value of C-D is 3, the threshold value of C-E-F-D is 6, the threshold value of C-E-F-user is 4, if the threshold value is set to 5, if the first forwarding path selects C-E-F-D to be larger than the threshold value, the forwarding path is not calculated again by the head node at this time, or the message to be forwarded is forwarded using the standby path.
It should be noted that, in this embodiment, each first PREFIX tag may be compared with a corresponding threshold, or the total COST value from the head node to the user may be compared with a threshold (a threshold set for the head node to the user), which may be specifically configured according to the requirement of the administrator.
In practical applications, there may be a case of route oscillation, and when the route oscillation is detected, step S202 and the subsequent steps are re-executed.
As shown in fig. 1, in one example, device a configures a label COST for D that does not exceed 3 (assuming each link COST is 1), then at this point the C, D link is broken and the label COST for D seen by a becomes 5, exceeding the threshold. At this time, the SR-TE module on A will determine that the original SR-TE (PREFIX tag with path D) is invalid, and can switch paths.
According to the embodiments, the corresponding threshold value is configured through the corresponding PREFIX label, and the COST value corresponding to the PREFIX label is compared with the threshold value, so that the method for automatically selecting the optimal path by the node equipment is realized, the SDN controller is not required to participate manually, and the condition that the path control is required to depend on the SDN controller is effectively reduced.
Based on the above method embodiment, the embodiment of the present disclosure further provides a network device, where the network device is a head node device, and the network device includes:
the SR-TE module is used for acquiring a first forwarding path of the message to be forwarded and acquiring a plurality of first PREFIX labels corresponding to the first forwarding path;
the SR-TE module is further configured to obtain a COST value of the first forwarding path by using the plurality of first pre labels and a correspondence between the pre labels and the COST value;
the SR-TE module is also used for comparing the COST value of the first forwarding path with a configured threshold value and obtaining a comparison result;
the sending module is used for forwarding the message to be forwarded through the first forwarding path if the comparison result is not greater than the threshold value; or alternatively, the process may be performed,
if the comparison result is greater than the threshold value, the message to be forwarded is not forwarded through the first forwarding path.
Wherein the network device further comprises:
and the IGP module is used for acquiring COST values corresponding to each PREFIX label in the routing table and recording the corresponding relation between each PREFIX label and the COST value.
Wherein the network device further comprises:
the configuration module is used for obtaining the COST value corresponding to the PREFIX tag, and adding the custom value N to the COST value base to obtain the threshold value corresponding to the PREFIX tag, wherein N is a value greater than or equal to 0.
The embodiment of the disclosure also provides a network device, which includes: a memory, a processor, and a program stored on the memory and executable on the processor, which when executed by the processor, performs the steps of any of the embodiments described above.
The disclosed embodiments also provide a computer-readable storage medium having a program stored thereon, which when executed by a processor, implements the steps of any of the embodiments described above.
The foregoing describes specific embodiments of the present disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
Other embodiments of the present description will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This specification is intended to cover any variations, uses, or adaptations of the specification following, in general, the principles of the specification and including such departures from the present disclosure as come within known or customary practice within the art to which the specification pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the specification being indicated by the following claims.
It is to be understood that the present description is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present description is limited only by the appended claims.
The foregoing description of the preferred embodiments is provided for the purpose of illustration only, and is not intended to limit the scope of the disclosure, since any modifications, equivalents, improvements, etc. that fall within the spirit and principles of the disclosure are intended to be included within the scope of the disclosure.

Claims (10)

1. A method of selecting a forwarding path, the method being applied to a head node device, the method comprising:
the method comprises the steps that head node equipment obtains a first forwarding path of a message to be forwarded, and obtains a plurality of first PREFIX labels corresponding to the first forwarding path;
obtaining a COST value of the first forwarding path by using the plurality of first pre labels and the corresponding relation between the pre labels and the COST value;
comparing the COST value of the first forwarding path with a configured threshold value, and obtaining a comparison result;
if the comparison result is not greater than the threshold value, forwarding the message to be forwarded through a first forwarding path; or alternatively, the process may be performed,
if the comparison result is greater than the threshold value, the message to be forwarded is not forwarded through the first forwarding path.
2. The method of claim 1, wherein the method of obtaining the correspondence comprises:
and obtaining COST values corresponding to each PREFIX label in the routing table, and recording the corresponding relation between each PREFIX label and the COST value.
3. The method of claim 1, wherein the method of configuring the threshold comprises:
obtaining a COST value corresponding to the PREFIX tag, and adding a custom value N to the COST value base to obtain a threshold value corresponding to the PREFIX tag, wherein N is a value greater than or equal to 0.
4. The method according to claim 1, wherein the method further comprises:
and when the route oscillation is detected, re-executing the step of obtaining the COST value of the first forwarding path by utilizing the plurality of first PREFIX labels and the corresponding relation between the PREFIX labels and the COST value.
5. The method of claim 1, wherein after the message to be forwarded is not forwarded through the first forwarding path if the comparison result is greater than the threshold value, the method further comprises:
judging whether a standby path for forwarding the message to be forwarded exists or not, and forwarding the message to be forwarded through the first path if the standby path does not exist.
6. A network device, wherein the network device is a head node device, the network device comprising:
the SR-TE module is used for acquiring a first forwarding path of the message to be forwarded and acquiring a plurality of first PREFIX labels corresponding to the first forwarding path;
the SR-TE module is further configured to obtain a COST value of the first forwarding path by using the plurality of first pre labels and a correspondence between the pre labels and the COST value;
the SR-TE module is also used for comparing the COST value of the first forwarding path with a configured threshold value and obtaining a comparison result;
the sending module is used for forwarding the message to be forwarded through the first forwarding path if the comparison result is not greater than the threshold value; or alternatively, the process may be performed,
if the comparison result is greater than the threshold value, the message to be forwarded is not forwarded through the first forwarding path.
7. The network device of claim 6, wherein the network device further comprises:
and the IGP module is used for acquiring COST values corresponding to each PREFIX label in the routing table and recording the corresponding relation between each PREFIX label and the COST value.
8. The network device of claim 6, wherein the network device further comprises:
the configuration module is used for obtaining the COST value corresponding to the PREFIX tag, and adding the custom value N to the COST value base to obtain the threshold value corresponding to the PREFIX tag, wherein N is a value greater than or equal to 0.
9. A network device, the network device comprising: memory, a processor and a program stored on the memory and executable on the processor, which when executed by the processor, performs the method steps of any one of claims 1 to 5.
10. A computer readable storage medium, characterized in that it has stored thereon a program which, when executed by a processor, implements the method steps of any of claims 1 to 5.
CN202310288823.8A 2023-03-22 2023-03-22 Method for selecting forwarding path, network equipment and storage medium Pending CN116319521A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310288823.8A CN116319521A (en) 2023-03-22 2023-03-22 Method for selecting forwarding path, network equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310288823.8A CN116319521A (en) 2023-03-22 2023-03-22 Method for selecting forwarding path, network equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116319521A true CN116319521A (en) 2023-06-23

Family

ID=86790177

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310288823.8A Pending CN116319521A (en) 2023-03-22 2023-03-22 Method for selecting forwarding path, network equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116319521A (en)

Similar Documents

Publication Publication Date Title
CN108337157B (en) Method and node for transmitting message in network
CN110113259B (en) Path state notification method, path switching method, forwarding equipment and system
US9634924B2 (en) Server-layer shared link risk group analysis to identify potential client-layer network connectivity loss
US10038623B2 (en) Reducing flooding of link state changes in networks
CN110401599B (en) Data packet processing method and device, storage medium and electronic device
CN109889441B (en) Data forwarding method and device
CN112152924A (en) Method and related device for forwarding message in data center network
CN105553844B (en) A kind of transmission method and the network equipment of Link State Notification
CN109787869B (en) Path fault detection method and device
CN112104557B (en) Method and device for detecting link
CN109873766B (en) Message transmission method and device
CN113615132A (en) Fast flooding topology protection
CN105763463A (en) Method and device for transmitting link detection message
CN116319521A (en) Method for selecting forwarding path, network equipment and storage medium
CN111224870A (en) Fault repairing method, equipment and storage medium in SR-MPLS Anycast scene
US20210297321A1 (en) Sparse link-state flooding
CN111385195B (en) Information processing method, device and storage medium
US20170012869A1 (en) Forwarding table management in computer networks
CN108833273B (en) Main/standby switching and electing method, router and medium in VRRP backup group
JP4437818B2 (en) Communication system and node device
CN113872843A (en) Route generation method, route processing method and device
US11811611B2 (en) System and method for backup flooding topology split
CN113691446B (en) Method and device for sending message
EP3806386B1 (en) Multicast fast switching method, device, apparatus, and storage medium
CN111917637B (en) Data message sending method and device

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