CN107113244B - Data forwarding method, device and system - Google Patents
Data forwarding method, device and system Download PDFInfo
- Publication number
- CN107113244B CN107113244B CN201580001243.XA CN201580001243A CN107113244B CN 107113244 B CN107113244 B CN 107113244B CN 201580001243 A CN201580001243 A CN 201580001243A CN 107113244 B CN107113244 B CN 107113244B
- Authority
- CN
- China
- Prior art keywords
- data
- switching device
- switching
- storage device
- forwarding
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域technical field
本发明实施例涉及通讯领域,尤其涉及一种数据转发方法、装置和系统。Embodiments of the present invention relate to the field of communications, and in particular, to a data forwarding method, device, and system.
背景技术Background technique
交换设备作为互联网的主要节点设备,包括交换机和路由器等,是网络中进行网间连接的关键,并在网络中承担着大量网络报文的转发任务。Switching equipment, as the main node equipment of the Internet, including switches and routers, is the key to the network connection in the network, and undertakes the task of forwarding a large number of network packets in the network.
交换设备在接收到数据包以后,通过对数据包目的地址的解析,确定该数据包转发的端口,进而在对应的转发端口将该数据包转发。After receiving the data packet, the switching device determines the forwarding port of the data packet by analyzing the destination address of the data packet, and then forwards the data packet on the corresponding forwarding port.
随着大数据时代的来临,信息和数据发生了爆炸性增长,通信流量也随之快速增长,这对数据的转发提出了越来越大的挑战。在某一个时间段,在两个网络节点之间可能发生大量的数据交互,这对两个节点之间的交换设备的处理能力提出了巨大的挑战。交换设备的负载过大,增加了网络拥塞的风险,使数据的传输时延大大增加,并且可能发生数据包的丢失。With the advent of the era of big data, the explosive growth of information and data, and the rapid growth of communication traffic, posed more and more challenges to data forwarding. In a certain period of time, a large amount of data interaction may occur between two network nodes, which poses a huge challenge to the processing capability of the switching device between the two nodes. Excessive load on switching equipment increases the risk of network congestion, greatly increases data transmission delay, and may cause data packet loss.
发明内容SUMMARY OF THE INVENTION
有鉴于此,本发明实施例提供了一种数据转发方法、装置和系统,通过给至少两个交换设备增加共同的存储设备,可以实现至少两个交换设备之间的负载均衡。In view of this, embodiments of the present invention provide a data forwarding method, apparatus, and system. By adding a common storage device to at least two switching devices, load balancing between at least two switching devices can be achieved.
第一方面,本发明实施例提供了一种数据转发的系统,包括第一交换设备、第二交换设备和存储设备,所述第一交换设备和所述第二交换设备分别与所述存储设备连接,所述第一交换设备用于接收第一数据,并根据自身负载情况,将所述第一数据写入所述存储设备;所述第二交换设备用于从所述存储设备取出所述第一数据,并根据所述第一数据的目的地址将所述第一数据转发。In a first aspect, an embodiment of the present invention provides a data forwarding system, including a first switching device, a second switching device, and a storage device, wherein the first switching device and the second switching device are respectively connected to the storage device connection, the first switching device is configured to receive the first data, and write the first data into the storage device according to its own load; the second switching device is configured to retrieve the first data from the storage device first data, and forward the first data according to the destination address of the first data.
结合第一方面,在第一方面第一种可能的实现方式中,所述第一交换设备用于根据自身负载情况,将所述第一数据写入所述存储设备包括:所述第一交换设备的用于根据所述第一数据的目的地址转发所述第一数据的端口被占用,所述第一交换设备用于将所述第一数据写入所述存储设备。With reference to the first aspect, in a first possible implementation manner of the first aspect, the first switching device is configured to write the first data into the storage device according to its own load situation, including: the first switching device A port of the device for forwarding the first data according to the destination address of the first data is occupied, and the first switching device is configured to write the first data into the storage device.
结合第一方面或第一方面以上任一种可能的实现方式,在第一方面第二种可能的实现方式中,所述第一交换设备用于根据自身负载情况,将所述第一数据写入所述存储设备包括:所述第一交换设备的用于根据所述第一数据的目的地址转发所述第一数据的端口被占用,且所述第一交换设备的缓存的剩余空间小于所述第一数据,所述第一交换设备用于将所述第一数据写入所述存储设备。With reference to the first aspect or any of the above possible implementation manners of the first aspect, in a second possible implementation manner of the first aspect, the first switching device is configured to write the first data according to its own load condition Entering the storage device includes: the port of the first switching device used for forwarding the first data according to the destination address of the first data is occupied, and the remaining space of the cache of the first switching device is less than all the the first data, and the first exchange device is configured to write the first data into the storage device.
结合第一方面或第一方面以上任一种可能的实现方式,在第一方面第三种可能的实现方式中,所述系统还包含控制器,所述第一交换设备和所述第二交换设备分别与所述控制器连接,所述控制器用于维护与所述控制器连接的交换设备的状态信息;所述第一交换设备还用于向所述控制器发送通知消息,所述通知消息用于表明所述第一交换设备将所述第一数据写入所述存储设备;所述控制器还用于根据所述状态信息,确定所述第二交换设备,并向所述第二交换设备发送指令消息,所述指令消息用于指示所述第二交换设备将所述第一数据从所述存储设备取出并转发。With reference to the first aspect or any possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, the system further includes a controller, the first switching device and the second switching device The devices are respectively connected to the controller, and the controller is used to maintain the status information of the switching devices connected to the controller; the first switching device is further configured to send a notification message to the controller, the notification message is used to indicate that the first switching device writes the first data into the storage device; the controller is further configured to determine the second switching device according to the state information, and report to the second switching device 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.
结合第一方面或第一方面以上任一种可能的实现方式,在第一方面第四种可能的实现方式中,所述状态信息包括与所述控制器连接的交换设备的端口的负载信息;所述控制器用于根据所述状态信息,确定所述第二交换设备包括:所述控制器用于从与所述控制器连接,且与所述存储设备连接的交换设备中确定转发端口空闲的交换设备作为所述第二交换设备,其中,所述转发端口为能够根据所述第一数据的目的地址转发所述第一数据的端口。With reference to the first aspect or any of the above possible implementation manners of the first aspect, in a fourth possible implementation manner of the first aspect, the status information includes load information of a port of a switching device connected to the controller; The controller is configured to determine, according to the state information, that the second switching device includes: the controller is configured to determine, from the switching devices connected to the controller and connected to the storage device, a switch whose forwarding port is idle The device acts as the second switching device, wherein the forwarding port is a port capable of forwarding the first data according to the destination address of the first data.
结合第一方面或第一方面以上任一种可能的实现方式,在第一方面第五种可能的实现方式中,所述第二交换设备还用于按照预设的周期检查所述存储设备是否存在数据。With reference to the first aspect or any of the above possible implementation manners of the first aspect, in a fifth possible implementation manner of the first aspect, the second switching device is further configured to check whether the storage device is Data exists.
结合第一方面或第一方面以上任一种可能的实现方式,在第一方面第六种可能的实现方式中,所述第二交换设备支持电分组交换和光电路交换;如果所述存储设备还存有第二数据,且所述第二数据的目的地址与所述第一数据的目的地址相同,所述第二交换设备还用于将所述第一数据和所述第二数据合并,并采用光电路交换的方式将合并后的所述第一数据和所述第二数据转发。With reference to the first aspect or any of the above possible implementation manners of the first aspect, in a sixth possible implementation manner of the first aspect, the second switching device supports electrical packet switching and optical circuit switching; if the storage device further There is second data, and the destination address of the second data is the same as the destination address of the first data, the second switching device is further configured to combine the first data and the second data, and The combined first data and the second data are forwarded by means of optical circuit switching.
第二方面,本发明实施例提供了一种数据转发的方法,第一交换设备和第二交换设备分别与存储设备连接,包括:所述第一交换设备接收数据;所述第一交换设备根据自身负载情况,将所述数据写入所述存储设备,以使得所述第二交换设备对所述数据进行转发。In a second aspect, an embodiment of the present invention provides a data forwarding method. A first switching device and a second switching device are respectively connected to a storage device, including: the first switching device receives data; In the case of its own load, the data is written into the storage device, so that the second switching device forwards the data.
结合第二方面,在第二方面第一种可能的实现方式中,所述第一交换设备根据自身负载情况,将所述数据写入所述存储设备包括:所述第一交换设备的用于根据所述数据的目的地址转发所述数据的端口被占用,所述第一交换设备将所述数据写入所述存储设备。With reference to the second aspect, in a first possible implementation manner of the second aspect, the first switching device writing the data to the storage device according to its own load situation includes: The port forwarding the data according to the destination address of the data is occupied, and the first switching device writes the data into the storage device.
结合第二方面或第二方面以上任一种可能的实现方式,在第二方面第二种可能的实现方式中,所述第一交换设备根据自身负载情况,将所述数据写入所述存储设备包括:所述第一交换设备的用于根据所述数据的目的地址转发所述数据的端口被占用,且所述第一交换设备的缓存的剩余空间小于所述数据,所述第一交换设备将所述数据写入所述存储设备。In combination with the second aspect or any of the above possible implementation manners of the second aspect, in a second possible implementation manner of the second aspect, the first switching device writes the data into the storage according to its own load condition The device includes: a port of the first switching device for forwarding 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, the first switching device A device writes the data to the storage device.
结合第二方面或第二方面以上任一种可能的实现方式,在第二方面第三种可能的实现方式中,所述第一交换设备和所述第二交换设备分别与控制器连接,所述控制器用于维护与所述控制器连接的交换设备的状态信息;In combination with the second aspect or any of the above possible implementation manners of the second aspect, in a third possible implementation manner of the second aspect, the first switching device and the second switching device are respectively connected to the controller, so The controller is used to maintain the status information of the switching device connected to the controller;
所述方法还包括:所述第一交换设备向所述控制器发送通知消息,所述通知消息用于表明所述第一交换设备将所述数据写入所述存储设备。The method further includes: the first switching device sends a notification message to the controller, where the notification message is used to indicate that the first switching device writes the data into the storage device.
第三方面,本发明实施例提供了一种数据转发设备,包括:处理器、存储器、总线和通信接口;所述存储器用于存储执行指令,所述处理器与所述存储器通过所述总线连接,当所述数据转发设备运行时,所述处理器执行所述存储器存储的所述执行指令,以使所述数据转发设备执行第二方面或者第二方面任一种可能的实现方式所述的方法。In a third aspect, 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 used to store execution instructions, and the processor and the memory are connected through the bus , when the data forwarding device is running, the processor executes the execution instructions stored in the memory, so that the data forwarding device executes the second aspect or any possible implementation manner of the second aspect. method.
第四方面,本发明实施例提供了一种数据转发的方法,第一交换设备和第二交换设备分别与存储设备连接,包括:所述第二交换设备从所述存储设备取出第一数据,其中,所述第一数据由所述第一交换设备根据所述第一交换设备的负载情况写入所述存储设备;所述第二交换设备根据所述第一数据的目的地址将所述第一数据转发。In a fourth aspect, an embodiment of the present invention provides a data forwarding method, wherein a first switching device and a second switching device are respectively connected to a storage device, including: the second switching device fetches the first data from the storage device, The first data is written into the storage device by the first switching device according to the load of the first switching device; the second switching device writes the first data according to the destination address of the first data A data forwarding.
结合第四方面,在第四方面第一种可能的实现方式中,所述第一交换设备和所述第二交换设备分别与控制器连接,所述控制器用于维护与所述控制器连接的交换设备的状态信息;所述第二交换设备从所述存储设备取出第一数据之前还包括:所述第二交换设备接收来自所述控制器的指令消息,所述指令消息用于指示所述第二交换设备将所述第一数据从所述存储设备取出并转发。With reference to the fourth aspect, in a first possible implementation manner of the fourth aspect, the first switching device and the second switching device are respectively connected to a controller, and the controller is configured to maintain the State information of the switching device; before the second switching device fetches the first data from the storage device, the method further includes: the second switching device receives an instruction message from the controller, where the instruction message is used to instruct the The second switching device fetches and forwards the first data from the storage device.
结合第四方面或第四方面以上任一种可能的实现方式,在第四方面第二种可能的实现方式中,还包括:所述第二交换设备按照预设的周期检查所述存储设备是否存在数据。With reference to the fourth aspect or any of the above possible implementation manners of the fourth aspect, in a second possible implementation manner of the fourth aspect, the method further includes: the second switching device checks whether the storage device is Data exists.
结合第四方面或第四方面以上任一种可能的实现方式,在第四方面第三种可能的实现方式中,所述第二交换设备支持电分组交换和光电路交换;如果所述存储设备还存在第二数据,且所述第二数据的目的地址与所述第一数据的目的地址相同,所述方法还包括:所述第二交换设备将所述第一数据和所述第二数据合并,并采用光电路交换的方式将合并后的所述第一数据和所述第二数据转发。With reference to the fourth aspect or any of the above possible implementation manners of the fourth aspect, in a third possible implementation manner of the fourth aspect, the second switching device supports electrical packet switching and optical circuit switching; if the storage device also There is 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 merging the first data and the second data , and forward the combined first data and second data by means of optical circuit switching.
第五方面,本发明实施例提供了一种数据转发设备,包括:处理器、存储器、总线和通信接口;In a fifth aspect, 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 used for storing execution instructions, the processor and the memory are connected through the bus, and when the data forwarding device is running, the processor executes the execution instructions stored in the memory, so that all the execution instructions are executed. The data forwarding device executes the method described in the fourth aspect or any possible implementation manner of the fourth aspect.
第六方面,本发明实施例提供了一种数据转发的方法,第一交换设备和第二交换设备分别与控制器连接,所述控制器用于维护与所述控制器连接的交换设备的状态信息,包括:所述控制器接收来自所述第一交换设备的通知消息,所述通知消息用于表明所述第一交换设备将数据写入存储设备,其中,所述第一交换设备和所述第二交换设备分别与所述存储设备连接;所述控制器根据所述状态信息,确定所述第二交换设备;所述控制器向所述第二交换设备发送指令消息,所述指令消息用于指示所述第二交换设备将所述数据从所述存储设备取出并转发。In a sixth aspect, an embodiment of the present invention provides a data forwarding method. A first switching device and a second switching device are respectively connected to a controller, and the controller is configured to maintain state information of the switching devices connected to the controller. , including: 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 into 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 state information; the controller sends an instruction message to the second switching device, and the instruction message uses to instruct the second switching device to fetch and forward the data from the storage device.
结合第六方面,在第六方面第一种可能的实现方式中,所述状态信息包括与所述控制器连接的交换设备的端口的负载信息;所述控制器根据所述状态信息,确定所述第二交换设备包括:所述控制器从与所述控制器连接,且与所述存储设备连接的交换设备中确定转发端口空闲的交换设备作为所述第二交换设备,其中,所述转发端口为能够根据所述数据的目的地址转发所述数据的端口。With reference to the sixth aspect, in a first possible implementation manner of the sixth aspect, the status information includes load information of a port of a switching device connected to the controller; and the controller determines, according to the status information, the The second switching device includes: the controller determines, from among the switching devices connected to the controller and connected to the storage device, a switching device whose forwarding port is idle as the second switching device, wherein the forwarding The port is a port that can forward the data according to the destination address of the data.
第七方面,本发明实施例提供了一种数据转发设备,包括:处理器、存储器、总线和通信接口;所述存储器用于存储执行指令,所述处理器与所述存储器通过所述总线连接,当所述数据转发设备运行时,所述处理器执行所述存储器存储的所述执行指令,以使所述数据转发设备执行第六方面或者第六方面任一种可能的实现方式所述的方法。In a seventh aspect, 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 used to store execution instructions, and the processor and the memory are connected through the bus , when the data forwarding device is running, the processor executes the execution instructions stored in the memory, so that the data forwarding device executes the sixth aspect or any possible implementation manner of the sixth aspect. method.
第八方面,本发明实施例提供了一种数据转发的装置,所述装置和交换设备分别与存储设备连接,包括:接收单元,用于接收数据;处理单元,根据负载情况,将所述数据写入所述存储设备,以使得所述交换设备对所述数据进行转发。In an eighth aspect, an embodiment of the present invention provides a data forwarding device, the device and the switching device are respectively connected to the storage device, including: a receiving unit for receiving data; a processing unit for transferring the data according to a load condition Writing to the storage device causes the switching device to forward the data.
结合第八方面,在第八方面第一种可能的实现方式中,所述处理单元用于根据负载情况,将所述数据写入所述存储设备包括:所述装置用于根据所述数据的目的地址转发所述数据的端口被占用,所述处理单元用于将所述数据写入所述存储设备。With reference to the eighth aspect, in a first possible implementation manner of the eighth aspect, the processing unit configured to write the data into the storage device according to a load situation includes: the apparatus is configured to, according to the data The port through which the destination address forwards the data is occupied, and the processing unit is configured to write the data into the storage device.
结合第八方面或第八方面以上任一种可能的实现方式,在第八方面第二种可能的实现方式中,所述处理单元用于根据负载情况,将所述数据写入所述存储设备包括:所述装置用于根据所述数据的目的地址转发所述数据的端口被占用,且所述装置的缓存的剩余空间小于所述数据,所述处理单元用于将所述数据写入所述存储设备。With reference to the eighth aspect or any of the above possible implementation manners of the eighth aspect, in a second possible implementation manner of the eighth aspect, the processing unit is configured to write the data into the storage device according to a load situation Including: the port used by the device to forward the data according to the destination address of the data is occupied, and the remaining space of the cache of the device is smaller than the data, and the processing unit is configured to write the data into the data. the storage device.
结合第八方面或第八方面以上任一种可能的实现方式,在第八方面第三种可能的实现方式中,所述装置和所述交换设备分别与控制器连接,所述控制器用于维护与所述控制器连接的所述交换设备的状态信息;所述装置还包括发送单元,所述发送单元用于向控制器发送通知消息,所述通知消息用于表明所述装置将所述数据写入所述存储设备。With reference to the eighth aspect or any of the above possible implementation manners of the eighth aspect, in a third possible implementation manner of the eighth aspect, the apparatus and the switching device are respectively connected to a controller, and the controller is used for maintenance status information of the switching equipment connected to the controller; the apparatus further includes a sending unit, the sending unit is configured to send a notification message to the controller, and the notification message is used to indicate that the apparatus sends the data write to the storage device.
第九方面,本发明实施例提供了一种数据转发的装置,所述装置和交换设备分别与存储设备连接,包括:获取单元,用于从所述存储设备取出第一数据,其中,所述第一数据由所述交换设备根据所述交换设备的负载情况写入所述存储设备;转发单元,用于根据所述第一数据的目的地址将所述第一数据转发。In a ninth aspect, an embodiment of the present invention provides an apparatus for forwarding data, the apparatus and the switching device are respectively connected to a storage device, and include: an obtaining unit configured to retrieve first data from the storage device, wherein the The first data is written into the storage device by the switching device according to the load condition of the switching device; the forwarding unit is configured to forward the first data according to the destination address of the first data.
结合第九方面,在第九方面第一种可能的实现方式中,所述交换设备和所述装置分别与控制器连接,所述控制器用于维护与所述控制器连接的所述装置的状态信息;所述装置还包含接收单元,所述接收单元用于接收来自所述控制器的指令消息,所述指令消息用于指示所述装置将所述第一数据从所述存储设备取出并转发。With reference to the ninth aspect, in a first possible implementation manner of the ninth aspect, the switching device and the device are respectively connected to a controller, and the controller is configured to maintain the state of the device connected to the controller information; the apparatus 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 apparatus to fetch and forward the first data from the storage device .
结合第九方面或第九方面以上任一种可能的实现方式,在第九方面第二种可能的实现方式中,所述装置还包含检查单元,所述检查单元用于按照预设的周期检查所述存储设备是否存在数据。With reference to the ninth aspect or any of the above possible implementations of the ninth aspect, in a second possible implementation of the ninth aspect, the device further includes a checking unit, and the checking unit is configured to check according to a preset period Whether data exists in the storage device.
结合第九方面或第九方面以上任一种可能的实现方式,在第九方面第三种可能的实现方式中,所述转发单元支持电分组交换和光电路交换;如果所述存储设备还存在第二数据,且所述第二数据的目的地址与所述第一数据的目的地址相同,所述获取单元还用于从所述存储设备取出所述第二数据,所述转发单元还用于将所述第一数据和所述第二数据合并,并采用光电路交换的方式将合并后的所述第一数据和所述第二数据转发。With reference to the ninth aspect or any of the above possible implementation manners of the ninth aspect, in a third possible implementation manner of the ninth aspect, the forwarding unit supports electrical packet switching and optical circuit switching; second data, and the destination address of the second data is the same as the destination address of the first data, the obtaining unit is further configured to retrieve 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 combined first data and the second data are forwarded by means of optical circuit switching.
第十方面,本发明实施例提供了一种数据转发的装置,第一交换设备和第二交换设备分别与所述装置连接,所述装置用于维护与所述控制器连接的交换设备的状态信息,包括:接收单元,用于接收来自所述第一交换设备的通知消息,所述通知消息用于表明所述第一交换设备将数据写入存储设备,其中,所述第一交换设备和所述第二交换设备分别与所述存储设备连接;确定单元,用于根据所述状态信息,确定所述第二交换设备;发送单元,用于向所述第二交换设备发送指令消息,所述指令消息用于指示所述第二交换设备将所述数据从所述存储设备取出并转发。In a tenth aspect, an embodiment of the present invention provides an apparatus for forwarding data. A first switching device and a second switching device are respectively connected to the apparatus, and the apparatus is used to maintain the state of the switching device connected to the controller. information, including: 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 into a storage device, wherein the first switching device and The second switching device is respectively connected with the storage device; the determining unit is configured to determine the second switching device according to the status information; the sending unit is configured to send an instruction message to the second switching device, the The instruction message is used to instruct the second switching device to fetch and forward the data from the storage device.
结合第十方面,在第十方面第一种可能的实现方式中,所述状态信息包括与所述装置连接的交换设备的端口的负载信息;所述确定单元用于根据所述状态信息,确定所述第二交换设备包括:所述确定单元用于从与所述装置连接,且与所述存储设备连接的交换设备中确定转发端口空闲的交换设备作为所述第二交换设备,其中,所述转发端口为能够根据所述数据的目的地址转发所述数据的端口。With reference to the tenth aspect, in a first possible implementation manner of the tenth aspect, the state information includes load information of a port of a switching device connected to the apparatus; the determining unit is configured to determine, according to the state information, The second switching device includes: the determining unit is configured to determine, from among the switching devices connected to the device and connected to the storage device, a switching device whose forwarding port is idle as the second switching device, wherein the The forwarding port is a port that can forward the data according to the destination address of the data.
根据本发明实施例公开的技术方案,通过给至少两个交换设备增加共同的存储设备,当忙的交换设备负载较大时,将接收到的数据写入该存储设备中,空闲的交换设备去该存储设备中取出数据,并对数据进行转发,从而实现了至少两个交换设备的负载均衡,降低了发生网络拥塞的风险,并使数据得到及时的转发,降低了数据的传输时延。According to the technical solution disclosed in the embodiment of the present invention, by adding a common storage device to at least two switching devices, when the busy switching device has a heavy load, the received data is written into the storage device, and the idle switching device goes to the storage device. The storage device retrieves data and forwards the data, thereby realizing load balancing of at least two switching devices, reducing the risk of network congestion, enabling data to be forwarded in time, and reducing data transmission delay.
附图说明Description of drawings
为了更清楚地说明本发明实施例的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to illustrate the technical solutions of the embodiments of the present invention more clearly, the following briefly introduces the accompanying drawings used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without any creative effort.
图1为一种数据转发系统的示例性联网环境框图;1 is a block diagram of an exemplary networking environment of a data forwarding system;
图2为本发明的示例性存储设备的示意图;2 is a schematic diagram of an exemplary storage device of the present invention;
图3为依据本发明一实施例的数据转发系统的结构示意图;3 is a schematic structural diagram of a data forwarding system according to an embodiment of the present invention;
图4为依据本发明一实施例的数据转发方法的示范性流程图;4 is an exemplary flowchart of a data forwarding method according to an embodiment of the present invention;
图5为依据本发明一实施例的数据转发方法的示范性流程图;5 is an exemplary flowchart of a data forwarding method according to an embodiment of the present invention;
图6为依据本发明一实施例的数据转发方法的示范性流程图;6 is an exemplary flowchart of a data forwarding method according to an embodiment of the present invention;
图7为依据本发明一实施例的数据转发装置的逻辑结构示意图;7 is a schematic diagram of a logical structure of a data forwarding apparatus according to an embodiment of the present invention;
图8为依据本发明一实施例的数据转发装置的逻辑结构示意图;8 is a schematic diagram of a logical structure of a data forwarding apparatus according to an embodiment of the present invention;
图9为依据本发明一实施例的数据转发装置的逻辑结构示意图;9 is a schematic diagram of a logical structure of a data forwarding apparatus according to an embodiment of the present invention;
图10为依据本发明一实施例的数据转发装置硬件结构示意图。10 is a schematic diagram of a hardware structure of a data forwarding apparatus according to an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
图1为一种数据转发系统的示例性联网环境框图。其中,网络节点A、B、C、D、E、F、G和H通过交换设备1、交换设备2、交换设备3和交换设备4相互互联。FIG. 1 is a block diagram of an exemplary networking environment of a data forwarding system. Wherein, the network nodes A, B, C, D, E, F, G and H are interconnected through the
为了描述方便,在以下描述中,交换设备1、交换设备2、交换设备3和交换设备4统称为交换设备,在无特别说明的情况下,交换设备是指功能与交换设备1、交换设备2、交换设备3和交换设备4相同或类似的交换设备。For the convenience of description, in the following description, switching
图1仅仅是一个示例性联网环境框图,并不试图对本发明实施例进行任何的限定,例如在具体实现中,交换设备可以连接两个或两个以上图1所示的网络节点。FIG. 1 is only a block diagram of an exemplary networking environment, and does not attempt to limit any embodiment of the present invention. For example, in a specific implementation, a switching device may connect two or more network nodes shown in FIG. 1 .
其中,图1中的网络节点和交换设备可以通过因特网、内联网、局域网(LANs)、广域网络(WANs)、存储区域网络(SANs)或其他连接方式,或者以上网络的组合进行连接。交换设备包括但不限于路由器、交换机等。The network nodes and switching devices in FIG. 1 may be connected through the Internet, an intranet, local area networks (LANs), wide area networks (WANs), storage area networks (SANs), or other connection methods, or a combination of the above networks. Switching devices include, but are not limited to, routers, switches, and the like.
可选的,网络节点A可以是一个节点群,其内部可以包含多台网络地址为210.10.10.0,掩码为255.255.255.0的节点,节点之间还可以通过交换设备相互互联。同理,网络节点B、C、D、E、F、G或H内部也分别可以包含多台网络地址与网络节点对应的节点,以及多个连接不同节点的交换设备,其中节点可以是虚拟机或者计算设备。Optionally, the network node A may be a node group, which 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 through a switching device. Similarly, network nodes B, C, D, E, F, G, or H may also contain multiple nodes with network addresses corresponding to the network nodes, and multiple switching devices connecting different nodes, where the nodes may be virtual machines. or computing equipment.
可选的,网络节点A、B、C、D、E、F、G和H的仅仅是示范性说明,也可以用网络节点A、B、C、D、E、F、G或H分别代表不同互联网协议(Internet Protocol,简称IP)地址的一个计算设备或虚拟机,本发明实施例并不对此进行限定。Optionally, the network nodes A, B, C, D, E, F, G, and H are merely illustrative, and may also be represented by network nodes A, B, C, D, E, F, G, or H, respectively. A computing device or virtual machine with different Internet Protocol (Internet Protocol, IP for short) addresses is not limited in this embodiment of the present invention.
交换设备一般使用查找表(路由表)对数据进行转发,查找表的每个表条目包括匹配域和动作域两部分。匹配域包括网络标识,或包含网络标识和掩码,用于实现查表时的条目匹配。其中,网络标识可以是任意地址标签,一般的表示形式可以为A1.A2.....An;掩码为前缀连续掩码。动作域包含数据包操作信息,一般至少包括输出端口信息。The switching device generally uses a lookup table (routing table) to forward data, and each table entry of the lookup table includes two parts: a matching field and an action field. The matching field includes a network ID, or includes a network ID and a mask, and is used to implement entry matching during table lookup. Among them, the network identifier can be any address label, and the general representation form can be A1.A2.....An; the mask is a prefix continuous mask. The action field contains data packet operation information, generally including at least output port information.
所述网络标识包括但不限于IP地址、媒体访问控制(Media Access Control,简称MAC)地址等。The network identifier includes, but is not limited to, an IP address, a media access control (Media Access Control, MAC for short) address, and the like.
表1是交换设备1的示范性查找表,表1仅仅是为了描述方便,示范性的表示出交换设备1的查找表,但本发明实施例并不试图对此进行限定,具体实现的时候,根据交换设备1或网络拓扑的不同,表1可以有更多或者更少的特征,或则其他的实现形式,例如在软件定义网络(Software Defined Network,SDN)网络中,查找表的形式可以是流表项。Table 1 is an exemplary look-up table of the
表1Table 1
如表1所示,其条目的匹配域包括网络标识和掩码,用于实现查表时的条目匹配;动作域包括输出端口信息,用于数据的转发。在本实施例中,交换设备1采用最长前缀匹配技术对数据包进行转发,该技术通过聚合具有相同网络标识前缀和输出的查找表条目实现查找表的压缩,在接收到数据包后,通过最长前缀匹配技术实现匹配条目的查找。As shown in Table 1, the matching field of the entry includes the network identifier and mask, which is used to realize the entry matching when looking up the table; the action field includes the output port information, which is used for data forwarding. In this embodiment, the
如图1所示,假设在某一时刻,交换设备1接收到网络节点A发送的数据包后,从数据包提取数据包的目的节点的IP地址信息,目的IP地址为100.50.10.6,根据表1所示的查找表,基于匹配条件“(目的地址&掩码)==(网络标识&掩码)”执行路由查找,从表1查找与目的IP地址匹配的条目。如果存在匹配的表条目,从所有匹配的表条目中选择具有最长网络标识前缀的条目作为最终匹配条目,如果没有匹配条目,则执行网络设备设定的默认操作。如表1所示,查找表的第4个表条目与IP地址匹配,且为唯一匹配的路由条目,选择第4个表条目作为最终匹配条目,从最终匹配的表条目中提取输出端口等信息,来为数据包处理(比如,转发)提供依据。在图1中,交换设备1将从网络节点A接收的数据包从端口3转发出去,从而实现数据包的路由。As shown in Figure 1, it is assumed that at a certain time, after receiving the data packet sent by network node A,
根据图1所示的系统,在系统的数据流量不大的情况下,可以实现数据的顺利转发。随着网络数据流量的爆炸性增长,通讯网络的数据流量迅速增长,例如,在某一时间段,需要在网络节点A和网络节点G之间进行大量的数据交互,这对交换设备1处理能力提出了巨大挑战,可能交换设备1因为负载过大,引起网络拥塞,甚至导致数据包的丢失等问题。According to the system shown in FIG. 1 , in the case that the data traffic of the system is not large, the smooth forwarding of data can be realized. With the explosive growth of network data traffic, the data traffic of the communication network grows rapidly. For example, in 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 capacity of the
图2为依据为本发明一实施例的数据转发系统的示例性联网环境框图。如图2所示,相比于图1所示的系统,图2所示的系统在交换设备1和交换设备2之间增加一个存储设备1,存储设备1用于缓存与其连接的交换设备接收到的数据。FIG. 2 is a block diagram of an exemplary networking environment of a data forwarding system according to an embodiment of the present invention. As shown in FIG. 2 , compared with the system shown in FIG. 1 , the system shown in FIG. 2 adds a
存储设备1的存储介质包括易失性和非易失性的,可移动的和不可移动的,在任何方法或技术中实现的用来存储诸如计算机可读指令、数据结构、程序模块或其它数据等信息的介质,包括,但不限于,RAM、ROM、EEPROM、闪存、其他的存储器技术,CD-ROM、数字通用盘、其他的光存储,磁卡带、磁带、磁盘存储、其他的磁存储设备,以及任何其他可以用来存储所需信息并可由交换设备访问的存储介质。The storage media of the
可选的,交换设备可以为数据中心中的柜顶(Top of Rack,ToR)交换机,处于机柜的柜顶,并连接多台服务器。以网络节点A进行举例说明,网络节点A为拥有多台服务器的机柜。Optionally, the switching device may be a top of rack (Top of Rack, ToR) switch in the data center, located on the top of the cabinet, and connected to multiple servers. Taking the network node A as an example, the network node A is a cabinet with multiple servers.
可选的,机柜中的服务器上可以运行着多个虚拟机,每一个虚拟机拥有一个IP地址;机柜中的服务器也可以作为一个独立的主机,拥有一个IP地址。应了解,服务器的种类和用途多种多样,本发明实施例并不对此进行限定。一个机柜中的多台服务器构成了一个网络,例如,网络节点A为多个网络地址为210.10.10.0,掩码为255.255.255.0的服务器或虚拟机构成的网络。Optionally, multiple virtual machines may be running on the server in the cabinet, and each virtual machine has an IP address; the server in the cabinet may also serve as an independent host and have an IP address. It should be understood that there are various types and uses of servers, which are not limited in this embodiment of the present invention. Multiple servers in a cabinet form a network. For example, network node A is a network formed by multiple servers or virtual machines with network addresses of 210.10.10.0 and masks of 255.255.255.0.
可选的,每一个网络节点中包含多台网络地址相同的节点,交换设备为连接多个网络节点群的交换机或路由器。以网络节点A进行举例说明,网络节点A中包含多台网络地址相同、但主机地址不同的节点,即IP地址在210.10.10.1~210.10.10.254范围内的节点。节点具体可以为计算设备。Optionally, each network node includes multiple nodes with the same network address, and the switching device is a switch or router connecting multiple network node groups. Taking network node A as an example, network node A includes multiple nodes with the same network address but different host addresses, that is, nodes with IP addresses in the range of 210.10.10.1 to 210.10.10.254. The node may specifically be a computing device.
可选的,网络节点A、B、C、D、E、F、G和H的仅仅是示范性说明,也可以用网络节点A、B、C、D、E、F、G或H分别代表不同IP地址的一个计算设备,本发明实施例并不对此进行限定。Optionally, the network nodes A, B, C, D, E, F, G, and H are merely illustrative, and may also be represented by network nodes A, B, C, D, E, F, G, or H, respectively. A computing device with different IP addresses, which is not limited in this embodiment of the present invention.
为了描述方便,仍以表1所示的查找表进行举例,在某一时刻,交换设备1接收到来自网络节点A的第一数据,第一数据携带第一数据的目的地址。For the convenience of description, the lookup table shown in Table 1 is still used as an example. At a certain moment, the
可选的,交换设备1接收到第一数据以后,确定自身负载情况,如果自身负载情况大于预设的某一阈值,则交换设备1将第一数据写入与其连接的存储设备1。Optionally, after receiving the first data, the
具体而言,在本发明实施例中,可以使用单位时间内转发的数据量大小(吞吐率)表征交换设备1的负载情况,将交换设备1的通信连接的生存期进行周期划分,例如将生存期划分为等长的时间片,用一个时间片的数据吞吐量除以时间片的长度得到这个时间片的吞吐率。最近的一个时间片的交换设备的吞吐率大小表征了交换设备1的负载情况。需要说明的是,此处的时间片的长度可由人为配置指定,通常来说其取值应该能够及时反映交换设备负载的变化。Specifically, in the embodiment of the present invention, the amount of data forwarded per unit time (throughput rate) can be used to characterize the load of the
需要说明的是,交换设备的吞吐率只是衡量交换设备的负载强度的一种方式,本发明实施例允许使用其它能够表征交换设备的负载强度的指标进行替换。It should be noted that the throughput rate of the switching device is only a way to measure the load intensity of the switching device, and the embodiment of the present invention allows other indicators that can characterize the load intensity of the switching device to be used for substitution.
可选的,交换设备1接收到第一数据以后,判断自身的转发端口的负载情况,如果转发端口的负载情况大于预设的某一阈值,则交换设备1将第一数据写入与其连接的存储设备1,其中转发端口为能够根据所述第一数据的目的地址转发所述第一数据的端口。为了描述方便,在本发明实施例中,如无特殊说明,转发端口特指能够根据所述第一数据的目的地址转发所述第一数据的端口。Optionally, after receiving the first data, the
具体而言,在本发明实施例中,可以使用归一化吞吐率表征转发端口的负载强度。归一化吞吐率为转发端口在单位时间内,转发端口单位带宽上传输的数据量。当使用归一化吞吐率表征转发端口的负载强度时,转发端口的归一化吞吐率可以通过以下方式统计得到:将转发端口的通信连接的生存期进行周期划分,例如将生存期划分为等长的时间片。独立统计每个时间片内转发端口已发送的数据量,并且将该数据量除以整个时间片长度得到当前时间片内平均吞吐率。为了便于设置阈值并与之比较,通常将吞吐率进一步表示为归一化的形式,即将吞吐率除以转发端口带宽,得到一个0和1之间的值,作为归一化吞吐率。需要说明的是,此处的时间片的长度可由人为配置指定,通常来说其取值应该能够及时反映转发端口负载的变化。Specifically, in this embodiment of the present invention, the normalized throughput rate may be used to characterize the load intensity of the forwarding port. The normalized throughput rate is the amount of data transmitted by the forwarding port in unit time and per unit bandwidth. When the normalized throughput rate is used to characterize the load intensity of the forwarding port, the normalized throughput rate of the forwarding port can be obtained by statistics in the following ways: dividing the lifetime of the communication connection of the forwarding port periodically, for example, dividing the lifetime into long time slice. Independently count the amount of data sent by the forwarding port in each time slice, and divide the data amount by the length of the entire time slice to obtain the average throughput rate in the current time slice. In order to set the threshold and compare with it, the throughput rate is usually further expressed in normalized form, that is, the throughput rate is divided by the forwarding port bandwidth, and a value between 0 and 1 is obtained as the normalized throughput rate. It should be noted that the length of the time slice here can be specified by human configuration, and generally speaking, its value should be able to reflect the change of the forwarding port load in time.
转发端口的归一化吞吐率的具体计算可以举例如下:假设时间片长度为L,转发端口在当前时间片内已发送的数据量为C,网络接口带宽为B,则转发端口的归一化吞吐率R为C/(L×B)。The specific calculation of the normalized throughput rate of the forwarding port can be as follows: Assuming that the time slice length is L, the amount of data sent by the forwarding port in the current time slice is C, and the network interface bandwidth is B, then the normalization of the forwarding port The throughput rate R is C/(L×B).
需要说明的是,转发端口的归一化吞吐率只是衡量转发端口的负载强度的一种方式,本发明实施例允许使用其它能够表征转发端口的负载强度的指标进行替换。It should be noted that the normalized throughput rate of the forwarding port is only a way to measure the load strength of the forwarding port, and the embodiment of the present invention allows to use other indicators that can characterize the load strength of the forwarding port for substitution.
可选的,交换设备1接收到第一数据后,判断转发端口是否空闲,如果空闲,则直接从该转发端口中将第一数据转发,如果转发端口被占用,则交换设备1将第一数据写入存储设备1。Optionally, after receiving the first data, the
可选的,交换设备1接收到第一数据后,判断转发端口是否空闲,如果空闲,则直接从该端口中将第一数据转发,如果转发端口被占用,交换设备1还可以查看自身缓存的剩余空间,如果自身的缓存的剩余空间大于第一数据的大小,则交换设备1将第一数据写入自身缓存中,如果自身缓存的剩余空间小于第一数据的大小,则交换设备1将第一数据写入存储设备1。Optionally, after receiving the first data, the
可选的,交换设备1接收到第一数据后,判断转发端口是否空闲,如果空闲,则直接从该端口中将第一数据转发,如果转发端口被占用,交换设备1还可以查看自身缓存中对应转发端口的缓存队列中数据的大小,如果对应转发端口的缓存队列中数据的大小大于预设的阈值,则交换设备1将第一数据写入存储设备1。Optionally, after receiving the first data, the
具体而言,交换设备1的转发端口可以是1个或大于1的正整数个,本发明实施例对此并不进行限定。Specifically, the forwarding port of the
应了解,以上仅仅是对交换设备1何时将第一数据写入存储设备1进行举例性说明,交换设备1将第一数据写入存储设备1的判断依据多种多样,本发明实施例仅仅是做出了举例说明,并不试图对此进行限定。It should be understood that the above is only an exemplary description of when the
交换设备1接收到第一数据以后,从第一数据提取第一数据的目的节点的IP地址信息,假设第一数据的目的IP地址为100.50.10.6,根据表1所示的查找表,基于匹配条件“(目的地址&掩码)==(网络标识&掩码)”执行路由查找,从表1查找与目的IP地址匹配的条目。如表1所示,查找表的第4个表条目与IP地址匹配,且为唯一匹配的路由条目,交换设备1应该从端口3将该第一数据转发。如果此时交换设备1的端口3空闲,交换设备1将该第一数据从端口3转发。After receiving the first data, the
可选的,如果交换设备1的端口3正在被占用,则交换设备1直接将该第一数据写入与其相连的存储设备1。Optionally, if the
可选的,如果此时的交换设备1的端口3正在被占用,交换设备1分析第一数据的包头,对第一数据的大小进行识别,并检查交换设备1自身缓存的剩余空间大小,如果自身缓存的剩余空间大于该第一数据的大小,交换设备1将该第一数据存入自身缓存;如果交换设备1的自身缓存的剩余空间小于该第一数据的大小,则交换设备1将该第一数据写入与其相连的存储设备1;如果交换设备1的自身缓存的剩余空间等于该第一数据的大小,交换设备可以选择将该第一数据写入自身缓存或者与其相连的存储设备1。Optionally, if the
可选的,与存储设备1连接的交换设备中负载小于某一阈值或者空闲的交换设备会按照一个预设的周期T去检查存储设备1中是否有数据存在,如果发现存储设备1中有数据存在,且自身能够实现该数据的转发,则从存储设备1中取出该数据,并对该数据进行转发。Optionally, among the switching devices connected to the
在本发明实施例中,假设与存储设备1连接的交换设备2空闲或其负载小于某一预设的阈值,交换设备2会按照预设的周期T去检查存储设备1中是否有数据存在。In this embodiment of the present invention, assuming that the
在某一次检查中,交换设备2发现存储设备1中存在该第一数据,交换设备2判断自身是否能够转发该第一数据的,如果交换设备2可以转发该第一数据,且交换设备2的转发端口空闲,则交换设备2从存储设备1中取出该第一数据,并对该第一数据进行转发。During a certain inspection, the
如果交换设备2的转发端口被占用,但该端口的负载小于预设的阈值,则交换设备2也可以取出第一数据,并把第一数据写入自身的缓存中,等待该转发端口空闲后,将所述第一数据转发。If the forwarding port of the
具体而言,交换设备2可以用其转发端口的缓存队列中数据的大小来表示转发端口的负载情况。Specifically, the
可选的,所述交换设备2支持电分组交换和光电路交换,如果所述存储设备1还存有第二数据,且所述第二数据的目的地址与所述第一数据的目的地址相同,所述交换设备2还用于将所述第一数据和所述第二数据合并,并采用光电路交换的方式将合并后的所述第一数据和所述第二数据转发。Optionally, the
可选的,交换设备1和交换设备2还连接同一个控制器(图中未示出),该控制器用于维护与其连接的交换设备的状态信息和网络拓扑,具体而言,状态信息包括但不限于负载情况。Optionally, the
交换设备1将第一数据写入存储设备1之后(或之前)还用于向该控制器发送通知消息,通知消息用于表明交换设备1将第一数据写入存储设备1中,以便控制器选取合适的交换设备对该第一数据转发。After (or before) the
控制器接收到通知消息后,根据网络拓扑确定与存储设备1连接的交换设备,并根据自身维护的状态信息,确定用于转发该第一数据的交换设备,并向其发送指令消息,指示其将第一数据从存储设备1中取出并转发。After receiving the notification message, the controller determines the switching device connected to the
可选的,控制器维护的所述状态信息包括与所述控制器连接的交换设备的端口的负载信息,所述控制器用于从与所述控制器连接,且与所述存储设备1连接的交换设备中确定转发端口空闲的交换设备用于转发第一数据,其中,所述转发端口为能够根据所述第一数据的目的地址转发所述第一数据的端口。Optionally, the state information maintained by the controller includes the load information of the port of the switching device connected to the controller, and the controller is used for slave devices connected to the controller and connected to the
可选的,如果与所述控制器连接,且与所述存储设备1连接的交换设备中,没有转发端口空闲的交换设备,则控制器选取转发端口的负载小于预设的阈值的交换设备用于转发该第一数据。Optionally, if it is connected to the controller and there is no switching device whose forwarding port is idle among the switching devices connected to the
具体而言,可以用转发端口的缓存队列中数据的大小来表示转发端口的负载,还可以用转发端口的吞吐率表示该转发端口的负载。转发端口的负载的表现形式多种多样,本发明实施例并不对此进行限定。Specifically, the size of the data in the buffer queue of the forwarding port can be used to represent the load of the forwarding port, and the throughput rate of the forwarding port can also be used to represent the load of the forwarding port. The load of the forwarding port has various expressions, which are not limited in this embodiment of the present invention.
应了解,控制器选择用于转发第一数据的交换设备的选择依据多种多样,本发明实施例仅仅是进行了举例说明,还可以有其他实现形式。本发明实施例并不对此进行限定,允许使用其它选择依据进行替换。It should be understood that the selection basis of the switching device for forwarding the first data by the controller is various, and the embodiment of the present invention is only for illustration, and other implementation forms are also possible. This embodiment of the present invention does not limit this, and other selection basis is allowed to be used for substitution.
在本发明实施例中,假设控制器从与其连接的交换设备中确定交换设备2,则控制器向交换设备2发送指令消息,指示交换设备2将所述第一数据从所述存储设备1取出并转发。交换设备2接收到指令消息后,去存储设备1取出第一数据,并根据第一数据的目的地址,将第一数据转发。In this embodiment of the present invention, assuming that the controller determines the
可选的,所述交换设备2支持电分组交换和光电路交换,如果控制器接收到通知消息指示,所述存储设备1中还包含第二数据,且第一数据的目的地址与第二数据的目的地址相同,所述控制器还用于在指令信息中指示交换设备2将所述第一数据和所述第二数据合并,并采用光电路交换的方式将合并后的所述第一数据和所述第二数据转发。Optionally, the
应了解,在方案具体实现的过程中,如果在某一时刻交换设备1将无法转发的数据写入存储设备1,且与存储设备1连接的其他交换设备也无法转发该数据,则在下一时刻,有能力转发该数据的交换设备从存储设备1中取出数据,并将该数据转发,该有能力转发该数据的交换设备可以是交换设备1。It should be understood that during the specific implementation of the solution, if at a certain moment the
应理解,有能力转发该数据的交换设备可以是空闲或者负载不大于预设的阈值的交换设备。It should be understood that the switching device capable of forwarding the data may be an idle switching device or a switching device whose load is not greater than a preset threshold.
在具体实现过程中,存储设备1还可以与网络节点A、B、C或者D相连接,网络节点A、B、C或者D要通过交换设备1或者交换设备2转发的数据,可以直接写入存储设备1,由与存储设备1相连接的交换设备中有能力转发该数据的交换设备去存储设备1中取出该数据,并对数据进行转发。根据本发明实施例公开的技术方案,通过给交换设备1和交换设备2增加共同的存储设备,交换设备1无法及时转发接收到的数据时,可以将该数据写入该存储设备中,空闲或者负载较小的交换设备2去该存储设备中取出数据,并对数据进行转发,从而实现了交换设备1和交换设备2之间的负载均衡,降低了发生网络拥塞的风险,并使数据得到及时的转发,降低了数据的传输时延。In the specific implementation process, the
图3为依据本发明一实施例的数据转发系统300的结构示意图,系统300应用于数据中心网络,如图3所示,系统300包括网络302、控制器304、第一交换设备306、存储设备308、第二交换设备310和机柜312。3 is a schematic structural diagram of a
其中第一交换设备306和第二交换设备310为柜顶(Top of Rack,ToR)交换机,位于机柜312的柜顶,机柜312内部包含至少一个服务器。位于机柜312中的服务器上可以运行着至少一个虚拟机。The
第一交换设备306用于转发与其连接的机柜312中的服务器或者虚拟机的数据,第二交换设备310用于转发与其连接的机柜312中的服务器或者虚拟机的数据。The
第一交换设备306和第二交换设备310分别与存储设备308相连,存储设备308用于存储与其连接的交换设备当前无法转发的数据。即与存储设备308连接的交换设备判断当前无法转发接收到的数据,则会将无法转发的数据写入存储设备308。The
第一交换设备306和第二交换设备310分别与控制器304连接,控制器304用于维护与其连接的交换设备之间的网络拓扑,以及与其连接的交换设备的状态信息,其中状态信息包括交换设备的端口负载情况。The
第一交换设备306用于从与其连接的机柜312中的服务器或者虚拟机中接收第一数据,第一数据中携带第一数据的目的地址。The
可选的,第一交换设备306判断自身当前的负载情况,确定负载是否大于预设的阈值,如果负载不大于预设的阈值,则第一交换设备306根据第一数据的目的地址将第一数据转发;如果负载大于预设的阈值,则第一交换设备306将第一数据写入存储设备308。Optionally, the
可选的,第一交换设备306判断自身当前的负载情况,确定负载是否大于预设的阈值,如果负载不大于预设的阈值,则第一交换设备306根据第一数据的目的地址将第一数据转发;如果负载大于预设的阈值,判断第一交换设备306的缓存剩余空间大小,如果第一交换设备306的缓存剩余空间大小小于第一数据大小,则第一交换设备306将第一数据写入存储设备308。Optionally, the
可选的,负载情况包括第一交换设备306的吞吐率。Optionally, the load condition includes the throughput rate of the
可选的,所述负载情况包括转发端口的负载情况,其中,所述转发端口为能够根据所述第一数据的目的地址转发所述第一数据的端口。具体的,可以用转发端口的吞吐率表示转发端口的负载情况,也可以用转发端口对应的缓存队列中数据量的大小表示转发端口的负载情况。Optionally, the load condition includes a load condition of a forwarding port, where the forwarding port is a port that can forward the first data according to the destination address of the first data. Specifically, the throughput of the forwarding port may be used to represent the load of the forwarding port, and the size of the data amount in the buffer queue corresponding to the forwarding port may also be used to represent the load of the forwarding port.
应理解,负载情况的表现形式多种多样,本发明实施例仅仅是做出举例说明,并不对此进行限定。It should be understood that there are various manifestations of the load situation, and the embodiments of the present invention are only for illustration, and are not limited thereto.
第一交换设备306将第一数据写入存储设备308后,还用于向控制器310发送通知消息,该通知消息用于表明所述第一交换设备306将所述第一数据写入所述存储设备308中。After the
控制器308根据自身维护的与其连接的交换设备的网络拓扑和状态信息,确定所述第二交换设备312,并向所述第二交换设备312发送指令消息,所述指令消息用于指示所述第二交换设备312将所述第一数据从所述存储设备308取出并转发。The
可选的,所述控制器308用于根据所述状态信息,确定所述第二交换设备312包括:所述控制器308用于从与所述控制器308连接,且与所述存储设备连接的交换设备中确定空闲或负载小于预设的阈值的交换设备作为所述第二交换设备312。Optionally, the
可选的,所述状态信息包括与所述控制器308连接的交换设备的端口的负载信息;所述控制器308用于根据所述状态信息,确定所述第二交换设备312包括:所述控制器308用于从与所述控制器308连接,且与所述存储设备310连接的交换设备中确定转发端口空闲或转发端口负载小于预设的阈值的交换设备作为所述第二交换设备312,其中,所述转发端口为能够根据所述第一数据的目的地址转发所述第一数据的端口。Optionally, the status information includes load information of a port of a switching device connected to the
可选的,第一交换设备306支持电分组交换(Electronic Packet Switching,EPS)和光电路交换(Optical Circuit Switching,OCS)。Optionally, the
第一交换设备306从与其连接的机柜312接收到第一数据,并对第一数据的包头进行分析,判断数据流的大小,如果第一数据的大小大于预设的阈值,则判定第一数据是大象流,如果第一数据是大象流,则优先采用OCS的方式对第一数据进行转发。The
第一交换设备306确定使用OCS进行数据转发后,会建立与第一数据目的地址之间的光电路,如果光电路建立成功,则使用OCS的方式将第一数据直接转发至第一数据的目的地址。After the
因为在通讯网络中,有可能会发生建立光电路失败的情况,如果第一交换设备306无法建立与第一数据的目的地址之间的光电路,则第一交换设备306选择EPS的方式对数据进行转发。Because in the communication network, it may happen that the establishment of the optical circuit fails. If the
如果第一数据的大小不大于预设的阈值,则判定第一数据为老鼠流,则第一交换设备306优先使用EPS的方式对第一数据进行转发。If the size of the first data is not greater than the preset threshold, it is determined that the first data is a mouse flow, and the
如果用于转发第一数据的EPS转发端口空闲或者负载不大于预设的阈值,则第一交换设备采用EPS的方式将第一数据转发;如果用于转发第一数据的EPS转发端口被占用或者负载大于预设的阈值,则第一交换设备306将第一数据写入存储设备308中。If the EPS forwarding port for forwarding the first data is idle or the load is not greater than the preset threshold, the first switching device forwards the first data in an EPS manner; if the EPS forwarding port for forwarding the first data is occupied or When the load is greater than the preset threshold, the
可选的,第一交换设备306还用于数据流的整合,如果第一交换设备306接收到的多个(至少两个)大小均小于预设的阈值的老鼠流,且该多个老鼠流的目的地址相同,所述第一交换设备306还用于将该多个目的地址相同的数据整合成大象流,并采用OCS的方式进行转发。Optionally, the
可选的,第二交换设备310支持电分组交换(Electronic Packet Switching,EPS)和光电路交换(Optical Circuit Switching,OCS)。Optionally, the
如果所述存储设备308中还存有第二数据,且所述第二数据的目的地址与所述第一数据的目的地址相同,所述控制器304还用于在指令消息中指示所述第二交换设备310将所述第一数据和所述第二数据都取出转发。If there is second data in the
所述第二交换设备还用于将所述第一数据和所述第二数据合并,并采用光电路交换的方式将合并后的所述第一数据和所述第二数据转发。The second switching device is further configured to combine the first data and the second data, and forward the combined first data and the second data by means of optical circuit switching.
可选的,第一交换设备306和第二交换设备310不直接进行交互,在控制器304与第一交换设备306、第二交换设备310之间还存在管理模块,所述管理模块用于对第一交换设备306和第二交换设备310进行直接管理。Optionally, the
根据本发明实施例公开的技术方案,通过给数据中心中两个ToR交换机增加共同的存储设备,当第一交换设备负载较大时,将接收到的数据写入该存储设备中,并上报控制器,由控制器选择负载较小或者空闲的第二交换设备来执行数据的转发,第二交换设备去该存储设备中取出数据,并对数据进行转发,从而实现了数据中心数据转发的负载均衡,降低了发生网络拥塞的风险,并使数据得到及时的转发,降低了数据的传输时延。According to the technical solution disclosed in the embodiment of the present invention, by adding a common storage device to the two ToR switches in the data center, when the load of the first switching device is heavy, the received data is written into the storage device, and the control is reported. The controller selects a second switching device with less load or idle to perform data forwarding, and the second switching device retrieves data from the storage device and forwards the data, thereby realizing the load balancing of data forwarding in the data center , which reduces the risk of network congestion, enables data to be forwarded in time, and reduces data transmission delay.
图4为依据本发明一实施例的数据转发方法400的示范性流程图,第一交换设备和第二交换设备分别与存储设备连接,如图4所示,方法400包括:FIG. 4 is an exemplary flowchart of a
S402:第一交换设备接收数据。S402: The first switching device receives data.
S404:第一交换设备根据自身负载情况,将所述数据写入所述存储设备,以使得所述第二交换设备对所述数据进行转发。S404: 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.
其中,所述数据中携带所述数据的目的地址。Wherein, the data carries the destination address of the data.
所述第一交换设备根据自身负载情况,将所述数据写入所述存储设备包括:所述第一交换设备的负载大于预设的阈值,所述第一交换设备将所述数据写入所述存储设备。Writing the data into the storage device by the first switching device according to its own load condition includes: the load of the first switching device is greater than a preset threshold, and the first switching device writes the data into the storage device. the storage device.
具体而言,负载情况可以为第一交换设备的数据吞吐率,也可以为第一交换设备用于转发所述数据的端口的吞吐率或繁忙程度,本发明并不对此进行限定。只要第一交换设备因为自身负载情况,无法及时根据所述数据的目的地址转发所述数据,都可以将所述数据写入存储设备,以使得其他空闲的交换设备去该存储设备中取出所述数据,并进行转发。Specifically, the load condition may be the data throughput rate of the first switching device, and may also be the throughput rate or busy degree of the port used by the first switching device to forward the data, which is not limited in the present invention. As long as the first switching device cannot forward the data according to the destination address of the data in time due to its own load, the data can be written into the storage device, so that other idle switching devices can retrieve the data from the storage device. data and forward it.
可选的,所述第一交换设备根据自身负载情况,将所述数据写入所述存储设备包括:所述第一交换设备的用于根据所述数据的目的地址转发所述数据的端口被占用,所述第一交换设备将所述数据写入所述存储设备。Optionally, the first switching device writing the data to the storage device according to its own load situation includes: a port of the first switching device used for forwarding the data according to the destination address of the data is Occupied, the first switching device writes the data into the storage device.
可选的,所述第一交换设备根据自身负载情况,将所述数据写入所述存储设备包括:所述第一交换设备的用于根据所述数据的目的地址转发所述数据的端口被占用,且所述第一交换设备的缓存的剩余空间小于所述数据,所述第一交换设备将所述数据写入所述存储设备。Optionally, the first switching device writing the data to the storage device according to its own load situation includes: a port of the first switching device used for forwarding the data according to the destination address of the data is Occupied, and the remaining space of the cache of the first exchange device is smaller than the data, the first exchange device writes the data into the storage device.
可选的,所述第一交换设备和所述第二交换设备分别与控制器连接,所述控制器用于维护与所述控制器连接的交换设备的状态信息;所述方法400还包括:所述第一交换设备向所述控制器发送通知消息,所述通知消息用于表明所述第一交换设备将所述数据写入所述存储设备。Optionally, the first switching device and the second switching device are respectively connected to a controller, and the controller is configured to maintain state information of the switching devices connected to the controller; the
控制器可以从与所述控制器连接,且与所述存储设备连接的交换设备中确定转发端口空闲或者转发端口负载情况小于预设的某一阈值的交换设备作为所述第二交换设备,并向所述第二交换设备发送指令消息,所述指令消息用于指示所述第二交换设备将所述数据从所述存储设备取出并转发。其中,所述转发端口为能够根据所述数据的目的地址转发所述数据的端口。The controller may determine, from among the switching devices connected to the controller and the storage device, a switching device whose forwarding port is idle or whose forwarding port load is less than a preset threshold as the second switching device, and 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 forwarding port is a port that can forward the data according to the destination address of the data.
根据本发明实施例提供的技术方案,当第一交换设备接收到数据后,如果因为第一交换设备的负载情况,无法根据数据的目的地址对数据及时转发,第一交换设备可以将接收到的数据写入与其连接的存储设备,以使得转发端口空闲的交换设备去该存储设备中取出数据,并根据数据的目的地址及时的将数据转发。从而实现了与存储设备连接的多个交换设备的相互协作,保证了负载的均衡和数据的及时转发。According to the technical solution provided by the embodiment of the present invention, after the first switching device receives the data, if the data cannot be forwarded in time according to the destination address of the data due to the load of the first switching device, the first switching device can forward the received data The data is written into the storage device connected to it, so that the switching device whose forwarding port is idle can retrieve the data from the storage device, and forward the data in time according to the destination address of the data. Therefore, the mutual cooperation of multiple switching devices connected to the storage device is realized, and the balance of the load and the timely forwarding of the data are ensured.
图5为依据本发明一实施例的数据转发方法500的示范性流程图,第一交换设备和第二交换设备分别与存储设备连接,如图5所示,方法500包括:FIG. 5 is an exemplary flowchart of a
S502:第二交换设备从所述存储设备取出第一数据,其中,所述第一数据由所述第一交换设备根据所述第一交换设备的负载情况写入所述存储设备。S502: The second switching device retrieves the first data from the storage device, wherein the first data is written into the storage device by the first switching device according to the load condition of the first switching device.
具体而言,负载情况可以为第一交换设备的数据吞吐率,也可以为第一交换设备用于转发所述数据的端口的吞吐率或繁忙程度,本发明并不对此进行限定。只要第一交换设备因为自身负载情况,无法及时根据所述数据的目的地址转发所述数据,都可以将所述数据写入存储设备,以使得第二交换设备去该存储设备中取出所述数据,并进行转发。Specifically, the load condition may be the data throughput rate of the first switching device, and may also be the throughput rate or busy degree of the port used by the first switching device to forward the data, which is not limited in the present invention. As long as the first switching device cannot forward the data according to the destination address of the data in time due to its own load, the data can be written to the storage device, so that the second switching device can retrieve the data from the storage device , and forward it.
S504:第二交换设备根据所述第一数据的目的地址将所述第一数据转发。S504: The second switching device forwards the first data according to the destination address of the first data.
可选的,所述第一交换设备和所述第二交换设备分别与控制器连接,所述控制器用于维护与所述控制器连接的交换设备的状态信息;所述第二交换设备从所述存储设备取出第一数据之前还包括:所述第二交换设备接收来自所述控制器的指令消息,所述指令消息用于指示所述第二交换设备将所述第一数据从所述存储设备取出并转发。Optionally, the first switching device and the second switching device are respectively connected to a controller, and the controller is used to maintain status information of the switching devices connected to the controller; Before the storage device fetches the first data, it further includes: the second switching device receives an instruction message from the controller, where the instruction message is used to instruct the second switching device to remove the first data from the storage device The device is taken out and forwarded.
具体而言,第二交换设备为与所述控制器连接,且与所述存储设备连接的交换设备中转发端口空闲或者转发端口吞吐率小于预设的阈值的交换设备,其中,所述转发端口为能够根据所述第一数据的目的地址转发所述第一数据的端口。Specifically, the second switching device is a switching device connected to the controller and having an idle forwarding port or a forwarding port throughput rate less than a preset threshold among the switching devices connected to the storage device, wherein the forwarding port It is a port capable of forwarding the first data according to the destination address of the first data.
可选的,方法500还包括:所述第二交换设备按照预设的周期检查所述存储设备是否存在数据。Optionally, the
具体而言,当第二交换设备空闲或者负载小于某一预设的阈值时,会周期性的去存储设备中检查其中是否有数据,如果存储设备中存在数据,且第二交换设备可以转发该数据,且用于转发该数据的端口空闲或者吞吐率小于预设的阈值,则第二交换设备就从该存储设备中取出该数据,并根据数据的目的地址将数据转发。Specifically, when the second switching device is idle or the load is less than a preset threshold, it will periodically check whether there is data in the storage device. If there is data in the storage device, the second switching device can forward the data. data, and the port for forwarding the data is idle or the throughput rate is lower than the 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.
可选的,所述第二交换设备支持电分组交换和光电路交换;如果所述存储设备还存在第二数据,且所述第二数据的目的地址与所述第一数据的目的地址相同,所述方法还包括:所述第二交换设备将所述第一数据和所述第二数据合并,并采用光电路交换的方式将合并后的所述第一数据和所述第二数据转发。Optionally, the second switching device supports electrical packet switching and optical circuit switching; if the storage device still has second data, and the destination address of the second data is the same as the destination address of the first data, the The method further includes: the second switching device combines the first data and the second data, and forwards the combined first data and the second data by means of optical circuit switching.
根据本发明实施例的技术方案,当第一交换设备无法根据第一数据的目的地址及时转发第一数据时,会将第一数据写入存储设备,转发第一数据的转发端口空闲或负载小于预设的阈值的第二交换设备会去存储设备中取出第一数据,并将第一数据及时转发。从而实现了与存储设备连接的多个交换设备的相互协作,保证了负载的均衡和数据的及时转发。且如果第二交换设备支持EPS和OCS交换,第二交换设备还可以将多个老鼠流合成大象流,并采用OCS交换,从而减小转发延时,节省网络资源。According to the technical solution of the embodiment of the present invention, when the first switching device cannot forward the first data in time according to the destination address of the first data, it will write the first data into the storage device, and the forwarding port forwarding the first data is idle or the load is less than The second switching device with the preset threshold value will go to the storage device to retrieve the first data, and forward the first data in time. Therefore, the mutual cooperation of multiple switching devices connected to the storage device is realized, and the balance of the load and the timely forwarding of the data are ensured. And if the second switching device supports EPS and OCS switching, the second switching device can also combine multiple mouse flows into an elephant flow, and use OCS switching, thereby reducing forwarding delay and saving network resources.
图6为依据本发明一实施例的数据转发方法600的示范性流程图,第一交换设备和第二交换设备分别与控制器连接,所述控制器用于维护与所述控制器连接的交换设备的状态信息,其中,第一交换设备和第二交换设备分别与存储设备连接,如图6所示,方法600包括:FIG. 6 is an exemplary flowchart of a
S602:所述控制器接收来自所述第一交换设备的通知消息,所述通知消息用于表明所述第一交换设备将数据写入存储设备。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 into a storage device.
S604:控制器根据所述状态信息,确定所述第二交换设备。S604: The controller determines the second switching device according to the state information.
S606:控制器向所述第二交换设备发送指令消息,所述指令消息用于指示所述第二交换设备将所述数据从所述存储设备取出并转发。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.
可选的,所述状态信息包括与所述控制器连接的交换设备的端口的负载信息;所述控制器根据所述状态信息,确定所述第二交换设备包括:所述控制器从与所述控制器连接,且与所述存储设备连接的交换设备中确定转发端口空闲的交换设备作为所述第二交换设备,其中,所述转发端口为能够根据所述数据的目的地址转发所述数据的端口。Optionally, the status information includes load information of a port of a switching device connected to the controller; and the controller determines, according to the status information, that the second switching device includes: The controller is connected, and among the switching devices connected to the storage device, the switching device whose forwarding port is determined to be idle is used as the second switching device, wherein the forwarding port is capable of forwarding the data according to the destination address of the data. port.
根据本发明实施例公开的技术方案,通过控制器对与其连接的交换设备的状态监控,可以实现多个交换设备的负载均衡,且保证了数据能够及时的转发。According to the technical solutions disclosed in the embodiments of the present invention, by monitoring the status of the switching devices connected thereto by the controller, load balancing of multiple switching devices can be realized, and data can be forwarded in time.
图7为依据本发明一实施例的数据转发装置700的逻辑结构示意图,装置700与交换设备分别与存储设备连接,如图7所示,装置700包括接收单元702和处理单元704。7 is a schematic diagram of a logical structure of a
接收单元702用于接收数据。The receiving
处理单元704用于根据负载情况,将所述数据写入所述存储设备,以使得所述交换设备对所述数据进行转发。The
其中,所述数据中携带所述数据的目的地址。Wherein, the data carries the destination address of the data.
可选的,所述处理单元704用于根据负载情况,将所述数据写入所述存储设备包括:所述装置700用于根据所述数据的目的地址转发所述数据的端口被占用,所述处理单元704用于将所述数据写入所述存储设备。Optionally, the
所述处理单元704用于根据负载情况,将所述数据写入所述存储设备包括:所述装置700的负载大于预设的阈值,所述处理单元704用于将所述数据写入所述存储设备。The
具体而言,负载情况可以为装置700的数据吞吐率,也可以为装置700用于转发所述数据的端口的吞吐率或繁忙程度,本发明并不对此进行限定。只要装置700因为自身负载情况,无法及时根据所述数据的目的地址转发所述数据,都可以将所述数据写入存储设备,以使得其他空闲的交换设备去该存储设备中取出所述数据,并进行转发。Specifically, the load condition may be the data throughput rate of the
可选的,所述处理单元704用于根据负载情况,将所述数据写入所述存储设备包括:所述装置700用于根据所述数据的目的地址转发所述数据的端口被占用,且所述装置700的缓存的剩余空间小于所述数据,所述处理单元704用于将所述数据写入所述存储设备。Optionally, the
可选的,所述装置700和所述交换设备分别与控制器连接,所述控制器用于维护与所述控制器连接的所述交换设备的状态信息;所述装置700还包括发送单元,所述发送单元用于向控制器发送通知消息,所述通知消息用于表明所述装置700将所述数据写入所述存储设备。Optionally, the
控制器可以从与所述控制器连接,且与所述存储设备连接的交换设备中选择转发端口空闲或者转发端口负载情况小于预设的某一阈值的交换设备,并向选出的该交换设备发送指令消息,所述指令消息用于指示选出的交换设备将所述数据从所述存储设备取出并转发。其中,所述转发端口为能够根据所述数据的目的地址转发所述数据的端口。The controller may select a switching device whose forwarding port is idle or whose forwarding port load is less than a preset threshold from the switching devices connected to the controller and the storage device, and send the selected switching device to the switching device. Send an instruction message, where the instruction message is used to instruct the selected 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.
根据本发明实施例提供的技术方案,当装置700接收到数据后,如果因为装置700的负载情况,无法根据数据的目的地址对数据及时转发,装置700可以将接收到的数据写入与其连接的存储设备,以使得转发端口空闲的交换设备去该存储设备中取出数据,并根据数据的目的地址及时的将数据转发。从而实现了与存储设备连接的装置700与交换设备的相互协作,保证了负载的均衡和数据的及时转发。According to the technical solution provided by the embodiment of the present invention, after the
图8为依据本发明一实施例的数据转发装置800的逻辑结构示意图,装置800与交换设备分别与存储设备连接,如图8所示,装置800包括获取单元802和转发单元804。8 is a schematic diagram of a logical structure of a
获取单元802用于从所述存储设备取出第一数据,其中,所述第一数据由所述交换设备根据所述交换设备的负载情况写入所述存储设备。The obtaining
转发单元804用于根据所述第一数据的目的地址将所述第一数据转发。The
具体而言,负载情况可以为交换设备的数据吞吐率,也可以为交换设备用于转发所述数据的端口的吞吐率或繁忙程度,本发明并不对此进行限定。只要交换设备因为自身负载情况,无法及时根据所述数据的目的地址转发所述数据,都可以将所述数据写入存储设备,以使得装置800去该存储设备中取出所述数据,并进行转发。Specifically, the load condition may be the data throughput rate of the switching device, and may also be the throughput rate or busy degree of the port used by the switching device to forward the data, which is not limited in the present invention. As long as the switching device cannot forward the data according to the destination address of the data in time due to its own load, the data can be written into the storage device, so that the
可选的,所述交换设备和所述装置800分别与控制器连接,所述控制器用于维护与所述控制器连接的所述装置800的状态信息;所述装置800还包含接收单元,所述接收单元用于接收来自所述控制器的指令消息,所述指令消息用于指示所述装置800将所述第一数据从所述存储设备取出并转发。Optionally, the switching device and the
具体而言,装置800为与所述控制器连接,且与所述存储设备连接的交换设备中转发端口空闲或者转发端口吞吐率小于预设的阈值的交换设备,其中,所述转发端口为能够根据所述第一数据的目的地址转发所述第一数据的端口。Specifically, the
可选的,所述装置800还包含检查单元,所述检查单元用于按照预设的周期检查所述存储设备是否存在数据。Optionally, the
具体而言,当装置800空闲或者负载小于某一预设的阈值时,会周期性的去存储设备中检查其中是否有数据,如果存储设备中存在数据,且装置800可以转发该数据,且装置800用于转发该数据的端口空闲或者吞吐率小于预设的阈值,则装置800就从该存储设备中取出该数据,并根据数据的目的地址将数据转发。Specifically, when the
可选的,所述转发单元804支持电分组交换和光电路交换;如果所述存储设备还存在第二数据,且所述第二数据的目的地址与所述第一数据的目的地址相同,所述获取单元802还用于从所述存储设备取出所述第二数据,所述转发单元804还用于将所述第一数据和所述第二数据合并,并采用光电路交换的方式将合并后的所述第一数据和所述第二数据转发。Optionally, the
根据本发明实施例的技术方案,当交换设备无法根据第一数据的目的地址及时转发第一数据时,会将第一数据写入存储设备,转发第一数据的转发端口空闲或负载小于预设的阈值的装置800会去存储设备中取出第一数据,并将第一数据及时转发。从而实现了与存储设备连接的交换设备和装置800的相互协作,保证了负载的均衡和数据的及时转发。且如果装置800支持EPS和OCS交换,装置800还可以将多个老鼠流合成大象流,并采用OCS交换,从而减小转发延时,节省网络资源。According to the technical solution of the embodiment of the present invention, when the switching device cannot forward the first data in time according to the destination address of the first data, it will write the first data to the storage device, and the forwarding port forwarding the first data is idle or the load is smaller than the preset value The
图9为依据本发明一实施例的数据转发装置900的逻辑结构示意图,第一交换设备和第二交换设备分别与所述装置900连接,所述装置900用于维护与所述控制器连接的交换设备的状态信息,如图9所示,装置900包括接收单元902、确定单元904和发送单元906。FIG. 9 is a schematic diagram of a logical structure of a
接收单元902用于接收来自所述第一交换设备的通知消息,所述通知消息用于表明所述第一交换设备将数据写入存储设备,其中,所述第一交换设备和所述第二交换设备分别与所述存储设备连接。The receiving
确定单元904用于根据所述状态信息,确定所述第二交换设备。The determining
发送单元906用于向所述第二交换设备发送指令消息,所述指令消息用于指示所述第二交换设备将所述数据从所述存储设备取出并转发。The sending
可选的,所述状态信息包括与所述装置900连接的交换设备的端口的负载信息;所述确定单元904用于根据所述状态信息,确定所述第二交换设备包括:所述确定单元904用于从与所述装置900连接,且与所述存储设备连接的交换设备中确定转发端口空闲的交换设备作为所述第二交换设备,其中,所述转发端口为能够根据所述数据的目的地址转发所述数据的端口。Optionally, the state information includes load information of a port of a switching device connected to the
根据本发明实施例公开的技术方案,通过控制器对与其连接的交换设备的状态监控,可以实现多个交换设备的负载均衡,且保证了数据能够及时的转发。According to the technical solutions disclosed in the embodiments of the present invention, by monitoring the status of the switching devices connected thereto by the controller, load balancing of multiple switching devices can be realized, and data can be forwarded in time.
图10是依据本发明一实施例的数据转发装置1000的硬件结构示意图。如图10所示,数据转发装置1000包括处理器1002、存储器1004、输入/输出接口1006、通信接口1008和总线1010。其中,处理器1002、存储器1004、输入/输出接口1006和通信接口1008通过总线1010实现彼此之间的通信连接。FIG. 10 is a schematic diagram of a hardware structure of a
处理器1002可以采用通用的中央处理器(Central Processing Unit,CPU),微处理器,应用专用集成电路(Application SQecific Integrated Circuit,ASIC),或者一个或多个集成电路,用于执行相关程序,以实现本发明实施例所提供的技术方案。The
存储器1004可以是只读存储器(Read Only Memory,ROM),静态存储设备,动态存储设备或者随机存取存储器(Random Access Memory,RAM)。存储器1004可以存储操作系统和其他应用程序。在通过软件或者固件来实现本发明实施例提供的技术方案时,用于实现本发明实施例提供的技术方案的程序代码保存在存储器1004中,并由处理器1002来执行。The
输入/输出接口1006用于接收输入的数据和信息,输出操作结果等数据。The input/
通信接口1008使用例如但不限于收发器一类的收发装置,来实现数据转发装置1000与其他设备或通信网络之间的通信。The
总线1010可包括一通路,在数据转发装置1000各个部件(例如处理器1002、存储器1004、输入/输出接口1006和通信接口1008)之间传送信息。The bus 1010 may include a path for transferring information between the various components of the data forwarding device 1000 (eg, the
应注意,尽管图10所示的数据转发装置1000仅仅示出了处理器1002、存储器1004、输入/输出接口1006、通信接口1008以及总线1010,但是在具体实现过程中,本领域的技术人员应当明白,数据转发装置1000还包含实现正常运行所必须的其他器件。同时,根据具体需要,本领域的技术人员应当明白,数据转发装置1000还可包含实现其他附加功能的硬件器件。此外,本领域的技术人员应当明白,数据转发装置1000也可仅仅包含实现本发明实施例所必须的器件,而不必包含图10中所示的全部器件。It should be noted that although the
图10所示的硬件结构以及上述描述适用于本发明实施例所提供的各种数据转发装置和系统,适用于执行本发明实施例所提供的各种数据转发方法。The hardware structure shown in FIG. 10 and the above description are applicable to various data forwarding apparatuses and systems provided by the embodiments of the present invention, and are suitable for executing various data forwarding methods provided by the embodiments of the present invention.
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,设备和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述模块的划分,仅仅为一种逻辑功能划分,实现时可以有另外的划分方式,例如多个模块或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或模块的间接耦合或通信连接,可以是电性,机械或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods may be implemented in other manners. For example, the apparatus embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there may be other division methods during implementation, for example, multiple modules or components may be combined or Integration into another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or modules, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,作为模块显示的部件可以是或者也可以不是物理模块,即可以位于一个地方,或者也可以分布到多个网络模块上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。The modules described as separate components may or may not be physically separated, and the components shown 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 in this embodiment.
另外,在本发明各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用硬件加软件功能模块的形式实现。In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically alone, or two or more modules may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware, or can be implemented in the form of hardware plus software function modules.
上述以软件功能模块的形式实现的集成的模块,可以存储在一个计算机可读取存储介质中。上述软件功能模块存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:移动硬盘、只读存储器(英文:Read-Only Memory,简称ROM)、随机存取存储器(英文:Random Access Memory,简称RAM)、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated modules implemented in the form of software functional modules may be stored in a computer-readable storage medium. The above-mentioned software function modules are stored in a storage medium, and include several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute some steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: mobile hard disk, read-only memory (English: Read-Only Memory, ROM for short), random access memory (English: Random Access Memory, referred to as RAM), magnetic disk or optical disk and other various programs that can store programs medium of code.
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的保护范围。Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, but not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that it can still be The technical solutions described in the foregoing embodiments are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions depart from the protection scope of the technical solutions of the embodiments of the present invention.
Claims (25)
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
PCT/CN2015/082584 WO2017000097A1 (en) | 2015-06-27 | 2015-06-27 | Data forwarding method, device, and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107113244A CN107113244A (en) | 2017-08-29 |
CN107113244B true CN107113244B (en) | 2020-11-17 |
Family
ID=57609396
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201580001243.XA Active CN107113244B (en) | 2015-06-27 | 2015-06-27 | Data forwarding method, device and system |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN107113244B (en) |
WO (1) | WO2017000097A1 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113055292B (en) * | 2021-03-11 | 2022-11-04 | 青岛矽昌通信技术有限公司 | Method for improving forwarding performance of multi-core router and multi-core router |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101860550A (en) * | 2010-06-25 | 2010-10-13 | 复旦大学 | A Streaming Media System Acceleration Method Based on Router Cache |
CN102045253A (en) * | 2010-12-06 | 2011-05-04 | 杭州华三通信技术有限公司 | Method and device for sending video surveillance service messages in link aggregation network |
CN102255757A (en) * | 2011-08-08 | 2011-11-23 | 杭州华三通信技术有限公司 | Link switching method and device |
CN102316021A (en) * | 2011-07-04 | 2012-01-11 | 杭州华三通信技术有限公司 | Method for realizing load sharing of switch aggregation port and switch |
CN102763382A (en) * | 2010-01-29 | 2012-10-31 | 日本电气株式会社 | Front end system and front end processing method |
CN104539716A (en) * | 2015-01-04 | 2015-04-22 | 国网四川省电力公司信息通信公司 | Cloud desktop management system desktop virtual machine dispatching control system and method |
CN104580002A (en) * | 2015-01-14 | 2015-04-29 | 盛科网络(苏州)有限公司 | Elephant-flow load balancing transmitting method and device |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5112003B2 (en) * | 2007-10-19 | 2013-01-09 | 株式会社日立製作所 | Storage device and data storage method using the same |
CN101854299B (en) * | 2010-05-21 | 2013-08-14 | 中国科学院软件研究所 | Dynamic load balancing method of release/subscription system |
CN102316045B (en) * | 2011-10-19 | 2014-05-14 | 杭州华三通信技术有限公司 | Method for realizing flow rate balance in multi-service transport platform (MSTP) networking and network equipment |
CN103166870B (en) * | 2011-12-13 | 2017-02-08 | 百度在线网络技术(北京)有限公司 | Load balancing clustered system and method for providing services by using load balancing clustered system |
US9013995B2 (en) * | 2012-05-04 | 2015-04-21 | Telefonaktiebolaget L M Ericsson (Publ) | Congestion control in packet data networking |
US9276860B2 (en) * | 2013-03-13 | 2016-03-01 | Microsoft Technology Licensing, Llc | Distributed data center technology |
CN104219591B (en) * | 2013-05-30 | 2017-12-01 | 华为技术有限公司 | A kind of packet-switching method and device |
-
2015
- 2015-06-27 CN CN201580001243.XA patent/CN107113244B/en active Active
- 2015-06-27 WO PCT/CN2015/082584 patent/WO2017000097A1/en active Application Filing
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102763382A (en) * | 2010-01-29 | 2012-10-31 | 日本电气株式会社 | Front end system and front end processing method |
CN101860550A (en) * | 2010-06-25 | 2010-10-13 | 复旦大学 | A Streaming Media System Acceleration Method Based on Router Cache |
CN102045253A (en) * | 2010-12-06 | 2011-05-04 | 杭州华三通信技术有限公司 | Method and device for sending video surveillance service messages in link aggregation network |
CN102316021A (en) * | 2011-07-04 | 2012-01-11 | 杭州华三通信技术有限公司 | Method for realizing load sharing of switch aggregation port and switch |
CN102255757A (en) * | 2011-08-08 | 2011-11-23 | 杭州华三通信技术有限公司 | Link switching method and device |
CN104539716A (en) * | 2015-01-04 | 2015-04-22 | 国网四川省电力公司信息通信公司 | Cloud desktop management system desktop virtual machine dispatching control system and method |
CN104580002A (en) * | 2015-01-14 | 2015-04-29 | 盛科网络(苏州)有限公司 | Elephant-flow load balancing transmitting method and device |
Also Published As
Publication number | Publication date |
---|---|
CN107113244A (en) | 2017-08-29 |
WO2017000097A1 (en) | 2017-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10924413B2 (en) | Transmission path determining method and apparatus | |
US10534601B1 (en) | In-service software upgrade of virtual router with reduced packet loss | |
CN113709057B (en) | Network congestion notification method, proxy node, network node and computer equipment | |
US9602428B2 (en) | Method and apparatus for locality sensitive hash-based load balancing | |
US10965604B2 (en) | Deadlock avoidance in leaf-spine networks | |
CN106713182B (en) | A method and device for processing flow table | |
US9455916B2 (en) | Method and system for changing path and controller thereof | |
CN106656857B (en) | Message speed limiting method and device | |
EP3251304A1 (en) | Method and apparatus for connecting a gateway router to a set of scalable virtual ip network appliances in overlay networks | |
CN110022264A (en) | Control method, access device and the computer readable storage medium of network congestion | |
US9800508B2 (en) | System and method of flow shaping to reduce impact of incast communications | |
CN103281257B (en) | A kind of protocol message processing method and equipment | |
WO2021083341A1 (en) | Method for processing message, and network node and system | |
CN111224888A (en) | Method for sending message and message forwarding device | |
CN108123878B (en) | A routing method, device and data forwarding device | |
JP2008293492A (en) | Intelligent failback in load-balanced network environment | |
EP4325800A1 (en) | Packet forwarding method and apparatus | |
US20210112009A1 (en) | Network management apparatus and method | |
CN117221225A (en) | Network congestion notification method, device and storage medium | |
CN117354253A (en) | A network congestion notification method, device and storage medium | |
EP3038296B1 (en) | Pool element status information synchronization method, pool register and pool element | |
US9984036B2 (en) | Communication system, control apparatus, communication method, and program | |
CN105471817B (en) | Unloading method, device and system for service flow | |
US10476774B2 (en) | Selective transmission of bidirectional forwarding detection (BFD) messages for verifying multicast connectivity | |
CN105391647A (en) | Method and system for flow control |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |