WO2015172373A1 - 一种用于OpenFlow网络的数据处理方法和装置 - Google Patents

一种用于OpenFlow网络的数据处理方法和装置 Download PDF

Info

Publication number
WO2015172373A1
WO2015172373A1 PCT/CN2014/077645 CN2014077645W WO2015172373A1 WO 2015172373 A1 WO2015172373 A1 WO 2015172373A1 CN 2014077645 W CN2014077645 W CN 2014077645W WO 2015172373 A1 WO2015172373 A1 WO 2015172373A1
Authority
WO
WIPO (PCT)
Prior art keywords
switch
rule
matching
data
aggregation rule
Prior art date
Application number
PCT/CN2014/077645
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 CN201480037689.3A priority Critical patent/CN105359472B/zh
Priority to PCT/CN2014/077645 priority patent/WO2015172373A1/zh
Priority to EP14891784.2A priority patent/EP3122012B1/en
Publication of WO2015172373A1 publication Critical patent/WO2015172373A1/zh
Priority to US15/289,249 priority patent/US10033619B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • H04L45/245Link aggregation, e.g. trunking
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Definitions

  • the embodiments of the present invention relate to communication technologies, and in particular, to a data processing method and apparatus for an OpenFlow network. Background technique
  • OpenFlow is a new network switching model that supports network innovation research.
  • the model supports users to control network processing behavior through open flow tables.
  • the basic idea of the OpenFlow network is to separate the data forwarding layer from the control layer.
  • the entire OpenFlow network is divided into data channels and control channels.
  • the OpenFlow switch (Switch) is responsible for data layer forwarding, and the OpenFlow controller (Controller) is implemented.
  • the function of the control layer for example, determines the forwarding rule.
  • the control protocol in the OpenFlow network is the OpenFlow protocol.
  • the switch when the switch receives the data packet, it will look up the local flow table to match whether the data packet matches the existing forwarding rule. If there is no match, the unmatched data packet is to be reported.
  • the data stream is reported to the controller through the Packet_in message (the report message/packet input message), and the controller determines the forwarding rule of the unmatched data packet (for convenience of description, the switch will not be matched in the subsequent
  • the data packets of the forwarding rule are collectively referred to as the data stream to be reported;).
  • the embodiment of the invention provides a data processing method and device for an OpenFlow network, which can reduce the impact of a large number of data streams to be reported in the OpenFlow network on the control channel bandwidth resources and the control channel efficiency.
  • the embodiment of the present invention provides a data processing method for an OpenFlow network, where the method includes: a switch in the OpenFlow network acquiring an aggregation rule provided by a controller in the OpenFlow network;
  • the switch performs rule matching on the data flow to be reported according to the aggregation rule;
  • the switch aggregates the data flows that match the aggregation rule to obtain a report message;
  • the switch sends the report message to the controller by using the OpenFlow protocol, so that the controller determines according to the report message.
  • the switch performs rule matching on the data flow to be reported according to the aggregation rule, where the switch performs the report according to the matching domain in the aggregation rule.
  • the data stream performs rule matching.
  • the switch performs aggregation on a data flow that matches the aggregation rule, and obtaining a report message includes: the switch according to the matching
  • the matching information is generated by the domain, and the matching information includes: a type of the matching domain, an identifier of the matching domain, a length of the matching domain, and a mask information of the matching domain, and data matching the aggregation rule. Matching a matching value that matches the aggregation rule; then, the upper >3 ⁇ 4 message carries the matching information.
  • the switch performs aggregation on the data flow that matches the aggregation rule
  • the obtaining the report message further includes: the switch acquiring the data information And the data information is summary data or all data of the data stream that matches the aggregation rule; then, the report message further carries the data information.
  • the switch aggregates data flows that match the aggregation rule, and obtains a report message.
  • the method further includes: the switch acquiring a storage address of the data flow matching the aggregation rule in the switch; and, the reporting message further carries a storage address of the data flow matching the aggregation rule in the switch.
  • the switch aggregates data flows that match the aggregation rule, and obtains a report message.
  • the method includes: the switch determines an identifier of a flow table where the aggregation rule is located in the switch; and, the reporting message further carries a flow table of the aggregation rule in the switch Logo.
  • the sending, by the switch, the report message to the controller by using an OpenFlow protocol includes: the switch And extending a format of the Packet_in message in the OpenFlow protocol; the switch sends the report message to the controller by using the format of the extended Packet_in message.
  • the embodiment of the present invention provides a data processing method for an OpenFlow network, where the method includes: providing, by a controller in the OpenFlow network, an aggregation rule to a switch in the OpenFlow network;
  • the controller provides the forwarding rule to the switch, so that the switch processes the data stream matching the aggregation rule in the switch according to the forwarding rule.
  • the information of the data stream that matches the aggregation rule in the switch includes the matching information, where the matching information includes a type of the matching domain in the aggregation rule, The identifier of the matching domain, the length of the matching domain, and the mask information of the matching domain, and the matching value of the data flow matching the aggregation rule in the switch that matches the aggregation rule; Determining, according to the report message, a forwarding rule of the data flow that matches the aggregation rule in the switch, the method includes: the controller parsing the reported message to obtain the matching information; The matching information is used to determine a forwarding rule of the data flow in the switch that matches the aggregation rule.
  • the information about the data flow that matches the aggregation rule in the switch further includes data information, where the data information is the switch Summary data or all data of the data stream matching the aggregation rule; Determining, by the controller, the forwarding rule of the data flow that matches the aggregation rule according to the report message, the controller includes: the controller parsing the reported message, and obtaining the data information and the matching And the controller determines, according to the data information and the matching information, a forwarding rule of the data flow that matches the aggregation rule in the switch.
  • the reporting message further carries a data flow that matches the aggregation rule in the switch a storage address in the switch; the controller provides the forwarding rule to the switch, so that the switch performs data flow matching the aggregation rule in the switch according to the forwarding rule.
  • the method includes: the controller sending the forwarding rule and the storage address to the switch, so that the switch matches data of the aggregation rule that is cached in the storage address according to the forwarding rule The stream is processed.
  • an embodiment of the present invention provides a switch for an OpenFlow network, where the switch includes:
  • An obtaining unit configured to acquire an aggregation rule provided by a controller in the OpenFlow network; and a processing unit: configured to perform rule matching on a data flow to be reported in the switch according to the aggregation rule, and match the aggregation rule
  • the data stream is aggregated to obtain a report message;
  • the sending unit is configured to send the report message to the controller by using an OpenFlow protocol, so that the controller determines, according to the report message, a forwarding rule of the data flow that matches the aggregation rule in the switch.
  • the processing unit is configured to perform rule matching on a data flow to be reported in the switch according to a matching domain in the aggregation rule.
  • the processing unit is specifically configured to generate, according to the matching domain, the matching information, where the matching information includes: the matching domain Type, the identifier of the matching domain, the length of the matching domain, and the mask information of the matching domain, and the matching of the data flow matching the aggregation rule with the aggregation rule a value, the upper message carries the matching information.
  • the processing unit is further configured to acquire data information, where the data information is summary data of a data stream that matches the aggregation rule. Or all data, the report message also carries the data information.
  • the processing unit is further configured to obtain a data flow that matches the aggregation rule in the The storage address in the switch, the report message also carries a storage address of the data stream matching the aggregation rule in the switch.
  • the processing unit is further configured to determine the aggregation The identifier of the flow table where the rule is located in the switch, and the report message also carries the identifier of the flow table where the aggregation rule is located in the switch.
  • the sending unit is specifically configured to perform a format of a Packet_in message in the OpenFlow protocol. Expanding, by the format of the extended Packet_in message, sending the report message to the controller.
  • an embodiment of the present invention provides a controller for an OpenFlow network, where the controller includes:
  • a sending unit configured to provide an aggregation rule to a switch in the OpenFlow network
  • a receiving unit configured to receive a report message sent by the switch, where the report message carries a data flow in the switch that matches the aggregation rule Information
  • a determining unit configured to determine, according to the report message, a forwarding rule of the data flow that matches the aggregation rule in the switch;
  • a providing unit configured to provide the forwarding rule to the switch, so that the switch processes the data flow in the switch that matches the aggregation rule according to the forwarding rule.
  • the switch matches the convergence
  • the information of the ruled data stream includes the matching information, where the matching information includes a type of the matching domain in the aggregation rule, an identifier of the matching domain, a length of the matching domain, and a mask information of the matching domain.
  • the matching value of the data flow matching the aggregation rule in the switch matching the aggregation rule; the determining unit is specifically configured to parse the upper message to obtain the matching information, and And determining, according to the matching information, a forwarding rule of the data flow that matches the aggregation rule in the switch.
  • the information about the data flow that matches the aggregation rule in the switch further includes data information, where the data information is the switch The summary data or all the data of the data stream matching the aggregation rule; the determining unit is specifically configured to parse the upper message, obtain the data information and the matching information, and according to the The data information and the matching information determine a forwarding rule of the data flow in the switch that matches the aggregation rule.
  • the reporting message further carries a data flow that matches the aggregation rule in the switch a storage address in the switch; the providing unit is specifically configured to send the forwarding rule and the storage address to the switch, so that the switch compares the storage address according to the forwarding rule The cached data stream matching the aggregation rule is processed.
  • an embodiment of the present invention provides a switch for an OpenFlow network, where the switch includes a processor, a memory, a bus, and a communication interface; the memory is configured to store a computer execution instruction, the processor and the memory Through the bus connection, when the switch is running, the processor executes the computer-executed instructions stored in the memory, so that the switch performs the data processing method for the OpenFlow network described in the first aspect or A data processing method for an OpenFlow network as described in any of the possible implementations of the first aspect.
  • an embodiment of the present invention provides a controller for an OpenFlow network, where the controller includes a processor, a memory, a bus, and a communication interface.
  • the memory is configured to store a computer execution instruction, the processor and the The memory is connected through the bus, when the controller is running.
  • the processor executes the computer-executed instructions stored in the memory to cause the controller to perform the data processing method for the OpenFlow network described in the second aspect or any possible implementation of the second aspect The data processing method for the OpenFlow network described in the mode.
  • the embodiment of the present invention provides a computer readable medium, including a computer executing instruction, when the processor of the computer executes the computer execution instruction, the computer executing the first aspect for the OpenFlow network A data processing method for an OpenFlow network as described in any of the possible implementations of the first aspect.
  • the embodiment of the present invention provides a computer readable medium, comprising: computer execution instructions, when the processor of the computer executes the computer execution instruction, the computer performs the second aspect for the OpenFlow network A data processing method for an OpenFlow network as described in any one of the possible implementations of the second aspect.
  • the switch in the OpenFlow network may perform rule matching on the data flow to be reported according to the aggregation rule provided by the controller, aggregate the data flow matching the aggregation rule, obtain a report message, and report the report.
  • the message is sent to the controller through the OpenFlow protocol, so that the controller can determine, according to the report message, a forwarding rule that matches the data flow of the aggregation rule, because the data stream to be reported is avoided from passing through the Packet_In message.
  • the report is reported to the controller, which reduces the impact of a large number of data streams to be reported on the OpenFlow network on the control channel bandwidth resources and control channel efficiency, and improves the utilization of the control channel bandwidth resources.
  • FIG. 1 is a flow chart of a data processing method for an OpenFlow network according to an embodiment of the present invention
  • FIG. 2 is still another data processing method for an OpenFlow network according to an embodiment of the present invention.
  • FIG. 3 is a flowchart of still another data processing method for an OpenFlow network according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a switch for an OpenFlow network according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram of another controller for an OpenFlow network according to an embodiment of the present invention
  • FIG. 6 is a schematic structural diagram of still another data processing apparatus for an OpenFlow network according to an embodiment of the present invention. detailed description
  • the embodiment of the invention provides a data processing method and device for an OpenFlow network, which can reduce the impact of a large number of data streams to be reported in the OpenFlow network on the bandwidth of the control channel and the efficiency of the control channel, and improve the utilization of the bandwidth of the control channel. .
  • a controller In the existing OpenFlow network model, there are two key components: a controller and a switch, wherein the switch can be used to forward data packets from a client, a PC, a laptop, etc., the controller.
  • the switch may forward the forwarding rules of the packet.
  • the unmatched data packet is controlled by the Transmission Control Protocol (TCP) control channel established with the controller (for convenience of description, the subsequent The data packets in the switch that are not matched to the forwarding rule are collectively referred to as the data stream to be reported.
  • TCP Transmission Control Protocol
  • the Packet-In message in the OpenFlow protocol is reported to the controller, and the controller determines the forwarding rule of the unmatched data packet.
  • the switch can also save the data flows to be reported in its own cache and wait for reporting.
  • an embodiment of the present invention provides a data processing method for an OpenFlow network, so that a switch in an OpenFlow network can obtain an aggregation rule provided by a controller in an OpenFlow network, and the report is to be reported according to the aggregation rule.
  • the data flow (that is, the data packet that is not matched to the forwarding rule) is matched by the rule, and the data flow matching the aggregation rule is aggregated to obtain a report message, and the report message is sent to the controller through the OpenFlow protocol, thereby avoiding Each data stream to be reported is sent to the controller through the Packet-In message, which reduces the consumption of the bandwidth of the control channel by the Packet-In message, and reduces the bandwidth resource and control of the control channel in the OpenFlow network.
  • the impact of channel efficiency increases the utilization of bandwidth resources in the control channel.
  • An embodiment of the present invention provides a data processing method for an OpenFlow network, where the method may specifically include the following steps:
  • a switch in an OpenFlow network acquires an aggregation rule provided by a controller in the OpenFlow network.
  • the controller in the OpenFlow network may be configured with a rule, such as an aggregation rule, for instructing the switch to classify the data flows to be reported according to the rule, so that the switch in the OpenFlow network can match the data flow to be reported that matches the rule.
  • the aggregation is performed to obtain a report message, and then the report message is reported to the controller, so that the utilization of the OpenFlow network control channel resource can be improved.
  • the aggregation rule may include a matching domain, and the matching data in the aggregation rule is used to perform rule matching on the data flow to be reported, and the data flow to be reported matching the matching domain has some
  • the controller can determine the forwarding rule for the data flow that matches the matching information, and package the information of the data flow that matches the matching domain to the controller, so that the resource utilization of the control channel can be improved. It can improve the control efficiency of the control channel.
  • the switch performs rule matching on the data flow to be reported according to the aggregation rule.
  • the aggregation rule may exist in the form of a flow table, and the switch further includes a flow table for indicating a forwarding rule of the data packet.
  • the switch matches the self.
  • a flow table for indicating a packet forwarding rule if the flow table indicating the packet forwarding rule does not match a suitable flow entry (that is, the data packet is a data flow to be reported), the data may be further The packet matches the flow table used to indicate the aggregation rule, that is, the rule of the data flow to be reported is matched.
  • the switch may store the data flow matching the aggregation rule. In the cache of the switch, the switch can process and report the data stream that matches the aggregation rule.
  • S103 The switch aggregates data flows that match the aggregation rule to obtain a report message.
  • the switch may aggregate the data stream that is cached and matched by the aggregation rule according to a preset policy. For example, when the number of data flows matching the aggregation rule in the switch reaches a preset threshold, The data stream matching the aggregation rule is aggregated. For example, the switch periodically aggregates data flows matching the aggregation rule according to a preset time period.
  • the switch may perform the aggregation of the data flows that match the aggregation rule in multiple manners, and may be to extract matching information of the data flows that match the aggregation rule, that is, common information, for example, if the switch utilizes the aggregation rule.
  • the matching information in the matching domain is matched, and the common information of the data stream matching the aggregation rule may be extracted, the type of the matching domain in the aggregation rule, the identifier of the matching domain, and the matching domain. Length and the mask information of the matching domain, and extracting a matching value that matches the data flow matching the aggregation rule with the aggregation rule; or may be extracting summary data of the data flow matching the aggregation rule or All data.
  • the matching information may be carried in the above-mentioned message, or may also carry summary data or all data of the data stream matching the aggregation rule, so that the subsequent controller according to the reported message, A forwarding rule that matches the data flow of the aggregation rule can be determined.
  • the switch may also obtain more information and carry it in the report message, for example, obtain a storage address of the data stream matching the aggregation rule in the switch (such as a serial number in the switch cache), or The identifier of the flow table in which the aggregation rule is located in the switch.
  • S104 The switch sends the report message to the controller by using the OpenFlow protocol, so that the controller determines, according to the report message, a forwarding rule of the data flow that matches the aggregation rule in the switch.
  • the switch may perform rule matching on the data flow to be reported according to the aggregation rule provided by the controller, aggregate the data flow matching the aggregation rule, obtain a report message, and pass the report message through the OpenFlow protocol.
  • the controller may determine, according to the report message, a forwarding rule that matches the data flow of the aggregation rule, and avoid reporting each data flow to be reported to the controller through a Packet-In message.
  • An embodiment of the present invention provides a data processing method for an OpenFlow network, where the method may specifically include the following steps:
  • a controller in an OpenFlow network provides an aggregation rule to a switch in the OpenFlow network.
  • the aggregation rule is used to classify the to-be-reported data flows in the switch, and then the same type of data to be reported is aggregated and reported to the controller, so that the controller can determine the class to be reported.
  • the forwarding rules of the data stream improve the efficiency of the control channel.
  • the controller can provide the aggregation rule to the switch by modifying the flow table to the switch, including adding a flow entry, modifying the flow entry, deleting the flow entry, and the like, so that the switch is subsequently
  • the flow table to be reported can be determined whether the data flow to be reported complies with the aggregation rule by using the flow table modified by the controller.
  • the OpenFlow protocol supports three message types: controller-to-switch, asynchronous (asynchronous), and symmetric (symmetric), and each type of message can have multiple sub-message types, wherein the controller-to-switch message is composed of
  • the controller initiates to manage or obtain the status of the OpenFlow switch.
  • the asynchronous message is initiated by the OpenFlow switch to update network events or switch status changes to the controller.
  • the controller may modify the flow table of the switch by using an OFPT_FLOW_MOD message in the controller-to-switch message, where the modified flow table includes adding a flow entry and modifying the flow table. For example, you can add a flow entry to the flow table of the switch.
  • the flow entry added to the switch is the aggregation rule delivered by the controller.
  • the controller receives a report message sent by the switch, where the report message carries information of a data flow in the switch that matches the aggregation rule.
  • the information of the data flow that matches the set rule in the switch may be the common information of the data flow in the switch that matches the aggregation rule.
  • the switch may use the aggregation. If the matching field in the rule matches the data flow to be reported, the common information of the data flow matching the aggregation rule in the switch may be the type of the matching domain in the aggregation rule, the identifier of the matching domain, and the The length of the matching domain and the mask information of the matching domain, and the matching value of the data flow matching the aggregation rule in the switch that matches the aggregation rule; the reporting message carries the matching in the switch
  • the information of the data flow of the aggregation rule may also be summary data or all data of the data flow matching the aggregation rule in the switch, so that the controller may match according to the switch carried in the report message. Determining, by the information of the data flow of the collection rule, data matching the aggregation rule in the switch Forwarding rules.
  • the controller determines, according to the report message, a forwarding rule of the data flow that matches the aggregation rule in the switch.
  • the controller may parse the reported message to obtain the matching in the switch.
  • the information of the data flow of the rule is collected, and the forwarding rule of the data flow matching the aggregation rule in the switch is determined according to the information of the data flow in the switch that matches the set rule.
  • the controller provides the forwarding rule to the switch, so that the switch processes the data stream in the switch that matches the aggregation rule according to the forwarding rule.
  • the controller may provide the forwarding rule to the switch by modifying the flow table to the switch, including adding a flow entry, modifying a flow entry, deleting a flow entry, and the like, for example, the controller sends the flow.
  • the one or more flow tables provide the forwarding rule to the switch, and the controller, for example, according to the identifier of the flow table in the switch according to the aggregation rule, where the aggregation rule is located in the switch
  • the flow table is modified to provide the forwarding rule to the switch; so that the switch can process the data stream that is cached in the switch and that matches the aggregation rule according to the forwarding rule, or The data stream that is subsequently received in the switch and that matches the aggregation rule is processed.
  • the controller may provide the aggregation rule to the switch, and receive the report message sent by the switch, where the report message carries information of the data flow in the switch that matches the aggregation rule, so that the control
  • the device can determine, according to the report message, a forwarding rule of the data flow that matches the aggregation rule in the switch, and provide the switch to the switch, so that the switch needs to pass each data flow to be reported through the Packet-In
  • the message is reported to the controller to obtain the forwarding rule, which reduces the impact of a large number of data streams to be reported on the OpenFlow network on the control channel bandwidth resource and control channel efficiency, and improves the utilization of the control channel bandwidth resource.
  • the controller in the OpenFlow network or the switch in the OpenFlow network may perform the interaction and the processing on the data of the OpenFlow network by referring to the third embodiment of the present invention.
  • An embodiment of the present invention provides a data processing method for an OpenFlow network, where the method specifically includes the following steps: S301: The controller in the OpenFlow network sends the aggregation rule to the switch in the OpenFlow network in the form of a flow table.
  • the controller may send the aggregation rule to the switch in the form of a flow table, where the aggregation rule may include a matching domain, so as to achieve the purpose of classifying the data flow to be reported, so that the switch may be according to the aggregation rule.
  • the matching field in the match is matched with the reported data flow.
  • the OpenFlow protocol specifies a plurality of feature fields for stream matching, such as ETH_Type (Ethernet Packet Type), ETH DSK Destination MAC Address), IP_PROTO (IP Type), IP-SRC (Source IP Address), IP-DST (destination IP address), TCP-DST (destination TCP port number), UDP DST (destination UDP port number), etc.
  • the controller can select the OpenFlow protocol specified (including the version of the OpenFlow protocol that has been introduced, And one or more of the feature domains for stream matching specified by the later updated OpenFlow protocol version as the matching domain of the aggregation rule, so that the switch can treat according to the matching domain in the aggregation rule.
  • the reported data flows are matched by rules to achieve the purpose of classifying and aggregating the data flows to be reported.
  • Table 1 shows the aggregation rules in the switch in the form of flow tables, which can exist in the last flow table in the switch.
  • the matching fields in the aggregation rules shown in Table 1 include the Ethernet packet type (ETH_Type) and the destination IP address (IP_DST).
  • the meaning of the aggregation rule is: Match all Ethernet packet types to IPv4
  • the action of the flow entry indicates that the successfully matched packet is output to The logical port of the controller is reported to the controller, and the flow entry is The priority of "0" indicates that the priority of the flow table corresponding to the aggregation rule is set to the lowest value, which means that the switch first matches the flow table used to indicate the packet forwarding rule after receiving the data packet, if it does not match The data packet that is not matched to the forwarding rule (that is, the data stream to be reported) is matched to the flow table used to indicate the aggregation rule. Of course, in other embodiments, other priorities may be set.
  • the aggregation rule sent by the controller to the switch may be as described in Table 2.
  • the matching fields in the aggregation rules shown in Table 2 include the Ethernet packet type (ETH_Type) and the destination UDP port number (UDP_DST).
  • the aggregation rule corresponds to a flow entry in the flow table.
  • the aggregation rule may further include multiple flow entries. There are multiple matching rules.
  • the data flows to be reported in the switch are divided into several types of data flows and then aggregated and reported.
  • S302 The switch performs rule matching on the data flow to be reported according to the matching domain in the aggregation rule.
  • the switch may be in the form of a flow table in the switch, and the switch may use all the data flows to be reported according to the matching domain in the aggregation rule, that is, the matching domain in the flow table corresponding to the aggregation rule.
  • the data stream to be reported between 0.0-10.0.255.255 will match successfully.
  • the switch aggregates the data flows that match the aggregation rule, and obtains the report cancellation.
  • the report message carries information of the data stream in the switch that matches the aggregation rule.
  • the switch may aggregate the data flows matching the aggregation rule in the switch according to a preset policy, and obtain a report message, for example, when the number of data flows matching the aggregation rule in the switch reaches a preset threshold. And synthesizing the data flows that match the aggregation rule; for example, the switch periodically aggregates the data flows that match the aggregation rule according to a preset time period.
  • the switch may be configured to perform the aggregation of the data flows that match the aggregation rule.
  • the switch may generate the matching information according to the matching domain in the aggregation rule, where the switch carries the matching information.
  • the information of the data stream matching the aggregation rule in the switch may be the matching information.
  • the matching information can reflect the characteristics of the matching domain in the aggregation rule, so that the controller can determine, according to the characteristics of the matching domain, a forwarding rule that matches the data flow of the matching domain, and the content of the matching information is specific.
  • the type of the matching domain in the aggregation rule Oxm-class, including standard and vendor-defined; for example, as shown in Table 1, the matching domain in the aggregation rule is an Ethernet packet type and a destination IP address.
  • the type of the matching domain in the aggregation rule is a standard;
  • the identifier (ID) of the matching domain in the aggregation rule Oxm_field, for example, when the aggregation rule is as shown in Table 1, the ID of the matching domain in the aggregation rule is a type of the network packet ID and ID of the destination IP address;
  • the destination IP address is 4 bytes in length
  • the mask information of the matching domain in the aggregation rule may include: whether the matching field in the aggregation rule includes a mask (MH), and a number of bits of the mask (Oxm_mask), for example, when the aggregation If the rules are as shown in Table 1, the Ethernet packet type in the aggregation rule is a specific value, and it can be found that the matching domain is an Ethernet packet type without a mask, and the destination IP address in the aggregation rule is 10.0.
  • the destination IP address is 10.0.*.* can meet the requirement that the lower 16 bits of the destination IP address can be matched without rules (that is, the corresponding destination IP address is 10.0.*.*), then the matching domain is obtained as the destination IP address, including Mask, the mask is 16 bits;
  • Matching the matching value of the data flow matching the aggregation rule with the aggregation rule oxm value, for example, when the aggregation rule is as shown in Table 1, the data flow matching the aggregation rule is ⁇ Ethernet packet Type 0x0800, the destination IP address is 10.0.250.255> ⁇ Ethernet packet type 0x0800, and the destination IP address is 10.0.150.255>, the matching value matching the data flow matching the aggregation rule with the aggregation rule can be ⁇ 0x0800 , 10.0.0.0 ⁇ 10.0.255.255>, that is, the value of the matching field in the aggregation rule; or may be ⁇ 0x0800, 10.0.0.0-10.0.150.255 and 10.0.0.0-10.0.250.255>, that is, the matching a specific value that matches the data flow of the aggregation rule with the aggregation rule; or may be a numerical range including a specific value that matches the data flow matching the aggregati
  • the aggregating, by the switch, the data flow that matches the aggregation rule may further include: the switch acquiring data information, where the data information is summary data of a data flow that matches the aggregation rule in the switch or All data.
  • the data stream matching the aggregation rule is actually a data packet, and the switch may acquire the entire content (that is, all data) of the data packet, and may also acquire key content or partial content (ie, summary data) in the data packet.
  • the information about the data flow that matches the aggregation rule in the switch that is carried by the report message may be the data information and the matching information, so that the subsequent controller determines the forwarding rule of the data flow, Refer to the summary data or all data of this type of data stream.
  • the aggregating, by the switch, the data flow that matches the aggregation rule may further include: the switch acquiring a storage address of the data flow matching the aggregation rule in the switch, for example, matching the aggregation rule.
  • a sequence number (buffer ID) of the data stream in the switch cache the report message may further carry a storage address of the data stream matching the aggregation rule in the switch, so that the storage address can be A cached data stream matching the aggregation rule is found in the switch.
  • the aggregating, by the switch, the data flow that matches the aggregation rule may further include: determining, by the switch, an identifier of the flow table in the switch, such as a table ID, according to the aggregation
  • the performing, by the switch, the data flow that matches the aggregation rule may further include: the switch generating a reason for reporting the data flow that matches the aggregation rule, for example, reporting the cause may fail to match the switch
  • the flow table, the report message may also carry a report reason of the data flow matching the aggregation rule, so that the controller can obtain more information.
  • the switch sends the report message to the control by using an OpenFlow protocol. At least one of the following: the matching information, the data information, the storage address of the data stream matching the aggregation rule, and the flow of the aggregation rule in the switch. The identifier of the table, the reason for reporting the data flow that matches the aggregation rule, and the controller determines, according to the report message, a forwarding rule of the data flow that matches the aggregation rule in the switch.
  • the OpenFlow protocol specifies the format of the Packet-In message, and the switch can report the data flow to be reported to the controller in the format of the Packet-In message.
  • the format of the Packet_In message may be extended, so that the aggregated content may be reported to the switch in the format of the extended Packet_In message, and the extended Packet_In
  • the format of the message can be as follows:
  • S305 The controller receives the report message sent by the switch.
  • S306 The controller parses the report message sent by the switch, and determines, according to the parsed information of the data flow that matches the aggregation rule in the switch, the data that matches the aggregation rule in the switch. The forwarding rules of the flow.
  • the information of the data flow that matches the aggregation rule in the switch may be the matching information, that is, the common information of the data flow that matches the aggregation rule in the switch, and includes: The type of the matching domain, the identifier of the matching domain, the length of the matching domain, and the mask information of the matching domain, and the matching of the data flow matching the aggregation rule in the switch with the aggregation rule value.
  • the controller may determine, according to the matching information (that is, common information), a forwarding rule of the data flow that matches the aggregation rule in the switch, because the switch can match the data flow of the aggregation rule together
  • the controller can determine, according to the common information of the data flow matching the aggregation rule, the forwarding rule of the data flow of the matching aggregation rule in the switch, which not only improves the resource utilization of the control channel, but also improves the control channel. Control efficiency.
  • the information of the data flow that matches the aggregation rule in the switch may further include the data information, that is, the summary data or all the data of the data flow in the switch that matches the aggregation rule, and the controller may not only be based on
  • the matching information that is, the common information
  • determines a forwarding rule and may further determine a forwarding rule of the data flow matching the aggregation rule in the switch according to the data information and considering more information.
  • controller may allow the data flows that match the aggregation rule in the switch to follow the same forwarding rule, and may also allow each data flow in the switch that matches the aggregation rule to follow different
  • the forwarding rule is not limited herein.
  • S307 The controller provides the forwarding rule to the switch, so that the switch performs, according to the forwarding rule, a data flow that matches the aggregation rule in the switch. Reason.
  • the controller may send the forwarding rule to the switch, so that the switch processes the data stream that is subsequently received in the switch and that matches the aggregation rule according to the forwarding rule.
  • the report message may further carry a storage address of the data flow matching the aggregation rule in the switch in the switch, so that the controller may send the forwarding rule and the storage address to the
  • the switch is configured to enable the switch to process a data stream that is cached in the storage address and that matches the aggregation rule according to the forwarding rule.
  • the controller may send the forwarding rule to the switch by sending one or more flow tables, for example, the controller sends the forwarding rule by resending one or more flow tables. And being sent to the switch, for example, the report message further carries an identifier of a flow table where the aggregation rule is located in the switch, and the controller may be in a flow table of the switch according to the aggregation rule. And identifying, in the flow table where the aggregation rule is located in the switch, to provide the forwarding rule to the switch.
  • the switch may perform rule matching on the data flow to be reported according to the aggregation rule provided by the controller, aggregate the data flow matching the aggregation rule, obtain a report message, and pass the report message through the OpenFlow protocol.
  • Sending to the controller so that the controller may determine, according to the report message, a forwarding rule that matches the data flow of the aggregation rule and provide the forwarding rule to the switch, to prevent the switch from needing to send each data stream to be reported.
  • the packet-in message is reported to the controller to obtain the forwarding rule, which reduces the impact of a large number of data streams to be reported on the OpenFlow network on the control channel bandwidth resource and control channel efficiency, and improves the utilization of the control channel bandwidth resource.
  • the embodiment of the present invention provides a switch for an OpenFlow network.
  • the switch 400 may specifically include an obtaining unit 401, a processing unit 402, and a sending unit 403.
  • the obtaining unit 401 is configured to acquire an aggregation rule provided by a controller in the OpenFlow network.
  • the processing unit 402 is configured to perform rule matching on the data flows to be reported in the switch according to the aggregation rule, and perform aggregation on the data flows that match the aggregation rule to obtain a report message.
  • the sending unit 403 is configured to send the report message to the controller by using an OpenFlow protocol, so that the controller determines, according to the report message, the forwarding of the data stream that matches the aggregation rule in the switch. rule.
  • the controller in the OpenFlow network may preset a rule, such as an aggregation rule, to instruct the switch to classify the data flow to be reported in the switch according to the rule, so that the rule can be matched.
  • the data stream is aggregated to obtain a report message, and then the report message is reported to the controller to improve the utilization of the OpenFlow network control channel resources.
  • the obtaining unit 401 may obtain an aggregation rule provided by the controller, where the aggregation rule may include a matching domain.
  • the processing unit 402 may specifically perform the rule matching on the data flows to be reported in the switch by using the matching domain in the aggregation rule, and aggregate the data flows that match the aggregation rule to obtain a report message;
  • a data flow matching the aggregation rule is aggregated according to a preset policy, for example, when the number of data flows matching the aggregation rule reaches a preset threshold, the data flow matching the aggregation rule is aggregated; for example And periodically, the data flows that match the aggregation rule are aggregated according to a preset time period.
  • the processing unit 402 may perform the aggregation of the data flows that match the aggregation rule in multiple manners, and may be: extracting matching information of the data flows that match the aggregation rule, that is, common information, for example, if the processing unit 402 utilizes If the matching domain in the aggregation rule matches the data flow to be reported, the common information of the data flow matching the aggregation rule may be extracted, the type of the matching domain in the aggregation rule, the identifier of the matching domain, The length of the matching field and the mask information of the matching domain, and the matching value of the data stream matching the aggregation rule and the aggregation rule are matched; or the data stream matching the aggregation rule may be extracted.
  • the summary data or all the data, respectively, the carrying message may carry the matching information, or may also carry summary data or all data of the data stream matching the aggregation rule, so that the controller root is subsequently According to the reported message, a forwarding rule of the data stream matching the aggregation rule may be determined.
  • the processing unit 402 may also obtain more information and carry it in the report message by aggregating the data flow that matches the aggregation rule, for example, obtaining a data flow matching the aggregation rule in the switch.
  • the storage address (such as the serial number in the switch cache), or the identifier of the flow table in which the aggregation rule is located in the switch.
  • the sending unit 403 may send the report message to the controller by using an OpenFlow protocol, for example, extending a format of a Packet_in message in the OpenFlow protocol, by using the format of the extended Packet_in message. Sending the report message to the controller, so that the controller determines, according to the report message, a forwarding rule of the data flow that matches the aggregation rule in the switch, and the Packet in the OpenFlow protocol is For the specific implementation of the format of the in message, refer to the third embodiment, and details are not described herein.
  • the obtaining unit 401 may obtain the aggregation rule provided by the controller, and the processing unit 402 may perform rule matching on the data flow to be reported in the switch according to the aggregation rule, and match
  • the data flow of the aggregation rule is aggregated to obtain a report message, and the sending unit 403 may send the report message to the controller, so that the controller may determine, according to the report message, that the aggregation rule is matched.
  • the forwarding rule of the data stream avoids reporting the data stream to be reported to the controller through the Packet-In message, which reduces the impact of a large number of data streams to be reported in the OpenFlow network on the control channel bandwidth resource and the control channel efficiency. Increased utilization of control channel bandwidth resources.
  • the switch for the OpenFlow network provided by the embodiment of the present invention may perform the method flow of the data processing method for the OpenFlow network according to the first embodiment or the third embodiment, and details are not described herein again.
  • the embodiment of the present invention provides a controller for an OpenFlow network.
  • the controller 500 may specifically include a sending unit 501, a receiving unit 502, a determining unit 503, and a providing unit 504.
  • the sending unit 501 is configured to provide an aggregation rule to a switch in the OpenFlow network.
  • the receiving unit 502 is configured to receive a report message sent by the switch, where the report message carries information of a data flow in the switch that matches the aggregation rule.
  • the determining unit 503 is configured to determine, according to the report message, a forwarding rule of the data flow that matches the aggregation rule in the switch.
  • the providing unit 504 is configured to provide the forwarding rule to the switch, so that the switch processes the data stream in the switch that matches the aggregation rule according to the forwarding rule.
  • the sending unit 501 can provide the aggregation rule to the switch by modifying the flow table to the switch, including adding a flow entry, modifying the flow entry, deleting the flow entry, and the like, so that the subsequent switch can be utilized.
  • the modified flow table determines whether the data flow to be reported complies with the aggregation rule.
  • the information of the data stream that matches the aggregation rule in the switch that is received by the receiving unit 502 may be the matching information, where the matching information includes the type of the matching domain in the aggregation rule, and the matching domain.
  • the information of the data stream that matches the aggregation rule in the switch that is received by the receiving unit 502 may also be data information and the matching information, where the data information is that the switch matches the aggregation rule.
  • the summary data or all the data of the data stream; the determining unit 503 may parse the report message, obtain the data information and the matching information, and determine according to the data information and the matching information A forwarding rule of the data flow matching the aggregation rule in the switch.
  • the switch processes the data stream that is subsequently received in the switch and that matches the aggregation rule according to the forwarding rule.
  • the reporting message may further carry a storage address of the data stream matching the aggregation rule in the switch in the switch, so that the providing unit 504 may send the forwarding rule and the storage address to The switch, so that the switch processes the data stream that is cached in the storage address and matches the aggregation rule according to the forwarding rule.
  • the providing unit 504 may send the forwarding rule to the switch by sending one or more flow tables, for example, the providing unit 504 sends the one or more flow tables, The forwarding rule is sent to the switch.
  • the reporting message further carries an identifier (for example, a table ID) of the flow table where the aggregation rule is located in the switch, and the providing unit 504 may be configured according to the aggregation rule.
  • the identifier of the flow table in the switch is modified to modify the flow table of the aggregation rule in the switch to provide the forwarding rule to the switch.
  • the sending unit 501 may provide the aggregation rule to the switch
  • the receiving unit 502 may receive the report message sent by the switch, where the report message carries the data in the switch that matches the aggregation rule.
  • the information of the flow so that the determining unit 503 determines, according to the report message, a forwarding rule of the data flow that matches the aggregation rule in the switch, and the providing unit 504 can provide the forwarding rule to the switch. And causing the switch to process the data flow that matches the aggregation rule in the switch according to the forwarding rule, so that the switch needs to report the data flow to be reported through the Packet-In message to obtain the forwarding rule.
  • the impact of a large number of data streams to be reported in the OpenFlow network on the control channel bandwidth resources and the control channel efficiency is reduced, and the utilization of the control channel bandwidth resources is improved.
  • the controller for the OpenFlow network provided by the embodiment of the present invention may perform the method flow of the data processing method for the OpenFlow network according to the second embodiment or the third embodiment, and details are not described herein again.
  • FIG. 6 is a data processing apparatus for an OpenFlow network according to an embodiment of the present invention.
  • the data processing apparatus may include:
  • the processor 601, the memory 602, and the communication interface 605 are connected by the system bus 604 and complete communication with each other.
  • Processor 601 may be a single core or multi-core central processing unit, or a particular integrated circuit, or one or more integrated circuits configured to implement embodiments of the present invention.
  • the memory 602 can be a high speed RAM memory or a non-volatile memory, and at least one disk can be stored.
  • Memory 602 is used by computer to execute instructions 603. Specifically, the program code may be included in the computer execution instruction 603.
  • the processor 601 runs the computer execution instruction 603, and may execute the method flow of the data processing method for the OpenFlow network described in any one of Embodiments 1 to 3.
  • the data processing device may be a switch in the OpenFlow network.
  • the data processing device may be a controller in the OpenFlow network.
  • the embodiment of the present invention provides a computer readable medium, including computer execution instructions, when the processor of the computer executes the computer execution instruction, the computer executes the data for the OpenFlow network according to the first embodiment or the third embodiment. Method flow for processing methods.
  • the embodiment of the present invention further provides a computer readable medium, including a computer executing instruction, when the processor of the computer executes the computer to execute an instruction, where the computer executes the second embodiment or the third embodiment for the OpenFlow network. Method flow of the data processing method.
  • aspects of the present invention, or possible implementations of various aspects may be embodied as a system, method, or computer program product.
  • various aspects of the invention, or possible implementations of various aspects may be in the form of an entirely hardware embodiment, an entirely software embodiment (including firmware, resident software, etc.), or a combination of software and hardware aspects.
  • the formulas are collectively referred to herein as "circuits,""modules," or "systems.”
  • aspects of the invention, or possible implementations of various aspects may take the form of a computer program product, which is a computer readable program code stored on a computer readable medium.
  • the computer readable medium can be a computer readable signal medium or a computer readable storage medium.
  • the computer readable storage medium includes, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing, such as random access memory (RAM), read only memory (ROM), Erase programmable read-only memory (EPROM or flash memory), optical fiber, portable read-only memory (CD-ROM:).
  • the processor in the computer reads the computer readable program code stored in the computer readable medium, such that the processor can perform the functional actions specified in each step or combination of steps in the flowchart; A device that functions as specified in each block, or combination of blocks.
  • the computer readable program code can execute entirely on the user's computer, partly on the user's computer, as a separate software package, partly on the user's computer and partly on the remote computer, or entirely on the remote computer or computer.
  • the functions noted in the various steps of the flowchart, or in the blocks in the block diagrams may not occur in the order noted.
  • two steps, or two blocks, shown in succession may in fact be executed substantially simultaneously, or the blocks may sometimes be executed in the reverse order.

Landscapes

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

Abstract

本发明实施例提供了一种用于OpenFlow网络的数据处理方法和装置,使得OpenFlow网络中的交换机可以获取OpenFlow网络中的控制器提供的聚合规则,根据所述聚合规则,对待上报的数据流进行规则匹配,提取所述待上报的数据流中匹配所述聚合规则的数据流的信息并打包发送给控制器,避免了将每个待上报的数据流都通过Packet_In消息发送给控制器,降低了 Packet_In消息对控制通道带宽资源的消耗,减少了OpenFlow网络中大量待上报的数据流对控制通道带宽资源和控制通道效率的影响,提高了控制通道带宽资源的利用率。

Description

一种用于 OpenFlow网络的数据处理方法和装置 技术领域
本发明实施例涉及通信技术, 特别涉及一种用于 OpenFlow网络的数据 处理方法和装置。 背景技术
OpenFlow是一种支持网络创新研究的新型网络交换模型,该模型通过开 放的流表支持用户对网络处理行为进行控制。 OpenFlow网络的基本思想是实 现了数据转发层和控制层的分离 ,将整个 OpenFlow网络分为数据通道和控制 通道, 其中 OpenFlow交换机(Switch )负责数据层的转发, 而 OpenFlow控制 器 (Controller ) 实现了控制层的功能, 例如决定转发规则, OpenFlow网络 中的控制协议为 OpenFlow协议。
现有的 OpenFlow网络中, 当交换机接收到数据包后,将在本地的流表上 查找该数据包是否匹配已有的转发规则, 如果没有匹配, 则将该未匹配到的 数据包作为待上报的数据流, 通过 Packet— in消息(上报消息 /包输入消息)上 报给控制器, 由控制器决定该未匹配到的数据包的转发规则 (为描述方便, 后续将所述交换机中未匹配到转发规则的数据包统称为待上报的数据流;)。 一旦网络中存在大量待上报的数据流, 将大量消耗控制通道的带宽资源, 影 响控制通道的效率。 发明内容
本发明实施例提出了一种用于 OpenFlow网络的数据处理方法和装置, 能够减少 OpenFlow网络中大量待上报的数据流对控制通道带宽资源和控制 通道效率的影响。
第一方面, 本发明实施例提出了一种用于 OpenFlow网络的数据处理方 法, 该方法包括: 所述 OpenFlow网络中的交换机获取所述 OpenFlow网络 中的控制器提供的聚合规则;
所述交换机根据所述聚合规则, 对待上报的数据流进行规则匹配; 所述交换机对匹配所述聚合规则的数据流进行聚合, 获得上报消息; 所述交换机通过 OpenFlow协议将所述上报消息发送给所述控制器, 以 使得所述控制器根据所述上报消息,确定所述交换机中匹配所述聚合规则的 数据流的转发规则。
结合第一方面, 在第一种可能的实现方式中, 所述交换机根据所述聚合 规则, 对待上报的数据流进行规则匹配包括: 所述交换机根据所述聚合规则 中的匹配域, 对待上报的数据流进行规则匹配。
结合第一方面的第一种可能的实现方式, 在第二种可能的实现方式中, 所述交换机对匹配所述聚合规则的数据流进行聚合, 获得上报消息包括: 所述交换机根据所述匹配域, 生成匹配信息, 所述匹配信息包括: 所述 匹配域的类型、 所述匹配域的标识、 所述匹配域的长度和所述匹配域的掩码 信息,以及匹配所述聚合规则的数据流与所述聚合规则相匹配的匹配值;则, 所述上 >¾消息携带所述匹配信息。
结合第一方面的第二种可能的实现方式, 在第三种可能的实现方式中, 所述交换机对匹配所述聚合规则的数据流进行聚合, 获得上报消息还包括: 所述交换机获取数据信息,所述数据信息为匹配所述聚合规则的数据流 的摘要数据或全部数据; 则, 所述上报消息还携带所述数据信息。
结合第一方面的第二种可能的实现方式或者第三种可能的实现方式,在 第四种可能的实现方式中, 所述交换机对匹配所述聚合规则的数据流进行聚 合, 获得上报消息, 还包括: 所述交换机获取匹配所述聚合规则的数据流在 所述交换机中的存储地址; 则, 所述上报消息还携带匹配所述聚合规则的数 据流在所述交换机中的存储地址。
结合第一方面的第二种或者第三种或者第四种可能的实现方式,在第五 种可能的实现方式中, 所述交换机对匹配所述聚合规则的数据流进行聚合, 获得上报消息还包括: 所述交换机确定所述聚合规则在所述交换机中所在流 表的标识; 则, 所述上报消息还携带所述聚合规则在所述交换机中所在流表 的标识。
结合第一方面或第一方面的上述任一种可能的实现方式,在第六种可能 的实现方式中, 所述交换机通过 OpenFlow协议将所述上报消息发送给所述 控制器包括:所述交换机对所述 OpenFlow协议中的 Packet— in消息的格式进 行扩展; 所述交换机通过所述扩展的 Packet— in消息的格式, 将所述上报消 息发送给所述控制器。
第二方面, 本发明实施例提出了一种用于 OpenFlow网络的数据处理方 法, 该方法包括: 所述 OpenFlow 网络中的控制器将聚合规则提供给所述 OpenFlow网络中的交换机;
所述控制器接收所述交换机发送的上报消息 , 所述上报消息携带所述交 换机中匹配所述聚合规则的数据流的信息;
所述控制器根据所述上报消息,确定所述交换机中匹配所述聚合规则的 数据流的转发规则;
所述控制器将所述转发规则提供给所述交换机, 以使得所述交换机根据 所述转发规则, 对所述交换机中匹配所述聚合规则的数据流进行处理。
结合第二方面, 在第一种可能的实现方式中, 所述交换机中匹配所述聚 合规则的数据流的信息包括匹配信息, 所述匹配信息包括所述聚合规则中的 匹配域的类型、 所述匹配域的标识、 所述匹配域的长度和所述匹配域的掩码 信息, 以及所述交换机中匹配所述聚合规则的数据流与所述聚合规则相匹配 的匹配值; 则所述控制器根据所述上报消息, 确定所述交换机中匹配所述聚 合规则的数据流的转发规则, 包括: 所述控制器对所述上报消息进行解析, 得到所述匹配信息; 所述控制器根据所述匹配信息, 确定所述交换机中匹配 所述聚合规则的数据流的转发规则。
结合第二方面的第一种可能的实现方式, 在第二种可能的实现方式中, 所述交换机中匹配所述聚合规则的数据流的信息还包括数据信息, 所述数据 信息为所述交换机中匹配所述聚合规则的数据流的摘要数据或全部数据; 则 所述控制器根据所述上报消息,确定所述交换机中匹配所述聚合规则的数据 流的转发规则, 包括: 所述控制器对所述上报消息进行解析, 得到所述数据 信息和所述匹配信息; 所述控制器才艮据所述数据信息和所述匹配信息, 确定 所述交换机中匹配所述聚合规则的数据流的转发规则。
结合第二方面, 或第二方面的第一种或第二种可能的实现方式, 在第三 种可能的实现方式中, 所述上报消息还携带所述交换机中匹配所述聚合规则 的数据流在所述交换机中的存储地址; 则所述控制器将所述转发规则提供给 所述交换机, 以使得所述交换机根据所述转发规则, 对所述交换机中匹配所 述聚合规则的数据流进行处理, 包括: 所述控制器将所述转发规则和所述存 储地址发送给所述交换机, 以使得所述交换机根据所述转发规则, 对所述存 储地址中緩存的匹配所述聚合规则的数据流进行处理。
第三方面, 本发明实施例提出了一种用于 OpenFlow网络的交换机, 该 交换机包括:
获取单元: 用于获取所述 OpenFlow网络中的控制器提供的聚合规则; 处理单元: 用于根据所述聚合规则, 对所述交换机中待上报的数据流进 行规则匹配, 对匹配所述聚合规则的数据流进行聚合, 获得上报消息;
发送单元:用于通过 OpenFlow协议将所述上报消息发送给所述控制器, 以使得所述控制器根据所述上报消息,确定所述交换机中匹配所述聚合规则 的数据流的转发规则。
结合第三方面, 在第一种可能的实现方式中, 所述处理单元具体用于根 据所述聚合规则中的匹配域, 对所述交换机中待上报的数据流进行规则匹 配。
结合第三方面的第一种可能的实现方式, 在第二种可能的实现方式中, 所述处理单元具体用于根据所述匹配域,生成匹配信息,所述匹配信息包括: 所述匹配域的类型、 所述匹配域的标识、 所述匹配域的长度和所述匹配域的 掩码信息, 以及匹配所述聚合规则的数据流与所述聚合规则相匹配的匹配 值, 所述上 消息携带所述匹配信息。
结合第三方面的第二种可能的实现方式, 在第三种可能的实现方式中, 所述处理单元还用于获取数据信息, 所述数据信息为匹配所述聚合规则的数 据流的摘要数据或全部数据, 所述上报消息还携带所述数据信息。
结合第三方面的第二种可能的实现方式或者第三种可能的实现方式,在 第四种可能的实现方式中, 所述处理单元还用于获取匹配所述聚合规则的数 据流在所述交换机中的存储地址, 所述上报消息还携带匹配所述聚合规则的 数据流在所述交换机中的存储地址。
结合第三方面的第二种可能的实现方式或者第三种可能的实现方式或 者第四种可能的实现方式, 在第五种可能的实现方式中, 所述处理单元还用 于确定所述聚合规则在所述交换机中所在流表的标识, 所述上报消息还携带 所述聚合规则在所述交换机中所在流表的标识。
结合第三方面, 或第三方面的上述任一种可能的实现方式, 在第六种可 能的实现方式中, 所述发送单元具体用于对所述 OpenFlow 协议中的 Packet— in消息的格式进行扩展, 通过所述扩展的 Packet— in消息的格式, 将 所述上报消息发送给所述控制器。
第四方面, 本发明实施例提出了一种用于 OpenFlow网络的控制器, 该 控制器包括:
发送单元, 用于将聚合规则提供给所述 OpenFlow网络中的交换机; 接收单元, 用于接收所述交换机发送的上报消息, 所述上报消息携带所 述交换机中匹配所述聚合规则的数据流的信息;
确定单元, 用于根据所述上报消息, 确定所述交换机中匹配所述聚合规 则的数据流的转发规则;
提供单元, 用于将所述转发规则提供给所述交换机, 以使得所述交换机 根据所述转发规则, 对所述交换机中匹配所述聚合规则的数据流进行处理。
结合第四方面, 在第一种可能的实现方式中, 所述交换机中匹配所述聚 合规则的数据流的信息包括匹配信息, 所述匹配信息包括所述聚合规则中的 匹配域的类型、 所述匹配域的标识、 所述匹配域的长度和所述匹配域的掩码 信息, 以及所述交换机中匹配所述聚合规则的数据流与所述聚合规则相匹配 的匹配值; 则, 所述确定单元具体用于对所述上 "^消息进行解析, 得到所述 匹配信息, 以及根据所述匹配信息, 确定所述交换机中匹配所述聚合规则的 数据流的转发规则。
结合第四方面的第一种可能的实现方式, 在第二种可能的实现方式中, 所述交换机中匹配所述聚合规则的数据流的信息还包括数据信息, 所述数据 信息为所述交换机中匹配所述聚合规则的数据流的摘要数据或全部数据; 则, 所述确定单元具体用于对所述上 "^消息进行解析,得到所述数据信 息和所述匹配信息, 以及根据所述数据信息和所述匹配信息, 确定所述交换 机中匹配所述聚合规则的数据流的转发规则。
结合第四方面, 或第四方面的第一种或第二种可能的实现方式, 在第三 中可能的实现方式中, 所述上报消息还携带所述交换机中匹配所述聚合规则 的数据流在所述交换机中的存储地址; 则, 所述提供单元具体用于将所述转 发规则和所述存储地址发送给所述交换机, 以使得所述交换机根据所述转发 规则, 对所述存储地址中緩存的匹配所述聚合规则的数据流进行处理。
第五方面, 本发明实施例提出了一种用于 OpenFlow网络的交换机, 该 交换机包括处理器、 存储器、 总线和通信接口; 所述存储器用于存储计算机 执行指令, 所述处理器与所述存储器通过所述总线连接, 当所述交换机运行 时, 所述处理器执行所述存储器存储的所述计算机执行指令, 以使所述交换 机执行第一方面所述的用于 OpenFlow网络的数据处理方法或第一方面的任 一种可能的实现方式所述的用于 OpenFlow网络的数据处理方法。
第六方面, 本发明实施例提出了一种用于 OpenFlow网络的控制器, 该 控制器包括处理器、 存储器、 总线和通信接口; 所述存储器用于存储计算机 执行指令, 所述处理器与所述存储器通过所述总线连接, 当所述控制器运行 时, 所述处理器执行所述存储器存储的所述计算机执行指令, 以使所述控制 器执行第二方面所述的用于 OpenFlow网络的数据处理方法或第二方面的任 一种可能的实现方式所述的用于 OpenFlow网络的数据处理方法。
第七方面, 本发明实施例提出了一种计算机可读介质, 包括计算机执行 指令, 以供计算机的处理器执行所述计算机执行指令时, 所述计算机执行第 一方面所述的用于 OpenFlow网络的数据处理方法或第一方面的任一种可能 的实现方式所述的用于 OpenFlow网络的数据处理方法。
第八方面, 本发明实施例提出了一种计算机可读介质, 包括计算机执行 指令, 以供计算机的处理器执行所述计算机执行指令时, 所述计算机执行第 二方面所述的用于 OpenFlow网络的数据处理方法或第二方面的任一种可能 的实现方式所述的用于 OpenFlow网络的数据处理方法。
本发明实施例中, OpenFlow 网络中的交换机可以根据控制器提供的聚 合规则, 对待上报的数据流进行规则匹配, 对匹配所述聚合规则的数据流进 行聚合, 获得上报消息, 并将所述上报消息通过 OpenFlow协议发送给控制 器, 使得所述控制器可以根据所述上报消息, 确定匹配所述聚合规则的数据 流的转发规则, 由于避免将每个待上报的数据流都通过 Packet— In消息上报 给控制器, 减少了 OpenFlow网络中大量待上报的数据流对控制通道带宽资 源和控制通道效率的影响, 提高了控制通道带宽资源的利用率。 附图说明
为了更清楚地说明本发明实施例的技术方案, 下面将对现有技术或实施 例中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅 是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造性劳 动的前提下, 还可以根据这些附图获得其他的附图。
图 1是本发明实施例提供的一种用于 OpenFlow网络的数据处理方法流 程图;
图 2是本发明实施例提供的又一种用于 OpenFlow网络的数据处理方法 流程图;
图 3是本发明实施例提供的又一种用于 OpenFlow网络的数据处理方法 流程图;
图 4是本发明实施例提供的一种用于 OpenFlow网络的交换机的示意图; 图 5是本发明实施例提供的又一种用于 OpenFlow网络的控制器的示意 图;
图 6是本发明实施例提供的又一种用于 OpenFlow网络的数据处理装置 的结构组成示意图。 具体实施方式
本发明实施例提出了一种用于 OpenFlow网络的数据处理方法和装置, 能够减少 OpenFlow网络中大量待上报的数据流对控制通道带宽资源和控制 通道效率的影响, 提高控制通道带宽资源的利用率。
在现有的 OpenFlow网络模型中, 包含两大关键组成部分: 控制器和交 换机, 其中, 所述交换机可以用于对来自主机、 PC机、 笔记本电脑等客户端 的数据包进行转发, 所述控制器可以决定所述交换机转发数据包的转发规 则。 在 OpenFlow网络中, 通常有多个交换机, 每个交换机都有各自用于指示 转发规则的流表。 当有交换机接收到数据包后, 将匹配自身的用于指示转发 规则的流表, 如果在流表中能够匹配到合适的流表项, 则执行流表项提供的 相应指令和动作 (即转发规则), 例如直接转发到某个端口, 修改数据包后 转发到某个端口, 或者丟弃等。 如果在流表中未匹配到合适的流表项, 则通 过与控制器建立的传输控制协议 ( Transmission Control Protocol, TCP )控制 通道, 将所述未匹配到的数据包(为描述方便, 后续将所述交换机中未匹配 到转发规则的数据包统称为待上报的数据流) 通过 OpenFlow协议中的 Packet— In消息上报给控制器, 由控制器来决定该未匹配到的数据包的转发规 则。 当交换机中有多个待上报的数据流时, 该交换机还可以将待上报的数据 流保存在自身的緩存中等待上报。 然而, 当网络中存在大量的交换机, 大量的交换机均需要向控制器上报 待上报的数据流时, 或者当某个交换机中存在大量的待上报的数据流时, 将 产生大量的 Packet— In消息上报给控制器时, 大量 Packet— In消息会对控制通道 带来较大的压力, 占用大量的控制通道带宽资源,降低控制通道的控制效率。
为了解决这个问题, 本发明实施例提供了一种用于 OpenFlow网络的数 据处理方法, 使得 OpenFlow网络中的交换机可以获取 OpenFlow网络中的控 制器提供的聚合规则, 根据所述聚合规则, 对待上报的数据流(即未匹配到 转发规则的数据包)进行规则匹配,对匹配所述聚合规则的数据流进行聚合, 获得上报消息, 并将所述上报消息通过 OpenFlow协议发送给控制器,避免了 将每个待上报的数据流都通过 Packet— In消息发送给控制器, 降低了 Packet— In 消息对控制通道带宽资源的消耗,减少了 OpenFlow网络中大量待上报的数据 流对控制通道带宽资源和控制通道效率的影响,提高了控制通道带宽资源的 利用率。
下面对本发明实施例进行详细地介绍。
实施例一
本发明实施例提供了一种用于 OpenFlow网络的数据处理方法, 所述方 法具体可以包括以下步骤:
S101 : OpenFlow网络中的交换机获取所述 OpenFlow网络中的控制器提 供的聚合规则。
OpenFlow网络中的控制器可以预先设定一种规则, 例如聚合规则, 用 于指示交换机按照该规则对待上报的数据流进行分类,使得 OpenFlow网络中 的交换机可以将匹配该规则的待上报的数据流进行聚合, 获得上报消息, 然 后将上报消息上报给所述控制器,从而能够提高 OpenFlow网络控制通道资源 的利用率。
此外,所述聚合规则中可以包括匹配域,利用所述聚合规则中的匹配域, 对待上报的数据流进行规则匹配, 匹配该匹配域的待上报的数据流具有一些 相同的特性, 所述控制器可以针对符合该匹配信息的数据流确定转发规则, 将符合该匹配域的数据流的信息一起打包上报给控制器, 因此不仅可以提高 控制通道的资源利用率, 还可以提高控制通道的控制效率。
S102:所述交换机根据所述聚合规则,对待上报的数据流进行规则匹配。 具体地, 所述聚合规则可以流表的形式存在与所述交换机中, 所述交换 机中还保存有用于指示数据包的转发规则的流表, 当有交换机接收到数据包 后, 将匹配自身的用于指示数据包转发规则的流表, 如果在该指示数据包转 发规则的流表中未匹配到合适的流表项 (即该数据包为待上报的数据流), 则可以进一步将该数据包匹配用于指示聚合规则的流表, 即对待上报的数据 流进行规则匹配, 如果所述待上报的数据流匹配所述聚合规则, 所述交换机 可以将匹配所述聚合规则的数据流存放在交换机的緩存中, 以便后续所述交 换机可以对匹配所述聚合规则的数据流进行处理和上报。
S103: 所述交换机对匹配所述聚合规则的数据流进行聚合, 获得上报消 息。
具体地, 所述交换机可以按照预设的策略, 对自身緩存的匹配所述聚合 规则的数据流进行聚合, 例如, 当交换机中匹配所述聚合规则的数据流的数 量达到预设门限时, 对匹配所述聚合规则的数据流进行聚合; 又例如, 所述 交换机根据预设时间周期, 周期性地对匹配所述聚合规则的数据流进行聚 合。
所述交换机对匹配所述聚合规则的数据流进行聚合可以有多种方式,可 以是提取匹配所述聚合规则的数据流的匹配信息, 即共性信息, 例如, 如果 所述交换机利用所述聚合规则中的匹配域对待上报的数据流进行匹配, 则提 取匹配所述聚合规则的数据流的共性信息可以是提取所述聚合规则中的匹 配域的类型、 所述匹配域的标识、 所述匹配域的长度和所述匹配域的掩码信 息, 以及提取匹配所述聚合规则的数据流与所述聚合规则相匹配的匹配值; 或者还可以是提取匹配所述聚合规则的数据流的摘要数据或全部数据。相对 应地, 则所述上"¾消息中可以携带所述匹配信息, 或者还可以携带匹配所述 聚合规则的数据流的摘要数据或全部数据, 以使得后续所述控制器根据所述 上报消息, 可以确定匹配所述聚合规则的数据流的转发规则。
此外, 所述交换机还可以获取更多的信息并携带在上报消息中, 例如获 取匹配所述聚合规则的数据流在所述交换机中的存储地址 (如在所述交换机 緩存中的序号 ), 或者所述聚合规则在所述交换机中所在流表的标识。
S104: 所述交换机通过 OpenFlow协议将所述上报消息发送给所述控制 器, 以使得所述控制器根据所述上报消息, 确定所述交换机中匹配所述聚合 规则的数据流的转发规则。
本发明实施例中, 交换机可以根据控制器提供的聚合规则, 对待上报的 数据流进行规则匹配, 对匹配所述聚合规则的数据流进行聚合, 获得上报消 息, 并将所述上报消息通过 OpenFlow协议发送给控制器,使得所述控制器可 以根据所述上报消息, 确定匹配所述聚合规则的数据流的转发规则, 避免将 每个待上报的数据流都通过 Packet— In消息上报给控制器, 减少了 OpenFlow 网络中大量待上报的数据流对控制通道带宽资源和控制通道效率的影响,提 高了控制通道带宽资源的利用率。
实施例二
本发明实施例提供了一种用于 OpenFlow网络的数据处理方法, 所述方 法具体可以包括以下步骤:
201 : OpenFlow网络中的控制器将聚合规则提供给所述 OpenFlow网络 中的交换机。
在本发明实施例中,所述聚合规则用以对交换机中的待上报数据流进行 分类, 从而将同一类的待上报数据流进行聚合, 上报给控制器, 从而控制器 可以决定该类待上报数据流的转发规则, 提高控制通道的效率。
而所述控制器可以通过对交换机修改流表的方式 (包括增加流表项、修 改流表项、 删除流表项等)将聚合规则提供给交换机, 使得后续所述交换机 能够通过利用控制器修改的流表, 确定待上报的数据流是否符合聚合规则。 具体地 , OpenFlow协议支持三种消息类型: controller-to-switch、 asynchronous (异步 )和 symmetric (对称 ), 而每一类消息又可以拥有多个子 消息类型, 其中其中, controller-to-switch消息由控制器发起, 用来管理或获 取 OpenFlow交换机的状态, asynchronous消息由 OpenFlow交换机发起, 用来 将网络事件或交换机状态变化更新到控制器。 在本发明实施例中, 所述控制 器可以通过 controller-to-switch消息中的 OFPT— FLOW— MOD消息, 对交换机 的流表进行修改, 所述修改流表包括增加流表项、 修改流表项、 删除流表项 等类型, 例如, 可以令消息的 type=ADD, 为所述交换机的流表增加流表项, 从而交换机中增加的流表项即为控制器下发的聚合规则。
202: 所述控制器接收所述交换机发送的上报消息, 所述上报消息携带 所述交换机中匹配所述聚合规则的数据流的信息。
其中, 所述上报消息中携带所述交换机中匹配所述集合规则的数据流的 信息可以为所述交换机中匹配所述聚合规则的数据流的共性信息, 例如, 所 述交换机可以利用所述聚合规则中的匹配域对待上报的数据流进行匹配, 则 所述交换机中匹配所述聚合规则的数据流的共性信息可以是所述聚合规则 中的匹配域的类型、 所述匹配域的标识、 所述匹配域的长度和所述匹配域的 掩码信息, 以及所述交换机中匹配所述聚合规则的数据流与所述聚合规则相 匹配的匹配值; 所述上报消息中携带所述交换机中匹配所述集合规则的数据 流的信息还可以为所述交换机中匹配所述聚合规则的数据流的摘要数据或 全部数据,从而所述控制器可以根据所述上报消息中携带的所述交换机中匹 配所述集合规则的数据流的信息,确定所述交换机中匹配所述聚合规则的数 据流的转发规则。
203 : 所述控制器根据所述上报消息, 确定所述交换机中匹配所述聚合 规则的数据流的转发规则。
所述控制器可以对所述上报消息进行解析,得到所述交换机中匹配所述 集合规则的数据流的信息, 并根据所述交换机中匹配所述集合规则的数据流 的信息, 确定所述交换机中匹配所述聚合规则的数据流的转发规则。
204: 所述控制器将所述转发规则提供给所述交换机, 以使得所述交换 机根据所述转发规则, 对所述交换机中匹配所述聚合规则的数据流进行处 理。
所述控制器可以通过对交换机修改流表的方式 (包括增加流表项、修改 流表项、 删除流表项等)将所述转发规则提供给所述交换机, 例如所述控制 器通过下发一个或多个流表将所述转发规则提供给所述交换机, 又例如所述 控制器根据所述聚合规则在所述交换机中所在流表的标识,对所述聚合规则 在所述交换机中所在流表进行修改, 以将所述转发规则提供给所述交换机; 从而所述交换机能够根据所述转发规则,对所述交换机中緩存的匹配所述聚 合规则的数据流进行处理,或者对所述交换机中后续接收到的匹配所述聚合 规则的数据流进行处理。
本发明实施例中, 控制器可以将聚合规则提供给交换机, 并接收所述交 换机发送的上报消息, 所述上报消息携带所述交换机中匹配所述聚合规则的 数据流的信息, 从而所述控制器能够根据所述上报消息, 确定所述交换机中 匹配所述聚合规则的数据流的转发规则, 并提供给所述交换机, 避免所述交 换机需要将每个待上报的数据流都通过 Packet— In消息上报给控制器才能获 得转发规则,减少了 OpenFlow网络中大量待上报的数据流对控制通道带宽资 源和控制通道效率的影响, 提高了控制通道带宽资源的利用率。
本发明实施例一或实施例二中的, OpenFlow网络中的控制器或者 OpenFlow网络中的交换机具体可以参照本发明实施例三进行交互和对 OpenFlow网络的数据进行处理。
实施例三
本发明实施例提供了一种用于 OpenFlow网络的数据处理方法, 所述方 法具体包括以下步骤: S301 : OpenFlow网络中的控制器通过 OpenFlow协议将聚合规则以流表 形式下发到 OpenFlow网络中的交换机。
所述控制器可以将聚合规则以流表形式下发到交换机, 其中, 所述聚合 规则可以包含匹配域, 以达到对待上报的数据流进行分类的目的, 从而所述 交换机可以根据所述聚合规则中的匹配域, 对待上报的数据流进行规则匹 配。
具体地 , OpenFlow协议规定了多种用于流匹配的特征域 ,例如 ETH— Type (以太网包类型)、 ETH DSK目的 MAC地址)、 IP_PROTO( IP类型)、 IP— SRC (源 IP地址 ), IP— DST(目的 IP地址 ), TCP— DST(目的 TCP端口号)、 UDP DST (目的 UDP端口号)等, 所述控制器可以选取 OpenFlow协议规定的(包括已 经推出的 OpenFlow协议版本规定的, 以及以后更新的 OpenFlow协议版本规 定的)用以流匹配的特征域中的一种或多种做为所述聚合规则的匹配域, 从 而所述交换机可以根据所述聚合规则中的匹配域,对待上报的数据流进行规 则匹配, 以达到对待上报的数据流进行分类和聚合的目的。
例如, 表 1所示为所述交换机中以流表形式存在的聚合规则, 该流表可 以存在于交换机中的最后一张流表中。
Figure imgf000016_0001
表 1中所示的聚合规则中的匹配域包括以太网包类型( ETH— Type )和目 的 IP地址(IP— DST ),所述聚合规则的含义为: 匹配所有以太网包类型为 IPv4
( OFPXMT_OFB_ETH_TYPE==0x0800, 或者 ETH— TYPE==0x0800 ), 且目 的 IP范围在 10.0.0.0-10.0.255.255之间的数据包, 流表项的动作 (Action )表 示将匹配成功的数据包输出到控制器逻辑端口, 即上报给控制器, 流表项的 优先级为 "0" 表示将该聚合规则对应的流表的优先级设置为最低, 意味着 所述交换机在接收到数据包后先匹配用于指示数据包转发规则的流表,如果 未匹配到, 才将该未匹配到转发规则的数据包(即待上报的数据流)去匹配 这条用于指示聚合规则的流表, 当然在其它的实施例中, 还可以设置为其它 优先级。 又例如, 控制器下发给交换机的聚合规则可以如表 2所述。
表 2
Figure imgf000017_0001
表 2 中所示的聚合规则中的匹配域包括以太网包类型 ( ETH— Type )和 目的 UDP端口号 ( UDP— DST ) , 所述聚合规则的含义为: 匹配所有以太网 包类型为 IPv4 ( Eth_type==0x0800 ), 且目的 UDP端口号为 67的数据包。
在由表 1或表 2所述的流表中, 所述聚合规则对应该流表中的一个流表 项, 在其它可选的实施例中, 所述聚合规则还可以包括多个流表项, 存在多 个匹配规则, 即将交换机中待上报的数据流划分为几类数据流后分别聚合再 上报。
S302: 所述交换机根据所述聚合规则中的匹配域, 对待上报的数据流进 行规则匹配。
由于所述聚合规则以流表的形式存在于所述交换机中, 所述交换机可以 根据该聚合规则中的匹配域, 即该聚合规则对应的流表中的匹配域, 对所有 待上报的数据流进行规则匹配, 例如, 当聚合规则如表 1所示时, 匹配域包 括以太网包类型和目 的 IP 地址, 则满足以太网包类型为 IPv4 ( Eth_type==0x0800 ), 且目的 IP范围在 10.0.0.0-10.0.255.255之间的待上报 的数据流将匹配成功。
S303: 所述交换机对匹配所述聚合规则的数据流进行聚合, 获得上报消 息, 所述上报消息携带所述交换机中匹配所述聚合规则的数据流的信息。 所述交换机可以根据预设的策略,对所述交换机中匹配所述聚合规则的 数据流进行聚合, 获得上报消息, 例如, 当交换机中匹配所述聚合规则的数 据流的数量达到预设门限时, 对匹配所述聚合规则的数据流进行聚合; 又例 如, 所述交换机根据预设时间周期, 周期性地对匹配所述聚合规则的数据流 进行聚合。
其中, 所述交换机对匹配所述聚合规则的数据流进行聚合可以有多种方 式, 具体地可以是: 所述交换机根据所述聚合规则中的匹配域, 生成匹配信 息, 所述上报消息中携带的所述交换机中匹配所述聚合规则的数据流的信息 可以为所述匹配信息。 所述匹配信息能够反映所述聚合规则中的匹配域的特 性, 从而所述控制器可以根据所述匹配域的特性, 决策匹配该匹配域的数据 流的转发规则, 所述匹配信息的内容具体可以包括:
1 )所述聚合规则中的匹配域的类型: Oxm— class, 包括标准和厂商自定 义; 例如如表 1所示时, 所述聚合规则中的匹配域为以太网包类型和目的 IP 地址, 相应地所述聚合规则中的匹配域的类型为标准;
2 ) 所述聚合规则中的匹配域的标识 (ID ): Oxm— field, 例如, 当所述 聚合规则如表 1所示时, 所述聚合规则中的匹配域的 ID为太网包类型的 ID 和目的 IP地址的 ID;
3 ) 所述聚合规则中的匹配域的长度: Oxm— length, 例如当所述聚合规 则如表 1所示时, 所述聚合规则中的匹配域的长度为: 太网包类型的长度为
2个字节, 目的 IP地址的长度为 4个字节;
4 ) 所述聚合规则中的匹配域的掩码信息, 可以包括: 所述聚合规则中 的匹配域是否包含掩码 ( MH ), 以及掩码的位数( Oxm_mask ) , 例如, 当所 述聚合规则如表 1所示时, 所述聚合规则中的以太网包类型为特定值, 则可 以得出匹配域为以太网包类型时不包含掩码, 所述聚合规则中的目的 IP地 址 10.0.0.0-10.0.255.255之间, 可以推导出进行规则匹配时, 目的 IP地址为 10.0.*.*就可以满足要求, 即目的 IP地址的低 16位可以不进行规则匹配(即 对应目的 IP地址为 10.0.*.* ), 则可以得出匹配域为目的 IP地址时, 包含掩 码, 掩码为 16位;
5 ) 匹配所述聚合规则的数据流与所述聚合规则相匹配的匹配值: oxm value, 例如, 当所述聚合规则如表 1 所示, 匹配所述聚合规则的数据 流为 <以太网包类型 0x0800, 目的 IP地址为 10.0.250.255> <以太网包类型 0x0800, 目的 IP地址为 10.0.150.255>时, 匹配所述聚合规则的数据流与所 述聚合规则相匹配的匹配值可以为 <0x0800 , 10.0.0.0~10.0.255.255>, 即所述 聚合规则中的匹配域的值; 或者还可以是 <0x0800, 10.0.0.0-10.0.150.255 以 及 10.0.0.0-10.0.250.255>, 即匹配所述聚合规则的数据流与所述聚合规则相 匹配的具体值; 或者还可以是包含匹配所述聚合规则的数据流与所述聚合规 则相匹配的具体值的数值范围, 该数值范围属于所述聚合规则中的匹配域的 值即可, 如 <0χ0800 , 10.0.0.0-10.0.150.255~10.0.0.0-10.0.250.255> , 如 〈0x0800, 10.0.0.0-10.0.050.255~10.0.0.0-10.0.250.255>„ 例如, 以表 1所示的聚合规则为例, 生成的所述聚合规则中的匹配域的 结构可以包括表 3中所示的内容:
Figure imgf000019_0001
其中, MH=0表示匹配域没有掩码, MH=1表示匹配域有掩码。
后续所述控制器根据从表 3所示的匹配信息, 可以解析出所述聚合规则 中的匹配域为以太网包类型以及目的 IP地址, 匹配所述聚合规则的数据流 的以太网类型为 IPv4 ( Eth_type==0x0800 ) , 且目 的 IP 范围在 10.0.0.0-10.0.255.255之间, 并且进行规则匹配时, 目的 IP地址的低 16位不 进行规则匹配, 即目的 IP地址为 10.0.* .* , 且以太网包类型号为 0x0800就 能够匹配成功。
可选地, 所述交换机对匹配所述聚合规则的数据流进行聚合还可以包 括: 所述交换机获取数据信息, 所述数据信息为所述交换机中匹配所述聚合 规则的数据流的摘要数据或全部数据。 具体地, 匹配所述聚合规则的数据流 实际上为数据包, 所述交换机可以获取数据包的全部内容(即全部数据), 也可以获取数据包中的关键内容或部分内容(即摘要数据), 则所述上报消 息携带的所述交换机中匹配所述聚合规则的数据流的信息还可以为所述数 据信息和所述匹配信息, 以便后续控制器决定该类数据流的转发规则时, 可 以参考该类数据流的摘要数据或者全部数据。
可选地, 所述交换机对匹配所述聚合规则的数据流进行聚合还可以包 括: 所述交换机获取匹配所述聚合规则的数据流在所述交换机中的存储地 址,例如匹配所述聚合规则的数据流在所述交换机緩存中的序号( buffer ID ), 所述上报消息还可以携带匹配所述聚合规则的数据流在所述交换机中的存 储地址, 以便根据所述存储地址, 能够在所述交换机中找到緩存的匹配所述 聚合规则的数据流。
可选地, 所述交换机对匹配所述聚合规则的数据流进行聚合还可以包 括: 所述交换机确定所述聚合规则在所述交换机中所在流表的标识, 例如 table ID,从而根据所述聚合规则在所述交换机中所在流表的标识,可以在所 述交换机中找到所述聚合规则, 则所述上报消息还可以携带所述聚合规则在 所述交换机中所在流表的标识, 从而后续所述控制器可以通过对所述 ID对 应的流表的动作 (Action )进行修改, 来达到下发转发决策的目的。
可选地: 所述交换机对匹配所述聚合规则的数据流进行聚合还可以包 括: 所述交换机生成匹配所述聚合规则的数据流的上报原因, 例如, 上报原 因可以是未能匹配所述交换机的流表, 所述上报消息还可以携带匹配所述聚 合规则的数据流的上报原因, 以便所述控制器可以获取到更多的信息。
S304: 所述交换机通过 OpenFlow协议将所述上报消息发送给所述控制 9< - 所述上报消息中可以携带以下至少之一:所述匹配信息,所述数据信息、 所述匹配所述聚合规则的数据流的存储地址、所述聚合规则在所述交换机中 所在流表的标识、 所述匹配所述聚合规则的数据流的上报原因, 所述控制器 根据所述上报消息,确定所述交换机中匹配所述聚合规则的数据流的转发规 则。
具体地, 在 OpenFlow网络中, OpenFlow协议规定了 Packet— In消息的 格式, 所述交换机可以通过 Packet— In消息的格式将待上报的数据流上报给 控制器。
在本发明实施例中, 可以对所述 Packet— In消息的格式进行扩展, 使得 所述聚合后的内容可以通过所述扩展的 Packet— In消息的格式上报给交换机, 所述扩展的 Packet— In消息的格式可以如下所示:
struct ofp_packet_in{
struct ofp— header header; /*消息头 */
uint8_t buffer num; uint32_t buff er— id [buffer num] ; /*匹配所述聚合规 则的数据流的数量和存储地址 */
uintl6_t total— 1 en;
uint8_t reason[buffer_num] ;/* 匹配所述聚合规则的数据流的上报原 因 */
uint8_t table— id[buffer— num]; /*所述聚合规则在所述交换机中所在流 表的标识 */
uint64_t cookie;
struct ofp— match match; /*匹配信息 */
uint8_t data[buffer_num] [0]; /*数据信息 */
}
上述实施例只是一种可选的实施方式, 当然, 在其它可选的实施例中, 还可以利用 OpenFlow协议的其它消息的格式或者其它扩展的 Pactket— In消 息的格式, 将所述聚合后的内容上报给所述控制器, 本发明实施例在此不做 限定。
S305: 所述控制器接收所述交换机发送的所述上报消息。
S306: 所述控制器对所述交换机发送的所述上报消息进行解析, 根据解 析得到的所述交换机中匹配所述聚合规则的数据流的信息,确定所述交换机 中匹配所述聚合规则的数据流的转发规则。
具体地, 所述交换机中匹配所述聚合规则的数据流的信息可以为所述匹 配信息 (即所述交换机中匹配所述聚合规则的数据流的共性信息), 包括: 所述聚合规则中的匹配域的类型、 所述匹配域的标识、 所述匹配域的长度和 所述匹配域的掩码信息, 以及所述交换机中匹配所述聚合规则的数据流与所 述聚合规则相匹配的匹配值。 则, 所述控制器可以根据所述匹配信息(即共 性信息), 确定所述交换机中匹配所述聚合规则的数据流的转发规则, 由于 所述交换机能够将匹配所述聚合规则的数据流一起上报, 所述控制器能够针 对该类匹配聚合规则的数据流的共性信息,确定交换机中该类匹配聚合规则 的数据流的转发规则, 不仅提高了控制通道的资源利用率, 还可以提高控制 通道的控制效率。
所述交换机中匹配所述聚合规则的数据流的信息还可以包括所述数据 信息, 即所述交换机中匹配所述聚合规则的数据流的摘要数据或全部数据, 则所述控制器不仅可以根据所述匹配信息(即共性信息)确定转发规则, 还 可以根据所述数据信息, 考虑更多的信息, 来确定所述交换机中匹配所述聚 合规则的数据流的转发规则。
值得注意的是, 所述控制器可以让所述交换机中匹配所述聚合规则的数 据流都遵循同一个转发规则,也可以让所述交换机中匹配所述聚合规则的每 个数据流遵循不同的转发规则, 本发明实施例在此不做限定。
S307: 所述控制器将所述转发规则提供给所述交换机, 以使得所述交换 机根据所述转发规则, 对所述交换机中匹配所述聚合规则的数据流进行处 理。
所述控制器可以将所述转发规则发送给所述交换机, 以使得所述交换机 根据所述转发规则,对所述交换机中后续接收到的匹配所述聚合规则的数据 流进行处理。 进一步, 所述上报消息还可以携带所述交换机中匹配所述聚合 规则的数据流在所述交换机中的存储地址,从而所述控制器可以将所述转发 规则和所述存储地址都发送给所述交换机, 以使得所述交换机根据所述转发 规则, 对所述存储地址中緩存的匹配所述聚合规则的数据流进行处理。
具体地, 所述控制器可以通过下发一个或者多个流表, 将所述转发规则 下发送给所述交换机, 例如所述控制器通过重新下发一个或多个流表将所述 转发规则下发给所述交换机, 又例如, 所述上报消息还携带所述聚合规则在 所述交换机中所在流表的标识, 所述控制器可以根据所述聚合规则在所述交 换机中所在流表的标识, 对所述聚合规则在所述交换机中所在流表进行修 改, 以将所述转发规则提供给所述交换机。
本发明实施例中, 交换机可以根据控制器提供的聚合规则, 对待上报的 数据流进行规则匹配, 对匹配所述聚合规则的数据流进行聚合, 获得上报消 息, 并将所述上报消息通过 OpenFlow协议发送给控制器, 使得所述控制器 可以根据所述上报消息,确定匹配所述聚合规则的数据流的转发规则并提供 给所述交换机,避免所述交换机需要将每个待上报的数据流都通过 Packet— In 消息上报给控制器才能获得转发规则, 减少了 OpenFlow网络中大量待上报 的数据流对控制通道带宽资源和控制通道效率的影响,提高了控制通道带宽 资源的利用率。
实施例四
本发明实施例提出了一种用于 OpenFlow网络的交换机, 如图 4所示, 所述交换机 400具体可以包括获取单元 401、处理单元 402和发送单元 403。
所述获取单元 401 , 用于获取所述 OpenFlow网络中的控制器提供的聚合 规则。 所述处理单元 402 , 用于根据所述聚合规则, 对所述交换机中待上报的 数据流进行规则匹配, 对匹配所述聚合规则的数据流进行聚合, 获得上报消 息。
所述发送单元 403 , 用于通过 OpenFlow协议将所述上报消息发送给所 述控制器, 以使得所述控制器根据所述上报消息, 确定所述交换机中匹配所 述聚合规则的数据流的转发规则。
具体地, OpenFlow网络中的控制器可以预先设定一种规则, 例如聚合 规则, 用于指示所述交换机按照该规则对所述交换机中待上报的数据流进行 分类, 从而可以将匹配该规则的数据流进行聚合, 获得上报消息, 然后将上 报消息上报给所述控制器, 以提高 OpenFlow网络控制通道资源的利用率。
所述获取单元 401可以获取所述控制器提供的聚合规则, 所述聚合规则 中可以包括匹配域。 所述处理单元 402具体可以利用所述聚合规则中的匹配 域, 对所述交换机中待上报的数据流进行规则匹配, 对匹配所述聚合规则的 数据流进行聚合, 获得上报消息; 具体地可以按照预设的策略, 对匹配所述 聚合规则的数据流进行聚合, 例如当匹配所述聚合规则的数据流的数量达到 预设门限时, 对匹配所述聚合规则的数据流进行聚合; 又例如, 根据预设时 间周期, 周期性地对匹配所述聚合规则的数据流进行聚合。
所述处理单元 402对匹配所述聚合规则的数据流进行聚合可以有多种方 式,可以是提取匹配所述聚合规则的数据流的匹配信息, 即共性信息,例如, 如果所述处理单元 402利用所述聚合规则中的匹配域对待上报的数据流进行 匹配, 则提取匹配所述聚合规则的数据流的共性信息可以是提取所述聚合规 则中的匹配域的类型、 所述匹配域的标识、 所述匹配域的长度和所述匹配域 的掩码信息, 以及提取匹配所述聚合规则的数据流与所述聚合规则相匹配的 匹配值; 或者还可以是提取匹配所述聚合规则的数据流的摘要数据或全部数 据, 则相应地, 所述上报消息中可以携带所述匹配信息, 或者还可以携带匹 配所述聚合规则的数据流的摘要数据或全部数据, 以使得后续所述控制器根 据所述上报消息, 可以确定匹配所述聚合规则的数据流的转发规则。 此外, 所述处理单元 402还可以通过对匹配所述聚合规则的数据流进行聚合, 来获 取更多的信息并携带在上报消息中, 例如获取匹配所述聚合规则的数据流在 所述交换机中的存储地址(如在所述交换机緩存中的序号), 或者所述聚合 规则在所述交换机中所在流表的标识。
所述发送单元 403 , 可以通过 OpenFlow协议将所述上报消息发送给所 述控制器, 例如对所述 OpenFlow协议中的 Packet— in消息的格式进行扩展, 通过所述扩展的 Packet— in消息的格式, 将所述上报消息发送给所述控制器, 从而所述控制器根据所述上报消息,确定所述交换机中匹配所述聚合规则的 数据流的转发规则,对所述 OpenFlow协议中的 Packet— in消息的格式进行扩 展的具体实现方式可以参见实施例三, 在此不在赘述。
本发明实施例中, 所述获取单元 401可以获取所述控制器提供的聚合规 则, 所述处理单元 402可以根据所述聚合规则, 对所述交换机中待上报的数 据流进行规则匹配,对匹配所述聚合规则的数据流进行聚合,获得上报消息, 所述发送单元 403可以将所述上报消息发送给所述控制器,使得所述控制器 可以根据所述上报消息, 确定匹配所述聚合规则的数据流的转发规则, 避免 将每个待上报的数据流都通过 Packet— In 消息上报给控制器, 减少了 OpenFlow 网络中大量待上报的数据流对控制通道带宽资源和控制通道效率 的影响, 提高了控制通道带宽资源的利用率。
本发明实施例提供的用于 OpenFlow网络的交换机, 可以执行如实施例 一或实施例三所述的用于 OpenFlow网络的数据处理方法的方法流程, 本发 明实施例在此不再赘述。
实施例五
本发明实施例提出了一种用于 OpenFlow网络的控制器, 如图 5所示, 所述控制器 500具体可以包括发送单元 501、 接收单元 502、 确定单元 503 和提供单元 504。 所述发送单元 501 , 用于将聚合规则提供给所述 OpenFlow网络中的交 换机。
所述接收单元 502, 用于接收所述交换机发送的上报消息, 所述上报消 息携带所述交换机中匹配所述聚合规则的数据流的信息。
所述确定单元 503 , 用于根据所述上报消息, 确定所述交换机中匹配所 述聚合规则的数据流的转发规则。
所述提供单元 504, 用于将所述转发规则提供给所述交换机, 以使得所 述交换机根据所述转发规则,对所述交换机中匹配所述聚合规则的数据流进 行处理。
具体地, 所述发送单元 501可以通过对交换机修改流表的方式(包括增 加流表项、 修改流表项、 删除流表项等)将聚合规则提供给交换机, 使得后 续所述交换机能够通过利用修改的流表,确定待上报的数据流是否符合聚合 规则。
所述接收单元 502接收的上报消息携带的所述交换机中匹配所述聚合规 则的数据流的信息可以为匹配信息, 所述匹配信息包括所述聚合规则中的匹 配域的类型、 所述匹配域的标识、 所述匹配域的长度和所述匹配域的掩码信 息, 以及所述交换机中匹配所述聚合规则的数据流与所述聚合规则相匹配的 匹配值; 则所述确定单元 503可以对所述上 "^消息进行解析, 得到所述匹配 信息, 以及根据所述匹配信息, 确定所述交换机中匹配所述聚合规则的数据 流的转发规则。
所述接收单元 502接收的上报消息携带的所述交换机中匹配所述聚合规 则的数据流的信息还可以为数据信息和所述匹配信息, 所述数据信息为所述 交换机中匹配所述聚合规则的数据流的摘要数据或全部数据; 则, 所述确定 单元 503可以对所述上报消息进行解析,得到所述数据信息和所述匹配信息, 以及根据所述数据信息和所述匹配信息,确定所述交换机中匹配所述聚合规 则的数据流的转发规则。 交换机根据所述转发规则,对所述交换机中后续接收到的匹配所述聚合规则 的数据流进行处理。 进一步, 所述上报消息还可以携带所述交换机中匹配所 述聚合规则的数据流在所述交换机中的存储地址,从而所述提供单元 504可 以将所述转发规则和所述存储地址都发送给所述交换机, 以使得所述交换机 根据所述转发规则,对所述存储地址中緩存的匹配所述聚合规则的数据流进 行处理。 具体地, 所述提供单元 504可以通过下发一个或者多个流表, 将所 述转发规则下发送给所述交换机,例如所述提供单元 504通过下发一个或多 个流表, 将所述转发规则下发给所述交换机, 又例如, 所述上报消息还携带 所述聚合规则在所述交换机中所在流表的标识(例如 table ID ), 所述提供单 元 504可以根据所述聚合规则在所述交换机中所在流表的标识,对所述聚合 规则在所述交换机中所在流表进行修改, 以将所述转发规则提供给所述交换 机。
本发明实施例中, 所述发送单元 501可以将聚合规则提供给交换机, 所 述接收单元 502可以接收所述交换机发送的上报消息, 所述上报消息携带所 述交换机中匹配所述聚合规则的数据流的信息,从而所述确定单元 503根据 所述上报消息, 确定所述交换机中匹配所述聚合规则的数据流的转发规则, 所述提供单元 504能够将所述转发规则提供给所述交换机,使得所述交换机 根据所述转发规则, 对所述交换机中匹配所述聚合规则的数据流进行处理, 避免所述交换机需要将每个待上报的数据流都通过 Packet— In消息上报才能 获得转发规则, 减少了 OpenFlow网络中大量待上报的数据流对控制通道带 宽资源和控制通道效率的影响, 提高了控制通道带宽资源的利用率。
本发明实施例提供的用于 OpenFlow网络的控制器, 可以执行如实施例 二或实施例三所述的用于 OpenFlow网络的数据处理方法的方法流程, 本发 明实施例在此不再赘述。
实施例六 如图 6, 为本发明实施例提供的一种用于 OpenFlow网络的数据处理装 置, 所述数据处理装置可以包括:
处理器 601、 存储器 602、 系统总线 604和通信接口 605。 处理器 601、 存储器 602和通信接口 605之间通过系统总线 604连接并完成相互间的通信。
处理器 601可能为单核或多核中央处理单元, 或者为特定集成电路, 或 者为被配置成实施本发明实施例的一个或多个集成电路。
存储器 602 可以为高速 RAM 存储器, 也可以为非易失性存储器 ( non-volatile memory ) , 例 口至少一个磁盘存 4诸器。
存储器 602用于计算机执行指令 603。 具体的, 计算机执行指令 603中 可以包括程序代码。
当所述装置运行时, 处理器 601运行计算机执行指令 603 , 可以执行实 施例一至实施例三任意之一所述的用于 OpenFlow网络的数据处理方法的方 法流程。 当执行实施例一或实施例三的用于 OpenFlow网络的数据处理方法 的方法流程时, 所述数据处理装置可以为所述 OpenFlow网络中的交换机。 当执行实施例二或实施例三所述的用于 OpenFlow网络的数据处理方法的方 法流程时, 所述数据处理装置可以为所述 OpenFlow网络中的控制器。
本发明实施例提供了一种计算机可读介质, 包括计算机执行指令, 以供 计算机的处理器执行所述计算机执行指令时, 所述计算机执行实施例一或实 施例三的用于 OpenFlow网络的数据处理方法的方法流程。
本发明实施例还提供了一种计算机可读介质, 包括计算机执行指令, 以 供计算机的处理器执行所述计算机执行指令时, 所述计算机执行实施例二或 实施例三的用于 OpenFlow网络的数据处理方法的方法流程。
本领域普通技术人员将会理解, 本发明的各个方面、 或各个方面的可能 实现方式可以被具体实施为系统、 方法或者计算机程序产品。 因此, 本发明 的各方面、 或各个方面的可能实现方式可以釆用完全硬件实施例、 完全软件 实施例 (包括固件、驻留软件等等), 或者组合软件和硬件方面的实施例的形 式, 在这里都统称为"电路"、 "模块"或者"系统"。 此外, 本发明的各方面、 或各个方面的可能实现方式可以釆用计算机程序产品的形式,计算机程序产 品是指存储在计算机可读介质中的计算机可读程序代码。
计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质。 计算机可读存储介质包含但不限于电子、 磁性、 光学、 电磁、 红外或半导体 系统、 设备或者装置, 或者前述的任意适当组合, 如随机存取存储器 (RAM), 只读存储器 (ROM)、 可擦除可编程只读存储器 (EPROM或者快闪 存储器)、 光纤、 便携式只读存储器 (CD-ROM:)。
计算机中的处理器读取存储在计算机可读介质中的计算机可读程序代 码, 使得处理器能够执行在流程图中每个步骤、 或各步骤的组合中规定的功 能动作;生成实施在框图的每一块、或各块的组合中规定的功能动作的装置。
计算机可读程序代码可以完全在用户的计算机上执行、部分在用户的计 算机上执行、 作为单独的软件包、 部分在用户的计算机上并且部分在远程计 算机上, 或者完全在远程计算机或者计算机上执行。 也应该注意, 在某些替 代实施方案中, 在流程图中各步骤、 或框图中各块所注明的功能可能不按图 中注明的顺序发生。 例如, 依赖于所涉及的功能, 接连示出的两个步骤、 或 两个块实际上可能被大致同时执行, 或者这些块有时候可能被以相反顺序执 行。
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的各 示例的单元及算法步骤, 能够以电子硬件、 或者计算机软件和电子硬件的结 合来实现。 这些功能究竟以硬件还是软件方式来执行, 取决于技术方案的特 定应用和设计约束条件。 专业技术人员可以对每个特定的应用来使用不同方 法来实现所描述的功能, 但是这种实现不应认为超出本发明的范围。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限 于此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易 想到变化或替换, 都应涵盖在本发明的保护范围之内。 因此, 本发明的保护 范围应所述以权利要求的保护范围为准。

Claims

权利 要求
1、 一种用于 OpenFlow网络的数据处理方法, 其特征在于, 所述方法包 括:
所述 OpenFlow网络中的交换机获取所述 OpenFlow网络中的控制器提供 的聚合规则;
所述交换机根据所述聚合规则, 对待上报的数据流进行规则匹配; 所述交换机对匹配所述聚合规则的数据流进行聚合, 获得上报消息; 所述交换机通过 OpenFlow协议将所述上报消息发送给所述控制器, 以 使得所述控制器根据所述上报消息,确定所述交换机中匹配所述聚合规则的 数据流的转发规则。
2、 根据权利要求 1 所述的方法, 其特征在于, 所述交换机根据所述聚 合规则, 对待上报的数据流进行规则匹配包括: 所述交换机根据所述聚合规 则中的匹配域, 对待上报的数据流进行规则匹配。
3、 根据权利要求 2所述的方法, 其特征在于, 所述交换机对匹配所述 聚合规则的数据流进行聚合, 获得上报消息包括:
所述交换机根据所述匹配域, 生成匹配信息, 所述匹配信息包括: 所述 匹配域的类型、 所述匹配域的标识、 所述匹配域的长度和所述匹配域的掩码 信息, 以及匹配所述聚合规则的数据流与所述聚合规则相匹配的匹配值; 则, 所述上报消息携带所述匹配信息。
4、 根据权利要求 3所述的方法, 其特征在于, 所述交换机对匹配所述 聚合规则的数据流进行聚合, 获得上报消息还包括:
所述交换机获取数据信息,所述数据信息为匹配所述聚合规则的数据流 的摘要数据或全部数据;
则, 所述上报消息还携带所述数据信息。
5、 根据权利要求 3或 4所述的方法, 其特征在于, 所述交换机对匹配 所述聚合规则的数据流进行聚合, 获得上报消息还包括: 所述交换机获取匹配所述聚合规则的数据流在所述交换机中的存储地 址;
则,所述上报消息还携带匹配所述聚合规则的数据流在所述交换机中的 存储地址。
6、 根据权利要求 3-5任一项所述的方法, 其特征在于, 所述交换机对 匹配所述聚合规则的数据流进行聚合, 获得上报消息还包括:
所述交换机确定所述聚合规则在所述交换机中所在流表的标识; 则, 所述上报消息还携带所述聚合规则在所述交换机中所在流表的标 识。
7、 根据权利要求 1-6任一项所述的方法, 其特征在于, 所述交换机对 匹配所述聚合规则的数据流进行聚合包括:
所述交换机在匹配所述聚合规则的数据流的数量达到预设门限时,对匹 配所述聚合规则的数据流进行聚合; 或者,
所述交换机根据预设时间周期,周期性地对匹配所述聚合规则的数据流 进行聚合。
8、根据权利要求 1-7任一项所述的方法, 所述交换机通过 OpenFlow协 议将所述上报消息发送给所述控制器包括:
所述交换机对所述 OpenFlow协议中的 Packet— in消息的格式进行扩展; 所述交换机通过所述扩展的 Packet— in消息的格式, 将所述上报消息发 送给所述控制器。
9、 一种用于 OpenFlow网络的数据处理方法, 其特征在于, 所述方法包 括:
所述 OpenFlow网络中的控制器将聚合规则提供给所述 OpenFlow网络 中的交换机;
所述控制器接收所述交换机发送的上报消息, 所述上报消息携带所述交 换机中匹配所述聚合规则的数据流的信息; 所述控制器根据所述上报消息,确定所述交换机中匹配所述聚合规则的 数据流的转发规则;
所述控制器将所述转发规则提供给所述交换机, 以使得所述交换机根据 所述转发规则, 对所述交换机中匹配所述聚合规则的数据流进行处理。
10、 根据权利要求 9所述的方法, 其特征在于, 所述交换机中匹配所述 聚合规则的数据流的信息包括匹配信息, 所述匹配信息包括所述聚合规则中 的匹配域的类型、 所述匹配域的标识、 所述匹配域的长度和所述匹配域的掩 码信息, 以及所述交换机中匹配所述聚合规则的数据流与所述聚合规则相匹 配的匹配值;
则所述控制器根据所述上报消息,确定所述交换机中匹配所述聚合规则 的数据流的转发规则, 包括:
所述控制器对所述上 "^消息进行解析, 得到所述匹配信息;
所述控制器根据所述匹配信息,确定所述交换机中匹配所述聚合规则的 数据流的转发规则。
11、 根据权利要求 10所述的方法, 其特征在于, 所述交换机中匹配所 述聚合规则的数据流的信息还包括数据信息, 所述数据信息为所述交换机中 匹配所述聚合规则的数据流的摘要数据或全部数据;
则所述控制器根据所述上报消息,确定所述交换机中匹配所述聚合规则 的数据流的转发规则, 包括:
所述控制器对所述上报消息进行解析,得到所述数据信息和所述匹配信 息;
所述控制器根据所述数据信息和所述匹配信息,确定所述交换机中匹配 所述聚合规则的数据流的转发规则。
12、根据权利要求 9-11任一项所述的方法, 其特征在于, 所述上报消息 还携带所述交换机中匹配所述聚合规则的数据流在所述交换机中的存储地 址; 则所述控制器将所述转发规则提供给所述交换机, 以使得所述交换机根 据所述转发规则, 对所述交换机中匹配所述聚合规则的数据流进行处理, 包 括:
所述控制器将所述转发规则和所述存储地址发送给所述交换机, 以使得 所述交换机根据所述转发规则,对所述存储地址中緩存的匹配所述聚合规则 的数据流进行处理。
13、 根据权利要求 9-12 所述的方法, 所述控制器将所述转发规则提供 给所述交换机, 以使得所述交换机根据所述转发规则, 对所述交换机中匹配 所述聚合规则的数据流进行处理, 包括:
所述控制器通过向所述交换机下发一个或多个流表,将所述转发规则发 送给所述交换机, 以使得所述交换机根据所述转发规则, 对所述交换机中的 匹配所述聚合规则的数据流进行处理。
14、 根据权利要求 13所述的方法, 其特征在于, 所述上报消息还携带 所述聚合规则在所述交换机中所在流表的标识;
则所述控制器将所述转发规则提供给所述交换机包括:
所述控制器根据所述聚合规则在所述交换机中所在流表的标识,对所述 聚合规则在所述交换机中所在流表进行修改, 以将所述转发规则提供给所述 交换机。
15、 一种用于 OpenFlow网络的交换机, 其特征在于, 所述交换机包括: 获取单元: 用于获取所述 OpenFlow网络中的控制器提供的聚合规则; 处理单元: 用于根据所述聚合规则, 对所述交换机中待上报的数据流进 行规则匹配, 对匹配所述聚合规则的数据流进行聚合, 获得上报消息;
发送单元: 用于通过 OpenFlow协议将所述上报消息发送给所述控制器, 以使得所述控制器根据所述上报消息,确定所述交换机中匹配所述聚合规则 的数据流的转发规则。
16、 根据权利要求 15所述的交换机, 其特征在于, 所述处理单元具体 用于根据所述聚合规则中的匹配域,对所述交换机中待上报的数据流进行规 则匹配。
17、 根据权利要求 16所述的交换机, 其特征在于, 所述处理单元具体 用于根据所述匹配域, 生成匹配信息, 所述匹配信息包括: 所述匹配域的类 型、 所述匹配域的标识、 所述匹配域的长度和所述匹配域的掩码信息, 以及 匹配所述聚合规则的数据流与所述聚合规则相匹配的匹配值, 所述上报消息 携带所述匹配信息。
18、 根据权利要求 17所述的交换机, 其特征在于, 所述处理单元还用 于获取数据信息, 所述数据信息为匹配所述聚合规则的数据流的摘要数据或 全部数据, 所述上报消息还携带所述数据信息。
19、 根据权利要求 17或 18所述的交换机, 其特征在于, 所述处理单元 还用于获取匹配所述聚合规则的数据流在所述交换机中的存储地址, 所述上 报消息还携带匹配所述聚合规则的数据流在所述交换机中的存储地址。
20、 根据权利要求 17-19任一项所述的交换机, 其特征在于, 所述处理 单元还用于确定所述聚合规则在所述交换机中所在流表的标识, 所述上报消 息还携带所述聚合规则在所述交换机中所在流表的标识。
21、 根据权利要求 15-20任一项所述的交换机, 其特征在于, 所述处理 单元具体用于在匹配所述聚合规则的数据流的数量达到预设门限时,对匹配 所述聚合规则的数据流进行聚合; 或者, 根据预设时间周期, 周期性地对匹 配所述聚合规则的数据流进行聚合。
22、 根据权利要求 15-21任一项所述的交换机, 其特征在于, 所述发送 单元具体用于对所述 OpenFlow协议中的 Packet— in消息的格式进行扩展,通 过所述扩展的 Packet— in消息的格式, 将所述上报消息发送给所述控制器。
23、 一种用于 OpenFlow网络的控制器, 其特征在于, 所述控制器包括: 发送单元, 用于将聚合规则提供给所述 OpenFlow网络中的交换机; 接收单元, 用于接收所述交换机发送的上报消息, 所述上报消息携带所 述交换机中匹配所述聚合规则的数据流的信息;
确定单元, 用于根据所述上报消息, 确定所述交换机中匹配所述聚合规 则的数据流的转发规则;
提供单元, 用于将所述转发规则提供给所述交换机, 以使得所述交换机 根据所述转发规则, 对所述交换机中匹配所述聚合规则的数据流进行处理。
24、 根据权利要求 23所述的控制器, 其特征在于, 所述交换机中匹配所 述聚合规则的数据流的信息包括匹配信息, 所述匹配信息包括所述聚合规则 中的匹配域的类型、 所述匹配域的标识、 所述匹配域的长度和所述匹配域的 掩码信息, 以及所述交换机中匹配所述聚合规则的数据流与所述聚合规则相 匹配的匹配值;
则, 所述确定单元具体用于对所述上报消息进行解析, 得到所述匹配信 息, 以及根据所述匹配信息, 确定所述交换机中匹配所述聚合规则的数据流 的转发规则。
25、 根据权利要求 24所述的控制器, 其特征在于, 所述交换机中匹配所 述聚合规则的数据流的信息还包括数据信息, 所述数据信息为所述交换机中 匹配所述聚合规则的数据流的摘要数据或全部数据;
则, 所述确定单元具体用于对所述上 "^消息进行解析, 得到所述数据信 息和所述匹配信息, 以及根据所述数据信息和所述匹配信息, 确定所述交换 机中匹配所述聚合规则的数据流的转发规则。
26、 根据权利要求 23-25任一项所述的控制器, 其特征在于, 所述上报 消息还携带所述交换机中匹配所述聚合规则的数据流在所述交换机中的存 储地址;
则, 所述提供单元具体用于将所述转发规则和所述存储地址发送给所述 交换机, 以使得所述交换机根据所述转发规则, 对所述存储地址中緩存的匹 配所述聚合规则的数据流进行处理。
27、 根据权利要求 23-26任一项所述的控制器, 其特征在于, 所述提供 单元具体用于通过向所述交换机下发一个或多个流表,将所述转发规则发送 给所述交换机, 以使得所述交换机根据所述转发规则, 对所述交换机中的匹 配所述聚合规则的数据流进行处理。
28、 根据权利要求 27所述的控制器, 其特征在于, 所述上报消息还携 带所述聚合规则在所述交换机中所在流表的标识;
则, 所述提供单元具体用于根据所述聚合规则在所述交换机中所在流表 的标识, 对所述聚合规则在所述交换机中所在流表进行修改, 以将所述转发 规则提供给所述交换机。
29、 一种用于 OpenFlow网络的交换机, 其特征在于, 所述交换机包括 处理器、 存储器、 总线和通信接口;
所述存储器用于存储计算机执行指令, 所述处理器与所述存储器通过所 述总线连接, 当所述交换机运行时, 所述处理器执行所述存储器存储的所述 计算机执行指令, 以使所述交换机执行如权利要求 1-8中任一项所述的用于
OpenFlow网络的数据处理方法。
30、 一种用于 OpenFlow网络的控制器, 其特征在于, 所述控制器包括 处理器、 存储器、 总线和通信接口;
所述存储器用于存储计算机执行指令, 所述处理器与所述存储器通过所 述总线连接, 当所述控制器运行时, 所述处理器执行所述存储器存储的所述 计算机执行指令, 以使所述控制器执行如权利要求 9-14中任一项所述的用 于 OpenFlow网络的数据处理方法。
31、 一种计算机可读介质, 其特征在于, 包括计算机执行指令, 以供计 算机的处理器执行所述计算机执行指令时, 所述计算机执行如权利要求 1-8 中任一项所述的用于 OpenFlow网络的数据处理方法。
32、 一种计算机可读介质, 其特征在于, 包括计算机执行指令, 以供计 算机的处理器执行所述计算机执行指令时,所述计算机执行如权利要求 9-14 中任一项所述的用于 OpenFlow网络的数据处理方法。
PCT/CN2014/077645 2014-05-16 2014-05-16 一种用于OpenFlow网络的数据处理方法和装置 WO2015172373A1 (zh)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN201480037689.3A CN105359472B (zh) 2014-05-16 2014-05-16 一种用于OpenFlow网络的数据处理方法和装置
PCT/CN2014/077645 WO2015172373A1 (zh) 2014-05-16 2014-05-16 一种用于OpenFlow网络的数据处理方法和装置
EP14891784.2A EP3122012B1 (en) 2014-05-16 2014-05-16 Data processing method and apparatus for openflow network
US15/289,249 US10033619B2 (en) 2014-05-16 2016-10-10 Data processing method and apparatus for OpenFlow network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/077645 WO2015172373A1 (zh) 2014-05-16 2014-05-16 一种用于OpenFlow网络的数据处理方法和装置

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/289,249 Continuation US10033619B2 (en) 2014-05-16 2016-10-10 Data processing method and apparatus for OpenFlow network

Publications (1)

Publication Number Publication Date
WO2015172373A1 true WO2015172373A1 (zh) 2015-11-19

Family

ID=54479192

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/077645 WO2015172373A1 (zh) 2014-05-16 2014-05-16 一种用于OpenFlow网络的数据处理方法和装置

Country Status (4)

Country Link
US (1) US10033619B2 (zh)
EP (1) EP3122012B1 (zh)
CN (1) CN105359472B (zh)
WO (1) WO2015172373A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108075977B (zh) * 2016-11-10 2020-10-16 英业达科技有限公司 网络系统控制方法及网络系统
CN109150729B (zh) * 2017-06-28 2021-11-19 中国移动通信有限公司研究院 一种数据转发控制方法、装置、系统、介质和计算设备
CN109672615B (zh) * 2017-10-17 2022-06-14 华为技术有限公司 数据报文缓存方法及装置
JP2019096989A (ja) * 2017-11-21 2019-06-20 池上通信機株式会社 フロー制御装置、フロー制御方法及びフロー制御プログラム
US11165703B2 (en) * 2019-04-29 2021-11-02 Juniper Networks, Inc. Prefix-based fat flows
EP3734916A1 (en) * 2019-04-29 2020-11-04 Juniper Networks, Inc. Prefix-based fat flows
CN115225578A (zh) * 2022-07-25 2022-10-21 北京东土军悦科技有限公司 一种报文处理方法、装置、交换机、系统及介质

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6636480B1 (en) * 1999-09-08 2003-10-21 Riverstone Networks, Inc. Method and system for controlling data flow through a multiport switch
CN1466340A (zh) * 2002-06-24 2004-01-07 �人��������������ι�˾ 以策略流方式转发数据的方法和数据转发设备
CN103067534A (zh) * 2012-12-26 2013-04-24 中兴通讯股份有限公司 一种NAT实现系统、方法及Openflow交换机

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5440691B2 (ja) * 2010-03-24 2014-03-12 日本電気株式会社 パケット転送システム、制御装置、転送装置、処理規則の作成方法およびプログラム
US9906438B2 (en) * 2012-12-19 2018-02-27 Nec Corporation Communication node, control apparatus, communication system, packet processing method, communication node controlling method and program
CN104022953B (zh) * 2013-02-28 2018-02-09 新华三技术有限公司 基于开放流Openflow的报文转发方法和装置
US10361918B2 (en) * 2013-03-19 2019-07-23 Yale University Managing network forwarding configurations using algorithmic policies
US10003474B2 (en) * 2014-05-01 2018-06-19 Metaswitch Networks Ltd Flow synchronization

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6636480B1 (en) * 1999-09-08 2003-10-21 Riverstone Networks, Inc. Method and system for controlling data flow through a multiport switch
CN1466340A (zh) * 2002-06-24 2004-01-07 �人��������������ι�˾ 以策略流方式转发数据的方法和数据转发设备
CN103067534A (zh) * 2012-12-26 2013-04-24 中兴通讯股份有限公司 一种NAT实现系统、方法及Openflow交换机

Also Published As

Publication number Publication date
CN105359472B (zh) 2018-11-09
US20170026313A1 (en) 2017-01-26
EP3122012A4 (en) 2017-05-03
EP3122012A1 (en) 2017-01-25
EP3122012B1 (en) 2019-08-14
CN105359472A (zh) 2016-02-24
US10033619B2 (en) 2018-07-24

Similar Documents

Publication Publication Date Title
WO2015172373A1 (zh) 一种用于OpenFlow网络的数据处理方法和装置
US9497125B2 (en) Congestion control enforcement in a virtualized environment
WO2018210117A1 (zh) 一种拥塞控制方法、网络设备及其网络接口控制器
US9426061B2 (en) Communication system, node, control device, communication method, and program
US9571382B2 (en) Method, controller, and system for processing data packet
US7835285B2 (en) Quality of service, policy enhanced hierarchical disruption tolerant networking system and method
WO2014153967A1 (zh) 一种OpenFlow网络中流表配置的方法、装置和系统
WO2014187204A1 (zh) 一种ofs带内通信方法及ofs
WO2011012023A1 (zh) 一种网络处理器输出端口队列的管理方法及系统
US9571410B2 (en) Credit-based link level flow control and credit exchange using DCBX
WO2014177097A1 (zh) 一种流表条目生成方法及相应设备
JPWO2011115168A1 (ja) 通信システム、ノード、制御サーバ、通信方法およびプログラム
US10701582B2 (en) Dynamic application QoS profile provisioning
CN104052684A (zh) 动态适配计算机网络中的最大传输单元大小的方法和系统
WO2013181940A1 (zh) 一种数据流调度的方法、设备和系统
EP2753030A1 (en) Flow identification method, device, and system
WO2013086897A1 (zh) 生成表项的方法、接收报文的方法及相应装置和系统
WO2015066878A1 (zh) Sdn网络中的控制设备和控制方法
WO2015172668A1 (zh) 网络中拥塞窗口的确定方法和装置
JP2017519450A (ja) ソフトウェア定義ネットワーク化のためのサービス品質制御方法及びデバイス
WO2019149106A1 (zh) 一种服务质量QoS控制方法及相关设备
WO2021098425A1 (zh) 配置业务的服务质量策略方法、装置和计算设备
WO2015113191A1 (zh) 处理规则的修改方法、装置及设备
RU2602333C2 (ru) Сетевая система, способ обработки пакетов и носитель записи
WO2017091941A1 (zh) 一种处理业务数据包的方法及装置

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 201480037689.3

Country of ref document: CN

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

Ref document number: 14891784

Country of ref document: EP

Kind code of ref document: A1

REEP Request for entry into the european phase

Ref document number: 2014891784

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2014891784

Country of ref document: EP

NENP Non-entry into the national phase

Ref country code: DE