WO2014107860A1 - 报文处理方法、装置及系统 - Google Patents

报文处理方法、装置及系统 Download PDF

Info

Publication number
WO2014107860A1
WO2014107860A1 PCT/CN2013/070301 CN2013070301W WO2014107860A1 WO 2014107860 A1 WO2014107860 A1 WO 2014107860A1 CN 2013070301 W CN2013070301 W CN 2013070301W WO 2014107860 A1 WO2014107860 A1 WO 2014107860A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
action
matching
processing
flow entry
Prior art date
Application number
PCT/CN2013/070301
Other languages
English (en)
French (fr)
Inventor
于志强
龚钧
Original Assignee
北京华为数字技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京华为数字技术有限公司 filed Critical 北京华为数字技术有限公司
Priority to PCT/CN2013/070301 priority Critical patent/WO2014107860A1/zh
Publication of WO2014107860A1 publication Critical patent/WO2014107860A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/64Hybrid switching systems
    • H04L12/6418Hybrid transport

Definitions

  • the present invention relates to the field of OpenFlow technology, and in particular, to a message processing method, apparatus and system. Background technique
  • the NPU Network Processing Unit
  • the NPU Network Processing Unit of the router is responsible. This part is quite mature. For the processing of new messages, it is sometimes necessary to re-program the NPU, and for some special new cases, the NPU may not support it.
  • OpenFlow can implement programmable control of the forwarding plane. By operating the flow table, it can control the traffic control of the forwarding plane and simplify the forwarding plane.
  • the control plane entity is generally called Controller
  • the forwarding plane entity is generally called OpenFlow Switch, referred to as OFSW.
  • the OpenFlow Controller can create a flow table based on the MAC/VxLan/MPLS/IP/TCP/UDP fields of the packet and process the packet.
  • the features of OpenFlow vl.3 include: 1) providing the communication protocol of the Controller to the OpenFlow Switch; 2) through this protocol, the OFSW can establish a flow table according to the requirements of the controller to process the message; 3) the packet is based on the Ethernet/IP packet. .
  • an object of the embodiments of the present invention is to provide a packet processing method, apparatus, and system, so that a forwarding plane can process a packet without knowing the packet type.
  • the embodiment of the present invention provides a packet processing method, where the method includes: sending a request message to a control plane entity Controller, where the request message includes local receiving Message
  • the text is processed according to the Action action.
  • the matching flow entry Match Fields specifically includes: field information of the matching item information and length information of the matching item information.
  • the field location information of the matching item information is a fixed offset or a value of the first specified field in the packet plus an offset
  • the length information of the matching item information is a fixed value or a The value of the second specified field in the message plus the offset.
  • the method before the sending the request message to the control plane entity controller, the method further includes: determining, by the local flow table, whether there is a flow entry matching the packet;
  • an embodiment of the present invention provides a packet processing method, where the method includes: receiving a request message sent by a forwarding plane entity OFSW, where the request message includes a packet received by the OFSW;
  • the matching flow entry Match Fields specifically includes: field information of the matching item information and length information of the matching item information.
  • the field location information of the matching item information is a fixed offset or a value of the first specified field in the packet plus an offset
  • the length information of the matching item information is a fixed value or a The value of the second specified field in the message plus the offset.
  • the embodiment of the present invention further provides a packet processing apparatus, where the apparatus includes: a first message sending module, configured to send a request message to a control plane entity Controller, where the request message includes a locally received report Text
  • a first message receiving module configured to receive a processing action message of the flow of the packet sent by the controller, and send the processing action message to a flow entry creation module, where the processing action message includes the controller Matching flow table items Match Fields and operation Action actions generated for the message;
  • a flow entry creation module configured to receive the processing action message from the first message receiving module, where the processing action message locally establishes a matching flow entry and labels the action action, and sends the action action To the first message processing module;
  • the first packet processing module is configured to receive the Action action from the flow entry creation module, and process the packet according to the Action action.
  • the matching flow entry Match Fields specifically includes: field location information of the matching item information and length information of the matching item information; the field position information of the matching item information is a fixed offset or the message The value of the first specified field is added to the offset, and the length information of the matching item information is a fixed value or a value of the second specified field in the message plus an offset.
  • the device further includes:
  • a packet matching module configured to determine, in the local flow table, whether a flow entry matching the packet is sent, and if yes, sending an action named in the flow entry matching the packet to the first a message processing module, if not, triggering the first message sending module;
  • the first packet processing module is further configured to: receive, by the packet matching module, an action that is marked in a flow entry that matches the packet, and according to the flow entry that matches the packet.
  • the action action marked in the process processes the message.
  • the embodiment of the present invention further provides a packet processing apparatus, where the apparatus includes: a second message receiving module, configured to receive a request message sent by the forwarding plane entity 0FSW, where the request message includes the 0FSW receiving The received message, and sending the message to the second message processing module;
  • a second packet processing module configured to receive the packet from the second message receiving module, generate a matching flow entry Match Fields and an action action for the packet, and The flow field entry Match field and the action action are sent to the second message sending module, and the second message sending module is configured to receive the match flow entry Match Fields and the action action from the second message processing module, and The OFSW sends a processing action message of the flow of the packet, where the processing action message includes the matching flow entry Match Fields and the Action action, so that the OFSW is locally established according to the processing action message. Matching the flow entry and labeling the action action, and then processing the message according to the action action.
  • the matching flow entry Match Fields specifically includes: field location information of the matching item information and length information of the matching item information; the field position information of the matching item information is a fixed offset or in the message The value of the first specified field is added to the offset, and the length information of the matching item information is a fixed value or a value of the second specified field in the message plus an offset.
  • the embodiment of the present invention further provides a packet processing system, where the system includes: a forwarding plane entity OFSW: configured to send a request message to a control plane entity Controller, where the request message includes a locally received packet.
  • a forwarding plane entity OFSW configured to send a request message to a control plane entity Controller, where the request message includes a locally received packet.
  • the action message locally establishes a matching flow entry and labels the action; and processes the talent according to the Action action;
  • a control plane entity Controller configured to receive a request message sent by the forwarding plane entity OFSW; generate the matching flow table entry Match Fields and an operation action action for the packet; and send the processing action message to the OFSW, where the processing The action message includes the matching flow entry Match Fields and the Action action.
  • the match field entry Match Fields specifically includes: field location information of the match information and length information of the match information; the field location information of the match information is a fixed offset or the first designation in the packet The value of the field is added to the offset, and the length information of the matching item information is a fixed value or a value of the second specified field in the message plus an offset.
  • the OFSW is further configured to: determine the present before sending the request message to the controller Whether there is a flow entry matching the packet in the flow table; if yes, processing the packet according to the action action marked in the matching flow entry in the local flow table; if not, Sending the request message to the Controller.
  • the embodiment of the present invention sends a new packet received by the forwarding plane to the control plane for the first time, and then performs flow table matching on the fields of the certain positions of the packet according to the indication of the control plane, so that the forwarding plane does not need to identify the type of the packet. That is, the semantics of the fields in the packet, such as IP packets or MPLS packets, are TCP fields or vLan fields.
  • the flow table processing message is set by the instruction returned by the control plane, so that the forwarding surface can process the message without knowing the message type, thereby simplifying the forwarding plane service and avoiding various complicated programming. It can greatly expand the type of text that can be processed by the forwarding surface.
  • FIG. 1 is a flow chart of a method according to an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of communication between a control plane and a forwarding plane according to Embodiment 2 of the present invention
  • Embodiment 3 is a flow chart of a method according to Embodiment 3 of the present invention.
  • Figure 4 is a schematic view of a fourth embodiment of the present invention.
  • Figure 5 is a schematic view of a device according to a fifth embodiment of the present invention.
  • Figure 6 is a schematic diagram of a system of the sixth embodiment of the present invention.
  • This embodiment is extended on the basis of OpenFlow, so that the forwarding plane entity
  • OpenFlow Switch can handle various types of messages without knowing the specific semantics and field definitions of the message.
  • the packet type refers to various types of data packets. It is generally defined according to certain fields and semantics. Some fields can be in different locations depending on the packet type.
  • the general packet encapsulation is Ethernet - MPL S - IP-content. This packet belongs to both Ethernet packets and MPLS packets, and is also an IP packet.
  • the NEs can be processed according to different needs. Levels, the general switch can only process to the Ethernet layer.
  • the MPLS P device only processes the MPLS layer, and the router can process the IP layer or only the MPLS layer. These require intelligent processing of the network element.
  • the idea of the present invention is to put this part of the judgment and processing on the Controller, and the Controller notifies the network element to process according to the requirements of the Controller (that is, establish a flow table, according to the Action processing), so that the network element can be made simple and convenient for management.
  • the network element in the prior art can only process the currently known packet type, and a new packet type may appear in the future, so the network element cannot be processed, or needs to be upgraded, and in particular, a hardware upgrade is required. , the cost is high, it will be very troublesome.
  • the network upgrade supports the type of packets. The new type of packets can be defined and processed by using the solution of the embodiment of the present invention.
  • FIG. 1 is a flowchart of a method according to an embodiment of the present invention. This embodiment provides a packet processing method, where the method includes:
  • S102 Receive a processing action message of the flow of the message sent by the controller, where the processing action message includes a matching flow entry of the controller generated by the controller. Fields and action action actions.
  • the controller processes the message as follows: 1) Generates a matching flow entry Match Fields corresponding to the message; 2) Determines an action action for processing the message. A processing action message containing the matching flow entry and the action action is then sent to the OFSW.
  • Action action After receiving the message, OFSW establishes a matching flow entry locally and annotated the action action in the flow table. In this way, when such a essay is received again in the future, it can be matched in the flow table, and the action action that should be performed on the ⁇ ⁇ is known as the Action action.
  • the OFSW may first perform a matching in the OFSW local flow table, that is,
  • the processing efficiency can be improved by performing the local judgment in advance, and the already identifiable message can be directly processed without sending the request message to the Controller every time.
  • the new packet received by the forwarding plane is sent to the control plane, and then the flow table is matched to the field of the certain position of the packet according to the indication of the control plane, so that the forwarding plane does not need to identify the type of the packet.
  • the semantics of the fields in the message is set by the instruction returned by the control plane, so that the forwarding surface can process the message without knowing the message type, thereby simplifying the forwarding plane service and avoiding various complicated programming. It can greatly expand the type of text that can be processed by the forwarding surface.
  • FIG. 2 is a schematic diagram of communication between a control plane and a forwarding plane according to Embodiment 2 of the present invention.
  • each of the network elements A, B, and C are OFSWs in the forwarding plane.
  • the flow table entry indicates which fields of the packet to be used to establish a flow table. For example, if a flow table is created for the IP D ⁇ (Source IP/Dest IP/Source Port/Dest Port/Transport Layer Protocol Number), a certain flow can be distinguished, so that when the message comes over, it is known whether the message matches.
  • the network element in the forwarding plane needs to know the specific meaning and field position of the quintuple.
  • the network element in the forwarding plane does not need to know the specific meaning and location of the field in the packet, but the instruction sent by the controller can complete the processing of the packet.
  • step S201 After the network element A receives a packet, the network element A determines whether there is a flow entry matching the packet in the flow table, and if yes, directly performs an operation according to the action indication of the flow entry, and ends the process. If there is no match, proceed to step S202.
  • the network element A sends a message to the controller, and attaches a message to the controller for processing.
  • S203 After receiving the message sent by the network element A, the controller performs the following processing: 1) generating a matching flow table entry Match Fields; 2) determining an action action for processing the message.
  • the matching flow entry should be determined according to a specific scenario, which is not limited in the embodiment of the present invention.
  • the following exemplarily gives a form of the matching flow entry:
  • the matching flow entry may specifically include: field location information of the matching item information and length information of the matching item information. Used to indicate which fields in the message should be used to create a flow table, ie which fields can be used as match information.
  • the field location and length information may be implicit in a certain field of the packet. For example, the FCS check of the most common Ethernet packet is actually the last part of the Ethernet packet. Therefore, the field location requires the Ethernet length packet in the packet. Subtract 4 bytes to indicate its field position.
  • the field location information of the matching item information may be: a fixed offset, or a value of the first specified field in the message plus an offset;
  • the length information of the matching item information may specifically be: a fixed value, or a value of the second specified field in the message plus an offset.
  • the matching flow entry may also include matching mode information, that is, whether it is an exact match or a range match. If it is an exact match, it contains mask information. This information field has been fixed in OpenFlow Righteousness.
  • Action is the flow table processing action, which refers to how the network element A should handle the message after the flow table is matched.
  • OpenFlow defines a series of Actions. In the case that the network element A does not know the semantics of the message, it needs to add new actions to process the message. Some possible actions are as follows:
  • Group Indicates that the text is processed by a specific group and is mainly used for the processing of multicast and other texts.
  • Add, delete, or modify fixed information for a field This is the most basic operation, and the PUSH/POP actions defined by OpenFlow are included here.
  • Add or modify timestamp information Indicates that the current timestamp information is added or modified after the message is accepted. For example, some OAM messages need to be processed this way.
  • this field indicates that every time a message is received, the count information is added to the message. For each new message, the count information will be increased (or decreased) by a fixed amount. Value, the count value of the first message is the initial value. Typically, such as the Sequence Number field or the Counter field in the message.
  • Count information modification Increase (or decrease) the information of a field in the message by a fixed value. Typically, as in the TTL field, when forwarded, this field is decremented by 1.
  • the verification information includes which parts of the message are verified and the type of verification.
  • the IP header only checks the IP packet header for Checksum.
  • the checksum type is generally divided into: Checksum check (IP packet header check, BIP16 in MPLS OAM belongs to this class) and CRC check (Ethernet packet belongs to this class).
  • S204 The controller sends a processing action message to the network element A, where the matching flow entry that is required to be established by the network element A and the action action of the convection processing are included.
  • S205 After receiving the message, the network element A establishes a matching flow entry according to the message, and marks the processed Action action in the flow table, and the network element A processes the packet according to the Action action.
  • the network element A does not need to identify the type of the packet, that is, the semantics and location of the field in the packet, such as an IP packet or an MPLS packet. It is also a vLan field, etc., and the flow table matching is performed on the fields of the certain positions of the message by the instruction of the Controller.
  • the new packet received by the forwarding plane is sent to the control plane, and then the flow table is matched to the field of the certain position of the packet according to the indication of the control plane, so that the forwarding plane does not need to identify the type of the packet.
  • the semantics of the fields in the message is set by the instruction returned by the control plane, so that the forwarding surface can process the message without knowing the message type, thereby simplifying the forwarding plane service and avoiding various complicated programming. It can greatly expand the type of text that can be processed by the forwarding surface.
  • FIG. 3 is a flowchart of a method according to Embodiment 3 of the present invention. This embodiment corresponds to the first embodiment. The first embodiment is described in the perspective of the OFSW, and the embodiment is in the perspective of the controller.
  • This embodiment provides a packet processing method, where the method includes:
  • S301 Receive a request message sent by the forwarding plane entity OFSW, where the request message includes a packet received by the OFSW.
  • the matching flow entry Match Fields specifically includes: field location information of the matching item information and length information of the matching item information.
  • field location information of the matching item information Adding an offset to the value of the first specified field in the message, the length information of the matching item information is a fixed value or the value of the second specified field in the message plus Offset.
  • the new packet received by the forwarding plane is sent to the control plane, and then the flow table is matched to the field of the certain position of the packet according to the indication of the control plane, so that the forwarding plane does not need to identify the type of the packet.
  • the semantics of the fields in the message is set by the instruction returned by the control plane, so that the forwarding surface can process the message without knowing the message type, thereby simplifying the forwarding plane service and avoiding various complicated programming. It can greatly expand the type of text that can be processed by the forwarding surface.
  • FIG. 4 is a schematic diagram of a fourth embodiment of the present invention. This embodiment corresponds to the first embodiment, and provides a message processing apparatus 400.
  • the apparatus 400 includes:
  • the first message sending module 401 is configured to send a request message to the control plane entity Controller, where the request message includes a locally received message;
  • the first message receiving module 402 is configured to receive a processing action message of the flow of the packet sent by the controller, and send the processing action message to a flow entry creation module, where the processing action message includes the The Match field and the action action actions generated by the Controller for the matching flow entry generated by the controller;
  • the flow entry creation module 403 is configured to receive the processing action message from the first message receiving module, where the processing action message locally establishes a matching flow entry and labels the action action, and the action action Send to the first message processing module;
  • the first packet processing module 404 is configured to receive the Action action from the flow entry creation module, and process the packet according to the Action action.
  • the matching flow entry Match Fields specifically includes: field location information of the matching item information and length information of the matching item information; the field location information of the matching item information is fixed. An offset or a value of the first specified field in the message plus an offset, where the length information of the matching information is a fixed value or a value of a second specified field in the message plus an offset .
  • the apparatus 400 further includes:
  • the message matching module 405 is configured to determine whether there is a flow entry matching the packet in the local flow table, and if yes, send an action action marked in the flow entry matching the packet to the first a message processing module, if not, triggering the first message sending module;
  • the first packet processing module 404 is further configured to receive, by the packet matching module, an Action action marked in a flow entry that matches the signature, and according to the matching with the The Action action marked in the flow entry class processes the message.
  • the device embodiment since it basically corresponds to the method embodiment, it can be referred to the partial description of the method embodiment.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, ie may be located One place, or it can be distributed to multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the objectives of the solution of the embodiment. Those skilled in the art can understand and implement without any creative work.
  • the new packet received by the forwarding plane is sent to the control plane, and then the flow table is matched to the field of the certain position of the packet according to the indication of the control plane, so that the forwarding plane does not need to identify the type of the packet.
  • the semantics of the fields in the message is set by the instruction returned by the control plane, so that the forwarding surface can process the message without knowing the message type, thereby simplifying the forwarding plane service and avoiding various complicated programming. It can greatly expand the type of text that can be processed by the forwarding surface.
  • FIG. 5 is a schematic diagram of a device according to Embodiment 5 of the present invention. This embodiment corresponds to the three-phase embodiment, and provides a message processing apparatus 500.
  • the apparatus 500 includes:
  • the second message receiving module 501 is configured to receive a request message sent by the forwarding plane entity OFSW, where the request message includes the packet received by the OFSW, and send the packet to the second packet processing module.
  • a second packet processing module 502 configured to receive the packet from the second message receiving module, generate a matching flow entry Match Fields and an action action for the packet, and The match flow entry Match Fields and the action action action are sent to the second message sending module, and the second message sending module 503 is configured to receive the match flow entry Match Fields and the action action from the second message processing module. And sending, to the OFSW, a processing action message of the flow of the packet, where the processing action message includes the matching flow entry Match Fields and the Action action, so that the OFSW is in accordance with the processing action message.
  • a matching flow entry is locally created and the action is marked, and then the action is processed by the action.
  • the matching flow entry Match Fields specifically includes: field location information of the matching item information and length information of the matching item information; the field location information of the matching item information is fixed.
  • the device embodiment since it basically corresponds to the method embodiment, it can be referred to the partial description of the method embodiment.
  • the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, ie may be located One place, or it can be distributed to multiple network elements. Some or all of the modules may be selected according to actual needs to achieve the objectives of the solution of the embodiment. Those skilled in the art can understand and implement without any creative work.
  • the new packet received by the forwarding plane is sent to the control plane, and then the flow table is matched to the field of the certain position of the packet according to the indication of the control plane, so that the forwarding plane does not need to identify the type of the packet.
  • the semantics of the fields in the message is set by the instruction returned by the control plane, so that the forwarding surface can process the message without knowing the message type, thereby simplifying the forwarding plane service and avoiding various complicated programming. It can greatly expand the type of text that can be processed by the forwarding surface.
  • FIG. 6 is a schematic diagram of a system according to Embodiment 6 of the present invention.
  • the embodiment corresponds to the foregoing method and device embodiment, and provides a message processing system, where the system includes:
  • the forwarding plane entity OFSW601 is configured to send a request message to the control plane entity Controller, where the request message includes a locally received packet, and a processing action message that receives the flow of the packet sent by the controller, and the processing action message
  • the matching flow table item Match Fields and operation action actions generated by the Controller for the message are included; the matching flow table entry is locally established according to the processing action message, and the action action is marked;
  • the text is processed;
  • a control plane entity Controller 602 configured to receive a request message sent by the forwarding plane entity OFSW; generate the matching flow entry Match Fields and an action Action action for the packet; send the processing action message to the OFSW, the processing The action message includes the matching flow entry Match Fields and the Action action.
  • the match field entry Match Fields specifically includes: field location information of the match information and length information of the match information; the field location information of the match information is a fixed offset or the first designation in the packet The value of the field is added to the offset, and the length information of the matching item information is a fixed value or a value of the second specified field in the message plus an offset.
  • the OFSW 601 is further configured to: determine, before sending the request message to the controller, whether there is a flow entry matching the packet in the local flow table; if yes, according to the matching flow table in the local flow table The Action action marked in the item processes the message; if not, the request message is sent to the Controller.
  • the new packet received by the forwarding plane is sent to the control plane, and then the flow table is matched to the field of the certain position of the packet according to the indication of the control plane, so that the forwarding plane does not need to identify the type of the packet.
  • the semantics of the fields in the message is set by the instruction returned by the control plane, so that the forwarding surface can process the message without knowing the message type, thereby simplifying the forwarding plane service and avoiding various complicated programming. It can greatly expand the type of text that can be processed by the forwarding surface.
  • the invention may be described in the general context of computer-executable instructions executed by a computer, such as a program module.
  • program modules include routines, programs, objects, components, data structures, and the like that perform particular tasks or implement particular abstract data types.
  • the invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network.
  • program modules can be located in both local and remote computer storage media including storage devices.

Landscapes

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

Abstract

一种报文处理方法、装置及系统,所述方法包括:向控制面实体Controller发送请求消息,所述请求消息包含本地接收到的报文;接收所述Controller发送的所述报文的流的处理动作消息,所述处理动作消息中包含所述Controller为所述报文生成的匹配流表项Match Fields和操作Action动作;根据所述处理动作消息在本地建立匹配流表项并标注所述Action动作;根据所述Action动作对所述文进行处理。应用本发明实施例可以使转发面中的网元并不需要知道初次收到的新的报文中字段的含义和位置,即可对该报文进行处理。

Description

报文处理方法、 装置及系统
技术领域
本发明涉及 OpenFlow技术领域,尤其是涉及报文处理方法、装置及系 统。 背景技术
对于传统的报文处理, 需要路由器的 NPU ( Network Processing Unit , 网络处理器) 负责, 这部分已经比较成熟。 而对于新的报文的处理, 有时 需要重新对 NPU编程, 而对其中一些特殊的新的 ^艮文的处理, 则 NPU可 能不支持。
OpenFlow可实现对转发面进行可编程控制, 通过对流表的操作, 实现 控制面对转发面的业务控制, 同时简化了转发面。 控制面实体一般称为 Controller , 转发面实体一般称为 OpenFlow Switch , 简称 OFSW。 目前 OpenFlow的 Controller可以根据报文的 MAC/VxLan/MPLS/IP/TCP/UDP等 字段建立流表, 并对报文进行处理。 OpenFlow vl .3的特点包括: 1 )提供 了 Controller对 OpenFlow Switch的通信协议; 2 ) 通过此协议, OFSW 可以根据 Controller的要求建立流表, 处理报文; 3 )报文基于 Ethernet/IP 报文。
发明人在实现本发明的过程中发现, OpenFlow的缺点在于转发面需要 知道转发的报文类型, 即具体语义和字段定义, 例如需要知道是 IP/MPLS/GRE/VPN/VxLan等, 而对于不知道类型的报文则无法处理。
发明内容 有鉴于此, 本发明实施例的目的是提供报文处理方法、 装置及系统, 以使转发面在不需要知晓报文类型的情况下能够对报文进行处理。
一方面, 本发明实施例提供了一种报文处理方法, 所述方法包括: 向控制面实体 Controller发送请求消息,所述请求消息包含本地接收到 的报文;
接收所述 Controller发送的所述 4艮文的流的处理动作消息 ,所述处理动 作消息中包含所述 Controller为所述 4艮文生成的匹配流表项 Match Fields和 操作 Action动作;
根据所述处理动作消息在本地建立匹配流表项并标注所述 Action 动 作;
根据所述 Action动作对所述 文进行处理。
优选的, 所述匹配流表项 Match Fields具体包括: 匹配项信息的字段 位置信息和匹配项信息的长度信息。
优选的, 所述匹配项信息的字段位置信息为固定的偏移量或所述报文 里第一指定字段的值加上偏移量, 所述匹配项信息的长度信息为固定的数 值或所述报文里第二指定字段的值加上偏移量。
优选的, 所述向控制面实体 Controller发送请求消息之前, 还包括: 判断本地流表中是否有匹配所述报文的流表项;
若有, 则按照所述本地流表中匹配的流表项中标注的 Action动作对所 述报文进行处理, 并结束流程; 若没有, 则继续向下执行。
另一方面, 本发明实施例提供了一种报文处理方法, 所述方法包括: 接收转发面实体 OFSW 发送的请求消息, 所述请求消息包含所述 OFSW接收到的报文;
为所述报文生成匹配流表项 Match Fields和操作 Action动作; 向所述 OFSW发送所述报文的流的处理动作消息, 所述处理动作消息 中包含所述匹配流表项 Match Fields和所述 Action动作 , 以使所述 OFSW 居所述处理动作消息在本地建立匹配流表项并标注所述 Action动作然后 根据所述 Action动作对所述 文进行处理。
优选的, 所述匹配流表项 Match Fields具体包括: 匹配项信息的字段 位置信息和匹配项信息的长度信息。
优选的, 所述匹配项信息的字段位置信息为固定的偏移量或所述报文 里第一指定字段的值加上偏移量, 所述匹配项信息的长度信息为固定的数 值或所述报文里第二指定字段的值加上偏移量。 再一方面, 本发明实施例还提供了一种报文处理装置, 所述装置包括: 第一消息发送模块, 用于向控制面实体 Controller发送请求消息, 所述 请求消息包含本地接收到的报文;
第一消息接收模块,用于接收所述 Controller发送的所述报文的流的处 理动作消息, 以及将所述处理动作消息发送至流表项建立模块, 所述处理 动作消息中包含所述 Controller为所述报文生成的匹配流表项 Match Fields 和操作 Action动作;
流表项建立模块, 用于从所述第一消息接收模块接收所述处理动作消 息 , 居所述处理动作消息在本地建立匹配流表项并标注所述 Action动作 , 以及将所述 Action动作发送至第一报文处理模块;
第一报文处理模块,用于从所述流表项建立模块接收所述 Action动作, 并根据所述 Action动作对所述报文进行处理。
优选的: 所述匹配流表项 Match Fields具体包括: 匹配项信息的字段 位置信息和匹配项信息的长度信息; 所述匹配项信息的字段位置信息为固 定的偏移量或所述报文里第一指定字段的值加上偏移量, 所述匹配项信息 的长度信息为固定的数值或所述报文里第二指定字段的值加上偏移量。
优选的, 所述装置还包括:
报文匹配模块, 用于判断本地流表中是否有匹配所述报文的流表项, 若有, 则将与所述报文匹配的流表项中标注的 Action动作发送至所述第一 报文处理模块, 若没有, 则触发所述第一消息发送模块;
所述第一报文处理模块, 还用于从所述报文匹配模块接收与所述报文 匹配的流表项中标注的 Action动作 , 并根据所述与所述报文匹配的流表项 中标注的 Action动作对所述 ^艮文进行处理。
再一方面, 本发明实施例还提供了一种报文处理装置, 所述装置包括: 第二消息接收模块, 用于接收转发面实体 0FSW发送的请求消息, 所 述请求消息包含所述 0FSW接收到的报文, 以及将所述报文发送至第二报 文处理模块;
第二报文处理模块, 用于从所述第二消息接收模块接收所述报文, 为 所述报文生成匹配流表项 Match Fields和操作 Action动作, 以及将所述匹 配流表项 Match Fields和操作 Action动作发送至第二消息发送模块; 第二消息发送模块, 用于从所述第二报文处理模块接收所述匹配流表 项 Match Fields和操作 Action动作, 并向所述 OFSW发送所述报文的流的 处理动作消息, 所述处理动作消息中包含所述匹配流表项 Match Fields和 所述 Action动作, 以使所述 OFSW根据所述处理动作消息在本地建立匹配 流表项并标注所述 Action动作, 然后根据所述 Action动作对所述报文进行 处理。
优选的, 所述匹配流表项 Match Fields具体包括: 匹配项信息的字段 位置信息和匹配项信息的长度信息; 所述匹配项信息的字段位置信息为固 定的偏移量或所述报文里第一指定字段的值加上偏移量, 所述匹配项信息 的长度信息为固定的数值或所述报文里第二指定字段的值加上偏移量。
还一方面, 本发明实施例又提供了一种报文处理系统, 所述系统包括: 转发面实体 OFSW: 用于向控制面实体 Controller发送请求消息, 所述 请求消息包含本地接收到的报文;接收所述 Controller发送的所述报文的流 的处理动作消息,所述处理动作消息中包含所述 Controller为所述报文生成 的匹配流表项 Match Fields和操作 Action动作; 根据所述处理动作消息在 本地建立匹配流表项并标注所述 Action动作; 根据所述 Action动作对所述 才艮文进行处理;
控制面实体 Controller: 用于接收转发面实体 OFSW发送的请求消息; 为所述报文生成所述匹配流表项 Match Fields和操作 Action动作; 向所述 OFSW发送所述处理动作消息, 所述处理动作消息中包含所述匹配流表项 Match Fields和所述 Action动作。
优选的,
所述匹配流表项 Match Fields具体包括: 匹配项信息的字段位置信息 和匹配项信息的长度信息; 所述匹配项信息的字段位置信息为固定的偏移 量或所述报文里第一指定字段的值加上偏移量, 所述匹配项信息的长度信 息为固定的数值或所述报文里第二指定字段的值加上偏移量。
优选的,
所述 OFSW还用于: 在所述向所述 Controller发送请求消息之前判断本 地流表中是否有匹配所述报文的流表项; 若有, 则按照所述本地流表中匹 配的流表项中标注的 Action动作对所述报文进行处理; 若没有, 则才向所 述 Controller发送所述请求消息。
本发明实施例将转发面首次收到的新的报文发给控制面, 然后根据控 制面的指示对报文的某些位置的字段实施流表匹配, 使得转发面不需要识 别报文的类型即报文中字段的语义, 例如是 IP报文还是 MPLS报文, 是 TCP 字段还是 vLan字段等。 这样通过控制面返回的指示建立流表处理报文可以 使转发面在不需要知晓报文类型的情况下能够对报文进行处理, 进而可以 简化转发面业务, 避免了各种复杂的编程, 还可以大大扩展转发面可以处 理的 ^艮文种类。
附图说明 为了更清楚地说明本发明实施例或现有技术中的技术方案, 下面将对 实施例或现有技术描述中所需要使用的附图作简单地介绍, 显而易见地, 下面描述中的附图仅仅是本发明的一些实施例, 对于本领域普通技术人员 来讲, 在不付出创造性劳动的前提下, 还可以根据这些附图获得其他的附 图。
图 1是本发明实施例一方法的流程图;
图 2是本发明实施例二中控制面与转发面通信示意图;
图 3是本发明实施例三方法的流程图;
图 4是本发明实施例四装置的示意图;
图 5是本发明实施例五装置的示意图;
图 6是本发明实施例六系统的示意图。
具体实施方式 下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进 行清楚、 完整地描述, 显然, 所描述的实施例仅仅是本发明一部分实施例, 而不是全部的实施例。 基于本发明中的实施例, 本领域普通技术人员在没 有作出创造性劳动前提下所获得的所有其他实施例, 都属于本发明保护的 范围。 实施例一
本实施例在 OpenFlow 基础上进行了扩展改造, 使得转发面实体
OpenFlow Switch ( OFSW ) 不需要知晓报文的具体语义和字段定义也能够 处理各种类型的报文。 报文类型就是指数据报文的各种类型, 一般根据某 些字段和语义来定义, 某些字段根据报文类型不同可以在不同的位置。 例 如: 一般报文封装是 Ethernet - MPL S - IP-content , 这个报文就既属于 Ethernet报文, 也属于 MPLS报文, 再之上还是 IP报文, 而网元可以根据 需要处理到不同的级别, 一般交换机上可以只处理到 Ethernet 层, MPLS 的 P设备只处理到 MPLS层, 而路由器, 可以处理到 IP层, 也可以只处理 到 MPLS层, 这些需要网元的智能处理。 本发明的思路是把这部分判断和 处理放到 Controller上,由 Controller通知网元按 Controller的要求处理(即 建立流表, 根据 Action处理), 这样网元就可以做得简单, 也便于管理。
从另一方面讲, 现有技术中的网元只能处理目前已知的报文类型, 未 来也许出现新的报文类型, 那么网元就无法处理, 或者需要升级, 尤其很 可能需要硬件升级, 成本很高, 那会很麻烦。 而釆用本发明实施例的方案 后, 只需要中心的 Controller升级(而且只需要软件升级), 网元不必升级。 因为网络中网元数量远大于 Controller数量,这样网络升级支持该类型报文 的代价很小, 因此新的类型的报文, 完全可以用本发明实施例的方案进行 定义和处理。
图 1 为本发明实施例一方法的流程图, 本实施例提供了一种报文处理 方法, 所述方法包括:
S101、向控制面实体 Controller发送请求消息, 所述请求消息包含本地 接收到的报文。 OFSW接收到某报文后, 向 Controller发送请求消息, 并附 上所述 文, 请求 Controller进行处理。
S 102、接收所述 Controller发送的所述 4艮文的流的处理动作消息, 所述 处理动作消息中包含所述 Controller 为所述 4艮文生成的匹配流表项 Match Fields和操作 Action动作。 换句话说, Controller收到 OFSW发送的请求消 息后, 对 ^艮文进行如下处理: 1 ) 生成与该^艮文对应的匹配流表项 Match Fields; 2 ) 确定对报文处理的 Action 动作。 然后将包含匹配的流表项和 Action动作的处理动作消息发送给 OFSW。
S103、 ^=艮据所述处理动作消息在本地建立匹配流表项并标注所述
Action动作。 OFSW收到此消息后, 在本地建立匹配流表项, 同时在流表 里标注处理的 Action动作。 这样当未来再次收到此类 ^艮文时, 就可在流表 中匹配出来, 并且知道对该 ^艮文应该进行的操作动作即 Action动作。
S104、 根据所述 Action动作对所述报文进行处理。 即 OFSW根据所述 Action动作对本次收到的所述 文进行处理。
此外, 在本发明某些实施例中, OFSW向 Controller发送请求消息前即 步骤 S101之前, 还可以先在 OFSW本地流表中进行一下匹配, 即:
判断本地流表中是否有匹配所述报文的流表项;
若有, 则按照所述本地流表中匹配的流表项中标注的 Action动作对所 述报文进行处理, 并结束流程; 若没有, 则继续向下执行。
这样通过预先在本地进行判断可以提高处理效率, 已经可以识别的报 文可直接处理, 而不用每次都向 Controller发送请求消息。
本实施例将转发面首次收到的新的报文发给控制面, 然后根据控制面 的指示对报文的某些位置的字段实施流表匹配, 使得转发面不需要识别报 文的类型即报文中字段的语义。 这样通过控制面返回的指示建立流表处理 报文可以使转发面在不需要知晓报文类型的情况下能够对报文进行处理, 进而可以简化转发面业务, 避免了各种复杂的编程, 还可以大大扩展转发 面可以处理的 ^艮文种类。 实施例二
本实施例是在上一实施例基础上对步骤做了进一步细化。 图 2为本发 明实施例二中控制面与转发面通信示意图, 图中 A、 B、 C等各网元均为转 发面中的 OFSW。
在 OpenFlow中, 流表项中指明了要根据报文的哪些字段建立流表,例 如对 IP 4艮文的五元组 ( Source IP/Dest IP/Source Port/Dest Port/传输层协议 号) 建立流表可以区分某一条流, 从而当报文过来时就知道该报文是否匹 配, 这种情况下, 转发面中的网元需要知道五元组的具体含义和字段位置。 而在本实施例中, 转发面中的网元并不需要知道报文中字段的具体含义和 位置, 而是完全靠 Controller下发的指令即可完成对报文的处理。
本实施例方法包括:
S201 : 网元 A收到一个报文后, 网元 A判断自身流表中是否有匹配该 报文的流表项, 如果有, 则直接根据该流表项的 Action指示进行操作, 并 结束流程; 如果没有匹配项, 则继续执行步骤 S202。
S202: 网元 A向 Controller发送消息, 并附上才艮文, 请求 Controller 进行处理。
S203 : Controller收到网元 A发送的消息后, 对该 4艮文进行如下处理: 1 ) 生成匹配的流表项 Match Fields; 2 ) 确定对报文处理的 Action动作。
其中, 匹配流表项应该根据具体场景而定, 本发明实施例不做限制。 当然为了使本实施例更加清楚, 下面示例性的给出所述匹配流表项的一种 形式:
所述匹配流表项具体可以包括: 匹配项信息的字段位置信息和匹配项 信息的长度信息。 用来指明应该对报文里的哪些字段建立流表, 即哪些字 段可以用来作为匹配项信息。 字段位置和长度信息可能隐含在报文的某个 字段里, 例如最常见的 Ethernet报文的 FCS校验, 实际是 Ethernet报文的 最后部分, 因此字段位置需要报文里的 Ethernet长度报文再减去 4字节, 表示其字段位置。
在本发明某些实施例中优选的:
所述匹配项信息的字段位置信息具体可以为: 固定的偏移量, 或所述 报文里第一指定字段的值加上偏移量;
所述匹配项信息的长度信息具体可以为: 固定的数值, 或所述报文里 第二指定字段的值加上偏移量。
此外, 匹配流表项还可以包括匹配方式信息, 即属于精确匹配还是范 围匹配。 如果是精确匹配, 则含掩码信息。 该信息字段在 OpenFlow中已定 义。
Action即流表处理动作, 指的是当报文进行流表匹配后, 网元 A应该 对才艮文进行怎样的处理。 OpenFlow定义了一系列的 Action , 在网元 A不知 道报文的语义的情况下, 需要增加新的动作对报文进行处理, 一些可能的 Action如下:
Output: 该动作指示匹配的流转发到指定的端口。 OpenFlow已定义。
Set-Queue:该动作要求匹配的流对应一个队列 ID ,供网元 A处理( QoS 处理)。 OpenFlow已定义。
Drop: 指示丟弃该匹配的 ^艮文。 OpenFlow 已定义。
Group: 指示 ^艮文经过特定的组处理, 主要用于组播等^艮文的处理。
OpenFlow已定义。
下面的这些动作, 在 OpenFlow中未定义或者是对多个 OpenFlow动作 合并, 主要定义了对转发报文的修改:
对某一字段固定信息的添加、 删除或修改: 这是最基本的操作, OpenFlow定义的 PUSH/POP动作都包含在此。
时戳信息的添加或修改: 表示接受到报文后, 添加或修改当前的时戳 信息。 例如对某些 OAM报文需要如此处理。
计数信息的添加: 设定一个初始值和固定值后, 该字段表示每收到一 个报文, 在报文中添加计数信息, 每新到一个报文, 计数信息将增加 (或 减少) 一个固定值, 第一个报文的计数值为初始值。 典型的如报文中的 Sequence Number字段或 Counter字段。
计数信息修改: 将报文中某字段的信息增加 (或减少) 一个固定值。 典型的如 TTL字段, 转发时, 该字段减 1。
校验信息, 包含对报文中哪些部分进行校验, 以及校验类型。 例如 IP 头就只对 IP报文头进行 Checksum校验。 校验类型一般分为: Checksum 校验( IP报文头校验、 MPLS OAM中的 BIP16属此类)和 CRC校验( Ethernet 报文属此类)。
S204: Controller向网元 A发送对该^艮文的流的处理动作消息, 里面包 含了要求网元 A建立的所述匹配流表项和对流处理的所述 Action动作。 S205: 网元 A收到此消息后, 根据该消息建立匹配流表项, 同时在流 表里标注处理的 Action动作,同时网元 A根据所述 Action动作对该报文进 行处理。
上述处理过程跟传统的 OpenFlow处理过程的重要区别在于: 网元 A 并不需要识别报文的类型, 即报文中的字段的语义和位置, 例如是 IP报文 还是 MPLS报文, 是 TCP字段还是 vLan字段等, 而完全由 Controller的指 示对报文的某些位置的字段实施流表匹配。
本实施例将转发面首次收到的新的报文发给控制面, 然后根据控制面 的指示对报文的某些位置的字段实施流表匹配, 使得转发面不需要识别报 文的类型即报文中字段的语义。 这样通过控制面返回的指示建立流表处理 报文可以使转发面在不需要知晓报文类型的情况下能够对报文进行处理, 进而可以简化转发面业务, 避免了各种复杂的编程, 还可以大大扩展转发 面可以处理的 ^艮文种类。 实施例三
图 3为本发明实施例三方法的流程图。 本实施例与实施例一相对应, 实施例一是站在 OFSW角度进行描述的, 而本实施例则站在 Controller的 角度。
本实施例提供了一种报文处理方法, 所述方法包括:
S301、 接收转发面实体 OFSW发送的请求消息, 所述请求消息包含所 述 OFSW接收到的报文;
S302、 为所述报文生成匹配流表项 Match Fields和操作 Action动作;
S303、 向所述 OFSW发送所述^艮文的流的处理动作消息, 所述处理动 作消息中包含所述匹配流表项 Match Fields和所述 Action动作, 以使所述 OFSW根据所述处理动作消息在本地建立匹配流表项并标注所述 Action动 作然后根据所述 Action动作对所述报文进行处理。
在本发明某些实施例中优选的 , 所述匹配流表项 Match Fields具体包 括: 匹配项信息的字段位置信息和匹配项信息的长度信息。
进一步的, 在本发明某些实施例中, 所述匹配项信息的字段位置信息 为固定的偏移量或所述报文里第一指定字段的值加上偏移量, 所述匹配项 信息的长度信息为固定的数值或所述报文里第二指定字段的值加上偏移 量。
本实施例将转发面首次收到的新的报文发给控制面, 然后根据控制面 的指示对报文的某些位置的字段实施流表匹配, 使得转发面不需要识别报 文的类型即报文中字段的语义。 这样通过控制面返回的指示建立流表处理 报文可以使转发面在不需要知晓报文类型的情况下能够对报文进行处理, 进而可以简化转发面业务, 避免了各种复杂的编程, 还可以大大扩展转发 面可以处理的 ^艮文种类。 实施例四
图 4为本发明实施例四装置的示意图。 本实施例与实施例一相对应, 提供了一种报文处理装置 400 , 所述装置 400包括:
第一消息发送模块 401 , 用于向控制面实体 Controller发送请求消息, 所述请求消息包含本地接收到的报文;
第一消息接收模块 402 , 用于接收所述 Controller发送的所述报文的流 的处理动作消息, 以及将所述处理动作消息发送至流表项建立模块, 所述 处理动作消息中包含所述 Controller 为所述 4艮文生成的匹配流表项 Match Fields和操作 Action动作;
流表项建立模块 403 , 用于从所述第一消息接收模块接收所述处理动 作消息, 居所述处理动作消息在本地建立匹配流表项并标注所述 Action 动作, 以及将所述 Action动作发送至第一报文处理模块;
第一报文处理模块 404 , 用于从所述流表项建立模块接收所述 Action 动作, 并根据所述 Action动作对所述报文进行处理。
优选的, 在本发明某些实施例中: 所述匹配流表项 Match Fields具体 包括: 匹配项信息的字段位置信息和匹配项信息的长度信息; 所述匹配项 信息的字段位置信息为固定的偏移量或所述报文里第一指定字段的值加上 偏移量, 所述匹配项信息的长度信息为固定的数值或所述报文里第二指定 字段的值加上偏移量。 优选的, 在本发明某些实施例中, 所述装置 400还包括:
报文匹配模块 405 , 用于判断本地流表中是否有匹配所述报文的流表 项, 若有, 则将与所述报文匹配的流表项中标注的 Action动作发送至所述 第一报文处理模块, 若没有, 则触发所述第一消息发送模块;
所述第一报文处理模块 404 , 还用于从所述报文匹配模块接收与所述 才艮文匹配的流表项中标注的 Action动作, 并根据所述与所述 ^艮文匹配的流 表项中标注的 Action动作对所述报文进行处理。
对于装置实施例而言, 由于其基本对应于方法实施例, 所以相关之处 参见方法实施例的部分说明即可。 以上所描述的装置实施例仅仅是示意性 的, 其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开 的, 作为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一 个地方, 或者也可以分布到多个网络单元上。 可以根据实际的需要选择其 中的部分或者全部模块来实现本实施例方案的目的。 本领域普通技术人员 在不付出创造性劳动的情况下, 即可以理解并实施。
本实施例将转发面首次收到的新的报文发给控制面, 然后根据控制面 的指示对报文的某些位置的字段实施流表匹配, 使得转发面不需要识别报 文的类型即报文中字段的语义。 这样通过控制面返回的指示建立流表处理 报文可以使转发面在不需要知晓报文类型的情况下能够对报文进行处理, 进而可以简化转发面业务, 避免了各种复杂的编程, 还可以大大扩展转发 面可以处理的 ^艮文种类。 实施例五
图 5为本发明实施例五装置的示意图。 本实施例与实施例三相对应, 提供了一种报文处理装置 500 , 所述装置 500包括:
第二消息接收模块 501 ,用于接收转发面实体 OFSW发送的请求消息, 所述请求消息包含所述 OFSW接收到的报文, 以及将所述报文发送至第二 报文处理模块;
第二报文处理模块 502 , 用于从所述第二消息接收模块接收所述报文, 为所述报文生成匹配流表项 Match Fields和操作 Action动作, 以及将所述 匹配流表项 Match Fields和操作 Action动作发送至第二消息发送模块; 第二消息发送模块 503 , 用于从所述第二报文处理模块接收所述匹配 流表项 Match Fields和操作 Action动作, 并向所述 OFSW发送所述报文的 流的处理动作消息 ,所述处理动作消息中包含所述匹配流表项 Match Fields 和所述 Action动作, 以使所述 OFSW根据所述处理动作消息在本地建立匹 配流表项并标注所述 Action动作, 然后 居所述 Action动作对所述 文进 行处理。
优选的 , 在本发明某些实施例中 , 所述匹配流表项 Match Fields具体 包括: 匹配项信息的字段位置信息和匹配项信息的长度信息; 所述匹配项 信息的字段位置信息为固定的偏移量或所述报文里第一指定字段的值加上 偏移量, 所述匹配项信息的长度信息为固定的数值或所述报文里第二指定 字段的值加上偏移量。
对于装置实施例而言, 由于其基本对应于方法实施例, 所以相关之处 参见方法实施例的部分说明即可。 以上所描述的装置实施例仅仅是示意性 的, 其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开 的, 作为单元显示的部件可以是或者也可以不是物理单元, 即可以位于一 个地方, 或者也可以分布到多个网络单元上。 可以根据实际的需要选择其 中的部分或者全部模块来实现本实施例方案的目的。 本领域普通技术人员 在不付出创造性劳动的情况下, 即可以理解并实施。
本实施例将转发面首次收到的新的报文发给控制面, 然后根据控制面 的指示对报文的某些位置的字段实施流表匹配, 使得转发面不需要识别报 文的类型即报文中字段的语义。 这样通过控制面返回的指示建立流表处理 报文可以使转发面在不需要知晓报文类型的情况下能够对报文进行处理, 进而可以简化转发面业务, 避免了各种复杂的编程, 还可以大大扩展转发 面可以处理的 ^艮文种类。 实施例六
图 6为本发明实施例六系统的示意图。 本实施例与上述方法及装置实 施例相对应, 提供了一种报文处理系统, 所述系统包括: 转发面实体 OFSW601 : 用于向控制面实体 Controller发送请求消息, 所述请求消息包含本地接收到的报文;接收所述 Controller发送的所述报文 的流的处理动作消息,所述处理动作消息中包含所述 Controller为所述报文 生成的匹配流表项 Match Fields和操作 Action动作; 根据所述处理动作消 息在本地建立匹配流表项并标注所述 Action动作; 根据所述 Action动作对 所述 文进行处理;
控制面实体 Controller602: 用于接收转发面实体 OFSW发送的请求消 息; 为所述报文生成所述匹配流表项 Match Fields和操作 Action动作; 向 所述 OFSW发送所述处理动作消息, 所述处理动作消息中包含所述匹配流 表项 Match Fields和所述 Action动作。
优选的, 在本发明某些实施例中:
所述匹配流表项 Match Fields具体包括: 匹配项信息的字段位置信息 和匹配项信息的长度信息; 所述匹配项信息的字段位置信息为固定的偏移 量或所述报文里第一指定字段的值加上偏移量, 所述匹配项信息的长度信 息为固定的数值或所述报文里第二指定字段的值加上偏移量。
优选的, 在本发明某些实施例中,
所述 OFSW601还用于: 在所述向所述 Controller发送请求消息之前判 断本地流表中是否有匹配所述报文的流表项; 若有, 则按照所述本地流表 中匹配的流表项中标注的 Action动作对所述报文进行处理; 若没有, 则才 向所述 Controller发送所述请求消息。
本实施例将转发面首次收到的新的报文发给控制面, 然后根据控制面 的指示对报文的某些位置的字段实施流表匹配, 使得转发面不需要识别报 文的类型即报文中字段的语义。 这样通过控制面返回的指示建立流表处理 报文可以使转发面在不需要知晓报文类型的情况下能够对报文进行处理, 进而可以简化转发面业务, 避免了各种复杂的编程, 还可以大大扩展转发 面可以处理的 ^艮文种类。
对于系统实施例而言, 由于其基本对应于方法及装置实施例, 所以相 关之处参见方法实施例的部分说明即可。 本发明可以在由计算机执行的计算机可执行指令的一般上下文中描 述, 例如程序模块。 一般地, 程序模块包括执行特定任务或实现特定抽象 数据类型的例程、 程序、 对象、 组件、 数据结构等等。 也可以在分布式计 算环境中实践本发明, 在这些分布式计算环境中, 由通过通信网络而被连 接的远程处理设备来执行任务。 在分布式计算环境中, 程序模块可以位于 包括存储设备在内的本地和远程计算机存储介质中。
本领域普通技术人员可以理解实现上述方法实施方式中的全部或部分 步骤是可以通过程序来指令相关的硬件来完成, 所述的程序可以存储于计 算机可读取存储介质中, 这里所称得的存储介质, 如: ROM、 RAM, 磁碟、 光盘等。
还需要说明的是, 在本文中, 诸如第一和第二等之类的关系术语仅仅 用来将一个实体或者操作与另一个实体或操作区分开来, 而不一定要求或 者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。 而且, 术 语 "包括"、 "包含" 或者其任何其他变体意在涵盖非排他性的包含, 从而 使得包括一系列要素的过程、 方法、 物品或者设备不仅包括那些要素, 而 且还包括没有明确列出的其他要素, 或者是还包括为这种过程、 方法、 物 品或者设备所固有的要素。 在没有更多限制的情况下, 由语句 "包括一 个 ... ... " 限定的要素, 并不排除在包括所述要素的过程、 方法、 物品或者 设备中还存在另外的相同要素。
以上所述仅为本发明的较佳实施例而已, 并非用于限定本发明的保护 上实施例的说明只是用于帮助理解本发明的方法及其核心思想; 同时, 对 于本领域的一般技术人员, 依据本发明的思想, 在具体实施方式及应用范 围上均会有改变之处。 综上所述, 本说明书内容不应理解为对本发明的限 制。 凡在本发明的精神和原则之内所作的任何修改、 等同替换、 改进等, 均包含在本发明的保护范围内。

Claims

权 利 要 求
1、 一种 文处理方法, 其特征在于, 所述方法包括:
向控制面实体 Controller发送请求消息,所述请求消息包含本地接收到 的报文;
接收所述 Controller发送的所述 4艮文的流的处理动作消息 ,所述处理动 作消息中包含所述 Controller为所述 4艮文生成的匹配流表项 Match Fields和 操作 Action动作;
根据所述处理动作消息在本地建立匹配流表项并标注所述 Action 动 作;
根据所述 Action动作对所述 文进行处理。
2、 根据权利要求 1所述的方法, 其特征在于, 所述匹配流表项 Match Fields具体包括: 匹配项信息的字段位置信息和匹配项信息的长度信息。
3、 根据权利要求 2所述的方法, 其特征在于, 所述匹配项信息的字段 位置信息为固定的偏移量或所述报文里第一指定字段的值加上偏移量, 所 述匹配项信息的长度信息为固定的数值或所述报文里第二指定字段的值加 上偏移量。
4、 根据权利要求 1 所述的方法, 其特征在于, 所述向控制面实体 Controller发送请求消息之前, 还包括:
判断本地流表中是否有匹配所述报文的流表项;
若有, 则按照所述本地流表中匹配的流表项中标注的 Action动作对所 述报文进行处理, 并结束流程; 若没有, 则继续向下执行。
5、 一种报文处理方法, 其特征在于, 所述方法包括:
接收转发面实体 OFSW 发送的请求消息, 所述请求消息包含所述 OFSW接收到的报文;
为所述报文生成匹配流表项 Match Fields和操作 Action动作; 向所述 OFSW发送所述报文的流的处理动作消息, 所述处理动作消息 中包含所述匹配流表项 Match Fields和所述 Action动作 , 以使所述 OFSW 居所述处理动作消息在本地建立匹配流表项并标注所述 Action动作然后 根据所述 Action动作对所述 文进行处理。
6、 根据权利要求 5所述的方法, 其特征在于, 所述匹配流表项 Match Fields具体包括: 匹配项信息的字段位置信息和匹配项信息的长度信息。
7、 根据权利要求 6所述的方法, 其特征在于, 所述匹配项信息的字段 位置信息为固定的偏移量或所述报文里第一指定字段的值加上偏移量, 所 述匹配项信息的长度信息为固定的数值或所述报文里第二指定字段的值加 上偏移量。
8、 一种报文处理装置, 其特征在于, 所述装置包括:
第一消息发送模块, 用于向控制面实体 Controller发送请求消息, 所述 请求消息包含本地接收到的报文;
第一消息接收模块,用于接收所述 Controller发送的所述报文的流的处 理动作消息, 以及将所述处理动作消息发送至流表项建立模块, 所述处理 动作消息中包含所述 Controller为所述报文生成的匹配流表项 Match Fields 和操作 Action动作;
流表项建立模块, 用于从所述第一消息接收模块接收所述处理动作消 息 , 居所述处理动作消息在本地建立匹配流表项并标注所述 Action动作 , 以及将所述 Action动作发送至第一报文处理模块;
第一报文处理模块,用于从所述流表项建立模块接收所述 Action动作, 并根据所述 Action动作对所述报文进行处理。
9、 根据权利要求 8所述的装置, 其特征在于: 所述匹配流表项 Match Fields具体包括: 匹配项信息的字段位置信息和匹配项信息的长度信息; 所 述匹配项信息的字段位置信息为固定的偏移量或所述报文里第一指定字段 的值加上偏移量, 所述匹配项信息的长度信息为固定的数值或所述报文里 第二指定字段的值加上偏移量。
10、 根据权利要求 8所述的装置, 其特征在于, 所述装置还包括: 报文匹配模块, 用于判断本地流表中是否有匹配所述报文的流表项, 若有, 则将与所述报文匹配的流表项中标注的 Action动作发送至所述第一 报文处理模块, 若没有, 则触发所述第一消息发送模块; 所述第一报文处理模块, 还用于从所述报文匹配模块接收与所述报文 匹配的流表项中标注的 Action动作 , 并根据所述与所述报文匹配的流表项 中标注的 Action动作对所述 ^艮文进行处理。
11、 一种报文处理装置, 其特征在于, 所述装置包括:
第二消息接收模块, 用于接收转发面实体 OFSW发送的请求消息, 所 述请求消息包含所述 OFSW接收到的报文, 以及将所述报文发送至第二报 文处理模块;
第二报文处理模块, 用于从所述第二消息接收模块接收所述报文, 为 所述报文生成匹配流表项 Match Fields和操作 Action动作, 以及将所述匹 配流表项 Match Fields和操作 Action动作发送至第二消息发送模块;
第二消息发送模块, 用于从所述第二报文处理模块接收所述匹配流表 项 Match Fields和操作 Action动作, 并向所述 OFSW发送所述报文的流的 处理动作消息, 所述处理动作消息中包含所述匹配流表项 Match Fields和 所述 Action动作, 以使所述 OFSW根据所述处理动作消息在本地建立匹配 流表项并标注所述 Action动作, 然后根据所述 Action动作对所述报文进行 处理。
12、根据权利要求 11所述的装置,其特征在于,所述匹配流表项 Match Fields具体包括: 匹配项信息的字段位置信息和匹配项信息的长度信息; 所 述匹配项信息的字段位置信息为固定的偏移量或所述报文里第一指定字段 的值加上偏移量, 所述匹配项信息的长度信息为固定的数值或所述报文里 第二指定字段的值加上偏移量。
13、 一种 ^艮文处理系统, 其特征在于, 所述系统包括:
转发面实体 OFSW: 用于向控制面实体 Controller发送请求消息, 所述 请求消息包含本地接收到的报文;接收所述 Controller发送的所述报文的流 的处理动作消息,所述处理动作消息中包含所述 Controller为所述报文生成 的匹配流表项 Match Fields和操作 Action动作; 根据所述处理动作消息在 本地建立匹配流表项并标注所述 Action动作; 根据所述 Action动作对所述 才艮文进行处理;
控制面实体 Controller: 用于接收转发面实体 OFSW发送的请求消息; 为所述报文生成所述匹配流表项 Match Fields和操作 Action动作; 向所述 OFSW发送所述处理动作消息, 所述处理动作消息中包含所述匹配流表项 Match Fields和所述 Action动作。
14、 根据权利要求 13所述的系统, 其特征在于:
所述匹配流表项 Match Fields具体包括: 匹配项信息的字段位置信息 和匹配项信息的长度信息; 所述匹配项信息的字段位置信息为固定的偏移 量或所述报文里第一指定字段的值加上偏移量, 所述匹配项信息的长度信 息为固定的数值或所述报文里第二指定字段的值加上偏移量。
15、 根据权利要求 13所述的系统, 其特征在于,
所述 OFSW还用于: 在所述向所述 Controller发送请求消息之前判断 本地流表中是否有匹配所述报文的流表项; 若有, 则按照所述本地流表中 匹配的流表项中标注的 Action动作对所述报文进行处理; 若没有, 则才向 所述 Controller发送所述请求消息。
PCT/CN2013/070301 2013-01-10 2013-01-10 报文处理方法、装置及系统 WO2014107860A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/070301 WO2014107860A1 (zh) 2013-01-10 2013-01-10 报文处理方法、装置及系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/070301 WO2014107860A1 (zh) 2013-01-10 2013-01-10 报文处理方法、装置及系统

Publications (1)

Publication Number Publication Date
WO2014107860A1 true WO2014107860A1 (zh) 2014-07-17

Family

ID=51166490

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/070301 WO2014107860A1 (zh) 2013-01-10 2013-01-10 报文处理方法、装置及系统

Country Status (1)

Country Link
WO (1) WO2014107860A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012098786A1 (ja) * 2011-01-17 2012-07-26 日本電気株式会社 ネットワークシステム、コントローラ、スイッチ、及びトラフィック監視方法
CN102685006A (zh) * 2012-05-03 2012-09-19 中兴通讯股份有限公司 一种转发数据报文的方法及装置
CN102763382A (zh) * 2010-01-29 2012-10-31 日本电气株式会社 前端系统和前端处理方法
CN102868578A (zh) * 2012-10-11 2013-01-09 盛科网络(苏州)有限公司 Openflow交换机表项容量的测试方法及测试系统

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102763382A (zh) * 2010-01-29 2012-10-31 日本电气株式会社 前端系统和前端处理方法
WO2012098786A1 (ja) * 2011-01-17 2012-07-26 日本電気株式会社 ネットワークシステム、コントローラ、スイッチ、及びトラフィック監視方法
CN102685006A (zh) * 2012-05-03 2012-09-19 中兴通讯股份有限公司 一种转发数据报文的方法及装置
CN102868578A (zh) * 2012-10-11 2013-01-09 盛科网络(苏州)有限公司 Openflow交换机表项容量的测试方法及测试系统

Similar Documents

Publication Publication Date Title
CN109218178B (zh) 一种报文处理方法及网络设备
EP3958521A1 (en) Method and apparatus for providing service for service flow
US9300483B2 (en) Self-routing multicast in a software defined network fabric
WO2017016106A1 (zh) 一种基于SDN的支持QoS的通信隧道建立方法及系统
EP3139560B1 (en) Packet processing method, device and computer storage medium
EP3531617B1 (en) Message transmission method and apparatus, node and computer storage medium
WO2018149338A1 (zh) 基于sdn的远端流镜像控制方法、实现方法及相关设备
WO2017193758A1 (zh) 一种数据传输的方法、设备和系统
EP3764594A1 (en) Network device management method, apparatus and system
EP2849397A1 (en) Communication system, control device, communication method, and program
US9571410B2 (en) Credit-based link level flow control and credit exchange using DCBX
WO2014186963A1 (zh) 业务路由系统、设备和方法
JPWO2014112612A1 (ja) 通信システム、制御装置及びネットワークトポロジの管理方法
CN104283756A (zh) 一种实现分布式多租户虚拟网络的方法和装置
WO2018072732A1 (zh) 一种信息处理方法、装置和计算机存储介质
WO2021196967A1 (zh) 消息交互方法、装置、设备和存储介质
WO2011160517A1 (zh) 一种多协议标签交换业务隧道切换的方法及系统
WO2014117737A1 (zh) Oam报文处理方法、设备及系统
EP2728797B1 (en) Message processing method, device and system
WO2023061061A1 (zh) 报文处理方法、线卡、设备及存储介质
CN103795630A (zh) 一种标签交换网络的报文传输方法和装置
WO2015172373A1 (zh) 一种用于OpenFlow网络的数据处理方法和装置
CN103825828A (zh) 一种基于OpenFlow的可信可控组播控制器
WO2015027738A1 (zh) 一种传输、接收元数据的方法、开放流逻辑交换机
CN110858822A (zh) 媒体接入控制安全协议报文传输方法和相关装置

Legal Events

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

Ref document number: 13870987

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 13870987

Country of ref document: EP

Kind code of ref document: A1