CN112333093A - Policy routing path determining method and device, network equipment and readable storage medium - Google Patents
Policy routing path determining method and device, network equipment and readable storage medium Download PDFInfo
- Publication number
- CN112333093A CN112333093A CN202011324904.1A CN202011324904A CN112333093A CN 112333093 A CN112333093 A CN 112333093A CN 202011324904 A CN202011324904 A CN 202011324904A CN 112333093 A CN112333093 A CN 112333093A
- Authority
- CN
- China
- Prior art keywords
- path
- output
- target
- paths
- determining
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/14—Routing performance; Theoretical aspects
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/302—Route determination based on requested QoS
- H04L45/308—Route determination based on user's profile, e.g. premium users
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L47/00—Traffic control in data switching networks
- H04L47/10—Flow control; Congestion control
- H04L47/12—Avoiding congestion; Recovering from congestion
- H04L47/125—Avoiding congestion; Recovering from congestion by balancing the load, e.g. traffic engineering
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The application provides a method and a device for determining a policy routing path, network equipment and a readable storage medium, and relates to the technical field of data communication. The method comprises the following steps: when a service message is received, determining a target path table corresponding to the service message according to the corresponding relation between the service message and output paths, wherein each output path in the target path table has a priority; selecting all output paths with the highest priority from the target path table as candidate paths; and determining a target path from the candidate paths for transmitting the service message. In the scheme, the priority is set for each output path in advance, then the output paths are primarily selected based on the priority to obtain the candidate paths, and then the target path is determined in the obtained candidate paths, so that the corresponding output paths can be selected according to the priority designated by a user, the selection mode of the output paths is enriched, and the problem that the mode of selecting the output paths is not flexible is solved.
Description
Technical Field
The present application relates to the field of data communications, and in particular, to a method and an apparatus for determining a policy routing path, a network device, and a readable storage medium.
Background
Policy Based Routing (PBR) is a more flexible packet Routing and forwarding mechanism than Routing Based on destination IP. After applying the policy routing, the router may determine to perform corresponding forwarding processing on the data packet that needs to be routed according to the routing map. Conventional PBR can only specify the next hop IP, forced egress interface. When a plurality of next hop IPs or a plurality of forced interfaces exist, the route output path can be selected only in the same group of next hop IPs or forced interface groups based on load, so that the route output path selection mode is single.
Disclosure of Invention
Embodiments of the present application provide a method, an apparatus, a network device, and a readable storage medium for determining a policy routing path, which can solve the problem that an output path is selected in a single and inflexible manner.
In order to achieve the above object, embodiments of the present application are implemented as follows:
in a first aspect, an embodiment of the present application provides a policy routing path determining method, where the method includes:
when a service message is received, determining a target path table corresponding to the service message according to the corresponding relation between the service message and output paths, wherein each output path in the target path table has a priority;
selecting all output paths with the highest priority from the target path table as candidate paths;
and determining a target path from the candidate paths for transmitting the service message.
In the above embodiment, the priority is set for each output path in advance, then the output paths are primarily selected based on the priority to obtain the candidate paths, and then the target path is determined in the obtained candidate paths, so that the method is beneficial to selecting the corresponding output path according to the priority specified by the user, the selection mode of the output path is enriched, and the problem that the mode of selecting the output path is not flexible is solved.
With reference to the first aspect, in some optional embodiments, determining a target path from the candidate paths includes:
and when the number of the candidate paths is more than 1, determining the target path from all the candidate paths according to a load balancing strategy.
In the above embodiment, the load balancing policy is favorable for realizing balanced distribution of the load of the output path in the network system, and the influence on normal transmission of data due to excessive load of part of the output paths is avoided.
With reference to the first aspect, in some optional implementations, determining a target path from all the candidate paths according to a load balancing policy includes:
and selecting a path corresponding to a Hash operation result from the candidate paths as the target path according to the load balancing strategy.
In the above embodiment, by selecting the path corresponding to the hash operation result, it is beneficial to ensure that the network devices transmitting the same service at different times are the same as much as possible, and the problem of high network resource overhead caused by the fact that the same service is transmitted by different network devices at different times is solved.
With reference to the first aspect, in some optional embodiments, the method further comprises:
when a failed output path exists in the target path table, deleting the failed output path from the target path table to obtain a temporary path linked list;
and when the output path of the target path table is converted from failure to an effective target output path, adding the target output path into the temporary path linked list to obtain an updated temporary path linked list.
In the above embodiment, the temporary path linked list is maintained and updated, which is beneficial to ensuring that the output paths in the temporary path linked list are all effective output paths.
With reference to the first aspect, in some optional embodiments, the method further comprises:
when the target path fails or an output path with the priority greater than or equal to that of the target path is added in the temporary path linked list, selecting the output path with the highest priority from the temporary path linked list as a new candidate path;
and determining a new target path from the new candidate paths for transmitting the service message.
In the foregoing embodiment, when the target path fails, or when an output path with a priority greater than or equal to that of the target path is added to the temporary path linked list, the selected target path may be prevented from failing, or the selected target path may be prevented from affecting transmission of the packet by reselecting an effective target path.
With reference to the first aspect, in some optional embodiments, the method further comprises:
when the target path fails, determining a new target path from the effective paths of all candidate paths;
and when all the candidate paths fail, determining a new candidate path from the non-failed output paths in the target path table according to the selection sequence of the priority from high to low, and determining a new target path in the new candidate path.
In the above embodiment, the selection is performed in a recursive manner, so that an effective target path can be finally selected, and the influence on the transmission of the message due to the failure of the target path can be avoided.
With reference to the first aspect, in some optional implementations, before determining, according to the correspondence between the service packet and the output path, a target path table corresponding to the service packet, the method further includes:
and when the output paths are configured, setting corresponding priority for each output path.
In the above embodiment, the user can flexibly set the priority of each output path, thereby being beneficial to improving the flexibility of the selected output path.
In a second aspect, an embodiment of the present application further provides a policy routing path determining apparatus, where the apparatus includes:
a path table determining unit, configured to determine, when a service packet is received, a target path table corresponding to the service packet according to a correspondence between the service packet and an output path, where each output path in the target path table has a priority;
a candidate determining unit, configured to select all output paths with the highest priority from the target path table as candidate paths;
and the target determining unit is used for determining a target path from the candidate paths and transmitting the service message.
In a third aspect, an embodiment of the present application further provides a network device, where the network device includes a processor and a memory coupled to each other, and a computer program is stored in the memory, and when the computer program is executed by the processor, the network device is caused to perform the method described above.
In a fourth aspect, the present application further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the above method.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic diagram of communication connection of a network system according to an embodiment of the present application.
Fig. 2 is a schematic structural diagram of a network device according to an embodiment of the present application.
Fig. 3 is a schematic flowchart of a policy routing path determining method according to an embodiment of the present application.
Fig. 4 is a block diagram of a policy routing path determining apparatus according to an embodiment of the present application.
Icon: 10-a network system; 20-a network device; 21-a processing module; 22-a storage module; 23-a communication module; 100-policy routing path determining means; 110-a path table determination unit; 120-a candidate determination unit; 130-target determination unit.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. It should be noted that the terms "first," "second," and the like are used merely to distinguish one description from another, and are not intended to indicate or imply relative importance. The embodiments described below and the features of the embodiments can be combined with each other without conflict.
Referring to fig. 1, an embodiment of the present application provides a network system 10, which can be applied to a three-layer PBR. Network system 10 may include a plurality of network devices 20, and the plurality of network devices 20 may form a routing topology. Network device 20 may be a router or a switch for forwarding data.
For example, in fig. 1, network system 10 may include network device a and network device B. Among them, there are usually a plurality of transmission paths through which communication can be performed between the network device a and the network device B. For example, in fig. 1, there may be an output path 1, an output path 2, …, and an output path N between network device a and network device B, where N is an integer greater than 2.
Each transmission path may pass through one or more intermediate devices. That is, a plurality of intermediate devices exist between the network device a and the network device B. The intermediate device is a router or a switch, and is used as a communication bridge for connecting the network device A and the network device B.
Referring to fig. 2, an embodiment of the present application further provides a network device 20 that can be applied to the network system 10, where the network device 20 may include a processing module 21 and a storage module 22. The memory module 22 stores therein a computer program which, when executed by said processing module 21, enables the network device 20 to perform the steps of the method described below.
Of course, the network device 20 may also include other modules, for example, the network device 20 may also include a communication module 23, and the policy routing path determining apparatus 100 solidified in the storage module 22. The processing module 21, the storage module 22, and the communication module 23 are electrically connected to each other directly or indirectly to implement data transmission or interaction. For example, the components may be electrically connected to each other via one or more communication buses or signal lines.
Referring to fig. 3, an embodiment of the present application further provides a policy routing path determining method, which can be applied to the network device 20, and the network device 20 executes or implements each step of the method. The method may comprise the steps of:
step S210, when a service message is received, determining a target path table corresponding to the service message according to the corresponding relation between the service message and output paths, wherein each output path in the target path table has a priority;
step S220, all output paths with the highest priority are selected from the target path table as candidate paths;
step S230, determining a target path from the candidate paths, for transmitting the service packet.
In the above embodiment, the priority is set for each output path in advance, then the output paths are primarily selected based on the priority to obtain the candidate paths, and then the target path is determined in the obtained candidate paths, so that the method is beneficial to selecting the corresponding output path according to the priority specified by the user, the selection mode of the output path is enriched, and the problem that the mode of selecting the output path is not flexible is solved.
The individual steps of the process are explained in detail below, as follows:
in step S210, the service packet may be understood as a data packet corresponding to the service traffic to be transmitted. The traffic flow may be determined according to actual conditions, for example, the data corresponding to the traffic flow may include, but is not limited to, network resources such as pictures, videos, documents, and the like, and is not limited in this respect.
Before executing step S210, the network device 20 stores the corresponding relationship between the service packet and the output path in advance. The corresponding relation can be determined according to actual conditions. For example, in PBR, PBR is composed of two parts, Match and Set. Match refers to matching and hitting information such as the service type, the message source, the message destination and the like of the flow message. The Set refers to a flow message after Match hit, and specifies an output mode according to needs. When Set specifies output, the output path may include, but is not limited to, a next hop IP (Internet Protocol) address, a forced egress interface, a dependent routing egress interface, and the like.
The user may establish a corresponding relationship with the corresponding output path according to the information of the service type, the message source, the message destination, and the like of the service message, and store the corresponding relationship in the network device 20. The message corresponding to one service may establish a corresponding relationship with a plurality of output paths, and the manner of establishing the corresponding relationship is well known to those skilled in the art and is not described herein again. Based on this, when the network device 20 receives the service packet, all output paths corresponding to the service packet may be matched according to the pre-configured correspondence relationship, in combination with information such as the service type, the packet source, and the packet destination of the service packet. All output paths matched include currently active output paths and currently inactive output paths. All output paths matched may constitute a path chain table. And the path linked list corresponding to the current service message is the target path list.
Each output path in the path chain table is preset with a corresponding priority, the priority of each output path can be set according to the actual requirement of a user, and the priorities between the output paths can be the same or different, and are not specifically limited here.
Illustratively, the priority may include 10 values from 0 to 9, with the smaller the value of the priority, the higher the priority. For example, when the priority value is 0, the priority is highest. Of course, in other embodiments, the number of levels included in the priority may not be limited to 10, and may be set according to actual situations.
In step S220, the target path table generally includes a plurality of output paths, and the plurality of output paths may include different levels of priority. Network device 20 may select the highest priority output path from the target path table. The output path with the highest priority in the target path table may be one or more, and may be determined according to actual conditions.
In step S230, the network device 20 may select a target path from the candidate paths according to the corresponding selection policy. The selected target path is used as the path for transmitting the service message. The selection strategy can be determined according to actual conditions. For example, the selection policy may be a load balancing policy or other policy.
As an alternative implementation, step S230 may include: when the number of the candidate paths is larger than 1, determining the target path from all the candidate paths according to a load balancing strategy; and when the number of the candidate paths is 1, taking the candidate paths as the target paths.
The load balancing strategy can be determined according to actual conditions. For example, the load balancing policy may be to select a path with the largest idle bandwidth from the candidate paths as a target path; alternatively, the load balancing policy may be to select a path with the highest stability or reliability of transmission among the candidate paths as the target path. Or, the load balancing policy may select a path with the largest ratio of idle bandwidth to total bandwidth in the candidate paths as the target path.
In the foregoing embodiment, the load balancing policy is favorable for implementing balanced distribution of the load of the output paths in the network system 10, and avoids that the normal transmission of data is affected due to an excessive load of a part of the output paths.
As an alternative implementation, step S230 may include: and selecting a path corresponding to a Hash operation result from the candidate paths as the target path according to the load balancing strategy.
The hash operation result may be understood as performing hash operation based on information such as a service type, a message source, a message destination, etc. of the service message to obtain a hash value corresponding to the service, then binding the hash value with a target path for transmitting the service message, and subsequently selecting the network device 20 in the target path bound with the hash value as much as possible to forward data when transmitting the service message. Therefore, the network devices 20 transmitting the same service at different times are ensured to be the same as much as possible, and the problem of high network resource overhead caused by the fact that the same service is transmitted by different network devices 20 at different times is solved.
As an optional implementation manner, before step S210, the method may further include: and when the output paths are configured, setting corresponding priority for each output path.
Understandably, the user can set the priorities of different output paths according to actual requirements, or the user can randomly set the priorities of different output paths. For example, the priority level may have any value from 0 to 9, and the priority levels of different output paths may be the same or different.
In order to avoid an excessive number of output paths with the same priority in the path linked list, when setting the priority of an output path, the number of output paths with the same priority may be limited for all output paths of the same service, for example, the number of output paths with the same priority may not exceed a set number. The number of the setting may be determined according to actual conditions, and may be, for example, 10. For example, when setting priorities of all output paths of the same service, if the number of output paths of the same priority "0" is 10, the priorities of the remaining output paths without priorities set cannot be set to "0", and the set priority value can only be selected from 1 to 9, ensuring that the number of output paths of the same priority does not exceed 10.
As an optional implementation manner, after step S230, the method may further include:
when a failed output path exists in the target path table, deleting the failed output path from the target path table to obtain a temporary path linked list;
and when the output path of the target path table is converted from failure to an effective target output path, adding the target output path into the temporary path linked list to obtain an updated temporary path linked list.
In this embodiment, the network device 20 may detect the validity of each output path in the target path table in real time. The target path table may include valid and invalid output paths. The temporary path link list is usually all valid output paths. When the candidate path is selected, the selection can be performed from the temporary path linked list so as to improve the effectiveness of the selected candidate path.
The effective output path is a communication reachable path, and the message can be transmitted to the opposite terminal device through the output path. The failed output path is a path that cannot be reached by communication, and the message cannot be transmitted to the opposite-end device through the output path.
In the embodiment, the temporary path linked list is maintained and updated, so that the output paths in the temporary path linked list are all effective output paths, follow-up of the temporary path linked list is facilitated to determine effective target paths, and the reliability of the determined target paths is improved.
As an optional implementation manner, after step S230, the method may further include:
when the target path fails or an output path with the priority greater than or equal to that of the target path is added in the temporary path linked list, selecting the output path with the highest priority from the temporary path linked list as a new candidate path;
and determining a new target path from the new candidate paths for transmitting the service message.
Understandably, when the target path fails or an output path with the priority greater than or equal to that of the target path is added in the temporary path chain table, a new target path can be reselected as a path for transmitting the service message, so that the reliability of the selected target path is improved, and the selection mode of the path is enriched.
As an optional implementation manner, after step S230, the method may further include:
when the target path fails, determining a new target path from the effective paths of all candidate paths;
and when all the candidate paths fail, determining a new candidate path from the non-failed output paths in the target path table according to the selection sequence of the priority from high to low, and determining a new target path in the new candidate path.
For example, it is assumed that the target path table corresponding to the service packet includes path 1 to path 5, where the priority of path 1, path 2, and path 3 is the same and highest, and is "0"; the priority of the path 4 and the path 5 is "1" in both cases. Network device 20 may determine that the candidate path corresponding to the service packet is: path 1, path 2, and path 3. When the path 1 as the target path fails, the network device 20 may select one of the paths 2 and 3 as a new target path according to the load balancing policy. If the path 1, the path 2 and the path 3 are all invalid, one path can be selected from the effective path 4 and the effective path 5 as a new target path, so that the effective target path can be selected and obtained through a recursive selection mode, and the phenomenon that the selected output path is invalid and goes back to the Underlay network to influence the transmission of the message is avoided.
The implementation of the method will be illustrated below by way of example, as follows:
for the target path table of the same service, in order to distinguish the same priority, a corresponding Key value may be assigned to each output path. The Key value can be calculated by the following formula:
Key=p*100+q
wherein, p is a priority value and can be any integer from 0 to 9; q is the serial number of the current output path in the same priority, and may be any integer from 0 to 9. For example, the priority values of the path a, the path B, and the path C are all 0, and the sequence numbers are 1, 2, and 3, respectively. The priority of the path D and the priority of the path E are both 1, and the sequence numbers are 1 and 2 respectively. Then Key 0 x 100+1 x 1 of path a; key 0 × 100+2 of route B is 2; key 0 × 100+3 — 3 of route C; key 1 × 100+1 × 101 of route D; key 1 × 100+2 of path E102. The Key values of the output paths may be stored as index values in descending order.
In other embodiments, the Key value may store the record as a two-dimensional matrix index set [ p ] [ q ]. Wherein set [ p ] [ q ] points to the linked list node whose Key is p × 100+ q, and can be used as the temporary path linked list of the effective output path. Network device 20 may store a count of valid output paths in each set p, with a count of 0 indicating that the number of valid output paths of value p for the current priority is 0. The network device 20 may select an effective target path from the effective paths with the highest priority according to the hash operation result; if the output path selected according to the hash operation result is invalid (if the path is a dependent route output interface, and if the interface is not matched with the output interface in the destination IP routing table, the output path is also invalid), deleting the output path from the index table set [ p ] [ q ], updating the count of the valid path, and performing recursive selection until the target path is selected.
Based on the design, the method can flexibly meet the requirements of a user on priority and load balance when the user specifies an output path; when the recursive selection needs to be supported, a new target path is determined by using the temporary path linked list, so that the efficiency of selecting an output path can be improved, and the memory resource of the network device 20 is saved.
Referring to fig. 4, an embodiment of the present application further provides a policy routing path determining apparatus 100, which can be applied to the network device 20 described above for executing the steps in the method. The policy routing path determining apparatus 100 includes at least one software function module which may be stored in the storage module 22 in the form of software or Firmware (Firmware) or solidified in an Operating System (OS) of the network device 20. The processing module 21 is used for executing executable modules stored in the storage module 22, such as a software function module and a computer program included in the policy routing path determining apparatus 100.
The policy routing path determining apparatus 100 may include a path table determining unit 110, a candidate determining unit 120, and a target determining unit 130, and the following steps may be performed:
a path table determining unit 110, configured to determine, when a service packet is received, a target path table corresponding to the service packet according to a correspondence between the service packet and an output path, where each output path in the target path table has a priority;
a candidate determining unit 120, configured to select all output paths with the highest priority from the target path table as candidate paths;
a target determining unit 130, configured to determine a target path from the candidate paths, where the target path is used to transmit the service packet.
Optionally, the target determining unit 130 may determine the target path from all the candidate paths according to a load balancing policy when the number of the candidate paths is greater than 1.
Optionally, the target determining unit 130 may be further configured to select, according to the load balancing policy, a path corresponding to the hash operation result from the candidate paths as the target path.
Optionally, the policy routing path determining apparatus 100 may further include a linked list updating unit. The linked list updating unit is used for:
when a failed output path exists in the target path table, deleting the failed output path from the target path table to obtain a temporary path linked list;
and when the output path of the target path table is converted from failure to an effective target output path, adding the target output path into the temporary path linked list to obtain an updated temporary path linked list.
Optionally, the candidate determining unit 120 may be further configured to: when the target path fails or an output path with the priority greater than or equal to that of the target path is added in the temporary path linked list, selecting the output path with the highest priority from the temporary path linked list as a new candidate path; the target determination unit 130 may also be configured to: and determining a new target path from the new candidate paths for transmitting the service message.
Optionally, the target determination unit 130 may be further configured to:
when the target path fails, determining a new target path from the effective paths of all candidate paths;
and when all the candidate paths fail, determining a new candidate path from the non-failed output paths in the target path table according to the selection sequence of the priority from high to low, and determining a new target path in the new candidate path.
Optionally, the policy routing path determining apparatus 100 may further include a configuration unit, configured to set a corresponding priority for each output path when configuring the output path.
In this embodiment, the processing module 21 may be an integrated circuit chip having signal processing capability. The processing module 21 may be a general-purpose processor. For example, the processor may be a Central Processing Unit (CPU), a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, and may implement or execute the methods, steps, and logic blocks disclosed in the embodiments of the present Application.
The memory module 22 may be, but is not limited to, a random access memory, a read only memory, a programmable read only memory, an erasable programmable read only memory, an electrically erasable programmable read only memory, and the like. In this embodiment, the storage module 22 may be configured to store a path linked list, a correspondence between a service packet and an output path, and the like. Of course, the storage module 22 may also be used for storing a program, and the processing module 21 executes the program after receiving the execution instruction.
The communication module 23 is configured to establish a communication connection between the network device 20 and another device through a network, and to transmit and receive data through the network.
It is understood that the configuration shown in fig. 2 is only one schematic configuration of the network device 20, and the network device 20 may further include more components than those shown in fig. 2. The components shown in fig. 2 may be implemented in hardware, software, or a combination thereof.
It should be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the network device 20 and the policy routing path determining apparatus 100 described above may refer to the corresponding processes of each step in the foregoing method, and are not described in detail herein.
The embodiment of the application also provides a computer readable storage medium. The computer-readable storage medium has stored therein a computer program which, when run on a computer, causes the computer to execute the policy routing path determining method as described in the above embodiments.
From the above description of the embodiments, it is clear to those skilled in the art that the present application can be implemented by hardware, or by software plus a necessary general hardware platform, and based on such understanding, the technical solution of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method described in the embodiments of the present application.
In summary, embodiments of the present application provide a policy routing path determining method, an apparatus, a network device, and a readable storage medium. The method comprises the following steps: when a service message is received, determining a target path table corresponding to the service message according to the corresponding relation between the service message and output paths, wherein each output path in the target path table has a priority; selecting all output paths with the highest priority from the target path table as candidate paths; and determining a target path from the candidate paths for transmitting the service message. In the scheme, the priority is set for each output path in advance, then the output paths are primarily selected based on the priority to obtain the candidate paths, and then the target path is determined in the obtained candidate paths, so that the corresponding output paths can be selected according to the priority designated by a user, the selection mode of the output paths is enriched, and the problem that the mode of selecting the output paths is not flexible is solved.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus, system, and method may be implemented in other ways. The apparatus, system, and method embodiments described above are illustrative only, as the flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims (10)
1. A policy routing path determination method, the method comprising:
when a service message is received, determining a target path table corresponding to the service message according to the corresponding relation between the service message and output paths, wherein each output path in the target path table has a priority;
selecting all output paths with the highest priority from the target path table as candidate paths;
and determining a target path from the candidate paths for transmitting the service message.
2. The method of claim 1, wherein determining a target path from the candidate paths comprises:
and when the number of the candidate paths is more than 1, determining the target path from all the candidate paths according to a load balancing strategy.
3. The method of claim 2, wherein determining a target path from all of the candidate paths according to a load balancing policy comprises:
and selecting a path corresponding to a Hash operation result from the candidate paths as the target path according to the load balancing strategy.
4. The method of claim 1, further comprising:
when a failed output path exists in the target path table, deleting the failed output path from the target path table to obtain a temporary path linked list;
and when the output path of the target path table is converted from failure to an effective target output path, adding the target output path into the temporary path linked list to obtain an updated temporary path linked list.
5. The method of claim 4, further comprising:
when the target path fails or an output path with the priority greater than or equal to that of the target path is added in the temporary path linked list, selecting the output path with the highest priority from the temporary path linked list as a new candidate path;
and determining a new target path from the new candidate paths for transmitting the service message.
6. The method of claim 1, further comprising:
when the target path fails, determining a new target path from the effective paths of all candidate paths;
and when all the candidate paths fail, determining a new candidate path from the non-failed output paths in the target path table according to the selection sequence of the priority from high to low, and determining a new target path in the new candidate path.
7. The method according to claim 1, wherein before determining a target path table corresponding to the service packet according to a correspondence between the service packet and an output path, the method further comprises:
and when the output paths are configured, setting corresponding priority for each output path.
8. An apparatus for policy routing path determination, the apparatus comprising:
a path table determining unit, configured to determine, when a service packet is received, a target path table corresponding to the service packet according to a correspondence between the service packet and an output path, where each output path in the target path table has a priority;
a candidate determining unit, configured to select all output paths with the highest priority from the target path table as candidate paths;
and the target determining unit is used for determining a target path from the candidate paths and transmitting the service message.
9. A network device, characterized in that the network device comprises a processor and a memory coupled to each other, the memory storing a computer program which, when executed by the processor, causes the network device to perform the method according to any one of claims 1-7.
10. A computer-readable storage medium, in which a computer program is stored which, when run on a computer, causes the computer to carry out the method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011324904.1A CN112333093A (en) | 2020-11-23 | 2020-11-23 | Policy routing path determining method and device, network equipment and readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011324904.1A CN112333093A (en) | 2020-11-23 | 2020-11-23 | Policy routing path determining method and device, network equipment and readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112333093A true CN112333093A (en) | 2021-02-05 |
Family
ID=74321112
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011324904.1A Pending CN112333093A (en) | 2020-11-23 | 2020-11-23 | Policy routing path determining method and device, network equipment and readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112333093A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113300958A (en) * | 2021-05-24 | 2021-08-24 | 北京字跳网络技术有限公司 | Message transmission method and device, electronic equipment and storage medium |
CN114500404A (en) * | 2022-01-25 | 2022-05-13 | 银清科技有限公司 | Communication message transmission isolation method and device |
CN114915582A (en) * | 2021-02-09 | 2022-08-16 | 华为技术有限公司 | Message forwarding method, device and system |
CN115118544A (en) * | 2021-03-08 | 2022-09-27 | 北京华为数字技术有限公司 | Communication method and device, and communication system |
CN116016337A (en) * | 2023-01-03 | 2023-04-25 | 苏州盛科科技有限公司 | Message forwarding method and device, electronic equipment and storage medium |
CN117792987A (en) * | 2023-12-29 | 2024-03-29 | 南京软仪测试技术有限公司 | Emergency communication channel shunting method based on edge calculation |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103229462A (en) * | 2012-12-22 | 2013-07-31 | 华为技术有限公司 | Optimal-path selection method, related device and communication system |
CN103401802A (en) * | 2013-08-26 | 2013-11-20 | 盛科网络(苏州)有限公司 | Transmission protocol based message load balancing method and device |
CN103973567A (en) * | 2014-05-06 | 2014-08-06 | 华为技术有限公司 | Method and device for route configuration of virtual private network |
CN106209623A (en) * | 2016-07-08 | 2016-12-07 | 华为技术有限公司 | Determine method and the control equipment of forward-path |
CN106559324A (en) * | 2015-09-24 | 2017-04-05 | 华为技术有限公司 | A kind of method E-Packeted based on equal cost multipath and the network equipment |
CN106909322A (en) * | 2017-02-27 | 2017-06-30 | 郑州云海信息技术有限公司 | The method for routing and device for supporting storage calamity standby in a kind of virtualization system |
CN107896190A (en) * | 2017-12-26 | 2018-04-10 | 新华三技术有限公司 | It route system of selection, device and the routing device of outgoing interface |
CN108399046A (en) * | 2017-02-06 | 2018-08-14 | 百度在线网络技术(北京)有限公司 | File operation requests treating method and apparatus |
CN109150706A (en) * | 2017-06-15 | 2019-01-04 | 中兴通讯股份有限公司 | A kind of recognition methods in risk path and device |
CN110708242A (en) * | 2019-10-28 | 2020-01-17 | 迈普通信技术股份有限公司 | Traffic scheduling method and device, electronic equipment and storage medium |
CN110795442A (en) * | 2019-09-27 | 2020-02-14 | 北京浪潮数据技术有限公司 | Key value updating method, device, equipment and readable storage medium |
CN111490944A (en) * | 2020-03-31 | 2020-08-04 | 新华三信息安全技术有限公司 | Information processing method, device, equipment and machine-readable storage medium |
CN111817959A (en) * | 2020-07-16 | 2020-10-23 | 迈普通信技术股份有限公司 | Network path management method and device, SDN controller and readable storage medium |
-
2020
- 2020-11-23 CN CN202011324904.1A patent/CN112333093A/en active Pending
Patent Citations (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103229462A (en) * | 2012-12-22 | 2013-07-31 | 华为技术有限公司 | Optimal-path selection method, related device and communication system |
CN103401802A (en) * | 2013-08-26 | 2013-11-20 | 盛科网络(苏州)有限公司 | Transmission protocol based message load balancing method and device |
CN103973567A (en) * | 2014-05-06 | 2014-08-06 | 华为技术有限公司 | Method and device for route configuration of virtual private network |
CN106559324A (en) * | 2015-09-24 | 2017-04-05 | 华为技术有限公司 | A kind of method E-Packeted based on equal cost multipath and the network equipment |
US20190149450A1 (en) * | 2016-07-08 | 2019-05-16 | Huawei Technologies Co., Ltd. | Method for determining forwarding path and control device |
CN106209623A (en) * | 2016-07-08 | 2016-12-07 | 华为技术有限公司 | Determine method and the control equipment of forward-path |
CN108399046A (en) * | 2017-02-06 | 2018-08-14 | 百度在线网络技术(北京)有限公司 | File operation requests treating method and apparatus |
CN106909322A (en) * | 2017-02-27 | 2017-06-30 | 郑州云海信息技术有限公司 | The method for routing and device for supporting storage calamity standby in a kind of virtualization system |
CN109150706A (en) * | 2017-06-15 | 2019-01-04 | 中兴通讯股份有限公司 | A kind of recognition methods in risk path and device |
CN107896190A (en) * | 2017-12-26 | 2018-04-10 | 新华三技术有限公司 | It route system of selection, device and the routing device of outgoing interface |
CN110795442A (en) * | 2019-09-27 | 2020-02-14 | 北京浪潮数据技术有限公司 | Key value updating method, device, equipment and readable storage medium |
CN110708242A (en) * | 2019-10-28 | 2020-01-17 | 迈普通信技术股份有限公司 | Traffic scheduling method and device, electronic equipment and storage medium |
CN111490944A (en) * | 2020-03-31 | 2020-08-04 | 新华三信息安全技术有限公司 | Information processing method, device, equipment and machine-readable storage medium |
CN111817959A (en) * | 2020-07-16 | 2020-10-23 | 迈普通信技术股份有限公司 | Network path management method and device, SDN controller and readable storage medium |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114915582A (en) * | 2021-02-09 | 2022-08-16 | 华为技术有限公司 | Message forwarding method, device and system |
CN115118544A (en) * | 2021-03-08 | 2022-09-27 | 北京华为数字技术有限公司 | Communication method and device, and communication system |
CN115118544B (en) * | 2021-03-08 | 2024-04-12 | 北京华为数字技术有限公司 | Communication method, device, and communication system |
CN113300958A (en) * | 2021-05-24 | 2021-08-24 | 北京字跳网络技术有限公司 | Message transmission method and device, electronic equipment and storage medium |
CN114500404A (en) * | 2022-01-25 | 2022-05-13 | 银清科技有限公司 | Communication message transmission isolation method and device |
CN114500404B (en) * | 2022-01-25 | 2024-02-20 | 银清科技有限公司 | Communication message transmission isolation method and device |
CN116016337A (en) * | 2023-01-03 | 2023-04-25 | 苏州盛科科技有限公司 | Message forwarding method and device, electronic equipment and storage medium |
CN117792987A (en) * | 2023-12-29 | 2024-03-29 | 南京软仪测试技术有限公司 | Emergency communication channel shunting method based on edge calculation |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112333093A (en) | Policy routing path determining method and device, network equipment and readable storage medium | |
EP3806405B1 (en) | Method and network node for sending network performance parameter and calculating network performance | |
US20190288936A1 (en) | Protection switching method and system, and network device | |
US20200351328A1 (en) | Data transmission method, device, equipment, and readable storage medium | |
US20200228436A1 (en) | Route selection method and apparatus based on hybrid resource, and server thereof | |
KR20210127985A (en) | Method and system for determining packet forwarding path, and network node | |
CN108809847B (en) | Method, device and network system for realizing load balance | |
CN101820395A (en) | Routing information configuration and private network label addition method and device based on MPLS (Multiple Protocol Label Switching) | |
CN114143283A (en) | Tunnel self-adaptive configuration method and device, center-end equipment and communication system | |
CN111817959A (en) | Network path management method and device, SDN controller and readable storage medium | |
CN111740903B (en) | Data transmission method and device | |
CN114726796B (en) | Flow control method, gateway and switch | |
CN110311861B (en) | Method and device for guiding data flow | |
CN111130871B (en) | Protection switching method and device and network equipment | |
CN113453262A (en) | Bidirectional Forwarding Detection (BFD) method and device | |
CN104348737A (en) | Multicast message transmission method and switches | |
CN117061625A (en) | Method for detecting path maximum transmission unit and related equipment | |
CN106331004A (en) | Method and device for server load balancing | |
JP6586374B2 (en) | COMMUNICATION DEVICE, ROUTE MANAGEMENT SERVER, COMMUNICATION METHOD, AND VIRTUAL PORT ALLOCATION METHOD | |
CN113259248B (en) | Method and device for determining link for forwarding service flow | |
CN114172841A (en) | Message forwarding method and device, electronic equipment and reading and storing medium | |
EP1940092B1 (en) | Method and device for selecting a sub-route | |
CN114465834A (en) | A method for user access processing and related equipment | |
WO2024040959A1 (en) | Packet forwarding processing method and apparatus, storage medium, and electronic device | |
CN114007152B (en) | Port convergence processing method and device for optical fiber switch |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210205 |