Method, apparatus and network device for transmitting data

By establishing a specific neighbor pattern for user-side edge nodes in the EVPN system, storing only the default route and obtaining other routes as needed, the resource and storage pressure problem of user-side edge nodes is solved, achieving resource optimization and business path balancing.

CN114221895BActive Publication Date: 2026-05-29HUAWEI TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2021-01-19
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

In tree-structured networks, user-side edge nodes store routing information for other network devices, resulting in significant resource overhead and storage pressure. Reducing these resource overhead and storage pressure is an urgent problem to be solved.

Method used

By establishing specific neighbor patterns between network devices and user-side edge nodes in an EVPN system, storing only default routes and obtaining other routes from network-side nodes as needed, or forwarding packets through network-side nodes, the amount of route storage required by user-side nodes is reduced.

Benefits of technology

It effectively reduced the resource overhead and storage pressure on user-side edge nodes, optimized business paths, and balanced business traffic in high-frequency business scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114221895B_ABST
    Figure CN114221895B_ABST
Patent Text Reader

Abstract

The application discloses a method, device and network equipment for transmitting data, relates to the field of communication, and solves the problem of how to reduce resource consumption and storage pressure of a user-side edge node. The method comprises the following steps: a third network equipment sends a first route to a first network equipment according to a first mode neighbor of the third network equipment or according to a request received from the first network equipment. The first network equipment forwards a packet to a second user-side equipment connected with a second network equipment according to the first route. The first network equipment only stores a default route to the third network equipment, and the packet sent by the first network equipment is forwarded by the third network equipment according to the fact that the first network equipment is a spoke neighbor of the third network equipment, so that the resource consumption and storage pressure of the first network equipment are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] The present application claims priority from the Chinese Patent Application No. 202010920439.1 filed on September 4, 2020, and entitled "Method and device for realizing route optimization based on hierarchical architecture", the whole content of which is incorporated herein by reference. TECHNICAL FIELD

[0002] The present application relates to the field of communication, and in particular to a method and device for transmitting data and a network device. BACKGROUND

[0003] For network devices in a local area network deployed in a tree network, a Border Gateway Protocol (BGP) can be used to propagate routes of the network devices in the local area network, so as to transmit data packets between the network devices. Due to the route diffusion characteristic of the BGP, each network device in the local area network stores a broadcast domain routing table and a unicast routing table. However, in order to reduce costs, customer edge (CE) nodes (i.e., network devices close to the user side) in the tree network often have low memory and processing capacity. Since the CE nodes store route information of other network devices in the tree network, the resource consumption of the CE nodes for processing data packets and the storage pressure of the CE nodes for storing routing tables are both relatively large. Therefore, how to reduce the resource consumption and storage pressure of the CE nodes is a problem to be solved. SUMMARY

[0004] The present application provides a method and device for transmitting data and a network device, and solves the problem of how to reduce the resource consumption and storage pressure of the CE nodes.

[0005] Firstly, this application provides a method for transmitting data, applicable to an Ethernet Virtual Private Network (EVPN) system. The system includes a first network device, a second network device, and a third network device. The third network device establishes a first-mode neighbor relationship with both the first and second network devices. The first network device connects to a first user-side device, and the second network device connects to a second user-side device. The method is executed by the third network device. Alternatively, the method can be applied to a communication device that supports the third network device in implementing the method, such as a chip system. The method includes: the third network device obtaining a first route based on the first network device being its first-mode neighbor, or based on a request received from the first network device, and sending the first route to the first network device. The first route instructs the first network device to forward packets destined for the second user-side device connected to the second network device according to the first route. Therefore, the first network device only stores the default route to the third network device. Based on the fact that the first network device is a spoke neighbor of the third network device, the third network device forwards the packets sent by the first network device. Alternatively, the first network device does not pre-store the route to the user-side device attached to the second network device, but obtains the corresponding user-side device route from the third network device as needed, thereby reducing the resource overhead and storage pressure of the first network device.

[0006] In one possible implementation, the third network device obtains a first route based on the fact that the first network device is a first-mode neighbor of the third network device. This includes: the third network device generating a first route based on the fact that the first network device is a first-mode neighbor of the third network device. The first route is used to instruct the first network device to forward packets destined for the second user-side device to the third network device according to the first route. The first route may be, for example, an unknown Media Access Control route (UMR).

[0007] In another possible implementation, the third network device obtains a first route based on a request received from the first network device, including: the third network device receiving a request from the first network device, the request being for obtaining a route to the second user-side device, wherein the request is generated by the first network device or is forwarded by the first network device from a request generated by the first user-side device; obtaining the first route according to the request, the first route being used to instruct the first network device to forward packets destined for the second user-side device to the second network device according to the first route. The destination address of the first route is the address of the second user-side device, and the next hop of the first route is the address of the second network device. After obtaining the first route, the first network device can use the first route to directly send packets destined for the second user-side device to the second network device.

[0008] Therefore, the first network device dynamically requests routes based on the unicast traffic of the service, achieving accurate route requests and sending packets according to the requested routes to achieve optimal path performance. In this way, on the one hand, the first network device does not need to maintain a large number of routes, controlling the number of routes stored in the first network device and significantly reducing its resource overhead and storage pressure; on the other hand, since the packets sent by the first network device do not need to be forwarded by a third network device after obtaining the requested route, it is also beneficial for balancing service paths in business scenarios such as frequent business interactions.

[0009] Furthermore, the method also includes: a third network device receiving a first message sent by a first network device according to a first route, and forwarding the first message to a second network device. The first message is a message sent by a first user-side device connected to the first network device to the second user-side device. The first message can be a unicast message.

[0010] Additionally, the method includes: a third network device receiving a second route sent by a second network device, and receiving a third route sent by a first network device. The second route instructs the third network device to forward packets destined for the second user-side device. The third route instructs the third network device to forward packets destined for the first user-side device.

[0011] Specifically, after receiving the first message sent by the first network device according to the first route, the third network device can forward the first message to the second network device according to the second route.

[0012] In another possible implementation, the first network device is directly or indirectly connected to the first user-side device; and the second network device is directly or indirectly connected to the second user-side device. When the first network device is directly connected to the first user-side device, the first network device can be a user-side edge network device, used to directly connect to user-side devices such as user hosts to provide network services. When the second network device is directly connected to the second user-side device, the second network device can also be a user-side edge network device. Taking the first network device as an example, in this direct connection method, the first network device can obtain a default route from the third network device to send packets of the first user-side device to the second user-side device connected to the second network device through the third network device; or, in this direct connection method, the first network device can send a request to the third network device to obtain a first route, thereby directly sending packets to the second user-side device according to the first route.

[0013] In the case where the first network device is indirectly connected to the first user-side device, the first network device can also be a network-side network device, for example, it can be connected to the first user-side device through a first user-side edge network device. Similarly, the second network device can also be connected to the second user-side device through a second user-side edge network device. Taking the first network device as an example again, in this indirect connection method, a first-mode neighbor can be established between the first network device and the first user-side edge network device, and a first-mode neighbor can also be established between the third network device and the first network device, thereby establishing a multi-level hierarchical structure. The first network device can obtain a first route from the third network device, such as a UMR route, and forward the UMR route to the first user-side edge network device to ultimately send the first user-side device's message to the second user-side device connected to the second network device through the third network device; or, in this indirect connection method, the first network device can send a request to the first network device through the first user-side edge network device to obtain the first route. After receiving the request, the first network device can generate an updated request based on the request to request the third network device to obtain the first route, thereby enabling the first user-side edge network device or the first network device to directly send messages to the second user-side device according to the first route.

[0014] The process by which the first network device obtains the first route from the third network device and forwards it to the first user-side edge network device can be considered as implementing a function similar to a route reflector.

[0015] Furthermore, the first network device can also acquire one or more requests for obtaining routes, wherein the one or more requests may originate from one or more user-side devices. The first network device can generate a new request based on the one or more requests and forward it to the third network device, thereby acquiring one or more routes corresponding to the one or more requests from the third network device, and forwarding the one or more routes to the first user-side edge network device, so that the first user-side edge network device can forward user-side device packets according to the one or more routes.

[0016] In another possible implementation, the method further includes: the third network device can negotiate with the first network device the number of Outbound Route Filtering (ORF) requests. The third network device can also negotiate with the second network device the number of ORF requests. ORF requests are used to request routes for user-side devices connected to the network devices. If the third network device receives more than a threshold number of ORF requests, it discards the excess ORF requests.

[0017] Secondly, this application provides a method for transmitting data, applicable to an EVPN system. The system includes a first network device, a second network device, and a third network device. The third network device establishes a first-mode neighbor relationship with both the first and second network devices. The first network device is connected to a first user-side device, and the second network device is connected to a second user-side device. The method is executed by the first network device, or it can be applied to a communication device that supports the first network device in implementing the method, such as a chip system. The method includes: the first network device receiving a first route from the third network device, the first route instructing the first network device to forward packets from the first user-side device according to the first route; and then, the first network device receiving a first packet sent by the first user-side device and forwarding the first packet according to the first route. The first packet is destined for the second user-side device. Therefore, the first network device only stores the default route to the third network device. Based on the fact that the first network device is the spoke neighbor of the third network device, the third network device forwards the packets sent by the first network device. Alternatively, the first network device does not pre-store the route to the user-side device attached to the second network device, but obtains the corresponding user-side device route from the third network device as needed, thereby reducing the resource overhead and storage pressure of the first network device.

[0018] In one possible implementation, receiving a first route from a third network device includes: receiving a first route generated and sent by the third network device; forwarding a first message according to the first route includes: forwarding the first message to the third network device using the first route based on the Media Access Control (MAC) address of the second user-side device not being found.

[0019] In another possible implementation, receiving a first route from a third network device includes: receiving a first route from a third network device in response to a request sent to the third network device, wherein the request is for obtaining a route to the second user-side device; and forwarding a first message according to the first route includes: forwarding the first message to a second network device connected to the second user-side device according to the first route.

[0020] In another possible implementation, the first route is the route for the second user-side device; the method further includes deleting the first route after a preset time period. This avoids the first network device storing excessive routing information, thus reducing its storage burden.

[0021] In addition, before the first network device receives the first route sent by the third network device, the method further includes: the first network device sending a second route to the third network device, the second route being used to instruct the third network device to forward the message to the first user-side device.

[0022] In another possible implementation, the first network device is directly or indirectly connected to the first user-side device; and the second network device is directly or indirectly connected to the second user-side device.

[0023] Thirdly, this application provides a method for transmitting data, applicable to an EVPN system. The system includes a first network device, a second network device, and a third network device. The third network device establishes a first mode neighbor relationship with both the first and second network devices. The first network device is connected to a first user-side device, and the second network device is connected to a second user-side device. The method is executed by the third network device. Alternatively, the method can be applied to a communication device that supports the third network device in implementing the method, such as a chip system. The method includes: the third network device receiving a first route from the first network device and receiving a first message from the second user-side device connected to the second network device; and, since the first network device is the first mode neighbor of the third network device, the third network device forwards the first message to the first network device according to the first route. The first route is a first inclusive multicast Ethernet tag (IMET) route, used to forward messages to the first user-side device. The first mode neighbor can be, for example, a spoken neighbor.

[0024] In this way, both the first and second network devices only store the IMET route of the third network device, without needing to store the IMET routes of other network devices, thereby effectively reducing the resource overhead and storage pressure of the user-side edge nodes.

[0025] In one possible implementation, the method further includes: a third network device receiving a second route from a second network device. The second route is a second IMET route, used to forward packets to a second user-side device.

[0026] It should be noted that, based on the fact that the first network device is a first-mode neighbor of the third network device, the third network device does not forward the second route to the first network device; and, based on the fact that the second network device is a first-mode neighbor of the third network device, the third network device does not forward the first route to the second network device.

[0027] Furthermore, since the second network device is the first mode neighbor of the third network device, and the first packet comes from the second network device, the third network device does not forward the first packet to the second network device.

[0028] In another possible implementation, before the third network device receives the first message from the second user-side device connected to the second network device, the method further includes: publishing a third IMET route to the second network device to instruct the second network device to send the first message to the third network device according to the third IMET route.

[0029] In another possible implementation, the method further includes: publishing a third IMET route to the first network device to instruct the first network device to send a second message to the third network device according to the third IMET route, wherein the second message is a message of a first user-side device connected to the first network device.

[0030] Both the first and second messages are broadcast, unknown unicast, or multicast (BUM) messages, meaning that both the first and second messages are any one of broadcast, unknown unicast, or multicast messages.

[0031] In another possible implementation, the first network device is directly or indirectly connected to the first user-side device; and the second network device is directly or indirectly connected to the second user-side device. When the first network device is directly connected to the first user-side device, the first network device can be a user-side edge network device, used to directly connect to user-side devices such as user hosts to provide network services. When the second network device is directly connected to the second user-side device, the second network device can also be a user-side edge network device. Taking the first network device as an example, in this direct connection method, the first network device can obtain the IMET route published by the third network device to send the first user-side device's packets to the second user-side device connected to the second network device through the third network device. When the first network device is indirectly connected to the first user-side device, the first network device can also be a network-side network device, which can, for example, connect to the first user-side device through a first user-side edge network device. Similarly, the second network device can also connect to the second user-side device through a second user-side edge network device. Taking the first network device as an example, in this indirect connection method, a first-mode neighbor can be established between the first network device and the first user-side edge network device, and a first-mode neighbor can also be established between the third network device and the first network device, thereby establishing a multi-level hierarchical structure. The first network device can obtain the IMET route from the third network device and forward the IMET route to the first user-side edge network device, so as to finally send the first user-side device's message to the second user-side device connected to the second network device through the third network device.

[0032] The process by which the first network device obtains the IMET route from the third network device and forwards it to the first user-side edge network device can be considered as implementing a function similar to a route reflector.

[0033] Fourthly, this application provides a method for transmitting data, applicable to an EVPN system. The system includes a first network device, a second network device, and a third network device. The third network device establishes a first-mode neighbor relationship with both the first and second network devices. The first network device is connected to a first user-side device, and the second network device is connected to a second user-side device. The method is executed by the first network device, or the method can be applied to a communication device that supports the first network device in implementing the method, such as a chip system. The method includes: the first network device sending a first route to the third network device based on the first network device being a first-mode neighbor of the third network device. Then, the first network device receives a first message sent by the third network device, the first message being a message from the second user-side device connected to the second network device. The first route is a first IMET route, used to forward messages to the first user-side device.

[0034] Furthermore, since the first network device is not a first-mode neighbor of the second network device, the first network device does not send a first route to the second network device. A first-mode neighbor is, for example, a spoken neighbor.

[0035] In another possible implementation, the first network device is directly or indirectly connected to the first user-side device; and the second network device is directly or indirectly connected to the second user-side device.

[0036] Fifthly, this application provides a communication device, the beneficial effects of which can be found in the descriptions of any of the first to fourth aspects, and will not be repeated here. The communication device has the function of implementing the behavior in the method examples of any of the first to fourth aspects described above. The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions. In one possible design, the communication device includes: a receiving unit, a processing unit, and a sending unit. As an example, the communication device is used to implement the function of the third network device described above. Specifically, the processing unit is used to generate a first route. The sending unit is used to send the first route to the first network device and the second network device. The receiving unit is used to receive a second route sent by the first network device, and a third route sent by the second network device. The route can be a MAC route or an IMET route. In addition, the receiving unit is also used to receive a first message sent by the first network device. The sending unit is used to forward the first message to the second network device according to the third route. The receiving unit is also used to receive a second message sent by the second network device. The sending unit is used to forward the second message to the first network device according to the second route. The message can be a unicast message or a BUM message. These modules can perform the corresponding functions in any of the method examples in the first to fourth aspects mentioned above. For details, please refer to the detailed descriptions in the method examples, which will not be repeated here.

[0037] Sixthly, this application provides a network device, which can be one of the network devices in the above method embodiments, or a chip disposed in a network device. The network device includes an interface circuit and a processor, and optionally, a memory. The memory stores computer programs or instructions, and the processor is coupled to the memory and the interface circuit. When the processor executes the computer program or instructions, it causes the network device to execute the corresponding methods executed by each network device in the above method embodiments.

[0038] In a seventh aspect, this application provides a computer program product comprising: computer program code, which, when the computer program code is executed, causes the methods executed by the network device in the above aspects to be performed.

[0039] Eighthly, this application provides a chip system including a processor for implementing the functions of the network device in the methods described above. In one possible design, the chip system further includes a memory for storing program instructions and / or data. This chip system may be composed of chips or may include chips and other discrete devices.

[0040] Ninthly, this application provides a computer-readable storage medium storing a computer program that, when run, implements the methods executed by the network device in the above aspects. Attached Figure Description

[0041] Figure 1 A simplified structural diagram of a VXLAN provided for an embodiment of this application;

[0042] Figure 2 A flowchart illustrating a data transmission method provided in this application embodiment;

[0043] Figure 3 A schematic diagram of a route learning process provided in an embodiment of this application;

[0044] Figure 4 A flowchart illustrating another method for transmitting data provided in this application embodiment;

[0045] Figure 5 A schematic diagram of a message transmission process provided in an embodiment of this application;

[0046] Figure 6 A flowchart illustrating another method for transmitting data provided in this application embodiment;

[0047] Figure 7 A schematic diagram of an ARP message sending process provided in an embodiment of this application;

[0048] Figure 8 This is a schematic diagram illustrating another message transmission process provided in an embodiment of this application;

[0049] Figure 9 A flowchart illustrating another method for transmitting data provided in this application embodiment;

[0050] Figure 10 This is a schematic diagram illustrating another route learning process provided in an embodiment of this application;

[0051] Figure 11 A flowchart illustrating another method for transmitting data provided in this application embodiment;

[0052] Figure 12 This is a schematic diagram illustrating another message transmission process provided in an embodiment of this application;

[0053] Figure 13 A simplified schematic diagram of another VXLAN structure provided for an embodiment of this application;

[0054] Figure 14 A flowchart illustrating another method for transmitting data provided in this application embodiment;

[0055] Figure 15 A flowchart illustrating another method for transmitting data provided in this application embodiment;

[0056] Figure 16 A structural diagram of a communication device provided in an embodiment of this application;

[0057] Figure 17 A structural diagram of a network device provided in an embodiment of this application;

[0058] Figure 18 This is a structural diagram of another network device provided in an embodiment of this application. Detailed Implementation

[0059] Currently, large-scale deployment, virtualization, and cloud computing have become the development direction of networks to achieve goals such as integrating information technology (IT) resources, improving resource utilization efficiency, and reducing maintenance costs. With the rapid development of virtualization on physical network infrastructure, the number of virtual machines (VMs) on physical devices is constantly increasing, as is the number of applications running in virtualized environments. The architecture of physical networks limits the scale of VM development, posing a significant challenge to virtual networks. Virtual Extensible Local Area Network (VXLAN) technology, as one of the network virtualization technologies based on layer 3 (L3) over layer 3 (NVo3), has strong adaptability and provides a good solution for network virtualization.

[0060] In VXLAN, VXLAN tunnel endpoints (VTEPs) encapsulate data packets sent by the source virtual machine using User Datagram Protocol (UDP) to obtain VXLAN packets. The Internet Protocol (IP) address and Media Access Control (MAC) information of the VTEP in the physical network are used as the outer header of the VXLAN packet. The source IP address in the VXLAN packet is the address of the local VTEP of the VXLAN tunnel, and the destination IP address is the address of the peer VTEP of the VXLAN tunnel. The VXLAN packets are transmitted over the IP network using a VXLAN tunnel formed by a pair of VTEPs. The VXLAN tunnel endpoint at the end of the VXLAN tunnel decapsulates the VXLAN packets and sends the data to the destination virtual machine. This decouples the physical network from the virtual network, allowing tenants to plan their own virtual networks without considering the limitations of physical network IP addresses and broadcast domains, significantly reducing the complexity of network management.

[0061] Example, Figure 1 This is a simplified structural diagram of a VXLAN provided as an embodiment of this application. Figure 1As shown, VXLAN includes network devices 101, 102, and 103. Network devices 101, 102, and 103 are interconnected using physical media. Network devices 101, 102, and 103 are three different VXLAN tunnel endpoints. VXLAN tunnel 1 is established between network devices 101 and 102. VXLAN tunnel 2 is established between network devices 102 and 103. VXLAN tunnel 3 is established between network devices 103 and 101. Network device 103 can access other networks (such as the Internet). For example, network device 103 can be a VXLAN gateway device. If network device 103 connects to network device 108 in the Internet, then packets within the VXLAN can be transmitted to networks outside the VXLAN via network device 103. Network device 101 connects to servers 104 and 105. Network device 102 connects to servers 106 and 107. Each of servers 104 to 107 contains multiple virtual machines. Assuming a virtual machine on server 104 sends data to a virtual machine on server 106, network device 101 first encapsulates the data packet sent by the virtual machine on server 104 using UDP to obtain a VXLAN packet. The VXLAN packet is then transmitted to network device 102 through VXLAN tunnel 1 between network devices 101 and 102. Network device 102 decapsulates the VXLAN packet and transmits the data contained within it to the virtual machine on server 106. Network devices 101 and 102, connected to the servers, can be referred to as user-side edge nodes in the network, and both are connected to network device 103 on the network side.

[0062] The network device described in this embodiment can be a router or switch, etc. The devices connected to the user-side edge nodes (such as network device 101 and network device 102) include, in addition to... Figure 1The server shown can also be other devices, such as a host or terminal. A terminal can also be called a terminal device, user equipment (UE), mobile station (MS), or mobile terminal (MT), etc. Terminals can be mobile phones, tablets, computers with wireless transceiver capabilities, wearable devices, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in self-driving vehicles, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, and so on. The embodiments of this application do not limit the specific technology or device form used in the terminal. Figure 1 This is merely an illustrative example, and the embodiments of this application do not limit the number of network devices and servers included in the system.

[0063] Typically, a single server can virtualize multiple virtual machines (VMs), and each VM can be considered a host. Business processes can be flexibly deployed on VMs. The same business process can be deployed on VMs belonging to the same network segment. Different business processes can be deployed on VMs belonging to different network segments. VMs belonging to the same network segment can communicate with each other. VMs belonging to different network segments can also communicate with each other. For example, the finance department's business processes can be deployed on VMs belonging to the same network segment on servers 104 and 106. Similarly, the engineering department's business processes can be deployed on VMs belonging to the same network segment on servers 105 and 107. The VMs hosting the finance department's business processes can communicate with each other. The VMs hosting the finance department's business processes and the VMs hosting the engineering department's business processes can also communicate with each other. For another example, if the human resources department's business processes are deployed on a server running a traditional network, the VMs hosting the finance department's business processes, the VMs hosting the engineering department's business processes, and the server hosting the human resources department's business processes can also communicate with each other.

[0064] It should be noted that in VXLAN, VXLAN tunnel endpoints discover other VXLAN tunnel endpoints and learn host information through broadcast messages. Host information includes IP address, MAC address, VXLAN Network Identifier (VNI), and the IP address of the gateway VTEP. This method leads to a lot of flooded traffic on the network. To solve this problem, Ethernet Virtual Private Network (EVPN) technology can be used in VXLAN. Based on the Border Gateway Protocol (BGP), a new Network Layer Reachability Information (NLRI) is defined, namely EVPNNLRI. EVPN NLRI defines several new BGP-EVPN routing types (such as MAC / IP routing, Inclusive Multicast Ethernet Label (IMET) routing, IP prefix routing, etc.), enabling automatic VTEP discovery and mutual host information announcement by exchanging BGP-EVPN routes between VTEPs.

[0065] However, in large-scale VXLAN networks (such as those deployed in large campuses), the number of user-side edge nodes (e.g., network devices close to the servers) is very large. Even if each user-side edge node generates one route, the hardware of the user-side edge nodes cannot support such a large volume of routes.

[0066] To address this, this application proposes a solution in which a network-side node establishes a specific neighbor pattern with each user-side edge node connected to it. This allows each user-side edge node to publish routes for devices (such as user hosts) that communicate with the network through the user-side edge node, based on the established neighbor pattern. Instead of advertising routes to each other, user-side edge nodes can forward packets through the network-side node or dynamically obtain routes to other user-side edge nodes from the network-side node as needed, thereby reducing the storage pressure and resource overhead of the user-side edge nodes.

[0067] Next, the method for transmitting data provided in this application will be described in detail with reference to the accompanying drawings.

[0068] Figure 2This is a flowchart illustrating a data transmission method according to an embodiment of this application. Network devices 101, 102, and 103 are used as examples for explanation. Network device 103 establishes a first-mode neighbor relationship with both network devices 101 and 102. The first-mode neighbor can refer to a spoken neighbor. Figure 2 As shown, the method includes the following steps.

[0069] S201, Network device 103 generates the first route.

[0070] Based on the stored information of network devices with which it has established spoken neighbor relationships, network device 103 determines network device 101 as its first mode neighbor and network device 102 as its first mode neighbor. Then, based on the fact that network device 101 and network device 102 are its first mode neighbors, network device 103 generates a first route.

[0071] The first route is used to instruct network device 101 to forward packets destined for virtual machines connected to network device 102 to network device 103 according to the first route.

[0072] The first route is also used to instruct network device 102 to forward packets destined for virtual machines connected to network device 101 to network device 103 according to the first route.

[0073] The first route can be the default route. For example, the default route is an Unknown MAC Route (UMR), represented by a MAC address of 0-0-0. By advertising this default route, network device 103 enables network devices that receive the default route to forward their service packets to network device 103 according to the default route. Then, network device 103 determines the next network device to forward the received service packets by looking up a local table.

[0074] S202, Network device 103 sends the first route to network device 101.

[0075] Network device 103 sends a first route to network device 101 based on the BGP-EVPN neighbor relationship in spoken mode with network device 101.

[0076] S203, Network device 103 sends the first route to network device 102.

[0077] Network device 103 sends a first route to network device 102 based on the BGP-EVPN neighbor relationship with network device 102 in spoken mode.

[0078] S204, Network device 101 receives the first route from network device 103.

[0079] After receiving the first route, network device 101 records it in the unknown unicast routing table. After receiving a packet sent by the virtual machine connected to network device 101, network device 101 can forward the packet to network device 103 according to the first route.

[0080] S205, Network device 102 receives the first route from network device 103.

[0081] After receiving the first route, network device 102 records it in the unknown unicast routing table. After receiving a packet sent by the virtual machine connected to network device 102, network device 102 can forward the packet to network device 103 according to the first route.

[0082] In one scenario, the first route may be proactively sent by network device 103 based on a first mode neighbor relationship between it and network devices 102 and 103. In another scenario, network device 103 may also send the first route to network devices 101 and 102 after receiving a request (e.g., an Outbound Route Filtering (ORF) request) from them. The ORF request is used to request a default route. In some embodiments, the ORF request includes a route type indicating the default route. For example, prior to S201, the method may further include the following steps.

[0083] S206, Network device 101 sends a first output route filtering request to network device 103.

[0084] Based on the BGP-EVPN neighbor relationship with the hub mode of the network device 103, the network device 101 sends a first output route filtering request to the network device 103.

[0085] S207, Network device 103 receives the first output route filtering request sent by network device 101.

[0086] After receiving the first output route filtering request sent by network device 101, network device 103 sends the first route to network device 101.

[0087] S208, Network device 102 sends a first output route filtering request to network device 103.

[0088] Based on the BGP-EVPN neighbor relationship with network device 103 in hub mode, network device 102 sends a first output route filtering request to network device 103.

[0089] S209, Network device 103 receives the first output route filtering request sent by network device 102.

[0090] After receiving the first output route filtering request sent by network device 102, network device 103 sends the first route to network device 102.

[0091] In other embodiments, network devices 101 and 102 may also send their own MAC routes to network device 103. The method further includes the following steps.

[0092] S210, Network device 102 sends a second route to network device 103.

[0093] The second route is used to instruct network device 103 to forward packets destined for virtual machines connected to network device 102 to network device 102 according to the second route.

[0094] S211, Network device 101 sends a third route to network device 103.

[0095] The third route is used to instruct network device 103 to forward packets destined for virtual machines connected to network device 101 to network device 101 according to the third route.

[0096] S212, Network device 103 receives the second route sent by network device 102.

[0097] S213, Network device 103 receives the third route sent by network device 101.

[0098] For example, such as Figure 3 The diagram illustrates a route learning process according to an embodiment of this application. Network device 103 sends a first route to network device 101 and network device 102 respectively. Network device 102 sends a second route to network device 103. Network device 101 sends a third route to network device 103.

[0099] Based on network device 101 being a first-mode neighbor of network device 103, network device 103 receives a second route sent by network device 102 but does not forward the second route to network device 101. Similarly, based on network device 102 being a first-mode neighbor of network device 103, network device 103 receives a third route sent by network device 101 but does not forward the third route to network device 102. Furthermore, network devices 101 and 102 may also choose not to advertise second or third routes to each other if they are not first-mode neighbors. For example, network devices 101 and 102 could be second-mode neighbors, such as hub-mode neighbors.

[0100] In this way, network devices 101 and 102 only store the default route, but do not need to store the routes of other network devices in VXLAN, thereby effectively reducing the resource overhead and storage pressure of user-side edge nodes.

[0101] Furthermore, after a virtual machine starts up on a device connected to network device 101 (e.g., server 104, server 105), the virtual machine advertises its MAC address to network device 103. Similarly, after a virtual machine starts up on a device connected to network device 102 (e.g., server 106, server 107), the virtual machine advertises its MAC address to network device 103. Thus, network device 103 learns the MAC addresses of all virtual machines connected to the user-side edge node in the VXLAN. When virtual machines communicate with each other, network device 103 forwards unicast messages between them.

[0102] Figure 4 This is a flowchart illustrating a data transmission method provided in an embodiment of this application. (Similar to the above...) Figure 2 The difference lies in the assumption that network device 103 has already learned the address of network device 101, the addresses of virtual machines on all servers connected to network device 101, the address of network device 102, and the addresses of virtual machines on all servers connected to network device 102. Specifically, network device 103 establishes first-mode neighbors with both network device 101 and network device 102. The following example illustrates how virtual machine 1 in server 104 accesses virtual machine 2 in server 106. It is assumed that virtual machine 1 in server 104 already knows the MAC address of virtual machine 2 in server 106. Figure 4 As shown, after S201 to S213, the method includes the following steps.

[0103] S401, Virtual machine 1 in server 104 sends the first message to network device 101.

[0104] The header of the first message includes the MAC address of virtual machine 1 and the MAC address of virtual machine 2. The first message is a message sent by virtual machine 1 connected to network device 101 to virtual machine 2 connected to network device 102. In this embodiment, the first message is a unicast message.

[0105] S402, Network device 101 receives the first message sent by virtual machine 1 in server 104.

[0106] S403, Network device 101 forwards the first packet according to the first route.

[0107] Since network device 101 did not find the MAC address of virtual machine 2 in the unicast routing table, network device 101 forwards the first packet to network device 103 using the first route in the unknown unicast routing table.

[0108] Understandably, network device 101 can encapsulate the first packet using UDP to obtain the first VXLAN packet. The header of the first VXLAN packet may include the IP address of network device 101, the IP address of network device 103, the MAC address of network device 101, and the MAC address of virtual machine 2 connected to network device 102 contained in the first packet. Network device 101 sends the first VXLAN packet to network device 103 through the VXLAN tunnel 3 between network device 101 and network device 103.

[0109] S404, Network device 103 receives the first message sent by network device 101.

[0110] S405. Network device 103 forwards the first message to network device 102 according to the second route.

[0111] Network device 103 decapsulates the first VXLAN packet, queries the unicast routing table based on the MAC address of virtual machine 2 connected to network device 102 to obtain the second route, and since network device 102 is a spoke neighbor of network device 103, network device 103 forwards the first packet to network device 102 according to the second route.

[0112] Understandably, network device 103 can encapsulate the first packet using UDP to obtain the second VXLAN packet. Based on the second route, network device 103 forwards the second VXLAN packet to network device 102 through the VXLAN tunnel 2 between network device 103 and network device 102. The header of the second VXLAN packet includes the IP address of network device 103, the MAC address of network device 103, the IP address of network device 102, and the MAC address of network device 102.

[0113] S406, Network device 102 receives the first message sent by network device 103.

[0114] S407. Network device 102 forwards the first message to virtual machine 2 connected to network device 102.

[0115] Understandably, network device 102 decapsulates the second VXLAN packet to obtain the first packet, and sends the first packet to virtual machine 2 connected to network device 102.

[0116] For example, such as Figure 5The diagram illustrates a message transmission process according to an embodiment of this application. The path for virtual machine 1 in server 104 to send a first message to virtual machine 2 in server 106 is: virtual machine 1 in server 104 -> network device 101 -> network device 103 -> network device 102 -> virtual machine 2 in server 106. The path for virtual machine 1 in server 107 to send a second message to virtual machine 105 is: virtual machine 107 -> network device 102 -> network device 103 -> network device 101 -> virtual machine 105.

[0117] Thus, with network devices 101 and 102 storing only default routes and not routes for other network devices in the VXLAN, routes for sending packets to virtual machine 2 connected to network device 102 are obtained from network device 103 as needed. These packets are then forwarded by network device 103, enabling communication between virtual machine 1 connected to network device 101 and virtual machine 2 connected to network device 102. This effectively reduces the resource overhead and storage pressure on user-side edge nodes.

[0118] In some embodiments, if virtual machine 1 connected to network device 101 does not know the MAC address of virtual machine 2 connected to network device 102, virtual machine 1 connected to network device 101 sends a request to obtain the MAC address of virtual machine 2 connected to network device 102. Figure 6 This is a flowchart illustrating a data transmission method provided in an embodiment of this application. Figure 6 As shown, prior to S401, the method further includes the following steps.

[0119] S601, Virtual machine 1 in server 104 sends Address Resolution Protocol (ARP) messages to network device 101.

[0120] The Address Resolution Protocol (ARP) message is used to request the MAC address of virtual machine 2 connected to network device 102. The ARP message includes the IP address of virtual machine 2 connected to network device 102.

[0121] S602, Network device 101 receives an Address Resolution Protocol (ARP) message sent by virtual machine 1 in server 104.

[0122] S603, Network device 101 forwards the Address Resolution Protocol (ARP) message to Network device 103.

[0123] After receiving the Address Resolution Protocol (ARP) message, if network device 101 finds the MAC address of virtual machine 2 associated with its IP address in its locally stored ARP table, network device 101 reports the MAC address of virtual machine 2 to virtual machine 1 in server 104. Otherwise, if network device 101 does not find the MAC address of virtual machine 2 associated with its IP address in its locally stored ARP table, network device 101 broadcasts the ARP message to network device 103. For example, network device 101 broadcasts the ARP message to network device 103 based on the IMET route sent by network device 103.

[0124] Understandably, network device 101 can encapsulate the Address Resolution Protocol (ARP) message using UDP to obtain the third VXLAN message. The third VXLAN message is then sent to network device 103 via VXLAN tunnel 3 between network device 101 and network device 103.

[0125] S604. Network device 103 receives the Address Resolution Protocol (ARP) message sent by network device 101.

[0126] S605, Network device 103 sends a response message to network device 101 according to the third route.

[0127] Since network device 103 has learned the IP address and MAC address of virtual machine 2 connected to network device 102, network device 103 queries the ARP table based on the IP address of virtual machine 2 connected to network device 102 to obtain the MAC address of virtual machine 2 connected to network device 102. Network device 103 generates a response packet, which includes the MAC address of virtual machine 2 connected to network device 102. Network device 103 forwards the response packet to network device 101 through the VXLAN tunnel 3 between network device 101 and network device 103. Understandably, network device 103 can encapsulate the response packet using UDP to obtain a fourth VXLAN packet. The fourth VXLAN packet is then sent to network device 103 through the VXLAN tunnel 3 between network device 103 and network device 101.

[0128] For example, suppose the IP address of virtual machine 2 connected to network device 102 is 10.1.1.2, and the MAC address of virtual machine 2 connected to network device 102 is 2-2-2. Network device 103 queries 2-2-2 based on 10.1.1.2 and sends 10.1.1.2 and 2-2-2 back to network device 101.

[0129] S606, Network device 101 receives the response message sent by network device 103.

[0130] S607, Network device 101 sends a response message to virtual machine 1 connected to network device 101.

[0131] Furthermore, virtual machine 1 connected to network device 101 can send a message to virtual machine 2 connected to network device 102 based on the MAC address of virtual machine 2 connected to network device 102. For details, please refer to the descriptions of S401 to S407 in the above embodiments, which will not be repeated here.

[0132] For example, such as Figure 7 The diagram shown illustrates an ARP packet sending process according to an embodiment of this application. The path of the ARP packet sent by virtual machine 1 in server 104 requesting the MAC address of virtual machine 2 in server 106 is: virtual machine 1 in server 104 -> network device 101 -> network device 103 -> network device 101 -> virtual machine 1 in server 104.

[0133] Optionally, network device 101 can also generate an ORF request based on the ARP request sent by virtual machine 1 connected to network device 101, and use the ORF request to obtain the MAC address of virtual machine 2 connected to network device 102. For example, network device 101 sends a second ORF request to network device 103, and the second ORF request includes a route type indicating the route to obtain virtual machine 2 connected to network device 102.

[0134] Therefore, network device 101 dynamically requests MAC addresses based on the unicast traffic of the service, realizes accurate request routing, sends packets according to the requested route to achieve the effect of optimal path, and reduces the number of MAC addresses stored by network device 101, thereby reducing the resource consumption and storage pressure of network device 101.

[0135] The destination address of the route for virtual machine 2 connected to network device 102 is the address of virtual machine 2 connected to network device 102. Additionally, network device 103 can store the next hop of the route for virtual machine 2 connected to network device 102 as network device 102.

[0136] If every packet sent by the virtual machine connected to network device 101 to the virtual machine connected to network device 102 is forwarded by network device 103, it consumes a significant amount of network device 103's resources. In another scenario, if the number of times the virtual machine in server 104 sends packets to the virtual machine connected to network device 102 exceeds a preset threshold, network device 101 can generate an ORF request to obtain the MAC address of the virtual machine connected to network device 102. After receiving the MAC address of the virtual machine connected to network device 102 from network device 103, network device 101 adds the MAC address of the virtual machine connected to network device 102 to its unicast routing table. This avoids network device 103 forwarding packets sent from the virtual machine connected to network device 101 to the virtual machine connected to network device 102, reducing the resource consumption of network device 103. Subsequently, when the virtual machine connected to network device 101 sends a packet to the virtual machine connected to network device 102, network device 101 can query its unicast routing table to obtain the MAC address of the virtual machine connected to network device 102. Network device 101 then forwards the packet from the virtual machine connected to network device 101 to network device 102 through VXLAN tunnel 1 between network device 101 and network device 102. There is no need to forward the packet from the virtual machine connected to network device 101 to network device 103, where network device 103 queries the MAC address of the virtual machine connected to network device 102 and forwards the packet from the virtual machine connected to network device 101. For example, as shown... Figure 8 The diagram shown is a schematic of a message transmission process provided in an embodiment of this application. The path for virtual machine 1 in server 104 to send a unicast message to virtual machine 2 in server 106 is virtual machine 1 in server 104 -> network device 101 -> network device 102 -> virtual machine 2 in server 106.

[0137] Furthermore, if network device 101 does not receive any more unicast packets from the virtual machine connected to network device 101 to the virtual machine connected to network device 102 within a preset time period, network device 101 can delete the MAC address of the virtual machine connected to network device 102 from its unicast routing table. This reduces the number of MAC addresses stored by network device 101.

[0138] In another possible implementation, network device 101 can also negotiate the number of Outbound Route Filtering (ORF) requests with network device 103. ORF requests are used to request routes to user-side devices connected to the network device. Network device 103 can determine the number of ORF requests based on the number of its spoken neighbors or the Route Distinguisher (RD) value of the EVPN instance. Alternatively, network device 101 can inform network device 103 of the maximum number of ORF requests. If network device 103 receives more ORF requests than the threshold, it discards the excess ORF requests.

[0139] Figure 9 This is a flowchart illustrating a data transmission method according to an embodiment of this application. Network devices 101, 102, and 103 are used as examples for explanation. Network device 103 establishes a first-mode neighbor relationship with both network devices 101 and 102. The first-mode neighbor can refer to a spoken neighbor. Figure 9 As shown, the method includes the following steps.

[0140] S901, Network device 101 sends the first IMET route to network device 103.

[0141] Based on the stored information of the network devices that have established spoken neighbor relationships with it, network device 101 determines that network device 101 is the first mode neighbor of network device 103, and network device 101 sends the first IMET route to network device 103.

[0142] The first IMET route is used to instruct network device 103 to forward broadcast, unknown unicast, and multicast (BUM) messages destined for virtual machines connected to network device 101 to network device 101 according to the first IMET route. That is, the messages sent to virtual machines connected to network device 101 are any one of broadcast, unknown unicast, or multicast messages.

[0143] Based on the hub-mode BGP-EVPN neighbor relationship with network device 103, network device 101 sends the first IMET route to network device 103.

[0144] S902, Network device 102 sends the second IMET route to network device 103.

[0145] Based on the stored information of the network devices that have established spoken neighbor relationships with it, network device 102 determines that network device 102 is the first mode neighbor of network device 103, and network device 102 sends a second IMET route to network device 103.

[0146] The second IMET route is used to instruct network device 103 to forward BUM messages destined for virtual machines connected to network device 102 to network device 102 according to the second IMET route.

[0147] Based on the hub-mode BGP-EVPN neighbor relationship with network device 103, network device 102 sends a second IMET route to network device 103.

[0148] S903, Network device 103 receives the first IMET route sent by network device 101.

[0149] After receiving the first IMET route, network device 103 records the first IMET route in the broadcast routing table. After receiving the BUM message sent by the virtual machine connected to network device 102, network device 103 can forward the BUM message to network device 101 according to the first IMET route.

[0150] S904, Network device 103 receives the second IMET route sent by network device 102.

[0151] After receiving the second IMET route, network device 103 records the second IMET route in its broadcast routing table. After receiving the BUM message sent by the virtual machine connected to network device 101, network device 103 can forward the BUM message to network device 102 according to the second IMET route.

[0152] S905, Network device 103 sends a third IMET route to Network device 101.

[0153] Based on its spoken neighbor relationship with network device 101, network device 103 sends a third IMET route to network device 101, instructing network device 101 to send a message to network device 103 according to the third IMET route.

[0154] S906, Network device 103 sends a third IMET route to network device 102.

[0155] Based on its spoken neighbor relationship with network device 102, network device 103 sends a third IMET route to network device 102, instructing network device 102 to send a message to network device 103 according to the third IMET route.

[0156] S907, Network device 101 receives the third IMET route sent by network device 103.

[0157] S908, Network device 102 receives the third IMET route sent by network device 103.

[0158] Optionally, network device 103 may first send a third IMET route to network devices 101 and 102, and then receive the first IMET route sent by network device 101 and the second IMET route sent by network device 102. This embodiment does not limit the order of S901 to S904 and S905 to S908.

[0159] For example, such as Figure 10 The diagram illustrates a route learning process according to an embodiment of this application. Network device 103 sends a third IMET route to network device 101 and network device 102 respectively. Network device 102 sends a second IMET route to network device 103. Network device 101 sends a first IMET route to network device 103.

[0160] It should be noted that, based on network device 101 being a first-mode neighbor of network device 103, network device 103 receives a second IMET route sent by network device 102 but does not forward the second IMET route to network device 101. Similarly, based on network device 102 being a first-mode neighbor of network device 103, network device 103 receives a first IMET route sent by network device 101 but does not forward the first IMET route to network device 102. Furthermore, network devices 101 and 102 can also choose not to advertise either the first or second IMET route to each other if they are not first-mode neighbors. For example, network devices 101 and 102 can be second-mode neighbors, such as hub-mode neighbors.

[0161] In this way, network devices 101 and 102 only store the IMET route of network device 103, without storing the IMET routes of other network devices in VXLAN, thereby effectively reducing the resource overhead and storage pressure of user-side edge nodes.

[0162] Figure 11 This is a flowchart illustrating a data transmission method provided in an embodiment of this application. The example used here is virtual machine 1 in server 104 sending a BUM message. Figure 11 As shown, after S901 to S908, the method includes the following steps.

[0163] S1101, Virtual machine 1 in server 106 sends the first message to network device 102.

[0164] The header of the first message includes the MAC address and broadcast address of virtual machine 1 in server 106. In this embodiment, the first message is a BUM message.

[0165] S1102, Network device 102 receives the first message sent by virtual machine 1 in server 106.

[0166] S1103, Network device 102 forwards the first packet according to the third IMET route.

[0167] Network device 102 looks up the broadcast routing table and uses the third IMET route in the broadcast routing table to forward the first packet to network device 103.

[0168] Understandably, network device 102 can encapsulate the first packet using UDP to obtain the first VXLAN packet. The header of the first VXLAN packet may include the IP address of network device 102 and the IP address of network device 103. Network device 102 sends the first VXLAN packet to network device 103 through VXLAN tunnel 2 between network device 102 and network device 103.

[0169] S1104, Network device 103 receives the first message sent by network device 102.

[0170] S1105, Network device 103 forwards the first message to network device 101 according to the first IMET route.

[0171] Network device 103 decapsulates the first VXLAN packet, determines that the first packet is a BUM packet, and encapsulates the first packet using UDP to obtain the second VXLAN packet. Based on the first IMET route, network device 103 forwards the second VXLAN packet to network device 101 through the VXLAN tunnel 3 between network device 103 and network device 101. The header of the second VXLAN packet may include the IP address of network device 103, the MAC address of network device 103, the IP address of network device 101, and the MAC address of network device 101.

[0172] S1106, Network device 101 receives the first message sent by network device 103.

[0173] S1107. Network device 101 forwards the first packet to the virtual machine connected to network device 101.

[0174] Understandably, network device 101 decapsulates the second VXLAN packet to obtain the first packet, and sends the first packet to the virtual machine of server 104 and the virtual machine of server 105 connected to network device 101.

[0175] For example, such as Figure 12 The diagram shown illustrates a message transmission process according to an embodiment of this application. The path for the virtual machine in server 107 to send the BUM message is: virtual machine in server 107 -> network device 102 -> network device 103 -> network device 101 -> virtual machines in server 104 and server 105.

[0176] Thus, with network devices 101 and 102 storing only the IMET route of network device 103 and not needing to store the IMET routes of other network devices in the VXLAN, BUM messages are forwarded by network device 103, enabling communication between the virtual machines connected to network device 101 and network device 102. This effectively reduces the resource overhead and storage pressure on the user-side edge nodes.

[0177] Optionally, when network device 103 receives a BUM packet sent by a virtual machine connected to network device 102, it can perform source pruning, meaning network device 103 forwards the BUM packet to network device 101 instead of to network device 102. Specifically, for VXLAN and SRv6 methods, the source IP field in the BUM packet can be used for filtering. For Multi-Protocol Label Switching (MPLS) methods, a source label needs to be added to the BUM packet for filtering.

[0178] The embodiments described in this application use VXLAN tunnels as examples. In other possible application scenarios where the embodiments of this application are applicable, the tunnel type may also be an SRv6 tunnel or an MPLS tunnel.

[0179] In other embodiments, network device 103 may establish second-mode neighbors with other network devices (such as network device 108). The second-mode neighbors may be hub-mode neighbors.

[0180] When network device 103 receives a unicast message from network device 108, it queries the unicast routing table. If the next hop is a spoken neighbor of network device 103 (such as network device 101 or network device 102), network device 103 sends a unicast message to the spoken neighbor.

[0181] The routes or IMET routes that network device 103 receives from network device 108 for advertising virtual machines are not sent to network device 103's spoken neighbors (such as network device 101 or network device 102).

[0182] When network device 103 receives a unicast message from its spoken neighbor (e.g., network device 101 or network device 102), it queries the unicast routing table. If the next hop is a BGP-EVPN neighbor of network device 103 (e.g., network device 108), network device 103 sends a unicast message to the BGP-EVPN neighbor.

[0183] When network device 103 receives a BUM message from network device 108, it queries the broadcast routing table. If the next hop is a spoken neighbor of network device 103 (such as network device 101 or network device 102), network device 103 sends a BUM message to the spoken neighbor.

[0184] When network device 103 receives a BUM message from a spoken neighbor (e.g., network device 101 or network device 102), it queries the broadcast routing table. If the next hop is a BGP-EVPN neighbor of network device 103 (e.g., network device 108), network device 103 sends a BUM message to the BGP-EVPN neighbor.

[0185] In other embodiments, where the network is large-scale, the network topology can be a three-layer network topology. A three-layer network topology can be divided into a core layer (also known as a backbone layer), a aggregation layer, and an access layer (also known as a leaf layer). The network described in this application can also be called a data transmission network. A data transmission network can be, for example, a data center network or a network deployed in a campus.

[0186] The core layer can be, for example, the high-speed switching backbone of the network, used to connect the network to devices outside the network (such as external carrier equipment). The core layer can include switches and routers with high bandwidth (e.g., gigabit or higher). The core layer has at least one of the following characteristics: reliability, efficiency, redundancy, fault tolerance, manageability, adaptability, and low latency. The routing connections in the core layer play a crucial role in the network, and network reliability is generally achieved through redundant connections of multiple devices. In this embodiment, the switches and routers included in the aggregation layer have the same functions as the network device 103 described in the above embodiments.

[0187] The aggregation layer can be, for example, an "intermediary" between the access layer and the core layer, used to aggregate data sent from workstations (such as terminal devices or servers) before it enters the core layer, thereby reducing the load on the core layer. The aggregation layer may include switches and routers supporting Layer 3 switching technology and VXLAN. In this embodiment, the switches and routers included in the aggregation layer have the same functions as the network device 103 described in the above embodiments.

[0188] The access layer can, for example, be connected to workstations to provide workstation access to the local network segment. The access layer may include switches and routers that do not support VLANs and Layer 3 switching technologies, or it may include switches and routers that do support VLANs and Layer 3 switching technologies. In this embodiment, the switches and routers included in the access layer have the functions of network device 101 and network device 102 described in the above embodiments.

[0189] For example, such as Figure 13 As shown above, Figure 1 The difference in the VXLAN shown is that VXLAN also includes network devices 111, 112, and 113. The access layer includes network devices 101, 102, and 111. Network device 111 is also connected to server 110, which hosts multiple virtual machines. The aggregation layer includes network devices 103 and 112. The core layer includes network device 113. A VXLAN tunnel 4 is established between network devices 111 and 112. A VXLAN tunnel 5 is established between network devices 112 and 113. A VXLAN tunnel 6 is established between network devices 103 and 113.

[0190] Network device 113 connects to other networks (such as the Internet). For example, network device 113 can be a VXLAN gateway device. If network device 113 is connected to network device 108 in the Internet, then packets within the VXLAN can be transmitted to networks outside the VXLAN through network device 113.

[0191] Network device 113 establishes first-mode neighbors with both network devices 103 and 112, for example, network device 103 is a spoken neighbor of network device 113, and network device 112 is a spoken neighbor of network device 113. Network device 113 sends a default route and an IMET route for forwarding service packets for network devices 101 and 102 to network device 103. Network device 113 sends a default route and an IMET route for forwarding service packets for network device 111 to network device 112.

[0192] Network device 101 and network device 103 establish a first-mode neighbor relationship, for example, network device 101 is a spoken neighbor of network device 103. Network device 103 forwards the default route and IMET route from network device 113 for forwarding service packets for network device 101 to network device 101.

[0193] Network device 102 and network device 103 establish a first-mode neighbor relationship, for example, network device 102 is a spoken neighbor of network device 103. Network device 103 forwards the default route and IMET route from network device 113 for forwarding service packets for network device 102 to network device 102.

[0194] Therefore, network devices 101 and 102 only store the default route and the IMET route of network device 113, without storing the routes of other network devices in VXLAN, effectively reducing the resource overhead and storage pressure of user-side edge nodes.

[0195] Network device 111 and network device 112 establish a first-mode neighbor relationship, for example, network device 111 is a spoken neighbor of network device 112. Network device 112 forwards the default route and IMET route from network device 113, used for forwarding service packets for network device 111, to network device 111. Thus, network device 111 only stores the default route and the IMET route of network device 113, without needing to store routes from other network devices in the VXLAN, effectively reducing the resource overhead and storage pressure on the user-side edge nodes.

[0196] Network device 101 publishes the MAC route and IMET route obtained by network device 101 to network device 103.

[0197] Network device 102 publishes the MAC route and IMET route obtained by network device 102 to network device 103.

[0198] Network device 103 publishes the MAC and IMET routes obtained by network device 103, network device 102, and network device 101 to network device 113. In one possible scenario, in addition to publishing the aforementioned routes to network device 113, network device 103 may also store the MAC and IMET routes published by network device 101 and network device 102, so that network device 103 can also use the methods described in the foregoing method embodiments to forward packets destined for network device 101 or network device 102. For example, a packet sent by server 104 to server 106 can be forwarded by network device 103.

[0199] Network device 111 publishes the MAC and IMET routes it has acquired to network device 112. Network device 112 publishes the MAC and IMET routes it has acquired, as well as the MAC and IMET routes it has acquired, to network device 113. Network device 112 stores the MAC and IMET routes published by network device 111 to facilitate sending messages from other spoke neighbors (not shown in the figure) connected to network device 112 to network device 111. For details on the route learning process, please refer to the relevant descriptions in the above embodiments.

[0200] Network device 113 stores MAC routes and IMET routes obtained by access layer network devices and aggregation layer network devices to facilitate sending packets (such as unicast packets or BUM packets) to access layer network devices or forwarding packets sent by access layer network devices. For example, the path for a virtual machine in server 104 to send a packet to a virtual machine in server 106 could be virtual machine in server 104 -> network device 101 -> network device 103 -> network device 102 -> virtual machine in server 106. Optionally, the path for a virtual machine in server 104 to send a packet to a virtual machine in server 106 could also be virtual machine in server 104 -> network device 101 -> network device 103 -> network device 113 -> network device 103 -> network device 102 -> virtual machine in server 106.

[0201] For example, the path for a virtual machine in server 104 to send a message to a virtual machine in server 110 could be: virtual machine in server 104 -> network device 101 -> network device 103 -> network device 113 -> network device 112 -> network device 111 -> virtual machine in server 110. Optionally, a VXLAN tunnel 7 can also be established between network device 102 and network device 111. If network devices 101 and 102 store the addresses of the virtual machines in server 110, the path for a virtual machine in server 104 to send a message to a virtual machine in server 110 could be: virtual machine in server 104 -> network device 101 -> network device 102 -> network device 111 -> virtual machine in server 110.

[0202] For example, the path for a virtual machine in server 110 to send a message to a virtual machine in server 106 could be virtual machine in server 110 -> network device 111 -> network device 112 -> network device 113 -> network device 103 -> network device 102 -> virtual machine in server 106.

[0203] For details regarding the message forwarding process, please refer to the relevant descriptions in the above embodiments.

[0204] After receiving an ARP request from a virtual machine in the server, network device 103 or network device 112 can convert the ARP request into an ORF request and then send the ORF request to network device 113. This conversion of the ARP request into an ORF request can also be done by first merging some ARP requests and then converting them into an ORF request. If network device 113 stores the MAC and IMET routes of the network devices included in the access layer, as well as the MAC addresses of devices connected to the network devices included in the access layer, network device 113 can send the requested MAC address back to the requester.

[0205] In addition, after receiving the ORF requests sent by network devices 101 and 102, network device 103 can merge the ORF requests sent by network device 101 and 102 to generate a new ORF request, and then send the new ORF request to network device 113.

[0206] For example, network device 101 sends a first ORF request, network device 102 sends a second ORF request, and after receiving the first ORF request from network device 101 and the second ORF request from network device 102, network device 103 generates a new ORF request and sends the new ORF request to network device 113.

[0207] Network device 113 recorded the MAC address 2-2-2 and MAC address 4-4-4 in response to the new ORF request.

[0208] Network device 113 sends MAC address 2-2-2 and MAC address 4-4-4 back to network device 103.

[0209] Network device 103 sends MAC address 2-2-2 back to network device 101, and MAC address 4-4-4 back to network device 102.

[0210] Figure 13 Taking a network including a single aggregation layer as an example, multiple aggregation layers can also be set up in other possible application scenarios. First-mode neighbors can be established between the access layer and the aggregation layer, adjacent aggregation layers, or the aggregation layer and the core layer to implement the corresponding functions described in this application. This can be applied, for example, to large-scale networking scenarios. Furthermore, for ease of understanding, this embodiment describes different network layers as access layer, aggregation layer, and core layer. However, it is understood that the above naming can be replaced with other descriptions depending on the application scenario, or it can be simply described as different network layers under a multi-level networking method, where different network layers can be used to implement different or the same functions.

[0211] The above embodiments illustrate the route learning and packet sending process for unicast and broadcast scenarios. By establishing a first-mode neighbor relationship, such as a spoken mode neighbor relationship, between the client (e.g., network device 101) and the server (e.g., network device 103), the client and server can determine their own behavior during the route advertising phase based on the neighbor relationship of this mode, and complete the corresponding service packet forwarding behavior according to the acquired route. This reduces the route storage pressure on the client and network devices and saves network operating resources while ensuring the normal forwarding of service packets.

[0212] Next, this application embodiment also provides a flowchart of a data transmission method. Here, a first network device, a second network device, and a third network device are used as examples for illustration. The third network device establishes a first-mode neighbor relationship with both the first and second network devices. The first-mode neighbor can refer to a spoken neighbor, or it can be defined as other forms of neighbors that can implement the corresponding functions provided in this application embodiment. The first network device is connected to a first user-side device. The second network device is connected to a second user-side device. (The text repeats itself here.) Figure 14 As shown, the method may include the following steps:

[0213] S1401, The first network device sends the first route to the third network device.

[0214] Based on the stored information of network devices that have established spoken neighbor relationships with it, the first network device determines that it is the first mode neighbor of the third network device, and sends a first route to the third network device. The first route can refer to the MAC route or IMET route of the first network device.

[0215] S1402, The second network device sends a second route to the third network device.

[0216] Based on the stored information of the network devices that have established spoken neighbor relationships with it, the second network device determines that it is the first mode neighbor of the third network device, and then sends a second route to the third network device. The second route can refer to the MAC route or IMET route of the second network device.

[0217] S1403, The third network device receives the first route sent by the first network device.

[0218] If the first route is a MAC route, the third network device, upon receiving the first route, will record it in its unicast routing table. When the third network device receives a unicast message destined for a virtual machine connected to the first network device, it can forward the unicast message to the first network device based on the MAC route.

[0219] If the first route is an IMET route, the third network device, upon receiving the first route, will record it in its broadcast routing table. After receiving a BUM message, the third network device can forward the BUM message to the first network device based on the IMET route.

[0220] S1404, The third network device receives the second route sent by the second network device.

[0221] If the second route is a MAC route, the third network device, upon receiving the second route, will record it in its unicast routing table. When the third network device receives a unicast message destined for a virtual machine connected to the second network device, it can forward the unicast message to the second network device based on the MAC route.

[0222] If the second route is an IMET route, the third network device, upon receiving the second route, will record it in its broadcast routing table. After receiving the BUM message, the third network device can forward the BUM message to the second network device based on the IMET route.

[0223] S1405, The third network device sends a third route to the first network device.

[0224] S1406, The third network device sends a third route to the second network device.

[0225] If the third route is the default route, it instructs the first or second network device to forward unicast messages to the third network device according to the third route.

[0226] If the third route is an IMET route, it instructs the first or second network device to forward the BUM message to the third network device according to the third route.

[0227] S1407, The first network device receives the third route sent by the third network device.

[0228] S1408, The second network device receives the third route sent by the third network device.

[0229] Optionally, the third network device may first send a third route to the first and second network devices, and then receive the first route sent by the first network device and the second route sent by the second network device. This embodiment does not limit the order of S1401 to S1404 and S1405 to S1408.

[0230] If the first route is a MAC route, for a detailed explanation of S1401 to S1408, please refer to the above descriptions of S201 to S213.

[0231] If the first route is an IMET route, for a detailed explanation of S1401 to S1408, please refer to the above description of S901 to S908.

[0232] After the first network device to the third network device learns the route (i.e., S1401 to S1408), the first network device to the third network device can forward packets from the user-side device. The user-side device can be a user-side network device or a user host, etc. The method also includes the following steps.

[0233] S1409, The first user-side device sends the first message to the first network device.

[0234] If the first message is a unicast message, its header includes the MAC addresses of the first user-side device and the second user-side device. The first message is sent from the first user-side device connected to the first network device to the second user-side device connected to the second network device.

[0235] If the first message is a BUM message, the header of the first message includes the MAC address and broadcast address of the first user-side device.

[0236] S1410, The first network device receives the first message sent by the first user-side device.

[0237] S1411, The first network device forwards the first packet according to the third route.

[0238] If the first message is a unicast message, since the first network device does not find the MAC address of the second user-side device in the unicast routing table, the first network device will use the third route in the unknown unicast routing table to forward the first message to the third network device.

[0239] If the first message is a BUM message, the first network device looks up the broadcast routing table and uses the third IMET route in the broadcast routing table to forward the first message to the third network device.

[0240] The first network device can encapsulate the first packet using UDP to obtain the first VXLAN packet, and then forward the first VXLAN packet according to the third route.

[0241] S1412, The third network device receives the first message sent by the first network device.

[0242] S1413. The third network device forwards the first message to the second network device according to the second route.

[0243] The third network device can decapsulate the first VXLAN packet, determine the second route based on the destination address (broadcast address or MAC address of the second user-side device), and forward the first packet to the second network device according to the second route.

[0244] The third network device can encapsulate the first packet using UDP to obtain the second VXLAN packet, and then forward the second VXLAN packet according to the second route.

[0245] S1414, The second network device receives the first message sent by the third network device.

[0246] S1415. The second network device forwards the first message to the second user-side device connected to the second network device.

[0247] Understandably, the second network device decapsulates the second VXLAN packet to obtain the first packet, and forwards the first packet to the second user-side device connected to the second network device.

[0248] If the primary route is a MAC route, a detailed explanation of S1409 to S1415 can be found in the descriptions of S401 to S407 above.

[0249] If the first route is an IMET route, for a detailed explanation of S1409 to S1415, please refer to the descriptions of S1101 to S1107 above.

[0250] In one scenario, if the first user-side device does not know the MAC address of the second user-side device, the first user-side device sends an ARP request to obtain the MAC address of the second user-side device. Figure 15 A flowchart illustrating a data transmission method provided in an embodiment of this application. Figure 15 As shown, prior to S1409, the method further includes the following steps.

[0251] S1501, The first user-side device sends a second message to the first network device.

[0252] The second message is used to request the MAC address of the second user-side device. The second message includes the IP address of the second user-side device. For example, the second message could be an Address Resolution Protocol (ARP) message.

[0253] S1502, The first network device receives the second message sent by the first user-side device.

[0254] S1503, The first network device forwards the second message to the third network device.

[0255] If the first network device stores the MAC address of the second user-side device, the first network device feeds back the MAC address of the second user-side device to the first user-side device. If the first network device does not store the MAC address of the second user-side device, the first network device can broadcast a second message. If the third network device stores the MAC address of the second user-side device, the first network device can obtain the MAC address of the second user-side device from the third network device and feed back the MAC address of the second user-side device to the first user-side device. The steps are as described in S1504 and S1505 below.

[0256] S1504, The third network device receives the second message sent by the first network device.

[0257] S1505, The third network device sends a response message to the first network device according to the first route.

[0258] S1506. The first network device receives the response message sent by the third network device.

[0259] S1507. The first network device forwards the response message to the first user-side device.

[0260] Alternatively, the first network device can also generate an ORF request based on the second message and send it to the third network device to request the MAC address of the second user-side device. For a detailed explanation of S1501 to S1507, please refer to the descriptions of S601 to S607 above.

[0261] Then, the first network device sends a message to the second user-side device based on the MAC address of the second user-side device. For details, please refer to the descriptions in S1409 to S1415 of the above embodiments, which will not be repeated here.

[0262] Therefore, the first and second network devices only store the default route or IMET route to the third network device, while the third network device forwards the packets sent by the first network device, or dynamically obtains the route to the user-side device attached to another network device as needed for packet forwarding, thereby reducing the resource overhead and storage pressure of the first network device.

[0263] Furthermore, for example, if the data transmission network needs to cover a small area, the first network device can be directly connected to the first user-side device. The second network device can be directly connected to the second user-side device. For example, such as... Figure 1 As shown, the first network device is network device 101, the second network device is network device 102, and the third network device is network device 103. The process of route learning and packet forwarding between network devices can be referred to the above. Figure 1 The relevant descriptions of the various embodiments of the network device connection methods shown.

[0264] For example, if a data transmission network needs to cover a large area, the first network device and the first user-side device can be indirectly connected. The second network device can be indirectly connected to the second user-side device. For example, such as... Figure 13 As shown, the first network device is network device 103, the second network device is network device 112, and the third network device is network device 113. For the process of route learning and packet forwarding between network devices, please refer to the above. Figure 13 The relevant descriptions in the illustrated embodiments.

[0265] It is understood that, in order to achieve the functions in the above embodiments, the network device includes hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should readily recognize that, based on the units and method steps described in conjunction with the embodiments disclosed in this application, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application scenario and design constraints of the technical solution.

[0266] Figure 16 This is a schematic diagram illustrating the structure of possible communication devices provided in embodiments of this application. These communication devices can be used to implement the functions of the network devices in the above method embodiments, and therefore can also achieve the beneficial effects of the above method embodiments. In embodiments of this application, the communication device can be as follows: Figure 1 , Figure 3 , Figure 5 , Figure 7 , Figure 8 , Figure 10 , Figure 12 or Figure 13 The network device 101, network device 102 or network device 103 shown can also be a module applied to the network device (such as a hardware module such as a chip, or a software module used to implement the corresponding function, or a combination of some software and hardware modules).

[0267] like Figure 16 As shown, the communication device 1600 includes a receiving unit 1610, a processing unit 1620, and a transmitting unit 1630. The communication device 1600 is used to implement the above-mentioned... Figure 2 , Figure 4 , Figure 6 , Figure 9 , Figure 11 , Figure 14 or Figure 15 The method embodiment shown illustrates the functionality of the network device.

[0268] When the communication device 1600 is used to implement Figure 2In the method embodiment shown, the network device 101 functions as follows: the receiving unit 1610 can be used to execute S204; the sending unit 1630 can be used to execute S206 and S211.

[0269] When the communication device 1600 is used to implement Figure 2 In the method embodiment shown, the network device 102 functions as follows: the receiving unit 1610 can be used to execute S205; the sending unit 1630 can be used to execute S208 and S210.

[0270] When the communication device 1600 is used to implement Figure 2 In the method embodiment shown, the network device 103 functions as follows: the receiving unit 1610 can be used to execute S207, S209, S212 and S213; the sending unit 1630 can be used to execute S202 and S203; and the processing unit 1620 is used to execute S201.

[0271] When the communication device 1600 is used to implement Figure 4 In the method embodiment shown, the network device 101 functions as follows: the receiving unit 1610 can be used to execute S204 and S402; the sending unit 1630 can be used to execute S206, S211 and S403.

[0272] When the communication device 1600 is used to implement Figure 4 In the method embodiment shown, the network device 102 functions as follows: the receiving unit 1610 can be used to execute S205 and S406; the sending unit 1630 can be used to execute S208, S210 and S407.

[0273] When the communication device 1600 is used to implement Figure 4 In the method embodiment shown, the network device 103 functions as follows: the receiving unit 1610 can be used to execute S207, S209, S212, S213 and S404; the sending unit 1630 can be used to execute S202, S203 and S405.

[0274] When the communication device 1600 is used to implement Figure 6 In the method embodiment shown, the network device 101 functions as follows: the receiving unit 1610 can be used to execute S402, S602 and S606; the sending unit 1630 can be used to execute S403, S603 and S607.

[0275] When the communication device 1600 is used to implement Figure 6 In the method embodiment shown, the network device 103 functions as follows: the receiving unit 1610 can be used to execute S404 and S604; the sending unit 1630 can be used to execute S405 and S605.

[0276] When the communication device 1600 is used to implement Figure 9 In the method embodiment shown, the network device 101 functions as follows: the receiving unit 1610 can be used to execute S907; the sending unit 1630 can be used to execute S901.

[0277] When the communication device 1600 is used to implement Figure 9 In the method embodiment shown, the network device 102 functions as follows: the receiving unit 1610 can be used to execute S908; the sending unit 1630 can be used to execute S902.

[0278] When the communication device 1600 is used to implement Figure 9 In the method embodiment shown, the network device 103 functions as follows: the receiving unit 1610 can be used to execute S903 and S904; the sending unit 1630 can be used to execute S905 and S906.

[0279] When the communication device 1600 is used to implement Figure 11 In the method embodiment shown, the network device 101 functions as follows: the receiving unit 1610 can be used to execute S907 and S1106; the sending unit 1630 can be used to execute S901 and S1107.

[0280] When the communication device 1600 can be used to achieve Figure 11 In the method embodiment shown, the network device 102 functions as follows: the receiving unit 1610 can be used to execute S908 and S1102; the sending unit 1630 can be used to execute S902 and S1103.

[0281] When the communication device 1600 can be used to achieve Figure 11 In the method embodiment shown, the network device 103 functions as follows: the receiving unit 1610 can be used to execute S903, S904 and S1104; the sending unit 1630 can be used to execute S905, S906 and S1105.

[0282] When the communication device 1600 can be used to achieve Figure 14 In the method embodiment shown, the first network device functions as follows: the receiving unit 1610 can be used to execute S1407 and S1410; the sending unit 1630 can be used to execute S1401 and S1411.

[0283] When the communication device 1600 can be used to achieve Figure 14 In the method embodiment shown, the function of the second network device is as follows: the receiving unit 1610 can be used to execute S1408 and S1414; the sending unit 1630 can be used to execute S1402 and S1415.

[0284] When the communication device 1600 can be used to achieveFigure 14 In the method embodiment shown, the third network device functions as follows: the receiving unit 1610 can be used to execute S1403, S1404 and S1412; the sending unit 1630 can be used to execute S1405, S1406 and S1413.

[0285] When the communication device 1600 can be used to achieve Figure 15 In the method embodiment shown, the first network device functions as follows: the receiving unit 1610 can be used to execute S1407, S1410, S1502 and S1506; the sending unit 1630 can be used to execute S1401, S1411, S1503 and S1507.

[0286] When the communication device 1600 can be used to achieve Figure 15 In the method embodiment shown, the third network device functions as follows: the receiving unit 1610 can be used to execute S1403, S1404, S1412 and S1504; the sending unit 1630 can be used to execute S1405, S1406, S1413 and S1505.

[0287] For a more detailed description of the receiving unit 1610, processing unit 1620 and transmitting unit 1630 mentioned above, please refer to [the relevant documentation]. Figure 2 , Figure 4 , Figure 6 , Figure 9 , Figure 11 , Figure 14 or Figure 15 The relevant descriptions in the method embodiments shown are not repeated here.

[0288] like Figure 17 As shown, network device 1700 includes a processor 1710 and interface circuitry 1720. The processor 1710 and interface circuitry 1720 are coupled to each other. It is understood that interface circuitry 1720 can be a transceiver or an input / output interface. Optionally, network device 1700 may also include a memory 1730 for storing instructions executed by the processor 1710, or storing input data required by the processor 1710 to execute instructions, or storing data generated after the processor 1710 executes instructions.

[0289] When network device 1700 is used to implement Figure 2 , Figure 4 , Figure 6 , Figure 9 , Figure 11 , Figure 14 or Figure 15 In the method shown, the processor 1710 can be used to perform the functions of the processing unit 1620, and the interface circuit 1720 can be used to perform the functions of the receiving unit 1610 and the transmitting unit 1630.

[0290] Figure 18 This is a schematic diagram of another network device provided in an embodiment of this application. (See attached diagram.) Figure 18 As shown, network device 1800 includes a main control board 1810 and an interface board 1820. The main control board 1810 includes a processor 1811 and a memory 1812. The interface board 1820 includes a processor 1821, a memory 1822, and an interface card 1823. The processor 1821 of the interface board 1820 is used to call program instructions in the memory 1822 of the interface board 1820 to execute message reception and transmission, as well as route reception and transmission. The processor 1811 of the main control board 1810 is used to call program instructions in the memory 1812 of the main control board 1810 to execute corresponding processing functions. For example, looking up routes and forwarding messages, encapsulating received messages to generate VXLAN messages, and decapsulating VXLAN messages. For details, please refer to the above. Figure 2 , Figure 4 , Figure 6 , Figure 9 , Figure 11 , Figure 14 or Figure 15 The method shown is explained.

[0291] It is understood that the processor in the embodiments of this application may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. A general-purpose processor may be a microprocessor or any conventional processor.

[0292] The method steps in the embodiments of this application can be implemented in hardware or by a processor executing software instructions. The software instructions can consist of corresponding software modules, which can be stored in random access memory (RAM), flash memory, read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, portable hard disks, CD-ROMs, or any other form of storage medium known in the art. An exemplary storage medium is coupled to a processor, enabling the processor to read information from and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and storage medium can reside in an ASIC. Additionally, the ASIC can reside in a network device or a terminal device. Alternatively, the processor and storage medium can exist as discrete components in the network device or terminal device.

[0293] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed on a computer, the processes or functions described in the embodiments of this application are performed entirely or partially. The computer can be a general-purpose computer, a special-purpose computer, a computer network, a network device, a user equipment, or other programmable device. The computer program or instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; it can also be an optical medium, such as a digital video disc (DVD); or it can be a semiconductor medium, such as a solid-state drive (SSD).

[0294] In the various embodiments of this application, unless otherwise specified or in case of logical conflict, the terminology and / or descriptions of different embodiments are consistent and can be referenced by each other. The technical features of different embodiments can be combined to form new embodiments according to their inherent logical relationship.

[0295] In this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. In the textual description of this application, the character " / " generally indicates an "or" relationship between the preceding and following related objects; in the formulas of this application, the character " / " indicates a "division" relationship between the preceding and following related objects.

[0296] The terms "first," "second," and "third," etc., used in this application specification, claims, and the aforementioned drawings are used to distinguish different objects, not to limit a specific order.

[0297] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0298] It is understood that the various numerical designations used in the embodiments of this application are merely for descriptive convenience and are not intended to limit the scope of the embodiments of this application. The order of the process numbers described above does not imply the order of execution; the execution order of each process should be determined by its function and internal logic.

Claims

1. A method for transmitting data, characterized in that, The method is applied to an Ethernet Virtual Private Network (EVPN) system, which includes a first network device, a second network device, and a third network device. The third network device establishes a first-mode neighbor relationship with both the first and second network devices, where the first-mode neighbor is a radiated-spoke neighbor. The first network device is connected to a first user-side device, and the second network device is connected to a second user-side device. The method is executed by the third network device and includes: Based on the first network device being the first mode neighbor of the third network device, or based on a request received from the first network device, a first route is obtained. The first route is used to instruct the first network device to forward packets destined for the second user-side device connected to the second network device according to the first route. The first route is an Unknown Media Access Control Route (UMR). Send the first route to the first network device.

2. The method according to claim 1, characterized in that, The method further includes: Receive a first message sent by the first network device according to the first route, wherein the first message is a message sent by the first user-side device connected to the first network device to the second user-side device; The first message is forwarded to the second network device.

3. The method according to claim 2, characterized in that, The method further includes: The third network device receives a second route sent by the second network device, the second route being used to instruct the third network device to forward packets sent to the second user-side device; The step of forwarding the first packet to the second network device includes: forwarding the first packet to the second network device according to the second route.

4. The method according to any one of claims 1-3, characterized in that, Before the third network device sends the first route to the first network device, the method further includes: The third route is received from the first network device, which instructs the third network device to forward packets sent to the first user-side device.

5. The method according to any one of claims 1-4, characterized in that, Based on the fact that the first network device is a first-mode neighbor of the third network device, the first route is obtained, including: Based on the fact that the first network device is the first mode neighbor of the third network device, the first route is generated. The first route is used to instruct the first network device to forward packets destined for the second user-side device to the third network device according to the first route.

6. The method according to any one of claims 1-4, characterized in that, The step of obtaining the first route based on the request received from the first network device includes: The request is received from the first network device, the request being a request to obtain a route to the second user-side device, wherein the request is a request generated by the first network device or a request generated by the first user-side device and forwarded by the first network device; The first route is obtained according to the request. The first route is used to instruct the first network device to forward packets destined for the second user-side device to the second network device according to the first route.

7. The method according to claim 6, characterized in that, The destination address of the first route is the address of the second user-side device, and the next hop of the first route is the address of the second network device.

8. The method according to any one of claims 1-7, characterized in that, The first network device is directly or indirectly connected to the first user-side device; and the second network device is directly or indirectly connected to the second user-side device.

9. A method for transmitting data, characterized in that, The method is applied to an Ethernet Virtual Private Network (EVPN) system, which includes a first network device, a second network device, and a third network device. The third network device establishes a first-mode neighbor relationship with both the first and second network devices, where the first-mode neighbor relationship is a radiated-spoke neighbor relationship. The first network device is connected to a first user-side device, and the second network device is connected to a second user-side device. The method is executed by the first network device and includes: The first route is received from the third network device. The first route is used to instruct the first network device to forward the packets of the first user-side device according to the first route. The first route is an Unknown Media Access Control Route (UMR). The system receives a first message sent by the first user-side device, wherein the first message is a message destined for the second user-side device, and forwards the first message according to the first route.

10. The method according to claim 9, characterized in that, Receiving a first route from the third network device includes: receiving the first route generated and sent by the third network device; Forwarding the first packet according to the first route includes: forwarding the first packet to the third network device using the first route if the Media Access Control MAC address of the second user-side device is not found.

11. The method according to claim 9, characterized in that, Receiving a first route from the third network device includes: receiving a first route from the third network device in response to a request sent to the third network device, wherein the request is a request for obtaining a route to the second user-side device; Forwarding the first packet according to the first route includes: forwarding the first packet to the second network device connected to the second user-side device according to the first route.

12. The method according to claim 11, characterized in that, The first route is the route for the second user-side device; The method further includes: After a preset time period, delete the first route.

13. The method according to any one of claims 9-12, characterized in that, Before the first network device receives the first route sent by the third network device, the method further includes: A second route is sent to the third network device, the second route being used to instruct the third network device to forward packets to the first user-side device.

14. The method according to any one of claims 9-13, characterized in that, The first message is a unicast message.

15. A method for transmitting data, characterized in that, The method is applied to an Ethernet Virtual Private Network (EVPN) system, which includes a first network device, a second network device, and a third network device. The third network device establishes a first-mode neighbor relationship with both the first and second network devices, where the first-mode neighbor is a radiated-spoke neighbor. The first network device is connected to a first user-side device, and the second network device is connected to a second user-side device. The method is executed by the third network device and includes: Receive a first route from the first network device, the first route being a first inclusive multicast Ethernet label IMET route, the first route being used to forward packets to the first user-side device; Receive a first message from the second user-side device connected to the second network device; If the first network device is the first mode neighbor of the third network device, then the first packet is forwarded to the first network device according to the first route.

16. The method according to claim 15, characterized in that, The method further includes: The device receives a second route from the second network device. The second route is a second IMET route and is used to forward packets to the second user-side device.

17. The method according to claim 16, characterized in that, Based on the first network device being a first mode neighbor of the third network device, the second route is not forwarded to the first network device; and based on the second network device being a first mode neighbor of the third network device, the first route is not forwarded to the second network device.

18. The method according to any one of claims 15-17, characterized in that, Since the second network device is the first mode neighbor of the third network device, and the first packet originated from the second network device, the first packet is not forwarded to the second network device.

19. The method according to any one of claims 15-18, characterized in that, Before the third network device receives the first message from the second user-side device connected to the second network device, the method further includes: The third IMET route is published to the second network device to instruct the second network device to send the first message to the third network device according to the third IMET route.

20. The method according to any one of claims 15-19, characterized in that, The method further includes: A third IMET route is published to the first network device to instruct the first network device to send a second message to the third network device according to the third IMET route, wherein the second message is a message of the first user-side device connected to the first network device.

21. The method according to claim 20, characterized in that, Both the first message and the second message are broadcast, unknown unicast, and multicast BUM messages.

22. The method according to any one of claims 15-21, characterized in that, The first network device is directly or indirectly connected to the first user-side device; and the second network device is directly or indirectly connected to the second user-side device.

23. A method for transmitting data, characterized in that, The method is applied to an Ethernet Virtual Private Network (EVPN) system, which includes a first network device, a second network device, and a third network device. The third network device establishes a first-mode neighbor relationship with both the first and second network devices, where the first-mode neighbor relationship is a radiated-spoke neighbor relationship. The first network device is connected to a first user-side device, and the second network device is connected to a second user-side device. The method is executed by the first network device and includes: Based on the fact that the first network device is the first mode neighbor of the third network device, a first route is sent to the third network device. The first route is a first inclusive multicast Ethernet label IMET route. The first route is used to forward packets to the first user-side device. The device receives a first message sent by the third network device, wherein the first message is a message forwarded to the first user-side device.

24. The method according to claim 23, characterized in that, Since the first network device is not a first-mode neighbor of the second network device, the first network device does not send the first route to the second network device.

25. An Ethernet Virtual Private Network (EVPN) system for transmitting data, characterized in that, The system includes a first network device, a second network device, and a third network device. The third network device establishes a first-mode neighbor relationship with both the first and second network devices. The first-mode neighbor relationship is a radially spoke neighbor relationship. The first network device is connected to a first user-side device, and the second network device is connected to a second user-side device. The third network device is used to obtain a first route based on the first network device being the first mode neighbor of the third network device, or based on a request received from the first network device. The first route is used to instruct the first network device to forward packets destined for the second user-side device connected to the second network device according to the first route, and to send the first route to the first network device. The first route is an Unknown Media Access Control Route (UMR). The first network device is configured to receive a first route from the third network device, the first route being configured to instruct the first network device to forward packets from the first user-side device according to the first route.

26. The system according to claim 25, characterized in that, The first network device is further configured to receive a first message sent by the first user-side device, the first message being a message destined for the second user-side device; and to forward the first message according to the first route.

27. The system according to claim 26, characterized in that, The third network device is also configured to receive the first message sent by the first network device and forward the first message to the second network device; The second network device is used to receive the first message from the third network device.

28. The system according to claim 27, characterized in that, The third network device is further configured to receive a second route sent by the second network device, the second route being configured to instruct the third network device to forward the message sent to the second user-side device, and to forward the first message to the second network device according to the second route.

29. The system according to any one of claims 25-28, characterized in that, The third network device is configured to obtain the first route based on the first network device being a first mode neighbor of the third network device, including: Based on the fact that the first network device is the first mode neighbor of the third network device, the first route is generated. The first route is used to instruct the first network device to forward packets destined for the second user-side device to the third network device according to the first route.

30. The system according to any one of claims 25-29, characterized in that, The third network device is configured to obtain a first route based on a request received from the first network device, including: The request is received from the first network device, the request being a request to obtain a route to the second user-side device, wherein the request is a request generated by the first network device or a request generated by the first user-side device and forwarded by the first network device; The first route is obtained according to the request. The first route is used to instruct the first network device to forward packets destined for the second user-side device to the second network device according to the first route.

31. A network device, characterized in that, include: At least one processor, a memory, and a bus, wherein the memory is used to store a computer program such that when the computer program is executed by the at least one processor, it implements the method of transmitting data as described in any one of claims 1-24.

32. A computer-readable storage medium, characterized in that, include: Computer software instructions; When the computer software instructions are executed in a computer device or in a chip embedded in the computer device, the computer device causes the computer device to perform the method of transmitting data as described in any one of claims 1-24.