Data processing method and device, equipment, storage medium and computer program product
By receiving configuration information to detect port status and using BGP messages to manage VTEP addresses, the high availability problem of leased gateways in multi-service scenarios is solved, achieving high availability and mutual isolation of services, and ensuring the stability of data plane forwarding.
Patent Information
- Application Number
- CN202511351618.7
- 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 existing technologies, leased line gateways struggle to achieve high availability in various business scenarios, failing to effectively guarantee that services remain available in the face of unexpected situations or failures.
By receiving configuration information, detecting the port status corresponding to each service, and sending or withdrawing VTEP addresses using BGP messages, we ensure that services in normal status continue to transmit, while services in abnormal status are switched to the backup leased line gateway. We use multi-VTEP address technology to achieve high availability and mutual isolation of services.
It achieves high availability of dedicated line gateways in various business scenarios, avoids mutual interference between different services, and ensures the stability of data plane forwarding and the continuity of services.
Smart Images

Figure CN120856500B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a data processing method, apparatus, device, storage medium, and computer program product. Background Technology
[0002] A leased line gateway is a network device located at the boundary of the cloud network for leased line services. It connects the leased line customer network to the cloud network, providing high-speed, reliable cloud leased lines with independent channels. High availability of the leased line gateway aims to ensure that the services carried by the gateway remain available in the face of various unexpected situations or failures. In related technologies, the services carried by the leased line gateway can include multiple services; how to achieve high availability of the leased line gateway under various service scenarios is a pressing technical problem to be solved. Summary of the Invention
[0003] To address the related technical problems, embodiments of this application provide a data processing method, apparatus, device, storage medium, and computer program product.
[0004] The technical solution of this application embodiment is implemented as follows:
[0005] This application provides a data processing method, the method comprising:
[0006] Receive first configuration information, which is used to configure the Virtual Extensible Local Area Network Tunnel Endpoint (VTEP) address corresponding to each of the multiple services.
[0007] The port corresponding to each service is detected to obtain the status of the port corresponding to each service;
[0008] The VTEP address corresponding to the first service among the multiple services is sent to the corresponding computing node via BGP message. The first service represents the service whose corresponding port is in a normal state.
[0009] The sending of the VTEP address corresponding to the second service among the multiple services to the corresponding computing node via the BGP message is cancelled. The second service represents the service whose corresponding port is in an abnormal state.
[0010] In the above scheme, the VTEP address corresponding to each service includes: the IP addresses of the two VTEPs corresponding to each service and the prefix length of the IP addresses of the two VTEPs corresponding to each service, and the two VTEPs corresponding to each service are located at the first leased line gateway and the second leased line gateway, respectively.
[0011] In the above scheme, the detection of the port corresponding to each service includes:
[0012] The first probe message is sent to the corresponding access switch at the port corresponding to each service.
[0013] Receive the response message of the first probe message;
[0014] Calculate a first indicator for the port corresponding to each service based on the response message. The first indicator includes latency, packet loss rate, and jitter.
[0015] The status of the port corresponding to each service is determined based on the first indicator.
[0016] In the above scheme, determining the status of the port corresponding to each service based on the first indicator includes:
[0017] The first parameter is calculated based on the first indicator, wherein the first parameter is positively correlated with the sum of the first product, the second product and the third product, the first product is the product of the delay and the weight corresponding to the delay, the second product is the product of the packet loss rate and the weight corresponding to the packet loss rate, and the third product is the product of the jitter and the weight corresponding to the jitter.
[0018] If the first parameter is not less than the first threshold, it is determined that the corresponding port is in an abnormal state;
[0019] If the first parameter is less than the first threshold, the corresponding port is determined to be in a normal state.
[0020] In the above scheme, the first probe message is an Internet Control Message Protocol (ICMP) probe message.
[0021] In the above scheme, after sending the VTEP address corresponding to the first service among the multiple services to the corresponding computing node via BGP messages, the method further includes:
[0022] Receive a first service message of a first type of service sent by the corresponding computing node, wherein the outer destination IP of the first service message is determined according to the VTEP address corresponding to the first type of service.
[0023] In the above scheme, after receiving the first configuration information, the method further includes:
[0024] Receive the second service message for each of the services sent by the access switch;
[0025] The second service message of each service is encapsulated using Virtual Extensible Local Area Network (VXLAN) to obtain the third service message of each service, wherein the outer source IP of the third service message of each service is determined according to the VTEP address corresponding to each service.
[0026] Send the third service message for each of the aforementioned services to the corresponding computing nodes.
[0027] This application also provides a data processing apparatus, including:
[0028] The first receiving unit is used to receive first configuration information, which is used to configure the Virtual Extensible Local Area Network Tunnel Endpoint (VTEP) address corresponding to each of the multiple services.
[0029] The detection unit is used to detect the port corresponding to each service and obtain the status of the port corresponding to each service.
[0030] The first sending unit is used to send the VTEP address corresponding to the first service among the multiple services to the corresponding computing node through BGP messages. The first service represents the service whose corresponding port is in a normal state.
[0031] The cancellation unit is used to cancel the sending of the VTEP address corresponding to the second service among the multiple services to the corresponding computing node through the BGP message, wherein the second service represents the service whose corresponding port is in an abnormal state.
[0032] This application also provides an electronic device, including: a processor and a memory for storing a computer program capable of running on the processor.
[0033] The processor is used to execute the steps of any of the above-mentioned technical solutions when running the computer program.
[0034] This application also provides a storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above methods.
[0035] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above methods.
[0036] In this embodiment, first configuration information is received, which is used to configure the Virtual Extensible Local Area Network (VTEP) endpoint address corresponding to each of the multiple services. It is evident that in this embodiment, different types of services correspond to their respective VTEP addresses, thus the VTEPs corresponding to different types of services are different. The port corresponding to each service is detected to obtain the status of the port corresponding to each service. For the first service among these multiple services, i.e., the service whose corresponding port status is normal, the VTEP address corresponding to the first service is sent to the corresponding compute node via BGP messages. For the second service among these multiple services, i.e., the service whose corresponding port status is abnormal, the sending of the VTEP address corresponding to the second service to the corresponding compute node via BGP messages is stopped. Therefore, for services with abnormal port status, the leased gateway will be switched, and its data plane forwarding will not be affected, thereby achieving high availability of the service. Furthermore, in this embodiment, different services correspond to their respective VTEP addresses, realizing the expansion of multiple services. And because the VTEP addresses corresponding to different services are different, the high availability of different services can be isolated from each other, avoiding mutual interference between the high availability of different services. Attached Figure Description
[0037] Figure 1 An exemplary system architecture diagram is provided for application embodiments of this application;
[0038] Figure 2 A schematic flowchart illustrating the data processing method provided in the application embodiments of this application;
[0039] Figure 3 A schematic diagram of the port status detection process provided for an application embodiment of this application;
[0040] Figure 4 A flowchart illustrating Embodiment 1 provided for application of this application;
[0041] Figure 5 A flowchart illustrating Embodiment 2 provided for application of this application;
[0042] Figure 6 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;
[0043] Figure 7 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0044] 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.
[0045] It should be understood that the term "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, the term "one or more" in this document is an exemplary expression and can be replaced with any possible expression, such as one or more, at least one, or at least one item.
[0046] It should also be understood that the term "instruction" mentioned in the embodiments of this application can be a direct instruction, an indirect instruction, or an indication of a relationship. For example, A instructing B can mean that A directly instructs B, such as B being able to obtain information through A; it can also mean that A indirectly instructs B, such as A instructing C, so B can obtain information through C; or it can mean that there is a relationship between A and B.
[0047] It should also be understood that the term "correspondence" mentioned in the embodiments of this application may indicate a direct or indirect correspondence between the two, or an association between the two, or a relationship of instruction and being instructed, configuration and being configured, etc.
[0048] It should be noted that terms such as "first" and "second" are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0049] Furthermore, the technical solutions described in the embodiments of this application can be combined arbitrarily without conflict.
[0050] The system architecture in the embodiments of this application is described below:
[0051] Please see Figure 1 , Figure 1 This is a schematic diagram of an exemplary system architecture provided in this application. Figure 1 The system shown includes multiple computing nodes, leased gateway 1 and leased gateway 2, and multiple access switches.
[0052] Among them, leased line gateways (such as leased line gateway 1 and leased line gateway 2) refer to network devices located at the boundary of the cloud network for leased line services. They are used to connect the leased line customer network with the cloud network, providing high-speed, reliable cloud leased lines with independent channels to the cloud. The access switch and the leased line gateway are connected through the underlay network, and the leased line gateway and the compute node are connected through the overlay network, using Virtual Extensible Local Area Network (VXLAN) for packet encapsulation.
[0053] The high availability of leased line gateways aims to ensure that the services carried by the gateway remain available in the face of various unexpected situations or failures. In multiple service scenarios, leased line gateways must not only be compatible with multiple services, but also guarantee high availability across these diverse scenarios.
[0054] In related technologies, a pre-stored leased network address mapping relationship can be obtained. This mapping relationship includes a mapping between the Internet Protocol (IP) address and the translated IP address of a communication object. The communication object includes a first communication object or a second communication object, where the first communication object is a Virtual Private Cloud (VPC) and the second communication object is an Internet Data Center (IDC). A target translated IP address is configured for the communication object according to the leased network address mapping relationship. A communication connection is established between the VPC and the IDC based on the target translated IP address. This related technology can meet the leased line communication requirements between VPCs and IDCs.
[0055] The aforementioned related technologies focus on the simple implementation of leased line gateway functions and high availability, but do not support high availability solutions for leased line gateways in multiple service scenarios. Therefore, this application provides a solution that can achieve high availability of leased line gateways under various service scenarios.
[0056] In related technologies, it is possible to monitor whether a first device receives service data packets from a second device within a first preset time interval; the second device is a device connected to the first device; if no service data packets are received from the second device, a first detection packet is sent to the second device; if a reply packet is received from the second device based on the first detection packet, it is determined that the link between the first and second devices is normal; if no reply packet is received from the second device based on the first detection packet, it is determined that the link between the first and second devices is interrupted. This related technology is used in the link detection process.
[0057] In this embodiment, first configuration information is received, which is used to configure the VXLAN Tunnel Endpoint (VTEP) address corresponding to each of the multiple services. It is evident that in this embodiment, different types of services correspond to their respective VTEP addresses, thus the VTEPs corresponding to different types of services are different. The port corresponding to each service is detected to obtain the status of the port corresponding to each service. For the first service among these multiple services, i.e., the service whose corresponding port status is normal, the VTEP address corresponding to the first service is sent to the corresponding compute node via BGP messages. For the second service among these multiple services, i.e., the service whose corresponding port status is abnormal, the sending of the VTEP address corresponding to the second service to the corresponding compute node via BGP messages is stopped. Therefore, for services with abnormal port status, the leased gateway will be switched, and its data plane forwarding will not be affected, thereby achieving high availability of the service. Furthermore, in this embodiment, different services correspond to their respective VTEP addresses, realizing the expansion of multiple services. And because the VTEP addresses corresponding to different services are different, the high availability of different services can be isolated from each other, avoiding mutual interference between the high availability of different services.
[0058] The present application will now be described in further detail with reference to the accompanying drawings and embodiments.
[0059] This application provides a data processing method, see [link to relevant documentation] Figure 2 The method includes:
[0060] Step 201: Receive the first configuration information, which is used to configure the VTEP address corresponding to each of the various services.
[0061] For example, the VTEP addresses corresponding to different services are different.
[0062] For example, the aforementioned multiple services are services carried by the first leased line gateway and / or the second leased line gateway.
[0063] For example, the above-mentioned multiple services can be multiple leased line services.
[0064] For example, the VTEP addresses corresponding to the above-mentioned various services include VTEP addresses with different priorities. These VTEP addresses with different priorities are configured together during initialization and sent from the control plane to the data plane.
[0065] For example, the first leased line gateway receives a first instruction from the administrator, the first instruction including first configuration information, or the first instruction indicating the first configuration information, or the first instruction being used to instruct the configuration of the first configuration information.
[0066] For example, the first instruction could be an operation instruction from an administrator on the first leased line gateway or an instruction sent by an administrator to the first leased line gateway via a terminal.
[0067] For example, the second leased line gateway receives second configuration information, which is used to configure the VTEP address corresponding to each of the multiple services.
[0068] For example, in this embodiment of the application, the first leased line gateway and the second leased line gateway are a pair of leased line gateways. When the first leased line gateway is faulty, or the related link of the first leased line gateway is faulty, or the port of the first leased line gateway is in an abnormal state, the connection can be switched to the second leased line gateway; when the second leased line gateway is faulty, or the related link of the second leased line gateway is faulty, or the port of the second leased line gateway is in an abnormal state, the connection can be switched to the first leased line gateway.
[0069] In practical applications, the VTEP address corresponding to each service includes: the IP addresses of the two VTEPs corresponding to each service and the prefix length of the IP addresses of the two VTEPs corresponding to each service, wherein the two VTEPs corresponding to each service are located at the first leased line gateway and the second leased line gateway, respectively.
[0070] For example, the prefix length in this application embodiment is an exemplary statement and can be replaced with any possible statement, such as subnet mask bits, etc.
[0071] For example, in this embodiment of the application, the IP addresses of the two VTEPs corresponding to each service configured for the first leased line gateway are the same as the IP addresses of the two VTEPs corresponding to each service configured for the second leased line gateway, but the prefix length of the IP addresses of the two VTEPs corresponding to each service configured for the first leased line gateway is different from the prefix length of the IP addresses of the two VTEPs corresponding to each service configured for the second leased line gateway.
[0072] For example, different VTEP addresses have different priorities.
[0073] For example, VTEP address technology with different priorities can extend the high availability of different leased line services, such as extending the high availability of first-type services, second-type services, and third-type services. In this embodiment, two virtual VTEP addresses are allocated to each type of service carried by the leased line gateway. Furthermore, the high availability of different services is isolated from each other and does not affect each other. Taking first-type services, second-type services, and third-type services as examples, the virtual VTEP addresses allocated to these services are shown in the table below:
[0074]
[0075] To aid in understanding the table above, let's take the first type of service as an example. When configuring the VTEP address of the leased line gateway, two pairs of VTEP addresses with different prefix lengths are issued to a pair of leased line gateways. The first type of service configured on the first leased line gateway uses the Classless Inter-Domain route for the VTEP address. Routing (CIDR) format is represented as IP1 / M1, IP2 / M2. The CIDR format of the VTEP address corresponding to the first type of service configured for the second leased line gateway is represented as IP1 / M2, IP2 / M1. Where IP1 represents the IP address of the VTEP corresponding to the first type of service in the first leased line gateway, and IP2 represents the IP address of the VTEP corresponding to the first type of service in the second leased line gateway. For the first leased line gateway, M1 represents the prefix length of IP1, and M2 represents the prefix length of IP2. For the second leased line gateway, M2 represents the prefix length of IP1, and M1 represents the prefix length of IP2. 0 < M2 ≤ M1 ≤ 32, that is, the prefix lengths of IP1 and IP2 configured for the first leased line gateway are different from those configured for the second leased line gateway.
[0076] Step 202: Detect the port corresponding to each service and obtain the status of the port corresponding to each service.
[0077] For example, in this embodiment of the application, each service corresponds to a VTEP of the first leased line gateway, and each service corresponds to a VTEP of the second leased line gateway. Accordingly, in this embodiment of the application, each service corresponds to a port of the first leased line gateway, and each service corresponds to a port of the second leased line gateway. For example, the first type of service corresponds to port 1, and the second type of service corresponds to port 2.
[0078] It is understood that the embodiments of this application can detect the status of ports corresponding to different types of services separately, so that the detection results of the status of ports of different services are related and isolated and do not affect each other. For example, the detection result of the status of the port corresponding to the first type of service does not affect the detection result of the status of the port corresponding to the second type of service.
[0079] For example, the first leased line gateway and / or the second leased line gateway continuously monitor the port status and periodically check the port connectivity and availability. For instance, the first leased line gateway and / or the second leased line gateway can periodically check the port corresponding to each service to obtain the status of the port corresponding to each service.
[0080] In practical applications, the port corresponding to each service is detected, including: sending a first probe packet to the corresponding access switch from the port corresponding to each service; receiving a response packet of the first probe packet; calculating a first indicator of the port corresponding to each service based on the response packet, the first indicator including latency, packet loss rate and jitter; and determining the status of the port corresponding to each service based on the first indicator.
[0081] It should be noted that the "sending the first probe message to the corresponding access switch at the port corresponding to each service" in this application embodiment does not limit the sending of the first probe message directly to the corresponding access switch. That is, this application does not limit the next hop of the transmission path of the first probe message to the access switch. For example, the access switch can be the last hop or the end point of the transmission path of the first probe message. In this case, the next hop of the transmission path of the first probe message is other switches or other gateways, etc.
[0082] It should be noted that the phrase "detecting the port corresponding to each service" in this embodiment is an exemplary statement and can be replaced with any possible statement, such as detecting the link corresponding to each service.
[0083] It should be noted that, in the embodiments of this application, the first indicator is not limited to include only latency rate, packet loss rate and jitter, etc. The first indicator may also include other indicators, such as bandwidth utilization.
[0084] For example, the port corresponding to each service can be the physical port of the first leased line gateway and / or the second leased line gateway corresponding to each service.
[0085] In practical applications, the first probe message is an Internet Control Message Protocol (ICMP) probe message.
[0086] It should be noted that in related technologies, Bidirectional Forwarding Detection (BFD) is used as the primary means of port state detection. However, BFD cannot be used independently and needs to be used in conjunction with other routing protocols. When the peer does not support BFD, only single-arm BFD can be used. However, single-arm echo functionality is only suitable for single-hop BFD sessions and is not suitable for multi-hop scenarios. In contrast, this application uses ICMP probe packets for link detection. Compared to BFD, using ICMP probe packets has a wider range of applications and is compatible with more scenarios and more types of devices.
[0087] For example, when the first probe message is an ICMP probe message, the response message of the first probe message is an ICMP response message or an ICMP response.
[0088] For example, a first probe message is periodically sent to the corresponding access switch on the port corresponding to each service. For instance, the first leased line gateway and / or the second leased line gateway may send the first probe message every t1 on the port corresponding to each service.
[0089] For example, after receiving the first probe message, the access switch returns a response message to the first probe message.
[0090] For example, calculating the first indicator of the port corresponding to each service based on the response message includes: the first leased line gateway and / or the second leased line gateway calculating the first indicator of the port corresponding to each service based on local data and data in the response message.
[0091] For example, local data includes the timestamp of sending the first probe message and / or the number of first probe messages sent, etc.
[0092] The following explains how to calculate the first indicator:
[0093] For example, the delay value can be the difference between the time the response message is received and the time the first probe message is sent. When the first probe message is sent only once, the delay can be the delay value. When the first probe message is sent multiple times, the delay can be the average of the delay values corresponding to these multiple first probe messages. For example, the delay can be calculated using the following formula:
[0094]
[0095] Where D represents delay, The moment when the response message to the first probe message is received. The time of the response message after sending the first probe message.
[0096] For example, extract the time value for each ICMP response packet from the output of the Packet Internet Groper (ping). This time value is the latency value. Calculate the average of these latency values as the overall latency. For instance, find the Round-Trip Time (RTT) value for each ICMP response packet from the detailed information displayed after executing the ping command. This RTT value is the time value.
[0097] For example, the packet loss rate can be obtained by calculating the difference between the number of first probe packets sent and the number of response packets received, and then dividing it by the number of first probe packets sent. See the following formula for details:
[0098]
[0099] Where PL represents the packet loss rate. The number of the first probe messages sent. The number of response messages received.
[0100] For example, jitter is obtained by calculating the difference between two consecutive delay values and then averaging these differences.
[0101]
[0102] Where J represents jitter, t i This represents the delay value detected in the i-th instance. This represents the average delay value, and n represents the number of detections.
[0103] In practical applications, determining the status of the port corresponding to each service based on the first indicator includes: calculating a first parameter based on the first indicator, wherein the first parameter is positively correlated with the sum of a first product, a second product, and a third product; the first product is the product of the latency and the weight corresponding to the latency; the second product is the product of the packet loss rate and the weight corresponding to the packet loss rate; and the third product is the product of the jitter and the weight corresponding to the jitter. If the first parameter is not less than a first threshold, the corresponding port is determined to be in an abnormal state; if the first parameter is less than the first threshold, the corresponding port is determined to be in a normal state.
[0104] For example, by detecting the status of port 1 corresponding to the first type of service, the first indicator corresponding to port 1 is obtained, and the comprehensive link status C of the link between port 1 and the corresponding access switch can be calculated based on the first indicator.
[0105] For example, the overall link condition C is calculated based on the first metric, assuming latency is D, packet loss rate is PL, and jitter is J. The weights of these metrics are as follows: (using w...) D w represents the weight corresponding to the delay. PL w represents the weight corresponding to the packet loss rate. J This represents the jitter. The overall link condition C predicted at time t is expressed as... The overall link status predicted at time t+1 Represented as The comprehensive link status C obtained by actual measurement at time t is expressed as: The comprehensive link condition C predicted by the model in the previous step can be expressed as:
[0106]
[0107]
[0108] in, = 1. Calculate port status based on network health, f s This represents the first threshold, i.e., the threshold between a healthy and unhealthy network condition, for example, f. s It can be 0.8.
[0109]
[0110] For example, the first parameter in the embodiments of this application can be as described above. .
[0111] For example, after determining the port status, information indicating the port status, or port status information, can be stored in a remote dictionary server (Redis), as an entry in the table:
[0112]
[0113] Here, VTEP in value is the VTEP corresponding to this port. IP1 / M1 and IP2 / M2 are examples of VTEP addresses corresponding to ports.
[0114] For example, the detected port status is classified, and the detected port status is... If the result is "Success," it indicates that the port status is normal, and no emergency measures are required. For example, the first service represents the service whose corresponding port status is normal. That is, after detecting the port status for each service, the services with normal port status are collectively referred to as the first service. No emergency measures are needed for the first service; the VTEP address corresponding to the first service can be normally published via BGP and sent to the corresponding compute node. See step 203 below for details. The detected port status... If the result is "Failure," it indicates that the port status is abnormal, and relevant emergency measures should be taken. For example, the "second service" represents a service whose corresponding port status is abnormal. That is, after checking the port status for each service, services with abnormal port statuses are collectively referred to as "second services," and emergency measures are required for handling them. Specifically, regarding port status... In the case of Failure, the following actions are required: when a service is detected whose corresponding port is in an abnormal state, or when a second service is detected, the following actions are required:
[0115] 1. Confirmation Notification: Ensure that a confirmation notification has been sent to the peer to acknowledge the existence of the link failure and prepare for subsequent operations. The peer refers to the access switch that received the first probe packet. This link failure refers to a failure in the link between the port corresponding to the second service and the corresponding access switch.
[0116] 2. Linking with BGP: Monitoring the corresponding table entries, such as... Figure 3 As shown, port status In the case of a Failure, it is necessary to coordinate with BGP to revoke the local (no network) publication of the VTEP address IP corresponding to the second service carried by the leased line gateway, ensuring that traffic no longer flows to the local gateway. Specifically, "coordinating with BGP to revoke the publication of the VTEP address IP corresponding to the second service carried by the leased line gateway" means ceasing the transmission of the VTEP address corresponding to the second service among the various services to the corresponding compute node via the BGP message. See step 204 below for details.
[0117] 3. Data Record Transmission: Relevant data records, including timestamps, port status, operation records, and event logs, are sent to the management node for subsequent analysis and troubleshooting. The timestamps include the time of sending the first probe packet and the time of receiving the response packet. Operation records include operations such as the VTEP address corresponding to the "no network" second service. Event logs include logs of the event of sending the first probe packet; and / or logs of the event of receiving the response packet; and / or logs of the event of the VTEP address corresponding to the "no network" second service.
[0118] 4. Automated recovery
[0119] Please see Figure 4 For cases where the port status is "Failure", an automated recovery mechanism is employed, including the following steps:
[0120] Try backing up your data: Try backing up critical data to prevent data loss.
[0121] Automatic port restart: Attempt to automatically restart the faulty port to restore its normal function as soon as possible.
[0122] Automatic gateway restart: If all ports corresponding to all services are detected to be faulty, attempt to automatically restart the entire gateway device to restore its normal operation.
[0123] Through the above mechanisms, abnormal port status can be responded to quickly and automatically, minimizing the impact on services. Simultaneously, data logging and analysis can promptly identify the causes of port status anomalies and implement effective remedial measures, ensuring high system availability and stability.
[0124] Step 203: Send the VTEP address corresponding to the first service among the multiple services to the corresponding computing node through a Border Gateway Protocol (BGP) message. The first service represents the service whose corresponding port is in a normal state.
[0125] For example, sending the VTEP address corresponding to the first service among the multiple services to the corresponding compute node via BGP message means: sending the VTEP address corresponding to the first service among the multiple services to the corresponding compute node via BGP, that is, sending the BGP route related to the VTEP address corresponding to the first service among the multiple services to the corresponding compute node.
[0126] It should be noted that the embodiment of this application, "sending the VTEP address corresponding to the first service among the multiple services to the corresponding computing node via BGP message", does not limit the sending of BGP message directly to the corresponding computing node. That is, this application does not limit the next hop of the transmission path of the BGP message to the computing node. For example, the computing node can be the last hop or the end point of the transmission path of the BGP message. In this case, the next hop of the transmission path of the first probe message can be a switch, etc.
[0127] For example, as described above, in this embodiment of the application, services whose corresponding port status is normal are collectively referred to as the first service. The first service may include one or more types of services among the multiple types of services. For example, the multiple types of services include the first type of service, the second type of service, and the third type of service. Where the port status corresponding to the first type of service and the third type of service is normal, then the first service includes the first type of service and the third type of service.
[0128] In practical applications, after sending the VTEP address corresponding to the first service among the multiple services to the corresponding computing node via BGP messages, the method further includes: receiving the first service message of the first type of service sent by the corresponding computing node, wherein the outer destination IP of the first service message is determined based on the VTEP address corresponding to the first type of service.
[0129] For example, the leased line gateway uses BGP to network the VTEP address corresponding to the first service among multiple services to the corresponding computing node. That is, the leased line gateway sends the VTEP address corresponding to the first service among multiple services to the corresponding computing node via BGP messages. At this time, the same computing node has multiple routes to IP1 and IP2. When forwarding traffic, traffic originating from the computing node is forwarded based on the longest prefix match of the VTEP address of the corresponding leased line gateway for each service. For example, the VTEP address can be IP1 / M1 and IP2 / M2, where IP1 represents the IP address of the VTEP corresponding to the first type of service in the first leased line gateway, IP2 represents the IP address of the VTEP corresponding to the first type of service in the second leased line gateway, M1 represents the prefix length of IP1, and M2 represents the prefix length of IP2. If M2 ≤ M1, according to the longest prefix match principle, the first type of service selects the IP address of the VTEP corresponding to the first type of service in the first leased line gateway, i.e., selects IP1, and the outer destination IP of the first service packet is IP1.
[0130] In practical applications, after receiving the first configuration information, the method further includes: receiving a second service packet for each service sent by the access switch; encapsulating the second service packet for each service using Virtual Extensible Local Area Network (VXLAN) to obtain a third service packet for each service, wherein the outer source IP (src_ip) of the third service packet for each service is determined based on the VTEP address corresponding to each service; and sending the third service packet for each service to the corresponding computing node.
[0131] For example, the first leased line gateway and / or the second leased line gateway can perform VXLAN encapsulation on the second service packet of each type of service. This process requires removing the VLAN header, performing tunnel encapsulation (tunnel_encap), re-encapsulating the VXLAN header, and then rewriting the outer source IP address corresponding to each service based on the VTEP address corresponding to each service. Taking the VTEP addresses corresponding to the first type of service as IP1 / M1 and IP2 / M2, and IP1 as an example, if M2≤M1, then IP1 is selected, and the outer source IP of the third service packet of the first type of service is IP1.
[0132] Step 204: Cancel sending the VTEP address corresponding to the second service among the multiple services to the corresponding computing node via the BGP message. The second service represents the service whose corresponding port is in an abnormal state.
[0133] For example, canceling the sending of the VTEP address corresponding to the second service among the multiple services to the corresponding compute node via the BGP message means: canceling the sending of the VTEP address corresponding to the second service of the network to the corresponding compute node; or, in other words, not sending the BGP route related to the VTEP address corresponding to the second service among the multiple services to the corresponding compute node.
[0134] As can be seen from the above, this embodiment uses a pair of dedicated line gateways to achieve automated link detection, traffic switching, and device recovery in multi-service scenarios. This embodiment employs multi-VTEP address technology to support the expansion of multiple services, and uses link detection results to calculate port status for subsequent traffic switching and device recovery to ensure high availability of various dedicated line services.
[0135] The present application will be further described in detail below with reference to application examples.
[0136] Example 1
[0137] In the cloud inbound scenario corresponding to Example 1, under normal circumstances, in the data plane forwarding process, the cloud inbound traffic is forwarded from the access switch device to the corresponding dedicated line gateway, and then the dedicated line gateway encapsulates the packets with VXLAN and forwards them to the corresponding computing node.
[0138] Please see Figure 4 , Figure 4 Here is an exemplary flowchart of Example 1. Figure 4 The process includes the following steps:
[0139] S401: Based on the RMAC group and DMAC matching rmac.hit, determine whether layer 3 forwarding is required.
[0140] S402: Determine if it is a VXLAN packet based on tunnel.rmac.hit.
[0141] S403: Remove VLAN header.
[0142] S404: Tunnel encapsulation (tunnel_encap), re-encapsulates the VXLAN header.
[0143] It is understandable that the leased gateway (such as the first leased gateway and / or the second leased gateway) is connected to the computing node through an overlay network and uses VXLAN for message encapsulation.
[0144] S405: Rewrite the outer src_ip according to the configured service VTEP.
[0145] For example, taking the VTEP addresses corresponding to the first type of service as IP1 / M1 and IP2 / M2, if M2≤M1, then IP1 is selected, and the outer source IP of the message sent to the compute node will be rewritten to IP1.
[0146] S406: Rewrite the outer dst_ip based on the VXLAN tunnel index.
[0147] S407: Rewrite the DMAC and SMAC addresses based on the index.
[0148] Taking a failure on the private cloud network line side as an example, for instance, when the port corresponding to the service is in an abnormal state, the inbound traffic is forwarded from the access switch device to the corresponding backup private line gateway. The backup private line gateway's data plane hits the Media Access Control (MAC) address of the corresponding VTEP, and then the backup private line gateway encapsulates the packet with VXLAN and forwards it to the corresponding compute node.
[0149] Example 2:
[0150] Example 2 corresponds to the cloud outbound scenario. The cloud outbound traffic is forwarded by the computing node to the main leased line gateway, and the leased line gateway then forwards the traffic to the corresponding access switch device.
[0151] Please see Figure 5 , Figure 5 Here is an exemplary flowchart of Example 2. Figure 5 The process includes the following steps:
[0152] S501: Based on the RMAC group and DMAC matching rmac.hit, determine whether layer 3 forwarding is required.
[0153] S502: Determine whether it is a VXLAN packet based on tunnel.rmac.hit.
[0154] S503: Remove VXLAN header.
[0155] It is understandable that the leased gateway (e.g., the first leased gateway and / or the second leased gateway) is connected to the computing node through an overlay network, while the leased gateway is connected to the access switch through an underlay network. Therefore, the packets between the leased gateway and the access switch do not need to be encapsulated with VXLAN headers, and thus the VXLAN headers need to be removed.
[0156] S504: Rewrite the DMAC and SMAC addresses based on the index.
[0157] Taking a failure on the cloud private network leased line side as an example, when the primary leased line gateway detects that the link with the access switch device corresponding to the cloud private network leased line is down, the port status is set to Failure. This triggers BGP, and the local no-network leased line gateway carries the VTEP address IP1 corresponding to the service, ensuring that traffic from the compute node side no longer flows to the primary leased line gateway. At this time, the next hop for IP1 on the compute node side is the backup leased line gateway. Outbound traffic is forwarded by the compute node to the backup leased line gateway. The backup leased line gateway's data plane matches the MAC address of the corresponding VTEP, and then the backup leased line gateway forwards the traffic to the corresponding access switch device.
[0158] As can be seen from the above, the embodiments of this application, through multi-VTEP address technology and a scheme for link detection-linked traffic switching and automated recovery, can achieve high availability in multi-service scenarios. Related technologies focus on the functional implementation and simple high availability implementation of leased line gateways, and do not support high availability solutions for leased line gateways in multi-service scenarios. The embodiments of this application, however, use multi-VTEP address technology to support multi-service scenarios, and have low expansion costs and are easy to operate. Related technologies provide a link detection method and a method for linked traffic switching. Multi-service scenarios cannot achieve isolation of response messages for link detection, which can lead to confusion and prevent the achievement of high availability for multiple services. The embodiments of this application, by supporting isolated traffic linkage switching and automated recovery in multi-service scenarios, achieve high availability in multi-service scenarios.
[0159] Furthermore, embodiments of this application can design entirely new functions and features for programmable gateways. For example, machine learning algorithms can be added to enable the gateway to automatically learn and adapt to constantly changing network environments; or blockchain technology can be combined to achieve decentralized management and security auditing of network traffic. Embodiments of this application can further enhance the network security performance of programmable gateways. The use of quantum technology for data encryption can be explored to resist future quantum computing attacks; or novel detection and defense mechanisms can be designed to improve the gateway's network threat perception and response capabilities. Moreover, embodiments of this application can consider the application of programmable gateways in different fields. For example, they can be applied to intelligent transportation systems to achieve real-time communication and secure collaboration between vehicles; or they can be applied to smart healthcare to ensure efficient interconnection and data transmission between medical devices. Furthermore, embodiments of this application can achieve compatibility of programmable gateways on different network devices and platforms. Universal programming interfaces and protocols can be researched and developed, enabling the gateway to operate and be configured flexibly in various hardware and software environments.
[0160] Based on the embodiments described above, this application also provides a data processing apparatus, see [link to previous document]. Figure 6 The data processing device includes:
[0161] The first receiving unit 601 is used to receive first configuration information, which is used to configure the Virtual Extensible Local Area Network Tunnel Endpoint (VTEP) address corresponding to each of the multiple services.
[0162] The detection unit 602 is used to detect the port corresponding to each service and obtain the status of the port corresponding to each service;
[0163] The first sending unit 603 is used to send the VTEP address corresponding to the first service among the multiple services to the corresponding computing node through BGP messages. The first service represents the service whose corresponding port is in a normal state.
[0164] The cancellation unit 604 is used to cancel the sending of the VTEP address corresponding to the second service among the multiple services to the corresponding computing node through the BGP message, wherein the second service represents the service whose corresponding port is in an abnormal state.
[0165] In one embodiment, the VTEP address corresponding to each service includes: the Internet Protocol IP addresses of the two VTEPs corresponding to each service and the prefix length of the IP addresses of the two VTEPs corresponding to each service, wherein the two VTEPs corresponding to each service are located at the first leased gateway and the second leased gateway, respectively.
[0166] In one embodiment, the detection unit 602 detects the port corresponding to each service, including:
[0167] The first probe message is sent to the corresponding access switch at the port corresponding to each service.
[0168] Receive the response message of the first probe message;
[0169] Calculate a first indicator for the port corresponding to each service based on the response message. The first indicator includes latency, packet loss rate, and jitter.
[0170] The status of the port corresponding to each service is determined based on the first indicator.
[0171] In one embodiment, the detection unit 602 determines the status of the port corresponding to each service based on the first indicator, including:
[0172] The first parameter is calculated based on the first indicator, wherein the first parameter is positively correlated with the sum of the first product, the second product and the third product, the first product is the product of the delay and the weight corresponding to the delay, the second product is the product of the packet loss rate and the weight corresponding to the packet loss rate, and the third product is the product of the jitter and the weight corresponding to the jitter.
[0173] If the first parameter is not less than the first threshold, it is determined that the corresponding port is in an abnormal state;
[0174] If the first parameter is less than the first threshold, the corresponding port is determined to be in a normal state.
[0175] In one embodiment, the first probe message is an Internet Control Message Protocol (ICMP) probe message.
[0176] In one embodiment, the data processing device further includes a second receiving unit. After the VTEP address corresponding to the first service among the multiple services is sent to the corresponding computing node via BGP message, the second receiving unit is used to receive the first service message of the first type of service sent by the corresponding computing node, wherein the outer destination IP of the first service message is determined according to the VTEP address corresponding to the first type of service.
[0177] In one embodiment, the data processing device further includes a third receiving unit, an encapsulation unit, and a second sending unit. After receiving the first configuration information, the third receiving unit is used to receive a second service packet for each service sent by the access switch; the encapsulation unit is used to encapsulate the second service packet for each service using Virtual Extensible Local Area Network (VXLAN) to obtain a third service packet for each service, wherein the outer source IP of the third service packet for each service is determined based on the VTEP address corresponding to each service; and the second sending unit is used to send the third service packet for each service to the corresponding computing node.
[0178] In practical applications, the first receiving unit 601, the detection unit 602, the first sending unit 603, the cancellation unit 604, the second receiving unit, the third receiving unit, the encapsulation unit, and the second sending unit can be implemented by the processor in the data processing device.
[0179] It should be noted that the data processing apparatus provided in the above embodiments is only illustrated by the division of the above program modules. In practical applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the apparatus can be divided into different program modules to complete all or part of the processing described above. In addition, the data processing apparatus and data processing method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0180] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiments of this application, this application also provides an electronic device, see [link to relevant documentation]. Figure 7The electronic device includes:
[0181] The first communication interface 1 is used to receive first configuration information, which is used to configure the Virtual Extensible Local Area Network Tunnel Endpoint (VTEP) address corresponding to each of the multiple services.
[0182] The first processor 2 is used to detect the port corresponding to each service and obtain the status of the port corresponding to each service;
[0183] The first communication interface 1 is also used to send the VTEP address corresponding to the first service among the multiple services to the corresponding computing node via BGP message, wherein the first service represents the service in which the corresponding port is in a normal state; and to cancel sending the VTEP address corresponding to the second service among the multiple services to the corresponding computing node via the BGP message, wherein the second service represents the service in which the corresponding port is in an abnormal state.
[0184] In one embodiment, the VTEP address corresponding to each service includes: the Internet Protocol IP addresses of the two VTEPs corresponding to each service and the prefix length of the IP addresses of the two VTEPs corresponding to each service, wherein the two VTEPs corresponding to each service are located at the first leased gateway and the second leased gateway, respectively.
[0185] In one embodiment, the first processor 2 detects the port corresponding to each service, including:
[0186] The first probe message is sent to the corresponding access switch at the port corresponding to each service.
[0187] Receive the response message of the first probe message;
[0188] Calculate a first indicator for the port corresponding to each service based on the response message. The first indicator includes latency, packet loss rate, and jitter.
[0189] The status of the port corresponding to each service is determined based on the first indicator.
[0190] In one embodiment, the first processor 2 determines the status of the port corresponding to each service based on the first indicator, including:
[0191] The first parameter is calculated based on the first indicator, wherein the first parameter is positively correlated with the sum of the first product, the second product and the third product, the first product is the product of the delay and the weight corresponding to the delay, the second product is the product of the packet loss rate and the weight corresponding to the packet loss rate, and the third product is the product of the jitter and the weight corresponding to the jitter.
[0192] If the first parameter is not less than the first threshold, it is determined that the corresponding port is in an abnormal state;
[0193] If the first parameter is less than the first threshold, the corresponding port is determined to be in a normal state.
[0194] In one embodiment, the first probe message is an Internet Control Message Protocol (ICMP) probe message.
[0195] In one embodiment, after sending the VTEP address corresponding to the first service among the multiple services to the corresponding computing node via BGP message, the first communication interface 1 is further used to receive the first service message of the first type of service sent by the corresponding computing node, wherein the outer destination IP of the first service message is determined according to the VTEP address corresponding to the first type of service.
[0196] In one embodiment, after receiving the first configuration information, the first communication interface 1 is further configured to receive the second service message of each service sent by the access switch;
[0197] The first processor 2 is further configured to encapsulate the second service message of each service into a Virtual Extensible Local Area Network (VXLAN) to obtain a third service message of each service, wherein the outer source IP of the third service message of each service is determined according to the VTEP address corresponding to each service.
[0198] The first communication interface 1 is also used to send a third service message for each of the services to the corresponding computing node.
[0199] It should be noted that the specific processing procedure of the first communication interface 1 can be understood by referring to the above method.
[0200] Of course, in practical applications, the various components in an electronic device are coupled together through bus system 4. It can be understood that bus system 4 is used to achieve communication and connection between these components. In addition to the data bus, bus system 4 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 7 The general will label all buses as Bus System 4.
[0201] The first memory 3 in this embodiment is used to store various types of data to support operation in the electronic device. Examples of such data include any computer program used to operate on the electronic device.
[0202] The methods disclosed in the embodiments of this application can be applied to the first processor 2, or implemented by the first processor 2. The first processor 2 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware or by instructions in the form of software in the first processor 2. The first processor 2 may be a general-purpose processor, a DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The first processor 2 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly reflected as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in the first memory 3. The first processor 2 reads the information in the first memory 3 and completes the steps of the aforementioned method in combination with its hardware.
[0203] In an exemplary embodiment, the electronic device may be implemented by one or more ASICs, DSPs, PLDs, CPLDs, FPGAs, general-purpose processors, controllers, MCUs, microprocessors, or other electronic components to perform the aforementioned method.
[0204] It is understood that the first memory 3 in the embodiments of this application can be volatile memory or non-volatile memory, or both. 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), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); the magnetic surface memory can be disk storage or magnetic tape storage. 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), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memories described in the embodiments of this application are intended to include, but are not limited to, these and any other suitable types of memories.
[0205] In an exemplary embodiment, this application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, such as a first memory 3 storing a computer program, which can be executed by a first processor 2 to complete the steps described in the aforementioned method.
[0206] In an exemplary embodiment, this application also provides a computer program product, including a computer program that can be executed by a first processor 2 to perform the steps described in the foregoing method.
[0207] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application.
Claims
1. A data processing method applied to a leased line gateway, characterized in that, The data processing method includes: Receive first configuration information, which is used to configure the Virtual Extensible Local Area Network Tunnel Endpoint (VTEP) address corresponding to each of the multiple services. The port corresponding to each service is detected to obtain the status of the port corresponding to each service; The VTEP address corresponding to the first service among the multiple services is sent to the corresponding computing node through the Border Gateway Protocol (BGP) message. The first service represents the service whose corresponding port is in a normal state. The sending of the VTEP address corresponding to the second service among the multiple services to the corresponding computing node via the BGP message is cancelled. The second service represents the service whose corresponding port is in an abnormal state.
2. The method according to claim 1, characterized in that, The VTEP address corresponding to each service includes: the Internet Protocol IP address of the two VTEPs corresponding to each service and the prefix length of the IP address of the two VTEPs corresponding to each service, wherein the two VTEPs corresponding to each service are located at the first leased gateway and the second leased gateway, respectively.
3. The method according to claim 1, characterized in that, The detection of the port corresponding to each service includes: The first probe message is sent to the corresponding access switch at the port corresponding to each service. Receive the response message of the first probe message; Calculate a first indicator for the port corresponding to each service based on the response message. The first indicator includes latency, packet loss rate, and jitter. The status of the port corresponding to each service is determined based on the first indicator.
4. The method according to claim 3, characterized in that, Determining the status of the port corresponding to each service based on the first indicator includes: The first parameter is calculated based on the first indicator, wherein the first parameter is positively correlated with the sum of the first product, the second product and the third product, the first product is the product of the delay and the weight corresponding to the delay, the second product is the product of the packet loss rate and the weight corresponding to the packet loss rate, and the third product is the product of the jitter and the weight corresponding to the jitter. If the first parameter is not less than the first threshold, it is determined that the corresponding port is in an abnormal state; If the first parameter is less than the first threshold, the corresponding port is determined to be in a normal state.
5. The method according to claim 3, characterized in that, The first probe message is an Internet Control Message Protocol (ICMP) probe message.
6. The method according to claim 1, characterized in that, After sending the VTEP address corresponding to the first service among the multiple services to the corresponding computing node via Border Gateway Protocol (BGP) messages, the method further includes: Receive a first service message of a first type of service sent by the corresponding computing node, wherein the outer destination IP of the first service message is determined according to the VTEP address corresponding to the first type of service.
7. The method according to claim 1, characterized in that, After receiving the first configuration information, the method further includes: Receive the second service message for each of the services sent by the access switch; The second service message of each service is encapsulated using Virtual Extensible Local Area Network (VXLAN) to obtain the third service message of each service, wherein the outer source IP of the third service message of each service is determined according to the VTEP address corresponding to each service. Send the third service message for each of the aforementioned services to the corresponding computing nodes.
8. An electronic device, characterized in that, include: The processor and the memory used to store computer programs that can run on the processor. When the processor is used to run the computer program, it performs the steps of the method according to any one of claims 1 to 7.
9. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Method and device for forwarding messages in VXLAN network
CN104468394A
Network traffic control method, VTEP device and storage medium
CN110868357A