Message processing methods, apparatus, systems, network devices and storage media
By establishing only one VXLAN network in a dual-homed access network and using the access network identifier to distinguish the access network, the problem of multiple loops occupying VNIs is solved, and the effective forwarding of loop detection protocol messages and efficient utilization of VNIs are realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- MAIPU COMM TECH CO LTD
- Filing Date
- 2023-12-29
- Publication Date
- 2026-05-26
AI Technical Summary
In dual-homed access networks, when multiple loops exist, existing technologies consume too many VXLAN network identifiers (VNIs), resulting in a reduced ability to provide services to users.
Only one VXLAN network is established between the two VTEP devices to transmit loop detection protocol messages. Different access networks are distinguished by access network identifiers. The access network identifier, loop detection protocol address, and IP address of the peer VTEP device are configured on the access interface of the VTEP device to realize unicast forwarding of loop detection protocol messages.
By eliminating loops, the occupation of VXLAN network identifiers is reduced, and the ability to provide services to users is improved.
Smart Images

Figure CN117792825B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of communication technology, and more specifically, to a message processing method, apparatus, system, network device, and storage medium. Background Technology
[0002] With the development of VXLAN (Virtual eXtensible Local Area Network) technology, the use of VXLAN to provide Layer 2 access services has become widespread. To improve reliability, the access network can be dual-homed to the VXLAN VTEP (VxLAN Tunnel End Point) device.
[0003] In dual-homed access networking, when two VTEP devices are simultaneously connected to the same access network, a loop is formed between the access network and the two VTEP devices. In existing technologies, to break this loop, a VXLAN network is established between the two VTEP devices connected to the same access network for transparent transmission of loop detection protocol messages (such as Spanning Tree Protocol, ERPS (Ethernet Ring Protection Switching), and loopback detection protocol messages).
[0004] However, when multiple access networks are connected to two VTEP devices simultaneously in a network, multiple loops will exist under the two VTEP devices. Different VXLAN network loop detection protocol messages need to be transparently transmitted for different loops, and a VNI (VXLAN Network Identifier) needs to be assigned to each VXLAN network. However, the number of VNIs supported by network devices is limited. In scenarios with multiple loops, too many VNIs will be used to provide services to users, thereby reducing the ability to provide services to users. Summary of the Invention
[0005] In view of this, the purpose of the present invention is to provide a message processing method, apparatus, system, network device and storage medium to solve the problem that in existing dual-homed access networks, when multiple loops exist, excessive VNIs used to provide services to users are consumed, thereby reducing the ability to provide services to users.
[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of the present invention are as follows:
[0007] In a first aspect, the present invention provides a message processing method applied to a first VTEP device, wherein an access network including at least one access device is simultaneously connected to the first VTEP device and a second VTEP device, and a VXLAN network for transmitting loop detection protocol messages is established between the first VTEP device and the second VTEP device; each VTEP device has an access interface configured with an access network identifier, a loop detection protocol address, and the IP address of the peer VTEP device, and the access interfaces of the two VTEP devices connected to the same access network have the same access network identifier; each VTEP device maintains a routing table, and each entry in the routing table includes a loop detection protocol address, a VXLAN network identifier, a next-hop address, and an outgoing interface; the method includes:
[0008] When a loop detection protocol message is received, the receiving access interface of the loop detection protocol message, the VLAN information in the loop detection protocol message, and the destination MAC address are obtained;
[0009] Based on the VLAN information in the received access interface and the loop detection protocol message, the corresponding VXLAN network identifier is obtained;
[0010] The routing table is looked up based on the destination MAC address of the loop detection protocol message and the VXLAN network identifier.
[0011] If the corresponding next-hop address and outgoing interface are found in the routing table, the loop detection protocol message is encapsulated in VXLAN according to the next-hop address, the IP address of the first VTEP device, the VXLAN network identifier, and the access network identifier configured on the receiving access interface. The encapsulated VXLAN message is then sent to the second VTEP device through the outgoing interface, so that the second VTEP device can perform unicast forwarding based on the access network identifier, the VXLAN network identifier, and the IP address of the first VTEP device in the encapsulated VXLAN message.
[0012] In an optional implementation, the step of encapsulating the loop detection protocol message with VXLAN based on the next-hop address, the IP address of the first VTEP device, the VXLAN network identifier, and the access network identifier configured on the receiving access interface includes:
[0013] The loop detection protocol message is encapsulated with a VXLAN header based on the next-hop address, the IP address of the first VTEP device, the VXLAN network identifier, and the access network identifier configured on the receiving access interface to obtain the encapsulated VXLAN message; wherein the reserved field of the VXLAN header is filled with the access network identifier configured on the receiving access interface.
[0014] In an optional implementation, before obtaining the receiving access interface of the loop detection protocol message, the VLAN information in the loop detection protocol message, and the destination MAC address when a loop detection protocol message is received, the method further includes:
[0015] Upon receiving a routing advertisement message from the second VTEP device, the loop detection protocol address, the IP address of the peer VTEP device, the next-hop address, and the access network identifier carried in the routing advertisement message are obtained. The routing advertisement message is generated by the second VTEP device after configuring the IP address, loop detection protocol address, and corresponding access network identifier of the peer VTEP device.
[0016] If the IP address, next-hop address, and access network identifier of the peer VTEP device carried in the routing advertisement message are consistent with the IP address of the first VTEP device, the IP address of the second VTEP device configured on the access interface of the first VTEP device, and the access network identifier, then a routing table entry is added to the routing table according to the VXLAN network identifier configured on the first VTEP device, the loop detection protocol address, and the next-hop address in the routing advertisement message.
[0017] In a second aspect, the present invention provides a message processing method applied to a second VTEP device, wherein an access network including at least one access device is simultaneously connected to both the first VTEP device and the second VTEP device as described in any of the foregoing embodiments, the method comprising:
[0018] The VXLAN message sent by the first VTEP device is decapsulated to obtain the source IP address in the outer IP header of the VXLAN message, the access network identifier in the VXLAN header of the VXLAN message, and the loop detection protocol message in the VXLAN message.
[0019] If a corresponding access interface is found based on the obtained source IP address and access network identifier, the loop detection protocol message is sent through the found access interface.
[0020] Thirdly, the present invention provides a message processing apparatus applied to a first VTEP device, wherein an access network including at least one access device is simultaneously connected to the first VTEP device and a second VTEP device, and a VXLAN network for transmitting loop detection protocol messages is established between the first VTEP device and the second VTEP device; each VTEP device has an access interface configured with an access network identifier, a loop detection protocol address, and the IP address of the peer VTEP device, and the access interfaces of the two VTEP devices connected to the same access network have the same access network identifier; each VTEP device maintains a routing table, and each entry in the routing table includes a loop detection protocol address, a VXLAN network identifier, a next-hop address, and an outgoing interface; the apparatus includes:
[0021] The message acquisition module is used to acquire the receiving access interface of the loop detection protocol message, the VLAN information in the loop detection protocol message, and the destination MAC address when a loop detection protocol message is received;
[0022] The information lookup module is used to obtain the corresponding VXLAN network identifier based on the VLAN information in the received access interface and the loop detection protocol message; and to look up the routing table based on the destination MAC address of the loop detection protocol message and the VXLAN network identifier.
[0023] The message processing module is configured to, if a corresponding next-hop address and outgoing interface are found in the routing table, encapsulate the loop detection protocol message using VXLAN based on the next-hop address, the IP address of the first VTEP device, the VXLAN network identifier, and the access network identifier configured on the receiving access interface, and send the encapsulated VXLAN message to the second VTEP device through the outgoing interface, so that the second VTEP device can perform unicast forwarding based on the access network identifier, the VXLAN network identifier, and the IP address of the first VTEP device in the encapsulated VXLAN message.
[0024] In an optional implementation, the message processing module is used to encapsulate a VXLAN header for the loop detection protocol message based on the next-hop address, the IP address of the first VTEP device, the VXLAN network identifier, and the access network identifier configured on the receiving access interface, to obtain an encapsulated VXLAN message; wherein the reserved field of the VXLAN header is filled with the access network identifier configured on the receiving access interface.
[0025] Fourthly, the present invention provides a message processing apparatus applied to a second VTEP device, wherein an access network including at least one access device is simultaneously connected to both the first VTEP device and the second VTEP device as described in any of the foregoing embodiments, the apparatus comprising;
[0026] The message decapsulation module is used to decapsulate the VXLAN message sent by the first VTEP device to obtain the source IP address in the outer IP header of the VXLAN message, the access network identifier in the VXLAN header of the VXLAN message, and the loop detection protocol message in the VXLAN message.
[0027] The message sending module is used to send the loop detection protocol message through the found access interface if the corresponding access interface is found based on the obtained source IP address and access network identifier.
[0028] Fifthly, the present invention provides a message processing system, including a first VTEP device and a second VTEP device, wherein the first VTEP device includes the message processing apparatus described in any of the preceding third aspects, and the second VTEP device includes the message processing apparatus described in the preceding fourth aspect.
[0029] In a sixth aspect, the present invention provides a network device including a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the message processing method as described in any of the foregoing embodiments.
[0030] In a seventh aspect, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the message processing method as described in any of the foregoing embodiments.
[0031] The message processing method, apparatus, system, network device, and storage medium provided in this invention are applied to a first VTEP device. An access network, including at least one access device, is simultaneously connected to both the first and second VTEP devices. A VXLAN network for transmitting Loop Detection Protocol (LOP) messages is established between the first and second VTEP devices. Each VTEP device has an access interface configured with an access network identifier, a LOP address, and the IP address of the peer VTEP device. The access interfaces on both VTEP devices connected to the same access network have the same access network identifier. Each VTEP device maintains a routing table, and each entry in the routing table includes a LOP address, a VXLAN network identifier, a next-hop address, and an outgoing interface. When a loop detection protocol (LOP) message is received, the receiving access interface, VLAN information, and destination MAC address of the LOP message are obtained. Based on the receiving access interface and VLAN information, the corresponding VXLAN network identifier is obtained. The routing table is searched based on the destination MAC address and VXLAN network identifier. If the corresponding next-hop address and outgoing interface are found in the routing table, the LOP message is encapsulated using VXLAN based on the next-hop address, the IP address of the first VTEP device, the VXLAN network identifier, and the access network identifier configured on the receiving access interface. The encapsulated VXLAN message is then sent to the second VTEP device through the outgoing interface, so that the second VTEP device can unicast it based on the access network identifier, VXLAN network identifier, and the IP address of the first VTEP device in the encapsulated VXLAN message. In this invention, only a VXLAN network for transmitting loop detection protocol messages needs to be established between two VTEP devices. Different access networks are distinguished by the access network identifier. The access interface of the VTEP device is configured using the access network identifier, the loop detection protocol address, and the IP address of the peer VTEP device. Therefore, the loop detection protocol messages sent from each access network will only be forwarded within the loop of that access network and will not be sent to other loops. This not only breaks the loop but also reduces the occupation of VXLAN network identifiers.
[0032] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0033] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0034] Figure 1 A schematic diagram of a dual-homed access network applicable to an embodiment of the present invention is shown;
[0035] Figure 2 This invention provides a schematic flowchart of a message processing method applied to a first VTEP device.
[0036] Figure 3 This invention provides a schematic flowchart of a message processing method applied to a second VTEP device.
[0037] Figure 4 This diagram illustrates a specific example of a dual-homed access network.
[0038] Figure 5 This diagram illustrates a functional block diagram of a message processing apparatus for a first VTEP device provided by an embodiment of the present invention.
[0039] Figure 6 This invention illustrates a functional block diagram of a message processing apparatus for a second VTEP device, provided by an embodiment of the present invention.
[0040] Figure 7 A block diagram of a network device provided in an embodiment of the present invention is shown.
[0041] Icons: 100 - Network device; 110 - Memory; 120 - Processor; 130 - Communication module; 610 - Message acquisition module; 620 - Information retrieval module; 630 - Message processing module; 710 - Message decapsulation module; 720 - Message sending module. Detailed Implementation
[0042] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0043] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0044] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0045] The message processing method provided in this embodiment of the invention can be applied to Figure 1 In the dual-homed access network scenario shown, the dual-homed access network includes a spine device and multiple VTEP devices. The multiple VTEP devices can communicate with each other through the spine device. The access network of at least one access device is connected to two VTEP devices at the same time, and a VXLAN network is established between the two VTEP devices for transparent transmission of loop detection protocol messages such as spanning tree, ERPS, and loopback detection.
[0046] In this embodiment, the spine device, VTEP device, and access device can be network devices such as switches and routers, and this embodiment of the invention does not limit them.
[0047] In this embodiment, the VXLAN network established between the two VTEP devices for transmitting loop detection protocol messages is not used for data transmission. Data transmission between the two VTEP devices is achieved through a separately established VXLAN network. Since the number of VNIs supported by network devices is limited, if there are many loops under the two VTEP devices, too many VNIs will be occupied, ultimately reducing the number of VNIs available to provide services to users. Ideally, more VNIs should be used for data transmission rather than loop detection protocol message transmission. When VNIs available to provide services to users are occupied, the cost of providing services through additional VNIs will increase.
[0048] Based on this, the message processing method, apparatus, system, network device, and storage medium proposed in this embodiment of the invention only require establishing a VXLAN network for transmitting loop detection protocol messages between two VTEP devices. Different access networks are distinguished by the access network identifier, and the access interface of the VTEP device is configured using the access network identifier, the loop detection protocol address, and the IP address of the peer VTEP device. Therefore, loop detection protocol messages sent from each access network will only be forwarded within the loop of that access network and will not be sent to other loops. This not only breaks the loop but also reduces the occupation of VXLAN network identifiers.
[0049] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0050] Please refer to Figure 2 This is a schematic flowchart of a message processing method provided in an embodiment of the present invention. It should be noted that the message processing method of the present invention is not based on... Figure 2 The specific order described below is a limitation. It should be understood that in other embodiments, the order of some steps in the message processing method of the present invention can be interchanged according to actual needs, or some steps can be omitted or deleted. This message processing method can be applied to the first VTEP device in the above-mentioned dual-homed access network. The following will describe... Figure 2 The specific process shown will be explained in detail.
[0051] Step S201: When a loop detection protocol message is received, obtain the receiving access interface of the loop detection protocol message, the VLAN information in the loop detection protocol message, and the destination MAC address.
[0052] In this embodiment, the loop detection protocol message can be sent by any access device in the access network connected to the VTEP device, and the loop detection protocol message will carry information such as VLAN information and destination MAC address.
[0053] Step S202: Obtain the corresponding VXLAN network identifier based on the VLAN information in the received access interface and loop detection protocol messages.
[0054] In this embodiment, each VTEP device stores the correspondence between access interfaces, VLAN information, and the VXLAN network identifier. That is, all access interfaces connected to the access network on the VTEP device and their corresponding VLAN information are configured in the same VXLAN network, thus establishing an association between all access interfaces and their corresponding VLAN information and the VXLAN network identifier of that VXLAN network. After obtaining the receiving access interface of the loop detection protocol message and the VLAN information in the loop detection protocol message, the VTEP device can query the corresponding VXLAN network identifier based on the receiving access interface and the VLAN information. Here, the receiving access interface can be understood as the access interface on the VTEP device that receives the loop detection protocol message.
[0055] Step S203: Look up the routing table based on the destination MAC address and VXLAN network identifier of the loop detection protocol message.
[0056] In this embodiment, each VTEP device maintains a routing table. Each entry in the routing table includes the Loop Detection Protocol (LOP) address, VXLAN network identifier, next-hop address, and outgoing interface. The first VTEP device searches the routing table for a matching entry based on the destination MAC address and VXLAN network identifier of the LOP message. If a matching entry exists, step S204 is executed; otherwise, the LOP message is discarded.
[0057] Step S204: If the corresponding next-hop address and outgoing interface are found in the routing table, the loop detection protocol message is encapsulated in VXLAN according to the next-hop address, the IP address of the first VTEP device, the VXLAN network identifier, and the access network identifier configured on the receiving access interface. The encapsulated VXLAN message is then sent to the second VTEP device through the outgoing interface so that the second VTEP device can perform unicast forwarding based on the access network identifier, VXLAN network identifier, and the IP address of the first VTEP device in the encapsulated VXLAN message.
[0058] In this embodiment, each VTEP device has an access interface configured with an access network identifier, a loop detection protocol address, and the IP address of the peer VTEP device. Furthermore, the access interfaces on both VTEP devices connected to the same access network have the same access network identifier. Of course, the configuration information of the access interface may also include VLAN information, etc. Therefore, the first VTEP device can obtain the access network identifier, the IP address of the peer VTEP device, the loop detection protocol address, and VLAN information configured on the receiving access interface by looking up the corresponding configuration information based on the receiving access interface of the loop detection protocol message.
[0059] In this embodiment, the loop detection protocol address can be either a MAC address or an IP address.
[0060] When the first VTEP device finds a matching routing table entry, it obtains the next-hop address and outgoing interface from the entry. Based on this next-hop address, the first VTEP device's IP address, the VXLAN network identifier, and the access network identifier, it encapsulates the loop detection protocol message using VXLAN. The encapsulated VXLAN message is then sent to the peer VTEP device (the second VTEP device) through the outgoing interface specified in the matching routing table entry. Since the access interface in the second VTEP device connected to the access network is also configured with an access network identifier and the IP address of the peer VTEP device (the first VTEP device), the second VTEP device can find the corresponding access interface based on the access network identifier, VXLAN network identifier, and the first VTEP device's IP address in the encapsulated VXLAN message. It then performs unicast forwarding of the message through that access interface.
[0061] As can be seen, in the message processing method provided by the embodiments of the present invention, only a VXLAN network for transmitting loop detection protocol messages needs to be established between two VTEP devices. Different access networks are distinguished by the access network identifier. Furthermore, the access interface of the VTEP device is configured using the access network identifier, the loop detection protocol address, and the IP address of the peer VTEP device. Therefore, the loop detection protocol messages sent from each access network will only be forwarded within the loop of that access network and will not be sent to other loops. This not only breaks the loop but also reduces the occupation of the VXLAN network identifier.
[0062] In one implementation, step S204 above involves VXLAN encapsulation of the loop detection protocol message based on the next-hop address, the IP address of the first VTEP device, the VXLAN network identifier, and the access network identifier configured on the receiving access interface. Specifically, this may include:
[0063] The loop detection protocol message is encapsulated with a VXLAN header based on the next-hop address, the IP address of the first VTEP device, the VXLAN network identifier, and the access network identifier configured on the receiving access interface to obtain the encapsulated VXLAN message; wherein the reserved field of the VXLAN header is filled with the access network identifier configured on the receiving access interface.
[0064] In other words, in the VXLAN packet obtained after VXLAN encapsulation, the destination IP address in the outer IP header is the queried next-hop address, the source IP address is the IP address of the first VTEP device, the VNI field in the VXLAN header is filled with the queried VXLAN network identifier, the reserved fields in the VXLAN header (such as the first reserved field) are filled with the access network identifier configured on the receiving access interface, and the VXLAN data is the received loop detection protocol packet.
[0065] In one implementation, after configuring the VXLAN network and access interfaces on the VTEP device, the VTEP device generates a Type II route via EVPN (Ethernet Virtual Private Network). The route prefix is the loop detection protocol address, and private attributes are added to the route: the IP address of the peer VTEP device and the access network identifier. This route is then advertised. VTEP devices receiving this route will generate routing information to the peer VTEP device. Similarly, after the peer VTEP device completes the above configuration, it will also generate a Type II route and advertise it.
[0066] The following describes the process of receiving and processing a route advertisement message, taking the first VTEP device receiving a route advertisement message sent by the second VTEP device as an example. Before step S201 above, the message processing method provided in this embodiment of the invention may further include:
[0067] Upon receiving a route advertisement message from the second VTEP device, the loop detection protocol address, the IP address of the peer VTEP device, the next-hop address, and the access network identifier carried in the route advertisement message are obtained. The route advertisement message is generated by the second VTEP device after configuring the IP address, loop detection protocol address, and corresponding access network identifier of the peer VTEP device. If the IP address, next-hop address, and access network identifier of the peer VTEP device carried in the route advertisement message are consistent with the IP address of the first VTEP device and the IP address and access network identifier of the second VTEP device configured on the access interface of the first VTEP device, then a route table entry is added to the routing table according to the VXLAN network identifier configured on the first VTEP device, the loop detection protocol address, and the next-hop address in the route advertisement message.
[0068] In this embodiment, after receiving the route advertisement message sent by the second VTEP device, the first VTEP device obtains the private attributes of the Type II route in the message: the IP address and access network identifier of the peer VTEP device (the first VTEP device), and the next-hop address in the Type II route (the IP address of the second VTEP device). It then compares these attributes with the IP address of the first VTEP device, the access network identifier configured on the local access interface, and the IP address of the second VTEP device. If they are all the same, the route is accepted; otherwise, the route is discarded. After accepting the route, a route entry is added to the routing table. This route entry includes the loop detection protocol address, VXLAN network identifier, the IP address (next-hop address) of the second VTEP device, and the outgoing interface (the access interface that receives the route advertisement message) from the route advertisement message, thus realizing the generation of a route from the first VTEP device to the second VTEP device.
[0069] In this embodiment, after configuring the VXLAN network and access interface on the VTEP device, two ACL rules are generated on the VTEP device and sent to the data plane, namely the first ACL rule and the second ACL rule. That is, the VTEP device is configured with the first ACL rule and the second ACL rule. Each matching item in the first ACL rule includes the access interface configured with the access network identifier, VLAN information, and loop detection protocol address, and the action is to send it to the control plane (submit to the CPU). Each matching item in the second ACL rule includes the IP address of the local VTEP device and the loop detection protocol address, and the action is to send it to the control plane; that is, the outer destination IP address of the VXLAN packet is the IP address of the local VTEP device, and the inner destination MAC address of the VXLAN packet is the loop detection protocol address, thus submitting the VXLAN packet to the control plane for processing.
[0070] The first ACL rule is used by the VTEP device to match received packets. A successful match indicates that the received packet is a loop detection protocol packet that needs to be transparently transmitted, and the packet needs to be sent to the control plane for processing instead of being forwarded directly. The second ACL rule is used by the VTEP device to match received VXLAN packets. A successful match indicates that the packet needs to be sent to the control plane for decapsulation processing instead of being forwarded directly.
[0071] In one example, when the first VTEP device receives a message to be processed, it obtains the VLAN information and destination MAC address in the message to be processed. If there is a matching item in the first ACL rule that corresponds to the receiving access interface of the message to be processed, the VLAN information and destination MAC address in the message to be processed, then the message to be processed is determined to be a loop detection protocol message that needs to be transparently transmitted.
[0072] In other words, when the VTEP device receives a message to be processed through the access interface connected to the access network, it can obtain the VLAN information and destination MAC address in the message. It compares the receiving access interface of the message to be processed, the VLAN information and destination MAC address in the message with the matching items in the first ACL rule. If there is a corresponding matching item, it indicates that the message to be processed is a loop detection protocol message that needs to be transparently transmitted. The message to be processed is then sent to the control plane, and the control plane processes the loop detection protocol message according to the above steps S201 to S204.
[0073] In this embodiment, after receiving a loop detection protocol message that needs to be transparently transmitted, the local VTEP device encapsulates the loop detection protocol message into VXLAN and then sends it to the peer VTEP device, which decapsulates and forwards the received VXLAN message. Similarly, if the peer VTEP device receives a loop detection protocol message, it will also encapsulate the loop detection protocol message into VXLAN and then send it to its corresponding peer VTEP device (i.e., the local VTEP device) for decapsulation and forwarding. The following describes the processing flow of the VXLAN message after the second VTEP device receives the VXLAN message sent by the first VTEP device.
[0074] Please refer to Figure 3 This is a flowchart illustrating another message processing method provided in an embodiment of the present invention. This message processing method can be applied to the second VTEP device in the aforementioned dual-homed access network. The following will describe... Figure 3 The specific process shown will be explained in detail.
[0075] Step S301: Decapsulate the VXLAN message sent by the first VTEP device to obtain the source IP address in the outer IP header, the access network identifier in the VXLAN header, and the loop detection protocol message in the VXLAN message.
[0076] Step S302: If the corresponding access interface is found based on the obtained source IP address and access network identifier, the loop detection protocol message is sent through the found access interface.
[0077] In this embodiment, the VXLAN packet is obtained by the first VTEP device encapsulating the received loop detection protocol packet using VXLAN. Therefore, the second VTEP device decapsulates the VXLAN packet to obtain the source IP address (the IP address of the first VTEP device) in the outer IP header of the VXLAN packet, the access network identifier in the VXLAN header of the VXLAN packet, and the loop detection protocol packet in the VXLAN packet. Based on the obtained source IP address and access network identifier, the configuration information of the access interface on the second VTEP device is searched. If the access network identifier and the IP address of the peer VTEP device in the configuration information of the access interface are the same as the source IP address and access network identifier in the outer IP header of the VXLAN packet, the loop detection protocol packet can be sent from the access interface; if no corresponding access interface is found, the loop detection protocol packet is discarded.
[0078] It should be noted that since VLAN information is stripped when receiving packets, the second VTEP device can add VLAN information to the loop detection protocol packet according to the VLAN configuration corresponding to the access interface before sending it from the access interface.
[0079] In this embodiment, when the VXLAN packet sent by the first VTEP device arrives at the second VTEP device, the second VTEP device will perform a second ACL rule matching on the VXLAN packet.
[0080] Specifically, when the second VTEP device receives a VXLAN packet, it obtains the destination IP address of the outer layer of the VXLAN packet and the destination MAC address of the inner layer of the VXLAN packet. If there is a matching entry in the second ACL rule that corresponds to the destination IP address of the outer layer of the VXLAN packet and the destination MAC address of the inner layer of the VXLAN packet, it indicates that the second ACL rule sent to the data plane has been matched. The VXLAN packet needs to be sent to the control plane, and the control plane will decapsulate the VXLAN packet to obtain the source IP address in the outer IP header, the access network identifier in the VXLAN header, and information such as the loop detection protocol message.
[0081] Below, with Figure 4 Taking the dual-homed access network shown as an example, the message processing scheme in the above embodiments of the present invention will be illustrated by way of example.
[0082] The two VTEP devices are VTEP1 and VTEP2. The access network connecting VTEP1 and VTEP2 includes two access devices, Switch1 and Switch3. This access network, together with VTEP1 and VTEP2, forms a loop. The access interface on VTEP1 that connects to the access network is port1 (i.e., the interface on VTEP1 that connects to Switch1), and the access interface on VTEP2 that connects to the access network is port3 (i.e., the interface on VTEP2 that connects to Switch3). The IP address of VTEP1 is IP1, and the IP address of VTEP2 is IP2.
[0083] Assuming the VXLAN network identifier of the VXLAN network built between VTEP1 and VTEP2 is VXLAN10, and VTEP1 is the local VTEP device, then VTEP2 is the peer VTEP device corresponding to VTEP1. The configuration information of each access interface includes the access network identifier, the IP address of the peer VTEP device, the loop detection protocol address, VLAN information, etc. For example, if the loop detection protocol address uses a MAC address (such as MAC1), then the configuration information of port1 may include the access network identifier (LAN ID1), the IP address of the second VTEP device (IP2), the loop detection protocol address (MAC1), and the VLAN information (VLAN1). The configuration information of port3 may include the access network identifier (LAN ID1), the IP address of the first VTEP device (IP1), the loop detection protocol address (MAC1), and the VLAN information (VLAN1).
[0084] After VTEP1 and VTEP2 are configured, they will issue two ACL rules to the data plane. The first ACL rule on VTEP1 includes match item 1: access interface (port1), VLAN information (VALN1), and loop detection protocol address (MAC1); the second ACL rule on VTEP1 includes match item 1: the IP address of the first VTEP device (IP1) and loop detection protocol address (MAC1). Similarly, the first ACL rule on VTEP2 includes match item 1: access interface (port3), VLAN information (VALN1), and loop detection protocol address (MAC1); the second ACL rule on VTEP2 includes match item 1: the IP address of the second VTEP device (IP2) and loop detection protocol address (MAC1).
[0085] After VTEP1 and VTEP2 are configured, they will generate and advertise Type II routes. For example, one of the routes generated by VTEP1 has a route prefix of MAC1, private attributes of IP2 and LAN ID1, and a next-hop address of VTEP1's IP address, IP1. When VTEP2 receives the route advertisement message from VTEP1 through interface portn, it obtains the route prefix MAC1, the next-hop address IP1, and the private attributes (IP2 and LAN ID1). It determines that the IP address (IP2) of the peer VTEP device in the route advertisement message is the IP address of VTEP2, the access network identifier (LAN ID1) in the route advertisement message is consistent with the access network identifier configured on access interface port3 of VTEP2, and the next-hop address IP1 in the route advertisement message is the IP address of the peer VTEP device (VTEP1) of VTEP2. Therefore, it determines to accept the route and adds a route table entry to VTEP2's routing table, namely: MAC1, VXLAN10, IP1, portn.
[0086] Assuming that VTEP1's access interface port1 receives a loop detection protocol message that needs to be transparently transmitted, matches the first ACL rule's matching item 1, and sends the message to the control plane. Upon receiving the message, the control plane obtains the message's receiving access interface (port1), VLAN information (VLAN1), and destination MAC address (MAC1). Based on the receiving access interface (port1), it queries the configuration information to obtain the access network identifier LAN ID1. Based on the receiving access interface (port1) and VLAN information (VLAN1), it queries the VXLAN configuration to obtain the VNI information (VXLAN10). Based on the destination MAC address (MAC1) and the retrieved VNI information (VXLAN10), it queries VTEP1's routing table. If no corresponding route is found, the message is discarded; if a corresponding route is found, the next-hop address (IP2) and outgoing interface are obtained. VTEP1 encapsulates the message with VXLAN. The outer destination IP address is the next-hop address (IP2) found; the source IP address is the address of VTEP1 (IP1); the VNI is the VNI information found (VXLAN10); and LAN ID1 is filled into the first reserved field of the VXLAN header; the VXLAN data is the received loop detection protocol message; and then the VXLAN message is sent according to the outgoing interface in the found route.
[0087] After receiving the VXLAN packet from VTEP1, VTEP2, with its outer destination IP address being IP2 and its inner destination MAC address being MAC1, matches entry 1 in the second ACL rule. VTEP2 then forwards the VXLAN packet to the control plane. The control plane decapsulates the VXLAN packet, obtaining the source IP address (IP1) from the outer IP header and the LAN ID1 from the first reserved field of the VXLAN header, thus obtaining the inner loop detection protocol packet. Based on the obtained LAN ID1 and source IP address (IP1), it searches for the access interface (port3) with the same configuration and sends the packet through port3. In this way, only one VXLAN network needs to be established between VTEP1 and VTEP2 for the transparent transmission of loop detection protocol packets. Loop detection protocol packets sent by access devices in this access network will only be transmitted within the loop of the access network and will not be sent to other loops.
[0088] To perform the corresponding steps in the above embodiments and various possible methods, an implementation of a message processing apparatus is given below. Please refer to... Figure 5 This is a functional block diagram of a message processing device applied to a first VTEP device provided in an embodiment of the present invention. It should be noted that the message processing device provided in this embodiment has the same basic principle and technical effects as those in the above embodiments. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the corresponding content in the above embodiments. The message processing device includes: a message acquisition module 610, an information search module 620, and a message processing module 630.
[0089] The message acquisition module 610 is used to acquire the receiving access interface of the loop detection protocol message, the VLAN information in the loop detection protocol message, and the destination MAC address when a loop detection protocol message is received.
[0090] It is understandable that the message acquisition module 610 can perform the above step S201.
[0091] The information lookup module 620 is used to obtain the corresponding VXLAN network identifier based on the VLAN information in the received access interface and loop detection protocol message; and to look up the routing table based on the destination MAC address and VXLAN network identifier of the loop detection protocol message.
[0092] It is understood that the information retrieval module 620 can perform the above step S202.
[0093] The message processing module 630 is used to encapsulate the loop detection protocol message in VXLAN according to the next-hop address, the IP address of the first VTEP device, the VXLAN network identifier, and the access network identifier configured on the receiving access interface if the corresponding next-hop address and outgoing interface are found in the routing table. The encapsulated VXLAN message is then sent to the second VTEP device through the outgoing interface so that the second VTEP device can perform unicast forwarding based on the access network identifier, VXLAN network identifier, and the IP address of the first VTEP device in the encapsulated VXLAN message.
[0094] It is understood that the message processing module 630 can perform the above step S203.
[0095] Optionally, the message processing module 630 is specifically used to encapsulate a VXLAN header for a loop detection protocol message based on the next-hop address, the IP address of the first VTEP device, the VXLAN network identifier, and the access network identifier configured on the receiving access interface, to obtain an encapsulated VXLAN message; wherein the reserved field of the VXLAN header is filled with the access network identifier configured on the receiving access interface.
[0096] Optionally, the message acquisition module 610 is further configured to, upon receiving a route advertisement message sent by the second VTEP device, acquire the loop detection protocol address, the IP address of the peer VTEP device, the next-hop address, and the access network identifier carried in the route advertisement message; the route advertisement message is generated by the second VTEP device after configuring the IP address of the peer VTEP device, the loop detection protocol address, and the corresponding access network identifier; if the IP address, next-hop address, and access network identifier of the peer VTEP device carried in the route advertisement message are consistent with the IP address of the first VTEP device, the IP address of the second VTEP device configured on the access interface of the first VTEP device, and the access network identifier, then add a route table entry to the routing table according to the VXLAN network identifier configured on the first VTEP device, the loop detection protocol address, and the next-hop address in the route advertisement message.
[0097] Please refer to Figure 6 This is a functional block diagram of a message processing device applied to a second VTEP device provided in an embodiment of the present invention. It should be noted that the message processing device provided in this embodiment has the same basic principle and technical effects as those in the above embodiments. For the sake of brevity, any parts not mentioned in this embodiment can be referred to the corresponding content in the above embodiments. The message processing device includes: a message decapsulation module 710 and a message sending module 720.
[0098] The message decapsulation module 710 is used to decapsulate the VXLAN message sent by the first VTEP device to obtain the source IP address in the outer IP header of the VXLAN message, the access network identifier in the VXLAN header of the VXLAN message, and the loop detection protocol message in the VXLAN message.
[0099] It is understandable that the message decapsulation module 710 can perform the above step S301.
[0100] The message sending module 720 is used to send loop detection protocol messages through the found access interface if the corresponding access interface is found based on the obtained source IP address and access network identifier.
[0101] It is understandable that the message sending module 720 can perform the above step S302.
[0102] Please refer to Figure 7 This is a block diagram illustrating a network device 100 that can implement the first VTEP device and the second VTEP device described above, according to an embodiment of the present invention. The network device 100 includes a memory 110, a processor 120, and a communication module 130. The memory 110, processor 120, and communication module 130 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.
[0103] The memory 110 is used to store programs or data. The memory 110 may be, but is not limited to, random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), etc.
[0104] The processor 120 is used to read / write data or programs stored in the memory 110 and perform corresponding functions. For example, when a computer program stored in the memory 110 is executed by the processor 120, the message processing methods disclosed in the above embodiments can be implemented.
[0105] The communication module 130 is used to establish a communication connection between the network device 100 and other devices through the network, and to send and receive data through the network.
[0106] It should be understood that, Figure 7 The structure shown is only a schematic diagram of the network device 100. The network device 100 may also include components that are larger than... Figure 7 The more or fewer components shown, or having the same Figure 7 The different configurations shown. Figure 7 The components shown can be implemented using hardware, software, or a combination thereof.
[0107] Optionally, embodiments of the present invention also provide a message processing system, which includes the aforementioned first VTEP device and second VTEP device, wherein the first VTEP device includes the aforementioned... Figure 5 The message processing apparatus shown, the second VTEP device includes the above-mentioned Figure 6 The message processing device shown.
[0108] Optionally, embodiments of the present invention also provide a computer-readable storage medium storing a computer program thereon, which, when executed by processor 120, implements the message processing methods disclosed in the above embodiments.
[0109] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can also be implemented in other ways. The apparatus embodiments described above are merely illustrative; for example, the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those marked in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram and / or flowchart, and combinations of blocks in block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0110] In addition, the functional modules in the various embodiments of the present invention can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0111] If the aforementioned functions are implemented as software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0112] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A message processing method, characterized in that, The method is applied to a first VTEP device, wherein an access network including at least one access device is simultaneously connected to both the first and second VTEP devices, and a VXLAN network for transmitting loop detection protocol (LOP) messages is established between the first and second VTEP devices; each VTEP device has an access interface configured with an access network identifier, a LOP address, and the IP address of the peer VTEP device, and the access interfaces on both VTEP devices connected to the same access network have the same access network identifier; each VTEP device maintains a routing table, and each entry in the routing table includes a LOP address, a VXLAN network identifier, a next-hop address, and an outgoing interface; the method includes: When a loop detection protocol message is received, the receiving access interface of the loop detection protocol message, the VLAN information in the loop detection protocol message, and the destination MAC address are obtained; Based on the VLAN information in the received access interface and the loop detection protocol message, the corresponding VXLAN network identifier is obtained; The routing table is looked up based on the destination MAC address of the loop detection protocol message and the VXLAN network identifier. If the corresponding next-hop address and outgoing interface are found in the routing table, the loop detection protocol message is encapsulated in VXLAN according to the next-hop address, the IP address of the first VTEP device, the VXLAN network identifier, and the access network identifier configured on the receiving access interface. The encapsulated VXLAN message is then sent to the second VTEP device through the outgoing interface, so that the second VTEP device can perform unicast forwarding based on the access network identifier, the VXLAN network identifier, and the IP address of the first VTEP device in the encapsulated VXLAN message.
2. The message processing method according to claim 1, characterized in that, The step of encapsulating the loop detection protocol message with VXLAN based on the next-hop address, the IP address of the first VTEP device, the VXLAN network identifier, and the access network identifier configured on the receiving access interface includes: The loop detection protocol message is encapsulated with a VXLAN header based on the next-hop address, the IP address of the first VTEP device, the VXLAN network identifier, and the access network identifier configured on the receiving access interface to obtain the encapsulated VXLAN message; wherein the reserved field of the VXLAN header is filled with the access network identifier configured on the receiving access interface.
3. The message processing method according to claim 1, characterized in that, Before obtaining the receiving access interface of the loop detection protocol message, the VLAN information in the loop detection protocol message, and the destination MAC address when a loop detection protocol message is received, the method further includes: Upon receiving a routing advertisement message from the second VTEP device, the loop detection protocol address, the IP address of the peer VTEP device, the next-hop address, and the access network identifier carried in the routing advertisement message are obtained. The routing advertisement message is generated by the second VTEP device after configuring the IP address, loop detection protocol address, and corresponding access network identifier of the peer VTEP device. If the IP address, next-hop address, and access network identifier of the peer VTEP device carried in the routing advertisement message are consistent with the IP address of the first VTEP device, the IP address of the second VTEP device configured on the access interface of the first VTEP device, and the access network identifier, then a routing table entry is added to the routing table according to the VXLAN network identifier configured on the first VTEP device, the loop detection protocol address, and the next-hop address in the routing advertisement message.
4. A message processing method, characterized in that, Applied to a second VTEP device, wherein an access network including at least one access device is simultaneously connected to both the first VTEP device and the second VTEP device as described in any one of claims 1-3, the method comprising: The VXLAN message sent by the first VTEP device is decapsulated to obtain the source IP address in the outer IP header of the VXLAN message, the access network identifier in the VXLAN header of the VXLAN message, and the loop detection protocol message in the VXLAN message. If a corresponding access interface is found based on the obtained source IP address and access network identifier, the loop detection protocol message is sent through the found access interface.
5. A message processing apparatus, characterized in that, An apparatus is applied to a first VTEP device, wherein an access network including at least one access device is simultaneously connected to both the first and second VTEP devices, and a VXLAN network for transmitting loop detection protocol (LOP) messages is established between the first and second VTEP devices; each VTEP device has an access interface configured with an access network identifier, a LOP address, and the IP address of the peer VTEP device, and the access interfaces on both VTEP devices connected to the same access network have the same access network identifier; each VTEP device maintains a routing table, and each entry in the routing table includes a LOP address, a VXLAN network identifier, a next-hop address, and an outgoing interface; the apparatus includes: The message acquisition module is used to acquire the receiving access interface of the loop detection protocol message, the VLAN information in the loop detection protocol message, and the destination MAC address when a loop detection protocol message is received; The information lookup module is used to obtain the corresponding VXLAN network identifier based on the VLAN information in the received access interface and the loop detection protocol message; and to look up the routing table based on the destination MAC address of the loop detection protocol message and the VXLAN network identifier. The message processing module is configured to, if a corresponding next-hop address and outgoing interface are found in the routing table, encapsulate the loop detection protocol message using VXLAN based on the next-hop address, the IP address of the first VTEP device, the VXLAN network identifier, and the access network identifier configured on the receiving access interface, and send the encapsulated VXLAN message to the second VTEP device through the outgoing interface, so that the second VTEP device can perform unicast forwarding based on the access network identifier, the VXLAN network identifier, and the IP address of the first VTEP device in the encapsulated VXLAN message.
6. The message processing apparatus according to claim 5, characterized in that, The message processing module is used to encapsulate the loop detection protocol message with a VXLAN header according to the next-hop address, the IP address of the first VTEP device, the VXLAN network identifier, and the access network identifier configured on the receiving access interface, to obtain the encapsulated VXLAN message; wherein the reserved field of the VXLAN header is filled with the access network identifier configured on the receiving access interface.
7. A message processing apparatus, characterized in that, Applied to a second VTEP device, the device comprises an access network including at least one access device that is simultaneously connected to both the first VTEP device and the second VTEP device as described in any one of claims 1-3; The message decapsulation module is used to decapsulate the VXLAN message sent by the first VTEP device to obtain the source IP address in the outer IP header of the VXLAN message, the access network identifier in the VXLAN header of the VXLAN message, and the loop detection protocol message in the VXLAN message. The message sending module is used to send the loop detection protocol message through the found access interface if the corresponding access interface is found based on the obtained source IP address and access network identifier.
8. A message processing system, characterized in that, It includes a first VTEP device and a second VTEP device, wherein the first VTEP device includes the message processing apparatus as described in claim 5 or 6, and the second VTEP device includes the message processing apparatus as described in claim 7.
9. A network device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the message processing method as described in any one of claims 1-4.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the message processing method as described in any one of claims 1-4.