A Method for Active Detection of BM in BMGW-VIP Cluster
By using the -p parameter of the ping program in the BMGW-VIP cluster to specify the VNI and modify and encapsulate packets in the BMGW service, the problem of being unable to actively detect overlay BM is solved, and a simplified operation and maintenance process is achieved.
Patent Information
- Application Number
- CN202311712747.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-13
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2043-12-13
AI Technical Summary
In a BMGW-VIP cluster, it is impossible to use common programs such as ping to actively detect overlay's BM hosts because the deployment method of VIP causes the reply messages to be correctly assigned to cluster members.
By specifying the VNI where the BM is located using the -p parameter in the ping program, the ping program is allowed to send an ICMP probe request to the BMGW service. After receiving the request, the BMGW service extracts the VNI, modifys the source IP of the ping message, and uses the VNI to encapsulate the VXLAN message and sends it to the LEAF node. Finally, the reply message is forwarded to the cluster member of the source request.
It realizes the detection of overlay BM by multiplexing standard ping programs in BMGW-VIP clusters, simplifies the operation and maintenance of BMGW clusters, and solves the problem of actively detecting BM.
Smart Images

Figure CN117834494B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of IT and software development, and particularly relates to a method for actively detecting a BM by a BMGW-VIP cluster. Background Art
[0002] Cloud servers in cloud computing services can be divided into virtual cloud hosts of the virtual type and physical cloud hosts, which are basic services in cloud services. Among them, physical cloud hosts can be roughly divided into ordinary physical machines, also known as ordinary bare metal servers, abbreviated as BM, that is, physical machines with intelligent network cards. A bare metal server is a hardware device with the characteristics of a traditional physical server and also has the virtualization service function of cloud computing technology. It is the product of the combination of the advantages of hardware and software, and its essence is a server that combines cloud computing service functions and provides physical device performance. The bare metal server can enter the cloud through the bare metal gateway BMGW, and through the BMGW, it can seamlessly dock and be compatible with other cloud services provided by cloud providers, such as various cloud products like VPC private networks, cloud database services, EIP, shared bandwidth, speed limit, cloud firewalls, etc. in network services.
[0003] The bare metal gateway BMGW provides various cloud services for the bare metal server to enter the cloud. To ensure the performance and reliability of the bare metal server entering the cloud, the bare metal gateway usually consists of multiple devices to form a BMGW cluster to provide services for the BMGW. China Telecom Cloud mainly provides access services for BMs in the resource pool through the BMGW-VIP cluster and the BM access switch. As Figure 2 shown, it is a schematic diagram of a BM accessing the BMGW-VIP cluster. Among them, the management and control system is a system in the cloud for automatically managing and controlling bare metal, bare metal gateways, and access switches; the LEAF switch is a basic network-related switching and routing device; other clusters are other business clusters in the cloud.
[0004] As Figure 3 shown, the BM gateway is located on the BMGW cluster. Each member of the cluster is independent and can back up each other. Based on the VIP-based VXLAN tunnel between the BMGW-VIP cluster and the access switch for connection, the gateway of the subnet where the BM server is located is on the BMGW. When the packet of the BM server requesting the BM subnet gateway arrives at the BM cluster, it is directly replied by the BM where it is located.
[0005] CT Cloud mainly provides access services for BMs in the resource pool through the BMGW-VIP cluster and the BM access switch. The BMGW services of the cluster members hide overlay-related services such as VPC. Therefore, the BMs of the cluster members cannot use the general program ping to actively detect the overlay BM hosts. In addition, since the BMGW is deployed in the VIP mode, the data replied by the BM to the cluster is equally shared to the corresponding cluster members according to the encapsulation information of the outer VXLAN. Therefore, the request message and the reply message of the request message cannot be replied to the same BMGW. Summary of the Invention
[0006] This application aims to solve at least one of the technical problems in the related art to some extent. For this reason, an object of this application is to propose a method, a system, an electronic device, and a readable storage medium for actively detecting BMs in a BMGW-VIP cluster. This application solves the problem of actively detecting BMs in BMGW-VIP, and can reuse the standard ping program to detect overlay BMs in the BMGW-VIP cluster, simplifying the operation and maintenance of the BMGW cluster.
[0007] In the first aspect disclosed in this application, a method for actively detecting BMs in a BMGW-VIP cluster is provided. The method includes:
[0008] Use the ping program in the BMGW-VIP cluster members to detect the IP of the BM, specify the VNI where the BM is located using the -p parameter, and the ping program uses ICMP to send a request for detecting the BM to the BMGW service;
[0009] The BMGW service receives the ICMP request for detecting the BM, detects the ping message, and extracts the VNI as the VNI parameter for encapsulating the BM VXLAN tunnel message;
[0010] The BMGW service modifies the source IP of the ping message according to the information queried by the VNI, fills the source IP into the ping message, encapsulates the VXLAN message using the VNI where the BM is located, and sends it to the LEAF node;
[0011] The BMGW cluster members receive the replied ping message and forward the ping message to the cluster member that requested the source according to the data of the ping message;
[0012] The cluster member that requested the source restores the ping message according to the data of the ping message after receiving the ping message and sends it to the kernel.
[0013] Using the ping program in the BMGW-VIP cluster members to detect the IP of the BM, specifying the VNI where the BM is located using the -p parameter, and the ping program sending a request to detect the BM to the BMGW service using ICMP, including:
[0014] Populate the parameter -p with the content of the general ping program to specify the VNI where the BM is located. Here, VNI is the tunnel identifier of VXLAN. By executing the -p parameter, the general ping program can automatically populate the content of BM-VXLAN-VNI into the ping packet. The specific form is as follows:
[0015] ping BM-IP -p BM-VXLAN-VNI -c xx -i yy.
[0016] The steps for the BMGW service to receive the ICMP request to detect the BM, detect the ping packet, and extract the VNI as the VNI parameter for encapsulating the BM VXLAN tunnel packet include:
[0017] The BMGW service receives the ICMP request to detect the BM;
[0018] Detect the ping packet;
[0019] If BM-VXLAN-VNI exists in the ping packet, extract the BM-VXLAN-VNI field;
[0020] Use the BM-VXLAN-VNI field to find the subnet of the BM, obtain the subnet gateway IP and the VXLAN information required to access the BM;
[0021] As the VNI parameter for encapsulating the BM VXLAN tunnel packet.
[0022] The steps for the BMGW service to modify the source IP of the ping packet according to the information queried by the VNI, fill the source IP into the ping packet, encapsulate the VXLAN packet using the VNI where the BM is located, and send it to the LEAF node include:
[0023] The BMGW service queries the information according to the VNI;
[0024] Replace the source IP of the ping packet with the subnet gateway IP;
[0025] Fill the source IP of the ping packet into the ping packet;
[0026] Encapsulate the original ping packet using the VXLAN encapsulation information;
[0027] Send the encapsulated original ping packet to the LEAF node.
[0028] The step of sending the original encapsulated ping packet to the LEAF node includes:
[0029] The BM receives the request of the ping packet and generates a reply packet;
[0030] The reply packet is encapsulated with VXLAN by the BM access switch;
[0031] Forward it to the BMGW cluster members. The cluster members detect the ping reply packet and find that it is a reply packet for requesting the subnet gateway IP;
[0032] If the real IP of the BM carried in the ping packet is for the local machine, use the real IP of the BM to replace the destination IP of the inner-layer ping packet and send it to the kernel. If it is not for the local machine, use the real IP of the BM to replace the destination IP of the VXLAN and send it to the LEAF node.
[0033] The step that the BMGW cluster members receive the replied ping packet and forward the ping packet to the cluster member requested by the source according to the data of the ping packet includes:
[0034] The BMGW cluster members receive the replied ping packet;
[0035] The BMGW cluster members need to parse the received replied ping packet;
[0036] Forward the ping packet to the cluster member requested by the source according to the data of the ping packet.
[0037] The step that the BMGW-VIP cluster member requested by the source receives the ping packet, restores the ping packet according to the ping packet, and sends it to the kernel includes:
[0038] The BMGW-VIP cluster member requested by the source receives the ping packet;
[0039] Detect the received ping packet;
[0040] Restore the ping packet according to the ping packet;
[0041] Send it to the kernel.
[0042] The second aspect disclosed in this application provides a system for the BMGW-VIP cluster to actively detect the BM. The system includes:
[0043] A sending request module, which is used to detect the IP of the BM using the ping program among the BMGW-VIP cluster members, specify the VNI where the BM is located using the -p parameter, and the ping program uses ICMP to send a request to detect the BM to the BMGW service;
[0044] Detection module: The BMGW service receives requests for the ICMP to probe the BM, detects ping packets, and extracts the VNI as the VNI parameter for encapsulating the BMVXLAN tunnel packets.
[0045] Modification module: It is used for the BMGW service to modify the source IP of the ping packet according to the information queried by the VNI, fill the source IP into the ping packet, encapsulate the VXLAN packet with the VNI where the BM is located, and send it to the LEAF node.
[0046] Forwarding module: It is used for the BMGW cluster members to receive the replied ping packets and forward the ping packets to the cluster members requested by the source according to the data in the ping packets.
[0047] Send to kernel module: It is used for the cluster members requested by the source to restore the ping packet according to the data in the ping packet after receiving the ping packet and send it to the kernel.
[0048] In the third aspect disclosed in this application, an electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it implements the steps in a method for the BMGW-VIP cluster to actively detect the BM.
[0049] In the fourth aspect disclosed in this application, a readable storage medium stores a computer program, and the computer program is suitable for being loaded by a processor to execute the steps in the method for the BMGW-VIP cluster to actively detect the BM.
[0050] Compared with the prior art, for a method for the BMGW-VIP cluster to actively detect the BM proposed in this application, the advantages of this application are as follows:
[0051] In this application, the VNI parameter is carried into the data of the ICMP request through the -p parameter of the ping program, so as to carry the VNI system to the BMGW service, and solve the problem of the system program passing the VPC VNI through extended parameters.
[0052] Replace the source IP of the ICMP request with the subnet gateway IP to better be compatible with the BM system settings, and restore the ICMP reply request packet according to the data of the ICMP reply packet.
[0053] Use the data of the ICMP request to carry the source IP of the packet, so that the cluster members can confirm the source request node by detecting the ping data, and then modify the VXLAN packet header again to forward the packet to the source request node, solving the problem of the same source and the same destination.
[0054] This application solves the problem of actively detecting BM in BMGW-VIP, and can reuse the standard ping program to detect overlay BM in the BMGW-VIP cluster, simplifying the operation and maintenance of the BMGW cluster. Description of the Drawings
[0055] Figure 1 It is a schematic diagram of a method for actively detecting BM in a BMGW-VIP cluster provided by an embodiment of this application;
[0056] Figure 2 It is a schematic diagram of BM accessing the BMGW-VIP cluster provided by an embodiment of this application;
[0057] Figure 3 It is a schematic diagram of the link between the BMGW-VIP cluster and the access switch through a VIP-based VXLAN tunnel provided by an embodiment of this application;
[0058] Figure 4 It is a schematic diagram of the packet forwarding process related to the BMGW service provided by an embodiment of this application;
[0059] Figure 5 It is a schematic diagram of a packet in the packet forwarding process related to the BMGW service provided by an embodiment of this application;
[0060] Figure 6 It is a schematic diagram of a system for actively detecting BM in a BMGW-VIP cluster provided by an embodiment of this application;
[0061] Figure 7 It is a schematic diagram of the structure of an electronic device provided by an embodiment of this application;
[0062] Figure 8 It is a schematic diagram of the structure of a computer-readable storage medium provided by an embodiment of this application. Detailed Embodiments
[0063] To better understand this application, various aspects of this application will be described in more detail with reference to the accompanying drawings. It should be understood that these detailed descriptions are only descriptions of the exemplary embodiments of this application, and do not limit the scope of this application in any way. Throughout the specification, the same reference numerals refer to the same elements. The expression "and / or" includes any and all combinations of one or more of the associated listed items.
[0064] In the accompanying drawings, for ease of illustration, the sizes, dimensions, and shapes of the elements have been slightly adjusted. The drawings are provided by way of example and are not drawn to an exact scale. As used herein, terms such as "substantially", "about", and similar terms are used as terms of approximation and not as terms of degree, and are intended to account for the inherent deviations in measured or calculated values that would be recognized by a person of ordinary skill in the art. Additionally, in this application, the order in which the steps of the processes are described does not necessarily represent the order in which these processes occur in actual operation, unless otherwise specifically limited or derivable from the context.
[0065] It should also be understood that expressions such as "comprising", "including", "having", "containing", and / or "including having" are open-ended rather than closed-ended expressions in this specification, which means that there are the stated features, elements, and / or components, but do not exclude the presence of one or more other features, elements, components, and / or combinations thereof. In addition, when an expression such as "at least one of..." appears after a list of listed features, it modifies the entire list of features, rather than just individual elements in the list. Furthermore, when describing the embodiments of this application, the use of "may" means "one or more embodiments of this application". And the term "exemplary" is intended to refer to an example or illustration.
[0066] Unless otherwise defined, all terms used herein (including engineering terms and technical terms in the sciences) have the same meaning as commonly understood by a person of ordinary skill in the art to which this application pertains. It should also be understood that unless there is a clear statement in this application, words defined in common dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and should not be interpreted in an idealized or overly formal sense.
[0067] It should be noted that, without conflict, the embodiments in this application and the features in the embodiments can be combined with each other. The following will describe this application in detail with reference to the accompanying drawings and in combination with the embodiments.
[0068] Embodiment 1
[0069] Figure 1 FIG. is a schematic diagram of a method for actively detecting a BM in a BMGW-VIP cluster provided by an embodiment of this application. As Figure 1 shown, a method for actively detecting a BM in a BMGW-VIP cluster includes:
[0070] Use the ping program in the BMGW-VIP cluster members to detect the IP of the BM, specify the VNI where the BM is located using the -p parameter, and the ping program sends a request to detect the BM to the BMGW service using ICMP;
[0071] Among them, the BMGW-VIP cluster is a BMGW cluster implemented based on VIP. The BMGW cluster is a VXLAN VTEP node of the BM cloud network. Each member of the BMGW cluster runs a routing protocol to establish a neighbor relationship with the LEAF switch interconnected with the cluster and publishes the cluster VIP address. The VIP routes published by the cluster form VIP equivalent routes on the LEAF switch. In this way, the service traffic encapsulated by VIP+VXLAN tunnels is automatically load-balanced to the cluster members by looking up the equivalent routes on the LEAF switch outside the cluster. After the cluster members process the service, they obtain the VIP of the next cluster and use the VIP to encapsulate the VXLAN packet again to send the service traffic to the subsequent clusters to complete the forwarding of tenant services. The BM access switch is a switch connecting bare metal servers and is a VTEP node of the VLXAN tunnel for bare metal to enter the cloud. The destination address of the VXLAN tunnel is the VIP address of the BMGW cluster.
[0072] In the BMGW-VIP cluster members, use the ping program to detect the IP of the BM, and use the -p parameter to specify the VNI where the BM is located. The ping program uses ICMP to send a request to detect the BM to the BMGW service, including:
[0073] Fill the parameter -p with the content of the general ping program to specify the VNI where the BM is located. Here, VNI is the tunnel identifier of VXLAN. After executing the -p parameter, the general ping program can automatically fill the content of BM-VXLAN-VNI into the ping packet. The specific form is as follows:
[0074] ping BM-IP -p BM-VXLAN-VNI -c xx -i yy.
[0075] The BMGW service receives the ICMP request to detect the BM, detects the ping packet, and extracts the VNI as the VNI parameter for encapsulating the BM VXLAN tunnel packet;
[0076] The steps for the BMGW service to receive the ICMP request to detect the BM, detect the ping packet, and extract the VNI as the VNI parameter for encapsulating the BM VXLAN tunnel packet include:
[0077] The BMGW service receives the ICMP request to detect the BM;
[0078] Detect the ping packet;
[0079] If there is BM-VXLAN-VNI in the ping packet, extract the BM-VXLAN-VNI field;
[0080] Use the BM-VXLAN-VNI field to find the subnet of the BM, obtain the subnet gateway IP and the VXLAN information required to access the BM;
[0081] As the VNI parameter for BM VXLAN tunnel packet encapsulation.
[0082] Among them, ICMP is the protocol used by Ping. Ping uses the requests and replies in the ICMP protocol to perform functions. When sending a Ping request, the Ping tool creates an ICMP request message and sends it to the target host, and then waits for the ICMP reply response from the target host.
[0083] The BMGW service modifies the source IP of the ping packet according to the information queried by the VNI, fills the source IP into the ping packet, encapsulates the VXLAN packet using the VNI where the BM is located, and sends it to the LEAF node;
[0084] The step that the BMGW service modifies the source IP of the ping packet according to the information queried by the VNI, fills the source IP into the ping packet, and encapsulates the VXLAN packet using the VNI where the BM is located and sends it to the LEAF node includes:
[0085] The BMGW service queries the information according to the VNI;
[0086] Use the subnet gateway IP to replace the source IP of the ping packet;
[0087] Fill the source IP of the ping packet into the ping packet;
[0088] Encapsulate the original ping packet using the VXLAN encapsulation information;
[0089] Send the encapsulated original ping packet to the LEAF node.
[0090] The step of sending the encapsulated original ping packet to the LEAF node includes:
[0091] The BM receives the request of the ping packet and generates a reply packet;
[0092] The reply packet is encapsulated with VXLAN by the BM access switch;
[0093] Forwarded to the BMGW cluster members, and the cluster members detect that the ping reply packet is a reply packet requesting the subnet gateway IP;
[0094] If the BM's real IP carried in the ping packet is for the local machine, then use the BM's real IP to replace the destination IP of the inner-layer ping packet and send it to the kernel. If it is not for the local machine, then use the BM's real IP to replace the destination IP of VXLAN and send it to the LEAF node.
[0095] The BMGW cluster member receives the replied ping packet and forwards the ping packet to the cluster member that made the source request according to the data in the ping packet;
[0096] The step that the BMGW cluster member receives the replied ping packet and forwards the ping packet to the cluster member that made the source request according to the data in the ping packet includes:
[0097] The BMGW cluster member receives the replied ping packet;
[0098] The BMGW cluster member needs to parse the received replied ping packet;
[0099] Forward the ping packet to the cluster member that made the source request according to the data in the ping packet.
[0100] After receiving the ping packet, the cluster member that made the source request restores the ping packet according to the data in the ping packet and sends it to the kernel.
[0101] The step that the BMGW-VIP cluster member that made the source request receives the ping packet, restores the ping packet according to the ping packet, and sends it to the kernel includes:
[0102] The BMGW-VIP cluster member that made the source request receives the ping packet;
[0103] Detect the received ping packet;
[0104] Restore the ping packet according to the ping packet;
[0105] Send it to the kernel.
[0106] Embodiment 2
[0107] Figure 6 It is a schematic diagram of a system for the BMGW-VIP cluster to actively detect the BM provided by an embodiment of the present application. As Figure 6 shown, a system for the BMGW-VIP cluster to actively detect the BM, the system includes:
[0108] A sending request module, which is used to use the ping program in the BMGW-VIP cluster member to detect the IP of the BM, specify the VNI where the BM is located using the -p parameter, and the ping program uses ICMP to send a request to detect the BM to the BMGW service;
[0109] Detection module: The BMGW service receives an ICMP probe BM request, detects the ping packet, and extracts the VNI as the VNI parameter for encapsulating the BMVXLAN tunnel packet.
[0110] Modification module: Used for the BMGW service to modify the source IP of the ping packet according to the information queried by the VNI, fill the source IP into the ping packet, encapsulate the VXLAN packet with the VNI where the BM is located, and send it to the LEAF node.
[0111] Forwarding module: Used for the BMGW cluster members to receive the replied ping packet and forward the ping packet to the cluster member requested by the source according to the data in the ping packet.
[0112] Send to kernel module: Used for the cluster member requested by the source to restore the ping packet according to the data in the ping packet after receiving it and send it to the kernel.
[0113] Embodiment 3
[0114] Figure 4 It is a schematic diagram of the packet forwarding process related to the BMGW service provided by an embodiment of the present application. As Figure 4 shown, the packet forwarding process related to the BMGW service includes:
[0115] After the BMGW of BMGW member 1 receives the ping packet through the VETH-BMGW interface, it detects the content of the ping packet. If the BM-VXLAN-VNI exists in the ping packet, it extracts this field, uses the BM-VXLAN-VNIi field to find the subnet of the BM, obtains the subnet gateway IP and the VXLAN information required to access the BM, replaces the source IP of the ping packet with the subnet gateway IP, fills the source IP of the packet into the ping packet, encapsulates the original ping packet with the VXLAN encapsulation information. After the BM receives the ping request from the BM, it generates a reply packet. After the reply packet is encapsulated with VXLAN by the BM access switch, it is forwarded to a certain member of the BMGW cluster. The cluster member detects the ping reply and finds that it is a reply packet requesting the subnet gateway IP. If the BM real IP carried in the ping packet is for this machine, it replaces the destination IP of the inner-layer ping packet with the BM real IP and sends it to the kernel; if it is not for this machine, it replaces the destination IP of the VXLAN with the BM real IP and sends it to the LEAF node. The LEAF node forwards the packet to the real member node. After the cluster member node receives the packet and detects that the content of the ping reply belongs to this machine, it replaces the destination IP of the inner-layer ping packet with the BM real IP and sends it to the kernel.
[0116] As Figure 5As shown in the figure, the detailed steps of message forwarding related to BMGW service are as follows:
[0117] Receive a ping request message, that is, request message 1. The source IP of the message is the real IP of BMGW, the destination IP is the IP of the target BM, and the content is the content filled with -p;
[0118] The BMGW service extracts the VNI information, searches for the subnet according to the content of the VNI information, and obtains the subnet gateway IP and VXLAN encapsulation information;
[0119] The BMGW service replaces the source IP of request message 1 with the subnet gateway IP and fills the real IP of BM into the data to generate request message 2;
[0120] The BMGW service encapsulates request message 2 with VXLAN information to generate request message 3;
[0121] The BMGW service receives the reply message from the BM and replies with the reply message;
[0122] Judging according to the real IP of BM in the reply message, if the ping message is not the reply message requested by the local machine, then use the real IP of BM to replace the destination IP of the outer layer of VXLAN and reply with message 2;
[0123] Decapsulate reply message 2, modify the destination IP to the real IP of BM according to the filled content of the reply message, generate reply message 3, and then send it to the Linux kernel.
[0124] Embodiment 4
[0125] Figure 7 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. As Figure 7 shown, according to another aspect of the present application, an electronic device 500 is further provided. The electronic device 500 may include one or more processors and one or more memories. Among them, computer-readable code is stored in the memory, and when the computer-readable code is run by one or more processors, it can execute a method for actively detecting BM by a BMGW-VIP cluster.
[0126] The method or system according to the embodiment of the present application can also be implemented by means of Figure 7 the architecture of the electronic device shown. As Figure 7As shown in the figure, the electronic device 500 may include a bus 501, one or more CPUs 502, a read-only memory (ROM) 503, a random access memory (RAM) 504, a communication port 505 connected to a network, an input / output component 506, a hard disk 507, etc. The storage device in the electronic device 500, such as the ROM 503 or the hard disk 507, may store a method for actively detecting a BM in a BMGW-VIP cluster provided in this application. A method for actively detecting a BM in a BMGW-VIP cluster may, for example, include: using the ping program to detect the IP of the BM among the BMGW-VIP cluster members, specifying the VNI where the BM is located using the -p parameter, and the ping program sending a request to detect the BM to the BMGW service using ICMP; the BMGW service receiving the ICMP request to detect the BM, detecting the ping packet, and extracting the VNI as the VNI parameter encapsulated in the BMVXLAN tunnel packet; the BMGW service modifying the source IP of the ping packet according to the information queried by the VNI and filling the source IP into the ping packet, encapsulating the VXLAN packet using the VNI where the BM is located and sending it to the LEAF node; the BMGW cluster member receiving the replied ping packet and forwarding the ping packet to the cluster member that sent the original request according to the data in the ping packet; the cluster member that sent the original request restoring the ping packet according to the data in the ping packet after receiving it and sending it to the kernel. Further, the electronic device 500 may also include a user interface 508. Of course, Figure 7 The architecture shown is only exemplary. When implementing different devices, one or more components shown in the electronic device may be omitted according to actual needs. Figure 7
[0127] Embodiment 5
[0128] Figure 8 It is a schematic diagram of the structure of a computer-readable storage medium provided by an embodiment of this application. As Figure 8 shown, it is a computer-readable storage medium 600 according to an embodiment of this application. Computer-readable instructions are stored on the computer-readable storage medium 600. When the computer-readable instructions are run by a processor, a method for actively detecting a BM in a BMGW-VIP cluster according to the embodiment of this application described with reference to the above drawings can be executed. The storage medium 600 includes, but is not limited to, for example, volatile memory and / or non-volatile memory. Volatile memory may, for example, include random access memory (RAM) and cache memory, etc. Non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, etc.
[0129] It should be understood that the methods, apparatuses, and devices of the present application can be implemented in many ways. For example, the methods, apparatuses, and devices of the present application can be implemented through software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is only for illustration purposes, and the steps of the method of the present application are not limited to the specific order described above, unless otherwise specifically stated. In addition, in some embodiments, the present application can also be implemented as a program recorded in a recording medium, and these programs include machine-readable instructions for implementing the method according to the present application. Therefore, the present application also covers a recording medium storing a program for executing the method according to the present application.
[0130] In addition, parts of the above technical solutions provided in the embodiments of the present application that are consistent with the implementation principles of the corresponding technical solutions in the prior art are not described in detail to avoid excessive elaboration.
[0131] As described above in the specific embodiments, the objectives, technical solutions, and beneficial effects of the present invention have been further described in detail. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for actively detecting BM in a BMGW-VIP cluster, characterized in that, Including the following steps: Use the ping program in the BMGW-VIP cluster members to detect the IP of the BM, specify the VNI where the BM is located using the -p parameter, and the ping program uses ICMP to send a request to detect the BM to the BMGW service; The BMGW service receives the ICMP request to detect the BM, detects the ping packet, and extracts the VNI as the VNI parameter for encapsulating the BM VXLAN tunnel packet; The BMGW service modifies the source IP of the ping packet according to the information queried by the VNI, fills the source IP into the ping packet, encapsulates the VXLAN packet using the VNI where the BM is located, and sends it to the LEAF node; The BMGW cluster members receive the replied ping packet and forward the ping packet to the cluster member that requested the source according to the data in the ping packet; The cluster member that requested the source restores the ping packet according to the data in the ping packet after receiving the ping packet and sends it to the kernel.
2. The method for actively detecting BM in a BMGW-VIP cluster according to claim 1, wherein The step of using the ping program in the BMGW-VIP cluster members to detect the IP of the BM, specifying the VNI where the BM is located using the -p parameter, and the ping program using ICMP to send a request to detect the BM to the BMGW service includes: Fill the parameter -p through the content of the general ping program to specify the VNI where the BM is located. The VNI is the tunnel identifier of VXLAN. By executing the -p parameter, the general ping program can automatically fill the content of BM-VXLAN-VNI into the ping packet. The specific form is as follows: ping BM-IP -p BM-VXLAN-VNI -c xx -i yy.
3. The method for actively detecting BM in a BMGW-VIP cluster according to claim 1, wherein The step that the BMGW service receives the ICMP request to detect the BM, detects the ping packet, and extracts the VNI as the VNI parameter for encapsulating the BM VXLAN tunnel packet includes: The BMGW service receives the ICMP request to detect the BM; Detect the ping packet; If there is BM-VXLAN-VNI in the ping packet, extract the BM-VXLAN-VNI field; Use the BM-VXLAN-VNI field to find the subnet of the BM, obtain the subnet gateway IP and the VXLAN information required to access the BM; As the VNI parameter for encapsulating the BM VXLAN tunnel packet.
4. The method for actively detecting a BM in a BMGW-VIP cluster according to claim 1, characterized in that, The step that the BMGW service modifies the source IP of the ping packet according to the information queried by the VNI, fills the source IP into the ping packet, encapsulates the VXLAN packet using the VNI where the BM is located, and sends it to the LEAF node includes: The BMGW service queries the information according to the VNI; Replace the source IP of the ping packet with the subnet gateway IP; Fill the source IP of the ping packet into the ping packet; Encapsulate the original ping packet using the VXLAN encapsulation information; Send the encapsulated original ping packet to the LEAF node.
5. The method for actively detecting a BM in a BMGW-VIP cluster according to claim 4, wherein, The step of sending the encapsulated original ping packet to the LEAF node includes: The BM receives the request of the ping packet and generates a reply packet; The reply packet is encapsulated with VXLAN by the BM access switch; Forward it to the BMGW cluster members. The cluster members detect that the ping reply packet is a reply packet requesting the IP of the subnet gateway. If the real BM IP carried in the ping packet is for the local machine, replace the destination IP of the inner-layer ping packet with the real BM IP and send it to the kernel. If it is not for the local machine, replace the destination IP of VXLAN with the real BM IP and send it to the LEAF node.
6. The method for actively detecting BM in a BMGW-VIP cluster according to claim 1, characterized in that, The steps for the BMGW cluster members to receive the replied ping packet and forward the ping packet to the cluster member that sent the original request according to the data in the ping packet include: The BMGW cluster members receive the replied ping packet. The BMGW cluster members need to parse the received replied ping packet. Forward the ping packet to the cluster member that sent the original request according to the data in the ping packet.
7. The method for actively detecting a BM in a BMGW-VIP cluster according to claim 1, wherein The steps for the cluster member of the BMGW-VIP that sent the original request to receive the ping packet, restore the ping packet, and send it to the kernel include: The cluster member of the BMGW-VIP that sent the original request receives the ping packet. Detect the received ping packet. Restore the ping packet according to the ping packet. Send it to the kernel.
8. A system for actively detecting BM in a BMGW-VIP cluster, characterized in that, The system includes: A sending request module, which is used to use the ping program in the BMGW-VIP cluster members to detect the IP of the BM, specify the VNI where the BM is located using the -p parameter, and the ping program uses ICMP to send a request to detect the BM to the BMGW service. A detection module. The BMGW service receives the ICMP request to detect the BM, detects the ping packet, and extracts the VNI as the VNI parameter for encapsulating the BM VXLAN tunnel packet. A modification module, which is used for the BMGW service to query information according to the VNI, modify the source IP of the ping packet and fill the source IP into the ping packet, encapsulate the VXLAN packet using the VNI where the BM is located and send it to the LEAF node. A forwarding module, which is used for the BMGW cluster members to receive the replied ping packet and forward the ping packet to the cluster member that sent the original request according to the data in the ping packet. A sending to kernel module, which is used for the cluster member that sent the original request to restore the ping packet according to the data in the ping packet after receiving the ping packet and send it to the kernel.
9. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, it realizes the steps in a method for the BMGW-VIP cluster to actively detect the BM as described in any one of claims 1-7.
10. A readable storage medium, characterized in that, The readable storage medium stores a computer program, and the computer program is suitable for being loaded by the processor to execute a method for the BMGW-VIP cluster to actively detect the BM as described in any one of claims 1-7.
Citation Information
Patent Citations
Method and device for supporting HaVip in traditional bare computer access scene
CN116346445A
Cloud scene network storage load balancing access method and system
CN116366541A