WO2019114459A1 - 一种传输数据的方法以及相关设备 - Google Patents

一种传输数据的方法以及相关设备 Download PDF

Info

Publication number
WO2019114459A1
WO2019114459A1 PCT/CN2018/113886 CN2018113886W WO2019114459A1 WO 2019114459 A1 WO2019114459 A1 WO 2019114459A1 CN 2018113886 W CN2018113886 W CN 2018113886W WO 2019114459 A1 WO2019114459 A1 WO 2019114459A1
Authority
WO
WIPO (PCT)
Prior art keywords
priority
openflow
tcp channel
message
tcp
Prior art date
Application number
PCT/CN2018/113886
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 EP18889412.5A priority Critical patent/EP3713184A4/en
Publication of WO2019114459A1 publication Critical patent/WO2019114459A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/302Route determination based on requested QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/38Flow based routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/42Centralised routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/64Routing or path finding of packets in data switching networks using an overlay routing layer
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS

Definitions

  • the present application relates to the field of communications, and in particular, to a method for transmitting data and related devices.
  • the OpenFlow network is a new network architecture that can be defined by software. It separates the control plane and data forwarding plane of the switch in the traditional network.
  • the centralized controller manages the switches in the network.
  • Openflow is used as a communication.
  • the protocol is a protocol for communication between the controller and the forwarding plane.
  • Openflow realizes flexible control of network traffic by separating the control plane of the network device from the data forwarding plane.
  • Openflow identifies the network service by streaming, which provides accurate granular control so that the network can respond to real-time changes in the application layer in a timely manner.
  • the Openflow network structure includes an Openflow controller and an Openflow switch.
  • a transmission control protocol (TCP) channel is established between the Openflow controller and the Openflow switch for data transmission.
  • the data may include a flow table and a protocol. Messages, etc.
  • TCP transmission control protocol
  • the keep-alive packet may be blocked in the channel and cannot be sent to the related device, resulting in the Openflow protocol. Broken chain, resulting in the loss of data transmitted in the channel.
  • a TCP channel may include multiple intermediate network devices, for example, Openflow control.
  • the Openflow switch 1 establishes a TCP channel, which also passes through the Openflow switch 2 and the Openflow switch 3.
  • the Openflow switch 2 and the Openflow switch 3 serve as forwarding devices in the TCP, and both the Openflow switch 2 and the Openflow switch 3 are
  • the intermediate network device may be one or more. Therefore, it is still possible that the first-sent packet and the post-sent packet are blocked on the same intermediate network device, and some important packets cannot be transmitted normally.
  • the Openflow controller cannot receive the keep-alive message, etc., causing the communication to be broken, or the sending sequence of the next-level flow table and the next-level flow table with the previous relationship is disordered.
  • the upper-level flow table cannot be obtained after being received. Go to the next level flow table, causing data forwarding failure, etc.
  • the embodiment of the present invention provides a method for transmitting data and a related device, which are used to solve the problem that a message is blocked in a transmission channel in an OpenFlow network, reduce data loss during data transmission, and improve data transmission efficiency.
  • the first aspect of the present application provides a data transmission method, which may include:
  • the Openflow switch establishes a first TCP channel between the first port of the Openflow switch and the third port of the Openflow controller, and establishes a second between the second port of the Openflow switch and the third port of the Openflow controller a TCP channel, the first port and the second port are different ports; the Openflow switch determines a first priority of the first TCP channel and a second priority of the second TCP channel; the Openflow switch is based on a packet priority
  • the class transmits the message via the first TCP channel or the second TCP channel.
  • the first priority and the second priority may be preset by the Openflow switch and the Openflow controller, or may be negotiated by the Openflow switch and the Openflow controller, or may be allocated and notified by the Openflow switch.
  • the controller is not limited herein.
  • the Openflow switch and the Openflow controller establish at least two TCP channels, that is, at least two TCP connections.
  • the Openflow switch also The third TCP channel of the OpenFlow controller may be established on the third port of the Openflow switch, or the fourth TCP channel may be established on the third port of the OpenFlow controller, and so on, and so on.
  • the Openflow switch and the Openflow controller establish at least two TCP channels, which may include a first TCP channel and a second TCP channel, each TCP channel corresponding to a priority, and each of the Openflows
  • the packets transmitted between the switch and the OpenFlow controller also have a priority.
  • the TCP channel can be selected for data transmission according to the priority of the packet.
  • the packets with higher priority can be transmitted through the TCP channel with higher priority.
  • Openflow switch Or the OpenFlow controller can preferentially transmit packets with a high priority.
  • the intermediate network device can also forward packets with a higher priority.
  • At least two TCP channels established in the embodiment of the present application, and the corresponding priorities are allocated not only can reduce the blocking of packets in the TCP channel, but also prevent important packets with high priority from being blocked in the TCP channel.
  • the stability of data transmission, as well as the efficiency of data transmission and the capacity of data transmission are allocated.
  • the method can also include:
  • the Openflow switch sends a first notification message to the Openflow controller via the first TCP channel, where the first notification message carries information of the first priority; the Openflow switch sends the first to the Openflow controller via the second TCP channel.
  • the second notification message carries the second priority information to notify the Openflow controller of the first priority of the first TCP channel and the second priority of the second TCP channel.
  • the Openflow switch and the Openflow controller can determine the priority of the TCP channel by advertising the message, which is a way to determine the priority of the TCP channel.
  • the first notification message may be a first session priority message
  • the second notification message may be a second Session priority message
  • the method may further include:
  • the Openflow switch After the Openflow switch sends the first session priority message to the Openflow controller, the Openflow switch receives the first session priority reply message from the Openflow controller via the first TCP channel, and the Openflow switch obtains the first session priority through the first session priority.
  • the Openflow controller confirms that the Openflow switch is the first priority of the first TCP channel; the Openflow switch receives a second session priority reply message from the Openflow controller via the second TCP channel, and the Openflow switch passes the second The session priority is obtained, and the Openflow controller confirms that the Openflow switch is the second priority of the second TCP channel.
  • the third priority may be carried in the first session priority reply message.
  • the second priority may be carried in the second session priority, and the Openflow switch may obtain the third priority as the priority of the first TCP channel by using the first session priority reply message, and the The third priority is used as the priority of the first TCP channel, or the Openflow switch can obtain the fourth priority as the priority of the second TCP channel by using the second session priority reply message, and the fourth priority The level is the priority of the second TCP channel.
  • the Openflow switch sends a first session priority message to the OpenFlow controller through the first TCP channel, where the first session priority message includes the first priority of the first TCP channel determined by the Openflow switch. Transmitting, by the second TCP channel, a second session priority message to the Openflow controller, where the second session priority message includes a second priority of the second TCP channel determined by the Openflow switch; afterwards, the Openflow switch receives the Openflow controller The first session priority reply message sent by the first TCP channel and the second session priority reply message sent by the Openflow controller through the second TCP channel, and the Openflow switch can determine the priority of the first TCP channel by negotiating with the Openflow controller.
  • the priority of the level and the second TCP channel adds a way to determine the priority of the TCP channel, which can accurately determine the priority of the TCP channel and improve the stability and reliability of data transmission.
  • the first notification message may be a first feature reply message
  • the second notification message may be a second feature.
  • the method may further include: before the Openflow switch sends the first notification message and the second notification message, the method may further include:
  • the Openflow switch receives a first feature request message from the Openflow controller through the first TCP channel, and the Openflow switch receives a second feature request message from the Openflow controller through the second TCP channel.
  • the Openflow switch after receiving the first feature request message sent by the Openflow controller, the Openflow switch sends a first feature reply message to the Openflow controller through the first TCP channel, where the feature reply message is sent. Include the priority of the first TCP channel; and after receiving the second feature request message sent by the Openflow controller through the second TCP channel, the Openflow switch sends a second feature reply message to the Openflow controller through the second TCP channel, where The feature request reply message includes the priority of the second TCP channel to notify the Openflow controller of the priority of the first TCP channel and the priority of the second TCP channel, and adds a method for determining the Openflow switch established with the Openflow controller. The way the TCP channel is prioritized.
  • the Openflow switch transmits the packet by using the first TCP channel or the second TCP channel according to the priority of the packet, which may include:
  • the Openflow switch determines that the priority of the packet is the same as the first priority, and the Openflow switch transmits the packet via the first TCP channel; or the Openflow switch determines that the priority of the packet is the same as the second priority
  • the Openflow switch transmits the message via the second TCP channel.
  • the priority of the packet may be the processing priority and/or the forwarding priority of the packet, and the processing priority of the packet may be that the Openflow switch or the Openflow controller processes the priority of the packet, and the forwarding is performed.
  • the priority may be the priority of the intermediate network device to forward the packet. It should be noted that the priority of the packet may be assigned by the OpenFlow switch, or may be notified to the OpenFlow switch after the Openflow controller is allocated, which is not limited herein.
  • the Openflow switch can transmit the packet through a TCP channel with the same priority as the packet. Therefore, the packets with the highest priority can be forwarded through the TCP channel with the highest priority.
  • the OpenFlow switch or the OpenFlow controller can transmit the packets with the highest priority.
  • the intermediate network device can also forward the packets with the highest priority. Reduce the congestion of high-priority packets in the TCP channel and improve the stability and reliability of packet transmission.
  • the Openflow switch transmits the packet by using the first TCP channel or the second TCP channel according to the priority of the packet, which may include:
  • the Openflow switch determines that the priority of the packet is the same as the first priority of the first TCP channel; the Openflow switch determines that the bandwidth usage of the first TCP channel is higher than a first threshold, and the bandwidth of the second TCP channel is The occupancy rate is lower than the second threshold; the Openflow switch can transmit the message through the second TCP channel.
  • the Openflow switch may select to transmit the packet through the first TCP channel, and the Openflow switch monitors the first TCP channel. If the bandwidth usage of the second TCP channel is lower than the second threshold, and the bandwidth of the second TCP channel is lower than the second threshold, the packet may be transmitted through the second TCP channel, that is, the load on the first TCP channel is excessive. When the load of the second TCP channel is idle, the packet transmitted in the first TCP channel is transmitted through the second TCP channel, which can further improve the efficiency of data transmission, reduce packet blocking, and can be reasonably utilized. Network resources, reducing the waste of network resources.
  • a second aspect of the present application provides a data transmission method, a first TCP channel is established between a first port of an Openflow switch and a third port of an Openflow controller, and a second port of the Openflow switch and the Openflow controller are A second TCP channel is established between the third port, and the first port and the second port are different ports.
  • the method may include:
  • the Openflow controller receives the Openflow exchange via the second TCP channel Sending a second notification message, where the second notification message carries information of the second priority; the Openflow controller determines, according to the first advertisement message, that the priority of the first TCP channel is the first priority, and the Openflow control Determining, according to the second notification message, the priority of the second TCP channel is the second priority; the Openflow controller transmits the packet according to the priority of the packet via the first TCP channel or the second TCP channel.
  • the Openflow switch and the Openflow controller can establish at least two TCP channels, including a first TCP channel and a second TCP channel, and each TCP channel corresponds to a priority, and the priority can be determined by an Openflow switch.
  • the notification message is sent to the Openflow controller, and each packet transmitted between the Openflow switch and the Openflow controller also corresponds to a priority.
  • the Openflow controller can select a TCP channel for data transmission according to the priority of the packet. Packets with a high priority can be transmitted through a TCP channel with a high priority.
  • An OpenFlow switch or controller can preferentially transmit packets with a high priority.
  • the intermediate network device can also forward packets with a higher priority.
  • At least two TCP channels established in the embodiment of the present application can not only reduce the blocking of packets in the TCP channel, but also prevent important packets with high priority from being blocked in the TCP channel, thereby improving the stability of data transmission, and The efficiency of data transmission.
  • the first notification message may be a first session priority message
  • the second notification message may be a second session priority message
  • the Openflow controller After the Openflow controller receives the first session priority message sent by the Openflow switch through the first TCP channel, the Openflow controller sends the first session priority reply message to the Openflow switch through the first TCP channel, where the first session takes precedence.
  • the level reply message is used to notify the Openflow switch that the Openflow controller confirms the first priority determined by the Openflow switch; after the Openflow controller receives the second session priority message sent by the Openflow switch through the second TCP channel, the Openflow controller passes the The second TCP channel sends the second session priority reply message to the Openflow switch, where the second session priority reply message is used to notify the Openflow switch that the Openflow controller confirms the second priority determined by the Openflow switch.
  • the Openflow controller may continue to negotiate with the Openflow switch.
  • the priority of a TCP channel or the second TCP channel the Openflow controller may also re-assign the third priority to the first TCP channel, or re-assign the fourth priority to the second TCP channel, the first session priority reply
  • the third priority may be carried in the message, or the fourth priority may be carried in the second session priority, and then the Openflow switch may use the third priority as the first TCP by using the first session priority reply message.
  • the priority of the channel, or the Openflow switch can use the second priority priority reply message as the priority of the second TCP channel.
  • the Openflow switch sends the priority of the TCP channel to the Openflow controller through the session priority message, and the Openflow controller sends a session priority reply message to the Openflow switch, so that the Openflow switch and the Openflow controller can negotiate and confirm.
  • the priority of the TCP channel increases the way the TCP channel is acknowledged.
  • the first notification message is a first feature reply message
  • the second notification message is a second feature reply message
  • the method may further include:
  • the Openflow controller After establishing at least two TCP channels, the Openflow controller sends a first feature request message to the Openflow switch through the first TCP channel; the first feature request message may be used to request to obtain device information or address information of the Openflow switch, etc. The information, the Openflow controller sends a second feature request message to the Openflow switch through the second TCP channel, where the second feature request message can be used to request information such as device information or address information of the Openflow switch.
  • the Openflow controller sends at least two feature request messages to the Openflow switch through each of the at least two TCP channels, the Openflow switch.
  • the Openflow switch After receiving the at least two feature request messages, generating a feature reply message for the at least two feature request messages, where the feature reply message carries a priority of the corresponding TCP channel to notify the Openflow controller of the at least two TCP channels.
  • the priority of each TCP channel in the middle adds a way for the Openflow controller to determine the priority of the TCP channel.
  • the OpenFlow controller transmits the packet by using the first TCP channel or the second TCP channel according to the priority of the packet, which may include:
  • the Openflow controller determines that the priority of the packet is the same as the first priority of the first TCP channel, and the Openflow controller transmits the packet via the first TCP channel; or the Openflow controller determines the priority of the packet The level is the same as the second priority of the second TCP channel, and the Openflow controller transmits the message via the second TCP channel.
  • the Openflow controller determines that the priority of the packet matches the priority of the TCP channel, the Openflow controller transmits the packet through the TCP channel. Therefore, packets with high priority can be transmitted through the TCP channel with high priority, which reduces the congestion of packets in the TCP channel and improves the stability and reliability of packet transmission.
  • the OpenFlow controller transmits the packet by using the first TCP channel or the second TCP channel according to the priority of the packet, which may include:
  • the Openflow controller After the Openflow controller determines that the priority of the packet is the same as the first priority, the packet needs to be transmitted from the first TCP channel; if the Openflow controller determines that the bandwidth of the first TCP channel is higher than The first threshold is used, and the bandwidth of the second TCP channel is lower than the second threshold, and the Openflow controller can transmit the packet by using the second TCP channel.
  • the priority of the packet may be the processing priority and/or the forwarding priority of the packet, and the processing priority of the packet may be that the Openflow switch or the Openflow controller processes the priority of the packet, and the forwarding is performed.
  • the priority may be the priority of the intermediate network device to forward the packet. It should be noted that the priority of the packet may be assigned by the OpenFlow switch, or may be notified to the OpenFlow switch after the Openflow controller is allocated, which is not limited herein.
  • the Openflow controller determines that the priority of a packet matches the priority of the first TCP channel, the Openflow controller will transmit the packet through the first TCP channel, and the Openflow controller detects the first packet. If the bandwidth usage of the TCP channel is higher than the first threshold, and the bandwidth usage of the second TCP channel is lower than the second threshold, the packet may be transmitted through the second TCP channel, that is, the load on the first TCP channel. When the load of the second TCP channel is idle, the packet transmitted in the first TCP channel is transmitted through the second TCP channel, which can further improve the efficiency of data transmission and reduce packet blocking. Network resources can be rationally utilized to reduce the waste of network resources.
  • the third aspect of the present application provides an Openflow switch, where the Openflow switch can include:
  • Establishing a unit configured to establish a first TCP channel between the first port of the Openflow switch and the third port of the Openflow controller, and between the second port of the Openflow switch and the third port of the Openflow controller Establishing a second TCP channel, where the first port and the second port are different ports;
  • a determining unit configured to determine a first priority of the first TCP channel and a second priority of the second TCP channel
  • a transmitting unit configured to transmit the packet according to the priority of the packet via the first TCP channel or the second TCP channel.
  • the transmission unit is further configured to send, by using the first TCP channel, a first advertisement message to the OpenFlow controller, where the first advertisement message carries information of the first priority level;
  • the transmission unit is further configured to send, by using the second TCP channel, a second advertisement message to the OpenFlow controller, where the second advertisement message carries information of the second priority.
  • the first notification message is a first session priority message
  • the second notification message is a second session priority Level messages, which can include:
  • the transmission unit is further configured to receive, by using the first TCP channel, a first session priority reply message from an Openflow controller, where the first session priority reply message is used by the Openflow controller to confirm the first determined by the Openflow switch priority;
  • the transmission unit is further configured to receive, by using the second TCP channel, a second session priority reply message from the Openflow controller, where the second session priority reply message is used by the Openflow controller to confirm the second determined by the Openflow switch priority.
  • the first notification message is a first feature reply message
  • the second notification message is a second feature reply message.
  • the method may include:
  • the transmission unit is further configured to receive, by using the first TCP channel, a first feature request message from an Openflow controller;
  • the transmission unit is further configured to receive a second feature request message from the Openflow controller via the second TCP channel.
  • the first embodiment of the third aspect of the present application, and the third embodiment of the third aspect of the present application, in the fourth embodiment of the third aspect of the present application, Can include:
  • the transmitting unit is specifically configured to transmit the packet by using the first TCP channel;
  • the transmitting unit is specifically configured to transmit the packet by using the second TCP channel.
  • the first embodiment of the third aspect of the present application, and the fourth embodiment of the third aspect of the present application, in a fifth implementation manner of the third aspect of the present application Can include:
  • the determining unit is further configured to determine that the priority of the packet is the same as the first priority
  • the determining unit is further configured to determine that the bandwidth occupation rate of the first TCP channel is higher than a first threshold, and the bandwidth occupation rate of the second TCP channel is lower than a second threshold;
  • the transmission unit is further configured to use the second TCP channel after the determining unit determines that the bandwidth usage of the first TCP channel is higher than a first threshold, and the bandwidth occupancy of the second TCP channel is lower than a second threshold. Transmit the message.
  • the fourth aspect of the present application provides an OpenFlow controller, a first TCP channel is established between a first port of the Openflow switch and a third port of the Openflow controller, and a second port of the Openflow switch and the Openflow controller A second TCP channel is established between the third port, the first port and the second port are different ports, and the Openflow controller may include:
  • a transmitting unit configured to receive, by using the first TCP channel, a first advertisement message sent by the OpenFlow switch, where the first notification message carries information of a first priority
  • the transmitting unit is further configured to receive, by using the second TCP channel, a second advertisement message sent by the Openflow switch, where the second notification message carries information of a second priority level;
  • a determining unit configured to determine, according to the first notification message, a priority of the first TCP channel as the first priority, and determining, according to the second advertisement message, a priority of the second TCP channel as the second priority;
  • the transmitting unit is further configured to transmit the packet according to the priority of the packet via the first TCP channel or the second TCP channel.
  • the first notification message is a first session priority message
  • the second notification message is a second session priority message, which may include:
  • the transmitting unit is further configured to send the first session priority reply message to the Openflow switch by using the first TCP channel, where the first session priority reply message is used by the determining unit to confirm the first priority determined by the Openflow switch level;
  • the transmission unit is further configured to send the second session priority reply message to the Openflow switch by using the second TCP channel, where the second session priority reply message is used by the Openflow controller to confirm the second determined by the Openflow switch. priority.
  • the first notification message is a first feature reply message
  • the second notification message is a second feature reply message
  • the transmission unit is further configured to send a first feature request message to the Openflow switch by using the first TCP channel;
  • the transmission unit is further configured to send a second feature request message to the Openflow switch by using the second TCP channel.
  • the first embodiment of the fourth aspect of the present application, and the second embodiment of the fourth aspect of the present application, in the third embodiment of the fourth aspect of the present application, Can include:
  • the transmitting unit is specifically configured to transmit the packet by using the first TCP channel;
  • the transmitting unit is specifically configured to transmit the packet by using the second TCP channel.
  • the first embodiment of the fourth aspect of the present application, and the third embodiment of the fourth aspect of the present application, in a fourth implementation manner of the fourth aspect of the present application Can include:
  • the determining unit is further configured to determine that the priority of the packet is the same as the first priority
  • the determining unit is further configured to determine that a bandwidth occupation rate of the first TCP channel is higher than a first threshold, and a bandwidth occupation rate of the second TCP channel is lower than a second threshold;
  • the transmitting unit is configured to pass the second TCP channel after the determining unit determines that the bandwidth usage of the first TCP channel is higher than a first threshold, and the bandwidth usage of the second TCP channel is lower than a second threshold. Transmit the message.
  • the fifth aspect of the embodiment of the present application provides an Openflow switch, which may include:
  • processor and a memory, the processor being coupled to the memory;
  • the memory for storing program code
  • a sixth aspect of the embodiments of the present disclosure provides an OpenFlow controller, which may include:
  • processor and a memory, the processor being coupled to the memory;
  • the memory for storing program code
  • the processor executes the steps of the Openflow controller provided by the second aspect or the second aspect of the present application when the processor calls the program code in the memory.
  • the seventh aspect of the present application provides a communication system, which includes an Openflow switch and an Openflow controller, the Openflow switch is an Openflow switch in any one of the first to second aspects of the present application;
  • the controller is an Openflow controller in any of the first to second aspects of the present application.
  • the eighth aspect of the embodiments of the present application provides a storage medium.
  • the technical solution of the present invention may contribute to the prior art or all or part of the technical solution may be implemented by software.
  • the computer software product is stored in a storage medium for storing computer software instructions for use in the above apparatus, comprising: for performing any of the first aspect to the second aspect described above as an Openflow switch or Openflow control The program designed by the device.
  • the storage medium includes: a U disk, a mobile hard disk, a read only memory (English abbreviation ROM, English full name: Read-Only Memory), a random access memory (English abbreviation: RAM, English full name: Random Access Memory), a disk or a disk. And other media that can store program code.
  • a ninth aspect of the embodiments of the present application provides a computer program product comprising instructions, which when executed on a computer, cause the computer to perform the method as described in the first aspect of the present application or any of the alternative embodiments of the first aspect.
  • a tenth aspect of the embodiments of the present application provides a computer program product comprising instructions, which when executed on a computer, cause the computer to perform the method as described in the second aspect or any alternative implementation of the second aspect.
  • An eleventh aspect of the present application provides a communication apparatus, the communication apparatus may include: a processor, a memory; the memory is configured to store an instruction; the processor is configured to execute the instruction in the memory, so that the communication The apparatus performs the method of any of the preceding first aspect or the first aspect.
  • a twelfth aspect of the present application provides a communication device, which may include: a processor, a memory; the memory is configured to store an instruction; the processor is configured to execute the instruction in the memory, such that the communication
  • the apparatus performs the method of any of the preceding second or second aspect.
  • the embodiments of the present application have the following advantages:
  • At least two TCP channels are established between the Openflow switch and the Openflow controller, and each TCP channel has a corresponding priority, and then the Openflow switch selects an appropriate TCP channel according to the priority of the packet.
  • the Openflow switch and the Openflow controller establish multiple TCP channels, and the packet congestion can be prevented from being congested in a TCP channel as compared with a TCP channel in the existing solution.
  • Each TCP channel has a corresponding priority, and the corresponding TCP channel can be selected according to the priority of the packet. For example, you can select a TCP channel with a high priority to transmit packets with a high priority. This prevents packets with high priority from being blocked in the TCP channel and reduces packet congestion in the TCP channel.
  • FIG. 1 is a network architecture diagram of an embodiment of the present application
  • FIG. 2 is a schematic diagram of an embodiment of a method for data transmission in an embodiment of the present application
  • FIG. 3 is a schematic diagram of another embodiment of a method for data transmission in an embodiment of the present application.
  • FIG. 4 is a schematic diagram of another embodiment of a method for data transmission in an embodiment of the present application.
  • FIG. 5 is a schematic diagram of another embodiment of a method for data transmission in an embodiment of the present application.
  • FIG. 6 is a schematic diagram of another embodiment of a method for data transmission in an embodiment of the present application.
  • FIG. 7 is a schematic diagram of an embodiment of an OpenFlow switch according to an embodiment of the present application.
  • FIG. 8 is a schematic diagram of an embodiment of an Openflow controller according to an embodiment of the present application.
  • FIG. 9 is a schematic diagram of another embodiment of an Openflow switch according to an embodiment of the present application.
  • FIG. 10 is a schematic diagram of another embodiment of an Openflow controller according to an embodiment of the present application.
  • the embodiment of the present invention provides a method for transmitting data and a related device, which are used to solve the problem that a message is blocked in a transmission channel in an OpenFlow network, reduce data loss during data transmission, and improve data transmission efficiency.
  • FIG. 1 is a network architecture diagram in the embodiment of the present application.
  • the Openflow network is mainly composed of Openflow controllers and Openflow switches.
  • An Openflow controller can establish TCP connections with multiple Openflow switches through Openflow protocols, and OpenFlow switches can also establish connections.
  • the OpenFlow switch can also be connected to the terminal device for forwarding data of the terminal device or delivering data to the terminal device.
  • the network architecture in the embodiment of the present application may include multiple Openflow controllers or Openflow switches.
  • the three Openflow switches of Openflow switch 1, Openflow switch 2, and Openflow switch 3 are illustrated as an example.
  • a TCP channel needs to be established between the Openflow controller and the Openflow switch.
  • the TCP channel is a channel through which the Openflow controller and the Openflow switch are directly connected through a link.
  • the Openflow controller and the Openflow switch 1 establish TCP channel 1
  • the Openflow controller and the Openflow switch 2 establish TCP channel 2
  • the Openflow controller and the Openflow switch establish TCP channel 3.
  • the physical locations of Openflow switches may also be far apart. Therefore, on a TCP channel, there may be intermediate network devices.
  • the Openflow controller establishes the TCP channel 3 with the Openflow switch 3, it also passes through the Openflow switch 4 (not shown).
  • the Openflow switch 4 also establishes a TCP channel 4 with the Openflow controller alone.
  • the Openflow switch 4 is only in the Data forwarding is performed on TCP channel 3.
  • Openflow switch 4 is an intermediate network device of the TCP channel 3.
  • the intermediate network device may be one or multiple, and may be an OpenFlow switch or other network device in the network, which is not limited herein.
  • the Openflow switch 4 when there is data transmission in the TCP channel 3, since the Openflow controller also establishes the TCP channel 4 with the Openflow switch 4, the Openflow switch 4 not only receives the data sent by the Openflow controller, but also needs to forward the Openflow controller through the TCP.
  • Channel 3 sends data to Openflow switch 3. Therefore, when there is a large amount of data transmission in TCP channel 3 and TCP channel 4, the large amount of data may be blocked in Openflow switch 4, and TCP channel 3 is controlled by Openflow controller or Openflow.
  • the keep-alive packets sent by switch 3 may be blocked on OpenFlow switch 4, causing the TCP channel 3 protocol to be disconnected.
  • the embodiment of the present application provides a data transmission method.
  • the data transmission method in the embodiment of the present application A schematic diagram of one embodiment.
  • an Openflow switch and an Openflow controller are used as an example.
  • An Openflow controller and an Openflow switch establish at least two TCP channels, and the at least two TCP channels may be two TCP channels or five TCPs. Channel, not limited here.
  • only two TCP channels are used as an example.
  • Two TCP channels are established between the Openflow controller and the Openflow switch, that is, two TCP connections, including TCP channel 1 and TCP channel 2.
  • the specific process of establishing the TCP channel 1 and the TCP channel 2 may be that the first port of the Openflow switch initiates establishment to the third port of the Openflow controller, and the second port of the Openflow switch on the Openflow switch.
  • the first port and the second port are different ports on the Openflow switch.
  • the port number of the first port may be 61647
  • the port number of the second port may be 61648.
  • the third port may be a well-known port on the OpenFlow controller, for example, a port number of 6653, or a port agreed by the Openflow controller and the Openflow switch, which is not limited herein.
  • the embodiment of the present application is only an example of establishing two TCP channels. In addition, three TCP channels and four TCP channels may be established. The specific process may be similar to that provided in the embodiment of the present application, and details are not described herein.
  • the TCP channel 1 and the TCP channel 2 can be used to transfer data transmitted between the Openflow controller and the Openflow switch.
  • Each of the two TCP channels corresponds to a priority.
  • TCP channel 1 corresponds to the first priority
  • TCP channel 2 corresponds to the second priority.
  • the packets transmitted by the Openflow controller and the Openflow switch also have corresponding priorities.
  • the Openflow switch or the Openflow controller can select the corresponding TCP channel to transmit the packet according to the priority of the packet. For example, an Openflow switch or an Openflow controller can select a TCP channel with a high priority to transmit the message for a high priority message.
  • the OpenTCP switch establishes a first TCP channel, that is, TCP channel 1, between the first port of the Openflow switch and the third port of the Openflow controller, and the Openflow switch is in the second port of the Openflow switch and Openflow.
  • the second TCP channel established by the third port of the controller is TCP channel 2.
  • the first port and the second port are different ports.
  • the Openflow switch can also be on other ports of the port.
  • a TCP channel is established with the third port of the OpenFlow controller, which is not limited in this embodiment of the present application.
  • Each TCP channel established by the Openflow switch has a corresponding priority
  • each packet transmitted between the Openflow switch and the Openflow controller also has a corresponding priority
  • the Openflow switch or the Openflow controller can be configured according to The priority of each message is the TCP channel for which each message is selected for transmission.
  • a high-priority packet can be transmitted through a high-priority TCP channel.
  • Packets transmitted in a high-priority TCP channel can be processed or transmitted preferentially by the Openflow switch or Openflow controller. Forward. Therefore, packets of different priorities can be transmitted through different TCP channels, which can improve the capacity of data transmission between the Openflow switch and the OpenFlow controller, and can prevent packets with high priority from being blocked in the TCP channel.
  • a schematic diagram of an example may include:
  • the Openflow switch and the Openflow controller establish at least two TCP channels.
  • the at least two TCP channels are initiated by an Openflow switch, and the Openflow switch establishes at least two TCP connections with at least two ports on the Openflow switch and one port on the Openflow controller.
  • the Openflow switch establishes a first TCP channel between the first port of the Openflow switch and the third port of the Openflow controller, and the Openflow switch is in the second port of the Openflow switch and the Openflow A second TCP channel is established between the third ports of the controller, and the first port and the second port are different ports on the Openflow.
  • the at least two TCP channels may include two TCP channels, and may also include three TCP channels, and may also include six TCP channels.
  • the third port may be a well-known port, for example, 6653, or may be a port agreed with the Openflow switch, which is not limited herein.
  • the specific process of establishing a TCP channel may be: taking a TCP channel as an example, the Openflow switch initiates a TCP setup request to the Openflow controller through the port on the Openflow switch, and the Openflow controller listens to the port on the Openflow controller, and the Openflow controller After receiving the setup request sent by the Openflow switch, the listening port sends a first acknowledgement message to the Openflow switch to reply to the setup request, and after receiving the first acknowledgement message, the Openflow switch sends a second acknowledgement message to the Openflow controller. To notify the Openflow controller to receive the first confirmation message. It should be understood that the specific process of establishing at least two TCP channels is similar to the specific process of establishing the one TCP channel, and details are not described herein again.
  • the Openflow switch sends an announcement message to the Openflow controller.
  • the Openflow switch can send at least two notification messages to the Openflow controller through each of the at least two TCP channels.
  • Openflow can send the first notification message to the Openflow controller through the first TCP channel, and the Openflow switch can also Sending a second notification message to the Openflow controller through the second TCP channel, the Openflow switch may also send a third notification message to the Openflow controller through a third TCP channel, and so on, the number of the notification message and the at least two The number of TCP channels corresponds.
  • the at least two notification messages may include priority information of the at least two channels, for example, the first notification message may include a first priority of the first TCP channel, and the second notification message may include a second TCP channel. Second priority, etc., and so on.
  • the Openflow controller may obtain the priority of each of the at least two TCP channels by using the at least two advertisement messages. If the priority of the TCP channel is not included in the advertisement message, the advertisement message may include information of the Openflow switch, for example, address information, device information, or version information.
  • the priorities of the at least two TCP channels may be sent by the Openflow switch to the OpenFlow controller through an announcement message, and the priorities of the at least two TCP channels may also be preset on the Openflow switch and the Openflow controller.
  • the application embodiment stipulates the priority of the Openflow switch and the Openflow controller, that is, the manner of presetting the priority is not limited. For example, the priority of the TCP channel established by the Openflow switch through the first port number is the first priority, and the priority of the TCP channel established by Openflow through the second port is the second priority, and so on.
  • the Openflow switch first initiates a TCP connection establishment request on the first port, and the priority of the TCP channel established by the Openflow on the first port and the Openflow controller is the first priority, and the Openflow switch initiates on the second port.
  • the priority of the TCP channel established by the Openflow on the second port and the Openflow controller is the second priority, and so on.
  • the Openflow switch determines a TCP channel priority.
  • the Openflow switch may determine the priority of the at least two TCP channels before sending the priority of the at least two TCP channels.
  • the priority of the at least two TCP channels may also be determined after the at least two TCP channels are transmitted. If the priority of the at least two TCP channels is that the Openflow switch and the OpenFlow controller are in advance, the execution sequence of the step 302 and the step 303 in the embodiment of the present application is not limited, and the step 302 may be performed first, or the step 303 may be performed first. Step 302 and step 303 can also be performed at the same time, which is not limited herein.
  • the Openflow controller determines a TCP channel priority.
  • the Openflow controller may obtain the priorities of the at least two TCP channels from the at least two notification messages, for example, The Openflow controller may obtain a first priority of the first channel and a second priority of the second channel from the at least two notification messages.
  • the priority of the at least two TCP channels may also be that the Openflow controller agrees with the Openflow in advance.
  • the priority of the TCP channel established by the Openflow switch through the first port number is the first priority
  • the priority of the TCP channel established by Openflow through the second port is the second priority
  • the Openflow switch first initiates a TCP connection establishment request on the first port
  • the priority of the TCP channel established by the Openflow on the first port and the Openflow controller is the first priority
  • the Openflow switch initiates on the second port.
  • the TCP connection establishment request time is after the Openflow switch initiates TCP establishment through the first port
  • the priority of the TCP channel established by the Openflow on the second port and the Openflow controller is the second priority.
  • the Openflow switch and the Openflow controller transmit the packet according to the priority of the packet.
  • the Openflow switch and the controller can transmit packets according to the priority of the packet.
  • the Openflow switch can select the corresponding TCP channel to transmit the reported packet according to the priority of the reported packet.
  • the Openflow controller can also prioritize the delivered packet. Select the corresponding TCP channel to transmit the delivered packet.
  • the priority of the packet may be allocated by the OpenFlow switch or the Openflow controller. The specific allocation manner may be based on the type of the packet, or according to the length of the packet, which is not limited herein. .
  • an Openflow switch can assign a high-priority TCP channel to a high-priority report packet.
  • the Openflow controller can also assign a high-priority TCP channel to a high-priority delivered message.
  • An OpenFlow switch or an OpenFlow controller can preferentially send packets with a higher priority. If an intermediate network device exists in the TCP channel, the intermediate network device preferentially forwards the packets transmitted in the higher priority TCP channel.
  • the Openflow switch establishes at least two TCP channels between the ports of the OpenFlow controller on at least two ports of the Openflow switch, and the at least two TCP channels have corresponding priorities.
  • Each packet also has a priority.
  • the Openflow switch and the Openflow controller can select the corresponding TCP channel to transmit the packet according to the priority of the packet. Therefore, packets with a higher priority can be selected for the TCP channel with a higher priority. Packets with a higher priority can be transmitted preferentially.
  • the intermediate network device preferentially forwards packets with a higher priority.
  • the packets transmitted in the TCP channel with the highest priority can be transmitted preferentially.
  • the intermediate network device preferentially forwards the packets transmitted in the TCP channel with the higher priority.
  • the Openflow controller listens to the port 6653; the Openflow switch sets the source port numbers to 61647, 61648, and 61649, and uses the ports with the source port numbers 61647, 61648, and 61649 to openflow.
  • the port with the destination port number of 6653 on the controller initiates a TCP connection establishment request, including a first setup request, a second setup request, and a third setup request, where the first setup request is used to establish a first connection with the destination port 6623 through the source port 61647.
  • the TCP channel that is, the first TCP connection
  • the second setup request is used to establish a second TCP channel with the destination port 6623 through the source port 61648, that is, the second TCP connection
  • the third setup request is used to pass the source port 61649 and the destination port 6623.
  • Establishing a third TCP channel that is, a third TCP connection; after receiving the first setup request, the second setup request, and the third setup request, the Openflow controller passes the source port 61647, the source port 61648, and the source port 61649 to the Openflow switch respectively. Perform a "three-way handshake" to establish three TCP connections, namely the first TCP channel, the second TCP channel, and the third TCP channel.
  • the Openflow switch sends a first advertisement message to the Openflow through the first TCP channel, a second advertisement message to the Openflow through the second TCP channel, and a third notification message to the Openflow through the third TCP channel, where the first notification message is included.
  • a first priority of the first TCP channel the second notification message includes a second priority of the second TCP channel
  • the third notification message includes a third priority of the third TCP channel;
  • the Openflow controller acquires the first priority of the first TCP channel, the second priority of the second TCP channel, and the third TCP channel.
  • the Openflow controller may use the first priority as the first priority of the first TCP channel, or may reassign a priority to the first TCP channel, and then notify the Openflow switch of the reassigned priority.
  • the OpenFlow controller determines that the priority of the second TCP channel is the same as the priority of the third TCP channel, and is not described here; After both the low switch and the Openflow controller determine the priority of the first TCP channel, the second TCP channel, and the third TCP channel, the Openflow switch or the Openflow controller assigns a priority to each packet that needs to be transmitted, and then according to the packet. The priority is assigned to the TCP channel for transmission, and the packet with the highest priority is assigned to the TCP channel with the higher priority.
  • the intermediate network device can preferentially forward the packets transmitted in the TCP channel with the higher priority. Therefore, the priority is high.
  • the packets are transmitted through the TCP channel with the highest priority. This improves the transmission efficiency of packets with high priority and prevents packets with high priority from being blocked in the TCP channel.
  • FIG. 4 a schematic diagram of another embodiment of the data transmission method in the embodiment of the present application includes:
  • the Openflow switch and the Openflow controller establish at least two TCP channels.
  • the step 401 in the embodiment of the present application is similar to the step 301 in the foregoing FIG. 3, and details are not described herein again.
  • the Openflow switch sends a session priority message to the Openflow controller.
  • the Openflow switch sends at least two session priority messages to the Openflow controller through the at least two TCP channels, and the Openflow switch sends a session priority message from each TCP channel to the Openflow controller, where the at least two session priority messages are included.
  • the priority of the at least two TCP channels For example, the first session priority message carries the first priority of the first TCP channel, the second session priority message carries the second priority of the second TCP channel, and the third session priority message carries the third TCP channel. The third priority, and so on.
  • the Openflow switch can also send a keep-alive message to the Openflow controller through each of the at least two TCP channels, or Openflow control.
  • An optional step of sending a message for obtaining information of the Openflow switch to the OpenFlow switch is not limited herein.
  • the Openflow controller determines a TCP channel priority.
  • the Openflow controller After the Openflow controller receives the at least two session priority messages sent by the Openflow, the Openflow controller determines the priorities of the at least two TCP channels, and the specific manner in which the Openflow controller determines the priorities of the at least two TCP channels may be:
  • the at least two session priorities carry the priorities of the at least two TCP channels, and the Openflow controller obtains the priority of the at least two TCP channels sent by the Openflow switch from the at least two session priorities, and the Openflow controller
  • the priority carried in the at least two session priorities may be used as the priority of the at least two TCP channels, and the Openflow controller may also re-prioritize the at least two TCP channels.
  • the Openflow controller receives the first session priority message sent by the Openflow switch through the first TCP channel, and the second session priority message sent by the Openflow switch through the second TCP channel, where the first session priority carries the first a first priority of the TCP channel, where the second session priority carries a second priority of the second TCP channel; the Openflow controller obtains the first TCP from the first session priority message and the second session priority message respectively The first priority of the channel and the second priority of the second TCP channel.
  • the Openflow controller can use the first priority as the priority of the first TCP channel, and the second priority as the priority of the second TCP channel, and the Openflow controller can also re-assign the first priority to the first TCP channel. And/or re-assigning the second priority to the second TCP channel, which is not limited herein.
  • the Openflow controller sends a session priority reply message to the Openflow switch.
  • the Openflow controller After determining the priority of the at least two TCP channels, the Openflow controller generates at least two session priority reply messages, and each session priority reply message corresponds to a session priority message sent by an Openflow switch.
  • the session priority reply message may include a priority of the at least two TCP channels obtained from the at least two session priority messages, and may also include a priority reassigned by the Openflow controller, or the Openflow controller and the The fields agreed by the Openflow switch.
  • the Openflow controller obtains the first priority in the first TCP channel from the first session priority message, according to the first session priority.
  • the level message generates a first priority reply message.
  • the first priority reply message may include the first priority, or may be a second priority assigned by the Openflow controller to the first TCP channel, or may be a field agreed by the Openflow controller and the Openflow switch. .
  • the Openflow controller notifies the Openflow switch that the first priority is the priority of the first TCP channel by using the first priority reply message;
  • the session priority reply message includes the second priority, where the second priority is the priority assigned by the Openflow controller to the first TCP channel, and the Openflow controller notifies the Openflow switch by using the first session priority message.
  • the priority of the first TCP channel is a second priority; the first session priority reply message may also be a field including the Openflow controller and the Openflow switch, for example, if the Openflow controller and the Openflow switch agree When the first byte in the first session priority reply message is 0xFF, the Openflow controller confirms that the first priority in the first session priority is the priority of the first TCP channel, or when the first session When the first byte in the priority reply message is 0x01, the Openflow controller confirms that the first priority in the first session priority is the first TCP channel.
  • the priority level may be that, if the first session priority reply message includes 0x01, the Openflow controller determines that the priority of the first TCP channel is the first priority, if the first session priority reply message is included 0x02, the Openflow controller determines that the priority of the first TCP channel is the second priority. If the first session priority reply message includes 0x03, the Openflow controller determines that the priority of the first TCP channel is the third. Priority, etc.; the session priority information carries a negative field, for example, 0x00, to notify the Openflow switch that the Openflow controller does not agree to use the first priority as the priority of the first TCP channel, and then The first TCP channel is assigned a priority by the OpenFlow switch or the OpenFlow controller, which is not limited herein.
  • the Openflow switch determines a TCP channel priority.
  • the Openflow switch can determine the priority of the at least two TCP channels. For example, the Openflow switch receives the first session priority reply message sent by the Openflow controller through the first TCP channel, where the first session priority reply message is used to reply to the first session priority message sent by the Openflow switch to the Openflow controller.
  • the first session priority includes the first priority of the first TCP channel.
  • the Openflow switch confirms that the priority of the first TCP channel is the first priority; if the first session priority reply message is included
  • the OpenFlow switch and the Openflow controller stipulate characters, for example, 0xFF, 0x01, etc., the Openflow switch determines that the priority of the first TCP channel is the first priority; if the first session priority reply message includes the second Priority, the Openflow switch uses the second priority as the priority of the first TCP channel.
  • the Openflow switch and the Openflow controller transmit the packet according to the priority of the packet.
  • the step 406 in the embodiment of the present application is similar to the step 305 in the foregoing FIG. 3, and details are not described herein again.
  • the Openflow switch after the Openflow switch establishes at least two TCP channels with the Openflow controller, the Openflow switch sends the priority of the at least two TCP channels to the Openflow switch by using the session priority message, and the switch receives the at least two After the priority of the TCP channel, a session priority reply message is sent to the Openflow switch.
  • the Openflow controller may use the received priority as the priority of the at least two TCP channels, or may re-prioritize the at least two TCP channels, and the Openflow controller sends a session priority reply message to the Openflow switch.
  • the Openflow switch determines the priority of each of the at least two TCP channels.
  • the Openflow switch can negotiate the priority of the TCP channel with the Openflow controller, adding a way to prioritize the at least two TCP channels. And assigning a priority to each TCP channel, and then determining the TCP channel for transmitting the packet according to the priority of the packet.
  • the packet with the higher priority can be transmitted through the TCP channel with the higher priority, and the intermediate network device can preferentially forward or transmit the packet.
  • a packet transmitted in a TCP channel with a high priority reduces the number of packets blocked in the TCP channel.
  • the Openflow controller listens to the port 6653; the Openflow switch sets the source port numbers to 61647, 61648, and 61649, and the source port number is 61647.
  • the ports of 61648 and 61649 initiate a TCP connection establishment request to the port of destination port number 6653 on the Openflow controller. After receiving the establishment request, the Openflow controller performs the connection with the Openflow switch through the source port 61647, the source port 61648, and the source port 61649 respectively.
  • Three TCP connections that is, a first TCP channel, a second TCP channel, and a third TCP channel; after that, the Openflow switch sends a first session priority message to Openflow through the first TCP channel, and passes through the second TCP channel.
  • the Openflow controller may use the first priority as the first priority of the first TCP channel, or may be the first
  • the TCP channel reassigns a priority, then informs the Openflow switch of the reassigned priority, and then sends a first session priority reply message to the Openflow switch.
  • the first session priority reply message sent by the Openflow controller to the Openflow switch includes one byte, for example, 0xFF, that is, the Openflow switch is notified that the Openflow controller uses the first priority as the priority of the first TCP channel.
  • the first session priority reply message includes the first priority, that is, the Openflow switch is notified that the Openflow controller uses the first priority as the priority of the first TCP channel, or the first session priority reply
  • the message includes a fourth priority, that is, notifying the Openflow switch that the Openflow controller uses the fourth priority as the priority of the first TCP channel.
  • the OpenFlow controller determines that the priority of the second TCP channel is the same as the priority of the third TCP channel, and is not described here.
  • the OpenFlow switch and the Openflow controller both determine the first TCP channel.
  • the Openflow switch or the Openflow controller assigns a priority to each packet that needs to be transmitted, and then allocates a TCP channel according to the priority of the packet for transmission, which has a high priority.
  • the packets are transmitted to the TCP channel with the highest priority.
  • the intermediate network device can forward the packets transmitted in the TCP channel with the highest priority. Therefore, the packets with the higher priority are transmitted through the TCP channel with the higher priority. The transmission efficiency of packets with high priority is prevented. Packets with high priority are blocked from being blocked in the TCP channel.
  • the priorities of the at least two TCP channels may be determined by an Openflow switch or an Openflow controller.
  • the Openflow switch and the Openflow controller can also determine the priority of the at least two TCP channels by means of a feature reply message.
  • the following is a description of another specific process of the data transmission method provided by the embodiment of the present application. Referring to FIG. 5, another embodiment of the data transmission method in the embodiment of the present application includes:
  • the Openflow switch and the Openflow controller establish at least two TCP channels;
  • the step 501 in the embodiment of the present application is similar to the step 301 in the foregoing FIG. 3, and details are not described herein again.
  • the Openflow switch sends a hello packet to the OpenFlow controller.
  • the at least two keepalive messages are sent to the OpenFlow controller through each of the at least two TCP channels.
  • the Openflow switch sends the first hello packet to the Openflow controller through the first TCP channel.
  • the Openflow switch sends the second hello packet to the Openflow controller through the second TCP channel.
  • the Hello message may be an OFPT_HELLO message in the Openflow protocol, and the keep-alive message may include a negotiated version of the current Openflow protocol, and other Openflow elements, etc., to set a connection between the Openflow switch and the Openflow controller.
  • the Openflow controller sends a feature request message to the Openflow controller.
  • the Openflow controller After receiving the hello packet sent by the Openflow switch, the Openflow controller determines that the negotiated version in the hello packet is consistent with the negotiated version of the Openflow protocol of the Openflow controller, and sends a feature request message to the Openflow controller.
  • the feature request message is used to obtain address information, device information, and the like of the Openflow switch.
  • the feature request message may be an OFPT_FEATURES_REQUEST message in the Openflow protocol.
  • the Openflow switch determines a TCP channel priority.
  • the Openflow switch determines the priority of each of the at least two TCP channels, and the priority of each of the at least two TCP channels may be assigned by the Openflow switch.
  • the execution sequence of the step 504 and the step 502 is not limited, and the step 502 may be performed first, or the step 504 may be performed first, which is not limited herein.
  • the Openflow switch sends a feature reply message to the Openflow controller.
  • the Openflow switch After receiving the feature request message sent by the Openflow controller, the Openflow switch generates a feature reply message, where the feature reply message includes address information or device information of the Openflow switch, and at least two of the feature reply messages are added.
  • the priority field of the TCP channel to inform the Openflow controller of the priority of the at least two TCP channels.
  • the feature reply message may be an OFPT_FEATURES_REPLY message in the Openflow protocol.
  • the feature reply message adds 5 bytes, the first byte represents the first priority of the first TCP channel, the second byte represents the priority of the second TCP channel, and so on, or is added. 2 bytes, the first bit is used to identify the first priority of the first TCP channel, the second is used to identify the priority of the second TCP channel, and so on.
  • the Openflow controller determines a TCP channel priority.
  • the Openflow controller may obtain the priority of the at least two TCP channels established by the Openflow switch and the Openflow controller from the feature reply message.
  • the specific manner of obtaining is that the feature reply message adds 5 bytes in addition to the address of the Openflow switch and the device information, and the first byte represents the first priority of the first TCP channel. Two bytes represent the priority of the second TCP channel, and so on, or an 8-bit character is added, the first bit is used to identify the first priority of the first TCP channel, and the second bit is used to identify the second TCP channel. Priority, and so on, etc., which are not limited herein.
  • the Openflow switch and the Openflow controller transmit the packet according to the priority of the packet.
  • the step 507 in the embodiment of the present application is similar to the step 305 in the foregoing FIG. 3, and details are not described herein again.
  • the Openflow switch after the Openflow switch establishes at least two TCP channels with the Openflow controller, the Openflow switch sends the priority of the at least two TCP channels to the Openflow controller by using a feature reply message, so that the Openflow controller determines The priority of each of the at least two TCP channels.
  • the corresponding TCP channel is determined according to the priority of each packet, and the packet with the highest priority of the packet can be transmitted through the TCP channel with the highest priority through the corresponding TCP channel, and the intermediate network device preferentially forwards the priority with high priority. Packets transmitted in the TCP channel can prevent packets with high priority from being blocked in the TCP channel and reduce packet blocking in the TCP channel.
  • the Openflow controller listens to port 6653; the Openflow switch sets the source port numbers to 61647, 61648, and 61649, and uses the port numbers of the source port numbers 61647, 61648, and 61649 to The port with the destination port number of 6653 on the Openflow controller initiates a TCP connection establishment request. After receiving the establishment request, the Openflow controller performs a "three-way handshake" with the Openflow switch through the source port 61647, the source port 61648, and the source port 61649 respectively.
  • the three TCP connections that is, the first TCP channel, the second TCP channel, and the third TCP channel; afterwards, the Openflow switch sends a hello message to the Openflow controller through the first TCP channel, the second TCP channel, and the third TCP channel, respectively.
  • the hello packet includes the negotiated version of the current Openflow protocol.
  • the Openflow controller determines that the Openflow switch sends the hello packet to the OpenFlow controller through the first TCP channel, the second TCP channel, and the third TCP channel.
  • the version is the same as the negotiated version of the Openflow protocol on the Openflow controller.
  • a TCP channel, a second TCP channel, and a third TCP channel respectively send a feature request message to the Openflow switch for requesting information such as address information and device information of the Openflow switch; then the Openflow switch sends the first message to the Openflow through the first TCP channel.
  • the Openflow controller receives the first After acquiring a feature reply message, a second feature reply message, and a third feature reply message, acquiring a first priority of the first TCP channel, a second priority of the second TCP channel, and a third priority of the third TCP channel;
  • the Openflow controller can use the first priority as the first priority of the first TCP channel.
  • the OpenFlow controller determines that the priority of the second TCP channel is the same as the priority of the third TCP channel, and is not described here.
  • the OpenFlow switch and the Openflow controller both determine the first TCP channel. After the priority of the second TCP channel and the third TCP channel, the Openflow switch or the Openflow controller assigns a priority to each packet that needs to be transmitted, and then allocates a TCP channel according to the priority of the packet for transmission, which has a high priority.
  • the packets are transmitted to the TCP channel with the highest priority.
  • the intermediate network device can forward the packets transmitted in the TCP channel with the highest priority. Therefore, the packets with the higher priority are transmitted through the TCP channel with the higher priority. The transmission efficiency of packets with high priority is prevented. Packets with high priority are blocked from being blocked in the TCP channel.
  • FIG. 6 is a schematic diagram of another embodiment of a method for data transmission in the embodiment of the present application, including:
  • the Openflow switch and the Openflow controller establish at least two TCP channels.
  • the step 601 in the embodiment of the present application is similar to the step 301 in the foregoing FIG. 3, and details are not described herein again.
  • the Openflow switch sends an announcement message to the Openflow controller.
  • the advertisement message in the embodiment of the present application may be the foregoing advertisement message in FIG. 3, or may be the session priority message in FIG. 4, and may also be the feature reply message in FIG. 5, when the notification message is in the foregoing figure.
  • Step 602 in the embodiment of the present application is similar to step 302 in FIG. 3, and when the advertisement message is the session priority message in FIG. 4, step 602 in the embodiment of the present application is The step 402 in the foregoing FIG. 4 is similar.
  • the advertisement message is the feature reply message in the foregoing FIG. 5
  • the step 602 in the embodiment of the present application is similar to the step 505 in the foregoing FIG. 5, and details are not described herein again.
  • the Openflow switch determines a TCP channel priority.
  • the Openflow switch determines the priority of the at least two TCP channels before sending the notification message to the Openflow controller or after sending the notification message.
  • the Openflow switch determines the priority of the TCP channel after receiving the notification message.
  • the notification message is the feature reply message in FIG. 5
  • the Openflow switch The priority of the TCP channel may be determined before the notification message is sent, or when the priority of the at least two TCP channels is not included in the notification message, the priority of the at least two TCP channels may also be the Openflow switch and Pre-configured on the Openflow controller.
  • step 603 in the embodiment of the present application is similar to the step 303 in the foregoing FIG. 3, the step 405 in the foregoing FIG. 4, or the step 505 in the foregoing FIG. 5, and details are not described herein again.
  • the Openflow controller determines a TCP channel priority.
  • the Openflow controller may determine the priority of the at least two TCP channels after receiving the message sent by the Openflow switch, or the Openflow controller may agree with the Openflow switch to prioritize the at least two TCP channels.
  • step 604 in the embodiment of the present application is similar to the step 304 in the foregoing FIG. 3, the step 404 in the foregoing FIG. 4, or the step 506 in the foregoing FIG. 5, and details are not described herein again.
  • the Openflow switch determines a packet priority.
  • the Openflow switch can obtain the priority assigned by the Openflow controller for each message. Further, the priority of the packet may include a packet priority and a forwarding priority, and the packet priority may be used by an Openflow controller or an Openflow switch to process a packet priority, and the Openflow switch preferentially handles a higher priority.
  • the forwarding priority is the priority of the intermediate network device to forward the packet, and the intermediate network device preferentially forwards the packet with the highest forwarding priority.
  • the forwarding priority of the packet is set to be the priority of the packet. For example, if the packet priority of the packet is the first priority, the forwarding priority of the packet is also the first. Priority: If the packet priority of the packet is the second priority, the forwarding priority of the packet is also the second priority.
  • the OpenFlow switch can also assign a priority to the report message according to the packet type of the report packet.
  • the report message is a packet sent by the Openflow switch to the OpenFlow controller.
  • the priority of the protocol packet can be higher than other packets.
  • the priority of the network protocol is to preferentially transmit protocol packets or to allocate more network resources to the protocol packets.
  • the specific method for reserving network resources may be based on the resource reservation protocol (RSVP).
  • the network resource is reserved for the packet to prevent the protocol packet from being blocked in the TCP channel, causing the protocol to be broken. It should be understood that the priority of the reported message can also be assigned by the OpenFlow controller and then delivered to the Openflow switch.
  • the priority of the flow table message delivered by the Openflow controller can only be assigned by the Openflow controller.
  • the Openflow controller determines a packet priority.
  • the Openflow controller can assign a priority to each packet according to the packet type of each packet.
  • the packets with higher priority can preferentially transmit or allocate more network resources.
  • the priority of the packet may include a packet priority and a forwarding priority, and the packet priority may be used by an Openflow controller or an Openflow switch to process a packet priority, and the Openflow switch preferentially handles a higher priority.
  • the forwarding priority is the priority of the intermediate network device to forward the packet, and the intermediate network device preferentially forwards the packet with the highest forwarding priority.
  • the forwarding priority of packets can be set to correspond to the packet priority. For example, if the packet priority of the packet is the first priority, the forwarding priority of the packet is also the first priority.
  • the packet priority of the packet is the second priority
  • the packet is The forwarding priority is also the second priority.
  • the packets in the OpenFlow network are also divided into protocol packets and flow table packets. If the protocol packets are blocked in the TCP channel, the OpenFlow protocol will be broken, causing the TCP channel to be disconnected and data forwarding to fail. Therefore, the protocol is reported.
  • the priority of the file allocation can be higher than the packets such as the flow table message. For example, the priority of the protocol packet is higher than that of the important flow table packet, and the priority of the traffic packet is higher than that of the non-importable flow table packet. Hello message. A higher priority is assigned to the protocol packets.
  • the protocol packets are preferentially transmitted during the transmission, or more network resources are allocated to the protocol packets.
  • the priority of the flow table packet can be configured by the OpenFlow controller.
  • the flow table packet includes multiple flow tables. There may be dependencies between multiple flow tables. For example, routing table and interface information, and address resolution protocol (address)
  • the resolution protocol (ARP) information has an association relationship.
  • the interface information and the ARP information are stored in the lower-level flow table of the routing table. If the interface information and the ARP information are not delivered, the lower-level table cannot be obtained when the routing table is delivered. In the case of data loss, the priority of the flow table can be higher than the priority of the flow table of the flow table of the flow table.
  • the priority of the packet can be assigned by the Openflow switch or by the Openflow controller.
  • the priority of the packet can be assigned by the Openflow switch, and the priority of the delivered message is assigned by the Openflow controller. Or the priority of all packets is assigned by the Openflow controller. For example, a corresponding list of packets and priorities is generated.
  • a transport list is configured for each TCP channel, and then sent to the Openflow switch by the Openflow controller.
  • the Openflow switch can transmit the reported message according to the priority assigned by the Openflow controller.
  • the execution sequence of the step 605 and the step 606 is not limited, and the step 605 may be performed first, or the step 606 may be performed first. Not limited.
  • the Openflow switch allocates a TCP channel for the packet.
  • the Openflow switch can allocate a corresponding TCP channel from the at least two TCP channels for the report packet, and the report packet is sent by the Openflow switch to the Openflow controller, and the priority can be sent. Different messages are assigned to different TCP channels. For example, a first TCP channel is allocated for the first priority message, and a second TCP channel is allocated for the second priority message, and the first priority message is transmitted on the first TCP channel, and the second priority is reported. The packet is transmitted on the second TCP channel. If the priority of the protocol packet is higher than other packets, the protocol packet can be assigned a TCP channel to prevent protocol packets and other packets from being blocked. In a TCP channel.
  • the Openflow switch allocates a TCP channel to each packet.
  • the Openflow switch allocates an Access Control List (ACL) for each TCP channel configuration, or receives an ACL sent by the OpenFlow controller.
  • ACL corresponding to each TCP channel includes packets that can be transmitted through the TCP channel.
  • the ACL can be used to determine the TCP channel for the packet transmission.
  • the packets in the ACL can be assigned according to the priority of the packets. For example, the packets of the first priority are assigned to the first ACL, the packets of the second priority are assigned to the second ACL, and the packets of the third priority are allocated. To the third ACL, and so on.
  • the Openflow switch allocates a TCP channel for each packet.
  • the Openflow switch reserves network resources for packets with high priority. For example, the Openflow switch transmits a packet with a high priority. Then, the Openflow switch A separate TCP channel can be reserved for the packet in advance, so that the packet with the highest priority is transmitted through the TCP channel, and the packet with the high priority is blocked in the TCP channel.
  • the Openflow switch can also obtain the bandwidth usage of each of the at least two TCP channels, and allocate a part of the packets of the TCP channel with a high bandwidth usage to the TCP channel with low bandwidth usage. For example, if the bandwidth usage of the first TCP channel is greater than the first threshold, and the bandwidth usage of the second TCP channel is lower than the second threshold, the packet to be transmitted on the first TCP channel may be allocated to the second TCP. The channel is transmitted. It can improve the efficiency of message transmission, reduce the congestion of data in the TCP channel, and can also make reasonable use of network resources to avoid waste of network resources.
  • the Openflow controller allocates a TCP channel for the packet.
  • the Openflow controller can allocate a corresponding TCP channel from the at least two TCP channels for each message. Because there are multiple TCP channels, the priorities can be different. Messages are assigned to different TCP channels. For example, a mapping table may be preset in the Openflow switch. If the priority of the packet corresponds to the first priority of the first TCP channel, the first TCP channel is allocated to the packet, and the priority of the packet is The second priority of the second TCP channel corresponds to the second TCP channel. Therefore, in a practical application, a TCP channel can be separately allocated for a packet with a high priority to prevent protocol packets and other packets from being blocked in one TCP channel.
  • the OpenFlow controller allocates a TCP channel to each packet.
  • the Openflow controller configures an ACL for each TCP channel.
  • the ACL corresponding to each TCP channel includes a packet that can be transmitted through the TCP channel.
  • the ACL can be used to determine the TCP channel for the packet to be transmitted.
  • the packet in the ACL can be assigned according to the priority of the packet. For example, the packet of the first priority. Assigned to the first ACL, the first priority is transmitted through the first TCP channel, the second priority packet is allocated to the second ACL, the second priority is transmitted through the first TCP channel, and the third priority packet is allocated to The third ACL, the third priority is transmitted through the third TCP channel, and so on.
  • the Openflow controller allocates a TCP channel to each packet.
  • the Openflow controller reserves more network resources for the packets with higher priority. For example, the Openflow controller will transmit a high priority.
  • a packet can be reserved in advance for the packet to transmit a packet with a high priority to prevent the packet with a high priority from being blocked in the TCP channel.
  • step 607 in the embodiment of the present application is performed after the step 605, and the step 608 in the embodiment of the present application is performed after the step 606.
  • the execution sequence of the step 607 and the step 608 is not limited in the embodiment of the present application. Step 608 is performed first, and is not limited thereto.
  • the Openflow switch and the Openflow controller transmit the packet according to the priority of the packet.
  • Each message can be transmitted through a corresponding TCP channel assigned by the Openflow controller or Openflow switch.
  • an Openflow controller or an Openflow switch allocates a first TCP channel to a protocol packet, and the protocol packet can be transmitted through the first TCP channel.
  • the Openflow controller and the Openflow switch have previously established at least two TCP channels, and each of the at least two TCP channels can perform data transmission. Therefore, when each packet is allocated to the at least two TCP channels according to the priority, the high-priority packet can be transmitted with the lower-priority packet using different TCP channels, so that the high priority is transmitted.
  • Level packets can be transmitted quickly, preventing high-priority packets and low-priority packets from being blocked in a TCP channel.
  • the protocol packet and the flow table packet are sent in different channels, so that the protocol packet and the flow table packet are blocked in one channel, or the protocol packet is further allocated with a network resource higher than the flow table packet. Protocol packets can be transmitted quickly, preventing protocol packets from being blocked in the channel and causing protocol fragmentation.
  • the Openflow switch can also obtain the bandwidth usage of each channel of the at least two TCP channels, and allocate a part of the packets of the TCP channel with a high bandwidth usage to the bandwidth occupation.
  • the rate is low in the TCP channel. For example, if the bandwidth usage of the first TCP channel is greater than the first threshold, and the bandwidth usage of the second TCP channel is lower than the second threshold, the packet to be transmitted on the first TCP channel may be allocated to the second TCP.
  • the channel transmits, which can make reasonable use of network resources and improve the efficiency of message transmission.
  • At least two TCP channels are established between the Openflow controller and the Openflow switch, and the Openflow controller or the Openflow switch assigns a priority to each packet transmitted in the at least two TCP channels, and then Openflow
  • the controller or the Openflow switch allocates a corresponding TCP channel from the at least two TCP channels for each packet according to the priority, and each packet can be transmitted through the corresponding corresponding TCP channel, and packets of different priorities are transmitted. It can be transmitted through different TCP channels to prevent high-priority packets and low-priority packets from being congested in a TCP channel. This can prevent TCP channel blocking, resulting in packet blocking, protocol fragmentation, and improved data transmission. Efficiency and capacity.
  • the specific data transmission method may be that three TCP channels are established between the Openflow switch and the Openflow controller, including the first TCP channel, the second TCP channel, and the third TCP.
  • the first TCP channel corresponds to the first priority
  • the second TCP channel corresponds to the second priority
  • the third TCP channel corresponds to the third priority
  • the first priority is higher than the second priority
  • the second priority is higher than the second priority
  • the Openflow controller allocates ACL1, ACL2, and ACL3 for the first TCP channel, the second TCP channel, and the third TCP channel, respectively.
  • the packets on the ACL1 list are transmitted on the first TCP channel.
  • the packets on the ACL2 list are transmitted on the second TCP channel.
  • the packets on the ACL3 list are transmitted on the third TCP channel.
  • the intermediate network device receives the first TCP channel.
  • the packet is forwarded preferentially, and the packet with the highest priority is transmitted on the TCP channel with the highest priority. This prevents the packet with the highest priority from being blocked in the TCP channel.
  • the Openflow controller or the Openflow switch detects that the bandwidth usage of the first TCP channel is 5%, less than 30%, and the second TCP bandwidth occupancy rate is 99%, which is higher than 70%, the second TCP channel can be transmitted. Part of the message is allocated to the first TCP channel for transmission, which further improves the efficiency of message transmission.
  • the Openflow switch establishes four TCP channels with the Openflow controller.
  • the priority of the fourth TCP channel is that the priority of the first TCP channel is the first priority, and the priority of the second TCP channel is also the first.
  • the priority of the third TCP channel is the second priority
  • the priority of the fourth TCP channel is the third priority.
  • the Openflow switch also assigns a priority to the 60 packets.
  • the protocol packet is the first priority
  • the important flow table packet is the second priority
  • the non-importable flow table packet is the third priority.
  • the first priority is higher than the second priority, and the second priority is higher than the third priority.
  • the 60 packets are allocated to the four TCP channels, and the protocol packets are allocated two TCP channels, that is, the first TCP channel and the second TCP channel, and one TCP channel is allocated to the important flow table packet, that is, The third TCP channel, the non-essential flow table packet is assigned a TCP channel, that is, the fourth TCP channel, and the high-priority and low-priority packets are transmitted through different TCP channels, and the high-priority packets are preferentially transmitted.
  • the high-priority packet and the low-priority packet are congested in a TCP channel to improve the reliability of data transmission.
  • a schematic diagram of an embodiment of an OpenFlow switch in an embodiment may include:
  • the establishing unit 701 is configured to establish a first TCP channel between the first port of the Openflow switch and the third port of the Openflow controller, and the second port of the Openflow switch and the third port of the Openflow controller Establishing a second TCP channel, the first port and the second port being different ports;
  • a determining unit 702 configured to determine a first priority of the first TCP channel and a second priority of the second TCP channel;
  • the transmitting unit 703 is configured to transmit the packet according to the priority of the packet via the first TCP channel or the second TCP channel.
  • the transmitting unit 703 is further configured to send, by using the first TCP channel, a first advertisement message to the OpenFlow controller, where the first advertisement message carries information of the first priority level;
  • the transmitting unit 703 is further configured to send, by using the second TCP channel, a second advertisement message to the OpenFlow controller, where the second advertisement message carries the information of the second priority.
  • the first notification message may be a first session priority message
  • the second notification message may be a second session priority message:
  • the transmitting unit 703 is further configured to receive, by using the first TCP channel, a first session priority reply message from an Openflow controller, where the first session priority reply message is used by the Openflow controller to confirm the first determined by the Openflow switch.
  • a priority in addition, the first session priority reply message may further include a priority assigned by the Openflow controller to the first TCP channel, and the Openflow controller notifies the Openflow switch of the Openflow switch by using the first session priority reply message.
  • the priority assigned by the controller as the priority of the first TCP channel;
  • the transmission unit 703 is further configured to receive, by using the second TCP channel, a second session priority reply message from the Openflow controller, where the second session priority reply message is used by the Openflow controller to confirm the first determined by the Openflow switch.
  • the second session priority reply message may further include a priority that the Openflow controller re-allocates for the second TCP channel, and the Openflow controller notifies the Openflow switch of the Openflow by using the second session priority reply message.
  • the priority assigned by the controller is taken as the priority of the second TCP channel.
  • the first notification message is a first feature reply message
  • the second notification message is a second feature reply message, where the first notification message and the second notification are sent by the transmitting unit.
  • the transmitting unit 703 is further configured to receive, by using the first TCP channel, a first feature request message from an Openflow controller;
  • the transmitting unit 703 is further configured to receive a second feature request message from the Openflow controller via the second TCP channel.
  • the transmitting unit 703 is specifically configured to transmit the packet via the first TCP channel;
  • the transmitting unit 703 is specifically configured to transmit the packet via the second TCP channel.
  • the determining unit 702 is further configured to determine that the priority of the packet is the same as the first priority.
  • the determining unit 702 is further configured to determine that a bandwidth occupation ratio of the first TCP channel is higher than a first threshold, and a bandwidth occupation ratio of the second TCP channel is lower than a second threshold;
  • the transmitting unit 703 is further configured to use the second TCP after the determining unit determines that the bandwidth usage of the first TCP channel is higher than a first threshold, and the bandwidth occupancy of the second TCP channel is lower than a second threshold.
  • the channel transmits the message.
  • an implementation manner of the Openflow controller in the embodiment of the present application may include:
  • the transmitting unit 801 is configured to receive, by using the first TCP channel, a first advertisement message that is sent by the OpenFlow switch, where the first advertisement message carries information of a first priority.
  • the transmitting unit 801 is further configured to receive, by using the second TCP channel, a second advertisement message that is sent by the OpenFlow switch, where the second advertisement message carries information of a second priority.
  • the determining unit 802 is configured to determine, according to the first advertisement message, that the priority of the first TCP channel is the first priority, and determine, according to the second notification message, that the priority of the second TCP channel is the second priority ;
  • the transmitting unit 801 is further configured to transmit the packet according to the priority of the packet via the first TCP channel or the second TCP channel.
  • the first notification message is a first session priority message
  • the second notification message is a second session priority message, which may include:
  • the transmitting unit 801 is further configured to send the first session priority reply message to the Openflow switch by using the first TCP channel, where the first session priority reply message is used to notify the Openflow switch: the determining unit 802 confirms the Openflow switch Determining the first priority is a priority of the first TCP channel;
  • the transmitting unit 801 is further configured to send, by using the second TCP channel, the second session priority reply message to the Openflow switch, where the second session priority reply message is used to notify the Openflow switch: the determining unit 802 confirms the Openflow switch.
  • the determined second priority is the priority of the second TCP channel.
  • the first notification message may be a first feature reply message
  • the second notification message may be a second feature reply message
  • the transmitting unit 801 receives the first sent by the Openflow switch.
  • the method may include:
  • the transmitting unit 801 is further configured to send, by using the first TCP channel, the first feature request message to the Openflow switch;
  • the transmitting unit 801 is further configured to send a second feature request message to the Openflow switch by using the second TCP channel.
  • the transmitting unit 801 is specifically configured to transmit the packet by using the first TCP channel;
  • the transmitting unit 801 is specifically configured to transmit the packet via the second TCP channel.
  • the determining unit 802 is further configured to determine that the priority of the packet is the same as the first priority.
  • the determining unit 802 is further configured to determine that a bandwidth occupation rate of the first TCP channel is higher than a first threshold, and a bandwidth occupation rate of the second TCP channel is lower than a second threshold;
  • the transmitting unit 801 is further configured to pass the second TCP after the determining unit determines that the bandwidth usage of the first TCP channel is higher than a first threshold, and the bandwidth occupancy of the second TCP channel is lower than a second threshold.
  • the channel transmits the message.
  • FIG. 9 is a schematic structural diagram of an Openflow switch according to an embodiment of the present disclosure.
  • the Openflow switch 900 may have a large difference due to different configurations or performances, and may include one or more central processing units (CPUs) 922. (eg, one or more processors) and memory 932, one or more storage media 930 that store application 942 or data 944 (eg, one or one storage device in Shanghai).
  • the memory 932 and the storage medium 930 may be short-term storage or persistent storage.
  • the program stored on storage medium 930 may include one or more modules (not shown), each of which may include a series of instruction operations in an Openflow switch.
  • central processor 922 can be configured to communicate with storage medium 930 to perform a series of instruction operations in storage medium 930 on Openflow switch 900.
  • Openflow switch 900 may also include one or more power supplies 926, one or more wired or wireless network interfaces 950, one or more input and output interfaces 958, and/or one or more operating systems 941, such as Windows ServerTM, Mac. OS XTM, UnixTM, LinuxTM, FreeBSDTM and more.
  • operating systems 941 such as Windows ServerTM, Mac. OS XTM, UnixTM, LinuxTM, FreeBSDTM and more.
  • the steps performed by the Openflow switch in the above embodiment may be based on the Openflow switch structure shown in FIG.
  • FIG. 10 is a schematic structural diagram of an Openflow controller according to an embodiment of the present disclosure.
  • the Openflow controller 1000 may have a large difference due to different configurations or performances, and may include one or more central processing units (CPU). 1022 (eg, one or more processors) and memory 1032, one or more storage media 1030 that store application 1042 or data 1044 (eg, one or one storage device in Shanghai).
  • the memory 1032 and the storage medium 1030 may be short-term storage or persistent storage.
  • the program stored on storage medium 1030 may include one or more modules (not shown), each of which may include a series of instruction operations in an Openflow controller.
  • the central processor 1022 can be configured to communicate with the storage medium 1030 to perform a series of instruction operations in the storage medium 1030 on the Openflow controller 1000.
  • the Openflow controller 1000 can also include one or more power supplies 1026, one or more wired or wireless network interfaces 1050, one or more input and output interfaces 1058, and/or one or more operating systems 1041, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM and more.
  • operating systems 1041 such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM and more.
  • the steps performed by the Openflow controller in the above embodiments may be based on the Openflow controller structure shown in FIG.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated 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 unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of Figures 2 through 6 of various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

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

Abstract

本申请实施例公开了一种数据传输的方法以及相关设备的方案,该数据传输方法包括:开放流Openflow交换机在所述Openflow交换机的第一端口和Openflow控制器的第三端口之间建立第一TCP通道,以及所述Openflow交换机在所述Openflow交换机的第二端口和所述Openflow控制器的所述第三端口之间建立第二TCP通道,所述第一端口和所述第二端口为不同端口;所述Openflow交换机确定所述第一TCP通道的第一优先级和所述第二TCP通道的第二优先级;所述Openflow交换机根据报文的优先级经由所述第一TCP通道或所述第二TCP通道传输所述报文。该方法可以减少报文阻塞在TCP通道内的情况,提高数据传输的效率。

Description

一种传输数据的方法以及相关设备
本申请要求于2017年12月13日提交中国专利局、申请号为201711327870.X、发明名称为“一种传输数据的方法以及相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,尤其涉及一种传输数据的方法以及相关设备。
背景技术
开放流(Openflow)网络是一种可以由软件定义的新型网络架构,分离了传统网络中交换机的控制平面和数据转发平面,由集中式的控制器统一管理网络中的交换机,Openflow作为一种通信协议,是控制器和转发层面之间的进行通信的协议,Openflow通过将网络设备的控制面与数据转发面的分离,实现网络流量的灵活控制。Openflow通过流进行网络业务的标识,可以提供精确的粒度控制,使网络能及时响应应用层的实时变化。
Openflow网络结构中包括Openflow控制器与Openflow交换机,在Openflow控制器与Openflow交换机之间建立有一个传输控制协议(transmission control protocol,TCP)通道,用于进行数据传输,该数据可以包括流表,协议报文等。但当有大量的数据传输时,该TCP通道会因为流量突然增大,而导致数据阻塞在TCP通道内,保活报文可能会被阻塞在通道内,无法发送到相关的设备,造成Openflow协议断链,导致在通道中传输的数据丢失。
现有方案中,根据不同报文的紧急程度确定报文的发送顺序,优先发送紧急程度高的报文,但由于中间网络复杂,一个TCP通道中可能包括多个中间网络设备,例如,Openflow控制器与Openflow交换机1建立了TCP通道,该TCP通道还经过了Openflow交换机2与Openflow交换机3,该Openflow交换机2与Openflow交换机3作为该TCP内的转发设备,那么Openflow交换机2与Openflow交换机3都为中间网络设备,该中间网络设备可以是一个也可以是多个。因此,仍有可能造成先发送的报文与后发送的报文在同一个中间网络设备上阻塞,一些重要的报文也无法正常传输。例如,Openflow控制器无法接收到保活报文等,导致通信断链,或上一级流表与具有以来关系的下一级流表的发送顺序错乱,上一级流表被接收后无法获取到下一级流表,导致数据转发失败等。
发明内容
本申请实施例提供一种传输数据的方法以及相关设备,用于解决Openflow网络中报文阻塞在传输通道内的问题,减少进行数据传输时的数据丢失,提高数据传输的效率。
有鉴于此,本申请第一方面提供一种数据传输的方法,可以包括:
Openflow交换机在该Openflow交换机的第一端口和Openflow控制器的第三端口之间建立第一TCP通道,以及在该Openflow交换机的第二端口和该Openflow控制器的该第三端口之间建立第二TCP通道,该第一端口和该第二端口为不同端口;该Openflow交换机确定该第一TCP通道的第一优先级和该第二TCP通道的第二优先级;该Openflow交换机根据报文的优先级经由该第一TCP通道或该第二TCP通道传输该报文。需要说明的是,该第一优先级与第二优先级可以是Openflow交换机与Openflow控制器预置的,也可以是由Openflow交换机与Openflow控制器协商得到,还可以是由Openflow交换机分配并通知Openflow控制器的,具体此处不作限定。
还需要说明的是,Openflow交换机与Openflow控制器建立了至少两个TCP通道,即至少两个TCP连接,Openflow交换机除了建立与Openflow控制器的第一TCP通道以及第二 TCP通道外,Openflow交换机还可以在Openflow交换机上的第三端口建立与Openflow控制器的第三TCP通道或在第四端口与Openflow控制器的第三端口建立第四TCP通道等,依次类推,具体此处不作限定。
在本申请实施例中,Openflow交换机与Openflow控制器建立了至少两个TCP通道,其中可以包括第一TCP通道与第二TCP通道,每个TCP通道都对应一个优先级,且每个在该Openflow交换机与Openflow控制器之间传输的报文也都对应一个优先级,可根据报文的优先级选择TCP通道进行数据传输,优先级高的报文可通过优先级高的TCP通道传输,Openflow交换机或Openflow控制器可以优先传输优先级高的报文,中间网络设备也可以优先转发优先级高的报文。因此,本申请实施例中建立的至少两个TCP通道,且分配对应的优先级,不仅能减少报文阻塞在TCP通道的情况,还能避免优先级高的重要报文阻塞在TCP通道,提高数据传输的稳定性,以及数据传输的效率以及数据传输的容量。
结合本申请第一方面,在本申请第一方面的第一种实施方式中,在该Openflow交换机根据报文的优先级经由该第一TCP通道或该第二TCP通道传输该报文之前,该方法还可以包括:
该Openflow交换机经由该第一TCP通道向该Openflow控制器发送第一通告消息,该第一通告消息携带该第一优先级的信息;该Openflow交换机经由该第二TCP通道向该Openflow控制器发送第二通告消息,该第二通告消息携带该第二优先级的信息,以通知Openflow控制器该第一TCP通道的第一优先级以及第二TCP通道的第二优先级。
在本申请实施例中,Openflow交换机与Openflow控制器可以通过通告消息的方式确定TCP通道的优先级,为一种确定TCP通道优先级的方式。
结合本申请第一方面的第一种实施方式,在本申请第一方面的第二种实施方式中,该第一通告消息可以是第一会话优先级消息,该第二通告消息可以是第二会话优先级消息,该方法还可以包括:
在Openflow交换机向Openflow控制器发送第一会话优先级消息后,该Openflow交换机经由该第一TCP通道接收来自Openflow控制器的第一会话优先级回复消息,Openflow交换机通过该第一会话优先级获取到,该Openflow控制器确认Openflow交换机为该第一TCP通道的该第一优先级;该Openflow交换机经由该第二TCP通道接收来自Openflow控制器的第二会话优先级回复消息,Openflow交换机通过该第二会话优先级获取到,该Openflow控制器确认该Openflow交换机为该第二TCP通道的该第二优先级。
应理解,若该Openflow控制器重新为第一TCP通道分配第三优先级,或重新为第二TCP通道分配第四优先级,则该第一会话优先级回复消息中可以携带该第三优先级,或该第二会话优先级中可以携带该第四优先级,之后Openflow交换机可以通过该第一会话优先级回复消息获取到该第三优先级为该第一TCP通道的优先级,并将该第三优先级作为该第一TCP通道的优先级,或Openflow交换机可以通过该第二会话优先级回复消息获取到该第四优先级为该第二TCP通道的优先级,并将该第四优先级作为该第二TCP通道的优先级。
在本申请实施例中,Openflow交换机通过第一TCP通道向Openflow控制器发送第一会话优先级消息,该第一会话优先级消息中包括了Openflow交换机确定的第一TCP通道的第一优先级,通过第二TCP通道向Openflow控制器发送第二会话优先级消息,该第二会话优先级消息中包括了Openflow交换机确定的第二TCP通道的第二优先级;之后,Openflow交换机接收Openflow控制器通过第一TCP通道发送的第一会话优先级回复消息,以及 Openflow控制器通过第二TCP通道发送的第二会话优先级回复消息,Openflow交换机可以通过与Openflow控制器进行协商确定第一TCP通道的优先级与第二TCP通道的优先级,增加了一种确定TCP通道优先级的方式,可以准确地确定TCP通道的优先级,提高数据传输的稳定性与可靠性。
结合本申请第一方面的第一种实施方式,在本申请第一方面的第三种实施方式中,该第一通告消息可以是第一特征回复消息,该第二通告消息可以是第二特征回复消息,在该Openflow交换机发送该第一通告消息和该第二通告消息之前,该方法还可以包括:
该Openflow交换机通过该第一TCP通道接收来自Openflow控制器的第一特征请求消息,该Openflow交换机通过该第二TCP通道接收来自Openflow控制器的第二特征请求消息。
在本申请实施例中,Openflow交换机通过第一TCP通道接收到Openflow控制器发送的第一特征请求消息后,通过该第一TCP通道向Openflow控制器发送第一特征回复消息,该特征回复消息中包括了第一TCP通道的优先级;以及Openflow交换机通过第二TCP通道接收到Openflow控制器发送的第二特征请求消息后,通过该第二TCP通道向Openflow控制器发送第二特征回复消息,该特征请求回复消息中包括了第二TCP通道的优先级,以通知Openflow控制器该第一TCP通道的优先级与第二TCP通道的优先级,增加了一种确定Openflow交换机建立的与Openflow控制器之间的TCP通道优先级的方式。
结合本申请第一方面、本申请第一方面的第一种实施方式至本申请第一方面的第三种实施方式中的任一实施方式,在本申请第一方面的第四种实施方式中,该Openflow交换机根据报文的优先级经由该第一TCP通道或该第二TCP通道传输该报文,可以包括:
该Openflow交换机确定该报文的优先级和该第一优先级相同,该Openflow交换机经由该第一TCP通道传输该报文;或者该Openflow交换机确定该报文的优先级和该第二优先级相同,该Openflow交换机经由该第二TCP通道传输该报文。应理解,该报文的优先级可以是该报文的处理优先级和/或转发优先级,该报文的处理优先级可以为Openflow交换机或Openflow控制器处理该报文的优先级,该转发优先级可以为中间网络设备转发该报文的优先级。需要说明的是,该报文的优先级可以是Openflow交换机分配的,也可以是Openflow控制器分配后通知该Openflow交换机的,具体此此处不作限定。
在本申请实施例中,若一个报文的优先级与一个TCP通道的优先级相同,则Openflow交换机可以通过与该报文优先级相同的TCP通道传输该报文。因此,优先级高的报文可以通过优先级高的TCP通道传输,Openflow交换机或Openflow控制器可以优先级传输优先级高的报文,中间网络设备也可以优先转发优先级高的报文,可以减少高优先级报文阻塞在TCP通道内的情况,提高报文传输的稳定性与可靠性。
结合本申请第一方面、本申请第一方面的第一种实施方式至本申请第一方面的第四种实施方式中的任一实施方式,在本申请第一方面的第五种实施方式中,该Openflow交换机根据报文的优先级经由该第一TCP通道或该第二TCP通道传输该报文,可以包括:
该Openflow交换机确定该报文的优先级和该第一TCP通道的第一优先级相同;该Openflow交换机确定该第一TCP通道的带宽占用率高于第一阈值,且该第二TCP通道的带宽占用率低于第二阈值;该Openflow交换机可以通过该第二TCP通道传输该报文。
在本申请实施例中,若Openflow交换机确定一个报文的优先级与第一TCP通道的优先级相同,Openflow交换机可以选择通过第一TCP通道传输该报文,而Openflow交换机监测到第一TCP通道的带宽占用率高于第一阈值,且该第二TCP通道的带宽占用率低于第二阈 值,则可以将该报文通过该第二TCP通道传输,即在第一TCP通道的负载过大,而第二TCP通道的负载空闲的时候,将等待在第一TCP通道传输的报文通过该第二TCP通道传输,能够更进一步提高数据传输的效率,减少报文的阻塞,并且可以合理利用网络资源,减少网络资源浪费的情况。
本申请第二方面提供一种数据传输的方法,Openflow交换机的第一端口和Openflow控制器的第三端口之间建立有第一TCP通道,以及该Openflow交换机的第二端口和该Openflow控制器的该第三端口之间建立有第二TCP通道,该第一端口和该第二端口为不同端口,该方法可以包括:
该Openflow控制器通过该第一TCP通道接收该Openflow交换发送的第一通告消息,该第一通告消息中携带了第一优先级的信息;该Openflow控制器经由该第二TCP通道接收该Openflow交换发送的第二通告消息,该第二通告消息携带第二优先级的信息;该Openflow控制器根据该第一通告消息确定该第一TCP通道的优先级为该第一优先级,以及该Openflow控制器根据该第二通告消息确定该第二TCP通道的优先级为该第二优先级;该Openflow控制器根据报文的优先级经由该第一TCP通道或该第二TCP通道传输该报文。
在本申请实施例中,Openflow交换机与Openflow控制器可以建立至少两个TCP通道,其中包括第一TCP通道与第二TCP通道,每个TCP通道都对应一个优先级,该优先级可以由Openflow交换机通过通告消息发送至Openflow控制器,且每个在该Openflow交换机与Openflow控制器之间传输的报文也都对应一个优先级,Openflow控制器可根据报文的优先级选择TCP通道进行数据传输,优先级高的报文可通过优先级高的TCP通道传输。Openflow交换机或控制器可以优先传输优先级高的报文,中间网络设备也可以优先转发优先级高的报文。因此,本申请实施例中建立的至少两个TCP通道,不仅能减少报文阻塞在TCP通道的情况,还能避免优先级高的重要报文阻塞在TCP通道,提高数据传输的稳定性,以及数据传输的效率。
结合本申请第二方,在本申请第二方面的第一种实施方式中,该第一通告消息可以是第一会话优先级消息,该第二通告消息可以是第二会话优先级消息,该方法还可以包括:
Openflow控制器接收Openflow交换机通过第一TCP通道发送的第一会话优先级消息后,该Openflow控制器通过该第一TCP通道向该Openflow交换机发送该第一会话优先级回复消息,该第一会话优先级回复消息用于通知Openflow交换机该Openflow控制器确认该Openflow交换机确定的该第一优先级;Openflow控制器接收Openflow交换机通过第二TCP通道发送的第二会话优先级消息后,该Openflow控制器通过该第二TCP通道向该Openflow交换机发送该第二会话优先级回复消息,该第二会话优先级回复消息用于通知Openflow交换机该Openflow控制器确认该Openflow交换机确定的该第二优先级。
应理解,若该Openflow控制器未将第一优先级作为第一TCP通道的优先级,或未将第二优先级作为第二TCP通道的优先级,Openflow控制器可继续与Openflow交换机协商该第一TCP通道或该第二TCP通道的优先级,Openflow控制器也可以重新为第一TCP通道分配第三优先级,或重新为第二TCP通道分配第四优先级,该第一会话优先级回复消息中可以携带该第三优先级,或该第二会话优先级中可以携带该第四优先级,之后Openflow交换机可以通过该第一会话优先级回复消息将该第三优先级作为该第一TCP通道的优先级,或Openflow交换机可以通过该第二会话优先级回复消息将该第四优先级作为该第二TCP通道的优先级。
在本申请实施例中,Openflow交换机通过会话优先级消息将TCP通道的优先级发送至Openflow控制器,Openflow控制器向Openflow交换机发送会话优先级回复消息,以使Openflow交换机和Openflow控制器可以协商确认TCP通道的优先级,增加了确认TCP通道的方式。
结合本申请第二方,在本申请第二方面的第二种实施方式中,该第一通告消息是第一特征回复消息,该第二通告消息是第二特征回复消息,在该Openflow控制器接收该Openflow交换机发送的该第一通告消息和该第二通告消息之前,该方法还可以包括:
在建立至少两个TCP通道后,该Openflow控制器通过该第一TCP通道向该Openflow交换机发送第一特征请求消息;该第一特征请求消息可以用于请求获取Openflow交换机的设备信息或地址信息等信息,该Openflow控制器通过该第二TCP通道向该Openflow交换机发送第二特征请求消息,该第二特征请求消息可以用于请求获取Openflow交换机的设备信息或地址信息等信息。
在本申请实施例中,Openflow交换机与Openflow控制器建立至少两个TCP通道后,Openflow控制器通过该至少两个TCP通道中的每个TCP通道向Openflow交换机发送至少两个特征请求消息,Openflow交换机接收到该至少两个特征请求消息后,针对该至少两个特征请求消息生成特征回复消息,该特征回复消息中携带了对应的TCP通道的优先级,以通知Openflow控制器该至少两个TCP通道中每个TCP通道的优先级,增加了一种Openflow控制器确定TCP通道优先级的方式。
结合本申请第二方面、本申请第二方面的第一种实施方式至本申请第二方面的第二种实施方式中任一实施方式,在本申请第二方面的第三种实施方式中,该Openflow控制器根据报文的优先级通过该第一TCP通道或该第二TCP通道传输该报文,可以包括:
该Openflow控制器确定该报文的优先级和该第一TCP通道的第一优先级相同,该Openflow控制器经由该第一TCP通道传输该报文;或者该Openflow控制器确定该报文的优先级和该第二TCP通道的第二优先级相同,该Openflow控制器经由该第二TCP通道传输该报文。
在本申请实施例中,若Openflow控制器确定报文的优先级与TCP通道的优先级匹配,则Openflow控制器通过该TCP通道传输该报文。因此,优先级高的报文可以通过优先级高的TCP通道传输,减少报文阻塞在TCP通道内的情况,提高报文传输的稳定性与可靠性。
结合本申请第二方面、本申请第二方面的第一种实施方式至本申请第二方面的第三种实施方式中任一实施方式,在本申请第二方面的第四种实施方式中,该Openflow控制器根据报文的优先级通过该第一TCP通道或该第二TCP通道传输该报文,可以包括:
该Openflow控制器机确定该报文的优先级和该第一优先级相同后,即该报文需要从第一TCP通道传输;若该Openflow控制器确定该第一TCP通道的带宽占用率高于第一阈值,且该第二TCP通道的带宽占用率低于第二阈值,则该Openflow控制器可以通过该第二TCP通道传输该报文。应理解,该报文的优先级可以是该报文的处理优先级和/或转发优先级,该报文的处理优先级可以为Openflow交换机或Openflow控制器处理该报文的优先级,该转发优先级可以为中间网络设备转发该报文的优先级。需要说明的是,该报文的优先级可以是Openflow交换机分配的,也可以是Openflow控制器分配后通知该Openflow交换机的,具体此此处不作限定。
在本申请实施例中,若Openflow控制器确定一个报文的优先级与第一TCP通道的优先 级匹配,Openflow控制器即将通过第一TCP通道传输该报文,而Openflow控制器检测到第一TCP通道的带宽占用率高于第一阈值,且该第二TCP通道的带宽占用率低于第二阈值,则可以将该报文通过该第二TCP通道传输,即在第一TCP通道的负载过大,而第二TCP通道的负载空闲的时候,将等待在第一TCP通道传输的报文通过该第二TCP通道进行传输,可以更进一步提高数据传输的效率,减少报文的阻塞,并且可以合理利用网络资源,减少网络资源浪费的情况。
本申请第三方面提供一种Openflow交换机,该Openflow交换机可以包括:
建立单元,用于在该Openflow交换机的第一端口和Openflow控制器的第三端口之间建立第一TCP通道,以及在该Openflow交换机的第二端口和该Openflow控制器的该第三端口之间建立第二TCP通道,该第一端口和该第二端口为不同端口;
确定单元,用于确定该第一TCP通道的第一优先级和该第二TCP通道的第二优先级;
传输单元,用于根据报文的优先级经由该第一TCP通道或该第二TCP通道传输该报文。
结合本申请第三方面,在本申请第三方面的第一种实施方式中,
该传输单元,还用于经由该第一TCP通道向该Openflow控制器发送第一通告消息,该第一通告消息携带该第一优先级的信息;
该传输单元,还用于经由该第二TCP通道向该Openflow控制器发送第二通告消息,该第二通告消息携带该第二优先级的信息。
结合本申请第三方面的第一种实施方式,在本申请第三方面的第二种实施方式中,该第一通告消息是第一会话优先级消息,该第二通告消息是第二会话优先级消息,可以包括:
该传输单元,还用于经由该第一TCP通道接收来自Openflow控制器的第一会话优先级回复消息,该第一会话优先级回复消息用于该Openflow控制器确认该Openflow交换机确定的该第一优先级;
该传输单元,还用于经由该第二TCP通道接收来自Openflow控制器的第二会话优先级回复消息,该第二会话优先级回复消息用于该Openflow控制器确认该Openflow交换机确定的该第二优先级。
结合本申请第三方面的第一种实施方式,在本申请第三方面的第三种实施方式中,该第一通告消息是第一特征回复消息,该第二通告消息是第二特征回复消息,在该传输单元发送该第一通告消息和该第二通告消息之前,可以包括:
该传输单元,还用于经由该第一TCP通道接收来自Openflow控制器的第一特征请求消息;
该传输单元,还用于经由该第二TCP通道接收来自Openflow控制器的第二特征请求消息。
结合本申请第三方面、本申请第三方面的第一种实施方式至本申请第三方面的第三种实施方式中任一实施方式,在本申请第三方面的第四种实施方式中,可以包括:
在该确定单元确定该报文的优先级和该第一优先级相同后,该传输单元具体用于经由该第一TCP通道传输该报文;或者
在该确定单元确定该报文的优先级和该第二优先级相同后,该传输单元具体用于经由该第二TCP通道传输该报文。
结合本申请第三方面、本申请第三方面的第一种实施方式至本申请第三方面的第四种实施方式中任一实施方式,在本申请第三方面的第五种实施方式中,可以包括:
该确定单元,还用于确定该报文的优先级和该第一优先级相同;
该确定单元,还用于确定该第一TCP通道的带宽占用率高于第一阈值,且该第二TCP通道的带宽占用率低于第二阈值;
该传输单元,在该确定单元确定该第一TCP通道的带宽占用率高于第一阈值,且该第二TCP通道的带宽占用率低于第二阈值后,还用于经由该第二TCP通道传输该报文。
本申请第四方面提供一种Openflow控制器,Openflow交换机的第一端口和该Openflow控制器的第三端口之间建立有第一TCP通道,以及该Openflow交换机的第二端口和该Openflow控制器的该第三端口之间建立有第二TCP通道,该第一端口和该第二端口为不同端口,该Openflow控制器可以包括:
传输单元,用于经由该第一TCP通道接收该Openflow交换发送的第一通告消息,该第一通告消息携带第一优先级的信息;
该传输单元,还用于经由该第二TCP通道接收该Openflow交换发送的第二通告消息,该第二通告消息携带第二优先级的信息;
确定单元,用于根据该第一通告消息确定该第一TCP通道的优先级为该第一优先级,以及根据该第二通告消息确定该第二TCP通道的优先级为该第二优先级;
该传输单元,还用于根据报文的优先级经由该第一TCP通道或该第二TCP通道传输该报文。
结合本申请第四方面,在本申请第四方面的第一种实施方式中,该第一通告消息是第一会话优先级消息,该第二通告消息是第二会话优先级消息,可以包括:
该传输单元,还用于通过该第一TCP通道向该Openflow交换机发送该第一会话优先级回复消息,该第一会话优先级回复消息用于该确定单元确认该Openflow交换机确定的该第一优先级;
该传输单元,还用于通过该第二TCP通道向该Openflow交换机发送该第二会话优先级回复消息,该第二会话优先级回复消息用于该Openflow控制器确认该Openflow交换机确定的该第二优先级。
结合本申请第四方面的第一种实施方式,在本申请第四方面的第二种实施方式中,该第一通告消息是第一特征回复消息,该第二通告消息是第二特征回复消息,在该传输单元接收该Openflow交换机发送的该第一通告消息和该第二通告消息之前,可以包括:
该传输单元,还用于通过该第一TCP通道向该Openflow交换机发送第一特征请求消息;
该传输单元,还用于通过该第二TCP通道向该Openflow交换机发送第二特征请求消息。
结合本申请第四方面、本申请第四方面的第一种实施方式至本申请第四方面的第二种实施方式中任一实施方式,在本申请第四方面的第三种实施方式中,可以包括:
在该确定单元确定该报文的优先级和该第一优先级相同后,该传输单元具体用于经由该第一TCP通道传输该报文;或者
在该确定单元确定该报文的优先级和该第二优先级相同后,该传输单元具体用于经由该第二TCP通道传输该报文。
结合本申请第四方面、本申请第四方面的第一种实施方式至本申请第四方面的第三种实施方式中任一实施方式,在本申请第四方面的第四种实施方式中,可以包括:
该确定单元,还用于确定该报文的优先级和该第一优先级相同;
该确定单元,还用于确定该第一TCP通道的带宽占用率高于第一阈值,且该第二TCP 通道的带宽占用率低于第二阈值;
该传输单元,在该确定单元确定该第一TCP通道的带宽占用率高于第一阈值,且该第二TCP通道的带宽占用率低于第二阈值后,还用于通过该第二TCP通道传输该报文。
本申请实施例第五方面提供一种Openflow交换机,可以包括:
处理器以及存储器,该处理器与该存储器连接;
该存储器,用于存储程序代码;
该处理器调用该存储器中的程序代码时执行本申请第一方面或第一方面任一实施方式提供的Openflow交换机执行的步骤。
本申请实施例第六方面提供一种Openflow控制器,可以包括:
处理器以及存储器,该处理器与该存储器连接;
该存储器,用于存储程序代码;
该处理器调用该存储器中的程序代码时执行本申请第二方面或第二方面任一实施方式提供的Openflow控制器执行的步骤。
本申请实施例第七方面提供一种通信系统,该通信系统包括Openflow交换机以及Openflow控制器,该Openflow交换机为执行本申请第一方面至第二方面中任一实施方式中的Openflow交换机;该Openflow控制器为执行本申请第一方面至第二方面中任一实施方式中的Openflow控制器。
本申请实施例第八方面提供一种存储介质,需要说明的是,本发的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产口的形式体现出来,该计算机软件产品存储在一个存储介质中,用于储存为上述设备所用的计算机软件指令,其包含用于执行上述第一方面至第二方面中任一方面为Openflow交换机或Openflow控制器所设计的程序。
该存储介质包括:U盘、移动硬盘、只读存储器(英文缩写ROM,英文全称:Read-Only Memory)、随机存取存储器(英文缩写:RAM,英文全称:Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
本申请实施例第九方面提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如本申请第一方面或第一方面任一可选实施方式中所述的方法。
本申请实施例第十方面提供一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行如本申请第二方面或第二方面任一可选实现方式中所述的方法。
本申请第十一方面提供一种通信装置,该通信装置可以包括:处理器、存储器;所述存储器用于存储指令;所述处理器用于执行所述存储器中的所述指令,使得所述通信装置执行如前述第一方面或第一方面中任一项所述的方法。
本申请第十二方面提供一种通信装置,该通信装置可以包括:处理器、存储器;所述存储器用于存储指令;所述处理器用于执行所述存储器中的所述指令,使得所述通信装置执行如前述第二方面或第二方面中任一项所述的方法。
从以上技术方案可以看出,本申请实施例具有以下优点:
在本申请实施例中,Openflow交换机与Openflow控制器之间建立了至少两个TCP通道,每个TCP通道都有对应的优先级,然后Openflow交换机根据报文的优先级选择合适的TCP通道传输该报文。因此,本申请中Openflow交换机与Openflow控制器建立了多个TCP通道,相对于现有方案中的一个TCP通道,可以避免报文拥塞在一个TCP通道内。且每个TCP通 道都有对应的优先级,可根据报文的优先级选择对应的TCP通道。例如,可以为优先级高的报文选择优先级高的TCP通道进行传输,可以避免优先级高的报文阻塞在TCP通道内,减少报文阻塞在TCP通道内的情况。
附图说明
图1为本申请实施例中的网络架构图;
图2为本申请实施例中数据传输的方法的一种实施例示意图;
图3为本申请实施例中数据传输的方法的另一种实施例示意图;
图4为本申请实施例中数据传输的方法的另一种实施例示意图;
图5为本申请实施例中数据传输的方法的另一种实施例示意图;
图6为本申请实施例中数据传输的方法的另一种实施例示意图;
图7为本申请实施例中Openflow交换机的一种实施例示意图;
图8为本申请实施例中Openflow控制器的一种实施例示意图;
图9为本申请实施例中Openflow交换机的另一种实施例示意图;
图10为本申请实施例中Openflow控制器的另一种实施例示意图。
具体实施方式
本申请实施例提供一种传输数据的方法以及相关设备,用于解决Openflow网络中报文阻塞在传输通道内的问题,减少进行数据传输时的数据丢失,提高数据传输的效率。
请参阅图1,本申请实施例中的网络架构图。Openflow网络主要由Openflow控制器与Openflow交换机组成,一个Openflow控制器可以通过Openflow协议与多个Openflow交换机建立TCP连接,且Openflow交换机之间也可以建立连接。Openflow交换机还可以与终端设备连接,用于转发终端设备的数据或向终端设备下发数据。本申请实施例中的网络架构可以包括多个Openflow控制器或Openflow交换机,图中仅以Openflow交换机1、Openflow交换机2和Openflow交换机3这三个Openflow交换机为例进行示意。为进行Openflow控制器与Openflow交换机之间的数据传输,Openflow控制器与Openflow交换机之间需要建立TCP通道,该TCP通道为Openflow控制器与Openflow交换机直接通过链路连接的通道。其中,Openflow控制器与Openflow交换机1建立了TCP通道1,Openflow控制器与Openflow交换机2建立了TCP通道2,Openflow控制器与Openflow交换机建立了TCP通道3。在实际网络架构中,Openflow交换机的物理位置也可能相距很远,因此,在一个TCP通道上,可能存在中间网络设备。例如,Openflow控制器与Openflow交换机3建立TCP通道3时,还经过了Openflow交换机4(图中未示出),该Openflow交换机4还单独与Openflow控制器建立TCP通道4,该Openflow交换机4仅在TCP通道3上进行数据转发,那么,Openflow交换机4为该TCP通道3的中间网络设备。应理解,该中间网络设备可以是一个,也可以是多个,可以是Openflow交换机,也可以是网络中的其他网络设备,具体此处不作限定。例如,当该TCP通道3内有数据传输时,因Openflow控制器还与Openflow交换机4建立了TCP通道4,因此Openflow交换机4不仅会接收Openflow控制器发送的数据,还需要转发Openflow控制器通过TCP通道3发送至Openflow交换机3的数据,因此,当TCP通道3与TCP通道4内都有大量数据传输时,该大量数据可能会阻塞在Openflow交换机4内,TCP通道3中由Openflow控制器或Openflow交换机3发送的保活报文可能会阻塞在Openflow交换机4,造成TCP通道3协议断开。
因此,为解决大量数据导致的数据阻塞,而造成链路断开,数据发送失败的问题,本 申请实施例提供一种数据传输的方法,请参阅图2,本申请实施例中数据传输的方法的一种实施例示意图。
其中,以一个Openflow交换机与一个Openflow控制器为例,一个Openflow控制器与一个Openflow交换机之间建立至少两个TCP通道,该至少两个TCP通道可以是两个TCP通道,也可以是5个TCP通道,此处不作限定。此处仅以2个TCP通道为例,Openflow控制器与Openflow交换机之间建立2个TCP通道,即2个TCP连接,包括TCP通道1以及TCP通道2。建立该TCP通道1以及TCP通道2的具体过程可以是,Openflow交换机在该Openflow交换上的第一端口向Openflow控制器的第三端口发起建立,以及该Openflow交换机在该Openflow交换机上的第二端口向Openflow控制器的第三端口发起建立;当Openflow控制器监听该Openflow控制器上的第三端口时,接收到该Openflow交换机通过第一端口发送的TCP通道1的第一建立请求消息,并进行回复,以及接收到该Openflow交换机通过第二端口发送的TCP通道2的第二建立请求消息,并进行回复;Openflow控制器与Openflow交换机的第一端口完成“三次握手”后,Openflow交换机在第一端口与Openflow控制器的第三端口建立了TCP连接,即TCP通道1,以及Openflow控制器与Openflow交换机的第二端口完成“三次握手”后,Openflow交换机在第二端口与Openflow控制器的第三端口建立了TCP连接,即TCP通道2。该第一端口与第二端口为该Openflow交换机上的不同端口,例如,该第一端口的端口号可以是61647,该第二端口的端口号可以是61648。该第三端口可以是该Openflow控制器上的知名端口,例如,端口号为6653的端口,也可以是该Openflow控制器与该Openflow交换机约定的端口,具体此处不作限定。本申请实施例仅以建立两个TCP通道为例,此外,还可以建立3个TCP通道,4个TCP通道,具体过程可以与本申请实施例提供的建立方式类似,具体此处不再赘述。
该TCP通道1以及TCP通道2可用于传输Openflow控制器与Openflow交换机之间传输的数据。该两个个TCP通道中的每个TCP通道都对应一个优先级,例如,TCP通道1对应第一优先级,TCP通道2对应第二优先级。在该Openflow控制器与Openflow交换机传输的报文也都有对应的优先级,Openflow交换机或Openflow控制器可以根据该报文的优先级选择对应的TCP通道传输该报文。例如,Openflow交换机或Openflow控制器可以为优先级高的报文选择优先级高的TCP通道传输该报文。
在本申请实施例中,Openflow交换机在该Openflow交换机的第一端口与Openflow控制器的第三端口建立的第一TCP通道,即TCP通道1,该Openflow交换机在该Openflow交换机的第二端口与Openflow控制器的第三端口建立的第二TCP通道,即TCP通道2,该第一端口与第二端口为不同端口,除了该TCP通道1与TCP通道2,该Openflow交换机还可以在自身的其他端口与该Openflow控制器的第三端口建立TCP通道,本申请实施例对此不作限定。该Openflow交换机建立的每个TCP通道都有对应的优先级,且该Openflow交换机与该Openflow控制器之间传输的每个报文也具有对应的优先级,该Openflow交换机或该Openflow控制器可以根据该每个报文的优先级为该每个报文选择传输的TCP通道。例如,高优先级的报文可以通过高优先级的TCP通道传输,优先级高的TCP通道内传输的报文可优先被该Openflow交换机或Openflow控制器处理或传输,还可以优先被中间网络设备转发。因此,可以将不同优先级的报文通过不同的TCP通道传输,可以提高Openflow交换机与该Openflow控制器之间数据传输的容量,可以避免优先级高的报文阻塞在TCP通道内。
前述对本申请实施例提供的数据传输的方法进行了说明,下面对本申请实施例提供的 数据传输方法的具体流程进行说明,请参阅图3,本申请实施例中数据传输的方法的另一种实施例示意图,可以包括:
301、Openflow交换机与Openflow控制器建立至少两个TCP通道;
该至少两个TCP通道由Openflow交换机发起建立,Openflow交换机在该Openflow交换机上的至少两个端口与该Openflow控制器上的一个端口建立至少两个TCP连接。以建立两个TCP通道为例,Openflow交换机在该Openflow交换机的第一端口和Openflow控制器的第三端口之间建立第一TCP通道,以及该Openflow交换机在该Openflow交换机的第二端口和该Openflow控制器的所述第三端口之间建立第二TCP通道,该第一端口和该第二端口为该Openflow上的不同端口。需要说明的是,该至少两个TCP通道除了可以包括2个TCP通道,还可以包括3个TCP通道,也可以包括6个TCP通道,建立的过程与前述2个TCP通道的建立过程类似,具体此处不再赘述。还需要说明的是,该第三端口可以是知名端口,例如6653,也可以是与Openflow交换机约定的端口,具体此处不作限定。
建立TCP通道的具体过程可以是,以一个TCP通道为例,由Openflow交换机通过该Openflow交换机上的端口向Openflow控制器发起TCP建立请求,Openflow控制器监听该Openflow控制器上的端口,Openflow控制器通过监听端口接收到该Openflow交换机发送的建立请求后,向该Openflow交换机发送第一确认消息,以回复该建立请求,Openflow交换机接收到该第一确认消息后,向Openflow控制器发送第二确认消息,以通知该Openflow控制器接收到该第一确认消息。应理解,建立至少两个TCP通道的具体流程与建立该一个TCP通道的具体流程类似,具体此处不再赘述。
302、Openflow交换机向Openflow控制器发送通告消息;
Openflow交换机可以通过该至少两个TCP通道中的每个TCP通道向Openflow控制器发送至少两个通告消息,例如,Openflow可以通过第一TCP通道向Openflow控制器发送第一通告消息,Openflow交换机还可以通过第二TCP通道向该Openflow控制器发送第二通告消息,Openflow交换机还可以通过第三TCP通道向该Openflow控制器发送第三通告消息等,依次类推,该通告消息的数量与该至少两个TCP通道的数量对应。该至少两个通告消息中可以包括该至少两个通道的优先级信息,例如,第一通告消息中可以包括第一TCP通道的第一优先级,第二通告消息可以包括第二TCP通道的第二优先级等,依次类推。Openflow控制器接收到该至少两个通告消息后,可以通过该至少两个通告消息获取该至少两个TCP通道中每个TCP通道的优先级。若该通告消息中不包括TCP通道的优先级,则该通告消息可以包括该Openflow交换机的信息,例如,地址信息、设备信息或版本信息等。
此外,该至少两个TCP通道的优先级除了可以由Openflow交换机通过通告消息发送至Openflow控制器外,该至少两个TCP通道的优先级还可以是Openflow交换机与Openflow控制器上预置的,本申请实施例对Openflow交换机与Openflow控制器约定优先级,即预置优先级的方式不作限定。例如,Openflow交换机通过第一端口号建立的TCP通道的优先级为第一优先级,Openflow通过第二端口建立的TCP通道的优先级为第二优先级,依次类推。还可以例如,Openflow交换机在第一端口最先发起TCP连接建立请求,则该Openflow在该第一端口与Openflow控制器建立的TCP通道的优先级为第一优先级,Openflow交换机在第二端口发起TCP连接建立请求的时间在该Openflow交换机通过第一端口发起TCP建立之后,则该Openflow在该第二端口与Openflow控制器建立的TCP通道的优先级为第二优先级,依次类推,本申请实施例对Openflow交换机与Openflow控制器约定优先级的方式不作限定。
303、Openflow交换机确定TCP通道优先级;
若Openflow交换机向Openflow控制器发送的至少两个通告消息中包括至少两个TCP通道的优先级,则Openflow交换机可以在发送该至少两个TCP通道的优先级之前确定该至少两个TCP通道的优先级,也可以在发送该至少两个TCP通道之后确定该至少两个TCP通道的优先级。若该至少两个TCP通道的优先级为该Openflow交换机与Openflow控制器提前约定的,则本申请实施例步骤302与步骤303的执行顺序不作限定,可以先执行步骤302,也可以先执行步骤303,还可以同时执行步骤302与步骤303,具体此处不作限定。
304、Openflow控制器确定TCP通道优先级;
当Openflow交换机向Openflow控制器发送的至少两个通告消息中包括至少两个TCP通道的优先级,Openflow控制器可以从该至少两个通告消息中获取该至少两个TCP通道的优先级,例如,Openflow控制器可以从该至少两个通告消息中获取第一通道的第一优先级,以及第二通道的第二优先级。
此外,该至少两个TCP通道的优先级还可以是该Openflow控制器与该Openflow提前约定的。例如,Openflow交换机通过第一端口号建立的TCP通道的优先级为第一优先级,Openflow通过第二端口建立的TCP通道的优先级为第二优先级,依次类推。还可以例如,Openflow交换机在第一端口最先发起TCP连接建立请求,则该Openflow在该第一端口与Openflow控制器建立的TCP通道的优先级为第一优先级,Openflow交换机在第二端口发起TCP连接建立请求的时间在该Openflow交换机通过第一端口发起TCP建立之后,则该Openflow在该第二端口与Openflow控制器建立的TCP通道的优先级为第二优先级。
305、Openflow交换机与Openflow控制器根据报文的优先级传输报文。
Openflow交换机与控制器可以根据报文的优先级传输报文,Openflow交换机可以根据上报报文的优先级选择对应的TCP通道传输该上报报文,Openflow控制器也可以根据下发报文的优先级选择对应的TCP通道传输该下发报文。该报文的优先级可以是Openflow交换机或Openflow控制器为该报文分配的,具体分配的方式可以是根据该报文的类型分配,或根据该报文的长度分配等,具体此处不作限定。例如,Openflow交换机可以为优先级高的上报报文分配优先级高的TCP通道,Openflow控制器也可以为优先级高的下发报文分配优先级高的TCP通道。Openflow交换机或Openflow控制器可以优先发送优先级高的报文,或若TCP通道内存在中间网络设备时,中间网络设备优先转发优先级更高的TCP通道中传输的报文。
在本申请实施例中,Openflow交换机在该Openflow交换机的至少两个端口上建立与Openflow控制器的一个端口之间的至少两个TCP通道,且该至少两个TCP通道都有对应的优先级,每个报文也都具有优先级,Openflow交换机以及Openflow控制器可以根据报文的优先级选择对应的TCP通道传输该报文。因此,优先级高的报文可以选择优先级高的TCP通道传输,优先级高的报文可以优先被传输,例如,中间网络设备优先转发优先级高的报文。优先级高的TCP通道内传输的报文可以优先被传输,例如,中间网络设备优先转发优先级高的TCP通道内传输的报文。
具体地,以一个具体的应用场景为例进行说明,Openflow控制器监听端口6653;Openflow交换机设置源端口号为61647、61648以及61649,并通过该源端口号为61647、61648以及61649的端口向Openflow控制器上目的端口号为6653的端口发起TCP连接建立请求,包括第一建立请求、第二建立请求与第三建立请求,第一建立请求用于请求通过源端 口61647与目的端口6623建立第一TCP通道,即第一TCP连接,第二建立请求用于通过源端口61648与目的端口6623建立第二TCP通道,即第二TCP连接,以及第三建立请求用于通过源端口61649与目的端口6623建立第三TCP通道,即第三TCP连接;Openflow控制器接收到第一建立请求、第二建立请求与第三建立请求后,分别通过源端口61647、源端口61648以及源端口61649与该Openflow交换机进行“三次握手”,建立3个TCP连接,即第一TCP通道、第二TCP通道以及第三TCP通道;之后Openflow交换机通过第一TCP通道向Openflow发送第一通告消息、通过第二TCP通道向Openflow发送第二通告消息以及通过第三TCP通道向Openflow发送第三通告消息,该第一通告消息中包括了该第一TCP通道的第一优先级,该第二通告消息中包括了该第二TCP通道的第二优先级,以及该第三通告消息中包括了该第三TCP通道的第三优先级;Openflow控制器接收到该第一通告消息、第二通告消息以及第三通告消息后,获取到第一TCP通道的第一优先级、第二TCP通道的第二优先级以及第三TCP通道的第三优先级;Openflow控制器可以将该第一优先级作为第一TCP通道的第一优先级,也可以为该第一TCP通道重新分配一个优先级,然后将重新分配的优先级告知Openflow交换机,Openflow控制器确定第二TCP通道的优先级与第三TCP通道的优先级与第一TCP通道的优先级类似,具体此处不再赘述;Openflow交换机与Openflow控制器都确定第一TCP通道、第二TCP通道以及第三TCP通道的优先级后,Openflow交换机或Openflow控制器为需要传输的每个报文分配优先级,然后根据该报文的优先级分配TCP通道进行传输,将优先级高的报文分配到优先级高的TCP通道传输,中间网络设备可以优先转发优先级高的TCP通道内传输的报文,因此,将优先级高的报文通过优先级高的TCP通道传输,可以提高优先级高的报文的传输效率,避免优先级高的报文阻塞在TCP通道内。
进一步地,Openflow交换机或Openflow控制器确定TCP通道的优先级可以有不同的方式。下面对本申请实施例提供的数据传输的方法的具体流程进行说明,请参阅图4,本申请实施例中数据传输的方法的另一种实施例示意图,包括:
401、Openflow交换机与Openflow控制器建立至少两个TCP通道;
本申请实施例中的步骤401与前述图3中的步骤301类似,具体此处不再赘述。
402、Openflow交换机向Openflow控制器发送会话优先级消息;
Openflow交换机通过该至少两个TCP通道向Openflow控制器发送至少两个会话优先级消息,Openflow交换机从每个TCP通道向Openflow控制器发送一个会话优先级消息,该至少两个会话优先级消息中包括了该至少两个TCP通道的优先级。例如,第一会话优先级消息中携带第一TCP通道的第一优先级,第二会话优先级消息中携带第二TCP通道的第二优先级,第三会话优先级消息中携带第三TCP通道的第三优先级,依次类推。
此外,应理解,在Openflow交换机向Openflow控制器发送会话优先级消息之前,该Openflow交换机还可以通过该至少两个TCP通道中的每个TCP通道向Openflow控制器发送保活报文,或Openflow控制器向Openflow交换机发送获取Openflow交换机的信息的消息等可选步骤,具体此处不作限定。
403、Openflow控制器确定TCP通道优先级;
Openflow控制器接收到Openflow发送的至少两个会话优先级消息后,Openflow控制器确定该至少两个TCP通道的优先级,Openflow控制器确定该至少两个TCP通道的优先级的具体方式可以是,该至少两个会话优先级中携带了该至少两个TCP通道的优先级,Openflow控制器从该至少两个会话优先级中获取Openflow交换机发送的该至少两个TCP通道的优先 级,Openflow控制器可以将该至少两个会话优先级中携带的优先级作为该至少两个TCP通道的优先级,Openflow控制器也可以重新为该至少两个TCP通道分配优先级。
例如,Openflow控制器接收到Openflow交换机通过第一TCP通道发送的第一会话优先级消息,以及Openflow交换机通过第二TCP通道发送的第二会话优先级消息,该第一会话优先级中携带第一TCP通道的第一优先级,该第二会话优先级中携带第二TCP通道的第二优先级;Openflow控制器从该第一会话优先级消息以及第二会话优先级消息中分别获取第一TCP通道的第一优先级与第二TCP通道的第二优先级。Openflow控制器可以将该第一优先级作为第一TCP通道的优先级,将该第二优先级作为第二TCP通道的优先级,Openflow控制器也可以重新为第一TCP通道分配第一优先级,和/或重新为第二TCP通道分配第二优先级,具体此处不作限定。
404、Openflow控制器向Openflow交换机发送会话优先级回复消息;
Openflow控制器确定该至少两个TCP通道的优先级后,生成至少两个会话优先级回复消息,每一个会话优先级回复消息都对应一个Openflow交换机发送的会话优先级消息。该会话优先级回复消息可以包括从该至少两个会话优先级消息中获取的该至少两个TCP通道的优先级,也可以包括该Openflow控制器重新分配的优先级,或该Openflow控制器与该Openflow交换机约定的字段。
具体地,以该至少两个TCP通道中的第一TCP通道为例,在Openflow控制器从第一会话优先级消息中获取了第一TCP通道中的第一优先级,根据该第一会话优先级消息生成了第一优先级回复消息。该第一优先级回复消息中可以包括该第一优先级,也可以是Openflow控制器重新为该第一TCP通道分配的一个第二优先级,还可以是Openflow控制器与Openflow交换机约定的字段等。若该第一优先级回复消息中包括了第一优先级,则Openflow控制器通过该第一优先级回复消息通知Openflow交换机确定该第一优先级为该第一TCP通道的优先级;若该第一会话优先级回复消息中包括该第二优先级,该第二优先级为Openflow控制器重新为第一TCP通道分配的优先级,则Openflow控制器通过第一会话优先级消息通知该Openflow交换机确定该第一TCP通道的优先级为第二优先级;该第一会话优先级回复消息还可以是包括该Openflow控制器与Openflow交换机约定的字段,例如,若该Openflow控制器与Openflow交换机约定,当该第一会话优先级回复消息中的第一个字节为0xFF时,Openflow控制器确认该第一会话优先级中的第一优先级为第一TCP通道的优先级,或当该第一会话优先级回复消息中的第一个字节为0x01时,Openflow控制器确认该第一会话优先级中的第一优先级为第一TCP通道的优先级,还可以是,若该第一会话优先级回复消息中包括0x01,则Openflow控制器确定该第一TCP通道的优先级为第一优先级,若该第一会话优先级回复消息中包括0x02,则Openflow控制器确定该第一TCP通道的优先级为第二优先级,若该第一会话优先级回复消息中包括0x03,则Openflow控制器确定该第一TCP通道的优先级为第三优先级等;还可以是该会话优先级信息中携带一个否定字段,例如,0x00,以通知Openflow交换机该Openflow控制器不同意将该第一优先级作为该第一TCP通道的优先级,之后再由Openflow交换机或Openflow控制器重新为该第一TCP通道分配优先级,具体此处不作限定。
405、Openflow交换机确定TCP通道优先级;
Openflow交换机接收到Openflow控制器发送的会话优先级回复消息后,Openflow交换机可以确定该至少两个TCP通道的优先级。例如,Openflow交换机通过第一TCP通道接收 到Openflow控制器发送的第一会话优先级回复消息,该第一会话优先级回复消息用于回复该Openflow交换机向Openflow控制器发送的第一会话优先级消息,该第一会话优先级中包括了第一TCP通道的第一优先级。若该第一会话优先级回复消息中包括了该第一优先级,则该Openflow交换机确认该第一TCP通道的优先级为该第一优先级;若该第一会话优先级回复消息中包括了Openflow交换机与Openflow控制器约定的字符,例如,0xFF,0x01等,则Openflow交换机确定该第一TCP通道的优先级为该第一优先级;若该第一会话优先级回复消息中包括了第二优先级,则该Openflow交换机将该第二优先级作为该第一TCP通道的优先级。
406、Openflow交换机与Openflow控制器根据报文的优先级传输报文。
本申请实施例中的步骤406与前述图3中的步骤305类似,具体此处不再赘述。
在本申请实施例中,Openflow交换机建立与Openflow控制器的至少两个TCP通道后,Openflow交换机通过会话优先级消息将该至少两个TCP通道的优先级发送至Openflow交换机,交换机接收到该至少两个TCP通道的优先级后,向Openflow交换机发送会话优先级回复消息。Openflow控制器可以将接收到的优先级作为该至少两个TCP通道的优先级,也可以重新为该至少两个TCP通道分配优先级,Openflow控制器通过向Openflow交换机发送会话优先级回复消息,使Openflow交换机确定该至少两个TCP通道中每个TCP通道的优先级。Openflow交换机可以与Openflow控制器协商TCP通道的优先级,增加了确定该至少两个TCP通道的优先级的方式。且为每个TCP通道分配优先级,然后根据报文的优先级确定传输该报文的TCP通道,优先级高的报文可以通过优先级高的TCP通道传输,中间网络设备可优先转发或传输优先级高的TCP通道内传输的报文,减少报文阻塞在TCP通道内的情况。
更具体地,以一个具体的应用场景为例对本申请实施例的方案进行说明,Openflow控制器监听端口6653;Openflow交换机设置源端口号为61647、61648以及61649,并通过该源端口号为61647、61648以及61649的端口向Openflow控制器上目的端口号为6653的端口发起TCP连接建立请求,Openflow控制器接收到建立请求后,分别通过源端口61647、源端口61648以及源端口61649与该Openflow交换机进行“三次握手”,建立3个TCP连接,即第一TCP通道、第二TCP通道以及第三TCP通道;之后Openflow交换机通过第一TCP通道向Openflow发送第一会话优先级消息、通过第二TCP通道向Openflow发送第二会话优先级消息以及通过第三TCP通道向Openflow发送第三会话优先级消息,该第一会话优先级消息中包括了该第一TCP通道的第一优先级,该第二会话优先级消息中包括了该第二TCP通道的第二优先级,以及该第三会话优先级消息中包括了该第三TCP通道的第三优先级;Openflow控制器接收到该第一会话优先级消息、第二通告消息以及第三会话优先级消息后,获取到第一TCP通道的第一优先级、第二TCP通道的第二优先级以及第三TCP通道的第三优先级;Openflow控制器可以将该第一优先级作为第一TCP通道的第一优先级,也可以为该第一TCP通道重新分配一个优先级,然后将重新分配的优先级告知Openflow交换机,然后向Openflow交换机发送第一会话优先级回复消息。例如,Openflow控制器向Openflow交换机发送的第一会话优先级回复消息中包括一个字节,例如,0xFF,即通知Openflow交换机该Openflow控制器将该第一优先级作为该第一TCP通道的优先级,或该第一会话优先级回复消息中包括了第一优先级,即通知Openflow交换机该Openflow控制器将该第一优先级作为该第一TCP通道的优先级,或该第一会话优先级回复消息中包括第四优先级,即通知Openflow交换机该Openflow控制器将该第四优先级作为该第一TCP通道的优先级。 Openflow控制器确定第二TCP通道的优先级与第三TCP通道的优先级与第一TCP通道的优先级类似,具体此处不再赘述;Openflow交换机与Openflow控制器都确定第一TCP通道、第二TCP通道以及第三TCP通道的优先级后,Openflow交换机或Openflow控制器为需要传输的每个报文分配优先级,然后根据该报文的优先级分配TCP通道进行传输,将优先级高的报文分配到优先级高的TCP通道传输,中间网络设备可以优先转发优先级高的TCP通道内传输的报文,因此,将优先级高的报文通过优先级高的TCP通道传输,可以提高优先级高的报文的传输效率,避免优先级高的报文阻塞在TCP通道内。
前述对通过会话优先级消息确定至少两个TCP通道的优先级进行了阐述,可以由Openflow交换机或Openflow控制器确定该至少两个TCP通道的优先级。此外,Openflow交换机与Openflow控制器还可以通过特征回复消息的方式确定该至少两个TCP通道的优先级。下面对本申请实施例提供的数据传输的方法的另一种具体流程进行说明,请参阅图5,本申请实施例中数据传输的方法的另一种实施例示意图,包括:
501、Openflow交换机与Openflow控制器建立至少两个TCP通道;
本申请实施例中的步骤501与前述图3中的步骤301类似,具体此处不再赘述。
502、Openflow交换机向Openflow控制器发送hello报文;
Openflow交换机在建立与该Openflow控制器的至少两个TCP通道后,通过该至少两个TCP通道中的每个TCP通道向Openflow控制器发送至少两个保活报文,即hello报文,例如,Openflow交换机通过第一TCP通道向Openflow控制器发送第一hello报文,Openflow交换机通过第二TCP通道向Openflow控制器发送第二hello报文等。该hello报文中可以Openflow协议中的OFPT_HELLO消息,该保活报文中可以包括当前Openflow协议的协商版本,以及其他Openflow元素等,以设置该Openflow交换机与该Openflow控制器之间的连接。
503、Openflow控制器向Openflow控制器发送特征请求消息;
Openflow控制器在接收到Openflow交换机发送的hello报文后,Openflow控制器确定该hello报文中的协商版本与该Openflow控制器Openflow协议的协商版本一致后,向Openflow控制器发送特征请求消息,该特征请求消息用于获取该Openflow交换机的地址信息以及设备信息等。该特征请求消息可以是Openflow协议中的OFPT_FEATURES_REQUEST报文。
504、Openflow交换机确定TCP通道优先级;
Openflow交换机确定该至少两个TCP通道中每个TCP通道的优先级,该至少两个TCP通道中每个TCP通道的优先级可以是该Openflow交换机分配的。
需要说明的是,本申请实施例对步骤504与步骤502的执行顺序不作限定,可以先执行步骤502,也可以先执行步骤504,具体此处不作限定。
505、Openflow交换机向Openflow控制器发送特征回复消息;
Openflow交换机在接收到Openflow控制器发送的特征请求消息后,生成特征回复消息,该特征回复消息中包括了该Openflow交换机的地址信息或设备信息等,该特征回复消息中还增加了该至少两个TCP通道的优先级字段,以通知该Openflow控制器该至少两个TCP通道的优先级。该特征回复消息可以是Openflow协议中的OFPT_FEATURES_REPLY报文。例如,该特征回复消息中增加了5个字节,第一个字节代表第一TCP通道的第一优先级,第二个字节代表第二TCP通道的优先级,依次类推,或增加了2个字节,第一位用于标识第一TCP通道的第一优先级,第二为用于标识第二TCP通道的优先级,依次类推等。
506、Openflow控制器确定TCP通道优先级;
Openflow控制器在接收到Openflow交换机发送的特征回复消息后,可以从该特征回复消息中获取该Openflow交换机与该Openflow控制器建立的至少两个TCP通道的优先级。获取的具体方式可以是,该特征回复消息中除了该Openflow交换机的地址以及设备信息等信息外,还增加了5个字节,第一个字节代表第一TCP通道的第一优先级,第二个字节代表第二TCP通道的优先级,依次类推,或增加了8位字符,第一位用于标识第一TCP通道的第一优先级,第二位用于标识第二TCP通道的优先级,依次类推等,具体此处不作限定。
507、Openflow交换机与Openflow控制器根据报文的优先级传输报文。
本申请实施例中的步骤507与前述图3中的步骤305类似,具体此处不再赘述。
在本申请实施例中,Openflow交换机与该Openflow控制器建立至少两个TCP通道后,Openflow交换机通过特征回复消息将该至少两个TCP通道的优先级发送至Openflow控制器,以使Openflow控制器确定该至少两个TCP通道中每个TCP通道的优先级。并根据每个报文的优先级确定对应的TCP通道,通过该对应的TCP通道传输该报文优先级高的报文可以通过优先级高的TCP通道传输,中间网络设备优先转发优先级高的TCP通道内传输的报文,可以避免优先级高的报文阻塞在TCP通道内,减少TCP通道内报文阻塞的情况。
更具体地,以一个具体的应用场景为例进行说明,Openflow控制器监听端口6653;Openflow交换机设置源端口号为61647、61648以及61649,并通过该源端口号为61647、61648以及61649的端口向Openflow控制器上目的端口号为6653的端口发起TCP连接建立请求,Openflow控制器接收到建立请求后,分别通过源端口61647、源端口61648以及源端口61649与该Openflow交换机进行“三次握手”,建立3个TCP连接,即第一TCP通道、第二TCP通道以及第三TCP通道;之后Openflow交换机通过第一TCP通道、第二TCP通道以及第三TCP通道分别向Openflow控制器发送一个hello报文,该hello报文中包括了当前Openflow协议的协商版本;Openflow控制器接收到Openflow交换机通过第一TCP通道、第二TCP通道以及第三TCP通道分别向Openflow控制器发送hello报文后,确定该协商版本与该Openflow控制器上的Openflow协议的协商版本一致,则通过第一TCP通道、第二TCP通道以及第三TCP通道分别向Openflow交换机发送一个特征请求消息,用于请求Openflow交换机的地址信息、设备信息等信息;之后Openflow交换机通过第一TCP通道向Openflow发送第一特征回复消息、通过第二TCP通道向Openflow发送第二特征回复消息以及通过第三TCP通道向Openflow发送第三特征回复消息,该第一特征回复消息中包括了该第一TCP通道的第一优先级,该第二特征回复消息中包括了该第二TCP通道的第二优先级,以及该第三特征回复消息中包括了该第三TCP通道的第三优先级;Openflow控制器接收到该第一特征回复消息、第二特征回复消息以及第三特征回复消息后,获取到第一TCP通道的第一优先级、第二TCP通道的第二优先级以及第三TCP通道的第三优先级;Openflow控制器可以将该第一优先级作为第一TCP通道的第一优先级。Openflow控制器确定第二TCP通道的优先级与第三TCP通道的优先级与第一TCP通道的优先级类似,具体此处不再赘述;Openflow交换机与Openflow控制器都确定第一TCP通道、第二TCP通道以及第三TCP通道的优先级后,Openflow交换机或Openflow控制器为需要传输的每个报文分配优先级,然后根据该报文的优先级分配TCP通道进行传输,将优先级高的报文分配到优先级高的TCP通道传输,中间网络设备可以优先转发优先级高的TCP通道内传输的报文,因此,将优先级高的报文通过优先级高的TCP通道传输,可以提高优先级高的报文的传输效率,避免优先级高的报文阻塞在TCP通道内。
前述对Openflow交换机建立的与Openflow控制器的至少两个TCP通道的优先级的确定进行了说明,可以避免优先级高的报文阻塞在TCP通道内,下面对报文的优先级确定的具体流程进行详细说明,请参阅图6,本申请实施例中数据传输的方法的另一种实施例示意图,包括:
601、Openflow交换机与Openflow控制器建立至少两个TCP通道;
本申请实施例中的步骤601与前述图3中的步骤301类似,具体此处不再赘述。
602、Openflow交换机向Openflow控制器发送通告消息;
本申请实施例中的通告消息可以是前述图3中的通告消息,也可以是前述图4中的会话优先级消息,还可以是前述图5中的特征回复消息,当该通告消息为前述图3中的通告消息时,本申请实施例中的步骤602与前述图3中的步骤302类似,当该通告消息为前述图4中的会话优先级消息时,本申请实施例中的步骤602与前述图4中的步骤402类似,当该通告消息为前述图5中的特征回复消息时,本申请实施例中的步骤602与前述图5中的步骤505类似,具体此处不再赘述。
603、Openflow交换机确定TCP通道优先级;
Openflow交换机在向Openflow控制器发送通告消息前或发送通告消息后,确定该至少两个TCP通道的优先级。当该通告消息为前述图4中的会话优先级消息时,Openflow交换机在接收到该通告消息后确定TCP通道的优先级,当该通告消息为前述图5中的特征回复消息时,该Openflow交换机可以在发送该通告消息前确定该TCP通道的优先级,或当该通告消息中不包括该至少两个TCP通道的优先级时,该至少两个TCP通道的优先级也可以是该Openflow交换机与该Openflow控制器上预置的。
应理解,本申请实施例中的步骤603与前述图3中的步骤303、前述图4中的步骤405或前述图5中的步骤505类似,具体此处不再赘述。
604、Openflow控制器确定TCP通道优先级;
Openflow控制器可以在接收到Openflow交换机发送的消息后确定该至少两个TCP通道的优先级,也可以是该Openflow控制器与该Openflow交换机提前约定该至少两个TCP通道的优先级。
应理解,本申请实施例中的步骤604与前述图3中的步骤304、前述图4中的步骤404或前述图5中的步骤506类似,具体此处不再赘述。
605、Openflow交换机确定报文优先级;
Openflow交换机可以获取Openflow控制器为每个报文分配的优先级。进一步地,该报文的优先级可以包括报文优先级与转发优先级,该报文优先级可以用于Openflow控制器或Openflow交换机处理报文的优先级,Openflow交换机优先处理优先级更高的报文,该转发优先级为中间网络设备转发该报文的优先级,中间网络设备优先转发转发优先级高的报文。在实际应用中,可将报文的转发优先级设置为与报文优先级对应,例如,若报文的报文优先级为第一优先级,则该报文的转发优先级也为第一优先级,若报文的报文优先级为第二优先级,则该报文的转发优先级也为第二优先级。
Openflow交换机也可以根据上报报文的报文类型为上报报文分配优先级,该上报报文为Openflow交换机向Openflow控制器发送的报文,为协议报文分配的优先级可以高于其他报文的优先级,以使在进行报文传输时优先传输协议报文,或为协议报文分配更多的网络资源,预留网络资源的具体方式可以是根据资源预留协议(resource reservation protocol, RSVP)为该报文预留网络资源,避免协议报文阻塞在TCP通道内,造成协议断链。应理解,该上报报文的优先级还可以是Openflow控制器分配,然后下发至Openflow交换机的,由Openflow控制器下发的流表报文的优先级只能由Openflow控制器分配。
606、Openflow控制器确定报文优先级;
Openflow控制器可以根据每个报文的报文类型为每个报文分配优先级,优先级高的报文可优先传输或分配更多的网络资源。进一步地,该报文的优先级可以包括报文优先级与转发优先级,该报文优先级可以用于Openflow控制器或Openflow交换机处理报文的优先级,Openflow交换机优先处理优先级更高的报文,该转发优先级为中间网络设备转发该报文的优先级,中间网络设备优先转发转发优先级高的报文。在实际应用中,可将报文的转发优先级设置为与报文优先级对应。例如,若报文的报文优先级为第一优先级,则该报文的转发优先级也为第一优先级,若报文的报文优先级为第二优先级,则该报文的转发优先级也为第二优先级。Openflow网络中的报文还分为协议报文与流表报文等,若协议报文阻塞在TCP通道中,将导致Openflow协议断链,造成TCP通道断开,数据转发失败,因此为协议报文分配的优先级可以高于流表报文等报文。例如,为协议报文分配的优先级高于重要的流表报文、为重要的流表报文分配的优先级高于非重要的流表报文等,该协议报文可以包括连接保活的hello报文。为协议报文分配更高的优先级,在传输时优先传输协议报文,或为协议报文分配更多的网络资源,避免协议报文阻塞在TCP通道内,而造成协议断链。此外,流表报文的优先级可以由Openflow控制器配置,流表报文包括多个流表,多个流表之间可能存在依赖性,例如,路由表与接口信息、地址解析协议(address resolution protocol,ARP)信息具有关联关系,接口信息与ARP信息存储于路由表的下级流表,若接口信息与ARP信息未先下发,则当路由表下发时,将会出现无法获取下级表的情况,导致数据丢失,因此流表的优先级可以高于该流表的上一级流表的优先级。
应理解,在实际应用中,报文的优先级可以由Openflow交换机分配,也可以由Openflow控制器分配,可以是Openflow交换机分配上报报文的优先级,Openflow控制器分配下发报文的优先级;也可以是所有报文的优先级都由Openflow控制器分配,例如,生成报文与优先级的对应列表,为每个TCP通道配置传输列表等,然后由该Openflow控制器下发至Openflow交换机,Openflow交换机可根据Openflow控制器分配的优先级传输上报的报文。
需要说明的是,当由Openflow交换机为上报报文分配优先级时,本申请实施例对步骤605与步骤606的执行顺序不作限定,可以先执行步骤605,也可以先执行步骤606,具体此处不作限定。
607、Openflow交换机为报文分配TCP通道;
在Openflow交换机确定上报报文的优先级后,Openflow交换机可以为上报报文从该至少两个TCP通道中分配对应的TCP通道,该上报报文由Openflow交换机向Openflow控制器发送,可以将优先级不同的报文分配到不同的TCP通道。例如,为第一优先级的报文分配第一TCP通道,为第二优先级的报文分配第二TCP通道,第一优先级的报文在第一TCP通道传输,第二优先级的报文在第二TCP通道传输,在分配报文优先级时,若协议报文的优先级高于其他报文,那么,可以为协议报文分配一个TCP通道可以避免协议报文与其他报文阻塞在一个TCP通道内。
具体地,Openflow交换机为每个报文分配TCP通道的方式可以是,Openflow交换机为每个TCP通道配置分别分配一个访问控制列表(Access Control List,ACL),或接收Openflow 控制器下发的ACL,每个TCP通道对应的ACL中包括了可以通过该TCP通道传输的报文。当Openflow交换机确定有报文需要传输时,可通过该ACL确定该报文传输的TCP通道。ACL中的报文可以根据报文的优先级分配,例如,第一优先级的报文分配到第一ACL,第二优先级的报文分配到第二ACL,第三优先级的报文分配到第三ACL,以此类推。
具体地,Openflow交换机为每个报文分配TCP通道的方式还可以是,Openflow交换机为优先级高的报文预留网络资源,例如,Openflow交换机传输一个优先级高的报文,那么,Openflow交换机可以提前为该报文预留一个单独的TCP通道,以通过该TCP通道传输该优先级高的报文,避免该优先级高的报文阻塞在TCP通道内。
此外,Openflow交换机还可以获取该至少两个TCP通道中每个通道的带宽占用率,可以将宽带宽占用率高的TCP通道的一部分报文,分配到带宽占用率低的TCP通道中传输。例如,若第一TCP通道的带宽占用率大于第一阈值,且第二TCP通道的带宽占用率低于第二阈值,则可以将即将在在第一TCP通道传输的报文分配到第二TCP通道进行传输。可以提高报文传输的效率,减少数据在TCP通道内的拥塞,还可以合理利用网络资源,避免网络资源浪费。
608、Openflow控制器为报文分配TCP通道;
在Openflow控制器确定下发报文的优先级后,Openflow控制器可以为每个报文从该至少两个TCP通道中分配对应的TCP通道,因为有多个TCP通道,可以将优先级不同的报文分配到不同的TCP通道。例如,该Openflow交换机中可以预置一个映射表,若报文的优先级与第一TCP通道的第一优先级对应,则为该报文分配第一TCP通道,若该报文的优先级与第二TCP通道的第二优先级对应,则为第二优先级的报文分配第二TCP通道。因此,在实际应用中,可以为优先级高的报文单独分配TCP通道,以避免协议报文与其他报文阻塞在一个TCP通道内。
具体地,Openflow控制器为每个报文分配TCP通道的方式可以是,Openflow控制器为每个TCP通道配置分别一个ACL,每个TCP通道对应的ACL中包括了可以通过该TCP通道传输的报文,当Openflow控制器确定有报文需要传输时,可通过该ACL确定该报文传输的TCP通道,ACL中的报文可以根据报文的优先级分配,例如,第一优先级的报文分配到第一ACL,第一优先级通过第一TCP通道传输,第二优先级的报文分配到第二ACL,第二优先级通过第人TCP通道传输,第三优先级的报文分配到第三ACL,第三优先级通过第三TCP通道传输,依次类推。
具体地,Openflow控制器为每个报文分配TCP通道的方式还可以是,Openflow控制器为优先级高的报文预留更多的网络资源,例如,Openflow控制器即将传输一个优先级高的报文,那么,可以提前为该报文预留一个单独的TCP通道,以通过该TCP通道传输该优先级高的报文,避免该优先级高的报文阻塞在TCP通道内。
应理解,本申请实施例中的步骤607是在步骤605之后执行,本申请实施例中的步骤608在步骤606之后执行,本申请实施例对步骤607与步骤608的执行顺序不作限定,可以先执行步骤607,也可以先执行步骤608,具体此处不作限定。
609、Openflow交换机与Openflow控制器根据报文的优先级传输报文。
每个报文可以通过由Openflow控制器或Openflow交换机分配的对应的TCP通道传输。例如,Openflow控制器或Openflow交换机为协议报文分配了第一TCP通道,那么协议报文可以通过第一TCP通道进行传输。Openflow控制器与Openflow交换机之前建立了至少两个 TCP通道,该至少两个TCP通道中的每个TCP通道都可以进行数据传输。因此当每个报文按照优先级被分别分配到该至少两个TCP通道中传输时,高优先级的报文可以与低优先级的报文可以分别使用不同的TCP通道进行传输,使高优先级报文能够快速传输,避免高优先级报文与低优先级报文阻塞在一个TCP通道中。还可以为高优先级的报文分配比低优先级报文更多的网络资源,使高优先级报文使用更多的网络资源进行传输,进一步提高高优先级报文传输的效率,以及进一步避免高优先级报文阻塞在TCP通道内的情况。例如,将协议报文与流表报文分不同的通道发送,避免协议报文与流表报文阻塞在一个通道内,或进一步为协议报文分配高于流表报文的网络资源,使协议报文能够快速传输,避免协议报文阻塞在通道内而导致协议断链。
此外,为进一步提高报文传输的效率,Openflow交换机还可以获取该至少两个TCP通道中每个通道的带宽占用率,可以将宽带宽占用率高的TCP通道的一部分报文,分配到带宽占用率低的TCP通道中传输。例如,若第一TCP通道的带宽占用率大于第一阈值,且第二TCP通道的带宽占用率低于第二阈值,则可以将即将在在第一TCP通道传输的报文分配到第二TCP通道进行传输,可以合理利用网络资源,以及提高报文传输的效率。
本申请实施例中,在Openflow控制器与Openflow交换机之间建立至少两个TCP通道,Openflow控制器或Openflow交换机为在该至少两个TCP通道中传输的每个报文分配了优先级,然后Openflow控制器或Openflow交换机根据该优先级为每个报文从该至少两个TCP通道中分配了对应的TCP通道,该每个报文可以通过分配的对应的TCP通道传输,不同优先级的报文可以通过不同的TCP通道传输,避免高优先级的报文与低优先级的报文拥塞在一个TCP通道内,可以避免TCP通道阻塞,而导致报文阻塞,协议断链的情况,提高数据传输的效率以及容量。
具体地,以3个TCP通道为例,具体的数据传输方法的过程可以是,Openflow交换机与Openflow控制器之间建立了3个TCP通道,包括第一TCP通道、第二TCP通道以及第三TCP通道,第一TCP通道对应第一优先级,第二TCP通道对应第二优先级,第三TCP通道对应第三优先级,第一优先级高于第二优先级,第二优先级高于第三优先级。Openflow控制器分别为第一TCP通道、第二TCP通道以及第三TCP通道分配ACL1、ACL2以及ACL3。ACL1列表上的报文在第一TCP通道传输,ACL2列表上的报文在第二TCP通道传输,ACL3列表上的报文在第三TCP通道传输,当中间网络设备接收到第一TCP通道中传输的报文时,优先转发该报文,可以将优先级高的报文在优先级高的TCP通道中传输,避免优先级高的报文阻塞在TCP通道内。若Openflow控制器或Openflow交换机监测到第一TCP通道的带宽占用率为5%,低于30%,第二TCP带宽占用率为99%,高于70%,则可以将第二TCP通道等待传输的部分报文分配到第一TCP通道进行传输,更进一步提高报文传输的效率。
更具体地,在实际应用中,例如,Openflow交换机上当前有60个报文等待发送,因报文数据量过大,使用一个TCP通道将造成报文阻塞。Openflow交换机建立与Openflow控制器之间的4个TCP通道,该第4个TCP通道的优先级分别是,第一TCP通道的优先级为第一优先级,第二TCP通道的优先级也为第一优先级,第三TCP通道的优先级为第二优先级,第四TCP通道的优先级为第三优先级。Openflow交换机也为该60个报文分配优先级,协议报文为第一优先级,重要的流表报文为第二优先级,非重要的流表报文为第三优先级。其中,第一优先级高于第二优先级,第二优先级高于第三优先级。将该60个报文分配到该4个TCP通道上,协议报文分配了2个TCP通道,即第一TCP通道与第二TCP通道,重要的流 表报文分配了1个TCP通道,即第三TCP通道,非重要的流表报文分配了一个TCP通道,即第四TCP通道,将高优先级与低优先级的报文通过不同的TCP通道传输,优先传输高优先级报文,避免高优先级的报文与低优先级的报文拥塞在一个TCP通道内,提高数据传输的可靠性。
前述本申请实施例提供的数据传输的方法进行了详细说明,本申请实施例还提供了与该数据传输方法对应的装置,下面对本申请实施例提供的装置进行阐述,请参阅图7,本申请实施例中Openflow交换机的一种实施例示意图,可以包括:
建立单元701,用于在该Openflow交换机的第一端口和Openflow控制器的第三端口之间建立第一TCP通道,以及在该Openflow交换机的第二端口和该Openflow控制器的该第三端口之间建立第二TCP通道,该第一端口和该第二端口为不同端口;
确定单元702,用于确定该第一TCP通道的第一优先级和该第二TCP通道的第二优先级;
传输单元703,用于根据报文的优先级经由该第一TCP通道或该第二TCP通道传输该报文。
可选地,在一些可能的设计中,
该传输单元703,还用于经由该第一TCP通道向该Openflow控制器发送第一通告消息,该第一通告消息携带该第一优先级的信息;
该传输单元703,还用于经由该第二TCP通道向该Openflow控制器发送第二通告消息,该第二通告消息携带该第二优先级的信息。
可选地,在一些可能的设计中,该第一通告消息可以是第一会话优先级消息,该第二通告消息可以是第二会话优先级消息:
该传输单元703,还用于经由该第一TCP通道接收来自Openflow控制器的第一会话优先级回复消息,该第一会话优先级回复消息用于该Openflow控制器确认该Openflow交换机确定的该第一优先级,此外,该第一会话优先级回复消息还可以包括Openflow控制器重新为该第一TCP通道分配的优先级,Openflow控制器通过该第一会话优先级回复消息通知该Openflow交换机将Openflow控制器重新分配的优先级作为该第一TCP通道的优先级;
该传输单元703,还用于经由该第二TCP通道接收来自Openflow控制器的第二会话优先级回复消息,该第二会话优先级回复消息用于该Openflow控制器确认该Openflow交换机确定的该第二优先级,此外,该第二会话优先级回复消息还可以包括Openflow控制器重新为该第二TCP通道分配的优先级,Openflow控制器通过该第二会话优先级回复消息通知该Openflow交换机将Openflow控制器重新分配的优先级作为该第二TCP通道的优先级。
可选地,在一些可能的设计中,该第一通告消息是第一特征回复消息,该第二通告消息是第二特征回复消息,在该传输单元发送该第一通告消息和该第二通告消息之前,包括:
该传输单元703,还用于经由该第一TCP通道接收来自Openflow控制器的第一特征请求消息;
该传输单元703,还用于经由该第二TCP通道接收来自Openflow控制器的第二特征请求消息。
可选地,在一些可能的设计中,
在该确定单元702确定该报文的优先级和该第一优先级相同后,该传输单元703具体用于经由该第一TCP通道传输该报文;或者
在该确定单元702确定该报文的优先级和该第二优先级相同后,该传输单元703具体用 于经由该第二TCP通道传输该报文。
可选地,在一些可能的设计中,
该确定单元702,还用于确定该报文的优先级和该第一优先级相同;
该确定单元702,还用于确定该第一TCP通道的带宽占用率高于第一阈值,且该第二TCP通道的带宽占用率低于第二阈值;
该传输单元703,在该确定单元确定该第一TCP通道的带宽占用率高于第一阈值,且该第二TCP通道的带宽占用率低于第二阈值后,还用于经由该第二TCP通道传输该报文。
前述对本申请实施例中的Openflow交换机进行了说明,下面对本申请实施例中的Openflow控制器进行说明,请参阅图8,本申请实施例中Openflow控制器的一种实施方式,可以包括:
传输单元801,用于经由该第一TCP通道接收该Openflow交换发送的第一通告消息,该第一通告消息携带第一优先级的信息;
该传输单元801,还用于经由该第二TCP通道接收该Openflow交换发送的第二通告消息,该第二通告消息携带第二优先级的信息;
确定单元802,用于根据该第一通告消息确定该第一TCP通道的优先级为该第一优先级,以及根据该第二通告消息确定该第二TCP通道的优先级为该第二优先级;
该传输单元801,还用于根据报文的优先级经由该第一TCP通道或该第二TCP通道传输该报文。
可选地,在一些可能的设计中,该第一通告消息是第一会话优先级消息,该第二通告消息是第二会话优先级消息,可以包括:
该传输单元801,还用于通过该第一TCP通道向该Openflow交换机发送该第一会话优先级回复消息,该第一会话优先级回复消息用于通知Openflow交换机:该确定单元802确认该Openflow交换机确定的该第一优先级为该第一TCP通道的优先级;
该传输单元801,还用于通过该第二TCP通道向该Openflow交换机发送该第二会话优先级回复消息,该第二会话优先级回复消息用于通知Openflow交换机:该确定单元802确认该Openflow交换机确定的该第二优先级为该第二TCP通道的优先级。
可选地,在一些可能的设计中,该第一通告消息可以是第一特征回复消息,该第二通告消息可以是第二特征回复消息,在该传输单元801接收该Openflow交换机发送的该第一通告消息和该第二通告消息之前,可以包括:
该传输单元801,还用于通过该第一TCP通道向该Openflow交换机发送第一特征请求消息;
该传输单元801,还用于通过该第二TCP通道向该Openflow交换机发送第二特征请求消息。
可选地,在一些可能的设计中,
在该确定单元802确定该报文的优先级和该第一优先级相同后,该传输单元801具体用于经由该第一TCP通道传输该报文;或者
在该确定单元802确定该报文的优先级和该第二优先级相同后,该传输单元801具体用于经由该第二TCP通道传输该报文。
可选地,在一些可能的设计中,
该确定单元802,还用于确定该报文的优先级和该第一优先级相同;
该确定单元802,还用于确定该第一TCP通道的带宽占用率高于第一阈值,且该第二TCP通道的带宽占用率低于第二阈值;
该传输单元801,在该确定单元确定该第一TCP通道的带宽占用率高于第一阈值,且该第二TCP通道的带宽占用率低于第二阈值后,还用于通过该第二TCP通道传输该报文。
图9是本申请实施例提供的一种Openflow交换机结构示意图,该Openflow交换机900可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)922(例如,一个或一个以上处理器)和存储器932,一个或一个以上存储应用程序942或数据944的存储介质930(例如一个或一个以上海量存储设备)。其中,存储器932和存储介质930可以是短暂存储或持久存储。存储在存储介质930的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对Openflow交换机中的一系列指令操作。更进一步地,中央处理器922可以设置为与存储介质930通信,在Openflow交换机900上执行存储介质930中的一系列指令操作。
Openflow交换机900还可以包括一个或一个以上电源926,一个或一个以上有线或无线网络接口950,一个或一个以上输入输出接口958,和/或,一个或一个以上操作系统941,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。
上述实施例中由Openflow交换机所执行的步骤可以基于该图9所示的Openflow交换机结构。
图10是本申请实施例提供的一种Openflow控制器结构示意图,该Openflow控制器1000可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)1022(例如,一个或一个以上处理器)和存储器1032,一个或一个以上存储应用程序1042或数据1044的存储介质1030(例如一个或一个以上海量存储设备)。其中,存储器1032和存储介质1030可以是短暂存储或持久存储。存储在存储介质1030的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对Openflow控制器中的一系列指令操作。更进一步地,中央处理器1022可以设置为与存储介质1030通信,在Openflow控制器1000上执行存储介质1030中的一系列指令操作。
Openflow控制器1000还可以包括一个或一个以上电源1026,一个或一个以上有线或无线网络接口1050,一个或一个以上输入输出接口1058,和/或,一个或一个以上操作系统1041,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。
上述实施例中由Openflow控制器所执行的步骤可以基于该图10所示的Openflow控制器结构。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络 单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例图2至图6所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的范围。

Claims (24)

  1. 一种数据传输的方法,其特征在于,所述方法包括:
    开放流Openflow交换机在所述Openflow交换机的第一端口和Openflow控制器的第三端口之间建立第一TCP通道,以及所述Openflow交换机在所述Openflow交换机的第二端口和所述Openflow控制器的所述第三端口之间建立第二TCP通道,所述第一端口和所述第二端口为不同端口;
    所述Openflow交换机确定所述第一TCP通道的第一优先级和所述第二TCP通道的第二优先级;
    所述Openflow交换机根据报文的优先级经由所述第一TCP通道或所述第二TCP通道传输所述报文。
  2. 根据权利要求1所述的方法,其特征在于,在所述Openflow交换机根据报文的优先级经由所述第一TCP通道或所述第二TCP通道传输所述报文之前,所述方法还包括:
    所述Openflow交换机经由所述第一TCP通道向所述Openflow控制器发送第一通告消息,所述第一通告消息携带所述第一优先级的信息;
    所述Openflow交换机经由所述第二TCP通道向所述Openflow控制器发送第二通告消息,所述第二通告消息携带所述第二优先级的信息。
  3. 根据权利要求2所述的方法,其特征在于,所述第一通告消息是第一会话优先级消息,所述第二通告消息是第二会话优先级消息,所述方法还包括:
    所述Openflow交换机经由所述第一TCP通道接收来自Openflow控制器的第一会话优先级回复消息,所述第一会话优先级回复消息用于所述Openflow控制器确认所述Openflow交换机确定的所述第一优先级;
    所述Openflow交换机经由所述第二TCP通道接收来自Openflow控制器的第二会话优先级回复消息,所述第二会话优先级回复消息用于所述Openflow控制器确认所述Openflow交换机确定的所述第二优先级。
  4. 根据权利要求2所述的方法,其特征在于,所述第一通告消息是第一特征回复消息,所述第二通告消息是第二特征回复消息,在所述Openflow交换机发送所述第一通告消息和所述第二通告消息之前,所述方法还包括:
    所述Openflow交换机经由所述第一TCP通道接收来自Openflow控制器的第一特征请求消息;
    所述Openflow交换机经由所述第二TCP通道接收来自Openflow控制器的第二特征请求消息。
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,所述Openflow交换机根据报文的优先级经由所述第一TCP通道或所述第二TCP通道传输所述报文,包括:
    所述Openflow交换机确定所述报文的优先级和所述第一优先级相同,所述Openflow交换机经由所述第一TCP通道传输所述报文;或者
    所述Openflow交换机确定所述报文的优先级和所述第二优先级相同,所述Openflow交 换机经由所述第二TCP通道传输所述报文。
  6. 根据权利要求1-4中任一项所述的方法,其特征在于,所述Openflow交换机根据报文的优先级经由所述第一TCP通道或所述第二TCP通道传输所述报文,包括:
    所述Openflow交换机确定所述报文的优先级和所述第一优先级相同;
    所述Openflow交换机确定所述第一TCP通道的带宽占用率高于第一阈值和所述第二TCP通道的带宽占用率低于第二阈值;
    所述Openflow交换机经由所述第二TCP通道传输所述报文。
  7. 一种数据传输的方法,其特征在于,Openflow交换机的第一端口和Openflow控制器的第三端口之间建立有第一TCP通道,以及所述Openflow交换机的第二端口和所述Openflow控制器的所述第三端口之间建立有第二TCP通道,所述第一端口和所述第二端口为不同端口,所述方法包括:
    所述Openflow控制器经由所述第一TCP通道接收所述Openflow交换发送的第一通告消息,所述第一通告消息携带第一优先级的信息;
    所述Openflow控制器经由所述第二TCP通道接收所述Openflow交换发送的第二通告消息,所述第二通告消息携带第二优先级的信息;
    所述Openflow控制器根据所述第一通告消息确定所述第一TCP通道的优先级为所述第一优先级,以及根据所述第二通告消息确定所述第二TCP通道的优先级为所述第二优先级;
    所述Openflow控制器根据报文的优先级经由所述第一TCP通道或所述第二TCP通道传输所述报文。
  8. 根据权利要求7所述的方法,其特征在于,所述第一通告消息是第一会话优先级消息,所述第二通告消息是第二会话优先级消息,所述方法还包括:
    所述Openflow控制器通过所述第一TCP通道向所述Openflow交换机发送所述第一会话优先级回复消息,所述第一会话优先级回复消息用于所述Openflow控制器确认所述Openflow交换机确定的所述第一优先级;
    所述Openflow控制器通过所述第二TCP通道向所述Openflow交换机发送所述第二会话优先级回复消息,所述第二会话优先级回复消息用于所述Openflow控制器确认所述Openflow交换机确定的所述第二优先级。
  9. 根据权利要求7所述的方法,其特征在于,所述第一通告消息是第一特征回复消息,所述第二通告消息是第二特征回复消息,在所述Openflow控制器接收所述Openflow交换机发送的所述第一通告消息和所述第二通告消息之前,所述方法还包括:
    所述Openflow控制器通过所述第一TCP通道向所述Openflow交换机发送第一特征请求消息;
    所述Openflow控制器通过所述第二TCP通道向所述Openflow交换机发送第二特征请求消息。
  10. 根据权利要求7-9中任一项所述的方法,其特征在于,所述Openflow控制器根据报 文的优先级通过所述第一TCP通道或所述第二TCP通道传输所述报文,包括:
    所述Openflow控制器确定所述报文的优先级和所述第一优先级相同,所述Openflow控制器经由所述第一TCP通道传输所述报文;或者
    所述Openflow控制器确定所述报文的优先级和所述第二优先级相同,所述Openflow控制器经由所述第二TCP通道传输所述报文。
  11. 根据权利要求7-9中任一项所述的方法,其特征在于,所述Openflow控制器根据报文的优先级通过所述第一TCP通道或所述第二TCP通道传输所述报文,包括:
    所述Openflow控制器机确定所述报文的优先级和所述第一优先级相同;
    所述Openflow控制器确定所述第一TCP通道的带宽占用率高于第一阈值和所述第二TCP通道的带宽占用率低于第二阈值;
    所述Openflow控制器通过所述第二TCP通道传输所述报文。
  12. 一种Openflow交换机,其特征在于,所述Openflow交换机包括:
    建立单元,用于在所述Openflow交换机的第一端口和Openflow控制器的第三端口之间建立第一TCP通道,以及在所述Openflow交换机的第二端口和所述Openflow控制器的所述第三端口之间建立第二TCP通道,所述第一端口和所述第二端口为不同端口;
    确定单元,用于确定所述第一TCP通道的第一优先级和所述第二TCP通道的第二优先级;
    传输单元,用于根据报文的优先级经由所述第一TCP通道或所述第二TCP通道传输所述报文。
  13. 根据权利要求12所述的Openflow交换机,其特征在于,包括:
    所述传输单元,还用于经由所述第一TCP通道向所述Openflow控制器发送第一通告消息,所述第一通告消息携带所述第一优先级的信息;
    所述传输单元,还用于经由所述第二TCP通道向所述Openflow控制器发送第二通告消息,所述第二通告消息携带所述第二优先级的信息。
  14. 根据权利要求13所述的Openflow交换机,其特征在于,所述第一通告消息是第一会话优先级消息,所述第二通告消息是第二会话优先级消息,包括:
    所述传输单元,还用于经由所述第一TCP通道接收来自Openflow控制器的第一会话优先级回复消息,所述第一会话优先级回复消息用于所述Openflow控制器确认所述Openflow交换机确定的所述第一优先级;
    所述传输单元,还用于经由所述第二TCP通道接收来自Openflow控制器的第二会话优先级回复消息,所述第二会话优先级回复消息用于所述Openflow控制器确认所述Openflow交换机确定的所述第二优先级。
  15. 根据权利要求13所述的Openflow交换机,其特征在于,所述第一通告消息是第一特征回复消息,所述第二通告消息是第二特征回复消息,在所述传输单元发送所述第一通告消息和所述第二通告消息之前,包括:
    所述传输单元,还用于经由所述第一TCP通道接收来自Openflow控制器的第一特征请求消息;
    所述传输单元,还用于经由所述第二TCP通道接收来自Openflow控制器的第二特征请求消息。
  16. 根据权利要求12-15中任一项所述的Openflow交换机,其特征在于,包括:
    在所述确定单元确定所述报文的优先级和所述第一优先级相同后,所述传输单元具体用于经由所述第一TCP通道传输所述报文;或者
    在所述确定单元确定所述报文的优先级和所述第二优先级相同后,所述传输单元具体用于经由所述第二TCP通道传输所述报文。
  17. 根据权利要求12-15中任一项所述的Openflow交换机,其特征在于,包括:
    所述确定单元,还用于确定所述报文的优先级和所述第一优先级相同;
    所述确定单元,还用于确定所述第一TCP通道的带宽占用率高于第一阈值,且所述第二TCP通道的带宽占用率低于第二阈值;
    所述传输单元,在所述确定单元确定所述第一TCP通道的带宽占用率高于第一阈值,且所述第二TCP通道的带宽占用率低于第二阈值后,还用于经由所述第二TCP通道传输所述报文。
  18. 一种Openflow控制器,其特征在于,Openflow交换机的第一端口和Openflow控制器的第三端口之间建立有第一TCP通道,以及所述Openflow交换机的第二端口和所述Openflow控制器的所述第三端口之间建立有第二TCP通道,所述第一端口和所述第二端口为不同端口,所述Openflow控制器包括:
    传输单元,用于经由所述第一TCP通道接收所述Openflow交换发送的第一通告消息,所述第一通告消息携带第一优先级的信息;
    所述传输单元,还用于经由所述第二TCP通道接收所述Openflow交换发送的第二通告消息,所述第二通告消息携带第二优先级的信息;
    确定单元,用于根据所述第一通告消息确定所述第一TCP通道的优先级为所述第一优先级,以及根据所述第二通告消息确定所述第二TCP通道的优先级为所述第二优先级;
    所述传输单元,还用于根据报文的优先级经由所述第一TCP通道或所述第二TCP通道传输所述报文。
  19. 根据权利要求18所述的Openflow控制器,其特征在于,所述第一通告消息是第一会话优先级消息,所述第二通告消息是第二会话优先级消息,包括:
    所述传输单元,还用于通过所述第一TCP通道向所述Openflow交换机发送所述第一会话优先级回复消息,所述第一会话优先级回复消息用于所述确定单元确认所述Openflow交换机确定的所述第一优先级;
    所述传输单元,还用于通过所述第二TCP通道向所述Openflow交换机发送所述第二会话优先级回复消息,所述第二会话优先级回复消息用于所述Openflow控制器确认所述Openflow交换机确定的所述第二优先级。
  20. 根据权利要求18所述的Openflow控制器,其特征在于,所述第一通告消息是第一特征回复消息,所述第二通告消息是第二特征回复消息,在所述传输单元接收所述Openflow交换机发送的所述第一通告消息和所述第二通告消息之前,包括:
    所述传输单元,还用于通过所述第一TCP通道向所述Openflow交换机发送第一特征请求消息;
    所述传输单元,还用于通过所述第二TCP通道向所述Openflow交换机发送第二特征请求消息。
  21. 根据权利要求18-20中任一项所述的Openflow控制器,其特征在于,包括:
    在所述确定单元确定所述报文的优先级和所述第一优先级相同后,所述传输单元具体用于经由所述第一TCP通道传输所述报文;或者
    在所述确定单元确定所述报文的优先级和所述第二优先级相同后,所述传输单元具体用于经由所述第二TCP通道传输所述报文。
  22. 根据权利要求18-20中任一项所述的Openflow控制器,其特征在于,包括:
    所述确定单元,还用于确定所述报文的优先级和所述第一优先级相同;
    所述确定单元,还用于确定所述第一TCP通道的带宽占用率高于第一阈值,且所述第二TCP通道的带宽占用率低于第二阈值;
    所述传输单元,在所述确定单元确定所述第一TCP通道的带宽占用率高于第一阈值,且所述第二TCP通道的带宽占用率低于第二阈值后,还用于通过所述第二TCP通道传输所述报文。
  23. 一种Openflow交换机,其特征在于,包括:
    处理器和存储器;
    所述存储器中存储有程序代码;
    所述处理器调用所述存储器中的程序代码时执行权利要求1至6中任一项所述方法的步骤。
  24. 一种Openflow控制器,其特征在于,包括:
    处理器和存储器;
    所述存储器中存储有程序代码;
    所述处理器调用所述存储器中的程序代码时执行权利要求7至11中任一项所述方法的步骤。
PCT/CN2018/113886 2017-12-13 2018-11-05 一种传输数据的方法以及相关设备 WO2019114459A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
EP18889412.5A EP3713184A4 (en) 2017-12-13 2018-11-05 DATA TRANSMISSION PROCESS AND ASSOCIATED DEVICE

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201711327870.X 2017-12-13
CN201711327870.XA CN109922012B (zh) 2017-12-13 2017-12-13 一种传输数据的方法以及相关设备

Publications (1)

Publication Number Publication Date
WO2019114459A1 true WO2019114459A1 (zh) 2019-06-20

Family

ID=66819520

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/113886 WO2019114459A1 (zh) 2017-12-13 2018-11-05 一种传输数据的方法以及相关设备

Country Status (3)

Country Link
EP (1) EP3713184A4 (zh)
CN (1) CN109922012B (zh)
WO (1) WO2019114459A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114257650A (zh) * 2021-10-29 2022-03-29 四川新网银行股份有限公司 一种银行个人用户联网核查方法、系统及设备
CN114697293A (zh) * 2022-03-30 2022-07-01 西安北方华创微电子装备有限公司 一种数据传输方法、下位机和控制器

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112468557B (zh) * 2020-11-16 2022-04-22 北京百度网讯科技有限公司 提供网络服务的方法、装置、网关及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160087845A1 (en) * 2014-09-18 2016-03-24 Lenovo Entrerprise Solutions (Singapore) Pte, Ltd. Support for converged fiber channel over ethernet (fcoe) traffic on software defined networks (sdns)
CN105519049A (zh) * 2013-05-28 2016-04-20 华为技术有限公司 一种报文传输方法、装置及系统
CN106130925A (zh) * 2016-08-26 2016-11-16 广州西麦科技股份有限公司 一种sdn网络的链路调度方法、设备及系统
CN106559254A (zh) * 2015-12-29 2017-04-05 国网智能电网研究院 基于双端口交换机的sdn多域网络装置及实现方法
CN107465611A (zh) * 2017-09-05 2017-12-12 北京东土科技股份有限公司 Sdn控制器和交换机控制链路的保护倒换方法及装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103634228A (zh) * 2013-11-25 2014-03-12 华为技术有限公司 一种网络报文的传送方法和设备
CN107454000B (zh) * 2016-05-31 2021-01-05 华为技术有限公司 网络数据传输装置及方法

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105519049A (zh) * 2013-05-28 2016-04-20 华为技术有限公司 一种报文传输方法、装置及系统
US20160087845A1 (en) * 2014-09-18 2016-03-24 Lenovo Entrerprise Solutions (Singapore) Pte, Ltd. Support for converged fiber channel over ethernet (fcoe) traffic on software defined networks (sdns)
CN106559254A (zh) * 2015-12-29 2017-04-05 国网智能电网研究院 基于双端口交换机的sdn多域网络装置及实现方法
CN106130925A (zh) * 2016-08-26 2016-11-16 广州西麦科技股份有限公司 一种sdn网络的链路调度方法、设备及系统
CN107465611A (zh) * 2017-09-05 2017-12-12 北京东土科技股份有限公司 Sdn控制器和交换机控制链路的保护倒换方法及装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3713184A4 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114257650A (zh) * 2021-10-29 2022-03-29 四川新网银行股份有限公司 一种银行个人用户联网核查方法、系统及设备
CN114257650B (zh) * 2021-10-29 2024-03-12 四川新网银行股份有限公司 一种银行个人用户联网核查方法、系统及设备
CN114697293A (zh) * 2022-03-30 2022-07-01 西安北方华创微电子装备有限公司 一种数据传输方法、下位机和控制器
CN114697293B (zh) * 2022-03-30 2023-11-10 西安北方华创微电子装备有限公司 一种数据传输方法、下位机和控制器

Also Published As

Publication number Publication date
EP3713184A1 (en) 2020-09-23
EP3713184A4 (en) 2020-09-23
CN109922012B (zh) 2021-03-12
CN109922012A (zh) 2019-06-21

Similar Documents

Publication Publication Date Title
WO2020221015A1 (zh) 直通链路通信方法、装置和存储介质
JP4141106B2 (ja) 帯域制御装置
WO2020001572A1 (zh) 通信方法及装置
WO2020143298A1 (zh) 实现业务连续性的方法、装置及系统
US20090172210A1 (en) Methods and apparatuses for wireless network communications
WO2019076306A1 (zh) 数据传输通道的处理方法、装置和系统
US20150237525A1 (en) Traffic Shaping and Steering for a Multipath Transmission Control Protocol Connection
EP2993838A1 (en) Method for setting identity of gateway device and management gateway device
JP2005537764A (ja) 優先度及びリザーブ帯域幅プロトコルを利用したネットワークにおけるQoSを提供する機構
EP1475981B1 (en) Station apparatus, method for resource allocation in station apparatus, and mobile communication system
WO2019114459A1 (zh) 一种传输数据的方法以及相关设备
AU2014414703A1 (en) Data forwarding method, device and system in software-defined networking
WO2020155940A1 (zh) 一种通信方法及通信装置
JP2005510131A6 (ja) IEEE802.11eMACのためのサービス品質シグナリングを提供する装置および方法
WO2021227559A1 (zh) 通信方法、装置及系统
WO2018032991A1 (zh) 一种数据处理方法及装置
CN108471629A (zh) 传输网络中业务服务质量的控制方法、设备及系统
WO2018000379A1 (zh) 一种数据传输控制方法、通信设备及核心网设备
WO2018082597A1 (zh) 拥塞控制方法及装置、基站
CN107135521B (zh) 一种流量控制方法、装置和系统
WO2020224412A1 (zh) 一种通信方法及装置
US20220086243A1 (en) Method, device, and system
WO2019149106A1 (zh) 一种服务质量QoS控制方法及相关设备
JP2017517220A (ja) OpenFlow通信方法及びシステム、制御部、並びにサービスゲートウェイ
WO2018233451A1 (zh) 通信方法、装置和系统

Legal Events

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

Ref document number: 18889412

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018889412

Country of ref document: EP

Effective date: 20200615