SRv6 Policy service implementation method based on general forwarding plane
By implementing SRv6 Policy services based on software in the user mode, the problems of low orchestration flexibility and high cost in traditional hardware implementation are solved, and flexible orchestration and equipment costs are achieved.
Patent Information
- Application Number
- CN202411588544.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-14
AI Technical Summary
The forwarding surface of traditional SRv6 Policy services is implemented on hardware ASIC chips, and new SRv6 Policy features and routing policies cannot be added by updating software, with low orchestration flexibility and high access-side equipment costs.
In the user state, SRv6 Policy service is implemented based on software. By obtaining the routing prefix and VPN information of the target outbound service packets, the corresponding VPN Sid is found, encapsulated and sent to the corresponding SRv6 tunnel outbound port, and SegmentList is encapsulated and forwarded.
It improves the orchestration flexibility of SRv6 Policy features and routing policies, reduces the cost of access-side devices, and realizes the ability to dynamically add new features and policies at the software level.
Smart Images

Figure CN119449684A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a method for implementing an SRv6Policy service based on a universal forwarding plane. Background Art
[0002] SRv6 Policy (Segment Routing IPv6 Policy) is an IPv6-based network path control technology that uses the extended header of the IPv6 address to carry path information so that network devices can forward packets based on this information.
[0003] The forwarding plane implementation of traditional SRv6 Policy services is integrated on hardware ASIC chips. However, this approach cannot add new SRv6 Policy features and routing strategies by updating software, has low orchestration flexibility, and is too costly for access-side devices. Summary of the invention
[0004] In view of this, the purpose of this application is to provide an SRv6 Policy service implementation method based on a universal forwarding plane, which can implement SRv6 Policy services based on software in user mode, improve the orchestration flexibility of SRv6 Policy features and routing policies, and reduce the cost of access-side equipment.
[0005] In a first aspect, an embodiment of the present application provides a method for implementing an SRv6 Policy service based on a universal forwarding plane, the method comprising:
[0006] In user mode, obtain the target routing prefix and target virtual private network VPN information corresponding to the target outgoing service message;
[0007] Searching for a target VPN Sid corresponding to the target virtual private network VPN information based on the mapping relationship table;
[0008] Encapsulating the target VPN Sid for the target outbound service message;
[0009] Determine the target SegmentList corresponding to the target outgoing service message according to the routing prefix and the virtual private network VPN information;
[0010] The encapsulated message obtained after encapsulating the target VPN Sid is sent to the SRv6 tunnel egress port corresponding to the target SegmentList, so as to encapsulate the target SegmentList on the encapsulated message through the SRv6 tunnel corresponding to the SRv6 tunnel egress port and forward it.
[0011] In a possible implementation manner, it is characterized in that before searching the target VPN Sid corresponding to the target virtual private network VPN information in the mapping relationship table, the method further includes:
[0012] Searching in the routing table whether the routing entry matching the target routing prefix and the target virtual private network VPN information contains SRV6 information;
[0013] If the SRV6 information is included, the process jumps to the mapping relationship table to search for the target VPN Sid corresponding to the target virtual private network VPN information and continues to execute.
[0014] In a possible implementation, determining the target SegmentList corresponding to the target outgoing service message according to the routing prefix and the virtual private network VPN information includes:
[0015] Determine, according to the routing prefix and the virtual private network VPN information, a target SRv6 Policy corresponding to the target outgoing service message;
[0016] According to the priority of each path in the target SRv6 Policy and the SBFD detection path status, a target SegmentList is determined from all the paths.
[0017] In a possible implementation manner, determining, according to the routing prefix and the virtual private network VPN information, a target SRv6 Policy corresponding to the target outgoing service message includes:
[0018] Determine color information associated with the route according to the route prefix and the virtual private network VPN information;
[0019] Determine the SRv6 Policy corresponding to the color of the route and the next hop address, and obtain a target SRv6 Policy.
[0020] In a possible implementation manner, determining the target SegmentList from all the paths according to the priority of each path in the target SRv6 Policy and the SBFD detection path status includes:
[0021] The path with the highest priority among the paths whose SBFD detection path status is available is determined as the target SegmentList.
[0022] In a possible implementation, the method further includes:
[0023] In user mode, obtain the target incoming service message;
[0024] Decapsulate the target inbound service message SegmentList to obtain a first decapsulated message;
[0025] Searching for VPN information corresponding to the VPN Sid in the first decapsulated message based on the mapping relationship table;
[0026] According to the End type corresponding to the VPN information, the first decapsulated message is decapsulated and directed again before being forwarded.
[0027] In a second aspect, an embodiment of the present application further provides a universal forwarding plane end, the universal forwarding plane end comprising:
[0028] An acquisition module, used to acquire, in user mode, a target routing prefix and target virtual private network VPN information corresponding to a target outgoing service message;
[0029] A search module, used for searching the target VPN Sid corresponding to the target virtual private network VPN information based on the mapping relationship table;
[0030] An encapsulation module, used for encapsulating the target VPN Sid for the target outgoing service message;
[0031] A determination module, used to determine a target SegmentList corresponding to the target outgoing service message according to the routing prefix and the virtual private network VPN information;
[0032] The sending module is used to send the encapsulated message obtained after encapsulating the target VPN Sid to the SRv6 tunnel egress port corresponding to the target SegmentList, so as to encapsulate the target SegmentList in the encapsulated message through the SRv6 tunnel corresponding to the SRv6 tunnel egress port and forward it.
[0033] In a possible implementation manner, before searching the target VPN Sid corresponding to the target virtual private network VPN information in the mapping relationship table, the search module is further configured to:
[0034] Searching in the routing table whether the routing entry matching the target routing prefix and the target virtual private network VPN information contains SRV6 information;
[0035] If the SRV6 information is included, the process jumps to the mapping relationship table to search for the target VPN Sid corresponding to the target virtual private network VPN information and continues to execute.
[0036] In a possible implementation, the determination module is specifically used to determine the target SRv6 Policy corresponding to the target outgoing service message based on the routing prefix and the virtual private network VPN information; and determine the target SegmentList from all the paths based on the priority of each path in the target SRv6 Policy and the SBFD detection path status.
[0037] In a possible implementation, the determination module is specifically used to determine the color information and the next hop address of the route according to the route prefix and the virtual private network VPN information; determine the SRv6 Policy corresponding to the color of the route and the next hop address, and obtain the target SRv6 Policy.
[0038] In a possible implementation manner, the determination module is specifically configured to determine the path with the highest priority among the paths whose SBFD detection path status is in the available status as the target SegmentList.
[0039] In a possible implementation manner, the universal forwarding plane end further includes: a decapsulation module;
[0040] The acquisition module is also used to acquire the target incoming service message in the user mode;
[0041] A decapsulation module, used to decapsulate the target inbound service message SegmentList to obtain a first decapsulated message;
[0042] The search module is further used to search for VPN information corresponding to the VPN Sid in the first decapsulated message based on the mapping relationship table;
[0043] The decapsulation module is further configured to decapsulate and divert the first decapsulated message again and then forward it according to the End type corresponding to the VPN information.
[0044] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the SRv6 Policy service implementation method based on the universal forwarding plane as described in any one of the first aspects.
[0045] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the SRv6 Policy service implementation method based on a universal forwarding plane as described in any one of the first aspects are executed.
[0046] The embodiment of the present application provides an SRv6 Policy service implementation method based on a universal forwarding plane, the method comprising: in user mode, obtaining a target routing prefix and a target virtual private network VPN information corresponding to a target outgoing service message; searching for a target VPN Sid corresponding to the target virtual private network VPN information based on a mapping relationship table; encapsulating the target VPN Sid for the target outgoing service message; determining a target SegmentList corresponding to the target outgoing service message according to the routing prefix and the virtual private network VPN information; sending an encapsulated message obtained after encapsulating the target VPN Sid to an SRv6 tunnel egress port corresponding to the target SegmentList, so as to encapsulate the encapsulated message with the target SegmentList through the SRv6 tunnel corresponding to the SRv6 tunnel egress port, and forwarding the encapsulated message; the method of the present application can implement SRv6 Policy services based on software in user mode, improve the flexibility of SRv6Policy features and routing strategy orchestration, and reduce the cost of access-side equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 A schematic diagram of the structure of an SRv6 Policy service implementation system based on a universal forwarding plane provided in an embodiment of the present application is shown;
[0049] Figure 2 A flowchart of a method for implementing an SRv6 Policy service based on a universal forwarding plane provided in an embodiment of the present application is shown;
[0050] Figure 3 A schematic diagram of the structure of a universal forwarding plane end provided in an embodiment of the present application is shown;
[0051] Figure 4 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0052] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0053] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0054] In order to enable those skilled in the art to use the contents of this application, the following implementation is provided in conjunction with a specific application scenario "the field of communication technology". For those skilled in the art, the general principles defined herein may be applied to other embodiments and application scenarios without departing from the spirit and scope of this application. Although this application is mainly described around the "field of communication technology", it should be understood that this is only an exemplary embodiment.
[0055] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0056] Reference Figure 1 As shown, it is a structural diagram of the SRv6 Policy service implementation system provided in an embodiment of the present application, and the system includes: a controller 101, a local control plane proxy terminal 102, and a universal forwarding plane terminal 103; the local control plane proxy terminal 102 includes a routing module 1021 and an FRR routing protocol stack 1022.
[0057] Among them, the routing module 1021 in the local control plane agent 102 is used to receive the static route sent by the controller 101 through the northbound interface; the routing module in the local control plane agent 102 is also used to receive the dynamic route learned by the FRR routing protocol stack 1022 based on the neighbor route through the internal channel; the routing module 1021 in the local control plane agent 102 is also used to send static routes and dynamic routes to the general forwarding plane end 103 through the southbound channel; the local control plane agent 102 is used to send SRv6 Policy and SRv6 tunnel information to the general forwarding plane end 103 through the southbound channel.
[0058] After receiving the SRv6 Policy and SRv6 tunnel information, the general forwarding plane end 103 is specifically used to: in user mode, obtain the target routing prefix and target virtual private network VPN information corresponding to the target outgoing service message; search for the target VPN Sid corresponding to the target virtual private network VPN information based on the mapping relationship table; encapsulate the target VPN Sid for the target outgoing service message; determine the target SegmentList corresponding to the target outgoing service message according to the routing prefix and the virtual private network VPN information; send the encapsulated message obtained after encapsulating the target VPN Sid to the SRv6 tunnel egress port corresponding to the target SegmentList, so as to encapsulate the encapsulated message with the target SegmentList through the SRv6 tunnel corresponding to the SRv6 tunnel egress port, and forward it.
[0059] The embodiment of the present application provides an SRv6 Policy service implementation system, which can implement SRv6 Policy services based on software in user mode, improve the flexibility of SRv6 Policy features and routing strategies, and reduce the cost of access-side equipment.
[0060] Reference Figure 2 As shown, it is a flow chart of the SRv6 Policy service implementation method based on the universal forwarding plane provided in an embodiment of the present application. The method is applied to the universal forwarding plane end. The exemplary steps of the embodiment of the present application are described below:
[0061] S201. In user mode, obtain a target routing prefix and target virtual private network VPN information corresponding to a target outgoing service message.
[0062] In the implementation manner of the present application, the SRv6 Policy service implementation method is performed in user mode, and the outgoing service message refers to the message that needs to be sent. The target outgoing service message is received through the LAN (Wide Area Network). The target routing prefix refers to the routing prefix carried by the target outgoing service message; the target routing prefix is used to characterize the destination IP address of the target outgoing service message, and this address is used to determine the forwarding path of the target outgoing service message in the network. The corresponding virtual private network VPN information is identified by the target routing prefix to obtain the target virtual private network VPN information; different virtual private network VPN information has different routing prefixes, and the routing prefix is used to distinguish the traffic belonging to different VPNs. The target virtual private network VPN information includes a VPN ID or a VRF instance.
[0063] VPN ID refers to the unique identifier of a virtual private network, and VRF (Virtual Routing and Forwarding) is a technology for implementing VPN, which allows multiple logical routing and forwarding instances to be created on the same physical device. Each VRF instance can be regarded as an independent virtual router with its own routing table and forwarding logic, thereby achieving data isolation between different customers or different networks.
[0064] Furthermore, before S202, it is necessary to search in the routing table whether the routing entry that matches the target routing prefix and the target virtual private network VPN information contains SRV6 information; if it contains SRV6 information, it means that the target outgoing service message is SRv6 traffic, then jump to the target VPNSid corresponding to the target virtual private network VPN information based on the mapping relationship table and continue execution; if it does not contain SRV6 information, it can be forwarded normally.
[0065] S202: Search for a target VPN Sid corresponding to the target virtual private network VPN information based on the mapping relationship table.
[0066] In the implementation manner of the present application, a mapping relationship between virtual private network VPN information and VPN Sid is stored in a mapping relationship table; the mapping relationship is configured by local static routing and dynamic routing. The VPN Sid corresponding to the target virtual private network VPN information in the mapping relationship table is determined as the target VPN Sid.
[0067] The local static routing and dynamic routing are issued by the routing module 1021 in the local control plane proxy 102 .
[0068] S203: Encapsulate the target VPN Sid for the target outgoing service message.
[0069] In the implementation manner of the present application, the VPN technology type and Internet protocol version corresponding to the target outgoing service message are used as keywords to encapsulate the target VPN Sid for the target outgoing service message; wherein the VPN technology types include L2VPN and L3VPN, and the Internet protocol versions include IPv4 and IPv6.
[0070] S204. Determine the target SegmentList corresponding to the target outgoing service message according to the routing prefix and the virtual private network VPN information.
[0071] In SRv6, the Segment List is usually represented by a series of IPv6 addresses, and the destination address of the message will be gradually updated to complete segment-by-segment forwarding.
[0072] Specifically, the target SegmentList corresponding to the target outgoing service message is determined through the following steps:
[0073] Step 1: Determine the target SRv6 Policy corresponding to the target outgoing service message based on the routing prefix and virtual private network VPN information.
[0074] In the implementation manner of the present application, the color information and the next hop address of the route are determined according to the route prefix and the virtual private network VPN information; the SRv6 Policy corresponding to the color and the next hop address of the route is determined, and the target SRv6 Policy is obtained.
[0075] Here, a routing entry matching the target routing prefix and the target virtual private network VPN information is searched in the routing table, and the color information and endpoint information (next hop address) in the routing entry are obtained; and the local SRv6 Policy matching the color information and endpoint information is determined as the target SRv6 Policy.
[0076] Among them, color information and endpoint information are two key attributes of SRv6 Policy; the local SRv6 Policy is issued by the local control plane agent 102.
[0077] In addition, if the routing entry does not contain color information or endpoint information, the message obtained after encapsulating the VPN sid can be forwarded normally.
[0078] Step 2: Determine the target SegmentList from all paths based on the priority of each path in the target SRv6 Policy and the SBFD detection path status.
[0079] In the implementation manner of the present application, the path with the highest priority among the paths whose SBFD detection path status is available is determined as the target SegmentList.
[0080] S205. Send the encapsulated message obtained after encapsulating the target VPN Sid to the SRv6 tunnel egress port corresponding to the target SegmentList, so as to encapsulate the encapsulated message with the target SegmentList through the SRv6 tunnel corresponding to the SRv6 tunnel egress port, and forward it.
[0081] In an implementation manner of the present application, each SegmentList corresponds to an SRv6 tunnel egress port; wherein, the embodiment of the present application separates the egress port and the ingress port of the SRv6 tunnel, and each SRv6 tunnel corresponds to at least one tunnel egress port corresponding to L2VPN or L3VPN and one tunnel ingress port corresponding to L2VPN or L3VPN; the message obtained after encapsulating the target SegmentList is forwarded to the WAN port.
[0082] The key fields of the tunnel exit are as follows:
[0083] add-port srv6_tun1_out / / srv6 tunnel interface name;
[0084] set interface srv6_tun1_out type=srv6 / / srv6 tunnel interface type;
[0085] options:local_ip=1::1 / / srv6 tunnel source address;
[0086] options:remote_ip=2::1 / / SID of the first hop device in the SegmentList path;
[0087] options:out_key=flow / / srv6 tunnel outbound key;
[0088] options:in_key=1 / / srv6 tunnel inbound key, used to distinguish the same-source and destination srv6 tunnels;
[0089] options:srv6_segs="2::1,3::1" / / The outbound SegmetList of the srv6 tunnel does not contain VpnSid.
[0090] The key fields of the tunnel entry are as follows:
[0091] add-port l2_srv6_in / / srv6 inbound tunnel interface name;
[0092] set interface l2_srv6_in type = srv6 / / srv6 tunnel interface type;
[0093] options:key=flow / / srv6 tunnel outbound key;
[0094] options:packet_type=legacy_l2 / / indicates that this tunnel is an L2 tunnel;
[0095] If it is an L3 tunnel, packet_type=legacy_l3.
[0096] Here, the embodiment of the present application adopts a unidirectional SRv6 tunnel port, and forwards messages based on the unidirectional SRv6 tunnel port in user mode, making full use of the existing functional characteristics of the forwarding plane and reducing the software development and maintenance costs of the method. The method is developed based on software and can add new SRv6 Policy features and routing strategies by updating the software, thereby improving the flexibility of orchestration. The architecture realizes software and hardware decoupling, does not need to rely on specific hardware devices and operating system kernels, has higher universality and high scalability.
[0097] Optionally, if the target outbound service message is configured with the flow detection service, after encapsulating the target SegmentList, the corresponding DOH header needs to be encapsulated, and the message coloring and statistics are performed. The raw flow detection data is sent to the local control plane agent. The local control plane agent stores the device flow detection results locally, summarizes them, and uniformly reports them to the control platform.
[0098] Furthermore, the method further comprises:
[0099] a. In user mode, obtain the target incoming service message.
[0100] In the implementation manner of the present application, a target incoming service message of a WAN (Wide Area Network) is received through an SRv6 tunnel ingress port corresponding to the VPN technology type of the target incoming service message. Specifically, if the VPN technology type of the target incoming service message is L2VPN, the target incoming service message of the WAN is received through a tunnel ingress port corresponding to L2VPN; if the VPN technology type of the target incoming service message is L3VPN, the target incoming service message of the WAN is received through a tunnel ingress port corresponding to L3VPN.
[0101] b. Decapsulate the target inbound service message in SegmentList to obtain a first decapsulated message.
[0102] c. Searching for VPN information corresponding to the VPN Sid in the first decapsulated message based on the mapping relationship table.
[0103] d. According to the End type corresponding to the VPN information, the first decapsulated message is decapsulated and directed again before being forwarded.
[0104] In the implementation manner of the present application, each VPN information has a specified End type, and different End types correspond to different decapsulation, diversion strategies, and routing strategies. The target inbound message is forwarded to the LAN.
[0105] The embodiment of the present application provides an SRv6 Policy service implementation method based on a universal forwarding plane, the method comprising: in user mode, obtaining a target routing prefix and a target virtual private network VPN information corresponding to a target outgoing service message; searching for a target VPN Sid corresponding to the target virtual private network VPN information based on a mapping relationship table; encapsulating the target VPN Sid for the target outgoing service message; determining a target SegmentList corresponding to the target outgoing service message according to the routing prefix and the virtual private network VPN information; sending an encapsulated message obtained after encapsulating the target VPN Sid to an SRv6 tunnel egress port corresponding to the target SegmentList, so as to encapsulate the encapsulated message with the target SegmentList through the SRv6 tunnel corresponding to the SRv6 tunnel egress port, and forwarding the encapsulated message; the method of the present application can implement SRv6 Policy services based on software in user mode, improve the flexibility of SRv6Policy features and routing strategy orchestration, and reduce the cost of access-side equipment.
[0106] Reference Figure 3 FIG. 1 is a schematic diagram of a universal forwarding plane end provided in an embodiment of the present application, wherein the universal forwarding plane end includes:
[0107] The acquisition module 301 is used to acquire, in user mode, the target routing prefix and target virtual private network VPN information corresponding to the target outgoing service message;
[0108] A search module 302 is used to search for a target VPN Sid corresponding to the target virtual private network VPN information based on a mapping relationship table;
[0109] The encapsulation module 303 is used to encapsulate the target VPN Sid for the target outgoing service message;
[0110] A determination module 304 is used to determine a target SegmentList corresponding to the target outgoing service message according to the routing prefix and the virtual private network VPN information;
[0111] The sending module 305 is used to send the encapsulated message obtained after encapsulating the target VPN Sid to the SRv6 tunnel egress port corresponding to the target SegmentList, so as to encapsulate the target SegmentList in the encapsulated message through the SRv6 tunnel corresponding to the SRv6 tunnel egress port and forward it.
[0112] In a possible implementation manner, before searching the target VPN Sid corresponding to the target virtual private network VPN information in the mapping relationship table, the search module 302 is further configured to:
[0113] Searching in the routing table whether the routing entry matching the target routing prefix and the target virtual private network VPN information contains SRV6 information;
[0114] If the SRV6 information is included, the process jumps to the mapping relationship table to search for the target VPN Sid corresponding to the target virtual private network VPN information and continues to execute.
[0115] In a possible implementation, the determination module 304 is specifically used to determine the target SRv6 Policy corresponding to the target outgoing service message based on the routing prefix and the virtual private network VPN information; and determine the target SegmentList from all the paths based on the priority of each path in the target SRv6 Policy and the SBFD detection path status.
[0116] In a possible implementation, the determination module 304 is specifically used to determine the color information and the next hop address of the route according to the route prefix and the virtual private network VPN information; determine the SRv6 Policy corresponding to the color of the route and the next hop address, and obtain the target SRv6 Policy.
[0117] In a possible implementation manner, the determination module 304 is specifically configured to determine the path with the highest priority among the paths whose SBFD detection path status is in the available state as the target SegmentList.
[0118] In a possible implementation manner, the universal forwarding plane end further includes: a decapsulation module 306;
[0119] The acquisition module 301 is also used to acquire the target inbound service message in the user mode;
[0120] The decapsulation module 306 is used to decapsulate the target inbound service message by SegmentList to obtain a first decapsulated message;
[0121] The search module 302 is further configured to search for VPN information corresponding to the VPN Sid in the first decapsulated message based on the mapping relationship table;
[0122] The decapsulation module 306 is further configured to decapsulate and divert the first decapsulated message again and then forward it according to the End type corresponding to the VPN information.
[0123] The embodiment of the present application provides a method based on a universal forwarding plane end, the universal forwarding plane end includes: an acquisition module 301, which is used to obtain the target routing prefix and target virtual private network VPN information corresponding to the target outgoing service message in the user state; a search module 302, which is used to search the target VPN Sid corresponding to the target virtual private network VPN information based on the mapping relationship table; an encapsulation module 303, which is used to encapsulate the target VPN Sid for the target outgoing service message; a determination module 304, which is used to determine the target SegmentList corresponding to the target outgoing service message according to the routing prefix and the virtual private network VPN information; a sending module 305, which is used to send the encapsulated message obtained after encapsulating the target VPN Sid to the SRv6 tunnel egress port corresponding to the target SegmentList, so as to encapsulate the target SegmentList of the encapsulated message through the SRv6 tunnel corresponding to the SRv6 tunnel egress port, and forward it. The method of the present application can realize SRv6 Policy services based on software in the user state, improve the flexibility of SRv6 Policy features and routing strategy scheduling, and reduce the cost of access side equipment.
[0124] like Figure 4 As shown, an electronic device 400 provided in an embodiment of the present application includes: a processor 401, a memory 402 and a bus, the memory 402 stores machine-readable instructions executable by the processor 401, and when the electronic device is running, the processor 401 communicates with the memory 402 through the bus, and the processor 401 executes the machine-readable instructions to perform the steps of the SRv6 Policy service implementation method based on the general forwarding plane as described above.
[0125] Specifically, the memory 402 and the processor 401 can be general-purpose memories and processors, which are not specifically limited here. When the processor 401 runs the computer program stored in the memory 402, the SRv6 Policy service implementation method based on the general forwarding plane can be executed.
[0126] Corresponding to the above-mentioned SRv6 Policy service implementation method based on a universal forwarding plane, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned SRv6 Policy service implementation method based on a universal forwarding plane are executed.
[0127] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0128] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0129] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0130] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the information processing method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.
[0131] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for implementing SRv6 Policy services based on a universal forwarding plane, characterized in that: The method is applied to a universal forwarding plane end, and the method comprises: In user mode, obtain the target routing prefix and target virtual private network VPN information corresponding to the target outgoing service message; Find the target VPN Sid corresponding to the target virtual private network VPN information based on the mapping relationship table; Encapsulating the target VPN Sid for the target outbound service message; Determine the target SegmentList corresponding to the target outgoing service message according to the routing prefix and the virtual private network VPN information; The encapsulated message obtained after encapsulating the target VPN Sid is sent to the SRv6 tunnel egress port corresponding to the target SegmentList, so as to encapsulate the target SegmentList on the encapsulated message through the SRv6 tunnel corresponding to the SRv6 tunnel egress port and forward it.
2. The SRv6 Policy service implementation method based on the universal forwarding plane according to claim 1, characterized in that: Before searching the target VPN Sid corresponding to the target virtual private network VPN information in the mapping relationship table, the method further includes: Searching in the routing table whether the routing entry matching the target routing prefix and the target virtual private network VPN information contains SRV6 information; If the SRV6 information is included, the process jumps to the mapping relationship table to search for the target VPN Sid corresponding to the target virtual private network VPN information and continues to execute.
3. The SRv6 Policy service implementation method based on a universal forwarding plane according to claim 1, characterized in that: The determining, according to the routing prefix and the virtual private network VPN information, a target SegmentList corresponding to the target outgoing service message includes: Determine, according to the routing prefix and the virtual private network VPN information, a target SRv6 Policy corresponding to the target outgoing service message; According to the priority of each path in the target SRv6 Policy and the SBFD detection path status, a target SegmentList is determined from all the paths.
4. The method for implementing SRv6 Policy services based on a universal forwarding plane according to claim 2, characterized in that: The determining, according to the routing prefix and the virtual private network VPN information, a target SRv6 Policy corresponding to the target outgoing service message includes: Determine the color information and next hop address of the route according to the route prefix and the virtual private network VPN information; Determine the SRv6 Policy corresponding to the color of the route and the next hop address, and obtain a target SRv6 Policy.
5. The method for implementing SRv6 Policy service based on a universal forwarding plane according to claim 3, characterized in that: The determining the target SegmentList from all the paths according to the priority of each path in the target SRv6 Policy and the SBFD detection path status includes: The path with the highest priority among the paths whose SBFD detection path status is available is determined as the target SegmentList.
6. The method for implementing SRv6 Policy services based on a universal forwarding plane according to claim 5, characterized in that: The method further comprises: In user mode, obtain the target incoming service message; Decapsulate the target inbound service message SegmentList to obtain a first decapsulated message; Searching for VPN information corresponding to the VPN Sid in the first decapsulated message based on the mapping relationship table; According to the End type corresponding to the VPN information, the first decapsulated message is decapsulated and directed again before being forwarded.
7. A universal forwarding plane end, characterized in that: The universal forwarding plane end includes: An acquisition module, used to acquire, in user mode, a target routing prefix and target virtual private network VPN information corresponding to a target outgoing service message; A search module, used for searching a target VPNSid corresponding to the target virtual private network VPN information based on a mapping relationship table; An encapsulation module, used for encapsulating the target VPN Sid for the target outgoing service message; A determination module, used to determine a target SegmentList corresponding to the target outgoing service message according to the routing prefix and the virtual private network VPN information; The sending module is used to send the encapsulated message obtained after encapsulating the target VPN Sid to the SRv6 tunnel egress port corresponding to the target SegmentList, so as to encapsulate the target SegmentList in the encapsulated message through the SRv6 tunnel corresponding to the SRv6 tunnel egress port and forward it.
8. The universal forwarding plane end according to claim 7, characterized in that: Before searching the target VPN Sid corresponding to the target virtual private network VPN information in the mapping relationship table, the search module is further used to: Searching in the routing table whether the routing entry matching the target routing prefix and the target virtual private network VPN information contains SRV6 information; If the SRV6 information is included, the process jumps to the mapping relationship table to search for the target VPN Sid corresponding to the target virtual private network VPN information and continues to execute.
9. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the storage medium through the bus, and the processor executes the machine-readable instructions to perform the steps of the SRv6Policy service implementation method based on the universal forwarding plane as described in any one of claims 1 to 6.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for implementing the SRv6 Policy service based on a universal forwarding plane according to any one of claims 1 to 6 are executed.