WO2019174578A1 - Method and device for sending packet matching information, method and device for receiving packet matching information, storage medium and electronic device - Google Patents

Method and device for sending packet matching information, method and device for receiving packet matching information, storage medium and electronic device Download PDF

Info

Publication number
WO2019174578A1
WO2019174578A1 PCT/CN2019/077852 CN2019077852W WO2019174578A1 WO 2019174578 A1 WO2019174578 A1 WO 2019174578A1 CN 2019077852 W CN2019077852 W CN 2019077852W WO 2019174578 A1 WO2019174578 A1 WO 2019174578A1
Authority
WO
WIPO (PCT)
Prior art keywords
matching information
switch
openflow
controller
openflow switch
Prior art date
Application number
PCT/CN2019/077852
Other languages
French (fr)
Chinese (zh)
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 中兴通讯股份有限公司
Publication of WO2019174578A1 publication Critical patent/WO2019174578A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/52Multiprotocol routers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • 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/24Negotiation of communication capabilities

Definitions

  • the present disclosure relates to the field of communications, for example, to a method and device for transmitting message matching information, a method and device for receiving message matching information, a storage medium, and an electronic device.
  • FIG. 1 is a schematic diagram of an OF network component architecture.
  • the control plane of the OF network is implemented by the OF controller
  • the forwarding plane of the OF network is implemented by the OF switch
  • the OF protocol is run between the OF controller and the OF switch.
  • the OF controller uses the OF protocol to send a flow table (Flow Table) and a group table (Group Table) to the OF switch, thereby achieving the purpose of controlling data forwarding, and realizing the separation of the control plane and the forwarding plane.
  • Flow Table flow table
  • Group Table group table
  • the OF switch specification developed by the Open Networking Foundation defines three types of messages that interact between the OF controller and the OF switch: messages from the OF controller to the OF switch, asynchronous messages, and symmetric messages.
  • the asynchronous message includes a packet-sending message (packet-in message), and the function of the message is to send the data packet to be sent and the related pipeline information processed by the pipeline to the OF controller.
  • the packet-in message defined by the OF protocol includes the following types of information: (1) Pipeline processing related information, including the flow table identification number (Identification, ID) of the query, the identifier (cookie) of the flow entry, and the delivery. Reasons, etc.; (2) Data message related information, including message matching information, message length, and message content.
  • the protocol describes that the packet matching information includes two types. One type is the pipeline matching field information. The matching information cannot be obtained by parsing the data packet, for example, the inbound port number of the received data packet.
  • the matching information sent by the protocol includes the pipeline matching information supported by all devices, and the matching information does not have a value of 0.
  • the other type is the matching information related to the content of the data packet.
  • the information can be obtained by parsing the data packet, such as Layer 2 Media Access Control (MAC) address information and Layer 3 Internet Protocol (IP) address. Information, four-layer port number information, and more.
  • MAC Layer 2 Media Access Control
  • IP Internet Protocol
  • Information four-layer port number information, and more.
  • the protocol describes that these matching information is optionally supported, and given the efficiency of sending packet-in messages, most switches should not include these matching information. Thus, the OF controller should not rely on these matching information and should parse the data packet extraction itself.
  • Some problems caused by the above constraints of the protocol on the matching information include: (1) limiting the flexibility of sending matching information, such as forcing all pipeline matching information to be sent, not according to the capabilities or service requirements of the device itself. Flexible selection and delivery; (2) will lead to some interoperability and compatibility issues; for example, the device sends a pipeline matching field that is not supported by different vendors, causing problems in docking; or the device upgrade supports sending a new pipeline matching field. The connection to the previous controller is faulty and the upgrade fails.
  • An embodiment of the present disclosure provides a method and device for transmitting message matching information, a method and device for receiving message matching information, a storage medium, and an electronic device, to at least solve the OpenFlow switch and the OpenFlow controller existing in the related art. Interoperability and compatibility issues.
  • a method for sending message matching information is provided, which is applied to an OpenFlow switch, including: extracting a message received from the OpenFlow switch according to a matching information instruction, and extracting the OpenFlow switch.
  • a method for receiving message matching information is further provided, which is applied to an OpenFlow controller, including: after the OpenFlow controller and the OpenFlow switch perform matching information support capability negotiation Sending a matching information instruction to the open flow switch;
  • a device for sending message matching information which is applied to an OpenFlow switch, and includes: an extracting module, configured to extract a message received from the OpenFlow switch according to a matching information instruction.
  • a device for sending message matching information which is applied to an OpenFlow controller, includes:
  • a sending module configured to send a matching information instruction to the OpenFlow switch after the OpenFlow controller and the OpenFlow switch perform the matching information support capability negotiation
  • a receiving module configured to receive first matching information sent by the OpenFlow switch, where the first matching information is extracted by the OpenFlow switch from the received message according to the matching information instruction Match information corresponding to the received message.
  • a storage medium having stored therein a computer program, wherein the computer program is configured to execute the method of any of the above embodiments at runtime.
  • an electronic device comprising a memory and a processor, wherein the memory stores a computer program, the processor being configured to execute the computer program to perform any of the above implementations The method described in the example.
  • FIG. 1 is a schematic diagram of an OF network component architecture in accordance with an embodiment of the present disclosure
  • FIG. 2 is an interaction diagram of a method for transmitting message matching information according to an embodiment of the present disclosure
  • FIG. 4 is a timing diagram of an OF controller and OF switch matching information capability negotiation according to an embodiment of the present disclosure
  • FIG. 5 is a schematic diagram of a flow table of an OF controller carrying a matching information instruction according to an embodiment of the present disclosure
  • FIG. 6 is a schematic diagram of a flow table for carrying an instruction to carry matching information by another OF controller according to an embodiment of the present disclosure
  • FIG. 7 is a timing diagram of another OF controller and OF switch matching information capability negotiation according to an embodiment of the present disclosure.
  • FIG. 8 is a timing diagram of still another OF controller and OF switch matching information capability negotiation according to an embodiment of the present disclosure
  • FIG. 10 is a structural block diagram of an apparatus for transmitting message matching information according to an embodiment of the present disclosure.
  • FIG. 11 is a structural block diagram of an apparatus for receiving message matching information according to an embodiment of the present disclosure.
  • FIG. 12 is a structural block diagram of an electronic device according to an embodiment of the present disclosure.
  • FIG. 2 is an interaction diagram of a method for sending message matching information according to an embodiment of the present disclosure. As shown in FIG. 2, the interaction includes step 202. Go to step 204.
  • step 202 the first matching information corresponding to the packet received by the OpenFlow switch is extracted according to the matching information command, and the matching information command is in the An instruction indicated by the OpenFlow controller after the OpenFlow switch and the OpenFlow controller negotiate the matching information support capability;
  • step 204 the extracted first matching information is sent to the open flow controller.
  • the OpenFlow switch may be referred to as an OF switch in the present disclosure, and may be referred to as an OpenFlow switch directly.
  • the OpenFlow controller may be referred to as an OF controller, or may be directly referred to as an open switch. Flow controller).
  • FIG. 2 is an example in which the OpenFlow switch performs the above operations as an example.
  • the matching information instruction is indicated by the OpenFlow controller after the OpenFlow switch and the OpenFlow controller perform the matching information support capability negotiation, and the first matching information is in accordance with the matching information command.
  • the extracted matching information corresponding to the received message therefore, the first matching information sent to the OpenFlow controller is to satisfy the interoperability and compatibility between the OpenFlow switch and the OpenFlow controller. Therefore, the problem of interoperability and compatibility between the OpenFlow switch and the OpenFlow controller in the related art can be solved, and the interconnection and interworking between the OpenFlow switch and the OpenFlow controller can be ensured.
  • the method further includes: the OpenFlow switch Performing the matching information support capability negotiation with the OpenFlow controller by: receiving a negotiation request message from the OpenFlow controller, where the negotiation request message is used to request the OpenFlow switch to The matched matching information is reported to the OpenFlow controller. If the OpenFlow switch supports the sending of the matching information, the matching information supported by the OpenFlow switch is sent to the OpenFlow controller according to the foregoing negotiation request message. Instructing the OpenFlow controller to determine matching information supported by the OpenFlow switch and the OpenFlow controller according to the matching information supported by the OpenFlow switch and the matching information supported by the OpenFlow controller. .
  • the OF controller and the OF switch can actively initiate an OFMPP_TABLE_FEAUTRES request to query the flow table capability of the OF switch (corresponding to the matching information supported by the switch in this embodiment).
  • the OF switch reports the flow table capability supported by the device (that is, the OF switch) to the OF controller through the OFMP_TABLE_FEAUTRES response message.
  • the flow table capability includes the ability to send message matching information supported by the device.
  • the OF controller compares the packet matching information capability in the response message with the locally supported packet matching information capability (corresponding to the matching information supported by the OpenFlow controller in this embodiment).
  • the principle of negotiation is to determine whether the two have the common ability to match information. If the two have the common ability to match information, the negotiation can be successful, and the matching information capability after negotiation is the intersection of the two (corresponding to the open in this embodiment). Matching information supported by both the flow switch and the open flow controller). If the two do not have a common ability to match information, the negotiation fails. If the negotiation is successful, the subsequent OF controller can send the packet matching information to the packet to match the packet matching information sent by the packet-in message. If the negotiation fails, the OF controller can perform related operations based on the local policy. For example, the current OF channel connection can be selected to be closed, and the specific policy can be defined by the OF controller.
  • the method further includes: receiving a first flow table from the OpenFlow controller, where the OpenFlow controller supports In the case that the matching information is sent, the first predetermined message of the first flow table carries the matching information command; and the first predetermined message that is determined to be extended in the first flow table carries the matching information.
  • the OF controller may adopt an extended experiment message (corresponding to the extended first predetermined message of the first flow table in this embodiment, and of course, other messages or other fields in the extended flow table may also be adopted.
  • the OF switch receives the flow table that carries the message matching information command sent by the OF controller (corresponding to the embodiment in this embodiment) In the first flow table, the validity check of the capability of the matching information is first performed.
  • the second flow table carries the matching information instruction in the extended second predetermined message of the forwarding entry.
  • the subsequent data packet will be sent to the controller according to the matching information set in the instruction.
  • the related OF pipeline supports multi-level flow table operations, data packets are sent to the controller after being processed by multi-level flow entries. During this period, each time the flow entry is processed, the relevant matching information is stored in the uploading set according to the corresponding matching information instruction. After the pipeline processing ends, if the data packet is finally sent to the controller, this The matching information in the sent collection is organized and sent together.
  • the method before the first matching information corresponding to the packet received by the OpenFlow switch is extracted from the packet received by the OpenFlow switch according to the matching information, the method further includes: The matching information instruction is obtained in the second predetermined message extended in the second flow table.
  • the matching information instruction is implemented by using an extended message, and the OF switch obtains the matching information instruction in the extended message in the locally generated forwarding list item.
  • the method further includes: the matching information supported by the OpenFlow switch does not include the matching information indicated by the matching information instruction. In case, the error response message is replied to the open flow controller.
  • the matching information carried in the flow table (corresponding to the first flow table in this embodiment) exceeds the local support range, or the matching information support capability negotiation between the OpenFlow switch and the OpenFlow controller fails, Refusing to add the flow entry, the OF controller can perform related operations based on the local policy. For example, the current OF channel connection can be closed. The specific policy can be defined by the OF controller and an error message is returned to the OF controller.
  • the method further comprises: receiving, from the OpenFlow controller, if the OpenFlow switch does not support matching information transmission The first flow table, wherein the first flow table does not carry the matching information instruction; the second matching information corresponding to the message is extracted according to a first predetermined default processing manner, and the second matching information is Sent to the open flow controller.
  • the OF controller is required to not send the flow entry carrying the matching information command to the OF switches.
  • the OF switch sends a data packet to the controller, the second matching information is selected and sent according to the default implementation of the OF switch.
  • the method further includes: receiving a first flow table from the open flow controller, where the open flow controller does not If the matching information instruction is sent, the first flow table does not carry the matching information command; and if the first flow table does not carry the matching information command, according to the second predetermined default
  • the processing manner extracts third matching information corresponding to the packet, and sends the third matching information to the OpenFlow controller.
  • the OF switch sends a data packet to the OF controller, the corresponding flow entry is not carried. If the matching information command is used, the third matching information is selected and sent according to the default implementation of the OF switch.
  • the OpenFlow switch extracts, according to the matching information instruction, the first matching information corresponding to the packet received by the OpenFlow switch, and the OpenFlow switch extracts the packet received by the OpenFlow switch.
  • the first matching information is sent to the open flow controller.
  • FIG. 3 is an interaction diagram of a method for receiving message matching information according to an embodiment of the present disclosure. As shown in FIG. 3, the interaction includes The following steps 302 to 304 are performed.
  • step 302 after the open flow controller and the open flow switch perform the matching information support capability negotiation, the matching information command is sent to the open flow switch.
  • step 304 the first matching information sent by the OpenFlow switch is received, where the first matching information is extracted by the OpenFlow switch from the received message according to the matching information instruction. Match information corresponding to the received message.
  • the matching information command is used by the OpenFlow switch to extract, according to the matching information command, a packet received from the OpenFlow switch according to the matching information command, corresponding to the packet, after receiving the packet. First matching information, and transmitting the first matching information to the OpenFlow controller.
  • the OpenFlow controller may be referred to as an OF controller in the present disclosure, and may also be referred to as an OpenFlow controller directly.
  • the OpenFlow switch may be referred to as an OF switch, or may be directly referred to as an OpenFlow controller.
  • FIG. 3 is an example in which the open flow controller performs the above operation as an example.
  • the OpenFlow controller sends a matching information command to the OpenFlow switch, so that the OpenFlow switch can follow the matching information command.
  • the packet received by the OpenFlow switch extracts the matching information corresponding to the received packet. Therefore, the first matching information received by the OpenFlow controller meets the interworking between the OpenFlow switch and the OpenFlow controller. Sex and compatibility. Therefore, the problem of interoperability and compatibility between the OpenFlow switch and the OpenFlow controller in the related art can be solved, and the interconnection and interworking between the OpenFlow switch and the OpenFlow controller can be ensured.
  • the OpenFlow controller performs the matching information support capability negotiation with the OpenFlow switch, and includes: sending a negotiation request message to the OpenFlow switch, where the negotiation request message is used to request the The open flow switch reports the matching information supported by the open flow switch to the open flow controller; and when the open flow switch supports the sending of the matching information, receiving the open that is sent by the open flow switch according to the negotiation request message.
  • Matching information supported by the flow switch determining matching information supported by the OpenFlow switch and the OpenFlow controller according to the matching information supported by the OpenFlow switch and the matching information supported by the OpenFlow controller.
  • the sending the matching information instruction to the OpenFlow switch includes: sending, by the OpenFlow controller, the first flow table to the OpenFlow switch, where the OpenFlow controller supports the sending of the matching information command, where The extended first instruction message of the first flow table carries the matching information instruction.
  • the first flow table is configured to instruct the open flow switch to create a second flow corresponding to the first flow table when determining that the matching information supported by the open flow switch includes the matching information indicated by the matching information instruction
  • the table, the extended second predetermined message of the second flow table carries the matching information instruction.
  • the method further comprises: receiving an error response message from the open flow switch, wherein the error response message is used to indicate the opening
  • the matching information supported by the flow switch does not include the matching information indicated by the matching information instruction.
  • the method further includes: sending, by the OpenFlow switch, the first flow table to the OpenFlow switch if the OpenFlow switch does not support the sending of the matching information.
  • the first flow table does not carry the matching information instruction.
  • the first flow table is configured to instruct the open flow switch to extract second matching information corresponding to the packet according to a first predetermined default processing manner, and send the second matching information to the open flow controller.
  • the method further includes: sending, to the open flow switch, a first flow table, where the open flow controller does not support the sending of the matching information command, where the first flow table does not carry the matching information instruction.
  • the first flow table is configured to instruct the open flow switch to extract third matching information corresponding to the packet according to a second predetermined default processing manner, and send the third matching information to the open flow controller.
  • the OpenFlow controller after the OpenFlow controller and the OpenFlow switch perform the matching information support capability negotiation, the OpenFlow controller sends the matching information instruction to the OpenFlow switch.
  • FIG. 4 is a timing chart of the matching information capability negotiation between the OF controller and the OF switch. As shown in FIG. 4, in this embodiment, the OF controller and the OF switch matching information capability negotiation process includes the following three steps:
  • Step 1 the OF controller is the negotiated active initiator. After the OF channel is established (corresponding to S401 and S402 in FIG. 4), the OFMPP_TABLE_FEAUTRES request (corresponding to the negotiation request message) is sent to the OF switch to query the flow table of the OF switch. Capability (corresponding to matching information supported by the OpenFlow switch, corresponding to S403 in FIG. 4).
  • Step 2 After receiving the request, the OF switch forwards the flow table capability supported by the device to the OF controller through the OFMPP_TABLE_FEAUTRES response message (corresponding to S404 in FIG. 4).
  • the flow table capability supported by the OF switch includes a matching information capability, which is implemented by extending an experiment message (corresponding to the extended first predetermined message of the first flow table).
  • the extended experiment message format is as follows:
  • the extension subtype exp_type is defined as follows:
  • variable length field oxm_fields represents the matching information set currently supported by the OF switch, and each oxm_fields type represents a matching information.
  • the content of oxm_fields is consistent with the oxm_fields semantics in the struct ofp_match structure defined by the protocol specification.
  • the uplink matching information carried includes the following oxm_field, as shown in Table 1:
  • the set of uplink matching information capabilities of the OF switch is referred to as ⁇ 0, 1, 2, 3, 5, 11, 12, 14 ⁇ .
  • Step 3 After receiving the OFMPP_TABLE_FEAUTRES response message, the OF controller compares the matching information capability in the response message with the locally supported matching information capability.
  • the matching information capability set of the OF controller is as shown in Table 2:
  • the matching information capability set of the OF controller is referred to as ⁇ 0, 1, 2, 3, 4, 5, 6, 11, 12 ⁇ .
  • the common matching information capability set of the OF controller and the OF switch is obtained as ⁇ 0, 1, 2, 3, 5, 11, 12 ⁇ .
  • Step 501 The OF controller sends a flow table (corresponding to the first flow table), where the flow table includes the following information (corresponding to 1, 2, and 3 in FIG. 5): (1) matching Ethernet type 0x0806; Matching information instruction, the instruction requires accurate delivery of the matching information set to ⁇ 0, 11 ⁇ ; (3) OFPIT_APPLY_ACTIONS instruction, carrying a forwarding operation (OFPAT_OUTPUT) behavior, the port number is reserved by the controller, and the port number will be The packet is sent to the controller (CONTROLLER).
  • the matching information instruction is implemented by using an extended experiment message.
  • the extended experiment message format is as follows:
  • variable length field oxm_fields has the same meaning as oxm_fields in the above struct ofp_instruction_experiment_upsend.
  • Step 502 After receiving the flow table, the OF switch first checks the validity of the matching information command, because the locally supported matching information capability set is ⁇ 0, 1, 2, 3, 5, 11, 12, 14 ⁇ , ⁇ 0, 11 ⁇ belongs to the capability set. Therefore, it is determined that the matching information carried in the flow table is valid, and the corresponding flow entry is locally created.
  • Step 503 When the OF switch receives the packet with the Ethernet type 0x0806, extracts the matching information ⁇ 0, 11 ⁇ according to the matching information command in the flow entry, and encapsulates it in the match field of the packet-in message to the OF controller.
  • Step 504 After receiving the sent packet-in message, the OF controller can perform corresponding processing based on the matching information, for example, performing an Adress resolution protocol (ARP) learning, and the specific processing logic is determined by the OF controller.
  • ARP Adress resolution protocol
  • Step 601 the OF controller sends a flow table, the flow table includes the following information (corresponding to 1, 2, 3 in Figure 6): (1) matching Ethernet type 0x0806; (2) sending matching information instructions, The instruction requires that the matching information set is accurately sent to ⁇ 0, 7 ⁇ ; (3) the OFPIT_APPLY_ACTIONS instruction carries an OFPAT_OUTPUT behavior, and the port number is the controller reserved port CONTROLLER.
  • Step 602 After receiving the flow table, the OF switch first checks the validity of the matching information command, because the locally supported matching information capability set is ⁇ 0, 1, 2, 3, 5, 11, 12, 14 ⁇ , and ⁇ 0,7 ⁇ does not belong to the capability set, so it is judged that the matching information carried in the flow table is invalid, and an error message is returned to the controller.
  • the error type of the error message is OFPET_BAD_INSTRUCTION, and the error code adopts the newly extended OFPBIC_UNSUP_UNSEND_FIELD, indicating that the upload matching information set by the OF controller is not supported.
  • Step 603 after receiving the error message sent by the OF controller, the OF controller knows that the matching information of the delivered flow table exceeds the capability range of the OF switch. At this time, the controller may select the upper layer service to continue to feed back the error, and the specific processing logic Determined by the OF controller.
  • FIG. 7 is a timing chart of another OF controller and OF switch matching information capability negotiation. As shown in FIG. 7, in this embodiment, the OF controller and the OF switch matching information capability negotiation process includes the following three steps:
  • Step 1 the OF controller is the negotiated active initiator. After the OF channel is established (corresponding to S701 and S702 in FIG. 7), the OFMPP_TABLE_FEAUTRES request is sent to the OF switch to query the flow table capability of the OF switch (corresponding to FIG. 7 S703).
  • Step 2 After receiving the request, the OF switch forwards the flow table capability supported by the device to the OF controller through the OFMPP_TABLE_FEAUTRES response message (corresponding to S704 in FIG. 7).
  • the flow table capability supported by the OF switch includes the matching information capability, and the capability is implemented by extending the experiment message, and the message format is the same as that of the implementation example 1.
  • the matching information carried in the OF switch is as shown in Table 3:
  • the capability of the uplink matching information capability of the OF switch is hereinafter referred to as ⁇ 0, 14 ⁇ .
  • Step 3 After receiving the OFMPP_TABLE_FEAUTRES response message, the OF controller compares the matching information capability in the response message with the locally supported matching information capability.
  • the matching information capability set of the OF controller is as shown in Table 4:
  • the matching information capability set of the OF controller is referred to as ⁇ 1, 2, 3, 4, 5, 6 ⁇ . After negotiation and comparison, it is found that there is no common set of matching information capabilities. At this time, the OF controller considers that the current OF switch is uncontrollable, and can choose to close the current OF channel connection. The specific processing logic is determined by the OF controller.
  • FIG. 8 is a timing chart of another OF controller and OF switch matching information capability negotiation. As shown in FIG. 8, in this embodiment, the OF controller and the OF switch matching information capability negotiation process includes the following three steps:
  • Step 1 the OF controller is the negotiated active initiator. After the OF channel is established (corresponding to S801 and S802 in FIG. 8), the OFPMP_TABLE_FEAUTRES request is sent to the OF switch to query the flow table capability of the OF switch (corresponding to FIG. 8). S803).
  • Step 2 After receiving the request, the OF switch forwards the flow table capability supported by the device to the OF controller through the OFMPP_TABLE_FEAUTRES response message (corresponding to S804 in FIG. 8).
  • the flow table capability supported by the OF switch includes the matching information capability, and the capability is implemented by extending the experiment message, and the message format is the same as that of the instance 1.
  • the matching information carried in the OF switch is as shown in Table 5:
  • the capability of the uplink matching information capability of the OF switch is hereinafter referred to as ⁇ 0, 1, 2 ⁇ .
  • Step 3 After the OF controller receives the OFMPP_TABLE_FEAUTRES response message, since the OF controller does not support the matching information capability negotiation in this embodiment, the matching information capability negotiation is not performed.
  • the matching information command is not carried in the flow entry sent by the subsequent OF controller.
  • the OF switch sends a data packet to the OF controller, it finds that the corresponding flow entry does not carry the matching information command, and then the matching information is extracted according to the local default processing logic. In this way, the OF controller that does not support setting the matching information can normally exchange the packet-in message with the OF switch that supports setting the matching information, and there is no compatibility problem.
  • FIG. 9 is a timing chart for further matching the capability information of the OF controller and the OF switch.
  • the OF controller and the OF switch matching information capability negotiation process include the following three steps:
  • Step 1 the OF controller is the negotiated active initiator. After the OF channel is established (corresponding to S901 and S902 in FIG. 9), the OFPMP_TABLE_FEAUTRES request is sent to the OF switch to query the flow table capability of the OF switch (corresponding to FIG. 9). S903).
  • Step 2 After receiving the request message, the OF switch forwards the flow table capability supported by the device to the OF controller through the OFMPP_TABLE_FEAUTRES response message (corresponding to S904 in FIG. 9).
  • the response message of the reply since the OF switch does not support the matching information command in the flow entry, the response message of the reply does not include the capability of matching information.
  • Step 3 After receiving the OFPMP_TABLE_FEAUTRES response message, the OF controller finds that the OF switch does not support the ability to set the matching information, so the matching information capability negotiation is not performed. The matching information command is not carried in the flow entry sent by the subsequent OF controller.
  • the OF switch When the OF switch sends a data packet to the OF controller, it finds that the corresponding flow entry does not carry the matching information command, and then the matching information is extracted according to the local default processing logic.
  • the OF switch that does not support setting the matching information can normally exchange the packet-in message with the OF controller that supports setting the matching information, and there is no compatibility problem.
  • the part that contributes to the related technology can be embodied in the form of a software product stored in a storage medium (such as Read-Only Memory (ROM)/Random Access Memory (Random Access Memory).
  • ROM Read-Only Memory
  • the RAM, the disk, and the optical disk include a plurality of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method described in one or more embodiments of the present disclosure.
  • a device for transmitting message matching information is also provided, which is used to implement the foregoing embodiments and implementation manners, and has not been described again.
  • the term "module” may implement a combination of software and/or hardware of a predetermined function.
  • the apparatus described in the following embodiments may be implemented in software, or in hardware, or a combination of software and hardware.
  • the device includes the following module: an extracting module 1002, configured to follow the matching information instruction from the OpenFlow switch.
  • the received message extracts first matching information corresponding to the packet received by the OpenFlow switch, where the matching information command is that the OpenFlow switch and the OpenFlow controller perform matching information support capability negotiation.
  • the instruction indicated by the OpenFlow controller is connected to the extracting module 1002, and configured to send the extracted first matching information to the OpenFlow controller.
  • the apparatus further includes: a first negotiation module, configured to extract first matching information corresponding to the packet received by the OpenFlow switch in the message received from the OpenFlow switch according to the matching information instruction.
  • the negotiation information support capability negotiation is performed with the OpenFlow controller by: receiving a negotiation request message from the OpenFlow controller, where the negotiation request message is used to request the OpenFlow switch to The matching information supported by the OpenFlow controller is sent to the OpenFlow controller, and the matching information supported by the OpenFlow switch is sent to the OpenFlow switch according to the negotiation request message. Opening a flow controller to instruct the open flow controller to determine, according to the matching information supported by the OpenFlow switch and the matching information supported by the OpenFlow controller, that the OpenFlow switch and the OpenFlow controller are both Supported matching information.
  • the foregoing apparatus is further configured to: after transmitting the matching information supported by the OpenFlow switch to the OpenFlow controller according to the negotiation request message, and in the following Before receiving the first matching information corresponding to the packet received by the OpenFlow switch, the packet received by the OpenFlow switch receives the first flow table from the OpenFlow controller, where the OpenFlow controller supports the In the case that the matching information instruction is sent, the extended first predetermined message of the first flow table carries the matching information instruction; and the first predetermined message that determines the extension of the first flow table carries the matching information instruction And in a case that the matching information supported by the OpenFlow switch includes the matching information indicated by the matching information instruction, creating a second flow table corresponding to the first flow table, where the second flow is The extended second predetermined message of the table carries the matching information instruction.
  • the apparatus is further configured to: before extracting, from the packet received by the OpenFlow switch, the first matching information corresponding to the packet received by the OpenFlow switch according to the matching information command, from the foregoing
  • the matching information instruction is obtained in the second predetermined message extended in the second flow table.
  • the apparatus is further configured to: after receiving the first flow table from the OpenFlow controller, the matching information supported by the OpenFlow switch does not include the matching information indicated by the matching information instruction. In the case, an error response message is replied to the OpenFlow controller.
  • the apparatus is further configured to: after receiving the negotiation request message from the OpenFlow controller, receive the information from the OpenFlow controller if the OpenFlow switch does not support the transmission of the matching information. a first flow table, wherein the first flow table does not carry the matching information instruction; the second matching information corresponding to the message is extracted according to a first predetermined default processing manner, and the second matching information is sent Give the open flow controller.
  • the apparatus is further configured to, after transmitting the matching information supported by the OpenFlow switch to the OpenFlow controller according to the negotiation request message, and in the following Receiving, by the OpenFlow switch, the first flow information from the OpenFlow controller before extracting the first matching information corresponding to the packet received by the OpenFlow switch, where the OpenFlow controller does not If the matching information instruction is sent, the first flow table does not carry the matching information command; and if the first flow table does not carry the matching information command, according to the second predetermined default
  • the processing manner extracts third matching information corresponding to the packet, and sends the third matching information to the OpenFlow controller.
  • the foregoing apparatus is applicable to an OpenFlow switch, that is, the packet received by the OpenFlow switch from the OpenFlow switch according to the matching information command is extracted and received by the OpenFlow switch.
  • the first matching information corresponding to the text; and the extracted first matching information is sent by the OpenFlow switch to the OpenFlow controller.
  • FIG. 11 is a structural block diagram of a device for transmitting message matching information according to an embodiment of the present disclosure. As shown in FIG. Module:
  • the second sending module 1102 is configured to send a matching information command to the OpenFlow switch after the OpenFlow controller and the OpenFlow switch perform the matching information support capability negotiation.
  • the receiving module 1104 is configured to receive the first matching information sent by the OpenFlow switch, where the first matching information is extracted by the OpenFlow switch from the received message according to the matching information command.
  • the matching information corresponding to the received message.
  • the matching information command is used by the OpenFlow switch to extract, according to the matching information command, a packet received from the OpenFlow switch according to the matching information command, corresponding to the packet, after receiving the packet. First matching information, and transmitting the first matching information to the OpenFlow controller.
  • the apparatus further includes: a second negotiation module, configured to perform matching information support capability negotiation with the OpenFlow switch by sending the matching information command to the OpenFlow switch:
  • the OpenFlow switch sends a negotiation request message, where the negotiation request message is used to request the OpenFlow switch to report the matching information supported by the OpenFlow switch to the OpenFlow controller; and the OpenFlow switch supports the sending of the matching information.
  • the matching information supported by the OpenFlow switch sent by the OpenFlow switch according to the negotiation request message is received; according to the matching information supported by the OpenFlow switch and the matching supported by the OpenFlow controller.
  • the information determines matching information supported by both the OpenFlow switch and the OpenFlow controller.
  • the second sending module 1102 may send a matching information command to the OpenFlow switch by: sending the first flow table to the OpenFlow switch when the OpenFlow controller supports sending the matching information command,
  • the extended first predetermined message of the first flow table carries the matching information instruction.
  • the first flow table is configured to instruct the open flow switch to create a second flow corresponding to the first flow table when determining that the matching information supported by the open flow switch includes the matching information indicated by the matching information instruction
  • the table, the extended second predetermined message of the second flow table carries the matching information instruction.
  • the apparatus is further configured to: after transmitting the first flow table to the OpenFlow switch, receive an error response message from the OpenFlow switch, where the error response message is used to indicate the OpenFlow switch
  • the supported matching information does not include the matching information indicated by the matching information instruction.
  • the apparatus is further configured to: after the sending the negotiation request message to the open flow switch, send the first flow table to the open flow switch, if the open flow switch does not support the sending of the matching information, where The matching information instruction is not carried in the first flow table.
  • the first flow table is configured to instruct the open flow switch to extract matching information corresponding to the packet according to a first predetermined default processing manner, and send the matching information to the open flow controller.
  • the device is further configured to receive second matching information that is sent by the OpenFlow switch, where the second matching information is extracted by the OpenFlow switch from the received packet according to a first predetermined default processing manner. Matching information corresponding to the received message.
  • the apparatus is further configured to: determine, according to the matching information supported by the OpenFlow switch and the matching information supported by the OpenFlow controller, that the OpenFlow switch and the OpenFlow controller are both After the matching information is not supported, the OpenFlow controller does not support the sending of the matching information command, and sends the first flow table to the OpenFlow switch, where the matching information command is not carried in the first flow table.
  • the first flow table is configured to instruct the open flow switch to extract matching information corresponding to the packet according to a second predetermined default processing manner, and send the matching information to the open flow controller.
  • the device is further configured to receive the third matching information that is sent by the OpenFlow switch, where the third matching information is received by the OpenFlow switch from the received packet according to a second predetermined default processing manner. The extracted matching information corresponding to the received message.
  • the foregoing apparatus may be applied to an OpenFlow controller, that is, after the OpenFlow controller and the OpenFlow switch perform the matching information support capability negotiation, the OpenFlow controller refers to the The open flow switch sends the matching information command.
  • the one or more modules may be implemented by software or hardware.
  • the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the modules are respectively in any combination. Located in different processors.
  • Embodiments of the present disclosure also provide a storage medium having stored therein a computer program, wherein the computer program is configured to execute the method of any of the above embodiments at runtime.
  • the above storage medium may be arranged to store a computer program for performing the following steps:
  • the storage medium is further configured to store a computer program for performing the following steps:
  • the first matching information sent by the OpenFlow switch is received, where the first matching information is extracted by the OpenFlow switch from the received message according to the matching information command, and the received information is received by the OpenFlow switch. Match information corresponding to the message.
  • the foregoing storage medium may include, but is not limited to, a Universal Serial Bus flash disk (U disk), a Read-Only Memory (ROM), and a random access memory (Random).
  • U disk Universal Serial Bus flash disk
  • ROM Read-Only Memory
  • RAM Access Memory
  • removable hard disk disk
  • optical disk optical disk
  • FIG. 12 is a structural block diagram of an electronic device according to an embodiment of the present disclosure. As shown in FIG. 12, an embodiment of the present disclosure further provides an electronic device including a memory 1210 and a processor 1220, where the memory 1210 stores A computer program, the processor 1220, configured to execute a computer program to perform the method of any of the above embodiments.
  • the electronic device may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor 1220, and the input/output device is connected to the processor 1220.
  • the above processor may be configured to perform the following steps by a computer program:
  • the processor is further configured to perform the following steps by a computer program:
  • the first matching information sent by the OpenFlow switch is received, where the first matching information is extracted by the OpenFlow switch from the received message according to the matching information command, and the received information is received by the OpenFlow switch. Match information corresponding to the message.
  • one or more of the above-described modules or one or more steps of the present disclosure can be implemented by a general-purpose computing device, which can be centralized on a single computing device or distributed across multiple On a network of computing devices, in one embodiment they may be implemented in program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may The steps shown or described are performed in a different order than here, or they are separately fabricated into one or more integrated circuit modules, or a plurality of the modules or steps are fabricated as a single integrated circuit module.
  • the present disclosure is not limited to any particular combination of hardware and software.

Landscapes

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

Abstract

Disclosed is a method for sending packet matching information, comprising: extracting, according to matching information signaling, from a packet received by an open flow exchange first matching information corresponding to the packet received by the open flow exchange, wherein the matching information instruction is an instruction indicated by an open flow controller after the open flow exchange performs matching information support capability negotiation with the open flow controller; and sending the extracted first matching information to the open flow controller. Also disclosed are a device for sending packet matching information, a method and device for receiving packet matching information, a storage medium and an electronic device.

Description

报文匹配信息的发送方法及装置、报文匹配信息的接收方法及装置、存储介质及电子装置Method and device for transmitting message matching information, method and device for receiving message matching information, storage medium and electronic device
本申请要求在2018年03月12日提交中国专利局、申请号为201810200791.0的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。The present application claims the priority of the Chinese Patent Application, the entire disclosure of which is hereby incorporated by reference.
技术领域Technical field
本公开涉及通信领域,例如,涉及一种报文匹配信息的发送方法及装置、报文匹配信息的接收方法及装置、存储介质及电子装置。The present disclosure relates to the field of communications, for example, to a method and device for transmitting message matching information, a method and device for receiving message matching information, a storage medium, and an electronic device.
背景技术Background technique
作为软件定义网络的一个实例,开放流(OpenFlow,OF)网络采用控制平面与转发平面相分离的架构,图1是OF网络组件架构示意图。如图1所示,OF网络的控制平面由OF控制器来实现,OF网络的转发平面由OF交换机来实现,OF控制器与OF交换机之间运行OF协议。OF控制器利用OF协议向OF交换机下发流表(Flow Table)和组表(Group Table),从而达到控制数据转发的目的,实现了控制平面和转发平面的分离。As an example of a software-defined network, an OpenFlow (OF) network adopts an architecture in which a control plane is separated from a forwarding plane. FIG. 1 is a schematic diagram of an OF network component architecture. As shown in FIG. 1 , the control plane of the OF network is implemented by the OF controller, the forwarding plane of the OF network is implemented by the OF switch, and the OF protocol is run between the OF controller and the OF switch. The OF controller uses the OF protocol to send a flow table (Flow Table) and a group table (Group Table) to the OF switch, thereby achieving the purpose of controlling data forwarding, and realizing the separation of the control plane and the forwarding plane.
开放网络基金会(Open Networking Foundation,ONF)制定的OF交换机规范中定义了OF控制器和OF交换机之间交互的三类消息:OF控制器到OF交换机的消息,异步消息以及对称消息。其中,异步消息中包括报文上送消息(packet-in消息),该消息的作用是将经过流水线处理的要上送的数据报文以及相关流水线信息上送给OF控制器。The OF switch specification developed by the Open Networking Foundation (ONF) defines three types of messages that interact between the OF controller and the OF switch: messages from the OF controller to the OF switch, asynchronous messages, and symmetric messages. The asynchronous message includes a packet-sending message (packet-in message), and the function of the message is to send the data packet to be sent and the related pipeline information processed by the pipeline to the OF controller.
OF协议定义的packet-in消息中包括以下几类信息:(1)流水线处理相关的信息,包括查询的流表身份标识号码(Identification,ID)、流表项的标识符(cookie)以及上送原因等;(2)数据报文相关的信息,包括报文匹配信息、报文长度以及报文内容。协议描述了报文匹配信息包括两类,一类是流水线匹配字段信息,这些匹配信息无法通过解析数据报文得到,比如接收数据报文的入端口号。协议要求上送的匹配信息中包含所有设备支持的流水线匹配信息,这些匹配信息对应的数值不为0。另一类是数据报文内容相关的匹配信息,这些信息可以通过解析数据报文获得,比如二层媒体访问控制(Media Access Control,MAC)地 址信息、三层互联网协议(Internet Protocol,IP)地址信息、四层端口号信息等等。协议描述了这些匹配信息是可选支持的,且考虑到上送packet-in消息的效率问题,大多数的交换机不应该包含这些匹配信息。这样,OF控制器也不应该依赖于这些匹配信息而应该自己解析数据报文提取。The packet-in message defined by the OF protocol includes the following types of information: (1) Pipeline processing related information, including the flow table identification number (Identification, ID) of the query, the identifier (cookie) of the flow entry, and the delivery. Reasons, etc.; (2) Data message related information, including message matching information, message length, and message content. The protocol describes that the packet matching information includes two types. One type is the pipeline matching field information. The matching information cannot be obtained by parsing the data packet, for example, the inbound port number of the received data packet. The matching information sent by the protocol includes the pipeline matching information supported by all devices, and the matching information does not have a value of 0. The other type is the matching information related to the content of the data packet. The information can be obtained by parsing the data packet, such as Layer 2 Media Access Control (MAC) address information and Layer 3 Internet Protocol (IP) address. Information, four-layer port number information, and more. The protocol describes that these matching information is optionally supported, and given the efficiency of sending packet-in messages, most switches should not include these matching information. Thus, the OF controller should not rely on these matching information and should parse the data packet extraction itself.
协议对匹配信息的上述约束带来的一些问题,包括:(1)限制了上送匹配信息的灵活性,比如强制要求所有的流水线匹配信息都要上送,无法根据设备自身的能力或者业务要求灵活选择上送;(2)会导致一些互通性、兼容性问题;比如设备上送了异厂商不支持的流水线匹配字段,导致对接出现问题;或者设备升级支持了上送新的流水线匹配字段,导致和之前的控制器对接出现问题,升级失败。Some problems caused by the above constraints of the protocol on the matching information include: (1) limiting the flexibility of sending matching information, such as forcing all pipeline matching information to be sent, not according to the capabilities or service requirements of the device itself. Flexible selection and delivery; (2) will lead to some interoperability and compatibility issues; for example, the device sends a pipeline matching field that is not supported by different vendors, causing problems in docking; or the device upgrade supports sending a new pipeline matching field. The connection to the previous controller is faulty and the upgrade fails.
针对相关技术中存在的开放流交换机和开放流控制器之间的互通性和兼容性的问题目前尚未提出有效的解决方案。An effective solution has not been proposed for the interoperability and compatibility between the OpenFlow switch and the OpenFlow controller existing in the related art.
发明内容Summary of the invention
本公开实施例提供了一种报文匹配信息的发送方法及装置、报文匹配信息的接收方法及装置、存储介质及电子装置,以至少解决相关技术中存在的开放流交换机和开放流控制器之间的互通性和兼容性的问题。An embodiment of the present disclosure provides a method and device for transmitting message matching information, a method and device for receiving message matching information, a storage medium, and an electronic device, to at least solve the OpenFlow switch and the OpenFlow controller existing in the related art. Interoperability and compatibility issues.
根据本公开的一个实施例,提供了一种报文匹配信息的发送方法,应用于开放流交换机,包括:按照匹配信息指令从所述开放流交换机接收到的报文提取与所述开放流交换机接收到的报文对应的第一匹配信息,其中,所述匹配信息指令是在所述开放流交换机与开放流控制器进行了匹配信息支持能力协商之后,由所述开放流控制器所指示的指令;将提取的所述第一匹配信息发送给所述开放流控制器。According to an embodiment of the present disclosure, a method for sending message matching information is provided, which is applied to an OpenFlow switch, including: extracting a message received from the OpenFlow switch according to a matching information instruction, and extracting the OpenFlow switch. The first matching information corresponding to the received message, wherein the matching information command is indicated by the OpenFlow controller after the OpenFlow switch and the OpenFlow controller perform the matching information support capability negotiation. An instruction to send the extracted first matching information to the open flow controller.
根据本公开的另一个实施例,还提供了一种报文匹配信息的接收方法,应用于开放流控制器,包括:在所述开放流控制器与开放流交换机进行了匹配信息支持能力协商之后,向所述开放流交换机发送匹配信息指令;According to another embodiment of the present disclosure, a method for receiving message matching information is further provided, which is applied to an OpenFlow controller, including: after the OpenFlow controller and the OpenFlow switch perform matching information support capability negotiation Sending a matching information instruction to the open flow switch;
接收所述开放流交换机发送的第一匹配信息,其中,所述第一匹配信息由所述开放流交换机按照所述匹配信息指令从接收到的报文中提取的与所述接收到的报文对应的匹配信息。And receiving the first matching information sent by the OpenFlow switch, where the first matching information is extracted by the OpenFlow switch from the received message according to the matching information instruction, and the received packet is received by the OpenFlow switch. Corresponding matching information.
根据本公开的又一个实施例,提供了一种报文匹配信息的发送装置,应用于开放流交换机,包括:提取模块,设置为按照匹配信息指令从所述开放流交换机接收到的报文提取与所述开放流交换机接收到的报文对应的第一匹配信息,其中,所述匹配信息指令是在所述开放流交换机与开放流控制器进行了匹配信息支持能力协商之后,由所述开放流控制器所指示的指令;发送模块,设置为将提取的所述第一匹配信息发送给所述开放流控制器。According to still another embodiment of the present disclosure, a device for sending message matching information is provided, which is applied to an OpenFlow switch, and includes: an extracting module, configured to extract a message received from the OpenFlow switch according to a matching information instruction. The first matching information corresponding to the packet received by the OpenFlow switch, where the matching information command is performed after the OpenFlow switch and the OpenFlow controller perform the matching information support capability negotiation. An instruction indicated by the flow controller; the sending module is configured to send the extracted first matching information to the open flow controller.
根据本公开的再一个实施例,还提供了一种报文匹配信息的发送装置,应用于开放流控制器,包括:According to still another embodiment of the present disclosure, a device for sending message matching information, which is applied to an OpenFlow controller, includes:
发送模块,设置为在所述开放流控制器与开放流交换机进行了匹配信息支持能力协商之后,向所述开放流交换机发送匹配信息指令;a sending module, configured to send a matching information instruction to the OpenFlow switch after the OpenFlow controller and the OpenFlow switch perform the matching information support capability negotiation;
接收模块,设置为接收所述开放流交换机发送的第一匹配信息,其中,所述第一匹配信息由所述开放流交换机按照所述匹配信息指令从接收到的报文中提取的与所述接收到的报文对应的匹配信息。a receiving module, configured to receive first matching information sent by the OpenFlow switch, where the first matching information is extracted by the OpenFlow switch from the received message according to the matching information instruction Match information corresponding to the received message.
根据本公开的还一个实施例,还提供了一种存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行上述任一实施例所述的方法。According to still another embodiment of the present disclosure, there is also provided a storage medium having stored therein a computer program, wherein the computer program is configured to execute the method of any of the above embodiments at runtime.
根据本公开的还一个实施例,还提供了一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行上述任一实施例所述的方法。According to still another embodiment of the present disclosure, there is also provided an electronic device comprising a memory and a processor, wherein the memory stores a computer program, the processor being configured to execute the computer program to perform any of the above implementations The method described in the example.
附图说明DRAWINGS
此处所说明的附图用来提供对本公开的进一步理解,构成本申请的一部分,本公开的示意性实施例及其说明用于解释本公开,并不构成对本公开的不当限定。在附图中:The drawings described herein are provided to provide a further understanding of the present disclosure, which is a part of the present disclosure, and the description of the present disclosure and the description thereof are not intended to limit the disclosure. In the drawing:
图1是根据本公开实施例的OF网络组件架构示意图;1 is a schematic diagram of an OF network component architecture in accordance with an embodiment of the present disclosure;
图2是根据本公开实施例的一种报文匹配信息的发送方法的交互图;2 is an interaction diagram of a method for transmitting message matching information according to an embodiment of the present disclosure;
图3是根据本公开实施例的一种报文匹配信息的接收方法的交互图;FIG. 3 is an interaction diagram of a method for receiving message matching information according to an embodiment of the present disclosure; FIG.
图4是根据本公开实施例的一种OF控制器和OF交换机匹配信息能力协商时序图;4 is a timing diagram of an OF controller and OF switch matching information capability negotiation according to an embodiment of the present disclosure;
图5是根据本公开实施例的一种OF控制器下发携带匹配信息指令的流表示意图;FIG. 5 is a schematic diagram of a flow table of an OF controller carrying a matching information instruction according to an embodiment of the present disclosure; FIG.
图6是根据本公开实施例的另一种OF控制器下发携带匹配信息指令的流表示意图;FIG. 6 is a schematic diagram of a flow table for carrying an instruction to carry matching information by another OF controller according to an embodiment of the present disclosure; FIG.
图7是根据本公开实施例的另一种OF控制器和OF交换机匹配信息能力协商时序图;7 is a timing diagram of another OF controller and OF switch matching information capability negotiation according to an embodiment of the present disclosure;
图8是根据本公开实施例的又一种OF控制器和OF交换机匹配信息能力协商时序图;8 is a timing diagram of still another OF controller and OF switch matching information capability negotiation according to an embodiment of the present disclosure;
图9是根据本公开实施例的还一种OF控制器和OF交换机匹配信息能力协商时序图;9 is a timing chart of still matching an OF controller and an OF switch matching information capability according to an embodiment of the present disclosure;
图10是根据本公开实施例的一种报文匹配信息的发送装置的结构框图;FIG. 10 is a structural block diagram of an apparatus for transmitting message matching information according to an embodiment of the present disclosure; FIG.
图11是根据本公开实施例的一种报文匹配信息的接收装置的结构框图;11 is a structural block diagram of an apparatus for receiving message matching information according to an embodiment of the present disclosure;
图12是根据本公开实施例的一种电子装置的结构框图。FIG. 12 is a structural block diagram of an electronic device according to an embodiment of the present disclosure.
具体实施方式detailed description
下文中将参考附图并结合实施例来说明本公开。在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。The present disclosure will be hereinafter described with reference to the drawings in conjunction with the embodiments. The embodiments in the present application and the features in the embodiments may be combined with each other without conflict.
本公开的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。The terms "first", "second" and the like in the specification and claims of the present disclosure and the above-mentioned figures are used to distinguish similar objects, and are not necessarily used to describe a particular order or order.
实施例一Embodiment 1
本公开实施例中的方案是可以应用于开放流(Openflow)网络中的,下面结合实施例对本公开进行说明。The solution in the embodiment of the present disclosure can be applied to an OpenFlow network, and the present disclosure will be described below in conjunction with the embodiments.
在本实施例中提供了一种报文匹配信息的发送方法,图2是根据本公开实施例的一种报文匹配信息的发送方法的交互图,如图2所示,该交互包括步骤202至步骤204。In this embodiment, a method for sending message matching information is provided. FIG. 2 is an interaction diagram of a method for sending message matching information according to an embodiment of the present disclosure. As shown in FIG. 2, the interaction includes step 202. Go to step 204.
在步骤202中,按照匹配信息指令从所述开放流交换机接收到的报文提取与所述开放流交换机接收到的报文对应的第一匹配信息,其中,所述匹配信息指令是在所述开放流交换机与开放流控制器进行了匹配信息支持能力协商之后, 由所述开放流控制器所指示的指令;In step 202, the first matching information corresponding to the packet received by the OpenFlow switch is extracted according to the matching information command, and the matching information command is in the An instruction indicated by the OpenFlow controller after the OpenFlow switch and the OpenFlow controller negotiate the matching information support capability;
在步骤204中,将提取的所述第一匹配信息发送给所述开放流控制器。In step 204, the extracted first matching information is sent to the open flow controller.
其中,执行上述操作的可以是开放流交换机(在本公开中,OpenFlow交换机可以简称为OF交换机,也可以直接称为开放流交换机,OpenFlow控制器可以简称为OF控制器,也可以直接称为开放流控制器)。图2是以开放流交换机执行上述操作为例进行说明的。The OpenFlow switch may be referred to as an OF switch in the present disclosure, and may be referred to as an OpenFlow switch directly. The OpenFlow controller may be referred to as an OF controller, or may be directly referred to as an open switch. Flow controller). FIG. 2 is an example in which the OpenFlow switch performs the above operations as an example.
在上述实施例中,由于匹配信息指令是在开放流交换机和开放流控制器进行了匹配信息支持能力协商之后,由开放流控制器所指示的,且该第一匹配信息是按照匹配信息指令所提取的与接收到的报文相对应的匹配信息,因此,发送给开放流控制器的第一匹配信息是满足开放流交换机和开放流控制器之间的互通性和兼容性的。因此,可以解决相关技术中开放流交换机和开放流控制器之间的互通性和兼容性的问题,达到保证开放流交换机和开放流控制器之间互联互通效果。In the above embodiment, the matching information instruction is indicated by the OpenFlow controller after the OpenFlow switch and the OpenFlow controller perform the matching information support capability negotiation, and the first matching information is in accordance with the matching information command. The extracted matching information corresponding to the received message, therefore, the first matching information sent to the OpenFlow controller is to satisfy the interoperability and compatibility between the OpenFlow switch and the OpenFlow controller. Therefore, the problem of interoperability and compatibility between the OpenFlow switch and the OpenFlow controller in the related art can be solved, and the interconnection and interworking between the OpenFlow switch and the OpenFlow controller can be ensured.
在一实施例中,在按照匹配信息指令从所述开放流交换机接收到的报文提取与开放流交换机接收到的报文对应的第一匹配信息之前,上述方法还包括:所述开放流交换机通过如下方式与所述开放流控制器进行所述匹配信息支持能力协商:接收来自所述开放流控制器的协商请求消息,其中,所述协商请求消息用于请求所述开放流交换机将自身所支持的匹配信息上报给所述开放流控制器;在该开放流交换机支持匹配信息发送的情况下,根据上述协商请求消息将所述开放流交换机所支持的匹配信息发送给所述开放流控制器,以指示所述开放流控制器根据所述开放流交换机所支持的匹配信息和所述开放流控制器所支持的匹配信息确定所述开放流交换机和所述开放流控制器均支持的匹配信息。在本实施例中,OF控制器和OF交换机在通道建立后,OF控制器可以主动发起OFPMP_TABLE_FEAUTRES请求来查询OF交换机的流表能力(对应于本实施例中交换机所支持的匹配信息)。OF交换机收到OFPMP_TABLE_FEAUTRES请求后,将本设备(即,OF交换机)支持的流表能力通过OFPMP_TABLE_FEAUTRES响应消息上报给OF控制器。其中流表能力里面包括本设备支持的报文匹配信息上送能力。OF控制器收到OFPMP_TABLE_FEAUTRES响应消息后,将响应消息中的报文匹配信息能力与本地支持的报文匹配信息能力(对应于本实施例中的开放流控制器所支持的匹 配信息)进行协商比较。协商的原则是判断两者是否具有公共的匹配信息能力,如果两者有公共的匹配信息能力,则可以协商成功,且协商后的匹配信息能力为两者的交集(对应于本实施例中开放流交换机和开放流控制器均支持的匹配信息)。如果两者没有公共的匹配信息能力,则协商失败。如果协商成功,后续OF控制器下发流表时可以携带报文匹配信息的指令,用于精确控制通过packet-in消息上送的报文匹配信息。如果协商失败,OF控制器可以基于本地策略进行相关操作,比如可以选择关闭当前OF通道连接,具体策略可由OF控制器定义。In an embodiment, before the first matching information corresponding to the packet received by the OpenFlow switch is extracted from the packet received by the OpenFlow switch according to the matching information, the method further includes: the OpenFlow switch Performing the matching information support capability negotiation with the OpenFlow controller by: receiving a negotiation request message from the OpenFlow controller, where the negotiation request message is used to request the OpenFlow switch to The matched matching information is reported to the OpenFlow controller. If the OpenFlow switch supports the sending of the matching information, the matching information supported by the OpenFlow switch is sent to the OpenFlow controller according to the foregoing negotiation request message. Instructing the OpenFlow controller to determine matching information supported by the OpenFlow switch and the OpenFlow controller according to the matching information supported by the OpenFlow switch and the matching information supported by the OpenFlow controller. . In this embodiment, after the channel is established, the OF controller and the OF switch can actively initiate an OFMPP_TABLE_FEAUTRES request to query the flow table capability of the OF switch (corresponding to the matching information supported by the switch in this embodiment). After receiving the OFMPP_TABLE_FEAUTRES request, the OF switch reports the flow table capability supported by the device (that is, the OF switch) to the OF controller through the OFMP_TABLE_FEAUTRES response message. The flow table capability includes the ability to send message matching information supported by the device. After receiving the OFMPP_TABLE_FEAUTRES response message, the OF controller compares the packet matching information capability in the response message with the locally supported packet matching information capability (corresponding to the matching information supported by the OpenFlow controller in this embodiment). . The principle of negotiation is to determine whether the two have the common ability to match information. If the two have the common ability to match information, the negotiation can be successful, and the matching information capability after negotiation is the intersection of the two (corresponding to the open in this embodiment). Matching information supported by both the flow switch and the open flow controller). If the two do not have a common ability to match information, the negotiation fails. If the negotiation is successful, the subsequent OF controller can send the packet matching information to the packet to match the packet matching information sent by the packet-in message. If the negotiation fails, the OF controller can perform related operations based on the local policy. For example, the current OF channel connection can be selected to be closed, and the specific policy can be defined by the OF controller.
在一实施例中,在根据所述协商请求消息将所述开放流交换机所支持的匹配信息发送给所述开放流控制器之后、且在所述按照匹配信息指令从所述开放流交换机接收到的报文提取与开放流交换机接收到的报文对应的第一匹配信息之前,所述方法还包括:接收来自所述开放流控制器的第一流表,其中,在所述开放流控制器支持所述匹配信息指令发送的情况下,所述第一流表的扩展的第一预定消息中携带所述匹配信息指令;在确定所述第一流表的扩展的第一预定消息中携带所述匹配信息指令,且在所述开放流交换机所支持的匹配信息包括所述匹配信息指令所指示的匹配信息的情况下,创建与所述第一流表对应的第二流表,其中,在所述第二流表的扩展的第二预定消息中携带所述匹配信息指令。在本实施例中,OF控制器可以采用扩展实验(experiment)消息(对应于本实施例中第一流表的扩展的第一预定消息,当然,也可以采用扩展流表中的其他消息或其他字段来实现)实现携带报文匹配信息指令(对应于本实施例中的匹配信息指令),OF交换机收到OF控制器下发的携带报文匹配信息指令的流表(对应于本实施例中的第一流表)时,首先进行匹配信息能力的有效性检查,如果流表中携带的匹配信息在本地支持范围内,则认为有效,本地会生成对应的转发表项(对应于本实施例中的第二流表),在转发表项的扩展的第二预定消息中携带匹配信息指令。一旦OF交换机生成本地转发流表项,后续当有数据报文命中该流表且要求上送控制器时,会根据该指令中设置的匹配信息进行精确上送。由于相关的OF流水线支持多级流表操作,往往数据报文要经过多级流表项处理后才会上送控制器。在此期间,每经过一级流表项处理,就根据对应的匹配信息指令将相关匹配信息存储在上送集合中,待流水线处理结束后,如果最终要求将数据报文上送控制器,此时将上送集合中的匹配信息一起组织上送。In an embodiment, after the matching information supported by the OpenFlow switch is sent to the OpenFlow controller according to the negotiation request message, and received from the OpenFlow switch according to the matching information instruction. Before the packet extracting the first matching information corresponding to the packet received by the OpenFlow switch, the method further includes: receiving a first flow table from the OpenFlow controller, where the OpenFlow controller supports In the case that the matching information is sent, the first predetermined message of the first flow table carries the matching information command; and the first predetermined message that is determined to be extended in the first flow table carries the matching information. And instructing, in the case that the matching information supported by the OpenFlow switch includes the matching information indicated by the matching information instruction, creating a second flow table corresponding to the first flow table, where, in the second The extended information message is carried in the extended second predetermined message of the flow table. In this embodiment, the OF controller may adopt an extended experiment message (corresponding to the extended first predetermined message of the first flow table in this embodiment, and of course, other messages or other fields in the extended flow table may also be adopted. To implement the packet carrying information matching instruction (corresponding to the matching information command in this embodiment), the OF switch receives the flow table that carries the message matching information command sent by the OF controller (corresponding to the embodiment in this embodiment) In the first flow table, the validity check of the capability of the matching information is first performed. If the matching information carried in the flow table is in the local support range, it is considered to be valid, and the corresponding forwarding entry is generated locally (corresponding to the first embodiment). The second flow table) carries the matching information instruction in the extended second predetermined message of the forwarding entry. Once the OF switch generates a local forwarding flow entry, the subsequent data packet will be sent to the controller according to the matching information set in the instruction. Because the related OF pipeline supports multi-level flow table operations, data packets are sent to the controller after being processed by multi-level flow entries. During this period, each time the flow entry is processed, the relevant matching information is stored in the uploading set according to the corresponding matching information instruction. After the pipeline processing ends, if the data packet is finally sent to the controller, this The matching information in the sent collection is organized and sent together.
在一实施例中,在按照匹配信息指令从开放流交换机接收到的报文提取与所述开放流交换机接收到的报文对应的第一匹配信息之前,所述方法还包括:从所述第二流表中扩展的所述第二预定消息中获取所述匹配信息指令。在本实施例中,匹配信息指令采用扩展消息实现,OF交换机在本地生成的转发列表项中扩展的消息中获取匹配信息指令。In an embodiment, before the first matching information corresponding to the packet received by the OpenFlow switch is extracted from the packet received by the OpenFlow switch according to the matching information, the method further includes: The matching information instruction is obtained in the second predetermined message extended in the second flow table. In this embodiment, the matching information instruction is implemented by using an extended message, and the OF switch obtains the matching information instruction in the extended message in the locally generated forwarding list item.
在一实施例中,在接收来自所述开放流控制器的第一流表之后,所述方法还包括:在所述开放流交换机所支持的匹配信息不包括所述匹配信息指令所指示的匹配信息的情况下,向所述开放流控制器回复错误响应消息。在本实施例中,如果流表(对应于本实施例中的第一流表)中携带的匹配信息超出了本地支持范围,或者开放流交换机与开放流控制器的匹配信息支持能力协商失败,则拒绝该流表项的添加行为,OF控制器可以基于本地策略进行相关操作,比如可以选择关闭当前OF通道连接,具体策略可由OF控制器定义,并返回一个错误信息给OF控制器。In an embodiment, after receiving the first flow table from the OpenFlow controller, the method further includes: the matching information supported by the OpenFlow switch does not include the matching information indicated by the matching information instruction. In case, the error response message is replied to the open flow controller. In this embodiment, if the matching information carried in the flow table (corresponding to the first flow table in this embodiment) exceeds the local support range, or the matching information support capability negotiation between the OpenFlow switch and the OpenFlow controller fails, Refusing to add the flow entry, the OF controller can perform related operations based on the local policy. For example, the current OF channel connection can be closed. The specific policy can be defined by the OF controller and an error message is returned to the OF controller.
在一实施例中,在接收来自所述开放流控制器的协商请求消息之后,所述方法还包括:在所述开放流交换机不支持匹配信息发送的情况下,接收来自所述开放流控制器的第一流表,其中,所述第一流表中不携带所述匹配信息指令;按照第一预定缺省处理方式提取与所述报文对应的第二匹配信息,并将所述第二匹配信息发送给所述开放流控制器。在本实施例中,当有些OF交换机不支持上报匹配信息能力时,为便于兼容支持这些OF交换机,要求OF控制器对这些OF交换机不下发携带匹配信息指令的流表项。当OF交换机要上送数据报文给控制器时,按照OF交换机缺省的实现选择第二匹配信息进行上送。In an embodiment, after receiving the negotiation request message from the OpenFlow controller, the method further comprises: receiving, from the OpenFlow controller, if the OpenFlow switch does not support matching information transmission The first flow table, wherein the first flow table does not carry the matching information instruction; the second matching information corresponding to the message is extracted according to a first predetermined default processing manner, and the second matching information is Sent to the open flow controller. In this embodiment, when some OF switches do not support the capability of reporting matching information, the OF controller is required to not send the flow entry carrying the matching information command to the OF switches. When the OF switch sends a data packet to the controller, the second matching information is selected and sent according to the default implementation of the OF switch.
在一实施例中,在根据所述协商请求消息将所述开放流交换机所支持的匹配信息发送给所述开放流控制器之后、且在所述按照匹配信息指令从所述开放流交换机接收到的报文提取与开放流交换机接收到的报文对应的第一匹配信息之前,所述方法还包括:接收来自所述开放流控制器的第一流表,其中,在所述开放流控制器不支持所述匹配信息指令发送的情况下,所述第一流表中不携带所述匹配信息指令;在确定所述第一流表中不携带所述匹配信息指令的情况下,按照第二预定缺省处理方式提取与所述报文对应的第三匹配信息,并将所述第三匹配信息发送给所述开放流控制器。在本实施例中,当有些OF控制器不支持匹配信息指令时,为便于兼容支持这些OF控制器,当OF交换机要上送数 据报文给OF控制器时,发现对应的流表项没有携带匹配信息指令,则按照OF交换机缺省的实现选择第三匹配信息进行上送。In an embodiment, after the matching information supported by the OpenFlow switch is sent to the OpenFlow controller according to the negotiation request message, and received from the OpenFlow switch according to the matching information instruction. The method further includes: receiving a first flow table from the open flow controller, where the open flow controller does not If the matching information instruction is sent, the first flow table does not carry the matching information command; and if the first flow table does not carry the matching information command, according to the second predetermined default The processing manner extracts third matching information corresponding to the packet, and sends the third matching information to the OpenFlow controller. In this embodiment, when some OF controllers do not support the matching information command, in order to facilitate the compatibility of the OF controllers, when the OF switch sends a data packet to the OF controller, the corresponding flow entry is not carried. If the matching information command is used, the third matching information is selected and sent according to the default implementation of the OF switch.
在一实施例中,所述开放流交换机按照匹配信息指令从所述开放流交换机接收到的报文提取与开放流交换机接收到的报文对应的第一匹配信息;所述开放流交换机将提取的所述第一匹配信息发送给所述开放流控制器。In an embodiment, the OpenFlow switch extracts, according to the matching information instruction, the first matching information corresponding to the packet received by the OpenFlow switch, and the OpenFlow switch extracts the packet received by the OpenFlow switch. The first matching information is sent to the open flow controller.
实施例二Embodiment 2
在本实施例中,还提供了一种报文匹配信息的接收方法,图3是根据本公开实施例的一种报文匹配信息的接收方法的交互图,如图3所示,该交互包括如下步骤302至步骤304。In this embodiment, a method for receiving message matching information is also provided. FIG. 3 is an interaction diagram of a method for receiving message matching information according to an embodiment of the present disclosure. As shown in FIG. 3, the interaction includes The following steps 302 to 304 are performed.
在步骤302中,在开放流控制器与开放流交换机进行了匹配信息支持能力协商之后,向所述开放流交换机发送匹配信息指令。In step 302, after the open flow controller and the open flow switch perform the matching information support capability negotiation, the matching information command is sent to the open flow switch.
在步骤304中,接收所述开放流交换机发送的第一匹配信息,其中,所述第一匹配信息由所述开放流交换机按照所述匹配信息指令从接收到的报文中提取的与所述接收到的报文对应的匹配信息。In step 304, the first matching information sent by the OpenFlow switch is received, where the first matching information is extracted by the OpenFlow switch from the received message according to the matching information instruction. Match information corresponding to the received message.
在一实施例中,所述匹配信息指令用于所述开放流交换机在接收到报文后,按照所述匹配信息指令从所述开放流交换机接收到的报文提取与所述报文对应的第一匹配信息,并将所述第一匹配信息发送给所述开放流控制器。In an embodiment, the matching information command is used by the OpenFlow switch to extract, according to the matching information command, a packet received from the OpenFlow switch according to the matching information command, corresponding to the packet, after receiving the packet. First matching information, and transmitting the first matching information to the OpenFlow controller.
其中,执行上述操作的可以是开放流控制器(在本公开中,OpenFlow控制器可以简称为OF控制器,也可以直接称为开放流控制器,OpenFlow交换机可以简称为OF交换机,也可以直接称为开放流交换机)。图3是以开放流控制器执行上述操作为例进行说明的。The OpenFlow controller may be referred to as an OF controller in the present disclosure, and may also be referred to as an OpenFlow controller directly. The OpenFlow switch may be referred to as an OF switch, or may be directly referred to as an OpenFlow controller. For open flow switches). FIG. 3 is an example in which the open flow controller performs the above operation as an example.
在上述实施例中,由于在开放流控制器与开放流交换机进行了匹配信息支持能力协商之后,由开放流控制器向开放流交换机发送匹配信息指令,以使开放流交换机可以按照匹配信息指令从所述开放流交换机接收到的报文提取与接收到的报文相对应的匹配信息,因此,开放流控制器接收到的第一匹配信息是满足开放流交换机和开放流控制器之间的互通性和兼容性的。因此,可以解决相关技术中开放流交换机和开放流控制器之间的互通性和兼容性的问题,达到保证开放流交换机和开放流控制器之间互联互通效果。In the above embodiment, after the matching information support capability negotiation is performed between the OpenFlow controller and the OpenFlow switch, the OpenFlow controller sends a matching information command to the OpenFlow switch, so that the OpenFlow switch can follow the matching information command. The packet received by the OpenFlow switch extracts the matching information corresponding to the received packet. Therefore, the first matching information received by the OpenFlow controller meets the interworking between the OpenFlow switch and the OpenFlow controller. Sex and compatibility. Therefore, the problem of interoperability and compatibility between the OpenFlow switch and the OpenFlow controller in the related art can be solved, and the interconnection and interworking between the OpenFlow switch and the OpenFlow controller can be ensured.
在一实施例中,所述开放流控制器与所述开放流交换机进行匹配信息支持 能力协商,包括:向所述开放流交换机发送协商请求消息,其中,所述协商请求消息用于请求所述开放流交换机将自身所支持的匹配信息上报给所述开放流控制器;在所述开放流交换机支持匹配信息发送的情况下,接收所述开放流交换机根据所述协商请求消息发送的所述开放流交换机所支持的匹配信息;根据所述开放流交换机所支持的匹配信息和所述开放流控制器所支持的匹配信息确定所述开放流交换机和所述开放流控制器均支持的匹配信息。In an embodiment, the OpenFlow controller performs the matching information support capability negotiation with the OpenFlow switch, and includes: sending a negotiation request message to the OpenFlow switch, where the negotiation request message is used to request the The open flow switch reports the matching information supported by the open flow switch to the open flow controller; and when the open flow switch supports the sending of the matching information, receiving the open that is sent by the open flow switch according to the negotiation request message. Matching information supported by the flow switch; determining matching information supported by the OpenFlow switch and the OpenFlow controller according to the matching information supported by the OpenFlow switch and the matching information supported by the OpenFlow controller.
在一实施例中,向所述开放流交换机发送匹配信息指令包括:在所述开放流控制器支持所述匹配信息指令发送的情况下,向所述开放流交换机发送第一流表,其中,所述第一流表的扩展的第一预定消息中携带所述匹配信息指令。所述第一流表用于指示所述开放流交换机在确定所述开放流交换机所支持的匹配信息包括所述匹配信息指令所指示的匹配信息时,创建与所述第一流表对应的第二流表,所述第二流表的扩展的第二预定消息中携带所述匹配信息指令。In an embodiment, the sending the matching information instruction to the OpenFlow switch includes: sending, by the OpenFlow controller, the first flow table to the OpenFlow switch, where the OpenFlow controller supports the sending of the matching information command, where The extended first instruction message of the first flow table carries the matching information instruction. The first flow table is configured to instruct the open flow switch to create a second flow corresponding to the first flow table when determining that the matching information supported by the open flow switch includes the matching information indicated by the matching information instruction The table, the extended second predetermined message of the second flow table carries the matching information instruction.
在一实施例中,在向所述开放流交换机发送第一流表之后,所述方法还包括:接收来自所述开放流交换机的错误响应消息,其中,所述错误响应消息用于表示所述开放流交换机所支持的匹配信息不包括所述匹配信息指令所指示的匹配信息。In an embodiment, after transmitting the first flow table to the open flow switch, the method further comprises: receiving an error response message from the open flow switch, wherein the error response message is used to indicate the opening The matching information supported by the flow switch does not include the matching information indicated by the matching information instruction.
在一实施例中,在向所述开放流交换机发送协商请求消息之后,所述方法还包括:在所述开放流交换机不支持匹配信息发送的情况下,向所述开放流交换机发送第一流表,其中,所述第一流表中不携带所述匹配信息指令。所述第一流表用于指示所述开放流交换机按照第一预定缺省处理方式提取与所述报文对应的第二匹配信息,并将第二匹配信息发送给所述开放流控制器。接收所述开放流交换机发送的第二匹配信息,其中,所述第二匹配信息是由所述开放流交换机按照第一预定缺省处理方式从所述接收的报文提取的与所述接收到的报文对应的匹配信息。In an embodiment, after the sending the negotiation request message to the OpenFlow switch, the method further includes: sending, by the OpenFlow switch, the first flow table to the OpenFlow switch if the OpenFlow switch does not support the sending of the matching information. The first flow table does not carry the matching information instruction. The first flow table is configured to instruct the open flow switch to extract second matching information corresponding to the packet according to a first predetermined default processing manner, and send the second matching information to the open flow controller. Receiving, by the OpenFlow switch, second matching information that is sent by the OpenFlow switch, where the second matching information is extracted from the received packet by the OpenFlow switch according to a first predetermined default processing manner, and the received Match information corresponding to the message.
在一实施例中,在根据所述开放流交换机所支持的匹配信息和所述开放流控制器所支持的匹配信息确定所述开放流交换机和所述开放流控制器均支持的匹配信息之后,所述方法还包括:在所述开放流控制器不支持所述匹配信息指令发送的情况下,向所述开放流交换机发送第一流表,其中,所述第一流表中不携带所述匹配信息指令。所述第一流表用于指示所述开放流交换机按照第二预定缺省处理方式提取与所述报文对应的第三匹配信息,并将第三匹配信息发 送给所述开放流控制器。接收所述开放流交换机发送的第三匹配信息,其中,所述所述第三匹配信息是由所述开放流交换机按照第二预定缺省处理方式从所述接收的报文提取的与所述接收到的报文对应的匹配信息。In an embodiment, after determining matching information supported by the OpenFlow switch and the OpenFlow controller according to the matching information supported by the OpenFlow switch and the matching information supported by the OpenFlow controller, The method further includes: sending, to the open flow switch, a first flow table, where the open flow controller does not support the sending of the matching information command, where the first flow table does not carry the matching information instruction. The first flow table is configured to instruct the open flow switch to extract third matching information corresponding to the packet according to a second predetermined default processing manner, and send the third matching information to the open flow controller. Receiving, by the open flow switch, third matching information, where the third matching information is extracted by the OpenFlow switch from the received message according to a second predetermined default processing manner, Match information corresponding to the received message.
在一实施例中,在开放流控制器与开放流交换机进行了匹配信息支持能力协商之后,所述开放流控制器向所述开放流交换机发送所述匹配信息指令。In an embodiment, after the OpenFlow controller and the OpenFlow switch perform the matching information support capability negotiation, the OpenFlow controller sends the matching information instruction to the OpenFlow switch.
实施例三Embodiment 3
下面结合实例对本公开进行说明:The disclosure will be described below with reference to examples:
实例1Example 1
图4是一种OF控制器和OF交换机匹配信息能力协商时序图。如图4所示,本实施例中,OF控制器和OF交换机匹配信息能力协商过程包括以下三个步骤:FIG. 4 is a timing chart of the matching information capability negotiation between the OF controller and the OF switch. As shown in FIG. 4, in this embodiment, the OF controller and the OF switch matching information capability negotiation process includes the following three steps:
步骤1,OF控制器是协商的主动发起方,在OF通道建立后(对应于图4中的S401和S402),向OF交换机发送OFPMP_TABLE_FEAUTRES请求(对应于协商请求消息)来查询OF交换机的流表能力(对应于开放流交换机所支持的匹配信息,对应于图4中的S403)。Step 1, the OF controller is the negotiated active initiator. After the OF channel is established (corresponding to S401 and S402 in FIG. 4), the OFMPP_TABLE_FEAUTRES request (corresponding to the negotiation request message) is sent to the OF switch to query the flow table of the OF switch. Capability (corresponding to matching information supported by the OpenFlow switch, corresponding to S403 in FIG. 4).
步骤2,OF交换机收到请求后,将本设备支持的流表能力通过OFPMP_TABLE_FEAUTRES响应消息上报给OF控制器(对应于图4中的S404)。本实施例中,OF交换机支持的流表能力中包括匹配信息能力,该能力通过扩展experiment消息实现(对应于第一流表的扩展的第一预定消息)。扩展的experiment消息格式如下:Step 2: After receiving the request, the OF switch forwards the flow table capability supported by the device to the OF controller through the OFMPP_TABLE_FEAUTRES response message (corresponding to S404 in FIG. 4). In this embodiment, the flow table capability supported by the OF switch includes a matching information capability, which is implemented by extending an experiment message (corresponding to the extended first predetermined message of the first flow table). The extended experiment message format is as follows:
Figure PCTCN2019077852-appb-000001
Figure PCTCN2019077852-appb-000001
其中扩展子类型exp_type定义如下:The extension subtype exp_type is defined as follows:
Figure PCTCN2019077852-appb-000002
Figure PCTCN2019077852-appb-000002
Figure PCTCN2019077852-appb-000003
Figure PCTCN2019077852-appb-000003
其中变长字段oxm_fields代表OF交换机当前支持上送的匹配信息集合,每个oxm_fields类型代表一个匹配信息。oxm_fields的内容同协议规范定义的struct ofp_match结构中的oxm_fields语义一致。The variable length field oxm_fields represents the matching information set currently supported by the OF switch, and each oxm_fields type represents a matching information. The content of oxm_fields is consistent with the oxm_fields semantics in the struct ofp_match structure defined by the protocol specification.
本实施例中,OF交换机回复OFPMP_TABLE_FEAUTRES响应消息时,携带的上送匹配信息包括如下oxm_field,如表1所示:In this embodiment, when the OF switch replies to the OFMPP_TABLE_FEAUTRES response message, the uplink matching information carried includes the following oxm_field, as shown in Table 1:
表1Table 1
Figure PCTCN2019077852-appb-000004
Figure PCTCN2019077852-appb-000004
为描述方便,本实施例后面简称OF交换机的上送匹配信息能力集合为{0,1,2,3,5,11,12,14}。For convenience of description, the set of uplink matching information capabilities of the OF switch is referred to as {0, 1, 2, 3, 5, 11, 12, 14}.
步骤3,OF控制器收到OFPMP_TABLE_FEAUTRES响应消息后,将响应消息中的匹配信息能力与本地支持的匹配信息能力进行比较。本实施例中,OF 控制器的匹配信息能力集合如表2所示:Step 3: After receiving the OFMPP_TABLE_FEAUTRES response message, the OF controller compares the matching information capability in the response message with the locally supported matching information capability. In this embodiment, the matching information capability set of the OF controller is as shown in Table 2:
表2Table 2
Figure PCTCN2019077852-appb-000005
Figure PCTCN2019077852-appb-000005
为描述方便,本实施例后面简称OF控制器的匹配信息能力集合为{0,1,2,3,4,5,6,11,12}。经过协商比较,得到OF控制器和OF交换机的共同匹配信息能力集合为{0,1,2,3,5,11,12}。For convenience of description, the matching information capability set of the OF controller is referred to as {0, 1, 2, 3, 4, 5, 6, 11, 12}. After negotiation and comparison, the common matching information capability set of the OF controller and the OF switch is obtained as {0, 1, 2, 3, 5, 11, 12}.
下面结合图5介绍OF控制器下发携带匹配信息指令的流表以及OF交换机处理流表的过程,包括以下四个步骤:The following describes the process of the OF controller sending the flow table carrying the matching information command and the process of processing the flow table by the OF switch, including the following four steps:
步骤501,OF控制器下发一个流表(对应于第一流表),该流表包括以下信息(对应于图5中的1、2、3):(1)匹配以太网类型0x0806;(2)匹配信息指令,指令中要求精确上送匹配信息集合为{0,11};(3)OFPIT_APPLY_ACTIONS指令,携带一个转发操作(OFPAT_OUTPUT)行为,端口号为控制器预留端口,通过该端口号将数据包发送给控制器(CONTROLLER)。其中匹配信息指令采用扩展experiment消息实现。扩展的experiment消息格式如下:Step 501: The OF controller sends a flow table (corresponding to the first flow table), where the flow table includes the following information (corresponding to 1, 2, and 3 in FIG. 5): (1) matching Ethernet type 0x0806; Matching information instruction, the instruction requires accurate delivery of the matching information set to {0, 11}; (3) OFPIT_APPLY_ACTIONS instruction, carrying a forwarding operation (OFPAT_OUTPUT) behavior, the port number is reserved by the controller, and the port number will be The packet is sent to the controller (CONTROLLER). The matching information instruction is implemented by using an extended experiment message. The extended experiment message format is as follows:
Figure PCTCN2019077852-appb-000006
Figure PCTCN2019077852-appb-000006
Figure PCTCN2019077852-appb-000007
Figure PCTCN2019077852-appb-000007
其中变长字段oxm_fields同上述struct ofp_instruction_experiment_upsend中的oxm_fields含义一致。The variable length field oxm_fields has the same meaning as oxm_fields in the above struct ofp_instruction_experiment_upsend.
步骤502,OF交换机收到这个流表后,首先对匹配信息指令的有效性进行检查,由于本地支持的匹配信息能力集合为{0,1,2,3,5,11,12,14},{0,11}属于该能力集合,所以判断下发流表中携带的匹配信息能力有效,本地创建对应的流表项。Step 502: After receiving the flow table, the OF switch first checks the validity of the matching information command, because the locally supported matching information capability set is {0, 1, 2, 3, 5, 11, 12, 14}, {0, 11} belongs to the capability set. Therefore, it is determined that the matching information carried in the flow table is valid, and the corresponding flow entry is locally created.
步骤503,当OF交换机收到以太网类型为0x0806的报文,按照流表项中的匹配信息指令提取匹配信息{0,11}封装在packet-in消息的match字段中上送OF控制器。Step 503: When the OF switch receives the packet with the Ethernet type 0x0806, extracts the matching information {0, 11} according to the matching information command in the flow entry, and encapsulates it in the match field of the packet-in message to the OF controller.
步骤504,OF控制器收到上送的packet-in消息后,基于这些匹配信息可以进行相应的处理,比如进行地址解析协议(Adress resolution protocol,arp)学习,具体处理逻辑由OF控制器决定。Step 504: After receiving the sent packet-in message, the OF controller can perform corresponding processing based on the matching information, for example, performing an Adress resolution protocol (ARP) learning, and the specific processing logic is determined by the OF controller.
本实施例存在另外一种情况,即如果控制器下发的指令中携带的匹配信息集合超过了OF交换机支持的能力范围,OF交换机可以选择回复一个错误信息给OF控制器。下面结合图6来介绍这个过程,包括以下三个步骤:There is another case in this embodiment, that is, if the set of matching information carried in the instruction sent by the controller exceeds the capability range supported by the OF switch, the OF switch may choose to reply an error message to the OF controller. The process is described below in conjunction with Figure 6, which includes the following three steps:
步骤601,OF控制器下发一个流表,该流表包括以下信息(对应于图6中的1、2、3):(1)匹配以太网类型0x0806;(2)上送匹配信息指令,指令中要求精确上送匹配信息集合为{0,7};(3)OFPIT_APPLY_ACTIONS指令,携带一个OFPAT_OUTPUT行为,端口号为控制器预留端口CONTROLLER。Step 601, the OF controller sends a flow table, the flow table includes the following information (corresponding to 1, 2, 3 in Figure 6): (1) matching Ethernet type 0x0806; (2) sending matching information instructions, The instruction requires that the matching information set is accurately sent to {0, 7}; (3) the OFPIT_APPLY_ACTIONS instruction carries an OFPAT_OUTPUT behavior, and the port number is the controller reserved port CONTROLLER.
步骤602,OF交换机收到这个流表后,首先对匹配信息指令的有效性进行检查,由于本地支持的上送匹配信息能力集合为{0,1,2,3,5,11,12,14},而{0,7}不属于该能力集合,所以判断下发流表中携带的匹配信息能力无效,返回一个错误(error)消息给控制器。该错误信息的错误类型为OFPET_BAD_INSTRUCTION,错误代码采用新扩展的OFPBIC_UNSUP_UNSEND_FIELD,表示不支持OF控制器设置的上送匹配信息。其中OFPBIC_UNSUP_UNSEND_FIELD扩展定义为OFPBIC_UNSUP_UNSEND_FIELD=10:Step 602: After receiving the flow table, the OF switch first checks the validity of the matching information command, because the locally supported matching information capability set is {0, 1, 2, 3, 5, 11, 12, 14 }, and {0,7} does not belong to the capability set, so it is judged that the matching information carried in the flow table is invalid, and an error message is returned to the controller. The error type of the error message is OFPET_BAD_INSTRUCTION, and the error code adopts the newly extended OFPBIC_UNSUP_UNSEND_FIELD, indicating that the upload matching information set by the OF controller is not supported. The OFPIC_UNSUP_UNSEND_FIELD extension is defined as OFPBIC_UNSUP_UNSEND_FIELD=10:
Figure PCTCN2019077852-appb-000008
Figure PCTCN2019077852-appb-000008
步骤603,OF控制器收到上送的错误消息后,知道下发的流表的匹配信息能力超过了OF交换机的能力范围,此时控制器可以选择向上层业务继续反馈这个错误,具体处理逻辑由OF控制器决定。Step 603, after receiving the error message sent by the OF controller, the OF controller knows that the matching information of the delivered flow table exceeds the capability range of the OF switch. At this time, the controller may select the upper layer service to continue to feed back the error, and the specific processing logic Determined by the OF controller.
实例2Example 2
图7是另一种OF控制器和OF交换机匹配信息能力协商时序图。如图7所示,本实施例中,OF控制器和OF交换机匹配信息能力协商过程包括以下三个步骤:FIG. 7 is a timing chart of another OF controller and OF switch matching information capability negotiation. As shown in FIG. 7, in this embodiment, the OF controller and the OF switch matching information capability negotiation process includes the following three steps:
步骤1,OF控制器是协商的主动发起方,在OF通道建立后(对应于图7中的S701和S702),向OF交换机发送OFPMP_TABLE_FEAUTRES请求来查询OF交换机的流表能力(对应于图7中的S703)。Step 1, the OF controller is the negotiated active initiator. After the OF channel is established (corresponding to S701 and S702 in FIG. 7), the OFMPP_TABLE_FEAUTRES request is sent to the OF switch to query the flow table capability of the OF switch (corresponding to FIG. 7 S703).
步骤2,OF交换机收到请求后,将本设备支持的流表能力通过OFPMP_TABLE_FEAUTRES响应消息上报给OF控制器(对应于图7中的S704)。本实施例中,OF交换机支持的流表能力中包括匹配信息能力,该能力通过扩展experiment消息实现,消息格式同实施实例1。Step 2: After receiving the request, the OF switch forwards the flow table capability supported by the device to the OF controller through the OFMPP_TABLE_FEAUTRES response message (corresponding to S704 in FIG. 7). In this embodiment, the flow table capability supported by the OF switch includes the matching information capability, and the capability is implemented by extending the experiment message, and the message format is the same as that of the implementation example 1.
本实例中,OF交换机回复OFPMP_TABLE_FEAUTRES响应消息时,携带的上送匹配信息如表3所示:In this example, when the OF switch replies to the OFPMP_TABLE_FEAUTRES response message, the matching information carried in the OF switch is as shown in Table 3:
表3table 3
上送匹配信息类型Send matching information type 数值Numerical value 含义meaning
OFPXMT_OFB_IN_PORTOFPXMT_OFB_IN_PORT 00 交换机入端口Switch in port
OFPXMT_OFB_TCP_DSTOFPXMT_OFB_TCP_DST 1414 TCP目的端口号TCP destination port number
为描述方便,本实施例后面简称OF交换机的上送匹配信息能力集合为{0,14}。For convenience of description, the capability of the uplink matching information capability of the OF switch is hereinafter referred to as {0, 14}.
步骤3,OF控制器收到OFPMP_TABLE_FEAUTRES响应消息后,将响应消息中的匹配信息能力与本地支持的匹配信息能力进行比较。本实施例中,OF控制器的匹配信息能力集合如表4所示:Step 3: After receiving the OFMPP_TABLE_FEAUTRES response message, the OF controller compares the matching information capability in the response message with the locally supported matching information capability. In this embodiment, the matching information capability set of the OF controller is as shown in Table 4:
表4Table 4
上送匹配信息类型Send matching information type 数值Numerical value 含义meaning
OFPXMT_OFB_IN_PHY_PORTOFPXMT_OFB_IN_PHY_PORT 11 交换机物理入端口Switch physical in port
OFPXMT_OFB_METADATAOFPXMT_OFB_METADATA 22 流表项之间的元数据Metadata between flow entries
OFPXMT_OFB_ETH_DSTOFPXMT_OFB_ETH_DST 33 以太网目的地址Ethernet destination address
OFPXMT_OFB_ETH_SRCOFPXMT_OFB_ETH_SRC 44 以太网源地址Ethernet source address
OFPXMT_OFB_ETH_TYPEOFPXMT_OFB_ETH_TYPE 55 以太网帧类型Ethernet frame type
OFPXMT_OFB_VLAN_VIDOFPXMT_OFB_VLAN_VID 66 VLAN IDVLAN ID
为描述方便,本实施例后面简称OF控制器的匹配信息能力集合为{1,2,3,4,5,6}。经过协商比较,发现两者没有共同的匹配信息能力集。此时OF控制器认为当前的OF交换机不可管控,可以选择关闭当前的OF通道连接,具体处理逻辑由OF控制器决定。For convenience of description, the matching information capability set of the OF controller is referred to as {1, 2, 3, 4, 5, 6}. After negotiation and comparison, it is found that there is no common set of matching information capabilities. At this time, the OF controller considers that the current OF switch is uncontrollable, and can choose to close the current OF channel connection. The specific processing logic is determined by the OF controller.
实例3Example 3
图8是又一种OF控制器和OF交换机匹配信息能力协商时序图。如图8所示,本实施例中,OF控制器和OF交换机匹配信息能力协商过程包括以下三个步骤:FIG. 8 is a timing chart of another OF controller and OF switch matching information capability negotiation. As shown in FIG. 8, in this embodiment, the OF controller and the OF switch matching information capability negotiation process includes the following three steps:
步骤1,OF控制器是协商的主动发起方,在OF通道建立后(对应于图8中的S801和S802),向OF交换机发送OFPMP_TABLE_FEAUTRES请求来查询OF交换机的流表能力(对应于图8中的S803)。Step 1, the OF controller is the negotiated active initiator. After the OF channel is established (corresponding to S801 and S802 in FIG. 8), the OFPMP_TABLE_FEAUTRES request is sent to the OF switch to query the flow table capability of the OF switch (corresponding to FIG. 8). S803).
步骤2,OF交换机收到请求后,将本设备支持的流表能力通过OFPMP_TABLE_FEAUTRES响应消息上报给OF控制器(对应于图8中的S804)。本实施例中,OF交换机支持的流表能力中包括匹配信息能力,该能力通过扩展experiment消息实现,消息格式同实例1。Step 2: After receiving the request, the OF switch forwards the flow table capability supported by the device to the OF controller through the OFMPP_TABLE_FEAUTRES response message (corresponding to S804 in FIG. 8). In this embodiment, the flow table capability supported by the OF switch includes the matching information capability, and the capability is implemented by extending the experiment message, and the message format is the same as that of the instance 1.
本实例中,OF交换机回复OFPMP_TABLE_FEAUTRES响应消息时,携带 的上送匹配信息如表5所示:In this example, when the OF switch replies to the OFPMP_TABLE_FEAUTRES response message, the matching information carried in the OF switch is as shown in Table 5:
表5table 5
Figure PCTCN2019077852-appb-000009
Figure PCTCN2019077852-appb-000009
为描述方便,本实施例后面简称OF交换机的上送匹配信息能力集合为{0,1,2}。For convenience of description, the capability of the uplink matching information capability of the OF switch is hereinafter referred to as {0, 1, 2}.
步骤3,OF控制器收到OFPMP_TABLE_FEAUTRES响应消息后,由于本实施例中,OF控制器不支持匹配信息能力协商,所以不会进行匹配信息能力协商。后续OF控制器下发的流表项中不会携带匹配信息指令。当OF交换机上送数据报文给OF控制器时,发现对应流表项没有携带匹配信息指令,则按照本地缺省的处理逻辑提取匹配信息进行上送。这样,对于不支持设置匹配信息的OF控制器可以和支持设置匹配信息的OF交换机正常交互packet-in消息,不存在兼容性问题。Step 3: After the OF controller receives the OFMPP_TABLE_FEAUTRES response message, since the OF controller does not support the matching information capability negotiation in this embodiment, the matching information capability negotiation is not performed. The matching information command is not carried in the flow entry sent by the subsequent OF controller. When the OF switch sends a data packet to the OF controller, it finds that the corresponding flow entry does not carry the matching information command, and then the matching information is extracted according to the local default processing logic. In this way, the OF controller that does not support setting the matching information can normally exchange the packet-in message with the OF switch that supports setting the matching information, and there is no compatibility problem.
实例4Example 4
图9是还一种OF控制器和OF交换机匹配信息能力协商时序图。如图9所示,本实施例中,OF控制器和OF交换机匹配信息能力协商过程包括以下三个步骤:FIG. 9 is a timing chart for further matching the capability information of the OF controller and the OF switch. As shown in FIG. 9, in this embodiment, the OF controller and the OF switch matching information capability negotiation process include the following three steps:
步骤1,OF控制器是协商的主动发起方,在OF通道建立后(对应于图9中的S901和S902),向OF交换机发送OFPMP_TABLE_FEAUTRES请求来查询OF交换机的流表能力(对应于图9中的S903)。Step 1, the OF controller is the negotiated active initiator. After the OF channel is established (corresponding to S901 and S902 in FIG. 9), the OFPMP_TABLE_FEAUTRES request is sent to the OF switch to query the flow table capability of the OF switch (corresponding to FIG. 9). S903).
步骤2,OF交换机收到请求报文后,将本设备支持的流表能力通过OFPMP_TABLE_FEAUTRES响应消息上报给OF控制器(对应于图9中的S904)。本实施例中,由于OF交换机不支持流表项中携带匹配信息指令,所以回复的响应报文中不包括匹配信息能力。Step 2: After receiving the request message, the OF switch forwards the flow table capability supported by the device to the OF controller through the OFMPP_TABLE_FEAUTRES response message (corresponding to S904 in FIG. 9). In this embodiment, since the OF switch does not support the matching information command in the flow entry, the response message of the reply does not include the capability of matching information.
步骤3,OF控制器收到OFPMP_TABLE_FEAUTRES响应消息后,发现OF交换机不支持设置匹配信息能力,所以不会进行匹配信息能力协商。后续OF控制器下发的流表项中也不会携带匹配信息指令。Step 3: After receiving the OFPMP_TABLE_FEAUTRES response message, the OF controller finds that the OF switch does not support the ability to set the matching information, so the matching information capability negotiation is not performed. The matching information command is not carried in the flow entry sent by the subsequent OF controller.
当OF交换机上送数据报文给OF控制器时,发现对应流表项没有携带匹配信息指令,则按照本地缺省的处理逻辑提取匹配信息进行上送。When the OF switch sends a data packet to the OF controller, it finds that the corresponding flow entry does not carry the matching information command, and then the matching information is extracted according to the local default processing logic.
这样,对于不支持设置匹配信息的OF交换机可以和支持设置匹配信息的OF控制器正常交互packet-in消息,不存在兼容性问题。In this way, the OF switch that does not support setting the matching information can normally exchange the packet-in message with the OF controller that supports setting the matching information, and there is no compatibility problem.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到根据上述实施例的方法可借助软件加通用硬件平台的方式来实现,也可以通过硬件实现,本公开的技术方案本质上或者说对相关技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如只读存储器(Read-Only Memory,ROM)/随机存取存储器(Random Access Memory,RAM)、磁碟、光盘)中,包括多个指令用以使得一台终端设备(可以是手机,计算机,服务器,或者网络设备等)执行本公开一个或多个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the foregoing embodiment can be implemented by means of software plus a general hardware platform, or can be implemented by hardware, and the technical solution of the present disclosure is essentially The part that contributes to the related technology can be embodied in the form of a software product stored in a storage medium (such as Read-Only Memory (ROM)/Random Access Memory (Random Access Memory). The RAM, the disk, and the optical disk include a plurality of instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method described in one or more embodiments of the present disclosure.
实施例四Embodiment 4
在本实施例中还提供了一种报文匹配信息的发送装置,该装置用于实现上述实施例及实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。以下实施例所描述的装置可以以软件来实现,也可以以硬件,或者软件和硬件的组合实现。In this embodiment, a device for transmitting message matching information is also provided, which is used to implement the foregoing embodiments and implementation manners, and has not been described again. As used below, the term "module" may implement a combination of software and/or hardware of a predetermined function. The apparatus described in the following embodiments may be implemented in software, or in hardware, or a combination of software and hardware.
图10是根据本公开实施例的一种报文匹配信息的发送装置的结构框图,如图10所示,该装置包括如下模块:提取模块1002,设置为按照匹配信息指令从所述开放流交换机接收到的报文提取与所述开放流交换机接收到的报文对应的第一匹配信息,其中,所述匹配信息指令是在所述开放流交换机与开放流控制器进行了匹配信息支持能力协商之后,由所述开放流控制器所指示的指令;第一发送模块1004,连接至上述提取模块1002,设置为将提取的所述第一匹配信息发送给所述开放流控制器。10 is a structural block diagram of a device for transmitting message matching information according to an embodiment of the present disclosure. As shown in FIG. 10, the device includes the following module: an extracting module 1002, configured to follow the matching information instruction from the OpenFlow switch. The received message extracts first matching information corresponding to the packet received by the OpenFlow switch, where the matching information command is that the OpenFlow switch and the OpenFlow controller perform matching information support capability negotiation. Thereafter, the instruction indicated by the OpenFlow controller; the first sending module 1004 is connected to the extracting module 1002, and configured to send the extracted first matching information to the OpenFlow controller.
在一实施例中,上述装置还包括:第一协商模块,设置为在按照匹配信息指令从所述开放流交换机接收到的报文提取与开放流交换机接收到的报文对应的第一匹配信息之前,通过如下方式与所述开放流控制器进行所述匹配信息支持能力协商:接收来自所述开放流控制器的协商请求消息,其中,所述协商请求消息用于请求所述开放流交换机将自身所支持的匹配信息上报给所述开放流控制器;在所述开放流交换机支持匹配信息发送的情况下,根据所述协商请求 消息将所述开放流交换机所支持的匹配信息发送给所述开放流控制器,以指示所述开放流控制器根据所述开放流交换机所支持的匹配信息和所述开放流控制器所支持的匹配信息确定所述开放流交换机和所述开放流控制器均支持的匹配信息。In an embodiment, the apparatus further includes: a first negotiation module, configured to extract first matching information corresponding to the packet received by the OpenFlow switch in the message received from the OpenFlow switch according to the matching information instruction. The negotiation information support capability negotiation is performed with the OpenFlow controller by: receiving a negotiation request message from the OpenFlow controller, where the negotiation request message is used to request the OpenFlow switch to The matching information supported by the OpenFlow controller is sent to the OpenFlow controller, and the matching information supported by the OpenFlow switch is sent to the OpenFlow switch according to the negotiation request message. Opening a flow controller to instruct the open flow controller to determine, according to the matching information supported by the OpenFlow switch and the matching information supported by the OpenFlow controller, that the OpenFlow switch and the OpenFlow controller are both Supported matching information.
在一实施例中,上述装置还设置为:在根据所述协商请求消息将所述开放流交换机所支持的匹配信息发送给所述开放流控制器之后、且在所述按照匹配信息指令从所述开放流交换机接收到的报文提取与开放流交换机接收到的报文对应的第一匹配信息之前,接收来自上述开放流控制器的第一流表,其中,在所述开放流控制器支持所述匹配信息指令发送的情况下,所述第一流表的扩展的第一预定消息中携带所述匹配信息指令;在确定所述第一流表的扩展的第一预定消息中携带所述匹配信息指令,且在所述开放流交换机所支持的匹配信息包括所述匹配信息指令所指示的匹配信息的情况下,创建与所述第一流表对应的第二流表,其中,在所述第二流表的扩展的第二预定消息中携带所述匹配信息指令。In an embodiment, the foregoing apparatus is further configured to: after transmitting the matching information supported by the OpenFlow switch to the OpenFlow controller according to the negotiation request message, and in the following Before receiving the first matching information corresponding to the packet received by the OpenFlow switch, the packet received by the OpenFlow switch receives the first flow table from the OpenFlow controller, where the OpenFlow controller supports the In the case that the matching information instruction is sent, the extended first predetermined message of the first flow table carries the matching information instruction; and the first predetermined message that determines the extension of the first flow table carries the matching information instruction And in a case that the matching information supported by the OpenFlow switch includes the matching information indicated by the matching information instruction, creating a second flow table corresponding to the first flow table, where the second flow is The extended second predetermined message of the table carries the matching information instruction.
在一实施例中,上述装置还设置为,在按照匹配信息指令从所述开放流交换机接收到的报文提取与开放流交换机接收到的报文对应的第一匹配信息之前,从所述第二流表中扩展的所述第二预定消息中获取所述匹配信息指令。In an embodiment, the apparatus is further configured to: before extracting, from the packet received by the OpenFlow switch, the first matching information corresponding to the packet received by the OpenFlow switch according to the matching information command, from the foregoing The matching information instruction is obtained in the second predetermined message extended in the second flow table.
在一实施例中,上述装置还设置为,在接收来自上述开放流控制器的第一流表之后,在所述开放流交换机所支持的匹配信息不包括所述匹配信息指令所指示的匹配信息的情况下,向所述开放流控制器回复错误响应消息。In an embodiment, the apparatus is further configured to: after receiving the first flow table from the OpenFlow controller, the matching information supported by the OpenFlow switch does not include the matching information indicated by the matching information instruction. In the case, an error response message is replied to the OpenFlow controller.
在一实施例中,上述装置还设置为:在接收来自上述开放流控制器的协商请求消息之后,在所述开放流交换机不支持匹配信息发送的情况下,接收来自所述开放流控制器的第一流表,其中,所述第一流表中不携带所述匹配信息指令;按照第一预定缺省处理方式提取与所述报文对应的第二匹配信息,并将所述第二匹配信息发送给所述开放流控制器。In an embodiment, the apparatus is further configured to: after receiving the negotiation request message from the OpenFlow controller, receive the information from the OpenFlow controller if the OpenFlow switch does not support the transmission of the matching information. a first flow table, wherein the first flow table does not carry the matching information instruction; the second matching information corresponding to the message is extracted according to a first predetermined default processing manner, and the second matching information is sent Give the open flow controller.
在一实施例中,上述装置还设置为,在根据所述协商请求消息将所述开放流交换机所支持的匹配信息发送给所述开放流控制器之后、且在所述按照匹配信息指令从所述开放流交换机接收到的报文提取与开放流交换机接收到的报文对应的第一匹配信息之前,接收来自所述开放流控制器的第一流表,其中,在 所述开放流控制器不支持所述匹配信息指令发送的情况下,所述第一流表中不携带所述匹配信息指令;在确定所述第一流表中不携带所述匹配信息指令的情况下,按照第二预定缺省处理方式提取与所述报文对应的第三匹配信息,并将所述第三匹配信息发送给所述开放流控制器。In an embodiment, the apparatus is further configured to, after transmitting the matching information supported by the OpenFlow switch to the OpenFlow controller according to the negotiation request message, and in the following Receiving, by the OpenFlow switch, the first flow information from the OpenFlow controller before extracting the first matching information corresponding to the packet received by the OpenFlow switch, where the OpenFlow controller does not If the matching information instruction is sent, the first flow table does not carry the matching information command; and if the first flow table does not carry the matching information command, according to the second predetermined default The processing manner extracts third matching information corresponding to the packet, and sends the third matching information to the OpenFlow controller.
在一实施例中,上述装置是可以应用于开放流交换机中的,也就是说,由开放流交换机按照匹配信息指令从所述开放流交换机接收到的报文提取与开放流交换机接收到的报文对应的第一匹配信息;并且由该开放流交换机将提取的所述第一匹配信息发送给所述开放流控制器。In an embodiment, the foregoing apparatus is applicable to an OpenFlow switch, that is, the packet received by the OpenFlow switch from the OpenFlow switch according to the matching information command is extracted and received by the OpenFlow switch. The first matching information corresponding to the text; and the extracted first matching information is sent by the OpenFlow switch to the OpenFlow controller.
实施例五Embodiment 5
在本实施例中还提供了一种报文匹配信息的接收装置,图11是根据本公开实施例的一种报文匹配信息的发送装置的结构框图,如图11所示,该装置包括如下模块:In this embodiment, a device for receiving message matching information is further provided. FIG. 11 is a structural block diagram of a device for transmitting message matching information according to an embodiment of the present disclosure. As shown in FIG. Module:
第二发送模块1102,设置为在所述开放流控制器与开放流交换机进行了匹配信息支持能力协商之后,向所述开放流交换机发送匹配信息指令。The second sending module 1102 is configured to send a matching information command to the OpenFlow switch after the OpenFlow controller and the OpenFlow switch perform the matching information support capability negotiation.
接收模块1104,设置为接收所述开放流交换机发送的第一匹配信息,其中,所述第一匹配信息由所述开放流交换机按照所述匹配信息指令从接收到的报文中提取的与所述接收到的报文对应的匹配信息。The receiving module 1104 is configured to receive the first matching information sent by the OpenFlow switch, where the first matching information is extracted by the OpenFlow switch from the received message according to the matching information command. The matching information corresponding to the received message.
在一实施例中,所述匹配信息指令用于所述开放流交换机在接收到报文后,按照所述匹配信息指令从所述开放流交换机接收到的报文提取与所述报文对应的第一匹配信息,并将所述第一匹配信息发送给所述开放流控制器。In an embodiment, the matching information command is used by the OpenFlow switch to extract, according to the matching information command, a packet received from the OpenFlow switch according to the matching information command, corresponding to the packet, after receiving the packet. First matching information, and transmitting the first matching information to the OpenFlow controller.
在一实施例中,上述装置还包括:第二协商模块,设置为在向所述开放流交换机发送匹配信息指令之前,通过如下方式与所述开放流交换机进行匹配信息支持能力协商:向所述开放流交换机发送协商请求消息,其中,所述协商请求消息用于请求所述开放流交换机将自身所支持的匹配信息上报给所述开放流控制器;在所述开放流交换机支持匹配信息发送的情况下,接收所述开放流交换机根据所述协商请求消息发送的所述开放流交换机所支持的匹配信息;根据所述开放流交换机所支持的匹配信息和所述开放流控制器所支持的匹配信息确定所述开放流交换机和所述开放流控制器均支持的匹配信息。In an embodiment, the apparatus further includes: a second negotiation module, configured to perform matching information support capability negotiation with the OpenFlow switch by sending the matching information command to the OpenFlow switch: The OpenFlow switch sends a negotiation request message, where the negotiation request message is used to request the OpenFlow switch to report the matching information supported by the OpenFlow switch to the OpenFlow controller; and the OpenFlow switch supports the sending of the matching information. In the case that the matching information supported by the OpenFlow switch sent by the OpenFlow switch according to the negotiation request message is received; according to the matching information supported by the OpenFlow switch and the matching supported by the OpenFlow controller. The information determines matching information supported by both the OpenFlow switch and the OpenFlow controller.
在一实施例中,上述第二发送模块1102可以通过如下方式向上述开放流交 换机发送匹配信息指令:在上述开放流控制器支持上述匹配信息指令发送时,向上述开放流交换机发送第一流表,其中,所述第一流表的扩展的第一预定消息中携带所述匹配信息指令。所述第一流表用于指示所述开放流交换机在确定所述开放流交换机所支持的匹配信息包括所述匹配信息指令所指示的匹配信息时,创建与所述第一流表对应的第二流表,所述第二流表的扩展的第二预定消息中携带所述匹配信息指令。In an embodiment, the second sending module 1102 may send a matching information command to the OpenFlow switch by: sending the first flow table to the OpenFlow switch when the OpenFlow controller supports sending the matching information command, The extended first predetermined message of the first flow table carries the matching information instruction. The first flow table is configured to instruct the open flow switch to create a second flow corresponding to the first flow table when determining that the matching information supported by the open flow switch includes the matching information indicated by the matching information instruction The table, the extended second predetermined message of the second flow table carries the matching information instruction.
在一实施例中,上述装置还设置为,在向所述开放流交换机发送第一流表之后,接收来自上述开放流交换机的错误响应消息,其中,该错误响应消息用于指示所述开放流交换机所支持的匹配信息不包括所述匹配信息指令所指示的匹配信息。In an embodiment, the apparatus is further configured to: after transmitting the first flow table to the OpenFlow switch, receive an error response message from the OpenFlow switch, where the error response message is used to indicate the OpenFlow switch The supported matching information does not include the matching information indicated by the matching information instruction.
在一实施例中,上述装置还设置为,在向上述开放流交换机发送协商请求消息之后,在上述开放流交换机不支持匹配信息发送的情况下,向上述开放流交换机发送第一流表,其中,该第一流表中不携带所述匹配信息指令。该第一流表用于指示所述开放流交换机按照第一预定缺省处理方式提取与所述报文对应的匹配信息,并发送给所述开放流控制器。上述装置还设置为接收所述开放流交换机发送的第二匹配信息,其中,所述第二匹配信息是由所述开放流交换机按照第一预定缺省处理方式从所述接收的报文提取的与所述接收到的报文对应的匹配信息。In an embodiment, the apparatus is further configured to: after the sending the negotiation request message to the open flow switch, send the first flow table to the open flow switch, if the open flow switch does not support the sending of the matching information, where The matching information instruction is not carried in the first flow table. The first flow table is configured to instruct the open flow switch to extract matching information corresponding to the packet according to a first predetermined default processing manner, and send the matching information to the open flow controller. The device is further configured to receive second matching information that is sent by the OpenFlow switch, where the second matching information is extracted by the OpenFlow switch from the received packet according to a first predetermined default processing manner. Matching information corresponding to the received message.
在一实施例中,上述装置还设置为,在根据所述开放流交换机所支持的匹配信息和所述开放流控制器所支持的匹配信息确定所述开放流交换机和所述开放流控制器均支持的匹配信息之后,上述开放流控制器不支持所述匹配信息指令发送的情况下,向上述开放流交换机发送第一流表,其中,该第一流表中不携带所述匹配信息指令。该第一流表用于指示所述开放流交换机按照第二预定缺省处理方式提取与所述报文对应的匹配信息,并发送给所述开放流控制器。上述装置还设置为接收所述开放流交换机发送的第三匹配信息,其中,所述所述第三匹配信息是由所述开放流交换机按照第二预定缺省处理方式从所述接收的报文提取的与所述接收到的报文对应的匹配信息。In an embodiment, the apparatus is further configured to: determine, according to the matching information supported by the OpenFlow switch and the matching information supported by the OpenFlow controller, that the OpenFlow switch and the OpenFlow controller are both After the matching information is not supported, the OpenFlow controller does not support the sending of the matching information command, and sends the first flow table to the OpenFlow switch, where the matching information command is not carried in the first flow table. The first flow table is configured to instruct the open flow switch to extract matching information corresponding to the packet according to a second predetermined default processing manner, and send the matching information to the open flow controller. The device is further configured to receive the third matching information that is sent by the OpenFlow switch, where the third matching information is received by the OpenFlow switch from the received packet according to a second predetermined default processing manner. The extracted matching information corresponding to the received message.
在一实施例中,上述装置是可以应用于开放流控制器中的,也就是说,在开放流控制器与开放流交换机进行了匹配信息支持能力协商之后,由上述开放流控制器向所述开放流交换机发送所述匹配信息指令。In an embodiment, the foregoing apparatus may be applied to an OpenFlow controller, that is, after the OpenFlow controller and the OpenFlow switch perform the matching information support capability negotiation, the OpenFlow controller refers to the The open flow switch sends the matching information command.
上述一个或多个模块是可以通过软件或硬件来实现的,对于后者,可以通过以下方式实现,但不限于此:上述模块均位于同一处理器中;或者,上述模块以任意组合的形式分别位于不同的处理器中。The one or more modules may be implemented by software or hardware. For the latter, the foregoing may be implemented by, but not limited to, the foregoing modules are all located in the same processor; or, the modules are respectively in any combination. Located in different processors.
实施例六Embodiment 6
本公开的实施例还提供了一种存储介质,该存储介质中存储有计算机程序,其中,该计算机程序被设置为运行时执行上述任一实施例所述的方法。Embodiments of the present disclosure also provide a storage medium having stored therein a computer program, wherein the computer program is configured to execute the method of any of the above embodiments at runtime.
在本实施例中,上述存储介质可以被设置为存储用于执行以下步骤的计算机程序:In the present embodiment, the above storage medium may be arranged to store a computer program for performing the following steps:
S1,按照匹配信息指令从所述开放流交换机接收到的报文提取与所述开放流交换机接收到的报文对应的第一匹配信息,其中,所述匹配信息指令是在所述开放流交换机与开放流控制器进行了匹配信息支持能力协商之后,由所述开放流控制器所指示的指令。S1, extracting first matching information corresponding to the packet received by the OpenFlow switch according to the information received by the OpenFlow switch, where the matching information command is in the OpenFlow switch. An instruction indicated by the OpenFlow controller after the matching information support capability is negotiated with the OpenFlow controller.
S2,将提取的所述第一匹配信息发送给所述开放流控制器。S2. Send the extracted first matching information to the OpenFlow controller.
在一实施例中,存储介质还被设置为存储用于执行以下步骤的计算机程序:In an embodiment, the storage medium is further configured to store a computer program for performing the following steps:
S1,在开放流控制器与开放流交换机进行了匹配信息支持能力协商之后,向所述开放流交换机发送匹配信息指令。S1: After the OpenFlow controller and the OpenFlow switch perform the matching information support capability negotiation, send the matching information instruction to the OpenFlow switch.
S2,接收所述开放流交换机发送的第一匹配信息,其中,所述第一匹配信息由所述开放流交换机按照所述匹配信息指令从接收到的报文中提取的与所述接收到的报文对应的匹配信息。S2. The first matching information sent by the OpenFlow switch is received, where the first matching information is extracted by the OpenFlow switch from the received message according to the matching information command, and the received information is received by the OpenFlow switch. Match information corresponding to the message.
在本实施例中,上述存储介质可以包括但不限于:通用串行总线闪存盘(Universal Serial Bus flash disk,U盘)、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、移动硬盘、磁碟或者光盘等一种或多种可以存储计算机程序的介质。In this embodiment, the foregoing storage medium may include, but is not limited to, a Universal Serial Bus flash disk (U disk), a Read-Only Memory (ROM), and a random access memory (Random). One or more media that can store computer programs, such as Access Memory (RAM), removable hard disk, disk, or optical disk.
图12是根据本公开实施例的一种电子装置的结构框图,如图12所示,本公开的实施例还提供了一种电子装置,包括存储器1210和处理器1220,该存储器1210中存储有计算机程序,该处理器1220被设置为运行计算机程序以执行上述任一实施例所述的方法。FIG. 12 is a structural block diagram of an electronic device according to an embodiment of the present disclosure. As shown in FIG. 12, an embodiment of the present disclosure further provides an electronic device including a memory 1210 and a processor 1220, where the memory 1210 stores A computer program, the processor 1220, configured to execute a computer program to perform the method of any of the above embodiments.
在一实施例中,上述电子装置还可以包括传输设备以及输入输出设备,其 中,该传输设备和上述处理器1220连接,该输入输出设备和上述处理器1220连接。In an embodiment, the electronic device may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor 1220, and the input/output device is connected to the processor 1220.
在本实施例中,上述处理器可以被设置为通过计算机程序执行以下步骤:In this embodiment, the above processor may be configured to perform the following steps by a computer program:
S1,按照匹配信息指令从所述开放流交换机接收到的报文提取与所述开放流交换机接收到的报文对应的第一匹配信息,其中,所述匹配信息指令是在所述开放流交换机与开放流控制器进行了匹配信息支持能力协商之后,由所述开放流控制器所指示的指令。S1, extracting first matching information corresponding to the packet received by the OpenFlow switch according to the information received by the OpenFlow switch, where the matching information command is in the OpenFlow switch. An instruction indicated by the OpenFlow controller after the matching information support capability is negotiated with the OpenFlow controller.
S2,将提取的所述第一匹配信息发送给所述开放流控制器。S2. Send the extracted first matching information to the OpenFlow controller.
在一实施例中,处理器还被设置为通过计算机程序执行以下步骤:In an embodiment, the processor is further configured to perform the following steps by a computer program:
S1,在开放流控制器与开放流交换机进行了匹配信息支持能力协商之后,向所述开放流交换机发送匹配信息指令。S1: After the OpenFlow controller and the OpenFlow switch perform the matching information support capability negotiation, send the matching information instruction to the OpenFlow switch.
S2,接收所述开放流交换机发送的第一匹配信息,其中,所述第一匹配信息由所述开放流交换机按照所述匹配信息指令从接收到的报文中提取的与所述接收到的报文对应的匹配信息。S2. The first matching information sent by the OpenFlow switch is received, where the first matching information is extracted by the OpenFlow switch from the received message according to the matching information command, and the received information is received by the OpenFlow switch. Match information corresponding to the message.
本实施例中的具体示例可以参考上述实施例及实施方式中所描述的示例,本实施例在此不再赘述。For specific examples in this embodiment, reference may be made to the examples described in the foregoing embodiments and implementation manners, and details are not described herein again.
显然,本领域的技术人员应该明白,上述的本公开的一个或多个模块或一个或多个步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,在一实施例中,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在部分情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成一个或多个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。本公开不限制于任何特定的硬件和软件结合。It will be apparent to those skilled in the art that one or more of the above-described modules or one or more steps of the present disclosure can be implemented by a general-purpose computing device, which can be centralized on a single computing device or distributed across multiple On a network of computing devices, in one embodiment they may be implemented in program code executable by the computing device such that they may be stored in the storage device by the computing device and, in some cases, may The steps shown or described are performed in a different order than here, or they are separately fabricated into one or more integrated circuit modules, or a plurality of the modules or steps are fabricated as a single integrated circuit module. The present disclosure is not limited to any particular combination of hardware and software.

Claims (19)

  1. 一种报文匹配信息的发送方法,应用于开放流交换机,包括:A method for sending packet matching information is applied to an OpenFlow switch, including:
    按照匹配信息指令从所述开放流交换机接收到的报文提取与所述开放流交换机接收到的报文对应的第一匹配信息,其中,所述匹配信息指令是在所述开放流交换机与开放流控制器进行了匹配信息支持能力协商之后,由所述开放流控制器所指示的指令;And extracting first matching information corresponding to the packet received by the OpenFlow switch according to the information received by the OpenFlow switch, where the matching information command is in the OpenFlow switch and is open. The instruction indicated by the open flow controller after the flow controller performs the matching of the information support capability;
    将提取的所述第一匹配信息发送给所述开放流控制器。The extracted first matching information is sent to the open flow controller.
  2. 根据权利要求1所述的方法,在按照匹配信息指令从所述开放流交换机接收到的报文提取与开放流交换机接收到的报文对应的第一匹配信息之前,还包括:The method according to claim 1, before the first matching information corresponding to the packet received by the OpenFlow switch is extracted from the packet received by the OpenFlow switch according to the matching information command, the method further includes:
    所述开放流交换机通过如下方式与所述开放流控制器进行所述匹配信息支持能力协商:The OpenFlow switch performs the matching information support capability negotiation with the OpenFlow controller in the following manner:
    接收来自所述开放流控制器的协商请求消息,其中,所述协商请求消息用于请求所述开放流交换机将自身所支持的匹配信息上报给所述开放流控制器;Receiving a negotiation request message from the open flow controller, where the negotiation request message is used to request the open flow switch to report the matching information supported by the open flow switch to the open flow controller;
    在所述开放流交换机支持匹配信息发送的情况下,根据所述协商请求消息将所述开放流交换机所支持的匹配信息发送给所述开放流控制器。And the matching information supported by the OpenFlow switch is sent to the OpenFlow controller according to the negotiation request message, where the OpenFlow switch supports the sending of the matching information.
  3. 根据权利要求2所述的方法,在根据所述协商请求消息将所述开放流交换机所支持的匹配信息发送给所述开放流控制器之后、且在所述按照匹配信息指令从所述开放流交换机接收到的报文提取与开放流交换机接收到的报文对应的第一匹配信息之前,还包括:The method according to claim 2, after the matching information supported by the OpenFlow switch is sent to the OpenFlow controller according to the Negotiation Request message, and in the Open Flow according to the matching information instruction Before the packet received by the switch extracts the first matching information corresponding to the packet received by the OpenFlow switch, the method further includes:
    接收来自所述开放流控制器的第一流表,其中,在所述开放流控制器支持所述匹配信息指令发送的情况下,所述第一流表的扩展的第一预定消息中携带所述匹配信息指令;Receiving a first flow table from the open flow controller, wherein, in a case that the open flow controller supports the sending of the matching information command, the extended first predetermined message of the first flow table carries the match Information instruction
    在确定所述第一流表的扩展的第一预定消息中携带所述匹配信息指令,且在所述开放流交换机所支持的匹配信息包括所述匹配信息指令所指示的匹配信息的情况下,创建与所述第一流表对应的第二流表,其中,在所述第二流表的扩展的第二预定消息中携带所述匹配信息指令。And carrying the matching information instruction in the first predetermined message that is determined to be extended in the first flow table, and in a case where the matching information supported by the OpenFlow switch includes the matching information indicated by the matching information instruction, a second flow table corresponding to the first flow table, wherein the matching information instruction is carried in an extended second predetermined message of the second flow table.
  4. 根据权利要求3所述的方法,在按照匹配信息指令提取与所述开放流交换机接收到的报文对应的第一匹配信息之前,还包括:The method of claim 3, before extracting the first matching information corresponding to the packet received by the OpenFlow switch according to the matching information command, further comprising:
    从所述第二流表中扩展的所述第二预定消息中获取所述匹配信息指令。And acquiring the matching information instruction from the second predetermined message extended in the second flow table.
  5. 根据权利要求3所述的方法,在接收来自所述开放流控制器的第一流表之后,还包括:The method of claim 3, after receiving the first flow table from the open flow controller, further comprising:
    在所述开放流交换机所支持的匹配信息不包括所述匹配信息指令所指示的匹配信息的情况下,向所述开放流控制器回复错误响应消息。And in case the matching information supported by the OpenFlow switch does not include the matching information indicated by the matching information instruction, the error response message is replied to the OpenFlow controller.
  6. 根据权利要求2所述的方法,在接收来自所述开放流控制器的协商请求消息之后,还包括:The method of claim 2, after receiving the negotiation request message from the OpenFlow controller, further comprising:
    在所述开放流交换机不支持匹配信息发送的情况下,接收来自所述开放流控制器的第一流表,其中,所述第一流表中不携带所述匹配信息指令;Receiving, by the open flow switch, the first flow table from the open flow controller, where the open flow switch does not support the matching information, where the first flow table does not carry the matching information command;
    按照第一预定缺省处理方式提取与所述报文对应的第二匹配信息,并将所述第二匹配信息发送给所述开放流控制器。Extracting second matching information corresponding to the packet according to the first predetermined default processing manner, and sending the second matching information to the OpenFlow controller.
  7. 根据权利要求2所述的方法,在根据所述协商请求消息将所述开放流交换机所支持的匹配信息发送给所述开放流控制器之后、且在所述按照匹配信息指令提取与开放流交换机接收到的报文对应的第一匹配信息之前,还包括:The method according to claim 2, after the matching information supported by the OpenFlow switch is sent to the OpenFlow controller according to the negotiation request message, and the OpenFlow switch is extracted according to the matching information instruction. Before the first matching information corresponding to the received packet, the method further includes:
    接收来自所述开放流控制器的第一流表,其中,在所述开放流控制器不支持所述匹配信息指令发送的情况下,所述第一流表中不携带所述匹配信息指令;Receiving a first flow table from the open flow controller, where the first flow table does not carry the matching information command if the open flow controller does not support the sending of the matching information command;
    在确定所述第一流表中不携带所述匹配信息指令的情况下,按照第二预定缺省处理方式提取与所述报文对应的第三匹配信息,并将所述第三匹配信息发送给所述开放流控制器。If it is determined that the matching information instruction is not carried in the first flow table, extracting third matching information corresponding to the packet according to a second predetermined default processing manner, and sending the third matching information to The open flow controller.
  8. 一种报文匹配信息的接收方法,应用于开放流控制器,包括:A method for receiving message matching information is applied to an open flow controller, including:
    在所述开放流控制器与开放流交换机进行了匹配信息支持能力协商之后,向所述开放流交换机发送匹配信息指令;After the open flow controller and the open flow switch perform the matching information support capability negotiation, send the matching information instruction to the open flow switch;
    接收所述开放流交换机发送的第一匹配信息,其中,所述第一匹配信息由所述开放流交换机按照所述匹配信息指令从接收到的报文中提取的与所述接收到的报文对应的匹配信息。And receiving the first matching information sent by the OpenFlow switch, where the first matching information is extracted by the OpenFlow switch from the received message according to the matching information instruction, and the received packet is received by the OpenFlow switch. Corresponding matching information.
  9. 根据权利要求8所述的方法,其中所述开放流控制器与开放流交换机进行匹配信息支持能力协商,包括:The method of claim 8, wherein the OpenFlow controller and the OpenFlow switch perform matching information support capability negotiation, including:
    向所述开放流交换机发送协商请求消息,其中,所述协商请求消息用于请 求所述开放流交换机将自身所支持的匹配信息上报给所述开放流控制器;Sending a negotiation request message to the OpenFlow switch, where the negotiation request message is used to request the OpenFlow switch to report the matching information supported by the OpenFlow switch to the OpenFlow controller;
    在所述开放流交换机支持匹配信息发送的情况下,接收所述开放流交换机根据所述协商请求消息发送的所述开放流交换机所支持的匹配信息;And receiving, in the case that the OpenFlow switch supports the sending of the matching information, the matching information supported by the OpenFlow switch sent by the OpenFlow switch according to the negotiation request message;
    根据所述开放流交换机所支持的匹配信息和所述开放流控制器所支持的匹配信息确定所述开放流交换机和所述开放流控制器均支持的匹配信息。And determining matching information supported by the OpenFlow switch and the OpenFlow controller according to the matching information supported by the OpenFlow switch and the matching information supported by the OpenFlow controller.
  10. 根据权利要求9所述的方法,其中,向所述开放流交换机发送匹配信息指令包括:The method of claim 9, wherein the transmitting the matching information instruction to the OpenFlow switch comprises:
    在所述开放流控制器支持所述匹配信息指令发送的情况下,向所述开放流交换机发送第一流表,其中,所述第一流表的扩展的第一预定消息中携带所述匹配信息指令。And sending, by the OpenFlow controller, the first flow table to the OpenFlow switch, where the first flow message of the first flow table carries the matching information command .
  11. 根据权利要求10所述的方法,在向所述开放流交换机发送第一流表之后,还包括:The method of claim 10, after the sending the first flow table to the open flow switch, further comprising:
    接收来自所述开放流交换机的错误响应消息,其中,所述错误响应消息用于指示所述开放流交换机所支持的匹配信息不包括所述匹配信息指令所指示的匹配信息。Receiving an error response message from the OpenFlow switch, wherein the error response message is used to indicate that the matching information supported by the OpenFlow switch does not include the matching information indicated by the matching information instruction.
  12. 根据权利要求9所述的方法,在向所述开放流交换机发送协商请求消息之后,还包括:The method of claim 9, after the sending the negotiation request message to the open flow switch, further comprising:
    在所述开放流交换机不支持匹配信息发送的情况下,向所述开放流交换机发送第一流表,其中,所述第一流表中不携带所述匹配信息指令;And sending, by the OpenFlow switch, the first flow table to the open flow switch, where the first flow table does not carry the matching information command;
    接收所述开放流交换机发送的第二匹配信息,其中,所述第二匹配信息是由所述开放流交换机按照第一预定缺省处理方式从所述接收的报文提取的与所述接收到的报文对应的匹配信息。Receiving, by the OpenFlow switch, second matching information that is sent by the OpenFlow switch, where the second matching information is extracted from the received packet by the OpenFlow switch according to a first predetermined default processing manner, and the received Match information corresponding to the message.
  13. 根据权利要求9所述的方法,在根据所述开放流交换机所支持的匹配信息和所述开放流控制器所支持的匹配信息确定所述开放流交换机和所述开放流控制器均支持的匹配信息之后,还包括:The method according to claim 9, determining matching supported by the OpenFlow switch and the OpenFlow controller according to matching information supported by the OpenFlow switch and matching information supported by the OpenFlow controller After the information, it also includes:
    在所述开放流控制器不支持所述匹配信息指令发送的情况下,向所述开放流交换机发送第一流表,其中,所述第一流表中不携带所述匹配信息指令;And the first flow table is sent to the open flow switch, where the open flow controller does not support the sending of the matching information command, where the first flow table does not carry the matching information command;
    接收所述开放流交换机发送的第三匹配信息,其中,所述所述第三匹配信 息是由所述开放流交换机按照第二预定缺省处理方式从所述接收的报文提取的与所述接收到的报文对应的匹配信息。Receiving, by the open flow switch, third matching information, where the third matching information is extracted by the OpenFlow switch from the received message according to a second predetermined default processing manner, Match information corresponding to the received message.
  14. 一种报文匹配信息的发送装置,应用于开放流交换机,包括:A device for sending message matching information, which is applied to an open flow switch, and includes:
    提取模块,设置为按照匹配信息指令从所述开放流交换机接收到的报文提取与所述开放流交换机接收到的报文对应的第一匹配信息,其中,所述匹配信息指令是在所述开放流交换机与开放流控制器进行了匹配信息支持能力协商之后,由所述开放流控制器所指示的指令;An extraction module, configured to extract, according to the matching information instruction, the first matching information corresponding to the packet received by the OpenFlow switch, where the matching information command is in the message received by the OpenFlow switch The instruction indicated by the open flow controller after the open flow switch and the open flow controller perform the matching information support capability negotiation;
    发送模块,设置为将提取的所述第一匹配信息发送给所述开放流控制器。And a sending module, configured to send the extracted first matching information to the OpenFlow controller.
  15. 根据权利要求14所述的装置,还包括:The apparatus of claim 14 further comprising:
    协商模块,设置为在按照匹配信息指令提取与开放流交换机接收到的报文对应的第一匹配信息之前,通过如下方式与所述开放流控制器进行所述匹配信息支持能力协商:The negotiation module is configured to perform the matching information support capability negotiation with the OpenFlow controller in the following manner before extracting the first matching information corresponding to the packet received by the OpenFlow switch according to the matching information command:
    接收来自所述开放流控制器的协商请求消息,其中,所述协商请求消息用于请求所述开放流交换机将自身所支持的匹配信息上报给所述开放流控制器;Receiving a negotiation request message from the open flow controller, where the negotiation request message is used to request the open flow switch to report the matching information supported by the open flow switch to the open flow controller;
    在所述开放流交换机支持匹配信息发送的情况下,根据所述协商请求消息将所述开放流交换机所支持的匹配信息发送给所述开放流控制器。And the matching information supported by the OpenFlow switch is sent to the OpenFlow controller according to the negotiation request message, where the OpenFlow switch supports the sending of the matching information.
  16. 一种报文匹配信息的接收装置,应用于开放流控制器,包括:A device for receiving message matching information, which is applied to an open flow controller, and includes:
    发送模块,设置为在所述开放流控制器与开放流交换机进行了匹配信息支持能力协商之后,向所述开放流交换机发送匹配信息指令;a sending module, configured to send a matching information instruction to the OpenFlow switch after the OpenFlow controller and the OpenFlow switch perform the matching information support capability negotiation;
    接收模块,设置为接收所述开放流交换机发送的第一匹配信息,其中,所述第一匹配信息由所述开放流交换机按照所述匹配信息指令从接收到的报文中提取的与所述接收到的报文对应的匹配信息。a receiving module, configured to receive first matching information sent by the OpenFlow switch, where the first matching information is extracted by the OpenFlow switch from the received message according to the matching information instruction Match information corresponding to the received message.
  17. 根据权利要求16所述的装置,还包括:The apparatus of claim 16 further comprising:
    协商模块,设置为在向所述开放流交换机发送匹配信息指令之前,通过如下方式与所述开放流交换机进行匹配信息支持能力协商:The negotiation module is configured to perform matching information support capability negotiation with the OpenFlow switch in the following manner before sending the matching information command to the OpenFlow switch:
    向所述开放流交换机发送协商请求消息,其中,所述协商请求消息用于请求所述开放流交换机将自身所支持的匹配信息上报给所述开放流控制器;Sending a negotiation request message to the open flow switch, where the negotiation request message is used to request the open flow switch to report the matching information supported by the open flow switch to the open flow controller;
    在所述开放流交换机支持匹配信息发送的情况下,接收所述开放流交换机根据所述协商请求消息发送的所述开放流交换机所支持的匹配信息;And receiving, in the case that the OpenFlow switch supports the sending of the matching information, the matching information supported by the OpenFlow switch sent by the OpenFlow switch according to the negotiation request message;
    根据所述开放流交换机所支持的匹配信息和所述开放流控制器所支持的匹配信息确定所述开放流交换机和所述开放流控制器均支持的匹配信息。And determining matching information supported by the OpenFlow switch and the OpenFlow controller according to the matching information supported by the OpenFlow switch and the matching information supported by the OpenFlow controller.
  18. 一种存储介质,所述存储介质中存储有计算机程序,其中,所述计算机程序被设置为运行时执行所述权利要求1至7任一项中所述的方法,或者执行所述权利要求8至13中任一项所述的方法。A storage medium having stored therein a computer program, wherein the computer program is configured to execute the method of any one of claims 1 to 7 at runtime or to perform the claim 8 The method of any of the preceding claims.
  19. 一种电子装置,包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器被设置为运行所述计算机程序以执行所述权利要求1至7任一项中所述的方法,或者执行所述权利要求8至13中任一项所述的方法。An electronic device comprising a memory and a processor, wherein the memory stores a computer program, the processor being arranged to execute the computer program to perform the method of any one of claims 1 to 7, Or the method according to any one of claims 8 to 13.
PCT/CN2019/077852 2018-03-12 2019-03-12 Method and device for sending packet matching information, method and device for receiving packet matching information, storage medium and electronic device WO2019174578A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201810200791.0A CN110266595A (en) 2018-03-12 2018-03-12 Sending method, device, storage medium and the electronic device of message matching information
CN201810200791.0 2018-03-12

Publications (1)

Publication Number Publication Date
WO2019174578A1 true WO2019174578A1 (en) 2019-09-19

Family

ID=67907402

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/077852 WO2019174578A1 (en) 2018-03-12 2019-03-12 Method and device for sending packet matching information, method and device for receiving packet matching information, storage medium and electronic device

Country Status (2)

Country Link
CN (1) CN110266595A (en)
WO (1) WO2019174578A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115086450A (en) * 2022-06-01 2022-09-20 珠海高凌信息科技股份有限公司 Programmable data plane architecture, flow table updating method and switch

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103618679A (en) * 2013-11-25 2014-03-05 上海华为技术有限公司 Service quality control method, device and system
CN104348757A (en) * 2013-07-31 2015-02-11 华为技术有限公司 Flow table interactive method, switch, and system
WO2016177180A1 (en) * 2015-07-01 2016-11-10 中兴通讯股份有限公司 Method and device for reporting openflow switch capability

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2788871B1 (en) * 2011-12-07 2021-08-04 Citrix Systems, Inc. Controlling a network interface using virtual switch proxying
CN103428094B (en) * 2013-08-12 2016-08-17 杭州华三通信技术有限公司 Message forwarding method in open flows OpenFlow system and device
CN104811429A (en) * 2014-01-27 2015-07-29 中兴通讯股份有限公司 OF (open flow) protocol instruction implementation method and controller
US10680888B2 (en) * 2015-11-09 2020-06-09 Telefonaktiebolaget Lm Ericsson (Publ) State synchronization between a controller and a switch in a communications network
CN105933125B (en) * 2016-07-07 2019-08-09 北京邮电大学 South orientation safety certifying method and device in a kind of software defined network

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104348757A (en) * 2013-07-31 2015-02-11 华为技术有限公司 Flow table interactive method, switch, and system
CN103618679A (en) * 2013-11-25 2014-03-05 上海华为技术有限公司 Service quality control method, device and system
WO2016177180A1 (en) * 2015-07-01 2016-11-10 中兴通讯股份有限公司 Method and device for reporting openflow switch capability

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115086450A (en) * 2022-06-01 2022-09-20 珠海高凌信息科技股份有限公司 Programmable data plane architecture, flow table updating method and switch
CN115086450B (en) * 2022-06-01 2023-11-17 珠海高凌信息科技股份有限公司 Programmable data plane device, flow table updating method and switch

Also Published As

Publication number Publication date
CN110266595A (en) 2019-09-20

Similar Documents

Publication Publication Date Title
EP3726788B1 (en) Method for controlling network congestion, access device, and computer readable storage medium
US9529623B2 (en) Method, migration management apparatus, network device, and virtual machine server for migrating virtual machine parameters
WO2016155394A1 (en) Method and device for establishing link between virtual network functions
US10645145B2 (en) Method and apparatus for accelerating data transmission in a network communication system
US10833995B2 (en) Method and apparatus for datacenter congestion control based on software defined network
WO2023005773A1 (en) Message forwarding method and apparatus based on remote direct data storage, and network card and device
US10735373B2 (en) Communications over multiple protocol interfaces in a computing environment
EP2985968A1 (en) Method and apparatus for processing messages
US10609125B2 (en) Method and system for transmitting communication data
WO2019000866A1 (en) Data processing method and internet of things (iot) gateway
WO2015106453A1 (en) Service processing method and network device
WO2019174578A1 (en) Method and device for sending packet matching information, method and device for receiving packet matching information, storage medium and electronic device
CN105991442B (en) Message forwarding method and device
CN109417507A (en) The message of section retards accesses
US10567551B1 (en) System and method for improving infrastructure to infrastructure communications
CN104184729A (en) Message processing method and device
CN117336346A (en) IPPBX and PMS docking state conversion method, terminal equipment and medium
WO2015180560A1 (en) Service router packet processing method and service node
US20080056263A1 (en) Efficient transport layer processing of incoming packets
CN115080080A (en) Device, system and method for firmware upgrading of multi-path CANopen network
WO2015141014A1 (en) Method of constructing software-defined pci express (pci-e) switch
US11451513B2 (en) Notification device and notification method
US9634987B2 (en) Obtaining a MAC address from an external source
CN106657015B (en) SDN network-based data transmission method
JP5673112B2 (en) Switch device, network, and address learning method used therefor

Legal Events

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

Ref document number: 19767045

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 21/01/2021)

122 Ep: pct application non-entry in european phase

Ref document number: 19767045

Country of ref document: EP

Kind code of ref document: A1