Method and apparatus for proxying a response to address request message, electronic device, and storage medium

By receiving detection packets in the static tunnel between tunnel endpoints in the VXLAN network to obtain the target network address, the problem of ARP packet flooding is solved and network performance is improved.

WO2024222010A1PCT designated stage expired Publication Date: 2024-10-31INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/142081
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-27
Filing Date
2023-12-26
Publication Date
2024-10-31

AI Technical Summary

Technical Problem

A large number of ARP request packets on the VXLAN network cause packet flooding, occupy a large amount of network resources, and cause network performance to degrade.

Method used

By establishing a static tunnel between tunnel endpoints, receiving detection packets to obtain the target network address, and answering when an address request packet is received, broadcasting is avoided and the required address is obtained directly from the stored network address.

Benefits of technology

This reduces the number of broadcasts of ARP messages, reduces network resource usage, and improves network performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023142081_31102024_PF_FP_ABST
    Figure CN2023142081_31102024_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the technical field of communications, and provide a method and apparatus for proxying a response to an address request message, an electronic device, and a nonvolatile readable storage medium. The method is applied to a first tunnel endpoint, and the method comprises: receiving a first detection message sent by a second tunnel endpoint; acquiring first network addresses carried by the first detection message, wherein the first detection message is generated by the second tunnel endpoint according to the stored first network addresses, and the first network addresses are network addresses of a first device corresponding to the second tunnel endpoint; and when a first address request message is received, acquiring a first target network address from the first network addresses, and sending the first target network address to a second device so as to proxy a response to the first address request message, wherein the first target network address is a first network address requested by the first address request message, and the second device is a device for sending the first address request message to the first tunnel endpoint. Therefore, network resources occupied can be reduced, and the network performance is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Address request message answering method, device, electronic device and storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on April 27, 2023, with application number 202310467846.5, and application name “Address request message answering method, device, electronic device and storage medium”, all contents of which are incorporated by reference into this application. Technical Field

[0003] The present application belongs to the field of communication technology, and in particular relates to a method, device, electronic device and non-volatile readable storage medium for answering an address request message. Background Art

[0004] Virtual eXtensible local area network (VXLAN) is a network virtualization technology. The access points of VXLAN are virtual tunnel endpoints (VTEPs). Local devices in the VXLAN network send Address Resolution Protocol (ARP) request packets to the corresponding VTEPs. The VTEPs can obtain the network address of the target device requested by the ARP request packets from the VXLAN network, allowing the local devices to communicate with the target device based on the network addresses.

[0005] Communication networks typically configure both static and dynamic tunnels. In VXLAN scenarios, when a VTEP in a static tunnel receives an ARP request, it broadcasts it, obtaining the target device's network address, such as the media access control (MAC) address, from the VXLAN network. However, if the VTEP receives a large number of ARP requests and broadcasts them, the VXLAN network may experience message flooding, consuming significant network resources and degrading network performance.

[0006] Summary of the Invention

[0007] The present application provides an address request message answering method, device, electronic device and non-volatile readable storage medium to solve the problem of message flooding occupying a large amount of network resources and causing network performance degradation.

[0008] In order to solve the above technical problems, this application is implemented as follows:

[0009] In a first aspect, some embodiments of the present application provide a method for replying an address request message, applied to a first tunnel endpoint, the method comprising:

[0010] receiving a first detection message sent by a second tunnel endpoint;

[0011] Obtaining a first network address carried in the first detection message; the first detection message is generated by the second tunnel endpoint based on the stored first network address, and the first network address is the network address of the first device corresponding to the second tunnel endpoint;

[0012] Upon receiving the first address request message, the first target network address is obtained from the first network address, and the first target network address is sent to the second device to answer the first address request message; the first target network address is the first network address requested by the first address request message, and the second device is the device that sends the first address request message to the first tunnel endpoint.

[0013] In some embodiments, further comprising:

[0014] Generate a second detection message according to the second network address stored in the first tunnel endpoint; the second network address is the network address of the third device corresponding to the first tunnel endpoint;

[0015] A second detection message is sent to the second tunnel endpoint; the second detection message is used for the second tunnel endpoint to obtain the second network address carried by the second detection message, and upon receiving the second address request message, obtain the second target network address from the second network address, and send the second target network address to the fourth device to answer the second address request message; the second target network address is the second network address requested by the second address request message, and the fourth device is the device that sends the second address request message to the second tunnel endpoint.

[0016] In some embodiments, a static tunnel is established between the first tunnel endpoint and the second tunnel endpoint, and the method further includes:

[0017] Get the tunnel name and tunnel ID of a static tunnel;

[0018] Generating a second detection message according to the second network address stored in the first tunnel endpoint includes:

[0019] Generate a second detection message according to the second network address, tunnel name, and tunnel identifier stored at the first tunnel endpoint;

[0020] Sending a second detection message to the second tunnel endpoint includes:

[0021] Determine a first target tunnel from a plurality of static tunnels corresponding to the first tunnel endpoint according to the tunnel name and the tunnel identifier;

[0022] A second detection message is sent to the second tunnel endpoint through the first target tunnel.

[0023] In some embodiments, before generating the second detection message based on the second network address, tunnel name, and tunnel identifier stored by the first tunnel endpoint, the method further includes:

[0024] Establishing a session between the first tunnel endpoint and the second tunnel endpoint according to the tunnel name and the tunnel identifier;

[0025] Sending a second detection message to a second tunnel endpoint through the first target tunnel includes:

[0026] When the session status is maintained, a second detection message is sent to the second tunnel endpoint through the first target tunnel.

[0027] In some embodiments, after obtaining the first network address carried by the first detection message, the method further includes:

[0028] storing the first network address in a first database;

[0029] Acquiring a first target network address from the first network address and sending the first target network address to the second device includes:

[0030] A first target network address is obtained from the first network addresses stored in the first database, and the first target network address is sent to the second device.

[0031] In some embodiments, the method further comprises:

[0032] Upon receiving a third detection message sent by the second tunnel endpoint, updating the first network address stored in the first database according to the latest first network address carried in the third detection message to obtain an updated first database; the third detection message is generated by the second tunnel endpoint according to the latest first network address;

[0033] Acquiring a first target network address from a first network address stored in a first database includes:

[0034] The first target network address is obtained from the first network addresses stored in the updated first database.

[0035] In some embodiments, after updating the first network address stored in the first database according to the latest first network address carried by the third detection message and obtaining the updated first database, the method further includes:

[0036] Resetting a preset first timing parameter to zero and controlling the first timing parameter to restart timing; the first timing parameter is used to represent the length of time the first database has not been updated;

[0037] When the first timing parameter is greater than a preset time threshold, the first network address stored in the first database is deleted.

[0038] In some embodiments, obtaining the first target network address from the first network address stored in the first database includes:

[0039] Determining a first address identifier according to the first address request message;

[0040] According to the first address identifier, a first network address corresponding to the first address identifier is obtained from the first network addresses stored in the first database, and is determined as the first target network address.

[0041] In a second aspect, some embodiments of the present application provide a method for replying an address request message, which is applied to a second tunnel endpoint. The method includes:

[0042] Generate a first detection message according to the first network address stored in the second tunnel endpoint; the first network address is the network address of the first device corresponding to the second tunnel endpoint;

[0043] A first detection message is sent to the first tunnel endpoint; the first detection message is used for the first tunnel endpoint to obtain the first network address, and upon receiving the first address request message, obtain the first target network address from the first network address, and send the first target network address to the second device to answer the first address request message; the first target network address is the first network address requested by the first address request message, and the second device is the device that sends the first address request message to the first tunnel endpoint.

[0044] In some embodiments, the method further comprises:

[0045] receiving a second detection message sent by the first tunnel endpoint;

[0046] Obtaining a second network address carried in the second detection message; the second detection message is generated by the first tunnel endpoint according to the stored second network address, and the second network address is the network address of the second device corresponding to the first tunnel endpoint;

[0047] When the second address request message is received, the second target network address is obtained from the second network address, and the second target network address is sent to the fourth device to answer the second address request message; the second target network address is the second network address requested by the second address request message, and the fourth device is the device that sends the second address request message to the second tunnel endpoint.

[0048] In some embodiments, a static tunnel is established between the first tunnel endpoint and the second tunnel endpoint, and the method further includes:

[0049] Get the tunnel name and tunnel ID of a static tunnel;

[0050] Generating a first detection message according to the first network address stored at the second tunnel endpoint includes:

[0051] Generate a first detection message according to the first network address, tunnel name and tunnel identifier stored in the second tunnel endpoint;

[0052] Sending a first detection message to a first tunnel endpoint includes:

[0053] Determine, according to the tunnel name and the tunnel identifier, a second target tunnel from a plurality of static tunnels corresponding to the second tunnel endpoint;

[0054] A first detection message is sent to the first tunnel endpoint through the second target tunnel.

[0055] In some embodiments, before generating the first detection message based on the first network address, tunnel name, and tunnel identifier stored at the second tunnel endpoint, the method further includes:

[0056] Establishing a session between the first tunnel endpoint and the second tunnel endpoint according to the tunnel name and the tunnel identifier;

[0057] Sending a first detection message to the first tunnel endpoint through the second target tunnel includes:

[0058] When the session status is maintained, a first detection message is sent to the first tunnel endpoint through the second target tunnel.

[0059] In some embodiments, after obtaining the second network address carried by the second detection message, the method further includes:

[0060] storing the second network address in a second database;

[0061] Acquiring a second target network address from the second network address and sending the second target network address to the first device includes:

[0062] Acquire the second target network address from the second network addresses stored in the second database, and send the second target network address to the fourth device.

[0063] In some embodiments, the method further comprises:

[0064] Upon receiving the fourth detection message sent by the first tunnel endpoint, updating the second network address stored in the second database according to the latest second network address carried in the fourth detection message to obtain an updated second database; the fourth detection message is generated by the first tunnel endpoint according to the latest second network address;

[0065] Acquiring a second target network address from the second network address stored in the second database includes:

[0066] The second target network address is obtained from the second network addresses stored in the updated second database.

[0067] In some embodiments, after updating the second network address stored in the second database according to the latest second network address carried by the fourth detection message and obtaining the updated second database, the method further includes:

[0068] Resetting a preset second timing parameter to zero and controlling the second timing parameter to restart timing; the second timing parameter is used to represent the length of time the second database has not been updated;

[0069] When the second timing parameter is greater than the preset time threshold, the second network address stored in the second database is deleted.

[0070] In some embodiments, obtaining the second target network address from the second network addresses stored in the second database includes:

[0071] Determining a second address identifier according to the second address request message;

[0072] According to the second address identifier, the second network address corresponding to the second address identifier is obtained from the second network addresses stored in the second database, and is determined as the second target network address.

[0073] In a third aspect, some embodiments of the present application provide an address request message answering device, applied to a first tunnel endpoint, the device comprising:

[0074] A first receiving module, configured to receive a first detection message sent by a second tunnel endpoint;

[0075] A first acquisition module is configured to acquire a first network address carried in the first detection message; the first detection message is generated by the second tunnel endpoint based on the stored first network address, and the first network address is the network address of the first device corresponding to the second tunnel endpoint;

[0076] The first answering module is used to obtain the first target network address from the first network address when receiving the first address request message, and send the first target network address to the second device to answer the first address request message; the first target network address is the first network address requested by the first address request message, and the second device is the device that sends the first address request message to the first tunnel endpoint.

[0077] In some embodiments, the apparatus further comprises:

[0078] A second generating module is configured to generate a second detection message according to a second network address stored in the first tunnel endpoint; the second network address is a network address of a third device corresponding to the first tunnel endpoint;

[0079] The second sending module is used to send a second detection message to the second tunnel endpoint; the second detection message is used for the second tunnel endpoint to obtain the second network address carried by the second detection message, and when receiving the second address request message, obtain the second target network address from the second network address, and send the second target network address to the fourth device to answer the second address request message; the second target network address is the second network address requested by the second address request message, and the fourth device is the device that sends the second address request message to the second tunnel endpoint.

[0080] In some embodiments, a static tunnel is established between the first tunnel endpoint and the second tunnel endpoint, and the apparatus further comprises:

[0081] A second acquisition module is used to obtain the tunnel name and tunnel identifier of the static tunnel;

[0082] The second generation module is specifically used for:

[0083] Generate a second detection message according to the second network address, tunnel name, and tunnel identifier stored at the first tunnel endpoint;

[0084] The second sending module is specifically configured to:

[0085] Determine a first target tunnel from a plurality of static tunnels corresponding to the first tunnel endpoint according to the tunnel name and the tunnel identifier;

[0086] A second detection message is sent to the second tunnel endpoint through the first target tunnel.

[0087] In some embodiments, the apparatus further comprises:

[0088] a first session module configured to establish a session between the first tunnel endpoint and the second tunnel endpoint based on the tunnel name and the tunnel identifier before the second generation module generates the second detection message based on the second network address, the tunnel name, and the tunnel identifier stored in the first tunnel endpoint;

[0089] The second sending module is further configured to:

[0090] When the session status is maintained, a second detection message is sent to the second tunnel endpoint through the first target tunnel.

[0091] In some embodiments, the apparatus further comprises:

[0092] a first storage module, configured to store the first network address in a first database after the first acquisition module acquires the first network address carried in the first detection message;

[0093] The first answering module is specifically used for:

[0094] A first target network address is obtained from the first network addresses stored in the first database, and the first target network address is sent to the second device.

[0095] In some embodiments, the apparatus further comprises:

[0096] a first updating module configured to, upon receiving a third detection message sent by the second tunnel endpoint, update the first network address stored in the first database according to the latest first network address carried in the third detection message, thereby obtaining an updated first database; the third detection message being generated by the second tunnel endpoint according to the latest first network address;

[0097] The first answering module is further specifically configured to obtain a first target network address from the first network address stored in the updated first database.

[0098] In some embodiments, the apparatus further comprises:

[0099] a first timing module, configured for the first update module to update the first network address stored in the first database based on the latest first network address carried in the third detection message, and after obtaining the updated first database, to reset a preset first timing parameter to zero and control the first timing parameter to restart timing; the first timing parameter is used to represent a length of time the first database has not been updated;

[0100] The first deleting module is configured to delete the first network address stored in the first database when the first timing parameter is greater than a preset time threshold.

[0101] In some embodiments, the first answering module is further configured to:

[0102] Determining a first address identifier according to the first address request message;

[0103] According to the first address identifier, a first network address corresponding to the first address identifier is obtained from the first network addresses stored in the first database, and is determined as the first target network address.

[0104] In a fourth aspect, some embodiments of the present application provide an address request message answering device, applied to a second tunnel endpoint, the device comprising:

[0105] A first generating module, configured to generate a first detection message according to a first network address stored in the second tunnel endpoint; the first network address is a network address of a first device corresponding to the second tunnel endpoint;

[0106] The first sending module is used to send a first detection message to the first tunnel endpoint; the first detection message is used for the first tunnel endpoint to obtain the first network address, and when receiving the first address request message, obtain the first target network address from the first network address, and send the first target network address to the second device to answer the first address request message; the first target network address is the first network address requested by the first address request message, and the second device is the device that sends the first address request message to the first tunnel endpoint.

[0107] In some embodiments, the apparatus further comprises:

[0108] A second receiving module, configured to receive a second detection message sent by the first tunnel endpoint;

[0109] A third acquisition module is used to obtain the second network address carried by the second detection message; the second detection message is generated by the first tunnel endpoint according to the stored second network address, and the second network address is the network address of the second device corresponding to the first tunnel endpoint;

[0110] The second answering module is used to obtain the second target network address from the second network address when receiving the second address request message, and send the second target network address to the fourth device to answer the second address request message; the second target network address is the second network address requested by the second address request message, and the fourth device is the device that sends the second address request message to the second tunnel endpoint.

[0111] In some embodiments, a static tunnel is established between the first tunnel endpoint and the second tunnel endpoint, and the apparatus further comprises:

[0112] A fourth acquisition module, configured to acquire a tunnel name and a tunnel identifier of a static tunnel;

[0113] The first generation module is specifically used for:

[0114] Generate a first detection message according to the first network address, tunnel name and tunnel identifier stored in the second tunnel endpoint;

[0115] The first sending module is specifically configured to:

[0116] Determine, according to the tunnel name and the tunnel identifier, a second target tunnel from a plurality of static tunnels corresponding to the second tunnel endpoint;

[0117] A first detection message is sent to the first tunnel endpoint through the second target tunnel.

[0118] In some embodiments, the apparatus further comprises:

[0119] a second session module, configured to establish a session between the first tunnel endpoint and the second tunnel endpoint according to the tunnel name and the tunnel identifier before the first generation module generates the first detection message according to the first network address, the tunnel name and the tunnel identifier stored in the second tunnel endpoint;

[0120] The first sending module is further configured to:

[0121] When the session status is maintained, a first detection message is sent to the first tunnel endpoint through the second target tunnel.

[0122] In some embodiments, after obtaining the second network address carried by the second detection message, the apparatus further includes:

[0123] a second storage module, configured to store the second network address in a second database;

[0124] The second generation answering module is specifically used for:

[0125] Acquire the second target network address from the second network addresses stored in the second database, and send the second target network address to the fourth device.

[0126] In some embodiments, the apparatus further comprises:

[0127] a second updating module, configured to, upon receiving a fourth detection message sent by the first tunnel endpoint, update the second network address stored in the second database according to the latest second network address carried in the fourth detection message, thereby obtaining an updated second database; the fourth detection message being generated by the first tunnel endpoint according to the latest second network address;

[0128] The second generation answering module is also used for:

[0129] The second target network address is obtained from the second network addresses stored in the updated second database.

[0130] In some embodiments, after updating the second network address stored in the second database according to the latest second network address carried by the fourth detection message and obtaining the updated second database, the apparatus further includes:

[0131] A second timing module is used to reset a preset second timing parameter to zero and control the second timing parameter to restart timing; the second timing parameter is used to represent the length of time the second database has not been updated;

[0132] The second deleting module is configured to delete the second network address stored in the second database when the second timing parameter is greater than a preset time threshold.

[0133] In some embodiments, the second answering module is further configured to:

[0134] Determining a second address identifier according to the second address request message;

[0135] According to the second address identifier, the second network address corresponding to the second address identifier is obtained from the second network addresses stored in the second database, and is determined as the second target network address.

[0136] In a fifth aspect, some embodiments of the present application provide an electronic device comprising: a processor, a memory, and a computer program stored in the memory and running on the processor, wherein when the processor executes the program, the address request message answering method of the first aspect or the second aspect is implemented.

[0137] In a sixth aspect, some embodiments of the present application provide a non-volatile readable storage medium, which, when the instructions in the non-volatile readable storage medium are executed by a processor of an electronic device, enables the electronic device to execute the address request message answering method of the first aspect or the second aspect.

[0138] In some embodiments of the present application, since the first detection message is generated by the second tunnel endpoint based on the stored first network address, and the first network address is the network address of the first device corresponding to the second tunnel endpoint, the first detection message carries the network address of the first device corresponding to the second tunnel endpoint. When the first tunnel endpoint receives the first detection message sent by the second tunnel endpoint and obtains the first network address carried in the first detection message, the first tunnel endpoint obtains the network address of the first device corresponding to the second tunnel endpoint. When the second device sends a first address request message to the first tunnel endpoint, requesting the network address of the first device corresponding to the second tunnel endpoint, the first tunnel endpoint can directly obtain the requested first target network address from the first network address and send the first target network address to the second device, thereby enabling the first tunnel endpoint to answer the first address request message on behalf of the first tunnel endpoint. In this way, the first tunnel endpoint can directly answer the first address request message based on the obtained first network address, avoiding the problem of message flooding caused by the VTEP broadcast message method in the related art, reducing network resource usage to a certain extent, and improving network performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0139] In order to more clearly illustrate the technical solutions in some embodiments of the present application or related technologies, a brief introduction is given below to the drawings required for use in the descriptions of some embodiments or related technologies. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0140] FIG1 is a flowchart of a method for answering an address request message provided by some embodiments of the present application;

[0141] FIG2 is a flowchart of another method for answering an address request message provided in some embodiments of the present application;

[0142] FIG3 is a schematic diagram of ARP request message suppression in the related art;

[0143] FIG4 is a schematic diagram of ARP broadcast suppression in the related art;

[0144] FIG5 is a schematic diagram of an ARP proxy reply in the related art;

[0145] FIG6 is a schematic diagram of BFD (Bidirectional Forwarding Detection) remote MAC address publication provided by some embodiments of the present application;

[0146] FIG7 is a schematic diagram of a service device architecture provided by some embodiments of the present application;

[0147] FIG8 is a schematic diagram of a service control flow provided by some embodiments of the present application;

[0148] FIG9 is a schematic diagram of a BFD keep-alive packet carrying a remote MAC address according to some embodiments of the present application;

[0149] FIG10 is a schematic diagram of a control flow of a BFD remote MAC address provided in some embodiments of the present application;

[0150] FIG11 is a structural diagram of an address request message answering device provided in some embodiments of the present application;

[0151] FIG12 is a structural diagram of another address request message answering device provided in some embodiments of the present application;

[0152] FIG13 is a schematic diagram of an electronic device provided in some embodiments of the present application. DETAILED DESCRIPTION

[0153] The following will be combined with the accompanying drawings of some embodiments of the present application to clearly and completely describe the technical solutions of some embodiments of the present application. Obviously, some of the embodiments described are part of the embodiments of the present application, not all of the embodiments. Based on some embodiments of the present application, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of this application.

[0154] FIG1 is a flowchart of a method for answering an address request message provided in some embodiments of the present application. As shown in FIG1 , the method is applied to a first tunnel endpoint and includes:

[0155] Step 101: Receive a first detection message sent by a second tunnel endpoint.

[0156] In some embodiments of the present application, the first tunnel endpoint and the second tunnel endpoint may be virtual tunnel endpoints (VTEPs) of a virtual extended local area network (VXLAN), and the first tunnel endpoint and the second tunnel endpoint may be connected via a tunnel. A tunnel is a virtual channel, and the two VXLAN communicating parties, namely the first tunnel endpoint and the second tunnel endpoint, believe that they are communicating directly and are unaware of the existence of the underlying network.

[0157] In some embodiments of the present application, the first detection message may be a message for detecting a bidirectional forwarding path failure between a first tunnel endpoint and a second tunnel endpoint. For example, a BFD message in the Bidirectional Forwarding Detection (BFD) technology. In some embodiments of the present application, in addition to content related to bidirectional forwarding path failure detection, the first detection message carries a first network address stored by the second tunnel endpoint, wherein the first network address is the network address of a local device learned by the second tunnel endpoint, and the network address may include an Internet Protocol (IP) address and a Medium Access Control (MAC) address.

[0158] It should be noted that BFD is a unified detection mechanism used to quickly detect and monitor the forwarding connectivity of links or IP routes in a network. BFD can establish a session between two network devices to detect the bidirectional forwarding path between them. After the session is established, a network device can periodically and rapidly send BFD packets. If it does not receive a reply from the peer network device within the detection time, it is considered that the bidirectional forwarding path between the two network devices has failed. The served upper-layer application is notified to perform appropriate fault handling.

[0159] Step 102, obtain the first network address carried in the first detection message; the first detection message is generated by the second tunnel endpoint according to the stored first network address, and the first network address is the network address of the first device corresponding to the second tunnel endpoint.

[0160] In some embodiments of the present application, the first device corresponding to the second tunnel endpoint may be a device connected to the second tunnel endpoint. The first device may be one or more, and some embodiments of the present application do not limit this. The second tunnel endpoint may learn the network address of the connected first device. Specifically, it may obtain and store the IP address and MAC address of the first device.

[0161] In some embodiments of the present application, when generating a first detection message, the second tunnel endpoint may, according to the message format, add the first network address of each first device corresponding to the second tunnel endpoint to the field corresponding to the optional content, so that the first detection message carries the first network address of each first device. For example, if the first detection message is a BFD message, the first network address may be added to the optional content field after byte 48, so that the BFD message carries the first network address. This is merely an example, and some embodiments of the present application are not limited to this.

[0162] In some embodiments of the present application, the first tunnel endpoint receives the first detection message, can perform an unpacking operation, obtain the first network address from the first detection message, and store the first network address in a specified location, for example, it can be stored in a first database so that it can be queried and obtained from the first database when the first address request message is received.

[0163] Step 103, when the first address request message is received, obtain the first target network address from the first network address, and send the first target network address to the second device to answer the first address request message; the first target network address is the first network address requested by the first address request message, and the second device is the device that sends the first address request message to the first tunnel endpoint.

[0164] In some embodiments of the present application, the second device may be one of the devices connected to the first tunnel endpoint. The second device generates a first address request message based on the known IP address of the target device to be accessed and the MAC address of the requested target device, and sends the first address request message to the first tunnel endpoint. The target device may be any first device corresponding to the second tunnel endpoint.

[0165] In some embodiments of the present application, the first network address requested by the first address request message may be the MAC address of the target device, and the target device may be any first device corresponding to the second tunnel endpoint, that is, the first target network address may be the MAC address of any first device corresponding to the second tunnel endpoint.

[0166] In some embodiments of the present application, upon receiving a first address request message, the first tunnel endpoint can determine the IP address of the target device requested by the second device based on the first address request message, search and obtain the MAC address of the target device corresponding to the IP address of the target device from the stored first network address based on the IP address of the target device, as the first target network address, and send the first target network address, i.e., the MAC address of the target device, to the second device, thereby enabling the first tunnel endpoint to answer the first address request message, i.e., reply to the first target network address requested by the second device.

[0167] For example, the first address request message may be an ARP request message. Upon receiving the ARP request message, the first tunnel endpoint may obtain the MAC address of the target device corresponding to the IP address of the target device from the stored first network address based on the IP address of the target device requested by the ARP request message, and reply to the second device as the first target network address, thereby answering the ARP request message on its behalf. The target device may be any first device corresponding to the second tunnel endpoint.

[0168] The address request message reply method in some embodiments of the present application is different from the operation in the related art in which VTEP broadcasts the ARP request message when it receives the ARP request message, and obtains the network address of the target device from the VXLAN network by broadcasting. This can avoid the first tunnel endpoint from broadcasting the first address request message. The first tunnel endpoint can directly reply to the address requested by the first address request message based on the obtained first network address, thereby avoiding the problem of message flooding. Furthermore, it can reduce the occupied network resources and improve network performance.

[0169] In some embodiments of the present application, since the first detection message is generated by the second tunnel endpoint based on the stored first network address, and the first network address is the network address of the first device corresponding to the second tunnel endpoint, the first detection message carries the network address of the first device corresponding to the second tunnel endpoint. When the first tunnel endpoint receives the first detection message sent by the second tunnel endpoint and obtains the first network address carried in the first detection message, the first tunnel endpoint obtains the network address of the first device corresponding to the second tunnel endpoint. When the second device sends a first address request message to the first tunnel endpoint, requesting the network address of the first device corresponding to the second tunnel endpoint, the first tunnel endpoint can directly obtain the requested first target network address from the first network address and send the first target network address to the second device, thereby enabling the first tunnel endpoint to answer the first address request message on behalf of the first tunnel endpoint. In this way, the first tunnel endpoint can directly answer the first address request message based on the obtained first network address, avoiding the problem of message flooding caused by the VTEP broadcast message method in the related art, reducing network resource usage to a certain extent, and improving network performance.

[0170] In some embodiments, the method further comprises:

[0171] Step 201: Generate a second detection message according to a second network address stored in a first tunnel endpoint; the second network address is a network address of a third device corresponding to the first tunnel endpoint.

[0172] In some embodiments of the present application, the third device corresponding to the first tunnel endpoint may be a device connected to the first tunnel endpoint. The third device may be one or more, and some embodiments of the present application are not limited thereto. The first tunnel endpoint may learn the network address of the connected third device. Specifically, it may obtain and store the IP address and MAC address of the third device.

[0173] In some embodiments of the present application, the first tunnel endpoint may, based on the message format of the detection message, add the second network address of each third device corresponding to the first tunnel endpoint to the field corresponding to the optional content of the second detection message, and then determine the detection message with the second network address added as the second detection message, so that the second detection message carries the second network address of each third device. For example, if the second detection message is a BFD message, the second network address may be added to the optional content field after byte 48 of the BFD message, so that the BFD message carries the second network address. This is merely an example, and some embodiments of the present application do not impose any limitation on this.

[0174] Step 202, sending a second detection message to the second tunnel endpoint; the second detection message is used for the second tunnel endpoint to obtain the second network address carried by the second detection message, and when receiving the second address request message, obtain the second target network address from the second network address, and send the second target network address to the fourth device to answer the second address request message; the second target network address is the second network address requested by the second address request message, and the fourth device is the device that sends the second address request message to the second tunnel endpoint.

[0175] In some embodiments of the present application, the first tunnel endpoint may send a second detection message to the second tunnel endpoint through a tunnel connected to the second tunnel endpoint. Upon receiving the second detection message, the second tunnel endpoint may decapsulate the message, obtain the second network address from the second detection message, and store the second network address in a designated location, such as a second database, so that the second network address can be retrieved from the second database upon receiving a second address request message.

[0176] In some embodiments of the present application, the fourth device may be one of the devices connected to the second tunnel endpoint. The fourth device generates a second address request message based on the known IP address of the target device to be accessed and the MAC address of the requested target device, and sends the second address request message to the first tunnel endpoint. The target device may be any third device corresponding to the first tunnel endpoint.

[0177] In some embodiments of the present application, the second network address requested by the second address request message may be the MAC address of the target device, and the target device may be any third device corresponding to the first tunnel endpoint, that is, the second target network address may be the MAC address of any third device corresponding to the first tunnel endpoint.

[0178] In some embodiments of the present application, upon receiving a second address request message, the second tunnel endpoint can determine the IP address of the target device requested by the fourth device based on the second address request message, obtain the MAC address of the target device corresponding to the IP address of the target device from the stored second network address based on the IP address of the target device, as the second target network address, and send the second target network address, i.e., the MAC address of the target device, to the fourth device, thereby enabling the second tunnel endpoint to answer the second address request message and reply to the second target network address requested by the fourth device.

[0179] In some embodiments of the present application, since the second detection message is generated by the first tunnel endpoint based on the stored second network address, and the second network address is the network address of the third device corresponding to the first tunnel endpoint, the second detection message carries the network address of the third device corresponding to the first tunnel endpoint. The first tunnel endpoint sends the second detection message to the second tunnel endpoint, so that the second tunnel endpoint receives and obtains the second network address carried in the second detection message. In this way, the second tunnel endpoint obtains the network address of the third device corresponding to the first tunnel endpoint. When the fourth device sends a second address request message to the second tunnel endpoint, requesting the network address of the third device corresponding to the first tunnel endpoint, the second tunnel endpoint can directly obtain the requested second target network address from the second network address and send the second target network address to the fourth device, thereby enabling the second tunnel endpoint to answer the second address request message on behalf of the second tunnel endpoint. In this way, the second tunnel endpoint can directly answer the second address request message based on the obtained second network address, avoiding the problem of message flooding caused by the VTEP broadcast message method in the related art, reducing network resource usage to a certain extent, and improving network performance.

[0180] In some embodiments, a static tunnel is established between the first tunnel endpoint and the second tunnel endpoint, and the method further includes:

[0181] Step 301: Obtain the tunnel name and tunnel identifier of a static tunnel.

[0182] In some embodiments, step 201 includes the following steps:

[0183] Step 2011: Generate a second detection message according to the second network address, tunnel name, and tunnel identifier stored at the first tunnel endpoint.

[0184] In some embodiments, step 202 includes the following steps:

[0185] Step 2022: Determine the first target tunnel from the multiple static tunnels corresponding to the second tunnel endpoint according to the tunnel name and the tunnel identifier.

[0186] Step 2023: Send a second detection message to the second tunnel endpoint through the first target tunnel.

[0187] In some embodiments of the present application, a static tunnel is established between a first tunnel endpoint and a second tunnel endpoint. Specifically, static routing and virtual local area network (VLAN) settings can be configured between the first tunnel endpoint and the second tunnel endpoint, and then a VXLAN static tunnel interface instance is created to establish a static tunnel between the first tunnel endpoint and the second tunnel endpoint. Specific configuration and creation methods can be found in the description of related technologies, and some embodiments of the present application do not limit this.

[0188] In some embodiments of the present application, the first tunnel endpoint can obtain the tunnel name and tunnel identifier of the VXLAN static tunnel from the upper layer application of the VXLAN network, wherein the tunnel identifier can be an identification identifier (VXLAN network identifier, VNI) of the VXLAN network. The first tunnel endpoint can add the second network address of each third device corresponding to the first tunnel endpoint, as well as the obtained tunnel name and tunnel identifier, to the field corresponding to the optional content of the second detection message according to the message format of the detection message, and then determine the added detection message as the second detection message, so that the second detection message carries the second network address of each third device, and carries the tunnel name and tunnel identifier of the VXLAN static tunnel. The tunnel name and tunnel identifier of the VXLAN static tunnel can be used by the second tunnel endpoint to perform tunnel identification according to the tunnel name and tunnel identifier after receiving the second detection message to determine the target tunnel connected to the first tunnel endpoint.

[0189] In some embodiments of the present application, a first tunnel endpoint may be connected to multiple static tunnels. The first tunnel endpoint may identify the static tunnel connected to the second tunnel endpoint based on the tunnel name and tunnel identifier of the static tunnel, and determine the static tunnel connected to the second tunnel endpoint from the multiple static tunnels as the first target tunnel. Specifically, based on the tunnel name and tunnel identifier, the static route corresponding to the static tunnel connected to the first tunnel endpoint and the second tunnel endpoint may be configured, that is, the tunnel name and tunnel identifier may be configured as the next hop of the static route, thereby determining the static tunnel connected to the first tunnel endpoint and the second tunnel endpoint as the first target tunnel.

[0190] In some embodiments of the present application, the tunnel name and tunnel identifier of a static tunnel are obtained; a second detection message is generated based on the second network address, tunnel name, and tunnel identifier stored at the first tunnel endpoint; a first target tunnel is determined from multiple static tunnels corresponding to the first tunnel endpoint based on the tunnel name and tunnel identifier; and the second detection message is sent to the second tunnel endpoint via the first target tunnel. In this way, the first tunnel endpoint can conveniently identify the static tunnel connected to the second tunnel endpoint based on the tunnel name and tunnel identifier, determine the first target tunnel, and thus conveniently send the second detection message to the second tunnel endpoint via the first target tunnel, so that the second tunnel endpoint can receive the second detection message. This can improve the practicality of the address request message reply method of the embodiments of the present application to a certain extent.

[0191] In some embodiments, before step 2011, the method further includes:

[0192] Step 401: Establish a session between a first tunnel endpoint and a second tunnel endpoint according to the tunnel name and tunnel identifier.

[0193] Step 2023 may include the following steps:

[0194] Step 2023a: When the session status is maintained, a second detection message is sent to the second tunnel endpoint through the first target tunnel.

[0195] In some embodiments of the present application, the first tunnel endpoint can generate a session negotiation message based on the tunnel name, tunnel identifier and the identifier of the first tunnel endpoint, and send the session negotiation message to the second tunnel endpoint. After receiving the session negotiation message, the second tunnel endpoint can obtain the tunnel name and tunnel identifier carried in the session negotiation message, and match them with the tunnel name and tunnel identifier stored locally by the second tunnel endpoint. If the tunnel name and tunnel identifier are consistent, the match is successful, and the second tunnel endpoint learns the identifier of the first tunnel endpoint, thereby establishing a session with the first tunnel endpoint.

[0196] In some embodiments of the present application, when a session is established between a first tunnel endpoint and a second tunnel endpoint, normal two-way communication can be determined by periodically sending messages. If both parties can receive messages sent by the other party, the session status is maintained. If either party cannot receive messages sent by the other party, the session status is disconnected.

[0197] In some embodiments of the present application, when the session state established between the first tunnel endpoint and the second tunnel endpoint is maintained, indicating that the two-way communication between the first tunnel endpoint and the second tunnel endpoint is normal, the first tunnel endpoint sends a second detection message to the second tunnel endpoint through the first target tunnel, so that the second tunnel endpoint can receive the second detection message, which can improve the success rate of sending the second detection message to a certain extent. Furthermore, the second tunnel endpoint can obtain the second network address from the second detection message, thereby answering the second address request message sent to the second tunnel endpoint on behalf of the second tunnel endpoint, which can improve the answering success rate of the address request message answering method in some embodiments of the present application.

[0198] In some embodiments of the present application, a session is established between a first tunnel endpoint and a second tunnel endpoint based on the tunnel name and tunnel identifier; and when the session status is maintained, a second detection message is sent to the second tunnel endpoint via the first target tunnel. In this way, based on the session status between the first tunnel endpoint and the second tunnel endpoint, if the session status is maintained, it can be determined that communication between the first tunnel endpoint and the second tunnel endpoint is normal, allowing the second tunnel endpoint to receive the second detection message sent by the first tunnel endpoint, thereby improving the success rate of sending the second detection message to a certain extent.

[0199] In some embodiments, after obtaining the first network address carried by the first detection message, the method further includes:

[0200] Step 501: Store the first network address in a first database.

[0201] Step 103 may include the following steps:

[0202] Step 1031: Obtain a first target network address from the first network addresses stored in the first database, and send the first target network address to the second device.

[0203] In some embodiments of the present application, the first database may be a database connected to the first tunnel endpoint. The first database may be a local database or a network database, and some embodiments of the present application do not impose any restrictions on this. After the first tunnel endpoint obtains the first network address, the first network address may be stored in the first database. Specifically, the first network address may include the IP address and MAC address of the first device corresponding to the second tunnel endpoint, and the IP address and MAC address of the first device may be stored in the first database accordingly.

[0204] When the first tunnel endpoint receives the first address request message, it can query the MAC address corresponding to the IP address from the first database based on the IP address of the target device requested in the first address request message, and send the first target network address, i.e., the MAC address, to the second device as the first target network address to reply to the MAC address of the target device requested by the second device.

[0205] In some embodiments of the present application, by storing the first network address in the first database, the first tunnel endpoint can conveniently obtain the first target network address directly from the first network address stored in the first database when receiving the first address request, thereby improving the efficiency of obtaining the first target network address and sending the first target network address to the second device, which can improve the answering efficiency of the address request message method improved in some embodiments of the present application to a certain extent.

[0206] In some embodiments, the method further comprises:

[0207] Step 601, when receiving the third detection message sent by the second tunnel endpoint, update the first network address stored in the first database according to the latest first network address carried by the third detection message to obtain an updated first database; the third detection message is generated by the second tunnel endpoint based on the latest first network address.

[0208] Step 1031 may include the following steps:

[0209] Step 1031a: Obtain a first target network address from the first network addresses stored in the updated first database.

[0210] In some embodiments of the present application, when a session is established between a first tunnel endpoint and a second tunnel endpoint, the first tunnel endpoint and the second tunnel endpoint can periodically send detection messages to the other end to determine that the bidirectional forwarding path between the first tunnel endpoint and the second tunnel endpoint is normal. In the process of periodically sending detection messages to the first tunnel endpoint, the second tunnel endpoint can continuously learn the network address of the first device connected to the second tunnel, obtain the latest network address of each first device, and use it as the latest first network address. When the second tunnel endpoint learns the latest first network address, it can generate a third detection message based on the latest first network address and send the third detection message to the first tunnel endpoint. Specifically, the latest first network address can be added to the field corresponding to the optional content according to the message format of the detection message, and the added detection message can be used as the third detection message.

[0211] In some embodiments of the present application, when the first tunnel endpoint receives the third detection message sent by the second tunnel endpoint, it can perform an unpacking operation to obtain the latest first network address carried by the third detection message. Then, the first network address stored in the first database is updated to the latest first network address, and the first database of the updated first network address can be used as the updated first database. When the first tunnel endpoint receives the first address request, it can obtain the first target network address from the first network address stored in the updated first database, so that the first target network address is the latest first network address. Furthermore, the first tunnel endpoint sends the first target network address to the second device, which can improve the answering accuracy of the address request message answering method provided in some embodiments of the present application.

[0212] In some embodiments of the present application, upon receiving a third detection message sent by the second tunnel endpoint, the first network address stored in the first database is updated according to the latest first network address carried in the third detection message, thereby obtaining an updated first database. Since the third detection message is generated by the second tunnel endpoint based on the latest first network address, the first tunnel endpoint can update the first network address stored in the first database to the latest first network address, so that the first network address stored in the updated first database is the latest first network address, making the updated first database more accurate. Furthermore, the first tunnel endpoint obtains the first target network address from the first network address stored in the updated first database, so that the first target network address is the latest first network address, which can improve the accuracy of the first target network address to a certain extent.

[0213] In some embodiments, after step 601, the method further includes:

[0214] Step 701: reset a preset first timing parameter to zero and control the first timing parameter to restart timing; the first timing parameter is used to represent the duration of non-update of the first database.

[0215] Step 702: When the first timing parameter is greater than a preset time threshold, the first network address stored in the first database is deleted.

[0216] In some embodiments of the present application, a first timing parameter can be used to count the duration of time the first database has not been updated. After the first timing parameter is reset to zero and the timing is restarted, the duration of time the first database has not been updated can be automatically recorded. The duration of time the first database has not been updated represents the duration of time the first network address stored in the first database has not been updated.

[0217] In some embodiments of the present application, after updating the first network address stored in the first database, the first tunnel endpoint can set the first timing parameter to zero, such as assigning the first timing parameter to zero, and control the first timing parameter to restart timing, so that the first timing parameter can automatically record the length of time that the first database has not been updated.

[0218] In some embodiments of the present application, the preset duration threshold may represent the maximum duration of non-update time allowed for the first database. The preset duration threshold may be set based on actual application scenarios, and some embodiments of the present application do not impose any restrictions on this. When the first timing parameter is greater than the preset duration threshold, it indicates that the first network address stored in the first database has expired, and the first network address stored in the first database may be deleted to reduce the resource usage of the first database by the expired first network address, thereby improving the resource utilization of the first database.

[0219] In some embodiments of the present application, a preset first timing parameter is set to zero and the first timing parameter is controlled to restart timing; when the first timing parameter is greater than a preset duration threshold, the first network address stored in the first database is deleted. Since the first timing parameter is used to represent the duration of non-update of the first database, when the first timing parameter is greater than the preset duration threshold, it indicates that the duration of non-update of the first database has exceeded the preset duration threshold, and the first network address stored in the first database has timed out and not been updated. Furthermore, by deleting the first network address stored in the first database, the resource occupation of the first database by the first network address that has timed out and not been updated can be reduced, and to a certain extent, the resource utilization of the first database can be improved.

[0220] In some embodiments, step 1031 may include the following steps:

[0221] Step 1031b: Determine the first address identifier according to the first address request message.

[0222] Step 1031c: Obtain the first network address corresponding to the first address identifier from the first network addresses stored in the first database according to the first address identifier, and determine it as the first target network address.

[0223] In some embodiments of the present application, the first address request message may be generated by the second device based on the known IP address of the target device to be accessed and the MAC address of the requested target device. The first address identifier may be the IP address of the target device in the first address request message.

[0224] In some embodiments of the present application, the first tunnel endpoint may decapsulate the first address request message to obtain the IP address of the target device in the first address request message as the first address identifier. The first tunnel endpoint may search a first database for a MAC address of the target device corresponding to the IP address of the target device based on the IP address of the target device, and determine the found MAC address of the target device, i.e., the first network address corresponding to the first address identifier, as the first target network address.

[0225] In some embodiments of the present application, a first address identifier is determined based on a first address request message; and based on the first address identifier, a first network address corresponding to the first address identifier is obtained from first network addresses stored in a first database, and determined as the first target network address. Thus, because the first address identifier is determined based on the first address request message, the first address identifier matches the first network address requested by the first address request message. Furthermore, the first target network address can be conveniently determined from the first database based on the first address identifier, thereby improving the efficiency of obtaining the first target network address to a certain extent.

[0226] FIG2 is a flowchart of another method for answering an address request message provided in some embodiments of the present application. As shown in FIG2 , the method is applied to a second tunnel endpoint and includes:

[0227] Step 801: Generate a first detection message according to a first network address stored in a second tunnel endpoint; the first network address is a network address of a first device corresponding to the second tunnel endpoint.

[0228] Step 802, sending a first detection message to the first tunnel endpoint; the first detection message is used for the first tunnel endpoint to obtain the first network address, and when receiving the second address request message, obtain the second target network address from the second network address, and send the second target network address to the fourth device to answer the second address request message; the second target network address is the second network address requested by the second address request message, and the fourth device is the device that sends the second address request message to the second tunnel endpoint.

[0229] In some embodiments of the present application, the first device corresponding to the second tunnel endpoint may be a device connected to the second tunnel endpoint. The first device may be one or more, and some embodiments of the present application are not limited to this. The second tunnel endpoint may learn the network address of the connected first device. Specifically, it may obtain and store the IP address and MAC address of the first device.

[0230] In some embodiments of the present application, when generating the first detection message, the second tunnel endpoint can add the first network address of each first device corresponding to the second tunnel endpoint to the field corresponding to the optional content according to the message format, so that the first detection message carries the first network address of each first device.

[0231] In some embodiments of the present application, the steps performed by the first tunnel endpoint can refer to the relevant descriptions of steps 101 to 103 and will not be repeated here.

[0232] In an embodiment of the present application, since the first detection message is generated by the second tunnel endpoint based on the stored first network address, and the first network address is the network address of the first device corresponding to the second tunnel endpoint, the first detection message carries the network address of the first device corresponding to the second tunnel endpoint. When the first tunnel endpoint receives the first detection message sent by the second tunnel endpoint and obtains the first network address carried in the first detection message, the first tunnel endpoint obtains the network address of the first device corresponding to the second tunnel endpoint. When the second device sends a first address request message to the first tunnel endpoint, requesting the network address of the first device corresponding to the second tunnel endpoint, the first tunnel endpoint can directly obtain the requested first target network address from the first network address and send the first target network address to the second device, thereby enabling the first tunnel endpoint to answer the first address request message on behalf of the first tunnel endpoint. In this way, the first tunnel endpoint can directly answer the first address request message based on the obtained first network address, avoiding the problem of message flooding caused by the VTEP broadcast message method in the related art, reducing network resource usage to a certain extent, and improving network performance.

[0233] In some embodiments, the method further comprises:

[0234] Step 901: Receive a second detection message sent by a first tunnel endpoint.

[0235] Step 902, obtain the second network address carried in the second detection message; the second detection message is generated by the first tunnel endpoint according to the stored second network address, and the second network address is the network address of the second device corresponding to the first tunnel endpoint.

[0236] Step 903, when the second address request message is received, obtain the second target network address from the second network address, and send the second target network address to the fourth device to answer the second address request message; the second target network address is the second network address requested by the second address request message, and the fourth device is the device that sends the second address request message to the second tunnel endpoint.

[0237] In some embodiments of the present application, when the second tunnel endpoint receives the second detection message, it can perform an unpacking operation, obtain the second network address from the second detection message, and store the second network address in a specified location, for example, it can be stored in a second database so that it can be queried from the database when the second address request message is received.

[0238] In some embodiments of the present application, the fourth device may be one of the devices connected to the second tunnel endpoint. The fourth device generates a second address request message based on the known IP address of the target device to be accessed and the MAC address of the requested target device, and sends the second address request message to the first tunnel endpoint. The target device may be any third device corresponding to the first tunnel endpoint.

[0239] In some embodiments of the present application, the second network address requested by the second address request message may be the MAC address of the target device, and the target device may be any third device corresponding to the first tunnel endpoint, that is, the second target network address may be the MAC address of any third device corresponding to the first tunnel endpoint.

[0240] In some embodiments of the present application, upon receiving a second address request message, the second tunnel endpoint can determine the IP address of the target device requested by the fourth device based on the second address request message, obtain the MAC address of the target device corresponding to the IP address of the target device from the stored second network address based on the IP address of the target device, as the second target network address, and send the second target network address, i.e., the MAC address of the target device, to the fourth device, thereby enabling the second tunnel endpoint to answer the second address request message and reply to the second target network address requested by the fourth device.

[0241] In some embodiments of the present application, since the second detection message is generated by the first tunnel endpoint based on the stored second network address, and the second network address is the network address of the third device corresponding to the first tunnel endpoint, the second detection message carries the network address of the third device corresponding to the first tunnel endpoint. The first tunnel endpoint sends the second detection message to the second tunnel endpoint, so that the second tunnel endpoint receives and obtains the second network address carried in the second detection message. In this way, the second tunnel endpoint obtains the network address of the third device corresponding to the first tunnel endpoint. When the fourth device sends a second address request message to the second tunnel endpoint, requesting the network address of the third device corresponding to the first tunnel endpoint, the second tunnel endpoint can directly obtain the requested second target network address from the second network address and send the second target network address to the fourth device, thereby enabling the second tunnel endpoint to answer the second address request message on behalf of the second tunnel endpoint. In this way, the second tunnel endpoint can directly answer the second address request message based on the obtained second network address, avoiding the problem of message flooding caused by the VTEP broadcast message method in the related art, reducing network resource usage to a certain extent, and improving network performance.

[0242] In some embodiments, a static tunnel is established between the first tunnel endpoint and the second tunnel endpoint, and the method further includes:

[0243] Step 1001: Obtain the tunnel name and tunnel identifier of a static tunnel.

[0244] Step 801 may include the following steps:

[0245] Step 8011: Generate a first detection message according to the first network address, tunnel name and tunnel identifier stored in the second tunnel endpoint.

[0246] Step 802 may include the following steps:

[0247] Step 8021: Determine a second target tunnel from multiple static tunnels corresponding to the second tunnel endpoint according to the tunnel name and the tunnel identifier.

[0248] Step 8022: Send a first detection message to the first tunnel endpoint through the second target tunnel.

[0249] In some embodiments of the present application, the implementation of step 1001 may refer to the implementation of step 301 and will not be repeated here.

[0250] In some embodiments of the present application, the second tunnel endpoint may be connected to multiple static tunnels. The second tunnel endpoint may identify the static tunnel connected to the second tunnel endpoint based on the tunnel name and tunnel identifier of the static tunnel connected to the second tunnel endpoint, and determine the static tunnel connected to the first tunnel endpoint from the multiple static tunnels as the second target tunnel. Specifically, the static route corresponding to the static tunnel connected to the first tunnel endpoint and the second tunnel endpoint may be configured based on the tunnel name and tunnel identifier, that is, the tunnel name and tunnel identifier may be configured as the next hop of the static route, thereby determining the static tunnel connected to the first tunnel endpoint and the second tunnel endpoint as the second target tunnel.

[0251] In some embodiments of the present application, the second tunnel endpoint can conveniently identify the static tunnel connected to the second tunnel endpoint based on the tunnel name and tunnel identifier, determine the second target tunnel, and thus conveniently send the first detection message to the first tunnel endpoint through the second target tunnel, so that the first tunnel endpoint can receive the first detection message, which can improve the practicality of the address request message answering method in some embodiments of the present application to a certain extent.

[0252] In some embodiments, before step 8011, the method further includes:

[0253] Step 1101: Establish a session between a first tunnel endpoint and a second tunnel endpoint according to a tunnel name and a tunnel identifier.

[0254] Step 8022 may include the following steps:

[0255] Step 8022a: When the session status is maintained, a first detection message is sent to the first tunnel endpoint through the second target tunnel.

[0256] In some embodiments of the present application, the implementation of step 1101 may refer to the implementation of step 401 and will not be repeated here.

[0257] In some embodiments of the present application, when the session state established between the first tunnel endpoint and the second tunnel endpoint is maintained, indicating that the two-way communication between the first tunnel endpoint and the second tunnel endpoint is normal, the second tunnel endpoint sends a first detection message to the first tunnel endpoint through the second target tunnel, which allows the first tunnel endpoint to receive the first detection message, thereby improving the success rate of sending the first detection message to a certain extent. Furthermore, the first tunnel endpoint can obtain the first network address from the first detection message, thereby answering the first address request message sent to the first tunnel endpoint, which can improve the answering success rate of the address request message answering method in some embodiments of the present application.

[0258] In some embodiments, after obtaining the second network address carried by the second detection message, the method further includes:

[0259] Step 1201: Store the second network address in a second database.

[0260] Step 903 may include the following steps:

[0261] Step 9031: Obtain a second target network address from the second network addresses stored in the second database, and send the second target network address to the fourth device.

[0262] In some embodiments of the present application, the second database may be a database connected to the second tunnel endpoint. The second database may be a local database or a network database, and the embodiments of the present application are not limited thereto. After the second tunnel endpoint obtains the second network address, the second network address may be stored in the second database. Specifically, the second network address may include the IP address and MAC address of the third device corresponding to the first tunnel endpoint, and the IP address and MAC address of the third device may be stored in the second database accordingly.

[0263] When the second tunnel endpoint receives the second address request message, it can query the MAC address corresponding to the IP address from the second database based on the IP address of the target device requested in the second address request message, and send the second target network address, i.e., the MAC address, to the fourth device as the second target network address to reply to the MAC address of the target device requested by the fourth device.

[0264] In some embodiments of the present application, by storing the second network address in the second database, the second tunnel endpoint can conveniently obtain the second target network address directly from the second network address stored in the second database when receiving the second address request, thereby improving the efficiency of obtaining the second target network address and sending the second target network address to the fourth device, which can improve the answering efficiency of the address request message method improved in some embodiments of the present application to a certain extent.

[0265] In some embodiments, the method further comprises:

[0266] Step 1301, when receiving the fourth detection message sent by the first tunnel endpoint, update the second network address stored in the second database according to the latest second network address carried by the fourth detection message to obtain an updated second database; the fourth detection message is generated by the first tunnel endpoint based on the latest second network address.

[0267] Step 9031 may include the following steps:

[0268] Step 9031a: Obtain the second target network address from the second network addresses stored in the updated second database.

[0269] In some embodiments of the present application, when the first tunnel endpoint learns the latest second network address, it can generate a fourth detection message based on the latest second network address and send the fourth detection message to the second tunnel endpoint. Specifically, the latest second network address can be added to the field corresponding to the optional content according to the message format of the detection message, and the detection message with the added content can be used as the fourth detection message.

[0270] In some embodiments of the present application, when the second tunnel endpoint receives the fourth detection message sent by the first tunnel endpoint, it can perform an unpacking operation to obtain the latest second network address carried by the fourth detection message; then, the second network address stored in the second database is updated to the latest second network address, and the second database of the updated second network address can be used as the updated second database. When the second tunnel endpoint receives the second address request, it can obtain the second target network address from the second network address stored in the updated second database, so that the second target network address is the latest second network address. Furthermore, the second tunnel endpoint sends the second target network address to the fourth device, which can improve the answering accuracy of the address request message answering method provided in some embodiments of the present application.

[0271] In some embodiments of the present application, because the fourth detection message is generated by the first tunnel endpoint based on the latest second network address, the second tunnel endpoint can update the second network address stored in the second database to the latest second network address, so that the second network address stored in the updated second database is the latest second network address, and the updated second database can be more accurate. Furthermore, the second tunnel endpoint obtains the second target network address from the second network address stored in the updated second database, so that the second target network address is the latest second network address, which can improve the accuracy of the second target network address to a certain extent.

[0272] In some embodiments, after step 1301, the method further includes:

[0273] Step 1401: reset a preset second timing parameter to zero and control the second timing parameter to restart timing; the second timing parameter is used to represent the non-updated time length of the second database.

[0274] Step 1402: When the second timing parameter is greater than a preset time threshold, the second network address stored in the second database is deleted.

[0275] In some embodiments of the present application, a second timing parameter can be used to count the duration of time the second database has not been updated. After the second timing parameter is reset to zero and the timing is restarted, the duration of time the second database has not been updated can be automatically recorded. The duration of time the second database has not been updated represents the duration of time the second network address stored in the second database has not been updated.

[0276] In some embodiments of the present application, after updating the second network address stored in the second database, the second tunnel endpoint can set the second timing parameter to zero, such as assigning the second timing parameter to zero, and control the second timing parameter to restart timing, so that the second timing parameter can automatically record the length of time that the second database has not been updated.

[0277] In some embodiments of the present application, when the second timing parameter is greater than a preset duration threshold, it can be indicated that the second network address stored in the second database has expired, and the second network address stored in the second database can be deleted to reduce the resource occupation of the first database by the expired second network address and improve the resource utilization of the first database.

[0278] In some embodiments of the present application, since the second timing parameter is used to characterize the non-updated period of the second database, when the second timing parameter is greater than the preset period threshold, it indicates that the non-updated period of the second database has been greater than the preset period threshold, and the second network address stored in the second database has timed out and not been updated. Furthermore, by deleting the second network address stored in the second database, the resource occupation of the second database by the second network address that has timed out and not been updated can be reduced, and to a certain extent, the resource utilization of the second database can be improved.

[0279] In some embodiments, step 9031 may include the following steps:

[0280] Step 9031b: Determine the second address identifier according to the second address request message.

[0281] Step 9031c: Obtain the second network address corresponding to the second address identifier from the second network addresses stored in the second database according to the second address identifier, and determine it as the second target network address.

[0282] In some embodiments of the present application, the second address request message may be generated by the fourth device based on the known IP address of the target device to be accessed and the MAC address of the requested target device. The second address identifier may be the IP address of the target device in the second address request message.

[0283] In some embodiments of the present application, the second tunnel endpoint may decapsulate the second address request message to obtain the IP address of the target device in the second address request message as the second address identifier. The second tunnel endpoint may search a second database for a MAC address of the target device corresponding to the IP address of the target device based on the IP address of the target device, and determine the found MAC address of the target device, i.e., the second network address corresponding to the second address identifier, as the second target network address.

[0284] In some embodiments of the present application, since the second address identifier is determined based on the second address request message, the second address identifier matches the second network address requested by the second address request message. Furthermore, the second target network address can be conveniently determined from the second database based on the second address identifier, which can improve the efficiency of obtaining the second target network address to a certain extent.

[0285] FIG3 is a schematic diagram of ARP request message suppression in the related art. In FIG3, (1) Virtual Machine (VM) 1 sends an ARP request message to obtain the MAC address of VM 7. (2) After receiving the ARP request message, Virtual Tunnel Endpoint (VTEP) 1 creates an ARP suppression table entry for VM 1, floods the ARP request message in the VXLAN network, and sends the ARP suppression table entry of VM 1 to Virtual Tunnel Endpoint 2 and Virtual Tunnel Endpoint 3 via the Border Gateway Protocol (BGP) Ethernet Virtual Private Network (EVPN), i.e., the transport network in FIG3. (3) Virtual Tunnel Endpoint 2 and Virtual Tunnel Endpoint 3 decapsulate the ARP request message and broadcast the ARP request message at the local site. (4) VM 7 sends an ARP reply to Virtual Tunnel Endpoint 2. (5) Virtual Tunnel Endpoint 2 creates an ARP suppression table entry for VM 7, forwards the ARP reply to Virtual Tunnel Endpoint 1, and sends the ARP suppression table entry of VM 7 to Virtual Tunnel Endpoint 1 and Virtual Tunnel Endpoint 3 via BGP EVPN. (6) Virtual tunnel endpoint 1 decapsulates the ARP reply and forwards it to virtual machine 1. (7) Virtual machine 4 sends an ARP request packet to obtain the MAC address of virtual machine 1. (8) Virtual tunnel endpoint 1 creates an ARP suppression entry for virtual machine 4 and replies to virtual machine 4's ARP request packet based on virtual machine 1's ARP suppression entry. (9) Virtual machine 10 sends an ARP request packet to obtain the MAC address of virtual machine 1. (10) Virtual tunnel endpoint 3 creates an ARP suppression entry for virtual machine 10 and replies to virtual machine 10's ARP request based on virtual machine 1's ARP suppression entry.

[0286] Figure 4 is a schematic diagram of ARP broadcast suppression in the related art. As shown in Figure 4, VXLAN Layer 3 gateway L3 can dynamically learn the ARP suppression table entries of server 1 and server 2, and then generate host information based on the ARP suppression table entries. The host information includes the host IP address, MAC address, virtual tunnel endpoint (VTEP) address, and virtual local area network extended identification (VNI ID) of each server 1 and server 2. The host information is then published externally through BGP EVPN, allowing other BGP neighbors, such as VXLAN Layer 2 gateway L2 in Figure 4, to learn the host information of the L3 gateway. The host information learned by VXLAN Layer 2 gateway L2 can be used for broadcast suppression. Specifically, when server 1 first accesses server 2, server 1 sends an Address Resolution Protocol (ARP) request message to server 2, requesting the MAC address of the destination host, server 2. After receiving the ARP request message, device 1, acting as the VXLAN Layer 2 gateway, queries the host information. If device 1 has the MAC address of the destination host, device 1 replaces the broadcast destination MAC address in the ARP request message with the MAC address of the destination host, performs VXLAN encapsulation, and forwards it. If device 1 does not have the destination host information, the broadcast destination MAC address in the ARP request message remains unchanged, and device 1 performs VXLAN encapsulation and forwards it. After receiving the unicast ARP request message, server 2 issues an ARP reply. Server 1 receives the ARP reply message from server 2, establishes an ARP suppression entry, and can communicate with server 2. In related technologies, enabling the Address Resolution Protocol (ARP) to unicast broadcast can reduce the number of broadcast ARP messages and prevent Layer 2 broadcast message flooding on the VXLAN network.

[0287] Figure 5 is a schematic diagram of ARP proxy in the related art. As shown in Figure 5, after the Layer 2 gateway device, such as the L2GW1 gateway and the L2GW2 gateway in Figure 5, enables the ARP Layer 2 proxy function based on the broadcast domain (BD), when it receives an ARP request message, it will record the source IP address, source MAC address, the message's input interface, and other information in the ARP request message into the local Address Resolution Protocol (ARP) suppression table as the basis for subsequent ARP Layer 2 proxy. When the Layer 2 gateway device receives an ARP request message again, the Layer 2 gateway device first searches the local Address Resolution Protocol suppression table (including local listening and synchronization from other gateways) based on the destination IP in the ARP request message. If the destination MAC address search is successful, the ARP request message is directly answered using the searched destination MAC address. If the search fails, the ARP request message is processed according to the original process. This can significantly reduce ARP broadcast messages in the VXLAN network. Virtual Expansion LAN (VXLAN) tunnels can access remote host information using BGP Type 2 (MAC / IP) route information. The Address Resolution Protocol suppression table entries in Figure 5 show that L2GW1 has learned the MAC / IP addresses of remote hosts 3 and 4. When the Layer 2 gateway's ARP proxy function is enabled, ARP request packets from host 1 to host 3 or 4 will be directly answered by L2GW1. Virtual Expansion LAN tunnels can implement ARP suppression and proxying through the BGP control plane.

[0288] Figure 6 is a schematic diagram of BFD remote MAC address release provided by some embodiments of the present application. As shown in Figure 6, device 05 is the first tunnel endpoint of the embodiment of the present application, and device 06 is the second tunnel endpoint of the embodiment of the present application. A bidirectional forwarding detection (BFD) session is established between device 05 and device 06. Packets from the virtual local area network (VLAN) 100 in the same network segment can pass through the VXLAN static tunnel between device 05 and device 06, and carry the virtual local area network extended identification (VNI), that is, the network identification identification (Identity document, ID) 1000 of the VXLAN, to reach the other end to make an access and get a response. In Figure 6, host 1, host 2 and host 3 are the third devices corresponding to the first tunnel endpoint in the embodiment of the present application, and host 4 and host 5 are the first devices corresponding to the second tunnel endpoint in the embodiment of the present application. Device 05 learns the IP / MAC addresses of Host 1, Host 2, and Host 3. It then configures the virtual tunnel endpoint source IP address (Source VTEP IP, VTEP SIP), VLAN VNI, and BFD neighbor information on Device 05. This BFD neighbor information includes the BFD neighbor 6.6.6.6 and the multihop local address 5.5.5.5. It also sets the BFD remote MAC address advertisement to Host 1 and Host 2. After establishing a BFD session between Device 05 and Device 06, they maintain the BFD session by sending BFD keepalive packets (BFD Hello packets). The suffix in these BFD keepalive packets carries the IP / MAC addresses of Host 1 and Host 2, the VLAN channel name, and the VNI channel identifier (100 / 1000 in Figure 6) and is sent to the BFD neighbor, Device 06. After receiving the Bidirectional Forwarding Detection (BFD) keep-alive packet sent by device 05, device 06 can obtain the remote MAC address table information of device 05, that is, the MAC addresses of host 1 and host 2. Furthermore, device 06 can enable the VXLAN proxy function by issuing Linux (operating system kernel) instructions to the kernel, that is, to reply to the ARP request message requesting the MAC address of host 1 and host 2, thereby realizing ARP proxy reply of the VXLAN static tunnel, avoiding the problem of message flooding caused by broadcast, and suppressing the number of messages in the VXLAN network.

[0289] For example, host 4 may be the device that sends the second address request message, i.e., the ARP request message, to the second tunnel endpoint device 06 in some embodiments of the present application. Host 4 wants to access host 1 corresponding to the first tunnel endpoint, i.e., device 05. Host 4 sends an ARP request message. When device 06 has the VXLAN proxy function enabled, device 06 can obtain the MAC address of host 1 by looking up the table entry and reply the MAC address of host 1 to host 4. Similarly, device 06 can carry the IP / MAC address of host 4 in the suffix of the BFD keep-alive packet. After receiving the BFD keep-alive packet sent by device 06, device 05 can obtain the MAC address of host 4 and can proxy the ARP request message requesting the MAC address of host 4.

[0290] FIG7 is a schematic diagram of the service device architecture provided by some embodiments of the present application. As shown in FIG7 , device 05 and device 06 maintain a Bidirectional Forwarding Detection (BFD) session state by sending Bidirectional Forwarding Detection (BFD) keepalive packets (BFD Hello packets). Host 4 is configured to publish the remote MAC address of device 06, and host 1 and host 2 are configured to publish the remote MAC address of device 05. In FIG7 , the application (MAC address table) is used to learn local MAC addresses, such as the MAC addresses of host 1 and host 2. The application (Address Resolution Protocol) is used to determine the correspondence between the IP address and MAC address of host 1 and host 2, and then write the IP / MAC addresses of host 1 and host 2 into a database shared by the applications, namely the first database of the embodiment of the present application, for acquisition by other applications (such as the Bidirectional Forwarding Detection application). The application (Bidirectional Forwarding Detection) is used to establish a BFD session between device 05 and device 06. The application (Bidirectional Forwarding Detection) retrieves information from the first database, including the IP / MAC addresses, VXLAN tunnel name, and VLAN / VNI tunnel identifiers of hosts 1 and 2 to be published. It then encapsulates the information to generate a BFD keepalive packet (BFD Hello packet) and sends the BFD keepalive packet to device 06. The application (Bidirectional Forwarding Detection) receives information from device 06, including the IP / MAC address, VXLAN tunnel name, and VLAN / VNI tunnel identifier of host 4, and stores it in the first database for retrieval by the application (Virtual LAN Extension). The application (Virtual LAN Extension) can perform tunnel identification and VNI matching on device 06 based on the VXLAN tunnel name and VLAN / VNI tunnel identifiers.

[0291] For example, host 1 can be the device that sends the first address request message, i.e., the ARP request message, to the first tunnel endpoint device 05 in an embodiment of the present application. After device 05 sends Linux instructions to the kernel through the command line interface to enable the VXLAN proxy function, when host 1 wants to send an ARP request message to the second tunnel endpoint, i.e., host 4 corresponding to device 06, device 05 can obtain the MAC address of host 4 from the first database, thereby directly answering the ARP request message sent by host 1.

[0292] Figure 8 is a schematic diagram of the service control flow provided by some embodiments of the present application. As shown in Figure 8, first configure the static route and virtual LAN related settings, and then create a virtual LAN extended static tunnel interface instance. The specific configuration method and creation method can refer to the relevant description in the relevant technology, and the embodiments of the present application do not limit this. After creating the virtual LAN extended static tunnel, the virtual LAN extended static tunnel source IP, virtual tunnel endpoint destination IP address (Destination VTEP IP, VTEP DIP), virtual LAN extended identification identifier and the device's bidirectional forwarding detection neighbor can be set, such as the relevant settings of device 05 and device 06 in Figure 6. This is only an example, and some embodiments of the present application do not limit this. After the device turns on the bidirectional forwarding detection remote MAC address publishing function, the local host's MAC address can be sent to the device at the other end of the tunnel, and the MAC address of the remote host published by the device at the other end of the tunnel can be received. The device can then answer the ARP request message requesting the remote host and reply the remote host's MAC address to the device that sent the ARP request message.

[0293] FIG9 is a schematic diagram of a BFD keep-alive packet carrying a remote MAC address, provided by some embodiments of the present application. As shown in FIG9 , the message format of a BFD keep-alive packet includes: a BFD protocol version number, a diagnostic word, a BFD local state, an information flag, a detection timeout multiplier, a message length, a local identifier and a remote identifier in the session identifier, a minimum BFD message sending interval and a minimum BFD message receiving interval in the control packet interval, a minimum echo message receiving interval in the echo packet interval, and a BFD optional Type-Length-Value (TLV) added to the optional content of the BFD message in the embodiments of the present application. The optional TLV in the BFD message includes a TLV authentication type, a TLV suffix information length, and TLV information content. The TLV authentication type is remote MAC address publication, and the TLV information content includes the remote MAC address, the remote IP address, the virtual local area network extension identifier (VLAN ID), and the virtual local area network extension (VXLAN) tunnel name.

[0294] FIG10 is a schematic diagram of a BFD remote MAC address control process provided by some embodiments of the present application. As shown in FIG10 , a first tunnel endpoint receives a first detection message, or a second tunnel endpoint receives a second detection message. The first detection message and the second detection message may be Bidirectional Forwarding Detection (BFD) messages. The first tunnel endpoint or the second tunnel endpoint may determine whether the BFD message is a valid message. The legitimacy determination of the message may refer to related technologies and is not limited in some embodiments of the present application. After verifying the legitimacy, it is determined whether the session state between the first tunnel endpoint and the second tunnel endpoint is maintained. If the session state is maintained, it is further determined whether the BFD message carries TLV content. If the BFD message carries TLV content, the remote MAC address carried in the TLV content is analyzed and obtained, and the obtained MAC address is written to the database corresponding to the first tunnel endpoint or the second tunnel endpoint. The first tunnel endpoint or the second tunnel endpoint may issue a Linux instruction to the kernel, instructing the kernel to add a new MAC address and to reply to the address request message requesting the MAC address. The first tunnel endpoint or the second tunnel endpoint can periodically check the database, obtain all MAC addresses in the database, check whether each MAC address is expired, and delete the expired remote MAC addresses from the database. The first tunnel endpoint or the second tunnel endpoint can issue a Linux instruction to the kernel, instructing the kernel to delete the expired MAC addresses. In some embodiments, the new Linux instruction can be as follows:

[0295] bridge fdb add$REMOTE_MAC dev$VXLAN_TUNNEL$VLAN_ID master

[0296] bridge fdb add$REMOTE_MAC dev$VXLAN_TUNNEL dst$DIP self

[0297] In some embodiments, the Linux delete instruction may be as follows:

[0298] bridge fdb del$REMOTE_MAC dev$VXLAN_TUNNEL$VLAN_ID master

[0299] bridge fdb del$REMOTE_MAC dev$VXLAN_TUNNEL dst$DIP self

[0300] This is just an example, and some embodiments of the present application are not limited to this.

[0301] Referring to FIG. 11 , some embodiments of the present application provide an address request message answering device, which is applied to a first tunnel endpoint. The device 15 includes:

[0302] A first receiving module 1501 is configured to receive a first detection message sent by a second tunnel endpoint;

[0303] A first acquisition module 1502 is configured to acquire a first network address carried in the first detection message; the first detection message is generated by the second tunnel endpoint based on the stored first network address, and the first network address is the network address of the first device corresponding to the second tunnel endpoint;

[0304] The first answering module 1503 is used to obtain the first target network address from the first network address when receiving the first address request message, and send the first target network address to the second device to answer the first address request message; the first target network address is the first network address requested by the first address request message, and the second device is the device that sends the first address request message to the first tunnel endpoint.

[0305] In some embodiments, the apparatus 15 further comprises:

[0306] A second generating module is configured to generate a second detection message according to a second network address stored in the first tunnel endpoint; the second network address is a network address of a third device corresponding to the first tunnel endpoint;

[0307] The second sending module is used to send a second detection message to the second tunnel endpoint; the second detection message is used for the second tunnel endpoint to obtain the second network address carried by the second detection message, and when receiving the second address request message, obtain the second target network address from the second network address, and send the second target network address to the fourth device to answer the second address request message; the second target network address is the second network address requested by the second address request message, and the fourth device is the device that sends the second address request message to the second tunnel endpoint.

[0308] In some embodiments, a static tunnel is established between the first tunnel endpoint and the second tunnel endpoint, and the apparatus 15 further includes:

[0309] A second acquisition module is used to obtain the tunnel name and tunnel identifier of the static tunnel;

[0310] The second generation module is specifically used for:

[0311] Generate a second detection message according to the second network address, tunnel name, and tunnel identifier stored at the first tunnel endpoint;

[0312] The second sending module is specifically configured to:

[0313] Determine a first target tunnel from a plurality of static tunnels corresponding to the first tunnel endpoint according to the tunnel name and the tunnel identifier;

[0314] A second detection message is sent to the second tunnel endpoint through the first target tunnel.

[0315] In some embodiments, the apparatus 15 further comprises:

[0316] a first session module configured to establish a session between the first tunnel endpoint and the second tunnel endpoint according to the tunnel name and the tunnel identifier before the second generation module generates the second detection message according to the second network address, the tunnel name, and the tunnel identifier stored in the first tunnel endpoint;

[0317] The second sending module is further configured to:

[0318] When the session status is maintained, a second detection message is sent to the second tunnel endpoint through the first target tunnel.

[0319] In some embodiments, the apparatus 15 further comprises:

[0320] a first storage module, configured to store the first network address in the first database after the first acquisition module 1502 acquires the first network address carried in the first detection message;

[0321] The first answering module 1503 is specifically used for:

[0322] A first target network address is obtained from the first network addresses stored in the first database, and the first target network address is sent to the second device.

[0323] In some embodiments, the apparatus 15 further comprises:

[0324] a first updating module configured to, upon receiving a third detection message sent by the second tunnel endpoint, update the first network address stored in the first database according to the latest first network address carried in the third detection message, thereby obtaining an updated first database; the third detection message being generated by the second tunnel endpoint according to the latest first network address;

[0325] The first answering module 1503 is further specifically configured to obtain a first target network address from the first network address stored in the updated first database.

[0326] In some embodiments, the apparatus 15 further comprises:

[0327] a first timing module, configured for the first update module to update the first network address stored in the first database based on the latest first network address carried in the third detection message, and after obtaining the updated first database, to reset a preset first timing parameter to zero and control the first timing parameter to restart timing; the first timing parameter is used to represent a length of time the first database has not been updated;

[0328] The first deleting module is configured to delete the first network address stored in the first database when the first timing parameter is greater than a preset time threshold.

[0329] In some embodiments, the first answering module 1503 is further configured to:

[0330] Determining a first address identifier according to the first address request message;

[0331] According to the first address identifier, a first network address corresponding to the first address identifier is obtained from the first network addresses stored in the first database, and is determined as the first target network address.

[0332] Referring to FIG. 12 , some embodiments of the present application provide another device for answering an address request message, which is applied to a second tunnel endpoint. The device 16 includes:

[0333] A first generating module 1601 is configured to generate a first detection message according to a first network address stored at a second tunnel endpoint; the first network address is a network address of a first device corresponding to the second tunnel endpoint;

[0334] The first sending module 1602 is used to send a first detection message to the first tunnel endpoint; the first detection message is used for the first tunnel endpoint to obtain the first network address, and when receiving the first address request message, obtain the first target network address from the first network address, and send the first target network address to the second device to answer the first address request message; the first target network address is the first network address requested by the first address request message, and the second device is the device that sends the first address request message to the first tunnel endpoint.

[0335] In some embodiments, the apparatus 16 further comprises:

[0336] A second receiving module, configured to receive a second detection message sent by the first tunnel endpoint;

[0337] A third acquisition module is used to obtain the second network address carried by the second detection message; the second detection message is generated by the first tunnel endpoint according to the stored second network address, and the second network address is the network address of the second device corresponding to the first tunnel endpoint;

[0338] The second answering module is used to obtain the second target network address from the second network address when receiving the second address request message, and send the second target network address to the fourth device to answer the second address request message; the second target network address is the second network address requested by the second address request message, and the fourth device is the device that sends the second address request message to the second tunnel endpoint.

[0339] In some embodiments, a static tunnel is established between the first tunnel endpoint and the second tunnel endpoint, and the apparatus 16 further includes:

[0340] A fourth acquisition module, configured to acquire a tunnel name and a tunnel identifier of a static tunnel;

[0341] The first generating module 1601 is specifically used for:

[0342] Generate a first detection message according to the first network address, tunnel name and tunnel identifier stored in the second tunnel endpoint;

[0343] The first sending module 1602 is specifically configured to:

[0344] Determine, according to the tunnel name and the tunnel identifier, a second target tunnel from a plurality of static tunnels corresponding to the second tunnel endpoint;

[0345] A first detection message is sent to the first tunnel endpoint through the second target tunnel.

[0346] In some embodiments, the apparatus 16 further comprises:

[0347] A second session module is configured to establish a session between the first tunnel endpoint and the second tunnel endpoint according to the tunnel name and the tunnel identifier before the first generation module 1601 generates the first detection message according to the first network address, the tunnel name and the tunnel identifier stored in the second tunnel endpoint;

[0348] The first sending module 1602 is further configured to:

[0349] When the session status is maintained, a first detection message is sent to the first tunnel endpoint through the second target tunnel.

[0350] In some embodiments, after obtaining the second network address carried by the second detection message, the device 16 further includes:

[0351] a second storage module, configured to store the second network address in a second database;

[0352] The second generation answering module is specifically used for:

[0353] Acquire the second target network address from the second network addresses stored in the second database, and send the second target network address to the fourth device.

[0354] In some embodiments, the apparatus 16 further comprises:

[0355] a second updating module, configured to, upon receiving a fourth detection message sent by the first tunnel endpoint, update the second network address stored in the second database according to the latest second network address carried in the fourth detection message, thereby obtaining an updated second database; the fourth detection message being generated by the first tunnel endpoint according to the latest second network address;

[0356] The second generation answering module is also used for:

[0357] The second target network address is obtained from the second network addresses stored in the updated second database.

[0358] In some embodiments, after updating the second network address stored in the second database according to the latest second network address carried by the fourth detection message and obtaining the updated second database, the apparatus 16 further includes:

[0359] A second timing module is used to reset a preset second timing parameter to zero and control the second timing parameter to restart timing; the second timing parameter is used to represent the length of time the second database has not been updated;

[0360] The second deleting module is configured to delete the second network address stored in the second database when the second timing parameter is greater than a preset time threshold.

[0361] In some embodiments, the second answering module is further configured to:

[0362] Determining a second address identifier according to the second address request message;

[0363] According to the second address identifier, the second network address corresponding to the second address identifier is obtained from the second network addresses stored in the second database, and is determined as the second target network address.

[0364] The advantages of the address request message answering device and the address request message answering method described in the aforementioned embodiment over the relevant technologies are the same, and are not described in detail here.

[0365] For some device embodiments, since they are basically similar to some method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0366] The present application also provides an electronic device, see Figure 13, including: a processor 1701, a memory 1702, and a computer program 17021 stored in the memory and running on the processor, and when the processor executes the program, it implements the address request message answering method of the aforementioned embodiment.

[0367] The present application also provides a non-volatile readable storage medium. When the instructions in the non-volatile readable storage medium are executed by the processor of the electronic device, the electronic device can execute the address request message answering method of the aforementioned embodiment.

[0368] The algorithm and display provided herein are not inherently related to any particular computer, virtual system or other device. Based on the above description, it is obvious that the structure required for constructing this type of system is suitable. In addition, the application is not directed to any specific programming language. It should be understood that various programming languages ​​can be utilized to implement the content of the application described herein, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the application.

[0369] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.

[0370] Similarly, it should be understood that in order to streamline the present application and aid in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, various features of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting an intention that the claimed application requires more features than are expressly recited in each claim. Rather, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Accordingly, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of the present application.

[0371] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition may be divided into multiple submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed herein may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.

[0372] The various component embodiments of the present application can be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. It should be understood by those skilled in the art that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components in the sorting device according to the present application. The present application can also be implemented as a device or apparatus program for executing part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.

[0373] It should be noted that the above embodiments illustrate rather than limit the present application, and that a person skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbols placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application may be implemented by means of hardware comprising several different elements and by means of appropriately programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names.

[0374] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0375] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements and improvements made within the spirit and principles of the present application should be included in the scope of protection of the present application.

[0376] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

[0377] It should be noted that the various data-related processes in the embodiments of the present application are all carried out in compliance with the corresponding data protection laws and policies of the country where they are located, and with the authorization given by the owner of the corresponding device.

Claims

1. A method for answering an address request message, characterized in that: Applied to a first tunnel endpoint, the method comprises: Receiving a first detection message sent by a second tunnel endpoint; Obtaining a first network address carried by the first detection message; the first detection message is generated by the second tunnel endpoint according to the stored first network address, and the first network address is a network address of a first device corresponding to the second tunnel endpoint; When a first address request message is received, a first target network address is obtained from the first network address, and the first target network address is sent to a second device to answer the first address request message; the first target network address is the first network address requested by the first address request message, and the second device is the device that sends the first address request message to the first tunnel endpoint.

2. The method according to claim 1, characterized in that A static tunnel is established between the first tunnel endpoint and the second tunnel endpoint, and the method further includes: Obtaining a tunnel name and a tunnel identifier of the static tunnel; The generating a first detection message according to the first network address stored in the second tunnel endpoint includes: The first detection message is generated according to the first network address, the tunnel name and the tunnel identifier stored in the second tunnel endpoint.

3. The method according to claim 1, characterized in that The method further comprises: Generate a second detection message according to a second network address stored in the first tunnel endpoint; the second network address is a network address of a third device corresponding to the first tunnel endpoint; The second detection message is sent to the second tunnel endpoint; the second detection message is used for the second tunnel endpoint to obtain the second network address carried by the second detection message, and when receiving the second address request message, obtain the second target network address from the second network address, and send the second target network address to the fourth device to answer the second address request message; the second target network address is the second network address requested by the second address request message, and the fourth device is the device that sends the second address request message to the second tunnel endpoint.

4. The method according to claim 3, characterized in that A static tunnel is established between the first tunnel endpoint and the second tunnel endpoint, and the method further includes: Obtaining a tunnel name and a tunnel identifier of the static tunnel; The generating a second detection message according to the second network address stored in the first tunnel endpoint includes: Generate the second detection message according to the second network address, the tunnel name and the tunnel identifier stored in the first tunnel endpoint; The sending the second detection message to the second tunnel endpoint includes: Determine a first target tunnel from a plurality of static tunnels corresponding to the first tunnel endpoint according to the tunnel name and the tunnel identifier; The second detection message is sent to the second tunnel endpoint through the first target tunnel.

5. The method according to claim 4, characterized in that Before generating the second detection message according to the second network address, the tunnel name, and the tunnel identifier stored in the first tunnel endpoint, the method further includes: Establishing a session between the first tunnel endpoint and the second tunnel endpoint according to the tunnel name and the tunnel identifier; The sending the second detection message to the second tunnel endpoint through the first target tunnel includes: When the state of the session is maintained, the second detection message is sent to the second tunnel endpoint through the first target tunnel.

6. The method according to any one of claims 1 to 5, characterized in that: After obtaining the first network address carried by the first detection message, the method further includes: storing the first network address in a first database; The acquiring a first target network address from the first network address and sending the first target network address to the second device includes: The first target network address is acquired from the first network addresses stored in the first database, and the first target network address is sent to the second device.

7. The method according to claim 4, characterized in that The method further comprises: When receiving a third detection message sent by the second tunnel endpoint, updating the first network address stored in the first database according to the latest first network address carried by the third detection message to obtain an updated first database; the third detection message is generated by the second tunnel endpoint according to the latest first network address; The acquiring the first target network address from the first network address stored in the first database includes: The first target network address is obtained from the first network addresses stored in the updated first database.

8. The method according to claim 5, characterized in that After updating the first network address stored in the first database according to the latest first network address carried by the third detection message to obtain the updated first database, the method further includes: Resetting a preset first timing parameter to zero and controlling the first timing parameter to restart timing; the first timing parameter is used to characterize the length of time that the first database has not been updated; When the first timing parameter is greater than a preset duration threshold, the first network address stored in the first database is deleted.

9. The method according to claim 6, characterized in that The acquiring the first target network address from the first network address stored in the first database includes: Determining a first address identifier according to the first address request message; According to the first address identifier, a first network address corresponding to the first address identifier is obtained from the first network addresses stored in the first database, and is determined as the first target network address.

10. A method for answering an address request message, characterized in that: Applied to a second tunnel endpoint, the method comprises: Generate a first detection message according to a first network address stored in the second tunnel endpoint; the first network address is a network address of a first device corresponding to the second tunnel endpoint; sending the first detection message to the first tunnel endpoint; the first detection message is used for the first tunnel endpoint to obtain the first network address, and when receiving the first address request message, obtain the first target network address from the first network address, and send the first target network address to the second device, so as to The first address request message is answered on behalf of the first target network address; the first target network address is the first network address requested by the first address request message, and the second device is the device that sends the first address request message to the first tunnel endpoint.

11. The method according to claim 10, characterized in that The method further comprises: Receiving a second detection message sent by the first tunnel endpoint; Obtaining a second network address carried by the second detection message; the second detection message is generated by the first tunnel endpoint according to the stored second network address, and the second network address is a network address of a second device corresponding to the first tunnel endpoint; When a second address request message is received, a second target network address is obtained from the second network address, and the second target network address is sent to a fourth device to answer the second address request message; the second target network address is the second network address requested by the second address request message, and the fourth device is a device that sends the second address request message to the second tunnel endpoint.

12. The method according to claim 10, characterized in that A static tunnel is established between the first tunnel endpoint and the second tunnel endpoint, and the method further includes: Obtaining a tunnel name and a tunnel identifier of the static tunnel; The generating a first detection message according to the first network address stored in the second tunnel endpoint includes: Generate the first detection message according to the first network address, the tunnel name and the tunnel identifier stored in the second tunnel endpoint; The sending the first detection message to the first tunnel endpoint includes: Determine, according to the tunnel name and the tunnel identifier, a second target tunnel from a plurality of static tunnels corresponding to the second tunnel endpoint; The first detection message is sent to the first tunnel endpoint through the second target tunnel.

13. The method according to claim 12, characterized in that Before generating the first detection message according to the first network address, the tunnel name and the tunnel identifier stored in the second tunnel endpoint, the method further includes: Establishing a session between the first tunnel endpoint and the second tunnel endpoint according to the tunnel name and the tunnel identifier; The sending the first detection message to the first tunnel endpoint through the second target tunnel includes: When the state of the session is maintained, the first detection message is sent to the first tunnel endpoint through the second target tunnel.

14. The method according to claim 11, characterized in that After obtaining the second network address carried by the second detection message, the method further includes: storing the second network address in a second database; The acquiring a second target network address from the second network address and sending the second target network address to the first device includes: The second target network address is acquired from the second network addresses stored in the second database, and the second target network address is sent to the fourth device.

15. The method according to claim 14, characterized in that The method further comprises: When receiving the fourth detection message sent by the first tunnel endpoint, updating the second network address stored in the second database according to the latest second network address carried by the fourth detection message New, an updated second database is obtained; the fourth detection message is generated by the first tunnel endpoint according to the latest second network address; The acquiring the second target network address from the second network address stored in the second database includes: The second target network address is acquired from the second network addresses stored in the updated second database.

16. The method according to claim 15, characterized in that After updating the second network address stored in the second database according to the latest second network address carried by the fourth detection message to obtain the updated second database, the method further includes: Resetting a preset second timing parameter to zero and controlling the second timing parameter to restart timing; the second timing parameter is used to characterize the duration of non-update of the second database; When the second timing parameter is greater than a preset duration threshold, the second network address stored in the second database is deleted.

17. The method according to claim 14, characterized in that The acquiring the second target network address from the second network address stored in the second database includes: Determining a second address identifier according to the second address request message; According to the second address identifier, the second network address corresponding to the second address identifier is obtained from the second network addresses stored in the second database, and is determined as the second target network address.

18. An address request message answering device, characterized in that: Applied to a first tunnel endpoint, the device comprises: A first receiving module, used to receive a first detection message sent by a second tunnel endpoint; A first acquisition module, used to acquire a first network address carried by the first detection message; the first detection message is generated by the second tunnel endpoint according to the stored first network address, and the first network address is a network address of a first device corresponding to the second tunnel endpoint; The first answering module is used to obtain a first target network address from the first network address and send the first target network address to a second device to answer the first address request message when a first address request message is received; the first target network address is the first network address requested by the first address request message, and the second device is the device that sends the first address request message to the first tunnel endpoint.

19. An address request message answering device, characterized in that: Applied to a second tunnel endpoint, the device comprises: A first generating module, configured to generate a first detection message according to a first network address stored in the second tunnel endpoint; the first network address is a network address of a first device corresponding to the second tunnel endpoint; A first sending module is used to send the first detection message to a first tunnel endpoint; the first detection message is used for the first tunnel endpoint to obtain the first network address, and when receiving a first address request message, obtain the first target network address from the first network address, and send the first target network address to a second device to answer the first address request message; the first target network address is the first network address requested by the first address request message, and the second device is a device that sends the first address request message to the first tunnel endpoint.

20. An electronic device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and running on the processor, characterized in that when the processor executes the program, the address request message answering method as described in any one of claims 1-17 is implemented.

21. A non-volatile readable storage medium, characterized in that: When the instructions in the non-volatile readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the address request message answering method described in any one of claims 1-17.

Citation Information

Patent Citations

  • Method for realizing MAC forced forwarding function and device

    CN101577722A

  • MAC address forced forwarding device and method

    CN103404084A

  • Address resolution protocol (ARP) reply on-behalf method and device

    CN104283980A

  • Method for transmitting ARP (Address Resolution Protocol) message in VXLAN (Virtual eXtensible Local Area Network) and VTEP (VXLAN Tunnel End Point) equipment

    CN108270878A

  • Virtual extensible local area network communication method and device, electronic equipment and storage medium

    CN112866119A