CN108282391B - VXLAN message fragmentation method and device - Google Patents

VXLAN message fragmentation method and device Download PDF

Info

Publication number
CN108282391B
CN108282391B CN201810025675.XA CN201810025675A CN108282391B CN 108282391 B CN108282391 B CN 108282391B CN 201810025675 A CN201810025675 A CN 201810025675A CN 108282391 B CN108282391 B CN 108282391B
Authority
CN
China
Prior art keywords
mss
message
vxlan
negotiation
vtep
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810025675.XA
Other languages
Chinese (zh)
Other versions
CN108282391A (en
Inventor
张帝民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Technologies Co Ltd
Original Assignee
New H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by New H3C Technologies Co Ltd filed Critical New H3C Technologies Co Ltd
Priority to CN201810025675.XA priority Critical patent/CN108282391B/en
Publication of CN108282391A publication Critical patent/CN108282391A/en
Application granted granted Critical
Publication of CN108282391B publication Critical patent/CN108282391B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/36Flow control; Congestion control by determining packet size, e.g. maximum transfer unit [MTU]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers

Abstract

The application provides a VXLAN message fragmentation method and a device, and the method comprises the following steps: the local terminal VTEP judges whether the length of the message after the message is added with VXLAN encapsulation exceeds the MTU of the VXLAN tunnel aiming at the message which needs to be forwarded through the VXLAN tunnel; and if the number of the packets exceeds the preset value, the packets are fragmented, and then the same VXLAN package is added to each packet obtained by fragmentation. By the method, each fragment message can have the same VXLAN head, so that each fragment message added with VXLAN encapsulation can reach the opposite terminal VTEP through P equipment after being sent from the local terminal VTEP, the opposite terminal VTEP continues to forward the fragment message to the target VM after carrying out VXLAN decapsulation on each fragment message, and finally the target VM recombines each decapsulated fragment message to obtain an original super-large message, so that normal forwarding of the super-large message in VXLAN networking is realized.

Description

VXLAN message fragmentation method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for fragmenting a vxlan packet.
Background
The fragmentation message is the maximum length of each data frame that can be limited to pass through at the physical layer. When an IP (Internet Protocol) layer receives an IP packet to be sent, it first queries the value of MTU (Maximum Transmission Unit) of an interface, compares the MTU with the length of a data packet, and if the packet length exceeds the MTU, it needs to fragment the IP packet. When a VXLAN (Virtual eXtensible local area network) message is forwarded through an IP, fragmentation due to an oversized message may occur.
Disclosure of Invention
In view of this, the present application provides a VXLAN packet fragmentation method and apparatus, so as to solve the problem that forwarding of a huge packet in VXLAN networking may be discarded.
Specifically, the method is realized through the following technical scheme:
in a first aspect of the present application, a VXLAN packet fragmentation method is provided, which is applied to a local VTEP, and the method includes:
judging whether the length of the message after adding VXLAN encapsulation exceeds the MTU of the VXLAN tunnel aiming at the message needing to be forwarded through the VXLAN tunnel;
and if the number of the packets exceeds the preset value, the packets are fragmented, and then the same VXLAN package is added to each packet obtained by fragmentation.
In a second aspect of the present application, a VXLAN packet fragmentation device is provided, which is applied to a local VTEP, and the device includes:
the judging unit is used for judging whether the length of the message after the VXLAN encapsulation is added to the message exceeds the MTU of the VXLAN tunnel or not aiming at the message which needs to be forwarded through the VXLAN tunnel;
and the processing unit is used for firstly fragmenting the message and then adding the same VXLAN package to each message obtained by fragmentation if the message length after the VXLAN package is added to the message exceeds the MTU of the VXLAN tunnel.
According to the technical scheme, by adjusting the sequence of VXLAN encapsulation and message fragmentation, the method performs VXLAN encapsulation on the oversized message after message fragmentation, so that each fragmented message can have the same VXLAN header, after each fragmented message added with VXLAN encapsulation is sent from the local terminal VTEP, the fragmented message can reach the opposite terminal VTEP through P equipment, the opposite terminal VTEP continues to forward to the target VM after performing VXLAN decapsulation on each fragmented message, and finally, the target VM recombines each fragmented message after decapsulation to obtain the original oversized message, so that the normal forwarding of the oversized message in a VXLAN networking is realized.
Drawings
Fig. 1 is a schematic diagram of a process of fragmenting and forwarding a VXLAN message in the prior art;
fig. 2 is a flowchart of a VXLAN message fragmentation method according to an embodiment of the present application;
fig. 3 is a flowchart of MTU negotiation for a VXLAN tunnel according to an embodiment of the present application;
fig. 4 is a detailed flowchart of MTU negotiation of a VXLAN tunnel according to an embodiment of the present application;
fig. 5 is a schematic diagram of a fragmentation and forwarding process of a VXLAN message provided in the embodiment of the present application;
FIG. 6 is a block diagram of an apparatus according to an embodiment of the present disclosure;
fig. 7 is a hardware configuration diagram of the apparatus shown in fig. 6 according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
Hereinafter, a part of the concept in the present application will be explained first.
MTU: since the ethernet largest DATA frame is 1518 bytes, a 14-byte ethernet header and a 4-byte tail CRC (Cyclic Redundancy Check) Check portion are planed off, and the place for carrying the upper layer protocol, i.e., the DATA field, is left, and the maximum DATA frame is only 1500 bytes. This value we call it MTU.
MSS (Maximum Segment Size): the MSS is the maximum data segment that a TCP (Transmission Control Protocol) packet can transmit at a time, and in order to achieve the best Transmission performance, the TCP Protocol usually negotiates MSS values of both parties when establishing a connection. The communicating parties determine the smaller value of the MSS values provided by the communicating parties as the MSS value of the connection. In general, when the TCP protocol is implemented, the MSS value is often calculated by using the MTU value, so long as the 20-byte IP header and the 20-byte TCP header are subtracted from the MTU value. For example, the MTU is 1500 bytes, the MSS is 1460 bytes.
The technical scheme of the application is described in the following with the accompanying drawings and various embodiments of the specification.
Fig. 1 shows a networking scenario for VXLAN, including the following types of devices: VM (Virtual Machine), VTEP (VXLAN Tunnel End Point), and P device (core device). The following takes the example that VM1 sends a message to VM2 in fig. 1 as an example, to explain the process of fragmenting and forwarding a VXLAN message:
1) the VM1 sends a message targeting VM 2;
2) at the starting point of the VXLAN tunnel, the VTEP1 receives the message, and determines the VXLAN tunnel outlet interface of the message according to the VLAN (Virtual Local Area Network) information and the AC (access Circuit) port of the message;
3) VTEP1 is a packet encapsulating VXLAN header, UDP (User Datagram Protocol) header, and IP header;
4) if the size of the encapsulated message exceeds the MTU of the output interface, the VTEP1 needs to fragment the message, only one message in the obtained multiple fragmented messages has a VXLAN header, a UDP header and an Ethernet (Ethernet) header, and the rest messages do not exist; assuming that 2 fragmented packets are obtained, the format of the packet can be as shown in fig. 1, wherein one packet includes an IP header, a UDP header, a VXLAN header, an Ethernet header and Data1, and the other packet includes only an IP header and Data2, Data1 plus Data2 is equal to the original Data of the packet before fragmentation;
5) the fragment message is sent from VTEP1 and reaches VTEP2 through P equipment; the P device does not participate in VXLAN processing, and only needs to forward the fragment message in three layers according to the destination IP address of the fragment message;
6) at the end point of the VXLAN tunnel, the VTEP2 decapsulates the VXLAN for the fragment packet with the VXLAN header therein and then forwards the packet to the VM2, and removes the Ethernet header and the IP header of the outer layer of the packet for the remaining fragment packet without the VXLAN header, and at this time, the packet only has DATA field, for example, only DATA2 is finally left for the fragment packet without the VXLAN header in fig. 1, and the VTEP2 discards the packet;
7) after the fragment message is sent to the final target VM2, since the fragment message is incomplete, the VM2 may discard the fragment message or return an exception.
It can be seen from the above process that forwarding of a huge message in VXLAN networking may be discarded, which may result in that some services may not operate normally, for example, a ping (packet Internet groper) external network address may be passed but a webpage may not be opened, which may be caused by discarding a huge HTTP (hypertext Transfer Protocol) message.
In view of the above problems, one solution is: and the phenomenon that VXLAN messages are fragmented due to overlarge is avoided by changing the MTU of the output interface of the small VM. However, the scheme needs to manually modify the output interface MTU of the VM, which increases the difficulty and cost of using the VXLAN network; if the MTU of the output interface of the VM is set to be too small, the message forwarding efficiency is influenced; if the output interface MTU of the VM is set to be too large, the VXLAN message cannot be prevented from being fragmented.
The application provides a VXLAN message fragmentation scheme, which solves the current dilemma by adjusting the sequence of VXLAN encapsulation and message fragmentation.
Referring to fig. 2, fig. 2 is a flow chart of a method provided by the present application. As shown in fig. 2, the process may include the following steps:
step 201: the local terminal VTEP judges whether the length of the message after the message is added with VXLAN encapsulation exceeds the MTU of the VXLAN tunnel aiming at the message which needs to be forwarded through the VXLAN tunnel.
The initial message received by the local VTEP from the VM comprises an Ethernet header and a DATA domain; adding a message encapsulated by VXLAN, wherein a VXLAN head, a UDP head and an IP head are encapsulated outside the Ethernet head; therefore, it is determined whether the packet length after the VXLAN encapsulation is added to the packet exceeds the MTU of the VXLAN tunnel, specifically, whether the packet length after the original packet length (including the Ethernet header and DATA field of 14 bytes) of the packet plus the VXLAN header of 8 bytes, UDP header of 8 bytes, and IP header of 20 bytes is greater than the MTU of the VXLAN tunnel.
If the length of the message after the message is added with VXLAN encapsulation does not exceed the MTU of the VXLAN tunnel, the local-end VTEP can forward the message normally after adding VXLAN encapsulation, and message fragmentation is not needed. On the contrary, if the length of the message after the VXLAN encapsulation is added to the message exceeds the MTU of the VXLAN tunnel, the local VTEP needs to execute the following steps before forwarding the message:
step 202: if the number of the packets exceeds the preset value, the local terminal VTEP fragments the packets, and then adds the same VXLAN package to each packet obtained by fragmentation.
The length of the DATA field of each message obtained by fragmentation is not greater than the number of bytes after the 14-byte Ethernet header, the 8-byte VXLAN header, the 8-byte UDP header and the 20-byte IP header are subtracted from the MTU of the VXLAN tunnel. For example, if the MTU of the VXLAN tunnel is 1440 bytes, the length of the DATA field of each packet obtained by fragmentation is not greater than 1390 bytes. Therefore, the message length of the fragmentation message after adding VXLAN encapsulation is ensured to be less than or equal to MTU of the VXLAN tunnel.
Each fragmented message after adding VXLAN encapsulation has the same message header and different DATA fields, and the DATA fields of each fragmented message can constitute the original DATA field of the message before fragmentation. After each fragment message added with VXLAN encapsulation is sent from a local terminal VTEP, the fragment message reaches an opposite terminal VTEP through P equipment, the opposite terminal VTEP carries out VXLAN decapsulation on each fragment message and then continues to forward the fragment message to a target VM, and the target VM recombines each decapsulated fragment message to obtain an original super large message, so that normal forwarding of the super large message in a VXLAN networking is realized.
The VXLAN message will pass through the devices in the IP core network, i.e., the P devices, during the forwarding process. The P device does not participate in VXLAN processing, and only needs to forward the packet three-layer according to the destination IP address of the encapsulated packet. In practical applications, however, the P device may fragment the VXLAN encapsulation message due to an excessively large frame length, which may cause the destination VTEP to discard these fragmented VXLAN messages. In order to avoid possible fragmentation of the end-to-end packet, the present application further proposes a negotiation procedure for a VXLAN tunnel MTU, where the procedure refers to fig. 3, and may include the following steps:
step 301: when the state of any VXLAN tunnel is changed from down to up, the local end VTEP sends an MSS negotiation message to the opposite end VTEP of the VXLAN tunnel, and the MSS negotiation message carries the MSS of the interface which is responsible for sending the MSS negotiation message by the local end VTEP.
In practical applications, when a VXLAN tunnel is initially established, or when a real physical path through which the established VXLAN tunnel passes changes, the state of the VXLAN tunnel may change from down to up.
Step 302: after the P device receives the MSS negotiation message, the MSS carried in the MSS negotiation message is compared with the MSS of the interface where the P device is responsible for receiving and sending the MSS negotiation message to obtain a minimum value, and the minimum value is carried in the MSS negotiation message and forwarded to the VTEP at the opposite end.
Step 303: after receiving the MSS negotiation message, the opposite end VTEP compares the MSS carried in the MSS negotiation message with the MSS of the interface which is responsible for receiving the MSS negotiation message by the opposite end VTEP to obtain a smaller value, and carries the smaller value in an MSS confirmation message to return to the local end VTEP.
Step 304: after receiving the MSS confirmation message, the P device directly forwards the MSS confirmation message to the local terminal VTEP.
Step 305: after receiving MSS confirmation message returned by the opposite end VTEP aiming at the MSS negotiation message, the local end VTEP calculates MTU of VXLAN tunnel according to MSS carried in the MSS confirmation message.
As can be seen from the above step 301 and 304, the MSS carried in the MSS confirmation message here is the MSS minimum value among the MSS in the local VTEP responsible for sending the interface of the MSS negotiation message, the MSS in the P device responsible for receiving and sending the interface of the MSS negotiation message, and the MSS in the opposite VTEP responsible for receiving the interface of the MSS negotiation message. The MSS of the interface is equal to the MTU of the same interface minus the IP header of 20 bytes and the TCP header of 20 bytes, and the VTEP and P equipment can calculate the MTU of the interface or the MSS of the interface according to the relation.
In an implementation manner, the MSS negotiation packet and the MSS acknowledgement packet may be implemented by a handshake signal used when a TCP/IP establishes a connection, for example, the MSS negotiation packet may be a SYN (synchronization) packet, and the MSS acknowledgement packet may be a SYN/ack (acknowledgement) packet.
As can be seen from the above description, the problem that the huge message is discarded in the VXLAN network can be well solved. In addition, the MTU of the VXLAN tunnel is negotiated, and the MTU is used for fragmentation during forwarding, so that the network bandwidth can be utilized to the maximum extent, and the forwarding efficiency of the message is improved.
In order to make it clear and obvious for those skilled in the art, the VXLAN packet fragmentation process provided by the present application is described below with reference to the VXLAN networking scenario shown in fig. 1.
First, the MTUs of the VXLAN tunnel may be negotiated.
Assume that the IP address of VTEP1 is 1.1.1.1, the IP address of VTEP2 is 2.2.2.2, the outgoing interface MTU of VXLAN Tunnel1 on VTEP1 is 1500 bytes, the incoming interface MTU and the outgoing interface MTU on P device are 1460 bytes and 1440 bytes, respectively, and the incoming interface MTU on VTEP2 is 1460 bytes in fig. 1; the MTU negotiation procedure of Tunnel1 is shown with reference to fig. 4 and includes the following steps:
1) when the Tunnel1 state changes from down to up on VTEP1, VTEP1 calculates an interface MSS from the outgoing interface MTU (1500 bytes) of the Tunnel, the outgoing interface MSS being equal to the outgoing interface MTU minus the 20-byte IP header and the 20-byte TCP header, i.e., 1460 bytes; then VTEP1 sends SYN message to Tunnel destination address 2.2.2.2, the output interface of SYN message is Tunnel1, MSS carried by SYN message is 1460 byte;
2) after the intermediate device P receives the SYN message, it calculates the incoming interface MSS as 1420 bytes according to the MTU (1460 bytes) of the incoming interface of the SYN message, and calculates the interface MSS as 1400 bytes according to the MTU (1420 bytes) of the outgoing interface of the SYN message, and compared with the MSS in the SYN message, it finds that the outgoing interface MSS of the P device is smaller, thereby modifying the MSS in the SYN message to the outgoing interface MSS of the P device (i.e., to 1400 bytes), and forwards the modified SYN message;
in other examples, if the calculated MSS of the P device or the MSS of the P device is larger or the same as the MSS in the SYN message, the SYN message is directly forwarded;
3) after receiving the SYN message from VTEP1, VTEP2 calculates the MSS of the incoming interface to 1420 bytes according to the MTU (1460 bytes) of the incoming interface of the SYN message, and finds that the calculated MSS of the incoming interface of VTEP2 is larger than the MSS in the SYN message compared with the MSS in the SYN message, so as to send the MSS in the SYN message to VTEP1 by being carried in the generated SYN/ACK message;
4) after receiving the SYN/ACK message, the intermediate device P device directly forwards the SYN/ACK message;
5) after receiving the SYN/ACK message, VTEP1 calculates the MTU to be 1440 bytes according to the MSS carried by the message, and records the MTU as the MTU of Tunnel 1.
Similarly, the MTU of the VXLAN tunnel on VTEP2 is also negotiated according to the above steps.
Based on the MTU of Tunnel1 obtained through the negotiation, in the same VXLAN networking scenario as that shown in fig. 1, when VM1 sends a packet to VM2, the process of fragmenting and forwarding the VXLAN packet is shown in fig. 5, and includes the following steps:
1) the VM1 sends a message targeting VM 2;
2) at the starting point of the VXLAN tunnel, the VTEP1 receives the message, and determines the VXLAN tunnel outlet interface of the message according to the VLAN (Virtual Local Area Network) information and the AC (access Circuit) port of the message;
3) assuming that the DATA field of the message is 1500 bytes, it is obvious that the length of the message after adding VXLAN encapsulation exceeds the MTU1440 bytes of Tunnel1, so VTEP1 needs to fragment the message;
the length of the DATA domain of each message after fragmentation is not more than 1390 (i.e. 1440-14-8-8-20) bytes; one fragmentation mode is that the above-mentioned message can be divided into two messages whose DATA fields are 1390 byte and 110 byte respectively, the length of the two messages after adding VXLAN encapsulation is 1440 byte and 160 byte respectively, these two messages have VXLAN head, UDP head and Ethernet head;
4) the VTEP1 is sent out from the Tunnel1 after VXLAN encapsulation is added to the fragmented message;
5) the fragment message is sent from VTEP1 and reaches VTEP2 through P equipment;
6) at the VXLAN tunnel termination point, the VTEP2 decapsulates the two fragment messages and then continuously forwards the two fragment messages to the VM 2;
7) the fragmented packets are reassembled at the final destination VM 2.
The methods provided herein are described above. The following describes the apparatus provided in the present application:
referring to fig. 6, fig. 6 is a diagram illustrating the structure of the apparatus according to the present invention. The device is applied to a local terminal VTEP in VXLAN networking. As shown in fig. 6, the apparatus includes:
the determining unit 601 is configured to determine, for a message that needs to be forwarded through a VXLAN tunnel, whether the length of the message after adding VXLAN encapsulation exceeds the MTU of the VXLAN tunnel.
A processing unit 602, configured to fragment the message first if the length of the message after adding VXLAN encapsulation exceeds the MTU of the VXLAN tunnel, and then add the same VXLAN encapsulation to each message obtained by the fragmentation.
In one embodiment, the length of the DATA field of each packet fragmented by the processing unit 602 is not greater than the number of bytes remaining after the MTU of the VXLAN tunnel minus the Ethernet header of 14 bytes, the VXLAN header of 8 bytes, the UDP header of 8 bytes, and the IP header of 20 bytes.
In one embodiment, the apparatus may further include a sending unit, a receiving unit and a tunnel MTU calculation unit; wherein:
a sending unit, configured to send an MSS negotiation message to an opposite-end VTEP of the VXLAN tunnel when the state of the VXLAN tunnel changes from down to up, where the MSS negotiation message carries an MSS of an interface where a local-end VTEP is responsible for sending the MSS negotiation message;
a receiving unit, configured to receive an MSS confirmation message returned by an opposite-end VTEP for the MSS negotiation message, where the MSS confirmation message carries an MSS, and the MSS is an MSS minimum value of an interface of a home-end VTEP responsible for sending the MSS negotiation message, an interface of a core device responsible for receiving and sending the MSS negotiation message, and an interface of an opposite-end VTEP responsible for receiving the MSS negotiation message;
and the tunnel MTU calculation unit is used for calculating the MTU of the VXLAN tunnel according to the MSS carried in the MSS confirmation message.
In one embodiment, the sending unit is configured to send an MSS negotiation packet to an opposite-end VTEP of the VXLAN tunnel, so that the core device compares the MSS carried in the MSS negotiation packet with an MSS of an interface of the core device, which is responsible for receiving and sending the MSS negotiation packet, to obtain a minimum value, and carries the minimum value in the MSS negotiation packet and forwards the MSS negotiation packet to the opposite-end VTEP; the opposite terminal VTEP compares the MSS carried in the MSS negotiation message with the MSS of an interface which is responsible for receiving the MSS negotiation message by the opposite terminal VTEP to obtain a smaller value, and carries the smaller value in an MSS confirmation message and returns the MSS confirmation message to the local terminal VTEP; after receiving MSS confirmation message, the core device directly forwards to local terminal VTEP.
In one embodiment, the MSS negotiation packet is a SYN packet, and the MSS acknowledgement packet is a SYN/ACK packet.
The implementation process of the functions and actions of each module in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
It should be noted that the division of the unit in the embodiment of the present invention is schematic, and is only a logic function division, and there may be another division manner in actual implementation. The functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The description of the apparatus shown in fig. 6 is thus completed.
Referring to fig. 7, the present application also provides a hardware architecture diagram of a VTEP apparatus, which includes: a communication interface 701, a processor 702, a memory 703, and a bus 704; the communication interface 701, the processor 702 and the memory 703 are connected to communicate with each other via a bus 704.
The communication interface 701 is used for sending and receiving messages. Processor 702 may be a Central Processing Unit (CPU), memory 703 may be a non-volatile memory (non-volatile memory), and VXLAN message fragmentation logic instructions are stored in memory 703, and processor 702 may execute VXLAN message fragmentation logic instructions stored in memory 703 to implement the functions of the local VTEP in the flow illustrated in fig. 2.
Up to this point, the description of the hardware configuration shown in fig. 7 is completed.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (6)

1. A method for fragmenting an extensible virtual local area network VXLAN message is applied to a local terminal VTEP, and the method comprises the following steps:
aiming at a message which needs to be forwarded through a VXLAN tunnel, judging whether the length of the message after the message is added with VXLAN encapsulation exceeds the maximum transmission unit MTU of the VXLAN tunnel;
if the number of the messages exceeds the preset number, the messages are fragmented, and then the same VXLAN encapsulation is added to each message obtained through fragmentation;
the MTU of the VXLAN tunnel is obtained through negotiation in the following steps:
when the state of the VXLAN tunnel is changed from down to up, sending an MSS negotiation message with the maximum segment size to an opposite end VTEP of the VXLAN tunnel, wherein the MSS negotiation message carries an MSS of an interface which is used by a local end VTEP to send the MSS negotiation message;
receiving an MSS confirmation message returned by an opposite-end VTEP aiming at the MSS negotiation message, wherein the MSS confirmation message carries an MSS, and the MSS is the MSS of an interface of the local-end VTEP which is responsible for sending the MSS negotiation message, the MSS of an interface of a core device which is responsible for receiving and sending the MSS negotiation message, and the MSS minimum value of an interface of the opposite-end VTEP which is responsible for receiving the MSS negotiation message;
calculating the MTU of the VXLAN tunnel according to the MSS carried in the MSS confirmation message;
the sending of the MSS negotiation packet to the VTEP at the opposite end of the VXLAN tunnel includes:
sending an MSS negotiation message to an opposite-end VTEP of the VXLAN tunnel, so that the core equipment compares the MSS carried in the MSS negotiation message with the MSS of an interface which is used for receiving and sending the MSS negotiation message by the core equipment to obtain a minimum value, and carries the minimum value in the MSS negotiation message and forwards the MSS negotiation message to the opposite-end VTEP; the opposite terminal VTEP compares the MSS carried in the MSS negotiation message with the MSS of an interface which is responsible for receiving the MSS negotiation message by the opposite terminal VTEP to obtain a smaller value, and carries the smaller value in an MSS confirmation message and returns the MSS confirmation message to the local terminal VTEP; after receiving MSS confirmation message, the core device directly forwards to local terminal VTEP.
2. The method of claim 1, wherein the length of the DATA field of each packet obtained by fragmentation is not greater than the number of bytes remaining after the MTU of the VXLAN tunnel minus the 14 byte Ethernet header, the 8 byte VXLAN header, the 8 byte UDP header, and the 20 byte IP header.
3. The method of claim 1, wherein the MSS negotiation message is a SYN message and the MSS acknowledgement message is a SYN/ACK message.
4. An extensible virtual local area network VXLAN message fragmentation device, which is applied to a local terminal VTEP, and comprises:
the judging unit is used for judging whether the length of the message after the VXLAN encapsulation is added to the message exceeds the maximum transmission unit MTU of the VXLAN tunnel or not aiming at the message which needs to be forwarded through the VXLAN tunnel;
the processing unit is used for firstly fragmenting the message and then adding the same VXLAN package to each message obtained by fragmentation if the message length after the VXLAN package is added to the message exceeds the MTU of the VXLAN tunnel;
a sending unit, configured to send an MSS negotiation packet with a maximum segment size to an opposite-end VTEP of the VXLAN tunnel when the state of the VXLAN tunnel changes from down to up, where the MSS negotiation packet carries an MSS of an interface where a local-end VTEP is responsible for sending the MSS negotiation packet;
a receiving unit, configured to receive an MSS confirmation message returned by an opposite-end VTEP for the MSS negotiation message, where the MSS confirmation message carries an MSS, and the MSS is an MSS minimum value of an interface of a home-end VTEP responsible for sending the MSS negotiation message, an interface of a core device responsible for receiving and sending the MSS negotiation message, and an interface of an opposite-end VTEP responsible for receiving the MSS negotiation message;
a tunnel MTU calculation unit, configured to calculate an MTU of the VXLAN tunnel according to the MSS carried in the MSS acknowledgement message;
the sending unit is configured to send an MSS negotiation packet to an opposite-end VTEP of the VXLAN tunnel, so that the core device compares the MSS carried in the MSS negotiation packet with the MSS of an interface of the core device, which is responsible for receiving and sending the MSS negotiation packet, to obtain a minimum value, and carries the minimum value in the MSS negotiation packet and forwards the MSS negotiation packet to the opposite-end VTEP; the opposite terminal VTEP compares the MSS carried in the MSS negotiation message with the MSS of an interface which is responsible for receiving the MSS negotiation message by the opposite terminal VTEP to obtain a smaller value, and carries the smaller value in an MSS confirmation message and returns the MSS confirmation message to the local terminal VTEP; after receiving MSS confirmation message, the core device directly forwards to local terminal VTEP.
5. The apparatus of claim 4, wherein the length of the DATA field of each packet fragmented by the processing unit is not greater than the remaining number of bytes after the MTU of the VXLAN tunnel minus the 14 byte Ethernet header, the 8 byte VXLAN header, the 8 byte UDP header, and the 20 byte IP header.
6. The apparatus of claim 4, wherein the MSS negotiation message is a SYN message and the MSS acknowledgement message is a SYN/ACK message.
CN201810025675.XA 2018-01-11 2018-01-11 VXLAN message fragmentation method and device Active CN108282391B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810025675.XA CN108282391B (en) 2018-01-11 2018-01-11 VXLAN message fragmentation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810025675.XA CN108282391B (en) 2018-01-11 2018-01-11 VXLAN message fragmentation method and device

Publications (2)

Publication Number Publication Date
CN108282391A CN108282391A (en) 2018-07-13
CN108282391B true CN108282391B (en) 2022-01-25

Family

ID=62803496

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810025675.XA Active CN108282391B (en) 2018-01-11 2018-01-11 VXLAN message fragmentation method and device

Country Status (1)

Country Link
CN (1) CN108282391B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111641565B (en) * 2019-03-01 2022-05-13 华为技术有限公司 Method, device and system for transmitting Ethernet message
CN110995680A (en) * 2019-11-22 2020-04-10 北京浪潮数据技术有限公司 Virtual machine message receiving method, system, device and computer readable storage medium
CN113098780B (en) * 2021-02-22 2023-04-28 网宿科技股份有限公司 Message processing method of virtual network, electronic equipment and storage medium
CN113271245B (en) * 2021-05-21 2023-04-07 平安科技(深圳)有限公司 Message processing method and device, network card and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1561049A (en) * 2004-03-10 2005-01-05 中兴通讯股份有限公司 Slicing transmitting method of tunnel packet
CN101924689A (en) * 2009-06-16 2010-12-22 中兴通讯股份有限公司 Negotiation method of maximum segmentation parameters and network forwarding equipment
CN105991387A (en) * 2015-01-29 2016-10-05 杭州华三通信技术有限公司 Message transformation method and device of virtual extensible local area network (VXLAN)
CN109495366A (en) * 2017-09-11 2019-03-19 中兴通讯股份有限公司 A kind of VXLAN message processing method, device and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101827031A (en) * 2010-04-22 2010-09-08 中兴通讯股份有限公司 Method and device for packet transmission in user datagram protocol UDP tunnel
US10212022B2 (en) * 2013-09-13 2019-02-19 Microsoft Technology Licensing, Llc Enhanced network virtualization using metadata in encapsulation header

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1561049A (en) * 2004-03-10 2005-01-05 中兴通讯股份有限公司 Slicing transmitting method of tunnel packet
CN101924689A (en) * 2009-06-16 2010-12-22 中兴通讯股份有限公司 Negotiation method of maximum segmentation parameters and network forwarding equipment
CN105991387A (en) * 2015-01-29 2016-10-05 杭州华三通信技术有限公司 Message transformation method and device of virtual extensible local area network (VXLAN)
CN109495366A (en) * 2017-09-11 2019-03-19 中兴通讯股份有限公司 A kind of VXLAN message processing method, device and storage medium

Also Published As

Publication number Publication date
CN108282391A (en) 2018-07-13

Similar Documents

Publication Publication Date Title
US11115339B2 (en) Network congestion control method, device, and system
CN108282391B (en) VXLAN message fragmentation method and device
US20230283662A1 (en) Optimizing Data Transmission between a First Endpoint and a Second Endpoint in a Computer Network
US20210036953A1 (en) Flow modification including shared context
US11477130B2 (en) Transmission control method and apparatus
US9923835B1 (en) Computing path maximum transmission unit size
EP2869509A1 (en) Method, apparatus, and system for processing data packet
US20160380902A1 (en) Network interface selection for network connections
WO2021088813A1 (en) Packet encapsulating method and apparatus, and packet decapsulating method and apparatus
WO2000072532A1 (en) System and method for network packet reduction
US7761508B2 (en) Access device-based fragmentation and interleaving support for tunneled communication sessions
CN114268518B (en) Method and system for realizing forwarding acceleration of sdwan data tunnel
CN113965518A (en) Message processing method and device
CN115514828A (en) Data transmission method and electronic equipment
US8583822B2 (en) Method and system for minimum frame size support for a communication protocol encapsulated over Ethernet
KR102087735B1 (en) Relay proxy server, method for relaying data transmission and data transmission system
TWI808035B (en) High-efficiency transmission ethernet device
CN113726635B (en) Message processing method and device and electronic equipment
WO2024041064A1 (en) Quic packet transmission method and related device
US20230412501A1 (en) Data processing method and apparatus, and chip
CN110505137B (en) Function expansion type wired network device
CN116418854A (en) Method, device, equipment and storage medium for adaptively modifying maximum segment size
CN115941821A (en) Message byte calculation method, device and network equipment
WO2022043737A1 (en) Methods and systems for transmitting session-based packets
JP5752644B2 (en) COMMUNICATION TERMINAL DEVICE, DATA SIZE DETERMINING METHOD, AND DATA SIZE DETERMINING PROGRAM

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant