Message forwarding method and device, VTEP equipment and computer readable storage medium
By receiving and decapsulating VXLAN multicast tunnel messages in VTEP devices and determining the outgoing interface for forwarding based on the forwarding table, the problem that BUM messages cannot be fully forwarded in VXLAN network is solved, and packet forwarding to different network connection servers is realized .
Patent Information
- Application Number
- CN202411668780.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-02-18
AI Technical Summary
In VXLAN networks, the prior art cannot send BUM messages to all lower-level servers connected to VTEP devices through different network connections, resulting in messages being unable to be fully forwarded.
By receiving the VXLAN multicast tunnel message sent by the multicast source, based on the destination address of the message, the matching first outgoing interface and loopback interface are obtained from the multicast forwarding table, decapsulate the VNI and original BUM messages, and Determine the second outgoing interface based on the VNI search VXLAN forwarding table and forward the packet to the corresponding server.
The packet forwarding capability of VTEP devices in multiple network connection scenarios is realized, so that the original BUM packets can be forwarded to the lower-level server of the VTEP device, solving the problem that packets cannot be fully forwarded.
Smart Images

Figure CN119484204A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of message processing, and in particular to a message forwarding method, device, VTEP equipment and computer-readable storage medium. Background Art
[0002] In a VXLAN (Virtual Extensible Local Area Network) network, for BUM (Broadcast Unicast Multicast) messages, the source VTEP (VXLAN Tunnel End Point) device currently uses head-end replication by default, sending a copy of the message to all remote VTEP devices, which causes message flooding and increases network load.
[0003] In order to solve the problem of message flooding, multicast replication is adopted. When the VTEP device at the source end receives the BUM message, the original BUM message is encapsulated into the VXLAN multicast tunnel and then forwarded to the remote VTEP device according to the multicast forwarding table. This method can reduce the flooding traffic in the Underlay (bottom layer) network.
[0004] With the rapid development of server virtualization and the continuous improvement of performance, a large number of servers currently support host overlay (upper layer) network technology, that is, the server itself can establish a VXLAN tunnel with the external network.
[0005] like Figure 1 In the example, server 1 is directly connected to VTEP device 1 through the Underlay network, while server 2 is connected to VTEP device 1 through the Overlay network. In this scenario, VXLAN multicast tunnel is used to implement multicast replication and distribution of BUM messages. After receiving the multicast tunnel message, VTEP device 1 will decapsulate the multicast tunnel message to obtain the inner original BUM message, which will only be distributed to the VM (Virtual Machine) host on server 2 through the Overlay network. Since the multicast tunnel message is terminated on the VTEP device, the tunnel message cannot reach server 1 through the Underlay network, so the VM host on server 1 cannot receive the original BUM message.
[0006] Therefore, in the prior art, when a VTEP device is connected to servers connected to different networks, it is impossible to send BUM messages to all subordinate servers. Summary of the invention
[0007] The object of the present invention is to provide a message forwarding method, apparatus, VTEP device and readable storage area medium, which can forward messages to servers connected to different networks and improve the applicability of VTEP devices in VXLAN networks.
[0008] In order to achieve the above purpose, the technical solution adopted by the embodiment of the present invention is as follows:
[0009] In a first aspect, an embodiment of the present invention provides a message forwarding method, wherein the VTEP device is communicatively connected to a first server accessed through an Underlay network, and the VTEP device is also communicatively connected to a second server accessed through an Overlay network; the method comprises:
[0010] Receive VXLAN multicast tunnel messages sent by multicast sources;
[0011] Based on the destination address of the VXLAN multicast tunnel message, obtain a matching first outbound interface and a loopback interface from the multicast forwarding table; the first outbound interface is an interface connected to the first server for communication;
[0012] Sending the VXLAN multicast tunnel message from the first outbound interface and the loopback interface;
[0013] When the VXLAN multicast tunnel message is received through the loopback interface, the VXLAN multicast tunnel message is decapsulated to obtain the corresponding VXLAN network identifier VNI and the original BUM message;
[0014] Searching the VXLAN forwarding table based on the VNI to determine a second outbound interface, where the second outbound interface is an interface connected to the second server;
[0015] The original BUM message is sent out from the second outbound interface.
[0016] In an optional implementation manner, before the step of receiving the VXLAN multicast tunnel message sent by the multicast source, the method further includes:
[0017] receiving, from the first outbound interface, a group adding request sent by the first server, and creating, in the multicast forwarding table, a corresponding multicast forwarding entry according to the first outbound interface and the multicast address in the group adding request;
[0018] The loopback interface is created, and the loopback interface is added to the multicast forwarding table entry.
[0019] In an optional implementation manner, before the step of receiving the VXLAN multicast tunnel message sent by the multicast source, the method further includes:
[0020] Establishing a VXLAN multicast tunnel with the multicast source;
[0021] Create a VXLAN network corresponding to the VNI;
[0022] Associating the VXLAN multicast tunnel with the VXLAN network;
[0023] Create a corresponding VXLAN forwarding table entry in the VXLAN forwarding table based on the VNI and the second outbound interface.
[0024] In an optional implementation, the step of creating the loopback interface includes:
[0025] The loopback interface is created and configured to enable the tunnel decapsulation function.
[0026] In a second aspect, an embodiment of the present invention provides a message forwarding device, which is applied to a VTEP device, wherein the VTEP device is communicatively connected to a first server accessed through an Underlay network, and the VTEP device is also communicatively connected to a second server accessed through an Overlay network; the device includes:
[0027] A receiving module, used for receiving VXLAN multicast tunnel messages sent by a multicast source;
[0028] An acquisition module, configured to acquire a matching first outbound interface and a loopback interface from a multicast forwarding table based on a destination address of the VXLAN multicast tunnel message; the first outbound interface being an interface connected to the first server for communication;
[0029] A sending module, used to send the VXLAN multicast tunnel message from the first outbound interface and the loopback interface;
[0030] A decapsulation module, configured to, when receiving the VXLAN multicast tunnel message through the loopback interface, decapsulate the VXLAN multicast tunnel message to obtain a corresponding VXLAN network identifier VNI and an original BUM message;
[0031] A determination module, configured to determine a second outbound interface by searching the VXLAN forwarding table based on the VNI, where the second outbound interface is an interface connected to the second server;
[0032] The sending module is further configured to send the original BUM message from the second outbound interface.
[0033] In a third aspect, an embodiment of the present invention provides a VTEP device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the message forwarding method when executing the computer program.
[0034] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the message forwarding method when executed by a processor.
[0035] The present invention has the following beneficial effects:
[0036] The present invention receives a VXLAN multicast tunnel message sent by a multicast source, and based on the destination address of the VXLAN multicast tunnel message, obtains a matching first output interface and a loopback interface from a multicast forwarding table; the first output interface is an interface connected to a first server for communication, and the VXLAN multicast tunnel message is sent from the first output interface and the loopback interface. When the VXLAN multicast tunnel message is received through the loopback interface, the VXLAN multicast tunnel message is decapsulated to obtain the corresponding VXLAN network identifier VNI and the original BUM message, and the VXLAN forwarding table is searched based on the VNI to determine the second output interface, the second output interface is an interface connected to a second server, and the original BUM message is sent from the second output interface. The message forwarding method provided by the present invention can enable the VTEP device to support message forwarding of multiple network connections, so that the original BUM message can be forwarded to the lower-level server of the VTEP device. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0038] Figure 1 Schematic diagram of VXLAN networking in data centers in the prior art;
[0039] Figure 2 A block diagram of a VTEP device provided in an embodiment of the present invention;
[0040] Figure 3 A schematic diagram of a flow chart of a message forwarding method provided by an embodiment of the present invention;
[0041] Figure 4 A schematic diagram of the hardware structure of a message forwarding device provided in an embodiment of the present invention;
[0042] Figure 5 A schematic diagram of a multicast forwarding table entry provided by an embodiment of the present invention;
[0043] Figure 6 A schematic diagram of a VXLAN message forwarding table provided in an embodiment of the present invention;
[0044] Figure 7 A schematic diagram of a process for constructing a multicast forwarding table entry in a message forwarding method provided in an embodiment of the present invention;
[0045] Figure 8 A schematic diagram of a process for constructing a VXLAN message forwarding table entry in a message forwarding method provided in an embodiment of the present invention;
[0046] Fig. 9 A structural block diagram of a message forwarding device provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0047] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0048] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0050] In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. appear to indicate an orientation or position relationship, they are based on the orientation or position relationship shown in the accompanying drawings, or are the orientation or position relationship in which the product of the invention is usually placed when used. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0051] In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.
[0052] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0053] After extensive research, the inventors found that when multiple servers are connected to the VTEP device using different network connection methods, it is impossible to send BUM messages to all subordinate servers.
[0054] In view of the discovery of the above problems, this embodiment provides a message forwarding method, device, VTEP device and computer-readable storage medium, which can obtain the matching first output interface and loopback interface from the multicast forwarding table based on the destination address of the VXLAN multicast tunnel message by receiving the VXLAN multicast tunnel message sent by the multicast source; the first output interface is the interface connected to the first server for communication, and the VXLAN multicast tunnel message is sent from the first output interface and the loopback interface. When the VXLAN multicast tunnel message is received through the loopback interface, the VXLAN multicast tunnel message is decapsulated to obtain the corresponding VXLAN network identifier VNI and the original BUM message, and the VXLAN forwarding table is searched based on the VNI to determine the second output interface, the second output interface is the interface connected to the second server, and the original BUM message is sent from the second output interface. The message forwarding method provided by the present invention can enable the VTEP device to support message forwarding of multiple network connections, so that the original BUM message can be forwarded to the lower-level server of the VTEP device. The scheme provided by this embodiment is described in detail below.
[0055] This embodiment provides a VTEP device that can forward messages. In one possible implementation, for example, a VTEP device refers to a network device that can implement the virtual tunnel endpoint function in the VXLAN technology. These devices are responsible for establishing and maintaining VXLAN tunnels and implementing the encapsulation and decapsulation of Layer 2 network frames in Layer 3 IP networks. VTEP devices can be physical hardware, such as switches and routers, or they can be implemented in software, such as a virtual switch running on a server or part of a network virtualization software platform.
[0056] Please refer to Figure 2 , Figure 2 1 is a schematic diagram of the structure of the VTEP device 100 provided in an embodiment of the present invention. The VTEP device 100 may also include Figure 2 More or fewer components as shown, or with Figure 2Different configurations shown. Figure 2 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0057] The VTEP device 100 includes a message forwarding device 110 , a memory 120 , and a processor 130 .
[0058] The components of the memory 120 and the processor 130 are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines. The message forwarding device 110 includes at least one software function module that can be stored in the memory 120 in the form of software or firmware or solidified in the OS (operating system) of the VTEP device 100. The processor 130 is used to execute executable modules stored in the memory 120, such as software function modules and computer programs included in the message forwarding device 110.
[0059] The memory 120 may be, but is not limited to, RAM (Random Access Memory), ROM (Read Only Memory), PROM (Programmable Read-Only Memory), EPROM (Erasable Programmable Read-Only Memory), EEPROM (Electric Erasable Programmable Read-Only Memory), etc. The memory 120 is used to store programs, and the processor 130 executes the programs after receiving the execution instruction.
[0060] Please refer to Figure 3 , Figure 3 For application Figure 2 The flowchart of a message forwarding method of the VTEP device 100 is shown in FIG. 1 , and each step of the method is described in detail below.
[0061] S201: Receive a VXLAN multicast tunnel message sent by a multicast source.
[0062] S202: Based on the destination address of the VXLAN multicast tunnel message, obtain a matching first outbound interface and a loopback interface from the multicast forwarding table.
[0063] The first outbound interface is an interface connected to the first server for communication, and the multicast forwarding table includes the first outbound interface and the loopback interface corresponding to the multicast address.
[0064] S203: Send the VXLAN multicast tunnel message from the first outbound interface and the loopback interface.
[0065] S204: When a VXLAN multicast tunnel message is received through the loopback interface, the VXLAN multicast tunnel message is decapsulated to obtain a corresponding VXLAN network identifier VNI and an original BUM message.
[0066] S205: Search the VXLAN forwarding table based on the VNI to determine the second outbound interface.
[0067] The second outbound interface is an interface connected to the second server.
[0068] S206: Send the original BUM message from the second outbound interface.
[0069] It should be noted that the first server and the VTEP device may be connected via an Underlay network, and the second server and the VTEP device may be connected via an Overlay network.
[0070] Before the VTEP device receives the VXLAN multicast tunnel message sent by the multicast source, the VTEP device constructs the multicast forwarding table and the VXLAN forwarding table.
[0071] The multicast forwarding table includes a first outbound interface corresponding to the VXLAN multicast tunnel message, and the first outbound interface is connected to the first server.
[0072] For example, Figure 4 As shown in the figure, VTEP device 1 includes Eth0 / 1 interface, Eth0 / 2 interface and Eth0 / 3 interface. Eth0 / 3 interface is connected to the VTEP device in the multicast source and is used to receive VXLAN multicast tunnel messages sent by the VTEP device in the multicast source. Figure 4 Not shown. VTEP device 1 is connected to server 1 (i.e., the first server) accessed through the Underlay network through its Eth0 / 1 interface, and sends messages to server 1 through the Eth0 / 1 interface. The Eth0 / 1 interface is the first outbound interface. VTEP device 1 is connected to server 2 (i.e., the second server) accessed through the Overlay network through its Eth0 / 2 interface, and sends messages to server 2 through Eth0 / 2. The Eth0 / 2 interface is the second outbound interface. The VTEP device of the multicast source includes an Eth0 / 1 interface, and the Eth0 / 1 interface of the VTEP device of the multicast source is connected to the Eth0 / 3 interface of VTEP device 1. Server 1 is connected to VTEP device 1 through the Eth0 / 1 interface, and server 2 is connected to the Eth0 / 2 interface of VTEP device 1 through the Eth0 / 1 interface.
[0073] Since the present invention is to realize that the VXLAN multicast tunnel message can be successfully sent to the lower-level server of the VTEP device, Figure 4 The multicast forwarding table and VXLAN forwarding table used by VTEP device 1 in the message forwarding process. When VTEP device 1 receives the VXLAN multicast tunnel message sent by the multicast source, for example:
[0074] VTEP device in the multicast source ( Figure 4 Not shown, assuming that the source address is 1.1.1.1), after receiving a BUM message with a source address of 192.168.1.10 in the VNI100 domain, the VXLAN multicast tunnel message with a source address of 1.1.1.1 and a destination address of 234.0.0.1 is sent to the VTEP device in the present invention, i.e., VTEP device 1, through the physical port Eth0 / 1 interface after adding VXLAN multicast tunnel encapsulation. VTEP device 1 receives the VXLAN multicast tunnel message sent by the multicast source through the Eth0 / 3 interface.
[0075] After receiving the VXLAN multicast tunnel message sent by the multicast source, or before receiving the VXLAN multicast tunnel message sent by the multicast source, the VTEP device 1 turns off the decapsulation function of its own Eth0 / 1 interface and Eth0 / 3 interface, obtains the multicast forwarding table entry with the same destination address as the VXLAN multicast tunnel message sent by the multicast source from multiple multicast forwarding tables, and obtains the corresponding output interface from the multicast forwarding table entry. The VTEP device of the present invention receives the VXLAN multicast tunnel message through the tunnel interface eth0 / 3 of the VXLAN multicast tunnel established with the VTEP device of the multicast source, does not decapsulate the tunnel message, but searches the forwarding table through the destination address 234.0.0.1 of the tunnel message to find the first output interface and loopback interface that match the destination address 234.0.0.1. Figure 4 In the figure, the destination multicast address of the VXLAN multicast tunnel message is a multicast forwarding table entry of 234.0.0.1, and the outbound interfaces corresponding to the multicast forwarding table entry include a LOOP interface and an Eth0 / 1 interface, wherein the LOOP interface is the loopback interface of VTEP device 1.
[0076] Because VTEP device 1 receives the VXLAN multicast tunnel message sent by the multicast source through the Eth0 / 3 interface, it will no longer be sent from the Eth0 / 3 interface. VTEP device 1 sends the VXLAN multicast tunnel message from the Eth0 / 1 interface and the LOOP interface. Figure 4As shown, since the Eth0 / 1 interface of VTEP device 1 is connected to server 1 for communication, the VXLAN multicast tunnel message is sent to server 1 through the Eth0 / 1 interface. The LOOP interface is the internal logical interface of VTEP device 1, that is, VTEP device 1 sends the VXLAN multicast tunnel message to itself to copy the VXLAN multicast tunnel message.
[0077] When VTEP device 1 receives the VXLAN multicast tunnel message through the LOOP interface, VTEP device 1 decapsulates the VXLAN multicast tunnel message to obtain the corresponding VNI (VXLAN network identifier) and the original BUM message, that is, the original BUM message with a source address of 192.168.1.10 and a VNI of 100 is obtained, and the interface Eth0 / 2 is determined from the VXLAN forwarding table based on VNI100, so that the original BUM message is sent to server 2 through the Eth0 / 2 interface. Figure 6 As shown, this is a VXLAN forwarding table entry with a VNI of 100 in an embodiment of the present invention, and the Eth0 / 2 interface is Figure 4 The interface for communication between VTEP device 1 and server 2.
[0078] VTEP device 1 copies a VXLAN multicast tunnel message sent by the multicast source through the loopback interface, decapsulates the VXLAN multicast tunnel message, and then sends the original BUM message of the decapsulated inner message to server 2 based on the VXLAN forwarding table. When server 1 and server 2 are connected to VTEP device 1 through different network connection methods, the original BUM message can be sent to the first server and the second server, avoiding the problem that the prior art can only send the message to the first server or the second server.
[0079] There are many ways for the VTEP device of the present invention to construct a multicast forwarding table entry. In one implementation, Figure 7 As shown, the specific method for constructing a multicast forwarding table entry in the message forwarding method provided by the embodiment of the present invention includes the following steps:
[0080] S301: receiving a group adding request sent by a first server from a first outbound interface, and creating a corresponding multicast forwarding entry in a multicast forwarding table according to the first outbound interface and the multicast address in the group adding request.
[0081] In an embodiment of the present invention, the first server creates a VXLAN multicast tunnel and sends a group adding request to the VTEP device of the present invention. The VTEP device of the present invention receives the group adding request sent by the first server from the first outbound interface.
[0082] For example, continue with Figure 4For example, server 1 (assuming the IP address is 3.3.3.3) is connected to VTEP device 1 through the Underlay network. Server 1 creates a VXLAN multicast tunnel with a tunnel source address of 3.3.3.3 and a destination address of 234.0.0.1 according to the configuration information, and sends a join request to VTEP device 1 through the Eth0 / 1 interface to announce that it has joined the multicast group 234.0.0.1. VTEP device 1 receives the join request from server 1 from the Eth0 / 1 interface, and creates a join request in the multicast forwarding table according to the Eth0 / 1 interface and the multicast address 234.0.0.1 in the join request. Figure 5 The multicast forwarding table entries are shown.
[0083] It should be noted that there may be multiple multicast forwarding entries in the multicast forwarding table, and each multicast forwarding entry corresponds to a multicast address.
[0084] S302: Create a loopback interface.
[0085] There are multiple ways for the VTEP device of the present invention to construct a loopback interface. In one implementation, the loopback interface is created and configured to enable the tunnel decapsulation function.
[0086] Exemplarily, a loopback interface, namely, a LOOP interface, is created on the VTEP device, and the loopback interface is configured to decapsulate the tunnel.
[0087] S303: Add the loopback interface to the multicast forwarding table entry.
[0088] For example, continue with Figure 4 As an example, the created loopback interface, namely the LOOP interface, is added to the multicast forwarding table entry with the multicast address of 234.0.0.1. The VTEP device 1 of the present invention creates a corresponding multicast forwarding table entry in the multicast forwarding table based on the first outgoing interface Eth0 / 1 interface and the loopback interface LOOP interface. Figure 5 shown.
[0089] There are many implementations of the VTEP device of the present invention to construct a VXLAN forwarding table entry. In one implementation, Figure 8 As shown, the specific method for constructing a VXLAN forwarding table entry in the message forwarding method provided in the embodiment of the present invention includes the following steps:
[0090] S401: Establish a VXLAN multicast tunnel with the multicast source.
[0091] For example, Figure 4 As shown, assuming that the address of the VTEP device of the present invention is 2.2.2.2 and the multicast address is 234.0.0.1, the VTEP device constructs a VXLAN multicast tunnel with a source address of 2.2.2.2 and a destination address of 234.0.0.1.
[0092] S402: Create a VXLAN network corresponding to the VNI.
[0093] In this embodiment of the present invention, it is assumed that the created VNI is 100.
[0094] S403: Associating the VXLAN multicast tunnel established with the multicast source with the VXLAN network.
[0095] In the present invention, the VXLAN multicast tunnel established between the VTEP device of the present invention and the multicast source needs to be added to the created VXLAN network, that is, the multicast address 234.0.0.1 is associated with the created VNI 100.
[0096] S404: Create a corresponding VXLAN forwarding entry in the VXLAN forwarding table based on the VNI and the second outbound interface.
[0097] Exemplarily, according to the created VNI100, it is determined that the second outbound interface of the VTEP device of the present invention communicating with the second server is Eth0 / 2, and the VXLAN forwarding table corresponding to the constructed VNI100 is as follows: Figure 6 shown.
[0098] Please refer to Fig. 9 The embodiment of the present invention also provides a method for applying Figure 2 The message forwarding device 110 of the VTEP device 100 includes:
[0099] A receiving module 111 is used to receive a VXLAN multicast tunnel message sent by a multicast source;
[0100] An acquisition module 112 is used to acquire a matching first outbound interface and a loopback interface from a multicast forwarding table based on a destination address of the VXLAN multicast tunnel message; the first outbound interface is an interface connected to the first server for communication;
[0101] A sending module 113, configured to send the VXLAN multicast tunnel message from the first outbound interface and the loopback interface;
[0102] The decapsulation module 114 is used to decapsulate the VXLAN multicast tunnel message to obtain the corresponding VXLAN network identifier VNI and the original BUM message when the VXLAN multicast tunnel message is received through the loopback interface;
[0103] A determination module 115 is configured to determine a second outbound interface by searching the VXLAN forwarding table based on the VNI, where the second outbound interface is an interface connected to the second server;
[0104] The sending module 113 is further configured to send the original BUM message from the second outbound interface.
[0105] The present invention further provides a VTEP device 100, which includes a processor 130 and a memory 120. The memory 120 stores computer executable instructions, and when the computer executable instructions are executed by the processor 130, the message forwarding method is implemented.
[0106] The embodiment of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by the processor 130, the message forwarding method is implemented.
[0107] In the embodiments provided by the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0108] In addition, the functional modules in each embodiment of the present invention can be integrated together to form an independent part, or each module can exist separately, or two or more modules can be integrated to form an independent part. If the function is implemented in the form of a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, ROM (Read-Only Memory, read-only memory), RAM (Random Access Memory, random access memory), disk or optical disk and other media that can store program code.
[0109] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0110] The above are only various embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A message forwarding method, applied to a VTEP device, characterized in that: The VTEP device is connected in communication with a first server accessed through an Underlay network, and the VTEP device is also connected in communication with a second server accessed through an Overlay network; the method includes: Receive VXLAN multicast tunnel messages sent by multicast sources; Based on the destination address of the VXLAN multicast tunnel message, obtain a matching first outbound interface and a loopback interface from the multicast forwarding table; the first outbound interface is an interface connected to the first server for communication; Sending the VXLAN multicast tunnel message from the first outbound interface and the loopback interface; When the VXLAN multicast tunnel message is received through the loopback interface, the VXLAN multicast tunnel message is decapsulated to obtain the corresponding VXLAN network identifier VNI and the original BUM message; Searching the VXLAN forwarding table based on the VNI to determine a second outbound interface, where the second outbound interface is an interface connected to the second server; The original BUM message is sent out from the second outbound interface.
2. The method according to claim 1, characterized in that Before the step of receiving the VXLAN multicast tunnel message sent by the multicast source, the method further includes: receiving, from the first outbound interface, a group adding request sent by the first server, and creating, in the multicast forwarding table, a corresponding multicast forwarding entry according to the first outbound interface and the multicast address in the group adding request; The loopback interface is created, and the loopback interface is added to the multicast forwarding table entry.
3. The method according to claim 1, characterized in that Before the step of receiving the VXLAN multicast tunnel message sent by the multicast source, the method further includes: Establishing a VXLAN multicast tunnel with the multicast source; Create a VXLAN network corresponding to the VNI; Associating the VXLAN multicast tunnel with the VXLAN network; Create a corresponding VXLAN forwarding table entry in the VXLAN forwarding table based on the VNI and the second outbound interface.
4. The method according to claim 2, characterized in that: The step of creating the loopback interface comprises: The loopback interface is created and configured to enable the tunnel decapsulation function.
5. A message forwarding device, characterized in that: Applied to a VTEP device, the VTEP device is connected to a first server accessed through an Underlay network, and the VTEP device is also connected to a second server accessed through an Overlay network; the device includes: A receiving module, used for receiving VXLAN multicast tunnel messages sent by a multicast source; An acquisition module, configured to acquire a matching first outbound interface and a loopback interface from a multicast forwarding table based on a destination address of the VXLAN multicast tunnel message; the first outbound interface being an interface connected to the first server for communication; A sending module, used to send the VXLAN multicast tunnel message from the first outbound interface and the loopback interface; A decapsulation module, configured to, when receiving the VXLAN multicast tunnel message through the loopback interface, decapsulate the VXLAN multicast tunnel message to obtain a corresponding VXLAN network identifier VNI and an original BUM message; A determination module, configured to determine a second outbound interface by searching the VXLAN forwarding table based on the VNI, where the second outbound interface is an interface connected to the second server; The sending module is further configured to send the original BUM message from the second outbound interface.
6. The device according to claim 5, characterized in that The device also includes: The first creation module is used to receive a group adding request sent by the first server from the first output interface, and create a corresponding multicast forwarding table entry in the multicast forwarding table according to the first output interface and the multicast address in the group adding request; create the loopback interface, and add the loopback interface to the multicast forwarding table entry.
7. The device according to claim 6, characterized in that The device also includes: The second creation module is used to establish a VXLAN multicast tunnel with the multicast source; create a VXLAN network corresponding to the VNI; associate the VXLAN multicast tunnel with the VXLAN network; and create a corresponding VXLAN forwarding table entry in the VXLAN forwarding table based on the VNI and the second outbound interface.
8. The device according to claim 6, characterized in that The first creation module is specifically used for: The loopback interface is created and configured to enable the tunnel decapsulation function.
9. A VTEP device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the steps of the method according to any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.