WO2016062106A1 - Packet processing method, device and system - Google Patents

Packet processing method, device and system Download PDF

Info

Publication number
WO2016062106A1
WO2016062106A1 PCT/CN2015/081677 CN2015081677W WO2016062106A1 WO 2016062106 A1 WO2016062106 A1 WO 2016062106A1 CN 2015081677 W CN2015081677 W CN 2015081677W WO 2016062106 A1 WO2016062106 A1 WO 2016062106A1
Authority
WO
WIPO (PCT)
Prior art keywords
vxlan
packet
switch
message
path
Prior art date
Application number
PCT/CN2015/081677
Other languages
French (fr)
Chinese (zh)
Inventor
宋伟
张维
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2016062106A1 publication Critical patent/WO2016062106A1/en

Links

Images

Definitions

  • the present invention relates to the field of switching technologies, and in particular, to a message processing method, apparatus, and system.
  • VXLAN Virtual eXtensible Local Area Network
  • IP Internet Protocol
  • ECMP Equal Cost Multiple Path
  • a packet-by-packet hash In a packet-by-packet hash, the load of each path is balanced, but the packets in one stream are out of order, so the packet-based hash application is less.
  • the sender In the flow-by-stream hash, the sender is based on the quintuple in the packet. The hash value of the packet is calculated. The packets with the same hash value are sent through the same path to ensure that the packets in one stream are not out of order.
  • the prior art provides a flow cluster switching (Flowlet Switch) scheme, which includes: a transmitting end divides a data stream with a long duration into a plurality of sub-data streams, and each sub-data stream includes at least one packet, and is sent When the terminal detects that the path of the current sub-data stream is congested, the transmitting end sends the next sub-data stream of the sub-data stream through the equivalent path of the path after the current sub-data stream is sent.
  • the sending interval of two packets in a data stream is greater than a preset time interval
  • the above-mentioned stream cluster switching scheme may be used for load balancing.
  • the size of the preset time interval is determined empirically.
  • the prior art is to determine the size of the preset time interval according to the experience.
  • the preset time interval is usually set to be large, for example, the pre- Set time interval Set to 100 microseconds (us), and the size of the transmission interval between the actually required sub-data streams is usually related to the path state, that is, when the path is smooth, the actual required transmission interval is usually small. If the preset time interval is large, the system performance will be degraded. When the path is congested, the actual required transmission interval is usually large. In this case, if the preset time interval is small, the packet will be messed up. sequence. Therefore, the prior art adopts a fixed preset time interval scheme to reduce system performance, and in severe cases, the message is out of order.
  • the present invention provides a packet processing method, apparatus, and system, in order to solve the problem of system performance degradation or message out-of-order caused by transmitting a sub-data stream at a preset time interval.
  • the technical solution is as follows:
  • the first aspect provides a packet processing method, which is applied to a first switch in a virtual scalable local area network (VXLAN), where the first switch and the second switch have at least two equal-cost paths, and the method includes:
  • the second path of the at least two equal-cost paths is used.
  • the second switch sends the subsequent VXLAN message.
  • the first VXLAN packet includes: an original packet and identifier information, where the identifier information is used to identify the first VXLAN packet,
  • the second VXLAN packet includes: a type flag bit and the identifier information, where the value of the type flag bit is a first preset value, and the first preset value is used to indicate the second VXLAN message.
  • the message type is the response type.
  • the method further includes:
  • the determining whether the first path meets the path switching condition includes:
  • the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet in the sending table, determining that the first path meets a path switching condition.
  • the receiving, by the second switch, the second VXLAN report sent according to the first VXLAN message After the text the method further includes:
  • the entry including the identifier information of the first VXLAN packet is deleted from the sending table; or,
  • the identifier information of the first VXLAN packet recorded in the sending table indicates that when the number of sent packets of the data flow to which the first VXLAN packet belongs exceeds a preset value, the sending table is cleared.
  • the first VXLAN packet is obtained by encapsulating a VXLAN tunnel header for the original packet, and the identifier information of the first VXLAN packet is carried in a reserved field of a VXLAN tunnel header of the first VXLAN packet.
  • the reserved field of the VXLAN tunnel header of the second VXLAN packet includes the identifier information of the first VXLAN packet, and the type flag is carried in the flag field of the VXLAN tunnel header of the second VXLAN packet.
  • the second VXLAN message is generated by the second switch according to the first VXLAN message.
  • the second VXLAN packet is: when the second switch detects that there is a reverse packet in the sending queue of the second switch, adding the first VXLAN to the VXLAN tunnel header of the reverse packet.
  • the identifier information of the packet and the type flag are obtained, and the reverse packet is a packet whose outer layer destination Internet Protocol IP address in the sending queue of the second switch is an IP address of the first switch.
  • the first VXLAN message further includes: a type flag bit, where the type flag bit is located in the first In the flag field of the VXLAN tunnel header of a VXLAN message, the value of the type flag bit is a second preset value, and the second preset value is used to indicate that the message type is a request type.
  • a packet processing method is provided, which is applied to a second switch in a virtual scalable local area network (VXLAN), and at least two equal-cost paths exist between the second switch and the first switch, and the method includes:
  • the first VXLAN packet includes: an original packet and identifier information, where the identifier information is used to identify the first VXLAN packet,
  • the second VXLAN packet includes: a type flag bit and the identifier information, where the value of the type flag bit is a first preset value, and the first preset value is used to indicate the second VXLAN message.
  • the message type is the response type.
  • the first VXLAN packet is obtained by encapsulating a VXLAN tunnel header for the original packet, and the identifier information of the first VXLAN packet is carried in a reserved field of a VXLAN tunnel header of the first VXLAN packet.
  • the reserved field of the VXLAN tunnel header of the second VXLAN packet includes the identifier information of the first VXLAN packet, and the type flag is carried in the flag field of the VXLAN tunnel header of the second VXLAN packet.
  • the obtaining, by the first VXLAN packet, the second VXLAN packet includes:
  • the first VXLAN message further includes: a type flag, where the type flag is located in a flag field of the VXLAN tunnel header of the first VXLAN message, the value of the type flag is a second preset value, and the second preset value is used to indicate The message type is the request type, and the basis is Before the first VXLAN packet is obtained, the method further includes:
  • the step of acquiring the second VXLAN packet according to the first VXLAN packet is performed.
  • a third aspect provides a message processing apparatus, where the apparatus is a first switch in a virtual scalable local area network (VXLAN), and at least two equal-cost paths exist between the first switch and the second switch, the apparatus include:
  • a first sending module configured to send, by using the first path of the at least two equal-cost paths, the first VXLAN message to the second switch;
  • a receiving module configured to receive a second VXLAN message sent by the second switch according to the first VXLAN message, where the second VXLAN message is used to notify the first switch that the second switch receives the Describe the first VXLAN message;
  • a determining module configured to determine, according to the second VXLAN message, whether the first path meets a path switching condition
  • a second sending module configured to pass the at least two equal-cost paths when the first path meets the path switching condition and receives a subsequent VXLAN message that belongs to the same data flow as the first VXLAN message The second path sends the subsequent VXLAN message to the second switch.
  • the first VXLAN packet includes: an original packet and identifier information, where the identifier information is used to identify the first VXLAN packet
  • the second VXLAN packet includes: a type flag bit and the identifier information, where the value of the type flag bit is a first preset value, and the first preset value is used to indicate the second VXLAN message.
  • the message type is a response type
  • the device further includes:
  • a recording module configured to record, in the sending table, identifier information of the first VXLAN packet
  • the determining module includes:
  • a determining unit configured to determine, in the second VXLAN packet, the identifier information in the second VXLAN packet and the location in the sending table, when the packet type indicated by the value of the type flag bit in the second VXLAN packet is a response type Whether the identifier information of the first VXLAN packet is the same;
  • the determining unit is configured to determine that the first path satisfies the path switching condition when the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet in the sending table.
  • the device further includes:
  • a deleting module configured to: when the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet, delete the identifier that includes the first VXLAN packet from the sending table The entry of the information; or,
  • the clearing module is configured to: when the identifier information of the first VXLAN packet recorded in the sending table indicates that the number of sent packets of the data flow to which the first VXLAN packet belongs exceeds a preset value, The identification information of the first VXLAN message recorded in the sending table.
  • the first VXLAN packet is obtained by encapsulating a VXLAN tunnel header for the original packet, and the identifier information of the first VXLAN packet is carried in a reserved field of a VXLAN tunnel header of the first VXLAN packet.
  • the reserved field of the VXLAN tunnel header of the second VXLAN packet includes the identifier information of the first VXLAN packet, and the type flag is carried in the flag field of the VXLAN tunnel header of the second VXLAN packet.
  • the second VXLAN message is generated by the second switch according to the first VXLAN message.
  • the second VXLAN packet is: when the second switch detects that there is a reverse packet in the sending queue of the second switch, adding the first VXLAN to the VXLAN tunnel header of the reverse packet.
  • the identifier information of the packet and the type flag are obtained, and the reverse packet is a packet whose outer layer destination Internet Protocol IP address in the sending queue of the second switch is an IP address of the first switch.
  • the first VXLAN message further includes: a type flag bit, where the type flag bit is located in the first In the flag field of the VXLAN tunnel header of a VXLAN message, the value of the type flag bit is a second preset value, and the second preset value is used to indicate that the message type is a request type.
  • a fourth aspect provides a message processing apparatus, where the apparatus is a second switch in a virtual scalable local area network (VXLAN), and at least two equal-cost paths exist between the second switch and the first switch, the apparatus include:
  • a first receiving module configured to receive, by using the first path of the at least two equal-cost paths, the first VXLAN packet sent by the first switch;
  • An acquiring module configured to acquire a second VXLAN packet according to the first VXLAN packet, where the second VXLAN packet is used to notify the first switch that the second switch receives the first VXLAN packet;
  • a sending module configured to send the second VXLAN packet to the first switch, so that the first switch determines, according to the second VXLAN packet, whether the first path meets a path switching condition
  • a second receiving module configured to receive, by the second path of the at least two equal-cost paths, the first switch sent by the first switch and the first VXLAN packet when the first path meets the path switching condition Subsequent VXLAN messages for the data stream.
  • the first VXLAN packet includes: an original packet and identifier information, where the identifier information is used to identify the first VXLAN packet,
  • the second VXLAN packet includes: a type flag bit and the identifier information, where the value of the type flag bit is a first preset value, and the first preset value is used to indicate the second VXLAN message.
  • the message type is the response type.
  • the first VXLAN packet is obtained by encapsulating a VXLAN tunnel header for the original packet, and the identifier information of the first VXLAN packet is carried in a reserved field of a VXLAN tunnel header of the first VXLAN packet.
  • the reserved field of the VXLAN tunnel header of the second VXLAN packet includes the identifier information of the first VXLAN packet, and the type flag is carried in the flag field of the VXLAN tunnel header of the second VXLAN packet.
  • the acquiring module includes:
  • a generating unit configured to generate the second VXLAN packet according to the first VXLAN packet
  • the detecting and encapsulating unit is configured to detect whether there is a reverse packet in the sending queue of the second switch, where the reverse packet is an IP address of an outer layer destination network in the sending queue of the second switch is the first And adding, in the packet of the IP address of the switch, the identifier information of the first VXLAN packet and the type in the VXLAN tunnel header of the reverse packet when the reverse packet exists in the sending queue.
  • the flag bit gets the second VXLAN message.
  • the first VXLAN message further includes: a type flag, where the type flag is located in a flag field of the VXLAN tunnel header of the first VXLAN message, the value of the type flag is a second preset value, and the second preset value is used to indicate
  • the message type is a request type
  • the device further includes:
  • a judging module configured to determine that a packet type indicated by a value of a type flag bit in the first VXLAN packet is No as the request type
  • the triggering module is configured to: when the packet type indicated by the value of the type flag in the first VXLAN packet is a request type, trigger the acquiring module to acquire the second VXLAN packet according to the first VXLAN packet.
  • a fifth aspect provides a packet processing system, where the system includes at least a first switch and a second switch, and the first switch and the second switch are connected by using an IP network,
  • the first switch includes the message processing apparatus according to the third aspect
  • the second switch includes the message processing apparatus according to the fourth aspect.
  • FIG. 1 is a schematic diagram of an implementation environment involved in various embodiments of the present invention.
  • FIG. 2 is a schematic flowchart of a packet processing method according to an embodiment of the present invention.
  • FIG. 3 is a schematic flowchart of a packet processing method according to another embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of a packet processing method according to still another embodiment of the present invention.
  • FIG. 5 is a block diagram of a message processing apparatus according to an embodiment of the present invention.
  • FIG. 6 is a block diagram of a message processing apparatus according to another embodiment of the present invention.
  • FIG. 7 is a block diagram of a message processing apparatus according to still another embodiment of the present invention.
  • FIG. 8 is a block diagram of a message processing apparatus according to still another embodiment of the present invention.
  • FIG. 9 is a block diagram of a message processing apparatus according to an embodiment of the present invention.
  • FIG. 10 is a block diagram of a message processing apparatus according to another embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of a message processing system according to an embodiment of the present invention.
  • FIG. 1 shows a schematic diagram of an implementation environment involved in various embodiments of the present invention.
  • the implementation environment provides a VXLAN network reference architecture 100 that can include at least two leaf switches and at least two spine switches.
  • the leaf switch is used to provide access services for terminal devices such as virtual machines (English: virtual machine, VM), personal computers (personal computers, PCs, servers), and the same VXLAN network.
  • the switch can communicate with each other through the IP network.
  • the leaf switches of different VXLAN networks can also communicate with each other.
  • the spine switch is used to forward packets between the leaf switches.
  • the at least two leaf switches include a leaf switch 120 and a leaf switch 140
  • the at least two spine switches include a spine switch 160 and a spine switch 180.
  • the embodiment of the present invention assumes that the leaf switch 120 is the first switch and the leaf switch 140 is the second switch.
  • FIG. 2 it is a schematic flowchart of a packet processing method according to an embodiment of the present invention.
  • the packet processing method in this embodiment is performed by the first switch shown in FIG. 1, and there are at least two equal-cost paths between the first switch and the second switch (for example, path 1: first switch- > backbone switch 160 -> second switch; path 2: first switch -> backbone switch 180 -> second switch), see Figure 2, the method flow specifically includes:
  • Step 201 Send a first VXLAN message to the second switch by using the first path of the at least two equal-cost paths.
  • Step 202 Receive a second VXLAN message sent by the second switch according to the first VXLAN message, where the second VXLAN message is used to notify the first switch that the second switch receives the first A VXLAN message.
  • Step 203 Determine, according to the second VXLAN packet, whether the first path meets a path switching condition.
  • Step 204 If the first path meets the path switching condition, when receiving the subsequent VXLAN message that belongs to the same data flow as the first VXLAN message, pass the second of the at least two equal-cost paths. The path sends the subsequent VXLAN message to the second switch.
  • the packet processing method of the embodiment of the present invention sends a first VXLAN message to the second switch through the first path in the at least two equal-cost paths, and receives the second switch according to the first VXLAN message. And determining, by the second VXLAN packet, whether the first path meets a path switching condition according to the second VXLAN packet, and if the first path meets the path switching condition, receiving the packet corresponding to the first VXLAN And sending, by the second path of the at least two equal-cost paths, the subsequent VXLAN message to the second switch, by using the at least two equal-cost paths
  • the second path sends the subsequent VXLAN message to the second switch, the data stream is offloaded, and the next sub-data stream can be sent after the previous sub-data stream is received by the second switch, so
  • the present invention can solve the problem that the system performance is reduced or the packet is out of order caused by sending the sub-data stream by using the preset time interval in the prior art, thereby improving the system performance and avoiding the disorder of the message. fruit.
  • the embodiment of the present invention distributes the load of the first path to the second path by sending a subsequent VXLAN message to the second switch by using the second path of the at least two equal-cost paths. Therefore, the present invention can also improve the balance of path load in a VXLAN network.
  • FIG. 3 is a schematic flowchart diagram of a packet processing method according to another embodiment of the present invention.
  • the packet processing method in this embodiment is performed by the second switch shown in FIG. 1.
  • the second switch and the first switch have at least two equal-cost paths.
  • the method includes:
  • Step 301 Receive, by using the first path of the at least two equal-cost paths, the first VXLAN packet sent by the first switch.
  • Step 302 Acquire a second VXLAN packet according to the first VXLAN packet, where the second VXLAN packet is used to notify the first switch that the second switch receives the first VXLAN packet.
  • Step 303 Send the second VXLAN packet to the first switch, so that the first switch determines, according to the second VXLAN packet, whether the first path meets a path switching condition.
  • step 304 when the first path meets the path switching condition, the second path that is sent by the first switch and the first VXLAN packet belongs to the same data stream is received by the second path of the at least two equal-cost paths. VXLAN message.
  • the packet processing method provided by the embodiment of the present invention receives the first VXLAN packet sent by the first switch by using the first path in the at least two equal-cost paths, and acquires and sends the first VXLAN packet according to the first VXLAN packet.
  • the switch sends a second VXLAN message, where the second VXLAN message is used to notify the first switch that the second switch receives the first VXLAN message, so that the first switch is configured according to the second VXLAN message.
  • the present invention can solve the problem that the system performance is reduced or the message is out of order due to the transmission of the sub-data stream by using the preset time interval in the prior art. The problem is to improve the performance of the system and avoid the disorder of the message.
  • the embodiment of the present invention distributes the load of the first path to the second path by sending a subsequent VXLAN message to the second switch by using the second path of the at least two equal-cost paths. Therefore, the present invention can also improve the balance of path load in a VXLAN network.
  • FIG. 4 is a schematic flowchart diagram of a packet processing method according to still another embodiment of the present invention.
  • the packet processing method is applied to the implementation environment shown in FIG. 1. There are at least two equal-cost paths between the first switch and the second switch. Referring to FIG. 4, the method includes:
  • Step 401 The first switch encapsulates the VXLAN tunnel header for the original packet to obtain the first VXLAN packet, where the first VXLAN packet includes: identifier information, where the identifier information is used to identify the first VXLAN packet.
  • the first VXLAN packet may further include: a type flag, where the value of the type flag is used to indicate a packet type of the packet where the VXLAN tunnel header is located.
  • the packet is Types include request type and response type.
  • the packet of the request type is the packet sent by the sender of the packet.
  • the packet of the response type is the packet that the sender of the packet needs to trigger before sending a certain condition.
  • the first VXLAN message is a request type message sent by the first switch
  • the second VXLAN message is that the second switch receives the first VXLAN message according to a trigger condition. The message of the response type sent.
  • the original packet is a packet received by the first switch from the first device that accesses the first switch, and is configured to access the second device of the second switch.
  • the VXLAN tunnel header can be as shown in Table 1 below.
  • the VXLAN tunnel header is in turn followed by a flag field, a reserved field 1, and a virtual scalable local area network identifier (English)
  • the VXLAN Network Identifier (VNI) field and the reserved field 2 are composed, wherein the field in which Flags is located in Table 1 is the flag field, and the field in which Reserved1 is located after the flag field is reserved field 1, the virtual The field in which the extended local area network identifier is located is the virtual scalable local area network identification field, and the field in which Reserved2 is located is the reserved field 2.
  • the length of the flag field is usually 8 bits (bits), and the type flag of the message is carried in the flag field.
  • the flag field the fifth in the flag field.
  • the value of the bit is I, and the value of I is set to 1, indicating that the message of the VXLAN tunnel header is valid.
  • the sending bit in the flag field (English: Send Flag, S: abbreviation and S) is used.
  • the response bit (English: Ack Flag, abbreviated as A) constitutes a type flag bit, the transmission bit is the first bit in the flag field, and the response bit is the second bit in the flag field.
  • the length of the reserved field 1 is usually 24 bits, and the identifier information of the packet is carried in the reserved field 1.
  • the identifier information is as shown in Table 2, and the identifier information includes: a flow identifier (English: Flow Identification, Flow ID for short) and a serial number (English: Sequence ID).
  • the flow identifier is used to indicate a data flow to which the packet of the VXLAN tunnel header belongs, and the sequence number is used to indicate a transmission sequence of a packet, and the length of the flow identifier and the length of the serial number are usually 12bit.
  • the virtual scalable local area network identifier is typically 24 bits in length and is used to identify a virtual scalable local area network.
  • the length of the reserved field 2 is usually 8 bits.
  • the flag field of 8 bits in the VXLAN tunnel header and the reserved field 1 of 24 bits are mainly applied.
  • the current original packet is the first packet in the data stream whose stream identifier is 000000000
  • the type flag of the VXLAN tunnel header encapsulated by the first switch for the original packet is 10
  • the flag field may be 10001000
  • the flow identifier may be 000000000000
  • the serial number may be 000000001, that is, in the VXLAN tunnel header shown in Table 1, the value of the 8-bit Flags is 10001000, and the value of the 24-bit Reserved is 000000000000000000000001.
  • the first switch After the first switch encapsulates the VXLAN tunnel header for the original packet, the first switch obtains the first VXLAN packet, and 10 is the value of the type flag of the first VXLAN packet, where 000000000000000000000001 is Identification information of the first VXLAN packet.
  • Step 402 The first switch sends the first VXLAN message to the second switch by using the first path of the at least two equal-cost paths.
  • the first switch After the first switch obtains the first VXLAN packet, the first switch sends the first path to the second switch by using a first path of at least two equal paths between the first switch and the second switch.
  • the first VXLAN message is described.
  • the first path is any one of the at least two equal-cost paths.
  • Step 403 The first switch records the identifier information of the first VXLAN packet in the sending table of the first switch.
  • Each entry of the sending table includes an identifier of the data stream and a sequence number of the VXLAN packet that is sent by the first switch and belongs to the data stream.
  • the first switch adds an entry in the sending table when the first VXLAN packet of the data stream is sent, where the entry includes the flow identifier of the data stream and the first Correspondence between serial numbers of VXLAN messages.
  • the recording the identifier information of the first VXLAN packet includes: recording a correspondence between a stream identifier of the data stream to which the first VLAN packet belongs and a sequence number of the first VXLAN packet. And, in the sending table, only one entry is set for each data flow, and when the first switch sends the subsequent VXLAN message of the data flow, only the entry is updated according to the subsequent VXLAN message.
  • the serial number in it can be.
  • the first switch adds an entry in the sending table of the first switch (Flow ID: 000000000000, Sequence ID: 000000000001).
  • Step 404 after the second switch receives the first VXLAN message sent by the first switch, the second switch determines a report indicating a value of a type flag bit in the first VXLAN message. Whether the text type is a request type.
  • the second switch determines whether the value of the type flag bit in the first VXLAN message is a second preset value, and the value of the type flag bit in the first VXLAN message is a second pre-predetermined value. When the value is set, the second switch determines that the type of the first VXLAN message is a request type.
  • the second switch may determine whether the type of the first VXLAN message is a request type according to whether the value of the type flag SA is 10.
  • the value of the type flag SA of the first VXLAN packet is a second preset value of 10, therefore, the The second switch determines that the type of the first VXLAN message is a request type.
  • Step 405 If the packet type indicated by the value of the type flag in the first VXLAN packet is the request type, the second switch acquires the second VXLAN packet according to the first VXLAN packet, The second VXLAN packet is used to notify the first switch that the second switch receives the first VXLAN packet.
  • the second VXLAN packet includes: a type flag bit and identifier information, where the value of the type flag bit is a first preset value, and the first preset value is used to indicate the second VXLAN message.
  • the message type is the response type.
  • the second VXLAN packet is used to notify the first switch that the second switch receives the first VXLAN packet, and therefore, the packet type of the second VXLAN packet is a response type, and
  • the identifier information of the second VXLAN packet is the identifier information of the first VXLAN packet, that is, the type flag of the second VXLAN packet is 01, and the identifier information is 00000000000000000001.
  • the method when the second switch acquires the second VXLAN packet according to the first VXLAN packet, the method includes two acquisition modes:
  • the first mode the second switch generates the second VXLAN packet according to the first VXLAN message.
  • the generated second VXLAN packet is specifically used to notify the first switch that the second switch receives the first VXLAN packet, and the second VXLAN packet includes a VXLAN tunnel header.
  • the VXLAN tunnel header includes a type flag of 01 and an identification information of 000000000000000000000001.
  • the second mode the second switch detects whether there is a reverse packet in the sending queue of the second switch, and the reverse packet is an outer IP address in the sending queue of the second switch.
  • the second switch adds the first VXLAN message to the VXLAN tunnel header of the reverse packet when the reverse packet is sent in the sending queue.
  • the identification information and the type flag bit obtain the second VXLAN message.
  • the second switch performs a lookup in the sending queue of the second switch according to the outer source IP address in the first VXLAN packet, and finds that the sending queue of the second switch exists.
  • the second switch performs VXLAN encapsulation on the packet, and sets the type flag SA in the VXLAN tunnel header. Set to 01, the reserved field 1 in the VXLAN tunnel header is set to 000000000000000000000001 to obtain the second VXLAN message.
  • the second switch may be in the multiple outer destination IP addresses. Address is first Selecting a packet in the packet of the IP address of the switch, and encapsulating the packet to obtain the second VXLAN packet.
  • the second switch is first according to the multiple destination IP addresses. The first packet to be sent in the packet of the IP address of the switch obtains the second VXLAN packet.
  • the first switch when the second switch detects that there is a reverse packet in the sending queue of the second switch, the first switch adds the first in the VXLAN tunnel header of the reverse packet.
  • the second VXLAN packet is obtained by the identifier information of the VXLAN packet and the type flag.
  • the second switch does not need to generate a new packet. Therefore, the second switch receives the notification from the first switch. While the first VXLAN packet is described, the occupation of the second switch system resource is reduced.
  • Step 406 The second switch sends the second VXLAN packet to the first switch.
  • the second switch sends a second VXLAN message whose flag field is 01001000 to the first switch, and the identifier information of the field 1 is 000000000000000000000001.
  • Step 407 After the first switch receives the second VXLAN message sent by the second switch, the first switch determines, according to the second VXLAN message, whether the first path meets a path switching condition.
  • the path switching condition may include: a time switching condition and a state switching condition.
  • the first switch may determine, according to whether the identifier information of the second VXLAN packet is the same as the identifier information of the first packet, whether the first path meets a time switching condition, and when the second switch When the identifier information of the VXLAN packet is the same as the identifier information of the first packet, the first path meets the time switch condition, and the time switch condition is that the first switch receives the second switch. Receiving the notification message of the first VXLAN message, that is, the second VXLAN message, the time interval between the first VXLAN message and the subsequent first VXLAN message is satisfied. Interval requirements. The determination of the time switching condition can effectively ensure the timing of the message in the data stream.
  • the first switch determines whether the value of the type flag bit in the second VXLAN packet is a first preset value, where the first preset value is used to indicate the report of the second VXLAN packet.
  • the type of the message is a response type.
  • the first switch determines that the type of the second VXLAN packet is a response type.
  • the first switch determines whether the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet in the sending table, and the identifier information of the second VXLAN packet is the first When the identifier information of the VXLAN packet is the same, the second switch has received the first VXLAN packet, and the first path meets the time switch condition.
  • the first preset value may be 01, and the first switch may be based on the type flag. Is the bit SA a 01? It is determined whether the type of the second VXLAN message is a response type.
  • the value of the type flag of the second VXLAN packet is the first preset value 01, so that the first switch determines that the flag field in the second VXLAN packet is 01001000.
  • the type of the second VXLAN packet is a response type, and the first switch determines whether the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet in the sending table,
  • the identifier information in the second VXLAN packet is 00000000000000000001, which is the same as the identifier information 000000000000000000000001 recorded by the first switch in step 403. Therefore, the first switch determines that the first path meets a time switch condition.
  • the first switch determines whether the first path meets the state switching condition, where the state switching condition is The first switch is determined according to the configuration policy. For example, the first switch may determine, according to the bandwidth utilization of the first path, whether the first path is congested. If the first path is congested, the first path is And satisfying the state switching condition, for example, the first switch may further determine whether to perform path switching according to whether the load of each path in the at least two equal-cost paths is equalized, if the at least two equal-cost paths are The load of each path is not balanced, and the first path satisfies the state switching condition.
  • the first switch determines that the first path satisfies the time switching condition and the state switching condition simultaneously, the first switch performs path switching.
  • the first switch determines whether the packet type of the second VXLAN packet is a response type, and the second VXLAN packet.
  • the packet type is the response type
  • the first switch determines whether the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet in the sending table, which simplifies the operation steps.
  • Step 408 If the first path meets the path switching condition, the first switch passes the at least two equivalents when receiving the subsequent VXLAN message that belongs to the same data flow as the first VXLAN message.
  • the second path in the path sends the subsequent VXLAN message to the second switch.
  • the first switch determines that the first path meets the path switching condition in step 407, the first switch receives the subsequent VXLAN message that belongs to the same data stream as the first VXLAN message.
  • the first switch sends the subsequent VXLAN message to the second switch by using a second path of the at least two equal-cost paths.
  • the second path is any one of the at least two equal-cost paths except the first path.
  • Step 409 when the first path meets the path switching condition, the second switch passes the at least two The second path of the equal-cost path receives the subsequent VXLAN message that is sent by the first switch and belongs to the same data stream as the first VXLAN message.
  • the second switch receives, by using the second path, the subsequent VXLAN packet that is sent by the first switch and belongs to the same data stream as the first VXLAN packet.
  • the sequence number of the latter VXLAN packet is accumulated based on the sequence number of the previous VXLAN packet. That is, when the first switch encapsulates the VXLAN tunnel header of a VXLAN message, the first VXLAN packet sequence number is incremented by one to obtain the sequence number of the latter VXLAN packet. For example, the first switch is in the package first. In the VXLAN tunnel header of the VXLAN packet, the sequence number of the first VXLAN packet is: 000000000001, and the first switch encapsulates the subsequent packet of the data flow to which the first VXLAN packet belongs.
  • the first switch encapsulates the third VXLAN packet of the data stream according to the sequence.
  • the above methods are analogous.
  • the sequence number of the VXLAN packet is 12 bits.
  • the accumulation may cause the sequence number of the VXLAN packet to overflow. Therefore, in the embodiment of the present invention, the first When the identifier information of the second VXLAN packet is the same as the identifier information of the first VXLAN packet, if the first path does not meet the path switching condition, the first switch clears the sending table. Identification information of the first VXLAN message recorded in the record.
  • the clearing of the identifier information of the first VXLAN packet recorded in the sending table refers to setting the sequence number in the identifier information of the first VXLAN packet that belongs to the data stream to 0.
  • the first path meets a path switching condition, and the identifier information of the first switch in the second VXLAN packet is used to ensure that the storage space of the first switch can be effectively utilized.
  • the entry including the identifier information of the first VXLAN packet is deleted from the sending table.
  • the first switch sends the first VXLAN stored in the table.
  • the sequence number of the message is set to 0, and the first switch sends the subsequent VXLAN message through the first path when receiving the subsequent VXLAN message that belongs to the same data stream as the first VXLAN message. Text.
  • the first switch deletes from the sending table, An entry of the identifier information of the first VXLAN packet, and the identifier information of the first VXLAN packet that is recorded by the first switch in the sending table, indicating that the data flow to which the first VXLAN packet belongs
  • the first switch clears the identifier information of the first VXLAN packet recorded in the sending table, thereby saving the storage space of the first switch.
  • the second VXLAN packet is not The first VLXAN packet corresponds to the notification packet, and the first path still has the VXLAN packet sent by the first switch, and the first path does not meet the path switching condition.
  • the switch receives the subsequent VXLAN packet that belongs to the same data stream as the first VXLAN packet, the first switch sends the subsequent VXLAN packet by using the first path.
  • step 403 and step 404 are performed in sequence.
  • the steps 403 and 404 may be reversed. Any person skilled in the art can easily think of the change within the scope of the technology disclosed in the present invention. It is within the scope of the present invention and therefore will not be described again.
  • the packet processing method of the embodiment of the present invention sends a first VXLAN message to the second switch through the first path in the at least two equal-cost paths, and receives the second switch according to the first VXLAN message. And determining, by the second VXLAN packet, whether the first path meets a path switching condition according to the second VXLAN packet, and if the first path meets the path switching condition, receiving the packet corresponding to the first VXLAN And sending, by the second path of the at least two equal-cost paths, the subsequent VXLAN message to the second switch, by using the at least two equal-cost paths
  • the second path sends the subsequent VXLAN message to the second switch, the data stream is offloaded, and the next sub-data stream can be sent after the previous sub-data stream is received by the second switch, so
  • the present invention can solve the problem that the system performance is reduced or the packet is out of order caused by sending the sub-data stream by using the preset time interval in the prior art, thereby improving the system performance and avoiding the disorder of the message. fruit.
  • the embodiment of the present invention distributes the load of the first path to the second path by sending a subsequent VXLAN message to the second switch by using the second path of the at least two equal-cost paths. Therefore, the present invention can also improve the balance of path load in a VXLAN network.
  • the embodiment of the present invention can perform path switching when it is determined that the path switching condition is reached. Therefore, compared with the prior art, the embodiment of the present invention forms a sub-data stream after the handover, and the size of each sub-data stream is flexibly determined. In the embodiment of the present invention, when the data stream is divided for a long duration, the formed sub-data stream is more uniform, and load balancing of each equal-cost path is more effectively implemented.
  • FIG. 5 shows a block diagram of a message processing apparatus 500 according to an embodiment of the present invention.
  • the message processing apparatus 500 can implement some or all of the functions of the first switch in the implementation environment shown in FIG. 1 by software, hardware, or a combination of both.
  • the at least two equal-cost paths exist between the first switch and the second switch.
  • the packet processing apparatus 500 may include: a first sending module 510, a receiving module 520, a determining module 530, and a second sending module 540.
  • the first sending module 510 is configured to send, by using the first path of the at least two equal-cost paths, the first VXLAN packet to the second switch.
  • the receiving module 520 is configured to receive a second VXLAN packet sent by the second switch according to the first VXLAN packet, where the second VXLAN packet is used to notify the first switch of the second switch Receiving the first VXLAN message.
  • the determining module 530 is configured to determine, according to the second VXLAN message received by the receiving module 520, whether the first path meets a path switching condition.
  • the second sending module 540 is configured to: when the determining module 530 determines that the first path meets a path switching condition and receives a subsequent VXLAN message that belongs to the same data flow as the first VXLAN message, The second path of the at least two equal-cost paths sends the subsequent VXLAN message to the second switch.
  • the packet processing apparatus sends a first VXLAN message to the second switch by using the first path of the at least two equal-cost paths, and receives the second switch according to the first VXLAN message. And determining, by the second VXLAN packet, whether the first path meets a path switching condition according to the second VXLAN packet, and if the first path meets the path switching condition, receiving the packet corresponding to the first VXLAN And sending, by the second path of the at least two equal-cost paths, the subsequent VXLAN message to the second switch, by using the at least two equal-cost paths
  • the second path sends the subsequent VXLAN message to the second switch, the data stream is offloaded, and the next sub-data stream can be sent after the previous sub-data stream is received by the second switch, so
  • the present invention can solve the problem that the system performance is reduced or the packet is out of order caused by sending the sub-data stream by using the preset time interval in the prior art, thereby improving the system performance and avoiding the disorder of the message. fruit.
  • the embodiment of the present invention distributes the load of the first path to the second path by sending a subsequent VXLAN message to the second switch by using the second path of the at least two equal-cost paths. Therefore, the present invention can also improve the balance of path load in a VXLAN network.
  • FIG. 6 shows a block diagram of a message processing apparatus 600 according to another embodiment of the present invention.
  • the message processing apparatus 600 may implement some or all of the functions of the first switch in the implementation environment shown in FIG. 1 by software, hardware, or a combination of both.
  • the at least two equal-cost paths exist between the first switch and the second switch.
  • the packet processing apparatus 600 may include: a first sending module 610, a receiving module 620, a determining module 630, and a second sending module 640.
  • the first sending module 610 is configured to send, by using the first path of the at least two equal-cost paths, the first VXLAN packet to the second switch.
  • the receiving module 620 is configured to receive a second VXLAN packet sent by the second switch according to the first VXLAN packet, where the second VXLAN packet is used to notify the first switch of the second switch Receiving the first VXLAN message.
  • the determining module 630 is configured to determine, according to the second VXLAN message received by the receiving module 620, whether the first path meets a path switching condition.
  • the second sending module 640 is configured to: when the determining module 630 determines that the first path meets a path switching condition and receives a subsequent VXLAN message that belongs to the same data flow as the first VXLAN message, The second path of the at least two equal-cost paths sends the subsequent VXLAN message to the second switch.
  • the first VXLAN message includes: an original message and identifier information, where the identifier information is used to identify the first VXLAN message, where the second VXLAN message includes: a type flag bit and the The identifier information, the value of the type flag is a first preset value, and the first preset value is used to indicate that the message type of the second VXLAN message is a response type, and the device further includes:
  • the recording module 650 is configured to record the identifier information of the first VXLAN packet in the sending table.
  • the determining module 630 includes:
  • the determining unit 631 is configured to determine the identifier information in the second VXLAN packet and the sending table in the sending table when the packet type indicated by the value of the type flag bit in the second VXLAN packet is a response type Whether the identification information of the first VXLAN packet is the same;
  • a determining unit 632 configured to determine, when the determining unit 631 determines that the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet in the sending table, Path satisfaction Path switching conditions.
  • the device further includes:
  • a deleting module 660 configured to delete, when the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet that is recorded, from the sending table, including the first VXLAN packet An entry identifying the information; or,
  • the clearing module 670 is configured to: when the identifier information of the first VXLAN packet recorded in the sending table indicates that the number of sent packets of the data flow to which the first VXLAN packet belongs exceeds a preset value, And clearing the identifier information of the first VXLAN packet recorded in the sending table.
  • the first VXLAN packet is obtained by encapsulating a VXLAN tunnel header for the original packet, and the identifier information of the first VXLAN packet is carried in a VXLAN tunnel header of the first VXLAN packet. Reserved in the field;
  • the reserved field of the VXLAN tunnel header of the second VXLAN packet includes the identifier information of the first VXLAN packet, and the type flag is carried in the flag field of the VXLAN tunnel header of the second VXLAN packet.
  • the second VXLAN message is generated by the second switch according to the first VXLAN message.
  • the second VXLAN packet is: when the second switch detects that there is a reverse packet in the sending queue of the second switch, adding the first VXLAN to the VXLAN tunnel header of the reverse packet.
  • the identifier information of the packet and the type flag are obtained, and the reverse packet is a packet whose outer layer destination Internet Protocol IP address in the sending queue of the second switch is an IP address of the first switch.
  • the first VXLAN message further includes: a type flag bit, where the type flag bit is located in a flag field of a VXLAN tunnel header of the first VXLAN message, and the value of the type flag bit is second.
  • the preset value is used to indicate that the message type is a request type.
  • the packet processing apparatus sends a first VXLAN message to the second switch by using the first path of the at least two equal-cost paths, and receives the second switch according to the first VXLAN message. And determining, by the second VXLAN packet, whether the first path meets a path switching condition according to the second VXLAN packet, and if the first path meets the path switching condition, receiving the packet corresponding to the first VXLAN And sending, by the second path of the at least two equal-cost paths, the subsequent VXLAN message to the second switch, by using the at least two equal-cost paths When the second path sends the subsequent VXLAN packet to the second switch, the data flow is offloaded, and the next sub-number can be guaranteed.
  • the flow is transmitted after the previous sub-data stream is received by the second switch. Therefore, the present invention can solve the problem that the system performance is reduced or the message is out of order caused by the sub-data stream being transmitted by using the preset time interval in the prior art. System performance, avoiding the effect of message out of order.
  • the embodiment of the present invention distributes the load of the first path to the second path by sending a subsequent VXLAN message to the second switch by using the second path of the at least two equal-cost paths. Therefore, the present invention can also improve the balance of path load in a VXLAN network.
  • the embodiment of the present invention can perform path switching when it is determined that the path switching condition is reached. Therefore, compared with the prior art, the embodiment of the present invention forms a sub-data stream after the handover, and the size of each sub-data stream is flexibly determined. In the embodiment of the present invention, when the data stream is divided for a long duration, the formed sub-data stream is more uniform, and load balancing of each equal-cost path is more effectively implemented.
  • FIG. 7 shows a block diagram of a message processing apparatus 700 according to still another embodiment of the present invention.
  • the message processing apparatus 700 can implement some or all of the functions of the second switch in the implementation environment shown in FIG. 1 by software, hardware, or a combination of both.
  • the at least two equal-cost paths exist between the second switch and the first switch, and the packet processing apparatus 700 may include: a first receiving module 710, an obtaining module 720, a sending module 730, and a second receiving module 740.
  • the first receiving module 710 is configured to receive, by using the first path of the at least two equal-cost paths, the first VXLAN packet sent by the first switch.
  • the obtaining module 720 is configured to obtain a second VXLAN packet according to the first VXLAN packet received by the first receiving module 710, where the second VXLAN packet is used to notify the first switch The second switch receives the first VXLAN message.
  • the sending module 730 is configured to send, by the first switch, the second VXLAN message that is obtained by the acquiring module 720, so that the first switch determines the first part according to the second VXLAN message. Whether a path satisfies the path switching condition.
  • the second receiving module 740 is configured to receive, by the second path of the at least two equal-cost paths, the first VXLAN report sent by the first switch, when the first path meets a path switching condition.
  • the text belongs to subsequent VXLAN messages of the same data stream.
  • the packet processing apparatus receives the first VXLAN packet sent by the first switch by using the first path in the at least two equal-cost paths, and acquires and sends the first VXLAN packet according to the first VXLAN packet.
  • the switch sends a second VXLAN message, where the second VXLAN message is used to notify the first switch to receive the second switch.
  • the second path of the at least two equal-cost paths receives a subsequent VXLAN message sent by the first switch that belongs to the same data stream as the first VXLAN message;
  • the data stream is offloaded, and the next sub-data stream can be sent after the previous sub-data stream is received by the second switch.
  • the invention can solve the problem that the performance of the system is reduced or the packet is out of order caused by the sub-data stream being transmitted by using the preset time interval in the prior art, thereby improving the system performance and avoiding the disorder of the message.
  • the embodiment of the present invention distributes the load of the first path to the second path by sending a subsequent VXLAN packet to the second switch by using the second path of the at least two equal-cost paths.
  • the present invention can also improve the balance of path load in a VXLAN network.
  • FIG. 8 shows a block diagram of a message processing apparatus 800 according to still another embodiment of the present invention.
  • the message processing apparatus 800 can implement some or all of the functions of the second switch in the implementation environment shown in FIG. 1 by software, hardware, or a combination of both.
  • the at least two equal-cost paths exist between the second switch and the first switch, and the packet processing apparatus 800 may include: a first receiving module 810, an obtaining module 820, a sending module 830, and a second receiving module 840.
  • the first receiving module 810 is configured to receive, by using the first path of the at least two equal-cost paths, the first VXLAN packet sent by the first switch.
  • the obtaining module 820 is configured to obtain a second VXLAN message according to the first VXLAN message received by the first receiving module 810, where the second VXLAN message is used to notify the first switch The second switch receives the first VXLAN message.
  • the sending module 830 is configured to send, by the first switch, the second VXLAN message that is obtained by the acquiring module 820, so that the first switch determines the first part according to the second VXLAN message. Whether a path satisfies the path switching condition.
  • the second receiving module 840 is configured to receive, by the second path of the at least two equal-cost paths, the first VXLAN report sent by the first switch, when the first path meets a path switching condition.
  • the text belongs to subsequent VXLAN messages of the same data stream.
  • the first VXLAN packet includes: an original packet and identifier information, where the identifier information is used to identify the first VXLAN packet, where the second VXLAN packet includes: a type flag bit and the identifier information.
  • said The value of the type flag is a first preset value, and the first preset value is used to indicate that the message type of the second VXLAN message is a response type.
  • the first VXLAN packet is obtained by encapsulating a VXLAN tunnel header for the original packet, and the identifier information of the first VXLAN packet is carried in a VXLAN tunnel header of the first VXLAN packet. Reserved in the field;
  • the reserved field of the VXLAN tunnel header of the second VXLAN packet includes the identifier information of the first VXLAN packet, and the type flag is carried in the flag field of the VXLAN tunnel header of the second VXLAN packet.
  • the obtaining module 820 includes:
  • a generating unit 821 configured to generate the second VXLAN packet according to the first VXLAN packet
  • the detecting and encapsulating unit 822 is configured to detect whether there is a reverse packet in the sending queue of the second switch, where the reverse packet is an IP address of the outer layer in the sending queue of the second switch. Adding the identifier information of the first VXLAN packet to the VXLAN tunnel header of the reverse packet, and the packet of the IP address of the switch, when the reverse packet exists in the sending queue The type flag bit gets the second VXLAN message.
  • the first VXLAN message further includes: a type flag bit, where the type flag bit is located in a flag field of a VXLAN tunnel header of the first VXLAN message, and the value of the type flag bit is second. a preset value, where the second preset value is used to indicate that the message type is a request type, and the device further includes:
  • the determining module 850 is configured to determine whether the message type indicated by the value of the type flag bit in the first VXLAN message is a request type
  • the triggering module 860 is configured to trigger, when the determining module 850 determines that the packet type indicated by the value of the type flag bit in the first VXLAN packet is a request type, triggering the acquiring module 820 according to the first VXLAN The packet obtains the second VXLAN packet.
  • the packet processing apparatus receives the first VXLAN packet sent by the first switch by using the first path in the at least two equal-cost paths, and acquires and sends the first VXLAN packet according to the first VXLAN packet.
  • the switch sends a second VXLAN message, where the second VXLAN message is used to notify the first switch that the second switch receives the first VXLAN message, so that the first switch is configured according to the second VXLAN message.
  • the present invention can solve the prior art.
  • the problem of system performance degradation or packet out-of-order caused by sending sub-data streams at preset time intervals improves the system performance and avoids the disorder of packets.
  • the embodiment of the present invention distributes the load of the first path to the second path by sending a subsequent VXLAN packet to the second switch by using the second path of the at least two equal-cost paths.
  • the present invention can also improve the balance of path load in a VXLAN network.
  • the embodiment of the present invention can perform path switching when it is determined that the path switching condition is reached. Therefore, compared with the prior art, the embodiment of the present invention forms a sub-data stream after the handover, and the size of each sub-data stream is flexibly determined. In the embodiment of the present invention, when the data stream is divided for a long duration, the formed sub-data stream is more uniform, and load balancing of each equal-cost path is more effectively implemented.
  • the packet processing apparatus provided by the foregoing embodiment only illustrates the division of each functional module in the processing of the packet. In actual applications, the function distribution may be completed by different functional modules as needed. The internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
  • the embodiment of the packet processing apparatus and the packet processing method provided by the foregoing embodiments are in the same concept, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
  • FIG. 9 a block diagram of a message processing apparatus 900 provided by an embodiment of the present invention is shown.
  • the packet processing device 900 can be applied to the first switch shown in FIG. 1.
  • the first switch and the second switch have at least two equal-cost paths, and the first switch can be a leaf switch.
  • the message processing apparatus 900 can include, but is not limited to, a transmitter 910, a receiver 920, and a processor 930 coupled to the transmitter 910 and the receiver 920, respectively.
  • the transmitter 910 is configured to send, by using the first path of the at least two equal paths, the first VXLAN message to the second switch.
  • the receiver 920 is configured to receive a second VXLAN message sent by the second switch according to the first VXLAN message, where the second VXLAN message is used to notify the first switch of the second switch Receiving the first VXLAN message.
  • the processor 930 is configured to determine, according to the second VXLAN packet, whether the first path meets a path switching condition.
  • the processor 930 is configured to meet a path switching condition in the first path and receive the first When the VXLAN packet belongs to the subsequent VXLAN packet of the same data stream, the subsequent VXLAN packet is sent to the second switch by using the second path of the at least two equal-cost paths.
  • the packet processing apparatus sends a first VXLAN message to the second switch by using the first path of the at least two equal-cost paths, and receives the second switch according to the first VXLAN message. And determining, by the second VXLAN packet, whether the first path meets a path switching condition according to the second VXLAN packet, and if the first path meets the path switching condition, receiving the packet corresponding to the first VXLAN And sending, by the second path of the at least two equal-cost paths, the subsequent VXLAN message to the second switch, by using the at least two equal-cost paths
  • the second path sends the subsequent VXLAN message to the second switch, the data stream is offloaded, and the next sub-data stream can be sent after the previous sub-data stream is received by the second switch, so
  • the present invention can solve the problem that the system performance is reduced or the packet is out of order caused by sending the sub-data stream by using the preset time interval in the prior art, thereby improving the system performance and avoiding the disorder of the message. fruit.
  • the embodiment of the present invention distributes the load of the first path to the second path by sending a subsequent VXLAN message to the second switch by using the second path of the at least two equal-cost paths. Therefore, the present invention can also improve the balance of path load in a VXLAN network.
  • the first VXLAN message includes: an original message and identification information, where the identification information is used to identify the first VXLAN message, and the second VXLAN message includes: a type flag bit and the identifier The information indicates that the value of the type flag is a first preset value, and the first preset value is used to indicate that the packet type of the second VXLAN packet is a response type.
  • the processor 930 is configured to record identifier information of the first VXLAN packet in a sending table.
  • the processor 930 is configured to determine, when the packet type indicated by the value of the type flag bit in the second VXLAN packet is a response type, the identifier information in the second VXLAN packet and the sending table. Whether the identification information of the first VXLAN packet is the same;
  • the processor 930 is configured to determine that the first path meets a path switching condition when the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet in the sending table. .
  • the processor 930 is configured to delete, when the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet that is recorded, including the An entry of the identification information of the first VXLAN packet; or,
  • the processor 930 the identifier information table of the first VXLAN message recorded in the sending table And when the number of sent packets of the data flow to which the first VXLAN packet belongs is greater than a preset value, the identifier information of the first VXLAN packet recorded in the sending table is cleared.
  • the first VXLAN packet is obtained by encapsulating a VXLAN tunnel header for the original packet, and the identifier information of the first VXLAN packet is carried in a VXLAN tunnel header of the first VXLAN packet. Reserved in the field;
  • the reserved field of the VXLAN tunnel header of the second VXLAN packet includes the identifier information of the first VXLAN packet, and the type flag is carried in the flag field of the VXLAN tunnel header of the second VXLAN packet.
  • the second VXLAN message is generated by the second switch according to the first VXLAN message.
  • the second VXLAN packet is: when the second switch detects that there is a reverse packet in the sending queue of the second switch, adding the first VXLAN to the VXLAN tunnel header of the reverse packet.
  • the identifier information of the packet and the type flag are obtained, and the reverse packet is a packet whose outer layer destination Internet Protocol IP address in the sending queue of the second switch is an IP address of the first switch.
  • the first VXLAN message further includes: a type flag bit, where the type flag bit is located in a flag field of a VXLAN tunnel header of the first VXLAN message, and the value of the type flag bit is second.
  • the preset value is used to indicate that the message type is a request type.
  • the packet processing apparatus sends a first VXLAN message to the second switch by using the first path of the at least two equal-cost paths, and receives the second switch according to the first VXLAN message. And determining, by the second VXLAN packet, whether the first path meets a path switching condition according to the second VXLAN packet, and if the first path meets the path switching condition, receiving the packet corresponding to the first VXLAN And sending, by the second path of the at least two equal-cost paths, the subsequent VXLAN message to the second switch, by using the at least two equal-cost paths
  • the second path sends the subsequent VXLAN message to the second switch, the data stream is offloaded, and the next sub-data stream can be sent after the previous sub-data stream is received by the second switch, so
  • the present invention can solve the problem that the system performance is reduced or the packet is out of order caused by sending the sub-data stream by using the preset time interval in the prior art, thereby improving the system performance and avoiding the disorder of the message. fruit.
  • the embodiment of the present invention distributes the load of the first path to the second path by sending the subsequent VXLAN message to the second switch by using the second path of the at least two equal paths. Therefore, the present invention can also improve the balance of path load in a VXLAN network.
  • the embodiment of the present invention can perform path switching when it is determined that the path switching condition is reached. Therefore, compared with the prior art, the embodiment of the present invention forms a sub-data stream after the handover, and the size of each sub-data stream is flexibly determined. In the embodiment of the present invention, when the data stream is divided for a long duration, the formed sub-data stream is more uniform, and load balancing of each equal-cost path is more effectively implemented.
  • FIG. 10 shows a block diagram of a message processing apparatus 1000 according to still another embodiment of the present invention.
  • the packet processing apparatus 1000 can be applied to the second switch shown in FIG. 1.
  • the second switch and the first switch have at least two equal-cost paths, and the second switch can be a leaf switch.
  • the message processing apparatus 1000 can include, but is not limited to, a receiver 1010, a processor 1020, and a transmitter 1030, which are coupled to the processor 1020, respectively.
  • the receiver 1010 is configured to receive, by using the first path of the at least two equal-cost paths, the first VXLAN packet sent by the first switch.
  • the processor 1020 is configured to obtain a second VXLAN packet according to the first VXLAN packet, where the second VXLAN packet is used to notify the first switch that the second switch receives the first VXLAN packet. Message.
  • the transmitter 1030 is configured to send the second VXLAN packet to the first switch, so that the first switch determines, according to the second VXLAN packet, whether the first path meets a path switching condition.
  • the receiver 1010 is configured to: when the first path meets the path switching condition, receive, by using the second path of the at least two equal-cost paths, the first VXLAN message sent by the first switch belongs to Subsequent VXLAN messages of the same data stream.
  • the packet processing apparatus receives the first VXLAN packet sent by the first switch by using the first path in the at least two equal-cost paths, and acquires and sends the first VXLAN packet according to the first VXLAN packet.
  • the switch sends a second VXLAN message, where the second VXLAN message is used to notify the first switch that the second switch receives the first VXLAN message, so that the first switch is configured according to the second VXLAN message.
  • the present invention can solve the problem that the latter sub-data stream is sent after the previous sub-data stream is received by the second switch. Therefore, the present invention can solve the problem that the prior art uses the preset time interval to transmit the sub-data stream guide.
  • the system performance problems or out of order packets to improve system performance and to avoid the effect of packet disorder.
  • the embodiment of the present invention passes the second path in the at least two equal-cost paths to the first
  • the second switch sends the subsequent VXLAN packet, and the load of the first path is shared to the second path. Therefore, the present invention can also improve the balance of the path load in the VXLAN network.
  • the first VXLAN message includes: an original message and identification information, where the identification information is used to identify the first VXLAN message, and the second VXLAN message includes: a type flag bit and the identifier The information indicates that the value of the type flag is a first preset value, and the first preset value is used to indicate that the message type of the second VXLAN message is a response type.
  • the first VXLAN packet is obtained by encapsulating a VXLAN tunnel header for the original packet, and the identifier information of the first VXLAN packet is carried in a VXLAN tunnel header of the first VXLAN packet. Reserved in the field;
  • the reserved field of the VXLAN tunnel header of the second VXLAN packet includes the identifier information of the first VXLAN packet, and the type flag is carried in the flag field of the VXLAN tunnel header of the second VXLAN packet.
  • the processor 1020 is configured to generate the second VXLAN packet according to the first VXLAN packet.
  • the processor 1020 is configured to detect whether a reverse packet exists in a sending queue of the second switch, where the reverse packet is an outer layer destination Internet Protocol IP address in the sending queue of the second switch.
  • the packet of the IP address of the first switch adds the identifier information of the first VXLAN packet to the VXLAN tunnel header of the reverse packet when the reverse packet is sent in the sending queue.
  • the type flag bit gets the second VXLAN message.
  • the first VXLAN message further includes: a type flag bit, where the type flag bit is located in a flag field of a VXLAN tunnel header of the first VXLAN message, and the value of the type flag bit is second. a preset value, where the second preset value is used to indicate that the message type is a request type.
  • the processor 1020 is configured to determine whether a packet type indicated by a value of a type flag bit in the first VXLAN packet is a request type.
  • the processor 1020 is configured to acquire the second VXLAN packet according to the first VXLAN packet when the packet type indicated by the value of the type flag bit in the first VXLAN packet is a request type.
  • the packet processing apparatus receives the first VXLAN packet sent by the first switch by using the first path in the at least two equal-cost paths, and acquires and sends the first VXLAN packet according to the first VXLAN packet.
  • the switch sends a second VXLAN message, where the second VXLAN message is used to notify the first switch to receive the second switch.
  • the second path of the at least two equal-cost paths receives a subsequent VXLAN message sent by the first switch that belongs to the same data stream as the first VXLAN message;
  • the data stream is offloaded, and the next sub-data stream can be sent after the previous sub-data stream is received by the second switch.
  • the invention can solve the problem that the performance of the system is reduced or the packet is out of order caused by the sub-data stream being transmitted by using the preset time interval in the prior art, thereby improving the system performance and avoiding the disorder of the message.
  • the embodiment of the present invention distributes the load of the first path to the second path by sending a subsequent VXLAN packet to the second switch by using the second path of the at least two equal-cost paths.
  • the present invention can also improve the balance of path load in a VXLAN network.
  • the embodiment of the present invention can perform path switching when it is determined that the path switching condition is reached. Therefore, compared with the prior art, the embodiment of the present invention forms a sub-data stream after the handover, and the size of each sub-data stream is flexibly determined. In the embodiment of the present invention, when the data stream is divided for a long duration, the formed sub-data stream is more uniform, and load balancing of each equal-cost path is more effectively implemented.
  • the embodiment of the present invention can perform path switching when it is determined that the path switching condition is reached. Therefore, compared with the prior art, the embodiment of the present invention forms a sub-data stream after the handover, and the size of each sub-data stream is flexibly determined. In the embodiment of the present invention, when the data stream is divided for a long duration, the formed sub-data stream is more uniform, and load balancing of each equal-cost path is more effectively implemented.
  • FIG. 11 is a schematic structural diagram of a message processing system according to an embodiment of the present invention.
  • the packet processing system 1100 includes at least a first switch 1110 and a second switch 1120, and the first switch 1110 and the second switch 1120 are connected by using an IP network.
  • the first switch 1110 includes a message processing device as described in FIG. 5 or FIG. 6; the second switch 1120 includes a message as described in FIG. 7 or FIG. Processing device.
  • the first switch 1110 includes a message processing device as described in FIG. 9; the second switch 1120 includes a message processing device as described in 10.
  • the packet processing system sends a first VXLAN message to the second switch through the first path in the at least two equal-cost paths, and receives the second switch according to the first VXLAN message. And determining, by the second VXLAN packet, whether the first path meets a path switching condition according to the second VXLAN packet, and if the first path meets the path switching condition, receiving the packet corresponding to the first VXLAN Same data And transmitting, by the second path of the at least two equal-cost paths, the subsequent VXLAN message to the second switch; and passing the second of the at least two equal-cost paths
  • the path sends the subsequent VXLAN message to the second switch the data stream is offloaded, and the next sub-data stream can be sent after the previous sub-data stream is received by the second switch.
  • the invention can solve the problem that the system performance is reduced or the message is out of order caused by sending the sub-data stream by using the preset time interval in the prior art, thereby improving the system performance and avoiding the disorder of the message.
  • the embodiment of the present invention distributes the load of the first path to the second path by sending a subsequent VXLAN message to the second switch by using the second path of the at least two equal-cost paths. Therefore, the present invention can also improve the balance of path load in a VXLAN network.
  • An embodiment of the present invention further provides a message processing device, where the device includes a transceiver, a memory, and a processor respectively connected to the transceiver and the memory, wherein the memory stores a set of program codes, and the processor is used to call the memory.
  • the program code stored in the program for executing the above message processing method.
  • a person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium.
  • the storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.

Abstract

The present invention relates to the technical field of switching. Disclosed are a packet processing method, device and system, which are applied in a first switch in a VXLAN, and at least two equal cost paths exist between the first switch and a second switch. The method comprises: sending a first VXLAN packet to the second switch through a first path in the at least two equal cost paths; receiving a second VXLAN packet; determining according to the second VXLAN packet whether the first path satisfies a path switching condition; and if the first path satisfies the path switching condition, sending subsequent VXLAN packets in the same data stream as the first VXLAN packet to the second switch through a second path in the at least two equal cost paths. Therefore, the problem in the prior art of degradation of the system performance due to the fact that sub-data streams are sent at preset time intervals is solved, the system performance is improved, and the out-of-order packets are avoided.

Description

报文处理方法、装置及系统Message processing method, device and system
本申请要求于2014年10月20日提交中国专利局、申请号为201410557950.4、发明名称为“报文处理方法、装置及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 20141055795, filed on Oct. 20, 2014, the entire disclosure of which is incorporated herein by reference. in.
技术领域Technical field
本发明涉及交换技术领域,特别涉及一种报文处理方法、装置及系统。The present invention relates to the field of switching technologies, and in particular, to a message processing method, apparatus, and system.
背景技术Background technique
虚拟可扩展局域网(英文:Virtual eXtensible Local Area Network,简称:VXLAN)是建立在物理互联网协议(英文:Internet Protocol,简称:IP)网络上的虚拟以太网。在VXLAN网络中,为了提高链路带宽,采用了等价多路径(英文:Equal Cost Multiple path,简称:ECMP)技术。ECMP技术使最短路径桥模式(英文:Shortest Path Bridging MAC Mode,简称:SPBM)网络中的单一业务的数据帧能够选择多个可能的下一跳(即选择多条可能的路径)。为了实现路径的负载均衡,有两种使用ECMP技术的选路方法,逐包哈希(hash)和逐流hash。在逐包hash中,每条路径的负载会均衡,但是会导致一个流内的报文乱序,所以逐包hash应用较少;在逐流hash中,发送端根据报文中的五元组计算报文的hash值,将hash值相等的报文通过同一条路径发送,保证一个流内的报文不会乱序,所以逐流hash应用较多。Virtual eXtensible Local Area Network (VXLAN) is a virtual Ethernet network built on the Internet Protocol (IP) network. In the VXLAN network, in order to improve the link bandwidth, an Equal Cost Multiple Path (ECMP) technology is adopted. The ECMP technology enables a single service data frame in a shortest path bridge mode (English: Shortest Path Bridging MAC Mode, SPBM for short) network to select multiple possible next hops (ie, select multiple possible paths). In order to achieve load balancing of paths, there are two routing methods using ECMP technology, packet-by-package hashing and stream-by-streaming hashing. In a packet-by-packet hash, the load of each path is balanced, but the packets in one stream are out of order, so the packet-based hash application is less. In the flow-by-stream hash, the sender is based on the quintuple in the packet. The hash value of the packet is calculated. The packets with the same hash value are sent through the same path to ensure that the packets in one stream are not out of order.
对于大象流、老鼠流等持续时间较长的数据流,采用逐流hash容易导致某些路径负载较重,而其他的路径负载较轻,从而降低路径负载的均衡性。为此,现有技术提供了一种流簇交换(Flowlet Switch)方案,包括:发送端将持续时间较长的数据流分成多个子数据流,每个子数据流中包括至少一个报文,在发送端探测到当前子数据流所在的路径拥塞时,发送端在当前子数据流发送完成之后,将该子数据流的下一个子数据流通过所述路径的等价路径发送。当一个数据流中两个报文的发送时间间隔大于预设的时间间隔(gap)时,可以对所述数据流采用上述流簇交换方案进行负载均衡。通常,预设的时间间隔的大小是根据经验确定的。For long-lasting data streams such as elephant stream and mouse stream, the use of stream-by-stream hashing tends to cause some paths to be heavier, while other paths are lighter, which reduces the balance of path load. To this end, the prior art provides a flow cluster switching (Flowlet Switch) scheme, which includes: a transmitting end divides a data stream with a long duration into a plurality of sub-data streams, and each sub-data stream includes at least one packet, and is sent When the terminal detects that the path of the current sub-data stream is congested, the transmitting end sends the next sub-data stream of the sub-data stream through the equivalent path of the path after the current sub-data stream is sent. When the sending interval of two packets in a data stream is greater than a preset time interval, the above-mentioned stream cluster switching scheme may be used for load balancing. Usually, the size of the preset time interval is determined empirically.
在实现本发明的过程中,发明人发现现有技术至少存在以下问题:In the process of implementing the present invention, the inventors have found that the prior art has at least the following problems:
现有技术是根据经验确定预设的时间间隔的大小的,为了尽可能保证一个数据流中的报文不出现乱序,通常将该预设的时间间隔设置的较大,比如,将该预设的时间间隔 设置为100微秒(us),而实际需要的子数据流之间的发送时间间隔的大小通常与路径状态有关,即,当路径较为畅通时,实际需要的发送时间间隔通常较小,此时,如果预设的时间间隔较大,则会降低系统性能;当路径较为拥堵时,实际需要的发送时间间隔通常较大,此时,如果预设的时间间隔较小,则会引起报文乱序。因此,现有技术中采用固定的预设时间间隔的方案会降低系统性能,严重的时候还会导致报文乱序。The prior art is to determine the size of the preset time interval according to the experience. In order to ensure that the packets in a data stream do not appear out of order, the preset time interval is usually set to be large, for example, the pre- Set time interval Set to 100 microseconds (us), and the size of the transmission interval between the actually required sub-data streams is usually related to the path state, that is, when the path is smooth, the actual required transmission interval is usually small. If the preset time interval is large, the system performance will be degraded. When the path is congested, the actual required transmission interval is usually large. In this case, if the preset time interval is small, the packet will be messed up. sequence. Therefore, the prior art adopts a fixed preset time interval scheme to reduce system performance, and in severe cases, the message is out of order.
发明内容Summary of the invention
为了解决现有技术中采用预设时间间隔发送子数据流导致的系统性能降低或者报文乱序的问题,本发明提供了一种报文处理方法、装置及系统。所述技术方案如下:The present invention provides a packet processing method, apparatus, and system, in order to solve the problem of system performance degradation or message out-of-order caused by transmitting a sub-data stream at a preset time interval. The technical solution is as follows:
第一方面,提供了一种报文处理方法,应用于虚拟可扩展局域网VXLAN中的第一交换机,所述第一交换机与第二交换机之间存在至少两条等价路径,所述方法包括:The first aspect provides a packet processing method, which is applied to a first switch in a virtual scalable local area network (VXLAN), where the first switch and the second switch have at least two equal-cost paths, and the method includes:
通过所述至少两条等价路径中的第一路径向所述第二交换机发送第一VXLAN报文;Transmitting, by the first path of the at least two equal-cost paths, the first VXLAN message to the second switch;
接收所述第二交换机根据所述第一VXLAN报文发送的第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机所述第二交换机收到所述第一VXLAN报文;And receiving, by the second switch, the second VXLAN packet sent by the first VXLAN packet, where the second VXLAN packet is used to notify the first switch that the second switch receives the first VXLAN packet. Text
根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件;Determining, according to the second VXLAN packet, whether the first path meets a path switching condition;
如果所述第一路径满足路径切换条件,则在接收到与所述第一VXLAN报文属于同一数据流的后续VXLAN报文时,通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文。And if the first path meets the path switching condition, when the subsequent VXLAN message that belongs to the same data flow as the first VXLAN packet is received, the second path of the at least two equal-cost paths is used. The second switch sends the subsequent VXLAN message.
结合第一方面,在第一方面的第一种可能的实施方式中,所述第一VXLAN报文包括:原始报文和标识信息,所述标识信息用于识别所述第一VXLAN报文,所述第二VXLAN报文包括:类型标志位和所述标识信息,所述类型标志位的值为第一预设值,所述第一预设值用于指示所述第二VXLAN报文的报文类型为响应类型,With reference to the first aspect, in a first possible implementation manner of the first aspect, the first VXLAN packet includes: an original packet and identifier information, where the identifier information is used to identify the first VXLAN packet, The second VXLAN packet includes: a type flag bit and the identifier information, where the value of the type flag bit is a first preset value, and the first preset value is used to indicate the second VXLAN message. The message type is the response type.
在接收所述第二交换机根据所述第一VXLAN报文发送的第二VXLAN报文之前,所述方法还包括:Before receiving the second VXLAN packet sent by the second switch according to the first VXLAN packet, the method further includes:
在发送表中记录所述第一VXLAN报文的标识信息;Recording, in the sending table, the identifier information of the first VXLAN packet;
所述判断所述第一路径是否满足路径切换条件包括:The determining whether the first path meets the path switching condition includes:
在所述第二VXLAN报文中的类型标志位的值指示的报文类型为响应类型时,判断所述第二VXLAN报文中的标识信息与所述发送表中的所述第一VXLAN报文的标识信息是否相同; Determining the identifier information in the second VXLAN packet and the first VXLAN packet in the sending table, when the packet type indicated by the value of the type flag bit in the second VXLAN packet is a response type Whether the identification information of the text is the same;
如果所述第二VXLAN报文中的标识信息与所述发送表中的所述第一VXLAN报文的标识信息相同,则确定所述第一路径满足路径切换条件。And if the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet in the sending table, determining that the first path meets a path switching condition.
结合第一方面的第一种可能的实施方式,在第一方面的第二种可能的实施方式中,在所述接收所述第二交换机根据所述第一VXLAN报文发送的第二VXLAN报文之后,所述方法还包括:With reference to the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, the receiving, by the second switch, the second VXLAN report sent according to the first VXLAN message After the text, the method further includes:
在所述第二VXLAN报文中的标识信息与记录的所述第一VXLAN报文的标识信息相同时,从所述发送表中删除包括所述第一VXLAN报文的标识信息的表项;或,When the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet, the entry including the identifier information of the first VXLAN packet is deleted from the sending table; or,
在所述发送表中记录的所述第一VXLAN报文的标识信息表明所述第一VXLAN报文所属的数据流的已发送报文的个数超过预设值时,清空所述发送表中记录的所述第一VXLAN报文的标识信息。And the identifier information of the first VXLAN packet recorded in the sending table indicates that when the number of sent packets of the data flow to which the first VXLAN packet belongs exceeds a preset value, the sending table is cleared. The identification information of the first VXLAN message recorded.
结合第一方面的第一种可能的实现方式,或第一方面的第二种可能的实现方式,在第一方面的第三种可能的实施方式中,In conjunction with the first possible implementation of the first aspect, or the second possible implementation of the first aspect, in a third possible implementation of the first aspect,
所述第一VXLAN报文是通过为所述原始报文封装VXLAN隧道头得到的,所述第一VXLAN报文的标识信息携带在所述第一VXLAN报文的VXLAN隧道头的保留字段中;The first VXLAN packet is obtained by encapsulating a VXLAN tunnel header for the original packet, and the identifier information of the first VXLAN packet is carried in a reserved field of a VXLAN tunnel header of the first VXLAN packet.
所述第二VXLAN报文的VXLAN隧道头的保留字段包括所述第一VXLAN报文的标识信息,所述类型标志位携带在所述第二VXLAN报文的VXLAN隧道头的标志字段中。The reserved field of the VXLAN tunnel header of the second VXLAN packet includes the identifier information of the first VXLAN packet, and the type flag is carried in the flag field of the VXLAN tunnel header of the second VXLAN packet.
结合第一方面的第三种可能的实施方式,在第一方面的第四种可能的实施方式中,In conjunction with the third possible implementation of the first aspect, in a fourth possible implementation of the first aspect,
所述第二VXLAN报文是由所述第二交换机根据所述第一VXLAN报文生成的;或,The second VXLAN message is generated by the second switch according to the first VXLAN message; or
所述第二VXLAN报文为所述第二交换机在检测到所述第二交换机的发送队列中存在反向报文时,在所述反向报文的VXLAN隧道头中添加所述第一VXLAN报文的标识信息以及所述类型标志位得到的,所述反向报文为所述第二交换机的发送队列中外层目的互联网协议IP地址为所述第一交换机的IP地址的报文。The second VXLAN packet is: when the second switch detects that there is a reverse packet in the sending queue of the second switch, adding the first VXLAN to the VXLAN tunnel header of the reverse packet. The identifier information of the packet and the type flag are obtained, and the reverse packet is a packet whose outer layer destination Internet Protocol IP address in the sending queue of the second switch is an IP address of the first switch.
结合第一方面的第三种可能的实施方式,在第一方面的第五种可能的实施方式中,所述第一VXLAN报文还包括:类型标志位,所述类型标志位位于所述第一VXLAN报文的VXLAN隧道头的标志字段中,所述类型标志位的值为第二预设值,所述第二预设值用于指示报文类型为请求类型。In conjunction with the third possible implementation of the first aspect, in a fifth possible implementation manner of the first aspect, the first VXLAN message further includes: a type flag bit, where the type flag bit is located in the first In the flag field of the VXLAN tunnel header of a VXLAN message, the value of the type flag bit is a second preset value, and the second preset value is used to indicate that the message type is a request type.
第二方面,提供了一种报文处理方法,应用于虚拟可扩展局域网VXLAN中的第二交换机,所述第二交换机与第一交换机之间存在至少两条等价路径,所述方法包括: In a second aspect, a packet processing method is provided, which is applied to a second switch in a virtual scalable local area network (VXLAN), and at least two equal-cost paths exist between the second switch and the first switch, and the method includes:
通过所述至少两条等价路径中的第一路径接收所述第一交换机发送的第一VXLAN报文;Receiving, by the first path of the at least two equal-cost paths, the first VXLAN packet sent by the first switch;
根据所述第一VXLAN报文获取第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机所述第二交换机收到所述第一VXLAN报文;Obtaining a second VXLAN packet according to the first VXLAN packet, where the second VXLAN packet is used to notify the first switch that the second switch receives the first VXLAN packet;
向所述第一交换机发送所述第二VXLAN报文,以便于所述第一交换机根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件;And sending, by the first switch, the second VXLAN packet, so that the first switch determines, according to the second VXLAN packet, whether the first path meets a path switching condition;
在所述第一路径满足路径切换条件时,通过所述至少两条等价路径的第二路径接收所述第一交换机发送的与所述第一VXLAN报文属于同一数据流的后续VXLAN报文。And receiving, by the second path of the at least two equal-cost paths, the subsequent VXLAN packet that is sent by the first switch and belongs to the same data flow as the first VXLAN packet, when the first path meets the path switching condition. .
结合第二方面,在第二方面的第一种可能的实施方式中,所述第一VXLAN报文包括:原始报文和标识信息,所述标识信息用于识别所述第一VXLAN报文,所述第二VXLAN报文包括:类型标志位和所述标识信息,所述类型标志位的值为第一预设值,所述第一预设值用于指示所述第二VXLAN报文的报文类型为响应类型。With reference to the second aspect, in a first possible implementation manner of the second aspect, the first VXLAN packet includes: an original packet and identifier information, where the identifier information is used to identify the first VXLAN packet, The second VXLAN packet includes: a type flag bit and the identifier information, where the value of the type flag bit is a first preset value, and the first preset value is used to indicate the second VXLAN message. The message type is the response type.
结合第二方面的第一种可能的实施方式,在第二方面的第二种可能的实施方式中,In conjunction with the first possible implementation of the second aspect, in a second possible implementation of the second aspect,
所述第一VXLAN报文是通过为所述原始报文封装VXLAN隧道头得到的,所述第一VXLAN报文的标识信息携带在所述第一VXLAN报文的VXLAN隧道头的保留字段中;The first VXLAN packet is obtained by encapsulating a VXLAN tunnel header for the original packet, and the identifier information of the first VXLAN packet is carried in a reserved field of a VXLAN tunnel header of the first VXLAN packet.
所述第二VXLAN报文的VXLAN隧道头的保留字段包括所述第一VXLAN报文的标识信息,所述类型标志位携带在所述第二VXLAN报文的VXLAN隧道头的标志字段中。The reserved field of the VXLAN tunnel header of the second VXLAN packet includes the identifier information of the first VXLAN packet, and the type flag is carried in the flag field of the VXLAN tunnel header of the second VXLAN packet.
结合第二方面的第二种可能的实施方式,在第二方面的第三种可能的实施方式中,所述根据所述第一VXLAN报文获取第二VXLAN报文,包括:With the second possible implementation of the second aspect, in a third possible implementation manner of the second aspect, the obtaining, by the first VXLAN packet, the second VXLAN packet includes:
根据所述第一VXLAN报文生成所述第二VXLAN报文;或,Generating the second VXLAN message according to the first VXLAN message; or
检测所述第二交换机的发送队列中是否存在反向报文,所述反向报文为所述第二交换机的发送队列中外层目的互联网协议IP地址为所述第一交换机的IP地址的报文,在所述发送队列中存在所述反向报文时,在所述反向报文的VXLAN隧道头中添加所述第一VXLAN报文的标识信息以及所述类型标志位得到所述第二VXLAN报文。Detecting whether there is a reverse packet in the sending queue of the second switch, where the reverse packet is an IP address of the outer switch in the sending queue of the second switch is an IP address of the first switch And adding, in the VXLAN tunnel header of the reverse packet, the identifier information of the first VXLAN packet and the type flag to obtain the foregoing, when the reverse packet is present in the sending queue. Two VXLAN messages.
结合第二方面的第二种可能的实施方式,或第二方面的第三种可能的实施方式,在第二方面的第四种可能的实施方式中,所述第一VXLAN报文还包括:类型标志位,所述类型标志位位于所述第一VXLAN报文的VXLAN隧道头的标志字段中,所述类型标志位的值为第二预设值,所述第二预设值用于指示报文类型为请求类型,所述根据所 述第一VXLAN报文获取第二VXLAN报文之前,所述方法还包括:With reference to the second possible implementation manner of the second aspect, or the third possible implementation manner of the second aspect, in the fourth possible implementation manner of the second aspect, the first VXLAN message further includes: a type flag, where the type flag is located in a flag field of the VXLAN tunnel header of the first VXLAN message, the value of the type flag is a second preset value, and the second preset value is used to indicate The message type is the request type, and the basis is Before the first VXLAN packet is obtained, the method further includes:
判断所述第一VXLAN报文中的类型标志位的值指示的报文类型是否为请求类型;Determining whether the message type indicated by the value of the type flag bit in the first VXLAN message is a request type;
如果所述第一VXLAN报文中的类型标志位的值指示的报文类型为请求类型,则执行所述根据所述第一VXLAN报文获取第二VXLAN报文的步骤。If the packet type indicated by the value of the type flag in the first VXLAN packet is a request type, the step of acquiring the second VXLAN packet according to the first VXLAN packet is performed.
第三方面,提供了一种报文处理装置,所述装置为虚拟可扩展局域网VXLAN中的第一交换机,所述第一交换机与第二交换机之间存在至少两条等价路径,所述装置包括:A third aspect provides a message processing apparatus, where the apparatus is a first switch in a virtual scalable local area network (VXLAN), and at least two equal-cost paths exist between the first switch and the second switch, the apparatus include:
第一发送模块,用于通过所述至少两条等价路径中的第一路径向所述第二交换机发送第一VXLAN报文;a first sending module, configured to send, by using the first path of the at least two equal-cost paths, the first VXLAN message to the second switch;
接收模块,用于接收所述第二交换机根据所述第一VXLAN报文发送的第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机所述第二交换机收到所述第一VXLAN报文;a receiving module, configured to receive a second VXLAN message sent by the second switch according to the first VXLAN message, where the second VXLAN message is used to notify the first switch that the second switch receives the Describe the first VXLAN message;
判断模块,用于根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件;a determining module, configured to determine, according to the second VXLAN message, whether the first path meets a path switching condition;
第二发送模块,用于在所述第一路径满足路径切换条件且接收到与所述第一VXLAN报文属于同一数据流的后续VXLAN报文时,通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文。a second sending module, configured to pass the at least two equal-cost paths when the first path meets the path switching condition and receives a subsequent VXLAN message that belongs to the same data flow as the first VXLAN message The second path sends the subsequent VXLAN message to the second switch.
结合第三方面,在第三方面的第一种可能的实施方式中,所述第一VXLAN报文包括:原始报文和标识信息,所述标识信息用于识别所述第一VXLAN报文,所述第二VXLAN报文包括:类型标志位和所述标识信息,所述类型标志位的值为第一预设值,所述第一预设值用于指示所述第二VXLAN报文的报文类型为响应类型,所述装置还包括:With reference to the third aspect, in a first possible implementation manner of the third aspect, the first VXLAN packet includes: an original packet and identifier information, where the identifier information is used to identify the first VXLAN packet, The second VXLAN packet includes: a type flag bit and the identifier information, where the value of the type flag bit is a first preset value, and the first preset value is used to indicate the second VXLAN message. The message type is a response type, and the device further includes:
记录模块,用于在发送表中记录所述第一VXLAN报文的标识信息;a recording module, configured to record, in the sending table, identifier information of the first VXLAN packet;
所述判断模块,包括:The determining module includes:
判断单元,用于在所述第二VXLAN报文中的类型标志位的值指示的报文类型为响应类型时,判断所述第二VXLAN报文中的标识信息与所述发送表中的所述第一VXLAN报文的标识信息是否相同;a determining unit, configured to determine, in the second VXLAN packet, the identifier information in the second VXLAN packet and the location in the sending table, when the packet type indicated by the value of the type flag bit in the second VXLAN packet is a response type Whether the identifier information of the first VXLAN packet is the same;
确定单元,用于在所述第二VXLAN报文中的标识信息与所述发送表中的所述第一VXLAN报文的标识信息相同时,确定所述第一路径满足路径切换条件。The determining unit is configured to determine that the first path satisfies the path switching condition when the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet in the sending table.
结合第三方面的第一种可能的实施方式,在第三方面的第二种可能的实施方式中,所述装置还包括: In conjunction with the first possible implementation of the third aspect, in a second possible implementation of the third aspect, the device further includes:
删除模块,用于在所述第二VXLAN报文中的标识信息与记录的所述第一VXLAN报文的标识信息相同时,从所述发送表中删除包括所述第一VXLAN报文的标识信息的表项;或,a deleting module, configured to: when the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet, delete the identifier that includes the first VXLAN packet from the sending table The entry of the information; or,
清空模块,用于在所述发送表中记录的所述第一VXLAN报文的标识信息表明所述第一VXLAN报文所属的数据流的已发送报文的个数超过预设值时,清空所述发送表中记录的所述第一VXLAN报文的标识信息。The clearing module is configured to: when the identifier information of the first VXLAN packet recorded in the sending table indicates that the number of sent packets of the data flow to which the first VXLAN packet belongs exceeds a preset value, The identification information of the first VXLAN message recorded in the sending table.
结合第三方面的第一种可能的实现方式,或第三方面的第二种可能的实现方式,在第三方面的第三种可能的实施方式中,In conjunction with the first possible implementation of the third aspect, or the second possible implementation of the third aspect, in a third possible implementation manner of the third aspect,
所述第一VXLAN报文是通过为所述原始报文封装VXLAN隧道头得到的,所述第一VXLAN报文的标识信息携带在所述第一VXLAN报文的VXLAN隧道头的保留字段中;The first VXLAN packet is obtained by encapsulating a VXLAN tunnel header for the original packet, and the identifier information of the first VXLAN packet is carried in a reserved field of a VXLAN tunnel header of the first VXLAN packet.
所述第二VXLAN报文的VXLAN隧道头的保留字段包括所述第一VXLAN报文的标识信息,所述类型标志位携带在所述第二VXLAN报文的VXLAN隧道头的标志字段中。The reserved field of the VXLAN tunnel header of the second VXLAN packet includes the identifier information of the first VXLAN packet, and the type flag is carried in the flag field of the VXLAN tunnel header of the second VXLAN packet.
结合第三方面的第三种可能的实施方式,在第三方面的第四种可能的实施方式中,In conjunction with the third possible implementation of the third aspect, in a fourth possible implementation of the third aspect,
所述第二VXLAN报文是由所述第二交换机根据所述第一VXLAN报文生成的;或,The second VXLAN message is generated by the second switch according to the first VXLAN message; or
所述第二VXLAN报文为所述第二交换机在检测到所述第二交换机的发送队列中存在反向报文时,在所述反向报文的VXLAN隧道头中添加所述第一VXLAN报文的标识信息以及所述类型标志位得到的,所述反向报文为所述第二交换机的发送队列中外层目的互联网协议IP地址为所述第一交换机的IP地址的报文。The second VXLAN packet is: when the second switch detects that there is a reverse packet in the sending queue of the second switch, adding the first VXLAN to the VXLAN tunnel header of the reverse packet. The identifier information of the packet and the type flag are obtained, and the reverse packet is a packet whose outer layer destination Internet Protocol IP address in the sending queue of the second switch is an IP address of the first switch.
结合第三方面的第三种可能的实施方式,在第三方面的第五种可能的实施方式中,所述第一VXLAN报文还包括:类型标志位,所述类型标志位位于所述第一VXLAN报文的VXLAN隧道头的标志字段中,所述类型标志位的值为第二预设值,所述第二预设值用于指示报文类型为请求类型。With reference to the third possible implementation manner of the third aspect, in a fifth possible implementation manner of the third aspect, the first VXLAN message further includes: a type flag bit, where the type flag bit is located in the first In the flag field of the VXLAN tunnel header of a VXLAN message, the value of the type flag bit is a second preset value, and the second preset value is used to indicate that the message type is a request type.
第四方面,提供了一种报文处理装置,所述装置为虚拟可扩展局域网VXLAN中的第二交换机,所述第二交换机与第一交换机之间存在至少两条等价路径,所述装置包括:A fourth aspect provides a message processing apparatus, where the apparatus is a second switch in a virtual scalable local area network (VXLAN), and at least two equal-cost paths exist between the second switch and the first switch, the apparatus include:
第一接收模块,用于通过所述至少两条等价路径中的第一路径接收所述第一交换机发送的第一VXLAN报文;a first receiving module, configured to receive, by using the first path of the at least two equal-cost paths, the first VXLAN packet sent by the first switch;
获取模块,用于根据所述第一VXLAN报文获取第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机所述第二交换机收到所述第一VXLAN报文; An acquiring module, configured to acquire a second VXLAN packet according to the first VXLAN packet, where the second VXLAN packet is used to notify the first switch that the second switch receives the first VXLAN packet;
发送模块,用于向所述第一交换机发送所述第二VXLAN报文,以便于所述第一交换机根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件;a sending module, configured to send the second VXLAN packet to the first switch, so that the first switch determines, according to the second VXLAN packet, whether the first path meets a path switching condition;
第二接收模块,用于在所述第一路径满足路径切换条件时,通过所述至少两条等价路径的第二路径接收所述第一交换机发送的与所述第一VXLAN报文属于同一数据流的后续VXLAN报文。a second receiving module, configured to receive, by the second path of the at least two equal-cost paths, the first switch sent by the first switch and the first VXLAN packet when the first path meets the path switching condition Subsequent VXLAN messages for the data stream.
结合第四方面,在第四方面的第一种可能的实施方式中,所述第一VXLAN报文包括:原始报文和标识信息,所述标识信息用于识别所述第一VXLAN报文,所述第二VXLAN报文包括:类型标志位和所述标识信息,所述类型标志位的值为第一预设值,所述第一预设值用于指示所述第二VXLAN报文的报文类型为响应类型。With reference to the fourth aspect, in a first possible implementation manner of the fourth aspect, the first VXLAN packet includes: an original packet and identifier information, where the identifier information is used to identify the first VXLAN packet, The second VXLAN packet includes: a type flag bit and the identifier information, where the value of the type flag bit is a first preset value, and the first preset value is used to indicate the second VXLAN message. The message type is the response type.
结合第四方面的第一种可能的实施方式,在第四方面的第二种可能的实施方式中,In conjunction with the first possible implementation of the fourth aspect, in a second possible implementation of the fourth aspect,
所述第一VXLAN报文是通过为所述原始报文封装VXLAN隧道头得到的,所述第一VXLAN报文的标识信息携带在所述第一VXLAN报文的VXLAN隧道头的保留字段中;The first VXLAN packet is obtained by encapsulating a VXLAN tunnel header for the original packet, and the identifier information of the first VXLAN packet is carried in a reserved field of a VXLAN tunnel header of the first VXLAN packet.
所述第二VXLAN报文的VXLAN隧道头的保留字段包括所述第一VXLAN报文的标识信息,所述类型标志位携带在所述第二VXLAN报文的VXLAN隧道头的标志字段中。The reserved field of the VXLAN tunnel header of the second VXLAN packet includes the identifier information of the first VXLAN packet, and the type flag is carried in the flag field of the VXLAN tunnel header of the second VXLAN packet.
结合第四方面的第二种可能的实施方式,在第四方面的第三种可能的实施方式中,所述获取模块,包括:With reference to the second possible implementation manner of the fourth aspect, in a third possible implementation manner of the fourth aspect, the acquiring module includes:
生成单元,用于根据所述第一VXLAN报文生成所述第二VXLAN报文;或,a generating unit, configured to generate the second VXLAN packet according to the first VXLAN packet; or
检测封装单元,用于检测所述第二交换机的发送队列中是否存在反向报文,所述反向报文为所述第二交换机的发送队列中外层目的互联网协议IP地址为所述第一交换机的IP地址的报文,在所述发送队列中存在所述反向报文时,在所述反向报文的VXLAN隧道头中添加所述第一VXLAN报文的标识信息以及所述类型标志位得到所述第二VXLAN报文。The detecting and encapsulating unit is configured to detect whether there is a reverse packet in the sending queue of the second switch, where the reverse packet is an IP address of an outer layer destination network in the sending queue of the second switch is the first And adding, in the packet of the IP address of the switch, the identifier information of the first VXLAN packet and the type in the VXLAN tunnel header of the reverse packet when the reverse packet exists in the sending queue. The flag bit gets the second VXLAN message.
结合第四方面的第二种可能的实施方式,或第四方面的第三种可能的实施方式,在第四方面的第四种可能的实施方式中,所述第一VXLAN报文还包括:类型标志位,所述类型标志位位于所述第一VXLAN报文的VXLAN隧道头的标志字段中,所述类型标志位的值为第二预设值,所述第二预设值用于指示报文类型为请求类型,所述装置还包括:With reference to the second possible implementation manner of the fourth aspect, or the third possible implementation manner of the fourth aspect, in the fourth possible implementation manner of the fourth aspect, the first VXLAN message further includes: a type flag, where the type flag is located in a flag field of the VXLAN tunnel header of the first VXLAN message, the value of the type flag is a second preset value, and the second preset value is used to indicate The message type is a request type, and the device further includes:
判断模块,用于判断所述第一VXLAN报文中的类型标志位的值指示的报文类型是 否为请求类型;a judging module, configured to determine that a packet type indicated by a value of a type flag bit in the first VXLAN packet is No as the request type;
触发模块,用于在所述第一VXLAN报文中的类型标志位的值指示的报文类型为请求类型时,触发所述获取模块根据所述第一VXLAN报文获取第二VXLAN报文。The triggering module is configured to: when the packet type indicated by the value of the type flag in the first VXLAN packet is a request type, trigger the acquiring module to acquire the second VXLAN packet according to the first VXLAN packet.
第五方面,提供了一种报文处理系统,所述系统至少包括第一交换机和第二交换机,所述第一交换机与所述第二交换机之间通过IP网络连接,A fifth aspect provides a packet processing system, where the system includes at least a first switch and a second switch, and the first switch and the second switch are connected by using an IP network,
所述第一交换机包括如第三方面所述的报文处理装置;The first switch includes the message processing apparatus according to the third aspect;
所述第二交换机包括如第四方面所述的报文处理装置。The second switch includes the message processing apparatus according to the fourth aspect.
本发明提供的技术方案带来的有益效果是:The beneficial effects brought by the technical solution provided by the invention are:
通过至少两条等价路径中的第一路径向第二交换机发送第一VXLAN报文,接收所述第二交换机根据所述第一VXLAN报文发送的第二VXLAN报文,根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件,若所述第一路径满足路径切换条件,则在接收到与所述第一VXLAN报文属于同一数据流的后续VXLAN报文时,通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文;由于通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文时,实现了对数据流的分流,且能够保证后一个子数据流在前一个子数据流被第二交换机接收后才发送,因此,本发明能够解决现有技术采用预设时间间隔发送子数据流导致的系统性能降低或者报文乱序的问题,达到提高系统性能、避免报文乱序的效果。Transmitting, by the first path of the at least two equal-cost paths, the first VXLAN packet to the second switch, and receiving the second VXLAN packet sent by the second switch according to the first VXLAN packet, according to the second And determining, by the VXLAN packet, whether the first path meets the path switching condition, and if the first path meets the path switching condition, when receiving the subsequent VXLAN packet that belongs to the same data flow as the first VXLAN packet, Transmitting, by the second path of the at least two equal-cost paths, the subsequent VXLAN message to the second switch; transmitting the location to the second switch by using a second path of the at least two equal-cost paths When the VXLAN packet is described, the data stream is offloaded, and the latter sub-data stream is transmitted after the previous sub-data stream is received by the second switch. Therefore, the present invention can solve the prior art adoption of the preset. The problem of system performance degradation or packet out-of-sequence caused by sending sub-streams at time intervals improves the performance of the system and avoids the disorder of packets.
附图说明DRAWINGS
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly described below.
图1是本发明各个实施例所涉及的一种实施环境的示意图;1 is a schematic diagram of an implementation environment involved in various embodiments of the present invention;
图2是本发明一个实施例提供的报文处理方法的流程示意图;2 is a schematic flowchart of a packet processing method according to an embodiment of the present invention;
图3是本发明另一个实施例提供的报文处理方法的流程示意图;3 is a schematic flowchart of a packet processing method according to another embodiment of the present invention;
图4是本发明再一个实施例提供的报文处理方法的流程示意图;4 is a schematic flowchart of a packet processing method according to still another embodiment of the present invention;
图5是本发明一个实施例提供的报文处理装置的框图;FIG. 5 is a block diagram of a message processing apparatus according to an embodiment of the present invention; FIG.
图6是本发明另一个实施例提供的报文处理装置的框图;FIG. 6 is a block diagram of a message processing apparatus according to another embodiment of the present invention; FIG.
图7是本发明再一个实施例提供的报文处理装置的框图;FIG. 7 is a block diagram of a message processing apparatus according to still another embodiment of the present invention; FIG.
图8是本发明又一个实施例提供的报文处理装置的框图;FIG. 8 is a block diagram of a message processing apparatus according to still another embodiment of the present invention; FIG.
图9是本发明一个实施例提供的报文处理装置的框图; FIG. 9 is a block diagram of a message processing apparatus according to an embodiment of the present invention; FIG.
图10是本发明另一个实施例提供的报文处理装置的框图;FIG. 10 is a block diagram of a message processing apparatus according to another embodiment of the present invention; FIG.
图11是本发明一个实施例提供的报文处理系统的结构示意图。FIG. 11 is a schematic structural diagram of a message processing system according to an embodiment of the present invention.
具体实施方式detailed description
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明实施方式作进一步地详细描述。The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings.
请参考图1,其示出了本发明各个实施例所涉及的一种实施环境的示意图。该实施环境提供一种VXLAN网络参考架构100,该VXLAN网络参考架构100可以包括至少两个叶子(leaf)交换机和至少两个骨干(spine)交换机。Please refer to FIG. 1, which shows a schematic diagram of an implementation environment involved in various embodiments of the present invention. The implementation environment provides a VXLAN network reference architecture 100 that can include at least two leaf switches and at least two spine switches.
其中,leaf交换机用于为虚拟主机(英文:virtual machine,简称:VM)、个人计算机(英文:personal computer,简称:PC)、服务器(server)等终端设备提供接入服务,同一VXLAN网络的leaf交换机之间通过IP网络通信,处于不同VXLAN网络的leaf交换机之间也可以进行通信;spine交换机用于对leaf交换机之间的报文进行转发。The leaf switch is used to provide access services for terminal devices such as virtual machines (English: virtual machine, VM), personal computers (personal computers, PCs, servers), and the same VXLAN network. The switch can communicate with each other through the IP network. The leaf switches of different VXLAN networks can also communicate with each other. The spine switch is used to forward packets between the leaf switches.
示例的,在图1中,该至少两个leaf交换机包括leaf交换机120和leaf交换机140,该至少两个spine交换机包括spine交换机160和spine交换机180。本发明实施例假设leaf交换机120为第一交换机,leaf交换机140为第二交换机。For example, in FIG. 1, the at least two leaf switches include a leaf switch 120 and a leaf switch 140, and the at least two spine switches include a spine switch 160 and a spine switch 180. The embodiment of the present invention assumes that the leaf switch 120 is the first switch and the leaf switch 140 is the second switch.
请参考图2,其示出了本发明一个实施例提供的报文处理方法的流程示意图。本实施例中所述报文处理方法由图1所示的第一交换机来执行,所述第一交换机和第二交换机之间存在至少两条等价路径(例如,路径1:第一交换机->骨干交换机160->第二交换机;路径2:第一交换机->骨干交换机180->第二交换机),参见图2,该方法流程具体包括:Referring to FIG. 2, it is a schematic flowchart of a packet processing method according to an embodiment of the present invention. The packet processing method in this embodiment is performed by the first switch shown in FIG. 1, and there are at least two equal-cost paths between the first switch and the second switch (for example, path 1: first switch- > backbone switch 160 -> second switch; path 2: first switch -> backbone switch 180 -> second switch), see Figure 2, the method flow specifically includes:
步骤201,通过所述至少两条等价路径中的第一路径向所述第二交换机发送第一VXLAN报文。Step 201: Send a first VXLAN message to the second switch by using the first path of the at least two equal-cost paths.
步骤202,接收所述第二交换机根据所述第一VXLAN报文发送的第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机所述第二交换机收到所述第一VXLAN报文。Step 202: Receive a second VXLAN message sent by the second switch according to the first VXLAN message, where the second VXLAN message is used to notify the first switch that the second switch receives the first A VXLAN message.
步骤203,根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件。Step 203: Determine, according to the second VXLAN packet, whether the first path meets a path switching condition.
步骤204,如果所述第一路径满足路径切换条件,则在接收到与所述第一VXLAN报文属于同一数据流的后续VXLAN报文时,通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文。 Step 204: If the first path meets the path switching condition, when receiving the subsequent VXLAN message that belongs to the same data flow as the first VXLAN message, pass the second of the at least two equal-cost paths. The path sends the subsequent VXLAN message to the second switch.
本发明实施例提供的报文处理方法,通过至少两条等价路径中的第一路径向第二交换机发送第一VXLAN报文,接收所述第二交换机根据所述第一VXLAN报文发送的第二VXLAN报文,根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件,若所述第一路径满足路径切换条件,则在接收到与所述第一VXLAN报文属于同一数据流的后续VXLAN报文时,通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文;由于通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文时,实现了对数据流的分流,且能够保证后一个子数据流在前一个子数据流被第二交换机接收后才发送,因此,本发明能够解决现有技术采用预设时间间隔发送子数据流导致的系统性能降低或者报文乱序的问题,达到提高系统性能、避免报文乱序的效果。The packet processing method of the embodiment of the present invention sends a first VXLAN message to the second switch through the first path in the at least two equal-cost paths, and receives the second switch according to the first VXLAN message. And determining, by the second VXLAN packet, whether the first path meets a path switching condition according to the second VXLAN packet, and if the first path meets the path switching condition, receiving the packet corresponding to the first VXLAN And sending, by the second path of the at least two equal-cost paths, the subsequent VXLAN message to the second switch, by using the at least two equal-cost paths When the second path sends the subsequent VXLAN message to the second switch, the data stream is offloaded, and the next sub-data stream can be sent after the previous sub-data stream is received by the second switch, so The present invention can solve the problem that the system performance is reduced or the packet is out of order caused by sending the sub-data stream by using the preset time interval in the prior art, thereby improving the system performance and avoiding the disorder of the message. fruit.
进一步地,由于本发明实施例在通过所述至少两条等价路径中的第二路径向所述第二交换机发送后续VXLAN报文,将所述第一路径的负载分担到了第二路径上,因此,本发明还能够提高VXLAN网络中路径负载的均衡性。Further, the embodiment of the present invention distributes the load of the first path to the second path by sending a subsequent VXLAN message to the second switch by using the second path of the at least two equal-cost paths. Therefore, the present invention can also improve the balance of path load in a VXLAN network.
请参考图3,其示出了本发明另一个实施例提供的报文处理方法的流程示意图。本实施例中所述报文处理方法由图1所示的第二交换机来执行,该第二交换机和第一交换机之间存在至少两条等价路径,参见图3,该方法流程具体包括:Please refer to FIG. 3, which is a schematic flowchart diagram of a packet processing method according to another embodiment of the present invention. The packet processing method in this embodiment is performed by the second switch shown in FIG. 1. The second switch and the first switch have at least two equal-cost paths. Referring to FIG. 3, the method includes:
步骤301,通过所述至少两条等价路径中的第一路径接收所述第一交换机发送的第一VXLAN报文。Step 301: Receive, by using the first path of the at least two equal-cost paths, the first VXLAN packet sent by the first switch.
步骤302,根据所述第一VXLAN报文获取第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机所述第二交换机收到所述第一VXLAN报文。Step 302: Acquire a second VXLAN packet according to the first VXLAN packet, where the second VXLAN packet is used to notify the first switch that the second switch receives the first VXLAN packet.
步骤303,向所述第一交换机发送所述第二VXLAN报文,以便于所述第一交换机根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件。Step 303: Send the second VXLAN packet to the first switch, so that the first switch determines, according to the second VXLAN packet, whether the first path meets a path switching condition.
步骤304,在所述第一路径满足路径切换条件时,通过所述至少两条等价路径的第二路径接收所述第一交换机发送的与所述第一VXLAN报文属于同一数据流的后续VXLAN报文。In step 304, when the first path meets the path switching condition, the second path that is sent by the first switch and the first VXLAN packet belongs to the same data stream is received by the second path of the at least two equal-cost paths. VXLAN message.
本发明实施例提供的报文处理方法,通过至少两条等价路径中的第一路径接收第一交换机发送的第一VXLAN报文,根据所述第一VXLAN报文获取并向所述第一交换机发送第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机第二交换机收到所述第一VXLAN报文,以便于所述第一交换机根据所述第二VXLAN报文判断所述 第一路径是否满足路径切换条件并在所述第一路径满足路径切换条件时,通过所述至少两条等价路径的第二路径接收所述第一交换机发送的与所述第一VXLAN报文属于同一数据流的后续VXLAN报文;由于通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文时,实现了对数据流的分流,且能够保证后一个子数据流在前一个子数据流被第二交换机接收后才发送,因此,本发明能够解决现有技术采用预设时间间隔发送子数据流导致的系统性能降低或者报文乱序的问题,达到提高系统性能、避免报文乱序的效果。The packet processing method provided by the embodiment of the present invention receives the first VXLAN packet sent by the first switch by using the first path in the at least two equal-cost paths, and acquires and sends the first VXLAN packet according to the first VXLAN packet. The switch sends a second VXLAN message, where the second VXLAN message is used to notify the first switch that the second switch receives the first VXLAN message, so that the first switch is configured according to the second VXLAN message. Text judgment Whether the first path meets the path switching condition, and when the first path meets the path switching condition, receiving, by the second path of the at least two equal paths, the first VXLAN packet sent by the first switch Subsequent VXLAN messages belonging to the same data stream; when the subsequent VXLAN message is sent to the second switch by using the second path of the at least two equal-cost paths, the data flow is shunted and can be It is ensured that the latter sub-data stream is sent after the previous sub-data stream is received by the second switch. Therefore, the present invention can solve the problem that the system performance is reduced or the message is out of order due to the transmission of the sub-data stream by using the preset time interval in the prior art. The problem is to improve the performance of the system and avoid the disorder of the message.
进一步地,由于本发明实施例在通过所述至少两条等价路径中的第二路径向所述第二交换机发送后续VXLAN报文,将第一路径的负载分担到了所述第二路径上,因此,本发明还能够提高VXLAN网络中路径负载的均衡性。Further, the embodiment of the present invention distributes the load of the first path to the second path by sending a subsequent VXLAN message to the second switch by using the second path of the at least two equal-cost paths. Therefore, the present invention can also improve the balance of path load in a VXLAN network.
请参考图4,其示出了本发明再一个实施例提供的报文处理方法的流程示意图。该报文处理方法应用于图1所示的实施环境中,第一交换机和第二交换机之间存在至少两条等价路径,参见图4,该方法流程具体包括:Please refer to FIG. 4, which is a schematic flowchart diagram of a packet processing method according to still another embodiment of the present invention. The packet processing method is applied to the implementation environment shown in FIG. 1. There are at least two equal-cost paths between the first switch and the second switch. Referring to FIG. 4, the method includes:
步骤401,第一交换机为原始报文封装VXLAN隧道头得到第一VXLAN报文,所述第一VXLAN报文包括:标识信息,所述标识信息用于识别所述第一VXLAN报文。Step 401: The first switch encapsulates the VXLAN tunnel header for the original packet to obtain the first VXLAN packet, where the first VXLAN packet includes: identifier information, where the identifier information is used to identify the first VXLAN packet.
所述第一VXLAN报文还可以包括:类型标志位,所述类型标志位的值用于指示所述VXLAN隧道头所在的报文的报文类型,在本发明实施例中,所述报文类型包括请求类型和响应类型。其中,请求类型的报文是指报文的发送方主动发出的报文,响应类型的报文是报文的发送方需要某种条件触发才能发送的报文。例如,所述第一VXLAN报文是所述第一交换机发送的请求类型的报文,所述第二VXLAN报文是所述第二交换机根据触发条件(接收到所述第一VXLAN报文)发送的响应类型的报文。The first VXLAN packet may further include: a type flag, where the value of the type flag is used to indicate a packet type of the packet where the VXLAN tunnel header is located. In the embodiment of the present invention, the packet is Types include request type and response type. The packet of the request type is the packet sent by the sender of the packet. The packet of the response type is the packet that the sender of the packet needs to trigger before sending a certain condition. For example, the first VXLAN message is a request type message sent by the first switch, and the second VXLAN message is that the second switch receives the first VXLAN message according to a trigger condition. The message of the response type sent.
其中,所述原始报文为所述第一交换机从接入所述第一交换机的第一设备接收的,目的为接入所述第二交换机的第二设备的报文。The original packet is a packet received by the first switch from the first device that accesses the first switch, and is configured to access the second device of the second switch.
在本发明实施例中,VXLAN隧道头可以如下表1所示。In the embodiment of the present invention, the VXLAN tunnel header can be as shown in Table 1 below.
表1Table 1
Figure PCTCN2015081677-appb-000001
Figure PCTCN2015081677-appb-000001
所述VXLAN隧道头依次由标志字段、保留字段1、虚拟可扩展局域网网络标识(英 文:VXLAN Network Identifier,简称:VNI)字段和保留字段2组成,其中,表1中Flags所在字段为所述标志字段,位于所述标志字段之后的Reserved1所在字段为保留字段1,所述虚拟可扩展局域网网络标识所在字段为虚拟可扩展局域网网络标识字段,Reserved2所在字段为所述保留字段2。The VXLAN tunnel header is in turn followed by a flag field, a reserved field 1, and a virtual scalable local area network identifier (English) The VXLAN Network Identifier (VNI) field and the reserved field 2 are composed, wherein the field in which Flags is located in Table 1 is the flag field, and the field in which Reserved1 is located after the flag field is reserved field 1, the virtual The field in which the extended local area network identifier is located is the virtual scalable local area network identification field, and the field in which Reserved2 is located is the reserved field 2.
可选的,所述标志字段的长度通常为8bit(比特位),报文的类型标志位携带在所述标志字段中,具体地,在所述标志字段中,所述标志字段中的第5个比特位为I,I的值需设置为1,表示所述VXLAN隧道头所在的报文有效,本发明实施例采用所述标志字段中的发送位(英文:Send Flag,简称:S)和响应位(英文:Ack Flag,简称:A)构成类型标志位,所述发送位为所述标志字段中的第1个比特位,所述响应位为所述标志字段中的第2个比特位,所述请求类型和所述响应类型由所述类型标志位的值确定,当S=1且A=0时,说明报文类型为请求类型,当S=0且A=1时,说明报文类型为响应类型。Optionally, the length of the flag field is usually 8 bits (bits), and the type flag of the message is carried in the flag field. Specifically, in the flag field, the fifth in the flag field. The value of the bit is I, and the value of I is set to 1, indicating that the message of the VXLAN tunnel header is valid. In the embodiment of the present invention, the sending bit in the flag field (English: Send Flag, S: abbreviation and S) is used. The response bit (English: Ack Flag, abbreviated as A) constitutes a type flag bit, the transmission bit is the first bit in the flag field, and the response bit is the second bit in the flag field. The request type and the response type are determined by the value of the type flag bit. When S=1 and A=0, the message type is the request type. When S=0 and A=1, the description is reported. The text type is the response type.
所述保留字段1的长度通常为24bit,报文的标识信息携带在所述保留字段1中。具体地,在本发明实施例中,所述标识信息如下表2所示,所述标识信息包括:流标识(英文:Flow Identification,简称:Flow ID)和序列号(英文:Sequence ID),所述流标识用于指示所述VXLAN隧道头所在的报文所属的数据流,所述序列号用于指示一个报文的发送序列,所述流标识的长度和所述序列号的长度通常都为12bit。The length of the reserved field 1 is usually 24 bits, and the identifier information of the packet is carried in the reserved field 1. Specifically, in the embodiment of the present invention, the identifier information is as shown in Table 2, and the identifier information includes: a flow identifier (English: Flow Identification, Flow ID for short) and a serial number (English: Sequence ID). The flow identifier is used to indicate a data flow to which the packet of the VXLAN tunnel header belongs, and the sequence number is used to indicate a transmission sequence of a packet, and the length of the flow identifier and the length of the serial number are usually 12bit.
表2Table 2
Flow ID(流标识)Flow ID Sequence ID(序列号)Sequence ID
所述虚拟可扩展局域网网络标识的长度通常为24bit,用于标识虚拟可扩展局域网。所述保留字段2的长度通常为8bit。The virtual scalable local area network identifier is typically 24 bits in length and is used to identify a virtual scalable local area network. The length of the reserved field 2 is usually 8 bits.
在本发明实施例中,主要应用到的是所述VXLAN隧道头中的8bit的所述标志字段和24bit的所述保留字段1。In the embodiment of the present invention, the flag field of 8 bits in the VXLAN tunnel header and the reserved field 1 of 24 bits are mainly applied.
假设当前原始报文为流标识为00000000的数据流中的第一个报文,则第一交换机为所述原始报文封装的所述VXLAN隧道头的类型标志位为10,所述标志字段可以为10001000、所述流标识可以为000000000000、所述序列号可以为000000000001,也即,在表1所示的VXLAN隧道头中,8bit的Flags的值为10001000,24bit的Reserved的值为000000000000000000000001,当第一交换机为所述原始报文封装VXLAN隧道头后,第一交换机得到所述第一VXLAN报文,则10即为所述第一VXLAN报文的类型标志位的值,000000000000000000000001即为所述第一VXLAN报文的标识信息。 Assume that the current original packet is the first packet in the data stream whose stream identifier is 000000000, and the type flag of the VXLAN tunnel header encapsulated by the first switch for the original packet is 10, and the flag field may be 10001000, the flow identifier may be 000000000000, and the serial number may be 000000001, that is, in the VXLAN tunnel header shown in Table 1, the value of the 8-bit Flags is 10001000, and the value of the 24-bit Reserved is 000000000000000000000001. After the first switch encapsulates the VXLAN tunnel header for the original packet, the first switch obtains the first VXLAN packet, and 10 is the value of the type flag of the first VXLAN packet, where 000000000000000000000001 is Identification information of the first VXLAN packet.
步骤402,所述第一交换机通过至少两条等价路径中的第一路径向第二交换机发送所述第一VXLAN报文。Step 402: The first switch sends the first VXLAN message to the second switch by using the first path of the at least two equal-cost paths.
在所述第一交换机得到所述第一VXLAN报文后,所述第一交换机通过与所述第二交换机之间的至少两条等价路径中的第一路径向所述第二交换机发送所述第一VXLAN报文。After the first switch obtains the first VXLAN packet, the first switch sends the first path to the second switch by using a first path of at least two equal paths between the first switch and the second switch. The first VXLAN message is described.
其中,所述第一路径为所述至少两条等价路径中的任意一条路径。The first path is any one of the at least two equal-cost paths.
步骤403,所述第一交换机在所述第一交换机的发送表中记录所述第一VXLAN报文的标识信息。Step 403: The first switch records the identifier information of the first VXLAN packet in the sending table of the first switch.
所述发送表的每个表项包括数据流的标识与所述第一交换机发送的属于所述数据流的VXLAN报文的序列号。其中,所述第一交换机在发送某个数据流的第一个VXLAN报文时,在所述发送表中添加一个表项,所述表项包括所述数据流的流标识以及所述第一个VXLAN报文的序列号的对应关系。所述记录所述第一VXLAN报文的标识信息,具体包括:记录所述第一VLAN报文所属的数据流的流标识与所述第一VXLAN报文的序列号的对应关系。并且,所述发送表中针对每个数据流只建立一个表项,当所述第一交换机发送所述数据流的后续VXLAN报文时,只需要根据所述后续VXLAN报文更新所述表项中的序列号即可。Each entry of the sending table includes an identifier of the data stream and a sequence number of the VXLAN packet that is sent by the first switch and belongs to the data stream. The first switch adds an entry in the sending table when the first VXLAN packet of the data stream is sent, where the entry includes the flow identifier of the data stream and the first Correspondence between serial numbers of VXLAN messages. The recording the identifier information of the first VXLAN packet includes: recording a correspondence between a stream identifier of the data stream to which the first VLAN packet belongs and a sequence number of the first VXLAN packet. And, in the sending table, only one entry is set for each data flow, and when the first switch sends the subsequent VXLAN message of the data flow, only the entry is updated according to the subsequent VXLAN message. The serial number in it can be.
比如,如果所述第一VLAN报文为数据流000000000000的第一个VXLAN报文,所述第一交换机在所述第一交换机的发送表中添加一个表项(Flow ID:000000000000,Sequence ID:000000000001)。For example, if the first VLAN packet is the first VXLAN packet of the data stream 000000000000, the first switch adds an entry in the sending table of the first switch (Flow ID: 000000000000, Sequence ID: 000000000001).
步骤404,在所述第二交换机接收到所述第一交换机发送的所述第一VXLAN报文后,所述第二交换机判断所述第一VXLAN报文中的类型标志位的值指示的报文类型是否为请求类型。Step 404, after the second switch receives the first VXLAN message sent by the first switch, the second switch determines a report indicating a value of a type flag bit in the first VXLAN message. Whether the text type is a request type.
具体地,所述第二交换机判断所述第一VXLAN报文中的类型标志位的值是否为第二预设值,当所述第一VXLAN报文中的类型标志位的值为第二预设值时,所述第二交换机确定所述第一VXLAN报文的类型为请求类型。Specifically, the second switch determines whether the value of the type flag bit in the first VXLAN message is a second preset value, and the value of the type flag bit in the first VXLAN message is a second pre-predetermined value. When the value is set, the second switch determines that the type of the first VXLAN message is a request type.
由上述步骤401中的描述可知,所述第一VXLAN报文中的类型标志位为SA,S=1且A=0时,报文类型为请求类型,则该第二预设值可以为10。因此,所述第二交换机可以根据类型标志位SA的值是否为10来判断所述第一VXLAN报文的类型是否为请求类型。According to the description in the foregoing step 401, when the type flag in the first VXLAN message is SA, S=1, and A=0, the message type is the request type, and the second preset value may be 10 . Therefore, the second switch may determine whether the type of the first VXLAN message is a request type according to whether the value of the type flag SA is 10.
由于所述第一VXLAN报文的类型标志位SA的值为第二预设值10,因此,所述第 二交换机确定所述第一VXLAN报文的类型为请求类型。The value of the type flag SA of the first VXLAN packet is a second preset value of 10, therefore, the The second switch determines that the type of the first VXLAN message is a request type.
步骤405,如果所述第一VXLAN报文中的类型标志位的值指示的报文类型为请求类型,则所述第二交换机根据所述第一VXLAN报文获取第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机所述第二交换机收到所述第一VXLAN报文。Step 405: If the packet type indicated by the value of the type flag in the first VXLAN packet is the request type, the second switch acquires the second VXLAN packet according to the first VXLAN packet, The second VXLAN packet is used to notify the first switch that the second switch receives the first VXLAN packet.
其中,所述第二VXLAN报文包括:类型标志位和标识信息,所述类型标志位的值为第一预设值,所述第一预设值用于指示所述第二VXLAN报文的报文类型为响应类型。The second VXLAN packet includes: a type flag bit and identifier information, where the value of the type flag bit is a first preset value, and the first preset value is used to indicate the second VXLAN message. The message type is the response type.
由于所述第二VXLAN报文用于通知所述第一交换机所述第二交换机收到所述第一VXLAN报文,因此,所述第二VXLAN报文的报文类型为响应类型,且所述第二VXLAN报文的标识信息为所述第一VXLAN报文的标识信息,也即,第二VXLAN报文的类型标志位为01,标识信息为000000000000000000000001。The second VXLAN packet is used to notify the first switch that the second switch receives the first VXLAN packet, and therefore, the packet type of the second VXLAN packet is a response type, and The identifier information of the second VXLAN packet is the identifier information of the first VXLAN packet, that is, the type flag of the second VXLAN packet is 01, and the identifier information is 000000000000000000000001.
在本发明实施例中,所述第二交换机根据所述第一VXLAN报文获取所述第二VXLAN报文时,包括两种获取方式:In the embodiment of the present invention, when the second switch acquires the second VXLAN packet according to the first VXLAN packet, the method includes two acquisition modes:
第一种方式:所述第二交换机根据所述第一VXLAN报文生成所述第二VXLAN报文。The first mode: the second switch generates the second VXLAN packet according to the first VXLAN message.
其中,生成的所述第二VXLAN报文为专门用于通知所述第一交换机所述第二交换机收到所述第一VXLAN报文的报文,所述第二VXLAN报文包括VXLAN隧道头,所述VXLAN隧道头包括的类型标志位为01、标识信息为000000000000000000000001。The generated second VXLAN packet is specifically used to notify the first switch that the second switch receives the first VXLAN packet, and the second VXLAN packet includes a VXLAN tunnel header. The VXLAN tunnel header includes a type flag of 01 and an identification information of 000000000000000000000001.
第二种方式:所述第二交换机检测所述第二交换机的发送队列中是否存在反向报文,所述反向报文为所述第二交换机的发送队列中外层IP地址为所述第一交换机的IP地址的报文,在所述发送队列中所述存在反向报文时,所述第二交换机在所述反向报文的VXLAN隧道头中添加所述第一VXLAN报文的标识信息以及类型标志位得到所述第二VXLAN报文。The second mode: the second switch detects whether there is a reverse packet in the sending queue of the second switch, and the reverse packet is an outer IP address in the sending queue of the second switch. The second switch adds the first VXLAN message to the VXLAN tunnel header of the reverse packet when the reverse packet is sent in the sending queue. The identification information and the type flag bit obtain the second VXLAN message.
具体地,所述第二交换机根据所述第一VXLAN报文中的外层源IP地址,在所述第二交换机的发送队列进行查找,当查找到所述第二交换机的发送队列中存在外层目的IP地址为所述第一VXLAN报文中的外层源IP地址的报文时,所述第二交换机对该报文进行VXLAN封装,并将所述VXLAN隧道头中的类型标志位SA设置为01,将所述VXLAN隧道头中的保留字段1设置为000000000000000000000001得到所述第二VXLAN报文。Specifically, the second switch performs a lookup in the sending queue of the second switch according to the outer source IP address in the first VXLAN packet, and finds that the sending queue of the second switch exists. When the destination IP address is the packet of the outer source IP address in the first VXLAN packet, the second switch performs VXLAN encapsulation on the packet, and sets the type flag SA in the VXLAN tunnel header. Set to 01, the reserved field 1 in the VXLAN tunnel header is set to 000000000000000000000001 to obtain the second VXLAN message.
需要说明的是,若所述第二交换机的发送队列中存在多个外层目的IP地址为第一交换机的IP地址的报文,则所述第二交换机可以在所述多个外层目的IP地址为第一交 换机的IP地址的报文中任选一个报文,对所述报文进行封装得到所述第二VXLAN报文,优选地,所述第二交换机根据所述多个目的IP地址为第一交换机的IP地址的报文中的第一个待发送的报文得到所述第二VXLAN报文。It should be noted that, if there are multiple packets whose outer IP address is the IP address of the first switch in the sending queue of the second switch, the second switch may be in the multiple outer destination IP addresses. Address is first Selecting a packet in the packet of the IP address of the switch, and encapsulating the packet to obtain the second VXLAN packet. Preferably, the second switch is first according to the multiple destination IP addresses. The first packet to be sent in the packet of the IP address of the switch obtains the second VXLAN packet.
本发明实施例提供的报文处理方法,第二交换机在检测到所述第二交换机的发送队列中存在反向报文时,在所述反向报文的VXLAN隧道头中添加所述第一VXLAN报文的标识信息以及类型标志位得到所述第二VXLAN报文,由于所述第二交换机无需生成新的报文,因此,在实现通知所述第一交换机所述第二交换机收到所述第一VXLAN报文的同时,减小了对所述第二交换机系统资源的占用。In the packet processing method provided by the embodiment of the present invention, when the second switch detects that there is a reverse packet in the sending queue of the second switch, the first switch adds the first in the VXLAN tunnel header of the reverse packet. The second VXLAN packet is obtained by the identifier information of the VXLAN packet and the type flag. The second switch does not need to generate a new packet. Therefore, the second switch receives the notification from the first switch. While the first VXLAN packet is described, the occupation of the second switch system resource is reduced.
步骤406,所述第二交换机向所述第一交换机发送所述第二VXLAN报文。Step 406: The second switch sends the second VXLAN packet to the first switch.
比如,所述第二交换机向所述第一交换机发送标志字段为01001000,保留字段1的标识信息为000000000000000000000001的第二VXLAN报文。For example, the second switch sends a second VXLAN message whose flag field is 01001000 to the first switch, and the identifier information of the field 1 is 000000000000000000000001.
步骤407,在所述第一交换机接收到所述第二交换机发送的第二VXLAN报文后,所述第一交换机根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件。Step 407: After the first switch receives the second VXLAN message sent by the second switch, the first switch determines, according to the second VXLAN message, whether the first path meets a path switching condition.
其中,所述路径切换条件可以包括:时间切换条件和状态切换条件。The path switching condition may include: a time switching condition and a state switching condition.
示例的,所述第一交换机可以根据所述第二VXLAN报文的标识信息与所述第一报文的标识信息是否相同来判断所述第一路径是否满足时间切换条件,当所述第二VXLAN报文的标识信息与所述第一报文的标识信息相同时,说明所述第一路径满足时间切换条件,所述时间切换条件是指:所述第一交换机接收到了所述第二交换机收到所述第一VXLAN报文的通知报文,即所述第二VXLAN报文,此时,所述第一VXLAN报文与后续的首个VXLAN报文之间的时间间隔满足了发送的时间间隔要求。采用所述时间切换条件的判断能够有效保证数据流中报文的时序性。For example, the first switch may determine, according to whether the identifier information of the second VXLAN packet is the same as the identifier information of the first packet, whether the first path meets a time switching condition, and when the second switch When the identifier information of the VXLAN packet is the same as the identifier information of the first packet, the first path meets the time switch condition, and the time switch condition is that the first switch receives the second switch. Receiving the notification message of the first VXLAN message, that is, the second VXLAN message, the time interval between the first VXLAN message and the subsequent first VXLAN message is satisfied. Interval requirements. The determination of the time switching condition can effectively ensure the timing of the message in the data stream.
具体地,所述第一交换机判断所述第二VXLAN报文中的类型标志位的值是否为第一预设值,所述第一预设值用于指示所述第二VXLAN报文的报文类型为响应类型,当所述第二VXLAN报文中的类型标志位的值为所述第一预设值时,所述第一交换机确定所述第二VXLAN报文的类型为响应类型,进而所述第一交换机判断所述第二VXLAN报文中的标识信息与发送表中的第一VXLAN报文的标识信息是否相同,当所述第二VXLAN报文的标识信息与所述第一VXLAN报文的标识信息相同时,说明所述第二交换机已经收到所述第一VXLAN报文,此时所述第一路径满足所述时间切换条件。Specifically, the first switch determines whether the value of the type flag bit in the second VXLAN packet is a first preset value, where the first preset value is used to indicate the report of the second VXLAN packet. The type of the message is a response type. When the value of the type flag in the second VXLAN packet is the first preset value, the first switch determines that the type of the second VXLAN packet is a response type. And the first switch determines whether the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet in the sending table, and the identifier information of the second VXLAN packet is the first When the identifier information of the VXLAN packet is the same, the second switch has received the first VXLAN packet, and the first path meets the time switch condition.
由上述步骤401中的描述可知,当S=0且A=1时,所述报文类型为响应类型,因此,所述第一预设值可以为01,所述第一交换机可以根据类型标志位SA的是否为01 来判断所述第二VXLAN报文的类型是否为响应类型。It can be seen from the description in the above step 401 that when S=0 and A=1, the message type is a response type. Therefore, the first preset value may be 01, and the first switch may be based on the type flag. Is the bit SA a 01? It is determined whether the type of the second VXLAN message is a response type.
由于所述第二VXLAN报文中的标志字段为01001000,也即,所述第二VXLAN报文的类型标志位SA的值为所述第一预设值01,因此,所述第一交换机确定所述第二VXLAN报文的类型为响应类型,所述第一交换机判断所述第二VXLAN报文中的标识信息与所述发送表中的第一VXLAN报文的标识信息是否相同,由于所述第二VXLAN报文中的标识信息为000000000000000000000001,与步骤403中所述第一交换机记录的标识信息000000000000000000000001相同,因此,所述第一交换机确定所述第一路径满足时间切换条件。The value of the type flag of the second VXLAN packet is the first preset value 01, so that the first switch determines that the flag field in the second VXLAN packet is 01001000. The type of the second VXLAN packet is a response type, and the first switch determines whether the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet in the sending table, The identifier information in the second VXLAN packet is 000000000000000000000001, which is the same as the identifier information 000000000000000000000001 recorded by the first switch in step 403. Therefore, the first switch determines that the first path meets a time switch condition.
当所述第一交换机确定所述第一路径满所述时间切换条件时,所述第一交换机判断所述第一路径是否满足所述状态切换条件,其中,所述状态切换条件是由所述第一交换机根据配置策略决策的,比如,所述第一交换机可以根据所述第一路径的带宽利用率判断所述第一路径是否拥堵,若所述第一路径拥堵,则所述第一路径满足所述状态切换条件,再比如,所述第一交换机还可以根据所述至少两条等价路径中各个路径的负载是否均衡来决定是否进行路径切换,若所述至少两条等价路径中各个路径的负载不均衡,则所述第一路径满足所述状态切换条件。When the first switch determines that the first path is full of the time switching condition, the first switch determines whether the first path meets the state switching condition, where the state switching condition is The first switch is determined according to the configuration policy. For example, the first switch may determine, according to the bandwidth utilization of the first path, whether the first path is congested. If the first path is congested, the first path is And satisfying the state switching condition, for example, the first switch may further determine whether to perform path switching according to whether the load of each path in the at least two equal-cost paths is equalized, if the at least two equal-cost paths are The load of each path is not balanced, and the first path satisfies the state switching condition.
当所述第一交换机确定所述第一路径同时满足时间切换条件和状态切换条件时,所述第一交换机进行路径切换。When the first switch determines that the first path satisfies the time switching condition and the state switching condition simultaneously, the first switch performs path switching.
需要说明的是,在本发明实施例提供的报文处理方法中,所述第一交换机通过先判断所述第二VXLAN报文的报文类型是否为响应类型,在所述第二VXLAN报文的报文类型为响应类型时,所述第一交换机判断所述第二VXLAN报文中的标识信息与所述发送表中的第一VXLAN报文的标识信息是否相同,简化了操作步骤。It should be noted that, in the packet processing method provided by the embodiment of the present invention, the first switch determines whether the packet type of the second VXLAN packet is a response type, and the second VXLAN packet. When the packet type is the response type, the first switch determines whether the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet in the sending table, which simplifies the operation steps.
步骤408,如果所述第一路径满足路径切换条件,则所述第一交换机在接收到与所述第一VXLAN报文属于同一数据流的后续VXLAN报文时,通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文。Step 408: If the first path meets the path switching condition, the first switch passes the at least two equivalents when receiving the subsequent VXLAN message that belongs to the same data flow as the first VXLAN message. The second path in the path sends the subsequent VXLAN message to the second switch.
若在步骤407中所述第一交换机确定所述第一路径满足路径切换条件,则所述第一交换机在接收到与所述第一VXLAN报文属于同一数据流的后续VXLAN报文时,所述第一交换机通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文。If the first switch determines that the first path meets the path switching condition in step 407, the first switch receives the subsequent VXLAN message that belongs to the same data stream as the first VXLAN message. The first switch sends the subsequent VXLAN message to the second switch by using a second path of the at least two equal-cost paths.
其中,所述第二路径为该至少两条等价路径中除第一路径之外的任意一条路径。The second path is any one of the at least two equal-cost paths except the first path.
步骤409,在所述第一路径满足路径切换条件时,所述第二交换机通过所述至少两 条等价路径的所述第二路径接收所述第一交换机发送的与所述第一VXLAN报文属于同一数据流的所述后续VXLAN报文。Step 409, when the first path meets the path switching condition, the second switch passes the at least two The second path of the equal-cost path receives the subsequent VXLAN message that is sent by the first switch and belongs to the same data stream as the first VXLAN message.
在所述第一交换机通过所述至少两条等价路径的所述第二路径向所述第二交换机发送与所述第一VXLAN报文属于同一数据流的所述后续VXLAN报文时,所述第二交换机通过所述第二路径接收所述第一交换机发送的与第一VXLAN报文属于同一数据流的所述后续VXLAN报文。When the first switch sends the subsequent VXLAN message belonging to the same data stream as the first VXLAN message to the second switch by using the second path of the at least two equal-cost paths, The second switch receives, by using the second path, the subsequent VXLAN packet that is sent by the first switch and belongs to the same data stream as the first VXLAN packet.
需要说明的是,在本发明实施例中,第一交换机在为报文封装VXLAN隧道头时,后一VXLAN报文的序列号是在前一VXLAN报文的序列号的基础上进行累加得到的,即,第一交换机在封装后一VXLAN报文的VXLAN隧道头时,将前一VXLAN报文的序列号加1,得到后一VXLAN报文的序列号,比如,第一交换机在封装第一VXLAN报文的VXLAN隧道头时,所述第一VXLAN报文的序列号为:000000000001,则第一交换机在封装所述第一VXLAN报文所属数据流的后续报文时,在所述第一VXLAN报文的序列号的基础上加1得到所述第一VXLAN报文的第一后续VXLAN报文的序列号000000000010,第一交换机在封装所述数据流的第三个VXLAN报文时,按照上述方法依次类推。由于VXLAN报文的序列号为12bit,对于大象流等持续时间较长的数据流来说,累加可能会导致VXLAN报文的序列号溢出,因此,在本发明实施例中,所述第一交换机在接收到的所述第二VXLAN报文中的标识信息与所述第一VXLAN报文的标识信息相同时,如果所述第一路径不满足路径切换条件,所述第一交换机清空发送表中记录的所述第一VXLAN报文的标识信息。其中,所述清空发送表中记录的所述第一VXLAN报文的标识信息是指将后续属于所述数据流的首个VXLAN报文的标识信息中的序列号设置为0。在另一种实施方式中,所述第一路径满足路径切换条件,为了保证所述第一交换机的存储空间能够有效利用,所述第一交换机在所述第二VXLAN报文中的标识信息与所述第一VXLAN报文的标识信息相同时,从所述发送表中删除包括所述第一VXLAN报文的标识信息的表项。It should be noted that, in the embodiment of the present invention, when the first switch encapsulates the VXLAN tunnel header for the packet, the sequence number of the latter VXLAN packet is accumulated based on the sequence number of the previous VXLAN packet. That is, when the first switch encapsulates the VXLAN tunnel header of a VXLAN message, the first VXLAN packet sequence number is incremented by one to obtain the sequence number of the latter VXLAN packet. For example, the first switch is in the package first. In the VXLAN tunnel header of the VXLAN packet, the sequence number of the first VXLAN packet is: 000000000001, and the first switch encapsulates the subsequent packet of the data flow to which the first VXLAN packet belongs. Adding 1 to the sequence number of the VXLAN packet to obtain the sequence number of the first VXLAN packet of the first VXLAN packet is 000000000010, and the first switch encapsulates the third VXLAN packet of the data stream according to the sequence. The above methods are analogous. The sequence number of the VXLAN packet is 12 bits. For a data stream with a long duration such as an elephant stream, the accumulation may cause the sequence number of the VXLAN packet to overflow. Therefore, in the embodiment of the present invention, the first When the identifier information of the second VXLAN packet is the same as the identifier information of the first VXLAN packet, if the first path does not meet the path switching condition, the first switch clears the sending table. Identification information of the first VXLAN message recorded in the record. The clearing of the identifier information of the first VXLAN packet recorded in the sending table refers to setting the sequence number in the identifier information of the first VXLAN packet that belongs to the data stream to 0. In another implementation manner, the first path meets a path switching condition, and the identifier information of the first switch in the second VXLAN packet is used to ensure that the storage space of the first switch can be effectively utilized. When the identifier information of the first VXLAN packet is the same, the entry including the identifier information of the first VXLAN packet is deleted from the sending table.
在另一种实施方式中,若所述第一交换机接收到的所述第二VXLAN报文中的标识信息与所述第一VXLAN报文的标识信息不相同,并且所述第一交换机在发送表中存储的第一VXLAN报文的标识信息表明第一VXLAN报文所属的数据流的已发送报文的个数超过预设值时,所述第一交换机将发送表中存储的第一VXLAN报文的序列号置为0,并且,所述第一交换机在接收到与所述第一VXLAN报文属于同一数据流的后续VXLAN报文时,通过所述第一路径发送所述后续VXLAN报文。 In another embodiment, if the identifier information in the second VXLAN packet received by the first switch is different from the identifier information of the first VXLAN packet, and the first switch is sending When the identifier information of the first VXLAN packet stored in the table indicates that the number of sent packets of the data flow to which the first VXLAN packet belongs exceeds a preset value, the first switch sends the first VXLAN stored in the table. The sequence number of the message is set to 0, and the first switch sends the subsequent VXLAN message through the first path when receiving the subsequent VXLAN message that belongs to the same data stream as the first VXLAN message. Text.
由于所述第一交换机在确定所述第二VXLAN报文的标识信息与发送表记录的所述第一VXLAN报文的标识信息相同,所述第一交换机从所述发送表中删除包括所述第一VXLAN报文的标识信息的表项,以及所述第一交换机在所述发送表中记录的所述第一VXLAN报文的标识信息表明所述第一VXLAN报文所属的数据流的已发送报文的个数超过预设值时,所述第一交换机清空所述发送表中记录的所述第一VXLAN报文的标识信息,因此,节省了第一交换机的存储空间。And deleting, by the first switch, that the identifier information of the second VXLAN packet is the same as the identifier information of the first VXLAN packet that is recorded in the sending table, where the first switch deletes from the sending table, An entry of the identifier information of the first VXLAN packet, and the identifier information of the first VXLAN packet that is recorded by the first switch in the sending table, indicating that the data flow to which the first VXLAN packet belongs When the number of the sent packets exceeds the preset value, the first switch clears the identifier information of the first VXLAN packet recorded in the sending table, thereby saving the storage space of the first switch.
还需要说明的是,若所述第一交换机接收到的所述第二VXLAN报文中的标识信息与所述第一VXLAN报文的标识信息不相同,则表明所述第二VXLAN报文不是所述第一VLXAN报文对应的通知报文,所述第一路径上仍然有所述第一交换机发送的VXLAN报文,所述第一路径不满足路径切换条件,此时,所述第一交换机在接收到与第一VXLAN报文属于同一数据流的后续VXLAN报文时,所述第一交换机通过所述第一路径发送所述后续VXLAN报文。It should be noted that, if the identifier information in the second VXLAN packet received by the first switch is different from the identifier information of the first VXLAN packet, the second VXLAN packet is not The first VLXAN packet corresponds to the notification packet, and the first path still has the VXLAN packet sent by the first switch, and the first path does not meet the path switching condition. When the switch receives the subsequent VXLAN packet that belongs to the same data stream as the first VXLAN packet, the first switch sends the subsequent VXLAN packet by using the first path.
本发明实施例提供的报文处理方法步骤的先后顺序可以进行适当调整,步骤也可以根据情况进行相应增减,示例地,在本发明实施例中,步骤403和步骤404是按照先后顺序进行的,事实上在本发明提供的其他实施例中,该步骤403和步骤404还可以颠倒,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化的方法,都应涵盖在本发明的保护范围之内,因此不再赘述。The sequence of the steps of the packet processing method provided by the embodiment of the present invention may be appropriately adjusted, and the steps may be correspondingly increased or decreased according to the situation. For example, in the embodiment of the present invention, step 403 and step 404 are performed in sequence. In the other embodiments provided by the present invention, the steps 403 and 404 may be reversed. Any person skilled in the art can easily think of the change within the scope of the technology disclosed in the present invention. It is within the scope of the present invention and therefore will not be described again.
本发明实施例提供的报文处理方法,通过至少两条等价路径中的第一路径向第二交换机发送第一VXLAN报文,接收所述第二交换机根据所述第一VXLAN报文发送的第二VXLAN报文,根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件,若所述第一路径满足路径切换条件,则在接收到与所述第一VXLAN报文属于同一数据流的后续VXLAN报文时,通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文;由于通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文时,实现了对数据流的分流,且能够保证后一个子数据流在前一个子数据流被第二交换机接收后才发送,因此,本发明能够解决现有技术采用预设时间间隔发送子数据流导致的系统性能降低或者报文乱序的问题,达到提高系统性能、避免报文乱序的效果。The packet processing method of the embodiment of the present invention sends a first VXLAN message to the second switch through the first path in the at least two equal-cost paths, and receives the second switch according to the first VXLAN message. And determining, by the second VXLAN packet, whether the first path meets a path switching condition according to the second VXLAN packet, and if the first path meets the path switching condition, receiving the packet corresponding to the first VXLAN And sending, by the second path of the at least two equal-cost paths, the subsequent VXLAN message to the second switch, by using the at least two equal-cost paths When the second path sends the subsequent VXLAN message to the second switch, the data stream is offloaded, and the next sub-data stream can be sent after the previous sub-data stream is received by the second switch, so The present invention can solve the problem that the system performance is reduced or the packet is out of order caused by sending the sub-data stream by using the preset time interval in the prior art, thereby improving the system performance and avoiding the disorder of the message. fruit.
进一步地,由于本发明实施例在通过至少所述两条等价路径中的第二路径向所述第二交换机发送后续VXLAN报文,将所述第一路径的负载分担到了第二路径上,因此,本发明还能够提高VXLAN网络中路径负载的均衡性。 Further, the embodiment of the present invention distributes the load of the first path to the second path by sending a subsequent VXLAN message to the second switch by using the second path of the at least two equal-cost paths. Therefore, the present invention can also improve the balance of path load in a VXLAN network.
进一步地,由于本发明实施例在确定达到路径切换条件时就可以进行路径切换,因此,相比于现有技术,本发明实施例在切换后形成子数据流,各个子数据流的大小灵活确定,且本发明实施例通过切换对持续时间较长的数据流分流时,形成的子数据流更均匀,更有效的实现了各个等价路径的负载均衡。Further, the embodiment of the present invention can perform path switching when it is determined that the path switching condition is reached. Therefore, compared with the prior art, the embodiment of the present invention forms a sub-data stream after the handover, and the size of each sub-data stream is flexibly determined. In the embodiment of the present invention, when the data stream is divided for a long duration, the formed sub-data stream is more uniform, and load balancing of each equal-cost path is more effectively implemented.
请参考图5,其示出了本发明一个实施例提供的报文处理装置500的框图。所述报文处理装置500可以通过软件、硬件或者两者的结合实现图1所示实施环境中的第一交换机的部分或者全部功能。所述第一交换机与第二交换机之间存在至少两条等价路径,所述报文处理装置500可以包括:第一发送模块510、接收模块520、判断模块530和第二发送模块540。Please refer to FIG. 5, which shows a block diagram of a message processing apparatus 500 according to an embodiment of the present invention. The message processing apparatus 500 can implement some or all of the functions of the first switch in the implementation environment shown in FIG. 1 by software, hardware, or a combination of both. The at least two equal-cost paths exist between the first switch and the second switch. The packet processing apparatus 500 may include: a first sending module 510, a receiving module 520, a determining module 530, and a second sending module 540.
所述第一发送模块510,用于通过所述至少两条等价路径中的第一路径向所述第二交换机发送第一VXLAN报文。The first sending module 510 is configured to send, by using the first path of the at least two equal-cost paths, the first VXLAN packet to the second switch.
所述接收模块520,用于接收所述第二交换机根据所述第一VXLAN报文发送的第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机所述第二交换机收到所述第一VXLAN报文。The receiving module 520 is configured to receive a second VXLAN packet sent by the second switch according to the first VXLAN packet, where the second VXLAN packet is used to notify the first switch of the second switch Receiving the first VXLAN message.
所述判断模块530,用于根据所述接收模块520接收到的所述第二VXLAN报文判断所述第一路径是否满足路径切换条件。The determining module 530 is configured to determine, according to the second VXLAN message received by the receiving module 520, whether the first path meets a path switching condition.
所述第二发送模块540,用于在所述判断模块530判断得所述第一路径满足路径切换条件且接收到与所述第一VXLAN报文属于同一数据流的后续VXLAN报文时,通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文。The second sending module 540 is configured to: when the determining module 530 determines that the first path meets a path switching condition and receives a subsequent VXLAN message that belongs to the same data flow as the first VXLAN message, The second path of the at least two equal-cost paths sends the subsequent VXLAN message to the second switch.
本发明实施例提供的报文处理装置,通过至少两条等价路径中的第一路径向第二交换机发送第一VXLAN报文,接收所述第二交换机根据所述第一VXLAN报文发送的第二VXLAN报文,根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件,若所述第一路径满足路径切换条件,则在接收到与所述第一VXLAN报文属于同一数据流的后续VXLAN报文时,通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文;由于通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文时,实现了对数据流的分流,且能够保证后一个子数据流在前一个子数据流被第二交换机接收后才发送,因此,本发明能够解决现有技术采用预设时间间隔发送子数据流导致的系统性能降低或者报文乱序的问题,达到提高系统性能、避免报文乱序的效果。 The packet processing apparatus provided by the embodiment of the present invention sends a first VXLAN message to the second switch by using the first path of the at least two equal-cost paths, and receives the second switch according to the first VXLAN message. And determining, by the second VXLAN packet, whether the first path meets a path switching condition according to the second VXLAN packet, and if the first path meets the path switching condition, receiving the packet corresponding to the first VXLAN And sending, by the second path of the at least two equal-cost paths, the subsequent VXLAN message to the second switch, by using the at least two equal-cost paths When the second path sends the subsequent VXLAN message to the second switch, the data stream is offloaded, and the next sub-data stream can be sent after the previous sub-data stream is received by the second switch, so The present invention can solve the problem that the system performance is reduced or the packet is out of order caused by sending the sub-data stream by using the preset time interval in the prior art, thereby improving the system performance and avoiding the disorder of the message. fruit.
进一步地,由于本发明实施例在通过所述至少两条等价路径中的第二路径向所述第二交换机发送后续VXLAN报文,将所述第一路径的负载分担到了第二路径上,因此,本发明还能够提高VXLAN网络中路径负载的均衡性。Further, the embodiment of the present invention distributes the load of the first path to the second path by sending a subsequent VXLAN message to the second switch by using the second path of the at least two equal-cost paths. Therefore, the present invention can also improve the balance of path load in a VXLAN network.
请参考图6,其示出了本发明另一个实施例提供的报文处理装置600的框图。所述报文处理装置600可以通过软件、硬件或者两者的结合实现图1所示实施环境中的第一交换机的部分或者全部功能。所述第一交换机与第二交换机之间存在至少两条等价路径,所述报文处理装置600可以包括:第一发送模块610、接收模块620、判断模块630和第二发送模块640。Please refer to FIG. 6, which shows a block diagram of a message processing apparatus 600 according to another embodiment of the present invention. The message processing apparatus 600 may implement some or all of the functions of the first switch in the implementation environment shown in FIG. 1 by software, hardware, or a combination of both. The at least two equal-cost paths exist between the first switch and the second switch. The packet processing apparatus 600 may include: a first sending module 610, a receiving module 620, a determining module 630, and a second sending module 640.
所述第一发送模块610,用于通过所述至少两条等价路径中的第一路径向所述第二交换机发送第一VXLAN报文。The first sending module 610 is configured to send, by using the first path of the at least two equal-cost paths, the first VXLAN packet to the second switch.
所述接收模块620,用于接收所述第二交换机根据所述第一VXLAN报文发送的第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机所述第二交换机收到所述第一VXLAN报文。The receiving module 620 is configured to receive a second VXLAN packet sent by the second switch according to the first VXLAN packet, where the second VXLAN packet is used to notify the first switch of the second switch Receiving the first VXLAN message.
所述判断模块630,用于根据所述接收模块620接收到的所述第二VXLAN报文判断所述第一路径是否满足路径切换条件。The determining module 630 is configured to determine, according to the second VXLAN message received by the receiving module 620, whether the first path meets a path switching condition.
所述第二发送模块640,用于在所述判断模块630判断得所述第一路径满足路径切换条件且接收到与所述第一VXLAN报文属于同一数据流的后续VXLAN报文时,通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文。The second sending module 640 is configured to: when the determining module 630 determines that the first path meets a path switching condition and receives a subsequent VXLAN message that belongs to the same data flow as the first VXLAN message, The second path of the at least two equal-cost paths sends the subsequent VXLAN message to the second switch.
可选地,所述第一VXLAN报文包括:原始报文和标识信息,所述标识信息用于识别所述第一VXLAN报文,所述第二VXLAN报文包括:类型标志位和所述标识信息,所述类型标志位的值为第一预设值,所述第一预设值用于指示所述第二VXLAN报文的报文类型为响应类型,所述装置还包括:Optionally, the first VXLAN message includes: an original message and identifier information, where the identifier information is used to identify the first VXLAN message, where the second VXLAN message includes: a type flag bit and the The identifier information, the value of the type flag is a first preset value, and the first preset value is used to indicate that the message type of the second VXLAN message is a response type, and the device further includes:
记录模块650,用于在发送表中记录所述第一VXLAN报文的标识信息;The recording module 650 is configured to record the identifier information of the first VXLAN packet in the sending table.
所述判断模块630,包括:The determining module 630 includes:
判断单元631,用于在所述第二VXLAN报文中的类型标志位的值指示的报文类型为响应类型时,判断所述第二VXLAN报文中的标识信息与所述发送表中的所述第一VXLAN报文的标识信息是否相同;The determining unit 631 is configured to determine the identifier information in the second VXLAN packet and the sending table in the sending table when the packet type indicated by the value of the type flag bit in the second VXLAN packet is a response type Whether the identification information of the first VXLAN packet is the same;
确定单元632,用于在所述判断单元631判断得所述第二VXLAN报文中的标识信息与所述发送表中的所述第一VXLAN报文的标识信息相同时,确定所述第一路径满足 路径切换条件。a determining unit 632, configured to determine, when the determining unit 631 determines that the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet in the sending table, Path satisfaction Path switching conditions.
可选地,所述装置还包括:Optionally, the device further includes:
删除模块660,用于在所述第二VXLAN报文中的标识信息与记录的所述第一VXLAN报文的标识信息相同时,从所述发送表中删除包括所述第一VXLAN报文的标识信息的表项;或,a deleting module 660, configured to delete, when the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet that is recorded, from the sending table, including the first VXLAN packet An entry identifying the information; or,
清空模块670,用于在所述发送表中记录的所述第一VXLAN报文的标识信息表明所述第一VXLAN报文所属的数据流的已发送报文的个数超过预设值时,清空所述发送表中记录的所述第一VXLAN报文的标识信息。The clearing module 670 is configured to: when the identifier information of the first VXLAN packet recorded in the sending table indicates that the number of sent packets of the data flow to which the first VXLAN packet belongs exceeds a preset value, And clearing the identifier information of the first VXLAN packet recorded in the sending table.
可选地,所述第一VXLAN报文是通过为所述原始报文封装VXLAN隧道头得到的,所述第一VXLAN报文的标识信息携带在所述第一VXLAN报文的VXLAN隧道头的保留字段中;Optionally, the first VXLAN packet is obtained by encapsulating a VXLAN tunnel header for the original packet, and the identifier information of the first VXLAN packet is carried in a VXLAN tunnel header of the first VXLAN packet. Reserved in the field;
所述第二VXLAN报文的VXLAN隧道头的保留字段包括所述第一VXLAN报文的标识信息,所述类型标志位携带在所述第二VXLAN报文的VXLAN隧道头的标志字段中。The reserved field of the VXLAN tunnel header of the second VXLAN packet includes the identifier information of the first VXLAN packet, and the type flag is carried in the flag field of the VXLAN tunnel header of the second VXLAN packet.
可选地,所述第二VXLAN报文是由所述第二交换机根据所述第一VXLAN报文生成的;或,Optionally, the second VXLAN message is generated by the second switch according to the first VXLAN message; or
所述第二VXLAN报文为所述第二交换机在检测到所述第二交换机的发送队列中存在反向报文时,在所述反向报文的VXLAN隧道头中添加所述第一VXLAN报文的标识信息以及所述类型标志位得到的,所述反向报文为所述第二交换机的发送队列中外层目的互联网协议IP地址为所述第一交换机的IP地址的报文。The second VXLAN packet is: when the second switch detects that there is a reverse packet in the sending queue of the second switch, adding the first VXLAN to the VXLAN tunnel header of the reverse packet. The identifier information of the packet and the type flag are obtained, and the reverse packet is a packet whose outer layer destination Internet Protocol IP address in the sending queue of the second switch is an IP address of the first switch.
可选地,所述第一VXLAN报文还包括:类型标志位,所述类型标志位位于所述第一VXLAN报文的VXLAN隧道头的标志字段中,所述类型标志位的值为第二预设值,所述第二预设值用于指示报文类型为请求类型。Optionally, the first VXLAN message further includes: a type flag bit, where the type flag bit is located in a flag field of a VXLAN tunnel header of the first VXLAN message, and the value of the type flag bit is second. The preset value is used to indicate that the message type is a request type.
本发明实施例提供的报文处理装置,通过至少两条等价路径中的第一路径向第二交换机发送第一VXLAN报文,接收所述第二交换机根据所述第一VXLAN报文发送的第二VXLAN报文,根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件,若所述第一路径满足路径切换条件,则在接收到与所述第一VXLAN报文属于同一数据流的后续VXLAN报文时,通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文;由于通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文时,实现了对数据流的分流,且能够保证后一个子数 据流在前一个子数据流被第二交换机接收后才发送,因此,本发明能够解决现有技术采用预设时间间隔发送子数据流导致的系统性能降低或者报文乱序的问题,达到提高系统性能、避免报文乱序的效果。The packet processing apparatus provided by the embodiment of the present invention sends a first VXLAN message to the second switch by using the first path of the at least two equal-cost paths, and receives the second switch according to the first VXLAN message. And determining, by the second VXLAN packet, whether the first path meets a path switching condition according to the second VXLAN packet, and if the first path meets the path switching condition, receiving the packet corresponding to the first VXLAN And sending, by the second path of the at least two equal-cost paths, the subsequent VXLAN message to the second switch, by using the at least two equal-cost paths When the second path sends the subsequent VXLAN packet to the second switch, the data flow is offloaded, and the next sub-number can be guaranteed. The flow is transmitted after the previous sub-data stream is received by the second switch. Therefore, the present invention can solve the problem that the system performance is reduced or the message is out of order caused by the sub-data stream being transmitted by using the preset time interval in the prior art. System performance, avoiding the effect of message out of order.
进一步地,由于本发明实施例在通过所述至少两条等价路径中的第二路径向所述第二交换机发送后续VXLAN报文,将所述第一路径的负载分担到了第二路径上,因此,本发明还能够提高VXLAN网络中路径负载的均衡性。Further, the embodiment of the present invention distributes the load of the first path to the second path by sending a subsequent VXLAN message to the second switch by using the second path of the at least two equal-cost paths. Therefore, the present invention can also improve the balance of path load in a VXLAN network.
进一步地,由于本发明实施例在确定达到路径切换条件时就可以进行路径切换,因此,相比于现有技术,本发明实施例在切换后形成子数据流,各个子数据流的大小灵活确定,且本发明实施例通过切换对持续时间较长的数据流分流时,形成的子数据流更均匀,更有效的实现了各个等价路径的负载均衡。Further, the embodiment of the present invention can perform path switching when it is determined that the path switching condition is reached. Therefore, compared with the prior art, the embodiment of the present invention forms a sub-data stream after the handover, and the size of each sub-data stream is flexibly determined. In the embodiment of the present invention, when the data stream is divided for a long duration, the formed sub-data stream is more uniform, and load balancing of each equal-cost path is more effectively implemented.
请参考图7,其示出了本发明再一个实施例提供的报文处理装置700的框图。所述报文处理装置700可以通过软件、硬件或者两者的结合实现图1所示实施环境中的第二交换机的部分或者全部功能。所述第二交换机与第一交换机之间存在至少两条等价路径,所述报文处理装置700可以包括:第一接收模块710、获取模块720、发送模块730和第二接收模块740。Please refer to FIG. 7, which shows a block diagram of a message processing apparatus 700 according to still another embodiment of the present invention. The message processing apparatus 700 can implement some or all of the functions of the second switch in the implementation environment shown in FIG. 1 by software, hardware, or a combination of both. The at least two equal-cost paths exist between the second switch and the first switch, and the packet processing apparatus 700 may include: a first receiving module 710, an obtaining module 720, a sending module 730, and a second receiving module 740.
所述第一接收模块710,用于通过所述至少两条等价路径中的第一路径接收所述第一交换机发送的第一VXLAN报文。The first receiving module 710 is configured to receive, by using the first path of the at least two equal-cost paths, the first VXLAN packet sent by the first switch.
所述获取模块720,用于根据所述第一接收模块710接收到的所述第一VXLAN报文获取第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机所述第二交换机收到所述第一VXLAN报文。The obtaining module 720 is configured to obtain a second VXLAN packet according to the first VXLAN packet received by the first receiving module 710, where the second VXLAN packet is used to notify the first switch The second switch receives the first VXLAN message.
所述发送模块730,用于向所述第一交换机发送所述获取模块720获取到的所述第二VXLAN报文,以便于所述第一交换机根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件。The sending module 730 is configured to send, by the first switch, the second VXLAN message that is obtained by the acquiring module 720, so that the first switch determines the first part according to the second VXLAN message. Whether a path satisfies the path switching condition.
所述第二接收模块740,用于在所述第一路径满足路径切换条件时,通过所述至少两条等价路径的第二路径接收所述第一交换机发送的与所述第一VXLAN报文属于同一数据流的后续VXLAN报文。The second receiving module 740 is configured to receive, by the second path of the at least two equal-cost paths, the first VXLAN report sent by the first switch, when the first path meets a path switching condition. The text belongs to subsequent VXLAN messages of the same data stream.
本发明实施例提供的报文处理装置,通过至少两条等价路径中的第一路径接收第一交换机发送的第一VXLAN报文,根据所述第一VXLAN报文获取并向所述第一交换机发送第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机第二交换机收 到所述第一VXLAN报文,以便于所述第一交换机根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件并在所述第一路径满足路径切换条件时,通过所述至少两条等价路径的第二路径接收所述第一交换机发送的与所述第一VXLAN报文属于同一数据流的后续VXLAN报文;由于通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文时,实现了对数据流的分流,且能够保证后一个子数据流在前一个子数据流被第二交换机接收后才发送,因此,本发明能够解决现有技术采用预设时间间隔发送子数据流导致的系统性能降低或者报文乱序的问题,达到提高系统性能、避免报文乱序的效果。The packet processing apparatus provided by the embodiment of the present invention receives the first VXLAN packet sent by the first switch by using the first path in the at least two equal-cost paths, and acquires and sends the first VXLAN packet according to the first VXLAN packet. The switch sends a second VXLAN message, where the second VXLAN message is used to notify the first switch to receive the second switch. Go to the first VXLAN packet, so that the first switch determines, according to the second VXLAN packet, whether the first path meets a path switching condition, and when the first path satisfies a path switching condition, The second path of the at least two equal-cost paths receives a subsequent VXLAN message sent by the first switch that belongs to the same data stream as the first VXLAN message; When the second path sends the subsequent VXLAN message to the second switch, the data stream is offloaded, and the next sub-data stream can be sent after the previous sub-data stream is received by the second switch. The invention can solve the problem that the performance of the system is reduced or the packet is out of order caused by the sub-data stream being transmitted by using the preset time interval in the prior art, thereby improving the system performance and avoiding the disorder of the message.
进一步地,由于本发明实施例在通过所述至少两条等价路径中的第二路径向所述第二交换机发送后续VXLAN报文,将第一路径的负载分担到了第二路径上,因此,本发明还能够提高VXLAN网络中路径负载的均衡性。Further, the embodiment of the present invention distributes the load of the first path to the second path by sending a subsequent VXLAN packet to the second switch by using the second path of the at least two equal-cost paths. The present invention can also improve the balance of path load in a VXLAN network.
请参考图8,其示出了本发明又一个实施例提供的报文处理装置800的框图。所述报文处理装置800可以通过软件、硬件或者两者的结合实现图1所示实施环境中的第二交换机的部分或者全部功能。所述第二交换机与第一交换机之间存在至少两条等价路径,所述报文处理装置800可以包括:第一接收模块810、获取模块820、发送模块830和第二接收模块840。Please refer to FIG. 8, which shows a block diagram of a message processing apparatus 800 according to still another embodiment of the present invention. The message processing apparatus 800 can implement some or all of the functions of the second switch in the implementation environment shown in FIG. 1 by software, hardware, or a combination of both. The at least two equal-cost paths exist between the second switch and the first switch, and the packet processing apparatus 800 may include: a first receiving module 810, an obtaining module 820, a sending module 830, and a second receiving module 840.
所述第一接收模块810,用于通过所述至少两条等价路径中的第一路径接收所述第一交换机发送的第一VXLAN报文。The first receiving module 810 is configured to receive, by using the first path of the at least two equal-cost paths, the first VXLAN packet sent by the first switch.
所述获取模块820,用于根据所述第一接收模块810接收到的所述第一VXLAN报文获取第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机所述第二交换机收到所述第一VXLAN报文。The obtaining module 820 is configured to obtain a second VXLAN message according to the first VXLAN message received by the first receiving module 810, where the second VXLAN message is used to notify the first switch The second switch receives the first VXLAN message.
所述发送模块830,用于向所述第一交换机发送所述获取模块820获取到的所述第二VXLAN报文,以便于所述第一交换机根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件。The sending module 830 is configured to send, by the first switch, the second VXLAN message that is obtained by the acquiring module 820, so that the first switch determines the first part according to the second VXLAN message. Whether a path satisfies the path switching condition.
所述第二接收模块840,用于在所述第一路径满足路径切换条件时,通过所述至少两条等价路径的第二路径接收所述第一交换机发送的与所述第一VXLAN报文属于同一数据流的后续VXLAN报文。The second receiving module 840 is configured to receive, by the second path of the at least two equal-cost paths, the first VXLAN report sent by the first switch, when the first path meets a path switching condition. The text belongs to subsequent VXLAN messages of the same data stream.
可选地,所述第一VXLAN报文包括:原始报文和标识信息,所述标识信息用于识别第一VXLAN报文,所述第二VXLAN报文包括:类型标志位和所述标识信息,所述 类型标志位的值为第一预设值,所述第一预设值用于指示第二VXLAN报文的报文类型为响应类型。Optionally, the first VXLAN packet includes: an original packet and identifier information, where the identifier information is used to identify the first VXLAN packet, where the second VXLAN packet includes: a type flag bit and the identifier information. , said The value of the type flag is a first preset value, and the first preset value is used to indicate that the message type of the second VXLAN message is a response type.
可选地,所述第一VXLAN报文是通过为所述原始报文封装VXLAN隧道头得到的,所述第一VXLAN报文的标识信息携带在所述第一VXLAN报文的VXLAN隧道头的保留字段中;Optionally, the first VXLAN packet is obtained by encapsulating a VXLAN tunnel header for the original packet, and the identifier information of the first VXLAN packet is carried in a VXLAN tunnel header of the first VXLAN packet. Reserved in the field;
所述第二VXLAN报文的VXLAN隧道头的保留字段包括所述第一VXLAN报文的标识信息,所述类型标志位携带在所述第二VXLAN报文的VXLAN隧道头的标志字段中。The reserved field of the VXLAN tunnel header of the second VXLAN packet includes the identifier information of the first VXLAN packet, and the type flag is carried in the flag field of the VXLAN tunnel header of the second VXLAN packet.
可选地,该获取模块820,包括:Optionally, the obtaining module 820 includes:
生成单元821,用于根据所述第一VXLAN报文生成所述第二VXLAN报文;或,a generating unit 821, configured to generate the second VXLAN packet according to the first VXLAN packet; or
检测封装单元822,用于检测所述第二交换机的发送队列中是否存在反向报文,所述反向报文为所述第二交换机的发送队列中外层目的互联网协议IP地址为所述第一交换机的IP地址的报文,在所述发送队列中存在所述反向报文时,在所述反向报文的VXLAN隧道头中添加所述第一VXLAN报文的标识信息以及所述类型标志位得到所述第二VXLAN报文。The detecting and encapsulating unit 822 is configured to detect whether there is a reverse packet in the sending queue of the second switch, where the reverse packet is an IP address of the outer layer in the sending queue of the second switch. Adding the identifier information of the first VXLAN packet to the VXLAN tunnel header of the reverse packet, and the packet of the IP address of the switch, when the reverse packet exists in the sending queue The type flag bit gets the second VXLAN message.
可选地,所述第一VXLAN报文还包括:类型标志位,所述类型标志位位于所述第一VXLAN报文的VXLAN隧道头的标志字段中,所述类型标志位的值为第二预设值,所述第二预设值用于指示报文类型为请求类型,所述装置还包括:Optionally, the first VXLAN message further includes: a type flag bit, where the type flag bit is located in a flag field of a VXLAN tunnel header of the first VXLAN message, and the value of the type flag bit is second. a preset value, where the second preset value is used to indicate that the message type is a request type, and the device further includes:
判断模块850,用于判断所述第一VXLAN报文中的类型标志位的值指示的报文类型是否为请求类型;The determining module 850 is configured to determine whether the message type indicated by the value of the type flag bit in the first VXLAN message is a request type;
触发模块860,用于在所述判断模块850判断得所述第一VXLAN报文中的类型标志位的值指示的报文类型为请求类型时,触发所述获取模块820根据所述第一VXLAN报文获取第二VXLAN报文。The triggering module 860 is configured to trigger, when the determining module 850 determines that the packet type indicated by the value of the type flag bit in the first VXLAN packet is a request type, triggering the acquiring module 820 according to the first VXLAN The packet obtains the second VXLAN packet.
本发明实施例提供的报文处理装置,通过至少两条等价路径中的第一路径接收第一交换机发送的第一VXLAN报文,根据所述第一VXLAN报文获取并向所述第一交换机发送第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机第二交换机收到所述第一VXLAN报文,以便于所述第一交换机根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件并在所述第一路径满足路径切换条件时,通过所述至少两条等价路径的第二路径接收所述第一交换机发送的与所述第一VXLAN报文属于同一数据流的后续VXLAN报文;由于通过所述至少两条等价路径中的第二路径向所述第二 交换机发送所述后续VXLAN报文时,实现了对数据流的分流,且能够保证后一个子数据流在前一个子数据流被第二交换机接收后才发送,因此,本发明能够解决现有技术采用预设时间间隔发送子数据流导致的系统性能降低或者报文乱序的问题,达到提高系统性能、避免报文乱序的效果。The packet processing apparatus provided by the embodiment of the present invention receives the first VXLAN packet sent by the first switch by using the first path in the at least two equal-cost paths, and acquires and sends the first VXLAN packet according to the first VXLAN packet. The switch sends a second VXLAN message, where the second VXLAN message is used to notify the first switch that the second switch receives the first VXLAN message, so that the first switch is configured according to the second VXLAN message. And determining, by the first path, whether the first path meets the path switching condition, and when the first path meets the path switching condition, receiving, by the second path of the at least two equal-cost paths, the first switch and the a VXLAN message belongs to a subsequent VXLAN message of the same data stream; due to the second path in the at least two equal-cost paths to the second When the switch sends the subsequent VXLAN packet, the data stream is offloaded, and the subsequent sub-data stream is sent after the previous sub-data stream is received by the second switch. Therefore, the present invention can solve the prior art. The problem of system performance degradation or packet out-of-order caused by sending sub-data streams at preset time intervals improves the system performance and avoids the disorder of packets.
进一步地,由于本发明实施例在通过所述至少两条等价路径中的第二路径向所述第二交换机发送后续VXLAN报文,将第一路径的负载分担到了第二路径上,因此,本发明还能够提高VXLAN网络中路径负载的均衡性。Further, the embodiment of the present invention distributes the load of the first path to the second path by sending a subsequent VXLAN packet to the second switch by using the second path of the at least two equal-cost paths. The present invention can also improve the balance of path load in a VXLAN network.
进一步地,由于本发明实施例在确定达到路径切换条件时就可以进行路径切换,因此,相比于现有技术,本发明实施例在切换后形成子数据流,各个子数据流的大小灵活确定,且本发明实施例通过切换对持续时间较长的数据流分流时,形成的子数据流更均匀,更有效的实现了各个等价路径的负载均衡。Further, the embodiment of the present invention can perform path switching when it is determined that the path switching condition is reached. Therefore, compared with the prior art, the embodiment of the present invention forms a sub-data stream after the handover, and the size of each sub-data stream is flexibly determined. In the embodiment of the present invention, when the data stream is divided for a long duration, the formed sub-data stream is more uniform, and load balancing of each equal-cost path is more effectively implemented.
需要说明的是:上述实施例提供的报文处理装置在处理报文时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的报文处理装置和报文处理方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。It should be noted that the packet processing apparatus provided by the foregoing embodiment only illustrates the division of each functional module in the processing of the packet. In actual applications, the function distribution may be completed by different functional modules as needed. The internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the embodiment of the packet processing apparatus and the packet processing method provided by the foregoing embodiments are in the same concept, and the specific implementation process is described in detail in the method embodiment, and details are not described herein again.
请参考图9,其示出了本发明一个实施例提供的报文处理装置900的框图。所述报文处理装置900可以应用于图1所示的第一交换机中,所述第一交换机与第二交换机之间存在至少两条等价路径,所述第一交换机可以为leaf交换机,所述报文处理装置900可以包括但不限于:发射机910、接收机920和处理器930,所述处理器930分别与所述发射机910和所述接收机920耦合。Referring to FIG. 9, a block diagram of a message processing apparatus 900 provided by an embodiment of the present invention is shown. The packet processing device 900 can be applied to the first switch shown in FIG. 1. The first switch and the second switch have at least two equal-cost paths, and the first switch can be a leaf switch. The message processing apparatus 900 can include, but is not limited to, a transmitter 910, a receiver 920, and a processor 930 coupled to the transmitter 910 and the receiver 920, respectively.
所述发射机910,用于通过至少所述两条等价路径中的第一路径向所述第二交换机发送第一VXLAN报文。The transmitter 910 is configured to send, by using the first path of the at least two equal paths, the first VXLAN message to the second switch.
所述接收机920,用于接收所述第二交换机根据所述第一VXLAN报文发送的第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机所述第二交换机收到所述第一VXLAN报文。The receiver 920 is configured to receive a second VXLAN message sent by the second switch according to the first VXLAN message, where the second VXLAN message is used to notify the first switch of the second switch Receiving the first VXLAN message.
所述处理器930,用于根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件。The processor 930 is configured to determine, according to the second VXLAN packet, whether the first path meets a path switching condition.
所述处理器930,用于在所述第一路径满足路径切换条件且接收到与所述第一 VXLAN报文属于同一数据流的后续VXLAN报文时,通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文。The processor 930 is configured to meet a path switching condition in the first path and receive the first When the VXLAN packet belongs to the subsequent VXLAN packet of the same data stream, the subsequent VXLAN packet is sent to the second switch by using the second path of the at least two equal-cost paths.
本发明实施例提供的报文处理装置,通过至少两条等价路径中的第一路径向第二交换机发送第一VXLAN报文,接收所述第二交换机根据所述第一VXLAN报文发送的第二VXLAN报文,根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件,若所述第一路径满足路径切换条件,则在接收到与所述第一VXLAN报文属于同一数据流的后续VXLAN报文时,通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文;由于通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文时,实现了对数据流的分流,且能够保证后一个子数据流在前一个子数据流被第二交换机接收后才发送,因此,本发明能够解决现有技术采用预设时间间隔发送子数据流导致的系统性能降低或者报文乱序的问题,达到提高系统性能、避免报文乱序的效果。The packet processing apparatus provided by the embodiment of the present invention sends a first VXLAN message to the second switch by using the first path of the at least two equal-cost paths, and receives the second switch according to the first VXLAN message. And determining, by the second VXLAN packet, whether the first path meets a path switching condition according to the second VXLAN packet, and if the first path meets the path switching condition, receiving the packet corresponding to the first VXLAN And sending, by the second path of the at least two equal-cost paths, the subsequent VXLAN message to the second switch, by using the at least two equal-cost paths When the second path sends the subsequent VXLAN message to the second switch, the data stream is offloaded, and the next sub-data stream can be sent after the previous sub-data stream is received by the second switch, so The present invention can solve the problem that the system performance is reduced or the packet is out of order caused by sending the sub-data stream by using the preset time interval in the prior art, thereby improving the system performance and avoiding the disorder of the message. fruit.
进一步地,由于本发明实施例在通过所述至少两条等价路径中的第二路径向所述第二交换机发送后续VXLAN报文,将所述第一路径的负载分担到了第二路径上,因此,本发明还能够提高VXLAN网络中路径负载的均衡性。Further, the embodiment of the present invention distributes the load of the first path to the second path by sending a subsequent VXLAN message to the second switch by using the second path of the at least two equal-cost paths. Therefore, the present invention can also improve the balance of path load in a VXLAN network.
进一步地,所述第一VXLAN报文包括:原始报文和标识信息,所述标识信息用于识别所述第一VXLAN报文,所述第二VXLAN报文包括:类型标志位和所述标识信息,所述类型标志位的值为第一预设值,所述第一预设值用于指示所述第二VXLAN报文的报文类型为响应类型,Further, the first VXLAN message includes: an original message and identification information, where the identification information is used to identify the first VXLAN message, and the second VXLAN message includes: a type flag bit and the identifier The information indicates that the value of the type flag is a first preset value, and the first preset value is used to indicate that the packet type of the second VXLAN packet is a response type.
所述处理器930,用于在发送表中记录所述第一VXLAN报文的标识信息;The processor 930 is configured to record identifier information of the first VXLAN packet in a sending table.
所述处理器930,用于在所述第二VXLAN报文中的类型标志位的值指示的报文类型为响应类型时,判断所述第二VXLAN报文中的标识信息与所述发送表中的所述第一VXLAN报文的标识信息是否相同;The processor 930 is configured to determine, when the packet type indicated by the value of the type flag bit in the second VXLAN packet is a response type, the identifier information in the second VXLAN packet and the sending table. Whether the identification information of the first VXLAN packet is the same;
所述处理器930,用于在所述第二VXLAN报文中的标识信息与所述发送表中的所述第一VXLAN报文的标识信息相同时,确定所述第一路径满足路径切换条件。The processor 930 is configured to determine that the first path meets a path switching condition when the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet in the sending table. .
可选地,所述处理器930,用于在所述第二VXLAN报文中的标识信息与记录的所述第一VXLAN报文的标识信息相同时,从所述发送表中删除包括所述第一VXLAN报文的标识信息的表项;或,Optionally, the processor 930 is configured to delete, when the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet that is recorded, including the An entry of the identification information of the first VXLAN packet; or,
所述处理器930,用于在所述发送表中记录的所述第一VXLAN报文的标识信息表 明所述第一VXLAN报文所属的数据流的已发送报文的个数超过预设值时,清空所述发送表中记录的所述第一VXLAN报文的标识信息。The processor 930, the identifier information table of the first VXLAN message recorded in the sending table And when the number of sent packets of the data flow to which the first VXLAN packet belongs is greater than a preset value, the identifier information of the first VXLAN packet recorded in the sending table is cleared.
可选地,所述第一VXLAN报文是通过为所述原始报文封装VXLAN隧道头得到的,所述第一VXLAN报文的标识信息携带在所述第一VXLAN报文的VXLAN隧道头的保留字段中;Optionally, the first VXLAN packet is obtained by encapsulating a VXLAN tunnel header for the original packet, and the identifier information of the first VXLAN packet is carried in a VXLAN tunnel header of the first VXLAN packet. Reserved in the field;
所述第二VXLAN报文的VXLAN隧道头的保留字段包括所述第一VXLAN报文的标识信息,所述类型标志位携带在所述第二VXLAN报文的VXLAN隧道头的标志字段中。The reserved field of the VXLAN tunnel header of the second VXLAN packet includes the identifier information of the first VXLAN packet, and the type flag is carried in the flag field of the VXLAN tunnel header of the second VXLAN packet.
可选地,所述第二VXLAN报文是由所述第二交换机根据所述第一VXLAN报文生成的;或,Optionally, the second VXLAN message is generated by the second switch according to the first VXLAN message; or
所述第二VXLAN报文为所述第二交换机在检测到所述第二交换机的发送队列中存在反向报文时,在所述反向报文的VXLAN隧道头中添加所述第一VXLAN报文的标识信息以及所述类型标志位得到的,所述反向报文为所述第二交换机的发送队列中外层目的互联网协议IP地址为所述第一交换机的IP地址的报文。The second VXLAN packet is: when the second switch detects that there is a reverse packet in the sending queue of the second switch, adding the first VXLAN to the VXLAN tunnel header of the reverse packet. The identifier information of the packet and the type flag are obtained, and the reverse packet is a packet whose outer layer destination Internet Protocol IP address in the sending queue of the second switch is an IP address of the first switch.
可选地,所述第一VXLAN报文还包括:类型标志位,所述类型标志位位于所述第一VXLAN报文的VXLAN隧道头的标志字段中,所述类型标志位的值为第二预设值,所述第二预设值用于指示报文类型为请求类型。Optionally, the first VXLAN message further includes: a type flag bit, where the type flag bit is located in a flag field of a VXLAN tunnel header of the first VXLAN message, and the value of the type flag bit is second. The preset value is used to indicate that the message type is a request type.
本发明实施例提供的报文处理装置,通过至少两条等价路径中的第一路径向第二交换机发送第一VXLAN报文,接收所述第二交换机根据所述第一VXLAN报文发送的第二VXLAN报文,根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件,若所述第一路径满足路径切换条件,则在接收到与所述第一VXLAN报文属于同一数据流的后续VXLAN报文时,通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文;由于通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文时,实现了对数据流的分流,且能够保证后一个子数据流在前一个子数据流被第二交换机接收后才发送,因此,本发明能够解决现有技术采用预设时间间隔发送子数据流导致的系统性能降低或者报文乱序的问题,达到提高系统性能、避免报文乱序的效果。The packet processing apparatus provided by the embodiment of the present invention sends a first VXLAN message to the second switch by using the first path of the at least two equal-cost paths, and receives the second switch according to the first VXLAN message. And determining, by the second VXLAN packet, whether the first path meets a path switching condition according to the second VXLAN packet, and if the first path meets the path switching condition, receiving the packet corresponding to the first VXLAN And sending, by the second path of the at least two equal-cost paths, the subsequent VXLAN message to the second switch, by using the at least two equal-cost paths When the second path sends the subsequent VXLAN message to the second switch, the data stream is offloaded, and the next sub-data stream can be sent after the previous sub-data stream is received by the second switch, so The present invention can solve the problem that the system performance is reduced or the packet is out of order caused by sending the sub-data stream by using the preset time interval in the prior art, thereby improving the system performance and avoiding the disorder of the message. fruit.
进一步地,由于本发明实施例在通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文,将所述第一路径的负载分担到了第二路径上,因此,本发明还能够提高VXLAN网络中路径负载的均衡性。 Further, the embodiment of the present invention distributes the load of the first path to the second path by sending the subsequent VXLAN message to the second switch by using the second path of the at least two equal paths. Therefore, the present invention can also improve the balance of path load in a VXLAN network.
进一步地,由于本发明实施例在确定达到路径切换条件时就可以进行路径切换,因此,相比于现有技术,本发明实施例在切换后形成子数据流,各个子数据流的大小灵活确定,且本发明实施例通过切换对持续时间较长的数据流分流时,形成的子数据流更均匀,更有效的实现了各个等价路径的负载均衡。Further, the embodiment of the present invention can perform path switching when it is determined that the path switching condition is reached. Therefore, compared with the prior art, the embodiment of the present invention forms a sub-data stream after the handover, and the size of each sub-data stream is flexibly determined. In the embodiment of the present invention, when the data stream is divided for a long duration, the formed sub-data stream is more uniform, and load balancing of each equal-cost path is more effectively implemented.
请参考图10,其示出了本发明再一个实施例提供的报文处理装置1000的框图。所述报文处理装置1000可以应用于图1所示的第二交换机中,所述第二交换机与第一交换机之间存在至少两条等价路径,所述第二交换机可以为leaf交换机,所述报文处理装置1000可以包括但不限于:接收机1010、处理器1020和发射机1030,所述接收机1010和所述发射机1030分别与所述处理器1020耦合。Please refer to FIG. 10, which shows a block diagram of a message processing apparatus 1000 according to still another embodiment of the present invention. The packet processing apparatus 1000 can be applied to the second switch shown in FIG. 1. The second switch and the first switch have at least two equal-cost paths, and the second switch can be a leaf switch. The message processing apparatus 1000 can include, but is not limited to, a receiver 1010, a processor 1020, and a transmitter 1030, which are coupled to the processor 1020, respectively.
所述接收机1010,用于通过所述至少两条等价路径中的第一路径接收所述第一交换机发送的第一VXLAN报文。The receiver 1010 is configured to receive, by using the first path of the at least two equal-cost paths, the first VXLAN packet sent by the first switch.
所述处理器1020,用于根据所述第一VXLAN报文获取第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机所述第二交换机收到所述第一VXLAN报文。The processor 1020 is configured to obtain a second VXLAN packet according to the first VXLAN packet, where the second VXLAN packet is used to notify the first switch that the second switch receives the first VXLAN packet. Message.
所述发射机1030,用于向所述第一交换机发送所述第二VXLAN报文,以便于所述第一交换机根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件。The transmitter 1030 is configured to send the second VXLAN packet to the first switch, so that the first switch determines, according to the second VXLAN packet, whether the first path meets a path switching condition.
所述接收机1010,用于在所述第一路径满足路径切换条件时,通过所述至少两条等价路径的第二路径接收所述第一交换机发送的与所述第一VXLAN报文属于同一数据流的后续VXLAN报文。The receiver 1010 is configured to: when the first path meets the path switching condition, receive, by using the second path of the at least two equal-cost paths, the first VXLAN message sent by the first switch belongs to Subsequent VXLAN messages of the same data stream.
本发明实施例提供的报文处理装置,通过至少两条等价路径中的第一路径接收第一交换机发送的第一VXLAN报文,根据所述第一VXLAN报文获取并向所述第一交换机发送第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机第二交换机收到所述第一VXLAN报文,以便于所述第一交换机根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件并在所述第一路径满足路径切换条件时,通过所述至少两条等价路径的第二路径接收所述第一交换机发送的与所述第一VXLAN报文属于同一数据流的后续VXLAN报文;由于通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文时,实现了对数据流的分流,且能够保证后一个子数据流在前一个子数据流被第二交换机接收后才发送,因此,本发明能够解决现有技术采用预设时间间隔发送子数据流导致的系统性能降低或者报文乱序的问题,达到提高系统性能、避免报文乱序的效果。The packet processing apparatus provided by the embodiment of the present invention receives the first VXLAN packet sent by the first switch by using the first path in the at least two equal-cost paths, and acquires and sends the first VXLAN packet according to the first VXLAN packet. The switch sends a second VXLAN message, where the second VXLAN message is used to notify the first switch that the second switch receives the first VXLAN message, so that the first switch is configured according to the second VXLAN message. And determining, by the first path, whether the first path meets the path switching condition, and when the first path meets the path switching condition, receiving, by the second path of the at least two equal-cost paths, the first switch and the A VXLAN message belongs to a subsequent VXLAN message of the same data stream; and when the subsequent VXLAN message is sent to the second switch by using the second path of the at least two equal-cost paths, the data flow is implemented. The present invention can solve the problem that the latter sub-data stream is sent after the previous sub-data stream is received by the second switch. Therefore, the present invention can solve the problem that the prior art uses the preset time interval to transmit the sub-data stream guide. The system performance problems or out of order packets, to improve system performance and to avoid the effect of packet disorder.
进一步地,由于本发明实施例在通过所述至少两条等价路径中的第二路径向所述第 二交换机发送后续VXLAN报文,将第一路径的负载分担到了第二路径上,因此,本发明还能够提高VXLAN网络中路径负载的均衡性。Further, since the embodiment of the present invention passes the second path in the at least two equal-cost paths to the first The second switch sends the subsequent VXLAN packet, and the load of the first path is shared to the second path. Therefore, the present invention can also improve the balance of the path load in the VXLAN network.
进一步地,所述第一VXLAN报文包括:原始报文和标识信息,所述标识信息用于识别所述第一VXLAN报文,所述第二VXLAN报文包括:类型标志位和所述标识信息,所述类型标志位的值为第一预设值,所述第一预设值用于指示所述第二VXLAN报文的报文类型为响应类型。Further, the first VXLAN message includes: an original message and identification information, where the identification information is used to identify the first VXLAN message, and the second VXLAN message includes: a type flag bit and the identifier The information indicates that the value of the type flag is a first preset value, and the first preset value is used to indicate that the message type of the second VXLAN message is a response type.
可选地,所述第一VXLAN报文是通过为所述原始报文封装VXLAN隧道头得到的,所述第一VXLAN报文的标识信息携带在所述第一VXLAN报文的VXLAN隧道头的保留字段中;Optionally, the first VXLAN packet is obtained by encapsulating a VXLAN tunnel header for the original packet, and the identifier information of the first VXLAN packet is carried in a VXLAN tunnel header of the first VXLAN packet. Reserved in the field;
所述第二VXLAN报文的VXLAN隧道头的保留字段包括所述第一VXLAN报文的标识信息,所述类型标志位携带在所述第二VXLAN报文的VXLAN隧道头的标志字段中。The reserved field of the VXLAN tunnel header of the second VXLAN packet includes the identifier information of the first VXLAN packet, and the type flag is carried in the flag field of the VXLAN tunnel header of the second VXLAN packet.
可选地,所述处理器1020,用于根据所述第一VXLAN报文生成所述第二VXLAN报文;或,Optionally, the processor 1020 is configured to generate the second VXLAN packet according to the first VXLAN packet; or
所述处理器1020,用于检测所述第二交换机的发送队列中是否存在反向报文,所述反向报文为所述第二交换机的发送队列中外层目的互联网协议IP地址为所述第一交换机的IP地址的报文,在所述发送队列中所述存在反向报文时,在所述反向报文的VXLAN隧道头中添加所述第一VXLAN报文的标识信息以及所述类型标志位得到所述第二VXLAN报文。The processor 1020 is configured to detect whether a reverse packet exists in a sending queue of the second switch, where the reverse packet is an outer layer destination Internet Protocol IP address in the sending queue of the second switch. The packet of the IP address of the first switch adds the identifier information of the first VXLAN packet to the VXLAN tunnel header of the reverse packet when the reverse packet is sent in the sending queue. The type flag bit gets the second VXLAN message.
可选地,所述第一VXLAN报文还包括:类型标志位,所述类型标志位位于所述第一VXLAN报文的VXLAN隧道头的标志字段中,所述类型标志位的值为第二预设值,所述第二预设值用于指示报文类型为请求类型,Optionally, the first VXLAN message further includes: a type flag bit, where the type flag bit is located in a flag field of a VXLAN tunnel header of the first VXLAN message, and the value of the type flag bit is second. a preset value, where the second preset value is used to indicate that the message type is a request type.
所述处理器1020,用于判断所述第一VXLAN报文中的类型标志位的值指示的报文类型是否为请求类型;The processor 1020 is configured to determine whether a packet type indicated by a value of a type flag bit in the first VXLAN packet is a request type.
所述处理器1020,用于在所述第一VXLAN报文中的类型标志位的值指示的报文类型为请求类型时,根据所述第一VXLAN报文获取所述第二VXLAN报文。The processor 1020 is configured to acquire the second VXLAN packet according to the first VXLAN packet when the packet type indicated by the value of the type flag bit in the first VXLAN packet is a request type.
本发明实施例提供的报文处理装置,通过至少两条等价路径中的第一路径接收第一交换机发送的第一VXLAN报文,根据所述第一VXLAN报文获取并向所述第一交换机发送第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机第二交换机收 到所述第一VXLAN报文,以便于所述第一交换机根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件并在所述第一路径满足路径切换条件时,通过所述至少两条等价路径的第二路径接收所述第一交换机发送的与所述第一VXLAN报文属于同一数据流的后续VXLAN报文;由于通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文时,实现了对数据流的分流,且能够保证后一个子数据流在前一个子数据流被第二交换机接收后才发送,因此,本发明能够解决现有技术采用预设时间间隔发送子数据流导致的系统性能降低或者报文乱序的问题,达到提高系统性能、避免报文乱序的效果。The packet processing apparatus provided by the embodiment of the present invention receives the first VXLAN packet sent by the first switch by using the first path in the at least two equal-cost paths, and acquires and sends the first VXLAN packet according to the first VXLAN packet. The switch sends a second VXLAN message, where the second VXLAN message is used to notify the first switch to receive the second switch. Go to the first VXLAN packet, so that the first switch determines, according to the second VXLAN packet, whether the first path meets a path switching condition, and when the first path satisfies a path switching condition, The second path of the at least two equal-cost paths receives a subsequent VXLAN message sent by the first switch that belongs to the same data stream as the first VXLAN message; When the second path sends the subsequent VXLAN message to the second switch, the data stream is offloaded, and the next sub-data stream can be sent after the previous sub-data stream is received by the second switch. The invention can solve the problem that the performance of the system is reduced or the packet is out of order caused by the sub-data stream being transmitted by using the preset time interval in the prior art, thereby improving the system performance and avoiding the disorder of the message.
进一步地,由于本发明实施例在通过所述至少两条等价路径中的第二路径向所述第二交换机发送后续VXLAN报文,将第一路径的负载分担到了第二路径上,因此,本发明还能够提高VXLAN网络中路径负载的均衡性。Further, the embodiment of the present invention distributes the load of the first path to the second path by sending a subsequent VXLAN packet to the second switch by using the second path of the at least two equal-cost paths. The present invention can also improve the balance of path load in a VXLAN network.
进一步地,由于本发明实施例在确定达到路径切换条件时就可以进行路径切换,因此,相比于现有技术,本发明实施例在切换后形成子数据流,各个子数据流的大小灵活确定,且本发明实施例通过切换对持续时间较长的数据流分流时,形成的子数据流更均匀,更有效的实现了各个等价路径的负载均衡。Further, the embodiment of the present invention can perform path switching when it is determined that the path switching condition is reached. Therefore, compared with the prior art, the embodiment of the present invention forms a sub-data stream after the handover, and the size of each sub-data stream is flexibly determined. In the embodiment of the present invention, when the data stream is divided for a long duration, the formed sub-data stream is more uniform, and load balancing of each equal-cost path is more effectively implemented.
进一步地,由于本发明实施例在确定达到路径切换条件时就可以进行路径切换,因此,相比于现有技术,本发明实施例在切换后形成子数据流,各个子数据流的大小灵活确定,且本发明实施例通过切换对持续时间较长的数据流分流时,形成的子数据流更均匀,更有效的实现了各个等价路径的负载均衡。Further, the embodiment of the present invention can perform path switching when it is determined that the path switching condition is reached. Therefore, compared with the prior art, the embodiment of the present invention forms a sub-data stream after the handover, and the size of each sub-data stream is flexibly determined. In the embodiment of the present invention, when the data stream is divided for a long duration, the formed sub-data stream is more uniform, and load balancing of each equal-cost path is more effectively implemented.
请参考图11,其示出了本发明一个实施例提供的报文处理系统的结构示意图。所述报文处理系统1100至少包括第一交换机1110和第二交换机1120,所述第一交换机1110与所述第二交换机1120之间通过IP网络连接,Please refer to FIG. 11, which is a schematic structural diagram of a message processing system according to an embodiment of the present invention. The packet processing system 1100 includes at least a first switch 1110 and a second switch 1120, and the first switch 1110 and the second switch 1120 are connected by using an IP network.
在一种可能的实现方式中,所述第一交换机1110包括如图5或图6中所描述的报文处理装置;所述第二交换机1120包括如图7或图8中所描述的报文处理装置。In a possible implementation, the first switch 1110 includes a message processing device as described in FIG. 5 or FIG. 6; the second switch 1120 includes a message as described in FIG. 7 or FIG. Processing device.
在另一种可能的实现方式中,所述第一交换机1110包括如图9中所描述的报文处理装置;所述第二交换机1120包括如10中所描述的报文处理装置。In another possible implementation manner, the first switch 1110 includes a message processing device as described in FIG. 9; the second switch 1120 includes a message processing device as described in 10.
本发明实施例提供的报文处理系统,通过至少两条等价路径中的第一路径向第二交换机发送第一VXLAN报文,接收所述第二交换机根据所述第一VXLAN报文发送的第二VXLAN报文,根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件,若所述第一路径满足路径切换条件,则在接收到与所述第一VXLAN报文属于同一数据 流的后续VXLAN报文时,通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文;由于通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文时,实现了对数据流的分流,且能够保证后一个子数据流在前一个子数据流被第二交换机接收后才发送,因此,本发明能够解决现有技术采用预设时间间隔发送子数据流导致的系统性能降低或者报文乱序的问题,达到提高系统性能、避免报文乱序的效果。The packet processing system provided by the embodiment of the present invention sends a first VXLAN message to the second switch through the first path in the at least two equal-cost paths, and receives the second switch according to the first VXLAN message. And determining, by the second VXLAN packet, whether the first path meets a path switching condition according to the second VXLAN packet, and if the first path meets the path switching condition, receiving the packet corresponding to the first VXLAN Same data And transmitting, by the second path of the at least two equal-cost paths, the subsequent VXLAN message to the second switch; and passing the second of the at least two equal-cost paths When the path sends the subsequent VXLAN message to the second switch, the data stream is offloaded, and the next sub-data stream can be sent after the previous sub-data stream is received by the second switch. The invention can solve the problem that the system performance is reduced or the message is out of order caused by sending the sub-data stream by using the preset time interval in the prior art, thereby improving the system performance and avoiding the disorder of the message.
进一步地,由于本发明实施例在通过所述至少两条等价路径中的第二路径向所述第二交换机发送后续VXLAN报文,将所述第一路径的负载分担到了第二路径上,因此,本发明还能够提高VXLAN网络中路径负载的均衡性。Further, the embodiment of the present invention distributes the load of the first path to the second path by sending a subsequent VXLAN message to the second switch by using the second path of the at least two equal-cost paths. Therefore, the present invention can also improve the balance of path load in a VXLAN network.
本发明实施例还提供了一种报文处理设备,该设备包括收发器、存储器以及分别与收发器、存储器连接的处理器,其中,存储器中存储一组程序代码,且该处理器用于调用存储器中存储的程序代码,用于执行上述报文处理方法。An embodiment of the present invention further provides a message processing device, where the device includes a transceiver, a memory, and a processor respectively connected to the transceiver and the memory, wherein the memory stores a set of program codes, and the processor is used to call the memory. The program code stored in the program for executing the above message processing method.
本领域普通技术人员可以理解实现上述实施例的全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。A person skilled in the art may understand that all or part of the steps of implementing the above embodiments may be completed by hardware, or may be instructed by a program to execute related hardware, and the program may be stored in a computer readable storage medium. The storage medium mentioned may be a read only memory, a magnetic disk or an optical disk or the like.
以上所述仅为本发明的较佳实施例,并不用以限制本发明,凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。 The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalents, improvements, etc., which are within the spirit and scope of the present invention, should be included in the protection of the present invention. Within the scope.

Claims (22)

  1. 一种报文处理方法,其特征在于,应用于虚拟可扩展局域网VXLAN中的第一交换机,所述第一交换机与第二交换机之间存在至少两条等价路径,所述方法包括:A packet processing method is characterized in that, in a first switch in a virtual scalable local area network (VXLAN), at least two equal-cost paths exist between the first switch and the second switch, and the method includes:
    通过所述至少两条等价路径中的第一路径向所述第二交换机发送第一VXLAN报文;Transmitting, by the first path of the at least two equal-cost paths, the first VXLAN message to the second switch;
    接收所述第二交换机根据所述第一VXLAN报文发送的第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机所述第二交换机收到所述第一VXLAN报文;And receiving, by the second switch, the second VXLAN packet sent by the first VXLAN packet, where the second VXLAN packet is used to notify the first switch that the second switch receives the first VXLAN packet. Text
    根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件;Determining, according to the second VXLAN packet, whether the first path meets a path switching condition;
    如果所述第一路径满足路径切换条件,则在接收到与所述第一VXLAN报文属于同一数据流的后续VXLAN报文时,通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文。And if the first path meets the path switching condition, when the subsequent VXLAN message that belongs to the same data flow as the first VXLAN packet is received, the second path of the at least two equal-cost paths is used. The second switch sends the subsequent VXLAN message.
  2. 根据权利要求1所述的方法,其特征在于,所述第一VXLAN报文包括:原始报文和标识信息,所述标识信息用于识别所述第一VXLAN报文,所述第二VXLAN报文包括:类型标志位和所述标识信息,所述类型标志位的值为第一预设值,所述第一预设值用于指示所述第二VXLAN报文的报文类型为响应类型,The method according to claim 1, wherein the first VXLAN message comprises: an original message and identification information, the identification information is used to identify the first VXLAN message, the second VXLAN message The file includes: a type flag bit and the identifier information, where the value of the type flag bit is a first preset value, and the first preset value is used to indicate that the message type of the second VXLAN message is a response type. ,
    在接收所述第二交换机根据所述第一VXLAN报文发送的第二VXLAN报文之前,所述方法还包括:Before receiving the second VXLAN packet sent by the second switch according to the first VXLAN packet, the method further includes:
    在发送表中记录所述第一VXLAN报文的标识信息;Recording, in the sending table, the identifier information of the first VXLAN packet;
    所述判断所述第一路径是否满足路径切换条件包括:The determining whether the first path meets the path switching condition includes:
    在所述第二VXLAN报文中的类型标志位的值指示的报文类型为响应类型时,判断所述第二VXLAN报文中的标识信息与所述发送表中的所述第一VXLAN报文的标识信息是否相同;Determining the identifier information in the second VXLAN packet and the first VXLAN packet in the sending table, when the packet type indicated by the value of the type flag bit in the second VXLAN packet is a response type Whether the identification information of the text is the same;
    如果所述第二VXLAN报文中的标识信息与所述发送表中的所述第一VXLAN报文的标识信息相同,则确定所述第一路径满足路径切换条件。And if the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet in the sending table, determining that the first path meets a path switching condition.
  3. 根据权利要求2所述的方法,其特征在于,在所述接收所述第二交换机根据所述第一VXLAN报文发送的第二VXLAN报文之后,所述方法还包括:The method according to claim 2, after the receiving the second VXLAN message sent by the second switch according to the first VXLAN message, the method further includes:
    在所述第二VXLAN报文中的标识信息与记录的所述第一VXLAN报文的标识信息相同时,从所述发送表中删除包括所述第一VXLAN报文的标识信息的表项;或, When the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet, the entry including the identifier information of the first VXLAN packet is deleted from the sending table; Or,
    在所述发送表中记录的所述第一VXLAN报文的标识信息表明所述第一VXLAN报文所属的数据流的已发送报文的个数超过预设值时,清空所述发送表中记录的所述第一VXLAN报文的标识信息。And the identifier information of the first VXLAN packet recorded in the sending table indicates that when the number of sent packets of the data flow to which the first VXLAN packet belongs exceeds a preset value, the sending table is cleared. The identification information of the first VXLAN message recorded.
  4. 根据权利要求2或3所述的方法,其特征在于,Method according to claim 2 or 3, characterized in that
    所述第一VXLAN报文是通过为所述原始报文封装VXLAN隧道头得到的,所述第一VXLAN报文的标识信息携带在所述第一VXLAN报文的VXLAN隧道头的保留字段中;The first VXLAN packet is obtained by encapsulating a VXLAN tunnel header for the original packet, and the identifier information of the first VXLAN packet is carried in a reserved field of a VXLAN tunnel header of the first VXLAN packet.
    所述第二VXLAN报文的VXLAN隧道头的保留字段包括所述第一VXLAN报文的标识信息,所述类型标志位携带在所述第二VXLAN报文的VXLAN隧道头的标志字段中。The reserved field of the VXLAN tunnel header of the second VXLAN packet includes the identifier information of the first VXLAN packet, and the type flag is carried in the flag field of the VXLAN tunnel header of the second VXLAN packet.
  5. 根据权利要求4所述的方法,其特征在于,The method of claim 4 wherein:
    所述第二VXLAN报文是由所述第二交换机根据所述第一VXLAN报文生成的;或,The second VXLAN message is generated by the second switch according to the first VXLAN message; or
    所述第二VXLAN报文为所述第二交换机在检测到所述第二交换机的发送队列中存在反向报文时,在所述反向报文的VXLAN隧道头中添加所述第一VXLAN报文的标识信息以及所述类型标志位得到的,所述反向报文为所述第二交换机的发送队列中外层目的互联网协议IP地址为所述第一交换机的IP地址的报文。The second VXLAN packet is: when the second switch detects that there is a reverse packet in the sending queue of the second switch, adding the first VXLAN to the VXLAN tunnel header of the reverse packet. The identifier information of the packet and the type flag are obtained, and the reverse packet is a packet whose outer layer destination Internet Protocol IP address in the sending queue of the second switch is an IP address of the first switch.
  6. 根据权利要求4所述的方法,其特征在于,所述第一VXLAN报文还包括:类型标志位,所述类型标志位位于所述第一VXLAN报文的VXLAN隧道头的标志字段中,所述类型标志位的值为第二预设值,所述第二预设值用于指示报文类型为请求类型。The method of claim 4, wherein the first VXLAN message further comprises: a type flag bit, the type flag bit being located in a flag field of a VXLAN tunnel header of the first VXLAN message, The value of the type flag is a second preset value, and the second preset value is used to indicate that the message type is a request type.
  7. 一种报文处理方法,其特征在于,应用于虚拟可扩展局域网VXLAN中的第二交换机,所述第二交换机与第一交换机之间存在至少两条等价路径,所述方法包括:A packet processing method is characterized in that it is applied to a second switch in a virtual scalable local area network (VXLAN), and at least two equal-cost paths exist between the second switch and the first switch, and the method includes:
    通过所述至少两条等价路径中的第一路径接收所述第一交换机发送的第一VXLAN报文;Receiving, by the first path of the at least two equal-cost paths, the first VXLAN packet sent by the first switch;
    根据所述第一VXLAN报文获取第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机所述第二交换机收到所述第一VXLAN报文;Obtaining a second VXLAN packet according to the first VXLAN packet, where the second VXLAN packet is used to notify the first switch that the second switch receives the first VXLAN packet;
    向所述第一交换机发送所述第二VXLAN报文,以便于所述第一交换机根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件; And sending, by the first switch, the second VXLAN packet, so that the first switch determines, according to the second VXLAN packet, whether the first path meets a path switching condition;
    在所述第一路径满足路径切换条件时,通过所述至少两条等价路径的第二路径接收所述第一交换机发送的与所述第一VXLAN报文属于同一数据流的后续VXLAN报文。And receiving, by the second path of the at least two equal-cost paths, the subsequent VXLAN packet that is sent by the first switch and belongs to the same data flow as the first VXLAN packet, when the first path meets the path switching condition. .
  8. 根据权利要求7所述的方法,其特征在于,所述第一VXLAN报文包括:原始报文和标识信息,所述标识信息用于识别所述第一VXLAN报文,所述第二VXLAN报文包括:类型标志位和所述标识信息,所述类型标志位的值为第一预设值,所述第一预设值用于指示所述第二VXLAN报文的报文类型为响应类型。The method according to claim 7, wherein the first VXLAN message comprises: an original message and identification information, the identification information is used to identify the first VXLAN message, the second VXLAN message The file includes: a type flag bit and the identifier information, where the value of the type flag bit is a first preset value, and the first preset value is used to indicate that the message type of the second VXLAN message is a response type. .
  9. 根据权利要求8所述的方法,其特征在于,The method of claim 8 wherein:
    所述第一VXLAN报文是通过为所述原始报文封装VXLAN隧道头得到的,所述第一VXLAN报文的标识信息携带在所述第一VXLAN报文的VXLAN隧道头的保留字段中;The first VXLAN packet is obtained by encapsulating a VXLAN tunnel header for the original packet, and the identifier information of the first VXLAN packet is carried in a reserved field of a VXLAN tunnel header of the first VXLAN packet.
    所述第二VXLAN报文的VXLAN隧道头的保留字段包括所述第一VXLAN报文的标识信息,所述类型标志位携带在所述第二VXLAN报文的VXLAN隧道头的标志字段中。The reserved field of the VXLAN tunnel header of the second VXLAN packet includes the identifier information of the first VXLAN packet, and the type flag is carried in the flag field of the VXLAN tunnel header of the second VXLAN packet.
  10. 根据权利要求9所述的方法,其特征在于,所述根据所述第一VXLAN报文获取第二VXLAN报文,包括:The method according to claim 9, wherein the obtaining the second VXLAN message according to the first VXLAN message comprises:
    根据所述第一VXLAN报文生成所述第二VXLAN报文;或,Generating the second VXLAN message according to the first VXLAN message; or
    检测所述第二交换机的发送队列中是否存在反向报文,所述反向报文为所述第二交换机的发送队列中外层目的互联网协议IP地址为所述第一交换机的IP地址的报文,在所述发送队列中存在所述反向报文时,在所述反向报文的VXLAN隧道头中添加所述第一VXLAN报文的标识信息以及所述类型标志位得到所述第二VXLAN报文。Detecting whether there is a reverse packet in the sending queue of the second switch, where the reverse packet is an IP address of the outer switch in the sending queue of the second switch is an IP address of the first switch And adding, in the VXLAN tunnel header of the reverse packet, the identifier information of the first VXLAN packet and the type flag to obtain the foregoing, when the reverse packet is present in the sending queue. Two VXLAN messages.
  11. 根据权利要求9或10所述的方法,其特征在于,所述第一VXLAN报文还包括:类型标志位,所述类型标志位位于所述第一VXLAN报文的VXLAN隧道头的标志字段中,所述类型标志位的值为第二预设值,所述第二预设值用于指示报文类型为请求类型,所述根据所述第一VXLAN报文获取第二VXLAN报文之前,所述方法还包括:The method according to claim 9 or 10, wherein the first VXLAN message further comprises: a type flag bit, wherein the type flag bit is located in a flag field of a VXLAN tunnel header of the first VXLAN message. The value of the type flag is a second preset value, where the second preset value is used to indicate that the message type is a request type, and before the second VXLAN message is obtained according to the first VXLAN message, The method further includes:
    判断所述第一VXLAN报文中的类型标志位的值指示的报文类型是否为请求类型;Determining whether the message type indicated by the value of the type flag bit in the first VXLAN message is a request type;
    如果所述第一VXLAN报文中的类型标志位的值指示的报文类型为请求类型,则执行所述根据所述第一VXLAN报文获取第二VXLAN报文的步骤。 If the packet type indicated by the value of the type flag in the first VXLAN packet is a request type, the step of acquiring the second VXLAN packet according to the first VXLAN packet is performed.
  12. 一种报文处理装置,其特征在于,所述装置为虚拟可扩展局域网VXLAN中的第一交换机,所述第一交换机与第二交换机之间存在至少两条等价路径,所述装置包括:A packet processing apparatus, wherein the apparatus is a first switch in a virtual scalable local area network (VXLAN), and the first switch and the second switch have at least two equal-cost paths, and the apparatus includes:
    第一发送模块,用于通过所述至少两条等价路径中的第一路径向所述第二交换机发送第一VXLAN报文;a first sending module, configured to send, by using the first path of the at least two equal-cost paths, the first VXLAN message to the second switch;
    接收模块,用于接收所述第二交换机根据所述第一VXLAN报文发送的第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机所述第二交换机收到所述第一VXLAN报文;a receiving module, configured to receive a second VXLAN message sent by the second switch according to the first VXLAN message, where the second VXLAN message is used to notify the first switch that the second switch receives the Describe the first VXLAN message;
    判断模块,用于根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件;a determining module, configured to determine, according to the second VXLAN message, whether the first path meets a path switching condition;
    第二发送模块,用于在所述第一路径满足路径切换条件且接收到与所述第一VXLAN报文属于同一数据流的后续VXLAN报文时,通过所述至少两条等价路径中的第二路径向所述第二交换机发送所述后续VXLAN报文。a second sending module, configured to pass the at least two equal-cost paths when the first path meets the path switching condition and receives a subsequent VXLAN message that belongs to the same data flow as the first VXLAN message The second path sends the subsequent VXLAN message to the second switch.
  13. 根据权利要求12所述的装置,其特征在于,所述第一VXLAN报文包括:原始报文和标识信息,所述标识信息用于识别所述第一VXLAN报文,所述第二VXLAN报文包括:类型标志位和所述标识信息,所述类型标志位的值为第一预设值,所述第一预设值用于指示所述第二VXLAN报文的报文类型为响应类型,所述装置还包括:The device according to claim 12, wherein the first VXLAN message comprises: an original message and identification information, the identification information is used to identify the first VXLAN message, the second VXLAN message The file includes: a type flag bit and the identifier information, where the value of the type flag bit is a first preset value, and the first preset value is used to indicate that the message type of the second VXLAN message is a response type. The device further includes:
    记录模块,用于在发送表中记录所述第一VXLAN报文的标识信息;a recording module, configured to record, in the sending table, identifier information of the first VXLAN packet;
    所述判断模块,包括:The determining module includes:
    判断单元,用于在所述第二VXLAN报文中的类型标志位的值指示的报文类型为响应类型时,判断所述第二VXLAN报文中的标识信息与所述发送表中的所述第一VXLAN报文的标识信息是否相同;a determining unit, configured to determine, in the second VXLAN packet, the identifier information in the second VXLAN packet and the location in the sending table, when the packet type indicated by the value of the type flag bit in the second VXLAN packet is a response type Whether the identifier information of the first VXLAN packet is the same;
    确定单元,用于在所述第二VXLAN报文中的标识信息与所述发送表中的所述第一VXLAN报文的标识信息相同时,确定所述第一路径满足路径切换条件。The determining unit is configured to determine that the first path satisfies the path switching condition when the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet in the sending table.
  14. 根据权利要求13所述的装置,其特征在于,所述装置还包括:The device according to claim 13, wherein the device further comprises:
    删除模块,用于在所述第二VXLAN报文中的标识信息与记录的所述第一VXLAN报文的标识信息相同时,从所述发送表中删除包括所述第一VXLAN报文的标识信息的表项;或,a deleting module, configured to: when the identifier information in the second VXLAN packet is the same as the identifier information of the first VXLAN packet, delete the identifier that includes the first VXLAN packet from the sending table The entry of the information; or,
    清空模块,用于在所述发送表中记录的所述第一VXLAN报文的标识信息表明所述 第一VXLAN报文所属的数据流的已发送报文的个数超过预设值时,清空所述发送表中记录的所述第一VXLAN报文的标识信息。An emptying module, wherein the identifier information of the first VXLAN message recorded in the sending table indicates the When the number of sent packets of the data stream to which the first VXLAN packet belongs exceeds a preset value, the identifier information of the first VXLAN packet recorded in the sending table is cleared.
  15. 根据权利要求13或14所述的装置,其特征在于,Device according to claim 13 or 14, characterized in that
    所述第一VXLAN报文是通过为所述原始报文封装VXLAN隧道头得到的,所述第一VXLAN报文的标识信息携带在所述第一VXLAN报文的VXLAN隧道头的保留字段中;The first VXLAN packet is obtained by encapsulating a VXLAN tunnel header for the original packet, and the identifier information of the first VXLAN packet is carried in a reserved field of a VXLAN tunnel header of the first VXLAN packet.
    所述第二VXLAN报文的VXLAN隧道头的保留字段包括所述第一VXLAN报文的标识信息,所述类型标志位携带在所述第二VXLAN报文的VXLAN隧道头的标志字段中。The reserved field of the VXLAN tunnel header of the second VXLAN packet includes the identifier information of the first VXLAN packet, and the type flag is carried in the flag field of the VXLAN tunnel header of the second VXLAN packet.
  16. 根据权利要求15所述的装置,其特征在于,The device of claim 15 wherein:
    所述第二VXLAN报文是由所述第二交换机根据所述第一VXLAN报文生成的;或,The second VXLAN message is generated by the second switch according to the first VXLAN message; or
    所述第二VXLAN报文为所述第二交换机在检测到所述第二交换机的发送队列中存在反向报文时,在所述反向报文的VXLAN隧道头中添加所述第一VXLAN报文的标识信息以及所述类型标志位得到的,所述反向报文为所述第二交换机的发送队列中外层目的互联网协议IP地址为所述第一交换机的IP地址的报文。The second VXLAN packet is: when the second switch detects that there is a reverse packet in the sending queue of the second switch, adding the first VXLAN to the VXLAN tunnel header of the reverse packet. The identifier information of the packet and the type flag are obtained, and the reverse packet is a packet whose outer layer destination Internet Protocol IP address in the sending queue of the second switch is an IP address of the first switch.
  17. 根据权利要求15所述的装置,其特征在于,所述第一VXLAN报文还包括:类型标志位,所述类型标志位位于所述第一VXLAN报文的VXLAN隧道头的标志字段中,所述类型标志位的值为第二预设值,所述第二预设值用于指示报文类型为请求类型。The apparatus according to claim 15, wherein the first VXLAN message further comprises: a type flag bit, wherein the type flag bit is located in a flag field of a VXLAN tunnel header of the first VXLAN message, The value of the type flag is a second preset value, and the second preset value is used to indicate that the message type is a request type.
  18. 一种报文处理装置,其特征在于,所述装置为虚拟可扩展局域网VXLAN中的第二交换机,所述第二交换机与第一交换机之间存在至少两条等价路径,所述装置包括:A message processing device, wherein the device is a second switch in a virtual scalable local area network (VXLAN), and at least two equal-cost paths exist between the second switch and the first switch, the device includes:
    第一接收模块,用于通过所述至少两条等价路径中的第一路径接收所述第一交换机发送的第一VXLAN报文;a first receiving module, configured to receive, by using the first path of the at least two equal-cost paths, the first VXLAN packet sent by the first switch;
    获取模块,用于根据所述第一VXLAN报文获取第二VXLAN报文,所述第二VXLAN报文用于通知所述第一交换机所述第二交换机收到所述第一VXLAN报文;An acquiring module, configured to acquire a second VXLAN packet according to the first VXLAN packet, where the second VXLAN packet is used to notify the first switch that the second switch receives the first VXLAN packet;
    发送模块,用于向所述第一交换机发送所述第二VXLAN报文,以便于所述第一交换机根据所述第二VXLAN报文判断所述第一路径是否满足路径切换条件;a sending module, configured to send the second VXLAN packet to the first switch, so that the first switch determines, according to the second VXLAN packet, whether the first path meets a path switching condition;
    第二接收模块,用于在所述第一路径满足路径切换条件时,通过所述至少两条等价 路径的第二路径接收所述第一交换机发送的与所述第一VXLAN报文属于同一数据流的后续VXLAN报文。a second receiving module, configured to pass the at least two equivalents when the first path meets a path switching condition The second path of the path receives the subsequent VXLAN message sent by the first switch and belongs to the same data stream as the first VXLAN message.
  19. 根据权利要求18所述的装置,其特征在于,所述第一VXLAN报文包括:原始报文和标识信息,所述标识信息用于识别所述第一VXLAN报文,所述第二VXLAN报文包括:类型标志位和所述标识信息,所述类型标志位的值为第一预设值,所述第一预设值用于指示所述第二VXLAN报文的报文类型为响应类型。The device according to claim 18, wherein the first VXLAN message comprises: an original message and identification information, the identification information is used to identify the first VXLAN message, the second VXLAN message The file includes: a type flag bit and the identifier information, where the value of the type flag bit is a first preset value, and the first preset value is used to indicate that the message type of the second VXLAN message is a response type. .
  20. 根据权利要求19所述的装置,其特征在于,The device according to claim 19, characterized in that
    所述第一VXLAN报文是通过为所述原始报文封装VXLAN隧道头得到的,所述第一VXLAN报文的标识信息携带在所述第一VXLAN报文的VXLAN隧道头的保留字段中;The first VXLAN packet is obtained by encapsulating a VXLAN tunnel header for the original packet, and the identifier information of the first VXLAN packet is carried in a reserved field of a VXLAN tunnel header of the first VXLAN packet.
    所述第二VXLAN报文的VXLAN隧道头的保留字段包括所述第一VXLAN报文的标识信息,所述类型标志位携带在所述第二VXLAN报文的VXLAN隧道头的标志字段中。The reserved field of the VXLAN tunnel header of the second VXLAN packet includes the identifier information of the first VXLAN packet, and the type flag is carried in the flag field of the VXLAN tunnel header of the second VXLAN packet.
  21. 根据权利要求20所述的装置,其特征在于,所述获取模块,包括:The device according to claim 20, wherein the obtaining module comprises:
    生成单元,用于根据所述第一VXLAN报文生成所述第二VXLAN报文;或,a generating unit, configured to generate the second VXLAN packet according to the first VXLAN packet; or
    检测封装单元,用于检测所述第二交换机的发送队列中是否存在反向报文,所述反向报文为所述第二交换机的发送队列中外层目的互联网协议IP地址为所述第一交换机的IP地址的报文,在所述发送队列中存在所述反向报文时,在所述反向报文的VXLAN隧道头中添加所述第一VXLAN报文的标识信息以及所述类型标志位得到所述第二VXLAN报文。The detecting and encapsulating unit is configured to detect whether there is a reverse packet in the sending queue of the second switch, where the reverse packet is an IP address of an outer layer destination network in the sending queue of the second switch is the first And adding, in the packet of the IP address of the switch, the identifier information of the first VXLAN packet and the type in the VXLAN tunnel header of the reverse packet when the reverse packet exists in the sending queue. The flag bit gets the second VXLAN message.
  22. 根据权利要求20或21所述的装置,其特征在于,所述第一VXLAN报文还包括:类型标志位,所述类型标志位位于所述第一VXLAN报文的VXLAN隧道头的标志字段中,所述类型标志位的值为第二预设值,所述第二预设值用于指示报文类型为请求类型,所述装置还包括:The apparatus according to claim 20 or 21, wherein the first VXLAN message further comprises: a type flag bit, wherein the type flag bit is located in a flag field of a VXLAN tunnel header of the first VXLAN message. The value of the type flag is a second preset value, and the second preset value is used to indicate that the message type is a request type, and the device further includes:
    判断模块,用于判断所述第一VXLAN报文中的类型标志位的值指示的报文类型是否为请求类型;a determining module, configured to determine whether a packet type indicated by a value of a type flag bit in the first VXLAN packet is a request type;
    触发模块,用于在所述第一VXLAN报文中的类型标志位的值指示的报文类型为请 求类型时,触发所述获取模块根据所述第一VXLAN报文获取第二VXLAN报文。 a triggering module, configured to indicate a packet type of a value of a type flag bit in the first VXLAN packet When the type is obtained, the acquiring module is triggered to acquire a second VXLAN message according to the first VXLAN message.
PCT/CN2015/081677 2014-10-20 2015-06-17 Packet processing method, device and system WO2016062106A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410557950.4 2014-10-20
CN201410557950.4A CN105591974B (en) 2014-10-20 2014-10-20 Message processing method, apparatus and system

Publications (1)

Publication Number Publication Date
WO2016062106A1 true WO2016062106A1 (en) 2016-04-28

Family

ID=55760233

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/081677 WO2016062106A1 (en) 2014-10-20 2015-06-17 Packet processing method, device and system

Country Status (2)

Country Link
CN (1) CN105591974B (en)
WO (1) WO2016062106A1 (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110417674A (en) * 2019-07-26 2019-11-05 新华三技术有限公司合肥分公司 A kind of data traffic sharing method and device
CN110661732A (en) * 2019-09-20 2020-01-07 浪潮思科网络科技有限公司 Device and method for scheduling traffic among working groups based on MAC (media access control) VLAN (virtual local area network) division
EP3637704A4 (en) * 2017-06-01 2020-04-15 Huawei Technologies Co., Ltd. Data transmission method and device
US10992496B2 (en) 2019-05-14 2021-04-27 International Business Machines Corporation Tuning TCP largesend parameter in VXLan cloud environments
CN113691640A (en) * 2020-05-19 2021-11-23 阿里巴巴集团控股有限公司 Communication method, communication device, electronic equipment and computer-readable storage medium
CN117041140A (en) * 2023-10-10 2023-11-10 腾讯科技(深圳)有限公司 Data message transmission method, related device, equipment and storage medium

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107634912B (en) * 2016-07-19 2020-04-28 华为技术有限公司 Load balancing method, device and equipment
US10511668B2 (en) * 2016-10-07 2019-12-17 Hyundai Motor Company Method of transmitting and receiving data in vehicle network and apparatus for the same
CN108206781B (en) 2016-12-16 2021-02-26 华为技术有限公司 Method and equipment for selecting forwarding path
CN107547342B (en) * 2017-06-27 2020-09-08 新华三技术有限公司 Message broadcasting method and device based on VXLAN tunnel
CN109039707A (en) * 2018-07-04 2018-12-18 烽火通信科技股份有限公司 The method and system of the rapid active-standby switching of Vxlan channel service
CN112511449B (en) * 2019-09-16 2022-12-30 华为技术有限公司 Message flow out-of-order detection method, message processing method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060092831A1 (en) * 2004-11-01 2006-05-04 Tekelec Methods, systems, and computer program products for substitution of card-based telephony bearer channel switch modules in a manner that preserves stable calls
CN101155109A (en) * 2006-09-30 2008-04-02 华为技术有限公司 Ethernet switching system and equipment
CN103368863A (en) * 2013-07-09 2013-10-23 杭州华三通信技术有限公司 Method and equipment for sharing load in SPB (Shortest Path Bridging) network

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005260321A (en) * 2004-03-09 2005-09-22 Nec Corp Alternative control system of label path network
CN101741709B (en) * 2008-11-06 2012-08-22 华为技术有限公司 Method and system for establishing label switched path and network node
CN102611566B (en) * 2011-12-16 2015-01-21 华为技术有限公司 Method and device for recovering customer service
CN102857416B (en) * 2012-09-18 2016-09-28 中兴通讯股份有限公司 A kind of realize the method for virtual network, controller and virtual network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060092831A1 (en) * 2004-11-01 2006-05-04 Tekelec Methods, systems, and computer program products for substitution of card-based telephony bearer channel switch modules in a manner that preserves stable calls
CN101155109A (en) * 2006-09-30 2008-04-02 华为技术有限公司 Ethernet switching system and equipment
CN103368863A (en) * 2013-07-09 2013-10-23 杭州华三通信技术有限公司 Method and equipment for sharing load in SPB (Shortest Path Bridging) network

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3637704A4 (en) * 2017-06-01 2020-04-15 Huawei Technologies Co., Ltd. Data transmission method and device
US11140082B2 (en) 2017-06-01 2021-10-05 Huawei Technologies Co., Ltd. Data transmission method and device
US10992496B2 (en) 2019-05-14 2021-04-27 International Business Machines Corporation Tuning TCP largesend parameter in VXLan cloud environments
CN110417674A (en) * 2019-07-26 2019-11-05 新华三技术有限公司合肥分公司 A kind of data traffic sharing method and device
CN110417674B (en) * 2019-07-26 2022-06-21 新华三技术有限公司合肥分公司 Data traffic sharing method and device
CN110661732A (en) * 2019-09-20 2020-01-07 浪潮思科网络科技有限公司 Device and method for scheduling traffic among working groups based on MAC (media access control) VLAN (virtual local area network) division
CN110661732B (en) * 2019-09-20 2022-05-27 浪潮思科网络科技有限公司 Device and method for scheduling flow among working groups based on MAC (media access control) VLAN (virtual local area network)
CN113691640A (en) * 2020-05-19 2021-11-23 阿里巴巴集团控股有限公司 Communication method, communication device, electronic equipment and computer-readable storage medium
CN113691640B (en) * 2020-05-19 2023-04-25 阿里巴巴集团控股有限公司 Communication method, communication device, electronic equipment and computer readable storage medium
CN117041140A (en) * 2023-10-10 2023-11-10 腾讯科技(深圳)有限公司 Data message transmission method, related device, equipment and storage medium
CN117041140B (en) * 2023-10-10 2024-01-30 腾讯科技(深圳)有限公司 Data message transmission method, related device, equipment and storage medium

Also Published As

Publication number Publication date
CN105591974A (en) 2016-05-18
CN105591974B (en) 2019-02-05

Similar Documents

Publication Publication Date Title
WO2016062106A1 (en) Packet processing method, device and system
CN109412964B (en) Message control method and network device
EP2716097B1 (en) Implementing epc in a cloud computer with openflow data plane
KR101506849B1 (en) A generalized dual-mode data forwarding plane for information-centric network
US8762501B2 (en) Implementing a 3G packet core in a cloud computer with openflow data and control planes
WO2018086076A1 (en) Data transmission method and apparatus
CN110022264B (en) Method for controlling network congestion, access device and computer readable storage medium
US20060203730A1 (en) Method and system for reducing end station latency in response to network congestion
WO2018121742A1 (en) Method and device for transmitting stream data
WO2018165009A1 (en) Vertical packet aggregation using a distributed network
EP2831733A1 (en) Implementing epc in a cloud computer with openflow data plane
WO2019179157A1 (en) Data traffic processing method and related network device
WO2022111724A1 (en) Network congestion detection method and apparatus
KR102455886B1 (en) Service Feature Chaining Congestion Feedback
WO2019174552A1 (en) Multicast route processing method, network device, and route reflector
WO2022028342A1 (en) Method for processing congestion flow and device
US9942161B1 (en) Methods and systems for configuring and updating session-based quality of service for multimedia traffic in a local area network
US11134060B2 (en) Mobile virtual private network configuration
WO2016033729A1 (en) Method and device for determining service function path
US8989008B2 (en) Wirespeed TCP packet window field modification for networks having radio segments
US10298494B2 (en) Reducing short-packet overhead in computer clusters
WO2021213308A1 (en) Router configuration method and router configuration apparatus
WO2021098425A1 (en) Qos policy method, device, and computing device for service configuration
US8238335B2 (en) Multi-route transmission of packets within a network
US11218394B1 (en) Dynamic modifications to directional capacity of networking device interfaces

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 15851693

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 15851693

Country of ref document: EP

Kind code of ref document: A1