CN117956018A - Service forwarding method and device and electronic equipment - Google Patents

Service forwarding method and device and electronic equipment Download PDF

Info

Publication number
CN117956018A
CN117956018A CN202211290343.7A CN202211290343A CN117956018A CN 117956018 A CN117956018 A CN 117956018A CN 202211290343 A CN202211290343 A CN 202211290343A CN 117956018 A CN117956018 A CN 117956018A
Authority
CN
China
Prior art keywords
service
forwarding
processed
service node
standby
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211290343.7A
Other languages
Chinese (zh)
Inventor
陈学平
曲延锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN202211290343.7A priority Critical patent/CN117956018A/en
Priority to PCT/CN2023/071117 priority patent/WO2024082462A1/en
Publication of CN117956018A publication Critical patent/CN117956018A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/30Routing of multiclass traffic
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services

Landscapes

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

Abstract

A service forwarding method, a device and an electronic device, wherein the method comprises the following steps: obtaining a service to be processed and a control surface corresponding to the service to be processed, determining an initial forwarding list corresponding to the service to be processed from a forwarding surface associated with the control surface when the control surface is in a preset state, adjusting the initial forwarding list to be a target forwarding list based on the service type of the service to be processed, and forwarding the service to be processed according to the target forwarding list. By the method, the initial forwarding list is adjusted to be the target forwarding list based on the service types of the service to be processed, so that the control plane and the forwarding plane are decoupled, the service to be processed with different service types corresponds to different forwarding lists, and further the service requirements respectively corresponding to the service to be processed with different service types can be met on the same port link.

Description

Service forwarding method and device and electronic equipment
Technical Field
The present application relates to the field of communications technologies, and in particular, to a service forwarding method, a service forwarding device, and an electronic device.
Background
In the network communication technology, a network side and a user side realize data forwarding and transmission in a network architecture through a router, in order to ensure the reliability of the data in the forwarding and transmission process, a virtual private network solution (Ethernet Virtual Private Network, EVPN) of the next generation of full service bearing is introduced, the EVPN unifies control surfaces of various virtual private network services, the EVPN can separate the control surfaces from the forwarding surfaces, the control surfaces are responsible for issuing routing information, and the forwarding surfaces are responsible for forwarding messages, so that load balancing and flow control can be realized in the data forwarding and transmission process through the EVPN.
Based on the above description, when the EVPN realizes load balancing, data forwarding and transmission based on multiple home and multiple activities are required, and when the EVPN realizes flow control, data forwarding and transmission based on multiple home and single activities are required. In fig. 1, if CE1 and CE2 are routers at a user side and PE1, PE2 and PE3 are routers at a network side, the routers at the user side can be connected to a plurality of routers at the network side, and a link aggregation group (Link Aggregation Group, LAG) is deployed on CE1, where the link aggregation group is used to bind port links with the same configuration attribute into a logical link, so as to promote the connection bandwidth between devices, and provide link backup and load sharing functions, and when PE3 sends a service packet to be processed to PE1 and PE2, PE1 and PE2 are forwarded to CE1 respectively, so that traffic load sharing between PE1 and PE2 can be realized.
In fig. 2, if CE3 and CE4 are routers at a user side, no LAG group is deployed on CE3, PE1, PE2, and PE3 are routers at a network side, PE1 and PE2 are active and standby routers, all the traffic to be processed of PE3 is forwarded to PE1, and PE1 limits the speed of all received traffic and forwards the traffic to CE3 continuously, so that traffic control of the traffic to be processed can be implemented on the primary PE.
At present, each port corresponds to at least one service to be processed, each service to be processed corresponds to an associated control plane and forwarding plane, and different ports correspond to the service to be processed of different service types, so as to solve the multi-service requirement corresponding to the multi-type service, but under the condition of the same port link identifier when the CE is accessed to the PE in a multi-homing mode, only the EVPN multi-homing mode or the EVPN multi-homing single-activity mode can be deployed, so that the condition of the same port link identifier cannot meet the different service requirements of a plurality of different service types, and the problem to be solved at present is solved.
Disclosure of Invention
The application provides a service forwarding method, a device and electronic equipment, which are used for realizing decoupling of a control plane and a forwarding plane of an EVPN (enhanced virtual private network) by adjusting a service type of a service to be processed and a forwarding table in the forwarding plane of a preset state of the control plane, so that different service requirements of different service types can be met under the condition of the same port link.
In a first aspect, the present application provides a method for forwarding a service, where the method includes:
Obtaining a service to be processed and a control surface corresponding to the service to be processed;
When the control surface is in a preset state, determining an initial forwarding list corresponding to the service to be processed from a forwarding surface associated with the control surface, wherein the initial forwarding list does not meet the service requirement of the service to be processed, and the preset state is a multi-return multi-activity state or a multi-return single-activity state;
adjusting the initial forwarding list to be a target forwarding list based on the service type of the service to be processed;
And forwarding the service to be processed according to the target forwarding list.
By the 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, and the initial forwarding list is adjusted to be the target forwarding list which accords with the service type of the service to be processed, so that the service to be processed of each service type corresponds to different forwarding lists, decoupling of the control plane and the forwarding plane is realized, and further different service requirements of different service types can be met.
In one possible design, determining an initial forwarding list corresponding to the service to be processed from a forwarding plane associated with the control plane includes:
When the control surface is in a multi-homing multi-activity state, determining all service nodes corresponding to the service to be processed;
And determining the forwarding order corresponding to each service node, and generating an initial forwarding list based on each forwarding order.
By the method, the initial forwarding list corresponding to the service to be processed when the control surface is in the multi-homing multi-activity state is determined, so that the service to be processed can be forwarded according to the initial forwarding list.
In one possible design, determining an initial forwarding list corresponding to the service to be processed from a forwarding plane associated with the control plane includes:
When the control plane is in a multi-return single-active state, determining a main service node and a standby service node from all service nodes in border gateway protocol (Border Gateway Protocol, BGP) routing information, wherein the BGP routing information is used for confirming the main and standby states of the service nodes;
Determining a main forwarding order corresponding to the main service node and a standby forwarding order corresponding to the standby service node;
And generating the initial forwarding list corresponding to the service to be processed based on the main forwarding order and the standby forwarding order.
By the method, the initial forwarding list of the service to be processed when the control surface is in the multi-return single-active state is determined, and the main service node and the standby service node in all the service nodes are determined, so that the forwarding order of the service to be processed can be determined.
In one possible design, determining a primary service node and a backup service node from all service nodes in BGP routing information includes:
Determining IP addresses or VLAN identifications corresponding to the service nodes respectively;
Sorting all IP addresses according to a preset sequence, screening out a minimum IP address, taking a service node corresponding to the minimum IP address as a main service node, and taking other nodes except the main service node as standby service nodes; or alternatively
And carrying the VLAN identifier into a preset formula to calculate the serial numbers of all service nodes, and taking the service node with the serial number of 1 as a main service node and other nodes except the main service node as standby service nodes.
By the method, the main service node and the standby service node are determined in different modes, and the accuracy of the determined main service node and the determined standby service node is ensured.
In one possible design, adjusting the initial forwarding list to a target forwarding list based on a traffic type of the traffic to be processed includes:
Extracting all service nodes in the initial forwarding list, and determining a main service node and a standby service node from all the service nodes;
When the service type of the service to be processed and the preset state are determined, adjusting the main service node and/or the standby service node in the initial forwarding list based on a preset instruction, wherein the preset instruction is an instruction for indicating to adjust a forwarding list of a forwarding plane;
and taking the adjusted initial forwarding list as a target forwarding list of the service to be processed.
By the method, the main service node and the standby service node are determined, and the forwarding order in the initial forwarding list is adjusted based on the type of the service to be processed and the preset state of the control surface, so that the formed target forwarding list can meet the service requirement of the service to be processed.
In one possible design, before forwarding the service to be processed according to the target forwarding list, the method further includes:
Obtaining a main service node corresponding to the service to be processed;
When the main service node is changed, the main service node and the standby service node are exchanged, and the forwarding order of the main service node and the standby service node after the exchange is set.
By the method, when the main service node fails or the main service node is reelected, the standby service node is used as the target main service node, and the forwarding order of the main service node is associated with the target main service node, so that the target main service node can realize local priority forwarding.
In one possible design, before forwarding the service to be processed according to the target forwarding list, the method further includes:
Acquiring a standby service node corresponding to the service to be processed;
and when the backup service node fails to recover, acquiring a backup forwarding sequence table corresponding to the backup service node fails, and controlling a forwarding plane to take the backup forwarding sequence table as a target forwarding sequence table after the backup service node fails to recover.
By the method, the processing mode of the backup service node fault recovery is determined, and the forwarding order of the backup service node fault is the same as the forwarding order of the backup service node after the fault recovery, so that the loss of the service to be processed forwarded by the backup service node is prevented.
In a second aspect, the present application provides a service forwarding apparatus, the apparatus comprising:
the acquisition module is used for acquiring a service to be processed and a control surface corresponding to the service to be processed;
The determining module is used for determining an initial forwarding list corresponding to the service to be processed from forwarding surfaces associated with the control surface when the control surface is in a preset state;
The adjustment module is used for adjusting the initial forwarding list into a target forwarding list based on the service type of the service to be processed;
And the forwarding module is used for forwarding the service to be processed according to the target forwarding list.
In one possible design, the determining module is specifically configured to determine all service nodes corresponding to the service to be processed when the control plane is in a multiple-return-multiple-activity state, determine forwarding orders corresponding to the service nodes, and generate an initial forwarding list based on the forwarding orders.
In one possible design, the determining module is further configured to determine a primary service node and a standby service node from all service nodes in border gateway protocol (Border Gateway Protocol, BGP) routing information when the control plane is in a multi-home single-active state, where the BGP routing information is used to confirm the primary and standby states of the service nodes, determine a primary forwarding order corresponding to the primary service node and a standby forwarding order corresponding to the standby service node, and generate the initial forwarding list corresponding to the to-be-processed service based on the primary forwarding order and the standby forwarding order.
In one possible design, the determining module is further configured to determine an IP address or a VLAN identifier corresponding to each service node, sort each IP address according to a preset order, screen out a minimum IP address, use a service node corresponding to the minimum IP address as a main service node, use other nodes except the main service node as standby service nodes, or take the VLAN identifier into a preset formula to calculate a sequence number of each service node, use a service node with a sequence number of 1 as the main service node, and use other nodes except the main service node as standby service nodes.
In one possible design, the adjusting module is specifically configured to extract all service nodes in the initial forwarding list, determine a main service node and a standby service node from all service nodes, and adjust the main service node and/or the standby service node in the initial forwarding list based on a preset instruction when determining the service type and the preset state of the service to be processed, and take the adjusted initial forwarding list as a target forwarding list of the service to be processed.
In one possible design, the forwarding module is specifically configured to obtain a main service node corresponding to the service to be processed, exchange the main service node with the standby service node when the main service node is changed, and set a forwarding order of the main service node and the standby service node after exchange.
In one possible design, the forwarding module is further configured to obtain a backup service node corresponding to the service to be processed, and when the backup service node fails to recover, obtain a backup forwarding order table corresponding to the backup service node when the backup service node fails, and control the forwarding plane to use the backup forwarding order table as a target forwarding order table after the backup service node fails to recover.
In a third aspect, the present application provides an electronic device, comprising:
a memory for storing a computer program;
and the processor is used for realizing the steps of the service forwarding method when executing the computer program stored in the memory.
In a fourth aspect, a computer readable storage medium has stored therein a computer program which, when executed by a processor, implements a service forwarding method step as described above.
The technical effects of each of the first to fourth aspects and the technical effects that may be achieved by each aspect are referred to above for the technical effects that may be achieved by the first aspect or the various possible aspects of the first aspect, and are not repeated here.
Drawings
FIG. 1 is a schematic diagram of a router according to the present application for forwarding and transmitting data using multiple-homing multiple-activity;
Fig. 2 is a schematic diagram of a router according to the present application for forwarding and transmitting data using multiple home single agents;
fig. 3 is a flowchart of a service forwarding method provided in the present application;
fig. 4 is a schematic diagram of forwarding services of different service types in a dual-homing dual-active mode provided by the present application;
fig. 5 is a schematic structural diagram of a service forwarding device provided by the present application;
fig. 6 is a schematic structural diagram of an electronic device according to the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail with reference to the accompanying drawings. The specific method of operation in the method embodiment may also be applied to the device embodiment or the system embodiment. In the description of the present application, "a plurality of" means "at least two". "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a exists alone, A and B exist together, and B exists alone. A is connected with B, and can be represented as follows: both cases of direct connection of A and B and connection of A and B through C. In addition, in the description of the present application, the words "first," "second," and the like are used merely for distinguishing between the descriptions and not be construed as indicating or implying a relative importance or order.
In the prior art, under the condition of the same port link identifier when the CE is accessed to the PE in multiple ways, because the service types in the network are various, and under the condition of the same port link identifier, only an EVPN multiple-way multiple-activity mode or an EVPN multiple-way single-activity mode can be deployed, and each mode can only meet the requirement of one service type in the network, therefore, when the service types in the network are more than one, the different service requirements of a plurality of different service types can not be met under the condition of the same port link identifier.
In order to solve the above-mentioned problems, the embodiments of the present application provide a service forwarding method, which is used to implement decoupling of a control plane and a forwarding plane of an EVPN under the condition of the same port link identifier, so as to simultaneously satisfy respective service requirements of multiple different types of services. The method and the device according to the embodiments of the present application are based on the same technical concept, and because the principles of the problems solved by the method and the device are similar, the embodiments of the device and the method can be referred to each other, and the repetition is not repeated.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 3, the present application provides a service forwarding method, which can implement decoupling of a control plane and a forwarding plane of an EVPN, so as to satisfy service requirements of a plurality of different types of services under the condition of the same port link identifier, and the implementation flow of the method is as follows:
step S31: and obtaining a service to be processed and a control surface corresponding to the service to be processed.
Because the forwarding and transmission of the service in the network are completed through routers at the network side and the user side, in the process of implementing the transmission and forwarding of the service, a control plane and a forwarding plane of the EVPN in the related art are in a coupling state, and the control plane and the forwarding plane have a multi-return single-active mode and a multi-return multi-active mode, which are specifically shown in table 1:
Control surface Transfer surface
Multiple return single active mode Multiple return single active mode
Multiple return multiple activity mode Multiple return multiple activity mode
TABLE 1
In table 1, the control plane and the forwarding plane have a multi-home single-active mode and a multi-home double-active mode, the multi-home single-active mode is that a plurality of user CEs belong to one network PE, the multi-home multiple-active mode is that one user CE belongs to a plurality of network PEs, and since the control plane and the forwarding plane are in a coupling state, when the control plane is in the multi-home single-active mode, the forwarding plane is also in the multi-home single-active mode, when the control plane is in the multi-home multiple-active mode, the forwarding plane is also in the multi-home multiple-active mode, the forwarding plane generally defines the active/standby state of the service node, and the forwarding table in the forwarding plane is as shown in table 2:
TABLE 2
In table 2, the forwarding table when the forwarding plane is in the multiple-return single-active mode is listed, and in table 2, the dual-return single-active is taken as an example, when the main service node receives the service to be processed, the main service node forwards the service to be processed because the forwarding order of the main service node is local priority forwarding; when the standby service node receives the service to be processed, the standby service node forwards the service to be processed to the main service node because the forwarding order of the standby service node is far-end priority forwarding, in the above table 2, the standby service node forwards the service to be processed to the main service node, and then the main service node forwards the service to be processed, and the forwarding table in the forwarding plane in the multi-home single-active mode refers to the above table 2, and the forwarding table in the multi-home single-active mode differs from the forwarding table corresponding to the multi-home single-active mode in that the roles of the service nodes and the forwarding order of the service nodes are different, which is not excessively described herein.
The embodiment of the application aims to enable the control plane and the forwarding plane in the EVPN to be in a decoupling state, so that the accurate control of different types of services under the same port link can be realized, and therefore, the service to be processed is required to be obtained, and the service to be processed can be any service type in a network.
Such as: the service type of the service to be processed can be a home-wide internet service, a government enterprise private line service and the like, the service requirement of the home-wide internet service is to realize load balancing in network transmission, and the service requirement of the government enterprise private line service is to realize accurate flow control in network transmission.
After obtaining the service to be processed, in order to obtain the initial forwarding list of the service to be processed, a control surface to which the service to be processed belongs is also required to be obtained.
Step S32: when the control surface is in a preset state, determining an initial forwarding list corresponding to the service to be processed from forwarding surfaces associated with the control surface.
Because the control surface has the multi-return multi-activity mode and the multi-return single-activity mode, the embodiment of the application is described by the double-return double-activity mode in the multi-return multi-activity mode and the double-return single-activity mode in the multi-return single-activity mode, when the control surface is in the double-return double-activity state, all service nodes corresponding to the service to be processed are firstly determined, the forwarding sequence corresponding to each service node is determined, then an initial forwarding list is generated based on the forwarding sequence corresponding to each service node, and the initial forwarding list is a list normally generated by the control surface in a preset mode.
When the control plane is in the dual-return single-active state, BGP routing information is acquired, and the BGP routing information is used for confirming the active/standby state of the service node, and the specific process for confirming the active/standby state of the service node is as follows:
The embodiment of the application can determine the main and standby states through the IP addresses and VLAN identifications corresponding to each service node, and the mode of determining the main and standby states of the service nodes based on the IP addresses is as follows: sorting all IP addresses according to the sequence from big to small, screening out the minimum IP address, determining the service node corresponding to the minimum IP address, using the service node as a main service node, and using other nodes except the main service node as standby service nodes.
The method for determining the active/standby state of the service node based on the VLAN identifier comprises the following steps: the VLAN identification of each service node and the quantity value which is mostly attributed to the service node at the same user side are obtained, the serial number of the router at the network side is calculated by adopting the following formula I, and the formula I is shown as follows:
V mod N=i
In the above formula, V represents the VLAN identifier of each service node, the VLAN identifier may be any number between 1 and 4096, N represents the number of PEs classified into the same CE, and i represents the serial number of the PE.
Based on the formula I, the serial numbers of all the service nodes can be calculated, when the serial number is 1, the service node corresponding to the serial number 1 is used as a main service node, and the service node with the serial number not 1 is used as a standby service node.
After the main service node and the standby service node are determined, the main forwarding order of the main service node and the standby forwarding order of the standby service node are determined, and an initial forwarding list is generated based on the main forwarding order and the standby forwarding order.
According to the method, the initial forwarding list can be obtained based on the preset state of the control plane, and the main and standby states and forwarding orders of different services to be processed in different modes of the control plane can be obtained through the initial forwarding list, so that the initial forwarding list can be adjusted.
Step S33: and adjusting the initial forwarding list into a target forwarding list based on the service type of the service to be processed.
Because the initial forwarding list records the forwarding order and the main and standby states corresponding to the service of a certain service type, in order to realize the service requirements of different service types, the initial forwarding list needs to be adjusted to be a target forwarding list meeting the service requirements of the service to be processed based on the service type, so that the decoupling of the control plane and the forwarding plane is realized, all service nodes in the initial forwarding list need to be extracted, then the main service node and the standby service node are determined from all service nodes, then the service type and the preset state of the service to be processed are determined, the main service node and/or the standby service node in the initial forwarding list is adjusted based on a preset instruction, the adjusted initial forwarding list is taken as a target forwarding list, the process of obtaining the target forwarding list is described by way of example for more clear description, and the process of obtaining the target forwarding list is as follows:
In fig. 4, all the services are forwarded from PE3 to CE1 through PE1 and PE2, the forwarding flow of the type a service to be processed is represented by a solid line, the forwarding flow of the type B service to be processed is represented by a dashed line, CE is a router on the user side, and PE is a router on the network side.
If the type a service to be processed is a home broadband internet service and the type B service to be processed is a private line service of an enterprise, because the service requirement of the home broadband internet service is to realize load balancing in network transmission, the service forwarding flow realized in the above-mentioned fig. 4 can meet the service requirement of the type a service to be processed, but because the service requirement of the type B service to be processed is to realize accurate flow control in the network, the service requirement of the type B service to be processed cannot be realized according to the forwarding flow of the dotted line in the above-mentioned fig. 4.
In fig. 4, an initial forwarding list corresponding to the B-type pending service is shown in table 3:
TABLE 3 Table 3
In the above table 3, the forwarding order of each service node is locally and preferentially forwarded as the primary, and the remote forwarding is standby, because the preset state of the current control plane is double-return double-active, when the service to be processed is the B-type service to be processed, only load balancing can be implemented in network transmission according to the forwarding order in the table 3, and the forwarding list in the table 3 will not meet the service requirement of the service to be processed, so that the initial forwarding list needs to be adjusted based on the preset instruction, the service type and the double-return double-active state, and the adjusted target forwarding list is shown in the table 4:
TABLE 4 Table 4
The above table 4 is a target forwarding list of the service to be processed, and adjusts the forwarding order of the standby service node PE2 to be a local (PE 2) forwarding order, the remote (PE 1) forwarding order is the primary, the primary service node PE1 keeps the forwarding order unchanged, the local (PE 1) forwarding order is the primary, and the remote (PE 2) forwarding order is the standby, so the above table 4 can meet the service requirement of implementing accurate flow control in network transmission of the service to be processed.
Under the same port link identifier, because the preset state of the control plane is determined, and the forwarding table in the forwarding plane associated with the control plane is also determined, the control plane and the forwarding plane can be decoupled by adjusting the initial forwarding list to be the target forwarding list, and thus the service requirement of the service to be processed can be met.
According to the method, the initial forwarding list is adjusted to be a target forwarding list which meets the service requirements of the service to be processed based on the preset instruction, so that a forwarding list corresponding to the service to be processed is formed on the forwarding list, decoupling of the control plane and the forwarding plane is further achieved, and the service requirements corresponding to the service to be processed of different service types are achieved under the same port link.
Step S34: and forwarding the service to be processed according to the target forwarding list.
The above-mentioned target forwarding list of the service to be processed has been determined, when the main service node in the network fails and the main service node is redetermined, the main service node will be changed, and when the main service node is changed, the main service node and the standby service node will be interchanged, and the forwarding order of the main service node and the standby service node after interchange is redeployed.
Such as: when the main service node and the standby service node are exchanged, the main service node is used as a target standby service node and the standby service node is used as a target main service node, the forwarding order of the main service node is associated with the target main service node, and the forwarding order of the target standby service node is reset by the preset state of the control surface and the service type of the target standby service node.
When the backup service node is in fault recovery, a corresponding backup forwarding order table is obtained when the backup service node is in fault, and the forwarding plane is controlled to take the backup forwarding order table as a target forwarding order table of the backup service node in fault recovery, and when the backup forwarding order table of the backup service node is in local priority forwarding, the target forwarding order table of the backup service node after fault recovery is also in local priority forwarding; when the standby forwarding order table of the standby service node is the far-end priority forwarding, the target forwarding order table of the standby service node after fault recovery is also the far-end priority forwarding.
After the target forwarding list of the service to be processed is determined, the forwarding plane can forward the service to be processed based on the target forwarding list.
Based on the description, the initial forwarding list is adjusted to be a target forwarding list which meets the service requirements of the service to be processed, so that forwarding lists corresponding to the service to be processed of different service types can be determined, decoupling of a control plane and a forwarding plane is realized, main-standby relation in the forwarding table in the forwarding plane can be adjusted, and when a service node fails, the forwarding order in the forwarding table can be quickly switched, and further the service requirements corresponding to the different service types on the same port link can be realized.
Based on the same inventive concept, the embodiment of the present application further provides a service forwarding device, where the service forwarding device is configured to implement a function of a service forwarding method, and referring to fig. 5, the device includes:
An obtaining module 501, configured to obtain a service to be processed and a control plane corresponding to the service to be processed;
a determining module 502, configured to determine, when the control plane is in a preset state, an initial forwarding list corresponding to the service to be processed from forwarding planes associated with the control plane;
An adjustment module 503, configured to adjust the initial forwarding list to a target forwarding list based on a service type of the service to be processed;
and a forwarding module 504, configured to forward the service to be processed according to the target forwarding list.
In one possible design, the determining module 502 is specifically configured to determine all service nodes corresponding to the service to be processed when the control plane is in a multiple-return-multiple-activity state, determine forwarding orders corresponding to the service nodes, and generate an initial forwarding list based on the forwarding orders.
In one possible design, the determining module 502 is further configured to determine, when the control plane is in a multiple-home single-active state, a primary service node and a standby service node from all service nodes in border gateway protocol (Border Gateway Protocol, BGP) routing information, where the BGP routing information is used to confirm the primary and standby states of the service nodes, determine a primary forwarding order corresponding to the primary service node and a standby forwarding order corresponding to the standby service node, and generate the initial forwarding list corresponding to the to-be-processed service based on the primary forwarding order and the standby forwarding order.
In one possible design, the determining module 502 is further configured to determine an IP address or a VLAN identifier corresponding to each service node, sort each IP address according to a preset order, screen out a minimum IP address, use a service node corresponding to the minimum IP address as a main service node, use other nodes except the main service node as standby service nodes, or take the VLAN identifier into a preset formula to calculate a sequence number of each service node, use a service node with a sequence number of 1 as the main service node, and use other nodes except the main service node as standby service nodes.
In one possible design, the adjusting module 503 is specifically configured to extract all service nodes in the initial forwarding list, determine a main service node and a standby service node from all service nodes, and adjust the main service node and/or the standby service node in the initial forwarding list based on a preset instruction when determining the service type and the preset state of the service to be processed, and take the initial forwarding list after adjustment as a target forwarding list of the service to be processed.
In one possible design, the forwarding module 504 is specifically configured to obtain a main service node corresponding to the service to be processed, exchange the main service node with the standby service node when the main service node is changed, and set a forwarding order of the main service node and the standby service node after the exchange.
In one possible design, the forwarding module 504 is further configured to obtain a backup service node corresponding to the service to be processed, when the backup service node fails to recover, obtain a backup forwarding order table corresponding to the backup service node fails, and control the forwarding plane to use the backup forwarding order table as a target forwarding order table after the backup service node fails to recover.
Based on the same inventive concept, the embodiment of the present application further provides an electronic device, where the electronic device may implement the function of the foregoing service forwarding apparatus, and referring to fig. 6, the electronic device includes:
at least one processor 601, and a memory 602 connected to the at least one processor 601, a specific connection medium between the processor 601 and the memory 602 is not limited in the embodiment of the present application, and in fig. 6, the processor 601 and the memory 602 are connected through a bus 600 as an example. Bus 600 is shown in bold lines in fig. 6, and the manner in which the other components are connected is illustrated schematically and not by way of limitation. The bus 600 may be divided into an address bus, a data bus, a control bus, etc., and is represented by only one thick line in fig. 6 for convenience of representation, but does not represent only one bus or one type of bus. Alternatively, the processor 601 may be referred to as a controller, and the names are not limited.
In the embodiment of the present application, the memory 602 stores instructions executable by the at least one processor 601, and the at least one processor 601 may perform a service forwarding method as described above by executing the instructions stored in the memory 602. The processor 601 may implement the functions of the respective modules in the apparatus shown in fig. 5.
The processor 601 is a control center of the device, and various interfaces and lines can be used to connect various parts of the whole control device, and through running or executing instructions stored in the memory 602 and calling data stored in the memory 602, various functions of the device and processing data can be performed, so that the device can be monitored as a whole.
In one possible design, processor 601 may include one or more processing units, and processor 601 may integrate an application processor and a modem processor, wherein the application processor primarily processes operating systems, user interfaces, application programs, and the like, and the modem processor primarily processes wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 601. In some embodiments, processor 601 and memory 602 may be implemented on the same chip, or they may be implemented separately on separate chips in some embodiments.
The processor 601 may 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, discrete hardware components, which may implement or perform the methods, steps and logic blocks disclosed in embodiments of the application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of a service forwarding method disclosed in connection with the embodiment of the present application may be directly embodied as execution completion by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
The memory 602 is a non-volatile computer readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs, and modules. The Memory 602 may include at least one type of storage medium, which may include, for example, flash Memory, hard disk, multimedia card, card Memory, random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read-Only Memory (ROM), charged erasable programmable Read-Only Memory (ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only Memory, EEPROM), magnetic Memory, magnetic disk, optical disk, and the like. Memory 602 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 602 in embodiments of the present application may also be circuitry or any other device capable of performing storage functions for storing program instructions and/or data.
By programming the processor 601, the code corresponding to a service forwarding method described in the foregoing embodiment may be cured into the chip, so that the chip can execute a service forwarding step of the embodiment shown in fig. 3 at runtime. How to design and program the processor 601 is a well-known technique for those skilled in the art, and will not be described in detail herein.
Based on the same inventive concept, the embodiments of the present application also provide a storage medium storing computer instructions that, when executed on a computer, cause the computer to perform a service forwarding method as described above.
In some possible embodiments, the present application provides a service forwarding method, the aspects of which may also be implemented in the form of a program product comprising program code for causing the control apparatus to carry out the steps of a service forwarding method according to the various exemplary embodiments of the application as described in the present specification, when the program product is run on a device.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may 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, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may 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, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (10)

1. A method for forwarding traffic, comprising:
Obtaining a service to be processed and a control surface corresponding to the service to be processed;
When the control surface is in a preset state, determining an initial forwarding list corresponding to the service to be processed from a forwarding surface associated with the control surface, wherein the initial forwarding list does not meet the service requirement of the service to be processed, and the preset state is a multi-return multi-activity state or a multi-return single-activity state;
adjusting the initial forwarding list to be a target forwarding list based on the service type of the service to be processed;
And forwarding the service to be processed according to the target forwarding list.
2. The method of claim 1, wherein determining an initial forwarding list corresponding to the pending service from a forwarding plane associated with the control plane comprises:
When the control surface is in a multi-homing multi-activity state, determining all service nodes corresponding to the service to be processed;
And determining the forwarding order corresponding to each service node, and generating an initial forwarding list based on each forwarding order.
3. The method of claim 1, wherein determining an initial forwarding list corresponding to the pending service from a forwarding plane associated with the control plane comprises:
When the control plane is in a multi-return single-active state, determining a main service node and a standby service node from all service nodes in border gateway protocol (Border Gateway Protocol, BGP) routing information, wherein the BGP routing information is used for confirming the main and standby states of the service nodes;
Determining a main forwarding order corresponding to the main service node and a standby forwarding order corresponding to the standby service node;
And generating the initial forwarding list corresponding to the service to be processed based on the main forwarding order and the standby forwarding order.
4. The method of claim 3, wherein determining the primary service node and the backup service node from all service nodes in BGP routing information comprises:
Determining IP addresses or VLAN identifications corresponding to the service nodes respectively;
Sorting all IP addresses according to a preset sequence, screening out a minimum IP address, taking a service node corresponding to the minimum IP address as a main service node, and taking other nodes except the main service node as standby service nodes; or alternatively
And carrying the VLAN identifier into a preset formula to calculate the serial numbers of all service nodes, and taking the service node with the serial number of 1 as a main service node and other nodes except the main service node as standby service nodes.
5. The method of claim 1, wherein adjusting the initial forwarding list to a target forwarding list based on the traffic type of the traffic to be processed comprises:
Extracting all service nodes in the initial forwarding list, and determining a main service node and a standby service node from all the service nodes;
When the service type and the preset state of the service to be processed are determined, adjusting the main service node and/or the standby service node in the initial forwarding list based on a preset instruction, wherein the preset instruction is an instruction for indicating to adjust the initial forwarding list in a forwarding plane;
and taking the adjusted initial forwarding list as a target forwarding list of the service to be processed.
6. The method of claim 1, further comprising, prior to forwarding the pending traffic in accordance with the target forwarding list:
Obtaining a main service node corresponding to the service to be processed;
When the main service node is changed, the main service node and the standby service node are exchanged, and the forwarding order of the main service node and the standby service node after the exchange is set.
7. The method of claim 1, further comprising, prior to forwarding the pending traffic in accordance with the target forwarding list:
Acquiring a standby service node corresponding to the service to be processed;
and when the backup service node fails to recover, acquiring a backup forwarding sequence table corresponding to the backup service node fails, and controlling a forwarding plane to take the backup forwarding sequence table as a target forwarding sequence table after the backup service node fails to recover.
8. A service forwarding apparatus, comprising:
the acquisition module is used for acquiring a service to be processed and a control surface corresponding to the service to be processed;
The determining module is used for determining an initial forwarding list corresponding to the service to be processed from forwarding surfaces associated with the control surface when the control surface is in a preset state;
The adjustment module is used for adjusting the initial forwarding list into a target forwarding list based on the service type of the service to be processed;
And the forwarding module is used for forwarding the service to be processed according to the target forwarding list.
9. An electronic device, comprising:
a memory for storing a computer program;
A processor for carrying out the method steps of any one of claims 1-7 when executing a computer program stored on said memory.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored therein a computer program which, when executed by a processor, implements the method steps of any of claims 1-7.
CN202211290343.7A 2022-10-21 2022-10-21 Service forwarding method and device and electronic equipment Pending CN117956018A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202211290343.7A CN117956018A (en) 2022-10-21 2022-10-21 Service forwarding method and device and electronic equipment
PCT/CN2023/071117 WO2024082462A1 (en) 2022-10-21 2023-01-06 Service forwarding method and apparatus, and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211290343.7A CN117956018A (en) 2022-10-21 2022-10-21 Service forwarding method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN117956018A true CN117956018A (en) 2024-04-30

Family

ID=90736725

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211290343.7A Pending CN117956018A (en) 2022-10-21 2022-10-21 Service forwarding method and device and electronic equipment

Country Status (2)

Country Link
CN (1) CN117956018A (en)
WO (1) WO2024082462A1 (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9391885B1 (en) * 2013-09-05 2016-07-12 Juniper Networks, Inc. MPLS label usage in Ethernet virtual private networks
WO2018103099A1 (en) * 2016-12-09 2018-06-14 华为技术有限公司 Method, device and system for sending and receiving message
CN108696414A (en) * 2017-04-05 2018-10-23 中兴通讯股份有限公司 Return cut-in method, device and more home nodes more
US10666459B1 (en) * 2017-04-07 2020-05-26 Cisco Technology, Inc. System and method to facilitate interoperability between virtual private LAN service (VPLS) and ethernet virtual private network (EVPN) with all-active multi-homing
CN114666267A (en) * 2020-12-07 2022-06-24 中兴通讯股份有限公司 Data processing method, equipment and storage medium of Ethernet virtual private network
CN113472665B (en) * 2021-06-17 2022-11-18 新华三信息安全技术有限公司 Method and device for realizing butt joint of different networks under EVPN

Also Published As

Publication number Publication date
WO2024082462A1 (en) 2024-04-25

Similar Documents

Publication Publication Date Title
CN107819663B (en) Method and device for realizing virtual network function service chain
TWI543566B (en) Data center network system based on software-defined network and packet forwarding method, address resolution method, routing controller thereof
US9001827B2 (en) Methods for configuring network switches
US20170353351A1 (en) Method and network infrastructure for a direct public traffic connection within a datacenter
WO2016055027A1 (en) Table entry in software defined network
CN106936682B (en) Processing method and controller for appointed forwarder and provider edge device
CN105721303B (en) A kind of route control method, the network equipment and controller
US20180159702A1 (en) Packet forwarding
CN106059946B (en) Message forwarding method and device
CN111010329B (en) Message transmission method and device
CN112272145A (en) Message processing method, device, equipment and machine readable storage medium
CN110636036A (en) OpenStack cloud host network access control method based on SDN
CN111030932B (en) Method, device and system for anchoring data message
CN108259205B (en) Route publishing method and network equipment
CN111800338B (en) Cross-AS EVPN route interaction method and device
CN111464443B (en) Message forwarding method, device, equipment and storage medium based on service function chain
CN115348202A (en) Data transmission method, device and equipment based on network slice and storage medium
CN111130978B (en) Network traffic forwarding method and device, electronic equipment and machine-readable storage medium
CN117956018A (en) Service forwarding method and device and electronic equipment
CN106161228A (en) A kind of method and apparatus issuing route
US9007910B2 (en) Load balancing across a link aggregation group
US7633885B2 (en) Route computing system
CN113259248B (en) Method and device for determining link for forwarding service flow
CN114629844A (en) Message forwarding method and device and electronic equipment
CN110324247B (en) Multicast forwarding method, device and storage medium in three-layer multicast network

Legal Events

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