WO2015113191A1 - 处理规则的修改方法、装置及设备 - Google Patents

处理规则的修改方法、装置及设备 Download PDF

Info

Publication number
WO2015113191A1
WO2015113191A1 PCT/CN2014/071609 CN2014071609W WO2015113191A1 WO 2015113191 A1 WO2015113191 A1 WO 2015113191A1 CN 2014071609 W CN2014071609 W CN 2014071609W WO 2015113191 A1 WO2015113191 A1 WO 2015113191A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
modification
instruction
rule
action
Prior art date
Application number
PCT/CN2014/071609
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 ES14880996T priority Critical patent/ES2719541T3/es
Priority to EP14880996.5A priority patent/EP3091708B1/en
Priority to EP18214531.8A priority patent/EP3531653B1/en
Priority to CN201480000147.9A priority patent/CN105103516B/zh
Priority to CN201810312364.1A priority patent/CN108777629B/zh
Priority to PCT/CN2014/071609 priority patent/WO2015113191A1/zh
Publication of WO2015113191A1 publication Critical patent/WO2015113191A1/zh
Priority to US15/222,777 priority patent/US9985878B2/en
Priority to US15/965,217 priority patent/US10715426B2/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0895Configuration of virtualised networks or elements, e.g. virtualised network function or OpenFlow elements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/38Flow based routing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/06Resources, workflows, human or project management; Enterprise or organisation planning; Enterprise or organisation modelling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/54Store-and-forward switching systems 
    • H04L12/56Packet switching systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0813Configuration setting characterised by the conditions triggering a change of settings
    • H04L41/0816Configuration setting characterised by the conditions triggering a change of settings the condition being an adaptation, e.g. in response to network events
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • H04L41/083Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability for increasing network speed
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0894Policy-based network configuration management
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/34Signalling channels for network management communication
    • H04L41/342Signalling channels for network management communication between virtual entities, e.g. orchestrators, SDN or NFV entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/24Traffic characterised by specific attributes, e.g. priority or QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/70Virtual switches
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/02Network architectures or network communication protocols for network security for separating internal from external traffic, e.g. firewalls
    • H04L63/0227Filtering policies
    • H04L63/0245Filtering by information in the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0893Assignment of logical groups to network elements

Definitions

  • the present invention relates to the field of communications, and in particular, to a method, an apparatus, and a device for modifying a processing rule. Background technique
  • SDN Software-Defined Network
  • the SDN network generally includes a controller as a control plane device and a repeater as a forwarding plane device.
  • the controller controls the processing of the data packet by controlling the processing rules on the forwarder.
  • the processing rule includes a matching domain information and an instruction set consisting of one or more action instructions, where the matching domain information is used to determine a data packet to be matched, that is, a data packet corresponding to the processing rule, the instruction set And configured to process, according to the action instruction in the instruction set, a data packet corresponding to the processing rule.
  • Each action command optionally includes an action type and an action parameter.
  • the action type and the action parameter are collectively referred to as an action variable of the action instruction.
  • the processing rules may also include an identification or index of the processing rules.
  • the identification or index of the matching domain information and the processing rule of the processing rule may be referred to as the rule description information of the processing rule, and the rule description information of the processing rule may be used to identify the processing rule 1".
  • the rule description information is used to identify the processing rule, and does not necessarily refer to the unique identifier processing rule. Different processing rules may have the same rule description information.
  • the OpenFlow protocol is the most typical and widely used protocol in SDN networks.
  • the network elements in the Openflow protocol include an OpenFlow Controller and an OpenFlow Switch, which are referred to as an OF controller and an OF forwarder, respectively.
  • the data packet processing in the Openflow protocol is granular in service flow.
  • Each service flow can adopt a source media access control (MAC) address, a destination MAC address, a source Internet Protocol (IP) address, a destination IP address, a source port number, Indicates the combination of different packet header fields such as the destination port number.
  • the OF forwarder stores the processing rules of the flow granularity in the flow table of the OF forwarder. Therefore, the processing rule in the Openflow protocol is also called a flow entry.
  • Table 1 The composition of each flow entry is as follows: Table 1
  • each flow entry includes: Match Fields, Priority, Counters, Instructions, Timeouts, and Scratch
  • the match The domain can be regarded as the rule description information of the flow entry
  • the instruction set includes the action instruction corresponding to the flow entry
  • the action variable of each action instruction includes the action type and the action parameter; at this time, the rule description information can also be used for determining The data packet corresponding to the processing rule, the data packet corresponding to the processing rule meets the rule description information.
  • the OF forwarder receives the data packet of the user, the data packet matches the matching field of each flow entry, and the action included in the instruction set is performed on the data packet according to the matching flow entry. Thereby, control processing such as forwarding and modification of data packets is realized.
  • the Openflow protocol uses flow modification (Flow_mod) messages to add, modify, and delete flow entries.
  • Fl OW _mod match domain message carries exactly matching rule instruction set to modify the flow entry instruction set Fl OW _mod message carried.
  • the instruction set of the flow entry that is overwritten by the matching rule carried by the Fl OW _mod message is modified to the instruction set carried by the Fl OW _mod message.
  • the modification method of this flow entry is limited to using the instruction set carried by the Fl OW _mod message to completely replace the original instruction set of the flow entry.
  • the modification method is too rigid, and in many cases, the modification is inefficient, and more It occupies communication resources between the OF controller and the OF repeater. Summary of the invention
  • the embodiment of the invention provides a method, a device and a device for modifying a processing rule, which can improve the modification efficiency of the processing rule in the forwarder and reduce the occupation of the communication resource between the controller and the forwarder.
  • a device for modifying a processing rule includes a first processing rule ij, the first processing rule includes rule description information and an instruction set, and the rule description information is used by the rule description information.
  • the first processing rule is identified, the instruction set includes at least one action instruction, where the instruction set is used to indicate that the data message corresponding to the first processing rule is processed according to the action instruction in the instruction set.
  • the device includes:
  • a receiving unit configured to receive rule modification information sent by the controller;
  • the rule modification information includes rule description matching information and action instruction modification information, where the rule description matching information is used to determine a processing rule to be modified,
  • the rule description information of the processing rule to be modified is consistent with the rule description matching information, and the action instruction modification information is used to indicate that the action instruction specified in the instruction set of the processing rule to be modified is modified;
  • a modifying unit configured to: when the rule description information of the first processing rule meets the rule description matching information received by the receiving unit, modify the information according to the action instruction received by the receiving unit The action instruction specified in the instruction set of the first processing rule is modified.
  • the action instruction modification information includes: an action instruction matching condition and a modification operation information; wherein the action instruction matching condition is used for Determining an action instruction to be modified, where the modify operation information is used to indicate a modification operation on the action instruction to be modified;
  • the modification unit includes:
  • an instruction determining subunit configured to determine, when the rule description information of the first processing rule meets the rule description matching information received by the receiving unit, determining the first processing according to the action instruction matching condition The first action instruction to be modified in the instruction set of the rule;
  • the action instruction matching condition includes location information, where the location information is used to indicate the to-be-modified a position of the action instruction in the instruction set of the processing rule to be modified;
  • the instruction determining sub-unit is specifically configured to: when determining that the rule description information of the first processing rule meets the rule description matching information received by the receiving unit, determine the first according to the location information Action instruction.
  • the location information includes a first mask, and each mask bit in the first mask The location corresponds to the location of each action instruction in the instruction set of the processing rule to be modified;
  • the instruction determining subunit is specifically configured to: when determining that the rule description information of the first processing rule meets the rule description matching information received by the receiving unit, determining that the first mask has a first a mask value of a preset value; determining the first action instruction according to the position of the mask bit having the first preset value.
  • the location information includes a modification indication list, where the modification indication list includes a modification indication, and the modification indication
  • Each modification in the list indicates that the location in the modification indication list corresponds to a location of each action instruction in the instruction set of the processing rule to be modified, and the modification indication is used to indicate whether to modify the action instruction;
  • the instruction determining subunit is specifically configured to: when determining that the rule description information of the first processing rule meets the rule description matching information received by the receiving unit, determine that the modification indication list is used for indicating Modifying the modification instruction of the action instruction; determining, according to the modification indication for indicating the modification action instruction, the first action instruction corresponding to the first location in the first location where the modification indication list is located.
  • the action instruction matching condition includes: instruction type information, where the instruction type information is used to indicate The type of instruction that describes the modified action instruction;
  • the instruction determining subunit is specifically configured to: when determining that the rule description information of the first processing rule meets the rule description matching information received by the receiving unit, determine the first according to the instruction type information An action instruction.
  • the modifying operation information includes: a new motion instruction
  • the modification subunit is specifically configured to: modify the first action instruction to the new action instruction.
  • the modifying operation information includes: modifying parameter indication information, the modifying parameter The indication information is used to indicate that the action variable of the action instruction to be modified is modified;
  • the modifying subunit is specifically configured to modify an action variable of the first action instruction according to the modified parameter indication information.
  • the modified parameter indication information includes a parameter matching condition and a parameter modification operation information, where the parameter matching condition is used. Determining, in the action instruction to be modified, the action variable to be modified, the parameter modification operation information is used to indicate the modification of the action variable to be modified;
  • the modification subunit includes:
  • a determining module configured to determine, according to the parameter matching condition, a first action variable to be modified in the first action instruction
  • a modification module configured to modify the first action variable according to the parameter modification operation information.
  • the parameter modification operation information includes a new variable value
  • the modifying module is specifically configured to: modify a variable value of the first action variable to the new variable value.
  • the parameter modification operation information includes operation method information, where the operation method information is used to indicate that the variable value is obtained.
  • Method of operation [42]
  • the modification module is specifically used to:
  • a device for modifying a processing rule is provided, the device being applicable to a controller that communicates with a repeater, the first processing rule is stored on the forwarder, and the first processing rule includes a rule description The information and the instruction set, the rule description information is used to identify the first processing rule, the instruction set includes at least one action instruction, and the instruction set is used to indicate that the action instruction is used according to the action instruction in the instruction set.
  • the data packet corresponding to the first processing rule is processed; the device includes:
  • generating unit configured to generate rule modification information
  • a sending unit configured to send, to the repeater, rule modification information generated by the generating unit, where the rule modification information includes rule description matching information and action instruction modification information, where the rule description matching information is used to determine to be determined
  • the modified processing rule, the rule description information of the processing rule to be modified is consistent with the rule description matching information
  • the action instruction modification information is used to indicate that the action instruction specified in the instruction set of the processing rule to be modified is modified.
  • the repeater determines that the rule description information of the first processing rule satisfies the rule description matching information, modifying the action instruction specified by the instruction set of the first processing rule according to the action instruction modification information.
  • the third aspect provides a method for modifying a processing rule, which is applicable to a repeater, where the first processing rule is stored on the forwarder, where the first processing rule includes rule description information and an instruction set, and the rule The description information is used to identify the first processing rule, the instruction set includes at least one action instruction, where the instruction set is used to indicate that the data report corresponding to the first processing rule is used according to the action instruction in the instruction set Processing; the method includes:
  • the forwarder receives the rule modification information sent by the controller;
  • the rule modification information includes rule description matching information and action instruction modification information, where the rule description matching information is used to determine a processing rule to be modified,
  • the rule description information of the modified processing rule is consistent with the rule description matching information, and the action instruction modification information is used to indicate that the action instruction specified in the instruction set of the processing rule to be modified is modified;
  • the repeater determines that the rule description information of the first processing rule satisfies the rule description matching information, the repeater specifies the instruction set of the first processing rule according to the action instruction modification information. The action instructions are modified.
  • the action instruction modification information includes: an action instruction matching condition and a modification operation information; wherein the action instruction matching condition is used for Determining an action instruction to be modified, where the modify operation information is used to indicate a modification operation on the action instruction to be modified;
  • the forwarder modifies the action instruction specified in the instruction set of the first processing rule according to the action instruction modification information, and includes:
  • the repeater determines, according to the action instruction matching condition, a first action instruction to be modified in the instruction set of the first processing rule
  • the repeater modifies the first action instruction according to the modified operation information.
  • the action instruction matching condition includes location information, where the location information is used to indicate the to-be-modified The position of the action instruction in the instruction set of the processing rule to be modified;
  • the forwarder determines, according to the action instruction matching condition, that the first action instruction to be modified in the instruction set of the first processing rule includes:
  • the repeater determines the first action instruction according to the location information.
  • the location information includes a first mask, and each mask bit in the first mask The location corresponds to the location of each action instruction in the instruction set of the processing rule to be modified;
  • the forwarder determining, according to the location information, that the first action instruction comprises:
  • the repeater determines a mask bit having a first preset value in the first mask
  • the repeater determines the first action instruction according to the position of the mask bit having the first preset value.
  • the location information includes a modification indication list, where the modification indication list includes a modification indication, and the modification indication
  • Each modification in the list indicates that the location in the modification indication list corresponds to a location of each action instruction in the instruction set of the processing rule to be modified, and the modification indication is used to indicate whether to modify the action instruction;
  • the forwarder determining, according to the location information, that the first action instruction comprises:
  • the repeater determines, in the modification indication list, a modification indication for indicating a modification action instruction, where the repeater is in the modification indication list according to the modification indication used to indicate the modification action instruction a location determining the first action instruction.
  • the action instruction matching condition includes: instruction type information, where the instruction type information is used to indicate The type of instruction that describes the modified action instruction;
  • the forwarder determines, according to the action instruction matching condition, that the first action instruction to be modified in the instruction set of the first processing rule includes:
  • the repeater determines the first action instruction according to the instruction type information.
  • the modifying operation information includes: a new motion instruction
  • the transponder modifying the first action instruction according to the modified operation information includes:
  • the repeater modifies the first action instruction to the new action instruction.
  • the modifying operation information includes: modifying parameter indication information, the modifying parameter The indication information is used to indicate that the action variable of the action instruction to be modified is modified;
  • the transponder modifying the first action instruction according to the modified operation information includes:
  • the repeater modifies an action variable of the first action instruction according to the modified parameter indication information.
  • the modified parameter indication information includes a parameter matching condition and a parameter modification operation information, where the parameter matching condition is used. Determining, in the action instruction to be modified, the action variable to be modified, the parameter modification operation information is used to indicate the modification of the action variable to be modified;
  • the repeater modifies the parameters of the first action instruction according to the modified parameter indication information, including:
  • the repeater determines, according to the parameter matching condition, a first action variable to be modified in the first action instruction
  • the repeater modifies the first action variable according to the parameter modification operation information.
  • the parameter modification operation information includes a new variable value
  • the transponder modifying the first action variable according to the parameter modification operation information includes:
  • the repeater modifies the variable value of the first action variable to the new variable value.
  • the parameter modification operation information includes operation method information, where the operation method information is used to indicate that the variable value is obtained. Method of operation;
  • the transponder modifying the first action variable according to the parameter modification operation information includes:
  • the repeater acquires a new variable value according to the operation method information
  • the repeater modifies the variable value of the first action variable to the new variable value.
  • the fourth aspect provides a method for modifying a processing rule, where the method is applicable to a controller that communicates with a repeater, where the first processing rule is stored on the forwarder, and the first processing rule includes a rule description.
  • the information and the instruction set, the rule description information is used to identify the first processing rule, the instruction set includes at least one action instruction, and the instruction set is used to indicate that the action instruction is used according to the action instruction in the instruction set.
  • the data packet corresponding to the first processing rule is processed; the method includes:
  • the controller sends rule modification information to the forwarder; the rule modification information includes rule description matching information and action instruction modification information, and the rule description matching information is used to determine a processing rule to be modified,
  • the rule description information of the processing rule to be modified is consistent with the rule description matching information, where the action instruction modification information is used to indicate that the action instruction specified in the instruction set of the processing rule to be modified is modified; so that the repeater determines When the rule description information of the first processing rule satisfies the rule description matching information, the action instruction specified in the instruction set of the first processing rule is modified according to the action instruction modification information.
  • the forwarder receives the rule modification information sent by the controller;
  • the rule modification information includes rule description matching information and action instruction modification information, and the rule description matching information is used to determine a processing rule to be modified.
  • the rule description information of the processing rule to be modified is consistent with the rule description matching information, where the action instruction modification information is used to indicate that the action instruction specified in the instruction set of the processing rule to be modified is modified;
  • the repeater modifies the action instruction specified by the instruction set of the first processing rule according to the action instruction modification information.
  • the forwarder no longer uses only the instruction set carried by the Fl OW _mod message to completely replace the original instruction set of the flow entry to implement the modification of the first processing rule, but can specify the action of the first processing rule. And/or the specified action variable is modified separately, and the modification manner of the first processing rule is flexible, which improves the efficiency of the controller to modify the first processing rule in the forwarder; and, in the instruction set part that only needs to modify the first processing rule
  • the modification of the action instruction part of the instruction set of the first process rule can be completed by a relatively small number of messages relative to the prior art, and the number of messages used by the first process rule modification is reduced relative to the prior art. , thereby reducing the controller and The occupation of communication resources between repeaters.
  • FIG. 1 is a structural diagram of an application scenario of a method for modifying a processing rule according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a first embodiment of a method for modifying a processing rule of the present invention
  • FIG. 3 is a schematic diagram of a second embodiment of a method for modifying a processing rule according to the present invention.
  • FIG. 4 is a schematic diagram of a third embodiment of a method for modifying a processing rule according to the present invention.
  • FIG. 5 is a schematic diagram of a first embodiment of a device for modifying a processing rule according to the present invention.
  • FIG. 6 is a schematic diagram of a second embodiment of a device for modifying a processing rule according to the present invention.
  • FIG. 7 is a schematic structural diagram of a repeater according to the present invention.
  • FIG. 8 is a schematic structural view of a controller of the present invention. detailed description
  • aC ti 0 nl, 2, 3 respectively represent different tunnel encapsulation actions corresponding to the flow entry of the data packet, and action4 indicates that the data packet is from the port 1 Forward, acti 0 n5 means to forward the data packet from port 2; if the OF controller wants to keep the action1, 2, 3 unchanged, the action4 of the flow entry 1, 2, 3 is changed to action5, thereby The last forwarding port of the data packet is migrated from the port 1 to the port 2; since the Fs OW _mod message only supports the complete replacement of the stream entry instruction set in the prior art, the OF controller cannot implement the above batch modification capability by using a Flow_mod message.
  • the three processing rules can be modified only by three Flow_mod messages. Therefore, the modification of the flow entry in the repeater is inefficient, and three Flow_mod messages are required to implement the modification of the flow entry 1 ⁇ 3, occupying communication resources between the OF controller and the OF forwarder; especially in the OF forwarder. In the scenario where there are a large number of flow entries, this inefficient flow entry modification will result in the transmission of a large number of Fl OW _mod messages between the OF controller and the OF forwarder, reducing the flow table. The modification efficiency of the item consumes communication resources between the OF controller and the OF repeater.
  • an embodiment of the present invention provides a method, an apparatus, and a device for modifying a processing rule, which can improve the modification efficiency of a processing rule in a repeater and reduce the occupation of communication resources between the controller and the forwarder.
  • the method, device, and device for modifying the processing rule in the embodiment of the present invention can be applied not only to the modification of the flow entry in the OF forwarder by the OF controller under the Openflow protocol, but also to the controller to the repeater in other SDN networks.
  • the modification of the processing rule can be applied not only to the modification of the flow entry in the OF forwarder by the OF controller under the Openflow protocol, but also to the controller to the repeater in other SDN networks.
  • FIG. 1 is a schematic structural diagram of an SDN network applied to a method for modifying a processing rule according to an embodiment of the present invention, where the controller 110 includes a controller 110 and a repeater 120, where the controller 110 sends rule modification information to the repeater 120.
  • Various first processing rules stored in the repeater 120 are modified.
  • the first processing rule stored in the forwarder 120 is the same as the object referred to by the foregoing processing rule.
  • the subsequent processing rule stored in the forwarder 120 is referred to as a first processing rule, which is mainly used to treat the first processing rule and
  • the modified processing rules are distinguished.
  • the first processing rule may include rule description information and an instruction set, where the rule description information is used to identify the first processing rule, the instruction set includes at least one action instruction, and the instruction set is used to indicate And processing, according to the action instruction in the instruction set, a data packet corresponding to the first processing rule.
  • FIG. 2 is a schematic diagram of a first embodiment of a method for modifying a processing rule according to the present invention, where the method includes:
  • Step 201 The repeater receives the rule modification information sent by the controller; the rule modification information includes rule description matching information and action instruction modification information, where the rule description matching information is used to determine a processing rule to be modified, The rule description information of the processing rule to be modified is consistent with the rule description matching information, and the action instruction modification information is used to indicate that the action instruction specified in the instruction set of the processing rule to be modified is modified;
  • Step 202 When the repeater determines that the rule description information of the first processing rule satisfies the rule description matching information, the repeater modifies the information according to the action instruction to the first processing rule. The action instructions specified in the instruction set are modified.
  • the forwarder receives the rule modification information sent by the controller;
  • the rule modification information includes rule description matching information and action instruction modification information, where the rule description matching information is used to determine a processing rule to be modified,
  • the rule description information of the processing rule to be modified is consistent with the rule description matching information, and the action instruction modification information is used to indicate that the action instruction specified in the instruction set of the processing rule to be modified is modified;
  • Descriptive information satisfies each of the first processing rules of the rule description matching information, and the repeater modifies the action instruction specified in the instruction set of the first processing rule according to the action instruction modification information. to modify.
  • FIG. 3 is a schematic diagram of a second embodiment of a method for modifying a processing rule according to the present invention. The method includes:
  • Step 301 The controller sends rule modification information to the forwarder.
  • the rule modification information includes rule description matching information and action instruction modification information, where the rule description matching information is used to determine a processing rule to be modified.
  • the rule description information of the modified processing rule is consistent with the rule description matching information, where the action instruction modification information is used to indicate that the action instruction specified in the instruction set of the processing rule to be modified is modified;
  • the method further includes: the controller generating the rule modification information.
  • controller specifically generates the rule modification information, and details are not described herein again.
  • the controller sends rule modification information to the forwarder, where the rule modification information includes rule description matching information and action instruction modification information, and the rule description matching information is used to determine a processing rule to be modified.
  • the rule description information of the modified processing rule is consistent with the rule description matching information, where the action instruction modification information is used to indicate that the action instruction specified in the instruction set of the processing rule to be modified is modified;
  • the information satisfies each of the first processing rules of the rule description matching information, and the forwarder modifies the action instruction specified by the instruction set of the first processing rule according to the action instruction modification information.
  • the forwarder no longer uses only the instruction set carried by the Fl OW _mod message to completely replace the original instruction set of the flow entry to implement the modification of the first processing rule, but can specify the action of the first processing rule. And/or the specified action variable is separately modified, and the modification manner of the first processing rule is flexible, which improves the efficiency of the controller to modify the first processing rule in the forwarder; and, in the instruction set part that only needs to modify the first processing rule
  • the modification of the action instruction part of the instruction set of the first processing rule can be completed by a relatively small number of messages, relative to the present The technique reduces the number of messages used by the first processing rule modification, thereby reducing the occupation of communication resources between the controller and the repeater.
  • FIG. 4 is a schematic diagram of a third embodiment of a method for modifying a processing rule according to the present invention, where the method includes:
  • Step 401 The controller sends rule modification information to the forwarder, where the rule modification information includes rule description matching information and action instruction modification information, where the rule description matching information is used to determine a processing rule to be modified.
  • the rule description information of the modified processing rule is consistent with the rule description matching information, where the action instruction modification information is used to indicate that the action instruction specified in the instruction set of the processing rule to be modified is modified;
  • the controller is triggered to perform the modification of the first processing rule, and how to determine which action instructions of the first processing rule need to be modified is not limited herein.
  • the controller may trigger an event according to an external condition such as a data message from a forwarder, a rule modification request from a controller upper management system, or a virtual machine migration notification, or an internal condition such as a modification timer timeout.
  • the controller may extract the first processing rule to be modified, and each first from the data header field reported by the forwarder or from the information directly input by the upper management system Processing the action instruction that needs to be modified in the rule, or determining the first processing rule to be modified, and each according to the type of the data packet forwarded by the forwarder, the subscription information of the user to which the forwarded data message belongs, the network status, and the like Actions or action variables that need to be modified in the first processing rule.
  • the transmission of the rule modification information is implemented between the controller and the repeater, and the invention is not limited.
  • this step may be implemented by the OF controller sending a flo W _ mod message carrying the rule modification information to the OF; in other SDN networks, it may also be through another between the controller and the forwarder. Message implementation and more.
  • the rule description information is used to identify a first processing rule; for example, the rule description information may be a unique identifier assigned by the controller or a forwarder to a first processing rule, and the like.
  • the rule description information may be a matching field of a flow entry, and the rule description information may be used to determine a data packet corresponding to the first processing rule, where the first The data packet corresponding to the processing rule satisfies the rule description information.
  • the rule description matching information may have different implementations in different application scenarios.
  • the rule description matching information may be a Match Rule carried in a flow_mod message, and the flow_mod message carries a strict matching modification or a non-strict matching modification identifier.
  • a matching rule can cover different matching domain ranges, thereby indicating different sets of flow entry items.
  • the matching field in the forwarder that is identical to the matching rule is the range covered by the matching rule. If the fl OW _ mod message carries the non-strict matching modification identifier, The matching field including the above matching rule in the repeater is the range covered by the matching rule.
  • the matching rule may be through Media Access Control (IP), Internet Protocol (IP), Transmission Control Protocol (TCP), and User Data Packet Protocol (UDP). , User Datagram Protocol), such as a wildcard or cookie mask of the header field, so that the matching rule can cover the matching domain of one or more flow entries.
  • IP Media Access Control
  • IP Internet Protocol
  • TCP Transmission Control Protocol
  • UDP User Data Packet Protocol
  • User Datagram Protocol such as a wildcard or cookie mask of the header field, so that the matching rule can cover the matching domain of one or more flow entries.
  • rule description matching information is flexible, and may be specifically set according to an actual application environment, and is not limited herein.
  • the action instruction modification information may include: an action instruction matching condition, and a modification operation information; wherein the action instruction matching condition is used to determine an action instruction to be modified, and the modify operation information is used to indicate a Determining the modification operation of the modified action instruction;
  • the action instruction matching condition may include:
  • location information is used to indicate a location of the action instruction to be modified in an instruction set of the processing rule to be modified
  • the instruction type information is used to indicate an instruction type of the action instruction to be modified
  • the location information may include: a first mask, a location of each mask bit in the first mask Corresponding to the position of each action instruction in the instruction set of the processing rule to be modified;
  • the location information may include a modification indication list, where the modification indication list includes a modification indication, where the location of each modification indication in the modification indication list corresponds to the to-be-modified process.
  • the rule instruction sets the location of each action instruction, and the modification indication is used to indicate whether to modify the action instruction.
  • the modifying operation information may include:
  • the parameter indication information is modified, and the modification parameter indication information is used to indicate that the action variable of the action instruction to be modified is modified.
  • modification parameter indication information may include:
  • parameter matching condition is used to determine an action variable to be modified in the action instruction to be modified
  • parameter modification operation information is used to indicate the to-be-modified Modification of action variables.
  • parameter matching condition may include:
  • the action variable and the modification indication bound to the action variable; the modification indication is used to indicate whether the bound action variable is modified.
  • the parameter modification operation information may include a new variable value; or, operation method information, the operation method information is used to indicate an operation method of acquiring a variable value.
  • action variables of the action include an action type and an action parameter.
  • the action parameters can include one or more parameters.
  • Step 402 The repeater receives the rule modification information.
  • Step 403 When the forwarder determines that the rule description information of the first processing rule satisfies the rule description matching information, the repeater modifies the information according to the action instruction to the instruction set of the first processing rule. The specified action instruction is modified.
  • the action instruction modification information may include: an action instruction matching condition and a modification operation information; wherein the action instruction matching condition is used to determine an action instruction to be modified, and the modify operation information is used to indicate a Determining the modification operation of the modified action instruction;
  • the repeater specifies, according to the action instruction modification information, an instruction set of the first processing rule Modifications to the action instructions can include:
  • the repeater determines, according to the action instruction matching condition, a first action instruction to be modified in the instruction set of the first processing rule
  • the repeater modifies the first action instruction according to the modified operation information.
  • the action instruction matching condition may include location information, where the location information is used to indicate a location of the action instruction to be modified in an instruction set of the processing rule to be modified;
  • Determining, by the repeater, the first action instruction to be modified in the instruction set of the first processing rule according to the action instruction matching condition may include: the repeater determining the first action instruction according to the location information .
  • the location information may include a first mask, where a location of each mask bit in the first mask corresponds to an instruction set of the processing rule to be modified. The position of an action command;
  • the forwarder determining, according to the location information, that the first action instruction may include:
  • the repeater determines a mask bit having a first preset value in the first mask
  • the repeater determines the first action instruction based on the location of the mask bit having the first predetermined value.
  • the mask bit corresponding to the first motion instruction is a first preset value, and the values of the other mask bits are different from the first preset value.
  • the application is applied to the Openflow protocol.
  • the OF controller sends a Flow_mod message to the OF forwarder as follows:
  • the location information is implemented by the mask 0x001, and assuming that the first preset value is 1, the last mask bit in the mask 0x001 is 1, indicating that the last action instruction of the flow table entry instruction set is the first Action instruction.
  • the location information may include a modification indication list, where the modification indication list includes a modification indication, where each modification indication in the modification indication list is in the modification indication list.
  • the location corresponds to a location of each action instruction in the instruction set of the processing rule to be modified, and the modification indication is used to indicate whether to modify the action instruction;
  • the forwarder determining, according to the location information, that the first action instruction may include:
  • the repeater determines a modification indication in the modification indication list for indicating a modification action instruction; the repeater is in the modification indication list according to the modification indication used to indicate the modification action instruction a location determining the first action instruction.
  • the embodiment of the present invention is applied to the Openflow protocol as an example.
  • the OF controller sends a Flow_mod message to the OF forwarder as follows:
  • the action1, action2, and action3 carried in the instruction set of the Flow_mod message are respectively modified operation information, specifically a new action instruction, which will be described in detail in the following description, and will not be described here;
  • (actionl, 0) (action3, 0 in 0), 1 in (action2, 1) is the modification indication respectively; if the modification indication is 1, it indicates that the action instruction corresponding to the modification instruction is modified, and when the modification indication is 0, it indicates that the modification instruction corresponds to The action instruction is not modified;
  • Bay ij, (actionl, 0) is located in the instruction set of the Fl OW _mod message in the first bit, which corresponds to the first action instruction in the flow table entry instruction set, but the modification indication is 0, then the forwarding
  • the device does not modify the first action instruction in the flow table instruction set.
  • the forwarder modifies the second action instruction in the flow table item instruction set, and does not modify the third action instruction in the flow table item instruction set. .
  • the action instruction matching condition may include: instruction type information, where the instruction type information is used to indicate an instruction type of the action instruction to be modified;
  • the first action instruction to be modified in the instruction set of the first processing rule may be determined by the forwarder according to the action instruction matching condition.
  • the repeater determines the first action instruction according to the instruction type information.
  • the application is applied to the Openflow protocol.
  • the OF controller sends a Flow_mod message to the OF forwarder as follows:
  • the action is to modify the operation information, specifically a new action instruction, which will be described in detail in the following description, and will not be described here;
  • Type_Only is the instruction type information, which is used to indicate the action type and modification operation of the action instruction to be modified.
  • the action type of acti 0 n3 in the message is the same; in the case of 1", the repeater determines the action instruction of the action type in the flow table entry instruction table to be the same as acti 0 n3 as the first action instruction.
  • the action instruction matching condition may include: an action instruction to be modified
  • the first action instruction to be modified in the instruction set of the first processing rule may be determined by the forwarder according to the action instruction matching condition.
  • the forwarder determines the first action instruction from the instruction set of the first processing rule according to an action instruction included in the action instruction matching condition.
  • the application is applied to the Openflow protocol.
  • action instruction pair (actionl, action3), (action2, action4)
  • the previous action instruction of each action instruction pair is an action instruction matching condition, and the latter action instruction is a modification operation information
  • action instruction actionl and action3 of (actionl, action3), (action2, action4) are action instructions to be modified respectively, and the forwarder determines actionl and action3 in the flow table item instruction set as the first action instruction respectively.
  • Each action instruction in the above example includes an action type and an action parameter.
  • the modifying operation information may include: a new action instruction
  • the transponder may modify the first action instruction according to the modified operation information, and may include:
  • the repeater modifies the first action instruction to the new action instruction.
  • the modification operation information is realized by a new operation instruction.
  • the modification operation information is carried in the instruction set of the Fl OW _mod message, which is acti 0n 3 ; Bay ij, and the repeater only modifies the last action instruction of the flow table entry instruction set to be indicated in the Fl OW _mod message.
  • the new action instruction: action, the other actions in the flow table item instruction set are unchanged.
  • action1, action2, and action3 carried in the instruction set of the Flow_mod message are respectively modified operation information, specifically a new action instruction; (actionl, 0) (action3, 0) in 0, (action2, 1) 1 is the modification indication; Bay ij, (actionl, 0) is located in the first bit of the Fl OW _mod message instruction set, corresponding to the first action instruction in the flow table entry instruction set, and the modification indication is 0, then
  • the forwarder does not modify the first action instruction in the flow table entry instruction set to actionl.
  • the forwarder modifies the second action instruction in the flow table entry instruction set to acti 0 n2, and does not concentrate the flow table entry instruction.
  • the third action instruction is modified to acti 0 n3.
  • the action instruction pair (actionl, action3), (action2, action4), the previous action instruction of each action instruction pair is the action instruction matching condition, and the latter action instruction is the modification operation information; specifically, the repeater Change actionl in the flow table item instruction set to action3, action2 to action4, and other action instructions remain unchanged.
  • the modification operation information may include: modifying the parameter indication information, where the modification parameter indication information is used to indicate that the action variable of the action instruction to be modified is modified;
  • the transponder modifying the first action instruction according to the modified operation information includes:
  • the repeater modifies an action variable of the first action instruction according to the modified parameter indication information.
  • the modified parameter indication information may include a parameter matching condition and a parameter modification operation information, where the parameter matching condition is used to determine an action variable to be modified in the action instruction to be modified, and the parameter modification operation is performed.
  • the information is used to indicate a modification to the action variable to be modified;
  • the change of the action variable of the first action instruction by the repeater according to the modified parameter indication information may include:
  • the repeater determines, according to the parameter matching condition, a first action to be modified in the first action instruction. [201] the repeater modifies the first action variable according to the parameter modification operation information. .
  • the parameter matching condition may include: an action variable to be modified
  • Determining, by the repeater, the first action variable to be modified in the first action instruction according to the parameter matching condition may include:
  • the repeater determines a first action variable to be modified in the first action instruction according to an action variable in the parameter matching condition.
  • the embodiment of the present invention is applied to the Openflow protocol as an example, and the OF controller is directed to the OF forwarder.
  • Send the Flow_mod message as follows:
  • the parameter matching condition may include: an action variable and a modification indication bound to the action variable;
  • Determining, by the repeater, the first action variable to be modified in the first action instruction according to the parameter matching condition may include:
  • the repeater determines a first action variable to be modified in the first action instruction according to an action variable and a modification indication bound to the action variable.
  • the OF controller sends a Flow_mod message to the OF forwarder as follows:
  • the action parameter GBR of actionl in the flow table entry instruction table is determined as the first action variable.
  • the parameter modification operation information may include a new variable value
  • the transponder may modify the first action variable according to the parameter modification operation information, and may include:
  • the repeater modifies a variable value of the first action variable to the new variable value.
  • the application is applied to the Openflow protocol.
  • the OF controller sends a Flow_mod message to the OF forwarder as follows:
  • the action1 action instruction is the first action instruction
  • the MBR action variable is a parameter matching condition
  • the parameter modification operation information is a new variable value of 3 Mbps; the shell 1", the forwarder will flow the entry
  • the action parameter MBR of the action instruction of the actionl in the instruction set is modified to 3 Mbps.
  • the parameter modification operation information may include operation method information, where the operation method information is used to indicate an operation method for acquiring a variable value;
  • the transponder may modify the first action variable according to the parameter modification operation information, and may include:
  • the repeater acquires a new variable value according to the operation method information
  • the repeater modifies a variable value of the first action variable to the new variable value.
  • the operation method information may include: a second mask and a target value corresponding to the variable bit to be modified; each mask bit of the second mask corresponding to each of the variable values of the first action variable a variable bit, the mask bit corresponding to the variable bit to be modified is a second preset value, and the values of the other mask bits are different from the second preset value;
  • the forwarder acquiring the new variable value according to the operation method information may include:
  • the repeater determines a variable bit of the variable value of the first action variable corresponding to the mask bit having the second preset value in the second mask as the variable bit to be modified;
  • the repeater modifies the value of the variable bit to be modified to the target value corresponding to the variable bit to obtain a new variable value.
  • Example 1 the embodiment of the present invention is applied to the Openflow protocol as an example.
  • the OF controller sends a Flow_mod message to the OF forwarder as follows:
  • Example 2 ORIGIN TUNNEL ID; indicates retaining the original tunnel identifier (ORIGIN_TUNNEL_ID);
  • MUL (ORIGIN GBR, 2); indicates the original variable value of the original GBR (ORIGIN GBR) Multiply the 2 operation and the result is the new variable value;
  • DEC, INC, MUL (variable, 2), etc. are the arithmetic methods.
  • Step 404 The forwarder receives the data packet to be forwarded, and forwards the data packet according to the modified first processing rule.
  • the transponder specifically forwards the data packet according to the first processing rule, which is not described here.
  • the forwarder may send the modification result indication information to the controller according to the modification result of the specified action instruction;
  • the modification result indication information may include: the process rule modification result indication
  • the information and/or action modification result indication information, the processing rule modification result indication information may be used to indicate a modification result of the first processing rule, and the action modification result indication information may be used to indicate a modification result of the specified action instruction.
  • the process rule modification result indication information may include: a first success indication, a rule description information of the first process rule that is successfully modified,
  • the action modification result indication information may include: a second success indication, a modification successful operation instruction; or, when the transponder does not modify the specified action variable according to the action instruction modification information, the processing rule modification result indication information may be
  • the method includes: a first failure indication, a rule description information of the first processing rule that is not modified successfully, and the action failure indication information may include: a second failure indication, and an unmodified successful action instruction.
  • the first success indication and the second success indication may be the same or different; the first failure indication and the second failure indication may be the same or different.
  • the transponder when the transponder successfully modifies the specified action instruction according to the action instruction modification information, the transponder may not report the modification result indication information, and the transponder does not modify the specified action instruction according to the action instruction modification information. When successful, the modification result indication information is reported, and the present invention is not limited.
  • different first processing rules and/or modified result of different action instructions may be sent to the controller by the repeater through different modification result indication information; or, different modification results (success and failure) are also
  • the information may be sent to the controller or the like by the repeater through different modification result indications.
  • the modification result indicates that the implementation of the information is not limited in the present invention, and can be flexibly implemented in practical applications.
  • the reason that the specified action instruction is not successfully modified may be many.
  • the action in the flow table item instruction set may be related to the number of actions in the Flow_mod message sent by the OF controller.
  • the mismatch, or the specified action variable in the Fl OW _mod message is different from the action variable format in the flow table entry instruction set, or the OF forwarder occupies the variable value operation error of the action variable in the instruction set of the flow table item, such as the port number calculation result is negative, or The OF forwarder cannot perform operations or modifications on the action parameters of a flow entry.
  • the modification result indication information may pass the ACTI.
  • the ON PARA ERROR message is implemented.
  • the controller sends rule modification information to the forwarder, where the rule modification information includes rule description matching information and action instruction modification information, where the rule description matching information is used to determine a processing rule to be modified,
  • the rule description information of the modified processing rule is consistent with the rule description matching information, where the action instruction modification information is used to indicate that the action instruction specified in the instruction set of the processing rule to be modified is modified;
  • the information satisfies each of the first processing rules of the rule description matching information, and the forwarder modifies the action instruction specified by the instruction set of the first processing rule according to the action instruction modification information.
  • the forwarder no longer uses only the instruction set carried by the Fl OW _mod message to completely replace the original instruction set of the flow entry to implement the modification of the first processing rule, but can specify the action of the first processing rule. And/or the specified action variable is separately modified, and the modification manner of the first processing rule is flexible, which improves the efficiency of the controller to modify the first processing rule in the forwarder; and, in the instruction set part that only needs to modify the first processing rule
  • the modification of the action instruction part of the instruction set of the first process rule can be completed by a relatively small number of messages relative to the prior art, and the number of messages used by the first process rule modification is reduced relative to the prior art. , thereby reducing the occupation of communication resources between the controller and the repeater.
  • FIG. 5 is a schematic diagram of a first embodiment of a device for modifying a processing rule according to the present invention.
  • the device may be applied to a repeater, where the modifying device has a first processing rule, and the first processing rule includes a rule description.
  • Information and an instruction set the rule description information is used to identify a first processing rule, the instruction set includes at least one action instruction, the instruction set is used to indicate that the first instruction is performed according to the action instruction in the instruction set
  • the data packet corresponding to the processing rule is processed; the device 500 includes:
  • the receiving unit 510 is configured to receive rule modification information sent by the controller, where the rule modification information includes rule description matching information and action instruction modification information, where the rule description matching information is used to determine a processing rule to be modified, where The rule description information of the modified processing rule is consistent with the rule description matching information, where the action instruction modification information is used to indicate that the action instruction specified in the instruction set of the processing rule to be modified is modified;
  • a modification unit 520 configured to determine, according to the rule description matching information received by the receiving unit 510, the rule description information received by the receiving unit 510
  • the instruction modification information modifies the action instruction specified in the instruction set of the first processing rule.
  • the action instruction modification information may include: an action instruction matching condition and a modification operation information; wherein the action instruction matching condition is used to determine an action instruction to be modified, and the modify operation information is used to refer to Determining a modification operation of the action instruction to be modified;
  • the modifying unit 520 can include:
  • an instruction determining subunit configured to determine that the rule description information of the first processing rule meets the rule description matching information received by the receiving unit, and determine the first process according to the action instruction matching condition The first action instruction to be modified in the instruction set of the rule;
  • the action instruction matching condition may include location information, where the location information is used to indicate a location of the action instruction to be modified in an instruction set of the processing rule to be modified;
  • the instruction determining subunit may be specifically configured to: when determining that the rule description information of the first processing rule meets the rule description matching information received by the receiving unit, determining, according to the location information, the An action instruction.
  • the location information may include a first mask, where a location of each mask bit in the first mask corresponds to a location of each action instruction in the instruction set of the processing rule to be modified;
  • the instruction determining subunit may be specifically configured to: determine that the rule description information of the first processing rule meets the rule description matching information received by the receiving unit, and determine that the first mask has a mask bit of the first preset value; determining the first action instruction according to the position of the mask bit having the first preset value.
  • the location information may include a modification indication list, where the modification indication list includes a modification indication, where a location of each modification indication in the modification indication list corresponds to the to-be-modified
  • the instruction set of the processing rule sets the location of each action instruction, and the modification indication is used to indicate whether to modify the action instruction;
  • the instruction determining subunit may be specifically configured to: when determining that the rule description information of the first processing rule meets the rule description matching information received by the receiving unit, determine that the modification indication list is used in Determining a modification instruction of the modification action instruction; determining, according to the modification indication for indicating the modification action instruction, the first action instruction corresponding to the first position in the first position where the modification indication list is located.
  • the action instruction matching condition may include: instruction type information, where the instruction type information is used to indicate an instruction type of the action instruction to be modified;
  • the instruction determining subunit may be specifically configured to: when determining that the rule description information of the first processing rule meets the rule description matching information received by the receiving unit, determining, according to the instruction type information, The first action instruction.
  • the modifying operation information may include: a new action instruction;
  • the modifying subunit may be specifically configured to: modify the first action instruction to the new action instruction.
  • the modifying the operation information may include: modifying the parameter indication information, where the modifying parameter indication information is used to indicate that the action variable of the action instruction to be modified is modified;
  • the modifying subunit may be specifically configured to: modify an action variable of the first action instruction according to the modified parameter indication information.
  • the modification parameter indication information may include a parameter matching condition and a parameter modification operation information, where the parameter matching condition is used to determine an action variable to be modified in the action instruction to be modified, and the parameter Modifying operation information for indicating modification of the action variable to be modified;
  • the modifying subunit may include:
  • a determining module configured to determine, according to the parameter matching condition, a first action variable to be modified in the first action instruction
  • a modification module configured to modify the first action variable according to the parameter modification operation information.
  • the parameter modification operation information may include a new variable value
  • the modifying module may be specifically configured to: modify a variable value of the first action variable to the new variable value.
  • the parameter modification operation information may include operation method information, where the operation method information is used to indicate an operation method for acquiring a variable value;
  • the modification module can be specifically used to:
  • the receiving unit 510 is specifically configured to: receive, by the controller, a flow modification F1 OW _mo d message, where the F1 OW _mod message carries the rule modification information.
  • the forwarder receives the rule modification information sent by the controller;
  • the rule modification information includes rule description matching information and action instruction modification information, where the rule description matching information is used to determine a processing rule to be modified,
  • the rule description information of the processing rule to be modified is consistent with the rule description matching information, and the action instruction modification information is used to indicate that the action instruction specified in the instruction set of the processing rule to be modified is modified;
  • the description information satisfies each of the first processing rules of the rule description matching information, and the repeater modifies the action instruction specified in the instruction set of the first processing rule according to the action instruction modification information.
  • the repeater no longer uses only the instruction set carried by the Fl OW _mod message to completely replace the original instruction set of the flow entry to implement the modification of the first processing rule, but can specify the action of the first processing rule. And/or the specified action variable is modified separately, the first processing rule is modified in a flexible manner, and the control is improved.
  • the efficiency of the modification of the first processing rule in the transponder; and in the scenario where only part of the instruction instruction in the instruction set of the first processing rule needs to be modified the number of messages can be completed by a relatively small number of messages relative to the prior art.
  • the modification of the partial action instruction in the instruction set of the processing rule reduces the number of messages used by the first processing rule modification relative to the prior art, thereby reducing the occupation of communication resources between the controller and the repeater.
  • FIG. 6 is a schematic diagram of a second embodiment of a device for modifying a processing rule according to the present invention.
  • the device is applicable to a controller that communicates with a repeater, and the first processing rule is stored on the forwarder.
  • the processing rule includes rule description information and an instruction set, the rule description information is used to identify the first processing rule, the instruction set includes at least one action instruction, the instruction set is used to indicate according to the instruction set
  • the action instruction processes the data packet corresponding to the first processing rule; the device 600 includes:
  • a generating unit 610 configured to generate rule modification information
  • the sending unit 620 is configured to send, to the repeater, the rule modification information generated by the generating unit 610; the rule modification information includes rule description matching information and action instruction modification information, and the rule describes the matching information.
  • the rule description information of the processing rule to be modified conforms to the rule description matching information, and the action instruction modification information is used to indicate that the instruction set of the processing rule to be modified is specified
  • the action instruction is modified; so that when the repeater determines that the rule description information of the first processing rule satisfies the rule description matching information, the action specified by the action instruction modification information on the instruction set of the first processing rule is The instructions are modified.
  • the sending unit 620 may be specifically configured to: send a message to the stream modification Flow_mod repeater, the Fl OW _mod rule modifying message carries the information.
  • the controller sends rule modification information to the forwarder, where the rule modification information includes rule description matching information and action instruction modification information, and the rule description matching information is used to determine a processing rule to be modified. And the rule description information of the processing rule to be modified is consistent with the rule description matching information, where the action instruction modification information is used to indicate that the action instruction specified in the instruction set of the processing rule to be modified is modified; The rule description information satisfies each first processing rule of the rule description matching information, and the repeater modifies the action instruction specified by the instruction set of the first processing rule according to the action instruction modification information.
  • the repeater no longer uses only the instruction set carried by the Fl OW _mod message to completely replace the original instruction set of the flow entry to implement the modification of the first processing rule, but can specify the action of the first processing rule. And/or the specified action variable is separately modified, and the modification manner of the first processing rule is flexible, which improves the efficiency of the controller to modify the first processing rule in the forwarder; and, in the instruction set part that only needs to modify the first processing rule In the scenario of action instructions, the first place can be completed with a relatively small number of messages relative to the prior art.
  • the modification of the partial action instruction in the instruction set of the rule rule reduces the number of messages used by the first process rule modification relative to the prior art, thereby reducing the occupation of communication resources between the controller and the repeater.
  • FIG. 7 is a schematic structural diagram of a repeater according to an embodiment of the present invention.
  • the repeater 700 includes a processor 710, a memory 720, a transceiver 730, and a bus 740.
  • the processor 710, the memory 720, and the transceiver 730 are connected to each other through a bus 740; the bus 740 may be an ISA bus, a PCI bus, or an EISA bus.
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 7, but it does not mean that there is only one bus or one type of bus.
  • the memory 720 is configured to store a program, and is further configured to store a first processing rule, where the first processing rule includes rule description information and an instruction set, where the rule description information is used to identify a first processing rule, where the instruction
  • the set includes at least one action instruction, and the set of instructions is used to instruct processing of the data message corresponding to the first processing rule according to the action instruction in the instruction set.
  • the program can include program code, the program code including computer operating instructions.
  • Memory 720 may include high speed RAM memory and may also include non-volatile memory, such as at least one disk memory.
  • the transceiver 730 is used to connect to other devices and to communicate with other devices.
  • the transceiver 730 is configured to receive rule modification information sent by the controller, where the rule modification information includes rule description matching information and action instruction modification information, where the rule description matching information is used to determine a processing rule to be modified,
  • the rule description information of the processing rule to be modified is consistent with the rule description matching information, and the action instruction modification information is used to indicate that the action instruction specified in the instruction set of the processing rule to be modified is modified;
  • the processor 710 executes the program code, when determining that the rule description information of the first processing rule satisfies the rule description matching information received by the transceiver 730, according to the transceiver 730.
  • the received action instruction modification information modifies the action instruction specified in the instruction set of the first processing rule stored in the memory 720.
  • the action instruction modification information may include: an action instruction matching condition and a modification operation information; wherein the action instruction matching condition is used to determine an action instruction to be modified, and the modify operation information is used to indicate a modification operation of the action instruction to be modified;
  • the processor 710 is specifically configured to: determine, according to the action instruction matching condition, a first action instruction to be modified in the instruction set of the first process rule; and the first action according to the modify operation information The instructions are modified.
  • the action instruction matching condition may include location information, where the location information is used to indicate Determining a position of the modified action instruction in the instruction set of the processing rule to be modified;
  • the processor 710 is specifically configured to: determine the first action instruction according to the location information.
  • the location information may include a first mask, where a location of each mask bit in the first mask corresponds to a location of each action instruction in the instruction set of the processing rule to be modified;
  • the processor 710 is specifically configured to: determine a mask bit having a first preset value in the first mask; and determine the location according to the location of the mask bit having the first preset value.
  • the first action instruction is specifically configured to: determine a mask bit having a first preset value in the first mask; and determine the location according to the location of the mask bit having the first preset value.
  • the location information may include a modification indication list, where the modification indication list includes a modification indication, where a location of each modification indication in the modification indication list corresponds to the to-be-modified
  • the instruction set of the processing rule sets the location of each action instruction, and the modification indication is used to indicate whether to modify the action instruction;
  • the processor 710 is specifically configured to: determine, in the modification indication list, a modification indication for indicating a modification action instruction; and according to the modification indication used to indicate the modification action instruction, where the modification indication list is located The first position determines the first action instruction.
  • the action instruction matching condition may include: instruction type information, where the instruction type information is used to indicate an instruction type of the action instruction to be modified;
  • the processor 710 is specifically configured to: determine the first action instruction according to the instruction type information.
  • the modifying operation information may include: a new action instruction
  • the processor 710 is specifically configured to: modify the first action instruction to the new action instruction.
  • the modifying the operation information may include: modifying the parameter indication information, where the modifying parameter indication information is used to indicate that the action variable of the action instruction to be modified is modified;
  • the processor 710 is specifically configured to: modify an action variable of the first action instruction according to the modified parameter indication information.
  • the modification parameter indication information may include a parameter matching condition and a parameter modification operation information, where the parameter matching condition is used to determine an action variable to be modified in the action instruction to be modified, the parameter Modifying operation information for indicating modification of the action variable to be modified;
  • the processor 710 is specifically configured to: determine, according to the parameter matching condition, a first action variable to be modified in the first action instruction; and perform the first action variable according to the parameter modification operation information. modify.
  • the parameter modification operation information may include a new variable value
  • the processor 710 is specifically configured to: modify a variable value of the first action variable to the new variable value.
  • the parameter modification operation information may include operation method information, where the operation method information is used to indicate an operation method for acquiring a variable value;
  • the processor 710 is specifically configured to: acquire a new variable value according to the operation method information; and modify a variable value of the first action variable to the new variable value.
  • the transceiver 730 is specifically configured to: receive a flow modification F1 OW _ mod message sent by the controller, where the Fl OW _mod message carries the rule modification information.
  • the forwarder receives the rule modification information sent by the controller;
  • the rule modification information includes rule description matching information and action instruction modification information, where the rule description matching information is used to determine a processing rule to be modified,
  • the rule description information of the processing rule to be modified is consistent with the rule description matching information, and the action instruction modification information is used to indicate that the action instruction specified in the instruction set of the processing rule to be modified is modified;
  • the description information satisfies each of the first processing rules of the rule description matching information, and the repeater modifies the action instruction specified in the instruction set of the first processing rule according to the action instruction modification information.
  • the repeater no longer uses only the instruction set carried by the Fl OW _mod message to completely replace the original instruction set of the flow entry to implement the modification of the first processing rule, but can specify the action of the first processing rule. And/or the specified action variable is separately modified, and the modification manner of the first processing rule is flexible, which improves the efficiency of the controller to modify the first processing rule in the forwarder; and, in the instruction set part that only needs to modify the first processing rule
  • the modification of the instruction part of the instruction set of the first processing rule can be completed by a relatively small number of messages relative to the prior art, and the number of messages used by the first process rule modification is reduced relative to the prior art. , thereby reducing the occupation of communication resources between the controller and the repeater.
  • FIG. 8 is a schematic structural diagram of a controller according to an embodiment of the present invention.
  • the controller 800 includes a processor 810, a memory 820, a transceiver 830, and a bus 840.
  • the processor 810, the memory 820, and the transceiver 830 are connected to each other through a bus 840; the bus 840 may be an ISA bus, a PCI bus, or an EISA bus.
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is shown in Figure 8, but it does not mean that there is only one bus or one type of bus.
  • Memory 820 used to store programs.
  • the program can include program code, the program code including computer operating instructions.
  • Memory 820 may include high speed RAM memory and may also include non-volatile memory, such as at least one disk memory.
  • the processor 810 is configured to execute the program code.
  • the transceiver 830 is used to connect to other devices and to communicate with other devices.
  • the transceiver 830 is configured to Sending rule modification information to the forwarder;
  • the rule modification information includes rule description matching information and action instruction modification information, the rule description matching information is used to determine a processing rule to be modified, and the rule of the processing rule to be modified
  • the description information conforms to the rule description matching information, and the action instruction modification information is used to indicate that the action instruction specified in the instruction set of the processing rule to be modified is modified; so that the repeater determines the first processing rule
  • the rule description information satisfies the rule description matching information, the action instruction specified in the instruction set of the first processing rule is modified according to the action instruction modification information;
  • the first processing rule includes a rule description information and an instruction set, where the rule description information is used to identify a first processing rule, and the instruction set includes at least An action instruction, the instruction set is configured to instruct processing of the data message corresponding to the first processing rule according to the action instruction in the instruction set.
  • the transceiver 830 is specifically configured to:
  • the processor 810 is further configured to: generate the rule modification information, and send the generated rule modification information to the transceiver 830.
  • the controller sends rule modification information to the forwarder, where the rule modification information includes rule description matching information and action instruction modification information, and the rule description matching information is used to determine a processing rule to be modified. And the rule description information of the processing rule to be modified is consistent with the rule description matching information, where the action instruction modification information is used to indicate that the action instruction specified in the instruction set of the processing rule to be modified is modified; The rule description information satisfies each first processing rule of the rule description matching information, and the repeater modifies the action instruction specified by the instruction set of the first processing rule according to the action instruction modification information.
  • the repeater no longer uses only the instruction set carried by the Fl OW _mod message to completely replace the original instruction set of the flow entry to implement the modification of the first processing rule, but can specify the action of the first processing rule. And/or the specified action variable is separately modified, and the modification manner of the first processing rule is flexible, which improves the efficiency of the controller to modify the first processing rule in the forwarder; and, in the instruction set part that only needs to modify the first processing rule
  • the modification of the instruction part of the instruction set of the first processing rule can be completed by a relatively small number of messages relative to the prior art, and the number of messages used by the first process rule modification is reduced relative to the prior art. , thereby reducing the occupation of communication resources between the controller and the repeater.
  • the techniques in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, the technical solution in the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product.
  • the computer software product may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform various embodiments of the present invention Or the method described in some parts of the examples.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Business, Economics & Management (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Human Resources & Organizations (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Computer Security & Cryptography (AREA)
  • Game Theory and Decision Science (AREA)
  • Physics & Mathematics (AREA)
  • Development Economics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Operations Research (AREA)
  • Quality & Reliability (AREA)
  • Tourism & Hospitality (AREA)
  • Educational Administration (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

 公开一种处理规则的修改方法、装置和设备,方法包括:所述转发器接收控制器发送的规则修改信息;所述规则修改信息包括规则描述匹配信息和动作指令修改信息,所述规则描述匹配信息用于确定待修改的处理规则,所述待修改的处理规则的规则描述信息符合所述规则描述匹配信息,所述动作指令修改信息用于指示对所述待修改的处理规则的指令集中指定的动作指令进行修改;当所述转发器确定所述第一处理规则的规则描述信息满足所述规则描述匹配信息时,所述转发器根据所述动作指令修改信息对所述第一处理规则的指令集中指定的动作指令进行修改。本发明能够提高转发器中处理规则的修改效率,减少控制器和转发器之间的通信资源占用。

Description

处理规则的修改方法、 装置及设备
技术领域
[01] 本发明涉及通信领域, 尤其涉及处理规则的修改方法、 装置及设备。 背景技术
[02] 为解决网元的部署灵活性和可管理性, 业界提出了软件定义网络 (SDN, Software-Defined Network) 的概念。 SDN 通过将网元的控制逻辑和转发功能解 耦, 并将控制逻辑进行集中部署, 使得对网络的控制和维护工作能够简单地通过 对控制面设备的操作实现, 从而提高网络的管理效率, 并使得转发面设备更为简 单化, 有利于实现转发面设备的高性能和可重用性。
[03] 在实际应用中, SDN 网络中一般包括作为控制面设备的控制器和作为转发 面设备的转发器, 控制器通过控制转发器上的处理规则实现对数据报文处理流程 的控制, 每个处理规则包括匹配域信息及由一个或多个动作指令组成的指令集, 所述匹配域信息用于确定待匹配的数据报文, 即与该处理规则对应的数据报文, 所述指令集用于指示根据所述指令集中的所述动作指令对所述处理规则对应的数据 报文进行处理。 每个动作指令又可选地包括动作类型及动作参数; 本发明中将动 作类型和动作参数统称为动作指令的动作变量。 通常, 处理规则还可以包括处理 规则的标识或者索引。 处理规则的匹配域信息和处理规则的标识或者索引可以称 为该处理规则的规则描述信息, 该处理规则的规则描述信息可以用于标识该处理规 贝1」。值得注意的是, 这里规则描述信息用于标识处理规则, 并不一定是指唯一标识处 理规则, 不同的处理规则可以有相同的规则描述信息。
[04] 开放流(Openflow)协议是 SDN网络中最典型和应用最多的协议。 Openflow 协议中的网元包括开放流控制器 (Openflow Controller ) 和开放流转发器 ( Openflow Switch) , 以下分别简称为 OF控制器和 OF转发器。 Openflow协议中 的数据报文处理以业务流为粒度, 每个业务流可以采用源媒体接入控制 (MAC ) 地址、 目的 MAC地址、 源互联网协议 (IP ) 地址、 目的 IP地址、 源端口号、 目 的端口号等不同的报文头域的组合来表示。 OF 转发器将这些流粒度的处理规则 存储在 OF转发器的流表中, 因此 Openflow协议中的处理规则又被称为流表项, 每个流表项的组成结构如下表 1所示: 表 1
Figure imgf000004_0001
[05] 其中, 每个流表项包括: 匹配域 (Match Fields)、 优先权 (Priority)、 计数 器 ( Counters ) 指令集 ( Instructions ) 超时 ( Timeouts) 以及暂存 ( Cookie) 等 部分, 所述匹配域可以认为是流表项的规则描述信息, 指令集中包括流表项对应 的动作指令, 每一动作指令的动作变量包括动作类型和动作参数; 此时, 所述规 则描述信息还可以用于确定所述处理规则对应的数据报文,所述处理规则对应的数据 报文满足所述规则描述信息。
[06] 当 OF转发器接收到用户的数据报文时, 对数据报文与各流表项的匹配域进 行匹配, 并根据匹配成功的流表项对数据报文执行指令集包含的动作, 从而实现 数据报文的转发、 修改等控制处理。
[07] Openflow协议采用流修改 (Flow_mod) 消息实现对流表项的增加、 修改和 删除。 每个 FlOW_mod 消息的主要组成结构如下: FlOW_mod={消息类型 (MsgType),表 ID ( Table ID) ,匹配规贝 lj ( match rule), Instructions( Action 1, Action 2, … Action n)} ; 当执行流表项修改时, Flow_mod 消息通过包含有 Msg_Type 为修改 (Modify) 或严格修改 (Modify_Strict) 的标识, 分别实现对流表项的非 严格匹配修改和严格匹配修改。 所谓严格匹配修改, 即将匹配域与 FlOW_mod消 息携带的匹配规则完全相同的流表项的指令集修改为 FlOW_mod消息携带的指令 集。 非严格匹配修改, 即将所有匹配域被 FlOW_mod消息携带的匹配规则覆盖的 流表项的指令集均修改为 FlOW_mod消息携带的指令集。 以下举例说明两种修改 的区别:
[08] 对于流表中存储的如下三个流表项(以下举例及后续本发明实施例中仅列出 与专利相关的部分流表项内容, 其它域如 timeouts/cookie与本发明无关, 在此不 再列举):
[09] 流表项 1: 匹配规则 (Match rule) (src_ip=ipl , dst_ip=ip2, protocol=TCP, dst_port=80), instructions(actionl , action4);
[10] 、流表项 2: Match rule(src_ip=ipl , dst_ip=ip2, protocol=UDP , dst_port=53), instructions(action2 , action4);
[11] 流表项 3 : Match rule(src_ip=ipl , dst_ip=ip2), instructions(action3 , action4);
[12] 假设 Flow_mod消息中携带的信息为: Msg—type, match rule(src_ip=ipl , d st_ip=ip2), instructions(action4, action5); 贝 lj, 如果该 Flow_mod消息中携带的 M sg_Type为 Modify_Strict, 由于仅有流表项 3与 Flow_mod消息中携带的匹配规 则完全匹配, 因此只将流表项 3的 instructions替换为 instructions(action4, action 5); 如果 Flow_mod消息中携带的 Msg_Type为 Modify, 由于流表项 1、 2、 3中 均包括 Flow_mod消息中的匹配规则, 因此将流表项 1、 2、 3的 instructions均替 换为 instructions(action4 , action5)。
[13] 从上述描述和实例可以看出, Openflow 协议所定义的流表项修改方法中, 可以通过严格匹配修改或非严格匹配修改, 对一个或多个流表项进行批量修改。 但这种修改仅限于使用 FlOW_mod消息携带的指令集完全替代流表项原有的指令 集。
[14] 这种流表项的修改方法仅限于使用 FlOW_mod消息携带的指令集完全替代流 表项原有的指令集, 修改方式过于死板, 在很多情况下修改效率低, 且较多地占 用了 OF控制器和 OF转发器之间的通信资源。 发明内容
[15] 本发明实施例提供一种处理规则的修改方法、装置及设备, 能够提高转发器 中处理规则的修改效率, 减少控制器和转发器之间的通信资源占用。
[16] 第一方面, 提供一种处理规则的修改装置, 所述修改装置上存有第一处理规 贝 ij, 所述第一处理规则包括规则描述信息和指令集, 所述规则描述信息用于标识 所述第一处理规则, 所述指令集包括至少一个动作指令, 所述指令集用于指示根 据所述指令集中的所述动作指令对所述第一处理规则对应的数据报文进行处理; 所述装置包括:
[17] 接收单元, 用于接收控制器发送的规则修改信息; 所述规则修改信息包括规 则描述匹配信息和动作指令修改信息, 所述规则描述匹配信息用于确定待修改的 处理规则, 所述待修改的处理规则的规则描述信息符合所述规则描述匹配信息, 所述动作指令修改信息用于指示对所述待修改的处理规则的指令集中指定的动 作指令进行修改;
[18] 修改单元,用于确定所述第一处理规则的规则描述信息满足所述接收单元接 收到的所述规则描述匹配信息时, 根据所述接收单元接收到的所述动作指令修改 信息对所述第一处理规则的指令集中指定的动作指令进行修改。
[19] 结合第一方面, 在第一方面第一种可能的实现方式中, 所述动作指令修改信 息包括: 动作指令匹配条件和修改操作信息; 其中, 所述动作指令匹配条件用于 确定待修改的动作指令, 所述修改操作信息用于指示对所述待修改的动作指令的 修改操作;
[20] 所述修改单元包括:
[21] 指令确定子单元,用于确定所述第一处理规则的规则描述信息满足所述接收单 元接收到的所述规则描述匹配信息时,根据所述动作指令匹配条件确定所述第一处理 规则的指令集中待修改的第一动作指令;
[22] 修改子单元, 用于根据所述修改操作信息对所述第一动作指令进行修改。
[23] 结合第一方面第一种可能的实现方式, 在第一方面第二种可能的实现方式 中, 所述动作指令匹配条件包括位置信息, 所述位置信息用于指示所述待修改的 动作指令在所述待修改的处理规则的指令集中的位置;
[24] 所述指令确定子单元具体用于:确定所述第一处理规则的规则描述信息满足所 述接收单元接收到的所述规则描述匹配信息时, 根据所述位置信息确定所述第一动 作指令。
[25] 结合第一方面第二种可能的实现方式, 在第一方面第三种可能的实现方式 中, 所述位置信息包括第一掩码, 所述第一掩码中每一掩码位的位置对应所述待 修改的处理规则的指令集中每一动作指令的位置;
[26] 所述指令确定子单元具体用于:确定所述第一处理规则的规则描述信息满足所 述接收单元接收到的所述规则描述匹配信息时, 确定所述第一掩码中具有第一预设 数值的掩码位; 根据所述具有第一预设数值的掩码位的位置确定所述第一动作指 令。
[27] 结合第一方面第二种可能的实现方式, 在第一方面第四种可能的实现方式 中, 所述位置信息包括修改指示列表, 所述修改指示列表包括修改指示, 所述修 改指示列表中每一修改指示在所述修改指示列表中的位置对应所述待修改的处理 规则的指令集中每一动作指令的位置, 所述修改指示用于指示是否修改动作指 令;
[28] 所述指令确定子单元具体用于:确定所述第一处理规则的规则描述信息满足所 述接收单元接收到的所述规则描述匹配信息时,确定所述修改指示列表中用于指示修 改动作指令的修改指示;根据所述用于指示修改动作指令的修改指示在所述修改指示 列表中所在的第一位置, 确定与所述第一位置对应的所述第一动作指令。
[29] 结合第一方面第一种可能的实现方式, 在第一方面第五种可能的实现方式 中, 所述动作指令匹配条件包括: 指令类型信息, 所述指令类型信息用于指示所 述待修改的动作指令的指令类型;
[30] 所述指令确定子单元具体用于:确定所述第一处理规则的规则描述信息满足所 述接收单元接收到的所述规则描述匹配信息时, 根据所述指令类型信息确定所述第 一动作指令。
[31] 结合第一方面第一种可能的实现方式, 和 /或第一方面第二种可能的实现方 式, 和 /或第一方面第三种可能的实现方式, 和 /或第一方面第四种可能的实现方 式,和 /或第一方面第五种可能的实现方式,在第一方面第六种可能的实现方式中, 所述修改操作信息包括: 新的动作指令;
[32] 所述修改子单元具体用于: 将所述第一动作指令修改为所述新的动作指令。
[33] 结合第一方面第一种可能的实现方式, 和 /或第一方面第二种可能的实现方 式, 和 /或第一方面第三种可能的实现方式, 和 /或第一方面第四种可能的实现方 式,和 /或第一方面第五种可能的实现方式,在第一方面第七种可能的实现方式中, 所述修改操作信息包括: 修改参数指示信息, 所述修改参数指示信息用于指示对 所述待修改的动作指令的动作变量进行修改;
[34] 所述修改子单元具体用于:根据所述修改参数指示信息对所述第一动作指令 的动作变量进行修改。
[35] 结合第一方面第七种可能的实现方式, 在第一方面第八种可能的实现方式 中, 所述修改参数指示信息包括参数匹配条件和参数修改操作信息, 所述参数匹 配条件用于确定所述待修改的动作指令中的待修改的动作变量, 所述参数修改操 作信息用于指示对所述待修改的动作变量的修改;
[36] 所述修改子单元包括:
[37] 确定模块,用于根据所述参数匹配条件确定所述第一动作指令中待修改的第 一动作变量;
[38] 修改模块, 用于根据所述参数修改操作信息对所述第一动作变量进行修改。
[39] 结合第一方面第八种可能的实现方式, 在第一方面第九种可能的实现方式 中, 所述参数修改操作信息包括新的变量值;
[40] 所述修改模块具体用于:将所述第一动作变量的变量值修改为所述新的变量 值。
[41] 结合第一方面第八种可能的实现方式, 在第一方面第十种可能的实现方式 中, 所述参数修改操作信息包括运算方法信息, 所述运算方法信息用于指示获取 变量值的运算方法; [42] 所述修改模块具体用于:
[43] 根据所述运算方法信息获取新的变量值;
[44] 将所述第一动作变量的变量值修改为所述新的变量值。
[45] 第二方面, 提供一种处理规则的修改装置, 该装置适用于与转发器进行通信 的控制器, 所述转发器上存有第一处理规则, 所述第一处理规则包括规则描述信 息和指令集, 所述规则描述信息用于标识所述第一处理规则, 所述指令集包括至 少一个动作指令, 所述指令集用于指示根据所述指令集中的所述动作指令对所述 第一处理规则对应的数据报文进行处理; 所述装置包括:
[46] 生成单元, 用于生成规则修改信息;
[47] 发送单元, 用于向所述转发器发送所述生成单元生成的规则修改信息; 所述 规则修改信息包括规则描述匹配信息和动作指令修改信息, 所述规则描述匹配信 息用于确定待修改的处理规则, 所述待修改的处理规则的规则描述信息符合所述 规则描述匹配信息, 所述动作指令修改信息用于指示对所述待修改的处理规则的 指令集中指定的动作指令进行修改; 以便所述转发器确定所述第一处理规则的规 则描述信息满足所述规则描述匹配信息时, 根据所述动作指令修改信息对所述第 一处理规则的指令集中指定的动作指令进行修改。
[48] 第三方面, 提供一种处理规则的修改方法, 适用于转发器, 所述转发器上存 有第一处理规则, 所述第一处理规则包括规则描述信息和指令集, 所述规则描述 信息用于标识所述第一处理规则, 所述指令集包括至少一个动作指令, 所述指令 集用于指示根据所述指令集中的所述动作指令对所述第一处理规则对应的数据 报文进行处理; 所述方法包括:
[49] 所述转发器接收控制器发送的规则修改信息;所述规则修改信息包括规则描 述匹配信息和动作指令修改信息, 所述规则描述匹配信息用于确定待修改的处理 规则, 所述待修改的处理规则的规则描述信息符合所述规则描述匹配信息, 所述 动作指令修改信息用于指示对所述待修改的处理规则的指令集中指定的动作指 令进行修改;
[50] 当所述转发器确定所述第一处理规则的规则描述信息满足所述规则描述匹 配信息时, 所述转发器根据所述动作指令修改信息对所述第一处理规则的指令集 中指定的动作指令进行修改。
[51] 结合第三方面, 在第三方面第一种可能的实现方式中, 所述动作指令修改信 息包括: 动作指令匹配条件和修改操作信息; 其中, 所述动作指令匹配条件用于 确定待修改的动作指令, 所述修改操作信息用于指示对所述待修改的动作指令的 修改操作;
[52] 所述转发器根据所述动作指令修改信息对所述第一处理规则的指令集中指 定的动作指令进行修改, 包括:
[53] 所述转发器根据所述动作指令匹配条件确定所述第一处理规则的指令集中 待修改的第一动作指令;
[54] 所述转发器根据所述修改操作信息对所述第一动作指令进行修改。
[55] 结合第三方面第一种可能的实现方式中,在第三方面第二种可能的实现方式 中, 所述动作指令匹配条件包括位置信息, 所述位置信息用于指示所述待修改的 动作指令在所述待修改的处理规则的指令集中的位置;
[56] 所述转发器根据所述动作指令匹配条件确定所述第一处理规则的指令集中 待修改的第一动作指令包括:
[57] 所述转发器根据所述位置信息确定所述第一动作指令。
[58] 结合第三方面第二种可能的实现方式, 在第三方面第三种可能的实现方式 中, 所述位置信息包括第一掩码, 所述第一掩码中每一掩码位的位置对应所述待 修改的处理规则的指令集中每一动作指令的位置;
[59] 所述转发器根据所述位置信息确定所述第一动作指令包括:
[60] 所述转发器确定所述第一掩码中具有第一预设数值的掩码位;
[61] 所述转发器根据所述具有第一预设数值的掩码位的位置确定所述第一动作 指令。
[62] 结合第三方面第二种可能的实现方式, 在第三方面第四种可能的实现方式 中, 所述位置信息包括修改指示列表, 所述修改指示列表包括修改指示, 所述修 改指示列表中每一修改指示在所述修改指示列表中的位置对应所述待修改的处理 规则的指令集中每一动作指令的位置, 所述修改指示用于指示是否修改动作指 令;
[63] 所述转发器根据所述位置信息确定所述第一动作指令包括:
[64] 所述转发器确定所述修改指示列表中用于指示修改动作指令的修改指示;所 述转发器根据所述用于指示修改动作指令的修改指示在所述修改指示列表中所 在的第一位置, 确定所述第一动作指令。
[65] 结合第三方面第一种可能的实现方式, 在第三方面第五种可能的实现方式 中, 所述动作指令匹配条件包括: 指令类型信息, 所述指令类型信息用于指示所 述待修改的动作指令的指令类型;
[66] 所述转发器根据所述动作指令匹配条件确定所述第一处理规则的指令集中 待修改的第一动作指令包括:
[67] 所述转发器根据所述指令类型信息确定所述第一动作指令。
[68] 结合第三方面第一种可能的实现方式, 和 /或第三方面第二种可能的实现方 式, 和 /或第三方面第三种可能的实现方式, 和 /或第三方面第四种可能的实现方 式,和 /或第三方面第五种可能的实现方式,在第三方面第六种可能的实现方式中, 所述修改操作信息包括: 新的动作指令;
[69] 所述转发器根据所述修改操作信息对所述第一动作指令进行修改包括:
[70] 所述转发器将所述第一动作指令修改为所述新的动作指令。
[71] 结合第三方面第一种可能的实现方式, 和 /或第三方面第二种可能的实现方 式, 和 /或第三方面第三种可能的实现方式, 和 /或第三方面第四种可能的实现方 式,和 /或第三方面第五种可能的实现方式,在第三方面第七种可能的实现方式中, 所述修改操作信息包括: 修改参数指示信息, 所述修改参数指示信息用于指示对 所述待修改的动作指令的动作变量进行修改;
[72] 所述转发器根据所述修改操作信息对所述第一动作指令进行修改包括:
[73] 所述转发器根据所述修改参数指示信息对所述第一动作指令的动作变量进 行修改。
[74] 结合第三方面第七种可能的实现方式, 在第三方面第八种可能的实现方式 中, 所述修改参数指示信息包括参数匹配条件和参数修改操作信息, 所述参数匹 配条件用于确定所述待修改的动作指令中的待修改的动作变量, 所述参数修改操 作信息用于指示对所述待修改的动作变量的修改;
[75] 所述转发器根据所述修改参数指示信息对所述第一动作指令的参数进行修 改包括:
[76] 所述转发器根据所述参数匹配条件确定所述第一动作指令中待修改的第一 动作变量;
[77] 所述转发器根据所述参数修改操作信息对所述第一动作变量进行修改。
[78] 结合第三方面第八种可能的实现方式, 在第三方面第九种可能的实现方式 中, 所述参数修改操作信息包括新的变量值;
[79] 所述转发器根据所述参数修改操作信息对所述第一动作变量进行修改包括:
[80] 所述转发器将所述第一动作变量的变量值修改为所述新的变量值。 [81] 结合第三方面第八种可能的实现方式, 在第三方面第十种可能的实现方式 中, 所述参数修改操作信息包括运算方法信息, 所述运算方法信息用于指示获取 变量值的运算方法;
[82] 所述转发器根据所述参数修改操作信息对所述第一动作变量进行修改包括:
[83] 所述转发器根据所述运算方法信息获取新的变量值;
[84] 所述转发器将所述第一动作变量的变量值修改为所述新的变量值。
[85] 第四方面, 提供一种处理规则的修改方法, 该方法适用于与转发器进行通信 的控制器, 所述转发器上存有第一处理规则, 所述第一处理规则包括规则描述信 息和指令集, 所述规则描述信息用于标识所述第一处理规则, 所述指令集包括至 少一个动作指令, 所述指令集用于指示根据所述指令集中的所述动作指令对所述 第一处理规则对应的数据报文进行处理; 所述方法包括:
[86] 所述控制器向所述转发器发送规则修改信息;所述规则修改信息包括规则描 述匹配信息和动作指令修改信息, 所述规则描述匹配信息用于确定待修改的处理 规则, 所述待修改的处理规则的规则描述信息符合所述规则描述匹配信息, 所述 动作指令修改信息用于指示对所述待修改的处理规则的指令集中指定的动作指 令进行修改; 以便所述转发器确定所述第一处理规则的规则描述信息满足所述规 则描述匹配信息时, 根据所述动作指令修改信息对所述第一处理规则的指令集中 指定的动作指令进行修改。
[87] 本发明实施例中, 转发器接收控制器发送的规则修改信息; 所述规则修改信息 包括规则描述匹配信息和动作指令修改信息,所述规则描述匹配信息用于确定待修改 的处理规则,所述待修改的处理规则的规则描述信息符合所述规则描述匹配信息,所 述动作指令修改信息用于指示对所述待修改的处理规则的指令集中指定的动作指令 进行修改;所述转发器确定所述第一处理规则的规则描述信息满足所述规则描述匹配 信息时,所述转发器根据所述动作指令修改信息对所述第一处理规则的指令集中指定 的动作指令进行修改。从而转发器不再仅使用类似于用 FlOW_mod消息携带的指令 集完全替代流表项原有的指令集的方式来实现第一处理规则的修改, 而是可以对 第一处理规则的指定动作和 /或指定动作变量单独进行修改,第一处理规则的修改 方式灵活, 提高了控制器对转发器中第一处理规则进行修改的效率; 而且, 在仅 需要修改第一处理规则的指令集中部分动作指令的场景下, 相对于现有技术可以 通过相对较少的消息数量完成第一处理规则的指令集中部分动作指令的修改, 相 对于现有技术减少了第一处理规则修改所使用的消息数量, 从而减少了控制器和 转发器之间通信资源的占用。 附图说明
[88] 为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例 或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的 附图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造 性劳动性的前提下, 还可以根据这些附图获得其他的附图。
[89] 图 1为本发明实施例处理规则修改方法应用场景结构图;
[90] 图 2本发明处理规则的修改方法第一实施例示意图;
[91] 图 3为本发明处理规则的修改方法第二实施例示意图;
[92] 图 4为本发明处理规则的修改方法第三实施例示意图;
[93] 图 5为本发明处理规则的修改装置第一实施例示意图;
[94] 图 6为本发明处理规则的修改装置第二实施例示意图;
[95] 图 7为本发明转发器结构示意图;
[96] 图 8为本发明控制器结构示意图。 具体实施方式
[97] 在一些场景下流表项指令集中的某些动作指令是流表项特有的, 或者, 很多 场景下实际需要修改的仅是流表项指令集中的部分动作指令, 因此, OF 控制器 希望在批量修改流表项指令集中的部分动作指令的同时, 保留流表项指令集中的 其他动作指令。 例如, 对于背景技术中举例的流表项 1~3, 假设 aCti0nl、 2、 3 分别表示将数据报文进行流表项对应的不同隧道封装动作, action4表示将数据报 文从端口 1转发, acti0n5表示将数据报文从端口 2转发; 如果 OF控制器希望在 保留 actionl、 2、 3不变的情况下, 将流表项 1、 2、 3的 action4均修改为 action5, 从而使数据报文的最后转发端口从端口 1迁移到端口 2; 由于现有技术中仅支持 通过 FlOW_mod 消息对流表项指令集完全替换, OF 控制器无法通过一条 Flow_mod消息实现上述批量修改能力, 只能通过 3条 Flow_mod消息分别对三 个处理规则进行修改。 从而导致对于转发器中流表项的修改效率低, 且需要 3条 Flow_mod消息才能实现流表项 1~3的修改, 占用了 OF控制器和 OF转发器之间 的通信资源; 尤其在 OF转发器中存在大量流表项的场景下, 这种低效率的流表 项修改会导致 OF控制器和 OF转发器之间大量 FlOW_mod消息的传输,降低流表 项的修改效率, 消耗 OF控制器和 OF转发器之间的通信资源。
[98] 为此, 本发明实施例提供一种处理规则的修改方法、 装置及设备, 能够提高 转发器中处理规则的修改效率, 减少控制器和转发器之间的通信资源占用。
[99] 本发明实施例处理规则的修改方法、装置及设备,不仅可以适用于 Openflow 协议下 OF控制器对 OF转发器中流表项的修改, 还可以适用于其他 SDN网络中 控制器对转发器中处理规则的修改。
[100]参见图 1, 为本发明实施例处理规则修改方法所应用的 SDN 网络结构示意 图, 其中, 包括控制器 110和转发器 120, 其中, 控制器 110通过向转发器 120 发送规则修改信息, 来对转发器 120中存储的各种第一处理规则进行修改。 转发 器 120中存储的第一处理规则与前述的处理规则所指代的对象相同, 这里以及后 续将转发器 120中存储的处理规则称为第一处理规则主要用于将第一处理规则与 待修改的处理规则进行区分。 具体的, 所述第一处理规则可以包括规则描述信息和 指令集, 所述规则描述信息用于标识所述第一处理规则, 所述指令集包括至少一个 动作指令,所述指令集用于指示根据所述指令集中的所述动作指令对所述第一处理规 则对应的数据报文进行处理。
[101]参见图 2, 为本发明处理规则修改方法第一实施例示意图, 该方法包括:
[102]步骤 201 : 转发器接收控制器发送的规则修改信息; 所述规则修改信息包括规 则描述匹配信息和动作指令修改信息,所述规则描述匹配信息用于确定待修改的处理 规则,所述待修改的处理规则的规则描述信息符合所述规则描述匹配信息,所述动作 指令修改信息用于指示对所述待修改的处理规则的指令集中指定的动作指令进行修 改;
[103]步骤 202: 当所述转发器确定所述第一处理规则的规则描述信息满足所述规则 描述匹配信息时,所述转发器根据所述动作指令修改信息对所述第一处理规则的指令 集中指定的动作指令进行修改。
[104]本实施例中, 转发器接收控制器发送的规则修改信息; 所述规则修改信息包括 规则描述匹配信息和动作指令修改信息,所述规则描述匹配信息用于确定待修改的处 理规则,所述待修改的处理规则的规则描述信息符合所述规则描述匹配信息,所述动 作指令修改信息用于指示对所述待修改的处理规则的指令集中指定的动作指令进行 修改;从而,对于规则描述信息满足所述规则描述匹配信息的每一个第一处理规则, 转发器根据所述动作指令修改信息对所述第一处理规则的指令集中指定的动作指令 进行修改。 从而转发器不再仅使用类似于用 FlOW_mod消息携带的指令集完全替 代流表项原有的指令集的方式来实现第一处理规则的修改, 而是可以对第一处理 规则的指定动作和 /或指定动作变量单独进行修改, 第一处理规则的修改方式灵 活, 提高了控制器对转发器中第一处理规则进行修改的效率; 而且, 在仅需要修 改第一处理规则的指令集中部分动作指令的场景下, 相对于现有技术可以通过相 对较少的消息数量完成第一处理规则的指令集中部分动作指令的修改, 相对于现 有技术减少了第一处理规则修改所使用的消息数量, 从而减少了控制器和转发器 之间通信资源的占用。 [105]参见图 3, 为本发明处理规则修改方法第二实施例示意图, 该方法包括:
[106]步骤 301 : 控制器向转发器发送规则修改信息; 所述规则修改信息包括规则描 述匹配信息和动作指令修改信息, 所述规则描述匹配信息用于确定待修改的处理规 贝 U,所述待修改的处理规则的规则描述信息符合所述规则描述匹配信息,所述动作指 令修改信息用于指示对所述待修改的处理规则的指令集中指定的动作指令进行修改;
[107]以便所述转发器确定所述第一处理规则的规则描述信息满足所述规则描述匹配 信息时,根据所述动作指令修改信息对所述第一处理规则的指令集中指定的动作指令 进行修改。
[108]可选地, 步骤 301之前还可以包括: 所述控制器生成所述规则修改信息。
[109]其中, 控制器具体如何生成所述规则修改信息这里不再赘述。
[no]本实施例中, 控制器向转发器发送规则修改信息, 所述规则修改信息包括规 则描述匹配信息和动作指令修改信息,所述规则描述匹配信息用于确定待修改的处理 规则,所述待修改的处理规则的规则描述信息符合所述规则描述匹配信息,所述动作 指令修改信息用于指示对所述待修改的处理规则的指令集中指定的动作指令进行修 改; 从而, 对于规则描述信息满足所述规则描述匹配信息的每一个第一处理规则, 转发器根据所述动作指令修改信息对所述第一处理规则的指令集中指定的动作指令 进行修改。 从而转发器不再仅使用类似于用 FlOW_mod消息携带的指令集完全替 代流表项原有的指令集的方式来实现第一处理规则的修改, 而是可以对第一处理 规则的指定动作和 /或指定动作变量单独进行修改, 第一处理规则的修改方式灵 活, 提高了控制器对转发器中第一处理规则进行修改的效率; 而且, 在仅需要修 改第一处理规则的指令集中部分动作指令的场景下, 相对于现有技术可以通过相 对较少的消息数量完成第一处理规则的指令集中部分动作指令的修改, 相对于现 有技术减少了第一处理规则修改所使用的消息数量, 从而减少了控制器和转发器 之间通信资源的占用。
[111]参见图 4, 为本发明处理规则修改方法第三实施例示意图, 该方法包括:
[112]步骤 401 : 控制器向转发器发送规则修改信息, 所述规则修改信息包括规则 描述匹配信息和动作指令修改信息,所述规则描述匹配信息用于确定待修改的处理规 贝 u,所述待修改的处理规则的规则描述信息符合所述规则描述匹配信息,所述动作指 令修改信息用于指示对所述待修改的处理规则的指令集中指定的动作指令进行修改;
[113]其中, 控制器如何被触发进行第一处理规则的修改, 如何确定需要修改第一 处理规则的哪些动作指令这里并不限定。 例如, 控制器可以根据外部条件如来自 转发器的数据报文上报、 来自控制器上层管理系统的规则修改请求或虚拟机迁移 通知等, 或者根据内部条件如修改定时器超时等触发对某一个或多个第一处理规 则的修改; 例如, 控制器可以从转发器上报的数据报文头域中提取或者从上层管 理系统直接输入的信息中获取需要修改的第一处理规则、 以及每个第一处理规则 中需要修改的动作指令, 或者, 根据转发器所转发的数据报文的类型、 所转发数 据报文所属用户的签约信息、 网络状态等信息确定需要修改的第一处理规则、 以 及每个第一处理规则中需要修改的动作或动作变量等。
[114]其中, 控制器和转发器之间如何实现所述规则修改信息的传输, 本发明并不 限制。 例如, 在 Openflow协议中, 本步骤可以通过 OF控制器向 OF发送携带所 述规则修改信息的 floW_ mod消息实现; 在其他的 SDN网络中, 也可以通过控制 器和转发器之间的其他消息实现等等。
[115]所述规则描述信息用于标识第一处理规则; 例如所述规则描述信息可以是所 述控制器或转发器为第一处理规则分配的唯一标识等。 在某些场景下例如 Openflow协议中, 所述规则描述信息可以为流表项的匹配域, 此时所述规则描述 信息还可以用于确定第一处理规则对应的数据报文,所述第一处理规则对应的数据报 文满足所述规则描述信息。
[116]所述规则描述匹配信息在不同的应用场景下可以有不同的实现。
[117]举例 1 : 在 Openflow协议中,所述规则描述匹配信息可以是 flow_ mod消息 中携带的匹配规则 (Match Rule) , 按照 flow_ mod消息中携带的是严格匹配修改 或非严格匹配修改标识, 匹配规则可以覆盖不同匹配域范围, 进而指示不同的流 表项集合。 [118]例如, 背景技术中对于匹配规则与流表项中匹配域匹配的举例;
[119]或者, 例如 Flow—mod 消息中携带匹配规则为: match rule={src_ip=ipl , dst_ip=ip2, protocol: ALL, port=ALL, tunnel_id=ALL}; 贝 lj,
[120]如果 flOW_ mod消息中携带严格匹配修改标识,转发器中与上述匹配规则完 全相同的匹配域就是该匹配规则覆盖的范围, 如果 flOW_ mod消息中携带非严格 匹配修改标识, 转发器中包括上述匹配规则的匹配域就是该匹配规则覆盖的范 围。
[121]或者, 例如所述匹配规则可以通过媒体接入控制 (MAC , Media Access Control) /互联网协议(IP, Internet Protocol) /传输控制协议(TCP, Transmission Control Protocol) /用户数据包协议 (UDP, User Datagram Protocol) 等头域的通 配或者 cookie 掩码等方式, 使得该匹配规则能够覆盖一个或多个流表项的匹配 域。 如匹配规则为: match rule = {src_ip=ipl, dst_ip=ip2, cookie =0x0031, cookie_mask = Oxfffe} , 则该匹配规则可以覆盖所有源 IP地址和目的 IP地址为指 定地址, 以及满足以下逻辑的流表项的匹配域: (flow entry ookie&flow modxookie mask) == (Flow modxookie&flow modxookie mask;)。
[122]举例 2: 假设所述规则描述信息通过唯一标识第一处理规则的处理规则标识 实现, 则所述规则描述匹配信息可以包括: 一个或多个规则标识, 如规则描述匹 配信息为 { 1, 3, 4}; 或者, 规则标识掩码, 如规则描述匹配信息为 {0x001, mask=0xfffe} ; 或者规则标识范围, 如规则描述匹配信息为 {Min=l, MAX=3 }等。
[123]在实际应用中, 所述规则描述匹配信息的实现灵活, 可以根据实际应用环境 具体设定, 这里并不限制。
[124]其中, 所述动作指令修改信息可以包括: 动作指令匹配条件、 修改操作信息; 其中,所述动作指令匹配条件用于确定待修改的动作指令,所述修改操作信息用于指 示对所述待修改的动作指令的修改操作;
[125]具体的, 所述动作指令匹配条件可以包括:
[126]位置信息, 所述位置信息用于指示所述待修改的动作指令在所述待修改的处理 规则的指令集中的位置;
[127]或者, 指令类型信息, 所述指令类型信息用于指示所述待修改的动作指令的指 令类型;
[128]或者, 待修改的动作指令。
[129]其中, 所述位置信息可以包括: 第一掩码, 所述第一掩码中每一掩码位的位置 对应所述待修改的处理规则的指令集中每一动作指令的位置;
[130]或者, 所述位置信息可以包括修改指示列表, 所述修改指示列表包括修改指示, 所述修改指示列表中每一修改指示在所述修改指示列表中的位置对应所述待修改的 处理规则的指令集中每一动作指令的位置, 所述修改指示用于指示是否修改动作指 令。
[131]其中, 所述修改操作信息可以包括:
[132]新的动作指令;
[133]或者, 修改参数指示信息, 所述修改参数指示信息用于指示对所述待修改的动 作指令的动作变量进行修改。
[134]其中, 所述修改参数指示信息可以包括:
[135]参数匹配条件和参数修改操作信息, 所述参数匹配条件用于确定所述待修改的 动作指令中的待修改的动作变量,所述参数修改操作信息用于指示对所述待修改的动 作变量的修改。
[136]其中, 所述参数匹配条件可以包括:
[137]待修改的动作变量;
[138]或者, 动作变量和与动作变量绑定的修改指示; 所述修改指示用于指示绑定的 动作变量是否进行修改。
[139]所述参数修改操作信息可以包括新的变量值; 或者, 运算方法信息, 所述运算 方法信息用于指示获取变量值的运算方法。
[140]其中, 所述动作的动作变量包括动作类型和动作参数。 动作参数可以包括一种 或多种参数。
[141]步骤 402: 转发器接收所述规则修改信息。
[142]步骤 403 :当转发器确定所述第一处理规则的规则描述信息满足所述规则描述匹 配信息时,所述转发器根据所述动作指令修改信息对所述第一处理规则的指令集中指 定的动作指令进行修改。
[143]以下对本步骤中所述转发器根据所述动作指令修改信息对所述第一处理规则的 指令集中指定的动作指令进行修改的实现进行说明。
[144]其中, 所述动作指令修改信息可以包括: 动作指令匹配条件和修改操作信息; 其中,所述动作指令匹配条件用于确定待修改的动作指令,所述修改操作信息用于指 示对所述待修改的动作指令的修改操作;
[145]所述转发器根据所述动作指令修改信息对所述第一处理规则的指令集中指定的 动作指令进行修改可以包括:
[146]所述转发器根据所述动作指令匹配条件确定所述第一处理规则的指令集中待修 改的第一动作指令;
[147]所述转发器根据所述修改操作信息对所述第一动作指令进行修改。
[148]以下对所述动作指令匹配条件的实现进行举例说明:
[149] 1.1、 所述动作指令匹配条件可以包括位置信息, 所述位置信息用于指示所述待 修改的动作指令在所述待修改的处理规则的指令集中的位置;
[150]所述转发器根据所述动作指令匹配条件确定所述第一处理规则的指令集中待修 改的第一动作指令可以包括: 所述转发器根据所述位置信息确定所述第一动作指令。
[151]在第一种可能的实现方式中, 所述位置信息可以包括第一掩码, 所述第一掩码 中每一掩码位的位置对应所述待修改的处理规则的指令集中每一动作指令的位置;
[152]所述转发器根据所述位置信息确定所述第一动作指令可以包括:
[153]所述转发器确定所述第一掩码中具有第一预设数值的掩码位;
[154]所述转发器根据所述具有第一预设数值的掩码位的位置确定所述第一动作指 令。
[155]在实际应用中, 所述第一动作指令对应的掩码位为第一预设数值, 其他掩码位 的数值与所述第一预设数值不同。
[156]例如, 以本发明实施例应用于 Openflow协议为例, OF控制器向 OF转发器发 送 Flow_mod 消息如下:
[157] Flow_mod={MODIFY , table id=l , match rule , Mask=0x001 , Instructions {action3} ;
[158]其中, 位置信息通过掩码 0x001 实现, 假设第一预设数值为 1, 则掩码 0x001 中仅最后一个掩码位是 1, 表示流表项指令集的最后一个动作指令为第一动作指令。
[159]在第二种可能的实现方式中, 所述位置信息可以包括修改指示列表, 所述修改 指示列表包括修改指示,所述修改指示列表中每一修改指示在所述修改指示列表中的 位置对应所述待修改的处理规则的指令集中每一动作指令的位置,所述修改指示用于 指示是否修改动作指令;
[160]所述转发器根据所述位置信息确定所述第一动作指令可以包括:
[161]所述转发器确定所述修改指示列表中用于指示修改动作指令的修改指示; 所述 转发器根据所述用于指示修改动作指令的修改指示在所述修改指示列表中所在的第 一位置, 确定所述第一动作指令。 [162]例如, 以本发明实施例应用于 Openflow协议为例, OF控制器向 OF转发器发 送 Flow_mod 消息如下:
[163] Flow_mod={MODIFY, table id=l, match rule, Instructions { (action 1 , 0), (action2, 1), (action3 , 0)}};
[164]其中, Flow_mod 消息的指令集中携带的 actionl、 action2、 action3分别为修改 操作信息,具体为新的动作指令,后续描述中会进行详细说明,这里不赘述; (actionl , 0) (action3 , 0)中的 0、 (action2, 1)中的 1 分别是所述修改指示; 假设修改指示为 1 时, 表示对修改指示对应的动作指令进行修改, 修改指示为 0时, 表示对修改指示对 应的动作指令不进行修改; 贝 ij, (actionl , 0)在 FlOW_mod 消息的指令集中位于第 1 位, 其对应流表项指令集中的第一个动作指令, 但是修改指示为 0, 则转发器不对流 表项指令集中的第一个动作指令进行修改; 同样的原理,转发器对流表项指令集中的 第二个动作指令进行修改, 不对流表项指令集中的第三个动作指令进行修改。
[165] 1.2, 所述动作指令匹配条件可以包括: 指令类型信息, 所述指令类型信息用于 指示所述待修改的动作指令的指令类型;
[166]所述转发器根据所述动作指令匹配条件确定所述第一处理规则的指令集中待修 改的第一动作指令可以包括:
[167]所述转发器根据所述指令类型信息确定所述第一动作指令。
[168]例如, 以本发明实施例应用于 Openflow协议为例, OF控制器向 OF转发器发 送 Flow_mod 消息如下:
[169] Flow_mod={MODIFY, table id, match rule, Type—Only, Instructions {action3 } };
[170]其中, action为修改操作信息, 具体为新的动作指令, 后续描述中会进行详细 说明, 这里不赘述; Type_Only为指令类型信息, 用来表示待修改的动作指令的动作 类型与修改操作信息中的 acti0n3的动作类型相同; 贝 1」, 转发器会将流表项指令表中 动作类型与 acti0n3相同的动作指令均确定为所述第一动作指令。
[171] 1.3 , 所述动作指令匹配条件可以包括: 待修改的动作指令;
[172]所述转发器根据所述动作指令匹配条件确定所述第一处理规则的指令集中待修 改的第一动作指令可以包括:
[173]所述转发器根据动作指令匹配条件中包括的动作指令从所述第一处理规则的指 令集中确定所述第一动作指令。
[174]例如, 以本发明实施例应用于 Openflow协议为例, OF控制器向 OF转发器发 送 Flow mod 消息如下: [175] Flow_mod={MODIFY, table id, match rule, Instructions { ( action 1 , action3 ) ,
(action2, action4 ) }};
[176]其中, 动作指令对 (actionl , action3 ), ( action2, action4) 中每一个动作指令 对的前一个动作指令为动作指令匹配条件,后一个动作指令为修改操作信息;具体的, 动作指令对 (actionl , action3 ), (action2, action4) 中的前一个动作指令 actionl 和 action3 分别为待修改的动作指令, 则转发器将流表项指令集中的 actionl 和 action3 分别确定为第一动作指令。
[177]以上实例中的每个动作指令都包括动作类型以及动作参数,例如 actionl是将数 据报文从端口 1转发的动作, 贝 U actionl可以为: action (type=OUTPUT, port=l ); 由 于本发明实施例的以上描述与每个动作指令的具体实现无关, 因此, 这里并未详述。
[178]以下对所述修改操作信息的实现进行举例说明:
[179] 2.1、 所述修改操作信息可以包括: 新的动作指令;
[180]所述转发器根据所述修改操作信息对所述第一动作指令进行修改可以包括:
[181]所述转发器将所述第一动作指令修改为所述新的动作指令。
[182]例如, 在上述 1.2 1.3所示的举例中, 修改操作信息均是通过新的操作指令实现 的。 具体的,
[183]如果 OF控制器向 OF转发器发送的 Flow_mod 消息如下:
[184] Flow_mod={MODIFY , table id=l , match rule , Mask=0x001 , Instructions {action3} ;
[185]则, 修改操作信息携带在 FlOW_mod 消息的指令集中, 为 acti0n3 ; 贝 ij, 转发器 只将流表项指令集的最后 1 个动作指令修改为 FlOW_mod 消息中指示的新的动作指 令: action , 流表项指令集中的其他动作不变。
[186]如果 OF控制器向 OF转发器发送的 Flow_mod 消息如下:
[187] Flow_mod={MODIFY, table id=l, match rule, Instructions {(actionl , 0), (action2, 1), (action3 , 0)}};
[188]其中, Flow_mod 消息的指令集中携带的 actionl、 action2、 action3分别为修改 操作信息, 具体为新的动作指令; (actionl , 0) (action3 , 0)中的 0、 (action2, 1)中的 1 分别是所述修改指示; 贝 ij, (actionl , 0)在 FlOW_mod 消息的指令集中位于第 1位, 其对应流表项指令集中的第一个动作指令, 修改指示为 0, 则转发器不将流表项指令 集中的第一个动作指令修改为 actionl ; 同样的原理, 转发器将流表项指令集中的第 二个动作指令修改为 acti0n2,不将流表项指令集中的第三个动作指令修改为 acti0n3。 [189]如果 OF控制器向 OF转发器发送的 Flow_mod 消息如下:
[190] Flow_mod={MODIFY, table id, match rule, Type—Only, Instructions {action3 } };
[191]其中, action为修改操作信息, 具体为新的动作指令; 贝 1」, 转发器会将流表项 指令表中动作类型与 acti0n3相同的动作指令均修改为 acti0n3, 其他动作指令保持不 变。
[192]如果 OF控制器向 OF转发器发送的 Flow_mod 消息如下:
[193] Flow_mod={MODIFY, table id, match rule, Instructions { ( action 1 , action3 ) ,
(action2, action4 ) }};
[194]其中, 动作指令对 ( actionl , action3 ), ( action2, action4) 中每一个动作指令 对的前一个动作指令为动作指令匹配条件,后一个动作指令为修改操作信息;具体的, 转发器将流表项指令集中的 actionl修改为 action3, action2修改为 action4,其他动作 指令保持不变。
[195] 2.2、 所述修改操作信息可以包括: 修改参数指示信息, 所述修改参数指示信息 用于指示对所述待修改的动作指令的动作变量进行修改;
[196]所述转发器根据所述修改操作信息对所述第一动作指令进行修改包括:
[197]所述转发器根据所述修改参数指示信息对所述第一动作指令的动作变量进行修 改。
[198]其中, 所述修改参数指示信息可以包括参数匹配条件和参数修改操作信息, 所 述参数匹配条件用于确定所述待修改的动作指令中的待修改的动作变量,所述参数修 改操作信息用于指示对所述待修改的动作变量的修改;
[199]所述转发器根据所述修改参数指示信息对所述第一动作指令的动作变量进行修 改可以包括:
[200]所述转发器根据所述参数匹配条件确定所述第一动作指令中待修改的第一动作 [201]所述转发器根据所述参数修改操作信息对所述第一动作变量进行修改。
[202]在第一种可能的实现方式中, 所述参数匹配条件可以包括: 待修改的动作变量;
[203]所述转发器根据所述参数匹配条件确定所述第一动作指令中待修改的第一动作 变量可以包括:
[204]所述转发器根据所述参数匹配条件中的动作变量确定所述第一动作指令中待修 改的第一动作变量。
[205]例如, 以本发明实施例应用于 Openflow协议为例, OF控制器向 OF转发器 发送 Flow_mod 消息如下:
[206] Flow_mod={MODIFY, table id=l, match rule, Instructions [action 1 (MBR=3Mbps] }
[207]其中, 以动作参数 MBR作为所述参数匹配条件。
[208]在第二种可能的实现方式中, 所述参数匹配条件可以包括: 动作变量和与动作 变量绑定的修改指示;
[209]所述转发器根据所述参数匹配条件确定所述第一动作指令中待修改的第一动作 变量可以包括:
[210]所述转发器根据动作变量和与动作变量绑定的修改指示确定所述第一动作指令 中待修改的第一动作变量。
[211]例如, OF控制器向 OF转发器发送 Flow_mod 消息如下:
[212] Flow_mod={MODIFY, table id=l, match rule, Instructions [action 1 ( (MBR=3Mbps, para_modify_ind=false), (GBR= 1Mbps, para modify ind =true)),action2 ( (port=l, para modify ind =false))]}
[213]其中, 以动作参数 MBR、 GBR及其绑定的修改指示 para_modify_ind作为所 述参数匹配条件, 其中, 假设 para_modify_ind=false 表示动作变量不进行修改, para_modify_ind =true 表示动作变量进行修改, 则转发器将流表项指令表中 actionl的动作参数 GBR确定为第一动作变量。
[214]在第一种可能的实现方式中, 所述参数修改操作信息可以包括新的变量值;
[215]所述转发器根据所述参数修改操作信息对所述第一动作变量进行修改可以 包括:
[216]所述转发器将所述第一动作变量的变量值修改为所述新的变量值。
[217]例如, 以本发明实施例应用于 Openflow协议为例, OF控制器向 OF转发器 发送 Flow_mod 消息如下:
[218] Flow_mod={MODIFY, table id=l, match rule, Instructions [actionl (MBR=3Mbps] }
[219]其中, 将 actionl这一动作指令为第一动作指令, MBR这一动作变量为参数 匹配条件, 参数修改操作信息为 3Mbps这一新的变量值; 贝 1」, 转发器将流表项指 令集中 actionl这一动作指令的动作参数 MBR修改为 3Mbps。
[220]在第二种可能的实现方式中, 所述参数修改操作信息可以包括运算方法信 息, 所述运算方法信息用于指示获取变量值的运算方法; [221]所述转发器根据所述参数修改操作信息对所述第一动作变量进行修改可以 包括:
[222]所述转发器根据所述运算方法信息获取新的变量值;
[223]所述转发器将所述第一动作变量的变量值修改为所述新的变量值。
[224]例如, 所述运算方法信息可以包括: 第二掩码以及需要修改的变量位对应的 目标值; 所述第二掩码的每一掩码位对应第一动作变量的变量值的每一变量位, 需要修改的所述变量位对应的掩码位为第二预设数值, 其他掩码位的数值与所述 第二预设数值不同;
[225]所述转发器根据所述运算方法信息获取新的变量值可以包括:
[226]转发器将第二掩码中具有第二预设数值的掩码位所对应的第一动作变量的 变量值的变量位确定为需要修改的变量位;
[227]转发器将所述需要修改的变量位的数值修改为变量位对应的目标值,得到新 的变量值。
[228]例 1, 以本发明实施例应用于 Openflow协议为例, OF控制器向 OF转发器 发送 Flow_mod 消息如下:
[229]Flow_mod={MODIFY, table id=l, match rule, Instructions [actionl (type =PUSH_TUNNEL, tunnel_id=Oxffff, mask=0x0000), action2 (type=OUTPUT, po rt=l, mask=0xfffe)]} ;
[230]其中, 运算方法信息的第二掩码分别为动作 actionl 中的 mask=0x0000以及 动作 action2中的 mask=0xfffe, 假设以掩码位为 0表示对应的变量位修改, 掩码 位为 1表示对应的变量位不修改, 则 0x0000表示每一变量位都进行修改, Oxfffe 表示仅最后一个变量位进行修改, 则转发器将流表项指令集中 actionl的动作参 数 tunneljd的参数值修改为 Oxffff; 将 action2的动作参数 port的参数值的最后 一个参数位修改为 1。
[231]例 2, ORIGIN TUNNEL ID; 指示保留原有隧道标识 ( ORIGIN_TUNNEL_ ID);
[232] DEC(0RGIN PORT); 指示将原有端口号 (0RGIN_P0RT) 在原变量值的基 础上减 1运算, 结果作为新的变量值;
[233] INC(0RIGIN_P0RT); 指示将原有端口号在原变量值的基础上加 1运算, 结 果作为新的变量值;
[234] MUL(ORIGIN GBR, 2); 指示将原有 GBR ( ORIGIN GBR) 的原变量值执 行乘 2运算, 结果作为新的变量值;
[235]其中的 DEC、 INC、 MUL (变量, 2 ) 等即为所述运算方法。
[236]步骤 404: 转发器接收需要转发的数据报文, 根据修改后的第一处理规则进 行数据报文的转发。
[237]其中,转发器具体如何根据第一处理规则对数据报文进行转发,这里不赘述。
[238]可选的, 本发明实施例中, 转发器可以根据对指定动作指令的修改结果, 向 所述控制器发送修改结果指示信息; 所述修改结果指示信息可以包括: 处理规则修改 结果指示信息和 /或动作修改结果指示信息, 所述处理规则修改结果指示信息可以用 于指示第一处理规则的修改结果,所述动作修改结果指示信息可以用于指示所述指定 动作指令的修改结果。
[239]例如, 转发器根据所述动作指令修改信息对指定动作指令修改成功时, 所述处 理规则修改结果指示信息可以包括: 第一成功指示、修改成功的第一处理规则的规则 描述信息, 所述动作修改结果指示信息可以包括: 第二成功指示、 修改成功的动作指 令; 或者, 转发器根据所述动作指令修改信息对指定动作变量未修改成功时, 所述 处理规则修改结果指示信息可以包括: 第一失败指示、未修改成功的第一处理规则的 规则描述信息, 所述动作失败指示信息可以包括: 第二失败指示、 未修改成功的动作 指令。其中, 第一成功指示和第二成功指示可以相同或不同; 第一失败指示和第二失 败指示可以相同或不同。
[240]在实际应用中,转发器根据所述动作指令修改信息对指定动作指令修改成功时, 也可以不上报修改结果指示信息, 在转发器根据所述动作指令修改信息对指定动作 指令未修改成功时, 上报修改结果指示信息, 本发明并不限定。
[241]另外, 不同的第一处理规则和 /或不同的动作指令的修改结果可以由转发器分别 通过不同的修改结果指示信息发送给控制器; 或者, 不同的修改结果 (成功和失败) 也可以由转发器分别通过不同的修改结果指示信息发送给控制器等等。所述修改结果 指示信息的实现本发明并不限制, 可以在实际应用中灵活实现。
[242]其中, 所述对指定动作指令未修改成功的原因可以很多, 例如本发明实施例应 用于 Openflow协议时, 流表项指令集中的动作可能与 OF控制器发送的 Flow_mod 消息中的动作数量不匹配,或 FlOW_mod 消息中的指定动作变量与流表项指令集中动 作变量格式不同, 或 OF转发器对流表项指令集中动作变量的变量值运算出错如端口 号计算结果为负值, 或 OF转发器无法对某个流表项的动作参数执行运算或修改等。
[243]本发明实施例应用于 Openflow协议时, 所述修改结果指示信息可以通过 ACTI ON PARA ERROR消息实现。
[244]本实施例中, 控制器向转发器发送规则修改信息, 所述规则修改信息包括规 则描述匹配信息和动作指令修改信息,所述规则描述匹配信息用于确定待修改的处理 规则,所述待修改的处理规则的规则描述信息符合所述规则描述匹配信息,所述动作 指令修改信息用于指示对所述待修改的处理规则的指令集中指定的动作指令进行修 改; 从而, 对于规则描述信息满足所述规则描述匹配信息的每一个第一处理规则, 转发器根据所述动作指令修改信息对所述第一处理规则的指令集中指定的动作指令 进行修改。 从而转发器不再仅使用类似于用 FlOW_mod消息携带的指令集完全替 代流表项原有的指令集的方式来实现第一处理规则的修改, 而是可以对第一处理 规则的指定动作和 /或指定动作变量单独进行修改, 第一处理规则的修改方式灵 活, 提高了控制器对转发器中第一处理规则进行修改的效率; 而且, 在仅需要修 改第一处理规则的指令集中部分动作指令的场景下, 相对于现有技术可以通过相 对较少的消息数量完成第一处理规则的指令集中部分动作指令的修改, 相对于现 有技术减少了第一处理规则修改所使用的消息数量, 从而减少了控制器和转发器 之间通信资源的占用。
[245]参见图 5,为本发明处理规则的修改装置第一实施例示意图,该装置可以适用于 转发器,所述修改装置上存有第一处理规则,所述第一处理规则包括规则描述信息和 指令集,所述规则描述信息用于标识第一处理规则,所述指令集包括至少一个动作指 令,所述指令集用于指示根据所述指令集中的所述动作指令对所述第一处理规则对应 的数据报文进行处理; 该装置 500包括:
[246]接收单元 510,用于接收控制器发送的规则修改信息;所述规则修改信息包括规 则描述匹配信息和动作指令修改信息,所述规则描述匹配信息用于确定待修改的处理 规则,所述待修改的处理规则的规则描述信息符合所述规则描述匹配信息,所述动作 指令修改信息用于指示对所述待修改的处理规则的指令集中指定的动作指令进行修 改;
[247]修改单元 520,用于确定所述第一处理规则的规则描述信息满足所述接收单元 5 10接收到的所述规则描述匹配信息时, 根据所述接收单元 510接收到的所述动作指 令修改信息对所述第一处理规则的指令集中指定的动作指令进行修改。
[248]可选地, 所述动作指令修改信息可以包括: 动作指令匹配条件和修改操作信息; 其中,所述动作指令匹配条件用于确定待修改的动作指令,所述修改操作信息用于指 示对所述待修改的动作指令的修改操作;
[249]所述修改单元 520可以包括:
[250]指令确定子单元, 用于确定所述第一处理规则的规则描述信息满足所述接收单 元接收到的所述规则描述匹配信息时,根据所述动作指令匹配条件确定所述第一处理 规则的指令集中待修改的第一动作指令;
[251]修改子单元, 用于根据所述修改操作信息对所述第一动作指令进行修改。
[252]可选地, 所述动作指令匹配条件可以包括位置信息, 所述位置信息用于指示所 述待修改的动作指令在所述待修改的处理规则的指令集中的位置;
[253]所述指令确定子单元具体可以用于: 确定所述第一处理规则的规则描述信息满 足所述接收单元接收到的所述规则描述匹配信息时,根据所述位置信息确定所述第一 动作指令。
[254]可选地, 所述位置信息可以包括第一掩码, 所述第一掩码中每一掩码位的位置 对应所述待修改的处理规则的指令集中每一动作指令的位置;
[255]所述指令确定子单元具体可以用于: 确定所述第一处理规则的规则描述信息满 足所述接收单元接收到的所述规则描述匹配信息时,确定所述第一掩码中具有第一预 设数值的掩码位; 根据所述具有第一预设数值的掩码位的位置确定所述第一动作指 令。
[256]可选地, 所述位置信息可以包括修改指示列表, 所述修改指示列表包括修改指 示,所述修改指示列表中每一修改指示在所述修改指示列表中的位置对应所述待修改 的处理规则的指令集中每一动作指令的位置,所述修改指示用于指示是否修改动作指 令;
[257]所述指令确定子单元具体可以用于: 确定所述第一处理规则的规则描述信息满 足所述接收单元接收到的所述规则描述匹配信息时,确定所述修改指示列表中用于指 示修改动作指令的修改指示;根据所述用于指示修改动作指令的修改指示在所述修改 指示列表中所在的第一位置, 确定与所述第一位置对应的所述第一动作指令。
[258]可选地, 所述动作指令匹配条件可以包括: 指令类型信息, 所述指令类型信息 用于指示所述待修改的动作指令的指令类型;
[259]所述指令确定子单元具体可以用于: 确定所述第一处理规则的规则描述信息满 足所述接收单元接收到的所述规则描述匹配信息时,根据所述指令类型信息确定所述 第一动作指令。
[260]可选地, 所述修改操作信息可以包括: 新的动作指令; [261]所述修改子单元具体可以用于:将所述第一动作指令修改为所述新的动作指令。
[262]可选地, 所述修改操作信息可以包括: 修改参数指示信息, 所述修改参数指示 信息用于指示对所述待修改的动作指令的动作变量进行修改;
[263]所述修改子单元具体可以用于: 根据所述修改参数指示信息对所述第一动作指 令的动作变量进行修改。
[264]可选地, 所述修改参数指示信息可以包括参数匹配条件和参数修改操作信息, 所述参数匹配条件用于确定所述待修改的动作指令中的待修改的动作变量,所述参数 修改操作信息用于指示对所述待修改的动作变量的修改;
[265]所述修改子单元可以包括:
[266]确定模块, 用于根据所述参数匹配条件确定所述第一动作指令中待修改的第一 动作变量;
[267]修改模块, 用于根据所述参数修改操作信息对所述第一动作变量进行修改。
[268]可选地, 所述参数修改操作信息可以包括新的变量值;
[269]所述修改模块具体可以用于: 将所述第一动作变量的变量值修改为所述新的变 量值。
[270]可选地, 所述参数修改操作信息可以包括运算方法信息, 所述运算方法信息用 于指示获取变量值的运算方法;
[271]所述修改模块具体可以用于:
[272]根据所述运算方法信息获取新的变量值;
[273]将所述第一动作变量的变量值修改为所述新的变量值。
[274]可选地, 所述接收单元 510具体可以用于: 接收控制器发送的流修改 FlOW_mo d消息, 所述 FlOW_mod消息中携带所述规则修改信息。
[275]本实施例中, 转发器接收控制器发送的规则修改信息; 所述规则修改信息包括 规则描述匹配信息和动作指令修改信息,所述规则描述匹配信息用于确定待修改的处 理规则,所述待修改的处理规则的规则描述信息符合所述规则描述匹配信息,所述动 作指令修改信息用于指示对所述待修改的处理规则的指令集中指定的动作指令进行 修改; 从而, 对于规则描述信息满足所述规则描述匹配信息的每一个第一处理规则, 转发器根据所述动作指令修改信息对所述第一处理规则的指令集中指定的动作指令 进行修改。从而转发器不再仅使用类似于用 FlOW_mod消息携带的指令集完全替代流 表项原有的指令集的方式来实现第一处理规则的修改,而是可以对第一处理规则的指 定动作和 /或指定动作变量单独进行修改, 第一处理规则的修改方式灵活, 提高了控 制器对转发器中第一处理规则进行修改的效率; 而且,在仅需要修改第一处理规则的 指令集中部分动作指令的场景下,相对于现有技术可以通过相对较少的消息数量完成 第一处理规则的指令集中部分动作指令的修改,相对于现有技术减少了第一处理规则 修改所使用的消息数量, 从而减少了控制器和转发器之间通信资源的占用。
[276]参见图 6,为本发明处理规则的修改装置第二实施例示意图,该装置适用于与转 发器进行通信的控制器,所述转发器上存有第一处理规则,所述第一处理规则包括规 则描述信息和指令集,所述规则描述信息用于标识所述第一处理规则,所述指令集包 括至少一个动作指令,所述指令集用于指示根据所述指令集中的所述动作指令对所述 第一处理规则对应的数据报文进行处理; 所述装置 600包括:
[277]生成单元 610, 用于生成规则修改信息;
[278]发送单元 620,用于向所述转发器发送所述生成单元 610生成的所述规则修改信 息; 所述规则修改信息包括规则描述匹配信息和动作指令修改信息,所述规则描述匹 配信息用于确定待修改的处理规则,所述待修改的处理规则的规则描述信息符合所述 规则描述匹配信息,所述动作指令修改信息用于指示对所述待修改的处理规则的指令 集中指定的动作指令进行修改;以便所述转发器确定所述第一处理规则的规则描述信 息满足所述规则描述匹配信息时,根据所述动作指令修改信息对所述第一处理规则的 指令集中指定的动作指令进行修改。
[279]可选地, 所述发送单元 620具体可以用于: 向转发器发送流修改 Flow_mod消 息, 所述 FlOW_mod消息中携带所述规则修改信息。
[280]本实施例中, 控制器向转发器发送规则修改信息, 所述规则修改信息包括规则 描述匹配信息和动作指令修改信息,所述规则描述匹配信息用于确定待修改的处理规 贝 U,所述待修改的处理规则的规则描述信息符合所述规则描述匹配信息,所述动作指 令修改信息用于指示对所述待修改的处理规则的指令集中指定的动作指令进行修改; 从而,对于规则描述信息满足所述规则描述匹配信息的每一个第一处理规则,转发器 根据所述动作指令修改信息对所述第一处理规则的指令集中指定的动作指令进行修 改。从而转发器不再仅使用类似于用 FlOW_mod消息携带的指令集完全替代流表项原 有的指令集的方式来实现第一处理规则的修改,而是可以对第一处理规则的指定动作 和 /或指定动作变量单独进行修改, 第一处理规则的修改方式灵活, 提高了控制器对 转发器中第一处理规则进行修改的效率; 而且,在仅需要修改第一处理规则的指令集 中部分动作指令的场景下,相对于现有技术可以通过相对较少的消息数量完成第一处 理规则的指令集中部分动作指令的修改,相对于现有技术减少了第一处理规则修改所 使用的消息数量, 从而减少了控制器和转发器之间通信资源的占用。
[281]参见图 7,为本发明实施例转发器结构示意图,该转发器 700包括:处理器 710、 存储器 720、 收发器 730和总线 740;
[282]处理器 710、 存储器 720、 收发器 730通过总线 740相互连接; 总线 740可以是 ISA总线、 PCI总线或 EISA总线等。 所述总线可以分为地址总线、 数据总线、 控制 总线等。 为便于表示, 图 7中仅用一条粗线表示, 但并不表示仅有一根总线或一种类 型的总线。
[283]存储器 720, 用于存放程序, 还用于存储第一处理规则, 所述第一处理规则包括 规则描述信息和指令集,所述规则描述信息用于标识第一处理规则,所述指令集包括 至少一个动作指令,所述指令集用于指示根据所述指令集中的所述动作指令对所述第 一处理规则对应的数据报文进行处理。 具体地, 程序可以包括程序代码, 所述程序代 码包括计算机操作指令。 存储器 720可能包含高速 RAM存储器, 也可能还包括非易 失性存储器 (non-volatile memory), 例如至少一个磁盘存储器。
[284]收发器 730用于连接其他设备, 并与其他设备进行通信。所述收发器 730, 用于 接收控制器发送的规则修改信息;所述规则修改信息包括规则描述匹配信息和动作指 令修改信息,所述规则描述匹配信息用于确定待修改的处理规则,所述待修改的处理 规则的规则描述信息符合所述规则描述匹配信息,所述动作指令修改信息用于指示对 所述待修改的处理规则的指令集中指定的动作指令进行修改;
[285]所述处理器 710执行所述程序代码, 用于确定所述第一处理规则的规则描述信 息满足所述收发器 730接收到的所述规则描述匹配信息时,根据所述收发器 730接收 到的所述动作指令修改信息对所述存储器 720 中存储的所述第一处理规则的指令集 中指定的动作指令进行修改。
[286]可选地, 所述动作指令修改信息可以包括: 动作指令匹配条件和修改操作信息; 其中,所述动作指令匹配条件用于确定待修改的动作指令,所述修改操作信息用于指 示对所述待修改的动作指令的修改操作;
[287]所述处理器 710具体可以用于: 根据所述动作指令匹配条件确定所述第一处理 规则的指令集中待修改的第一动作指令;根据所述修改操作信息对所述第一动作指令 进行修改。
[288]可选地, 所述动作指令匹配条件可以包括位置信息, 所述位置信息用于指示所 述待修改的动作指令在所述待修改的处理规则的指令集中的位置;
[289]所述处理器 710具体可以用于: 根据所述位置信息确定所述第一动作指令。
[290]可选地, 所述位置信息可以包括第一掩码, 所述第一掩码中每一掩码位的位置 对应所述待修改的处理规则的指令集中每一动作指令的位置;
[291]所述处理器 710具体可以用于: 确定所述第一掩码中具有第一预设数值的掩码 位; 根据所述具有第一预设数值的掩码位的位置确定所述第一动作指令。
[292]可选地, 所述位置信息可以包括修改指示列表, 所述修改指示列表包括修改指 示,所述修改指示列表中每一修改指示在所述修改指示列表中的位置对应所述待修改 的处理规则的指令集中每一动作指令的位置,所述修改指示用于指示是否修改动作指 令;
[293]所述处理器 710具体可以用于: 确定所述修改指示列表中用于指示修改动作指 令的修改指示;根据所述用于指示修改动作指令的修改指示在所述修改指示列表中所 在的第一位置, 确定所述第一动作指令。
[294]可选地, 所述动作指令匹配条件可以包括: 指令类型信息, 所述指令类型信息 用于指示所述待修改的动作指令的指令类型;
[295]所述处理器 710具体可以用于:根据所述指令类型信息确定所述第一动作指令。
[296]可选地, 所述修改操作信息可以包括: 新的动作指令;
[297]所述处理器 710具体可以用于:将所述第一动作指令修改为所述新的动作指令。
[298]可选地, 所述修改操作信息可以包括: 修改参数指示信息, 所述修改参数指示 信息用于指示对所述待修改的动作指令的动作变量进行修改;
[299]所述处理器 710具体可以用于: 根据所述修改参数指示信息对所述第一动作指 令的动作变量进行修改。
[300]可选地, 所述修改参数指示信息可以包括参数匹配条件和参数修改操作信息, 所述参数匹配条件用于确定所述待修改的动作指令中的待修改的动作变量,所述参数 修改操作信息用于指示对所述待修改的动作变量的修改;
[301]所述处理器 710具体可以用于: 根据所述参数匹配条件确定所述第一动作指令 中待修改的第一动作变量; 根据所述参数修改操作信息对所述第一动作变量进行修 改。
[302]可选地, 所述参数修改操作信息可以包括新的变量值;
[303]所述处理器 710具体可以用于: 将所述第一动作变量的变量值修改为所述新的 变量值。 [304]可选地, 所述参数修改操作信息可以包括运算方法信息, 所述运算方法信息用 于指示获取变量值的运算方法;
[305]所述处理器 710具体可以用于: 根据所述运算方法信息获取新的变量值; 将所 述第一动作变量的变量值修改为所述新的变量值。
[306]可选地, 所述收发器 730 具体可以用于: 接收控制器发送的流修改 FlOW_mod 消息, 所述 FlOW_mod消息中携带所述规则修改信息。
[307]本实施例中, 转发器接收控制器发送的规则修改信息; 所述规则修改信息包括 规则描述匹配信息和动作指令修改信息,所述规则描述匹配信息用于确定待修改的处 理规则,所述待修改的处理规则的规则描述信息符合所述规则描述匹配信息,所述动 作指令修改信息用于指示对所述待修改的处理规则的指令集中指定的动作指令进行 修改; 从而, 对于规则描述信息满足所述规则描述匹配信息的每一个第一处理规则, 转发器根据所述动作指令修改信息对所述第一处理规则的指令集中指定的动作指令 进行修改。从而转发器不再仅使用类似于用 FlOW_mod消息携带的指令集完全替代流 表项原有的指令集的方式来实现第一处理规则的修改,而是可以对第一处理规则的指 定动作和 /或指定动作变量单独进行修改, 第一处理规则的修改方式灵活, 提高了控 制器对转发器中第一处理规则进行修改的效率; 而且,在仅需要修改第一处理规则的 指令集中部分动作指令的场景下,相对于现有技术可以通过相对较少的消息数量完成 第一处理规则的指令集中部分动作指令的修改,相对于现有技术减少了第一处理规则 修改所使用的消息数量, 从而减少了控制器和转发器之间通信资源的占用。
[308]参见图 8,为本发明实施例控制器结构示意图,该控制器 800包括:处理器 810、 存储器 820、 收发器 830和总线 840;
[309]处理器 810、 存储器 820、 收发器 830通过总线 840相互连接; 总线 840可以是 ISA总线、 PCI总线或 EISA总线等。 所述总线可以分为地址总线、 数据总线、 控制 总线等。 为便于表示, 图 8中仅用一条粗线表示, 但并不表示仅有一根总线或一种类 型的总线。
[310]存储器 820, 用于存放程序。 具体地, 程序可以包括程序代码, 所述程序代码包 括计算机操作指令。 存储器 820可能包含高速 RAM存储器, 也可能还包括非易失性 存储器 (non- volatile memory), 例如至少一个磁盘存储器。
[311]所述处理器 810用于执行所述程序代码。
[312]收发器 830用于连接其他设备, 并与其他设备进行通信。所述收发器 830, 用于 向所述转发器发送规则修改信息;所述规则修改信息包括规则描述匹配信息和动作指 令修改信息,所述规则描述匹配信息用于确定待修改的处理规则,所述待修改的处理 规则的规则描述信息符合所述规则描述匹配信息,所述动作指令修改信息用于指示对 所述待修改的处理规则的指令集中指定的动作指令进行修改;以便所述转发器确定所 述第一处理规则的规则描述信息满足所述规则描述匹配信息时,根据所述动作指令修 改信息对所述第一处理规则的指令集中指定的动作指令进行修改;
[313]其中, 所述转发器上存有第一处理规则, 所述第一处理规则包括规则描述信息 和指令集,所述规则描述信息用于标识第一处理规则,所述指令集包括至少一个动作 指令,所述指令集用于指示根据所述指令集中的所述动作指令对所述第一处理规则对 应的数据报文进行处理。
[314]可选地, 所述收发器 830具体可以用于:
[315]向转发器发送 FlOW_mod消息, 所述 FlOW_mod消息中携带所述规则修改信息。
[316]可选地, 所述处理器 810还可以用于: 生成所述规则修改信息, 将生成的规则 修改信息发送给收发器 830。
[317]本实施例中, 控制器向转发器发送规则修改信息, 所述规则修改信息包括规则 描述匹配信息和动作指令修改信息,所述规则描述匹配信息用于确定待修改的处理规 贝 u,所述待修改的处理规则的规则描述信息符合所述规则描述匹配信息,所述动作指 令修改信息用于指示对所述待修改的处理规则的指令集中指定的动作指令进行修改; 从而,对于规则描述信息满足所述规则描述匹配信息的每一个第一处理规则,转发器 根据所述动作指令修改信息对所述第一处理规则的指令集中指定的动作指令进行修 改。从而转发器不再仅使用类似于用 FlOW_mod消息携带的指令集完全替代流表项原 有的指令集的方式来实现第一处理规则的修改,而是可以对第一处理规则的指定动作 和 /或指定动作变量单独进行修改, 第一处理规则的修改方式灵活, 提高了控制器对 转发器中第一处理规则进行修改的效率; 而且,在仅需要修改第一处理规则的指令集 中部分动作指令的场景下,相对于现有技术可以通过相对较少的消息数量完成第一处 理规则的指令集中部分动作指令的修改,相对于现有技术减少了第一处理规则修改所 使用的消息数量, 从而减少了控制器和转发器之间通信资源的占用。
[318]本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件加 必需的通用硬件平台的方式来实现。 基于这样的理解, 本发明实施例中的技术方 案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来, 该 计算机软件产品可以存储在存储介质中, 如 ROM/RAM、 磁碟、 光盘等, 包括若 干指令用以使得一台计算机设备(可以是个人计算机, 服务器, 或者网络设备等) 执行本发明各个实施例或者实施例的某些部分所述的方法。
[319]本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似 的部分互相参见即可, 每个实施例重点说明的都是与其他实施例的不同之处。 尤 其, 对于系统实施例而言, 由于其基本相似于方法实施例, 所以描述的比较简单, 相关之处参见方法实施例的部分说明即可。
[320]以上所述的本发明实施方式, 并不构成对本发明保护范围的限定。任何在本 发明的精神和原则之内所作的修改、 等同替换和改进等, 均应包含在本发明的保 护范围之内。

Claims

权 利 要 求
1、 一种处理规则的修改装置, 其特征在于, 所述修改装置上存有第一处理 规则,所述第一处理规则包括规则描述信息和指令集,所述规则描述信息用于标 识所述第一处理规则, 所述指令集包括至少一个动作指令, 所述指令集用于指 示根据所述指令集中的所述动作指令对所述第一处理规则对应的数据报文进行 处理; 所述装置包括:
接收单元, 用于接收控制器发送的规则修改信息; 所述规则修改信息包括规 则描述匹配信息和动作指令修改信息,所述规则描述匹配信息用于确定待修改的 处理规则, 所述待修改的处理规则的规则描述信息符合所述规则描述匹配信息, 所述动作指令修改信息用于指示对所述待修改的处理规则的指令集中指定的动 作指令进行修改;
修改单元,用于确定所述第一处理规则的规则描述信息满足所述接收单元接 收到的所述规则描述匹配信息时,根据所述接收单元接收到的所述动作指令修改 信息对所述第一处理规则的指令集中指定的动作指令进行修改。
2、 根据权利要求 1所述的装置, 其特征在于, 所述动作指令修改信息包括: 动作指令匹配条件和修改操作信息; 其中, 所述动作指令匹配条件用于确定待修 改的动作指令, 所述修改操作信息用于指示对所述待修改的动作指令的修改操 作;
所述修改单元包括:
指令确定子单元,用于确定所述第一处理规则的规则描述信息满足所述接收 单元接收到的所述规则描述匹配信息时,根据所述动作指令匹配条件确定所述第 一处理规则的指令集中待修改的第一动作指令;
修改子单元, 用于根据所述修改操作信息对所述第一动作指令进行修改。
3、 根据权利要求 2所述的装置, 其特征在于, 所述动作指令匹配条件包括 位置信息,所述位置信息用于指示所述待修改的动作指令在所述待修改的处理规 则的指令集中的位置;
所述指令确定子单元具体用于:确定所述第一处理规则的规则描述信息满足 所述接收单元接收到的所述规则描述匹配信息时,根据所述位置信息确定所述第 一动作指令。
4、 根据权利要求 3所述的装置, 其特征在于, 所述位置信息包括第一掩码, 所述第一掩码中每一掩码位的位置对应所述待修改的处理规则的指令集中每一 动作指令的位置;
所述指令确定子单元具体用于:确定所述第一处理规则的规则描述信息满足 所述接收单元接收到的所述规则描述匹配信息时,确定所述第一掩码中具有第一 预设数值的掩码位;根据所述具有第一预设数值的掩码位的位置确定所述第一动 作指令。
5、 根据权利要求 3所述的装置, 其特征在于, 所述位置信息包括修改指示 列表, 所述修改指示列表包括修改指示, 所述修改指示列表中每一修改指示在所 述修改指示列表中的位置对应所述待修改的处理规则的指令集中每一动作指令 的位置, 所述修改指示用于指示是否修改动作指令;
所述指令确定子单元具体用于:确定所述第一处理规则的规则描述信息满足 所述接收单元接收到的所述规则描述匹配信息时,确定所述修改指示列表中用于 指示修改动作指令的修改指示;根据所述用于指示修改动作指令的修改指示在所 述修改指示列表中所在的第一位置,确定与所述第一位置对应的所述第一动作指 令。
6、 根据权利要求 2所述的装置, 其特征在于, 所述动作指令匹配条件包括: 指令类型信息, 所述指令类型信息用于指示所述待修改的动作指令的指令类型; 所述指令确定子单元具体用于:确定所述第一处理规则的规则描述信息满足 所述接收单元接收到的所述规则描述匹配信息时,根据所述指令类型信息确定所 述第一动作指令。
7、 根据权利要求 2至 6任一项所述的装置, 其特征在于, 所述修改操作信 息包括: 新的动作指令;
所述修改子单元具体用于: 将所述第一动作指令修改为所述新的动作指令。
8、 根据权利要求 2至 6任一项所述的装置, 其特征在于, 所述修改操作信 息包括: 修改参数指示信息, 所述修改参数指示信息用于指示对所述待修改的动 作指令的动作变量进行修改;
所述修改子单元具体用于:根据所述修改参数指示信息对所述第一动作指令 的动作变量进行修改。
9、 根据权利要求 8所述的装置, 其特征在于, 所述修改参数指示信息包括 参数匹配条件和参数修改操作信息,所述参数匹配条件用于确定所述待修改的动 作指令中的待修改的动作变量,所述参数修改操作信息用于指示对所述待修改的 动作变量的修改;
所述修改子单元包括: 确定模块,用于根据所述参数匹配条件确定所述第一动作指令中待修改的第 一动作变量;
修改模块, 用于根据所述参数修改操作信息对所述第一动作变量进行修改。
10、 根据权利要求 9 所述的装置, 其特征在于, 所述参数修改操作信息包 括新的变量值;
所述修改模块具体用于:将所述第一动作变量的变量值修改为所述新的变量 值。
11、 根据权利要求 9所述的装置, 其特征在于, 所述参数修改操作信息包括 运算方法信息, 所述运算方法信息用于指示获取变量值的运算方法;
所述修改模块具体用于:
根据所述运算方法信息获取新的变量值;
将所述第一动作变量的变量值修改为所述新的变量值。
12、 根据权利要求 1至 11任一项所述的装置, 其特征在于, 所述接收单元 具体用于: 接收控制器发送的流修改 FlOW_mod消息, 所述 FlOW_mod消息中携 带所述规则修改信息。
13、 一种处理规则的修改装置, 其特征在于, 该装置适用于与转发器进行通 信的控制器, 所述转发器上存有第一处理规则, 所述第一处理规则包括规则描述 信息和指令集, 所述规则描述信息用于标识所述第一处理规则, 所述指令集包 括至少一个动作指令,所述指令集用于指示根据所述指令集中的所述动作指令对 所述第一处理规则对应的数据报文进行处理; 所述装置包括:
生成单元, 用于生成规则修改信息;
发送单元, 用于向所述转发器发送所述生成单元生成的所述规则修改信息; 所述规则修改信息包括规则描述匹配信息和动作指令修改信息,所述规则描述匹 配信息用于确定待修改的处理规则,所述待修改的处理规则的规则描述信息符合 所述规则描述匹配信息,所述动作指令修改信息用于指示对所述待修改的处理规 则的指令集中指定的动作指令进行修改;以便所述转发器确定所述第一处理规则 的规则描述信息满足所述规则描述匹配信息时,根据所述动作指令修改信息对所 述第一处理规则的指令集中指定的动作指令进行修改。
14、 根据权利要求 13所述的装置, 其特征在于, 所述发送单元具体用于: 向转发器发送流修改 Flow_mod消息, 所述 Flow_mod消息中携带所述规则修改 信息。
15、 一种处理规则的修改方法, 其特征在于, 适用于转发器, 所述转发器上 存有第一处理规则, 所述第一处理规则包括规则描述信息和指令集, 所述规则描 述信息用于标识所述第一处理规则, 所述指令集包括至少一个动作指令, 所述 指令集用于指示根据所述指令集中的所述动作指令对所述第一处理规则对应的 数据报文进行处理; 所述方法包括:
所述转发器接收控制器发送的规则修改信息;所述规则修改信息包括规则描 述匹配信息和动作指令修改信息,所述规则描述匹配信息用于确定待修改的处理 规则, 所述待修改的处理规则的规则描述信息符合所述规则描述匹配信息, 所述 动作指令修改信息用于指示对所述待修改的处理规则的指令集中指定的动作指 令进行修改;
当所述转发器确定所述第一处理规则的规则描述信息满足所述规则描述匹 配信息时,所述转发器根据所述动作指令修改信息对所述第一处理规则的指令集 中指定的动作指令进行修改。
16、 根据权利要求 15所述的方法, 其特征在于, 所述动作指令修改信息包 括: 动作指令匹配条件和修改操作信息; 其中, 所述动作指令匹配条件用于确定 待修改的动作指令,所述修改操作信息用于指示对所述待修改的动作指令的修改 操作;
所述转发器根据所述动作指令修改信息对所述第一处理规则的指令集中指 定的动作指令进行修改, 包括:
所述转发器根据所述动作指令匹配条件确定所述第一处理规则的指令集中 待修改的第一动作指令;
所述转发器根据所述修改操作信息对所述第一动作指令进行修改。
17、 根据权利要求 16所述的方法, 其特征在于, 所述动作指令匹配条件包 括位置信息,所述位置信息用于指示所述待修改的动作指令在所述待修改的处理 规则的指令集中的位置;
所述转发器根据所述动作指令匹配条件确定所述第一处理规则的指令集中 待修改的第一动作指令包括:
所述转发器根据所述位置信息确定所述第一动作指令。
18、 根据权利要求 17所述的方法, 其特征在于, 所述位置信息包括第一掩 码,所述第一掩码中每一掩码位的位置对应所述待修改的处理规则的指令集中每 一动作指令的位置; 所述转发器根据所述位置信息确定所述第一动作指令包括: 所述转发器确定所述第一掩码中具有第一预设数值的掩码位;
所述转发器根据所述具有第一预设数值的掩码位的位置确定所述第一动作 指令。
19、 根据权利要求 17所述的方法, 其特征在于, 所述位置信息包括修改指 示列表, 所述修改指示列表包括修改指示, 所述修改指示列表中每一修改指示在 所述修改指示列表中的位置对应所述待修改的处理规则的指令集中每一动作指 令的位置, 所述修改指示用于指示是否修改动作指令;
所述转发器根据所述位置信息确定所述第一动作指令包括:
所述转发器确定所述修改指示列表中用于指示修改动作指令的修改指示;所 述转发器根据所述用于指示修改动作指令的修改指示在所述修改指示列表中所 在的第一位置, 确定所述第一动作指令。
20、 根据权利要求 16所述的方法, 其特征在于, 所述动作指令匹配条件包 括: 指令类型信息, 所述指令类型信息用于指示所述待修改的动作指令的指令类 型;
所述转发器根据所述动作指令匹配条件确定所述第一处理规则的指令集中 待修改的第一动作指令包括:
所述转发器根据所述指令类型信息确定所述第一动作指令。
21、 根据权利要求 16至 20任一项所述的方法, 其特征在于, 所述修改操作 信息包括: 新的动作指令;
所述转发器根据所述修改操作信息对所述第一动作指令进行修改包括: 所述转发器将所述第一动作指令修改为所述新的动作指令。
22、 根据权利要求 16至 20任一项所述的方法, 其特征在于, 所述修改操作 信息包括: 修改参数指示信息, 所述修改参数指示信息用于指示对所述待修改的 动作指令的动作变量进行修改;
所述转发器根据所述修改操作信息对所述第一动作指令进行修改包括: 所述转发器根据所述修改参数指示信息对所述第一动作指令的动作变量进 行修改。
23、 根据权利要求 22所述的方法, 其特征在于, 所述修改参数指示信息包 括参数匹配条件和参数修改操作信息,所述参数匹配条件用于确定所述待修改的 动作指令中的待修改的动作变量,所述参数修改操作信息用于指示对所述待修改 的动作变量的修改; 所述转发器根据所述修改参数指示信息对所述第一动作指令的参数进行修 改包括:
所述转发器根据所述参数匹配条件确定所述第一动作指令中待修改的第一 动作变量;
所述转发器根据所述参数修改操作信息对所述第一动作变量进行修改。
24、 根据权利要求 23所述的方法, 其特征在于, 所述参数修改操作信息包 括新的变量值;
所述转发器根据所述参数修改操作信息对所述第一动作变量进行修改包括: 所述转发器将所述第一动作变量的变量值修改为所述新的变量值。
25、 根据权利要求 23所述的方法, 其特征在于, 所述参数修改操作信息包 括运算方法信息, 所述运算方法信息用于指示获取变量值的运算方法;
所述转发器根据所述参数修改操作信息对所述第一动作变量进行修改包括: 所述转发器根据所述运算方法信息获取新的变量值;
所述转发器将所述第一动作变量的变量值修改为所述新的变量值。
26、 根据权利要求 15至 25任一项所述的方法, 其特征在于, 所述转发器接 收控制器发送的规则修改信息包括:
所述转发器接收控制器发送的流修改 FlOW_mod消息, 所述 FlOW_mod消息 中携带所述规则修改信息。
27、 一种处理规则的修改方法, 其特征在于, 该方法适用于与转发器进行通 信的控制器, 所述转发器上存有第一处理规则, 所述第一处理规则包括规则描述 信息和指令集, 所述规则描述信息用于标识所述第一处理规则, 所述指令集包 括至少一个动作指令,所述指令集用于指示根据所述指令集中的所述动作指令对 所述第一处理规则对应的数据报文进行处理; 所述方法包括:
所述控制器向所述转发器发送规则修改信息;所述规则修改信息包括规则描 述匹配信息和动作指令修改信息,所述规则描述匹配信息用于确定待修改的处理 规则, 所述待修改的处理规则的规则描述信息符合所述规则描述匹配信息, 所述 动作指令修改信息用于指示对所述待修改的处理规则的指令集中指定的动作指 令进行修改;以便所述转发器确定所述第一处理规则的规则描述信息满足所述规 则描述匹配信息时,根据所述动作指令修改信息对所述第一处理规则的指令集中 指定的动作指令进行修改。
28、 根据权利要求 27所述的方法, 其特征在于, 所述控制器向所述转发器 发送规则修改信息包括:
所述控制器向所述发送流修改 FlOW_mod消息, 所述 FlOW_mod消息中携带 所述规则修改信息。
29、 根据权利要求 27或 28所述的方法, 其特征在于, 所述控制器向所述转 发器发送规则修改信息之前, 还包括:
所述控制器生成所述规则修改信息。
PCT/CN2014/071609 2014-01-28 2014-01-28 处理规则的修改方法、装置及设备 WO2015113191A1 (zh)

Priority Applications (8)

Application Number Priority Date Filing Date Title
ES14880996T ES2719541T3 (es) 2014-01-28 2014-01-28 Procedimiento y aparato de modificación de reglas de procesamiento
EP14880996.5A EP3091708B1 (en) 2014-01-28 2014-01-28 Processing rule modification method and apparatus
EP18214531.8A EP3531653B1 (en) 2014-01-28 2014-01-28 Processing rule modification method, apparatus and device
CN201480000147.9A CN105103516B (zh) 2014-01-28 2014-01-28 处理规则的修改方法、装置及设备
CN201810312364.1A CN108777629B (zh) 2014-01-28 2014-01-28 处理规则的修改方法、装置及设备
PCT/CN2014/071609 WO2015113191A1 (zh) 2014-01-28 2014-01-28 处理规则的修改方法、装置及设备
US15/222,777 US9985878B2 (en) 2014-01-28 2016-07-28 Processing rule modification method, apparatus and device
US15/965,217 US10715426B2 (en) 2014-01-28 2018-04-27 Processing rule modification method, apparatus and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2014/071609 WO2015113191A1 (zh) 2014-01-28 2014-01-28 处理规则的修改方法、装置及设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/222,777 Continuation US9985878B2 (en) 2014-01-28 2016-07-28 Processing rule modification method, apparatus and device

Publications (1)

Publication Number Publication Date
WO2015113191A1 true WO2015113191A1 (zh) 2015-08-06

Family

ID=53756088

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/071609 WO2015113191A1 (zh) 2014-01-28 2014-01-28 处理规则的修改方法、装置及设备

Country Status (5)

Country Link
US (2) US9985878B2 (zh)
EP (2) EP3531653B1 (zh)
CN (2) CN108777629B (zh)
ES (1) ES2719541T3 (zh)
WO (1) WO2015113191A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114579056A (zh) * 2022-03-11 2022-06-03 联想开天科技有限公司 一种系统的分区方法、装置及电子设备

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108809835A (zh) 2012-06-29 2018-11-13 华为技术有限公司 信息处理方法、转发面设备和控制面设备
WO2015113191A1 (zh) * 2014-01-28 2015-08-06 华为技术有限公司 处理规则的修改方法、装置及设备
CN108476179A (zh) * 2015-12-17 2018-08-31 慧与发展有限责任合伙企业 简化的正交网络策略集选择
CN109150752B (zh) * 2017-06-16 2023-02-10 华为技术有限公司 缓存控制方法、网元及控制器
WO2020027181A1 (ja) * 2018-08-01 2020-02-06 日本電気株式会社 スイッチ、制御装置、通信システム、通信制御方法及びプログラム
US10812507B2 (en) 2018-12-15 2020-10-20 KnowBe4, Inc. System and methods for efficient combining of malware detection rules
CN113765857B (zh) * 2020-06-04 2022-10-25 华为技术有限公司 报文转发方法、装置、设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110317701A1 (en) * 2010-01-05 2011-12-29 Nec Corporation Communication system, control device, processing rule setting method, packet transmission method, and program
US20130088967A1 (en) * 2010-06-08 2013-04-11 Nec Corporation Communication system, control apparatus, packet capture method and packet capture program
CN103051629A (zh) * 2012-12-24 2013-04-17 华为技术有限公司 一种基于软件定义网络中数据处理的系统、方法和节点
CN103428094A (zh) * 2013-08-12 2013-12-04 杭州华三通信技术有限公司 开放流OpenFlow系统中的报文转发方法及装置

Family Cites Families (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5740533A (en) * 1996-06-03 1998-04-14 Motorola, Inc. Congestion control system and method for efficient multi-frequency messaging
DE60031515T2 (de) * 1999-03-17 2007-08-23 Broadcom Corp., Irvine Netzwerkvermittlung
US7058424B2 (en) * 2004-01-20 2006-06-06 Lucent Technologies Inc. Method and apparatus for interconnecting wireless and wireline networks
US7525958B2 (en) * 2004-04-08 2009-04-28 Intel Corporation Apparatus and method for two-stage packet classification using most specific filter matching and transport level sharing
US8346918B2 (en) * 2005-08-19 2013-01-01 Cpacket Networks, Inc. Apparatus and method for biased and weighted sampling of network traffic to facilitate network monitoring
US20080256095A1 (en) * 2007-04-10 2008-10-16 Apertio Limited Adaptation in network data repositories
US20090092136A1 (en) * 2007-10-09 2009-04-09 Broadcom Corporation System and method for packet classification, modification and forwarding
US20090126020A1 (en) * 2007-11-09 2009-05-14 Norton Richard Elliott Engine for rule based content filtering
US8806630B2 (en) * 2008-05-13 2014-08-12 At&T Intellectual Property, I, L.P. Methods and apparatus for intrusion protection in systems that monitor for improper network usage
US20100179995A1 (en) 2009-01-12 2010-07-15 Yahoo! Inc. Instant message forwarding to selectable accounts
US8266673B2 (en) * 2009-03-12 2012-09-11 At&T Mobility Ii Llc Policy-based privacy protection in converged communication networks
US8627448B2 (en) * 2010-11-02 2014-01-07 Jose Renato Santos Selective invalidation of packet filtering results
IL210897A (en) * 2011-01-27 2017-12-31 Verint Systems Ltd Systems and methods for managing traffic flow table
US9521079B2 (en) * 2012-09-24 2016-12-13 Hewlett Packard Enterprise Development Lp Packet forwarding between packet forwarding elements in a network device
US9071529B2 (en) * 2012-10-08 2015-06-30 Telefonaktiebolaget L M Ericsson (Publ) Method and apparatus for accelerating forwarding in software-defined networks
CN102946325B (zh) * 2012-11-14 2015-06-03 中兴通讯股份有限公司 一种基于软件定义网络的网络诊断方法、系统及设备
JP6752141B2 (ja) * 2013-06-14 2020-09-09 華為技術有限公司Huawei Technologies Co.,Ltd. パケットを処理するための方法およびフォワーダ
WO2015113191A1 (zh) * 2014-01-28 2015-08-06 华为技术有限公司 处理规则的修改方法、装置及设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110317701A1 (en) * 2010-01-05 2011-12-29 Nec Corporation Communication system, control device, processing rule setting method, packet transmission method, and program
US20130088967A1 (en) * 2010-06-08 2013-04-11 Nec Corporation Communication system, control apparatus, packet capture method and packet capture program
CN103051629A (zh) * 2012-12-24 2013-04-17 华为技术有限公司 一种基于软件定义网络中数据处理的系统、方法和节点
CN103428094A (zh) * 2013-08-12 2013-12-04 杭州华三通信技术有限公司 开放流OpenFlow系统中的报文转发方法及装置

Non-Patent Citations (1)

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

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114579056A (zh) * 2022-03-11 2022-06-03 联想开天科技有限公司 一种系统的分区方法、装置及电子设备
CN114579056B (zh) * 2022-03-11 2023-08-08 联想开天科技有限公司 一种系统的分区方法、装置及电子设备

Also Published As

Publication number Publication date
US10715426B2 (en) 2020-07-14
ES2719541T3 (es) 2019-07-11
EP3531653B1 (en) 2021-03-10
EP3091708B1 (en) 2019-01-23
CN108777629A (zh) 2018-11-09
US20160337250A1 (en) 2016-11-17
CN105103516B (zh) 2018-06-26
CN105103516A (zh) 2015-11-25
EP3531653A1 (en) 2019-08-28
CN108777629B (zh) 2021-08-20
EP3091708A4 (en) 2016-12-28
EP3091708A1 (en) 2016-11-09
US20180248789A1 (en) 2018-08-30
US9985878B2 (en) 2018-05-29

Similar Documents

Publication Publication Date Title
WO2015113191A1 (zh) 处理规则的修改方法、装置及设备
US11792046B2 (en) Method for generating forwarding information, controller, and service forwarding entity
US11539626B2 (en) Method, apparatus, and system for load balancing of service chain
US10644941B2 (en) System and method for a software defined protocol network node
US9110703B2 (en) Virtual machine packet processing
JP2019500822A (ja) 仮想マシンパケット制御
WO2015101119A1 (zh) 一种流表匹配的方法、装置和OpenFlow交换系统
WO2014023003A1 (zh) 控制数据传输的方法、装置和系统
WO2018001373A1 (zh) 报文限速的方法及装置
US20130275620A1 (en) Communication system, control apparatus, communication method, and program
EP3718269B1 (en) Packet value based packet processing
WO2019033891A1 (zh) 一种基于rdma的网络流量确定方法及装置
JP5534033B2 (ja) 通信システム、ノード、パケット転送方法およびプログラム
US20200028779A1 (en) Packet processing method and apparatus
US20160134522A1 (en) Data flow processing method, device, and system
CN109818882B (zh) 一种执行QoS策略的方法及装置
KR101469244B1 (ko) 수신된 데이터에서의 불필요한 패킷 제거 장치 및 방법
WO2015052870A1 (ja) 端末装置、端末装置制御方法、および端末装置制御プログラム
CN111555977B (zh) 一种业务处理的方法、装置及系统
KR20110071833A (ko) 가상화 지원 네트워크 장치

Legal Events

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

Ref document number: 201480000147.9

Country of ref document: CN

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

Ref document number: 14880996

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2014880996

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 2014880996

Country of ref document: EP