WO2018107908A1 - 报文传输方法及交换机 - Google Patents

报文传输方法及交换机 Download PDF

Info

Publication number
WO2018107908A1
WO2018107908A1 PCT/CN2017/107699 CN2017107699W WO2018107908A1 WO 2018107908 A1 WO2018107908 A1 WO 2018107908A1 CN 2017107699 W CN2017107699 W CN 2017107699W WO 2018107908 A1 WO2018107908 A1 WO 2018107908A1
Authority
WO
WIPO (PCT)
Prior art keywords
path
switch
data packet
destination
destination switch
Prior art date
Application number
PCT/CN2017/107699
Other languages
English (en)
French (fr)
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 WO2018107908A1 publication Critical patent/WO2018107908A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/11Identifying congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/125Shortest path evaluation based on throughput or bandwidth
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/38Flow based routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • H04L47/2483Traffic characterised by specific attributes, e.g. priority or QoS involving identification of individual flows
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/25Routing or path finding in a switch fabric
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/30Peripheral units, e.g. input or output ports
    • H04L49/3081ATM peripheral units, e.g. policing, insertion or extraction
    • H04L49/309Header conversion, routing tables or routing tags

Definitions

  • the present invention relates to communication technologies, and in particular, to a message transmission method and a switch.
  • Typical data center architectures include the Clos architecture. Regardless of the architecture, the data center needs to address the issue of load balancing at runtime.
  • a data center load balancing method is proposed. This method is applied to data centers that support equal-cost multi-path (English).
  • the intermediate switch on the path identifies the path identifier of the path and the congestion of each link in the path.
  • a metric is added to the data packet and sent to the destination switch.
  • the target switch encapsulates the path identifier and the congestion information corresponding to the path in the second data packet, and The source switch sends a second data packet encapsulating the congestion information.
  • the source switch may determine the lightest path among the plurality of equal-cost paths of the switch according to the congestion information in the received different data packets. When the source switch needs to send data packets to the destination switch again, the source switch sends the data packet with the path with the lightest load.
  • the above method is only applicable to a data center architecture in which an equivalent multipath exists between a source switch and a destination switch, such as a Clos architecture, and is not applicable to other architectures that do not have equivalent multipath characteristics, and is difficult to satisfy based on these non-identities.
  • the price multipath features the architecture of the data center requirements.
  • the embodiment of the present invention provides a packet transmission method and a switch, which are used to solve the problem that the packet transmission method of the prior art is difficult to meet the data center requirement of an architecture without equivalent multipath characteristics.
  • a first aspect of the embodiments of the present invention provides a packet transmission method, where the method is described in the perspective of a source switch.
  • the source switch first receives the first data packet, and determines that the first data packet corresponds to the first data packet. a flow identifier and a destination switch of the first data packet, and the source switch determines, according to the optimal path to the destination switch and the flow identifier, a target path for sending the first data packet, where the destination switch is reached.
  • the optimal path is fed back to the source switch by the destination switch.
  • the destination switch determines and feeds back to the source switch from multiple inequality paths between the source switch and the destination switch.
  • the first data packet can be sent to the destination switch according to the target path.
  • the source switch determines the target path of the first data packet according to the optimal path and the flow identifier, where the optimal path is determined by the destination switch from multiple inequality paths between the source switch and the destination switch.
  • Feedback to the source switch that is, the destination switch considers the path information between the source switch and the destination switch to determine the optimal path, and the source switch selects the target path according to the optimal path, thereby ensuring that there is an unequal path.
  • the load balancing of the data center improves network throughput and improves network utilization.
  • the specific processing procedure is:
  • the source switch adds a first outer header to the first data packet, where the first outer header includes a congestion metric information field and a path identifier field, and the congestion metric information field is used to identify a congestion state of the target path, and the path identifier field Used to identify the target path.
  • the source switch sends the first data packet to which the first outer header is added to the target switch according to the target path.
  • the field in the congestion metric information field and the path identifier field are added to the first data packet, so that the destination switch determines the source switch and the destination switch according to the information indicated by the fields. Current optimal path.
  • the source switch may determine, according to the foregoing flow identifier and a preset mapping relationship table, a target path for sending the first data packet, where each entry of the mapping relationship table is used for recording. Correspondence between the flow identifier and the send path.
  • the data flow corresponding to the flow identifier is the Nth sent by the source switch to the destination switch.
  • the source switch randomly selects the source switch to the destination switch when the entry corresponding to the flow identifier does not exist in the mapping relationship table, and the N is an integer multiple of a preset value.
  • One of the transmission paths is the target path.
  • the mapping entry does not exist in the mapping relationship table, and the N is not an integer multiple of the preset value
  • the source switch uses the optimal path fed back by the destination switch as a The target path.
  • the foregoing processing method can ensure that the source switch can send data packets to the destination switch by using multiple paths, so that the destination switch can obtain the congestion state information of all the paths in real time, and then determine the congestion state information according to the congestion state information.
  • the current optimal path of the destination switch to the source switch can ensure that the source switch can send data packets to the destination switch by using multiple paths, so that the destination switch can obtain the congestion state information of all the paths in real time, and then determine the congestion state information according to the congestion state information.
  • the current optimal path of the destination switch to the source switch can ensure that the source switch can send data packets to the destination switch by using multiple paths, so that the destination switch can obtain the congestion state information of all the paths in real time, and then determine the congestion state information according to the congestion state information.
  • the current optimal path of the destination switch to the source switch can ensure that the source switch can send data packets to the destination switch by using multiple paths, so that the destination switch can obtain the congestion state information of all the paths in real time, and then determine the congestion state information according
  • the source switch may add a correspondence between the flow identifier and the target path in the mapping relationship table.
  • mapping between the flow identifier and the target path is added to the mapping relationship table, when the source switch needs to send the data packet again, the target of the data packet can be directly queried in the mapping relationship table according to the flow identifier corresponding to the data packet. Path, which improves the efficiency of message transmission.
  • the source switch uses, as the target path, a sending path corresponding to the stream identifier in the entry.
  • the source switch can determine the target path of the first data packet by directly reading the mapping relationship table.
  • the embodiment of the present invention reduces computational complexity and improves forwarding efficiency of the switch compared to the prior art.
  • the source switch may further receive a second data packet that is sent by the destination switch and includes the flow identifier, where the second data packet is encapsulated with a second outer header, and the second The value of the message type field in the outer header indicates that the type of the second data message is an optimal path feedback type.
  • the source may read the path identifier in the second outer header, and update the optimal path to the path corresponding to the path identifier.
  • the source switch After receiving the second data packet that is sent by the destination switch and including the optimal path, the source switch replaces the local optimal path with the latest optimal path, so as to ensure that the data packet can be retransmitted according to the latest data.
  • the latest optimal path to send further enhance the load balancing of the data center.
  • the first outer header of the first data packet sent by the source switch to the destination switch further includes a path hop field, where the path hop field is used to identify the The number of hops that the first data message passes on the target path.
  • the path hop field may cause the destination switch to determine whether the transmission path of the first data packet is the shortest path.
  • a second aspect of the present invention provides a packet transmission method, which is described in the perspective of a destination switch.
  • a destination switch first receives a first data packet sent by a source switch, where the first data packet is received.
  • the path identifier and the congestion metric information are included, where the path identifier indicates a sending path of the first data packet, and the congestion metric information indicates a congestion status of the sending path.
  • the destination switch further obtains the path identifier and the congestion metric information from the first data packet, and according to the information of multiple inequality paths between the source switch and the destination switch, and the path identifier obtained from the first data packet, and Congestion metric information to determine the current optimal path between the source switch and the destination switch.
  • the destination switch After determining the current optimal path, if the current optimal path is different from the prior optimal path between the destination switch and the source switch fed back by the destination switch to the source switch, the destination switch sends the current optimal to the source switch. path.
  • the destination switch when determining the current optimal path, the destination switch comprehensively considers the number of path hops and the path congestion state before the source switch and the destination switch, thereby ensuring load balancing of the data center having the unequal path, and improving the load.
  • Network throughput improves network utilization.
  • the destination switch determines the current optimal path to the source switch, and sends the changed optimal path to the source switch only when the current optimal path changes.
  • the destination switch sends a data packet to the source switch, and the source switch determines the target path.
  • the destination switch sends data packets to the source switch in this embodiment, because the change of the congestion status of each path is much longer than the change of the optimal path between the source switch and the destination switch. The number of times is greatly reduced, thereby reducing the burden on the source switch, the destination switch, and the entire network.
  • the first data packet includes a first outer header, and the first outer header includes the path identifier and the congestion metric information;
  • the first outer header further includes a message type field.
  • the value of the packet type field indicates that the packet type of the first data packet is a congestion information delivery type
  • the destination switch is from the The path identifier and the congestion metric information are obtained in a first outer header.
  • the important information such as the packet type, the path identifier, and the congestion metric information is filled in the outer header of the data packet for transmission, which not only occupies the transmission resource of the data to be transmitted, but also facilitates the source switch. , intermediate switches, and the filling, updating, and reading of destinations and switches.
  • the destination switch determines the current optimal path, if the path of the first data packet indicated by the path identifier is the shortest between the source switch and the destination switch And determining, by the destination switch, the source switch to the destination switch according to the congestion metric information in the first data packet and a congestion metric of the shortest path saved in the destination switch. The current optimal path between.
  • the destination switch uses the prior-time optimal path between the source switch and the destination switch as the current optimal path between the source switch and the destination switch.
  • the shortest path is sent before the first data packet is sent. There is no congestion, and congestion occurs when the first data packet is sent. At this time, the shortest path can no longer be used as the current optimal path between the source switch and the destination switch, and the source switch and the destination switch are between The first-time optimal path is used as the current optimal path to avoid the problem of reduced transmission efficiency caused by data packets being transmitted on the shortest path of congestion.
  • the congestion metric value indicated by the congestion metric information in the first data packet is less than a preset congestion threshold, and the congestion metric value of the shortest path saved in the destination switch.
  • the destination switch uses the shortest path as the current optimal path between the source switch and the destination switch.
  • the shortest path is already before the first data packet. Congestion is not used as the current optimal path.
  • the shortest path is no longer congested. In this case, the destination switch needs to adjust the current optimal path back to the shortest path in time. That is, as long as the shortest path is not congested, the shortest path is taken as the current optimal path, so as to ensure that the path is not congested, the shortest path is used as much as possible to reduce data packet transmission time, increase network throughput, and improve network utilization. rate.
  • the destination switch if the sending path of the first data packet indicated by the path identifier is not the shortest path between the source switch and the destination switch, the destination switch according to the The congestion metric value indicated by the congestion metric information in the first data packet and the congestion metric value of the prior priority path saved in the destination switch determine the source switch to the destination switch Current sub-optimal path.
  • the destination switch determines whether the congestion metric value indicated by the congestion metric information in the first data packet is smaller than the congestion of the prior priority path saved in the destination switch. And a metric, if yes, the sending path of the first data packet indicated by the path identifier is used as a current sub-optimal path between the source switch and the destination switch.
  • the sub-optimal path is adjusted, that is, the current sub-optimal path is always guaranteed. It is a path that is least congested. Furthermore, when the shortest path cannot be regarded as the current optimal path due to congestion, the current suboptimal path is selected as the current optimal path, thereby ensuring the transmission efficiency of the data packet and achieving a good load balancing effect.
  • the destination switch after updating the current sub-optimal path, the destination switch also sends the current sub-optimal path to the source switch.
  • the destination switch sends the current sub-optimal path to the source switch.
  • the source switch can send data packets according to the current sub-optimal path to further improve the transmission efficiency of data packets.
  • the first data packet further includes a path hop field
  • the method further includes:
  • the destination switch determines, according to the value of the path hop count field, whether the sending path of the first data packet is the shortest path between the source switch and the destination switch.
  • a third aspect of the present invention provides a switch having the function of implementing a source switch in the above method design. These functions can be implemented in hardware or in software by executing the corresponding software.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • the switch may include a receiving module, a processing module, and a sending module.
  • the receiving module, the processing module, and the sending module may perform corresponding functions in the foregoing methods, for example, a receiving module, configured to receive the first datagram.
  • a processing module configured to determine a flow identifier corresponding to the first data packet and a destination switch of the first data packet; the processing module is further configured to: according to an optimal path to the destination switch The flow identifier determines a target path for sending the first data packet, where the optimal path is determined by the destination switch from multiple inequality paths between the source switch and the destination switch and fed back to the source a sending module, configured to send the first data packet to the destination switch according to the target path.
  • a fourth aspect of the present invention provides a switch having the function of implementing a destination switch in the above method design. These functions can be implemented in hardware or in software by executing the corresponding software.
  • the hardware or software includes one or more modules corresponding to the functions described above.
  • the switch may include a receiving module, a processing module, and a sending module, and the receiving module, the processing module, and the sending module may perform corresponding functions in the foregoing methods, for example, a receiving module, configured to receive the sending by the source switch.
  • the first data packet includes: a path identifier and a congestion metric information; the path identifier indicates a sending path of the first data packet; and the congestion metric information indicates a congestion state of the sending path a processing module, configured to obtain the path identifier and the congestion metric information from the first data packet; the processing module is further configured to: according to multiple strips between the source switch and the destination switch Determining a current optimal path between the source switch and the destination switch, and a sending module, configured by the processing module, by the information of the non-equivalent path and the path identifier and the congestion metric information An optimal path and the destination switch and the source switch fed back by the destination switch to the source switch Between the optimal path is not the same prior to said current source switch sends the optimal path.
  • a fifth aspect of the present invention provides a switch including a memory for storing program instructions, and a processor for calling program instructions in the memory to implement the first aspect and implementation thereof The method in the way.
  • a sixth aspect of the present invention provides a switch, the switch including a memory and a processor, the memory is configured to store program instructions, and the processor is configured to invoke program instructions in the memory to implement the second aspect and implementations thereof The method in the way.
  • FIG. 1 is a schematic structural diagram of a data center according to an embodiment of the present invention.
  • FIG. 3 is a block diagram of a switch according to an embodiment of the present invention.
  • FIG. 4 is a block diagram of another switch according to an embodiment of the present invention.
  • FIG. 5 is a physical block diagram of a switch according to an embodiment of the present invention.
  • FIG. 6 is a physical block diagram of another switch according to an embodiment of the present invention.
  • the embodiment of the present invention proposes a message transmission method suitable for an architecture without equivalent multipath characteristics.
  • the hop count of the path and the congestion of the path are comprehensively considered.
  • the state, that is, the shortest path is preferentially used as the transmission path.
  • the suboptimal path is used as the transmission path, thereby achieving the purpose of load balancing.
  • FIG. 1 is a schematic structural diagram of a data center according to an embodiment of the present invention, where the data center adopts a two-stage MESH architecture.
  • the MESH architecture includes a plurality of switch groups (three are shown in FIG. 1), and each switch group includes a plurality of switches (three are shown in FIG. 1).
  • the first switch group includes three switches that are A11, A12, and A13
  • the second switch group includes three switches that are B11, B12, and B13
  • the third switch group includes three switches that are C11 and C12. C13.
  • A11, B11 and C11 form the first group of planes
  • A12, B12 and C12 form the second group of planes
  • A13, B13 and C13 form the third group of planes.
  • the hop count of the shortest path between the switches in the two groups in the MESH architecture may be 1 hop, the hop count of the sub-optimal path is 2 hops, and the hop count of the shortest path between the switches between the two groups It can be 1 hop or 2 hops, and the hop count of the suboptimal path can be 3 hops or 4 hops.
  • the embodiment of the present invention introduces the technical solution of the present invention by taking the MESH architecture as an example, but this should not be construed as limiting the embodiments of the present invention.
  • the embodiments of the present invention are equally applicable to other non-equivalent multipaths.
  • the characteristic architecture consists of a data center.
  • each switch is connected to at least one server (one shown in Figure 1), and each server accesses other servers through a switch to which the server is connected.
  • the embodiment of the present invention provides a message transmission method based on the data center shown in FIG. As shown in Figure 2, the method includes:
  • the source switch receives the first data packet sent by the server.
  • the source switch receives the first data packet sent by the server to which it is connected, and sends the first data packet to the destination switch according to the determined path.
  • the source switch determines a flow identifier corresponding to the first data packet and a destination switch of the first data packet.
  • the source switch may determine, according to the quintuple information of the first data packet, a flow identifier of the first data packet and a destination switch.
  • the stream identifier may be an identifier of the data stream, or may be an identifier of a stream cluster (English: flowlet) obtained by dividing the data stream.
  • the source switch determines, according to the optimal path to the destination switch and the foregoing flow identifier, a target path for sending the first data packet.
  • the optimal path refers to an optimal path between the source switch and the destination switch when the source switch receives the first data packet.
  • the optimal path is a plurality of inequitable paths between the source switch and the destination switching switch by the destination switch. Determined and fed back to the source switch. There may be multiple paths between the destination switch and the source switch. The hops that these paths may pass are not the same, that is, these paths may be unequal paths. The destination switch can select one of these non-equivalent paths to send to the source switch as the optimal path.
  • the destination path of the first data packet is determined by combining the flow identifier corresponding to the first data packet and the optimal path to the destination switch.
  • the source switch may be the optimal path combined with the flow identifier and the target path determined by the optimal path, or may be other paths between the source switch and the destination switch. The specific process will be described in detail below.
  • the source switch After adding the path identifier of the target path and the congestion metric information to the first data packet, the source switch sends the first data packet to the destination switch according to the determined target path.
  • a specific field is added to the outer header of the data packet to transfer information for determining an optimal path between the source switch and the destination switch. As shown in Table 1, the field added in the outer layer head in the embodiment of the present invention.
  • the packet type when the value of the packet type field is 0, the packet type is a congestion information delivery type. When the value of the packet type field is 1, the packet type is an optimal path feedback type.
  • the outer layer header may be a virtual eXtensible virtual area network (VXLAN) header or a transparent interconnection of Lots of Links (TRILL) header.
  • VXLAN virtual eXtensible virtual area network
  • TRILL transparent interconnection of Lots of Links
  • the source switch Before sending the first data packet, the source switch may encapsulate the first outer header for the first data packet and fill in the foregoing field in the first outer header. Specifically, the source switch needs to set the value of the message type field to a value corresponding to the “congestion information delivery type”, and accordingly, set the value of the path identifier field to the identifier of the target path determined in S102. Moreover, the source switch also needs to fill the congestion information detected by the source switch into the congestion metric information field. For example, the source switch populates the congestion metric information field with the current link usage of the target path.
  • the source switch may also fill the initial value in the target path hop field, for example, "1", indicating that the target path has passed 1 hop.
  • the intermediate switch updates the value of the field in the process of forwarding the first data packet.
  • the source switch sends the first data packet to which the first outer header is added to the target switch according to the target path.
  • the intermediate switch receives the first data packet.
  • the intermediate switch updates a value of a corresponding field in the first outer header in the first data packet.
  • the intermediate switch After the intermediate switch receives the first data packet sent by the source switch or the previous intermediate switch, only the congestion metric information field or the path hop field shown in Table 1 may need to be updated.
  • the congestion metric information field if the congestion metric information indicates the link usage rate, the intermediate switch updates the value in the congestion metric information field according to the currently detected link usage rate; if the congestion metric information indicates the end-to-end transmission time, etc.
  • the intermediate switch does not need to update the field, but is directly processed by the destination switch.
  • the target path hop field the intermediate switch needs to increment the value of this field by one.
  • the intermediate switch sends the first data packet to the destination switch.
  • the steps of S205-S207 are respectively performed, and only the switch that sends the data packet or the switch that receives the data packet is different. For example, if there are three intermediate switches M1, M2, and M3 between the source switch and the destination switch, M1 receives the first data packet from the source switch, and forwards the first data packet to M2, and M2 receives the M1 from M1. The first data packet is forwarded to the M3, and the M3 receives the first data packet from the M2, and forwards the first data packet to the destination switch.
  • each of the foregoing intermediate switches modifies the congestion metric information field and/or the path hop field in the first data packet, but does not modify the first data packet.
  • the payload (English: payload), therefore, the modified first data packet can still be referred to as the first data packet.
  • the destination switch receives the first data packet sent by the source switch, where the first data packet includes a path identifier and congestion metric information.
  • the destination switch obtains the path identifier and the congestion metric information from the first data packet.
  • the path identifier indicates a transmission path of the first data packet, that is, the target path determined in the foregoing step S203, and the congestion metric information indicates a congestion condition of the target path.
  • the source switch encapsulates the first outer header for the first data packet, where the first outer header includes the path identifier field and the congestion metric information, as described in the foregoing step S204.
  • Field and message type fields In this step, the destination switch first reads the value of the packet type field in the first outer header.
  • the value of the packet type field indicates that the packet type of the first data packet is the congestion information transmission type
  • the destination switch The path identifier and congestion metric information are obtained in the first outer header.
  • the destination switch receives the first data packet sent from the source switch and forwarded by the intermediate switch.
  • the destination switch determines the current optimal path between the source switch and the destination switch according to the information of multiple inequality paths between the source switch and the destination switch, and the path identifier and the congestion metric information.
  • multiple non-equivalent paths between the source switch and the destination switch are pre-stored in the destination switch, including the shortest path and other paths.
  • the shortest path between the source switch and the destination switch refers to the path with the fewest hops from the source switch to the destination switch.
  • the destination switch determines the current optimal between the source switch and the destination switch according to multiple inequality paths between the source switch and the destination switch, and the path identifier and congestion metric information, that is, the hop count and congestion status of different paths. path.
  • the specific method for the destination switch to determine the current optimal path based on the above information is described in detail below.
  • the destination switch determines whether the determined current optimal path is different from the previous optimal path that the destination switch feeds back to the source switch. If yes, execute S212; otherwise, end.
  • the prior optimal path that the destination switch feeds back to the source switch refers to the optimal path that the destination switch feeds back to the source switch. After the destination switch feeds back the optimal path to the source switch, it records the most recent feedback.
  • the optimal path after determining the current optimal path again, the destination switch compares the prior optimal path with the current optimal path. The destination switch can compare the identifiers of the two paths. If the identifiers are different, determine that the two paths are different.
  • the destination switch sends a second data packet to the source switch, where the second data packet includes a current optimal path determined by the destination switch.
  • the destination switch needs to feed back the current optimal path to the source switch, so that the source switch according to the current optimal path. Sends a data packet to the destination switch.
  • the source switch sends a data packet as a starting point for the description, but it is obvious that before the source switch sends the data packet, the source switch may first receive the current optimal path sent by the destination switch.
  • the data message that is, before step S201 described above, may also execute S212.
  • the destination switch first encapsulates the second outer header in the second data packet, and sets the value of the packet type field of the second outer header to the “optimal path feedback type”, that is, the second outer layer.
  • the value of the packet type field in the header indicates that the type of the data packet is the optimal path feedback type, and the destination switch further fills the identifier of the determined current optimal path in the path identifier field of the second outer header.
  • the intermediate switch receives the second data packet sent by the destination switch, and forwards the second data packet to the source switch.
  • the intermediate switch forwards the second data packet sent by the destination switch to the source switch, the intermediate switch does not need to update the field in the outer header of the second data packet, but only forwards the second data packet.
  • each intermediate switch performs the above steps of S213, which is only a switch that sends data packets or a switch that receives data packets.
  • M3 receives the packet from the destination switch and forwards the data packet to M2.
  • M2 receives the data packet from M3 and The data packet is forwarded to M1, and M1 receives the data packet from M2 and forwards the data packet to the source switch.
  • the source switch receives the second data packet, reads the path identifier in the second data packet, and updates the optimal path to the current optimal path carried in the second data packet.
  • the source switch After receiving the second data packet sent by the destination switch, the source switch first determines whether the value of the packet type field in the second outer header of the second data packet is an "optimal path feedback type", and if so, The source switch carries the current optimal path fed back to the source switch by the destination switch. The source switch reads and saves the value of the path identifier field in the second outer header, that is, the original path saved in the source switch. Is the current optimal path.
  • the source switch determines the target path according to the updated optimal path.
  • the source switch may save an optimal path to a different destination switch through an optimal path table, where each entry of the optimal path table includes an identifier of the target switch and the destination switch corresponding to the destination switch The optimal path of the source switch.
  • the source switch can directly query the optimal path to the destination switch according to the identifier of the destination switch.
  • the first data packet sent by the source switch to the destination switch carries the path identifier and the congestion metric information value, and the destination switch according to the value and the information of multiple inequality paths between the source switch and the destination switch. Determine the current optimal path between the source switch and the destination switch. That is, the embodiment of the present invention comprehensively considers the number of path hops and the path congestion state before the source switch and the destination switch, thereby ensuring load balancing of the data center having the unequal path, improving the network throughput, and improving the network utilization.
  • the destination switch determines the current optimal path to the source switch, and sends the changed optimal path to the source switch only when the current optimal path changes.
  • the destination switch sends a data packet to the source switch, and the source switch determines the target path.
  • the destination switch sends data packets to the source switch in this embodiment, because the change of the congestion status of each path is much longer than the change of the optimal path between the source switch and the destination switch. The number of times is greatly reduced, thereby reducing the burden on the source switch, the destination switch, and the entire network.
  • the following describes the specific method for the source switch to determine the target path for sending the first data packet according to the flow identifier of the first data packet and the optimal path fed back by the destination switch.
  • the flow identifier is used as an example of a flowlet identifier.
  • the data packet is sent according to the data stream, and one data stream can be divided into different flowlets for sending, specifically, when the data packet A in one data stream and the last data packet of the data stream arrive at a switch.
  • the data message A can be divided into a new flowlet of the data stream, and different flowlets can be sent according to different paths.
  • one path can be set for each flowlet.
  • the source switch After receiving the first data packet from the server, the source switch first determines the flowlet identifier corresponding to the first data packet, that is, the flowlet to which the data packet belongs.
  • the flowlet identifier may be determined by the quintuple information of the first data packet.
  • the source switch determines, according to the flow identifier and the preset mapping relationship table, the target path for sending the first data packet.
  • Each entry of the mapping relationship table is used to record a correspondence between a flow identifier and a sending path, that is, the foregoing
  • the mapping mapping relationship table is used to indicate the sending path of the data packet corresponding to each flow identifier.
  • the mapping relationship table needs to be queried according to the flow identifier, and the result of the query may be an entry corresponding to the flow identifier in the mapping relationship table.
  • the entry corresponding to the flow identifier does not exist in the mapping relationship table.
  • the source switch determines the target path of the data packet according to the foregoing flow identifier.
  • the data stream corresponding to the flow identifier is the Nth data stream sent by the source switch to the destination switch, where N is an integer greater than zero, and if N is an integer multiple of the preset value, the source switch randomly selects the source.
  • the destination path between the switch and the destination switch is the destination of the first data packet. If N is not an integer multiple of the preset value, the source switch uses the optimal path fed back by the destination switch as the destination of the first data packet. path.
  • the source switch randomly selects a sending path between the switch and the destination switch as the target path;
  • the source switch uses the optimal path fed back by the destination switch as the target path.
  • the flowlet corresponding to the flow identifier is a new flowlet.
  • the source switch does not directly use the optimal path fed back by the destination switch as the first data packet.
  • the target path is differentiated according to the sequence number N of the stream. If N is an integer multiple of a preset value, for example, an integer multiple of 3, a random path is selected as the target path of the first data packet, if N is not If the preset value is an integer multiple, the optimal path fed back by the destination switch is selected as the target path of the first data packet.
  • the source switch can ensure that the source switch can send data packets to the destination switch by using multiple paths, so that the destination switch can obtain the congestion status information of all the paths in real time.
  • the congestion status information determines a current optimal path of the destination switch to the source switch.
  • the source switch After the source switch determines the target path of the first data packet according to the flow identifier, the source switch adds the flow identifier corresponding to the first data packet and the target path to the mapping relationship table, that is, adds the mapping relationship table. An entry including a correspondence between a flow identifier and a target path.
  • the source switch can directly obtain the target path of the next data packet by querying the mapping relationship table.
  • mapping corresponding to the flow identifier When the mapping corresponding to the flow identifier exists in the mapping relationship table, it indicates that the flow corresponding to the flow identifier is an existing flow, and the source switch directly associates the corresponding entry of the flow identifier with the flow identifier.
  • the transmission path is used as the target path of the first data message.
  • the source switch if the source switch has determined that the current traffic identifier of the data packet to be sent is 2, the source switch queries the mapping relationship table to find the entry with the flow identifier 2 in the table, and the target path corresponding to the entry is A, the source switch can directly determine that the target path of the data packet that needs to be sent is path A.
  • the source switch can determine the target path of the first data packet by directly reading the mapping relationship table.
  • the embodiment of the invention when determining the target path, it is necessary to traverse all the paths and perform comparisons one by one to determine. Therefore, compared with the prior art, the embodiment of the invention also reduces the computational complexity and improves the forwarding efficiency of the switch.
  • the following describes the specific method for determining the current optimal path between the source switch and the destination switch according to the information of multiple inequality paths between the source switch and the destination switch and the path identifier and congestion metric information in the foregoing S210.
  • the destination switch may also obtain path information and congestion information based on the fields in Table 1 above.
  • the first switch After the destination switch determines that the value of the packet type field in the first data packet sent from the source switch indicates that the packet type of the first data packet is the congestion information delivery type, the first switch reads the first data packet.
  • the path corresponding to the path identifier is the shortest path.
  • the destination switch If the sending path of the first data packet indicated by the path identifier is the shortest path between the source switch and the destination switch, the destination switch according to the congestion metric information in the first data packet and the source switch saved in the destination switch The congestion metric of the shortest path between the destination switches determines the current optimal path between the source switch and the destination switch.
  • the direct comparison path identifier may determine whether the target path of the first data packet is the shortest path. In another case, only the hop count information of the shortest path may be saved in the destination switch, and it is not clear which path the shortest path is.
  • the destination switch can determine by reading the value of the path hop field in the first outer header of the first data packet. If the value of the field is the same as the hop value of the shortest path saved by the destination switch, it may be determined that the target path of the first data packet is the shortest path between the source switch and the destination switch.
  • the congestion metric of the shortest path can be saved in the destination switch.
  • the destination switch After determining that the target path of the first data packet is the shortest path between the source switch and the destination switch, the destination switch saves the congestion metric information of the first outer header and the destination switch in the first data packet. The congestion metric of the shortest path between the source switch and the destination switch to determine the current optimal path.
  • the congestion metric value indicated by the congestion metric information in the first data packet is greater than or equal to the preset congestion threshold, and the congestion metric of the shortest path between the source switch and the destination switch saved in the destination switch If the value is less than the preset congestion threshold, the prioritized path between the source switch and the destination switch is used as the current optimal path between the source switch and the destination switch.
  • the shortest path is sent before the first data packet is sent. There is no congestion, and congestion occurs when the first data packet is sent. At this time, the shortest path can no longer be used as the current optimal path between the source switch and the destination switch, and the source switch and the destination switch are between The first-time optimal path is used as the current optimal path to avoid the problem of reduced transmission efficiency caused by data packets being transmitted on the shortest path of congestion.
  • the path with the smallest congestion metric except the shortest path is the sub-optimal path.
  • the first-time optimal path refers to the sub-optimal path recorded by the destination switch last time. When the shortest path is congested, the destination switch will use the first-best path as the current optimal path to ensure optimal transmission efficiency and achieve optimal load balancing.
  • the congestion metric information indicated by the congestion metric information in the first data packet is smaller than the preset congestion threshold, and the shortest path between the source switch and the destination switch saved in the destination switch If the congestion metric is greater than or equal to the preset congestion threshold, the shortest path between the source switch and the destination switch is used as the current optimal path between the source switch and the destination switch.
  • the shortest path is already before the first data packet. Congestion is not used as the current optimal path.
  • the shortest path is no longer congested. In this case, the destination switch needs to adjust the current optimal path back to the shortest path in time. That is, as long as the shortest path is not congested, the shortest path is taken as the current optimal path, so as to ensure that the path is not congested, the shortest path is used as much as possible to reduce data packet transmission time, increase network throughput, and improve network utilization. rate.
  • the congestion metric of the shortest path needs to be updated accordingly, that is, the congestion metric is updated to the congestion metric indicated by the congestion metric information in the first data packet.
  • the value is used to dynamically update the congestion metric of the shortest path in time to ensure that the current optimal path is determined according to the congestion metric of the shortest path after receiving the data packet sent by the source switch next time.
  • the path corresponding to the path identifier is not the shortest path.
  • the destination switch If the sending path of the first data packet indicated by the path identifier is not the shortest path between the source switch and the destination switch, the destination switch according to the congestion metric indicated by the congestion metric information in the first data packet and the destination switch The congestion metric of the prior-period path saved in the current path determines the current sub-optimal path between the source switch and the destination switch.
  • the destination switch determines that the sending path of the first data packet indicated by the path identifier is not the shortest path between the source switch and the destination switch, determining congestion indicated by the congestion metric information in the first data packet The metric is smaller than the congestion metric of the sub-optimal path saved in the destination switch. If yes, the path of the first data packet indicated by the path identifier is used as the current sub-optimal path between the source switch and the destination switch.
  • the sub-optimal path is adjusted, that is, the current sub-optimal path is always guaranteed. It is a path that is least congested. Furthermore, when the shortest path cannot be regarded as the current optimal path due to congestion, the current suboptimal path is selected as the current optimal path, thereby ensuring the transmission efficiency of the data packet and achieving a good load balancing effect.
  • the destination switch saves the sub-optimal path information between the source switch and the destination switch, including the path identifier and the congestion metric. After the sub-optimal path changes, the destination switch saves the new sub-optimal path information. The path identifier and the congestion metric are also saved. When the data packet of the congestion type is received again, the current optimal path can be determined according to the saved information.
  • the congestion measurement value in the embodiment of the present invention may directly use actual measurement values such as link usage rate and end-to-end transmission time, or may be obtained by performing quantization operations according to the actual measurement values, so as to determine the congestion metric value. It is easier to compare.
  • the destination switch updates the current sub-optimal path, if the current congestion metric of the shortest path is If the threshold is greater than the preset congestion threshold, the destination switch can send the current sub-optimal path to the source switch.
  • the destination switch needs to send the current sub-optimal path to the source switch, so that the source switch sends data packets according to the current sub-optimal path, thereby further improving the data transmission efficiency.
  • the destination header is also encapsulated in the data packet, and the value of the packet type field in the outer header is the optimal path feedback.
  • Type the path corresponding to the path identifier in the outer header is the current sub-optimal path after the update.
  • FIG. 3 is a schematic structural diagram of a switch according to an embodiment of the present invention.
  • the switch specifically refers to a source switch, and the switch includes:
  • the receiving module 301 is configured to receive the first data packet.
  • the processing module 302 is configured to determine a flow identifier corresponding to the first data packet and a destination switch of the first data packet.
  • the processing module 302 is further configured to determine, according to the optimal path to the destination switch and the foregoing flow identifier, a target path for sending the first data packet, where the optimal path is that the destination switch is different from the source switch and the destination switch. Determined in the price path and fed back to the source switch.
  • the sending module 303 is configured to send the first data packet to the destination switch according to the target path.
  • the switch is used to implement the foregoing method embodiments, and the implementation principle and technical effects are similar, and details are not described herein again.
  • the sending module 301 is specifically configured to:
  • the first outer header includes a congestion metric information field and a path identifier field, where the congestion metric information field is used to identify a congestion status of the target path, and the path identifier field Used to identify the target path;
  • processing module 302 is specifically configured to:
  • mapping relationship table determining, according to the flow identifier and the preset mapping relationship table, a target path for sending the first data packet, where each entry of the mapping relationship table is used to record a correspondence between the flow identifier and the sending path.
  • a specific process when the processing module 302 performs the above processing is:
  • the data stream corresponding to the flow identifier is the Nth data stream sent by the source switch to the destination switch.
  • N is an integer multiple of the preset value
  • the optimal path fed back by the destination switch is used as the target path.
  • processing module 302 is further configured to:
  • the sending path corresponding to the flow identifier in the entry is used as the target path.
  • the receiving module 301 is further configured to:
  • a second data packet including a flow identifier; the second data packet is encapsulated with a second outer header; and the value of the packet type field in the second outer header indicates a type of the second data packet The type of feedback for the optimal path.
  • the processing module 302 is further configured to:
  • the path identifier in the second outer header is read, and the optimal path is updated to the path corresponding to the path identifier.
  • the first outer header of the first data packet sent by the source switch to the destination switch further includes a path hop field, where the path hop field is used to identify that the first data packet is on the target path. The number of hops that have passed.
  • FIG. 4 is a block diagram of another switch according to an embodiment of the present invention.
  • the switch specifically refers to a destination switch, and the switch includes:
  • the receiving module 401 is configured to receive a first data packet sent by the source switch, where the first data packet includes a path identifier and a congestion metric information, where the path identifier indicates a sending path of the first data packet, where the congestion metric information indicates sending The congestion status of the path.
  • the processing module 402 is configured to obtain a path identifier and congestion metric information from the first data packet.
  • the processing module 402 is further configured to determine a current optimal path between the source switch and the destination switch according to the information of the multiple inequality paths between the source switch and the destination switch, and the path identifier and the congestion metric information.
  • the sending module 403 is configured to send the current optimal path to the source switch when the current optimal path determined by the processing module 402 is different from the previous optimal path between the destination switch and the source switch fed back by the destination switch to the source switch. .
  • the switch is used to implement the foregoing method embodiments, and the implementation principle and technical effects are similar, and details are not described herein again.
  • the first data packet includes a first outer header
  • the first outer header includes the path identifier and the congestion metric information
  • the first outer header further includes a message type field.
  • the processing module 402 obtains the path from the first outer header. Identification and the above congestion metric information.
  • processing module 402 is specifically configured to:
  • the congestion metric information in the first data packet and the shortest path saved in the destination switch are congested.
  • the metric determines the current optimal path between the source switch and the destination switch.
  • a specific process of the processing module 402 in performing the above processing is:
  • the source switch and the destination are The prior-time optimal path between the switches serves as the current optimal path between the source switch and the destination switch.
  • the congestion metric value indicated by the congestion metric information in the first data packet is less than the preset congestion threshold, and the congestion metric value of the shortest path saved in the destination switch is greater than or equal to the preset congestion threshold, the shortest path is used as the source.
  • processing module 402 is further configured to:
  • the congestion metric value and the destination exchange indicated by the congestion metric information in the first data packet are used.
  • the congestion metric of the first-time optimal path saved in the machine determines the current sub-optimal path between the source switch and the destination switch.
  • processing module 402 is further specifically configured to:
  • the sending path acts as the current sub-optimal path between the source switch and the destination switch.
  • the sending module 403 is further configured to:
  • the first data packet further includes a path hop field.
  • the processing module 402 is further configured to:
  • FIG. 5 is a physical block diagram of a switch according to an embodiment of the present invention.
  • the switch specifically refers to a source switch, and the switch includes:
  • the memory 501 is used to store program instructions, and the processor 502 is configured to call program instructions in the memory 501 to implement the functions of the source switches in the foregoing method embodiments.
  • FIG. 6 is a physical block diagram of another switch according to an embodiment of the present invention.
  • the switch specifically refers to a destination switch, and the switch includes:
  • Memory 601 and processor 602 are Memory 601 and processor 602;
  • the memory 601 is used to store program instructions, and the processor 602 is configured to call program instructions in the memory 601 to implement the functions of the destination switch in the foregoing method embodiments.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明提供一种报文传输方法及交换机。源交换机首先接收第一数据报文,并确定该第一数据报文对应的流标识以及该第一数据报文的目的交换机,进而,源交换机根据到达该目的交换机的最优路径以及上述流标识,来确定发送第一数据报文的目标路径,其中,到达该目的交换机的最优路径是由目的交换机反馈给源交换机的,具体是由目的交换机从源交换机和目的交换机之间的多条不等价路径中确定并反馈给源交换机的。源交换机确定出发送第一数据报文的目标路径之后,即可根据该目标路径向目的交换机发送第一数据报文。本发明保证了存在不等价路径的数据中心的负载均衡,提升了网络吞吐量,提高了网络利用率。

Description

报文传输方法及交换机
本申请要求于2016年12月14日提交中国专利局、申请号为201611156102.8、发明名称为“报文传输方法及交换机”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及通信技术,尤其涉及一种报文传输方法及交换机。
背景技术
随着网络应用、大数据分析以及云计算等业务的不断发展,业界对数据中心的规模以及数据中心的网络(英文:fabric)容量需求越来越大。因此,需要提供特定架构的数据中心,以满足各种业务的需求。典型的数据中心架构包括克劳斯(Clos)架构等。不论基于何种架构,数据中心在运行时,都需要解决负载均衡的问题。
现有技术中,提出了一种数据中心负载均衡方法。该方法应用于支持等价多路径(英文:equal-cost multi-path)技术的数据中心中。在源交换机通过多条等价路径中的一条路径向目的交换机发送第一报文的过程中,所述路径上的中间交换机将所述路径的路径标识以及所述路径中各段链路的拥塞度量值添加到所述数据报文中发往所述目的交换机。当所述目的交换机向所述源交换机发送第二数据报文时,所述目标交换机将所述路径标识和所述路径对应的拥塞信息封装在所述第二数据报文中,并向所述源交换机发送封装了所述拥塞信息的第二数据报文。所述源交换机根据所接收到的不同数据报文中的拥塞信息就可以确定交换机所述多条等价路径中的负载最轻的路径。当所述源交换机需要再次向所述目交换机发送数据报文时,所述源交换机就会优选该负载最轻的路径发送数据报文。
但是,上述方法仅适用于源交换机和目的交换机之间存在等价多路径的数据中心架构,例如Clos架构,并不适用于其他不具有等价多路径特点的架构,难以满足基于这些不具有等价多路径特点的架构的数据中心的需求。
发明内容
本发明实施例提供一种报文传输方法及交换机,用于解决现有技术的报文传输方法难以满足不具有等价多路径特点的架构的数据中心需求的问题。
本发明实施例第一方面提供一种报文传输方法,该方法站在源交换机的角度进行描述,在该方法中,源交换机首先接收第一数据报文,并确定该第一数据报文对应的流标识以及该第一数据报文的目的交换机,进而,源交换机根据到达该目的交换机的最优路径以及上述流标识,来确定发送第一数据报文的目标路径,其中,到达该目的交换机的最优路径是由目的交换机反馈给源交换机的,具体是由目的交换机从源交换机和目的交换机之间的多条不等价路径中确定并反馈给源交换机的。源交换机确定出发送第一数据报文的目标路径之后,即可根据该目标路径向目的交换机发送第一数据报文。
在该方法中,源交换机根据最优路径以及流标识确定第一数据报文的目标路径,其中,最优路径是目的交换机从源交换机和目的交换机之间的多条不等价路径中确定并反馈给源交换机的,即目的交换机是综合考虑了源交换机和目的交换机之间的路径信息来确定最优路径,源交换机再根据该最优路径来选择目标路径,从而保证了存在不等价路径的数据中心的负载均衡,提升了网络吞吐量,提高了网络利用率。
在一种可能的设计中,源交换机根据目标路径向目的交换机发送第一数据报文时,具体处理过程为:
首先,源交换机为第一数据报文添加第一外层头,该第一外层头中包括拥塞度量信息字段以及路径标识字段,拥塞度量信息字段用于标识目标路径的拥塞状态,路径标识字段用于标识目标路径。
进而,源交换机根据目标路径向目标交换机发送添加了第一外层头的第一数据报文。
源交换机在发送第一数据报文时,在第一数据报文中添加拥塞度量信息里字段以及路径标识字段,可以使得目的交换机根据这些字段所指示的信息来确定源交换机和目的交换机之间的当前最优路径。
在一种可能的设计中,源交换机可以根据上述流标识以及预设的映射关系表,确定发送所述第一数据报文的目标路径,其中,该映射关系表的每个表项用于记录流标识与发送路径的对应关系。
一种情况下,在根据流标识以及预设的映射关系表,确定发送第一数据报文的目标路径时,假设流标识对应的数据流为所述源交换机发往所述目的交换机的第N个数据流,当映射关系表中不存在所述流标识对应的表项,且所述N为预设值的整数倍时,所述源交换机随机选择所述源交换机至所述目的交换机之间的一条发送路径作为所述目标路径。当所述映射关系表中不存在所述流标识对应的表项,且所述N不为预设值的整数倍时,所述源交换机将所述目的交换机反馈的所述最优路径作为所述目标路径。
上述处理方法可以保证源交换机可以使用多条路径向目的交换机发送数据报文,避免一些路径一直不被使用,从而使得目的交换机可以实时获取到所有路径的拥塞状态信息,进而根据这些拥塞状态信息确定所述目的交换机到所述源交换机的当前最优路径。
在一种可能的设计中,源交换机在确定出第一数据报文的目标路径之后,可以在映射关系表中增加所述流标识与所述目标路径的对应关系。
将流标识与目标路径的对应关系增加到映射关系表之后,当源交换机再次需要发送数据报文时,就可以根据数据报文对应的流标识直接在映射关系表中查询到数据报文的目标路径,从而提升报文传输的效率。
另一种情况下,在根据流标识以及预设的映射关系表,确定发送第一数据报文的目标路径时,若所述映射关系表中存在所述流标识对应的表项,则所述源交换机将所述表项中与所述流标识对应的发送路径作为所述目标路径。
上述处理过程中,源交换机通过直接读取映射关系表就可以确定出第一数据报文的目标路径,而现有技术中在确定目标路径时,需要遍历所有路径并逐个进行比对才可以确定,因此,本发明实施例相对于现有技术,还减少了运算复杂度,提高了交换机的转发效率。
在一种可能的设计中,源交换机还可以接收所述目的交换机发送的包括所述流标识的第二数据报文,所述第二数据报文封装有第二外层头,所述第二外层头中的报文类型字段的值指示所述第二数据报文的类型为最优路径反馈类型。
源接收到第二数据报文之后,可以读取所述第二外层头中的路径标识,将所述最优路径更新为所述路径标识对应的路径。
源交换机接收到目的交换机发送的包含最优路径的第二数据报文之后,及时将本地所保存的最优路径替换为接收到的最新的最优路径,从而保证再发送数据报文时可以根据最新的最优路径来发送,进一步提升数据中心的负载均衡。
在一种可能的设计中,所述源交换机向所述目的交换机所发送的第一数据报文的第一外层头中还包括路径跳数字段,所述路径跳数字段用于标识所述第一数据报文在所述目标路径上所经过的跳数。
当目的交换机中没有保存最短路径的标识而只是保存了最短路径的跳数信息时,上述路径跳数字段可以使得目的交换机判断第一数据报文的发送路径是否为最短路径。
本发明第二方面提供一种报文传输方法,该方法站在目的交换机的角度进行描述,在该方法中,目的交换机首先接收源交换机发送的第一数据报文,该第一数据报文中包括路径标识以及拥塞度量信息,其中,路径标识指示第一数据报文的发送路径,拥塞度量信息指示该发送路径的拥塞状态。目的交换机进而从第一数据报文中获取该路径标识以及拥塞度量信息,并且根据源交换机与目的交换机之间的多条不等价路径的信息以及从第一数据报文中获取的路径标识以及拥塞度量信息,来确定源交换机至目的交换机之间的当前最优路径。在确定出当前最优路径之后,如果当前最优路径与目的交换机向源交换机所反馈的目的交换机与源交换机之间的在先最优路径不同,则目的交换机向源交换机发送所述当前最优路径。
在该方法中,目的交换机在确定当前最优路径时,综合考虑了源交换机和目的交换机之前的路径跳数以及路径拥塞状态,从而保证了存在不等价路径的数据中心的负载均衡,提升了网络吞吐量,提高了网络利用率。
并且,目的交换机确定到达源交换机的当前最优路径,仅在当前最优路径发生变化时才向源交换机发送变化后的最优路径。而现有技术中,只要路径的拥塞状态发生变化,目的交换机就向源交换机发送数据报文,并且由源交换机确定目标路径。由于每条路径的拥塞状态的变化远比源交换机和目的交换机之间的最优路径的变化频繁,因此,相比于现有技术,本实施例中,目的交换机向源交换机发送数据报文的次数大大减少,从而减少了源交换机、目的交换机以及整个网络的负担。
在一种可能的设计中,第一数据报文包括第一外层头,所述第一外层头中包括所述路径标识以及所述拥塞度量信息;
所述第一外层头中还包括报文类型字段,当所述报文类型字段的值指示所述第一数据报文的报文类型为拥塞信息传递类型时,所述目的交换机从所述第一外层头中获取所述路径标识以及所述拥塞度量信息。
即,本发明实施例将报文类型、路径标识、拥塞度量信息这些重要信息填充在数据报文的外层头中进行传输,不仅不会占用需要传输的数据的传输资源,同时也便于源交换机、中间交换机以及目的及交换机的填充、更新以及读取。
在一种可能的设计中,目的交换机在确定当前最优路径时,若所述路径标识所指示的所述第一数据报文的发送路径为所述源交换机至所述目的交换机之间的最短路径,则所述目的交换机根据所述第一数据报文中的所述拥塞度量信息以及所述目的交换机中所保存的所述最短路径的拥塞度量值,确定所述源交换机至所述目的交换机之间的当前最优路径。
一种情况下,若所述第一数据报文中的所述拥塞度量信息所指示的拥塞度量值大于或等于预设拥塞阈值,并且所述目的交换机中所保存的所述最短路径的拥塞度量值小于所述预设拥塞阈值,则所述目的交换机将所述源交换机和所述目的交换机之间的在先次优路径作为所述源交换机至所述目的交换机之间的当前最优路径。
如果第一数据报文中的拥塞度量信息所指示的拥塞度量值大于或等于预设拥塞阈值,而最短路径的拥塞度量值小于预设拥塞阈值,则说明最短路径在第一数据报文发送前并没有拥塞,而在第一数据报文发送时出现拥塞,则此时,不能再将最短路径作为源交换机和目的交换机之间的当前最优路径,而将源交换机和目的交换机之间的在先次优路径作为当前最优路径,以避免数据报文在拥塞的最短路径上发送所造成的传输效率降低等问题。
另一种情况下,若所述第一数据报文中的所述拥塞度量信息所指示的拥塞度量值小于预设拥塞阈值,并且所述目的交换机中所保存的所述最短路径的拥塞度量值大于或等于所述预设拥塞阈值,则所述目的交换机将所述最短路径作为所述源交换机和所述目的交换机之间的当前最优路径。
如果第一数据报文中的拥塞度量信息所指示的拥塞度量值小于预设拥塞阈值,而最短路径的拥塞度量值大于或等于预设拥塞阈值,则说明最短路径在第一数据报文前已经拥塞,不被作为当前最优路径,而当第一数据报文发送时,最短路径不再拥塞,则此时,目的交换机需要及时将当前最优路径调整回最短路径。即,只要最短路径不拥塞,就将最短路径作为当前最优路径,从而在保证路径不拥塞的前提下,尽量使用最短路径,以减少数据报文传输时间,增大网络吞吐量,提高网络利用率。
在一种可能的设计中,若所述路径标识所指示的所述第一数据报文的发送路径不为所述源交换机至所述目的交换机之间的最短路径,则所述目的交换机根据所述第一数据报文中的所述拥塞度量信息所指示的拥塞度量值与所述目的交换机中所保存的在先次优路径的拥塞度量值确定所述源交换机至所述目的交换机之间的当前次优路径。
在一种可能的设计中,所述目的交换机判断所述第一数据报文中的所述拥塞度量信息所指示的拥塞度量值是否小于所述目的交换机中所保存的在先次优路径的拥塞度量值,若是,则将所述路径标识所指示的所述第一数据报文的发送路径作为所述源交换机至所述目的交换机之间的当前次优路径。
即,只要源交换机至目的交换机之间的除最短路径之外的某条路径的拥塞度量值小于在先次优路径的拥塞度量值,就对次优路径进行调整,即保证当前次优路径一直都是最不拥塞的一条路径。进而,当最短路径由于拥塞不能作为当前最优路径时,选择当前次优路径作为当前最优路径,从而保证数据报文的传输效率,实现良好的负载均衡效果。
在一种可能的设计中,目的交换机在更新当前次优路径之后,还会向源交换机发送所述当前次优路径。
目的交换机向源交换机发送当前次优路径,可以使得源交换机按照当前次优路径发送数据报文,进一步提升数据报文的传输效率。
在一种可能的设计中,所述第一数据报文中还包括路径跳数字段,所述方法还包括:
所述目的交换机根据所述路径跳数字段的值,确定所述第一数据报文的发送路径是否为所述源交换机至所述目的交换机之间的最短路径。
本发明第三方面提供一种交换机,该交换机具有实现上述方法设计中源交换机的功能。这些功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。
在一种可能的设计中,该交换机可以包括接收模块、处理模块以及发送模块,接收模块、处理模块以及发送模块可以执行上述方法中的相应功能,例如:接收模块,用于接收第一数据报文;处理模块,用于确定所述第一数据报文对应的流标识以及所述第一数据报文的目的交换机;所述处理模块,还用于根据到达目的交换机的最优路径和所述流标识确定发送所述第一数据报文的目标路径,所述最优路径为目的交换机从所述源交换机和所述目的交换机之间的多条不等价路径中确定并反馈给所述源交换机的;发送模块,用于根据所述目标路径向所述目的交换机发送所述第一数据报文。
本发明第四方面提供一种交换机,该交换机具有实现上述方法设计中目的交换机的功能。这些功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。所述硬件或软件包括一个或多个与上述功能相对应的模块。
在一种可能的设计中,该交换机可以包括接收模块、处理模块以及发送模块,接收模块、处理模块以及发送模块可以执行上述方法中的相应功能,例如:接收模块,用于接收源交换机发送的第一数据报文;所述第一数据报文包括路径标识以及拥塞度量信息;所述路径标识指示所述第一数据报文的发送路径;所述拥塞度量信息指示所述发送路径的拥塞状态;处理模块,用于从所述第一数据报文中获取所述路径标识以及所述拥塞度量信息;所述处理模块,还用于根据所述源交换机与所述目的交换机之间的多条不等价路径的信息以及所述路径标识以及拥塞度量信息,确定所述源交换机至所述目的交换机之间的当前最优路径;发送模块,用于在所述处理模块所确定的所述当前最优路径与所述目的交换机向所述源交换机反馈的所述目的交换机与所述源交换机之间的在先最优路径不同时,向所述源交换机发送所述当前最优路径。
本发明第五方面提供一种交换机,该交换机包括存储器以及处理器,所述存储器用于存储程序指令,所述处理器用于调用所述存储器中的程序指令,实现上述第一方面及其各实施方式中的方法。
本发明第六方面提供一种交换机,该交换机包括存储器以及处理器,所述存储器用于存储程序指令,所述处理器用于调用所述存储器中的程序指令,实现上述第二方面及其各实施方式中的方法。
附图说明
图1为本发明实施例提供的一种数据中心的结构示意图;
图2为本发明实施例提供的报文传输方法的交互流程图;
图3为本发明实施例提供的一种交换机的模块结构图;
图4为本发明实施例提供的另一种交换机的模块结构图;
图5为本发明实施例提供的一种交换机的实体框图;
图6为本发明实施例提供的另一种交换机的实体框图。
具体实施方式
本发明实施例基于上述问题,提出一种适用于不具有等价多路径特点的架构的报文传输方法,在确定源交换机到目的交换机的发送路径时,综合考虑路径的跳数以及路径的拥塞状态,即,优先使用最短路径作为发送路径,当最短路径出现拥塞时,再使用次优路径作为发送路径,从而达到负载均衡的目的。
图1为本发明实施例提供的一种数据中心的结构示意图,所述数据中心采用了两级MESH架构。如图1所示,该MESH架构包括多个交换组(图1示出了3个),每个交换组包括多个交换机(图1示出了3个)。其中,第一交换组包括的3个交换机为分别为A11、A12和A13,第二交换组包括的3个交换机为B11、B12和B13,第三交换组包括的3个交换机为C11、C12和C13。A11、B11和C11组成第一组间平面,A12、B12和C12组成第二组间平面,A13、B13和C13组成第三组间平面。属于同一个交换组的任意两个交换机之间直接连接,属于同一个组间平面的任意两个交换机之间直接连接。基于这种连接,该MESH架构中两个组内交换机之间的最短路径的跳数可以为1跳,次优路径的跳数为2跳,两个组间交换机之间的最短路径的跳数可以为1跳或者2跳,次优路径的跳数可以为3跳或4跳。
需要说明的是,本发明实施例以MESH架构为例来介绍本发明的技术方案,但这并不应作为本发明实施例的限制,本发明实施例同样可以应用于其他不具有等价多路径特点的架构组成的数据中心。
在该数据中心中,每个交换机连接至少一个服务器(图1中示出了一个),每个服务器通过所述服务器连接的交换机访问其他服务器。
基于图1所示的数据中心,本发明实施例提供了一种报文传输方法。如图2所示,该方法包括:
S201、源交换机接收服务器发送的第一数据报文。
在数据中心中,源交换机接收其所连接的服务器发送的第一数据报文,并将该第一数据报文按照确定的路径发送到目的交换机。
S202、源交换机确定第一数据报文对应的流标识以及第一数据报文的目的交换机。
可选地,源交换机可以根据第一数据报文的五元组信息确定第一数据报文的流标识以及目的交换机。
其中,上述流标识可以是数据流的标识,也可以是将数据流分割后得到的流簇(英文:flowlet)的标识。
S203、源交换机根据到达目的交换机的最优路径和上述流标识确定发送第一数据报文的目标路径。
其中,所述最优路径是指源交换机接收到所述第一数据报文时,所述源交换机至目的交换机之间的最优路径。
所述最优路径是由目的交换机从源交换机和目的交换交换机之间的多条不等价路 径中确定并反馈给源交换机的。目的交换机和源交换机之间可能存在多条路径,这些路径所经过的跳数可能并不相同,即这些路径可能是不等价的路径。目的交换机可以从这些不等价路径中选择出一条作为最优路径发送给源交换机。
源交换机确定出第一数据报文需要发往的目的交换机之后,结合第一数据报文对应的流标识以及到该目的交换机的最优路径,确定出发送第一数据报文的目标路径。源交换机结合流标识以及所述最优路径确定的目标路径,可能就为所述最优路径,也可能是源交换机和目的交换机之间的其他路径。具体过程将在下文中进行详细描述。
S204、源交换机在为所述第一数据报文添加所述目标路径的路径标识以及拥塞度量信息后,根据所确定的目标路径向所述目的交换机发送所述第一数据报文。
本发明实施例在数据报文的外层头中增加特定的字段,以在源交换机和目的交换机之间传递用于确定最优路径的信息。如表1所示,为本发明实施例中在外层头中增加的字段。
表1
Figure PCTCN2017107699-appb-000001
在一个实施方式中,当报文类型字段的值为0时,指示报文类型为拥塞信息传递类型,当报文类型字段的值为1时,指示报文类型为最优路径反馈类型。
上述外层头可以是虚拟可扩展局域网(英文:Virtual eXtensible virtual area network,简称VXLAN)头,也可以是多链路透明互联(英文:Transparent Interconnection of Lots of Links,简称:TRILL)头。
源交换机发送第一数据报文前,可以为第一数据报文封装第一外层头,并填写所述第一外层头中的上述字段。具体地,源交换机需要将报文类型字段的值置为“拥塞信息传递类型”对应的值,相应地,将路径标识字段的值置为S102中所确定的目标路径的标识。并且,源交换机还需要将源交换机所检测到的拥塞信息填充到拥塞度量信息字段, 例如,源交换机将所述目标路径的当前的链路使用率填充到该拥塞度量信息字段。
另外,作为一种可选方式,源交换机还可以在目标路径跳数字段填充初始值,例如“1”,表示目标路径经过了1跳。中间交换机在转发第一数据报文的过程中,更新该字段的值。当目的交换机中仅保存了最短路径的跳数,而无法得知最短路径的标识时,目的交换机可以根据该字段来判断目标路径是否为源交换机与目的交换机之间的最短路径。
进而,源交换机根据上述目标路径向目标交换机发送添加了上述第一外层头的第一数据报文。
S205、中间交换机接收所述第一数据报文。
S206、中间交换机更新所述第一数据报文中的第一外层头中对应字段的值。
当中间交换机接收到源交换机或上一个中间交换机发送的第一数据报文后,仅可能需要对表1所示的拥塞度量信息字段或路径跳数字段进行更新。对于拥塞度量信息字段,如果拥塞度量信息表示链路使用率,则中间交换机根据当前所检测到的链路使用率来更新拥塞度量信息字段中的值;如果拥塞度量信息表示端到端传输时间等,则中间交换机不需要对该字段进行更新处理,而是由目的交换机直接处理。对于目标路径跳数字段,中间交换机需要将该字段的值加1。
S207、中间交换机将所述第一数据报文发送给目的交换机。
需要说明的是,如果有多个中间交换机,则分别执行上述S205-S207的步骤,仅是发送数据报文的交换机或者接收数据报文的交换机不同。例如,假设源交换机到目的交换机之间有3个中间交换机M1、M2、M3,则M1从源交换机接收第一数据报文,并将该第一数据报文转发到M2,M2从M1接收该第一数据报文并将该第一数据报文转发到M3,M3从M2接收该第一数据报文,并将该第一将数据报文转发到目的交换机。
上述各中间交换机在转发该第一数据报文的过程中,会修改该第一数据报文的中的拥塞度量信息字段和/或路径跳数字段,但不会修改该第一数据报文的载荷(英文:payload),因此,仍然可以称修改后的第一数据报文为第一数据报文。
另外,如果源交换机和目的交换机之间没有中间交换机,则可以不需要执行上述S205-S207的步骤。
S208、目的交换机接收源交换机发送的第一数据报文,该第一数据报文中包括路径标识以及拥塞度量信息。
S209、目的交换机从第一数据报文中所述获取路径标识以及拥塞度量信息。
其中,上述路径标识指示第一数据报文的发送路径,即前述步骤S203中所确定出的目标路径,上述拥塞度量信息指示所述目标路径的拥塞情况。
具体地,如前述步骤S204中所述,源交换机在发送第一数据报文前,为第一数据报文封装第一外层头,该第一外层头中包括路径标识字段、拥塞度量信息字段以及报文类型字段。本步骤中,目的交换机首先读取第一外层头中的报文类型字段的值,当报文类型字段的值指示第一数据报文的报文类型为拥塞信息传递类型时,目的交换机从第一外层头中获取路径标识以及拥塞度量信息。
如果源交换机和目的交换机之间存在中间交换机,则目的交换机接收的是从源交换机发送的经过中间交换机转发的第一数据报文。
S210、目的交换机根据源交换机与目的交换机之间的多条不等价路径的信息以及上述路径标识以及拥塞度量信息,确定源交换机至目的交换机之间的当前最优路径。
可选地,目的交换机中预先保存源交换机和目的交换机之间的多条不等价路径,包括最短路径以及其他路径。
其中,源交换机和目的交换机之间的最短路径是指从源交换机到目的交换机经过的跳数最少的路径。
目的交换机根据源交换机和目的交换机之间的多条不等价路径以及上述路径标识以及拥塞度量信息,即结合不同路径的跳数以及拥塞状态,来确定源交换机到目的交换机之间的当前最优路径。目的交换机根据上述信息确定当前最优路径的具体方法在下文中进行详细描述。
S211、目的交换机判断所确定的当前最优路径是否与目的交换机向源交换机反馈的在先最优路径不同,若是,则执行S212,否则,结束。
其中,目的交换机向源交换机反馈的在先最优路径是指目的交换机最近一次向源交换机反馈的最优路径,目的交换机每次向源交换机反馈最优路径之后,会记录所反馈的在先最优路径,当再次确定出当前最优路径之后,目的交换机比较所述在先最优路径和所述当前最优路径。目的交换机具体可以比较两个路径的标识,如果标识不同,则确定两个路径不同。
S212、目的交换机向源交换机发送第二数据报文,该第二数据报文中包括目的交换机所确定的当前最优路径。
当确定出的当前最优路径与目的交换机向源交换机反馈的在先最优路径不同时,目的交换机需要将所述当前最优路径反馈给源交换机,以使源交换机根据所述当前最优路径向目的交换机发送数据报文。
需要说明的是,本实施例是以源交换机发送数据报文为起始来进行说明,但是,显然,在源交换机发送数据报文之前,也可以首先接收目的交换机发送的携带当前最优路径的数据报文,即,在上述步骤S201之前,也可以执行S212。
具体地,目的交换机首先在第二数据报文中封装第二外层头,将第二外层头的报文类型字段的值设置为“最优路径反馈类型”,即,该第二外层头中的报文类型字段的值指示该数据报文的类型为最优路径反馈类型,目的交换机进而将所确定出的当前最优路径的标识填充在第二外层头的路径标识字段中。
S213、中间交换机接收目的交换机发送的第二数据报文,并将第二数据报文转发给源交换机。
中间交换机转发目的交换机向源交换机发送的第二数据报文时,不需要对第二数据报文外层头中的字段进行更新,而仅是将第二数据报文转发出去即可。
需要说明的是,如果有多个中间交换机,则每个中间交换机分别执行上述S213的步骤,仅是发送数据报文的交换机或者接收数据报文的交换机不同。例如,假设目的交换机到源交换机之间有3个中间交换机M3、M2、M1,则M3从目的交换机接收数据包报文,并将数据报文转发到M2,M2从M3接收数据报文并将数据报文转发到M1,M1从M2接收数据报文,并将数据报文转发到源交换机。
另外,如果源交换机和目的交换机之间没有中间交换机,则可以不需要执行上述 S213的步骤。
S214、源交换机接收第二数据报文,读取第二数据报文中的路径标识,并将所述最优路径更新为所述第二数据报文中携带的所述当前最优路径。
源交换机接收到目的交换机发送的第二数据报文后,首先判断第二数据报文的第二外层头中的报文类型字段的值是否为“最优路径反馈类型”,如果是,则说明该报文中携带了目的交换机向源交换机反馈的当前最优路径,则源交换机读取并保存第二外层头中的路径标识字段的值,即将源交换机中原来保存的最优路径更新为所述当前最优路径。
进而,当再次从服务器接收到数据报文后,源交换机就根据更新后的最优路径确定目标路径。
可选地,源交换机可以通过一个最优路径表来保存到不同目的交换机的最优路径,该最优路径表的每个表项包括一个目标交换机的标识以及所述目的交换机对应的到达所述源交换机的最优路径。当需要确定到达某个目的交换机的最优路径时,所述源交换机直接根据目的交换机的标识就可以查询出到所述目的交换机的最优路径。
本实施例中,源交换机向目的交换机发送的第一数据报文中携带路径标识以及拥塞度量信息值,目的交换机根据该值以及源交换机到目的交换机之间的多条不等价路径的信息,来确定出源交换机至目的交换机之间的当前最优路径。即本发明实施例综合考虑了源交换机和目的交换机之前的路径跳数以及路径拥塞状态,从而保证了存在不等价路径的数据中心的负载均衡,提升了网络吞吐量,提高了网络利用率。
进一步地,目的交换机确定到达源交换机的当前最优路径,仅在当前最优路径发生变化时才向源交换机发送变化后的最优路径。而现有技术中,只要路径的拥塞状态发生变化,目的交换机就向源交换机发送数据报文,并且由源交换机确定目标路径。由于每条路径的拥塞状态的变化远比源交换机和目的交换机之间的最优路径的变化频繁,因此,相比于现有技术,本实施例中,目的交换机向源交换机发送数据报文的次数大大减少,从而减少了源交换机、目的交换机以及整个网络的负担。
以下介绍上述步骤S203中源交换机根据第一数据报文的流标识以及目的交换机所反馈的最优路径确定发送第一数据报文的目标路径的具体方法。
本实施例中以流标识为flowlet标识为例来进行说明。
数据报文按照数据流进行发送,一个数据流可以划分为不同的flowlet进行发送,具体地,当一个数据流中的数据报文A与该数据流的上一个数据报文到达某个交换机的时间差大于预设值时,该数据报文A就可以划分到该数据流的一个新的flowlet中,不同的flowlet可以按照不同的路径进行发送。本发明实施例中,可以为每个flowlet设置一个路径。
当源交换机从服务器接收到第一数据报文后,首先确定第一数据报文对应的flowlet标识,即该数据报文所属的flowlet。其中,flowlet标识可以通过第一数据报文的五元组信息来确定。
进而,在本实施例中,源交换机根据流标识以及预设的映射关系表,确定发送上述第一数据报文的目标路径。
其中,上述映射关系表的每个表项用于记录流标识与发送路径的对应关系,即上述 映射映射关系表用于指示每个流标识对应的数据报文的发送路径。
源交换机根据流标识与上述映射关系表确定第一数据报文的目标路径时,首先需要根据流标识查询映射关系表,查询的结果可能为映射关系表中存在该流标识对应的表项,也可能为映射关系表中不存在该流标识对应的表项,以下分别进行说明。
1、映射关系表中不存在该流标识对应的表项
当映射关系表中不存在上述流标识对应的表项时,源交换机根据上述流标识确定数据报文的目标路径。
具体地,假设上述流标识对应的数据流为源交换机发往目的交换机的第N个数据流,其中,N为大于零的整数,如果N为预设值的整数倍,则源交换机随机选择源交换机至目的交换机之间的一条发送路径作为第一数据报文的目标路径;如果N不为预设值的整数倍,则源交换机将目的交换机反馈的最优路径作为第一数据报文的目标路径。
上述过程可以描述为:
当映射关系表中不存在流标识对应的表项,且N为预设值的整数倍时,源交换机随机选择交换机至目的交换机之间的一条发送路径作为目标路径;或者,
当映射关系表中不存在流标识对应的表项,且N不为预设值的整数倍时,源交换机将目的交换机反馈的最优路径作为目标路径。
当映射关系表中不存在上述流标识对应的表项时,说明流标识对应的flowlet为新的flowlet,则此时,源交换机并不是直接将目的交换机反馈的最优路径作为第一数据报文的目标路径,而是根据流的序号N进行区分,如果N为一个预设值的整数倍,例如3的整数倍,则选择一条随机路径作为第一数据报文的目标路径,如果N不为预设值的整数倍,则选择目的交换机反馈的最优路径作为第一数据报文的目标路径。
源交换机的这种处理方法可以保证源交换机可以使用多条路径向目的交换机发送数据报文,避免一些路径一直不被使用,从而使得目的交换机可以实时获取到所有路径的拥塞状态信息,进而根据这些拥塞状态信息确定所述目的交换机到所述源交换机的当前最优路径。
进一步地,在源交换机根据流标识确定出第一数据报文的目标路径之后,源交换机将第一数据报文对应的流标识以及目标路径增加到映射关系表中,即在映射关系表中增加包括流标识与目标路径的对应关系的表项。当该流标识对应的数据流中的下一个数据报文到达时,源交换机通过查询所述映射关系表就可以直接获取到下一个数据报文的目标路径。
2、映射关系表中存在该流标识对应的表项
当所述映射关系表中存在上述流标识对应的表项时,说明该流标识对应的流为已有的流,此时,源交换机直接将上述流标识对应的表项中与上述流标识对应的发送路径作为第一数据报文的目标路径。
举例来说,假设源交换机已经确定出当前需要发送的数据报文对应的流标识为2,源交换机查询映射关系表发现该表中流标识为2的表项,并且该表项对应的目标路径为A,则源交换机可以直接确定当前需要发送的数据报文的目标路径为路径A。
上述过程中,源交换机通过直接读取映射关系表就可以确定出第一数据报文的目标路径,而现有技术中在确定目标路径时,需要遍历所有路径并逐个进行比对才可以确定, 因此,本发明实施例相对于现有技术,还减少了运算复杂度,提高了交换机的转发效率。
以下介绍上述S210中目的交换机根据源交换机与目的交换机之间的多条不等价路径的信息以及上述路径标识以及拥塞度量信息,确定源交换机至目的交换机之间的当前最优路径的具体方法。
可选地,目的交换机可以同样基于上述表1中的字段来获取路径信息以及拥塞信息。
目的交换机在判断出从源交换机发送过来的第一数据报文中报文类型字段的值指示第一数据报文的报文类型为拥塞信息传递类型后,读取第一数据报文中的第一外层头中的路径标识以及拥塞度量信息,进而,目的交换机对路径标识进行判断,并根据判断结果执行不同处理。具体如下:
1、路径标识对应的路径为最短路径
如果路径标识所指示的第一数据报文的发送路径为源交换机至目的交换机之间的最短路径,则目的交换机根据第一数据报文中的拥塞度量信息以及目的交换机中所保存的源交换机至目的交换机之间的最短路径的拥塞度量值,确定源交换机至目的交换机之间的当前最优路径。
其中,在判断路径标识所指示的第一数据报文的发送路径是否为源交换机至目的交换机之间的最短路径时,需要根据目的交换机所保存的最短路径的信息的具体情况来进行判断。例如,在一种情况下,目的交换机中所保存的最短路径的信息包括了最短路径的标识,即目的交换机根据所保存的信息就可以知道最短路径是哪条路径。当收到第一数据报文后,直接比对路径标识就可以确定第一数据报文的目标路径是否为最短路径。而另一种情况下,目的交换机中可能仅保存了最短路径的跳数信息,而并不清楚最短路径具体为哪条路径。在这种情况下,目的交换机可以通过读取第一数据报文的第一外层头中的路径跳数字段的值来进行判断。如果该字段的值与目的交换机所保存的最短路径的跳数值相同,则可以确定第一数据报文的目标路径就是源交换机至目的交换机之间的最短路径。
无论目的交换机中所保存的最短路径信息为何种信息,目的交换机中都可以保存最短路径的拥塞度量值。
在确定出第一数据报文的目标路径是源交换机至目的交换机之间的最短路径后,目的交换机根据第一数据报文中的第一外层头的拥塞度量信息与目的交换机中所保存的源交换机至目的交换机之间的最短路径的拥塞度量值,来确定当前最优路径。
一种情况下,若第一数据报文中的拥塞度量信息所指示的拥塞度量值大于或等于预设拥塞阈值,并且目的交换机中所保存的源交换机至目的交换机之间的最短路径的拥塞度量值小于预设拥塞阈值,则将源交换机和目的交换机之间的在先次优路径作为源交换机至目的交换机之间的当前最优路径。
如果第一数据报文中的拥塞度量信息所指示的拥塞度量值大于或等于预设拥塞阈值,而最短路径的拥塞度量值小于预设拥塞阈值,则说明最短路径在第一数据报文发送前并没有拥塞,而在第一数据报文发送时出现拥塞,则此时,不能再将最短路径作为源交换机和目的交换机之间的当前最优路径,而将源交换机和目的交换机之间的在先次优路径作为当前最优路径,以避免数据报文在拥塞的最短路径上发送所造成的传输效率降低等问题。
其中,源交换机和目的交换机之间可以存在多条不等价路径,其中,除最短路径外的拥塞度量值最小的路径为次优路径。在先次优路径是指目的交换机最近一次记录的次优路径。当最短路径出现拥塞时,目的交换机将在先次优路径作为当前最优路径,可以保证最佳的传输效率,进而达到最佳的负载均衡效果。
另一种情况下,如果第一数据报文中的拥塞度量信息所指示的拥塞度量外层头值小于预设拥塞阈值,并且目的交换机中所保存的源交换机至目的交换机之间的最短路径的拥塞度量值大于或等于预设拥塞阈值,则将源交换机至目的交换机之间的最短路径作为源交换机和目的交换机之间的当前最优路径。
如果第一数据报文中的拥塞度量信息所指示的拥塞度量值小于预设拥塞阈值,而最短路径的拥塞度量值大于或等于预设拥塞阈值,则说明最短路径在第一数据报文前已经拥塞,不被作为当前最优路径,而当第一数据报文发送时,最短路径不再拥塞,则此时,目的交换机需要及时将当前最优路径调整回最短路径。即,只要最短路径不拥塞,就将最短路径作为当前最优路径,从而在保证路径不拥塞的前提下,尽量使用最短路径,以减少数据报文传输时间,增大网络吞吐量,提高网络利用率。
在上述两种情况中,目的交换机变更了当前最优路径之后,都需要相应地更新最短路径的拥塞度量值,即将拥塞度量值更新为第一数据报文中的拥塞度量信息所指示的拥塞度量值,从而及时动态更新最短路径的拥塞度量值,以保证在下次接收到源交换机所发送的数据报文后再根据最短路径的拥塞度量值来确定当前最优路径。
2、路径标识对应的路径不为最短路径
如果路径标识所指示的第一数据报文的发送路径不为源交换机至目的交换机之间的最短路径,则目的交换机根据第一数据报文中的拥塞度量信息所指示的拥塞度量值与目的交换机中所保存的在先次优路径的拥塞度量值确定源交换机至目的交换机之间的当前次优路径。
具体地,当目的交换机确定出路径标识所指示的第一数据报文的发送路径不为源交换机至目的交换机之间的最短路径时,判断第一数据报文中的拥塞度量信息所指示的拥塞度量值是否小于目的交换机中所保存的次优路径的拥塞度量值,若是,则将路径标识所指示的第一数据报文的发送路径作为源交换机至目的交换机之间的当前次优路径。
即,只要源交换机至目的交换机之间的除最短路径之外的某条路径的拥塞度量值小于在先次优路径的拥塞度量值,就对次优路径进行调整,即保证当前次优路径一直都是最不拥塞的一条路径。进而,当最短路径由于拥塞不能作为当前最优路径时,选择当前次优路径作为当前最优路径,从而保证数据报文的传输效率,实现良好的负载均衡效果。
需要说明的是,目的交换机中保存源交换机至目的交换机之间的次优路径信息,包括路径标识以及拥塞度量值,在次优路径发生变化后,目的交换机在保存新的次优路径信息时,也需要保存路径标识以及拥塞度量值,当再次收到报文类型为拥塞信息传递类型的数据报文时,可以根据所保存的信息再来确定当前最优路径。
另外,本发明实施例中的拥塞度量值,可以直接使用链路使用率、端到端传输时间等实际测量值,也可以根据这些实际测量值进行量化运算获得,以使得拥塞度量值的判断和比较更加简便。
进一步地,目的交换机在更新当前次优路径之后,如果最短路径当前的拥塞度量值 大于预设拥塞阈值,则目的交换机可以向源交换机发送当前次优路径。
具体地,如果最短路径当前的拥塞度量值大于预设拥塞阈值,则说明最短路径当前拥塞,并且源交换机已经根据目的交换机的反馈使用了当前次优路径来发送数据报文。因此,在当前次优路径发生变化之后,目的交换机需要将当前次优路径发送给源交换机,以使得源交换机按照当前次优路径发送数据报文,进一步提升数据报文的传输效率。
需要说明的是,目的交换机在向源交换机发送更新后的当前次优路径时,也需要在数据报文中封装外层头,并且外层头中的报文类型字段的值为最优路径反馈类型,外层头中的路径标识对应的路径为该更新后的当前次优路径。
图3为本发明实施例提供的一种交换机的模块结构图,该交换机具体指源交换机,该交换机包括:
接收模块301,用于接收第一数据报文。
处理模块302,用于确定第一数据报文对应的流标识以及第一数据报文的目的交换机。
处理模块302,还用于根据到达目的交换机的最优路径和上述流标识确定发送第一数据报文的目标路径,该最优路径为目的交换机从源交换机和目的交换机之间的多条不等价路径中确定并反馈给源交换机的。
发送模块303,用于根据上述目标路径向目的交换机发送第一数据报文。
该交换机用于实现前述方法实施例,其实现原理和技术效果类似,此处不再赘述。
另一实施例中,发送模块301具体用于:
为第一数据报文添加第一外层头,其中,该第一外层头中包括拥塞度量信息字段以及路径标识字段,该拥塞度量信息字段用于标识目标路径的拥塞状态,该路径标识字段用于标识目标路径;以及,
根据目标路径向目标交换机发送添加了第一外层头的第一数据报文。
另一实施例中,处理模块302具体用于:
根据流标识以及预设的映射关系表,确定发送第一数据报文的目标路径,其中,映射关系表的每个表项用于记录流标识与发送路径的对应关系。
处理模块302在进行上述处理时的一种具体过程为:
假设流标识对应的数据流为源交换机发往目的交换机的第N个数据流,则,
当映射关系表中不存在流标识对应的表项,且N为预设值的整数倍时,随机选择源交换机至目的交换机之间的一条发送路径作为目标路径。
或者,
当映射关系表中不存在流标识对应的表项,且N不为预设值的整数倍时,将目的交换机反馈的最优路径作为目标路径。
进一步地,处理模块302还用于:
在映射关系表中增加流标识与目标路径的对应关系。
处理模块302在进行上述处理时的另一种具体过程为:
若映射关系表中存在流标识对应的表项,则将表项中与流标识对应的发送路径作为目标路径。
另一实施例中,接收模块301还用于:
接收目的交换机发送的包括流标识的第二数据报文;该第二数据报文封装有第二外层头;第二外层头中的报文类型字段的值指示第二数据报文的类型为最优路径反馈类型。
处理模块302还用于:
读取第二外层头中的路径标识,将最优路径更新为路径标识对应的路径。
另一实施例中,源交换机向目的交换机所发送的第一数据报文的第一外层头中还包括路径跳数字段,该路径跳数字段用于标识第一数据报文在目标路径上所经过的跳数。
图4为本发明实施例提供的另一种交换机的模块结构图,该交换机具体指目的交换机,该交换机包括:
接收模块401,用于接收源交换机发送的第一数据报文,该第一数据报文包括路径标识以及拥塞度量信息,该路径标识指示第一数据报文的发送路径,该拥塞度量信息指示发送路径的拥塞状态。
处理模块402,用于从第一数据报文中获取路径标识以及拥塞度量信息。
处理模块402,还用于根据源交换机与目的交换机之间的多条不等价路径的信息以及上述路径标识以及拥塞度量信息,确定源交换机至目的交换机之间的当前最优路径。
发送模块403,用于在处理模块402所确定的当前最优路径与目的交换机向源交换机反馈的目的交换机与源交换机之间的在先最优路径不同时,向源交换机发送上述当前最优路径。
该交换机用于实现前述方法实施例,其实现原理和技术效果类似,此处不再赘述。
另一实施例中,第一数据报文包括第一外层头,该第一外层头中包括上述路径标识以及上述拥塞度量信息。
第一外层头中还包括报文类型字段,当报文类型字段的值指示第一数据报文的报文类型为拥塞信息传递类型时,处理模块402从第一外层头中获取上述路径标识以及上述拥塞度量信息。
另一实施例中,处理模块402具体用于:
若上述路径标识所指示的第一数据报文的发送路径为源交换机至目的交换机之间的最短路径,则根据第一数据报文中的拥塞度量信息以及目的交换机中所保存的最短路径的拥塞度量值,确定源交换机至目的交换机之间的当前最优路径。
处理模块402在进行上述处理时的一种具体过程为:
若第一数据报文中的拥塞度量信息所指示的拥塞度量值大于或等于预设拥塞阈值,并且目的交换机中所保存的最短路径的拥塞度量值小于预设拥塞阈值,则将源交换机和目的交换机之间的在先次优路径作为源交换机至目的交换机之间的当前最优路径。
处理模块402在进行上述处理时的另一种具体过程为:
若第一数据报文中的拥塞度量信息所指示的拥塞度量值小于预设拥塞阈值,并且目的交换机中所保存的最短路径的拥塞度量值大于或等于预设拥塞阈值,则将最短路径作为源交换机和目的交换机之间的当前最优路径。
另一实施例中,处理模块402还用于:
若上述路径标识所指示的第一数据报文的发送路径不为源交换机至目的交换机之间的最短路径,则根据第一数据报文中的拥塞度量信息所指示的拥塞度量值与目的交换 机中所保存的在先次优路径的拥塞度量值确定源交换机至目的交换机之间的当前次优路径。
进一步地,处理模块402具体还用于:
判断第一数据报文中的拥塞度量信息所指示的拥塞度量值是否小于目的交换机中所保存的在先次优路径的拥塞度量值,若是,则将上述路径标识所指示的第一数据报文的发送路径作为源交换机至目的交换机之间的当前次优路径。
另一实施例中,发送模块403还用于:
向源交换机发送当前次优路径。
另一实施例中,第一数据报文中还包括路径跳数字段,相应地,处理模块402还用于:
根据上述路径跳数字段的值,确定第一数据报文的发送路径是否为源交换机至目的交换机之间的最短路径。
图5为本发明实施例提供的一种交换机的实体框图,该交换机具体指源交换机,该交换机包括:
存储器501和处理器502;
存储器501用于存储程序指令,处理器502用于调用存储器501中的程序指令,实现上述各方法实施例中所述源交换机的功能。
图6为本发明实施例提供的另一种交换机的实体框图,该交换机具体指目的交换机,该交换机包括:
存储器601和处理器602;
存储器601用于存储程序指令,处理器602用于调用存储器601中的程序指令,实现上述各方法实施例中所述目的交换机的功能。
本领域普通技术人员可以理解:实现上述各方法实施例的全部或部分步骤可以通过程序指令相关的硬件来完成。前述的程序可以存储于一计算机可读取存储介质中。该程序在执行时,执行包括上述各方法实施例的步骤。
最后应说明的是:以上各实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述各实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分或者全部技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (34)

  1. 一种报文传输方法,其特征在于,包括:
    源交换机接收第一数据报文;
    所述源交换机确定所述第一数据报文对应的流标识以及所述第一数据报文的目的交换机;
    所述源交换机根据到达目的交换机的最优路径和所述流标识确定发送所述第一数据报文的目标路径,所述最优路径为目的交换机从所述源交换机和所述目的交换机之间的多条不等价路径中确定并反馈给所述源交换机的;
    所述源交换机根据所述目标路径向所述目的交换机发送所述第一数据报文。
  2. 根据权利要求1所述的方法,其特征在于,所述源交换机根据所述目标路径向所述目的交换机发送所述第一数据报文包括:
    所述源交换机为所述第一数据报文添加第一外层头;所述第一外层头中包括拥塞度量信息字段以及路径标识字段,所述拥塞度量信息字段用于标识所述目标路径的拥塞状态,所述路径标识字段用于标识所述目标路径;
    所述源交换机根据所述目标路径向所述目标交换机发送添加了所述第一外层头的所述第一数据报文。
  3. 根据权利要求1或2所述的方法,其特征在于,所述源交换机根据到达目的交换机的最优路径和所述流标识确定发送所述第一数据报文的目标路径,包括:
    所述源交换机根据所述流标识以及预设的映射关系表,确定发送所述第一数据报文的目标路径,其中,所述映射关系表的每个表项用于记录流标识与发送路径的对应关系。
  4. 根据权利要求3所述的方法,其特征在于,所述流标识对应的数据流为所述源交换机发往所述目的交换机的第N个数据流;
    所述源交换机根据所述流标识以及预设的映射关系表,确定发送所述第一数据报文的目标路径,包括:
    当所述映射关系表中不存在所述流标识对应的表项,且所述N为预设值的整数倍时,所述源交换机随机选择所述源交换机至所述目的交换机之间的一条发送路径作为所述目标路径;
    或,
    当所述映射关系表中不存在所述流标识对应的表项,且所述N不为预设值的整数倍时,所述源交换机将所述目的交换机反馈的所述最优路径作为所述目标路径。
  5. 根据权利要求4所述的方法,其特征在于,所述确定发送所述第一数据报文的目标路径之后,所述方法还包括:
    所述源交换机在所述映射关系表中增加所述流标识与所述目标路径的对应关系。
  6. 根据权利要求3所述的方法,其特征在于,所述源交换机根据所述流标识以及预设的映射关系表,确定发送所述第一数据报文的目标路径,包括:
    若所述映射关系表中存在所述流标识对应的表项,则所述源交换机将所述表项中与所述流标识对应的发送路径作为所述目标路径。
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,所述方法还包括:
    所述源交换机接收所述目的交换机发送的包括所述流标识的第二数据报文;所述第二数据报文封装有第二外层头;所述第二外层头中的报文类型字段的值指示所述第二数据报文的类型为最优路径反馈类型;
    所述源交换机读取所述第二外层头中的路径标识,将所述最优路径更新为所述路径标识对应的路径。
  8. 根据权利要求2-6中任意一项所述的方法,其特征在于,所述源交换机向所述目的交换机所发送的第一数据报文的第一外层头中还包括路径跳数字段,所述路径跳数字段用于标识所述第一数据报文在所述目标路径上所经过的跳数。
  9. 一种报文传输方法,其特征在于,包括:
    目的交换机接收源交换机发送的第一数据报文;所述第一数据报文包括路径标识以及拥塞度量信息;所述路径标识指示所述第一数据报文的发送路径;所述拥塞度量信息指示所述发送路径的拥塞状态;
    所述目的交换机从所述第一数据报文中获取所述路径标识以及所述拥塞度量信息;
    所述目的交换机根据所述源交换机与所述目的交换机之间的多条不等价路径的信息以及所述路径标识以及拥塞度量信息,确定所述源交换机至所述目的交换机之间的当前最优路径;
    若所述目的交换机所确定的所述当前最优路径与所述目的交换机向所述源交换机反馈的所述目的交换机与所述源交换机之间的在先最优路径不同,所述目的交换机向所述源交换机发送所述当前最优路径。
  10. 根据权利要求9所述的方法,其特征在于,所述第一数据报文包括第一外层头,所述第一外层头中包括所述路径标识以及所述拥塞度量信息;
    所述第一外层头中还包括报文类型字段,当所述报文类型字段的值指示所述第一数据报文的报文类型为拥塞信息传递类型时,所述目的交换机从所述第一外层头中获取所述路径标识以及所述拥塞度量信息。
  11. 根据权利要求9或10所述的方法,其特征在于,所述目的交换机根据所述源交换机与所述目的交换机之间的多条不等价路径的信息以及所述路径标识以及拥塞度量信息,确定所述源交换机至所述目的交换机之间的当前最优路径,包括:
    若所述路径标识所指示的所述第一数据报文的发送路径为所述源交换机至所述目的交换机之间的最短路径,则所述目的交换机根据所述第一数据报文中的所述拥塞度量信息以及所述目的交换机中所保存的所述最短路径的拥塞度量值,确定所述源交换机至所述目的交换机之间的当前最优路径。
  12. 根据权利要求11所述的方法,其特征在于,所述目的交换机根据所述第一数据报文中的所述拥塞度量信息以及所述目的交换机中所保存的所述最短路径的拥塞度量值,确定所述源交换机至所述目的交换机之间的当前最优路径,包括:
    若所述第一数据报文中的所述拥塞度量信息所指示的拥塞度量值大于或等于预设拥塞阈值,并且所述目的交换机中所保存的所述最短路径的拥塞度量值小于所述预设拥塞阈值,则所述目的交换机将所述源交换机和所述目的交换机之间的在先次优路径作为所述源交换机至所述目的交换机之间的当前最优路径。
  13. 根据权利要求11所述的方法,其特征在于,所述目的交换机根据所述第一数 据报文中的所述拥塞度量信息以及所述目的交换机中所保存的所述最短路径的拥塞度量值,确定所述源交换机至所述目的交换机之间的当前最优路径,包括:
    若所述第一数据报文中的所述拥塞度量信息所指示的拥塞度量值小于预设拥塞阈值,并且所述目的交换机中所保存的所述最短路径的拥塞度量值大于或等于所述预设拥塞阈值,则所述目的交换机将所述最短路径作为所述源交换机和所述目的交换机之间的当前最优路径。
  14. 根据权利要求9或10所述的方法,其特征在于,还包括:
    若所述路径标识所指示的所述第一数据报文的发送路径不为所述源交换机至所述目的交换机之间的最短路径,则所述目的交换机根据所述第一数据报文中的所述拥塞度量信息所指示的拥塞度量值与所述目的交换机中所保存的在先次优路径的拥塞度量值确定所述源交换机至所述目的交换机之间的当前次优路径。
  15. 根据权利要求14所述的方法,其特征在于,所述目的交换机根据所述第一数据报文中的所述拥塞度量信息所指示的拥塞度量值与所述目的交换机中所保存的在先次优路径的拥塞度量值确定所述源交换机至所述目的交换机之间的当前次优路径,包括:
    所述目的交换机判断所述第一数据报文中的所述拥塞度量信息所指示的拥塞度量值是否小于所述目的交换机中所保存的在先次优路径的拥塞度量值,若是,则将所述路径标识所指示的所述第一数据报文的发送路径作为所述源交换机至所述目的交换机之间的当前次优路径。
  16. 根据权利要求15所述的方法,其特征在于,还包括:
    所述目的交换机向所述源交换机发送所述当前次优路径。
  17. 根据权利要求11-16中任意一项所述的方法,其特征在于,所述第一数据报文中还包括路径跳数字段,所述方法还包括:
    所述目的交换机根据所述路径跳数字段的值,确定所述第一数据报文的发送路径是否为所述源交换机至所述目的交换机之间的最短路径。
  18. 一种交换机,其特征在于,所述交换机为源交换机,所述交换机包括:
    接收模块,用于接收第一数据报文;
    处理模块,用于确定所述第一数据报文对应的流标识以及所述第一数据报文的目的交换机;
    所述处理模块,还用于根据到达目的交换机的最优路径和所述流标识确定发送所述第一数据报文的目标路径,所述最优路径为目的交换机从所述源交换机和所述目的交换机之间的多条不等价路径中确定并反馈给所述源交换机的;
    发送模块,用于根据所述目标路径向所述目的交换机发送所述第一数据报文。
  19. 根据权利要求18所述的交换机,其特征在于,所述发送模块具体用于:
    为所述第一数据报文添加第一外层头;所述第一外层头中包括拥塞度量信息字段以及路径标识字段,所述拥塞度量信息字段用于标识所述目标路径的拥塞状态,所述路径标识字段用于标识所述目标路径;以及,
    根据所述目标路径向所述目标交换机发送添加了所述第一外层头的所述第一数据报文。
  20. 根据权利要求18或19所述的交换机,其特征在于,所述处理模块具体用于:
    根据所述流标识以及预设的映射关系表,确定发送所述第一数据报文的目标路径,其中,所述映射关系表的每个表项用于记录流标识与发送路径的对应关系。
  21. 根据权利要求20所述的交换机,其特征在于,所述流标识对应的数据流为所述源交换机发往所述目的交换机的第N个数据流;所述处理模块具体还用于:
    当所述映射关系表中不存在所述流标识对应的表项,且所述N为预设值的整数倍时,随机选择所述源交换机至所述目的交换机之间的一条发送路径作为所述目标路径;
    或,
    当所述映射关系表中不存在所述流标识对应的表项,且所述N不为预设值的整数倍时,将所述目的交换机反馈的所述最优路径作为所述目标路径。
  22. 根据权利要求21所述的交换机,其特征在于,所述处理模块还用于:
    在所述映射关系表中增加所述流标识与所述目标路径的对应关系。
  23. 根据权利要求20所述的交换机,其特征在于,所述处理模块具体还用于:
    若所述映射关系表中存在所述流标识对应的表项,则将所述表项中与所述流标识对应的发送路径作为所述目标路径。
  24. 根据权利要求18-23任一项所述的交换机,其特征在于,所述接收模块还用于:
    接收所述目的交换机发送的包括所述流标识的第二数据报文;所述第二数据报文封装有第二外层头;所述第二外层头中的报文类型字段的值指示所述第二数据报文的类型为最优路径反馈类型;
    所述处理模块还用于:
    读取所述第二外层头中的路径标识,将所述最优路径更新为所述路径标识对应的路径。
  25. 根据权利要求18-23任一项所述的交换机,其特征在于,所述源交换机向所述目的交换机所发送的第一数据报文的第一外层头中还包括路径跳数字段,所述路径跳数字段用于标识所述第一数据报文在所述目标路径上所经过的跳数。
  26. 一种交换机,其特征在于,所述交换机为目的交换机,所述交换机包括:
    接收模块,用于接收源交换机发送的第一数据报文;所述第一数据报文包括路径标识以及拥塞度量信息;所述路径标识指示所述第一数据报文的发送路径;所述拥塞度量信息指示所述发送路径的拥塞状态;
    处理模块,用于从所述第一数据报文中获取所述路径标识以及所述拥塞度量信息;
    所述处理模块,还用于根据所述源交换机与所述目的交换机之间的多条不等价路径的信息以及所述路径标识以及拥塞度量信息,确定所述源交换机至所述目的交换机之间的当前最优路径;
    发送模块,用于在所述处理模块所确定的所述当前最优路径与所述目的交换机向所述源交换机反馈的所述目的交换机与所述源交换机之间的在先最优路径不同时,向所述源交换机发送所述当前最优路径。
  27. 根据权利要求26所述的交换机,其特征在于,所述第一数据报文包括第一外层头,所述第一外层头中包括所述路径标识以及所述拥塞度量信息;
    所述第一外层头中还包括报文类型字段,当所述报文类型字段的值指示所述第一数 据报文的报文类型为拥塞信息传递类型时,所述处理模块从所述第一外层头中获取所述路径标识以及所述拥塞度量信息。
  28. 根据权利要求26或27所述的交换机,其特征在于,所述处理模块具体用于:
    若所述路径标识所指示的所述第一数据报文的发送路径为所述源交换机至所述目的交换机之间的最短路径,则根据所述第一数据报文中的所述拥塞度量信息以及所述目的交换机中所保存的所述最短路径的拥塞度量值,确定所述源交换机至所述目的交换机之间的当前最优路径。
  29. 根据权利要求28所述的交换机,其特征在于,所述处理模块具体还用于:
    若所述第一数据报文中的所述拥塞度量信息所指示的拥塞度量值大于或等于预设拥塞阈值,并且所述目的交换机中所保存的所述最短路径的拥塞度量值小于所述预设拥塞阈值,则将所述源交换机和所述目的交换机之间的在先次优路径作为所述源交换机至所述目的交换机之间的当前最优路径。
  30. 根据权利要求28所述的交换机,其特征在于,所述处理模块具体还用于:
    若所述第一数据报文中的所述拥塞度量信息所指示的拥塞度量值小于预设拥塞阈值,并且所述目的交换机中所保存的所述最短路径的拥塞度量值大于或等于所述预设拥塞阈值,则将所述最短路径作为所述源交换机和所述目的交换机之间的当前最优路径。
  31. 根据权利要求26或27所述的交换机,其特征在于,所述处理模块还用于:
    若所述路径标识所指示的所述第一数据报文的发送路径不为所述源交换机至所述目的交换机之间的最短路径,则根据所述第一数据报文中的所述拥塞度量信息所指示的拥塞度量值与所述目的交换机中所保存的在先次优路径的拥塞度量值确定所述源交换机至所述目的交换机之间的当前次优路径。
  32. 根据权利要求31所述的交换机,其特征在于,所述处理模块具体还用于:
    判断所述第一数据报文中的所述拥塞度量信息所指示的拥塞度量值是否小于所述目的交换机中所保存的在先次优路径的拥塞度量值,若是,则将所述路径标识所指示的所述第一数据报文的发送路径作为所述源交换机至所述目的交换机之间的当前次优路径。
  33. 根据权利要求32所述的交换机,其特征在于,所述发送模块还用于:
    向所述源交换机发送所述当前次优路径。
  34. 根据权利要求28-33任一项所述的交换机,其特征在于,所述第一数据报文中还包括路径跳数字段,所述处理模块还用于:
    根据所述路径跳数字段的值,确定所述第一数据报文的发送路径是否为所述源交换机至所述目的交换机之间的最短路径。
PCT/CN2017/107699 2016-12-14 2017-10-25 报文传输方法及交换机 WO2018107908A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201611156102.8A CN108234320B (zh) 2016-12-14 2016-12-14 报文传输方法及交换机
CN201611156102.8 2016-12-14

Publications (1)

Publication Number Publication Date
WO2018107908A1 true WO2018107908A1 (zh) 2018-06-21

Family

ID=62557950

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/107699 WO2018107908A1 (zh) 2016-12-14 2017-10-25 报文传输方法及交换机

Country Status (2)

Country Link
CN (1) CN108234320B (zh)
WO (1) WO2018107908A1 (zh)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112787925A (zh) * 2020-10-12 2021-05-11 中兴通讯股份有限公司 拥塞信息收集方法、确定最优路径方法、网络交换机
CN113037657A (zh) * 2021-03-23 2021-06-25 北京汇钧科技有限公司 流量的调度方法、装置、电子设备及计算机可读介质
CN113542099A (zh) * 2021-07-21 2021-10-22 北京字跳网络技术有限公司 数据的传输方法、装置、电子设备、介质和产品
CN116545909A (zh) * 2023-07-03 2023-08-04 成都数维通信技术有限公司 一种报文转发方法、流量牵引方法、介质、设备及系统

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109802879B (zh) * 2019-01-31 2021-05-28 新华三技术有限公司 一种数据流路由方法及装置
CN116418745A (zh) * 2022-01-05 2023-07-11 华为技术有限公司 一种数据交换方法及装置

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006081129A1 (en) * 2005-01-27 2006-08-03 Intel Corporation Replication of multicast data packets in a multi-stage switching system
US20100150147A1 (en) * 2008-12-15 2010-06-17 Sun Microsystems, Inc. System and method for implementing a multistage network using a two-dimensional array of tiles
EP3094056A2 (en) * 2015-05-15 2016-11-16 Huawei Technologies Co., Ltd. Data switching system, method for sending data traffic, and switching apparatus
CN106209669A (zh) * 2016-06-30 2016-12-07 中国人民解放军国防科学技术大学 面向sdn数据中心网络最大概率路径流调度方法及装置

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101009631A (zh) * 2006-01-24 2007-08-01 华为技术有限公司 一种QoS控制方法和系统
US20070253334A1 (en) * 2006-04-26 2007-11-01 Chetan Mehta Switch routing algorithm for improved congestion control & load balancing
CN100531134C (zh) * 2006-05-17 2009-08-19 华为技术有限公司 一种实现多路径传输的方法、装置和系统
CN103501209B (zh) * 2013-09-25 2017-04-19 中国科学院声学研究所 一种异构多网协同传输的单业务分流方法和设备
CN105490962B (zh) * 2015-12-04 2018-10-26 哈尔滨工程大学 一种基于OpenFlow网络的QoS管理方法
CN106100993B (zh) * 2016-06-13 2019-05-14 北京容联易通信息技术有限公司 一种流媒体最优路由分发方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006081129A1 (en) * 2005-01-27 2006-08-03 Intel Corporation Replication of multicast data packets in a multi-stage switching system
US20100150147A1 (en) * 2008-12-15 2010-06-17 Sun Microsystems, Inc. System and method for implementing a multistage network using a two-dimensional array of tiles
EP3094056A2 (en) * 2015-05-15 2016-11-16 Huawei Technologies Co., Ltd. Data switching system, method for sending data traffic, and switching apparatus
CN106209669A (zh) * 2016-06-30 2016-12-07 中国人民解放军国防科学技术大学 面向sdn数据中心网络最大概率路径流调度方法及装置

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112787925A (zh) * 2020-10-12 2021-05-11 中兴通讯股份有限公司 拥塞信息收集方法、确定最优路径方法、网络交换机
CN113037657A (zh) * 2021-03-23 2021-06-25 北京汇钧科技有限公司 流量的调度方法、装置、电子设备及计算机可读介质
CN113037657B (zh) * 2021-03-23 2022-09-06 北京汇钧科技有限公司 流量的调度方法、装置、电子设备及计算机可读介质
CN113542099A (zh) * 2021-07-21 2021-10-22 北京字跳网络技术有限公司 数据的传输方法、装置、电子设备、介质和产品
CN113542099B (zh) * 2021-07-21 2023-04-28 北京字跳网络技术有限公司 数据的传输方法、装置、电子设备、介质和产品
CN116545909A (zh) * 2023-07-03 2023-08-04 成都数维通信技术有限公司 一种报文转发方法、流量牵引方法、介质、设备及系统
CN116545909B (zh) * 2023-07-03 2023-09-26 成都数维通信技术有限公司 一种报文转发方法、流量牵引方法、介质、设备及系统

Also Published As

Publication number Publication date
CN108234320B (zh) 2021-07-09
CN108234320A (zh) 2018-06-29

Similar Documents

Publication Publication Date Title
WO2018107908A1 (zh) 报文传输方法及交换机
US11863458B1 (en) Reflected packets
US9602428B2 (en) Method and apparatus for locality sensitive hash-based load balancing
WO2016141885A1 (en) Traffic engineering feeder for packet switched networks
WO2017070970A1 (zh) 一种确定路由的方法、对应装置及系统
US7623455B2 (en) Method and apparatus for dynamic load balancing over a network link bundle
US9270601B2 (en) Path resolution for hierarchical load distribution
US10348646B2 (en) Two-stage port-channel resolution in a multistage fabric switch
US9973400B2 (en) Network flow information collection method and apparatus
CN108123878B (zh) 一种路由方法、装置及数据转发设备
US11102133B2 (en) Service packet processing method, apparatus, and system
KR102177574B1 (ko) 컴퓨팅 디바이스에서 패킷 수명을 예측하기 위한 큐잉 시스템
WO2012109909A1 (zh) 数据流负荷分担方法及装置
WO2018213987A1 (zh) 一种分发数据的方法、装置和系统
US11080274B2 (en) Best-efforts database functions
EP3560148B1 (en) Database functions-defined network switch
CN111224888A (zh) 发送报文的方法及报文转发设备
US20240179095A1 (en) Method and apparatus for determining hash algorithm information for load balancing, and storage medium
CN108337168B (zh) 流簇交换路由机制OpenFlow组表选择方法
US20230396549A1 (en) Load sharing method and apparatus, and chip
WO2023116580A1 (zh) 路径切换方法、装置、网络设备、以及网络系统
US10924390B2 (en) Updating entries of a distribution data structure
WO2015039616A1 (zh) 一种报文处理方法及设备
CN108965122A (zh) 路由选路方法、设备及计算机可读存储介质
WO2021026740A1 (zh) 流量均衡方法、网络设备及电子设备

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: 17881709

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: 17881709

Country of ref document: EP

Kind code of ref document: A1