Disclosure of Invention
The present specification provides a method, an apparatus, a routing device, and a storage medium for selecting a path, by which, when a Candidate path is selected, a Candidate path of a corresponding trusted routing level can be selected according to a requirement of a client to forward a traffic.
The embodiment of the specification provides a method for selecting a path, which is applied to an SR-Policy network and comprises the following steps:
acquiring traffic to be forwarded;
determining a first trusted routing level corresponding to the traffic to be forwarded according to first attribute information carried in the traffic to be forwarded;
determining a first service level agreement SLA met by the traffic to be forwarded according to second attribute information carried in the traffic to be forwarded;
and determining a target Color corresponding to the flow to be forwarded according to the first trusted routing level and the first SLA, and determining a forwarding path according to the target Color.
Optionally, the first attribute information includes: a traffic forwarding attribute;
the determining, according to the first attribute information carried in the traffic to be forwarded, a first trusted routing level corresponding to the traffic to be forwarded specifically includes:
acquiring the first attribute information, and determining a first service attribute of the traffic to be forwarded according to the first attribute information;
and acquiring a first trusted routing level corresponding to the first service attribute according to the corresponding relation between the preset service attribute and the trusted routing level.
Optionally, the first attribute information includes: the preset trust level carried in the traffic to be forwarded;
the determining, according to the first attribute information carried in the traffic to be forwarded, a first trusted routing level corresponding to the traffic to be forwarded specifically includes:
acquiring a preset trust level carried in the traffic to be forwarded;
and taking the preset trust level as a first trusted routing level.
Optionally, the second attribute information includes: a traffic forwarding quality attribute;
the determining, according to the second attribute information carried in the traffic to be forwarded, the first SLA that the traffic to be forwarded satisfies includes:
and calculating the flow forwarding quality attribute carried in the flow to be forwarded, determining whether an SLA meeting the calculation result exists, if so, acquiring the SLA, and taking the acquired SLA as a first SLA.
Optionally, this embodiment may further include: setting a Color of the SR-Policy network, wherein the Color comprises: trusted routing levels and SLAs;
determining a target color corresponding to the traffic to be forwarded according to the first trusted routing level and the first SLA, and determining a forwarding path according to the target color, specifically comprising:
determining a preselected Color of which the Color is not less than the first credible route level according to the first credible route level;
determining a target Color from the pre-selected Color that satisfies the first SLA according to the first SLA.
The embodiment of the present specification further provides a method for generating a path, where the method is applied to a head node of an SR-Policy network, and the method includes:
acquiring first attribute information and second attribute information of traffic to be forwarded;
setting a Color attribute according to the first attribute information and the second attribute information, wherein the Color attribute comprises: trusted routing level, service level agreement SLA;
setting an Endpoint attribute according to the destination address of the flow to be forwarded;
calculating a forwarding path according to the Color attribute and the Endpoint attribute;
the first attribute information is used for determining a trusted routing level, and the second attribute is used for determining a service level agreement SLA.
Optionally, the first attribute includes: and the traffic forwarding attribute or a preset trust level carried in the traffic to be forwarded.
Optionally, the second attribute includes: traffic forwarding quality attributes.
An embodiment of the present specification further provides an apparatus for selecting a path, where the apparatus includes:
the acquisition module is used for acquiring traffic to be forwarded;
the calculation module is used for determining a first trusted routing level corresponding to the traffic to be forwarded according to first attribute information carried in the traffic to be forwarded;
the calculation module is used for determining a first service level agreement SLA met by the traffic to be forwarded according to second attribute information carried in the traffic to be forwarded;
and the processing module is used for determining a target Color corresponding to the flow to be forwarded according to the first trustable routing level and the first SLA, and determining a forwarding path according to the target Color.
Optionally, the first attribute information includes: a traffic forwarding attribute;
the calculation module is further configured to obtain the first attribute information, and determine a first service attribute of the traffic to be forwarded according to the first attribute information;
and acquiring a first trusted routing level corresponding to the first service attribute according to the corresponding relation between the preset service attribute and the trusted routing level.
Optionally, the first attribute information includes: the preset trust level carried in the traffic to be forwarded;
the computing module is further configured to obtain a preset trust level carried in the traffic to be forwarded;
and taking the preset trust level as a first trusted routing level.
Optionally, the second attribute information includes: a traffic forwarding quality attribute;
the calculation module is further configured to calculate a traffic forwarding quality attribute carried in the traffic to be forwarded, determine whether an SLA meeting the calculation result exists, acquire the SLA if the SLA exists, and use the acquired SLA as a first SLA.
Optionally, the apparatus further comprises: the setting module is used for setting the Color of the SR-Policy network, and the Color comprises the following components: trusted routing levels and SLAs;
the processing module is also used for determining a preselected Color of which the Color is not less than the first credible route level according to the first credible route level;
determining a target Color from the pre-selected Color that satisfies the first SLA according to the first SLA.
The embodiment of the present specification further provides an apparatus for generating a path, where the apparatus is applied to a head node, and the apparatus includes:
an acquisition module: acquiring first attribute information and second attribute information of traffic to be forwarded;
a processing module: setting a Color attribute according to the first attribute information and the second attribute information, wherein the Color attribute comprises: trusted routing level, service level agreement SLA;
the processing module is used for: the method is also used for setting an Endpoint attribute according to the destination address of the flow to be forwarded;
the processing module is used for: the forwarding path is also calculated according to the Color attribute and the Endpoint attribute;
the first attribute information is used for determining a trusted routing level, and the second attribute is used for determining a service level agreement SLA.
An embodiment of the present specification further provides a routing device, where the routing device includes: a processor and a machine-readable storage medium;
the machine-readable storage medium stores machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: the steps of any of the embodiments described above are implemented.
Embodiments of the present specification also provide a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to: the steps of any of the embodiments described above are implemented.
Through the embodiments, when the flow forwarding path is selected in the SR-Policy network (Candidate path selection), the corresponding first trusted routing level may be obtained according to the first attribute information, and the matching forwarding path is selected according to the first trusted routing level and the SLA, so that the security requirement of the user on the forwarding path is satisfied.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present specification. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the specification, as detailed in the appended claims.
The terminology used in the description 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 and 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 herein 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 specification. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
At present, the industry is more and more paying attention to the safety of the routing, and the technology industry based on the credible routing level is in the middle of research. The trusted routing nodes refer to routing nodes in the forwarding domain which are respectively set with trusted levels. The routing node obtains an initial credibility level after registering with the credible management server, and the credibility level of the routing node can be dynamically adjusted through abnormal detection. When the service is forwarded, the service can be transmitted by selecting the routing node above a certain security level according to the requirement of the service on the security.
However, at present, when a forwarding path is selected in an SR Policy network, an appropriate path is selected mainly according to SLA satisfaction, and SR Policy does not support selection calculation of a trusted routing level path.
The embodiment of the present specification provides a method for selecting a path, where the method is applied to a routing device supporting an SR-Policy network, where the routing device includes a router, a switch, or a server with a virtual routing function, and as shown in fig. 1: the method comprises the following steps:
s101, acquiring traffic to be forwarded;
s102, determining a first trustable routing level corresponding to the traffic to be forwarded according to first attribute information carried in the traffic to be forwarded;
s103, determining a first service level agreement SLA met by the traffic to be forwarded according to second attribute information carried in the traffic to be forwarded;
s104, determining a target Color corresponding to the flow to be forwarded according to the first trustable routing level and the first SLA, and determining a forwarding path according to the target Color.
In step S102, the first attribute information may include a traffic forwarding attribute, for example, information used to guide forwarding, such as a five-tuple (a source address, a destination address, a protocol number, a source port, a destination port) and/or a VPN, carried in a traffic message, determine a service attribute (e.g., email, video, voice, etc.) of the traffic to be forwarded, and determine a first trusted routing level corresponding to the first attribute information according to a correspondence between the service attribute preset in the routing device and the trusted routing level.
In a specific implementation, an administrator may preset, by a controller in a network, for example, a controller in an SDN network, a correspondence between a service attribute and a trusted routing level for the routing device, for example: setting a trusted routing level corresponding to email to be 5, setting a trusted routing level corresponding to video to be 4, and setting a trusted routing level corresponding to voice to be 3, where in this embodiment, the higher the trusted routing level value is, the higher the degree of requiring trusted routing is represented. In another implementation, the administrator may also perform field setting directly in the routing device, and this specification is not limited thereto.
In another embodiment, when the traffic source sends the traffic to be forwarded, a preset trust level may be directly carried in the traffic to be forwarded, where the preset trust level may be a level value, and the level value may be loaded into a field identifier in the IP address. It should be noted that the method for loading the rank value in this embodiment is only an exemplary illustration, and is not used to limit the technical solutions in this specification.
When the routing equipment acquires the traffic to be forwarded carrying the preset trust level, the routing equipment acquires the preset trust level value and takes the acquired preset trust level value as a first trusted routing level.
In step S103, the second attribute information may be an attribute used to characterize the traffic forwarding quality, such as an attribute index of bandwidth, delay, jitter, packet loss, reliability, and security.
After acquiring the traffic to be forwarded, the routing device may acquire corresponding second attribute information according to a preset setting, for example, the acquired second attribute information is delay <100, and acquire a corresponding SLA according to the second attribute information.
Before step S104 is executed, this specification further provides an embodiment of setting a Color extended community attribute, where an administrator may set the Color extended community attribute of the SR-Policy network through a controller (e.g., an SDN controller) or directly in a routing device, where the configuration content includes a corresponding relationship between a trusted routing level and an SLA, for example, as shown in table 1:
| Color | trusted Routing Level (TRL) | SLA |
| Color1 |
| 3 | Delay 50 |
| Color2 | 5 | Delay120 |
| Color3 |
| 5 | Delay 80 |
TABLE 1
In table 1, Color1, Color2, and Color3 are listed, different colors correspond to different trusted routing levels and SLAs, and when an administrator sets the trusted routing levels and SLAs, the administrator can set the corresponding relationship between the trusted routing levels and the SLAs in the manner of table 1.
The routing device may determine a corresponding Color according to a first trusted routing level obtained from the traffic to be forwarded and the satisfied first service level agreement SLA.
Specifically, a preselected Color not less than a first trusted routing level may be obtained from a corresponding relationship between the set trusted routing level and the SLA according to the first trusted routing level, and a target Color satisfying the first SLA is determined from the preselected Color according to the first SLA.
An embodiment of the present specification provides a method for selecting a path, where as shown in fig. 2, a routing device RrouterA obtains traffic to be forwarded, where second attribute information of the traffic to be forwarded includes: delay <100, and a first trusted routing level of 5 as determined from the tape forwarding traffic.
It may be determined that the routing device needs to select a path transmission with a trusted route level greater than or equal to 5 and Delay <100 when selecting Color.
Through the information and table 1, it can be determined that Color3 meets the forwarding requirement, and then it can be determined that Path3 corresponding to Color3 can be used for forwarding the traffic to be forwarded.
It can be seen from the foregoing embodiments that, in an SR-Policy network, when a corresponding transmission path is selected for a traffic to be forwarded, a corresponding Color may be determined through a trusted routing level, and then a path for forwarding the traffic to be forwarded is determined, thereby meeting a security requirement of a user on a forwarding path.
An embodiment of the present disclosure further provides a method for generating a path, where the method is applied to a head node of an SR-Policy network, and the method includes:
a. and acquiring first attribute information and second attribute information of the traffic to be forwarded.
Wherein the first attribute comprises: the traffic forwarding attribute may be information used for guiding forwarding, such as a five-tuple (source address, destination address, protocol number, original port, destination port) and/or VPN, of the traffic, different service attributes may be distinguished by the five-tuple, an administrator may set different trusted routing levels for different five-tuple information, and after receiving the traffic to be forwarded, may find a corresponding trusted routing level according to the five-tuple information of the traffic to be forwarded.
In another case, the head node may obtain a preset trust level carried in the traffic to be forwarded, and directly use the preset trust level as a trusted routing level.
The second attribute information may include a traffic forwarding quality attribute, such as an attribute index of bandwidth, delay, jitter, packet loss, reliability, security, and the like. The administrator can set different service level agreements SLA according to different flow forwarding quality attributes when generating the route according to the service requirement.
b. Setting a Color attribute according to the first attribute information and the second attribute information, wherein the Color attribute comprises: trusted routing level, service level agreement SLA.
According to the trusted routing level and the service level agreement SLA acquired in the step a, a plurality of trusted routing levels and service level agreement SLAs can be included, and different trusted routing levels correspond to different service level agreement SLAs.
c. And setting an Endpoint attribute according to the destination address of the flow to be forwarded.
The Endpoint attribute may be obtained from the destination address of the service.
d. And calculating a forwarding path according to the Color attribute and the Endpoint attribute.
It can be seen from the foregoing embodiments that, when generating an SR Policy forwarding path, different forwarding paths are generated according to the trusted routing levels of different routing nodes, and as in the embodiments listed in this specification, the trusted routing levels of different routing nodes are added to the Color attribute, so that different forwarding paths are generated according to the trusted routing levels of different routing nodes.
Based on the foregoing method embodiments, an embodiment of this specification further provides a device for selecting a path, where the device includes:
the acquisition module is used for acquiring traffic to be forwarded;
the calculation module is used for determining a first trusted routing level corresponding to the traffic to be forwarded according to first attribute information carried in the traffic to be forwarded;
the calculation module is used for determining a first service level agreement SLA met by the traffic to be forwarded according to second attribute information carried in the traffic to be forwarded;
and the processing module is used for determining a target Color corresponding to the flow to be forwarded according to the first trustable routing level and the first SLA, and determining a forwarding path according to the target Color.
Optionally, the first attribute information includes: a traffic forwarding attribute;
the calculation module is further configured to obtain the first attribute information, and determine a first service attribute of the traffic to be forwarded according to the first attribute information;
and acquiring a first trusted routing level corresponding to the first service attribute according to the corresponding relation between the preset service attribute and the trusted routing level.
Optionally, the first attribute information includes: the preset trust level carried in the traffic to be forwarded;
the computing module is further configured to obtain a preset trust level carried in the traffic to be forwarded;
and taking the preset trust level as a first trusted routing level.
Optionally, the second attribute information includes: a traffic forwarding quality attribute;
the calculation module is further configured to calculate a traffic forwarding quality attribute carried in the traffic to be forwarded, determine whether an SLA meeting the calculation result exists, acquire the SLA if the SLA exists, and use the acquired SLA as a first SLA.
Based on the foregoing method embodiments, an embodiment of this specification further provides an apparatus for generating a path, where the apparatus is applied to a head node, and the apparatus includes:
an acquisition module: acquiring first attribute information and second attribute information of traffic to be forwarded;
a processing module: setting a Color attribute according to the first attribute information and the second attribute information, wherein the Color attribute comprises: trusted routing level, service level agreement SLA;
the processing module is used for: the method is also used for setting an Endpoint attribute according to the destination address of the flow to be forwarded;
the processing module is used for: the forwarding path is also calculated according to the Color attribute and the Endpoint attribute;
wherein the first attribute information is used for determining a trusted routing level, and the second attribute is used for determining a service level agreement SLA
An embodiment of the present specification further provides a routing device, where the routing device includes: a processor and a machine-readable storage medium;
the machine-readable storage medium stores machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: the steps of any of the embodiments described above are implemented.
Embodiments of the present specification also provide a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to: the steps of any of the embodiments described above are implemented.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may 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 may also be 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 will be understood that the present description is not limited to the precise arrangements described above and shown in the drawings, 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 above description is only a preferred embodiment of the present disclosure, and should not be taken as limiting the present disclosure, and any modifications, equivalents, improvements, etc. made within the spirit and principle of the present disclosure should be included in the scope of the present disclosure.