WO2017000097A1 - 一种数据转发的方法、装置和系统 - Google Patents

一种数据转发的方法、装置和系统 Download PDF

Info

Publication number
WO2017000097A1
WO2017000097A1 PCT/CN2015/082584 CN2015082584W WO2017000097A1 WO 2017000097 A1 WO2017000097 A1 WO 2017000097A1 CN 2015082584 W CN2015082584 W CN 2015082584W WO 2017000097 A1 WO2017000097 A1 WO 2017000097A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
switching device
storage device
switching
controller
Prior art date
Application number
PCT/CN2015/082584
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 华为技术有限公司
Priority to PCT/CN2015/082584 priority Critical patent/WO2017000097A1/zh
Priority to CN201580001243.XA priority patent/CN107113244B/zh
Publication of WO2017000097A1 publication Critical patent/WO2017000097A1/zh

Links

Images

Definitions

  • the embodiments of the present invention relate to the field of communications, and in particular, to a data forwarding method, apparatus, and system.
  • switching devices are the key to network connection in the network, and carry a large number of network packet forwarding tasks in the network.
  • the switching device After receiving the data packet, the switching device determines the port forwarded by the data packet by parsing the destination address of the data packet, and then forwards the data packet to the corresponding forwarding port.
  • the embodiments of the present invention provide a data forwarding method, apparatus, and system.
  • load balancing between at least two switching devices can be implemented.
  • an embodiment of the present invention provides a data forwarding system, including a first switching device, a second switching device, and a storage device, where the first switching device and the second switching device respectively Connecting, the first switching device is configured to receive the first data, and write the first data to the storage device according to a load condition thereof; the second switching device is configured to take the first data out of the storage device First data, and forwarding the first data according to a destination address of the first data.
  • the first switching device is configured to write the first data to the storage device according to a load situation of the first aspect, including: the first exchange A port of the device for forwarding the first data according to a destination address of the first data is used, and the first switching device is configured to write the first data to the storage device.
  • the first switching device is configured to write the first data according to a load situation of the first
  • the storage device includes: a port of the first switching device for forwarding the first data according to a destination address of the first data is occupied, and a remaining space of the cache of the first switching device is smaller than The first data is used by the first switching device to write the first data to the storage device.
  • the system further includes a controller, the first switching device, and the second switching The device is respectively connected to the controller, the controller is configured to maintain state information of the switching device connected to the controller; the first switching device is further configured to send a notification message to the controller, the notification message And indicating that the first switching device writes the first data to the storage device; the controller is further configured to determine, according to the state information, the second switching device, and to the second exchange The device sends an instruction message, where the instruction message is used to instruct the second switching device to fetch and forward the first data from the storage device.
  • the status information includes load information of a port of the switching device connected to the controller;
  • the controller is configured to determine, according to the status information, that the second switching device includes: the controller is configured to determine, from a switching device connected to the controller and connected to the storage device, an exchange port idle exchange
  • the device is the second switching device, where the forwarding port is a port capable of forwarding the first data according to a destination address of the first data.
  • the second switching device is further configured to check whether the storage device is configured according to a preset period, in a fifth possible implementation manner of the first aspect, There is data.
  • the second switching device supports electrical packet switching and optical circuit switching; if the storage device further The second data is stored, and the destination address of the second data is the same as the destination address of the first data, and the second switching device is further configured to merge the first data and the second data, and The merged first data and the second data are forwarded by means of optical circuit switching.
  • the embodiment of the present invention provides a data forwarding method, where the first switching device and the second switching device are respectively connected to the storage device, including: the first switching device receives data; The first switching device writes the data to the storage device according to its own load condition, so that the second switching device forwards the data.
  • the first switching device when the first switching device writes the data to the storage device according to a load situation, includes: used by the first switching device A port that forwards the data according to a destination address of the data is occupied, and the first switching device writes the data to the storage device.
  • the first switching device writes the data to the storage according to a load condition of the second
  • the device includes: a port of the first switching device for forwarding the data according to a destination address of the data is occupied, and a remaining space of the cache of the first switching device is smaller than the data, the first exchange The device writes the data to the storage device.
  • the first switching device and the second switching device are respectively connected to the controller, in the third possible implementation manner of the second aspect,
  • the controller is configured to maintain state information of the switching device connected to the controller;
  • the method further includes the first switching device transmitting a notification message to the controller, the notification message indicating that the first switching device writes the data to the storage device.
  • an embodiment of the present invention provides a data forwarding device, including: a processor, a memory, a bus, and a communication interface; the memory is configured to store an execution instruction, and the processor is connected to the memory through the bus The processor executes the execution instructions stored by the memory to cause the data forwarding device to perform the second aspect or any of the possible implementations of the second aspect, when the data forwarding device is running method.
  • the embodiment of the present invention provides a data forwarding method, where the first switching device and the second switching device are respectively connected to the storage device, and the second switching device takes the first data from the storage device.
  • the first data is written by the first switching device according to the load condition of the first switching device; the second switching device is configured according to the destination address of the first data.
  • the first switching device and the second switching device are respectively connected to a controller, where the controller is configured to maintain a connection with the controller. And the second switching device receives an instruction message from the controller, where the second switching device receives the first data from the storage device, where the instruction message is used to indicate the The second switching device takes the first data out of the storage device and Forward.
  • the second possible implementation manner of the fourth aspect the second switching device, according to the preset period, checking whether the storage device is configured according to a preset period There is data.
  • the second switching device supports the electrical packet switching and the optical circuit switching; if the storage device further There is a second data, and the destination address of the second data is the same as the destination address of the first data, the method further comprising: the second switching device combining the first data and the second data And merging the merged first data and the second data by means of optical circuit switching.
  • an embodiment of the present invention provides a data forwarding device, including: a processor, a memory, a bus, and a communication interface;
  • the memory is configured to store an execution instruction
  • the processor is connected to the memory through the bus, and when the data forwarding device is in operation, the processor executes the execution instruction stored in the memory to make
  • the data forwarding device performs the method described in any one of the possible implementations of the fourth aspect or the fourth aspect.
  • an embodiment of the present invention provides a data forwarding method, where a first switching device and a second switching device are respectively connected to a controller, where the controller is configured to maintain state information of a switching device connected to the controller. Included that the controller receives a notification message from the first switching device, the notification message is used to indicate that the first switching device writes data to a storage device, wherein the first switching device and the The second switching device is respectively connected to the storage device; the controller determines the second switching device according to the status information; the controller sends an instruction message to the second switching device, where the command message is used by Instructing the second switching device to fetch and forward the data from the storage device.
  • the status information includes load information of a port of a switching device that is connected to the controller, and the controller determines, according to the status information
  • the second switching device includes: the controller determines, as the second switching device, a switching device that is connected to the controller and is connected to the storage device, and the forwarding port is idle, wherein the forwarding A port is a port that is capable of forwarding the data according to a destination address of the data.
  • an embodiment of the present invention provides a data forwarding device, including: a processor, and a a memory, a bus, and a communication interface; the memory is configured to store execution instructions, the processor is coupled to the memory via the bus, and when the data forwarding device is in operation, the processor executes the memory storage The executing the instructions to cause the data forwarding device to perform the method described in any one of the possible implementations of the sixth aspect or the sixth aspect.
  • an embodiment of the present invention provides a device for data forwarding, where the device and the switching device are respectively connected to a storage device, including: a receiving unit, configured to receive data; and a processing unit, according to a load condition, the data is Writing to the storage device to cause the switching device to forward the data.
  • the processing unit is configured to write the data to the storage device according to a load situation, where the device is configured to be used according to the data A port whose destination address forwards the data is occupied, and the processing unit is configured to write the data to the storage device.
  • the processing unit is configured to write the data to the storage device according to a load situation. Including: the port for the device to forward the data according to the destination address of the data is occupied, and the remaining space of the buffer of the device is smaller than the data, and the processing unit is configured to write the data into the Storage device.
  • the third possible implementation manner State information of the switching device connected to the controller; the device further comprising a transmitting unit, the transmitting unit configured to send a notification message to the controller, the notification message indicating that the device is to the data Write to the storage device.
  • an embodiment of the present invention provides a device for data forwarding, where the device and the switching device are respectively connected to a storage device, including: an acquiring unit, configured to retrieve first data from the storage device, where The first data is written by the switching device to the storage device according to the load condition of the switching device; and the forwarding unit is configured to forward the first data according to the destination address of the first data.
  • the switching device and the device are respectively connected to a controller, and the controller is configured to maintain a state of the device connected to the controller Information; the device further includes a receiving unit, the receiving unit is configured to receive an instruction message from the controller, the instruction message is used to instruct the device to The storage device is taken out and forwarded.
  • the device further includes an checking unit, configured to check according to a preset period Whether the storage device has data.
  • the forwarding unit supports the electrical packet switching and the optical circuit switching; if the storage device still exists Two data, and the destination address of the second data is the same as the destination address of the first data, the acquiring unit is further configured to take out the second data from the storage device, and the forwarding unit is further configured to: The first data and the second data are combined, and the merged first data and the second data are forwarded by means of optical circuit switching.
  • an embodiment of the present invention provides a device for data forwarding, where a first switching device and a second switching device are respectively connected to the device, where the device is configured to maintain a state of a switching device connected to the controller.
  • the information includes: a receiving unit, configured to receive a notification message from the first switching device, where the notification message is used to indicate that the first switching device writes data to the storage device, where the first switching device and The second switching device is respectively connected to the storage device; the determining unit is configured to determine the second switching device according to the status information, and the sending unit is configured to send an instruction message to the second switching device, where The instruction message is used to instruct the second switching device to fetch and forward the data from the storage device.
  • the state information includes load information of a port of a switching device connected to the device, and the determining unit is configured to determine, according to the state information
  • the second switching device includes: the determining unit, configured to determine, as the second switching device, a switching device that is connected to the device and is connected to the storage device and that has a forwarding port idle.
  • the forwarding port is a port capable of forwarding the data according to the destination address of the data.
  • the storage device takes out data and forwards the data, thereby implementing load balancing of at least two switching devices, reducing the risk of network congestion, and timely forwarding data, thereby reducing data transmission delay.
  • FIG. 1 is a block diagram of an exemplary networking environment of a data forwarding system
  • FIG. 2 is a schematic diagram of an exemplary storage device of the present invention
  • FIG. 3 is a schematic structural diagram of a data forwarding system according to an embodiment of the invention.
  • FIG. 4 is an exemplary flowchart of a data forwarding method according to an embodiment of the invention.
  • FIG. 5 is an exemplary flowchart of a data forwarding method according to an embodiment of the invention.
  • FIG. 6 is an exemplary flowchart of a data forwarding method according to an embodiment of the invention.
  • FIG. 7 is a schematic diagram showing the logical structure of a data forwarding device according to an embodiment of the invention.
  • FIG. 8 is a schematic diagram showing the logical structure of a data forwarding device according to an embodiment of the invention.
  • FIG. 9 is a schematic diagram showing the logical structure of a data forwarding device according to an embodiment of the invention.
  • FIG. 10 is a schematic structural diagram of hardware of a data forwarding device according to an embodiment of the invention.
  • FIG. 1 is a block diagram of an exemplary networked environment of a data forwarding system.
  • the network nodes A, B, C, D, E, F, G, and H are interconnected by the switching device 1, the switching device 2, the switching device 3, and the switching device 4.
  • the switching device 1, the switching device 2, the switching device 3, and the switching device 4 are collectively referred to as a switching device.
  • the switching device refers to the function and switching device 1, and the switching device 2
  • the switching device 3 and the switching device 4 are the same or similar switching devices.
  • FIG. 1 is a block diagram of an exemplary networked environment, and is not intended to limit the embodiments of the present invention.
  • a switching device may connect two or more of FIG. 1 The network node shown.
  • the network node and the switching device in FIG. 1 may be connected through the Internet, an intranet, a local area network (LANs), a wide area network (WANs), a storage area network (SANs), or other connection manner, or a combination of the above networks.
  • Switching devices include, but are not limited to, routers, switches, and the like.
  • the network node A may be a node group, and the internal node may include multiple nodes with a network address of 210.10.10.0 and a mask of 255.255.255.0, and the nodes may also be interconnected by a switching device.
  • the network nodes B, C, D, E, F, G, or H may also respectively include multiple nodes corresponding to network nodes and network nodes, and multiple switching devices connected to different nodes, where the nodes may be virtual machines. Or computing device.
  • the network nodes A, B, C, D, E, F, G, and H are merely exemplary descriptions, and may also be represented by network nodes A, B, C, D, E, F, G, or H, respectively.
  • a computing device or a virtual machine of an Internet Protocol (IP) address is not limited in this embodiment of the present invention.
  • the switching device generally uses a lookup table (routing table) to forward the data.
  • Each table entry of the lookup table includes a matching domain and an action domain.
  • the matching domain includes the network identifier, or contains the network identifier and mask, which are used to implement matching of entries when looking up the table.
  • the network identifier may be any address label, and the general representation may be A1.A2 mecanical identifier, or the mask, which are used to implement matching of entries when looking up the table.
  • the network identifier may be any address label, and the general representation may be A1.A27-8An; the mask is a prefix continuous mask.
  • the action field contains packet operation information, and generally includes at least output port information.
  • the network identifier includes, but is not limited to, an IP address, a Media Access Control (MAC) address, and the like.
  • Table 1 is an exemplary lookup table of the switching device 1.
  • Table 1 is merely for the convenience of description, and the lookup table of the switching device 1 is exemplarily shown. However, the embodiment of the present invention does not attempt to limit this.
  • Table 1 may have more or fewer features, or other implementation forms, such as in a Software Defined Network (SDN) network, the lookup table may be in the form of Flow entry.
  • SDN Software Defined Network
  • the matching field of the entry includes the network identifier and the mask, which is used to implement the matching of the entries when the table is checked; the action domain includes the output port information, which is used for data forwarding.
  • the switching device 1 forwards the data packet by using the longest prefix matching technology.
  • the technology implements the compression of the lookup table by aggregating the lookup table entries with the same network identification prefix and output, and after receiving the data packet,
  • the longest prefix matching technique implements the lookup of matching entries.
  • the switching device 1 extracts the IP address information of the destination node of the data packet from the data packet, and the destination IP address is 100.50.10.6, according to the table.
  • the fourth table entry of the lookup table matches the IP address and is the only matching routing entry.
  • the fourth table entry is selected as the final matching entry, and the output port and the like are extracted from the finally matched table entry.
  • the switching device 1 forwards the data packet received from the network node A from the port 3, thereby implementing routing of the data packet.
  • the data can be smoothly forwarded when the data traffic of the system is not large.
  • the data traffic of the communication network grows rapidly. For example, during a certain period of time, a large amount of data interaction needs to be performed between the network node A and the network node G, which puts forward the processing capability of the switching device 1.
  • a huge challenge is that switching device 1 may cause network congestion and even loss of data packets due to excessive load.
  • FIG. 2 is a block diagram of an exemplary networked environment of a data forwarding system in accordance with an embodiment of the present invention.
  • the system shown in FIG. 2 compared with the system shown in FIG. 1, the system shown in FIG. 2 adds a storage device 1 between the switching device 1 and the switching device 2, and the storage device 1 is used to buffer the switching device connected thereto. Data to.
  • the storage medium of storage device 1 includes volatile and non-volatile, removable and non-removable, implemented in any method or technology for storing such computer readable instructions, data knots.
  • Media such as, but not limited to, RAM, ROM, EEPROM, flash memory, other memory technologies, CD-ROMs, digital versatile discs, other optical storage, magnetic cassettes, tapes, disks Storage, other magnetic storage devices, and any other storage media that can be used to store the information needed and be accessible by the switching device.
  • the switching device can be a Top of Rack (ToR) switch in the data center, at the top of the cabinet, and connected to multiple servers.
  • ToR Top of Rack
  • Network node A is a cabinet with multiple servers.
  • multiple virtual machines can be running on the servers in the cabinet.
  • Each virtual machine has an IP address.
  • the server in the cabinet can also function as a separate host with an IP address. It should be understood that the types and uses of the servers are various, and the embodiments of the present invention are not limited thereto.
  • Multiple servers in a cabinet form a network.
  • network node A is a network of servers or virtual machines with a network address of 210.10.10.0 and a mask of 255.255.255.0.
  • each network node includes multiple nodes with the same network address
  • the switching device is a switch or router that connects multiple network node groups.
  • the network node A is exemplified.
  • the network node A includes multiple nodes with the same network address but different host addresses, that is, nodes whose IP addresses are in the range of 210.10.10.1 to 210.10.10.254.
  • the node may specifically be a computing device.
  • the network nodes A, B, C, D, E, F, G, and H are merely exemplary descriptions, and may also be represented by network nodes A, B, C, D, E, F, G, or H, respectively.
  • a computing device of different IP addresses is not limited in this embodiment of the present invention.
  • the lookup table shown in Table 1 is still taken as an example.
  • the switching device 1 receives the first data from the network node A, and the first data carries the destination address of the first data.
  • the switching device 1 determines its own load condition. If the self load condition is greater than a preset certain threshold, the switching device 1 writes the first data to the storage device 1 connected thereto.
  • the amount of data (throughput rate) forwarded per unit time can be used to characterize the load condition of the switching device 1, and the lifetime of the communication connection of the switching device 1 is periodically divided, for example, to survive.
  • the period is divided into equal-length time slices, and the throughput of this time slice is obtained by dividing the data throughput of one time slice by the length of the time slice.
  • the most recent time The throughput rate of the switching device of the slice characterizes the load condition of the switching device 1.
  • the length of the time slice here can be specified by an artificial configuration, and generally its value should reflect the change of the switching device load in time.
  • the throughput rate of the switching device is only one way to measure the load strength of the switching device, and the embodiment of the present invention allows other indicators to be used to characterize the load strength of the switching device to be replaced.
  • the switching device 1 determines the load status of the forwarding port of the forwarding device. If the load condition of the forwarding port is greater than a preset threshold, the switching device 1 writes the first data to the connected terminal.
  • the forwarding port specifically refers to a port that can forward the first data according to the destination address of the first data.
  • the normalized throughput rate can be used to characterize the load strength of the forwarding port.
  • the normalized throughput rate is the amount of data transmitted on the forwarding port unit bandwidth per unit time of the forwarding port.
  • the normalized throughput rate of the forwarding port can be obtained by periodically dividing the lifetime of the communication connection of the forwarding port, for example, dividing the lifetime into equal parts, etc. Long time film. The amount of data that has been sent by the forwarding port in each time slice is independently counted, and the amount of data is divided by the entire time slice length to obtain the current on-chip average throughput rate.
  • the throughput rate is typically further expressed as a normalized form, dividing the throughput rate by the forwarding port bandwidth to obtain a value between 0 and 1 as the normalized throughput rate.
  • the length of the time slice here can be specified by an artificial configuration, and generally its value should reflect the change of the forwarding port load in time.
  • the specific calculation of the normalized throughput rate of the forwarding port can be as follows: Assume that the length of the time slice is L, the amount of data sent by the forwarding port in the current time slice is C, and the bandwidth of the network interface is B, then the normalization of the forwarding port.
  • the throughput rate R is C / (L ⁇ B).
  • the normalized throughput rate of the forwarding port is only one way to measure the load strength of the forwarding port.
  • the embodiment of the present invention allows other indicators that can represent the load strength of the forwarding port to be replaced.
  • the switching device 1 determines whether the forwarding port is idle, such as If it is idle, the first data is directly forwarded from the forwarding port, and if the forwarding port is occupied, the switching device 1 writes the first data to the storage device 1.
  • the switching device 1 determines whether the forwarding port is idle. If idle, directly forwards the first data from the port. If the forwarding port is occupied, the switching device 1 can also view the cached device. The remaining space, if the remaining space of the cache is larger than the size of the first data, the switching device 1 writes the first data into the self cache, and if the remaining space of the cache is smaller than the size of the first data, the switching device 1 A data is written to the storage device 1.
  • the switching device 1 determines whether the forwarding port is idle. If idle, directly forwards the first data from the port. If the forwarding port is occupied, the switching device 1 can also view the cache. Corresponding to the size of the data in the buffer queue of the forwarding port, if the size of the data in the buffer queue corresponding to the forwarding port is greater than a preset threshold, the switching device 1 writes the first data to the storage device 1.
  • the forwarding port of the switching device 1 may be a positive integer of one or more than one, which is not limited in this embodiment of the present invention.
  • the switching device 1 directly writes the first data to the storage device 1 connected thereto.
  • the switching device 1 analyzes the packet header of the first data, identifies the size of the first data, and checks the remaining space size of the switching device 1 itself, if The remaining space of the own cache is larger than the size of the first data.
  • the switching device 1 stores the first data in its own cache; if the remaining space of the self-cache of the switching device 1 is smaller than the size of the first data, the switching device 1 writes the first data to the storage device 1 connected thereto;
  • the remaining space of the self-cache of the switching device 1 is equal to the size of the first data, and the switching device can select to write the first data to the storage device 1 of its own cache or connected thereto.
  • the switching device connected to the storage device 1 has a load that is less than a certain threshold or idle.
  • the switching device checks whether there is data in the storage device 1 according to a preset period T. If data is found in the storage device 1, If there is, and can forward the data by itself, the data is taken out from the storage device 1 and forwarded.
  • the switching device 2 checks whether there is data in the storage device 1 according to the preset period T.
  • the switching device 2 finds that the first data exists in the storage device 1, and the switching device 2 determines whether it can forward the first data. If the switching device 2 can forward the first data, and the switching device 2 When the forwarding port is idle, the switching device 2 retrieves the first data from the storage device 1 and forwards the first data.
  • the switching device 2 can also take out the first data and write the first data into its own cache, waiting for the forwarding port to be idle. Transmitting the first data.
  • the switching device 2 can indicate the load condition of the forwarding port by the size of the data in the buffer queue of its forwarding port.
  • the switching device 2 supports electrical packet switching and optical circuit switching. If the storage device 1 further stores second data, and the destination address of the second data is the same as the destination address of the first data, The switching device 2 is further configured to merge the first data and the second data, and forward the merged first data and the second data by using optical circuit switching.
  • the switching device 1 and the switching device 2 are also connected to a same controller (not shown) for maintaining state information and network topology of the switching device connected thereto.
  • the status information includes Not limited to the load situation.
  • the controller After the switching device 1 writes the first data to the storage device 1 (or before), it is also used for the control
  • the controller sends a notification message for indicating that the switching device 1 writes the first data into the storage device 1 so that the controller selects a suitable switching device to forward the first data.
  • the controller After receiving the notification message, the controller determines the switching device connected to the storage device 1 according to the network topology, and determines, according to the state information maintained by itself, the switching device for forwarding the first data, and sends an instruction message to the device to indicate The first data is taken out of the storage device 1 and forwarded.
  • the status information maintained by the controller includes load information of a port of the switching device connected to the controller, and the controller is configured to be connected from the controller and connected to the storage device 1
  • the switching device that determines that the forwarding port is idle is used to forward the first data, wherein the forwarding port is a port that can forward the first data according to the destination address of the first data.
  • the controller selects a switching device whose forwarding port load is less than a preset threshold. Forwarding the first data.
  • the size of the data in the buffer queue of the forwarding port may be used to indicate the load of the forwarding port, and the throughput of the forwarding port may be used to indicate the load of the forwarding port.
  • the performance of the load of the forwarding port is various, and is not limited in this embodiment of the present invention.
  • the selection of the switching device that the controller selects to forward the first data is based on various embodiments, and the embodiments of the present invention are merely exemplified, and other implementation forms are also possible. This embodiment of the present invention does not limit this, and allows replacement by using other selection criteria.
  • the controller determines the switching device 2 from the switching device connected thereto, the controller sends an instruction message to the switching device 2, instructing the switching device 2 to take the first data out of the storage device 1. And forwarded.
  • the switching device 2 removes the first data from the storage device 1, and forwards the first data according to the destination address of the first data.
  • the switching device 2 supports electrical packet switching and optical circuit switching. If the controller receives the notification message indication, the storage device 1 further includes second data, and the destination address of the first data and the second data. The destination address is the same, the controller is further configured to instruct the switching device 2 to merge the first data and the second data in the instruction information, and combine the merged first data and The second data is forwarded.
  • the switching device 1 in the process of implementing the solution, if the switching device 1 writes data that cannot be forwarded to the storage device 1 at a certain time, and other switching devices connected to the storage device 1 do not have any The method forwards the data, and at the next moment, the switching device capable of forwarding the data retrieves the data from the storage device 1 and forwards the data, and the switching device capable of forwarding the data may be the switching device 1.
  • a switching device capable of forwarding the data may be a switching device that is idle or whose load is not greater than a preset threshold.
  • the storage device 1 may also be connected to the network node A, B, C or D, and the data to be forwarded by the network node A, B, C or D through the switching device 1 or the switching device 2 may be directly written.
  • the storage device 1 is configured by the switching device having the capability to forward the data from the switching device connected to the storage device 1 to retrieve the data from the storage device 1 and forward the data.
  • the data can be written into the storage device, idle or
  • the switching device 2 with less load removes data from the storage device and forwards the data, thereby implementing load balancing between the switching device 1 and the switching device 2, reducing the risk of network congestion and timely obtaining data. Forwarding reduces the transmission delay of data.
  • FIG. 3 is a schematic structural diagram of a data forwarding system 300 according to an embodiment of the present invention.
  • the system 300 is applied to a data center network.
  • the system 300 includes a network 302, a controller 304, a first switching device 306, and a storage device. 308.
  • the first switching device 306 and the second switching device 310 are top-of-rack (ToR) switches located at the top of the cabinet 312.
  • the cabinet 312 includes at least one server. At least one virtual machine can be running on the server located in the cabinet 312.
  • the first switching device 306 is configured to forward data of a server or a virtual machine in the cabinet 312 to which it is connected
  • the second switching device 310 is configured to forward data of a server or a virtual machine in the cabinet 312 to which it is connected.
  • the first switching device 306 and the second switching device 310 are respectively connected to the storage device 308, and the storage device 308 is configured to store data that the switching device connected thereto cannot currently forward. That is, if the switching device connected to the storage device 308 determines that the received data cannot be forwarded at present, the data that cannot be forwarded is written to the storage device 308.
  • the first switching device 306 and the second switching device 310 are respectively connected to the controller 304, and the controller 304 is configured to maintain a network topology between the switching devices connected thereto, and the connection with the connected device Change the status information of the device, where the status information includes the port load status of the switching device.
  • the first switching device 306 is configured to receive first data from a server or a virtual machine in the cabinet 312 connected thereto, where the first data carries a destination address of the first data.
  • the first switching device 306 determines the current load status of the first switching device 306, and determines whether the load is greater than a preset threshold. If the load is not greater than the preset threshold, the first switching device 306 is first according to the destination address of the first data. Data forwarding; if the load is greater than a predetermined threshold, the first switching device 306 writes the first data to the storage device 308.
  • the first switching device 306 determines the current load status of the first switching device 306, and determines whether the load is greater than a preset threshold. If the load is not greater than the preset threshold, the first switching device 306 is first according to the destination address of the first data. Data forwarding; if the load is greater than the preset threshold, determining the buffer remaining space size of the first switching device 306, if the buffer remaining space size of the first switching device 306 is smaller than the first data size, the first switching device 306 will use the first data. Write to storage device 308.
  • the load condition includes a throughput rate of the first switching device 306.
  • the load situation includes a load condition of the forwarding port, where the forwarding port is a port that can forward the first data according to the destination address of the first data.
  • the throughput of the forwarding port may be represented by the throughput rate of the forwarding port, or the load of the forwarding port may be represented by the size of the data volume in the buffering queue corresponding to the forwarding port.
  • the first switching device 306 After the first switching device 306 writes the first data to the storage device 308, it is further configured to send a notification message to the controller 310, where the notification message is used to indicate that the first switching device 306 writes the first data into the In storage device 308.
  • the controller 308 determines the second switching device 312 according to the network topology and status information of the switching device that it maintains, and sends an instruction message to the second switching device 312, where the instruction message is used to indicate the The second switching device 312 retrieves and forwards the first data from the storage device 308.
  • the controller 308 is configured to determine, according to the status information, that the second switching device 312 includes: the controller 308 is configured to be connected from the controller 308, and A switching device that determines that the idle or load is less than a preset threshold is used as the second switching device 312 in the switching device to which the storage device is connected.
  • the status information includes load information of a port of the switching device connected to the controller 308.
  • the controller 308 is configured to determine, according to the status information, that the second switching device 312 includes:
  • the controller 308 is configured to determine, as the second switching device 312, a switching device that determines that the forwarding port is idle or the forwarding port load is less than a preset threshold from the switching device connected to the controller 308 and connected to the storage device 310.
  • the forwarding port is a port capable of forwarding the first data according to a destination address of the first data.
  • the first switching device 306 supports Electronic Packet Switching (EPS) and Optical Circuit Switching (OCS).
  • EPS Electronic Packet Switching
  • OCS Optical Circuit Switching
  • the first switching device 306 receives the first data from the cabinet 312 connected thereto, analyzes the packet header of the first data, determines the size of the data stream, and determines the first data if the size of the first data is greater than a preset threshold. It is an elephant stream. If the first data is an elephant stream, the first data is preferentially forwarded by means of OCS.
  • the first switching device 306 determines to use the OCS for data forwarding, an optical circuit is established between the first data destination address and the first data destination address. If the optical circuit is successfully established, the first data is directly forwarded to the first data by using the OCS. address.
  • the optical circuit fails to be established. If the first switching device 306 cannot establish an optical circuit between the destination address of the first data, the first switching device 306 selects the mode of the EPS for the data. Forward.
  • the first switching device 306 preferentially forwards the first data by using the EPS.
  • the first switching device forwards the first data by using an EPS; if the EPS forwarding port used to forward the first data is occupied or The first switching device 306 writes the first data into the storage device 308 when the load is greater than a predetermined threshold.
  • the first switching device 306 is further configured to integrate the data stream, if the first switching device 306 receives the plurality of (at least two) mouse streams whose sizes are smaller than a preset threshold, and the plurality of mouse streams The destination address is the same, and the first switching device 306 is further configured to integrate the data with the same multiple destination addresses into an elephant stream, and forward the data by using an OCS.
  • the second switching device 310 supports Electronic Packet Switching (EPS) and Optical Circuit Switching (OCS).
  • EPS Electronic Packet Switching
  • OCS Optical Circuit Switching
  • the controller 304 is further configured to indicate the The second switching device 310 retrieves and forwards the first data and the second data.
  • the second switching device is further configured to merge the first data and the second data, and forward the merged first data and the second data by using optical circuit switching.
  • the first switching device 306 and the second switching device 310 do not directly interact.
  • the first switching device 306 and the second switching device 310 perform direct management.
  • the controller selects a second switching device with a small load or idle to perform data forwarding, and the second switching device removes data from the storage device and forwards the data, thereby implementing load balancing of data center data forwarding. It reduces the risk of network congestion and enables data to be forwarded in a timely manner, reducing the transmission delay of data.
  • FIG. 4 is an exemplary flowchart of a data forwarding method 400 according to an embodiment of the present invention.
  • the first switching device and the second switching device are respectively connected to the storage device.
  • the method 400 includes:
  • the first switching device receives data.
  • the first switching device writes the data to the storage device according to a load condition thereof, so that the second switching device forwards the data.
  • the data carries the destination address of the data.
  • the first switching device writes the data to the storage device according to the load condition of the first switching device, where the load of the first switching device is greater than a preset threshold, and the first switching device writes the data to the first switching device.
  • Storage device
  • the load situation may be the data throughput rate of the first switching device, or may be the throughput rate or busyness of the port used by the first switching device to forward the data, which is not limited by the present invention.
  • the first switching device cannot be timely according to the number due to its own load
  • the data is forwarded to the storage device according to the destination address, so that other idle switching devices can take the data out of the storage device and forward the data.
  • the first switching device writes the data to the storage device according to the load condition of the first switching device, where: the port of the first switching device that forwards the data according to the destination address of the data is Occupied, the first switching device writes the data to the storage device.
  • the first switching device writes the data to the storage device according to the load condition of the first switching device, where: the port of the first switching device that forwards the data according to the destination address of the data is Occupied, and the remaining space of the cache of the first switching device is smaller than the data, and the first switching device writes the data to the storage device.
  • the first switching device and the second switching device are respectively connected to a controller, where the controller is used to maintain state information of a switching device connected to the controller; the method 400 further includes: The first switching device sends a notification message to the controller, the notification message being used to indicate that the first switching device writes the data to the storage device.
  • the controller may determine, as the second switching device, a switching device that is connected to the controller and is connected to the storage device, and determines that the forwarding port is idle or the forwarding port load condition is less than a preset threshold. Sending an instruction message to the second switching device, the instruction message is used to instruct the second switching device to fetch and forward the data from the storage device.
  • the forwarding port is a port that can forward the data according to the destination address of the data.
  • the first switching device may receive the data.
  • the data is written to the storage device connected thereto, so that the switching device with the forwarding port idle takes the data out of the storage device, and forwards the data according to the destination address of the data.
  • FIG. 5 is an exemplary flowchart of a data forwarding method 500 according to an embodiment of the present invention.
  • the first switching device and the second switching device are respectively connected to the storage device.
  • the method 500 includes:
  • the second switching device extracts the first data from the storage device, where the first data is written by the first switching device according to a load condition of the first switching device.
  • the load situation may be the data throughput rate of the first switching device, or may be the throughput rate or busyness of the port used by the first switching device to forward the data, which is not limited by the present invention.
  • the first switching device cannot forward the data according to the destination address of the data in time, the data may be written to the storage device, so that the second switching device removes the data from the storage device. And forward it.
  • S504 The second switching device forwards the first data according to the destination address of the first data.
  • the first switching device and the second switching device are respectively connected to a controller, where the controller is configured to maintain state information of a switching device connected to the controller;
  • the method further includes: the second switching device receiving an instruction message from the controller, the instruction message being used to instruct the second switching device to use the first data from the storage The device is taken out and forwarded.
  • the second switching device is a switching device that is connected to the controller and is connected to the storage device, where the forwarding port is idle or the forwarding port throughput rate is less than a preset threshold, where the forwarding port is The port for forwarding the first data according to the destination address of the first data.
  • the method 500 further includes: the second switching device checks whether the storage device has data according to a preset period.
  • the storage device periodically checks whether there is data in the storage device. If the data exists in the storage device, the second switching device can forward the data. The data, and the port for forwarding the data is idle or the throughput is less than a preset threshold, the second switching device fetches the data from the storage device and forwards the data according to the destination address of the data.
  • the second switching device supports electrical packet switching and optical circuit switching; if the storage device further has second data, and the destination address of the second data is the same as the destination address of the first data, The method further includes: the second switching device combines the first data and the second data, and forwards the merged first data and the second data by using optical circuit switching.
  • the first switching device when the first switching device cannot forward the first data according to the destination address of the first data, the first data is written to the storage device, and the forwarding port that forwards the first data is idle or the load is less than
  • the second switching device of the preset threshold will go to the storage device to take out the first A data and forward the first data in time.
  • the second switching device supports EPS and OCS exchange, the second switching device can also stream multiple mice into an elephant stream and use OCS switching, thereby reducing forwarding delay and saving network resources.
  • FIG. 6 is an exemplary flowchart of a data forwarding method 600 according to an embodiment of the present invention.
  • the first switching device and the second switching device are respectively connected to a controller, and the controller is used to maintain a switching device connected to the controller.
  • Status information where the first switching device and the second switching device are respectively connected to the storage device.
  • the method 600 includes:
  • S602 The controller receives a notification message from the first switching device, where the notification message is used to indicate that the first switching device writes data to the storage device.
  • S604 The controller determines the second switching device according to the status information.
  • S606 The controller sends an instruction message to the second switching device, where the instruction message is used to instruct the second switching device to fetch and forward the data from the storage device.
  • the status information includes load information of a port of the switching device connected to the controller, and the controller determines, according to the status information, that the second switching device includes: the controller a switching device that is connected to the storage device and that determines that the forwarding port is idle as the second switching device, wherein the forwarding port is capable of forwarding the data according to the destination address of the data. Port.
  • load balancing of multiple switching devices can be implemented by the controller to monitor the status of the switching device connected thereto, and the data can be forwarded in time.
  • FIG. 7 is a schematic diagram showing the logical structure of a data forwarding device 700 according to an embodiment of the present invention.
  • the device 700 and the switching device are respectively connected to a storage device.
  • the device 700 includes a receiving unit 702 and a processing unit 704.
  • the receiving unit 702 is configured to receive data.
  • the processing unit 704 is configured to write the data to the storage device according to a load condition, so that the switching device forwards the data.
  • the data carries the destination address of the data.
  • the processing unit 704 is configured to write the data to the storage device according to a load situation, where the device 700 is configured to forward the port according to the destination address of the data, where The processing unit 704 is configured to write the data to the storage device.
  • the processing unit 704 is configured to write the data to the storage device according to a load situation, where the load of the device 700 is greater than a preset threshold, and the processing unit 704 is configured to write the data into the Storage device.
  • the load condition may be the data throughput rate of the device 700, or may be the throughput rate or busyness of the port used by the device 700 to forward the data, which is not limited by the present invention.
  • the device 700 can write the data to the storage device, so that other idle switching devices can take the data out of the storage device. And forward it.
  • the processing unit 704 is configured to write the data to the storage device according to a load situation, where the port that is used by the device 700 to forward the data according to the destination address of the data is occupied, and The remaining space of the cache of the device 700 is smaller than the data, and the processing unit 704 is configured to write the data to the storage device.
  • the device 700 and the switching device are respectively connected to a controller, where the controller is used to maintain state information of the switching device connected to the controller; the device 700 further includes a sending unit, where The transmitting unit is configured to send a notification message to the controller, the notification message for indicating that the device 700 writes the data to the storage device.
  • the controller may select, from the switching device connected to the controller and connected to the storage device, a switching device whose forwarding port is idle or whose forwarding port load condition is less than a preset threshold, and selects the switching device Sending an instruction message, the instruction message is used to instruct the selected switching device to retrieve and forward the data from the storage device.
  • the forwarding port is a port that can forward the data according to the destination address of the data.
  • the device 700 may write the received data to the connected device.
  • the storage device removes data from the storage device that makes the forwarding port idle, and forwards the data according to the destination address of the data.
  • FIG. 8 is a schematic diagram showing the logical structure of a data forwarding device 800.
  • the device 800 and the switching device are respectively connected to a storage device.
  • the device 800 includes an obtaining unit 802 and a forwarding unit 804.
  • the obtaining unit 802 is configured to retrieve the first data from the storage device, where the first data is The storage device is written by the switching device according to the load condition of the switching device.
  • the forwarding unit 804 is configured to forward the first data according to the destination address of the first data.
  • the load situation may be the data throughput rate of the switching device, or may be the throughput rate or busyness of the port used by the switching device to forward the data, which is not limited by the present invention.
  • the switching device cannot forward the data according to the destination address of the data in time, the data can be written to the storage device, so that the device 800 removes the data from the storage device and forwards the data. .
  • the switching device and the device 800 are respectively connected to a controller, and the controller is configured to maintain state information of the device 800 connected to the controller; the device 800 further includes a receiving unit, where The receiving unit is configured to receive an instruction message from the controller, the instruction message being used to instruct the device 800 to fetch and forward the first data from the storage device.
  • the device 800 is a switching device that is connected to the controller and is connected to the storage device, where the forwarding port is idle or the forwarding port throughput rate is less than a preset threshold, where the forwarding port is capable of Forwarding the port of the first data according to the destination address of the first data.
  • the device 800 further includes an checking unit, configured to check whether the storage device has data according to a preset period.
  • the storage device periodically checks whether there is data therein. If the data exists in the storage device, the device 800 can forward the data, and the device The port 800 for forwarding the data is idle or the throughput is less than a preset threshold, and the device 800 retrieves the data from the storage device and forwards the data according to the destination address of the data.
  • the forwarding unit 804 supports electrical packet switching and optical circuit switching; if the storage device further has second data, and the destination address of the second data is the same as the destination address of the first data,
  • the obtaining unit 802 is further configured to: take out the second data from the storage device, where the forwarding unit 804 is further configured to merge the first data and the second data, and combine the methods by using optical circuit switching.
  • the first data and the second data are forwarded.
  • the switching device when the switching device cannot forward the first data according to the destination address of the first data, the first data is written to the storage device, and the forwarding port that forwards the first data is idle or the load is less than the preset.
  • the threshold device 800 removes the first data from the storage device and forwards the first data in time. Thereby implementing a switching device and device 800 connected to the storage device The mutual cooperation ensures the balance of the load and the timely forwarding of data. And if the device 800 supports EPS and OCS exchange, the device 800 can also stream multiple mice into an elephant stream and use OCS exchange, thereby reducing forwarding delay and saving network resources.
  • FIG. 9 is a schematic diagram showing the logical structure of a data forwarding device 900 according to an embodiment of the present invention.
  • the first switching device and the second switching device are respectively connected to the device 900, and the device 900 is configured to maintain a connection with the controller.
  • State information of the switching device as shown in FIG. 9, the device 900 includes a receiving unit 902, a determining unit 904, and a transmitting unit 906.
  • the receiving unit 902 is configured to receive a notification message from the first switching device, where the notification message is used to indicate that the first switching device writes data to the storage device, where the first switching device and the second Switching devices are respectively connected to the storage device.
  • the determining unit 904 is configured to determine the second switching device according to the status information.
  • the sending unit 906 is configured to send an instruction message to the second switching device, where the instruction message is used to instruct the second switching device to fetch and forward the data from the storage device.
  • the status information includes load information of a port of the switching device connected to the device 900.
  • the determining unit 904 is configured to determine, according to the status information, that the second switching device includes: the determining unit 904 is configured to determine, as the second switching device, a switching device that is connected to the device 900 and connected to the storage device, where the forwarding port is idle, wherein the forwarding port is capable of being according to the data.
  • the destination address forwards the port for the data.
  • load balancing of multiple switching devices can be implemented by the controller to monitor the status of the switching device connected thereto, and the data can be forwarded in time.
  • FIG. 10 is a schematic diagram showing the hardware structure of a data forwarding device 1000 according to an embodiment of the invention.
  • the data forwarding device 1000 includes a processor 1002, a memory 1004, an input/output interface 1006, a communication interface 1008, and a bus 1010.
  • the processor 1002, the memory 1004, the input/output interface 1006, and the communication interface 1008 implement a communication connection with each other through the bus 1010.
  • the processor 1002 can be a general-purpose central processing unit (CPU), a microprocessor, an application specific integrated circuit (ASIC), or one or more integrated circuits for executing related programs.
  • CPU central processing unit
  • ASIC application specific integrated circuit
  • the memory 1004 may be a read only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM).
  • the memory 1004 can store an operating system and other applications.
  • the program code for implementing the technical solution provided by the embodiment of the present invention is saved in the memory 1004 and executed by the processor 1002.
  • the input/output interface 1006 is for receiving input data and information, and outputting data such as operation results.
  • Communication interface 1008 enables communication between data forwarding device 1000 and other devices or communication networks using transceivers such as, but not limited to, transceivers.
  • Bus 1010 can include a path for communicating information between various components of data forwarding device 1000 (e.g., processor 1002, memory 1004, input/output interface 1006, and communication interface 1008).
  • the data forwarding device 1000 shown in FIG. 10 only shows the processor 1002, the memory 1004, the input/output interface 1006, the communication interface 1008, and the bus 1010, in the specific implementation process, those skilled in the art should It is understood that the data forwarding device 1000 also includes other devices necessary to achieve normal operation. In the meantime, those skilled in the art will appreciate that the data forwarding device 1000 may also include hardware devices that implement other additional functions, depending on the particular needs. Moreover, those skilled in the art will appreciate that the data forwarding device 1000 may also only include the components necessary to implement the embodiments of the present invention, and does not necessarily include all of the devices shown in FIG.
  • FIG. 10 and the foregoing description are applicable to various data forwarding apparatuses and systems provided by the embodiments of the present invention, and are applicable to performing various data forwarding methods provided by the embodiments of the present invention.
  • the disclosed systems, devices, and methods may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the modules is only a logical function division, and may be implemented in another manner, for example, multiple modules or components may be combined or may be Integrate into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or module, and may be electrical, mechanical or otherwise.
  • the modules described as separate components may or may not be physically separate.
  • the components displayed as modules may or may not be physical modules, that is, may be located in one place, or may be distributed to multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
  • the above integrated modules can be implemented in the form of hardware or in the form of hardware plus software function modules.
  • the above-described integrated modules implemented in the form of software function modules can be stored in a computer readable storage medium.
  • the software functional modules described above are stored in a storage medium and include instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform some of the steps of the methods described in various embodiments of the present invention.
  • the foregoing storage medium includes: a mobile hard disk, a read-only memory (English: Read-Only Memory, ROM for short), a random access memory (English: Random Access Memory, RAM for short), a magnetic disk or an optical disk, and the like. The medium of the code.

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本发明实施例提供了一种数据转发的方法、装置和系统,第一交换设备和第二交换设备分别与存储设备连接,该方法包括:第一交换设备接收数据;第一交换设备根据自身负载情况,将所述数据写入所述存储设备,以使得所述第二交换设备对所述数据进行转发。通过给第一交换设备和第二交换设备增加共同的存储设备,第一交换设备负载较大时,将接收到的数据写入该存储设备中,第二交换设备去该存储设备中取出数据,并对数据进行转发,从而实现了第一交换设备和第二交换设备之间的负载均衡,降低了发生网络拥塞的风险,并使数据得到及时的转发,降低了数据的传输时延。

Description

一种数据转发的方法、装置和系统 技术领域
本发明实施例涉及通讯领域,尤其涉及一种数据转发方法、装置和系统。
背景技术
交换设备作为互联网的主要节点设备,包括交换机和路由器等,是网络中进行网间连接的关键,并在网络中承担着大量网络报文的转发任务。
交换设备在接收到数据包以后,通过对数据包目的地址的解析,确定该数据包转发的端口,进而在对应的转发端口将该数据包转发。
随着大数据时代的来临,信息和数据发生了爆炸性增长,通信流量也随之快速增长,这对数据的转发提出了越来越大的挑战。在某一个时间段,在两个网络节点之间可能发生大量的数据交互,这对两个节点之间的交换设备的处理能力提出了巨大的挑战。交换设备的负载过大,增加了网络拥塞的风险,使数据的传输时延大大增加,并且可能发生数据包的丢失。
发明内容
有鉴于此,本发明实施例提供了一种数据转发方法、装置和系统,通过给至少两个交换设备增加共同的存储设备,可以实现至少两个交换设备之间的负载均衡。
第一方面,本发明实施例提供了一种数据转发的系统,包括第一交换设备、第二交换设备和存储设备,所述第一交换设备和所述第二交换设备分别与所述存储设备连接,所述第一交换设备用于接收第一数据,并根据自身负载情况,将所述第一数据写入所述存储设备;所述第二交换设备用于从所述存储设备取出所述第一数据,并根据所述第一数据的目的地址将所述第一数据转发。
结合第一方面,在第一方面第一种可能的实现方式中,所述第一交换设备用于根据自身负载情况,将所述第一数据写入所述存储设备包括:所述第一交换设备的用于根据所述第一数据的目的地址转发所述第一数据的端口被占用,所述第一交换设备用于将所述第一数据写入所述存储设备。
结合第一方面或第一方面以上任一种可能的实现方式,在第一方面第二种可能的实现方式中,所述第一交换设备用于根据自身负载情况,将所述第一数据写入所述存储设备包括:所述第一交换设备的用于根据所述第一数据的目的地址转发所述第一数据的端口被占用,且所述第一交换设备的缓存的剩余空间小于所述第一数据,所述第一交换设备用于将所述第一数据写入所述存储设备。
结合第一方面或第一方面以上任一种可能的实现方式,在第一方面第三种可能的实现方式中,所述系统还包含控制器,所述第一交换设备和所述第二交换设备分别与所述控制器连接,所述控制器用于维护与所述控制器连接的交换设备的状态信息;所述第一交换设备还用于向所述控制器发送通知消息,所述通知消息用于表明所述第一交换设备将所述第一数据写入所述存储设备;所述控制器还用于根据所述状态信息,确定所述第二交换设备,并向所述第二交换设备发送指令消息,所述指令消息用于指示所述第二交换设备将所述第一数据从所述存储设备取出并转发。
结合第一方面或第一方面以上任一种可能的实现方式,在第一方面第四种可能的实现方式中,所述状态信息包括与所述控制器连接的交换设备的端口的负载信息;所述控制器用于根据所述状态信息,确定所述第二交换设备包括:所述控制器用于从与所述控制器连接,且与所述存储设备连接的交换设备中确定转发端口空闲的交换设备作为所述第二交换设备,其中,所述转发端口为能够根据所述第一数据的目的地址转发所述第一数据的端口。
结合第一方面或第一方面以上任一种可能的实现方式,在第一方面第五种可能的实现方式中,所述第二交换设备还用于按照预设的周期检查所述存储设备是否存在数据。
结合第一方面或第一方面以上任一种可能的实现方式,在第一方面第六种可能的实现方式中,所述第二交换设备支持电分组交换和光电路交换;如果所述存储设备还存有第二数据,且所述第二数据的目的地址与所述第一数据的目的地址相同,所述第二交换设备还用于将所述第一数据和所述第二数据合并,并采用光电路交换的方式将合并后的所述第一数据和所述第二数据转发。
第二方面,本发明实施例提供了一种数据转发的方法,第一交换设备和第二交换设备分别与存储设备连接,包括:所述第一交换设备接收数据;所 述第一交换设备根据自身负载情况,将所述数据写入所述存储设备,以使得所述第二交换设备对所述数据进行转发。
结合第二方面,在第二方面第一种可能的实现方式中,所述第一交换设备根据自身负载情况,将所述数据写入所述存储设备包括:所述第一交换设备的用于根据所述数据的目的地址转发所述数据的端口被占用,所述第一交换设备将所述数据写入所述存储设备。
结合第二方面或第二方面以上任一种可能的实现方式,在第二方面第二种可能的实现方式中,所述第一交换设备根据自身负载情况,将所述数据写入所述存储设备包括:所述第一交换设备的用于根据所述数据的目的地址转发所述数据的端口被占用,且所述第一交换设备的缓存的剩余空间小于所述数据,所述第一交换设备将所述数据写入所述存储设备。
结合第二方面或第二方面以上任一种可能的实现方式,在第二方面第三种可能的实现方式中,所述第一交换设备和所述第二交换设备分别与控制器连接,所述控制器用于维护与所述控制器连接的交换设备的状态信息;
所述方法还包括:所述第一交换设备向所述控制器发送通知消息,所述通知消息用于表明所述第一交换设备将所述数据写入所述存储设备。
第三方面,本发明实施例提供了一种数据转发设备,包括:处理器、存储器、总线和通信接口;所述存储器用于存储执行指令,所述处理器与所述存储器通过所述总线连接,当所述数据转发设备运行时,所述处理器执行所述存储器存储的所述执行指令,以使所述数据转发设备执行第二方面或者第二方面任一种可能的实现方式所述的方法。
第四方面,本发明实施例提供了一种数据转发的方法,第一交换设备和第二交换设备分别与存储设备连接,包括:所述第二交换设备从所述存储设备取出第一数据,其中,所述第一数据由所述第一交换设备根据所述第一交换设备的负载情况写入所述存储设备;所述第二交换设备根据所述第一数据的目的地址将所述第一数据转发。
结合第四方面,在第四方面第一种可能的实现方式中,所述第一交换设备和所述第二交换设备分别与控制器连接,所述控制器用于维护与所述控制器连接的交换设备的状态信息;所述第二交换设备从所述存储设备取出第一数据之前还包括:所述第二交换设备接收来自所述控制器的指令消息,所述指令消息用于指示所述第二交换设备将所述第一数据从所述存储设备取出并 转发。
结合第四方面或第四方面以上任一种可能的实现方式,在第四方面第二种可能的实现方式中,还包括:所述第二交换设备按照预设的周期检查所述存储设备是否存在数据。
结合第四方面或第四方面以上任一种可能的实现方式,在第四方面第三种可能的实现方式中,所述第二交换设备支持电分组交换和光电路交换;如果所述存储设备还存在第二数据,且所述第二数据的目的地址与所述第一数据的目的地址相同,所述方法还包括:所述第二交换设备将所述第一数据和所述第二数据合并,并采用光电路交换的方式将合并后的所述第一数据和所述第二数据转发。
第五方面,本发明实施例提供了一种数据转发设备,包括:处理器、存储器、总线和通信接口;
所述存储器用于存储执行指令,所述处理器与所述存储器通过所述总线连接,当所述数据转发设备运行时,所述处理器执行所述存储器存储的所述执行指令,以使所述数据转发设备执行第四方面或者第四方面任一种可能的实现方式所述的方法。
第六方面,本发明实施例提供了一种数据转发的方法,第一交换设备和第二交换设备分别与控制器连接,所述控制器用于维护与所述控制器连接的交换设备的状态信息,包括:所述控制器接收来自所述第一交换设备的通知消息,所述通知消息用于表明所述第一交换设备将数据写入存储设备,其中,所述第一交换设备和所述第二交换设备分别与所述存储设备连接;所述控制器根据所述状态信息,确定所述第二交换设备;所述控制器向所述第二交换设备发送指令消息,所述指令消息用于指示所述第二交换设备将所述数据从所述存储设备取出并转发。
结合第六方面,在第六方面第一种可能的实现方式中,所述状态信息包括与所述控制器连接的交换设备的端口的负载信息;所述控制器根据所述状态信息,确定所述第二交换设备包括:所述控制器从与所述控制器连接,且与所述存储设备连接的交换设备中确定转发端口空闲的交换设备作为所述第二交换设备,其中,所述转发端口为能够根据所述数据的目的地址转发所述数据的端口。
第七方面,本发明实施例提供了一种数据转发设备,包括:处理器、存 储器、总线和通信接口;所述存储器用于存储执行指令,所述处理器与所述存储器通过所述总线连接,当所述数据转发设备运行时,所述处理器执行所述存储器存储的所述执行指令,以使所述数据转发设备执行第六方面或者第六方面任一种可能的实现方式所述的方法。
第八方面,本发明实施例提供了一种数据转发的装置,所述装置和交换设备分别与存储设备连接,包括:接收单元,用于接收数据;处理单元,根据负载情况,将所述数据写入所述存储设备,以使得所述交换设备对所述数据进行转发。
结合第八方面,在第八方面第一种可能的实现方式中,所述处理单元用于根据负载情况,将所述数据写入所述存储设备包括:所述装置用于根据所述数据的目的地址转发所述数据的端口被占用,所述处理单元用于将所述数据写入所述存储设备。
结合第八方面或第八方面以上任一种可能的实现方式,在第八方面第二种可能的实现方式中,所述处理单元用于根据负载情况,将所述数据写入所述存储设备包括:所述装置用于根据所述数据的目的地址转发所述数据的端口被占用,且所述装置的缓存的剩余空间小于所述数据,所述处理单元用于将所述数据写入所述存储设备。
结合第八方面或第八方面以上任一种可能的实现方式,在第八方面第三种可能的实现方式中,所述装置和所述交换设备分别与控制器连接,所述控制器用于维护与所述控制器连接的所述交换设备的状态信息;所述装置还包括发送单元,所述发送单元用于向控制器发送通知消息,所述通知消息用于表明所述装置将所述数据写入所述存储设备。
第九方面,本发明实施例提供了一种数据转发的装置,所述装置和交换设备分别与存储设备连接,包括:获取单元,用于从所述存储设备取出第一数据,其中,所述第一数据由所述交换设备根据所述交换设备的负载情况写入所述存储设备;转发单元,用于根据所述第一数据的目的地址将所述第一数据转发。
结合第九方面,在第九方面第一种可能的实现方式中,所述交换设备和所述装置分别与控制器连接,所述控制器用于维护与所述控制器连接的所述装置的状态信息;所述装置还包含接收单元,所述接收单元用于接收来自所述控制器的指令消息,所述指令消息用于指示所述装置将所述第一数据从所 述存储设备取出并转发。
结合第九方面或第九方面以上任一种可能的实现方式,在第九方面第二种可能的实现方式中,所述装置还包含检查单元,所述检查单元用于按照预设的周期检查所述存储设备是否存在数据。
结合第九方面或第九方面以上任一种可能的实现方式,在第九方面第三种可能的实现方式中,所述转发单元支持电分组交换和光电路交换;如果所述存储设备还存在第二数据,且所述第二数据的目的地址与所述第一数据的目的地址相同,所述获取单元还用于从所述存储设备取出所述第二数据,所述转发单元还用于将所述第一数据和所述第二数据合并,并采用光电路交换的方式将合并后的所述第一数据和所述第二数据转发。
第十方面,本发明实施例提供了一种数据转发的装置,第一交换设备和第二交换设备分别与所述装置连接,所述装置用于维护与所述控制器连接的交换设备的状态信息,包括:接收单元,用于接收来自所述第一交换设备的通知消息,所述通知消息用于表明所述第一交换设备将数据写入存储设备,其中,所述第一交换设备和所述第二交换设备分别与所述存储设备连接;确定单元,用于根据所述状态信息,确定所述第二交换设备;发送单元,用于向所述第二交换设备发送指令消息,所述指令消息用于指示所述第二交换设备将所述数据从所述存储设备取出并转发。
结合第十方面,在第十方面第一种可能的实现方式中,所述状态信息包括与所述装置连接的交换设备的端口的负载信息;所述确定单元用于根据所述状态信息,确定所述第二交换设备包括:所述确定单元用于从与所述装置连接,且与所述存储设备连接的交换设备中确定转发端口空闲的交换设备作为所述第二交换设备,其中,所述转发端口为能够根据所述数据的目的地址转发所述数据的端口。
根据本发明实施例公开的技术方案,通过给至少两个交换设备增加共同的存储设备,当忙的交换设备负载较大时,将接收到的数据写入该存储设备中,空闲的交换设备去该存储设备中取出数据,并对数据进行转发,从而实现了至少两个交换设备的负载均衡,降低了发生网络拥塞的风险,并使数据得到及时的转发,降低了数据的传输时延。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1为一种数据转发系统的示例性联网环境框图;
图2为本发明的示例性存储设备的示意图;
图3为依据本发明一实施例的数据转发系统的结构示意图;
图4为依据本发明一实施例的数据转发方法的示范性流程图;
图5为依据本发明一实施例的数据转发方法的示范性流程图;
图6为依据本发明一实施例的数据转发方法的示范性流程图;
图7为依据本发明一实施例的数据转发装置的逻辑结构示意图;
图8为依据本发明一实施例的数据转发装置的逻辑结构示意图;
图9为依据本发明一实施例的数据转发装置的逻辑结构示意图;
图10为依据本发明一实施例的数据转发装置硬件结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
图1为一种数据转发系统的示例性联网环境框图。其中,网络节点A、B、C、D、E、F、G和H通过交换设备1、交换设备2、交换设备3和交换设备4相互互联。
为了描述方便,在以下描述中,交换设备1、交换设备2、交换设备3和交换设备4统称为交换设备,在无特别说明的情况下,交换设备是指功能与交换设备1、交换设备2、交换设备3和交换设备4相同或类似的交换设备。
图1仅仅是一个示例性联网环境框图,并不试图对本发明实施例进行任何的限定,例如在具体实现中,交换设备可以连接两个或两个以上图1 所示的网络节点。
其中,图1中的网络节点和交换设备可以通过因特网、内联网、局域网(LANs)、广域网络(WANs)、存储区域网络(SANs)或其他连接方式,或者以上网络的组合进行连接。交换设备包括但不限于路由器、交换机等。
可选的,网络节点A可以是一个节点群,其内部可以包含多台网络地址为210.10.10.0,掩码为255.255.255.0的节点,节点之间还可以通过交换设备相互互联。同理,网络节点B、C、D、E、F、G或H内部也分别可以包含多台网络地址与网络节点对应的节点,以及多个连接不同节点的交换设备,其中节点可以是虚拟机或者计算设备。
可选的,网络节点A、B、C、D、E、F、G和H的仅仅是示范性说明,也可以用网络节点A、B、C、D、E、F、G或H分别代表不同互联网协议(Internet Protocol,简称IP)地址的一个计算设备或虚拟机,本发明实施例并不对此进行限定。
交换设备一般使用查找表(路由表)对数据进行转发,查找表的每个表条目包括匹配域和动作域两部分。匹配域包括网络标识,或包含网络标识和掩码,用于实现查表时的条目匹配。其中,网络标识可以是任意地址标签,一般的表示形式可以为A1.A2.….An;掩码为前缀连续掩码。动作域包含数据包操作信息,一般至少包括输出端口信息。
所述网络标识包括但不限于IP地址、媒体访问控制(Media Access Control,简称MAC)地址等。
表1是交换设备1的示范性查找表,表1仅仅是为了描述方便,示范性的表示出交换设备1的查找表,但本发明实施例并不试图对此进行限定,具体实现的时候,根据交换设备1或网络拓扑的不同,表1可以有更多或者更少的特征,或则其他的实现形式,例如在软件定义网络(Software Defined Network,SDN)网络中,查找表的形式可以是流表项。
表1
网络标识 掩码 输出端口
210.10.10.0 255.255.255.0 1
210.10.20.0 255.255.255.0 2
110.30.10.0 255.255.255.0 3
100.50.0.0 255.255.0.0 3
如表1所示,其条目的匹配域包括网络标识和掩码,用于实现查表时的条目匹配;动作域包括输出端口信息,用于数据的转发。在本实施例中,交换设备1采用最长前缀匹配技术对数据包进行转发,该技术通过聚合具有相同网络标识前缀和输出的查找表条目实现查找表的压缩,在接收到数据包后,通过最长前缀匹配技术实现匹配条目的查找。
如图1所示,假设在某一时刻,交换设备1接收到网络节点A发送的数据包后,从数据包提取数据包的目的节点的IP地址信息,目的IP地址为100.50.10.6,根据表1所示的查找表,基于匹配条件“(目的地址&掩码)==(网络标识&掩码)”执行路由查找,从表1查找与目的IP地址匹配的条目。如果存在匹配的表条目,从所有匹配的表条目中选择具有最长网络标识前缀的条目作为最终匹配条目,如果没有匹配条目,则执行网络设备设定的默认操作。如表1所示,查找表的第4个表条目与IP地址匹配,且为唯一匹配的路由条目,选择第4个表条目作为最终匹配条目,从最终匹配的表条目中提取输出端口等信息,来为数据包处理(比如,转发)提供依据。在图1中,交换设备1将从网络节点A接收的数据包从端口3转发出去,从而实现数据包的路由。
根据图1所示的系统,在系统的数据流量不大的情况下,可以实现数据的顺利转发。随着网络数据流量的爆炸性增长,通讯网络的数据流量迅速增长,例如,在某一时间段,需要在网络节点A和网络节点G之间进行大量的数据交互,这对交换设备1处理能力提出了巨大挑战,可能交换设备1因为负载过大,引起网络拥塞,甚至导致数据包的丢失等问题。
图2为依据为本发明一实施例的数据转发系统的示例性联网环境框图。如图2所示,相比于图1所示的系统,图2所示的系统在交换设备1和交换设备2之间增加一个存储设备1,存储设备1用于缓存与其连接的交换设备接收到的数据。
存储设备1的存储介质包括易失性和非易失性的,可移动的和不可移动的,在任何方法或技术中实现的用来存储诸如计算机可读指令、数据结 构、程序模块或其它数据等信息的介质,包括,但不限于,RAM、ROM、EEPROM、闪存、其他的存储器技术,CD-ROM、数字通用盘、其他的光存储,磁卡带、磁带、磁盘存储、其他的磁存储设备,以及任何其他可以用来存储所需信息并可由交换设备访问的存储介质。
可选的,交换设备可以为数据中心中的柜顶(Top of Rack,ToR)交换机,处于机柜的柜顶,并连接多台服务器。以网络节点A进行举例说明,网络节点A为拥有多台服务器的机柜。
可选的,机柜中的服务器上可以运行着多个虚拟机,每一个虚拟机拥有一个IP地址;机柜中的服务器也可以作为一个独立的主机,拥有一个IP地址。应了解,服务器的种类和用途多种多样,本发明实施例并不对此进行限定。一个机柜中的多台服务器构成了一个网络,例如,网络节点A为多个网络地址为210.10.10.0,掩码为255.255.255.0的服务器或虚拟机构成的网络。
可选的,每一个网络节点中包含多台网络地址相同的节点,交换设备为连接多个网络节点群的交换机或路由器。以网络节点A进行举例说明,网络节点A中包含多台网络地址相同、但主机地址不同的节点,即IP地址在210.10.10.1~210.10.10.254范围内的节点。节点具体可以为计算设备。
可选的,网络节点A、B、C、D、E、F、G和H的仅仅是示范性说明,也可以用网络节点A、B、C、D、E、F、G或H分别代表不同IP地址的一个计算设备,本发明实施例并不对此进行限定。
为了描述方便,仍以表1所示的查找表进行举例,在某一时刻,交换设备1接收到来自网络节点A的第一数据,第一数据携带第一数据的目的地址。
可选的,交换设备1接收到第一数据以后,确定自身负载情况,如果自身负载情况大于预设的某一阈值,则交换设备1将第一数据写入与其连接的存储设备1。
具体而言,在本发明实施例中,可以使用单位时间内转发的数据量大小(吞吐率)表征交换设备1的负载情况,将交换设备1的通信连接的生存期进行周期划分,例如将生存期划分为等长的时间片,用一个时间片的数据吞吐量除以时间片的长度得到这个时间片的吞吐率。最近的一个时间 片的交换设备的吞吐率大小表征了交换设备1的负载情况。需要说明的是,此处的时间片的长度可由人为配置指定,通常来说其取值应该能够及时反映交换设备负载的变化。
需要说明的是,交换设备的吞吐率只是衡量交换设备的负载强度的一种方式,本发明实施例允许使用其它能够表征交换设备的负载强度的指标进行替换。
可选的,交换设备1接收到第一数据以后,判断自身的转发端口的负载情况,如果转发端口的负载情况大于预设的某一阈值,则交换设备1将第一数据写入与其连接的存储设备1,其中转发端口为能够根据所述第一数据的目的地址转发所述第一数据的端口。为了描述方便,在本发明实施例中,如无特殊说明,转发端口特指能够根据所述第一数据的目的地址转发所述第一数据的端口。
具体而言,在本发明实施例中,可以使用归一化吞吐率表征转发端口的负载强度。归一化吞吐率为转发端口在单位时间内,转发端口单位带宽上传输的数据量。当使用归一化吞吐率表征转发端口的负载强度时,转发端口的归一化吞吐率可以通过以下方式统计得到:将转发端口的通信连接的生存期进行周期划分,例如将生存期划分为等长的时间片。独立统计每个时间片内转发端口已发送的数据量,并且将该数据量除以整个时间片长度得到当前时间片内平均吞吐率。为了便于设置阈值并与之比较,通常将吞吐率进一步表示为归一化的形式,即将吞吐率除以转发端口带宽,得到一个0和1之间的值,作为归一化吞吐率。需要说明的是,此处的时间片的长度可由人为配置指定,通常来说其取值应该能够及时反映转发端口负载的变化。
转发端口的归一化吞吐率的具体计算可以举例如下:假设时间片长度为L,转发端口在当前时间片内已发送的数据量为C,网络接口带宽为B,则转发端口的归一化吞吐率R为C/(L×B)。
需要说明的是,转发端口的归一化吞吐率只是衡量转发端口的负载强度的一种方式,本发明实施例允许使用其它能够表征转发端口的负载强度的指标进行替换。
可选的,交换设备1接收到第一数据后,判断转发端口是否空闲,如 果空闲,则直接从该转发端口中将第一数据转发,如果转发端口被占用,则交换设备1将第一数据写入存储设备1。
可选的,交换设备1接收到第一数据后,判断转发端口是否空闲,如果空闲,则直接从该端口中将第一数据转发,如果转发端口被占用,交换设备1还可以查看自身缓存的剩余空间,如果自身的缓存的剩余空间大于第一数据的大小,则交换设备1将第一数据写入自身缓存中,如果自身缓存的剩余空间小于第一数据的大小,则交换设备1将第一数据写入存储设备1。
可选的,交换设备1接收到第一数据后,判断转发端口是否空闲,如果空闲,则直接从该端口中将第一数据转发,如果转发端口被占用,交换设备1还可以查看自身缓存中对应转发端口的缓存队列中数据的大小,如果对应转发端口的缓存队列中数据的大小大于预设的阈值,则交换设备1将第一数据写入存储设备1。
具体而言,交换设备1的转发端口可以是1个或大于1的正整数个,本发明实施例对此并不进行限定。
应了解,以上仅仅是对交换设备1何时将第一数据写入存储设备1进行举例性说明,交换设备1将第一数据写入存储设备1的判断依据多种多样,本发明实施例仅仅是做出了举例说明,并不试图对此进行限定。
交换设备1接收到第一数据以后,从第一数据提取第一数据的目的节点的IP地址信息,假设第一数据的目的IP地址为100.50.10.6,根据表1所示的查找表,基于匹配条件“(目的地址&掩码)==(网络标识&掩码)”执行路由查找,从表1查找与目的IP地址匹配的条目。如表1所示,查找表的第4个表条目与IP地址匹配,且为唯一匹配的路由条目,交换设备1应该从端口3将该第一数据转发。如果此时交换设备1的端口3空闲,交换设备1将该第一数据从端口3转发。
可选的,如果交换设备1的端口3正在被占用,则交换设备1直接将该第一数据写入与其相连的存储设备1。
可选的,如果此时的交换设备1的端口3正在被占用,交换设备1分析第一数据的包头,对第一数据的大小进行识别,并检查交换设备1自身缓存的剩余空间大小,如果自身缓存的剩余空间大于该第一数据的大小, 交换设备1将该第一数据存入自身缓存;如果交换设备1的自身缓存的剩余空间小于该第一数据的大小,则交换设备1将该第一数据写入与其相连的存储设备1;如果交换设备1的自身缓存的剩余空间等于该第一数据的大小,交换设备可以选择将该第一数据写入自身缓存或者与其相连的存储设备1。
可选的,与存储设备1连接的交换设备中负载小于某一阈值或者空闲的交换设备会按照一个预设的周期T去检查存储设备1中是否有数据存在,如果发现存储设备1中有数据存在,且自身能够实现该数据的转发,则从存储设备1中取出该数据,并对该数据进行转发。
在本发明实施例中,假设与存储设备1连接的交换设备2空闲或其负载小于某一预设的阈值,交换设备2会按照预设的周期T去检查存储设备1中是否有数据存在。
在某一次检查中,交换设备2发现存储设备1中存在该第一数据,交换设备2判断自身是否能够转发该第一数据的,如果交换设备2可以转发该第一数据,且交换设备2的转发端口空闲,则交换设备2从存储设备1中取出该第一数据,并对该第一数据进行转发。
如果交换设备2的转发端口被占用,但该端口的负载小于预设的阈值,则交换设备2也可以取出第一数据,并把第一数据写入自身的缓存中,等待该转发端口空闲后,将所述第一数据转发。
具体而言,交换设备2可以用其转发端口的缓存队列中数据的大小来表示转发端口的负载情况。
可选的,所述交换设备2支持电分组交换和光电路交换,如果所述存储设备1还存有第二数据,且所述第二数据的目的地址与所述第一数据的目的地址相同,所述交换设备2还用于将所述第一数据和所述第二数据合并,并采用光电路交换的方式将合并后的所述第一数据和所述第二数据转发。
可选的,交换设备1和交换设备2还连接同一个控制器(图中未示出),该控制器用于维护与其连接的交换设备的状态信息和网络拓扑,具体而言,状态信息包括但不限于负载情况。
交换设备1将第一数据写入存储设备1之后(或之前)还用于向该控 制器发送通知消息,通知消息用于表明交换设备1将第一数据写入存储设备1中,以便控制器选取合适的交换设备对该第一数据转发。
控制器接收到通知消息后,根据网络拓扑确定与存储设备1连接的交换设备,并根据自身维护的状态信息,确定用于转发该第一数据的交换设备,并向其发送指令消息,指示其将第一数据从存储设备1中取出并转发。
可选的,控制器维护的所述状态信息包括与所述控制器连接的交换设备的端口的负载信息,所述控制器用于从与所述控制器连接,且与所述存储设备1连接的交换设备中确定转发端口空闲的交换设备用于转发第一数据,其中,所述转发端口为能够根据所述第一数据的目的地址转发所述第一数据的端口。
可选的,如果与所述控制器连接,且与所述存储设备1连接的交换设备中,没有转发端口空闲的交换设备,则控制器选取转发端口的负载小于预设的阈值的交换设备用于转发该第一数据。
具体而言,可以用转发端口的缓存队列中数据的大小来表示转发端口的负载,还可以用转发端口的吞吐率表示该转发端口的负载。转发端口的负载的表现形式多种多样,本发明实施例并不对此进行限定。
应了解,控制器选择用于转发第一数据的交换设备的选择依据多种多样,本发明实施例仅仅是进行了举例说明,还可以有其他实现形式。本发明实施例并不对此进行限定,允许使用其它选择依据进行替换。
在本发明实施例中,假设控制器从与其连接的交换设备中确定交换设备2,则控制器向交换设备2发送指令消息,指示交换设备2将所述第一数据从所述存储设备1取出并转发。交换设备2接收到指令消息后,去存储设备1取出第一数据,并根据第一数据的目的地址,将第一数据转发。
可选的,所述交换设备2支持电分组交换和光电路交换,如果控制器接收到通知消息指示,所述存储设备1中还包含第二数据,且第一数据的目的地址与第二数据的目的地址相同,所述控制器还用于在指令信息中指示交换设备2将所述第一数据和所述第二数据合并,并采用光电路交换的方式将合并后的所述第一数据和所述第二数据转发。
应了解,在方案具体实现的过程中,如果在某一时刻交换设备1将无法转发的数据写入存储设备1,且与存储设备1连接的其他交换设备也无 法转发该数据,则在下一时刻,有能力转发该数据的交换设备从存储设备1中取出数据,并将该数据转发,该有能力转发该数据的交换设备可以是交换设备1。
应理解,有能力转发该数据的交换设备可以是空闲或者负载不大于预设的阈值的交换设备。
在具体实现过程中,存储设备1还可以与网络节点A、B、C或者D相连接,网络节点A、B、C或者D要通过交换设备1或者交换设备2转发的数据,可以直接写入存储设备1,由与存储设备1相连接的交换设备中有能力转发该数据的交换设备去存储设备1中取出该数据,并对数据进行转发。根据本发明实施例公开的技术方案,通过给交换设备1和交换设备2增加共同的存储设备,交换设备1无法及时转发接收到的数据时,可以将该数据写入该存储设备中,空闲或者负载较小的交换设备2去该存储设备中取出数据,并对数据进行转发,从而实现了交换设备1和交换设备2之间的负载均衡,降低了发生网络拥塞的风险,并使数据得到及时的转发,降低了数据的传输时延。
图3为依据本发明一实施例的数据转发系统300的结构示意图,系统300应用于数据中心网络,如图3所示,系统300包括网络302、控制器304、第一交换设备306、存储设备308、第二交换设备310和机柜312。
其中第一交换设备306和第二交换设备310为柜顶(Top of Rack,ToR)交换机,位于机柜312的柜顶,机柜312内部包含至少一个服务器。位于机柜312中的服务器上可以运行着至少一个虚拟机。
第一交换设备306用于转发与其连接的机柜312中的服务器或者虚拟机的数据,第二交换设备310用于转发与其连接的机柜312中的服务器或者虚拟机的数据。
第一交换设备306和第二交换设备310分别与存储设备308相连,存储设备308用于存储与其连接的交换设备当前无法转发的数据。即与存储设备308连接的交换设备判断当前无法转发接收到的数据,则会将无法转发的数据写入存储设备308。
第一交换设备306和第二交换设备310分别与控制器304连接,控制器304用于维护与其连接的交换设备之间的网络拓扑,以及与其连接的交 换设备的状态信息,其中状态信息包括交换设备的端口负载情况。
第一交换设备306用于从与其连接的机柜312中的服务器或者虚拟机中接收第一数据,第一数据中携带第一数据的目的地址。
可选的,第一交换设备306判断自身当前的负载情况,确定负载是否大于预设的阈值,如果负载不大于预设的阈值,则第一交换设备306根据第一数据的目的地址将第一数据转发;如果负载大于预设的阈值,则第一交换设备306将第一数据写入存储设备308。
可选的,第一交换设备306判断自身当前的负载情况,确定负载是否大于预设的阈值,如果负载不大于预设的阈值,则第一交换设备306根据第一数据的目的地址将第一数据转发;如果负载大于预设的阈值,判断第一交换设备306的缓存剩余空间大小,如果第一交换设备306的缓存剩余空间大小小于第一数据大小,则第一交换设备306将第一数据写入存储设备308。
可选的,负载情况包括第一交换设备306的吞吐率。
可选的,所述负载情况包括转发端口的负载情况,其中,所述转发端口为能够根据所述第一数据的目的地址转发所述第一数据的端口。具体的,可以用转发端口的吞吐率表示转发端口的负载情况,也可以用转发端口对应的缓存队列中数据量的大小表示转发端口的负载情况。
应理解,负载情况的表现形式多种多样,本发明实施例仅仅是做出举例说明,并不对此进行限定。
第一交换设备306将第一数据写入存储设备308后,还用于向控制器310发送通知消息,该通知消息用于表明所述第一交换设备306将所述第一数据写入所述存储设备308中。
控制器308根据自身维护的与其连接的交换设备的网络拓扑和状态信息,确定所述第二交换设备312,并向所述第二交换设备312发送指令消息,所述指令消息用于指示所述第二交换设备312将所述第一数据从所述存储设备308取出并转发。
可选的,所述控制器308用于根据所述状态信息,确定所述第二交换设备312包括:所述控制器308用于从与所述控制器308连接,且与所述 存储设备连接的交换设备中确定空闲或负载小于预设的阈值的交换设备作为所述第二交换设备312。
可选的,所述状态信息包括与所述控制器308连接的交换设备的端口的负载信息;所述控制器308用于根据所述状态信息,确定所述第二交换设备312包括:所述控制器308用于从与所述控制器308连接,且与所述存储设备310连接的交换设备中确定转发端口空闲或转发端口负载小于预设的阈值的交换设备作为所述第二交换设备312,其中,所述转发端口为能够根据所述第一数据的目的地址转发所述第一数据的端口。
可选的,第一交换设备306支持电分组交换(Electronic Packet Switching,EPS)和光电路交换(Optical Circuit Switching,OCS)。
第一交换设备306从与其连接的机柜312接收到第一数据,并对第一数据的包头进行分析,判断数据流的大小,如果第一数据的大小大于预设的阈值,则判定第一数据是大象流,如果第一数据是大象流,则优先采用OCS的方式对第一数据进行转发。
第一交换设备306确定使用OCS进行数据转发后,会建立与第一数据目的地址之间的光电路,如果光电路建立成功,则使用OCS的方式将第一数据直接转发至第一数据的目的地址。
因为在通讯网络中,有可能会发生建立光电路失败的情况,如果第一交换设备306无法建立与第一数据的目的地址之间的光电路,则第一交换设备306选择EPS的方式对数据进行转发。
如果第一数据的大小不大于预设的阈值,则判定第一数据为老鼠流,则第一交换设备306优先使用EPS的方式对第一数据进行转发。
如果用于转发第一数据的EPS转发端口空闲或者负载不大于预设的阈值,则第一交换设备采用EPS的方式将第一数据转发;如果用于转发第一数据的EPS转发端口被占用或者负载大于预设的阈值,则第一交换设备306将第一数据写入存储设备308中。
可选的,第一交换设备306还用于数据流的整合,如果第一交换设备306接收到的多个(至少两个)大小均小于预设的阈值的老鼠流,且该多个老鼠流的目的地址相同,所述第一交换设备306还用于将该多个目的地址相同的数据整合成大象流,并采用OCS的方式进行转发。
可选的,第二交换设备310支持电分组交换(Electronic Packet Switching,EPS)和光电路交换(Optical Circuit Switching,OCS)。
如果所述存储设备308中还存有第二数据,且所述第二数据的目的地址与所述第一数据的目的地址相同,所述控制器304还用于在指令消息中指示所述第二交换设备310将所述第一数据和所述第二数据都取出转发。
所述第二交换设备还用于将所述第一数据和所述第二数据合并,并采用光电路交换的方式将合并后的所述第一数据和所述第二数据转发。
可选的,第一交换设备306和第二交换设备310不直接进行交互,在控制器304与第一交换设备306、第二交换设备310之间还存在管理模块,所述管理模块用于对第一交换设备306和第二交换设备310进行直接管理。
根据本发明实施例公开的技术方案,通过给数据中心中两个ToR交换机增加共同的存储设备,当第一交换设备负载较大时,将接收到的数据写入该存储设备中,并上报控制器,由控制器选择负载较小或者空闲的第二交换设备来执行数据的转发,第二交换设备去该存储设备中取出数据,并对数据进行转发,从而实现了数据中心数据转发的负载均衡,降低了发生网络拥塞的风险,并使数据得到及时的转发,降低了数据的传输时延。
图4为依据本发明一实施例的数据转发方法400的示范性流程图,第一交换设备和第二交换设备分别与存储设备连接,如图4所示,方法400包括:
S402:第一交换设备接收数据。
S404:第一交换设备根据自身负载情况,将所述数据写入所述存储设备,以使得所述第二交换设备对所述数据进行转发。
其中,所述数据中携带所述数据的目的地址。
所述第一交换设备根据自身负载情况,将所述数据写入所述存储设备包括:所述第一交换设备的负载大于预设的阈值,所述第一交换设备将所述数据写入所述存储设备。
具体而言,负载情况可以为第一交换设备的数据吞吐率,也可以为第一交换设备用于转发所述数据的端口的吞吐率或繁忙程度,本发明并不对此进行限定。只要第一交换设备因为自身负载情况,无法及时根据所述数 据的目的地址转发所述数据,都可以将所述数据写入存储设备,以使得其他空闲的交换设备去该存储设备中取出所述数据,并进行转发。
可选的,所述第一交换设备根据自身负载情况,将所述数据写入所述存储设备包括:所述第一交换设备的用于根据所述数据的目的地址转发所述数据的端口被占用,所述第一交换设备将所述数据写入所述存储设备。
可选的,所述第一交换设备根据自身负载情况,将所述数据写入所述存储设备包括:所述第一交换设备的用于根据所述数据的目的地址转发所述数据的端口被占用,且所述第一交换设备的缓存的剩余空间小于所述数据,所述第一交换设备将所述数据写入所述存储设备。
可选的,所述第一交换设备和所述第二交换设备分别与控制器连接,所述控制器用于维护与所述控制器连接的交换设备的状态信息;所述方法400还包括:所述第一交换设备向所述控制器发送通知消息,所述通知消息用于表明所述第一交换设备将所述数据写入所述存储设备。
控制器可以从与所述控制器连接,且与所述存储设备连接的交换设备中确定转发端口空闲或者转发端口负载情况小于预设的某一阈值的交换设备作为所述第二交换设备,并向所述第二交换设备发送指令消息,所述指令消息用于指示所述第二交换设备将所述数据从所述存储设备取出并转发。其中,所述转发端口为能够根据所述数据的目的地址转发所述数据的端口。
根据本发明实施例提供的技术方案,当第一交换设备接收到数据后,如果因为第一交换设备的负载情况,无法根据数据的目的地址对数据及时转发,第一交换设备可以将接收到的数据写入与其连接的存储设备,以使得转发端口空闲的交换设备去该存储设备中取出数据,并根据数据的目的地址及时的将数据转发。从而实现了与存储设备连接的多个交换设备的相互协作,保证了负载的均衡和数据的及时转发。
图5为依据本发明一实施例的数据转发方法500的示范性流程图,第一交换设备和第二交换设备分别与存储设备连接,如图5所示,方法500包括:
S502:第二交换设备从所述存储设备取出第一数据,其中,所述第一数据由所述第一交换设备根据所述第一交换设备的负载情况写入所述存储设备。
具体而言,负载情况可以为第一交换设备的数据吞吐率,也可以为第一交换设备用于转发所述数据的端口的吞吐率或繁忙程度,本发明并不对此进行限定。只要第一交换设备因为自身负载情况,无法及时根据所述数据的目的地址转发所述数据,都可以将所述数据写入存储设备,以使得第二交换设备去该存储设备中取出所述数据,并进行转发。
S504:第二交换设备根据所述第一数据的目的地址将所述第一数据转发。
可选的,所述第一交换设备和所述第二交换设备分别与控制器连接,所述控制器用于维护与所述控制器连接的交换设备的状态信息;所述第二交换设备从所述存储设备取出第一数据之前还包括:所述第二交换设备接收来自所述控制器的指令消息,所述指令消息用于指示所述第二交换设备将所述第一数据从所述存储设备取出并转发。
具体而言,第二交换设备为与所述控制器连接,且与所述存储设备连接的交换设备中转发端口空闲或者转发端口吞吐率小于预设的阈值的交换设备,其中,所述转发端口为能够根据所述第一数据的目的地址转发所述第一数据的端口。
可选的,方法500还包括:所述第二交换设备按照预设的周期检查所述存储设备是否存在数据。
具体而言,当第二交换设备空闲或者负载小于某一预设的阈值时,会周期性的去存储设备中检查其中是否有数据,如果存储设备中存在数据,且第二交换设备可以转发该数据,且用于转发该数据的端口空闲或者吞吐率小于预设的阈值,则第二交换设备就从该存储设备中取出该数据,并根据数据的目的地址将数据转发。
可选的,所述第二交换设备支持电分组交换和光电路交换;如果所述存储设备还存在第二数据,且所述第二数据的目的地址与所述第一数据的目的地址相同,所述方法还包括:所述第二交换设备将所述第一数据和所述第二数据合并,并采用光电路交换的方式将合并后的所述第一数据和所述第二数据转发。
根据本发明实施例的技术方案,当第一交换设备无法根据第一数据的目的地址及时转发第一数据时,会将第一数据写入存储设备,转发第一数据的转发端口空闲或负载小于预设的阈值的第二交换设备会去存储设备中取出第 一数据,并将第一数据及时转发。从而实现了与存储设备连接的多个交换设备的相互协作,保证了负载的均衡和数据的及时转发。且如果第二交换设备支持EPS和OCS交换,第二交换设备还可以将多个老鼠流合成大象流,并采用OCS交换,从而减小转发延时,节省网络资源。
图6为依据本发明一实施例的数据转发方法600的示范性流程图,第一交换设备和第二交换设备分别与控制器连接,所述控制器用于维护与所述控制器连接的交换设备的状态信息,其中,第一交换设备和第二交换设备分别与存储设备连接,如图6所示,方法600包括:
S602:所述控制器接收来自所述第一交换设备的通知消息,所述通知消息用于表明所述第一交换设备将数据写入存储设备。
S604:控制器根据所述状态信息,确定所述第二交换设备。
S606:控制器向所述第二交换设备发送指令消息,所述指令消息用于指示所述第二交换设备将所述数据从所述存储设备取出并转发。
可选的,所述状态信息包括与所述控制器连接的交换设备的端口的负载信息;所述控制器根据所述状态信息,确定所述第二交换设备包括:所述控制器从与所述控制器连接,且与所述存储设备连接的交换设备中确定转发端口空闲的交换设备作为所述第二交换设备,其中,所述转发端口为能够根据所述数据的目的地址转发所述数据的端口。
根据本发明实施例公开的技术方案,通过控制器对与其连接的交换设备的状态监控,可以实现多个交换设备的负载均衡,且保证了数据能够及时的转发。
图7为依据本发明一实施例的数据转发装置700的逻辑结构示意图,装置700与交换设备分别与存储设备连接,如图7所示,装置700包括接收单元702和处理单元704。
接收单元702用于接收数据。
处理单元704用于根据负载情况,将所述数据写入所述存储设备,以使得所述交换设备对所述数据进行转发。
其中,所述数据中携带所述数据的目的地址。
可选的,所述处理单元704用于根据负载情况,将所述数据写入所述存储设备包括:所述装置700用于根据所述数据的目的地址转发所述数据的端口被占用,所述处理单元704用于将所述数据写入所述存储设备。
所述处理单元704用于根据负载情况,将所述数据写入所述存储设备包括:所述装置700的负载大于预设的阈值,所述处理单元704用于将所述数据写入所述存储设备。
具体而言,负载情况可以为装置700的数据吞吐率,也可以为装置700用于转发所述数据的端口的吞吐率或繁忙程度,本发明并不对此进行限定。只要装置700因为自身负载情况,无法及时根据所述数据的目的地址转发所述数据,都可以将所述数据写入存储设备,以使得其他空闲的交换设备去该存储设备中取出所述数据,并进行转发。
可选的,所述处理单元704用于根据负载情况,将所述数据写入所述存储设备包括:所述装置700用于根据所述数据的目的地址转发所述数据的端口被占用,且所述装置700的缓存的剩余空间小于所述数据,所述处理单元704用于将所述数据写入所述存储设备。
可选的,所述装置700和所述交换设备分别与控制器连接,所述控制器用于维护与所述控制器连接的所述交换设备的状态信息;所述装置700还包括发送单元,所述发送单元用于向控制器发送通知消息,所述通知消息用于表明所述装置700将所述数据写入所述存储设备。
控制器可以从与所述控制器连接,且与所述存储设备连接的交换设备中选择转发端口空闲或者转发端口负载情况小于预设的某一阈值的交换设备,并向选出的该交换设备发送指令消息,所述指令消息用于指示选出的交换设备将所述数据从所述存储设备取出并转发。其中,所述转发端口为能够根据所述数据的目的地址转发所述数据的端口。
根据本发明实施例提供的技术方案,当装置700接收到数据后,如果因为装置700的负载情况,无法根据数据的目的地址对数据及时转发,装置700可以将接收到的数据写入与其连接的存储设备,以使得转发端口空闲的交换设备去该存储设备中取出数据,并根据数据的目的地址及时的将数据转发。从而实现了与存储设备连接的装置700与交换设备的相互协作,保证了负载的均衡和数据的及时转发。
图8为依据本发明一实施例的数据转发装置800的逻辑结构示意图,装置800与交换设备分别与存储设备连接,如图8所示,装置800包括获取单元802和转发单元804。
获取单元802用于从所述存储设备取出第一数据,其中,所述第一数据 由所述交换设备根据所述交换设备的负载情况写入所述存储设备。
转发单元804用于根据所述第一数据的目的地址将所述第一数据转发。
具体而言,负载情况可以为交换设备的数据吞吐率,也可以为交换设备用于转发所述数据的端口的吞吐率或繁忙程度,本发明并不对此进行限定。只要交换设备因为自身负载情况,无法及时根据所述数据的目的地址转发所述数据,都可以将所述数据写入存储设备,以使得装置800去该存储设备中取出所述数据,并进行转发。
可选的,所述交换设备和所述装置800分别与控制器连接,所述控制器用于维护与所述控制器连接的所述装置800的状态信息;所述装置800还包含接收单元,所述接收单元用于接收来自所述控制器的指令消息,所述指令消息用于指示所述装置800将所述第一数据从所述存储设备取出并转发。
具体而言,装置800为与所述控制器连接,且与所述存储设备连接的交换设备中转发端口空闲或者转发端口吞吐率小于预设的阈值的交换设备,其中,所述转发端口为能够根据所述第一数据的目的地址转发所述第一数据的端口。
可选的,所述装置800还包含检查单元,所述检查单元用于按照预设的周期检查所述存储设备是否存在数据。
具体而言,当装置800空闲或者负载小于某一预设的阈值时,会周期性的去存储设备中检查其中是否有数据,如果存储设备中存在数据,且装置800可以转发该数据,且装置800用于转发该数据的端口空闲或者吞吐率小于预设的阈值,则装置800就从该存储设备中取出该数据,并根据数据的目的地址将数据转发。
可选的,所述转发单元804支持电分组交换和光电路交换;如果所述存储设备还存在第二数据,且所述第二数据的目的地址与所述第一数据的目的地址相同,所述获取单元802还用于从所述存储设备取出所述第二数据,所述转发单元804还用于将所述第一数据和所述第二数据合并,并采用光电路交换的方式将合并后的所述第一数据和所述第二数据转发。
根据本发明实施例的技术方案,当交换设备无法根据第一数据的目的地址及时转发第一数据时,会将第一数据写入存储设备,转发第一数据的转发端口空闲或负载小于预设的阈值的装置800会去存储设备中取出第一数据,并将第一数据及时转发。从而实现了与存储设备连接的交换设备和装置800 的相互协作,保证了负载的均衡和数据的及时转发。且如果装置800支持EPS和OCS交换,装置800还可以将多个老鼠流合成大象流,并采用OCS交换,从而减小转发延时,节省网络资源。
图9为依据本发明一实施例的数据转发装置900的逻辑结构示意图,第一交换设备和第二交换设备分别与所述装置900连接,所述装置900用于维护与所述控制器连接的交换设备的状态信息,如图9所示,装置900包括接收单元902、确定单元904和发送单元906。
接收单元902用于接收来自所述第一交换设备的通知消息,所述通知消息用于表明所述第一交换设备将数据写入存储设备,其中,所述第一交换设备和所述第二交换设备分别与所述存储设备连接。
确定单元904用于根据所述状态信息,确定所述第二交换设备。
发送单元906用于向所述第二交换设备发送指令消息,所述指令消息用于指示所述第二交换设备将所述数据从所述存储设备取出并转发。
可选的,所述状态信息包括与所述装置900连接的交换设备的端口的负载信息;所述确定单元904用于根据所述状态信息,确定所述第二交换设备包括:所述确定单元904用于从与所述装置900连接,且与所述存储设备连接的交换设备中确定转发端口空闲的交换设备作为所述第二交换设备,其中,所述转发端口为能够根据所述数据的目的地址转发所述数据的端口。
根据本发明实施例公开的技术方案,通过控制器对与其连接的交换设备的状态监控,可以实现多个交换设备的负载均衡,且保证了数据能够及时的转发。
图10是依据本发明一实施例的数据转发装置1000的硬件结构示意图。如图10所示,数据转发装置1000包括处理器1002、存储器1004、输入/输出接口1006、通信接口1008和总线1010。其中,处理器1002、存储器1004、输入/输出接口1006和通信接口1008通过总线1010实现彼此之间的通信连接。
处理器1002可以采用通用的中央处理器(Central Processing Unit,CPU),微处理器,应用专用集成电路(Application SQecific Integrated Circuit,ASIC),或者一个或多个集成电路,用于执行相关程序,以实现本发明实施例所提供的技术方案。
存储器1004可以是只读存储器(Read Only Memory,ROM),静态存储设备,动态存储设备或者随机存取存储器(Random Access Memory,RAM)。存储器1004可以存储操作系统和其他应用程序。在通过软件或者固件来实现本发明实施例提供的技术方案时,用于实现本发明实施例提供的技术方案的程序代码保存在存储器1004中,并由处理器1002来执行。
输入/输出接口1006用于接收输入的数据和信息,输出操作结果等数据。
通信接口1008使用例如但不限于收发器一类的收发装置,来实现数据转发装置1000与其他设备或通信网络之间的通信。
总线1010可包括一通路,在数据转发装置1000各个部件(例如处理器1002、存储器1004、输入/输出接口1006和通信接口1008)之间传送信息。
应注意,尽管图10所示的数据转发装置1000仅仅示出了处理器1002、存储器1004、输入/输出接口1006、通信接口1008以及总线1010,但是在具体实现过程中,本领域的技术人员应当明白,数据转发装置1000还包含实现正常运行所必须的其他器件。同时,根据具体需要,本领域的技术人员应当明白,数据转发装置1000还可包含实现其他附加功能的硬件器件。此外,本领域的技术人员应当明白,数据转发装置1000也可仅仅包含实现本发明实施例所必须的器件,而不必包含图10中所示的全部器件。
图10所示的硬件结构以及上述描述适用于本发明实施例所提供的各种数据转发装置和系统,适用于执行本发明实施例所提供的各种数据转发方法。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,设备和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的, 作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。
上述以软件功能模块的形式实现的集成的模块,可以存储在一个计算机可读取存储介质中。上述软件功能模块存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:移动硬盘、只读存储器(英文:Read-Only Memory,简称ROM)、随机存取存储器(英文:Random Access Memory,简称RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的保护范围。

Claims (30)

  1. 一种数据转发的系统,其特征在于,包括第一交换设备、第二交换设备和存储设备,所述第一交换设备和所述第二交换设备分别与所述存储设备连接,
    所述第一交换设备用于接收第一数据,并根据自身负载情况,将所述第一数据写入所述存储设备;
    所述第二交换设备用于从所述存储设备取出所述第一数据,并根据所述第一数据的目的地址将所述第一数据转发。
  2. 根据权利要求1所述的系统,其特征在于,所述第一交换设备用于根据自身负载情况,将所述第一数据写入所述存储设备包括:所述第一交换设备的用于根据所述第一数据的目的地址转发所述第一数据的端口被占用,所述第一交换设备用于将所述第一数据写入所述存储设备。
  3. 根据权利要求1所述的系统,其特征在于,所述第一交换设备用于根据自身负载情况,将所述第一数据写入所述存储设备包括:所述第一交换设备的用于根据所述第一数据的目的地址转发所述第一数据的端口被占用,且所述第一交换设备的缓存的剩余空间小于所述第一数据,所述第一交换设备用于将所述第一数据写入所述存储设备。
  4. 根据权利要求1-3任一项所述的系统,其特征在于,所述系统还包含控制器,所述第一交换设备和所述第二交换设备分别与所述控制器连接,所述控制器用于维护与所述控制器连接的交换设备的状态信息;
    所述第一交换设备还用于向所述控制器发送通知消息,所述通知消息用于表明所述第一交换设备将所述第一数据写入所述存储设备;
    所述控制器还用于根据所述状态信息,确定所述第二交换设备,并向所述第二交换设备发送指令消息,所述指令消息用于指示所述第二交换设备将所述第一数据从所述存储设备取出并转发。
  5. 根据权利要4所述的系统,其特征在于,所述状态信息包括与所述控制器连接的交换设备的端口的负载信息;
    所述控制器用于根据所述状态信息,确定所述第二交换设备包括:所述控制器用于从与所述控制器连接,且与所述存储设备连接的交换设备中确定转发端口空闲的交换设备作为所述第二交换设备,其中,所述转发端口为能 够根据所述第一数据的目的地址转发所述第一数据的端口。
  6. 根据权利要求1-3任一项所述的系统,其特征在于,所述第二交换设备还用于按照预设的周期检查所述存储设备是否存在数据。
  7. 根据权利要求1-6任一项所述的系统,其特征在于,所述第二交换设备支持电分组交换和光电路交换;
    如果所述存储设备还存有第二数据,且所述第二数据的目的地址与所述第一数据的目的地址相同,所述第二交换设备还用于将所述第一数据和所述第二数据合并,并采用光电路交换的方式将合并后的所述第一数据和所述第二数据转发。
  8. 一种数据转发的方法,其特征在于,第一交换设备和第二交换设备分别与存储设备连接,包括:
    所述第一交换设备接收数据;
    所述第一交换设备根据自身负载情况,将所述数据写入所述存储设备,以使得所述第二交换设备对所述数据进行转发。
  9. 根据权利要求8所述的方法,其特征在于,所述第一交换设备根据自身负载情况,将所述数据写入所述存储设备包括:所述第一交换设备的用于根据所述数据的目的地址转发所述数据的端口被占用,所述第一交换设备将所述数据写入所述存储设备。
  10. 根据权利要求8所述的系统,其特征在于,所述第一交换设备根据自身负载情况,将所述数据写入所述存储设备包括:所述第一交换设备的用于根据所述数据的目的地址转发所述数据的端口被占用,且所述第一交换设备的缓存的剩余空间小于所述数据,所述第一交换设备将所述数据写入所述存储设备。
  11. 根据权利要求8-10任一项所述的方法,其特征在于,所述第一交换设备和所述第二交换设备分别与控制器连接,所述控制器用于维护与所述控制器连接的交换设备的状态信息;
    所述方法还包括:所述第一交换设备向所述控制器发送通知消息,所述通知消息用于表明所述第一交换设备将所述数据写入所述存储设备。
  12. 一种数据转发设备,其特征在于,包括:处理器、存储器、总线和通信接口;
    所述存储器用于存储执行指令,所述处理器与所述存储器通过所述总线 连接,当所述数据转发设备运行时,所述处理器执行所述存储器存储的所述执行指令,以使所述数据转发设备执行权利要求8-11任一项所述的方法。
  13. 一种数据转发的方法,其特征在于,第一交换设备和第二交换设备分别与存储设备连接,包括:
    所述第二交换设备从所述存储设备取出第一数据,其中,所述第一数据由所述第一交换设备根据所述第一交换设备的负载情况写入所述存储设备;
    所述第二交换设备根据所述第一数据的目的地址将所述第一数据转发。
  14. 根据权利要求13所述的方法,其特征在于,所述第一交换设备和所述第二交换设备分别与控制器连接,所述控制器用于维护与所述控制器连接的交换设备的状态信息;
    所述第二交换设备从所述存储设备取出第一数据之前还包括:所述第二交换设备接收来自所述控制器的指令消息,所述指令消息用于指示所述第二交换设备将所述第一数据从所述存储设备取出并转发。
  15. 根据权利要求13所述的方法,其特征在于,还包括:所述第二交换设备按照预设的周期检查所述存储设备是否存在数据。
  16. 根据权利要求13-15任一项所述的方法,其特征在于,所述第二交换设备支持电分组交换和光电路交换;
    如果所述存储设备还存在第二数据,且所述第二数据的目的地址与所述第一数据的目的地址相同,所述方法还包括:所述第二交换设备将所述第一数据和所述第二数据合并,并采用光电路交换的方式将合并后的所述第一数据和所述第二数据转发。
  17. 一种数据转发设备,其特征在于,包括:处理器、存储器、总线和通信接口;
    所述存储器用于存储执行指令,所述处理器与所述存储器通过所述总线连接,当所述数据转发设备运行时,所述处理器执行所述存储器存储的所述执行指令,以使所述数据转发设备执行权利要求13-16任一项所述的方法。
  18. 一种数据转发的方法,其特征在于,第一交换设备和第二交换设备分别与控制器连接,所述控制器用于维护与所述控制器连接的交换设备的状态信息,包括:
    所述控制器接收来自所述第一交换设备的通知消息,所述通知消息用于表明所述第一交换设备将数据写入存储设备,其中,所述第一交换设备和所 述第二交换设备分别与所述存储设备连接;
    所述控制器根据所述状态信息,确定所述第二交换设备;
    所述控制器向所述第二交换设备发送指令消息,所述指令消息用于指示所述第二交换设备将所述数据从所述存储设备取出并转发。
  19. 根据权利要求18所述的方法,其特征在于,所述状态信息包括与所述控制器连接的交换设备的端口的负载信息;
    所述控制器根据所述状态信息,确定所述第二交换设备包括:所述控制器从与所述控制器连接,且与所述存储设备连接的交换设备中确定转发端口空闲的交换设备作为所述第二交换设备,其中,所述转发端口为能够根据所述数据的目的地址转发所述数据的端口。
  20. 一种数据转发设备,其特征在于,包括:处理器、存储器、总线和通信接口;
    所述存储器用于存储执行指令,所述处理器与所述存储器通过所述总线连接,当所述数据转发设备运行时,所述处理器执行所述存储器存储的所述执行指令,以使所述数据转发设备执行权利要求18或19所述的方法。
  21. 一种数据转发的装置,其特征在于,所述装置和交换设备分别与存储设备连接,包括:
    接收单元,用于接收数据;
    处理单元,根据负载情况,将所述数据写入所述存储设备,以使得所述交换设备对所述数据进行转发。
  22. 根据权利要求21所述的装置,其特征在于,所述处理单元用于根据负载情况,将所述数据写入所述存储设备包括:
    所述装置用于根据所述数据的目的地址转发所述数据的端口被占用,所述处理单元用于将所述数据写入所述存储设备。
  23. 根据权利要求21所述的装置,其特征在于,所述处理单元用于根据负载情况,将所述数据写入所述存储设备包括:
    所述装置用于根据所述数据的目的地址转发所述数据的端口被占用,且所述装置的缓存的剩余空间小于所述数据,所述处理单元用于将所述数据写入所述存储设备。
  24. 根据权利要求21-23任一项所述的装置,其特征在于,所述装置和所述交换设备分别与控制器连接,所述控制器用于维护与所述控制器连接的 所述交换设备的状态信息;
    所述装置还包括发送单元,所述发送单元用于向控制器发送通知消息,所述通知消息用于表明所述装置将所述数据写入所述存储设备。
  25. 一种数据转发的装置,其特征在于,所述装置和交换设备分别与存储设备连接,包括:
    获取单元,用于从所述存储设备取出第一数据,其中,所述第一数据由所述交换设备根据所述交换设备的负载情况写入所述存储设备;
    转发单元,用于根据所述第一数据的目的地址将所述第一数据转发。
  26. 根据权利要求25所述的装置,其特征在于,所述交换设备和所述装置分别与控制器连接,所述控制器用于维护与所述控制器连接的所述装置的状态信息;
    所述装置还包含接收单元,所述接收单元用于接收来自所述控制器的指令消息,所述指令消息用于指示所述装置将所述第一数据从所述存储设备取出并转发。
  27. 根据权利要求25所述的装置,其特征在于,所述装置还包含检查单元,所述检查单元用于按照预设的周期检查所述存储设备是否存在数据。
  28. 根据权利要求25-27任一项所述的装置,其特征在于,所述转发单元支持电分组交换和光电路交换;
    如果所述存储设备还存在第二数据,且所述第二数据的目的地址与所述第一数据的目的地址相同,所述获取单元还用于从所述存储设备取出所述第二数据,所述转发单元还用于将所述第一数据和所述第二数据合并,并采用光电路交换的方式将合并后的所述第一数据和所述第二数据转发。
  29. 一种数据转发的装置,其特征在于,第一交换设备和第二交换设备分别与所述装置连接,所述装置用于维护与所述控制器连接的交换设备的状态信息,包括:
    接收单元,用于接收来自所述第一交换设备的通知消息,所述通知消息用于表明所述第一交换设备将数据写入存储设备,其中,所述第一交换设备和所述第二交换设备分别与所述存储设备连接;
    确定单元,用于根据所述状态信息,确定所述第二交换设备;
    发送单元,用于向所述第二交换设备发送指令消息,所述指令消息用于指示所述第二交换设备将所述数据从所述存储设备取出并转发。
  30. 根据权利要求29所述的装置,其特征在于,所述状态信息包括与所述装置连接的交换设备的端口的负载信息;
    所述确定单元用于根据所述状态信息,确定所述第二交换设备包括:所述确定单元用于从与所述装置连接,且与所述存储设备连接的交换设备中确定转发端口空闲的交换设备作为所述第二交换设备,其中,所述转发端口为能够根据所述数据的目的地址转发所述数据的端口。
PCT/CN2015/082584 2015-06-27 2015-06-27 一种数据转发的方法、装置和系统 WO2017000097A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2015/082584 WO2017000097A1 (zh) 2015-06-27 2015-06-27 一种数据转发的方法、装置和系统
CN201580001243.XA CN107113244B (zh) 2015-06-27 2015-06-27 一种数据转发的方法、装置和系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2015/082584 WO2017000097A1 (zh) 2015-06-27 2015-06-27 一种数据转发的方法、装置和系统

Publications (1)

Publication Number Publication Date
WO2017000097A1 true WO2017000097A1 (zh) 2017-01-05

Family

ID=57609396

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/082584 WO2017000097A1 (zh) 2015-06-27 2015-06-27 一种数据转发的方法、装置和系统

Country Status (2)

Country Link
CN (1) CN107113244B (zh)
WO (1) WO2017000097A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113055292A (zh) * 2021-03-11 2021-06-29 青岛矽昌通信技术有限公司 一种提升多核路由器转发性能的方法及一种多核路由器

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110283064A1 (en) * 2007-10-19 2011-11-17 Hitachi, Ltd. Storage apparatus and data storage method using the same
CN103166870A (zh) * 2011-12-13 2013-06-19 百度在线网络技术(北京)有限公司 负载均衡集群系统及采用其提供服务的方法
CN104219591A (zh) * 2013-05-30 2014-12-17 华为技术有限公司 一种数据包交换方法及装置
CN104272653A (zh) * 2012-05-04 2015-01-07 瑞典爱立信有限公司 分组数据联网中的拥塞控制

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5382451B2 (ja) * 2010-01-29 2014-01-08 日本電気株式会社 フロントエンドシステム、フロントエンド処理方法
CN101854299B (zh) * 2010-05-21 2013-08-14 中国科学院软件研究所 一种发布/订阅系统的动态负载平衡方法
CN101860550B (zh) * 2010-06-25 2013-02-27 复旦大学 一种基于路由器缓存的流媒体系统加速方法
CN102045253B (zh) * 2010-12-06 2013-01-09 浙江宇视科技有限公司 链路聚合网络中发送视频监控业务报文的方法及设备
CN102316021B (zh) * 2011-07-04 2014-12-10 杭州华三通信技术有限公司 一种实现交换机聚合口负载分担的方法和交换机
CN102255757B (zh) * 2011-08-08 2014-05-07 杭州华三通信技术有限公司 一种链路切换方法及其装置
CN102316045B (zh) * 2011-10-19 2014-05-14 杭州华三通信技术有限公司 一种实现mstp组网中流量均衡的方法和网络设备
US9276860B2 (en) * 2013-03-13 2016-03-01 Microsoft Technology Licensing, Llc Distributed data center technology
CN104539716A (zh) * 2015-01-04 2015-04-22 国网四川省电力公司信息通信公司 云桌面管理系统桌面虚拟机调度控制系统及方法
CN104580002B (zh) * 2015-01-14 2017-07-28 盛科网络(苏州)有限公司 大流负载均衡转发方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110283064A1 (en) * 2007-10-19 2011-11-17 Hitachi, Ltd. Storage apparatus and data storage method using the same
CN103166870A (zh) * 2011-12-13 2013-06-19 百度在线网络技术(北京)有限公司 负载均衡集群系统及采用其提供服务的方法
CN104272653A (zh) * 2012-05-04 2015-01-07 瑞典爱立信有限公司 分组数据联网中的拥塞控制
CN104219591A (zh) * 2013-05-30 2014-12-17 华为技术有限公司 一种数据包交换方法及装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113055292A (zh) * 2021-03-11 2021-06-29 青岛矽昌通信技术有限公司 一种提升多核路由器转发性能的方法及一种多核路由器

Also Published As

Publication number Publication date
CN107113244B (zh) 2020-11-17
CN107113244A (zh) 2017-08-29

Similar Documents

Publication Publication Date Title
US10534601B1 (en) In-service software upgrade of virtual router with reduced packet loss
CN106605392B (zh) 用于使用控制器在网络上进行操作的系统和方法
US9654380B1 (en) Systems and methods for determining network topologies
CN108243111B (zh) 确定传输路径的方法和装置
US9042234B1 (en) Systems and methods for efficient network traffic forwarding
US10142160B1 (en) System and methods for managing network hardware address requests with a controller
US8787388B1 (en) System and methods for forwarding packets through a network
US10965604B2 (en) Deadlock avoidance in leaf-spine networks
US8787373B2 (en) Multicast miss notification for a distributed network switch
RU2612599C1 (ru) Устройство управления, система связи, способ управления коммутаторами и программа
CN106656857B (zh) 一种报文限速的方法和装置
US9008080B1 (en) Systems and methods for controlling switches to monitor network traffic
WO2021000752A1 (zh) 一种在数据中心网络中转发报文的方法及相关装置
US9548900B1 (en) Systems and methods for forwarding network packets in a network using network domain topology information
US10291533B1 (en) Systems and methods for network traffic monitoring
US11750440B2 (en) Fast forwarding re-convergence of switch fabric multi-destination packets triggered by link failures
US9800508B2 (en) System and method of flow shaping to reduce impact of incast communications
US11070386B2 (en) Controlling an aggregate number of unique PIM joins in one or more PIM join/prune messages received from a PIM neighbor
EP3534571A1 (en) Service packet transmission method, and node apparatus
US10389615B2 (en) Enhanced packet flow monitoring in a network
US20240267324A1 (en) Packet forwarding method and apparatus
US9984036B2 (en) Communication system, control apparatus, communication method, and program
US10205661B1 (en) Control messages for scalable satellite device clustering control in a campus network
WO2017000097A1 (zh) 一种数据转发的方法、装置和系统
US20200341968A1 (en) Differential Update of Local Cache from Central Database

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

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

Country of ref document: EP

Kind code of ref document: A1