CN113726655B - Message drainage method and device, head-end equipment and storage medium - Google Patents

Message drainage method and device, head-end equipment and storage medium Download PDF

Info

Publication number
CN113726655B
CN113726655B CN202111003565.1A CN202111003565A CN113726655B CN 113726655 B CN113726655 B CN 113726655B CN 202111003565 A CN202111003565 A CN 202111003565A CN 113726655 B CN113726655 B CN 113726655B
Authority
CN
China
Prior art keywords
srv6te
target
policy
policies
message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111003565.1A
Other languages
Chinese (zh)
Other versions
CN113726655A (en
Inventor
徐婧
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN202111003565.1A priority Critical patent/CN113726655B/en
Publication of CN113726655A publication Critical patent/CN113726655A/en
Application granted granted Critical
Publication of CN113726655B publication Critical patent/CN113726655B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/34Source routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Landscapes

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

Abstract

The embodiment of the application provides a message diversion method, a message diversion device, head-end equipment and a storage medium. The scheme is as follows: acquiring a message to be forwarded; performing routing iteration processing according to the destination address of the message to be forwarded to obtain a target Endpoint address; acquiring message parameters in a two-layer message header of a message to be forwarded as target parameters; in a plurality of SRv6TE policies configured in advance, SRv6TE policies matched with the target Endpoint address and the target parameters are searched as target SRv6TE policies according to the corresponding relation between the prestored message parameters and the identification information of SRv6TE policies. By applying the technical scheme provided by the embodiment of the application, the service range carried by SRv6TE Policy is expanded.

Description

Message drainage method and device, head-end equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for packet drainage, a head end device, and a storage medium.
Background
SRv6TE Policy (Internet Protocol Version 6Segment Routing Traffic Engineering Policy, IPv 6Segment Routing Traffic Engineering Policy) is a new tunnel drainage technology developed on the basis of the Internet Protocol Version 6Segment Routing (SRv 6) technology. The message to be forwarded is led into a proper target SRv6TE Policy, and the message to be forwarded is forwarded by using the forwarding path corresponding to the SRv6TE Policy.
In the related art, when multiple forwarding paths corresponding to SRv6TE policies exist between a source node and a destination node, a head-end device (i.e., a first node in the forwarding path) may select a target SRv6TE Policy from multiple SRv6TE policies based on a DiffServ code point (DSCP) value in a flag (DS) field of a three-layer packet header in a packet to be forwarded.
Since the DSCP value is a field in a three-Layer packet header of a packet to be forwarded, the related art can only support a three-Layer Virtual Private Network (L3 VPN) Service, but cannot support a two-Layer Virtual Private Network (L2 VPN) Service, such as an Ethernet Virtual Private Network Virtual Private line Service (EVPN Virtual Private Network) Service and an Ethernet Virtual Private Network Virtual Private LAN Service (EVPN VPLS) Service.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for packet steering, a head-end device, and a storage medium, so as to expand a service range carried by SRv6TE Policy. The specific technical scheme is as follows:
the embodiment of the application provides a message diversion method, which is applied to head-end equipment in SRv6 networks, and the method comprises the following steps:
acquiring a message to be forwarded;
performing routing iteration processing according to the destination address of the message to be forwarded to obtain a target tail end (Endpoint) address corresponding to the destination address;
acquiring message parameters in a two-layer message header of the message to be forwarded, and taking the message parameters as target parameters;
in a plurality of pre-configured Internet protocol version 6 routing strategies (SRv 6TE Policy), finding SRv6TE Policy matched with the target Endpoint address and the target parameter according to the corresponding relation between pre-stored message parameters and identification information of SRv6TE Policy to serve as target SRv6TE Policy;
and importing the message to be forwarded into the target SRv6TE Policy.
Optionally, the step of obtaining the packet parameter in the header of the two-layer packet of the packet to be forwarded as the target parameter includes:
acquiring 802.1p priority from the 802.1Q label head of the two-layer message head of the message to be forwarded, and using the 802.1p priority as a target 802.1p value;
the step of searching SRv6TE Policy matched with the target Endpoint address and the target parameter in a plurality of SRv6TE policies configured in advance according to the corresponding relationship between the pre-stored message parameters and the identification information of SRv6TE Policy as the target SRv6TE Policy includes:
and searching SRv6TE Policy matched with the target Endpoint address and the target 802.1p value as target SRv6TE Policy in a plurality of SRv6TE policies configured in advance according to the corresponding relation between the prestored 802.1p value and the identification information of SRv6TE Policy.
Optionally, the SRv6TE Policy includes an Endpoint address and a Color (Color) value;
in a plurality of SRv6TE policies configured in advance, according to the correspondence between the prestored 802.1p value and the identification information of SRv6TE Policy, searching SRv6TE Policy matching with the target Endpoint address and the target 802.1p value, before being used as the target SRv6TE Policy, the method further includes:
dividing SRv6TE policies of the same Endpoint address into the same SRv6TE policies set according to the preconfigured Endpoint addresses in each SRv6TE policies to obtain a plurality of SRv6TE policies sets;
the step of searching SRv6TE Policy matched with the target Endpoint address and the target 802.1p value as target SRv6TE Policy according to the corresponding relationship between the prestored 802.1p value and the identification information of SRv6TE Policy in a plurality of SRv6TE policies configured in advance includes:
acquiring a SRv6TE Policy set of SRv6TE policies with the Endpoint address as the target Endpoint address as a target SRv6TE Policy set;
aiming at the target SRv6TE Policy set, finding SRv6TE Policy with the Color value corresponding to the target 802.1p value in the target SRv6TE Policy set according to the prestored corresponding relation between the 802.1p value and the Color value to obtain the target SRv6TE Policy.
Optionally, the target SRv6TE policies set includes default SRv6TE policies;
the method further comprises the following steps:
if SRv6TE policies with Color values corresponding to the target 802.1p values are not found in the target SRv6TE policies set, then the default SRv6TE policies are determined to be the target SRv6TE policies.
Optionally, the method further includes:
if SRv6TE Policy with the Color value corresponding to the target 802.1p value is not searched in the target SRv6TE Policy set, determining SRv6TE Policy with the Color value corresponding to the minimum 802.1p value in the target SRv6TE Policy set as target SRv6TE Policy according to the prestored corresponding relation between the 802.1p value and the Color value.
Optionally, the method further includes:
when each SRv6TE Policy in the target SRv6TE Policy set fails, acquiring an internet protocol version 6 IPv6 routing forwarding table;
and forwarding the message to be forwarded based on the IPv6 routing and forwarding table.
The embodiment of the application provides a message drainage device, is applied to SRv6 head-end equipment in the network, the device includes:
the first acquisition module is used for acquiring the message to be forwarded;
the iteration module is used for carrying out routing iteration processing according to the destination address of the message to be forwarded to obtain a target Endpoint address corresponding to the destination address;
a second obtaining module, configured to obtain a message parameter in a header of a second layer message of the message to be forwarded, where the message parameter is used as a target parameter;
a searching module, configured to search SRv6TE Policy matching the target Endpoint address and the target parameter in a plurality of SRv6TE policies configured in advance according to a correspondence between a pre-stored message parameter and identification information of SRv6TE Policy, as a target SRv6TE Policy;
and the flow guiding module is used for guiding the message to be forwarded into the target SRv6TE Policy.
Optionally, the second obtaining module is specifically configured to obtain an 802.1p priority from an 802.1Q tag header of a two-layer packet header of the packet to be forwarded, where the 802.1p priority is used as a target 802.1p value;
the search module is specifically configured to search SRv6TE policies matching the target Endpoint address and the target 802.1p value as target SRv6TE policies in a plurality of SRv6TE policies configured in advance according to a correspondence between pre-stored 802.1p values and identification information of SRv6TE policies.
Optionally, the SRv6TE Policy includes an Endpoint address and a Color value;
the device further comprises:
the dividing module is used for dividing SRv6TE policies of the same Endpoint address into the same SRv6TE policies set according to the preconfigured Endpoint addresses in each SRv6TE policies to obtain a plurality of SRv6TE policies sets;
the searching module is specifically configured to obtain a SRv6TE Policy set where SRv6TE policies with the Endpoint address as the target Endpoint address belong as a target SRv6TE Policy set; aiming at the target SRv6TE Policy set, finding SRv6TE Policy with the Color value corresponding to the target 802.1p value in the target SRv6TE Policy set according to the prestored corresponding relation between the 802.1p value and the Color value to obtain the target SRv6TE Policy.
Optionally, the target SRv6TE policies set includes default SRv6TE policies;
the device further comprises:
a first determining module, configured to determine the default SRv6TE Policy as the target SRv6TE Policy if no SRv6TE Policy with a Color value corresponding to the target 802.1p value is found in the target SRv6TE Policy set.
Optionally, the apparatus further comprises:
a second determining module, configured to determine, according to a pre-stored correspondence between 802.1p values and Color values, SRv6TE Policy corresponding to the minimum 802.1p value and the Color value in the target SRv6TE Policy set as a target SRv6TE Policy if SRv6TE Policy corresponding to the Color value and the target 802.1p value is not found in the target SRv6TE Policy set.
Optionally, the apparatus further comprises:
a third obtaining module, configured to obtain an internet protocol version 6 IPv6 routing forwarding table when each SRv6TE Policy in the target SRv6TE Policy set fails;
and the forwarding module is used for forwarding the message to be forwarded based on the IPv6 routing forwarding table.
Embodiments of the present application further provide a headend device including a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: implementing any of the above message flow guiding method steps.
Embodiments of the present application further provide a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: implementing any of the above message flow guiding method steps.
In the technical solution provided in this embodiment, after obtaining the packet to be forwarded, a target SRv6TE Policy matched with the target Endpoint address and the target parameter is searched from a plurality of SRv6TE policies configured in advance, that is, the Endpoint address corresponding to the target address of the packet to be forwarded and the target SRv6TE Policy corresponding to the packet parameter in the packet header of the packet to be forwarded are searched, so that the packet to be forwarded is imported into the target SRv6TE Policy, and the packet to be forwarded is forwarded.
Because the messages corresponding to the L2VPN service and the L3VPN service both have a two-layer header and the target parameter is in the two-layer header of the message to be forwarded, the technical solution provided in the embodiment of the present application can support the forwarding of the messages corresponding to the L2VPN service and the L3VPN service, achieve the goal of forwarding the messages corresponding to the L2VPN service and the L3VPN service by using the forwarding path of SRv6TE Policy, and effectively expand the service range borne by the SRv6TE Policy.
Moreover, by importing the messages corresponding to the L2VPN service and the L3VPN service into SRv6TE Policy, the flexibility and the accuracy of message forwarding control are improved while the messages are forwarded, different forwarding requirements of users are met, the forwarding pressure of devices in the SRv6 network is dispersed, and the stability and the reliability of message routing are improved.
Of course, it is not necessary for any product or method of the present application to achieve all of the above-described advantages at the same time.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic structural diagram of SRv6 network according to an embodiment of the present application;
fig. 2 is a first flowchart of a message flow guiding method according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a network according to an embodiment of the present application;
FIG. 4 is a diagram of a two-layer header of a message;
fig. 5 is a second flowchart of a message flow guiding method according to an embodiment of the present application;
FIG. 6 is a schematic diagram of the 802.1Q tag head of FIG. 4;
fig. 7 is a third flowchart illustrating a message flow guiding method according to an embodiment of the present application;
fig. 8 is a fourth flowchart illustrating a message flow guiding method according to an embodiment of the present application;
fig. 9 is a fifth flowchart of a message flow guiding method according to an embodiment of the present application;
fig. 10 is a sixth flowchart of a message flow guiding method according to an embodiment of the present application;
fig. 11 is a seventh flowchart illustrating a message flow guiding method according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of a message diversion apparatus according to an embodiment of the present application;
fig. 13 is a schematic structural diagram of a headend device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms used in the examples of the present application are explained below:
SRv6TE Policy is a new tunnel drainage technology developed on the basis of SRv6 technology. SRv6 the transmission path corresponding to the TE Policy is represented as a Segment List (Segment List) of the designated path, also called SID List (Segment ID List). Each SID list is an end-to-end path from the source node to the destination node. When the message is imported SRv6TE Policy, the SID list is added to the message by the head-end device, and other nodes in the network forward the message according to the transmission path indicated by the SID list.
The SRv6TE Policy mentioned above includes three parts, head end (HeadEnd), Color value, and Endpoint address. Wherein, the HeadEnd is a node generated by SRv6TE Policy; the Color value represents the extended community attribute carried by SRv6TE Policy, and Border Gateway Protocol (BGP) routes carrying the same Color value may use the same SRv6TE Policy. The Endpoint address is the destination address of SRv6TE Policy.
A DS field, which defines a type of service (ToS) field in Internet Protocol Version 4 (Internet Protocol Version 4, IPv4) and a Traffic Class (TC) field in Internet Protocol Version 6 (Internet Protocol Version 6, IPv6) as DS fields by The Internet Engineering Task Force (IETF).
The 802.1p priority is defined in detail by the 802.1p specification.
For ease of understanding, the process of message flow guiding in the related art is described below with reference to fig. 1. Fig. 1 is a schematic structural diagram of SRv6 network according to an embodiment of the present disclosure.
There are multiple transmission paths between node a and node B in the SRv6 network shown in fig. 1. For example, the transmission path in fig. 1 includes: a-C-E-G-B (denoted as path 1) and a-D-F-H-B (denoted as path 2) a-C-D-F-H-B (path 3). For convenience of description, only path 1 and path 2 in fig. 1 are taken as examples for explanation.
In the SRv6 network shown in FIG. 1, the head-end (i.e., node A above) may configure SRv6TE Policy for each transmission path to node B. That is, the head-end device will be configured to: SRv6TE Policy 1 for Path 1, and SRv6TE Policy 2 for Path 2. Wherein SRv6TE Policy 1 has a Color value of 123, and the EndPoint address is device B address 2001: db8:: 1; SRv6 Color value of 6TE Policy 2 is 124, and the EndPoint address is also device B address 2001: db8:: 1.
In the process of using SRv6TE policies to carry L3VPN traffic, there is SRv6TE policies (such as SRv6TE policies 1 and SRv6TE policies 2) for each transmission path from node a to node B. Therefore, the head-end equipment needs to select an appropriate SRv6TE policies from a plurality of SRv6TE policies to drain the received packets to be forwarded.
Specifically, after receiving the message to be forwarded, the head-end device obtains the DSCP value from the DS field of the three-layer message of the message to be forwarded. According to the pre-stored corresponding relationship between the DSCP value and the Color value, specifically as shown in table 1, the head-end device determines a target SRv6TE Policy corresponding to the received message to be forwarded at a plurality of SRv6TE policies, and then introduces the message to be forwarded into the target SRv6TE Policy.
TABLE 1
DSCP value Color value
10 123
20 124
In table 1, the Color value corresponding to the DSCP value 10 is 123, and the Color value corresponding to the DSCP value 20 is 124. When the DSCP value in the to-be-forwarded message received by the head-end device is 10, the head-end device may determine SRv6TE Policy with a Color value of 123 as a target SRv6TE Policy of the to-be-forwarded message. When the DSCP value in the message to be forwarded received by the head-end device is 20, the head-end device may determine SRv6TE Policy with Color value of 124 as the target SRv6TE Policy of the message to be forwarded.
Since the DSCP value is a field in a three-layer header of the message to be forwarded, when the message to be forwarded is a message corresponding to the L2VPN service, the three-layer header does not exist in the message to be forwarded, that is, the DSCP value does not exist in the message to be forwarded, which makes the flow-guiding method using SRv6TE Policy in the related art not applicable to bear the L2VPN service.
In order to solve the problems in the related art, an embodiment of the present application provides a message flow guiding method, as shown in fig. 2, where fig. 2 is a first flowchart of the message flow guiding method provided in the embodiment of the present application. The method is applied to SRv6 head-end equipment in the network, and specifically comprises the following steps.
Step S201, a message to be forwarded is obtained.
Step S202, route iteration processing is carried out according to the destination address of the message to be forwarded, and a target Endpoint address corresponding to the destination address is obtained.
Step S203, obtaining message parameters in the two-layer message header of the message to be forwarded as target parameters.
Step S204, in a plurality of SRv6TE policies configured in advance, according to the corresponding relationship between the pre-stored message parameters and the identification information of SRv6TE policies, finding SRv6TE policies matched with the target Endpoint address and the target parameters as the target SRv6TE policies.
Step S205, the message to be forwarded is imported into the target SRv6TE Policy.
By the method shown in fig. 2, after the message to be forwarded is obtained, the target SRv6TE Policy matched with the target Endpoint address and the target parameter is searched from the multiple SRv6TE policies configured in advance, that is, the Endpoint address corresponding to the target address of the message to be forwarded and the target SRv6TE Policy corresponding to the message parameter in the two-layer message header of the message to be forwarded are searched, so that the message to be forwarded is led into the target SRv6TE Policy, and the message to be forwarded is forwarded.
Because the messages corresponding to the L2VPN service and the L3VPN service both have a two-layer header and the target parameter is in the two-layer header of the message to be forwarded, the technical solution provided in the embodiment of the present application can support the forwarding of the messages corresponding to the L2VPN service and the L3VPN service, achieve the goal of forwarding the messages corresponding to the L2VPN service and the L3VPN service by using the forwarding path of SRv6TE Policy, and effectively expand the service range borne by the SRv6TE Policy.
Moreover, by importing the messages corresponding to the L2VPN service and the L3VPN service into SRv6TE Policy, the flexibility and the accuracy of message forwarding control are improved while the messages are forwarded, different forwarding requirements of users are met, the forwarding pressure of devices in the SRv6 network is dispersed, and the stability and the reliability of message routing are improved.
The following examples are given to illustrate the examples of the present application.
In step S201, the message to be forwarded is obtained.
In an optional embodiment, the head-end device carries traffic (i.e., a packet) from an EVPN VPWS service, an EVPN VPLS service, or an EVPN L3VPN service, and obtains a packet to be forwarded.
The head-end device is the first node on the transmission path corresponding to SRv6TE Policy. Here, the head-end device is not particularly limited.
For ease of understanding, the description is made in conjunction with the network shown in fig. 3. Fig. 3 is a schematic structural diagram of a network according to an embodiment of the present application.
In the network shown in fig. 3, two Customer Edge (CE) devices, i.e., CE1 and CE2, two service Provider Edge (PE) devices, i.e., PE1 and PE2, and one router (Provider, P) are included.
In the network shown in fig. 3, an IPv6 public network is between PE1 and PE2, and the IPv6 public network is configured with SRv6TE Policy. The CE1 may send the packet to the CE2 through the network shown in fig. 3, that is, the delay path CE1-PE1-P-PE2-CE2 sends the packet to the CE 2. At this time, PE1 in the network is the above-mentioned head-end device. After the CE1 sends the packet to the PE1, the PE1 receives the packet. At this time, PE1 may determine that the received packet is a packet to be forwarded.
In this embodiment of the application, the number of the packets to be forwarded, which are acquired by the head-end device, may be one or multiple. Here, the number of the obtained messages to be forwarded is not specifically limited. For convenience of understanding, in the embodiment of the present application, only one packet to be forwarded is taken as an example for description.
In step S202, routing iteration is performed according to the destination address of the packet to be forwarded, so as to obtain a target Endpoint address corresponding to the destination address.
In an optional embodiment, the head-end device may obtain a destination address in the packet to be forwarded, and perform routing iterative processing according to the destination address to obtain an Endpoint address corresponding to the destination address. And the head-end equipment determines the Endpoint address obtained by route iteration processing as a target Endpoint address. The route iteration method in the related art can be applied to the embodiment of the present application, and the process of the route iteration process is not specifically described here.
In another optional embodiment, after obtaining the to-be-forwarded packet, the head-end device may obtain a route forwarding table of the to-be-forwarded packet, and determine an Endpoint address in the route forwarding table as a target Endpoint address corresponding to the destination address.
In step S203, the message parameter in the header of the two-layer message to be forwarded is obtained as the target parameter.
In this embodiment, the header of the two-layer packet of the packet to be forwarded includes a plurality of types of packet information. As shown in fig. 4, fig. 4 is a schematic diagram of a two-layer header of a certain packet.
The two-layer header shown in fig. 4 includes: destination Address (Destination Address), Source Address (Source Address), 802.1Q tag header (802.1Q header), Length/type (Length/type), data and Frame Check sequence code (FCS).
In an optional embodiment, the two-layer header of the message to be forwarded includes an 802.1Q tag header. The 802.1Q tag header includes an 802.1p priority.
The head-end device may obtain at least one message parameter, such as the above 802.1p priority, from the two-layer header of the message to be forwarded as the target parameter.
For the above-mentioned target parameter acquisition, reference is made to the following description, which is not specifically described herein.
In the embodiment shown in fig. 2, the above step S202 is performed before step S203. Besides, step S202 may also be executed after step S203, or step S202 may be executed simultaneously with step S203. Here, the execution order of step S202 and step S203 is not particularly limited.
In step S204, that is, in a plurality of SRv6TE policies configured in advance, SRv6TE Policy matching the target Endpoint address and the target parameter is searched as the target SRv6TE Policy according to the corresponding relationship between the pre-stored message parameters and the identification information of SRv6TE Policy.
In this embodiment, when there are multiple transmission paths from the head-end device to the destination node, for each transmission path, the head-end device may configure corresponding SRv6TE Policy for the transmission path. Each SRv6TE Policy includes an Endpoint address and a Color value.
In the above-mentioned multiple transmission paths, the destination node of each transmission path may be the same or different. Here, the destination node of the transmission path is not particularly limited.
In the embodiment of the present application, for a plurality of transmission paths with the same destination node, the Endpoint addresses in the SRv6TE policies corresponding to each transmission path are the same, and the Color values in the SRv6TE policies corresponding to each transmission path are different.
When determining a target SRv6TE Policy of a received message to be forwarded, the head-end device may search, according to a correspondence between a pre-stored message parameter and identification information of SRv6TE Policy, multiple SRv6TE policies configured in advance, for an Endpoint address that is the target Endpoint address, where a message parameter corresponding to the identification information is SRv6TE Policy of the target parameter, and determine the found SRv6TE Policy as a target SRv6TE Policy of the message to be forwarded.
The correspondence between the pre-stored message parameters and the identification information of SRv6TE Policy can be referred to the following description, and is not specifically described here.
Aiming at the step S205, the message to be forwarded is imported into the target SRv6TE Policy.
In this step, after determining the target SRv6TE Policy of the received message to be forwarded, the head-end device may import the message to be forwarded into the target SRv6TE Policy, thereby completing the forwarding of the message to be forwarded in the SRv6 network.
In the embodiment of the present application, the transmission path corresponding to the SRv6TE Policy is represented in the form of a SID list. When the message to be forwarded is imported to the target SRv6TE Policy, the SID list in SRv6TE Policy will be added to the message to be forwarded. The head-end device forwards the packet to be forwarded to the next node according to the next hop and the egress interface indicated by the SID list, and so on, each node in the SRv6 network forwards the packet to be forwarded according to the SID list, thereby completing the forwarding process of the packet to be forwarded. Here, the forwarding process of the packet to be forwarded is not specifically described.
In an optional embodiment, when the target parameter in the message to be forwarded is an 802.1p priority in an 802.1Q tag header of a two-layer packet header of the message to be forwarded, according to the method shown in fig. 2, the embodiment of the present application further provides a packet steering method. As shown in fig. 5, fig. 5 is a second flowchart of the message flow guiding method according to the embodiment of the present application. The method comprises the following steps.
Step S501, obtaining a message to be forwarded.
Step S502, route iteration processing is carried out according to the destination address of the message to be forwarded, and a target Endpoint address corresponding to the destination address is obtained.
The above steps S501 to S502 are the same as the above steps S201 to S202.
Step S503, obtaining 802.1p priority from the 802.1Q label head of the two-layer message head of the message to be forwarded, and using the 802.1p priority as a target 802.1p value.
For ease of understanding, the description will be made by taking fig. 4 and 6 as an example. Fig. 6 is a schematic diagram of the 802.1Q tag header of fig. 4.
The 802.1Q Tag header shown in fig. 4 is composed of 4 bytes, i.e., two bytes of Tag Protocol Identifier (TPID) and 2 bytes of Tag Control Information (TCI). Specifically, as shown in fig. 6, the TPID value is 0x 8100. The TCI includes a priority (i.e., the above-mentioned 802.1p priority), a Canonical Format Indicator (CFI), and a Virtual Local Area Network Identity (VLAN ID).
After receiving the message to be forwarded, the head-end device acquires the 802.1p priority in the 802.1Q tag header of the two-layer message header, and determines the acquired 802.1p priority as a target 802.1p value, that is, the target parameter.
In the 802.1Q tag header shown in fig. 6, the 802.1p priority has a length of 3 bits (bit). That is, the value range of the 802.1p priority is: 000-111 (i.e., 0-7).
Step S504, in a plurality of SRv6TE policies configured in advance, according to the corresponding relation between the prestored 802.1p values and the identification information of SRv6TE policies, SRv6TE policies matched with the target Endpoint address and the target 802.1p values are searched as target SRv6TE policies.
In this step, the correspondence between the pre-stored message parameters and the identification information of the SRv6TE Policy is specifically expressed as: the pre-stored 802.1p value and the identification information of SRv6TE Policy. When determining a target SRv6TE Policy of a received message to be forwarded, the head-end device may search, from a plurality of SRv6TE policies configured in advance, for a target Endpoint address according to a correspondence relationship between a prestored 802.1p value and identification information of SRv6TE Policy, and obtain a target SRv6TE Policy that an Endpoint address is the target Endpoint address and an 802.1p value corresponding to the identification information is SRv6TE Policy of the 802.1p value.
In the embodiment of the application, by pre-storing the corresponding relationship between the 802.1p value and the identification information of the SRv6TE Policy, the head-end device can accurately select the target SRv6TE Policy matched with the target Endpoint address and the target 802.1p value from a plurality of pre-configured SRv6TE policies, so that the accuracy of the determined target SRv6TE Policy is improved.
Step S505, the message to be forwarded is imported into the target SRv6TE Policy.
Step S505 is the same as step S105.
In the embodiment shown in fig. 5, only the target parameter of the packet to be forwarded is taken as an example to acquire the 802.1p priority from the 802.1Q tag header of the two-layer packet header of the packet to be forwarded. In addition, the target parameter of the message to be forwarded may also include a message parameter such as a destination address in the two-layer message. Here, the message parameters included in the target parameters are not particularly limited.
In an optional embodiment, according to the method shown in fig. 5, an embodiment of the present application further provides a message steering method. As shown in fig. 7, fig. 7 is a third flowchart illustrating a message flow guiding method according to an embodiment of the present application. The method comprises the following steps.
Step S701, obtaining a message to be forwarded.
Step S702, route iteration processing is carried out according to the destination address of the message to be forwarded, and a target Endpoint address corresponding to the destination address is obtained.
Step S703, acquiring 802.1p priority from the 802.1Q tag header of the two-layer header of the packet to be forwarded, and using the 802.1p priority as a target 802.1p value.
The steps S701 to S703 are the same as the steps S501 to S503.
Step S704, according to the preconfigured Endpoint addresses in each SRv6TE Policy, dividing SRv6TE policies of the same Endpoint address into the same SRv6TE Policy set to obtain a plurality of SRv6TE Policy sets.
In this step, after configuring corresponding SRv6TE policies for each transmission path between the head-end device and the destination node, the head-end device may divide SRv6TE policies of the same Endpoint address into a SRv6TE Policy set (denoted as a SRv6TE Policy Group) according to the Endpoint address included in each SRv6TE Policy, thereby obtaining a plurality of SRv6TE Policy sets.
The step S704 may be performed before or after any one of the steps S701 to S703.
Step S705, a SRv6TE Policy set where SRv6TE policies with the destination address as the destination address are located is obtained as a destination SRv6TE Policy set.
In this step, after determining the target Endpoint address corresponding to the packet to be forwarded, the head-end device may determine, in the SRv6TE Policy sets, a SRv6TE Policy set whose Endpoint address is the target Endpoint address as a target SRv6TE Policy set according to the Endpoint address corresponding to each SRv6TE Policy in each SRv6TE Policy set. That is, all SRv6TE policies of the SRv6TE policies that match the transmission path of the message to be forwarded are determined.
In an optional embodiment, to facilitate accurately determining the target SRv6TE Policy set of the to-be-forwarded packet, the head-end device may bind each SRv6TE Policy set to an Endpoint address after dividing the SRv6TE policies into a plurality of SRv6TE Policy sets. For example, a correspondence between each SRv6TE Policy set and the Endpoint addresses of the SRv6TE policies it includes is established. Here, the binding manner of each SRv6TE Policy set to the Endpoint address is not particularly limited.
Step S706, aiming at the target SRv6TE Policy set, finding SRv6TE Policy corresponding to the Color value and the target 802.1p value in the target SRv6TE Policy set according to the pre-stored corresponding relation between the 802.1p value and the Color value, and obtaining the target SRv6TE Policy.
In this step, for each SRv6TE Policy set, the head-end device pre-stores the corresponding relationship between the 802.1p value and the Color value of each SRv6TE Policy in the SRv6TE Policy set. After finding the target SRv6TE Policy set, the head-end device may determine SRv6TE Policy corresponding to the Color value and the target 802.1p value in the target SRv6TE Policy set as target SRv6TE Policy according to a pre-stored correspondence relationship of target SRv6TE Policy combination.
For ease of understanding, the description will be made by taking path 1 and path 2 shown in fig. 1 as an example.
Assume now that the pre-stored 802.1p values of the head-end device correspond to the Color values of the SRv6TE policies in the target SRv6TE policies set as shown in Table 2.
TABLE 2
802.1p value Color value
1 123
2 124
When the target 802.1p value in the to-be-forwarded message is 1, according to the correspondence shown in table 2, the head-end device may determine that the Color value corresponding to the target 802.1p value is 123. Since the Color value in the SRv6TE Policy 1 is 123, the head-end device may determine that the target SRv6TE Policy of the message to be forwarded is SRv6TE Policy 1.
When the target 802.1p value in the to-be-forwarded message is 2, according to the correspondence shown in table 2, the head-end device may determine that the Color value corresponding to the target 802.1p value is 124. Since the Color value in the SRv6TE Policy 2 is 124, the head-end device may determine that the target SRv6TE Policy of the message to be forwarded is SRv6TE Policy 2.
In the embodiment of the present application, since the Color value of each SRv6TE Policy in the same SRv6TE Policy set is unique, SRv6TE policies corresponding to the Color value corresponding to the 802.1p value in the correspondence relationship between the 802.1p value stored in the head-end device and the Color value of each SRv6TE Policy in the target SRv6TE Policy set are also unique. At this time, the target SRv6TE Policy corresponding to the target 802.1p value can be accurately searched according to the corresponding relationship, that is, the target SRv6TE Policy corresponding to the message to be forwarded can be accurately determined, so that the accuracy of determining the target SRv6TE Policy is ensured.
In the above steps S704 to S705, multiple SRv6TE policies are divided into different SRv6TE Policy sets by an Endpoint address, so that SRv6TE policies of the same source node and target node are in the same set, which enables the head-end device to determine a target SRv6TE Policy set corresponding to the message to be forwarded according to the target Endpoint address of the message to be forwarded, thereby directly determining a target SRv6TE Policy in the target SRv6TE Policy set, effectively reducing the number of SRv6TE policies required to match the message to be forwarded, and improving the determination efficiency of the target SRv6TE Policy.
The steps S705 and S706 are two steps obtained by thinning the step S504.
Step S707, the message to be forwarded is imported into the target SRv6TE Policy.
Step S707 is the same as step S505.
In the embodiment shown in fig. 7, the correspondence between the prestored 802.1p value and the identification information of SRv6TE Policy is represented as: for each SRv6TE Policy set, the pre-stored correspondence between 802.1p values and Color values of SRv6TE policies in the SRv6TE Policy set. In addition, when multiple SRv6TE policies are configured, the head-end device may configure a corresponding Policy identifier, such as a Policy ID, for each SRv6TE Policy. At this point, there is a uniquely determined Policy identification for each SRv6TE Policy. The correspondence between the prestored 802.1p value and the identification information of SRv6TE Policy may also be expressed as: the correspondence between the 802.1p value and the Policy identification of each SRv6TE Policy.
In this embodiment, the correspondence between the pre-stored 802.1p value and the identifier information of the SRv6TE Policy may be set for the user according to the requirement of the user and sent to the head-end device. Here, the setting of the correspondence relationship between the 802.1p value and the identification information of the SRv6TE Policy is not particularly limited.
In an alternative embodiment, the target SRv6TE Policy set may include default SRv6TE policies. According to the method shown in fig. 7, an embodiment of the present application further provides a message routing method. As shown in fig. 8, fig. 8 is a fourth flowchart illustrating a message steering method according to an embodiment of the present application. The method comprises the following steps.
Step S801, obtaining the message to be forwarded.
Step S802, route iteration processing is carried out according to the destination address of the message to be forwarded, and a target Endpoint address corresponding to the destination address is obtained.
Step S803, an 802.1p priority is obtained from the 802.1Q tag header of the two-layer header of the packet to be forwarded, and the obtained 802.1p priority is used as a target 802.1p value.
Step S804, according to the preconfigured Endpoint addresses in each SRv6TE policies, dividing SRv6TE policies of the same Endpoint address into the same SRv6TE policies set to obtain a plurality of SRv6TE policies sets.
Step S805, a SRv6TE Policy set where SRv6TE policies with the destination address as the destination address are located is obtained as a destination SRv6TE Policy set.
Step S806, aiming at the target SRv6TE Policy set, searching SRv6TE Policy corresponding to the Color value and the target 802.1p value in the target SRv6TE Policy set according to the pre-stored corresponding relation between the 802.1p value and the Color value, and obtaining the target SRv6TE Policy.
The above steps S801 to S806 are the same as the above steps S701 to S706.
In step S807, if SRv6TE policies with Color values corresponding to the target 802.1p values are not searched in the target SRv6TE policies set, the default SRv6TE policies are determined as the target SRv6TE policies.
In the embodiment of the present application, when SRv6TE policies corresponding to the Color value and the target 802.1p value are searched in the target SRv6TE policies set, the corresponding SRv6TE policies may not be found. For example, the correspondence relationship stored in advance does not include a Color or the like corresponding to the target 802.1p value. At this point, since the target SRv6TE Policy set stores the default SRv6TE Policy, the head-end device may determine the default SRv6TE Policy as the target SRv6TE Policy. That is, determine SRv6TE Policy as the target SRv6TE Policy for the message to be forwarded.
In an optional embodiment, to ensure the validity of the determined target SRv6TE Policy, the head-end device may further detect the validity of the default SRv6TE Policy before determining the default SRv6TE Policy as the target SRv6TE Policy of the packet to be forwarded.
In the embodiment of the present application, validity check of SRv6TE Policy can check validity of SID lists in SRv6TE Policy respectively. When the SID list in SRv6TE Policy is valid, it can be determined that SRv6TE Policy is valid. The procedure of the SRv6TE Policy validity check is not specifically described here.
Through the step S807, when SRv6TE policies corresponding to the Color value and the target 802.1p value are not searched in the target SRv6TE Policy set, the default SRv6TE Policy is directly determined as the target SRv6TE Policy of the message to be forwarded, so that the message to be forwarded has the corresponding target SRv6TE Policy, and it is ensured that the message to be forwarded can utilize the target SRv6TE Policy to perform message steering.
Step S808, the message to be forwarded is imported into the target SRv6TE Policy.
Step S808 is the same as step S707.
In the embodiment shown in FIG. 8, the default SRv6TE policies included in the set of target SRv6TE policies are illustrated. In addition, when the default SRv6TE policies are included in the SRv6TE policies, the head-end device may determine the default SRv6TE policies as the target SRv6TE policies if the head-end device does not look for SRv6TE policies with Color values corresponding to the target 802.1p values. At this point the default SRv6TE Policy may be in a set of SRv6TE Policy other than the set of target SRv6TE Policy.
In an optional embodiment, according to the method shown in fig. 7, an embodiment of the present application further provides a message steering method. As shown in fig. 9, fig. 9 is a fifth flowchart illustrating a message flow guiding method according to an embodiment of the present application. The method comprises the following steps.
Step S901, a message to be forwarded is obtained.
And step S902, performing routing iterative processing according to the destination address of the message to be forwarded to obtain a target Endpoint address corresponding to the destination address.
Step S903, the 802.1p priority is obtained from the 802.1Q label head of the two-layer message head of the message to be forwarded, and the obtained 802.1p priority is used as a target 802.1p value.
Step S904, according to the preconfigured Endpoint addresses in each SRv6TE Policy, dividing SRv6TE policies of the same Endpoint address into the same SRv6TE Policy set to obtain a plurality of SRv6TE Policy sets.
Step S905, obtain SRv6TE Policy set where SRv6TE Policy with Endpoint address as target Endpoint address is located as target SRv6TE Policy set.
Step S906, aiming at the target SRv6TE Policy set, finding SRv6TE Policy corresponding to the Color value and the target 802.1p value in the target SRv6TE Policy set according to the pre-stored corresponding relation between the 802.1p value and the Color value, and obtaining the target SRv6TE Policy.
The above steps S901 to S906 are the same as the above steps S701 to S706.
In step S907, if SRv6TE policies corresponding to the Color value and the target 802.1p value are not searched in the target SRv6TE policies set, according to the pre-stored correspondence between the 802.1p value and the Color value, SRv6TE policies corresponding to the Color value and the minimum 802.1p value in the target SRv6TE policies set are determined as target SRv6TE policies.
In this step, when the head-end device does not search SRv6TE Policy corresponding to the Color value and the target 802.1p value in the target SRv6TE Policy set, the head-end device may determine SRv6TE Policy corresponding to the Color value and the minimum 802.1p value in the correspondence as the target SRv6TE Policy by using the pre-stored correspondence between the 802.1p value and the Color value of each SRv6TE Policy in the target SRv6TE Policy set.
Through the step S907, when SRv6TE Policy corresponding to the Color value and the target 802.1p value is not searched in the target SRv6TE Policy set, SRv6TE Policy corresponding to the minimum 802.1p value in the pre-stored correspondence is directly determined as the target SRv6TE Policy of the message to be forwarded, so that the message to be forwarded has the corresponding target SRv6TE Policy, and it is ensured that the message to be forwarded can use the target SRv6TE Policy to perform message drainage.
In this embodiment of the present application, when SRv6TE Policy corresponding to the Color value and the target 802.1p value is not searched in the target SRv6TE Policy set, the head-end device may determine SRv6TE Policy corresponding to the maximum 802.1p value in the correspondence as the target SRv6TE Policy of the packet to be forwarded, in addition to determining SRv6TE Policy corresponding to the minimum 802.1p value in the correspondence stored in advance as the target SRv6TE Policy of the packet to be forwarded. Here, the determination method of the target SRv6TE Policy of the message to be forwarded when SRv6TE Policy corresponding to the Color value and the target 802.1p value is not found is not particularly limited.
Step S908, the message to be forwarded is imported to the target SRv6TE Policy.
Step S908 is the same as step S707.
In an optional embodiment, according to the method shown in fig. 7, an embodiment of the present application further provides a message steering method. Fig. 10 is a schematic view of a sixth flow chart of a message steering method according to an embodiment of the present application, shown in fig. 10. The method comprises the following steps.
Step S1001, a message to be forwarded is obtained.
Step S1002, route iteration processing is carried out according to the destination address of the message to be forwarded, and a target Endpoint address corresponding to the destination address is obtained.
Step S1003, obtaining 802.1p priority from 802.1Q label head of two-layer message head of message to be forwarded as target 802.1p value.
Step S1004, according to the preconfigured Endpoint addresses in each SRv6TE Policy, dividing SRv6TE policies of the same Endpoint address into the same SRv6TE Policy set to obtain a plurality of SRv6TE Policy sets.
Step S1005, acquiring SRv6TE Policy set where SRv6TE Policy with the Endpoint address as the target Endpoint address is located as a target SRv6TE Policy set.
Step S1006, aiming at the target SRv6TE Policy set, according to the pre-stored corresponding relationship between the 802.1p value and the Color value, finding SRv6TE Policy corresponding to the Color value and the target 802.1p value in the target SRv6TE Policy set to obtain the target SRv6TE Policy.
Step S1007, the message to be forwarded is led into the target SRv6TE Policy.
The above-described steps S1001 to S1007 are the same as the above-described steps S701 to S707.
Step S1008, when each SRv6TE Policy in the target SRv6TE Policy set fails, acquiring an IPv6 routing forwarding table.
In the present embodiment, each SRv6TE policies in the target SRv6TE policies set described above are at risk of failure. When each SRv6TE Policy in the target SRv6TE Policy set fails, the head-end device may retrieve an IPv6 routing forwarding table.
In this embodiment, after performing the step S1005, the head-end device may determine whether each SRv6TE Policy in the target SRv6TE Policy set is valid. If both are invalid, step S1008 is executed. If there is a valid SRv6TE Policy, then step S1006 above is performed.
Step S1009, based on IPv6 route forwarding table, forwards the message to be forwarded.
In this step, the head-end device may determine the next hop and the egress interface of the to-be-forwarded packet according to the forwarding table entry corresponding to the to-be-forwarded packet in the IPv6 routing forwarding table, so as to forward the to-be-forwarded packet to the next node, and so on, complete the forwarding of the to-be-forwarded packet in the SRv6 network. Here, the above-mentioned process of forwarding the packet to be forwarded by using the IPv6 routing forwarding table is not specifically described.
Through the above steps S1008 and S1009, when each SRv6TE Policy corresponding to the to-be-forwarded packet fails, the head-end device forwards the to-be-forwarded packet by using the IPv6 routing forwarding table, so that the to-be-forwarded packet can be successfully forwarded to the destination node, and stability of forwarding the to-be-forwarded packet is ensured.
For ease of understanding, the above message diversion process is described below with reference to fig. 11. Fig. 11 is a seventh flowchart illustrating a message steering method according to an embodiment of the present application. The method comprises the following steps.
In step S1101, the head-end device configures corresponding SRv6TE policies for a plurality of transmission paths to the destination node.
For the multiple transmission paths, the destination node of each transmission path may be the same node in the SRv6 network or may be a different node in the SRv6 network. Here, the destination node is not particularly limited.
In step S1102, the head-end device divides SRv6TE policies of the same Endpoint address into the same SRv6TE Policy set according to the preconfigured Endpoint addresses in each SRv6TE Policy, to obtain multiple SRv6TE Policy sets.
In this step, the SRv6TE policies corresponding to the transmission paths of the same destination node are divided into the same SRv6TE policies set. That is, the source node and the destination node corresponding to the transmission path of each SRv6TE Policy in the same SRv6TE Policy set are the same.
In the embodiment of the present application, the SRv6TE policies are pre-configured, and the SRv6TE policies set is also pre-divided. Therefore, the head-end device does not need to perform the steps S901 and S902 when the flow of each acquired packet to be forwarded is performed. That is, it is not necessary to reconfigure SRv6TE policies to already group the configured SRv6TE policies.
For example, the head-end device may detect the validity of each SRv6TE Policy configured at a certain time interval, and determine whether to perform the steps S1101 and S1102 according to the detection result.
As another example, the head-end equipment may change the network configuration of the network at decision SRv6, such as adding new nodes or removing one or more nodes. At this time, the head-end device may re-perform steps S1101 and S1102 described above.
Step S1103, the head-end device obtains the packet to be forwarded.
In this embodiment of the present application, the number of the packets to be forwarded, which are acquired by the head-end device, may be one or multiple. For convenience of description, in the embodiment of the present application, only one packet to be forwarded is taken as an example for illustration, and is not limited at all.
And step S1104, the head-end device performs routing iteration processing according to the destination address of the packet to be forwarded to obtain a target Endpoint address corresponding to the destination address.
Step S1105, the head-end device obtains the 802.1p priority from the 802.1Q tag header of the two-layer header of the packet to be forwarded, and uses the 802.1p priority as the target 802.1p value.
In step S1106, the head-end device obtains SRv6TE Policy set where SRv6TE Policy with Endpoint address as the target Endpoint address is located as the target SRv6TE Policy set.
Step S1107, aiming at the target SRv6TE Policy set, the head-end device searches SRv6TE Policy corresponding to the Color value and the target 802.1p value in the target SRv6TE Policy set according to the pre-stored correspondence between the 802.1p value and the Color value, to obtain the target SRv6TE Policy.
In step S1108, if SRv6TE policies with Color values corresponding to the target 802.1p values are not found in the target SRv6TE policies set, the head-end device determines the default SRv6TE policies as the target SRv6TE policies.
Step S1109, if SRv6TE Policy corresponding to the Color value and the target 802.1p value is not searched in the target SRv6TE Policy set, and no default SRv6TE Policy exists in the target SRv6TE Policy set, the head-end equipment determines SRv6TE Policy corresponding to the Color value and the minimum 802.1p value in the target SRv6TE Policy set as target SRv6TE Policy according to the prestored corresponding relation between the 802.1p value and the Color value.
In this embodiment of the application, after determining the target SRv6TE Policy of the packet to be forwarded, the head-end device preferentially determines SRv6TE Policy, which corresponds to the Color value and the target 802.1p value in the target SRv6TE Policy set, as the target SRv6TE Policy. If SRv6TE Policy corresponding to the target 802.1p value does not exist in the target SRv6TE Policy set, the default SRv6TE Policy is first determined to be the target SRv6TE Policy. Only when there is no default SRv6TE Policy or SRv6TE Policy is determined to be invalid, the SRv6TE Policy in the target SRv6TE Policy set that corresponds to the minimum 802.1p value is determined to be the target SRv6TE Policy.
In step S1110, the head-end device imports the message to be forwarded into the target SRv6TE Policy.
At step S1111, when each SRv6TE Policy in the target SRv6TE Policy set fails, the head-end equipment obtains an IPv6 routing forwarding table.
In the embodiment of the present application, after performing the step S907, the head-end device may determine whether each SRv6TE Policy in the target SRv6TE Policy set is valid. If both are invalid, go to step S911. If there is a valid SRv6TE Policy, then step S908 is performed.
Step S1112, the head-end device forwards the message to be forwarded based on the IPv6 routing forwarding table.
Based on the same inventive concept, according to the message flow guiding method provided by the embodiment of the present application, the embodiment of the present application further provides a message flow guiding device. As shown in fig. 12, fig. 12 is a schematic structural diagram of a message diversion apparatus according to an embodiment of the present application. The device is applied to SRv6 head-end equipment in the network, and comprises the following modules.
A first obtaining module 1201, configured to obtain a packet to be forwarded;
an iteration module 1202, configured to perform routing iteration processing according to a destination address of a packet to be forwarded, to obtain a target Endpoint address corresponding to the destination address;
a second obtaining module 1203, configured to obtain a message parameter in a two-layer header of the message to be forwarded, as a target parameter;
a searching module 1204, configured to search SRv6TE Policy matching the target Endpoint address and the target parameter in a plurality of SRv6TE policies configured in advance according to a correspondence between a pre-stored message parameter and identification information of SRv6TE Policy, as a target SRv6TE Policy;
and the flow directing module 1205 is used for directing the message to be forwarded to the target SRv6TE Policy.
Optionally, the second obtaining module 1203 is specifically configured to obtain an 802.1p priority from an 802.1Q tag header of a two-layer packet header of a packet to be forwarded, where the 802.1p priority is used as a target 802.1p value;
the search module 1204 may be specifically configured to search SRv6TE Policy matching the target Endpoint address and the target 802.1p value as the target SRv6TE Policy in a plurality of SRv6TE policies configured in advance according to a correspondence between the prestored 802.1p value and the identification information of SRv6TE Policy.
Optionally, the SRv6TE Policy includes an Endpoint address and a Color value;
the message drainage device may further include:
the dividing module is used for dividing SRv6TE policies of the same Endpoint address into the same SRv6TE policies set according to the preconfigured Endpoint addresses in each SRv6TE policies to obtain a plurality of SRv6TE policies sets;
the search module 1204 may be specifically configured to obtain a SRv6TE Policy set in which SRv6TE policies with an Endpoint address as a target Endpoint address belong, as a target SRv6TE Policy set; aiming at the target SRv6TE Policy set, finding SRv6TE Policy corresponding to the Color value and the target 802.1p value in the target SRv6TE Policy set according to the pre-stored corresponding relation between the 802.1p value and the Color value to obtain the target SRv6TE Policy.
Optionally, the target SRv6TE Policy set includes default SRv6TE policies;
the message drainage device may further include:
a first determining module for determining default SRv6TE Policy as target SRv6TE Policy if SRv6TE Policy with Color value corresponding to target 802.1p value is not searched in target SRv6TE Policy set.
Optionally, the message flow guiding device may further include:
and the second determining module is used for determining SRv6TE Policy corresponding to the Color value and the minimum 802.1p value in the target SRv6TE Policy set as the target SRv6TE Policy according to the prestored corresponding relation between the 802.1p value and the Color value if SRv6TE Policy corresponding to the Color value and the target 802.1p value is not searched in the target SRv6TE Policy set.
Optionally, the message flow guiding device may further include:
a third obtaining module, configured to obtain an IPv6 routing forwarding table when each SRv6TE Policy in the target SRv6TE Policy set fails;
and the forwarding module is used for forwarding the message to be forwarded based on the IPv6 routing forwarding table.
By the device provided by the embodiment of the application, after the message to be forwarded is obtained, the target SRv6TE Policy matched with the target Endpoint address and the target parameter is searched from the plurality of SRv6TE policies configured in advance, that is, the Endpoint address corresponding to the target address of the message to be forwarded and the target SRv6TE Policy corresponding to the message parameter in the two-layer message header of the message to be forwarded are searched, so that the message to be forwarded is led into the target SRv6TE Policy, and the message to be forwarded is forwarded.
Because the messages corresponding to the L2VPN service and the L3VPN service both have a two-layer header and the target parameter is in the two-layer header of the message to be forwarded, the technical solution provided in the embodiment of the present application can support the forwarding of the messages corresponding to the L2VPN service and the L3VPN service, achieve the goal of forwarding the messages corresponding to the L2VPN service and the L3VPN service by using the forwarding path of SRv6TE Policy, and effectively expand the service range borne by the SRv6TE Policy.
Moreover, by importing the messages corresponding to the L2VPN service and the L3VPN service into SRv6TE Policy, the flexibility and the accuracy of message forwarding control are improved while the messages are forwarded, different forwarding requirements of users are met, the forwarding pressure of devices in the SRv6 network is dispersed, and the stability and the reliability of message routing are improved.
Based on the same inventive concept, according to the packet steering method provided in the foregoing embodiment of the present application, an embodiment of the present application further provides a head-end device, as shown in fig. 13, including a processor 1301 and a machine-readable storage medium 1302, where the machine-readable storage medium 1302 stores machine-executable instructions that can be executed by the processor 1301. Processor 1301 is caused by machine executable instructions to perform any of the steps illustrated in fig. 2, 5, and 7-11 described above.
In an alternative embodiment, as shown in fig. 13, the electronic device may further include: a communication interface 1303 and a communication bus 1304; the processor 1301, the machine-readable storage medium 1302, and the communication interface 1303 complete communication with each other through the communication bus 1304, and the communication interface 1303 is used for communication between the headend device and other devices.
Based on the same inventive concept, according to the message diversion method provided by the embodiment of the present application, the embodiment of the present application further provides a machine-readable storage medium, and the machine-readable storage medium stores machine-executable instructions capable of being executed by the processor. The processor is caused by machine executable instructions to implement any of the steps shown in fig. 2, 5, and 7-11 described above.
The communication bus may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc.
The machine-readable storage medium may include a RAM (Random Access Memory) and a NVM (Non-Volatile Memory), such as at least one disk Memory. Additionally, the machine-readable storage medium may be at least one memory device located remotely from the aforementioned processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also DSPs (Digital Signal Processing), ASICs (Application Specific Integrated circuits), FPGAs (Field Programmable Gate arrays) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, it relates to a message steering apparatus, a head-end device and a computer readable storage medium. In the embodiment of the machine-readable storage medium, because of the embodiment of the message flow guiding method, the description is relatively simple, and relevant points can be referred to partial description of the embodiment of the message flow guiding method.
The above description is only for the preferred embodiment of the present application, and is not intended to limit the scope of the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims (14)

1. A message diversion method is applied to a head-end device in an Internet protocol 6 th edition routing SRv6 network, and the method comprises the following steps:
acquiring a message to be forwarded;
performing routing iteration processing according to the destination address of the message to be forwarded to obtain a target tail end Endpoint address corresponding to the destination address;
acquiring message parameters in a two-layer message header of the message to be forwarded, and taking the message parameters as target parameters;
in a plurality of pre-configured Internet protocol version 6 routing policies SRv6TE Policy, searching SRv6TE Policy matched with the target endPoint address and the target parameter according to the corresponding relation between the pre-stored message parameters and the identification information of SRv6TE Policy as target SRv6TE Policy;
and importing the message to be forwarded into the target SRv6TE Policy.
2. The method according to claim 1, wherein the step of obtaining the packet parameter in the header of the layer two packet of the packet to be forwarded as the target parameter comprises:
acquiring 802.1p priority from the 802.1Q label head of the two-layer message head of the message to be forwarded, and using the 802.1p priority as a target 802.1p value;
the step of searching SRv6TE Policy matched with the target Endpoint address and the target parameter in a plurality of SRv6TE policies configured in advance according to the corresponding relationship between the pre-stored message parameters and the identification information of SRv6TE Policy as the target SRv6TE Policy includes:
and searching SRv6TE Policy matched with the target Endpoint address and the target 802.1p value as target SRv6TE Policy in a plurality of SRv6TE policies configured in advance according to the corresponding relation between the prestored 802.1p value and the identification information of SRv6TE Policy.
3. The method of claim 2, wherein said SRv6TE Policy includes an Endpoint address and a Color value;
in a plurality of SRv6TE policies configured in advance, according to the correspondence between the prestored 802.1p value and the identification information of SRv6TE Policy, searching SRv6TE Policy matching with the target Endpoint address and the target 802.1p value, before being used as the target SRv6TE Policy, the method further includes:
dividing SRv6TE policies of the same Endpoint address into the same SRv6TE policies set according to the preconfigured Endpoint addresses in each SRv6TE policies to obtain a plurality of SRv6TE policies sets;
the step of searching SRv6TE Policy matched with the target Endpoint address and the target 802.1p value as target SRv6TE Policy according to the corresponding relationship between the prestored 802.1p value and the identification information of SRv6TE Policy in a plurality of SRv6TE policies configured in advance includes:
acquiring a SRv6TE Policy set of SRv6TE policies with the Endpoint address as the target Endpoint address as a target SRv6TE Policy set;
aiming at the target SRv6TE Policy set, according to the corresponding relation between the prestored 802.1p value and the Color value, SRv6TE Policy with the Color value corresponding to the target 802.1p value is searched in the target SRv6TE Policy set to obtain a target SRv6TE Policy.
4. The method of claim 3, wherein the target SRv6TE policies set comprises default SRv6TE policies;
the method further comprises the following steps:
if SRv6TE policies with Color values corresponding to the target 802.1p values are not found in the target SRv6TE policies set, then the default SRv6TE policies are determined to be the target SRv6TE policies.
5. The method of claim 3, further comprising:
if SRv6TE Policy with a Color value corresponding to the target 802.1p value is not searched in the target SRv6TE Policy set, determining SRv6TE Policy with a Color value corresponding to the minimum 802.1p value in the target SRv6TE Policy set as target SRv6TE Policy according to the pre-stored corresponding relation between the 802.1p value and the Color value.
6. The method according to any one of claims 3-5, further comprising:
when each SRv6TE Policy in the target SRv6TE Policy set fails, acquiring an internet protocol version 6 IPv6 routing forwarding table;
and forwarding the message to be forwarded based on the IPv6 routing forwarding table.
7. A packet steering apparatus, for use in a headend device in an internet protocol version 6 routing SRv6 network, the apparatus comprising:
the first acquisition module is used for acquiring a message to be forwarded;
the iteration module is used for carrying out routing iteration processing according to the destination address of the message to be forwarded to obtain a target tail end Endpoint address corresponding to the destination address;
a second obtaining module, configured to obtain a message parameter in a header of a second layer message of the message to be forwarded, where the message parameter is used as a target parameter;
a searching module, configured to search SRv6TE Policy matching the target Endpoint address and the target parameter as a target SRv6TE Policy according to a correspondence between a pre-stored message parameter and identification information of SRv6TE Policy in a plurality of pre-configured internet protocol version 6TE policies SRv6TE policies;
and the flow guiding module is used for guiding the message to be forwarded into the target SRv6TE Policy.
8. The apparatus according to claim 7, wherein the second obtaining module is specifically configured to obtain an 802.1p priority from an 802.1Q tag header of a two-layer packet header of the packet to be forwarded, as a target 802.1p value;
the search module is specifically configured to search SRv6TE policies matching the target Endpoint address and the target 802.1p value as target SRv6TE policies in a plurality of SRv6TE policies configured in advance according to a correspondence between pre-stored 802.1p values and identification information of SRv6TE policies.
9. The apparatus of claim 8, wherein said SRv6TE Policy includes an Endpoint address and a Color value;
the device further comprises:
the dividing module is used for dividing SRv6TE policies of the same Endpoint address into the same SRv6TE policies set according to the preconfigured Endpoint addresses in each SRv6TE policies to obtain a plurality of SRv6TE policies sets;
the searching module is specifically configured to obtain a SRv6TE Policy set where SRv6TE policies with the Endpoint address as the target Endpoint address belong as a target SRv6TE Policy set; aiming at the target SRv6TE Policy set, finding SRv6TE Policy with the Color value corresponding to the target 802.1p value in the target SRv6TE Policy set according to the prestored corresponding relation between the 802.1p value and the Color value to obtain the target SRv6TE Policy.
10. The apparatus of claim 9, wherein the target SRv6TE policies set comprises default SRv6TE policies;
the device further comprises:
a first determining module for determining the default SRv6TE Policy as the target SRv6TE Policy if SRv6TE Policy with a Color value corresponding to the target 802.1p value is not found in the target SRv6TE Policy set.
11. The apparatus of claim 9, further comprising:
a second determining module, configured to determine, if SRv6TE policies, where the Color value corresponds to the target 802.1p value, are not found in the target SRv6TE policies set, SRv6TE policies, where the Color value corresponds to the minimum 802.1p value in the target SRv6TE policies set, as target SRv6TE policies according to a pre-stored correspondence relationship between 802.1p values and Color values.
12. The apparatus according to any one of claims 9-11, further comprising:
a third obtaining module, configured to obtain an internet protocol version 6 IPv6 routing forwarding table when each SRv6TE Policy in the target SRv6TE Policy set fails;
and the forwarding module is used for forwarding the message to be forwarded based on the IPv6 routing forwarding table.
13. A headend device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to: carrying out the method steps of any one of claims 1 to 6.
14. A machine-readable storage medium having stored thereon machine-executable instructions executable by a processor, the processor being caused by the machine-executable instructions to: carrying out the method steps of any one of claims 1 to 6.
CN202111003565.1A 2021-08-30 2021-08-30 Message drainage method and device, head-end equipment and storage medium Active CN113726655B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111003565.1A CN113726655B (en) 2021-08-30 2021-08-30 Message drainage method and device, head-end equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111003565.1A CN113726655B (en) 2021-08-30 2021-08-30 Message drainage method and device, head-end equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113726655A CN113726655A (en) 2021-11-30
CN113726655B true CN113726655B (en) 2022-09-20

Family

ID=78678941

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111003565.1A Active CN113726655B (en) 2021-08-30 2021-08-30 Message drainage method and device, head-end equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113726655B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10419982B1 (en) * 2018-03-14 2019-09-17 Cisco Technology, Inc. Methods and apparatus for providing end marker functionality in mobile networks having SRv6-configured mobile user planes
CN110535782A (en) * 2019-06-15 2019-12-03 华为技术有限公司 A kind of message processing method, equipment and system realizing QoS and ensureing
CN111510387A (en) * 2019-01-30 2020-08-07 华为技术有限公司 Data forwarding method and related device
CN112217719A (en) * 2019-07-12 2021-01-12 华为技术有限公司 Data transmission method, network node and storage medium
CN112437009A (en) * 2020-11-27 2021-03-02 网络通信与安全紫金山实验室 SRv6 method, router, routing system and storage medium for end-to-end flow policy
CN112511427A (en) * 2020-01-14 2021-03-16 中兴通讯股份有限公司 Segment routing service processing method and device, routing equipment and storage medium
CN112583689A (en) * 2019-09-30 2021-03-30 瞻博网络公司 Mapping services to tunnels for forwarding packets using network devices
CN112671651A (en) * 2020-11-17 2021-04-16 新华三技术有限公司 Message forwarding method and device
CN112751763A (en) * 2019-10-30 2021-05-04 北京华为数字技术有限公司 Message forwarding method, device, storage medium and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10419982B1 (en) * 2018-03-14 2019-09-17 Cisco Technology, Inc. Methods and apparatus for providing end marker functionality in mobile networks having SRv6-configured mobile user planes
CN111510387A (en) * 2019-01-30 2020-08-07 华为技术有限公司 Data forwarding method and related device
CN110535782A (en) * 2019-06-15 2019-12-03 华为技术有限公司 A kind of message processing method, equipment and system realizing QoS and ensureing
CN112217719A (en) * 2019-07-12 2021-01-12 华为技术有限公司 Data transmission method, network node and storage medium
CN112583689A (en) * 2019-09-30 2021-03-30 瞻博网络公司 Mapping services to tunnels for forwarding packets using network devices
CN112751763A (en) * 2019-10-30 2021-05-04 北京华为数字技术有限公司 Message forwarding method, device, storage medium and system
CN112511427A (en) * 2020-01-14 2021-03-16 中兴通讯股份有限公司 Segment routing service processing method and device, routing equipment and storage medium
CN112671651A (en) * 2020-11-17 2021-04-16 新华三技术有限公司 Message forwarding method and device
CN112437009A (en) * 2020-11-27 2021-03-02 网络通信与安全紫金山实验室 SRv6 method, router, routing system and storage medium for end-to-end flow policy

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
5G承载网的"SRv6+EVPN"技术研究与规模部署;吴伟等;《电信科学》;20200831(第08期);全文 *
金融骨干网的SRv6 Policy研究与应用;祖立军等;《电信科学》;20200820(第08期);全文 *

Also Published As

Publication number Publication date
CN113726655A (en) 2021-11-30

Similar Documents

Publication Publication Date Title
US11374862B2 (en) Packet sending and processing method and apparatus, PE node, and node
WO2021063232A1 (en) Method, apparatus and system for establishing bier forwarding table entry
EP3896923A1 (en) Bier packet sending method and apparatus
EP3713162A1 (en) Route processing method and apparatus, and data transmission method and apparatus
US9450779B2 (en) Edge link discovery
CN110912796B (en) Communication method, device and system
CN111682996B (en) Method for forwarding message in network, network node and network system
EP2997702B1 (en) Compressing singly linked lists sharing common nodes for multi-destination group expansion
US8165038B2 (en) Network physical connection inference for IP tunnels
CN110417655B (en) Method and device for forwarding data message
CN113132235B (en) Data message processing method based on virtual circuit and construction method of forwarding table item
CN111917622B (en) Reverse Path Forwarding (RPF) checking method and device
CN107968749B (en) Method for realizing QinQ route termination, switching chip and switch
US7782797B2 (en) Methods and apparatus for self partitioning a data network to prevent address conflicts
CN111884903B (en) Service isolation method and device, SDN network system and routing equipment
CN107896188B (en) Data forwarding method and device
CN113726653B (en) Message processing method and device
CN108183858B (en) Route introducing method and device
CN113726655B (en) Message drainage method and device, head-end equipment and storage medium
CN106230730B (en) Multicast transmission method and device
CN108282404B (en) Route generation method, device and system
CN112929193A (en) Method and apparatus for configuring aging time of medium access control address
US12034631B2 (en) Loop avoidance communications method, device, and system
CN114785725B (en) Micro-segmentation strategy route learning method, message forwarding method and device
US20210119906A1 (en) Loop Avoidance Communications Method, Device, and System

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant