A service forwarding method, apparatus and electronic device
By decoupling the control plane and forwarding plane of EVPN and generating a target forwarding list, the problem of multiple service types under the same port link is solved, and network transmission with load balancing and flow control is realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- RUIJIE NETWORKS CO LTD
- Filing Date
- 2022-10-21
- Publication Date
- 2026-05-19
AI Technical Summary
Under the same port link identifier, existing technologies cannot simultaneously meet the service requirements of multiple different service types. EVPN can only be deployed in multi-homed multi-active mode or multi-homed single-active mode, which makes it impossible to meet the diverse network service requirements.
By adjusting the service type of the pending service and the preset state of the control plane, the control plane and the forwarding plane are decoupled, and a target forwarding list is generated to ensure that each service type corresponds to a different forwarding list, thereby achieving decoupling between the control plane and the forwarding plane.
Under the same port link, it can meet the business needs of different service types, achieve load balancing and flow control, and improve the flexibility and reliability of network transmission.
Smart Images

Figure CN117956018B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a service forwarding method, apparatus and electronic device. Background Technology
[0002] In network communication technology, the network side and the user side achieve data forwarding and transmission in the network architecture through routers. In order to ensure the reliability of data during forwarding and transmission, the next-generation full-service bearer virtual private network solution (Ethernet Virtual Private Network, EVPN) has been introduced. EVPN unifies the control plane of various virtual private network services. EVPN can separate the control plane and the forwarding plane. The control plane is responsible for publishing routing information, and the forwarding plane is responsible for forwarding packets. Through EVPN, load balancing and flow control can be achieved during data forwarding and transmission.
[0003] Based on the above description, when EVPN implements load balancing, it needs to perform data forwarding and transmission based on multi-homed active-active architecture; when EVPN implements flow control, it needs to perform data forwarding and transmission based on multi-homed single-active architecture. A schematic diagram of a router using multi-homed active-active architecture for data forwarding and transmission is shown below. Figure 1 As shown, in Figure 1 In this scenario, if CE1 and CE2 are user-side routers, and PE1, PE2, and PE3 are network-side routers, the user-side routers can connect to multiple network-side routers. A Link Aggregation Group (LAG) is deployed on CE1. This LAG is used to bind port links with the same configuration attributes into a single logical link, thereby improving the connection bandwidth between devices and providing link backup and load balancing functions. When PE3 sends pending service packets to PE1 and PE2, PE1 and PE2 then forward them to CE1 respectively, thus enabling traffic load balancing between PE1 and PE2.
[0004] A schematic diagram of a router using multi-homed single-active for data forwarding and transmission is shown below. Figure 2 As shown, in Figure 2 In this scenario, if CE3 and CE4 are user-side routers, and no LAG group is deployed on CE3, and PE1, PE2, and PE3 are network-side routers, with PE1 and PE2 serving as primary and backup routers for each other, all pending services on PE3 will be forwarded to PE1. PE1 will then rate-limit all received services and continue forwarding them to CE3, thereby enabling traffic control of pending services on the primary PE.
[0005] Currently, each port corresponds to at least one pending service, and each pending service corresponds to an associated control plane and forwarding plane. Different ports correspond to pending services of different service types to solve the multi-service requirements corresponding to multiple service types. However, when the same port link identifier is used when CE accesses PE in multiple ways, only EVPN multi-homed multi-active mode or EVPN multi-homed single-active mode can be deployed. Therefore, the inability to meet the different service requirements of multiple different service types under the same port link identifier has become a problem that needs to be solved. Summary of the Invention
[0006] This application provides a service forwarding method, apparatus, and electronic device. By adjusting the forwarding table in the forwarding plane based on the service type of the service to be processed and the preset state of the control plane, the control plane and forwarding plane of the EVPN are decoupled, thereby meeting the different service requirements of different service types under the same port link.
[0007] Firstly, this application provides a method for service forwarding, the method comprising:
[0008] Obtain the pending service and the corresponding control plane;
[0009] When the control plane is in a preset state, an initial forwarding list corresponding to the service to be processed is determined from the forwarding plane associated with the control plane. The initial forwarding list does not meet the service requirements of the service to be processed. The preset state is a multi-homed active-active state or a multi-homed single-active state.
[0010] The initial forwarding list is adjusted to the target forwarding list based on the service type of the service to be processed.
[0011] The pending service is forwarded according to the target forwarding list.
[0012] Using the above method, when the preset state of the control plane is determined, the initial forwarding list in the forwarding plane associated with the control plane is adjusted to a target forwarding list that conforms to the service type of the service to be processed. This ensures that each service type corresponds to a different forwarding list, thereby decoupling the control plane from the forwarding plane and meeting the different service requirements of different service types.
[0013] In one possible design, an initial forwarding list corresponding to the service to be processed is determined from the forwarding plane associated with the control plane, including:
[0014] When the control plane is in a multi-homed and multi-active state, all service nodes corresponding to the service to be processed are determined.
[0015] The forwarding order for each business node is determined, and an initial forwarding list is generated based on each forwarding order.
[0016] Using the above method, the initial forwarding list corresponding to the pending services is determined when the control plane is in a multi-homed, multi-active state, so that the pending services can be forwarded according to the initial forwarding list.
[0017] In one possible design, an initial forwarding list corresponding to the service to be processed is determined from the forwarding plane associated with the control plane, including:
[0018] When the control plane is in a multi-homed single-active state, the primary service node and the backup service node are determined from all service nodes in the Border Gateway Protocol (BGP) routing information, wherein the BGP routing information is used to confirm the primary and backup status of the service nodes.
[0019] The primary forwarding order corresponding to the primary service node and the backup forwarding order corresponding to the backup service node are determined.
[0020] The initial forwarding list corresponding to the service to be processed is generated based on the primary forwarding order and the backup forwarding order.
[0021] Using the methods described above, the initial forwarding list of pending services when the control plane is in a multi-homed single-active state is determined, as well as the primary and backup service nodes among all service nodes, thereby enabling the determination of the forwarding order of pending services.
[0022] In one possible design, the primary service node and the backup service node are determined from all service nodes in the BGP routing information, including:
[0023] Determine the IP address or VLAN identifier corresponding to each service node;
[0024] Sort all IP addresses in a preset order, select the smallest IP address, and designate the service node corresponding to the smallest IP address as the primary service node, and designate all other nodes as backup service nodes; or
[0025] The VLAN identifier is substituted into a preset formula to calculate the sequence number of each service node, and the service node with sequence number 1 is designated as the primary service node, while the other nodes are designated as backup service nodes.
[0026] By using the methods described above, the primary and backup business nodes are determined in different ways, ensuring the accuracy of the determined primary and backup business nodes.
[0027] In one possible design, the initial forwarding list is adjusted to the target forwarding list based on the service type of the service to be processed, including:
[0028] Extract all service nodes from the initial forwarding list, and determine the primary service node and backup service node from all service nodes;
[0029] When the service type of the service to be processed and the preset state are determined, the primary service node and / or the backup service node in the initial forwarding list are adjusted based on the preset instruction, wherein the preset instruction is an instruction to adjust the forwarding list of the forwarding plane;
[0030] The adjusted initial forwarding list will be used as the target forwarding list for the pending services.
[0031] Using the above method, the primary service node and backup service node are determined, and the forwarding order in the initial forwarding list is adjusted based on the service type to be processed and the preset state of the control plane, ensuring that the resulting target forwarding list can meet the service requirements of the service to be processed.
[0032] In one possible design, before forwarding the pending service according to the target forwarding list, the following is also included:
[0033] Obtain the main business node corresponding to the service to be processed;
[0034] When the primary service node changes, the primary service node and the backup service node are swapped, and the forwarding order of the primary service node and the backup service node after the swap is set.
[0035] Using the above method, when the primary service node fails or is re-elected, the backup service node is used as the target primary service node, and the forwarding order of the primary service node is associated with the target primary service node, ensuring that the target primary service node can achieve local priority forwarding.
[0036] In one possible design, before forwarding the pending service according to the target forwarding list, the following is also included:
[0037] Obtain the backup service node corresponding to the service to be processed;
[0038] When the backup service node recovers from the fault, the backup forwarding order table corresponding to the fault of the backup service node is obtained, and the forwarding plane is controlled to use the backup forwarding order table as the target forwarding order table after the backup service node recovers from the fault.
[0039] Using the above method, the handling method for backup service node failure recovery is determined. The forwarding order when the backup service node fails is the same as the forwarding order after the backup service node fails and recovers, which prevents the loss of pending services forwarded by the backup service node.
[0040] Secondly, this application provides a service forwarding apparatus, the apparatus comprising:
[0041] The acquisition module is used to acquire the service to be processed and the control plane corresponding to the service to be processed.
[0042] The determination module is used to determine the initial forwarding list corresponding to the service to be processed from the forwarding plane associated with the control plane when the control plane is in a preset state.
[0043] The adjustment module is used to adjust the initial forwarding list to the target forwarding list based on the service type of the service to be processed;
[0044] The forwarding module is used to forward the pending service according to the target forwarding list.
[0045] In one possible design, the determining module is specifically used to determine all service nodes corresponding to the service to be processed when the control plane is in a multi-homed multi-active state, determine the forwarding order corresponding to each service node, and generate an initial forwarding list based on each forwarding order.
[0046] In one possible design, the determining module is further configured to, when the control plane is in a multi-homed single-active state, determine the primary service node and the backup service node from all service nodes in the Border Gateway Protocol (BGP) routing information, wherein the BGP routing information is used to confirm the primary / backup status of the service nodes, determine the primary forwarding order corresponding to the primary service node and the backup forwarding order corresponding to the backup service node, and generate the initial forwarding list corresponding to the service to be processed based on the primary forwarding order and the backup forwarding order.
[0047] In one possible design, the determining module is further configured to determine the IP address or VLAN identifier corresponding to each service node, sort the IP addresses according to a preset order, filter out the smallest IP address, and designate the service node corresponding to the smallest IP address as the primary service node, and the other nodes besides the primary service node as backup service nodes; or, substitute the VLAN identifier into a preset formula to calculate the sequence number of each service node, and designate the service node with sequence number 1 as the primary service node, and the other nodes besides the primary service node as backup service nodes.
[0048] In one possible design, the adjustment module is specifically used to extract all service nodes in the initial forwarding list, and determine the primary service node and the backup service node from all the service nodes. When the service type and the preset state of the service to be processed are determined, the primary service node and / or the backup service node in the initial forwarding list are adjusted based on the preset instructions, and the adjusted initial forwarding list is used as the target forwarding list of the service to be processed.
[0049] In one possible design, the forwarding module is specifically used to obtain the primary service node corresponding to the service to be processed. When the primary service node changes, the primary service node and the backup service node are swapped, and the forwarding order of the primary service node and the backup service node after the swap is set.
[0050] In one possible design, the forwarding module is further configured to obtain the backup service node corresponding to the service to be processed, and when the backup service node recovers from the fault, obtain the backup forwarding order table corresponding to the fault of the backup service node, and control the forwarding plane to use the backup forwarding order table as the target forwarding order table after the fault of the backup service node recovers.
[0051] Thirdly, this application provides an electronic device, comprising:
[0052] Memory, used to store computer programs;
[0053] When the processor executes the computer program stored in the memory, it implements the above-described service forwarding method steps.
[0054] Fourthly, a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the aforementioned service forwarding method.
[0055] For details on each of the above-mentioned aspects one through four, and the technical effects that each aspect may achieve, please refer to the above description of the technical effects that can be achieved for the first aspect or the various possible solutions in the first aspect. These details will not be repeated here. Attached Figure Description
[0056] Figure 1 A schematic diagram illustrating the use of multi-homed active-active architecture for data forwarding and transmission in the router provided in this application;
[0057] Figure 2 A schematic diagram illustrating the use of a multi-homed single-active router for data forwarding and transmission provided in this application;
[0058] Figure 3 A flowchart of the steps of a service forwarding method provided in this application;
[0059] Figure 4 A schematic diagram illustrating the forwarding of different service types under the dual-homed dual-active mode provided in this application;
[0060] Figure 5 A schematic diagram of a service forwarding device provided in this application;
[0061] Figure 6 This is a schematic diagram of the structure of an electronic device provided in this application. Detailed Implementation
[0062] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The specific operational methods in the method embodiments can also be applied to the device embodiments or system embodiments. It should be noted that in the description of this application, "multiple" is understood as "at least two". "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. A connected to B can represent: A and B directly connected, and A and B connected through C. Furthermore, in the description of this application, terms such as "first" and "second" are used only for distinguishing the purpose of description and should not be construed as indicating or implying relative importance or order.
[0063] In previous technologies, when the same port link identifier is used when CE is accessed by multiple PEs, due to the variety of service types in the network, only EVPN multi-homed active mode or EVPN multi-homed single active mode can be deployed under the same port link identifier. Each mode can only meet the needs of one type of service in the network. Therefore, when there is more than one type of service in the network, the different service needs of multiple different service types cannot be met under the same port link identifier.
[0064] To address the aforementioned issues, this application provides a service forwarding method for decoupling the control plane and forwarding plane of an EVPN under the same port link identifier, thereby simultaneously meeting the service requirements of various different types of services. The methods and apparatus described in this application are based on the same technical concept. Since the principles by which the methods and apparatus solve the problems are similar, embodiments of the apparatus and methods can be referred to interchangeably, and repeated details will not be elaborated further.
[0065] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0066] Reference Figure 3This application provides a service forwarding method that decouples the control plane and forwarding plane of an EVPN, thereby meeting the service requirements of various types of services under the same port link identifier. The implementation process of this method is as follows:
[0067] Step S31: Obtain the service to be processed and the control plane corresponding to the service to be processed.
[0068] Since the forwarding and transmission of services in the network need to be completed through routers on both the network side and the user side, the control plane and forwarding plane of EVPN are coupled in the process of service transmission and forwarding. Both the control plane and the forwarding plane have multi-homed single-active mode and multi-homed multi-active mode, as shown in Table 1:
[0069] control surface Forwarding Multi-homed single-active mode Multi-homed single-active mode Multi-origin active mode Multi-origin active mode
[0070] Table 1
[0071] In Table 1 above, both the control plane and the forwarding plane have multi-homed single-active and multi-homed dual-active modes. In multi-homed single-active mode, multiple user-side CEs are assigned to one network-side PE, while in multi-homed multi-active mode, one user-side CE is assigned to multiple network-side PEs. Since the control plane and the forwarding plane are coupled, when the control plane is in multi-homed single-active mode, the forwarding plane is also in multi-homed single-active mode, and vice versa. The forwarding plane typically specifies the primary / backup status of service nodes. The forwarding table in the forwarding plane is shown in Table 2.
[0072]
[0073] Table 2
[0074] Table 2 above lists the forwarding table when the forwarding plane is in multi-homed single-active mode. Table 2 uses dual-homed single-active as an example. When the primary service node receives a service to be processed, it will forward the service because its forwarding order is local priority. When the backup service node receives a service to be processed, it will forward the service to be processed to the primary service node because its forwarding order is remote priority. In Table 2 above, the remote endpoint of the backup service node is the primary service node. Therefore, the backup service node will forward the service to be processed to the primary service node, which will then forward it. The forwarding table in the forwarding plane under multi-homed single-active mode is shown in Table 2 above. The difference between the forwarding table in multi-homed multi-active mode and the corresponding forwarding table in multi-homed single-active mode lies in the service node roles and the service node forwarding order, which will not be elaborated on here.
[0075] The embodiments of this application aim to decouple the control plane and forwarding plane in EVPN, thereby enabling precise control of different types of services under the same port link. Therefore, it is necessary to obtain the service to be processed, which can be any type of service in the network.
[0076] For example, the service types to be processed can be home broadband internet services, enterprise leased line services, etc. The service requirement for home broadband internet services is to achieve load balancing in network transmission, while the service requirement for enterprise leased line services is to achieve precise traffic control in network transmission.
[0077] After obtaining the pending services, in order to know the initial forwarding list of the pending services, it is also necessary to obtain the control plane to which the pending services belong.
[0078] Step S32: When the control plane is in a preset state, determine the initial forwarding list corresponding to the service to be processed from the forwarding plane associated with the control plane.
[0079] Since the control plane has multiple active-active and multiple active-single active modes, this application embodiment will describe the dual active-active mode and the dual active-single active mode in multiple active-active and multiple active-single active modes. Therefore, when the control plane is in dual active-active mode, all service nodes corresponding to the service to be processed are first determined, and the forwarding order corresponding to each service node is determined. Then, an initial forwarding list is generated based on the forwarding order corresponding to each service node. The initial forwarding list is a list normally generated by the control plane in the preset mode. In order to demonstrate that this application embodiment can meet the service requirements of different service types, the initial forwarding list is restricted to not meeting the service requirements of the service to be processed.
[0080] When the control plane is in a dual-homed single-active state, it obtains BGP routing information. Since BGP routing information is used to confirm the primary / standby status of service nodes, the specific process for confirming the primary / standby status of service nodes is as follows:
[0081] This application embodiment can determine the primary / backup status through the IP address and VLAN identifier of each service node. The method for determining the primary / backup status of a service node based on its IP address is as follows: sort each IP address in descending order, filter out the smallest IP address, determine the service node corresponding to the smallest IP address, and then use the service node as the primary service node, and use the other nodes besides the primary service node as backup service nodes.
[0082] The method for determining the primary / backup status of service nodes based on VLAN identifiers is as follows: Obtain the VLAN identifiers of each service node and the number of service nodes belonging to the same user side. Then, calculate the network-side router's sequence number using the following formula: Formula 1 is shown below:
[0083] V mod N = i
[0084] In the above formula, V represents the VLAN identifier of each service node, which can be any number between 1 and 4096. N represents the number of PEs that are assigned to the same CE, and i represents the PE's serial number.
[0085] Based on Formula 1 above, the sequence number of each business node can be calculated. When the sequence number is 1, the business node corresponding to the sequence number 1 is taken as the primary business node, and the business nodes with sequence numbers other than 1 are taken as backup business nodes.
[0086] After determining the primary service node and the backup service node, the primary forwarding order of the primary service node and the backup forwarding order of the backup service node are determined, and an initial forwarding list is generated based on the primary forwarding order and the backup forwarding order.
[0087] Using the above method, an initial forwarding list can be obtained based on the preset state of the control plane. The initial forwarding list can be used to obtain the primary and backup status and forwarding order of different pending services under different control plane modes, which is beneficial for adjusting the initial forwarding list.
[0088] Step S33: Adjust the initial forwarding list to the target forwarding list based on the service type of the service to be processed.
[0089] Since the initial forwarding list records the forwarding order and primary / backup status corresponding to a certain service type, in order to meet the service requirements of different service types, the initial forwarding list needs to be adjusted to a target forwarding list that meets the service requirements of the service to be processed, thereby achieving decoupling between the control plane and the forwarding plane. Therefore, it is necessary to extract all service nodes from the initial forwarding list, then determine the primary service node and the backup service node from all service nodes, then determine the service type and preset status of the service to be processed, and adjust the primary service node and / or backup service node in the initial forwarding list based on preset instructions. The adjusted initial forwarding list is then used as the target forwarding list. The preset instructions are instructions that instruct the adjustment of the initial forwarding list in the forwarding plane. To more clearly illustrate the process of obtaining the target forwarding list, an example will be used. The specific process of obtaining the target forwarding list is as follows:
[0090] A diagram illustrating the forwarding of different service types in dual-homed active-active mode is shown below. Figure 4 As shown, in Figure 4 In this process, all services will be forwarded from PE3 to CE1 via PE1 and PE2 respectively. The forwarding process of type A services is represented by solid lines, and the forwarding process of type B services is represented by dashed lines. CE is the user-side router, and PE is the network-side router.
[0091] If type A is a home broadband internet service and type B is a government / enterprise leased line service, since the service requirement for home broadband internet service is to achieve load balancing in network transmission, therefore, according to the above... Figure 4 The service forwarding process implemented in the system can meet the service requirements of type A pending services. However, since the service requirements of type B pending services are to achieve precise flow control in the network, therefore, according to the above... Figure 4 The forwarding process with the dotted line in the middle will not be able to meet the business requirements of type B pending business.
[0092] exist Figure 4 The initial forwarding list corresponding to the pending services of type B is shown in Table 3:
[0093]
[0094] Table 3
[0095] In Table 3 above, the forwarding order for each service node is local priority forwarding as the primary method and remote forwarding as the backup. Since the current control plane's preset state is dual-homed dual-active, when the service to be processed is a type B service, the forwarding order in Table 3 can only achieve load balancing in network transmission. The forwarding list in Table 3 will not meet the service requirements of the service to be processed. Therefore, the initial forwarding list needs to be adjusted based on preset instructions, service type, and dual-homed dual-active state. The adjusted target forwarding list is shown in Table 4.
[0096]
[0097] Table 4
[0098] Table 4 above is the target forwarding list of the services to be processed. The forwarding order of the backup service node PE2 is adjusted so that local (PE2) forwarding is for backup and remote (PE1) forwarding is for primary use. The forwarding order of the primary service node PE1 remains unchanged, with local (PE1) forwarding for primary use and remote (PE2) forwarding for backup. Therefore, Table 4 above can meet the service requirements of achieving precise flow control in the network transmission of the services to be processed.
[0099] Under the same port link identifier, since the default state of the control plane is determined, the forwarding table in the forwarding plane associated with the control plane is also determined. Therefore, by adjusting the initial forwarding list to the target forwarding list, the control plane and the forwarding plane can be decoupled, thereby meeting the business requirements of the service to be processed.
[0100] Using the above method, the initial forwarding list is adjusted to a target forwarding list that meets the service requirements of the service to be processed based on preset instructions. This forms a forwarding list corresponding to the service to be processed on the forwarding plane, thereby decoupling the control plane and the forwarding plane, and realizing the service requirements corresponding to different service types under the same port link.
[0101] Step S34: Forward the pending service according to the target forwarding list.
[0102] The target forwarding list of pending services has been determined above. When the primary service node in the network fails or is re-determined, the primary service node will change. When the primary service node changes, the primary service node and the backup service node will be swapped, and the forwarding order of the primary service node and the backup service node after the swap will be reset.
[0103] For example, when the primary service node and the backup service node are swapped, the primary service node is set as the target backup service node and the backup service node is set as the target primary service node. The forwarding order of the primary service node is associated with the target primary service node, and the forwarding order of the target backup service node will be reset by the preset state of the control plane and the service type of the target backup service node.
[0104] When a backup service node recovers from a failure, the backup forwarding order table corresponding to the failure time will be obtained, and the forwarding plane will use this backup forwarding order table as the target forwarding order table for the recovered backup service node. If the backup forwarding order table of the backup service node indicates local priority forwarding, the target forwarding order table of the recovered backup service node will also indicate local priority forwarding. If the backup forwarding order table of the backup service node indicates remote priority forwarding, the target forwarding order table of the recovered backup service node will also indicate remote priority forwarding.
[0105] Once the target forwarding list of pending services is determined, the forwarding plane can forward the pending services based on the target forwarding list.
[0106] Based on the above description, the initial forwarding list is adjusted to a target forwarding list that meets the business requirements of the pending services. This allows for the determination of the forwarding lists corresponding to different types of pending services, and decouples the control plane from the forwarding plane. This enables the adjustment of the primary / backup relationship in the forwarding table in the forwarding plane, and allows for a quick switch to the forwarding order in the forwarding table when a service node fails. In this way, it enables the fulfillment of the business requirements corresponding to different service types on the same port link.
[0107] Based on the same inventive concept, this application also provides a service forwarding device, which implements the function of a service forwarding method, as described above. Figure 5The device includes:
[0108] The acquisition module 501 is used to acquire the service to be processed and the control plane corresponding to the service to be processed.
[0109] The determining module 502 is used to determine the initial forwarding list corresponding to the service to be processed from the forwarding plane associated with the control plane when the control plane is in a preset state.
[0110] Adjustment module 503 is used to adjust the initial forwarding list to the target forwarding list based on the service type of the service to be processed;
[0111] The forwarding module 504 is used to forward the pending service according to the target forwarding list.
[0112] In one possible design, the determining module 502 is specifically used to determine all service nodes corresponding to the service to be processed when the control plane is in a multi-homed multi-active state, determine the forwarding order corresponding to each service node, and generate an initial forwarding list based on each forwarding order.
[0113] In one possible design, the determining module 502 is further configured to, when the control plane is in a multi-homed single-active state, determine the primary service node and the backup service node from all service nodes in the Border Gateway Protocol (BGP) routing information, wherein the BGP routing information is used to confirm the primary and backup status of the service nodes, determine the primary forwarding order corresponding to the primary service node and the backup forwarding order corresponding to the backup service node, and generate the initial forwarding list corresponding to the service to be processed based on the primary forwarding order and the backup forwarding order.
[0114] In one possible design, the determining module 502 is further configured to determine the IP address or VLAN identifier corresponding to each service node, sort the IP addresses according to a preset order, filter out the smallest IP address, and designate the service node corresponding to the smallest IP address as the primary service node, and the other nodes besides the primary service node as backup service nodes; or, substitute the VLAN identifier into a preset formula to calculate the sequence number of each service node, and designate the service node with sequence number 1 as the primary service node, and the other nodes besides the primary service node as backup service nodes.
[0115] In one possible design, the adjustment module 503 is specifically used to extract all service nodes in the initial forwarding list, and determine the primary service node and the backup service node from all the service nodes. When the service type and the preset state of the service to be processed are determined, the primary service node and / or the backup service node in the initial forwarding list are adjusted based on the preset instructions, and the adjusted initial forwarding list is used as the target forwarding list of the service to be processed.
[0116] In one possible design, the forwarding module 504 is specifically used to obtain the primary service node corresponding to the service to be processed, and when the primary service node changes, the primary service node and the backup service node are swapped, and the forwarding order of the primary service node and the backup service node after the swap is set.
[0117] In one possible design, the forwarding module 504 is further configured to obtain the backup service node corresponding to the service to be processed, and when the backup service node recovers from the fault, obtain the backup forwarding order table corresponding to the fault of the backup service node, and control the forwarding plane to use the backup forwarding order table as the target forwarding order table after the fault of the backup service node is recovered.
[0118] Based on the same inventive concept, this application also provides an electronic device that can perform the functions of the aforementioned service forwarding device. (Refer to...) Figure 6 The electronic device includes:
[0119] At least one processor 601 and a memory 602 connected to at least one processor 601. In this embodiment, the specific connection medium between the processor 601 and the memory 602 is not limited. Figure 6 The example shown is the connection between processor 601 and memory 602 via bus 600. Bus 600 is... Figure 6 The connections between other components are indicated by thick lines and are for illustrative purposes only, not as limiting information. The 600 bus can be divided into address bus, data bus, control bus, etc., for ease of representation. Figure 6 The term is represented by a single thick line, but this does not imply that there is only one bus or one type of bus. Alternatively, the processor 601 can also be called a controller; there is no restriction on the name.
[0120] In this embodiment, memory 602 stores instructions executable by at least one processor 601. By executing the instructions stored in memory 602, at least one processor 601 can execute a service forwarding method described above. Processor 601 can implement... Figure 5 The functions of each module in the device shown.
[0121] The processor 601 is the control center of the device. It can connect to various parts of the control device through various interfaces and lines. By running or executing instructions stored in memory 602 and calling data stored in memory 602, the processor can perform various functions and process data, thereby monitoring the device as a whole.
[0122] In one possible design, processor 601 may include one or more processing units. Processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into processor 601. In some embodiments, processor 601 and memory 602 may be implemented on the same chip; in some embodiments, they may also be implemented on separate chips.
[0123] Processor 601 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of a service forwarding method disclosed in the embodiments of this application can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.
[0124] Memory 602, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 602 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 602 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 602 may also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.
[0125] By designing and programming the processor 601, the code corresponding to a service forwarding method described in the foregoing embodiments can be embedded into the chip, enabling the chip to execute it during runtime. Figure 3 The illustrated embodiment presents a service forwarding step. How to design and program the processor 601 is a technique well-known to those skilled in the art and will not be described further here.
[0126] Based on the same inventive concept, embodiments of this application also provide a storage medium storing computer instructions that, when executed on a computer, cause the computer to perform a service forwarding method described above.
[0127] In some possible implementations, various aspects of the service forwarding method provided by this application can also be implemented in the form of a program product, which includes program code that, when the program product is run on a device, causes the control device to perform the steps in a service forwarding method according to various exemplary embodiments of this application as described above.
[0128] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0129] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0130] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0131] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0132] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A service forwarding method, characterized in that, include: Obtain the pending service and the corresponding control plane; When the control plane is in a preset state, an initial forwarding list corresponding to the service to be processed is determined from the forwarding plane associated with the control plane. The initial forwarding list does not meet the service requirements of the service to be processed. The preset state is a multi-homed active-active state or a multi-homed single-active state. When the service type and preset state of the service to be processed are determined, the service nodes in the initial forwarding list are adjusted based on the preset instruction, and the initial forwarding list is adjusted to the target forwarding list; wherein, the preset instruction is an instruction to adjust the initial forwarding list in the forwarding plane; the adjusted initial forwarding list is used as the target forwarding list of the service to be processed. The pending service is forwarded according to the target forwarding list.
2. The method as described in claim 1, characterized in that, The initial forwarding list corresponding to the service to be processed is determined from the forwarding plane associated with the control plane, including: When the control plane is in a multi-homed and multi-active state, all service nodes corresponding to the service to be processed are determined. The forwarding order for each business node is determined, and an initial forwarding list is generated based on each forwarding order.
3. The method as described in claim 1, characterized in that, The initial forwarding list corresponding to the service to be processed is determined from the forwarding plane associated with the control plane, including: When the control plane is in a multi-homed single-active state, the primary service node and the backup service node are determined from all service nodes in the Border Gateway Protocol (BGP) routing information, wherein the BGP routing information is used to confirm the primary and backup status of the service nodes. The primary forwarding order corresponding to the primary service node and the backup forwarding order corresponding to the backup service node are determined. The initial forwarding list corresponding to the service to be processed is generated based on the primary forwarding order and the backup forwarding order.
4. The method as described in claim 3, characterized in that, The primary service node and backup service node are determined from all service nodes in the BGP routing information, including: Determine the IP address or VLAN identifier corresponding to each service node; Sort all IP addresses in a preset order, select the smallest IP address, and designate the service node corresponding to the smallest IP address as the primary service node, and designate all other nodes as backup service nodes; or The VLAN identifier is substituted into a preset formula to calculate the sequence number of each service node, and the service node with sequence number 1 is designated as the primary service node, while the other nodes are designated as backup service nodes.
5. The method as described in claim 1, characterized in that, After determining the initial forwarding list corresponding to the service to be processed from the forwarding plane associated with the control plane, and before adjusting the service nodes in the initial forwarding list based on preset instructions, the method further includes: Extract all service nodes from the initial forwarding list, and determine the primary service node and backup service node from all service nodes; The adjustment of service nodes in the initial forwarding list based on preset instructions includes: The primary service node and / or the backup service node in the initial forwarding list are adjusted based on preset instructions.
6. The method as described in claim 1, characterized in that, Before forwarding the pending service according to the target forwarding list, the process also includes: Obtain the main business node corresponding to the service to be processed; When the primary service node changes, the primary service node and the backup service node are swapped, and the forwarding order of the primary service node and the backup service node after the swap is set.
7. The method as described in claim 1, characterized in that, Before forwarding the pending service according to the target forwarding list, the process also includes: Obtain the backup service node corresponding to the service to be processed; When the backup service node recovers from the fault, the backup forwarding order table corresponding to the fault of the backup service node is obtained, and the forwarding plane is controlled to use the backup forwarding order table as the target forwarding order table after the backup service node recovers from the fault.
8. A service forwarding device, characterized in that, include: The acquisition module is used to acquire the service to be processed and the control plane corresponding to the service to be processed. The determination module is used to determine the initial forwarding list corresponding to the service to be processed from the forwarding plane associated with the control plane when the control plane is in a preset state. An adjustment module is used to adjust the service nodes in the initial forwarding list based on a preset instruction when the service type of the service to be processed and the preset state are determined, thereby adjusting the initial forwarding list into a target forwarding list; wherein, the preset instruction is an instruction to adjust the initial forwarding list in the forwarding plane; and the adjusted initial forwarding list is used as the target forwarding list for the service to be processed. The forwarding module is used to forward the pending service according to the target forwarding list.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a computer program stored in the memory, implements the steps of the method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-7.