Session migration method, device, equipment, storage medium and program product
By employing UDP packet encapsulation and merging processing cores in the NFV architecture, the problems of complex session migration processes and terminal burden under the NFV architecture are solved, achieving efficient and stable session migration and ensuring business continuity and system performance.
Patent Information
- Application Number
- CN202511353286.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-22
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2045-09-22
AI Technical Summary
In the NFV architecture, traditional session migration methods have complex session processing flows under the fast and slow path separation architecture, which increases the burden on terminals and poses a risk of service interruption, making it difficult to meet the service requirements of high performance and low latency.
By introducing UDP packets to encapsulate session information in the NFV architecture, and combining two granularities of instance migration and full migration, the session migration of the source network element is triggered by the destination network element, reducing inter-core communication and network load. Session synchronization is performed using merged processing cores, and supports migration by instance or full.
It enables efficient and stable session migration under the NFV architecture, reduces network load and performance loss, and ensures business continuity and system stability.
Smart Images

Figure CN120856760B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud networks, and more particularly to a session migration method, apparatus, device, storage medium, and program product. Background Technology
[0002] In communication networks, session migration is a crucial mechanism for achieving service continuity and high availability under Network Functions Virtualization (NFV) architectures. Session migration aims to ensure seamless switching of user services in scenarios such as network element failures or load balancing, thereby improving system stability and user experience. With the evolution of network architectures, traditional session management methods are increasingly unable to meet the demands of high-performance, low-latency services, especially in NFV architectures with separate fast and slow paths. Efficient session migration becomes a critical issue. While existing session synchronization / migration methods can achieve session synchronization with separate forwarding and synchronization CPUs, they still suffer from complex session processing flows, additional overhead from terminal involvement, and potential service interruption risks, limiting session migration efficiency and overall system performance improvements. Summary of the Invention
[0003] To address the aforementioned technical problems, embodiments of this application provide a session migration method, apparatus, device, storage medium, and program product.
[0004] The session migration method provided in this application embodiment is applied to a first network element and includes:
[0005] Send first information to the second network element, the first information being used to request the second network element to start session migration; the first information includes the network address and instance identifier of the first network element, and the type of session migration is instance migration; or, the first information includes the network address and full migration identifier of the first network element, and the type of session migration is full migration;
[0006] Receive second information sent by the second network element, the second information being used to confirm the start of the session migration to the first network element;
[0007] The third information sent by the second network element is received, the third information including a User Datagram Protocol (UDP) message carrying the session.
[0008] The session migration method provided in this application embodiment is applied to a second network element and includes:
[0009] The system receives first information sent by a first network element, the first information being used to request the second network element to start a session migration; the first information includes the network address and instance identifier of the first network element, and the type of the session migration is instance migration; or, the first information includes the network address and full migration identifier of the first network element, and the type of the session migration is full migration.
[0010] Send a second message to the first network element, the second message being used to confirm the start of the session migration to the first network element;
[0011] Select one or more sessions that meet the preset conditions from the session cache list, and encapsulate the one or more sessions to obtain a UDP packet carrying the session;
[0012] Send third information to the first network element, the third information including a UDP packet carrying the session.
[0013] The session migration apparatus provided in this application embodiment is applied to a first network element and includes:
[0014] A first sending unit is configured to send first information to a second network element, the first information being used to request the second network element to start a session migration; the first information includes the network address and instance identifier of the first network element, and the type of the session migration is instance migration; or, the first information includes the network address and full migration identifier of the first network element, and the type of the session migration is full migration.
[0015] The first receiving unit is configured to receive second information sent by the second network element, the second information being used to confirm the start of the session migration to the first network element; and to receive third information sent by the second network element, the third information including a User Datagram Protocol (UDP) message carrying the session.
[0016] The session migration apparatus provided in this application embodiment is applied to a second network element and includes:
[0017] The second receiving unit is configured to receive first information sent by the first network element, the first information being used to request the second network element to start a session migration; the first information includes the network address and instance identifier of the first network element, and the type of the session migration is instance migration; or, the first information includes the network address and full migration identifier of the first network element, and the type of the session migration is full migration.
[0018] The second sending unit is used to send second information to the first network element, the second information being used to confirm the start of the session migration to the first network element;
[0019] The second processing unit is used to select one or more sessions that meet preset conditions from the session cache linked list, and encapsulate the one or more sessions to obtain UDP packets carrying the sessions;
[0020] The second sending unit is further configured to send third information to the first network element, the third information including a UDP packet carrying a session.
[0021] The communication device provided in this application includes a processor and a memory. The memory is used to store computer programs, and the processor is used to call and run the computer programs stored in the memory to execute any of the above-described session migration methods.
[0022] The computer-readable storage medium provided in this application embodiment is used to store a computer program that causes a computer to execute any of the above-described session migration methods.
[0023] The computer program product provided in this application includes computer program instructions that cause a computer to execute any of the above-described session migration methods.
[0024] In the technical solution of this application embodiment, the first network element sends first information to the second network element, the first information being used to request the second network element to start session migration; and receives second information sent by the second network element, the second information being used to confirm the start of session migration to the first network element; and receives third information sent by the second network element, the third information including a User Datagram Protocol (UDP) packet carrying the session; wherein, the first information includes the network address and instance identifier of the first network element, and the type of session migration is instance migration; or, the first information includes the network address and full migration identifier of the first network element, and the type of session migration is full migration. Thus, in the two-layer separation architecture of fast and slow path network elements, the first network element (destination) triggers the second network element (source) to start session migration through a message. By encapsulating and transmitting session information using UDP packets between the destination and source, and combining the support for both instance migration and full migration granularity session migration methods, flexible session migration by instance or full migration is achieved, while reducing network load and performance loss, and ensuring service continuity and stability during instance session migration. Attached Figure Description
[0025] Figure 1 This is a schematic diagram of the TLV structure provided in an embodiment of this application;
[0026] Figure 2 This is a schematic diagram of the architecture of a cloud network NFV platform provided in an embodiment of this application;
[0027] Figure 3 This is a schematic diagram of a two-layer separate architecture for fast and slow path network element cascading provided in an embodiment of this application;
[0028] Figure 4 This is a schematic diagram illustrating the distribution of a VNF instance in an SFC network element, as provided in an embodiment of this application.
[0029] Figure 5 This is a schematic diagram illustrating the principle of session processing in the related technologies provided in the embodiments of this application;
[0030] Figure 6 This is a schematic diagram illustrating the principle of inter-core communication between the forwarding core and the synchronization core in the related technologies provided in the embodiments of this application;
[0031] Figure 7 This is a flowchart illustrating a session migration method provided in an embodiment of this application;
[0032] Figure 8 This is a flowchart illustrating another session migration method provided in an embodiment of this application;
[0033] Figure 9 This is a schematic diagram of the worker thread for session migration provided in an embodiment of this application;
[0034] Figure 10 This is a schematic diagram of the instance session cache provided in the embodiments of this application;
[0035] Figure 11 This is a flowchart illustrating an NFV network element session migration method provided in an embodiment of this application;
[0036] Figure 12 This is a schematic diagram of the structure of a session migration device provided in an embodiment of this application;
[0037] Figure 13 This is a schematic diagram of another session migration device provided in an embodiment of this application;
[0038] Figure 14 This is a schematic diagram of the structure of the communication device provided in the embodiments of this application. Detailed Implementation
[0039] The technical solutions of the embodiments of this application will now be described with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0040] In the following description, the terms first / second are used only to distinguish similar objects and do not represent a specific ordering of objects; it is understood that first / second may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0041] To facilitate understanding of the technical solutions of the embodiments of this application, the relevant technologies of the embodiments of this application are described below. The following relevant technologies are optional solutions and can be combined with the technical solutions of the embodiments of this application in any way, and they all fall within the protection scope of the embodiments of this application.
[0042] (1) Type-Length-Value (TLV)
[0043] TLV is a structured data format commonly used in communications, primarily for encoding the payload of data packets or messages. This encoding method divides data into three main parts: Type, Length, and Value. It is widely used in telecommunications, computer networks, smart cards, and the Internet of Things (IoT), especially in fields requiring efficient, flexible, and scalable data encoding solutions.
[0044] like Figure 1 The diagram shown is a schematic of the TLV structure provided in an embodiment of this application. T can be understood as Tag or Type, used to identify tags or encoding format information, defining the format and purpose of the subsequent Value field; L indicates the size of the Value portion, allowing the receiver to know how much data to read; V represents the actual data content. The lengths of T and L are fixed, typically 2 or 4 bytes, while the length of V is specified by Length.
[0045] (2) Data Plane Development Kit (DPDK)
[0046] DPDK is a high-performance network driver component that greatly facilitates the development of data plane applications and improves packet forwarding performance through optimizations such as Userspace I / O (UIO), Userspace Polling mode, large page memory, CPU affinity, memory pool, and lock-free loop support.
[0047] (3) NFV
[0048] NFV is a network architecture that uses IT virtualization technology to virtualize the functions of network nodes as software modules. It can implement various network functions, such as server load balancing (SLB), network address translation (NAT), and virtual private network (VPN) functions of traditional network devices, in standardized general-purpose IT equipment (x86 servers, storage and switching equipment) or general-purpose cloud hosts. With its advantages of elastic scaling and low cost, it has become the future development trend of cloud networks.
[0049] like Figure 2 The diagram illustrates the architecture of a cloud network NFV platform provided in this application embodiment. This architecture is mainly divided into a network element control layer, an NFV platform control layer, and a network element layer. The network element controller is primarily responsible for the configuration and management of service instances such as SLB, NAT, and VPN. The NFV platform control layer is mainly responsible for the lifecycle management of network element virtual machines or containers, including creating and deleting virtual machines / containers, health checks, monitoring and alarms, and cluster management. The network element layer primarily carries VNF instances and implements network forwarding functions.
[0050] (4) Service Function Chain (SFC) network element cascading
[0051] Based on a SFC network element cascading scenario in cloud network NFV, namely a two-layer separation architecture of fast path network elements (FP) and slow path network elements (SP), such as... Figure 3 The diagram shown is a schematic diagram of a two-layer separation architecture for fast and slow path network element cascading provided in an embodiment of this application. In the diagram, sync-port is the session synchronization port, inner-port is the internal port, and trunk-port is the trunk port.
[0052] In this context, the session is the carrier used by the NFV gateway to manage data flow connections. Once a session is established, forwarding will only be completed at the forwarding layer. Figure 3 The secondary request path (⑥⑦) indicated by the dashed arrows is a fast path, and the network element handling data forwarding is called the FP network element. Conversely, when a data packet first arrives at the FP network element, since no session can be found, the packet needs to be sent to the new layer via the inner-port to create a new session. The newly created session will be synchronized to the FP network element in the forwarding layer via the inner-port, i.e. Figure 3 The first request path (①②③④) indicated by the solid arrows is a slow path. The network element that creates the new session is called the SP network element.
[0053] Therefore, in the two-layer architecture of fast and slow path network elements, the SP network element is responsible for session management, including session creation, refresh, deletion, aging, etc., and is usually deployed in a primary-backup high availability mode; the FP network element is mainly responsible for traffic forwarding and is deployed in a distributed stateless mode.
[0054] Furthermore, both FP and SP network elements are equipped with three network interface cards (NICs): the FP NIC consists of a management NIC, a service NIC, and an internal NIC; the SP NIC consists of a management NIC, an internal NIC, and a primary / backup synchronization NIC.
[0055] (4) Multiple instances
[0056] In public cloud scenarios, to ensure high availability, a user's same VNF instance is typically deployed in a highly available cluster composed of multiple distributed network elements. Similarly, to improve resource utilization, based on the resource consumption of a user's VNF instance (e.g., a low-specification SLB instance corresponds to 200Mbps bandwidth, 3000 new connections, and 5000 concurrent connections; a high-specification SLB instance corresponds to 10Gbps bandwidth, 100,000 new connections, and 1 million concurrent connections), multiple users' different VNF instances will be deployed simultaneously in the same network element.
[0057] like Figure 4 The diagram shows the distribution of VNF instances in an SFC network element according to an embodiment of this application. Network element 1-1 represents the first network element in the first layer of the service function chain, network element 2-1 represents the first network element in the second layer of the service function chain, and so on. VNF1-1-1 represents the first VNF instance of a user, distributed on network element 1-1, and VNF3-2-3 represents the third instance of a user, distributed on network element 2-3.
[0058] Different VNF instances distributed on the same network element share the CPU, memory, network bandwidth, and other resources of that network element. To address application scenarios such as sudden increases in performance demands from public cloud user instances, security sandbox isolation, and network element upgrades, network element instance migration is necessary.
[0059] Network element instance migration refers to moving the same VNF instance distributed across different SFC network elements from one network element cluster to another. This operation is crucial for resource optimization, maintenance, fault recovery, and improving service flexibility. Ensuring uninterrupted service traffic is a key issue to be addressed in instance hot migration.
[0060] Based on this, related technologies provide the following centralized session synchronization / session migration methods, specifically including:
[0061] (1) A session synchronization method, wherein the NAT gateway includes a synchronization core and a forwarding core, and session processing requires the joint participation of both cores. For example... Figure 5 The diagram shown is a schematic diagram of the principle of session processing in the related technology provided in the embodiment of this application. In this embodiment, the forwarding core sends a session synchronization request to the synchronization core based on the first target service packet forwarded to the target network. The synchronization core generates a synchronization packet based on the session synchronization request. The synchronization core receives the synchronization packet and stores the session information in the synchronization packet to the forwarding core.
[0062] (2) A session migration method, wherein the source user plane network element determines whether to continue providing services to the terminal device; if the source user plane network element determines that it will no longer provide services to the terminal device, the source user plane network element retains the context of the first session and sends a first notification message to the control plane network element, the first notification message being used to trigger the control plane network element to send an indication message to the terminal device, the indication message being used to instruct the terminal device to trigger the establishment of a second session after waiting until it receives the data to be sent from the terminal device; wherein the first session is the session already established between the source user plane network element and the terminal device, and the second session is the session between the target user plane network element and the terminal device.
[0063] However, the above method still has the following problems:
[0064] (1) Regarding the first session synchronization method, this method is a session synchronization method that separates forwarding and synchronization CPUs. It is not applicable to the fast and slow path separation architecture of NFV network elements because the fast and slow path separation architecture has already achieved the separation of forwarding and session management, that is, session management and synchronization do not affect forwarding.
[0065] (2) Regarding the first session synchronization method, this method requires frequent handling of inter-core communication between the forwarding core and the synchronization core, and the session processing flow is also too complex. For example Figure 6 The diagram shown is a schematic representation of the principle of inter-core communication between the forwarding core and the synchronization core in the related technology provided in the embodiments of this application.
[0066] (3) Regarding the second session migration method, this method requires the participation of the terminal device to re-establish the session, which increases the burden on the terminal and may cause problems with the service terminal or re-establishment during the migration process.
[0067] To address the aforementioned technical issues, this application proposes an NFV network element session migration method based on a SFC network element cascading scenario in cloud network NFV, namely a two-layer separation architecture for fast and slow path network elements. The method specifically includes:
[0068] (1) By triggering the start and stop of session migration of the main SP network element in the source cluster through the message of the main SP network element of the destination cluster, the link reachability of the SP network elements of the two clusters can be verified.
[0069] (2) The main SP network elements in the two clusters encapsulate session migration information through UDP packets and agree on a fixed UDP port number as the session migration listening port, so that the port number can be used to identify the session migration packets.
[0070] (3) Supports session migration at two granularities: instance-based and full-scale, and supports simultaneous migration of multiple instance sessions. When multiple instance sessions are migrated simultaneously, the target SP network element can be in the same cluster or in different clusters.
[0071] (4) The forwarding core and synchronization core in the SP network element are merged into a processing (worker) core. The worker core is used for session synchronization. The impact of session synchronization on session management performance is reduced by controlling the size of the synchronization message and the number of sessions carried by the synchronization message. At the same time, the performance loss caused by excessive inter-core communication of the SP network element is avoided.
[0072] It should be noted that this application not only supports session migration between SP network elements with the same number of worker cores, but also supports session migration between SP network elements with different numbers of worker cores.
[0073] (5) Add an instance session cache for each worker core. This cache stores session indexes by instance, meaning that sessions for different instances are linked in their respective instance lists and are processed when a new session is created. This method avoids session filtering of instances only when session migration is enabled, thus improving migration efficiency and reducing the performance impact of session filtering.
[0074] (6) Only long-term session tables are stored in the session cache because the state of short-term session tables is unstable and has little impact on business, and can also reduce network pressure.
[0075] To facilitate understanding of the technical solutions of the embodiments of this application, the technical solutions of this application are described in detail below through specific embodiments. The above-mentioned related technologies are optional solutions and can be arbitrarily combined with the technical solutions of the embodiments of this application, all of which fall within the protection scope of the embodiments of this application. The embodiments of this application include at least some of the following contents.
[0076] This application proposes a session migration method, which is applied to a first network element. Specifically, the first network element is the SP network element (main SP network element) of the destination cluster in the NFV architecture. Figure 7 This is a flowchart illustrating a session migration method provided in an embodiment of this application, as shown below. Figure 7 As shown, the method includes the following steps:
[0077] Step 701: Send the first information to the second network element. The first information is used to request the second network element to start the session migration.
[0078] The first information includes the network address and instance identifier of the first network element, and the session migration type is instance migration; or, the first information includes the network address and full migration identifier of the first network element, and the session migration type is full migration.
[0079] In this embodiment of the application, the first network element, as the main SP network element of the destination cluster, will actively send session migration request information (first information) to the second network element to start the session migration process. The request information includes the network address and instance identifier of the first network element, or the network address and full migration identifier of the first network element. The instance identifier specifically refers to the VNF instance identifier, and the full migration identifier is used to indicate whether to migrate all eligible sessions. The network address of the first network element specifically refers to the unique Internet Protocol (IP) address of the main SP network element in the destination cluster.
[0080] The first network element can request the second network element to perform instance migration or full migration. Instance migration refers to migrating only the sessions of a specific VNF instance, that is, migrating long-term sessions that meet the preset conditions in the session cache list corresponding to one or more VNF instances from the source network element cluster to the destination network element cluster. Instance migration includes single instance migration and multiple instance migration. Full migration refers to migrating all long-term sessions in the source network element cluster, that is, migrating all long-term sessions that meet the preset conditions in the session cache list corresponding to all VNF instances from the source network element cluster to the destination network element cluster.
[0081] That is, when the first network element requests an instance migration from the second network element, the session migration request information includes the instance identifier and the network address of the first network element; when the first network element requests a full migration from the second network element, the session migration request information includes the instance identifier, the full migration identifier, and the network address of the first network element.
[0082] Instance migration is suitable for situations where one or more specific VNF instances need to be migrated, such as when expanding user services or recovering from a fault. Only the affected instance sessions need to be migrated, avoiding unnecessary resource consumption. Full migration, on the other hand, is suitable for large-scale session migration scenarios, such as the migration of the entire cluster or session switching during maintenance. Regardless of whether instance migration or full migration is used, the first information must contain sufficient information to ensure that the second network element can accurately identify and process the relevant information in the migration request.
[0083] In some implementations, prior to step 701, the following steps are also included:
[0084] Send a fourth message to the second network element. The fourth message is used to request the second network element to obtain the physical address corresponding to the network address of the second network element.
[0085] Receive the fifth information sent by the second network element. The fifth information includes the physical address corresponding to the network address of the second network element.
[0086] Here, the first network element sends an ARP request (fourth information) to the second network element to request the physical address corresponding to the network address of the second network element, that is, to request the Media Access Control Address (MAC) address corresponding to the IP address of the main SP network element in the source network element cluster. After receiving the physical address corresponding to the network address of the second network element returned by the second network element, the first network element will establish a cross-cluster reachable link between the first network element and the second network element, and mark the link reachability in the session synchronization management structure.
[0087] In some implementations, prior to step 701, the following steps are also included:
[0088] Receive the sixth message sent by the network element controller. The sixth message is used to instruct the first network element to enable the session migration function.
[0089] Receive the seventh message sent by the network element controller. The seventh message is used to instruct the first network element to start session migration.
[0090] Here, after establishing a reachable link between the first network element and the second network element, the network element controller can simultaneously issue an instance session migration enable command to the first network element and the second network element, that is, instruct the first network element and the second network element to enable the session migration function. After receiving the session migration enable command, the first network element will start relevant modules, including checking link reachability and initializing the migration buffer, to prepare for subsequent session migration. Then, the network element controller can issue a session migration start command to the first network element, that is, instruct the first network element to start sending session migration request information to the second network element.
[0091] In some implementations, before sending the fourth information to the second network element, the following steps are also included:
[0092] Receive the eighth message sent by the network element controller, which includes instance configuration information;
[0093] Send the ninth message to the network element controller. The ninth message is used to notify the network element controller that the instance configuration migration is complete.
[0094] Here, in the initial stage, the network element controller will send the VNF instance configuration information (eighth information) to the first network element to realize the synchronization of instance configuration between the destination network element cluster where the first network element is located and the source network element cluster where the second network element is located. Then, the first network element will return a notification message (ninth information) to the network element controller to indicate that the instance configuration migration has been completed, so that the first network element can continue to send ARP requests (fourth information) to the second network element to request the physical address corresponding to the network address of the second network element.
[0095] Instance configuration information refers to a set of configuration parameters describing a specific VNF instance, including but not limited to resource allocation, service policies, network address mapping, and port configuration. For example, instance configuration information may include the VNF instance's IP address, subnet mask, port number, load balancing rules, and security group settings. The network element controller distributes the instance configuration information to correctly deploy and initialize VNF instances in the target network element cluster.
[0096] There is a control plane communication relationship between the instance configuration information and the network element controller. That is, the network element controller, as a component of the management plane, is responsible for converting business requirements into specific configuration instructions and sending them to the target network element (the first network element).
[0097] It should be noted that while the network element controller sends the instance configuration information to the first network element, it will also send the instance configuration information to the backup SP network element (third network element) and FP network element (fourth network element) in the same destination network element cluster as the first network element, so as to realize the synchronization of instance configuration from the destination network element cluster to the source network element cluster.
[0098] Step 702: Receive the second information sent by the second network element. The second information is used to confirm the start of session migration to the first network element.
[0099] In this embodiment, after the first network element sends a session migration request to the second network element, the second network element saves the information carried in the session migration request, namely the network address and instance identifier of the first network element, or the network address and full migration identifier of the first network element, to the session migration management linked list node. Then, the second network element queries the ARP cache based on the network address of the first network element. If the ARP cache is not found, the second network element sends an ARP request to the first network element, that is, requests to obtain the physical address corresponding to the network address of the first network element. If the ARP cache is found or the physical address corresponding to the network address of the first network element is received after sending the ARP request, the second network element marks the link as reachable in the session synchronization management structure and sends a confirmation message to the first network element to start the session migration (second information) to confirm the start of the session migration process.
[0100] At the point after the second information is sent, the first network element can begin to receive the third information, namely a UDP packet carrying the session. The content of the second information usually includes fields such as migration confirmation flag and instance identifier or full migration flag to ensure the accuracy and consistency of the migration process.
[0101] Step 703: Receive the third information sent by the second network element. The third information includes a User Datagram Protocol (UDP) message carrying the session.
[0102] In this embodiment, after the first network element receives the confirmation message to start session migration from the second network element, the second network element will start migrating the session to the first network element. This includes traversing the session cache list of the corresponding instance according to the session migration type, retrieving long-term sessions that meet preset conditions, and encapsulating them in TLV format. This includes assembling the long-term sessions that meet the conditions into message data, and then encapsulating the message data with a session synchronization control header, a UDP header, and a network layer header to obtain a UDP message carrying the session (session migration data packet). Then, the first network element will receive the UDP message carrying the session sent by the second network element.
[0103] UDP is a connectionless transport layer protocol with low overhead and high efficiency, making it particularly suitable for large-scale session migration scenarios. The number of sessions carried in each UDP packet can be configured via commands to balance migration speed and performance impact.
[0104] In some implementations, after step 703, the method further includes:
[0105] If the target port number in the UDP header is identified as the session migration port number, the session synchronization control header is parsed to obtain the thread identifier of the session.
[0106] Based on thread identifiers, UDP packets carrying sessions are synchronized across cores, synchronizing the UDP packets carrying sessions to the target processing core.
[0107] Here, the destination port number is a field in the UDP header used to indicate which port the UDP packet carrying the session should be processed by. In this embodiment, a port number for session migration is first preset, defined as the session migration port number. After the first network element receives the UDP packet carrying the session sent by the second network element, the first network element begins to identify whether the destination port number in the UDP header of the UDP packet carrying the session is the agreed-upon session migration port number. If so, the UDP packet carrying the session is considered to be part of the session migration message content. The first network element continues to parse the session synchronization control header included in the UDP packet carrying the session to obtain the thread identifier of the session. Then, based on the thread identifier of the session, the location of the target processing core is determined for the UDP packet carrying the session, and the UDP packet carrying the session is synchronized between cores to synchronize it to the target processing core. The UDP header in the UDP packet carrying the session includes a source port number and a destination port number. The source port number corresponds to the port number of the source network element cluster, and the destination port number corresponds to the port number of the destination network element cluster.
[0108] The thread identifier of a session is a unique identifier used within the SP network element to locate and process a specific session. It usually corresponds to a processing thread on a certain worker core. By parsing the thread identifier of the first network element, it can be determined which thread the session should be synchronized to for processing.
[0109] Specifically, the target processing core refers to the target worker core, which is the worker core obtained by merging the forwarding core and the synchronization core in the network element. Using the worker core for session migration between network elements in two clusters can reduce inter-core communication and avoid the performance loss caused by excessive inter-core communication between network elements.
[0110] In some embodiments, the above method further includes:
[0111] The message data is parsed on the target processing core to obtain session information;
[0112] Copy the session information to the new session to obtain the new session information;
[0113] Send new session information to the third network element.
[0114] Here, the first network element performs inter-core synchronization based on the thread identifier of the session to synchronize with the corresponding target processing core. On the target processing core, it parses the packet data included in the UDP packet carrying the session to obtain session information. This session information is then copied to a newly created session to obtain new session information. The first network element then sends this new session information to the third network element. The third network element and the first network element are in the same destination network element cluster; the third network element is a backup SP network element, and the first network element is the primary SP network element.
[0115] Among them, the first network element can send the newly established session information to the third network element through the session synchronization port via the High Availability (HA) mechanism.
[0116] In this process, the first network element does not actively synchronize the new session information to the FP network element (fourth network element) in the target network element cluster. Instead, it waits for the FP network element to send a session query request to the first network element. After receiving the session query request, the first network element sends the new session information to the FP network element.
[0117] In some embodiments, the above method further includes:
[0118] Receive the tenth message sent by the network element controller. The tenth message is used to instruct the first network element to terminate the session migration.
[0119] Send the eleventh message to the second network element. The eleventh message is used to request the second network element to terminate the session migration.
[0120] Receive the twelfth message sent by the second network element. The twelfth message is used to confirm the termination of the session migration to the first network element.
[0121] Here, during the session migration process, the network element controller can send a session migration termination command (tenth message) to the primary SP network element in the destination network element cluster at any time. That is, the first network element will receive the session migration termination command sent by the network element controller, which is used to instruct the first network element to terminate the session migration. Then, the first network element will send a session migration termination request message (eleventh message) to the second network element to ensure the bidirectional termination of the migration process, so that both the source network element cluster and the destination network element cluster can enter the migration stop state synchronously. After receiving the session migration termination request message, the second network element stops executing the session migration and returns a confirmation of the termination of the session migration message to the first network element (twelfth message). Through the feedback of the twelfth message, the closed-loop control of the migration termination state can be realized to ensure the integrity of the migration process.
[0122] In some embodiments, the above method further includes:
[0123] Receive the thirteenth message sent by the second network element. The thirteenth message is used to notify the first network element that the session migration has been completed.
[0124] Send the fourteenth message to the network element controller. The fourteenth message is used to notify the network element controller that the session migration is complete.
[0125] Here, after the second network element has migrated all sessions, the first network element will receive the session migration completion information (the thirteenth message) sent by the second network element, which is used to notify the first network element that all required session migrations have been completed. Then, the first network element will send the session migration completion information (the fourteenth message) to the network element controller, which is used to notify the network element controller that the session migration has been completed. At this time, the session migration phase ends.
[0126] In some implementations, after receiving the session migration completion information sent by the first network element, the network element controller will issue a flow switching operation to switch the instance traffic from the FP network element (fifth network element) in the source network element cluster to multiple FP network elements (fourth network elements) in the destination network element cluster.
[0127] In some implementations, when existing service data arrives at the fourth network element, since no new session information is found in the local cache, the fourth network element will initiate a new session process and send a session query request to the first network element. If the first network element finds that a session already exists locally, it will synchronize the session to the fourth network element. After receiving the session, the fourth network element will cache the session locally, so that it can guide the existing service traffic to be forwarded to the backend real server according to the session.
[0128] In the technical solution of this application embodiment, the first network element sends first information to the second network element, the first information being used to request the second network element to start session migration; and receives second information sent by the second network element, the second information being used to confirm the start of session migration to the first network element; and receives third information sent by the second network element, the third information including a User Datagram Protocol (UDP) packet carrying the session; wherein, the first information includes the network address and instance identifier of the first network element, or the first information includes the network address and full migration identifier of the first network element; the type of session migration is instance migration or full migration. Thus, in the two-layer separation architecture of fast and slow path network elements, the first network element (destination end) triggers the second network element (source end) to start session migration through a message. By encapsulating and transmitting session information using UDP packets between the destination end and the source end, and combining the support for session migration methods at two granularities, instance migration and full migration, flexible session migration by instance or full migration is achieved, while reducing network load and performance loss, and ensuring service continuity and stability during instance session migration.
[0129] This application also proposes a session migration method, which is applied to a second network element, specifically, the second network element is the SP network element (main SP network element) in the source cluster. Figure 8 This is a flowchart illustrating another session migration method provided in an embodiment of this application, as shown below. Figure 8 As shown, the method includes the following steps:
[0130] Step 801: Receive the first information sent by the first network element. The first information is used to request the second network element to start the session migration.
[0131] The first information includes the network address and instance identifier of the first network element, and the session migration type is instance migration; or, the first information includes the network address and full migration identifier of the first network element, and the session migration type is full migration.
[0132] In this embodiment of the application, the second network element receives session migration request information (first information) sent by the first network element. The request information includes the network address and instance identifier of the first network element, or the network address and full migration identifier of the first network element. The instance identifier specifically refers to the VNF instance identifier, and the network address of the first network element specifically refers to the IP address of the main SP network element in the destination cluster.
[0133] In some implementations, prior to step 801, the method further includes:
[0134] Receive the fourth information sent by the first network element, which is used to request the network address of the second network element;
[0135] Send the fifth information to the first network element, the fifth information including the network address of the second network element;
[0136] Receive the sixth message sent by the network element controller. The sixth message is used to instruct the second network element to enable the session migration function.
[0137] Here, before receiving the session migration request information sent by the first network element, the second network element will also receive the request information (fourth information) sent by the first network element to obtain the network address of the second network element. After the second network element returns the network address of the second network element to the first network element, the second network element will receive the session migration enable command (sixth information) sent by the network element controller, that is, instruct the second network element to enable the session migration function, so that the second network element can subsequently receive the session migration request information sent by the first network element.
[0138] Step 802: Send the second information to the first network element. The second information is used to confirm the start of session migration to the first network element.
[0139] In this embodiment, after receiving the session migration request information sent by the first network element, the second network element saves the information carried in the session migration request information, namely the network address and instance identifier of the first network element, or the network address and full migration identifier of the first network element, to the session migration management linked list node. Then, the second network element queries the ARP cache based on the network address of the first network element. If the ARP cache is not found, the second network element sends an ARP request to the first network element, that is, requests to obtain the physical address corresponding to the network address of the first network element. If the ARP cache is found or the physical address corresponding to the network address of the first network element is received after sending the ARP request, the second network element marks the link as reachable in the session synchronization management structure and sends confirmation information to start session migration (second information) to the first network element.
[0140] In some implementations, prior to step 802, the method further includes:
[0141] Save the network address and instance identifier of the first network element to the session migration management linked list node; or save the network address and full migration identifier of the first network element to the session migration management linked list node.
[0142] If multiple instances need to migrate sessions simultaneously, additional session migration management list nodes for other instances can be added to the session migration management list.
[0143] In some embodiments, the above method further includes:
[0144] If the address mapping table is consulted based on the network address of the first network element, and it is determined that the physical address corresponding to the network address of the first network element exists in the address mapping table, then the second information is sent to the first network element; or,
[0145] If it is determined that the address mapping table does not contain the physical address corresponding to the network address of the first network element, then request the first network element to obtain the physical address corresponding to the network address of the first network element.
[0146] The physical address corresponding to the network address of the first network element that receives the data sent by the first network element;
[0147] Send the second message to the first network element.
[0148] Here, the second network element queries the ARP cache based on the network address of the first network element, i.e., queries the address mapping table. If the physical address corresponding to the network address of the first network element is found in the address mapping table, the second network element directly sends a confirmation message to the first network element to start the session migration (second information) and marks the link as reachable in the session synchronization management structure. If the physical address corresponding to the network address of the first network element is not found in the address mapping table, the second network element requests the first network element to obtain the physical address corresponding to the network address of the first network element (fifteenth information). After receiving the physical address corresponding to the network address of the first network element returned by the first network element (sixteenth information), the second network element sends a confirmation message to the first network element to start the session migration (second information) and marks the link as reachable in the session synchronization management structure.
[0149] Step 803: Select one or more sessions that meet the preset conditions from the session cache list, and encapsulate one or more sessions to obtain UDP packets carrying the sessions.
[0150] In this embodiment of the application, after the second network element sends confirmation information to the first network element to start session migration, the second network element starts to migrate the session to the first network element. This includes traversing the session cache list of the corresponding instance according to the session migration type, selecting one or more sessions that meet the preset conditions from the session cache list, assembling one or more sessions into message data, and encapsulating the message data with a session synchronization control header, a UDP header, and a network layer header to obtain a UDP message carrying the session.
[0151] The number of sessions carried in each UDP packet is determined by the session size and packet length. In one implementation, to avoid UDP packet fragmentation, the maximum length of a UDP packet on the link can be controlled to not exceed a preset length (e.g., 1500 bytes); furthermore, the number of UDP packets sent each time can be configured via commands. Adjusting the number of sessions carried in a UDP packet and the number of UDP packets sent each time via commands allows control over the impact on SP network element performance.
[0152] It should be noted that when there are many sessions, multiple polling operations are required to migrate the sessions until all sessions have been migrated.
[0153] In some implementations, step 803, "selecting one or more sessions that meet preset conditions from the session cache list," specifically includes:
[0154] If the session migration is an instance migration, then traverse the session cache list corresponding to one or more instances and select one or more long-term sessions that meet the preset conditions; or,
[0155] If the session migration is a full migration, then traverse the full session cache list and select one or more long-term sessions that meet the preset conditions.
[0156] Here, if the session migration type is instance migration, the second network element traverses the session cache linked lists corresponding to one or more instances and selects one or more long-term sessions that meet preset conditions from the session cache linked lists of one or more instances; if the session migration type is full migration, the second network element traverses the full session cache table, that is, traverses the session cache linked lists corresponding to all instances and selects one or more long-term sessions that meet preset conditions from the session cache linked lists corresponding to all instances. The purpose of selecting long-term sessions is to reduce network load.
[0157] In some implementations, step 803, "encapsulating one or more sessions to obtain a UDP packet carrying the session," specifically includes:
[0158] One or more long-lived sessions are assembled to obtain message data;
[0159] Encapsulate the message data with a session synchronization control header, a UDP header, and a network layer header to obtain a UDP message carrying the session.
[0160] Here, the second network element assembles one or more long-lived sessions that meet preset conditions to obtain message data. Then, it encapsulates the message data with a session synchronization control header, a UDP header, and a network layer header, thus obtaining a UDP message carrying the session. The session synchronization control header includes information such as instance identifier and session thread identifier; the UDP header includes source port number and destination port number, where the source port number corresponds to the port number of the source network element cluster, and the destination port number corresponds to the port number of the destination network element cluster; the network layer header includes source network address and destination network address, where the source network address is the network address of the second network element, and the destination network address is the network address of the first network element.
[0161] Step 804: Send third information to the first network element. The third information includes a UDP packet carrying the session.
[0162] In some embodiments, the above method further includes:
[0163] Receive the eleventh message sent by the first network element. The eleventh message is used to request the second network element to terminate the session migration.
[0164] Send the twelfth message to the first network element. The twelfth message is used to confirm the termination of the session migration to the first network element.
[0165] Here, during the session migration process, the network element controller can send a session migration termination command to the primary SP network element in the destination network element cluster at any time to instruct the first network element to terminate the session migration. After the first network element receives the session migration termination command sent by the network element controller, the second network element will receive the session migration termination request information sent by the first network element (eleventh information). After receiving the session migration termination request information, the second network element stops executing the session migration and returns a confirmation of the termination of the session migration information to the first network element (twelfth information).
[0166] In some embodiments, the above method further includes:
[0167] Send the thirteenth message to the first network element. The thirteenth message is used to notify the first network element that the session migration is complete.
[0168] Here, after migrating all sessions, the second network element will send session migration completion information (the thirteenth message) to the first network element to notify the first network element that all required session migrations have been completed. Then, the first network element will send session migration completion information to the network element controller to notify the network element controller that session migration has been completed. At this point, the session migration phase ends.
[0169] In some implementations, after the session migration phase ends, the network element controller sends an instance deletion command to the second network element. After receiving the instance deletion command from the network element controller, the second network element deletes the instance configuration information, session cache information, and port network resource configuration information. After deleting all configuration information, the second network element returns a message indicating successful instance deletion to the network element controller.
[0170] In the technical solution of this application embodiment, the second network element receives first information sent by the first network element, the first information being used to request the second network element to start session migration; and sends second information to the first network element, the second information being used to confirm the start of session migration; then selects one or more sessions that meet preset conditions from the session cache list, and encapsulates one or more sessions to obtain UDP packets carrying the sessions; finally, sends third information to the first network element, the third information including UDP packets carrying the sessions; wherein, the first information includes the network address and instance identifier of the first network element, or the first information includes the network address and full migration identifier of the first network element; the type of session migration is instance migration or full migration. Thus, in the two-layer separation architecture of fast and slow path network elements, the first network element (destination end) triggers the second network element (source end) to start session migration through a message. By using UDP packets to encapsulate and transmit session information between the destination end and the source end, and combining the support for session migration methods of two granularities, instance migration and full migration, flexible session migration by instance or full migration is realized, while reducing network load and performance loss, and ensuring business continuity and stability during instance session migration.
[0171] In a two-layer architecture separating fast and slow path network elements, the SP network element is mainly responsible for session management rather than traffic forwarding, and does not require a design that separates the forwarding core and the synchronization core. For example... Figure 9 The diagram shown is a schematic of the working thread for session migration provided in this application embodiment. By merging the forwarding core and synchronization core in the SP network element into a worker core, the worker core is used for session synchronization. The impact of session synchronization on session management performance is reduced by controlling the size and number of synchronization messages, while also avoiding the performance loss caused by excessive inter-core communication in the SP network element.
[0172] This application proposes an NFV network element session migration method based on a SFC network element cascading scenario in cloud network NFV, namely a two-layer separation architecture of fast and slow path network elements. The underlying layer of the network element uses the run-to-completion model of DPDK, with threads exclusively occupying CPU cores and processing packets in a polling manner.
[0173] In the NFV network element session migration method of this application, a session management optimization method is also proposed. This method involves adding a separate instance session cache for each worker core. This cache stores session indexes by instance, meaning sessions for different instances are linked in their respective instance's linked list. Sessions are processed when a new session is created. Figure 10 The diagram illustrates an instance session cache provided in an embodiment of this application. This method avoids session filtering of instances only when session migration is enabled, improving migration efficiency and reducing the performance impact of session filtering. Furthermore, in a preferred method, the session cache only stores long-term session tables, because short-term session tables have short aging times, have minimal impact on services, and can also reduce network pressure.
[0174] Figure 11 This is a flowchart illustrating an NFV network element session migration method provided in an embodiment of this application, as shown below. Figure 11 As shown, the method includes the following steps:
[0175] Step 1101: The network element controller sends VNF instance configuration information to the main SP network element in network element cluster 2 to realize VNF instance configuration migration.
[0176] Step 1102: The main SP network element in network element cluster 2 sends the VNF instance configuration information to each SP network element and FP network element in network element cluster 2.
[0177] Step 1103: The primary SP network element in network element cluster 2 returns a VNF instance configuration migration success message to the network element controller.
[0178] The network element controller sends the VNF instance configuration information to the main SP network element in network element cluster 2. The main SP network element in network element cluster 2 then sends the VNF instance configuration information to each SP network element and FP network element in network element cluster 2, thereby synchronizing the VNF instance configuration in network element cluster 1 to the instance configuration in network element cluster 2.
[0179] After completing the migration of all VNF instance configurations, the primary SP network element in network element cluster 2 returns a successful VNF instance configuration migration message to the network element controller.
[0180] Step 1104: The SP network element in network element cluster 2 sends an ARP request to the SP network element in network element cluster 1.
[0181] Step 1105: The SP network element in network element cluster 1 returns an ARP response message to the SP network element in network element cluster 2.
[0182] After the VNF instance configuration synchronization is completed in network element cluster 2, the primary SP network element in network element cluster 2 actively sends an ARP request for the IP to the primary SP network element in network element cluster 1. After receiving the ARP response message returned by the primary SP network element in network element cluster 1, a cross-cluster reachable link between the two SP network elements is established, and the reachability of the link is marked in the session synchronization management structure.
[0183] Step 1106: The network element controller simultaneously issues instance session migration enable commands to each SP network element in network element cluster 1 and network element cluster 2.
[0184] The network element controller issues instance session migration enable commands to each SP network element in network element cluster 1 and network element cluster 2. Specifically, the SP network elements in network element cluster 1 and network element cluster 2 register the planned UDP port numbers to the L4 port that the SP network elements are listening on.
[0185] Step 1107: The network element controller sends a session migration start command to the master SP network element in network element cluster 2.
[0186] Step 1108: The primary SP network element in network element cluster 2 sends a session migration request message to the primary SP network element in network element cluster 1.
[0187] Step 1109: The main SP network element in network element cluster 1 saves the information carried in the session migration request message to the session migration management linked list node and queries the ARP cache.
[0188] Step 1110: The primary SP network element in network element cluster 1 replies to the primary SP network element in network element cluster 2 with a session migration start ACK message.
[0189] After receiving a session migration request message, the primary SP network element in network element cluster 1 saves the information carried in the request message, such as the instance ID, full migration flag, and the IP address of the primary SP network element in network element cluster 2, to the session migration management linked list node in the main thread. If multiple instances need to migrate sessions simultaneously, the session migration management nodes of other instances are appended to the session migration management linked list.
[0190] After the session migration node of the instance is created, the primary SP network element in network element cluster 1 queries the ARP cache based on the IP of the primary SP network element in network element cluster 2. If it is not found, it initiates an ARP request for the IP to the primary SP network element in network element cluster 2. If the ARP cache is found or an ARP response message is received after sending the ARP request, it marks the link as reachable in the session synchronization management structure and replies with a session migration start ACK message to the primary SP network element in network element cluster 2.
[0191] Step 1111: The primary SP network element in network element cluster 1 begins to perform session migration to the primary SP network element in network element cluster 2.
[0192] The main SP network element in network element cluster 1 starts migrating sessions to the main SP network element in network element cluster 2. If it is a full session migration, the session cache linked list of all instances is traversed, the long-term sessions that meet the conditions are retrieved, and they are assembled into TLV data. If it is a single instance migration, the session cache linked list of the corresponding instance is traversed, the long-term sessions that meet the conditions are retrieved, and they are assembled into TLV data.
[0193] The number of sessions carried in each synchronization message is determined by the size of each session and the length of the synchronization message. Preferably, to avoid synchronization message fragmentation, the maximum length of the synchronization message on the link is controlled to not exceed 1500 bytes; the number of synchronization messages sent each time can be configured via commands. When there are many sessions, multiple polling operations are required for session migration until all sessions have been migrated.
[0194] In network element cluster 1, the primary SP network element encapsulates the TLV data with a session synchronization control header to form a session migration data packet. The control header includes information such as the instance ID and the thread ID of the session. Then, it encapsulates the session migration data packet with a UDP header, which includes the source port number and the destination port number. The source port number and the destination port number are the agreed-upon session migration port numbers. Finally, it encapsulates the session migration data packet with an IP header to form a UDP packet carrying the session. The IP header includes the source IP and the destination IP. The source IP is the IP of the primary SP network element in network element cluster 1, and the destination IP is the IP of the primary SP network element in network element cluster 2. The UDP packet carrying the session is then sent out through the inner-port.
[0195] Step 1112: The primary SP network element in network element cluster 2 receives the session migration message sent by the primary SP network element in network element cluster 1 and parses the session migration message.
[0196] After receiving a UDP packet carrying a session, the main SP network element in network element cluster 2, if it recognizes that the destination port number contained in the UDP header of the UDP packet carrying the session is the agreed session migration port number, then it parses the session synchronization control header in the UDP packet carrying the session, obtains the thread ID of the session, and then performs inter-core synchronization based on the thread ID, synchronizing to the corresponding worker core.
[0197] Then, the primary SP network element in network element cluster 2 processes the TLV data in the UDP packet carrying the session on the corresponding worker core, parses it to obtain the session information, and copies the session information to the newly created session to obtain the new session information. At this time, the primary SP network element in network element cluster 2 does not actively synchronize the new session information to the FP network element, but waits for the FP network element to send a session query request to it. At the same time, the primary SP network element in network element cluster 2 sends the new session information to the backup SP network element in network element cluster 2 through the sync-port interface via the HA mechanism to achieve session synchronization between the primary and backup SP network elements.
[0198] Step 1113: The network element controller sends a session termination migration command to the primary SP network element in network element cluster 2.
[0199] Step 1114: The primary SP network element in network element cluster 2 sends a session migration termination request message to the primary SP network element in network element cluster 1.
[0200] Step 1115: The primary SP network element in network element cluster 1 returns a session migration termination ACK message to the primary SP network element in network element cluster 2.
[0201] During the session migration process, the network element controller can issue a session migration termination command to the master SP network element in network element cluster 2 at any time. After receiving the session migration termination command, the master SP network element in network element cluster 2 sends a session migration termination request message to the master SP network element in network element cluster 1. After receiving the session migration termination request message, the master SP network element in network element cluster 1 stops executing the session migration and replies with a session migration termination ACK message to the master SP network element in network element cluster 2.
[0202] After the session migration is terminated, the network element controller can send a session migration start command to the master SP network element in network element cluster 2 again. After receiving the session migration start command, the master SP network element in network element cluster 2 repeats the above steps 1106-1110 until the master SP network element in network element cluster 1 completes all session migration to the master SP network element in network element cluster 2.
[0203] Step 1116: The primary SP network element in network element cluster 1 sends a session migration complete message to the primary SP network element in network element cluster 2.
[0204] After the primary SP network element in network element cluster 1 has migrated all sessions, it sends a session migration completion message to the primary SP network element in network element cluster 2.
[0205] Step 1117: The primary SP network element in network element cluster 2 returns session migration completion information to the network element controller.
[0206] Once the primary SP network element in network element cluster 2 returns session migration completion information to the network element controller, it proves that the session migration phase has ended.
[0207] Step 1118: The network element controller issues a flow switching operation.
[0208] After receiving the session migration completion message from the primary SP network element in network element cluster 2, the network element controller issues a flow switching operation to switch the instance traffic from the FP network element in network element cluster 1 to the FP network element in network element cluster 2.
[0209] When existing service data packets arrive at the FP network element in network element cluster 2, since no new session information is found in the local cache, the FP network element in network element cluster 2 will initiate a new session process and send a session query request to the master SP network element in network element cluster 2. If the master SP network element in network element cluster 2 finds that a session already exists locally, it will synchronize the session to the FP network element, which will then cache the session locally. Based on this session, the existing service traffic will be forwarded to the backend real server.
[0210] Step 1119: The network element controller issues an instance deletion command to the SP network element in network element cluster 1.
[0211] Step 1120: Clear the NAT sessions of the SP and FP network elements in network element cluster 1 and delete the instance resources.
[0212] After the flow switching is successful, the network element controller sends an instance deletion command to the management interface of the SP and FP network elements in network element cluster 1. Each network element deletes and reclaims the VNF1 instance configuration, session cache, and sub-port network resource configuration.
[0213] Step 1121: The SP network element in network element cluster 1 replies to the network element controller with a configuration deletion success message.
[0214] Thus, steps 1101-1119 above have completed the network element session migration in the NFV fast and slow path SFC network element cascading scenario, ensuring service continuity during instance migration. In summary, the above steps have the following characteristics and advantages:
[0215] (1) It supports session migration at both instance and full granularity, and supports simultaneous migration of multiple instance sessions. When multiple instance sessions are migrated simultaneously, the destination SP network element (such as the main SP network element in cluster 2) can be in the same cluster or in a different cluster.
[0216] (2) The start and stop of session migration of the source cluster SP network element (SP network element in cluster 1) are both triggered by messages sent by the destination cluster SP network element (SP network element in cluster 2), which verifies the link reachability between the SP network elements of the two clusters.
[0217] (3) FP network elements do not participate in session migration, that is, the inner-ports of SP network elements in cluster 1 and SP network elements in cluster 2 are interconnected.
[0218] (4) Only the primary SP network elements in the two clusters participate in session migration, while the backup SP network elements in the clusters passively receive HA session synchronization messages sent by the primary SP network elements. Only long-term sessions are migrated to reduce network load.
[0219] (5) The main SP network elements in cluster 1 and cluster 2 encapsulate session migration information through UDP packets and agree on a fixed UDP source port number as the session migration listening port, and use the port number to identify the session migration packets.
[0220] (6) Supports scenarios where the number of worker cores of SP network elements in cluster 1 and SP network elements in cluster 2 are different. When synchronizing the sessions of gateways with different worker core configurations, the worker thread ID is obtained by hashing the source IP in the session.
[0221] (7) When creating a new session, the session cache is stored according to the VNF instance to which it belongs.
[0222] (8) Only worker cores are used for session migration of NFV network elements in two clusters to reduce the performance loss caused by inter-core communication.
[0223] (9) SP network elements include, but are not limited to, NAT gateway SP network elements, SLB SP network elements and VPN SP network elements.
[0224] (8) The impact on the performance of SP network elements can be controlled by adjusting the number of sessions carried in each session migration message and the number of session migration messages sent each time via the command line.
[0225] This application also proposes a session migration device, which is applied to a first network element, specifically, the first network element is the SP network element (main SP network element) in the destination cluster. Figure 12 This is a schematic diagram of the structure of a session migration device provided in an embodiment of this application, as shown below. Figure 12 As shown, the device includes:
[0226] The first sending unit 1201 is used to send first information to the second network element. The first information is used to request the second network element to start a session migration. The first information includes the network address and instance identifier of the first network element, and the type of session migration is instance migration. Alternatively, the first information includes the network address and full migration identifier of the first network element, and the type of session migration is full migration.
[0227] The first receiving unit 1202 is used to receive second information sent by the second network element, the second information being used to confirm the start of session migration to the first network element; and to receive third information sent by the second network element, the third information including a UDP packet carrying the session.
[0228] In some implementations, the first sending unit 1201 is further configured to send fourth information to the second network element, the fourth information being used to request the second network element to obtain the physical address corresponding to the network address of the second network element;
[0229] In some implementations, the first receiving unit 1202 is further configured to receive fifth information sent by the second network element, the fifth information including the physical address corresponding to the network address of the second network element.
[0230] In some implementations, the first receiving unit 1202 is further configured to receive a sixth message sent by the network element controller, the sixth message being used to instruct the first network element to enable the session migration function; and to receive a seventh message sent by the network element controller, the seventh message being used to instruct the first network element to start the session migration.
[0231] In some implementations, the first receiving unit 1202 is also used to receive eighth information sent by the network element controller, the eighth information including instance configuration information.
[0232] In some implementations, the first sending unit 1201 is further configured to send a ninth message to the network element controller, the ninth message being used to notify the network element controller that the instance configuration migration is complete.
[0233] The UDP message carrying the session includes a session synchronization control header and a UDP header.
[0234] In some embodiments, the apparatus further includes: a first processing unit; wherein,
[0235] The first processing unit is used to parse the session synchronization control header to obtain the thread identifier of the session if the target port number in the UDP header is identified as the session migration port number; and to perform inter-core synchronization on the UDP packets carrying the session based on the thread identifier, so as to synchronize the UDP packets carrying the session to the target processing core.
[0236] The UDP packets carrying the session also include packet data.
[0237] In some implementations, the first processing unit is further configured to parse the packet data on the target processing core to obtain session information; copy the session information to a new session to obtain new session information; and send the new session information to the third network element.
[0238] In some implementations, the first receiving unit 1202 is further configured to receive tenth information sent by the network element controller, the tenth information being used to instruct the first network element to terminate the session migration.
[0239] In some implementations, the first sending unit 1201 is further configured to send eleventh information to the second network element, the eleventh information being used to request the second network element to terminate the session migration.
[0240] In some implementations, the first receiving unit 1202 is further configured to receive a twelfth message sent by the second network element, the twelfth message being used to confirm the termination of session migration to the first network element.
[0241] In some implementations, the first receiving unit 1202 is also used to receive the thirteenth information sent by the second network element, the thirteenth information being used to notify the first network element that the session migration has been completed.
[0242] In some implementations, the first sending unit 1201 is further configured to send fourteenth information to the network element controller, the fourteenth information being used to notify the network element controller of the completion of session migration.
[0243] This application also proposes a session migration device, which is applied to a second network element, specifically, the second network element is the SP network element (main SP network element) in the source cluster. Figure 13 This is a schematic diagram of another session migration device provided in an embodiment of this application, as shown below. Figure 13 As shown, the device includes:
[0244] The second receiving unit 1301 is used to receive first information sent by the first network element. The first information is used to request the second network element to start a session migration. The first information includes the network address and instance identifier of the first network element, and the type of session migration is instance migration. Alternatively, the first information includes the network address and full migration identifier of the first network element, and the type of session migration is full migration.
[0245] The second sending unit 1302 is used to send second information to the first network element, and the second information is used to confirm the start of session migration to the first network element.
[0246] The second processing unit 1303 is used to select one or more sessions that meet preset conditions from the session cache linked list, and encapsulate one or more sessions to obtain UDP packets carrying the sessions.
[0247] The second sending unit 1302 is also used to send third information to the first network element, the third information including a UDP packet carrying a session.
[0248] In some implementations, the second receiving unit 1301 is further configured to receive fourth information sent by the first network element, the fourth information being used to request the network address of the second network element.
[0249] In some implementations, the second sending unit 1302 is further configured to send fifth information to the first network element, the fifth information including the network address of the second network element.
[0250] In some implementations, the second receiving unit 1301 is also used to receive a sixth message sent by the network element controller, the sixth message being used to instruct the second network element to enable the session migration function.
[0251] In some implementations, the second processing unit 1303 is further configured to save the network address and instance identifier of the first network element to the session migration management linked list node; or, save the network address and full migration identifier of the first network element to the session migration management linked list node.
[0252] In some implementations, the second processing unit 1303 is also used to query the address mapping table based on the network address of the first network element.
[0253] In some implementations, the second sending unit 1302 is specifically used to send second information to the first network element if it is determined that there is a physical address corresponding to the network address of the first network element in the address mapping table.
[0254] In some implementations, the second sending unit 1302 is further configured to request the physical address corresponding to the network address of the first network element from the first network element if it is determined that the address mapping table does not contain a physical address corresponding to the network address of the first network element.
[0255] In some implementations, the second receiving unit 1301 is also used to receive the physical address corresponding to the network address of the first network element sent by the first network element.
[0256] In some implementations, the second processing unit 1303 is specifically used to: if the session migration is an instance migration, traverse the session cache list corresponding to one or more instances and select one or more long-term sessions that meet preset conditions; or if the session migration is a full migration, traverse the full session cache list and select one or more long-term sessions that meet preset conditions.
[0257] In some implementations, the second processing unit 1303 is further configured to assemble one or more long-term sessions to obtain message data; and to encapsulate the message data with a session synchronization control header, a UDP header, and a network layer header to obtain a UDP message carrying the session.
[0258] In some implementations, the second receiving unit 1301 is further configured to receive eleventh information sent by the first network element, the eleventh information being used to request the second network element to terminate the session migration.
[0259] In some implementations, the second sending unit 1302 is further configured to send a twelfth message to the first network element, the twelfth message being used to confirm the termination of session migration to the first network element.
[0260] In some implementations, the second sending unit 1302 is also used to send thirteenth information to the first network element, the thirteenth information being used to notify the first network element that the session migration has been completed.
[0261] Those skilled in the art should understand that Figure 12 , Figure 13 The functions of each unit in the session migration device shown can be understood by referring to the relevant description of the aforementioned method. Figure 12 , Figure 13 The functions of each unit in the session migration device shown can be implemented by a program running on a processor or by specific logic circuits.
[0262] Figure 14 This is a schematic diagram of the structure of the communication device provided in an embodiment of this application. The communication device may be a terminal device or a network device. Figure 14 The communication device shown includes a processor 1401, which can call and run computer programs from memory to implement the methods in the embodiments of this application.
[0263] Optionally, such as Figure 14 As shown, the communication device may further include a memory 1402. The processor 1401 can retrieve and run computer programs from the memory 1402 to implement the methods described in this embodiment.
[0264] The memory 1402 can be a separate device independent of the processor 1401, or it can be integrated into the processor 1401.
[0265] Optionally, such as Figure 14 As shown, the communication device may also include a transceiver 1403, and the processor 1401 may control the transceiver 1403 to communicate with other devices. Specifically, it may send information or data to other devices or receive information or data sent by other devices.
[0266] The transceiver 1403 may include a transmitter and a receiver. The transceiver 1403 may further include an antenna, and the number of antennas may be one or more.
[0267] The communication device may specifically be the session migration device of this application embodiment, and the communication device can implement the corresponding processes of the various methods implemented in this application embodiment. For the sake of brevity, it will not be described in detail here.
[0268] It should be understood that the processor in the embodiments of this application may be an integrated circuit chip with signal processing capabilities. In implementation, the steps of the above method embodiments can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor described above can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute 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 the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.
[0269] It is understood that the memory in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct Rambus RAM (DR RAM). It should be noted that the memory used in the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0270] This application also provides a computer-readable storage medium for storing a computer program. This computer-readable storage medium can be applied to the communication device in this application embodiment, and the computer program causes the computer to execute the corresponding processes of the various methods implemented in this application embodiment; for brevity, these will not be elaborated further here.
[0271] This application also provides a computer program product, including computer program instructions. This computer program product can be applied to the communication device in this application embodiment, and the computer program instructions cause the computer to execute the corresponding processes implemented by the various methods in this application embodiment; for brevity, these will not be elaborated further here.
[0272] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0273] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0274] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0275] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0276] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0277] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0278] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A session migration method, characterized in that, Applied to the first network element, the method includes: Sending first information to the second network element, the first information being used to request the second network element to start session migration; the first information includes the network address and instance identifier of the first network element, and the type of session migration is instance migration; or, the first information includes the network address and full migration identifier of the first network element, and the type of session migration is full migration; wherein, the first network element is the slow path SP network element of the destination cluster in the Network Function Virtualization (NFV) architecture, and the second network element is the source cluster SP network element in the NFV architecture; the SP network element is responsible for session management, and the fast path FP network element is responsible for traffic forwarding, and the SP network element and the FP network element constitute a two-layer separation architecture of fast and slow path network elements; The system receives second information sent by the second network element, which is used to confirm the start of the session migration to the first network element; the second information includes a migration confirmation flag and an instance identifier or a full migration flag. The system receives third information sent by the second network element, the third information including a User Datagram Protocol (UDP) packet carrying a session; wherein, after the second information is sent by the second network element to the first network element, the second network element selects one or more sessions that meet preset conditions from the session cache list and encapsulates the one or more sessions.
2. The method according to claim 1, characterized in that, Before sending the first information to the second network element, the method further includes: Send a fourth message to the second network element, the fourth message being used to request the second network element to obtain the physical address corresponding to the network address of the second network element; The system receives a fifth message sent by the second network element, the fifth message including the physical address corresponding to the network address of the second network element.
3. The method according to claim 2, characterized in that, The method further includes: The first network element receives a sixth message sent by the network element controller, the sixth message being used to instruct the first network element to enable the session migration function; The network element receives a seventh message sent by the network element controller, the seventh message being used to instruct the first network element to start a session migration.
4. The method according to claim 2, characterized in that, Before sending the fourth information to the second network element, the method further includes: Receive the eighth message sent by the network element controller, the eighth message including instance configuration information; A ninth message is sent to the network element controller, which is used to notify the network element controller that the instance configuration migration is complete.
5. The method according to claim 1, characterized in that, The UDP message carrying the session includes a session synchronization control header and a UDP header; the method further includes: If the target port number in the UDP header is identified as the session migration port number, the session synchronization control header is parsed to obtain the thread identifier of the session. Based on the thread identifier, the UDP packets carrying the session are synchronized between cores, and the UDP packets carrying the session are synchronized to the target processing core.
6. The method according to claim 5, characterized in that, The UDP packet carrying the session also includes packet data; the method further includes: The message data is parsed on the target processing core to obtain session information; Copy the session information to the new session to obtain the new session information; Send the newly established session information to the third network element.
7. The method according to any one of claims 1 to 5, characterized in that, The method further includes: The first network element receives a tenth message sent by the network element controller, the tenth message being used to instruct the first network element to terminate the session migration; Send an eleventh message to the second network element, the eleventh message being used to request the second network element to terminate the session migration; The system receives a twelfth message sent by the second network element, the twelfth message being used to confirm the termination of the session migration to the first network element.
8. A session migration method, characterized in that, Applied to a second network element, the method includes: The system receives first information sent by a first network element, which is used to request a session migration to begin from a second network element. The first information includes the network address and instance identifier of the first network element, and the session migration type is instance migration. Alternatively, the first information includes the network address and full migration identifier of the first network element, and the session migration type is full migration. The first network element is the SP network element of the destination cluster in the Network Functions Virtualization (NFV) architecture, and the second network element is the SP network element of the source cluster in the NFV architecture. The SP network element is responsible for session management, and the fast path FP network element is responsible for traffic forwarding. The SP network element and the FP network element constitute a two-layer separation architecture of fast and slow path network elements. Send a second message to the first network element, the second message being used to confirm the start of the session migration to the first network element; the second message includes a migration confirmation flag and an instance identifier or a full migration flag. Select one or more sessions that meet the preset conditions from the session cache list, and encapsulate the one or more sessions to obtain a UDP packet carrying the session; Send third information to the first network element, the third information including a UDP packet carrying the session.
9. The method according to claim 8, characterized in that, Before receiving the first information sent by the first network element, the method further includes: The system receives a fourth message sent by the first network element, the fourth message being used to request the network address of the second network element from the second network element. Send fifth information to the first network element, the fifth information including the network address of the second network element; The network element receives a sixth message from the network element controller, which is used to instruct the second network element to enable the session migration function.
10. The method according to claim 8, characterized in that, Before sending the second information to the first network element, the method further includes: Save the network address of the first network element and the instance identifier to the session migration management linked list node; or, save the network address of the first network element and the full migration identifier to the session migration management linked list node.
11. The method according to claim 10, characterized in that, The method further includes: Based on the network address of the first network element, the address mapping table is queried. If it is determined that the physical address corresponding to the network address of the first network element exists in the address mapping table, then the second information is sent to the first network element; or... If it is determined that the address mapping table does not contain a physical address corresponding to the network address of the first network element, then a request is made to the first network element to obtain the physical address corresponding to the network address of the first network element. Receive the physical address corresponding to the network address of the first network element sent by the first network element; Send the second information to the first network element.
12. The method according to claim 11, characterized in that, The step of selecting one or more sessions that meet preset conditions from the session cache list includes: If the session migration is an instance migration, then traverse the session cache linked list corresponding to one or more instances and select one or more long-term sessions that meet the preset conditions; or, If the session migration is a full migration, then traverse the full session cache list and select one or more long-term sessions that meet the preset conditions.
13. The method according to claim 12, characterized in that, The step of encapsulating the one or more sessions to obtain a UDP packet carrying the session includes: The one or more long-term sessions are assembled to obtain message data; The message data is encapsulated with a session synchronization control header, a UDP header, and a network layer header to obtain the UDP message carrying the session.
14. A session migration device, characterized in that, Applied to the first network element, the device includes: A first sending unit is configured to send first information to a second network element, the first information being used to request the second network element to begin session migration; the first information includes the network address and instance identifier of the first network element, and the type of session migration is instance migration; or, the first information includes the network address and full migration identifier of the first network element, and the type of session migration is full migration; wherein, the first network element is the SP network element of the destination cluster in the Network Functions Virtualization (NFV) architecture, and the second network element is the SP network element of the source cluster in the NFV architecture; the SP network element is responsible for session management, and the fast path FP network element is responsible for traffic forwarding, the SP network element and the FP network element constitute a two-layer separation architecture of fast and slow path network elements; The first receiving unit is configured to receive second information sent by the second network element, the second information being used to confirm the start of the session migration to the first network element; the second information includes a migration confirmation flag and an instance identifier or a full migration flag; and to receive third information sent by the second network element, the third information including a User Datagram Protocol (UDP) packet carrying the session; wherein, after the second information is sent by the second network element to the first network element, the UDP packet carrying the session is obtained by the second network element selecting one or more sessions that meet preset conditions from the session cache list and encapsulating the one or more sessions.
15. A session migration device, characterized in that, Applied to a second network element, the device includes: The second receiving unit is used to receive first information sent by the first network element, the first information being used to request the second network element to start a session migration; the first information includes the network address and instance identifier of the first network element, and the type of the session migration is instance migration; or, the first information includes the network address and full migration identifier of the first network element, and the type of the session migration is full migration; wherein, the first network element is the SP network element of the destination cluster in the Network Functions Virtualization (NFV) architecture, and the second network element is the SP network element of the source cluster in the NFV architecture; the SP network element is responsible for session management, the fast path FP network element is responsible for traffic forwarding, and the SP network element and the FP network element constitute a two-layer separation architecture of fast and slow path network elements; The second sending unit is used to send second information to the first network element, the second information being used to confirm the start of the session migration to the first network element; the second information includes a migration confirmation flag and an instance identifier or a full migration flag. The second processing unit is used to select one or more sessions that meet preset conditions from the session cache linked list, and encapsulate the one or more sessions to obtain UDP packets carrying the sessions; The second sending unit is further configured to send third information to the first network element, the third information including a UDP packet carrying a session.
Citation Information
Patent Citations
Information synchronization method, equipment and storage medium, program product
CN107846476A
Session synchronization method and device, service node, terminal and readable storage medium
CN116760504A
Business migration method, device and equipment, readable storage medium and program product
CN119561973A