VXLAN packet transmission method, network device, and system
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2022-12-29
- Publication Date
- 2026-08-03
AI Technical Summary
【0175】 前述の特定の実施態様では、本出願の目的、技術的解決策、および有益な効果がさらに詳細に説明されている。前述の説明は、本出願の特定の実施態様にすぎないことを理解されたい。
Smart Images

Figure 0007899326000001 
Figure 0007899326000002 
Figure 0007899326000003
Abstract
Description
Technical Field
[0004] ,
[0001] This application claims the priority of Chinese Patent Application No. CN202111672776.4, titled "Method for Implementing VXLAN and GTP Based on IPv6", filed with the China National Intellectual Property Administration on December 31, 2021, the entire content of which is incorporated herein by reference. This application claims the priority of Chinese Patent Application No. 202210228141.3, titled "VXLAN Packet Transmission Method, Network Device, and System", filed on March 8, 2022, the entire content of which is incorporated herein by reference.
[0002] This application relates to the field of communication technologies, and more particularly, to a virtual extensible local area network (VXLAN) packet transmission method, network device, and system.
Background Art
[0003] VXLAN is an overlay network technology. A layer 2 Ethernet tunnel can be established on a layer 3 network to implement cross-region layer 2 interconnection. In the VXLAN technology, an encapsulation format is used in which the original Ethernet packet is encapsulated into a user datagram protocol (UDP) data packet, and the original layer 2 data frame and the VXLAN header are encapsulated together into the UDP data packet. Since UDP is used as the transmission method in the outer layer, the original Ethernet packet can be transmitted on a layer 2 or layer 3 network. The VXLAN header contains a VXLAN network identifier (VNI), and the VNI occupies 24 bits in the data packet. Therefore, 16 million VXLANs can coexist, and tenants can be deployed on a large scale.
[0004] The development and deployment of Internet Protocol version 6 (IPv6) technology sometimes requires traffic from different tenants to traverse IPv6 networks. Therefore, deploying VXLAN technology to IPv6 networks is urgently needed. However, because VXLAN uses UDP encapsulation, its encapsulation efficiency in IPv6 networks is low, affecting packet transmission efficiency. [Overview of the project]
[0005] This application provides a VXLAN packet transmission method, network device, and system for reducing the amount of data required for packet encapsulation when VXLAN packets pass through an IPv6 network, improving packet encapsulation efficiency, and further improving packet transmission efficiency. [Means for solving the problem]
[0006] A first aspect of this application provides a VXLAN packet transmission method. This method includes: A first network device receives a first packet and obtains a VNI based on the first packet. The first network device encapsulates an IPv6 header in the first packet in order to obtain a second packet. The IPv6 header carries the VNI. The first network device sends a second packet to a second network device. After obtaining the VNI corresponding to the first packet, the first network device encapsulates an IPv6 header in the first packet, and it is found that the IPv6 header includes the VNI. No additional UDP header needs to be encapsulated to carry the VNI. This reduces the amount of data required for packet encapsulation and improves packet encapsulation efficiency. In addition, including the VNI in the IPv6 header provides a method for VXLAN packets to traverse an IPv6 network. This method does not require the use of a UDP header to carry the VNI. Since the IPv6 header is the basic packet encapsulation method when packets are forwarded over an IPv6 network, this method improves the flexibility of VXLAN packet encapsulation.
[0007] In possible implementations, the way the IPv6 header carries the VNI may be by adding the VNI to the IPv6 header, or by encapsulating the VXLAN header within the IPv6 header.
[0008] In possible implementations, the IPv6 header is the IPv6 basic header. The IPv6 basic header contains basic packet forwarding information, such as a source address field and a destination address field. The source address field is used to carry the source address of the packet, and the destination address field is used to carry the destination address of the packet.
[0009] In possible implementations, the VNI is carried in the destination address field of the IPv6 base header. Since the destination address field of the IPv6 base header is 128 bits, the prefix information or SRv6 locator used for packet forwarding in the packet forwarding process typically occupies only a portion of these 128 bits, for example, only the first 64 bits. In this way, the VNI is contained within the bits of the destination address field that are not occupied by the prefix information or SRv6 locator, and the destination address field of the IPv6 base header is multiplexed. There is no need to encapsulate an additional header to carry the VNI. This improves packet encapsulation efficiency.
[0010] In possible implementations, bits 65 through 128 in the destination address field carry the VNI.
[0011] In possible implementations, the destination address field includes the VXLAN header, which carries the VNI. Since the VXLAN header occupies 64 bits, it can be carried entirely within the destination address field. In addition to the VNI, the VXLAN header further includes several directive information used for VXLAN packet forwarding. Because the complete VXLAN header is carried in the destination address field, packet forwarding reliability is improved.
[0012] In possible implementations, bits 65 through 128 in the destination address field carry the VXLAN header.
[0013] In possible implementations, the destination address in the destination address field indicates a second network device to forward the packet based on the VNI information carried within the destination address field.
[0014] In possible implementations, the IPv6 header is an IPv6 extension header, which includes either a destination option header (DOH) or a segment routing header (SRH). Optionally, for a first network device to receive a second packet, encapsulating the IPv6 header in the first packet includes the first network device encapsulating both the IPv6 extension header and the IPv6 base header in the first packet. The IPv6 extension header carries the VNI, and the IPv6 base header is used for packet forwarding.
[0015] In possible implementations, the DOH contains a type-length-value (TLV), and the type field of the TLV indicates that the DOH carries a VNI.
[0016] In possible implementations, the DOH is used to carry the VNI, or the DOH is used to carry the VXLAN header, and the VXLAN header carries the VNI.
[0017] In possible implementations, the VNI is carried in the segment identifier (SID) list of the SRH. Optionally, the VNI is carried in the SID corresponding to a second network device in the SID list. In IPv6 forwarding plane-based segment routing (SRv6) application scenarios, when it is necessary to explicitly specify part or all of the route, the SRH may be pushed into the packet to indicate an explicit route using the SID list in the SRH. The length of each SID in the SID list is specified as 128 bits. Information about the SID used for packet forwarding in the packet forwarding process is typically only a portion of the 128 bits, or the SID advertised by the network device may be a compressed SID occupying only a portion of the 128 bits, for example, only 64 bits. In this way, the VNI is contained in the unoccupied bits of the SID of the second network device in the SID list, and the segment identifier list in the segment routing header of the IPv6 extension header is multiplexed. It is not necessary to encapsulate an additional header to carry the VNI. This improves packet encapsulation efficiency.
[0018] In possible implementations, the SID of the second network device includes a VXLAN header, and the VXLAN header carries the VNI.
[0019] In possible implementations, the SID of a second network device indicates that the second network device should forward packets based on the VNI carried in the SID. After receiving the second packet, the second network device determines, based on the SID carried in the second packet, that it is an end node on an explicit path and forwards the packet based on the VNI in the second packet. The SID of the second network device includes a locator field and a function field. Optionally, the SID of the second network device may further include an argument field.
[0020] In possible implementations, the VNI is carried in the function field of the SID of the second network device.
[0021] In possible implementations, the function field of the SID of the second network device contains a VXLAN header, which carries the VNI.
[0022] In possible implementations, the flow label in the IPv6 header carries the port number corresponding to the VXLAN packet.
[0023] In possible implementations, the port number is used to perform load balancing in the forwarding process of the second packet, or the port number is used to determine if the second packet contains a VXLAN packet.
[0024] In a possible implementation form, the source port number of the VXLAN packet is obtained by a calculation based on the payload of the VXLAN packet. For example, it is obtained by performing a hash on the payload of the VXLAN packet using a hash algorithm. The value of the port number obtained from the VXLAN packet may be carried within the flow label of the second packet. The method for calculating the value of the flow label of the second packet is the same as the method for calculating the UDP source port number used for load balancing within the VXLAN packet. That is, the port number carried in the flow label is also obtained by a calculation based on the payload of the first packet, ensuring that the load balancing effect implemented in the transfer process of the second packet is consistent with the load balancing effect implemented using the UDP source port number of the conventional VXLAN packet.
[0025] In a possible implementation form, the IPv6 header further includes VXLAN flags, and the VXLAN flags include a flag indicating that the second packet carries a valid VNI.
[0026] In a possible implementation form, the IPv6 header carries the VXLAN header, and the VXLAN header carries the VNI.
[0027] In a possible implementation form, the Next Header of the IPv6 header indicates that the next header adjacent to the IPv6 header of the second packet is an Ethernet header. The IPv6 header is used to carry the VNI, and there is no need to use a UDP header to carry the VNI within the packet. Therefore, the Next Header of the IPv6 header is set to the Ethernet (ETH) type. Thus, the packet processing efficiency in the transfer process of the second packet can be improved.
[0028] In one possible implementation, for the first network device to obtain a VNI based on a first packet includes the first network device obtaining the VNI based on an interface for receiving the first packet. The VNI corresponds to the interface for receiving the first packet.
[0029] According to a second aspect of the present application, a VXLAN packet transmission method is provided. The method includes: a second network device receiving a second packet from a first network device; the second packet being encapsulated with an IPv6 header that carries the VNI; the second network device obtaining the VNI from the IPv6 header; the second network device decapsulating the second packet to obtain the first packet, where the first packet does not include an IPv6 header; and the second network device forwarding the first packet based on the VNI.
[0030] In a possible implementation, the method by which the IPv6 header carries the VNI may be adding the VNI to the IPv6 header, or encapsulating a VXLAN header with the IPv6 header, where the VXLAN header includes the VNI.
[0031] In a possible implementation, the IPv6 header is an IPv6 basic header.
[0032] In a possible implementation, the VNI is carried in the destination address field of the IPv6 basic header.
[0033] In a possible implementation, the destination address field includes a VXLAN header that carries the VNI.
[0034] In a possible implementation, bits 65 to 128 in the destination address field carry the VNI.
[0035] In possible implementations, bits 65 through 128 in the destination address field carry the VXLAN header.
[0036] In possible implementations, the acquisition of a VNI from an IPv6 header by a second network device includes the following: The second network device determines that the destination address field contains the address of the second network device. In response to this determination, the second network device acquires a VNI from the destination address field.
[0037] In possible implementations, the method further includes the second network device advertising its address to the first network device in order to indicate to the first network device that the second network device should include the VNI of the VXLAN packet sent to the second network device in the address of the second network device.
[0038] In possible implementations, the IPv6 header is an IPv6 extension header, and the IPv6 extension header includes either a DOH or SRH.
[0039] In possible implementations, the DOH includes a TLV, and the TLV's type field indicates that the DOH carries a VNI.
[0040] In possible implementations, the DOH includes a VXLAN header, and the VXLAN header carries the VNI.
[0041] In possible implementations, the VNI is carried in the SRH's SID list.
[0042] In possible implementations, the VNI is carried within the SID corresponding to the second network device in the SRH's SID list.
[0043] In possible implementations, the SID of the second network device includes a VXLAN header, and the VXLAN header carries the VNI.
[0044] In possible implementations, the second network device obtaining the VNI from the IPv6 header includes the following: The second network device determines that the destination address field of the second packet contains the SID of the second network device. In response to this determination, the second network device obtains the VNI from the SID of the second network device.
[0045] In possible implementations, the SID type of the second network device is an Endpoint with decapsulation and VXLAN table lookup use (END.VN) type. The SID is an SRv6 SID. The locator portion of the SID contains the address of the VXLAN tunnel endpoint (VTEP) of the VXLAN packet, and the function portion of the SID contains the VXLAN Header. The forwarding operation corresponding to the SID's behavior includes, after receiving the packet, the destination VTEP node retrieving the corresponding VXLAN instance forwarding table based on the VNI in the packet's SID, decapsulating the packet, looking up the forwarding table based on the MAC address in the payload, and forwarding the packet. Decapsulating the packet includes removing the IPv6 basic header encapsulated in the second packet to obtain the first packet, or removing the IPv6 basic and IPv6 extension headers encapsulated in the second packet to obtain the first packet.
[0046] Optionally, the SID corresponding to the address of the second network device is of type END.VN.
[0047] Optionally, the SID corresponding to the address of the second network device is the SRv6 Locator of the second network device.
[0048] In a possible implementation, before the second network device receives the second packet from the first network device, the method further includes advertising the SID of the second network device to the first network device in order to indicate to the first network device that the second network device should include the VNI of the VXLAN packet sent to the second network device in the SID of the second network device.
[0049] In one possible embodiment, the method further includes a second network device establishing a forwarding entry, the forwarding entry including the SID of the second network device. The second network device decapsulates the second packet based on the forwarding entry to obtain the first packet and forwards the first packet based on the VNI.
[0050] In possible implementations, the flow label in the IPv6 header carries the port number corresponding to the VXLAN packet. Optionally, the port number is used to perform load balancing in the forwarding process of the second packet.
[0051] In possible implementations, the IPv6 header further includes VXLAN flags, which include a flag indicating that the second packet carries a valid VNI.
[0052] According to a third aspect of this application, a first network device is provided, configured to perform a method according to either the first aspect or a possible implementation of the first aspect. Specifically, the first network device includes a unit configured to perform a method according to either the first aspect or a possible design of the first aspect.
[0053] According to a fourth aspect of this application, a second network device is provided, configured to perform a method according to the second aspect or one of possible implementations of the second aspect. Specifically, the second network device includes a unit configured to perform a method according to the second aspect or one of possible designs of the second aspect.
[0054] A fifth aspect of this application provides a network system for VXLAN packet transmission. The network system includes a first network device and a second network device. The first network device is configured to perform a method according to either the first aspect or a possible design thereof. The second network device is configured to perform a method according to either the second aspect or a possible design thereof.
[0055] A network device is provided according to a sixth aspect of this application. The device includes a processor and memory. The memory is configured to store instructions or program code. The processor is configured to execute the instructions or program code in the memory, so that the network device performs a method according to either the first aspect or a possible design thereof, or a method according to either the second aspect or a possible design thereof.
[0056] A computer-readable storage medium is provided according to a seventh aspect of this application. The computer-readable storage medium stores instructions. When the instructions are executed on a processor, a computer or network device is able to perform a method according to one of the first aspects or a possible design thereof, or a method according to one of the second aspects or a possible design thereof.
[0057] According to an eighth aspect of this application, a computer program product is provided. The computer program product includes a program. When the program is executed on a processor, a computer or network device is made capable of performing a method according to one of the first aspects or a possible design thereof, or a method according to one of the second aspects or a possible design thereof.
[0058] According to a ninth aspect of this application, a chip is provided which includes an interface circuit and a processor. The interface circuit is connected to the processor. The processor is configured to enable the chip to perform a method according to any one of the first aspect or a possible design of the first aspect, or a method according to any one of the second aspect or a possible design of the second aspect.
[0059] To more clearly illustrate the embodiments of this application or the technical solutions in the existing art, the accompanying drawings used to illustrate the embodiments or the existing art are briefly introduced below. The accompanying drawings in the following description are merely illustrations of some of the embodiments recorded in this application, and it will be apparent to those skilled in the art that other drawings can be derived from these accompanying drawings without any creative effort. [Brief explanation of the drawing]
[0060] [Figure 1a] This is a schematic diagram of a VXLAN network application scenario according to one embodiment of this application. [Figure 1b] This is a schematic diagram of the structure of VXLAN packet encapsulation according to one embodiment of this application. [Figure 2] This is a flowchart of a VXLAN packet transmission method according to one embodiment of this application. [Figure 3a] This is a schematic diagram of the format of the IPv6 basic header according to one embodiment of this application. [Figure 3b] This is a schematic diagram of VNI encapsulation in the destination address field according to one embodiment of the present application. [Figure 3c] This is another schematic diagram of VNI encapsulation in the destination address field according to one embodiment of the present application. [Figure 3d] This is yet another schematic diagram of VNI encapsulation in a destination address field according to one embodiment of the present application. [Figure 4a] This is a schematic diagram of the DOH format according to one embodiment of this application. [Figure 4b] This is a schematic diagram of the encapsulation of VNI into DOH according to one embodiment of this application. [Figure 4c] Another schematic diagram of VNI encapsulation into DOH according to one embodiment of this application. [Figure 4d] This is yet another schematic diagram of the encapsulation of VNI into DOH according to one embodiment of this application. [Figure 5a] This is a schematic diagram of the TLV format according to one embodiment of this application. [Figure 5b] This is a schematic diagram illustrating the encapsulation of a VNI using a TLV according to one embodiment of this application. [Figure 5c] This is another schematic diagram illustrating the encapsulation of a VNI using a TLV according to one embodiment of this application. [Figure 6a] This is a schematic diagram of the SRH format according to one embodiment of this application. [Figure 6b] This is a schematic diagram of the SID format according to one embodiment of this application. [Figure 6c] This is a schematic diagram of VNI encapsulation in SRH according to one embodiment of this application. [Figure 6d] Another schematic diagram of VNI encapsulation into SRH according to one embodiment of this application. [Figure 6e] Another schematic diagram of VNI encapsulation into SRH according to one embodiment of this application. [Figure 6f] This is a schematic diagram of an application scenario according to one embodiment of this application. [Figure 7] This is a schematic diagram of the structure of a network device for VXLAN packet transmission according to one embodiment of this application. [Figure 8] This is a schematic diagram of the structure of another network device for VXLAN packet transmission according to one embodiment of the present application. [Figure 9] This is a schematic diagram of the structure of a network system for VXLAN packet transmission according to one embodiment of this application. [Figure 10] This is a schematic diagram of the structure of a network device according to one embodiment of this application. [Figure 11] This is a schematic diagram of the structure of another network device according to one embodiment of this application. [Modes for carrying out the invention]
[0061] To enable those skilled in the art to better understand the solutions provided in this application, the technical solutions in the embodiments of this application will be clearly described below with reference to the accompanying drawings. It will be clear that the embodiments described are only a part of, and not all, of, the embodiments of this application.
[0062] Before describing the specific technical solutions, the important terms and technologies in the embodiments of this application will be explained first.
[0063] VXLAN is a virtual tunneling technology. A logical tunnel is established over an Internet Protocol (IP) network between a source network device and a destination network device, and user-side packets are forwarded through the tunnel after specific encapsulation. For example, as shown in Figure 1a, a tunnel is established between two switches via VXLAN. Switch 1 encapsulates the original data frame sent by the source server, and as a result, the original data frame can be transmitted over the bearer network. After reaching Switch 2, which is connected to the destination server, the original data frame leaves the VXLAN tunnel, is decomposed, and forwarded to the destination server.
[0064] In a VXLAN network, the device that encapsulates and decapsulates the original data frame is the VTEP. The VTEP is the edge device of the VXLAN network and is the source and destination of the VXLAN tunnel. As shown in Figure 1a, Switch 1 and Switch 2 are VTEPs. The VTEP may be an independent network device or a virtual switch within a server. The original data frame sent by the source server is encapsulated as a packet in VXLAN format on the VTEP and transmitted to other VTEPs in the IP network. The original data frame is restored through decapsulation and finally forwarded to the destination server.
[0065] A VNI is similar to a Virtual Local Area Network (VLAN) identifier (ID) and is used to distinguish VXLAN segments. Virtual machines in different VXLAN segments cannot communicate directly with each other at Layer 2. A VNI can also be understood as a user identifier. A VNI represents a tenant, and tenants belonging to different VNIs cannot communicate directly at Layer 2. As shown in Figure 1a, when a VXLAN packet is encapsulated, a 24-bit space is allocated to the VNI, and as a result, the VNI can support the isolation of a large number of tenants. Specifically, VTEP encapsulates the VXLAN header, UDP header, external IP header, and external media access control (MAC) header in the original data frame sent by the source server.
[0066] Figure 1b is a schematic diagram of the structure including the VXLAN header and UDP header. The VXLAN header is 8 bytes long and contains a 24-bit VNI field for carrying the VNIs of different tenants within the VXLAN network. In addition, it contains a VXLAN flags field and two reserved fields. The VXLAN flags field occupies 8 bits and can have a value of 00001000. The two reserved fields occupy 24 bits and 8 bits, respectively.
[0067] The VXLAN header and the original data frame are used together as UDP data. The UDP header occupies 8 bytes. The UDP header includes the source port number, destination port number, UDP length, and UDP checksum. Each field occupies 16 bits. Optionally, the destination port number is fixed at 4789, and the source port number is determined by performing a hash algorithm on the original data frame.
[0068] The source IP address field in the external IP header carries the IP address of the VTEP connected to the source server, and the destination IP address field is the IP address of the VTEP connected to the destination server. The external IP header includes either an external IP version 4 (Internet Protocol version 4, IPv4) header or an external IPv6 header. The external IPv6 header is sometimes called the IPv6 base header. The source address field and destination address field in the IPv6 base header each occupy 128 bits.
[0069] The external MAC header is an encapsulated external Ethernet header. The source MAC address field carries the MAC address of the VTEP connected to the source server, and the destination MAC address field is the MAC address of the next-hop device on the path to the destination VTEP.
[0070] From the above explanation, it can be seen that when VXLAN packets are transmitted over an IPv6 network, if the VXLAN header is encapsulated using the UDP encapsulation method, an additional UDP header needs to be encapsulated as well. As a result, the amount of encapsulated data increases, the encapsulation efficiency decreases, and the packet transmission efficiency is affected.
[0071] Based on this, one embodiment of the present application provides a VXLAN packet transmission method. When a VXLAN packet is transmitted over an IPv6 network, the VNI corresponding to the packet is encapsulated in the IPv6 header, and the additional UDP header does not need to be encapsulated. This improves encapsulation efficiency.
[0072] To facilitate understanding of the technical solution provided in the embodiments of this application, the technical solution will be described below with reference to the accompanying drawings.
[0073] Figure 2 is a flowchart of a VXLAN packet transmission method according to one embodiment of the present application. As shown in Figure 2, the method includes the following steps.
[0074] S201: The first network device receives the first packet.
[0075] S202: The first network device obtains a VNI based on the first packet.
[0076] In this embodiment, the first network device may be switch 1 in Figure 1a. The first network device can receive a first packet sent by the host or source server in Figure 1a, or the first network device can generate a first packet. After the first packet is received, a VNI corresponding to the first packet is obtained based on the first packet. The VNI is a tenant identifier corresponding to the device that sent the first packet. Specifically, after receiving the first packet, the first network device can obtain the VNI corresponding to the first packet based on the interface for receiving the first packet. The VNI corresponds to the interface for receiving the first packet. For example, the VNI may be pre-configured on the interface of the first network device. After receiving the first packet via the interface, the first network device obtains the VNI based on the correspondence between the interface and the VNI. Alternatively, after receiving the first packet, the first network device may obtain the VNI corresponding to the first packet based on the address (source address) in the first packet. For example, the correspondence between the address and the VNI may be pre-configured on the first network device. After receiving the first packet, the first network device determines the VNI corresponding to the address based on the address and correspondence of the first packet.
[0077] S203: The first network device encapsulates the IPv6 header in the first packet in order to receive the second packet.
[0078] After determining the VNI corresponding to the first packet, the first network device encapsulates the IPv6 header in the first packet to obtain the second packet, and the VNI is carried in the IPv6 header. There are two ways in which the IPv6 header carries the VNI. In one method, the IPv6 header carries the VNI directly. In the other method, the IPv6 header includes a VXLAN header, and the VXLAN header includes the VNI. Optionally, the IPv6 header may be an IPv6 base header or an IPv6 extension header, and the VNI may be carried in either the IPv6 base header or the IPv6 extension header. Alternatively, the VXLAN header may be carried in either the IPv6 base header or the IPv6 extension header. The IPv6 base header contains basic packet forwarding information and is 40 bytes long.
[0079] (1) The IPv6 header is the IPv6 basic header.
[0080] If the IPv6 header is an IPv6 base header, the VNI may be carried in the destination address field of the IPv6 base header. Typically, the destination address field in an IPv6 base header is 128 bits long and is used to carry the address of the destination network device. Optionally, in the packet forwarding process, the prefix information of the destination network device does not usually need to occupy the entire destination address field. For example, the prefix information of the destination network device only needs to occupy 64 bits of the destination address field. Optionally, the address of the destination network device may be compressed to 64 bits and occupy bits 1 through 64. In this way, the VNI may occupy bits 65 through 128 in the destination address field. Alternatively, the VNI may occupy bits 80 through 128 in the destination address field. The position occupied by the VNI in the destination address field may be determined based on the actual application. This is not limited to this embodiment.
[0081] Figure 3a shows the packet format of the IPv6 basic header. The IPv6 basic header includes the Version field, Traffic Type field, Flow Label field, Payload Length field, Next Header field, Hop Limit field, Source Address (SA) field, and Destination Address (DA) field. The Source Address field and Destination Address field each occupy 128 bits. The Source Address field carries the source address, and the Destination Address field carries the destination address.
[0082] Optionally, the destination address field may include the destination address and VNI, as shown in Figure 3b.
[0083] In addition, the IPv6 header may further include VXLAN flags, which include a flag indicating that the second packet is carrying a valid VNI. The VXLAN flags are 8 bits long, with the fifth bit indicating that the packet is carrying a valid VNI. For example, if the fifth bit is 1, it indicates that the second packet is carrying a valid VNI. The VXLAN flags may also be carried in the destination address field. As shown in Figure 3c, the destination address field includes the destination address, the VXLAN flags, and the VNI.
[0084] The VNI, which is carried in the destination address field of the IPv6 base header, has an alternative method of transport. Specifically, the destination address field includes a VXLAN header, and the VXLAN header transports the VNI. That is, the VXLAN header is encapsulated in the destination address field of the IPv6 base header. The length of the VXLAN header is 64 bits. The destination address typically occupies bits 1 through 64 in the destination address field. In this case, the VXLAN header may occupy bits 65 through 128 in the destination address field, as shown in Figure 3d. The VXLAN header contains VXLAN flags. Specifically, as shown in Figure 3d, the destination address field in the IPv6 base header contains the destination address and the VXLAN header, and the VXLAN header contains the VNI and VXLAN flags.
[0085] The destination address field is typically used to carry the destination address of a packet. After receiving the packet, the destination network device indicated by the destination address reads the destination address from the destination address field and forwards the packet based on the destination address. In this embodiment, the destination address field includes not only the destination address but also the VNI. The VNI indicates the destination network device to which the packet will be forwarded. In order for the destination network device to forward the packet based on the VNI after receiving the packet, the device indicated by the destination address in the destination address field (a second network device) must be notified in advance to forward the second packet based on the VNI carried in the destination address field after receiving the packet.
[0086] (2) The IPv6 header is an IPv6 extension header.
[0087] Optionally, when encapsulating the IPv6 header in the first packet, the first network device may encapsulate both the IPv6 basic header and the IPv6 extensions header in the first packet.
[0088] If the IPv6 header is an IPv6 extension header, the IPv6 extension header may be used to carry the VNI. The IPv6 extension header may include a hop-by-hop option header (HBH), a destination options header (DOH), a routing header (RH), a segment routing header (SRH), etc. The format of the DOH is shown in Figure 4a. The DOH includes a Next Header field, an HDr Ext Len field, and an Options field.
[0089] In one embodiment, the VNI is carried in the DOH of the IPv6 extension header. When the DOH is used to carry the VNI, the option fields within the DOH may be used to carry the VNI directly, as shown in Figure 4b. Alternatively, as shown in Figure 4c, the option fields within the DOH may be used to carry the VXLAN header, which carries the VNI. If the IPv6 extension header further includes VXLAN flags, the option fields within the DOH may be used to carry the VNI and VXLAN flags directly, as shown in Figure 4d. Alternatively, the option fields within the DOH may be used to carry the VXLAN header, which carries the VNI and VXLAN flags. Specifically, the VXLAN header may be copied entirely into the option fields.
[0090] Optionally, the "Options" in the DOH may include a type-length-value (TLV), where the type field in the TLV indicates that the DOH is carrying a VNI. For example, when the type field T is 1, it may be specified that the DOH is carrying a VNI. After receiving a second packet, another network device can determine, based on T=1, that the second packet contains a VNI.
[0091] Optionally, the “Options” field within the DOH includes a TLV, and the TLV type indicates that the DOH carries a VXLAN header. The TLV may be an Extended VXLAN TLV, and a VXLAN TLV may also be called a VN Option TLV. As shown in Figure 5a, a VN(VXLAN)Option TLV includes an Option Type field, an Option Data Length field, and an Option Data field.
[0092] Optionally, the option type field and option data length field each occupy 8 bits, and the option data field occupies 64 bits.
[0093] The option type field identifies that the TLV is a VN option, specifically that the VN option carries a VNI, or that the VN option carries a VXLAN header.
[0094] Optionally, the VNI may be carried in an optional data field, as shown in Figure 5b.
[0095] Optionally, the VXLAN header may be carried in an optional data field, as shown in Figure 5c.
[0096] In some application scenarios, packets may be forwarded based on some or all of a pre-specified route. The segment routing (SR) protocol is a source routing protocol. The source node specifies the route for the application packet, translates that route into an ordered list of segments, and encapsulates that list in a header. When SR is deployed on the IPv6 data plane, it is called SRv6. During SRv6 application, forwarding route information is carried in an SRH, which includes an SID list. An SID list is a sequential arrangement of multiple segment lists, each representing multiple segments. Each segment is an instruction or set of instructions for packet processing. The SRH is encapsulated in the packet, and the list of segment identifiers within the SRH carries the process of how the SR network processes the packet. For example, in the application scenario shown in Figure 1a, the specified route includes switch 1 and switch 2. In this case, the SID corresponding to switch 1 and the SID corresponding to switch 2 are added to the SID list carried in the SRH.
[0097] In another embodiment, when the VNI is carried in an SRH, the VNI may be carried in the SID list of the SRH. The format of the SRH is shown in Figure 6a. The SRH includes a Next Header field, a Header Ext Len field, a Routing Type field, a Segment Left field, a Last Entry field, a Flags field, a Tag field, and a SID list. The SID list contains multiple elements arranged in the order of segment list[0] to segment list[n-1]. Each element is a SID, and each element has a length of 128 bits. In Figure 6a, segment list[0] corresponds to the first segment to be executed, and segment list[n-1] corresponds to the last segment to be executed.
[0098] The format of the SID is shown in Figure 6b. The SID may include a locator field and a function field. The SID may further include an argument field and / or a padding field after the function field. The contents of the locator field, also abbreviated as locator, are identifiers assigned to network nodes in the network topology, identifying the network nodes in the network topology. The contents of the function field, also abbreviated as function, indicate an instruction or set of instructions for packet processing, equivalent to the operation code of a computer instruction. When the instruction or set of instructions indicated by function is executed on a network node, the network node becomes able to perform the corresponding forwarding behavior. The contents of the argument field, also abbreviated as argument, indicate the parameters used to execute the instruction or set of instructions indicated by function.
[0099] The cases in which a VNI is transported in the SID list include the following:
[0100] Case 1: The VNI is carried in the SID corresponding to the second network device in the SID list. Optionally, the VNI is carried in the function field of the second network device's SID. When the second network device's SID is used to carry the VNI, the second network device's SID may also be used to carry the VNI directly. As shown in Figure 6c, the SID list includes SIDs 1 through n, and the SID of the second network device is SID n. SID n includes a locator and a VNI. The locator is the address or prefix of the second network device. For example, the VNI may occupy bits 64 through 128 in the second network device's SID, or bits 80 through 128 in the second network device's SID. If SID n further includes an argument, then SID n includes the locator, VNI, and argument. In this case, the VNI may occupy bits 64 through 87 in the second network device's SID.
[0101] Alternatively, the SID of the second network device is used to carry the VXLAN header, which includes the VNI. As shown in Figure 6d, the SID of the second network device is SID n, which includes the locator and the VXLAN header. Specifically, the VXLAN header can occupy bits 64 through 128 of the SID of the second network device. The SID of the second network device indicates that the second network device will forward packets based on the VNI carried in the SID.
[0102] Case 2: The VNI is carried by the SID of a network device other than the second network device. For example, if the SID of the second network device in the SID list is SID 3, the VNI is carried by SID 4 in the SID list. That is, the VNI is carried by a different SID. In this case, the other SID may be used to carry the VNI directly. See Figure 6c for the carrying method. Alternatively, the other SID may be used to carry the VXLAN header, which includes the VNI. See Figure 6d for the carrying method. The SID of the second network device indicates that the second network device reads the VNI from another SID and forwards the packet based on the VNI.
[0103] In this embodiment, since the second network device needs to forward packets based on the VNI, when advertising the SID of the second network device, the second network device may indicate that the type of the SID of the second network device is END.VN. The SID is an SRv6 SID. The locator portion of the SID includes the VTEP address or the SRv6 locator of the VTEP corresponding to the VXLAN packet, and the function portion of the SID includes the VNI or VXLAN header. The forwarding operation corresponding to the behavior associated with the SID includes, after the packet reaches the destination VTEP node, retrieving the corresponding VXLAN instance forwarding table based on the VNI in the SID, decapsulating the packet, looking up the forwarding table based on the MAC address in the payload, etc., and forwarding the packet. Optionally, the SID corresponding to the address of the second network device is an END.VN type SID. Optionally, the SID corresponding to the address of the second network device is the SRv6 locator of the second network device.
[0104] In specific implementation, after establishing an Interior Gateway Protocol (IGP) session or a Border Gateway Protocol (BGP) session with the first network device, the second network device can advertise its SID and the corresponding type to the SID to the first network device using IGP or BGP. The first network device stores the SID and the corresponding type of the second network device. When it is necessary to forward a VXLAN packet to the second network device, the first network device may encapsulate the VNI corresponding to the packet in the IPv6 header based on the type of the second network device's SID. When advertising the SID, the second network device establishes a forwarding table locally, which includes a matching entry and an action entry. The matching entry includes the SID of the second network device. The action entry indicates that the second network device will decapsulate the packet and forward it based on the VNI carried in the packet.
[0105] If the IPv6 header further includes VXLAN flags, the VXLAN flags may be carried in the SID of the second network device. For example, the VXLAN flags and VNI are encapsulated in SID n in Figure 6e. If SID n further includes parameters (arguments), SID n will include the locator, VXLAN flags, VNI, and argument.
[0106] From the above explanation, it is clear that either the IPv6 basic header or the IPv6 extensions header can be used to carry the VNI. In either case, there is no need to encapsulate an additional UDP header. This reduces the amount of data required for packet encapsulation and improves packet encapsulation efficiency.
[0107] In addition, the flow label in the IPv6 header may correspond to the destination port number of the VXLAN packet. The destination port number may be used not only to perform load balancing in the forwarding process of the second packet, but also to determine that the second packet contains a VXLAN packet. For example, if the port number carried in the flow label is 4789, the port number may be used to identify that the received packet contains a VXLAN packet. The port number may be a pre-configured fixed port number, or it may be a port number obtained by dynamic calculation based on the payload of the first packet. Optionally, the method for calculating the flow label of the second packet may be the same as the method for calculating the UDP source port used for load balancing within the VXLAN packet, and the port number value obtained from the VXLAN packet may be carried within the flow label of the second packet.
[0108] To implement in-situ flow information telemetry (IFIT) functionality, once the IPv6 header is encapsulated in the first packet, an IFIT instruction may be carried in the IPv6 header to implement hop-by-hop network in-situ flow information telemetry or network in-situ flow information telemetry for a specified node or destination node. Specifically, the IFIT instruction may be carried in the IPv6 extension header.
[0109] S204: The first network device sends the second packet to the second network device.
[0110] In this embodiment, after obtaining the second packet by encapsulating the IPv6 header in the first packet, the first network device sends the second packet to the second network device. The second network device may be an end node in the VXLAN network. For example, the second network device is switch 2 in Figure 1a. Optionally, the destination address field in the IPv6 header of the second packet may contain the address of the second network device or the SRv6 locator of the second network device. For example, in Figure 1a, the destination address field in the IPv6 header of the second packet may contain the address of switch 2 or the SRv6 locator of switch 2.
[0111] S205: The second network device receives the second packet and obtains the VNI from the IPv6 header of the second packet.
[0112] From the above explanation, it is clear that a VNI can be carried in either an IPv6 basic header or an IPv6 extension header. If a VNI is carried in a different IPv6 header, a second network device will obtain the VNI from the IPv6 header in a different way.
[0113] If the VNI is carried in the destination address field of the IPv6 basic header, after receiving a second packet sent by the first network device, the second network device determines whether the destination address field contains the address of the second network device. If the destination address field contains the address of the second network device, the VNI is obtained from the destination address field. If the VNI is carried directly in the destination address field, the second network device may obtain the VNI by parsing the destination address field. If the VNI is carried in the VXLAN header, and the VXLAN header is carried in the destination address field, the second network device must first parse the destination address field to obtain the VXLAN header and then read the VNI from the VXLAN header.
[0114] Note that since the address of the second network device needs to be encapsulated in the second packet, the second network device must advertise its address to the first network device before it receives the second packet sent by the first network device. The address of the second network device indicates to the second network device that it will forward the packet based on the VNI carried in the destination address field when it receives the second packet. When the second network device advertises its address to the first network device, it establishes a forwarding entry locally, which may include a matching item and an action item. The matching item includes the address of the second network device. The action item indicates that, after successful matching using the matching item, the VNI is obtained from the destination address field, the second packet is decapsulated, and the decapsulated packet is forwarded based on the VNI.
[0115] If the VNI is carried in the DOH of the IPv6 extension header, after receiving the second packet sent by the first network device, the second network device determines whether the destination address field contains the address of the second network device. If the destination address field contains the address of the second network device, it determines whether the type field of the TLV in the DOH indicates that the VNI is being carried. If the type field of the TLV indicates that the VNI is being carried, the VNI is obtained from the DOH. If the VNI is carried directly in the DOH, the second network device may obtain the VNI by parsing the DOH. If the VNI is carried in the VXLAN header and the VXLAN header is carried in the DOH, the second network device must first parse the DOH to obtain the VXLAN header and then read the VNI from the VXLAN header.
[0116] If the VNI is carried with the SID corresponding to the second network device in the SRH SID list in the IPv6 extension header, after receiving the second packet, the second network device determines whether the destination address field of the second packet contains the SID of the second network device. If the destination address field of the second packet contains the SID of the second network device, the second network device obtains the VNI from the SID of the second network device carried in the second packet.
[0117] If the VNI is carried on another corresponding SID (the SID of a network device other than the second network device) in the SID list of the SRH in the IPv6 extension header, the second network device, after receiving the second packet, determines whether the destination address field of the second packet contains the SID of the second network device. If the destination address field of the second packet contains the SID of the second network device, the second network device retrieves the VNI from the other SID carried in the second packet. For example, a field in the SRH or a new field may be used to indicate the second network device to retrieve the VNI from a specified SID, or it may be predefined that the VNI is carried on the next SID adjacent to the SID of the second network device. In this case, after receiving the second packet, the second network device reads the next SID from the SID list and retrieves the VNI from the next SID.
[0118] Since the SID of the second network device needs to be encapsulated in the second packet, it should be noted that the second network device must advertise its SID to the first network device before it receives the second packet sent by the first network device. In addition, the type of the second network device's SID may be further advertised. The type corresponding to the second network device's SID may be defined as END.VN, which indicates the second network device, and after receiving the corresponding packet, retrieves the VNI from the packet, decapsulates the packet, looks up the forwarding table based on the VNI, and forwards the decapsulated packet based on the forwarding table. The SID of the second network device may be the address of the second network device, or the corresponding address obtained by compressing the address of the second network device.
[0119] When advertising the SID of a second network device to a first network device, the second network device may further establish a forwarding entry locally. The forwarding entry includes a match item and an action item. The match item includes the SID of the second network device. The action item indicates the action to be performed if the match is successful. For example, the action item indicates that if the match is successful, the second packet should be decapsulated and the decapsulated packet should be forwarded based on the VNI.
[0120] S206: The second network device decapsulates the second packet in order to obtain the first packet.
[0121] In this embodiment, after obtaining a VNI, if the second network device determines, based on the information in the encapsulated IPv6 header, that the second network device is an end node, it decapsulates the second packet and removes the encapsulated IPv6 header in order to obtain the first packet. For example, if the second network device determines that the destination address field in the IPv6 header of the second packet contains the SID of the second network device, it decapsulates the second packet based on the action item in the forwarding entry in order to obtain the first packet. Decapsulating a packet includes removing the IPv6 basic header encapsulated in the second packet in order to obtain the first packet, or removing the IPv6 basic header and IPv6 extension header encapsulated in the second packet in order to obtain the first packet.
[0122] The execution order of S205 and S206 is not limited in this embodiment. S206 may be executed before S205, S205 may be executed before S206, or S205 and S206 may be executed simultaneously.
[0123] S207: The second network device forwards the first packet based on the VNI.
[0124] After receiving the first packet, the second network device determines the forwarding path based on the VNI and forwards the first packet based on the forwarding path. Specifically, the second network device retrieves the corresponding VXLAN instance forwarding table based on the VNI, searches the VXLAN instance forwarding table for a forwarding entry based on the destination address in the first packet, and forwards the first packet based on the forwarding entry. Note that when the first packet is a Layer 2 packet, the corresponding destination address is a MAC address, and the retrieved forwarding table is a MAC table. When the first packet is a Layer 3 packet, the corresponding destination address is an IP address, and the retrieved forwarding table is a routing table.
[0125] For easier understanding, please refer to the schematic diagram of the application scenario shown in Figure 6f. The application scenario uses an example that includes a source server, a destination server, VTEP 1, VTEP 2, and a transit device RR. The source server's IPv4 address is 10.1.1.1 and its MAC address is 1-1-1. The destination server's IPv4 address is 10.1.1.2 and its MAC address is 2-2-2. VTEP 1's IPv6 address is 10::1 and its MAC address is AA-1-1. VTEP 2's IP address is 10::2 and its MAC address is CC-1-1. The transit device RR's MAC address is BB-1-1. A VXLAN tunnel is established between VTEP 1 and VTEP 2. The VNI corresponding to VTEP 1 and VTEP 2 is 1001. In Figure 6f, the forwarding of a Layer 2 service packet is used as an example for explanation. Specifically, after receiving packet 1 sent by the source server, VTEP 1 determines the tenant identifier VNI 1001 corresponding to the source server based on information about the port connected between VTEP 1 and the source server, and encapsulates the VNI in the destination address field of the IPv6 basic header. The destination address field further includes the address 10::2 of the tunnel endpoint VTEP 2. The source address field includes the address 10::1 of the tunnel endpoint VTEP 1. In addition, the external MAC header is encapsulated. The MAC header includes the source MAC address AA-1-1 and the destination MAC address BB-1-1. VTEP 1 retrieves the encapsulated packet 2 and sends packet 2 to the transit device RR. After receiving packet 2, the transit device RR determines the MAC address of the next-hop network device based on its Layer 2 forwarding table, updates the source MAC and destination MAC in the external MAC header, updates the source MAC to BB-1-1 and the destination MAC to CC-1-1 to obtain packet 3, and forwards packet 3 to VTEP 2. Based on the destination address 10::2, VTEP 2 discovers that it is the tunnel endpoint node.In this case, VTEP 2 obtains VNI:1001 from the destination address field in the IPv6 basic header of packet 3, looks up the corresponding forwarding table based on the VNI, decapsulates the IPv6 basic header in packet 3 to obtain packet 4, and forwards packet 4 to the destination server based on the forwarding table.
[0126] Based on the embodiments of the method described above, one embodiment of the present application further provides a network device for VXLAN packet transmission. This will be described below with reference to the accompanying drawings.
[0127] Figure 7 is a schematic diagram of a possible structure of the network device in the method embodiment described above. The network device 700 may implement the functions of the first network device in the embodiment shown in Figure 2. Alternatively, the network device 700 may implement the functions of switch 1 in the embodiment shown in Figure 1a and VTEP 1 in the embodiment shown in Figure 6. Please refer to Figure 7. The network device 700 includes an acquisition unit 701, a processing unit 702, and a transmission unit 703. These units may perform the corresponding functions of the first network device in the method example described above. The acquisition unit 701 is configured to support the network device 700 when performing S201 in Figure 2. The processing unit 702 is configured to support the network device 700 when performing S202 and S203 in Figure 2. The transmission unit 703 is configured to support the network device 700 when performing S204 in Figure 2 and / or when performing another process performed by the first network device in the technology described herein. For example, the acquisition unit 701 is configured to perform the operation of acquiring a first packet by the first network device in an embodiment of the method described above. The processing unit 702 is configured to perform various processing operations performed by the first network device in an embodiment of the method described above. The transmission unit 703 is configured to perform the operation of transmitting a packet by the first network device in an embodiment of the method described above. For example, the processing unit 702 is configured to acquire a VNI based on the first packet and encapsulate the IPv6 header in the first packet in order to acquire a second packet. The transmission unit 703 is configured to transmit a second packet to the second network device. For specific execution processes, please refer to the detailed description of the corresponding steps in the embodiments shown in Figure 2 or Figure 6. Details will not be repeated here.
[0128] Optionally, processing unit 702 is specifically configured to obtain a VNI based on the interface for receiving the first packet. The VNI corresponds to the interface for receiving the first packet.
[0129] It should be noted that in this embodiment of the present application, the unit division is merely an example and represents a logical functional division. In actual implementation, other division methods may be used. The functional units in this embodiment of the present application may be integrated into a single processing unit, or each unit may exist physically independently, or two or more units may be integrated into a single unit. For example, in the above embodiment, the processing unit and the transmission unit may be the same unit or different units. The integrated unit may be implemented in hardware form or in the form of a software functional unit.
[0130] Figure 8 is a schematic diagram of a possible structure of the network device in the method embodiment described above. The network device 800 may implement the functions of the second network device in the embodiment shown in Figure 2. Alternatively, the network device 800 may implement the functions of switch 2 in the embodiment shown in Figure 1a and VTEP 2 in the embodiment shown in Figure 6. Please refer to Figure 8. The network device 800 includes a receiving unit 801, a processing unit 802, and a transmitting unit 803. These units may perform the corresponding functions of the second network device in the method example described above. The receiving unit 801 is configured to support the network device 800 when performing S205 in Figure 2. The processing unit 802 is configured to support the network device 800 when performing S205 and S206 in Figure 2. The transmitting unit 803 is configured to support the network device 800 when performing S207 in Figure 2 and / or when performing another process performed by the second network device in the technology described herein. For example, in an embodiment of the method described above, the receiving unit 801 is configured to perform the operation of receiving the second packet by the second network device. The processing unit 802 is configured to perform various processing operations performed by the second network device in an embodiment of the method described above. The transmitting unit 803 is configured to perform the operation of forwarding the first packet by the second network device in an embodiment of the method described above. For example, the processing unit 802 is configured to obtain the VNI from the IPv6 header of the second packet and decapsulate the second packet to obtain the first packet. The transmitting unit 803 is configured to forward the first packet. For specific execution processes, please refer to the detailed description of the corresponding steps in the embodiments shown in Figure 2 or Figure 6. Details will not be repeated here.
[0131] Optionally, the processing unit 802 is configured to determine if the destination address field contains the address of a second network device, and in response to this determination, to obtain the VNI from the destination address field.
[0132] Optionally, the processing unit 802 is configured to determine that the destination address field of the second packet contains the SID of the second network device, and in response to this determination, to obtain the VNI from the SID of the second network device.
[0133] Optionally, the transmitting unit 803 is further configured to advertise the SID of the second network device to the first network device before the receiving unit 801 receives the second packet from the first network device.
[0134] Optionally, the processing unit 802 is further configured to establish a forwarding entry, which includes a matching item and an action item, wherein the matching item includes the SID of a second network device, is configured to decapsulate a second packet based on the action item, and is configured to forward a first packet based on the VNI.
[0135] It should be noted that in this embodiment of the present application, the unit division is merely an example and represents a logical functional division. In actual implementation, other division methods may be used. The functional units in this embodiment of the present application may be integrated into a single processing unit, or each unit may exist physically independently, or two or more units may be integrated into a single unit. For example, in the above embodiment, the processing unit and the transmission unit may be the same unit or different units. The integrated unit may be implemented in hardware form or in the form of a software functional unit.
[0136] Please refer to Figure 9. One embodiment of the present application provides a network system 900 for VXLAN packet transmission. The system 900 is configured to implement the VXLAN packet transmission method in the embodiment of the method described above. The system 900 includes network devices 901 and 902. Network device 901 may implement the functions of the first network device in the embodiment shown in Figure 2 or the functions of network device 700 in Figure 7. Network device 902 may implement the functions of the second network device in the embodiment shown in Figure 2 or the functions of network device 800 in Figure 8. Network device 901 may further implement the functions of switch 1 in the embodiment shown in Figure 1a or the functions of VTEP 1 in the embodiment shown in Figure 6. Network device 902 may further implement the functions of switch 2 in the embodiment shown in Figure 1a or the functions of VTEP 2 in the embodiment shown in Figure 6. For specific execution processes, please refer to the detailed description of the corresponding steps in the embodiment shown in Figure 2 or Figure 6. Details will not be repeated here.
[0137] Figure 10 is a schematic diagram of the structure of a network device according to one embodiment of the present application. The network device may be, for example, the first network device or the second network device in the embodiment of the method described above. Alternatively, the network device 700 in Figure 7 and the network device 800 in Figure 8 may be implemented using the device shown in Figure 10.
[0138] Please refer to Figure 10. The network device 1000 includes a processor 1010, a communication interface 1020, and memory 1030. The network device 1000 may have one or more processors 1010. In Figure 10, one processor is used as an example. In this embodiment of the present application, the processor 1010, the communication interface 1020, and the memory 1030 may be connected by using a bus system or by other means. In Figure 10, for example, a bus system 1040 is used for connection.
[0139] The processor 1010 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. The processor 1010 may further include hardware chips. The hardware chips may be application-specific integrated circuits (ASICs), programmable logic devices (PLDs), or a combination thereof. The PLDs may be complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), generic array logic (GALs), or any combination thereof.
[0140] If the network device is the first network device, the processor 1010 may perform the relevant functions in the method embodiment described above, for example, receiving a first packet, obtaining a VNI corresponding to the first packet, and encapsulating an IPv6 header in the first packet in order to obtain a second packet.
[0141] The communication interface 1020 is configured to receive and transmit packets. Specifically, the communication interface 1020 may include a receiving interface and a transmitting interface. The receiving interface may be configured to receive packets, and the transmitting interface may be configured to transmit packets. There may be one or more communication interfaces 1020.
[0142] Memory 1030 may include volatile memory, such as random access memory (RAM). Memory 1030 may further include non-volatile memory, such as flash memory, a hard disk drive (HDD), or a solid-state drive (SSD). Memory 1030 may further include combinations of the aforementioned types of memory. Memory 1030 may store, for example, the user-related information described above.
[0143] Optionally, memory 1030 stores an operating system, a program, an executable module, or a data structure, a subset thereof, or an extension thereof. A program may include various operational instructions for implementing various operations. An operating system may include various system programs, which implement various basic services and are configured to handle hardware-based tasks. Processor 1010 may read a program from memory 1030 in order to carry out the method provided in the embodiments of this application.
[0144] The memory 1030 may be a storage device within the network device 1000, or it may be a storage device independent of the network device 1000.
[0145] The bus system 1040 may be a peripheral component interconnect (PCI) bus, an extended industry standard architecture (EISA) bus, or the like. The bus system 1040 may be classified into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used to represent buses in Figure 10, but this does not mean that there is only one bus or only one type of bus.
[0146] Figure 11 is a schematic diagram of the structure of another network device 1100 according to one embodiment of the present application. The network device 1100 may be configured as the first or second network device in the embodiments of the method described above. Alternatively, the network device 700 in Figure 7 and the network device 800 in Figure 8 may be implemented using the device shown in Figure 11.
[0147] The network device 1100 includes a main control board 1110 and an interface board 1130.
[0148] The main control board 1110 is also called the main processing unit (MPU) or route processor card. The main control board 1110 controls and manages the components within the network device 1100, including functions for routing calculation, device management, device maintenance, and protocol processing. The main control board 1110 includes a central processing unit 1111 and memory 1112.
[0149] The interface board 1130 is also called a line processing unit (LPU), line card, or service board. The interface board 1130 is configured to provide various service interfaces and forward data packets. Service interfaces include, but are not limited to, Ethernet interfaces and POS (Packet over SONET / SDH) interfaces. An example of an Ethernet interface is a flexible Ethernet client interface (FlexE clients). The interface board 1130 includes a central processing unit 1131, a network processor 1132, a forwarding entry memory 1134, and a physical interface card (PIC) 1133.
[0150] The central processing unit 1131 on the interface board 1130 is configured to control and manage the interface board 1130 and to communicate with the central processing unit 1111 on the main control board 1110.
[0151] The network processor 1132 is configured to perform packet forwarding processing. The network processor 1132 may take the form of a forwarding chip. Specifically, processing uplink packets includes processing the inbound interface of the packet and looking up information in the forwarding table. Processing downlink packets includes looking up information in the forwarding table, etc.
[0152] The physical interface card 1133 is configured to implement physical layer interconnection functionality. Original traffic enters the interface board 1130 via the physical interface card 1133, and processed packets are sent out via the physical interface card 1133. The physical interface card 1133 includes at least one physical interface, which is also called a physical port. The physical interface card 1133 is also referred to as a subcard and may be mounted on the interface board 1130, and is responsible for converting optical / electrical signals into packets, performing validity checks on the packets, and forwarding the packets to the network processor 1132 for processing. In some embodiments, the central processing unit 1131 of the interface board 1103 may also perform the functions of the network processor 1132, for example, by performing software forwarding based on a general-purpose CPU. Therefore, the network processor 1132 is not required in the physical interface card 1133.
[0153] Optionally, the network device 1100 includes multiple interface boards. For example, the network device 1100 further includes an interface board 1140. The interface board 1140 includes a central processing unit 1141, a network processor 1142, a transfer entry memory 1144, and a physical interface card 1143.
[0154] Optionally, the network device 1100 further includes a switching board 1120. The switching board 1120 is sometimes referred to as a switch fabric unit (SFU). If the network device has multiple interface boards 1130, the switching board 1120 is configured to complete data exchange between the interface boards. For example, interface board 1130 may communicate with interface board 1140 via the switching board 1120.
[0155] The main control board 1110 is coupled to the interface board 1130. For example, the main control board 1110, interface board 1130, interface board 1140, and switching board 1120 are connected to the system backplane via a system bus to enable communication. In possible embodiments, an inter-process communication (IPC) channel is established between the main control board 1110 and the interface board 1130, and the main control board 1110 communicates with the interface board 1130 via the IPC channel.
[0156] Logically, the network device 1100 includes a control plane and a forwarding plane. The control plane includes a main control board 1110 and a central processing unit 1131. The forwarding plane includes components that perform forwarding, such as a forwarding entry memory 1134, a physical interface card 1133, and a network processor 1132. The control plane performs functions such as router functions, generates a forwarding table, processes signaling packets and protocol packets, and configures and maintains the device status. The control plane distributes the generated forwarding table to the forwarding plane. In the forwarding plane, the network processor 1132 looks up the forwarding table distributed by the control plane in order to forward packets received by the physical interface card 1133. The forwarding table distributed by the control plane may be stored in the forwarding entry memory 1134. In some embodiments, the control plane and the forwarding plane may be completely separate and not on the same device.
[0157] Please understand that the processing unit 702 within the network device 700 may be equivalent to the central processing unit 1111 or the central processing unit 1131 within the network device 1100.
[0158] It should be understood that the operations performed on interface board 1140 correspond to the operations performed on interface board 1130 in this embodiment of the present application. For brevity, details are not described. It should be understood that the network device 1100 in this embodiment may correspond to the first or second network device in the embodiments of the method described above. The main control board 1110, interface board 1130, and / or interface board 1140 within the network device 1100 may perform functions and / or various steps performed by the first or second network device in the embodiments of the method described above. For brevity, details are not described again here.
[0159] It should be understood that there may be one or more main control boards. If there are multiple main control boards, the main control boards may include an active main control board and a standby main control board. There may be one or more interface boards, and network devices with stronger data processing capabilities will provide more interface boards. There may be one or more physical interface cards on the interface board. There may or may not be a switching board. If there are multiple switching boards, load balancing and redundant backups may be implemented together. In a centralized transport architecture, a network device may not require a switching board, and the interface board provides the functionality to process service data for the entire system. In a distributed transport architecture, a network device may have at least one switching board, and data exchange between multiple interface boards is performed using the switching board to provide high-capacity data exchange and processing capabilities. Therefore, the data access and processing capabilities of a network device in a distributed architecture are superior to those of a device in a centralized architecture. Optionally, a network device may instead include only one card; that is, there is no switching board. The functions of the interface board and main control board are integrated onto the card. In this case, the central processing unit on the interface board and the central processing unit on the main control board may be combined into a single central processing unit on the card to perform the combined functions of the two central processing units. Devices of this form (e.g., network devices such as low-end switches or routers) have weak data exchange and processing capabilities. The specific architecture used depends on the specific networking deployment scenario.
[0160] In some possible embodiments, the first or second network device may be implemented as a virtualization device. For example, the virtualization device may be a virtual machine (VM) on which a program having packet transmission capabilities is executed, and the virtual machine is deployed on a hardware device (e.g., a physical server). The virtual machine is a software-simulated complete computer system that has all the hardware system capabilities and operates in a completely isolated environment. The virtual machine may be configured as the first or second network device. For example, the first or second network device may be implemented based on a general-purpose physical server combined with network functions virtualization (NFV) technology. The first or second network device is a virtual host, a virtual router, or a virtual switch. Those skilled in the art will be able to read this application to virtualize the first or second network device having the aforementioned capabilities on a general-purpose physical server in combination with NFV technology. Details will not be repeated here.
[0161] It should be understood that the network devices in the aforementioned product form separately have any functions performed by the first or second network device in the embodiments of the method described above. Further details are not provided here.
[0162] One embodiment of this application further provides a chip including a processor and an interface circuit. The interface circuit is configured to receive instructions and transmit instructions to the processor. The processor may be configured to perform the VXLAN packet transmission method described above. The processor is coupled to memory. The memory is configured to store a program or instructions. Once the program or instructions are executed by the processor, the chip system is enabled to implement the method in any one of the described method embodiments.
[0163] Optionally, the chip system may contain one or more processors. The processors may be implemented using hardware or software. If implemented using hardware, the processors may be logic circuits, integrated circuits, etc. If implemented using software, the processors may be general-purpose processors, implemented by reading software code stored in memory.
[0164] Optionally, one or more memories may be present within the chip system. The memories may be integrated with the processor or located separately from the processor; this is not limited in this application. For example, the memory may be a non-temporary processor, such as read-only memory ROM. The memory and processor may be integrated on the same chip or located separately on different chips. The type of memory and the arrangement of the memory and processor are not limited in this embodiment of this application.
[0165] For example, a chip system may be a field programmable gate array (FPGA), application-specific integrated circuit (ASIC), system on chip (SoC), central processor unit (CPU), network processor (NP), digital signal processor (DSP), microcontroller unit (MCU), programmable logic device (PLD), or another integrated chip.
[0166] One embodiment of this application further provides a computer-readable storage medium containing instructions and computer programs. When the computer-readable storage medium is executed on a computer, the computer becomes capable of executing the VXLAN packet transmission method in the above-described embodiment.
[0167] One embodiment of this application further provides a computer program product including instructions or a computer program. When the computer program product is executed on a computer, the computer becomes capable of executing the VXLAN packet transmission method in the above-described embodiment.
[0168] In the specification, claims, and accompanying drawings of this application, terms such as “first,” “second,” “third,” “fourth,” etc. (if any) are intended to distinguish similar subjects and do not necessarily indicate a specific order or sequence. It should be understood that data used in such a manner are interchangeable in appropriate circumstances so that the embodiments described herein may be carried out in an order other than that illustrated or described herein. Furthermore, the terms “include,” “have,” and any other variations thereof are intended to encompass non-exclusive inclusion, for example, a process, method, system, product, or device including an enumeration of steps or units may include other steps or units that are not explicitly enumerated or specific to such process, method, product, or device, but are not necessarily limited to those steps or units.
[0169] For the purpose of providing a brief explanation of the detailed operating processes of the aforementioned systems, apparatus, and units, it will be readily apparent to those skilled in the art that corresponding processes are referenced in embodiments of the methods described above, and further details are not provided herein.
[0170] It should be understood that in some embodiments provided in this application, the disclosed systems, apparatus, and methods may be implemented in other ways. For example, the embodiments of the apparatus described above are merely examples. For example, unit partitioning is merely logical service partitioning and may be other partitioning in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not performed. In addition, mutual coupling, direct coupling, or communication connections shown or described may be implemented through some interfaces. Indirect coupling or communication connections between apparatus or units may be implemented in electronic, mechanical, or other forms.
[0171] Units described as separate parts may or may not be physically separate, and parts shown as units may or may not be physical units, may be located in one place, or may be distributed across multiple network units. Some or all of the units may be selected based on the actual requirements for achieving the objectives of the solution in the embodiment.
[0172] In addition, the service units in the embodiments of this application may be integrated into a single processing unit, or each unit may exist physically independently, or two or more units may be integrated into a single unit. The integrated unit may be implemented in the form of hardware, or in the form of a software service unit.
[0173] When the integrated unit is implemented in the form of a software service unit and sold or used as a separate product, the integrated unit may be stored on a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or in part, of which it contributes to existing technology, or all or part of the technical solution, may be implemented in the form of a software product. The computer software product is stored on a storage medium and includes several instructions for instructing a computer device (which may be a personal computer, server, or network device) to perform all or part of the steps of the method described in the embodiments of this application. The storage medium includes any medium capable of storing program code, such as a USB flash drive, removable hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0174] Those skilled in the art should recognize that in one or more of the examples described herein, the services described may be implemented by using hardware, software, firmware, or any combination thereof. When implemented using software, the services may be stored on a computer-readable medium or transmitted as one or more instructions or codes on a computer-readable medium. Computer-readable medium includes computer storage media and communication media. Communication media includes any medium that enables a computer program to be transmitted from one location to another. Storage media may be any available medium accessible to a general-purpose or dedicated computer.
[0175] The specific embodiments described above provide further details on the objectives, technical solutions, and beneficial effects of this application. It should be understood that the above description represents only specific embodiments of this application.
[0176] In conclusion, the embodiments described above are intended only to illustrate the technical solutions of this application and not to limit it. Although this application has been described in detail with reference to the embodiments described above, those skilled in the art should understand that modifications can be made to the technical solutions described in the embodiments above, or equivalent substitutions can be made to some of their technical features, without departing from the scope of the technical solutions of the embodiments of this application. [Explanation of symbols]
[0177] 700 network devices 701 units acquired 702 Processing Unit 703 Transmitter Unit 800 network devices 801 Receiving Unit 802 Processing Unit 803 Transmitter Unit 900 Network Systems 901 Network Device 902 Network Device 1000 network devices 1010 Processor 1020 Communication Interface 1030 memory 1040 Bus System 1100 Network Devices 1103 Interface Infrastructure 1110 Main control board 1111 Central Processing Unit 1112 memory 1120 Switching board 1130 Interface board 1131 Central Processing Unit 1132 Network Processors 1133 Physical Interface Card 1134 Transfer Entry Memory 1140 Interface board 1141 Central Processing Unit 1142 Network Processors 1143 Physical Interface Card 1144 Transfer Entry Memory
Claims
1. The first network device obtains the first packet, The first network device obtains a virtual extensible local area network identifier (VNI) based on the first packet, The steps include: encapsulating the first packet with an Internet Protocol version 6 (IPv6) header in order to obtain the second packet by the first network device, wherein the IPv6 header includes a Virtual Extensible Local Area Network (VXLAN) header, the VXLAN header carries the VNI, and the second packet is a VXLAN packet that does not have a User Datagram Protocol (UDP) header; The first network device transmits the second packet to the second network device. A packet transmission method for virtual extensible local area networks (VXLAN).
2. The method according to claim 1, wherein the IPv6 header is an IPv6 basic header.
3. The method according to claim 2, wherein the VNI is carried in the destination address field of the IPv6 basic header.
4. The method according to claim 3, wherein the 65th to 128th bits in the destination address field carry the VNI.
5. The method according to claim 3, wherein the destination address field comprises the VXLAN header.
6. The method according to claim 5, wherein the 65th to 128th bits in the destination address field carry the VXLAN header.
7. The method according to claim 3, wherein the destination address in the destination address field indicates the second network device for forwarding the packet based on the VNI carried in the destination address field.
8. The method according to claim 1, wherein the VXLAN header further comprises a VXLAN flag, the VXLAN flag comprising a flag indicating that the second packet carries a valid VNI.
9. The first network device obtains a VNI based on the first packet, A step of obtaining the VNI based on the interface for receiving the first packet by the first network device, wherein the VNI corresponds to the interface for receiving the first packet. The method according to claim 1, comprising:
10. A second network device receives a second packet from a first network device, wherein the second packet is encapsulated in an Internet Protocol version 6 (IPv6) header, the IPv6 header includes a Virtual Extensible Local Area Network (VXLAN) header, the VXLAN header carries a Virtual Extensible Local Area Network Identifier (VNI), and the second packet is a VXLAN packet that does not have a User Datagram Protocol (UDP) header. The second network device obtains the VNI from the IPv6 header, A step of decapsulating the second packet in order to obtain the first packet using the second network device, wherein the first packet does not have the IPv6 header. The second network device forwards the first packet based on the VNI, A virtual extensible local area network (VXLAN) packet transmission method comprising the following.
11. The method according to claim 10, wherein the IPv6 header is an IPv6 extension header, and the IPv6 extension header comprises a destination option header (DOH) or a segment routing header (SRH).
12. The method according to claim 11, wherein the DOH includes a type-length-value (TLV), and the type field of the TLV indicates that the DOH carries the VNI.
13. The method according to claim 12, wherein the DOH comprises the VXLAN header.
14. The method according to claim 13, wherein the VNI is transported in the segment identifier list (SID list) of the SRH.
15. The method according to claim 14, wherein the type of the SID of the second network device is a virtual network endpoint END.VN type.
16. A network device for virtual extensible local area network (VXLAN) packet transmission, applicable to a network comprising multiple network devices, wherein the multiple network devices comprise a first network device and a second network device, the first network device comprising at least one processor and one or more memories, The one or more of the aforementioned memories are configured to store instructions or program code. To obtain the first packet, Obtaining a Virtual Extensible Local Area Network Identifier (VNI) based on the first packet, and encapsulating the first packet in an Internet Protocol Version 6 (IPv6) header in order to obtain a second packet, wherein the IPv6 header includes a VXLAN header, the VXLAN header carries the VNI, and the second packet is a VXLAN packet without a User Datagram Protocol (UDP) header, and Sending the second packet to the second network device, To enable the network device, the at least one processor is configured to execute instructions or program code in one or more memories. A network device for virtual extensible local area network (VXLAN) packet transmission.
17. The network device according to claim 16, wherein the IPv6 header is an IPv6 basic header, and the VNI is carried in the destination address field of the IPv6 basic header.
18. The network device according to claim 17, wherein the destination address field comprises the VXLAN header.
19. A network device for virtual extensible local area network (VXLAN) packet transmission, applicable to a network comprising multiple network devices, wherein the multiple network devices comprise a first network device and a second network device, and the network device is the second network device, and the network device comprises at least one processor and one or more memories. The one or more of the aforementioned memories are configured to store instructions or program code. Receiving a second packet from the first network device, wherein the second packet is encapsulated in an Internet Protocol version 6 (IPv6) header, the IPv6 header includes a VXLAN header, the VXLAN header carries a Virtual Extensible Local Area Network Identifier (VNI), and the second packet is a VXLAN packet that does not have a User Datagram Protocol (UDP) header. The process involves obtaining the VNI from the IPv6 header and decapsulating the second packet in order to obtain the first packet, wherein the first packet does not have the IPv6 header. The first packet is forwarded based on the aforementioned VNI, To enable the network device, the at least one processor is configured to execute instructions or program code in one or more memories. A network device for virtual extensible local area network (VXLAN) packet transmission.
20. The network device according to claim 19, wherein the IPv6 header is an IPv6 extension header, and the IPv6 extension header comprises a destination option header (DOH) or a segment routing header (SRH).