Policy distribution method and device based on SRv6 TE Policy
By splitting the SRv6 TE Policy policy into unique and shared SID blocks and distributing them using unicast and multicast methods, the problems of low policy distribution synchronization and poor network stability in the existing technology are solved, and more efficient policy distribution and network stability are achieved.
Patent Information
- Application Number
- CN202211458665.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-21
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2042-11-21
AI Technical Summary
The existing SRv6 TE Policy policy distribution methods have problems such as poor network stability and low policy distribution synchronization, which leads to inconsistency in data flows during forwarding and processing, which may cause network congestion.
By splitting the SRv6 policy to be distributed into unique SID blocks and common SID blocks, and sorting them based on the order of path SIDs, the unique SID blocks are unicast and the common SID block multicast. Finally, the reorganized SRv6 policy is generated on the policy target node and written to the SRv6 node pipeline.
This method reduces the number of policy issuance times, shortens the policy push time, improves the synchronization of policy distribution, and avoids network instability and congestion risks caused by inconsistencies between old and new policies.
Smart Images

Figure CN115766580B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a policy distribution method and device based on SRv6 TE Policy. Background Art
[0002] SR (segment routing) technology was created under the influence of SDN thinking. Its core idea is to segment the path and arrange and combine the paths at the initial node to determine the travel path.
[0003] SR technology supports two forwarding planes, among which the SR based on the IPv6 forwarding plane is called SRv6 (SegmentRouting IPv6), and its SID (segment identifier) is an IPv6 address. IPv6 packets are composed of three parts: the IPv6 standard header, the extension header, and the payload. The implementation of SRv6 relies on an IPv6 extension header called SRH. This extension header establishes an IPv6 explicit path and stores the segment list information of the specified IPv6 path. The source endpoint of SRv6 can combine segments / labels representing different functions according to needs and write them into the segment list. The intermediate nodes can forward according to the path information contained in the SRH extension header. This is the source routing principle of SRv6.
[0004] SRv6 TE Policy (IPv6 Segment Routing Traffic Engineering) is a new tunnel diversion technology developed based on SRv6 technology. Each SRv6 node can make a policy request to the controller. The controller performs centralized path calculation for each SRv6 policy request, and then sends the corresponding policy message to each node in turn. The policy message is actually a list of policy rules, that is, the segment list information of the specified path of IPv6 is formed by combining segments / labels representing different functions according to the needs. After receiving the policy message, the headend node adds the segment list to the data packet, and the rest of the network devices execute the instructions embedded in the list.
[0005] In SRv6 TE Policy, the controller performs centralized path calculation for the policy requests raised by each SRv6, and then sends the corresponding policy messages to each node in turn; the SRv6 node that receives the policy update message first updates its own flow table first, and the SRv6 node that receives the policy update message later updates it later. During the period when the policy starts to be pushed to all relevant SRv6 nodes to complete the policy update, all relevant SRv6 nodes update their own flow tables asynchronously. Some old policies that have not been updated and some new policies that have been updated take effect at the same time, resulting in inconsistent policies, which may cause inconsistency in data flow forwarding and processing, thereby bringing instability to the network and the risk of a large amount of congestion. Therefore, the existing SRv6 TE Policy policy distribution method has the problems of poor network stability and low synchronization of policy distribution. Therefore, for the policy distribution of SRv6 TE Policy, how to improve the stability of the network and how to improve the synchronization of policy distribution are technical problems that need to be solved urgently. Summary of the invention
[0006] In view of this, the present invention provides a policy distribution method and device based on SRv6 TE Policy to solve one or more problems existing in the prior art.
[0007] According to one aspect of the present invention, the present invention discloses a policy distribution method based on SRv6 TE Policy, the method comprising:
[0008] Acquire multiple SRv6 policies to be distributed; each of the SRv6 policies to be distributed includes a policy target and a path SID;
[0009] Extracting a unique SID block and a shared SID block from each of the path SIDs, wherein the unique SID block is a partial path SID that exists independently in each of the path SIDs, and the shared SID block is a partial path SID that is shared by at least two of the path SIDs, and sorting the extracted unique SID blocks and shared SID blocks based on the order of the path SIDs of each of the SRv6 policies to be distributed;
[0010] Unicasting the unique SID block to a corresponding single policy target and multicasting the shared SID block to corresponding multiple policy targets based on the ranking;
[0011] After the SID blocks of each SRv6 policy to be distributed are distributed, each policy target will reorganize the received unique SID blocks and / or shared SID blocks based on the order of the path SIDs of each SRv6 policy to be distributed to generate a reorganized SRv6 policy, use the IPv6 address of the first node in the reorganized SRv6 policy as the policy issuance destination IPv6 address, and write the reorganized SRv6 policy into the SRv6 node pipeline.
[0012] In some embodiments of the present invention, before unicasting the unique SID block to the corresponding single policy target based on the sorting, and multicasting the shared SID block to the corresponding multiple policy targets, the method further includes:
[0013] Pushing a "distribution start" signal to all SRv6 nodes in the domain; and / or
[0014] After unicasting the unique SID block to a corresponding single policy target based on the sorting, and multicasting the shared SID block to corresponding multiple policy targets, the method further includes:
[0015] Pushes the "distribution end" signal to all SRv6 nodes in the domain.
[0016] In some embodiments of the present invention,
[0017] Pushing a “distribution start” signal to all SRv6 nodes in the domain based on the first bit string; and / or
[0018] Pushing a "distribution end" signal to all SRv6 nodes in the domain based on the first bit string;
[0019] The bit length of the first bit string is the total number of all nodes supporting SRv6 TE Policy in the domain, and the value of each bit of the first bit string is 1.
[0020] In some embodiments of the present invention, unicasting the unique SID block to a corresponding single policy target based on the sorting, and multicasting the shared SID block to corresponding multiple policy targets, comprises:
[0021] Determine a second bit string corresponding to each SID block, where the bit length of the second bit string is the total number of all SRv6 nodes in the domain, and the bit value corresponding to the policy target position to which the SID block belongs in the second bit string is 1;
[0022] According to the second bit string of each of the SID blocks, the unique SID block is unicast to a corresponding single policy target based on the sorting, and the shared SID block is multicast to corresponding multiple policy targets.
[0023] In some embodiments of the present invention, the extracted unique SID blocks and shared SID blocks are sorted based on the order of the path SIDs of the SRv6 policies to be distributed, including:
[0024] Set the same distribution number for the SRv6 policies to be distributed at the same time;
[0025] Setting the same sequence number for the common SID blocks included in each of the path SIDs;
[0026] Setting different sequence numbers for the unique SID blocks contained in each of the path SIDs;
[0027] The extracted unique SID blocks and shared SID blocks are sorted based on the sequence numbers of the SID blocks.
[0028] In some embodiments of the present invention, the priority of each unique SID block located before the common SID block in each path SID is higher than the priority of the common SID block.
[0029] In some embodiments of the present invention, each of the policy targets reorganizes the received unique SID blocks and / or shared SID blocks into SRv6 policies based on the order of the path SIDs of each SRv6 policy to be distributed, including:
[0030] Get the sequence number of each SID;
[0031] The received unique SID blocks and / or shared SID blocks are reassembled based on the sequence numbers to generate a reassembled SRv6 policy.
[0032] In some embodiments of the present invention, the shared SID block is multicast using BIERv6.
[0033] According to another aspect of the present invention, a policy distribution system based on SRv6 TE Policy is also provided. The system includes a processor and a memory. The memory stores computer instructions. The processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the system implements the steps of the method described in any of the above embodiments.
[0034] According to another aspect of the present invention, there is provided a computer-readable storage medium on which a computer program is stored, wherein the program, when executed by a processor, implements the steps of the method described in any of the above embodiments.
[0035] The SRv6 TE Policy-based policy distribution method and device disclosed in the embodiment of the present invention first splits the acquired SRv6 policy to be distributed into a unique SID block and a shared SID block, and then sends the shared SID block shared by multiple path SIDs by multicast, and sends the unique SID block by unicast, and then each policy target reorganizes all received SID blocks to generate a reorganized SRv6 policy consistent with the SRv6 policy to be distributed. This method reduces the number of policy issuances, thereby shortening the policy push time and effectively improving the synchronization of policy distribution. In addition, this method also avoids the problem of inconsistent processing and forwarding of data packets caused by the simultaneous effectiveness of some old policies that have not been updated and some new policies that have been updated during the period from the start of policy push to the completion of policy update on all relevant SRv6 nodes; thereby improving the stability of the network and avoiding the risk of large-scale congestion in the network.
[0036] Additional advantages, purposes, and features of the present invention will be described in part in the following description, and will become apparent to those skilled in the art after studying the following, or may be learned from the practice of the present invention. The purposes and other advantages of the present invention may be achieved and obtained by the structures specifically pointed out in the written description, claims, and drawings.
[0037] Those skilled in the art will appreciate that the objectives and advantages that can be achieved with the present invention are not limited to the above specific description, and the above and other objectives that can be achieved by the present invention will be more clearly understood from the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] The drawings described herein are used to provide a further understanding of the present invention, constitute a part of this application, and do not constitute a limitation of the present invention. The components in the drawings are not drawn to scale, but are only for illustrating the principles of the present invention. In order to facilitate the illustration and description of some parts of the present invention, the corresponding parts in the drawings may be enlarged, that is, they may become larger relative to other components in the exemplary device actually manufactured according to the present invention. In the drawings:
[0039] Figure 1 The figure is a flow chart of a policy distribution method based on SRv6 TE Policy according to an embodiment of the present invention.
[0040] Figure 2 The figure shows the SRv6 packet forwarding process.
[0041] Figure 3 A schematic diagram of the structure of a path tree according to an embodiment of the present invention.
[0042] Figure 4The figure is a schematic diagram of the architecture of a policy distribution system based on SRv6 TE Policy according to an embodiment of the present invention.
[0043] Figure 5 The figure is a schematic diagram of a network topology structure according to an embodiment of the present invention. DETAILED DESCRIPTION
[0044] To make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are further described in detail below in conjunction with the accompanying drawings. Here, the exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but are not intended to limit the present invention.
[0045] It should be noted here that in order to avoid obscuring the present invention due to unnecessary details, only structures and / or processing steps closely related to the solutions according to the present invention are shown in the accompanying drawings, while other details that are not closely related to the present invention are omitted.
[0046] It should be emphasized that the terms “include / comprises / has” when used herein refer to the presence of features, elements, steps or components, but do not exclude the presence or addition of one or more other features, elements, steps or components.
[0047] Since the current SRv6 TE Policy (IPv6 Segment Routing Traffic Engineering) policy distribution method has the problems of poor network stability and low synchronization of policy distribution; the present invention proposes a policy distribution method and device based on SRv6 TE Policy, which is intended to solve the synchronization problem of policy distribution faced by the controller when performing centralized path calculation and distribution in SRv6 TE Policy, so as to ensure the consistency of the policy and maintain the stability of network operation. In this application, the SRv6 node is a white box switch, that is, the switch architecture is divided into a switching layer and an operating system layer; the switching layer is responsible for the actual data packet processing, and the operating system layer is responsible for the management of the device and the policy functions of the system.
[0048] In addition, before introducing the SRv6 TE Policy-based policy distribution method and device of the present application, the SRv6 message forwarding process is first described by way of example. Figure 2 , suppose there is a message that needs to be forwarded from host 1 to host 2, host 1 sends the message to node A for processing; nodes A, B, D, and E all support SRv6, node C does not support SRv6 and only supports IPv6; network programming is performed on source node A, hoping that the message will be delivered to node E through links BC and CD, and then delivered to host 2 by node E.
[0049] Specifically, the message forwarding process is divided into the following steps:
[0050] 1. Source node A encapsulates the SRv6 path information in the SRH (Segment Routing Header), specifies the SID (Segment Identifier) of the BC and CD links, and also encapsulates the SID A5::10 (this SID corresponds to an IPv4 VPN of node E) published by node E. There are three SIDs in total, which are pressed into the SID sequence in reverse order. At this time, SL (Segment Left, the leftmost segment pointer) = 2, and the SegmentList[2] value is copied to the destination address DA field. The IPv6 routing table is searched according to the longest match principle, and it is forwarded to node B.
[0051] 2. The message arrives at node B. Node B searches the local SID table (which stores the SRv6 SID information generated by this node), hits its own SID (End.X SID, Layer 3 connection segment identifier), and executes the instruction action corresponding to the SID. The SL value is reduced by 1, and the SegmentList value is copied to the DA field. At the same time, the message is sent out from the link (BC) bound to the SID.
[0052] 3. The message arrives at node C. C does not have SRv6 capability and cannot recognize SRH. It follows the normal IPv6 message processing flow, searches the IPv6 routing table according to the longest match principle, and forwards it to node D represented by the current destination address.
[0053] 4. After receiving the message, node D searches the local SID table according to the destination address A4::45 and finds its own SID (End.XSID, Layer 3 connection segment identifier). As with node B, the SL value is reduced by 1, A5::10 is used as the DA, and the message is sent out.
[0054] 5. After receiving the message, node E searches the local SID table according to A5::10, hits its own SID (End.DT4 SID, IPv4VPN segment identifier), executes the corresponding instruction action, decapsulates the message, removes the IPv6 message header, and forwards the inner IPv4 message in the IPv4 routing table of the VPN (virtual private network) instance bound to the SID, and finally sends the message to host 2.
[0055] Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In the accompanying drawings, the same reference numerals represent the same or similar components, or the same or similar steps.
[0056] Figure 1 FIG. 1 is a flow chart of a policy distribution method based on SRv6 TE Policy according to an embodiment of the present invention. Figure 1 As shown, the SRv6 TE Policy-based policy distribution method includes at least steps S10 to S40.
[0057] Step S10: Acquire multiple SRv6 policies to be distributed; each of the SRv6 policies to be distributed includes a policy target and a path SID.
[0058] In this step, the multiple SRv6 policies to be distributed are all the SRv6 policy entries to be issued and updated after a routing calculation. Each SRv6 policy entry may include two parts: a policy target and a SID list. The policy target indicates the destination node to which the policy needs to be issued; the SID list indicates the rule of the policy entry, including the routing destination address information and its corresponding path SID; generally, the last node in the path SID represents the routing destination address. For example, the rule of the SRv6 policy entry is 4: 1->2->4, the policy target in the SRv6 policy entry is node 1, and the SID list or path SID is 1->2->4; the SRv6 policy entry represents that the traffic with a destination address of 4 will be encapsulated with the rule of "1->2->4", that is, the route of the traffic is node 1, node 2, and node 4.
[0059] Step S20: extracting a unique SID block and a common SID block from each of the path SIDs, wherein the unique SID block is a partial path SID that exists independently in each of the path SIDs, and the common SID block is a partial path SID that is shared by at least two of the path SIDs, and sorting the extracted unique SID blocks and common SID blocks based on the order of the path SIDs of each of the SRv6 policies to be distributed.
[0060] In this step, the unique SID block and the shared SID block are both part of the SID in the path SID, and the number of nodes contained in the path SID in each SID block can be one or more. When there are multiple nodes, the SID block at this time is a sequentially continuous part of the path SID in the SRv6 policy to be distributed. The shared SID block can be a SID block shared by all SRv6 policies to be distributed, or it can be a SID block shared by some SRv6 policies to be distributed. In addition, the extracted unique SID blocks and shared SID blocks are sorted based on the order of the path SIDs of each SRv6 policy to be distributed, so as to push each SID block based on the node order reflected in the specific path SID of each SRv6 policy to be distributed.
[0061] Exemplarily, the extracted unique SID blocks and shared SID blocks are sorted based on the order of the path SIDs of each SRv6 policy to be distributed, including: setting the same distribution number for the SRv6 policies to be distributed that are issued at the same time; setting the same sequence number for the shared SID blocks contained in each path SID; setting different sequence numbers for the unique SID blocks contained in each path SID; sorting the extracted unique SID blocks and shared SID blocks based on the sequence number of each SID block. Among them, the priority of each unique SID block located before the shared SID block in each path SID is higher than the priority of the shared SID block; that is, the priority of the SID block in the previous order in the path SID is higher than the priority of the SID block in the following order.
[0062] In the above embodiment, the extraction of the SID block of the SRv6 policy entry can be achieved by the SRv6 policy decomposition module. For different SRv6 policy entries, the continuous partial path SIDs with the same order are extracted to form a common SID block, and the separate partial path SIDs in each SRv6 policy entry are extracted to form a unique SID block. The common SID block and the unique SID block are the distribution strategy SID block. The distribution strategy SID block contains a distribution number, a sequence number and a partial SID list (the partial SID list here is the SID list corresponding to each SID block, that is, a part extracted from the SID list of the entire SRv6 policy entry). Among them, the distribution number represents the number of the policy distribution this time, so as to avoid conflicts when the SRv6 policies to be distributed that are not issued at the same time have the same SID block, the sequence number represents the order of the SID block, and the partial SID list represents the SID content in the SRv6 policy entry actually issued, that is, the partial path SID corresponding to the SID block.
[0063] For example, assuming that there are two SRv6 policies that need to be distributed, the distribution number can be set to 101. Policy a: the policy target is node a, and the SID list is 1->2->3->6->7->9; Policy b: the policy target is node b, and the SID list is 1->2->3->8->12->7; in this embodiment, the SID list can also be regarded as the path SID in the SRv6 policy to be distributed.
[0064] First, extract the common SID block of policy a and policy b. According to the SID lists of policy a and policy b, policy a and policy b have the same partial path SID order: 1->2->3. At this time, the first distribution policy SID block is set to 1->2->3. The specific content is shown in the following table:
[0065] Distribution Number Sequential Number SID List Strategy 101 1 1->2->3 a, b
[0066] After determining the first distribution strategy SID block, based on the SID lists of strategies a and b, it can be seen that strategy a has a unique partial path SID: 6, and strategy b has a unique partial path SID: 8->12. At this time, the unique partial path SID of strategy a is set as the second distribution strategy SID block, as shown in the following table:
[0067] Distribution Number Sequential Number SID List Strategy 101 2 6 a
[0068] Similarly, since policy b has a unique partial path SID: 8->12, the unique partial path SID of policy b is set to the third distribution policy SID block, as shown in the following table:
[0069] Distribution Number Sequential Number SID List Strategy 101 3 8->12 b
[0070] Based on the above steps, the SID blocks of the partial path SIDs unique to policies a and b are extracted. Based on the overall path SIDs of policies a and b, it can be seen that the second distribution strategy SID block of policy a and the third distribution strategy SID block of policy b have a common partial path SID: 7. Therefore, a fourth distribution strategy SID block common to policies a and b is further planned, as follows:
[0071] Distribution Number Sequential Number SID List Strategy 101 4 7 a, b
[0072] At this point, all path SIDs in policy b have been planned, and the remaining path SID: 9 in policy a is unique, so the fifth distribution policy SID block is further planned for policy a:
[0073] Distribution Number Sequential Number SID List Strategy 101 5 9 a
[0074] Based on the above content, it can be found that an SRv6 policy entry generated by an SRv6 routing calculation will be decomposed into multiple SID blocks with numbers and policy target identifiers. The SID block is the basic unit for policy issuance in this application.
[0075] Step S30: Unicast the unique SID block to a corresponding single policy target based on the ranking, and multicast the shared SID block to corresponding multiple policy targets.
[0076] In this step, the policy target can also be understood as the SRv6 node that needs to perform policy update. The push of SID blocks can be implemented on the control plane through the SRv6 policy push function module, which is aimed at the local operating system of all SRv6 nodes that need to perform policy update; SRv6 policy push is responsible for pushing each SID block generated by SRv6 policy decomposition to the corresponding SRv6 node, that is, unicasting the unique SID block to the corresponding single policy target (single SRv6 node), and multicasting the shared SID block to the corresponding multiple policy targets (multiple SRv6 nodes).
[0077] In one embodiment, before unicasting the unique SID block to the corresponding single policy target based on the sorting, and multicasting the shared SID block to the corresponding multiple policy targets, it also includes: pushing a "distribution start" signal to all SRv6 nodes in the domain. In other embodiments, in addition to pushing the "distribution start" signal to all SRv6 nodes in the domain, after unicasting the unique SID block to the corresponding single policy target based on the sorting, and multicasting the shared SID block to the corresponding multiple policy targets, it may also include: pushing a "distribution end" signal to all SRv6 nodes in the domain. In other embodiments, during the policy push process, the "distribution end" signal may also be pushed to all SRv6 nodes in the domain only after the push is completed. Exemplarily, based on the first bit string, a "distribution start" signal is pushed to all SRv6 nodes in the domain; and / or, based on the first bit string, a "distribution end" signal is pushed to all SRv6 nodes in the domain; wherein the bit length of the first bit string is the total number of all nodes in the domain that support SRv6 TE Policy, and the value of each bit of the first bit string is 1, that is, a "distribution end" signal or a "distribution end" signal is pushed to all SRv6 nodes in the domain. The policy target is the SRv6 node that needs to perform a policy update
[0078] In another embodiment, based on the sorting, the unique SID block is unicasted to the corresponding single policy target, and the shared SID block is multicasted to the corresponding multiple policy targets, specifically including: determining the second bit string corresponding to each SID block, the bit length of the second bit string is the total number of all SRv6 nodes in the domain, and the bit value corresponding to the policy target position to which the SID block belongs in the second bit string is 1; according to the second bit string of each SID block, based on the sorting, the unique SID block is unicasted to the corresponding single policy target, and the shared SID block is multicast to the corresponding multiple policy targets. In this embodiment, if one of the SID blocks is a SID block shared by node 1 and node 2, then at this time, the bit values corresponding to the positions of node 1 and node 2 in the corresponding second bit string are all 1, and the other bit values are all 0.
[0079] In the above embodiment, the SRv6 policy push includes four steps: push initiation, BitString mapping, BIERv6 (Bit Index Explicit Forwarding based on IPv6) multicast push, and push stop.
[0080] Push initiation: Push initiation means that based on the calculation of the SRv6 policy, the policy push initiation signal is sent to all SRv6 nodes in the domain through BIERv6 multicast. The bit string of the push initiation signal is that each bit in is set to 1. There is no specific limitation on the specific type of the signal, which can be a specific multicast IP or a specific UDP port, etc.
[0081] Bit string mapping: According to the sequential numbering, based on the SRv6 node corresponding to the policy to which the SID block belongs, the destination node to which the SID block needs to be multicast is determined, and mapped to the bit string value specified by the control plane. After the bit string mapping is completed, each SID block will have a corresponding bit string value, indicating the SRv6 node corresponding to the SID block.
[0082] BIERv6 multicast push: SID blocks are multicast pushed in ascending order according to the order of SID blocks. Multicast push uses BIERv6 or BIERv6 derivative technologies, such as MSR6 BE. The bit string in BIERv6 is determined by bit string mapping.
[0083] Push stop: After completing the push of all SID blocks, the control plane will send a multicast push stop signal to all SRv6 nodes involved in this policy. The bit string of the push stop signal is set to 1 for all the corresponding bits of all SRv6 nodes in the domain. There is no limitation on the specific type of the signal, which can be a specific multicast IP or a specific UDP port, etc. In addition, after completing the push stop, the local operating system of the SRv6 node will execute the SRv6 policy reorganization and effectiveness function, combine the received SID blocks, generate the corresponding routing table and forwarding table, and write them into the pipeline, such as step S40.
[0084] BIERv6 is a BIER (Bit Index Explicit Replication) bearer. The main principle is to use a bit string to represent the leaf nodes on the multicast tree. Each bit represents a specific multicast leaf node. It flexibly sets 0 or 1 to indicate whether the node is on the multicast tree. BIER forwards traffic along the shortest path tree, such as Figure 3A network topology and the shortest path tree from node 1 to all destinations are shown. In this multicast tree, the bit string is 6 bits and the counting starts from the least significant bit of the bit string, that is, '000001' corresponds to node 1 and '100000' corresponds to node 6. Assume that node 1 receives a packet with a bit string of '100100' in the BIER header, that is, the corresponding bits of node 3 and node 6 are activated. Therefore, node 1 needs to send a copy of the packet to node 2 and node 3.
[0085] To prevent duplication, a BFR (bit string router) supporting BIER technology needs to reset the bit string in the BIER header of the data packet. In the example, node 1 cancels the setting of node 6 when forwarding the data packet to node 3, that is, the bit string becomes '000100', and cancels the setting of node 3 when forwarding the data packet to node 2, that is, the bit string becomes '100000'. This ensures that despite the duplication of the data packet, there is only one data packet on the way to each destination.
[0086] The process of BFR processing data packets is: create an internal copy of the bit string, and execute the following algorithm until the internal copy of the bit string of a certain BFR is all zero. BFR looks for the destination indicated in the internal copy of the bit string, and the bit string and the F-BM (forwarding bit mask) corresponding to the destination in the BIFT (bit string forwarding table) are ANDed to form a new bit string. BFR sends a copy of the data packet with a modified BIER header to the next hop indicated in the BIFT. According to the above process, the multicast data packet with the bit string of '100100' in the example can successfully reach the target nodes 3 and 6.
[0087] Step S40: After the SID blocks of each SRv6 policy to be distributed are distributed, each policy target will reorganize the received unique SID blocks and / or shared SID blocks based on the receiving order to generate a reorganized SRv6 policy, use the IPv6 address of the first node in the reorganized SRv6 policy as the policy issuance destination IPv6 address, and write the reorganized SRv6 policy into the SRv6 node pipeline.
[0088] In this step, each policy target reorganizes all received SID blocks based on the order of the path SIDs of each SRv6 policy to be distributed, and the reorganized SRv6 policy obtained after the reorganization is the same as the corresponding SRv6 policy to be distributed. Exemplarily, the SRv6 policy reorganization function is executed on the data plane, and the local operating system of the relevant SRv6 node executes the functional module. That is, the relevant SRv6 node reorganizes the received SID blocks according to the sequential numbering to generate a complete SRv6 policy, and then the operating system writes the reorganized complete SRv6 policy into the SRv6 node pipeline.
[0089] Exemplarily, each of the policy targets reorganizes the received unique SID blocks and / or shared SID blocks based on the order of the path SIDs of each SRv6 policy to be distributed to generate a reorganized SRv6 policy, including: obtaining the sequence number of each SID; and reorganizing the received unique SID blocks and / or shared SID blocks based on the sequence number to generate a reorganized SRv6 policy.
[0090] For example, when the above-mentioned policies a and b are split into five SID blocks and pushed to the corresponding policy targets, the policy target node a receives a total of 4 SID blocks, as shown in the following table:
[0091]
[0092]
[0093] After node a receives the above four SID blocks, the operating system of node a further reorganizes the four SID blocks received in order from small to large, generating a complete reorganized SRv6 policy. The path SID in the reorganized SRv6 policy is: 1->2->3->6->7->9. Among them, the matching routing destination IPv6 address is the IPv6 address of node 9, and then the operating system of node a writes the reorganized SRv6 policy into the SRv6 node pipeline.
[0094] The policy target node b is similar. Node b receives 3 SID blocks, as shown in the following table:
[0095] Distribution Number Sequential Number SID List Strategy 101 1 1->2->3 a, b 101 3 8->12 b 101 4 7 a, b
[0096] After node b receives the above three SID blocks, the operating system of node b reassembles the received SID blocks in order from small to large, generating a complete reassembled SRv6 policy, namely: 1->2->3->8->12->7. Among them, the matching route destination IPv6 address is the IPv6 address of node 7, and then the operating system of node b writes the policy into the SRv6 node pipeline.
[0097] In the above embodiment, after the controller in the SRv6 TE Policy completes a policy calculation, each complete SRv6 policy is split into multiple SRv6 label segments, and the BIERv6 technology is used to multicast and distribute the common label segments to each related SRv6 node, thereby shortening the time from the start of policy push to the end of all policy pushes, reducing the number of policy distributions, and effectively improving the synchronization of policy distribution. In addition, the use of multicast technology to distribute SRv6 label segments reduces the overhead required for distributing policies.
[0098] Correspondingly, the present invention also provides a policy distribution system based on SRv6 TE Policy, the system comprising a processor and a memory, the memory storing computer instructions, the processor being used to execute the computer instructions stored in the memory, and when the computer instructions are executed by the processor, the system implements the steps of the method described in any of the above embodiments.
[0099] Figure 4 FIG. 1 is a schematic diagram of the architecture of a policy distribution system based on SRv6 TE Policy according to an embodiment of the present invention. Figure 4 The system includes three abstract functional modules: policy decomposition, policy push, and policy reorganization. The policy decomposition module is used to decompose the SRv6 policy to be distributed into multiple SID blocks, while the policy push module pushes each decomposed SID block to the corresponding policy target, and the policy reorganization module is used to reorganize all SID blocks received by each policy target.
[0100] In order to better embody the present invention, the technical solution of the present invention is further described in detail below with a specific example.
[0101] Figure 5 This is a schematic diagram of a network topology structure according to an embodiment of the present invention. Figure 5 , the network topology contains 5 nodes, of which 1, 3, 4, and 5 are SRv6 edge nodes and need to be encapsulated with SRv6 policies. In BIERv6, the bit strings corresponding to 1, 3, 4, and 5 are shown in the following table:
[0102] node BitString 1 1000 3 0100 4 0010 5 0001
[0103] from Figure 5 It can be seen that each node is about to update the SRv6 rules. For example, the rule "4:1->2->4" in node 1 means that the traffic with the destination address 4 will be encapsulated with the rule "1->2->4", that is, the route of the traffic is 1,2,4. In this embodiment, in order to avoid ambiguity, it is limited to a node that can only issue one policy at a time, so three distribution processes are listed below, and the numbers are defined as distribution number 1, distribution number 2, and distribution number 3.
[0104] For distribution number 1, the distributed strategies are 4:1->2->4 for node 1, 4:3->2->4 for node 3, and 4:5->2->4 for node 5. In the distribution process, the bit string is first set to 1111 (i.e., nodes 1, 3, 4, 5), and a "distribution start" signal (or S signal) is sent through multicast; unique SID blocks are sent to nodes 1, 3, and 5 respectively through unicast, and the rule contents in the three unique SID blocks are "1", "3", and "5" respectively; the bit string is set to 1101 (i.e., nodes 1, 3, 5), and a common SID block is sent through multicast, and the rule content in the common SID block is "2->4"; further, the bit string is set to 1111 (i.e., nodes 1, 3, 4, 5), and a "distribution end" signal (or E signal) is sent through multicast; finally, after receiving the E signal, nodes 1, 3, and 5 reassemble based on the SID blocks they received to generate a reassembled SRv6 strategy.
[0105] For distribution number 2, the distributed policies are 3 for node 1: 1->2->3, 3 for node 5: 5->2->3, and 4 for node 3: 3->1->4. In the distribution process, the bit string is first set to 1111 (i.e., nodes 1, 3, 4, and 5), and a "distribution start" signal (or S signal) is sent through multicast; unique SID blocks are sent to nodes 1 and 5 respectively through unicast, and the rule contents in the two unique SID blocks are "1" and "5" respectively; the bit string is set to 1001 (i.e., nodes 1 and 5), and a common SID block is sent through multicast, and the rule content in the common SID block is "2->3"; a unique SID block is sent to node 3 through unicast, and the rule content in the unique SID block is "3->2->4"; the bit string is further set to 1111 (i.e., nodes 1, 3, 4, and 5), and a "distribution end" signal (or E signal) is sent through multicast; finally, after receiving the E signal, nodes 1, 3, and 5 reassemble based on the SID blocks they received to generate a reassembled SRv6 strategy.
[0106] For distribution number 3, the distributed strategy is 5:1->5 for node 1 and 5:3->1->5 for node 3. Similarly, in the distribution process, the bit string is first set to 1111 (i.e., nodes 1, 3, 4, 5), and a "distribution start" signal (or S signal) is sent through multicast; then a unique SID block is sent to node 3 through unicast, and the rule content in the unique SID block is "3"; further, the bit string is set to 1100 (i.e., nodes 1, 3), and a common SID block is sent through multicast, and the rule content in the common SID block is "1->5"; then the bit string is set to 1111 (i.e., nodes 1, 3, 4, 5), and a "distribution end" signal (or E signal) is sent through multicast; finally, after receiving the E signal, nodes 1 and 3 reassemble based on the SID blocks they received to generate a reassembled SRv6 strategy.
[0107] In the network topology diagram of this embodiment, since node 4 cannot be integrated with other nodes for multicast transmission, unicast is used for both policies of node 4. That is, the two SRv6 policies to be pushed to node 4 are "1:4->3->1" and "3:4->3". Since the order of node 4's SRv6 policy "1:4->3->1" is inconsistent with that of node 3's SRv6 policy "5:3->1->5", in order to improve the distribution efficiency, it is considered that the above two policies do not have a common SID block. That is, at this time, there is no common SID block between the two SRv6 policies of node 4 and any SRv6 policy to be pushed to other nodes, so the two SRv6 policies of node 4 cannot be integrated with the SRv6 policies of other nodes through multicast transmission; therefore, both policies of node 4 are sent down in unicast form.
[0108] Through the above embodiments, it can be found that this application proposes a "SRv6 synchronous label distribution mechanism based on BIERv6" based on the characteristic that the controller in SRv6 TE Policy performs centralized path calculation and issuance, so as to improve the synchronization of policy issuance and avoid the instability of the network caused by the inconsistency between the old and new policies. The policy distribution method based on SRv6TE Policy of this application splits the policy rules issued by the controller, that is, splits the segment list into multiple SRv6 label segments, each of which contains one or more continuous SID blocks. After the multiple policies are split, the existing public label segments are issued in the form of multicast using BIERv6 technology, and the non-public parts are issued in the form of multicast or unicast; this solution can effectively reduce the number of times the policy is issued, thereby shortening the time for policy push, effectively improving the synchronization of policy distribution, and reducing the overhead of issuing policies.
[0109] The technical solution of this application uses BIERv6 technology to multicast label segments, and uses a signal mechanism to control the flow table update time of related SRv6 nodes. Specifically, a start signal is used to notify all related SRv6 nodes to prepare to start receiving policy messages; the policy is split into label segments and sent in multicast form; an end signal is used to notify each SRv6 node that the policy message has been sent; and all related SRv6 nodes update their own flow tables. This method achieves policy consistency for all related SRv6 nodes.
[0110] In addition, the invention also discloses a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in any of the above embodiments are implemented.
[0111] It should be understood by those skilled in the art that the exemplary components, systems and methods described in conjunction with the embodiments disclosed herein can be implemented in hardware, software or a combination of the two. Whether it is performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present invention are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium or transmitted on a transmission medium or a communication link via a data signal carried in a carrier. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, and the like. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0112] It should also be noted that the exemplary embodiments mentioned in the present invention describe some methods or systems based on a series of steps or devices. However, the present invention is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in a different order from the embodiments, or several steps can be performed simultaneously.
[0113] In the present invention, features described and / or illustrated for one embodiment may be used in the same or similar manner in one or more other embodiments, and / or combined with features of other embodiments or replace features of other embodiments.
[0114] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the embodiments of the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A policy distribution method based on SRv6 TE Policy, characterized in that: The method comprises: Acquire multiple SRv6 policies to be distributed; each of the SRv6 policies to be distributed includes a policy target and a path SID, the policy target indicates a destination node to which the SRv6 policy to be distributed needs to be issued, SRv6 indicates segment routing based on an IPv6 forwarding plane, and SID indicates a segment identifier; Extracting a unique SID block and a shared SID block from each of the path SIDs, wherein the unique SID block is a partial path SID that exists independently in each of the path SIDs, and the shared SID block is a partial path SID that is shared by at least two of the path SIDs, and sorting the extracted unique SID blocks and shared SID blocks based on the order of the path SIDs of each of the SRv6 policies to be distributed; Unicasting the unique SID block to a corresponding single policy target and multicasting the shared SID block to corresponding multiple policy targets based on the ranking; After the SID blocks of each SRv6 policy to be distributed are distributed, each policy target will reorganize the received unique SID blocks and / or shared SID blocks based on the order of the path SIDs of each SRv6 policy to be distributed to generate a reorganized SRv6 policy, use the IPv6 address of the first node in the reorganized SRv6 policy as the policy issuance destination IPv6 address, and write the reorganized SRv6 policy into the SRv6 node pipeline.
2. The SRv6 TE Policy-based policy distribution method according to claim 1, characterized in that: Before unicasting the unique SID block to a corresponding single policy target based on the sorting, and multicasting the shared SID block to corresponding multiple policy targets, the method further includes: Pushing a "distribution start" signal to all SRv6 nodes in the domain; and / or After unicasting the unique SID block to a corresponding single policy target based on the sorting, and multicasting the shared SID block to corresponding multiple policy targets, the method further includes: Pushes the "distribution end" signal to all SRv6 nodes in the domain.
3. The SRv6 TE Policy-based policy distribution method according to claim 2, characterized in that: Pushing a "distribution start" signal to all SRv6 nodes in the domain based on the first bit string; and / or Push a "distribution end" signal to all SRv6 nodes in the domain based on the first bit string; The bit length of the first bit string is the total number of all nodes supporting SRv6 TE Policy in the domain, and the value of each bit of the first bit string is 1, and the SRv6 TE Policy represents the IPv6 segment routing traffic engineering policy.
4. The SRv6 TE Policy-based policy distribution method according to claim 1, characterized in that: Unicasting the unique SID block to a corresponding single policy target based on the sorting, and multicasting the shared SID block to corresponding multiple policy targets, comprises: Determine a second bit string corresponding to each SID block, where the bit length of the second bit string is the total number of all SRv6 nodes in the domain, and the bit value corresponding to the policy target position to which the SID block belongs in the second bit string is 1; According to the second bit string of each of the SID blocks, the unique SID block is unicast to a corresponding single policy target based on the sorting, and the shared SID block is multicast to corresponding multiple policy targets.
5. The SRv6 TE Policy-based policy distribution method according to claim 1, characterized in that: The extracted unique SID blocks and shared SID blocks are sorted based on the order of the path SIDs of the SRv6 policies to be distributed, including: Set the same distribution number for the SRv6 policies to be distributed at the same time; Setting the same sequence number for the common SID blocks included in each of the path SIDs; Setting different sequence numbers for the unique SID blocks contained in each of the path SIDs; The extracted unique SID blocks and shared SID blocks are sorted based on the sequence numbers of the SID blocks.
6. The SRv6 TE Policy-based policy distribution method according to claim 5, characterized in that: The priority of each unique SID block located before the shared SID block in each of the path SIDs is higher than the priority of the shared SID block.
7. The SRv6 TE Policy-based policy distribution method according to claim 6, characterized in that: Each of the policy targets reorganizes the received unique SID blocks and / or shared SID blocks based on the order of the path SIDs of each SRv6 policy to be distributed to generate a reorganized SRv6 policy, including: Get the sequence number of each SID; The received unique SID blocks and / or shared SID blocks are reassembled based on the sequence numbers to generate a reassembled SRv6 policy.
8. The SRv6 TE Policy-based policy distribution method according to any one of claims 1 to 7, characterized in that: The shared SID block is multicasted using BIERv6, where BIERv6 represents bit indexed explicit forwarding based on IPv6.
9. A policy distribution system based on SRv6 TE Policy, the system comprising a processor and a memory, characterized in that: The memory stores computer instructions, and the processor is used to execute the computer instructions stored in the memory. When the computer instructions are executed by the processor, the system implements the steps of the method as claimed in any one of claims 1 to 8.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
SRv6 end-to-end flow strategy method, router, routing system and storage medium
CN112437009A
Method for issuing SR strategy, method for receiving SR strategy, and device
CN113364680A