WO2015131617A1 - 流表处理方法、装置、开放流控制器及开放流交换机 - Google Patents
流表处理方法、装置、开放流控制器及开放流交换机 Download PDFInfo
- Publication number
- WO2015131617A1 WO2015131617A1 PCT/CN2014/094264 CN2014094264W WO2015131617A1 WO 2015131617 A1 WO2015131617 A1 WO 2015131617A1 CN 2014094264 W CN2014094264 W CN 2014094264W WO 2015131617 A1 WO2015131617 A1 WO 2015131617A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- flow table
- openflow
- matching information
- flow
- creation structure
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/64—Hybrid switching systems
- H04L12/6418—Hybrid transport
Definitions
- the present invention relates to the field of communications, and in particular to a flow table processing method and apparatus, an open flow controller, and an open flow switch.
- FIG. 1 is a schematic diagram of an OpenFlow network component architecture according to the related art. As shown in FIG. 1, the control plane of the OpenFlow network is controlled by OpenFlow. The controller is implemented by the controller.
- the OpenFlow controller is a device with powerful computing capabilities. The specific device can be a PC, a server, or a server cluster.
- the forwarding plane of the OpenFlow network is implemented by an OpenFlow switch.
- a device with a strong switching capability is a network element device that is equipped with multiple network ports and processes and forwards packets based on a flow table.
- the interface between the OpenFlow controller and the OpenFlow switch runs the OpenFlow protocol, so this interface is also called OpenFlow Channel.
- the OpenFlow protocol is developed and modified by the International Standards Organization Open Networking Foundation (ONF).
- the current OpenFlow protocol defines a variety of messages for information transfer between the controller and the forwarding switch, including: Controller- To-Switch Messages (messages from controller to switch), Asynchronous Messages (synchronous messages) and Symmetric Messages (symmetric messages).
- Controller-to-Switch Messages are used by the controller to manage and view the status of the switch.
- the controller initiates the switch and responds to the initiated query message.
- Asynchronous messages are typically initiated by the switch to advertise the status, statistics, and events of their own operations to the controller.
- Symmetric Messages can be initiated by the controller or by the switch, such as hello messages, Echo keep-alive messages, and so on.
- the controller can query and configure the flow table operation capability on the switch, such as which fields can be matched, which actions can be performed, etc., but these attributes And the flow table feature description cannot be used as a reference for creating entries, that is, these entries are suitable for those algorithms and structure creation, so the flow table of the OpenFlow protocol of the existing switch is constructed by using the TCAM data structure. High cost and uneconomical.
- the invention provides a flow table processing method and device, an open flow controller and an open flow switch, so as to at least solve the related art, the problem of constructing a flow table is high in cost and low in efficiency.
- a flow table processing method including: extending a flow table feature message sent to an OpenFlow OpenFlow switch, where the flow table feature message includes a flow for indicating a flow table creation structure. Table matching information; sending the flow table feature message to the OpenFlow switch.
- the flow table feature message extended to the OpenFlow OpenFlow switch includes at least one of the following: the flow table matching information extended to indicate the flow table creation structure is a creation structure of the flow table implemented by using the hash table; and the extension is used to indicate the flow.
- the flow table matching information of the table creation structure is a creation structure of the flow table by using the routing table.
- a flow table processing method including: receiving a flow table feature message sent by an OpenFlow OpenFlow controller, where the flow table feature message includes a flow table feature structure for indicating a flow table creation structure. Flow table matching information; creating a flow table according to the flow table creation structure indicated by the flow table matching information.
- the flow table creation structure creation flow table indicated according to the flow table matching information includes at least one of the following: the flow table matching information is set to mark the fixed mask OFPTFMF_MASK_FIX, and the OFPTFPT_WILDCARDS attribute is OXM If the queue is empty, the flow table is created by using a hash table; and when the flow table matching information is set to the OFPTFMF_MASK_ROUTE for characterizing the mask and routing table, the flow table is created by using a routing table.
- a flow table processing apparatus including: an expansion module, configured to extend a flow table feature message sent to an OpenFlow OpenFlow switch, where the flow table feature message includes an indication
- the flow table creates the flow table matching information of the structure
- the sending module is configured to send the flow table feature message to the OpenFlow switch.
- the extension module includes at least one of the following: a first extension unit configured to expand flow table matching information used to indicate a flow table creation structure to create a flow table using a hash table; a second extension unit, setting To expand the flow table matching information used to indicate the flow table creation structure, the flow table creation structure is implemented by using the routing table.
- an OpenFlow OpenFlow controller comprising the apparatus of any of the above.
- a flow table processing apparatus including: a receiving module, configured to receive a flow table feature message sent by an OpenFlow OpenFlow controller, where the flow table feature message includes an indication
- the flow table creates a flow table matching information of the structure; the creating module is configured to create a flow table according to the flow table creation structure indicated by the flow table matching information.
- the creating module comprises at least one of the following: a first creating unit, configured to set when the flow table matching information is set to mark the fixed mask OFPTFMF_MASK_FIX, and the OXM queue of the OFPTFPT_WILDCARDS attribute is empty
- the flow table is created by using a hash table.
- the second creation unit is configured to create the flow table by using a routing table when the flow table matching information is set to the OFPTFMF_MASK_ROUTE used to represent the mask and routing table. .
- an OpenFlow OpenFlow switch comprising the apparatus of any of the above.
- the flow table feature message sent to the OpenFlow OpenFlow switch is extended, wherein the flow table feature message includes flow table matching information for indicating a flow table creation structure; and the flow table feature message is sent to The OpenFlow switch solves the problem that the flow table has high cost and low efficiency in the related technology, thereby achieving the effect of saving cost and improving the efficiency of the flow table construction.
- FIG. 1 is a schematic diagram of an OpenFlow network component architecture according to related art
- FIG. 2 is a flowchart of a flow table processing method 1 according to an embodiment of the present invention.
- FIG. 3 is a flowchart of a method 2 of a flow table processing according to an embodiment of the present invention.
- FIG. 4 is a structural block diagram of a flow table processing apparatus 1 according to an embodiment of the present invention.
- FIG. 5 is a block diagram showing a preferred structure of an expansion module 42 in a flow table processing apparatus 1 according to an embodiment of the present invention
- FIG. 6 is a structural block diagram of an OpenFlow OpenFlow controller according to an embodiment of the present invention.
- FIG. 7 is a structural block diagram of a flow table processing apparatus 2 according to an embodiment of the present invention.
- FIG. 8 is a block diagram showing a preferred structure of a creating module 74 in the flow table processing apparatus 2 according to an embodiment of the present invention.
- FIG. 9 is a structural block diagram of an OpenFlow OpenFlow switch according to an embodiment of the present invention.
- FIG. 10 is a flow chart for creating a flow table in a routing table storage manner according to a preferred embodiment of the present invention.
- FIG. 11 is a flowchart of a process after an OpenFlow switch receives a flow configuration message sent by a controller according to a preferred embodiment of the present invention.
- FIG. 2 is a flowchart of a flow table processing method 1 according to an embodiment of the present invention. As shown in FIG. 2, the flow includes the following steps:
- Step S202 the flow table feature message sent to the OpenFlow OpenFlow switch is extended, where the flow table feature message includes flow table matching information for indicating a flow table creation structure.
- Step S204 Send the flow table feature message to the OpenFlow switch.
- the extended flow table feature message carries the flow table matching information used to indicate the flow table creation structure, so that the OpenFlow switch can flexibly configure the flow table structure according to the flow table matching information, and the fixed flow is adopted in relation to the related art.
- Table matching information is used to create a flow table, which is not only costly but also inefficient. The above method not only solves the problem of high cost and low efficiency in constructing a flow table in related technologies, thereby achieving cost saving and improving flow table construction efficiency. Effect.
- the flow table feature message sent to the OpenFlow OpenFlow switch may be extended in multiple manners.
- at least one of the following may be adopted: the flow table matching information used to indicate the flow table creation structure is extended to implement the flow table by using the hash table.
- the creation structure of the flow table is extended by the flow table to indicate the flow table matching information of the flow table creation structure.
- FIG. 3 is a flowchart of a method 2 for processing a flow table according to an embodiment of the present invention. As shown in FIG. 3, the process includes the following steps:
- Step S302 Receive a flow table feature message sent by the OpenFlow OpenFlow controller, where the flow table feature message includes flow table matching information for indicating a flow table creation structure.
- Step S304 Create a flow table according to the flow table creation structure indicated by the flow table matching information.
- the flow table matching information that is sent by the OpenFlow controller and used to indicate the flow table creation structure is received, so that the flow table structure can be flexibly configured according to the flow table matching information, and the fixed flow table matching is used in comparison with the related art.
- the information is used to create a flow table, which is not only costly but also inefficient.
- the above method not only solves the problem of high cost and low efficiency in constructing the flow table in the related technology, thereby achieving cost saving and improving the efficiency of the flow table construction. .
- the flow table creation structure created according to the flow table matching information may include a plurality of types, and the following examples are illustrated: for example, the flow table matching information is set to mark the fixed mask OFPTFMF_MASK_FIX, and the OFPTFPT_WILDCARDS attribute In the case that the OXM queue is empty, the flow table is created by using a hash table; for example, in the case that the flow table matching information is set to the OFPTFMF_MASK_ROUTE for characterizing the mask and the routing table, the flow table is created by using the routing table.
- a flow table processing device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, 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 is preferably implemented in software, hardware, or a combination of software and hardware, is also possible and contemplated.
- FIG. 4 is a structural block diagram of a flow table processing apparatus 1 according to an embodiment of the present invention. As shown in FIG. 4, the apparatus includes an expansion module 42 and a transmitting module 44, which will be described below.
- the expansion module 42 is configured to extend the flow table feature message sent to the OpenFlow OpenFlow switch, where the flow table feature message includes flow table matching information for indicating a flow table creation structure, and the sending module 44 is connected to the expansion module 42. Used to send a flow table feature message to an OpenFlow switch.
- FIG. 5 is a block diagram showing a preferred structure of an expansion module 42 in a flow table processing apparatus 1 according to an embodiment of the present invention.
- the expansion module 42 includes at least one of the following: a first extension unit 52 and a second extension unit 54.
- the expansion module 42 will be described below.
- the first expansion unit 52 is configured to expand the flow table matching information for indicating the flow table creation structure to implement the flow table creation structure by using the hash table; the second expansion unit 54 is configured to expand the flow for indicating the flow table creation structure.
- the table matching information is a structure for creating a flow table by using a routing table.
- FIG. 6 is a structural block diagram of an OpenFlow OpenFlow controller according to an embodiment of the present invention. As shown in FIG. 6, the OpenFlow controller 60 includes the flow table processing apparatus 62 of any of the above.
- FIG. 7 is a structural block diagram of a flow table processing apparatus 2 according to an embodiment of the present invention. As shown in FIG. 7, the apparatus includes a receiving module 72 and a creating module 74, which will be described below.
- the receiving module 72 is configured to receive the flow table feature message sent by the OpenFlow OpenFlow controller, where the flow table feature message includes flow table matching information for indicating the flow table creation structure, and the creating module 74 is connected to the receiving module 72. , set to create a flow table based on the flow table creation structure indicated by the flow table matching information.
- FIG. 8 is a block diagram showing a preferred structure of the creating module 74 in the flow table processing apparatus 2 according to the embodiment of the present invention.
- the creating module 74 includes at least one of the following: a first creating unit 82 and a second creating unit 84.
- the creation module 74 will be described below.
- the first creating unit 82 is configured to create a flow table by using a hash table when the flow table matching information is set for the mask OFPTFMF_MASK_FIX for characterizing the mask fixed, and the OXM queue of the OFPTFPT_WILDCARDS attribute is empty; the second creating unit 84 , set to use the routing table to create a flow table if the flow table matching information is set to OFPTFMF_MASK_ROUTE for characterizing the mask with the routing table.
- FIG. 9 is a structural block diagram of an OpenFlow OpenFlow switch according to an embodiment of the present invention. As shown in FIG. 9, the OpenFlow switch 90 includes the flow table processing device 92 of any of the above.
- the solution includes the following steps: extending the table feature (flow table feature) in the existing OpenFlow protocol to carry a flow table matching mask information field, which is used to indicate the creation structure of the flow table.
- the OpenFlow switch selects the appropriate data structure storage flow table entry according to the matching information of the flow table that is carried. For example, if the table feature carries the label OFPTFMF_MASK_FIX and the OXM queue of the OFPTFPT_WILDCARDS attribute is empty, the OpenFlow switch is created.
- the flow table can be constructed by hashing, which can ensure the efficiency of the flow table search and reduce the cost of the device.
- the OFPTFMF_MASK_ROUTE carried in the table feature is set, the OpenFlow switch can be constructed by using a routing table when creating the flow table.
- the table feature (flow table feature) in the existing OpenFlow protocol is extended to carry a specific definition of the information field matched by the flow table.
- a variable match_filed_flag is added to the ofp_table_feature of the existing OpenFlow protocol for carrying the information of the flow table matching proposed by the present invention.
- the extended ofp_table_feature is defined as follows, and the italic part is defined for the new variable:
- OFPTFMF_MASK_FIX 1 ⁇ 0
- OFPTFMF_MASK_ROUTE 1 ⁇ 1
- OFPTFMF_MASK_FIX In the OXM queue of OFPTFPT_MATCH, the oxm with has_mask has a fixed mask. If the OXM queue of the OFPTFPT_WILDCARDS attribute is empty, the hash table can be used to implement the flow table.
- OFPTFMF_MASK_ROUTE In the OXM queue of OFPTFPT_MATCH, there is oxm with has_mask, and its masking characteristics are the same as the routing table.
- the flow table can be implemented by the algorithm of the routing table.
- match_field_flag Currently, only the above two bits are defined for the value of match_field_flag, and subsequent extensions can be performed as needed, and there are up to 32 flag bits.
- the OpenFlow switch describes a flow table for the OFPTFMF_MASK_ROUTE flag proposed by the present application.
- the OpenFlow switch creates a routing table according to this information and other fields of the table feature.
- FIG. 10 is a flowchart according to a preferred embodiment of the present invention. Flow chart creation flow chart of the routing table storage mode, as shown in FIG. 10, the process includes the following steps:
- Step S1002 The OpenFlow switch receives a table feature request setting request sent by the controller.
- step S1004 the OpenFlow switch checks whether the OFPTFPT_WILDCARDS attribute in the request is empty. If yes, the process proceeds to step S1006. Otherwise, the process proceeds to step S1012.
- Step S1006 The OpenFlow switch checks whether the OXM header of the OFPTFPT_MATCH attribute in the request has a non-IP type field, and has a has_mask setting, that is, the OpenFlow switch checks the OFPTFPT_MATCH attribute in the request, wherein all the OXM headers have a has_mask flag of False, except one OXM header. And the OXM corresponds to a source IP address or a destination IP address. If yes, proceed to step S1008, otherwise go to step S1012;
- Step S1008 the OpenFlow switch checks whether the OFPTFMF_MASK_ROUTE flag is set in the request, if yes, proceed to step S1010, otherwise go to step S1012;
- Step S1010 The OpenFlow switch invokes the corresponding resource to complete the creation of the routing table.
- step S1012 the OpenFlow switch creates a flow table according to the existing TCAM mode.
- FIG. 11 is a flowchart of a process after an OpenFlow switch receives a flow configuration message sent by a controller according to a preferred embodiment of the present invention. As shown in FIG. 11, the process includes the following steps:
- Step S1102 The OpenFlow switch receives a flow mod (flow table mode) addition request sent by the controller;
- Step S1104 The OpenFlow switch finds a corresponding table feature (flow table feature) according to the table id (flow table identifier) in the flow mod (flow table mode) message, and determines that it is a routing table;
- step S1106 the OpenFlow switch checks whether the matching field and the action in the flow mod are consistent with the table feature. If the matching field and the action are consistent, step S1108 is performed, otherwise, the process proceeds to step S1110 for error processing. ;
- Step S1108 The OpenFlow switch parses the flow mod message as routing entry information, and inserts a routing table.
- step S1110 the OpenFlow switch sends an error error message to the controller, and the error type is OFPET_BAD_MATCH.
- the error type is OFPET_BAD_MATCH.
- the specific extension is defined as follows, where the italic part is the newly defined error code.
- OFPBMC_BAD_TYPE 0
- OFPBMC_BAD_TAG 2
- OFPBMC_BAD_DL_ADDR_MASK 3
- OFPBMC_BAD_NW_ADDR_MASK 4
- OFPBMC_BAD_MASK 8
- OFPBAC_BAD_FIELD_MASK_FIX 12, OFPTFMF_ in /*table feature
- the MASK_FIX flag is inconsistent with the current flow entry*/
- OFPBAC_BAD_FIELD_MASK_ROUTE 13, the OFPTFMF_MASK_ROUTE flag in the /*table feature is inconsistent with the current flow entry*/
- modules or steps of the present invention described above can be implemented by a general-purpose computing device that can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they may be implemented by 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 be different from the order herein.
- the steps shown or described are performed, or they are separately fabricated into individual integrated circuit modules, or a plurality of modules or steps thereof are fabricated as a single integrated circuit module.
- the invention is not limited to any specific combination of hardware and software.
- the embodiment of the present invention provides a flow table processing method and apparatus, an open flow controller, and an open flow switch.
- the problem of constructing a flow table is high in cost and low in efficiency, thereby achieving the effect of saving cost and improving the efficiency of flow table construction.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
本发明公开了一种流表处理方法、装置、开放流控制器及开放流交换机,其中,该方法包括:扩展向开放流OpenFlow交换机发送的流表特征消息,其中,流表特征消息中包括有用于指示流表创建结构的流表匹配信息;将流表特征消息发送给OpenFlow交换机,通过本发明,解决了相关技术中,构建流表存在成本高,效率低的问题,进而达到了节省成本,提高流表构建效率的效果。
Description
本发明涉及通信领域,具体而言,涉及一种流表处理方法、装置、开放流控制器及开放流交换机。
随着软件定义网络(Software Defined Network,简称为SDN)概念的提出及其应用的发展,作为SDN核心技术的OpenFlow技术正处于快速发展阶段,目前利用OpenFlow技术建设的OpenFlow网络已经越来越多地应用于实际的生产生活中。OpenFlow网络采用控制平面与转发平面(也被称为数据平面或用户平面)相分离的架构,图1是根据相关技术的OpenFlow网络组件架构示意图,如图1所示,OpenFlow网络的控制平面由OpenFlow控制器来实现,OpenFlow控制器是一种具备强大计算能力的设备,具体的设备形态可以是个人电脑、服务器或服务器集群等,OpenFlow网络的转发平面由OpenFlow交换机来实现,OpenFlow交换机是一种具备强大交换能力的设备,具体的设备形态是配备多个网络端口、基于流表(Flow Table)进行报文处理与转发的网元设备。OpenFlow控制器与OpenFlow交换机之间的接口运行OpenFlow协议,所以该接口也被称为OpenFlow通道(OpenFlow Channel)。
OpenFlow协议由国际标准组织开放网络基金会(Open Networking Foundation,简称为ONF)负责制定和修改,当前的OpenFlow协议定义了多种消息用于控制器和转发switch之间的信息传递,包括:Controller-to-Switch Messages(控制器到交换机之间的消息),Asynchronous Messages(异步消息)和Symmetric Messages(对称消息)三大类。Controller-to-Switch Messages用于控制器管理和查看交换机的状态,一般由控制器发起,交换机对发起的查询消息进行响应。异步消息一般由交换机发起,向控制器通告自己运行的状态、统计信息和事件。Symmetric Messages可以由控制器发起,也可以由交换机发起,如hello消息,Echo保活消息等。在Controller-to-Switch Messages类型的消息中,有一种OFPMP_TABLE_FEATURES的消息类型,控制器可以查询和配置交换机上的流表操作的能力,如能够匹配哪些字段,可以执行哪些动作等等,但是这些属性和流表特征描述不能用于创建表项的参考,即这些表项适合于那些算法和结构创建,所以现有的交换机的OpenFlow协议的流表都是采用TCAM数据结构构建,这种构建方式的成本高,不经济。
因此,在相关技术中,构建流表存在成本高,效率低的问题。
发明内容
本发明提供了一种流表处理方法、装置、开放流控制器及开放流交换机,以至少解决相关技术中,构建流表存在成本高,效率低的问题。
根据本发明的一个方面,提供了一种流表处理方法,包括:扩展向开放流OpenFlow交换机发送的流表特征消息,其中,所述流表特征消息中包括有用于指示流表创建结构的流表匹配信息;将所述流表特征消息发送给所述OpenFlow交换机。
优选地,扩展向开放流OpenFlow交换机发送的流表特征消息包括以下至少之一:扩展用于指示流表创建结构的流表匹配信息为用hash表实现流表的创建结构;扩展用于指示流表创建结构的流表匹配信息为用路由表实现流表的创建结构。
根据本发明的另一方面,提供了一种流表处理方法,包括:接收开放流OpenFlow控制器发送的流表特征消息,其中,所述流表特征消息中包括有用于指示流表创建结构的流表匹配信息;依据所述流表匹配信息指示的流表创建结构创建流表。
优选地,依据所述流表匹配信息指示的流表创建结构创建流表包括以下至少之一:在所述流表匹配信息为用于表征掩码固定的标记OFPTFMF_MASK_FIX置位,并且OFPTFPT_WILDCARDS属性的OXM队列为空的情况下,采用hash表创建所述流表;在所述流表匹配信息为用于表征掩码同路由表的OFPTFMF_MASK_ROUTE置位的情况下,采用路由表创建所述流表。
根据本发明的还一方面,提供了一种流表处理装置,包括:扩展模块,用于扩展向开放流OpenFlow交换机发送的流表特征消息,其中,所述流表特征消息中包括有用于指示流表创建结构的流表匹配信息;发送模块,用于将所述流表特征消息发送给所述OpenFlow交换机。
优选地,所述扩展模块包括以下至少之一:第一扩展单元,设置为扩展用于指示流表创建结构的流表匹配信息为用hash表实现流表的创建结构;第二扩展单元,设置为扩展用于指示流表创建结构的流表匹配信息为用路由表实现流表的创建结构。
根据本发明的还一方面,提供了一种开放流OpenFlow控制器,包括上述任一项所述的装置。
根据本发明的还一方面,提供了一种流表处理装置,包括:接收模块,设置为接收开放流OpenFlow控制器发送的流表特征消息,其中,所述流表特征消息中包括有用于指示流表创建结构的流表匹配信息;创建模块,设置为依据所述流表匹配信息指示的流表创建结构创建流表。
优选地,所述创建模块包括以下至少之一:第一创建单元,设置为在所述流表匹配信息为用于表征掩码固定的标记OFPTFMF_MASK_FIX置位,并且OFPTFPT_WILDCARDS属性的OXM队列为空的情况下,采用hash表创建所述流表;第二创建单元,设置为在所述流表匹配信息为用于表征掩码同路由表的OFPTFMF_MASK_ROUTE置位的情况下,采用路由表创建所述流表。
根据本发明的再一方面,提供了一种开放流OpenFlow交换机,包括上述任一项所述的装置。
通过本发明,采用扩展向开放流OpenFlow交换机发送的流表特征消息,其中,所述流表特征消息中包括有用于指示流表创建结构的流表匹配信息;将所述流表特征消息发送给所述OpenFlow交换机,解决了相关技术中,构建流表存在成本高,效率低的问题,进而达到了节省成本,提高流表构建效率的效果。
此处所说明的附图用来提供对本发明的进一步理解,构成本申请的一部分,本发明的示意性实施例及其说明用于解释本发明,并不构成对本发明的不当限定。在附图中:
图1是根据相关技术的OpenFlow网络组件架构示意图;
图2是根据本发明实施例的流表处理方法一的流程图;
图3是根据本发明实施例的流表处理方法二的流程图;
图4是根据本发明实施例的流表处理装置一的结构框图;
图5是根据本发明实施例的流表处理装置一中扩展模块42的优选结构框图;
图6是根据本发明实施例的开放流OpenFlow控制器的结构框图;
图7是根据本发明实施例的流表处理装置二的结构框图;
图8是根据本发明实施例的流表处理装置二中创建模块74的优选结构框图;
图9是根据本发明实施例的开放流OpenFlow交换机的结构框图;
图10是根据本发明优选实施方式一的路由表存储方式的流表创建流程图;
图11是根据本发明优选实施方式的OpenFlow交换机在收到了控制器发送的流配置消息后的处理流程图。
下文中将参考附图并结合实施例来详细说明本发明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互组合。
在本实施例中提供了一种流表处理方法,图2是根据本发明实施例的流表处理方法一的流程图,如图2所示,该流程包括如下步骤:
步骤S202,扩展向开放流OpenFlow交换机发送的流表特征消息,其中,流表特征消息中包括有用于指示流表创建结构的流表匹配信息;
步骤S204,将流表特征消息发送给OpenFlow交换机。
通过上述步骤,通过扩展流表特征消息中携带用于指示流表创建结构的流表匹配信息,这样OpenFlow交换机可以依据流表匹配信息灵活地配置流表结构,相对于相关技术中采用固定的流表匹配信息进行创建流表,不仅成本高,而且效率低,采用上述方式,不仅解决了相关技术中,构建流表存在成本高,效率低的问题,进而达到了节省成本,提高流表构建效率的效果。
优选地,扩展向开放流OpenFlow交换机发送的流表特征消息可以采用多种方式,例如,可以采用以下至少之一:扩展用于指示流表创建结构的流表匹配信息为用hash表实现流表的创建结构;扩展用于指示流表创建结构的流表匹配信息为用路由表实现流表的创建结构。
图3是根据本发明实施例的流表处理方法二的流程图,如图3所示,该流程包括如下步骤:
步骤S302,接收开放流OpenFlow控制器发送的流表特征消息,其中,流表特征消息中包括有用于指示流表创建结构的流表匹配信息;
步骤S304,依据流表匹配信息指示的流表创建结构创建流表。
通过上述步骤,通过接收OpenFlow控制器发送的携带用于指示流表创建结构的流表匹配信息,这样可以依据流表匹配信息灵活地配置流表结构,相对于相关技术中采用固定的流表匹配信息进行创建流表,不仅成本高,而且效率低,采用上述方式,不仅解决了相关技术中,构建流表存在成本高,效率低的问题,进而达到了节省成本,提高流表构建效率的效果。
优选地,依据流表匹配信息指示的流表创建结构创建流表可以包括多种,下面举例说明:例如,在流表匹配信息为用于表征掩码固定的标记OFPTFMF_MASK_FIX置位,并且OFPTFPT_WILDCARDS属性的OXM队列为空的情况下,采用hash表创建流表;又例如,在流表匹配信息为用于表征掩码同路由表的OFPTFMF_MASK_ROUTE置位的情况下,采用路由表创建流表。
在本实施例中还提供了一种流表处理装置,该装置用于实现上述实施例及优选实施方式,已经进行过说明的不再赘述。如以下所使用的,术语“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
图4是根据本发明实施例的流表处理装置一的结构框图,如图4所示,该装置包括扩展模块42和发送模块44,下面对该装置进行说明。
扩展模块42,设置为扩展向开放流OpenFlow交换机发送的流表特征消息,其中,流表特征消息中包括有用于指示流表创建结构的流表匹配信息;发送模块44,连接至上述扩展模块42,用于将流表特征消息发送给OpenFlow交换机。
图5是根据本发明实施例的流表处理装置一中扩展模块42的优选结构框图,如图5所示,该扩展模块42包括以下至少之一:第一扩展单元52、第二扩展单元54,下面对该扩展模块42进行说明。
第一扩展单元52,设置为扩展用于指示流表创建结构的流表匹配信息为用hash表实现流表的创建结构;第二扩展单元54,设置为扩展用于指示流表创建结构的流表匹配信息为用路由表实现流表的创建结构。
图6是根据本发明实施例的开放流OpenFlow控制器的结构框图,如图6所示,该OpenFlow控制器60包括上述任一项的流表处理装置一62。
图7是根据本发明实施例的流表处理装置二的结构框图,如图7所示,该装置包括接收模块72和创建模块74,下面对该装置进行说明。
接收模块72,设置为接收开放流OpenFlow控制器发送的流表特征消息,其中,流表特征消息中包括有用于指示流表创建结构的流表匹配信息;创建模块74,连接至上述接收模块72,设置为依据流表匹配信息指示的流表创建结构创建流表。
图8是根据本发明实施例的流表处理装置二中创建模块74的优选结构框图,如图8所示,该创建模块74包括以下至少之一:第一创建单元82、第二创建单元84,下面对该创建模块74进行说明。
第一创建单元82,设置为在流表匹配信息为用于表征掩码固定的标记OFPTFMF_MASK_FIX置位,并且OFPTFPT_WILDCARDS属性的OXM队列为空的情况下,采用hash表创建流表;第二创建单元84,设置为在流表匹配信息为用于表征掩码同路由表的OFPTFMF_MASK_ROUTE置位的情况下,采用路由表创建流表。
图9是根据本发明实施例的开放流OpenFlow交换机的结构框图,如图9所示,该OpenFlow交换机90包括上述任一项的流表处理装置二92。
针对相关技术中,构建流表存在成本高,效率低的问题。分析造成上述问题的原因:在某些情况下,比如,对于匹配域的掩码信息都为固定长度或者掩码信息呈现为路由表格式时,可以采用更加简单便捷便宜的算法构建流表,而不需要采用TCAM方式。因此在feature table中携带有流表的匹配域字段的掩码信息是非常必要的,这样可以根据流表匹配信息灵活的配置流表的结构,节省成本并提高流表的效率。鉴于此,为提高流表配置的效率,节省成本,在本实施例中,提供了一种流表存储方式能力通告的方案。
该方案包括如下处理:扩展现有的OpenFlow协议中的table feature(流表特征)携带流表匹配的掩码信息字段,该字段用于指示流表的创建结构。OpenFlow交换机在创建流表的时候,根据携带的流表匹配信息选择适合的数据结构存储流表条目,比如table feature中携带标记OFPTFMF_MASK_FIX置位,并且OFPTFPT_WILDCARDS属性的OXM队列为空,则OpenFlow交换机在创建流表的时候可以采用hash的方式构建,既可以保证流表查找的效率,又可以降低设备的成本。而当table feature中携带的OFPTFMF_MASK_ROUTE置位时,OpenFlow交换机在创建流表的时候可以采用路由表的方式构建。
下面对本发明优选实施方式进行说明。
首先,扩展现有的OpenFlow协议中的table feature(流表特征)携带流表匹配的信息字段的具体定义。在现有的OpenFlow协议的ofp_table_feature中增加一个变量match_filed_flag用于携带本发明提出的流表匹配的信息。扩展后的ofp_table_feature的定义如下,斜体部分为新增的变量定义:
其中对于match_field_flag的各个位具体取值定义如下:
enum ofp_table_feature_match_flags{
OFPTFMF_MASK_FIX=1<<0,
OFPTFMF_MASK_ROUTE=1<<1,
};
OFPTFMF_MASK_FIX——表示OFPTFPT_MATCH的OXM队列中,有has_mask的oxm,其掩码是固定的,若此时OFPTFPT_WILDCARDS属性的OXM队列为空,即可以用hash表实现该流表。
OFPTFMF_MASK_ROUTE——表示OFPTFPT_MATCH的OXM队列中,有has_mask的oxm,其掩码特性同路由表,此时可以用路由表的算法实现该流表。
当前对于match_field_flag的取值仅定义以上的两位,后续根据需要可以进行扩展,最多可以有32个标志位。
优选实施方式一
在本优选实施方式中,阐述了OpenFlow交换机对于本申请提出的OFPTFMF_MASK_ROUTE标记通报某流表,OpenFlow交换机根据这一信息并结合table feature其他字段创建路由表,图10是根据本发明优选实施方式一的路由表存储方式的流表创建流程图,如图10所示,该流程包括如下步骤:
步骤S1002,OpenFlow交换机接收到控制器发送的table feature request设置请求;
步骤S1004,OpenFlow交换机检查request中的OFPTFPT_WILDCARDS属性是否为空,是则继续步骤S1006,,否则转步骤S1012,;
步骤S1006,OpenFlow交换机检查request中的OFPTFPT_MATCH属性的OXM header是否有非IP类型的字段,并且有has_mask设置,即OpenFlow交换机检查request中的OFPTFPT_MATCH属性,其中所有OXM header的has_mask标记都为False,除了一个OXM header。并且该OXM对应源IP地址,或者目的IP地址。是则继续步骤S1008,否则转步骤S1012;
步骤S1008,OpenFlow交换机检查request中是否设置了OFPTFMF_MASK_ROUTE标记,是则继续步骤S1010,否则转步骤S1012;
步骤S1010,OpenFlow交换机调用相应资源完成路由表的创建;
步骤S1012,OpenFlow交换机按照现有的TCAM方式创建流表。
优选实施方式二
在本优选实施方式中,阐述了OpenFlow交换机在收到了控制器发送的流配置消息(Flow mod)后的处理流程。图11是根据本发明优选实施方式的OpenFlow交换机在收到了控制器发送的流配置消息后的处理流程图,如图11所示,该流程包括如下步骤:
步骤S1102,OpenFlow交换机接收到控制器发送的flow mod(流表模式)添加请求;
步骤S1104,OpenFlow交换机根据flow mod(流表模式)消息中的table id(流表标识)找到对应的table feature(流表特征),确定其为路由表;
步骤S1106,OpenFlow交换机检查flow mod中的匹配域及动作(action)与table feature(流表特征)是否一致,如果匹配域及action操作是一致,则进行步骤S1108,否则转到步骤S1110进行报错处理;
步骤S1108,OpenFlow交换机解析flow mod消息为路由条目信息,插入路由表;
步骤S1110,OpenFlow交换机向控制器发送错误error消息,error类型为OFPET_BAD_MATCH。在本优选实施方式中,还需要扩展现有的ofp_bad_match_code的值,扩展了三个因为匹配不一致导致的错误,具体的扩展定义如下,其中斜体部分为新定义的错误code。
enum ofp_bad_match_code{
OFPBMC_BAD_TYPE=0,
OFPBMC_BAD_LEN=1,
OFPBMC_BAD_TAG=2,
OFPBMC_BAD_DL_ADDR_MASK=3,
OFPBMC_BAD_NW_ADDR_MASK=4,
OFPBMC_BAD_WILDCARDS=5,
OFPBMC_BAD_FIELD=6,
OFPBMC_BAD_VALUE=7,
OFPBMC_BAD_MASK=8,
OFPBMC_BAD_PREREQ=9,
OFPBMC_DUP_FIELD=10,
OFPBMC_EPERM=11,
OFPBAC_BAD_FIELD_MASK_FIX=12,/*table feature中OFPTFMF_
MASK_FIX标志位与当前flow entry不一致*/
OFPBAC_BAD_FIELD_MASK_ROUTE=13,/*table feature中OFPTFMF_MASK_ROUTE标记位与当前flow entry不一致*/
};
显然,本领域的技术人员应该明白,上述的本发明的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。这样,本发明不限制于任何特定的硬件和软件结合。
以上所述仅为本发明的优选实施例而已,并不用于限制本发明,对于本领域的技术人员来说,本发明可以有各种更改和变化。凡在本发明的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。
如上所述,本发明实施例中提供了一种流表处理方法、装置、开放流控制器及开放流交换机。解决了相关技术中,构建流表存在成本高,效率低的问题,进而达到了节省成本,提高流表构建效率的效果。
Claims (10)
- 一种流表处理方法,包括:扩展向开放流OpenFlow交换机发送的流表特征消息,其中,所述流表特征消息中包括有用于指示流表创建结构的流表匹配信息;将所述流表特征消息发送给所述OpenFlow交换机。
- 根据权利要求1所述的方法,其中,扩展向开放流OpenFlow交换机发送的流表特征消息包括以下至少之一:扩展用于指示流表创建结构的流表匹配信息为用hash表实现流表的创建结构;扩展用于指示流表创建结构的流表匹配信息为用路由表实现流表的创建结构。
- 一种流表处理方法,包括:接收开放流OpenFlow控制器发送的流表特征消息,其中,所述流表特征消息中包括有用于指示流表创建结构的流表匹配信息;依据所述流表匹配信息指示的流表创建结构创建流表。
- 根据权利要求3所述的方法,其中,依据所述流表匹配信息指示的流表创建结构创建流表包括以下至少之一:在所述流表匹配信息为用于表征掩码固定的标记OFPTFMF_MASK_FIX置位,并且OFPTFPT_WILDCARDS属性的OXM队列为空的情况下,采用hash表创建所述流表;在所述流表匹配信息为用于表征掩码同路由表的OFPTFMF_MASK_ROUTE置位的情况下,采用路由表创建所述流表。
- 一种流表处理装置,包括:扩展模块,设置为扩展向开放流OpenFlow交换机发送的流表特征消息,其中,所述流表特征消息中包括有用于指示流表创建结构的流表匹配信息;发送模块,设置为将所述流表特征消息发送给所述OpenFlow交换机。
- 根据权利要求5所述的装置,其中,所述扩展模块包括以下至少之一:第一扩展单元,设置为扩展用于指示流表创建结构的流表匹配信息为用hash表实现流表的创建结构;第二扩展单元,设置为扩展用于指示流表创建结构的流表匹配信息为用路由表实现流表的创建结构。
- 一种开放流OpenFlow控制器,包括权利要求5至6中任一项所述的装置。
- 一种流表处理装置,包括:接收模块,设置为接收开放流OpenFlow控制器发送的流表特征消息,其中,所述流表特征消息中包括有用于指示流表创建结构的流表匹配信息;创建模块,设置为依据所述流表匹配信息指示的流表创建结构创建流表。
- 根据权利要求8所述的装置,其中,所述创建模块包括以下至少之一:第一创建单元,设置为在所述流表匹配信息为用于表征掩码固定的标记OFPTFMF_MASK_FIX置位,并且OFPTFPT_WILDCARDS属性的OXM队列为空的情况下,采用hash表创建所述流表;第二创建单元,设置为在所述流表匹配信息为用于表征掩码同路由表的OFPTFMF_MASK_ROUTE置位的情况下,采用路由表创建所述流表。
- 一种开放流OpenFlow交换机,包括权利要求8至9中任一项所述的装置。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410478493.XA CN105490946A (zh) | 2014-09-18 | 2014-09-18 | 流表处理方法、装置、开放流控制器及开放流交换机 |
CN201410478493.X | 2014-09-18 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2015131617A1 true WO2015131617A1 (zh) | 2015-09-11 |
Family
ID=54054487
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2014/094264 WO2015131617A1 (zh) | 2014-09-18 | 2014-12-18 | 流表处理方法、装置、开放流控制器及开放流交换机 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN105490946A (zh) |
WO (1) | WO2015131617A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107423154A (zh) * | 2017-07-26 | 2017-12-01 | 郑州云海信息技术有限公司 | 一种流表处理方法及装置 |
CN111953609A (zh) * | 2020-08-07 | 2020-11-17 | 平安科技(深圳)有限公司 | 基于ovs的数据包处理方法及相关设备 |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120099591A1 (en) * | 2010-10-26 | 2012-04-26 | Dell Products, Lp | System and Method for Scalable Flow Aware Network Architecture for Openflow Based Network Virtualization |
CN103905311A (zh) * | 2012-12-28 | 2014-07-02 | 华为技术有限公司 | 流表匹配方法和装置以及交换机 |
WO2014100981A1 (zh) * | 2012-12-25 | 2014-07-03 | 华为技术有限公司 | 查找表的创建方法、查询方法、控制器、转发设备和系统 |
CN104012063A (zh) * | 2011-12-22 | 2014-08-27 | 瑞典爱立信有限公司 | 用于软件定义网络中的灵活和可扩展流处理的控制器 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20140106235A (ko) * | 2013-02-26 | 2014-09-03 | 한국전자통신연구원 | 오픈플로우 스위치 및 그 패킷 처리 방법 |
CN103581020B (zh) * | 2013-10-18 | 2016-08-10 | 华为技术有限公司 | 一种报文转发的方法、装置及系统 |
-
2014
- 2014-09-18 CN CN201410478493.XA patent/CN105490946A/zh not_active Withdrawn
- 2014-12-18 WO PCT/CN2014/094264 patent/WO2015131617A1/zh active Application Filing
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120099591A1 (en) * | 2010-10-26 | 2012-04-26 | Dell Products, Lp | System and Method for Scalable Flow Aware Network Architecture for Openflow Based Network Virtualization |
CN104012063A (zh) * | 2011-12-22 | 2014-08-27 | 瑞典爱立信有限公司 | 用于软件定义网络中的灵活和可扩展流处理的控制器 |
WO2014100981A1 (zh) * | 2012-12-25 | 2014-07-03 | 华为技术有限公司 | 查找表的创建方法、查询方法、控制器、转发设备和系统 |
CN103905311A (zh) * | 2012-12-28 | 2014-07-02 | 华为技术有限公司 | 流表匹配方法和装置以及交换机 |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107423154A (zh) * | 2017-07-26 | 2017-12-01 | 郑州云海信息技术有限公司 | 一种流表处理方法及装置 |
CN111953609A (zh) * | 2020-08-07 | 2020-11-17 | 平安科技(深圳)有限公司 | 基于ovs的数据包处理方法及相关设备 |
Also Published As
Publication number | Publication date |
---|---|
CN105490946A (zh) | 2016-04-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107204867B (zh) | 一种信息传输方法、装置和系统 | |
EP3139560B1 (en) | Packet processing method, device and computer storage medium | |
EP3065342A1 (en) | Update of mac routes in evpn single-active topology | |
WO2019184752A1 (zh) | 网络设备的管理方法、装置及系统 | |
US10361954B2 (en) | Method and apparatus for processing modified packet | |
EP3070895A1 (en) | Encapsulation method and system for flow identifier | |
CN104704779A (zh) | 用于加速软件定义网络中的转发的方法和设备 | |
US10791051B2 (en) | System and method to bypass the forwarding information base (FIB) for interest packet forwarding in an information-centric networking (ICN) environment | |
CN104426756B (zh) | 一种服务节点能力信息的获取方法及控制平台 | |
US20240154902A1 (en) | Packet forwarding method and system, storage medium, and electronic device | |
WO2011103759A1 (zh) | 关联的双向标签交换路径的创建方法及系统 | |
US7860027B2 (en) | Extending an IP everywhere network over a plurality of flooding domains | |
EP4044529A1 (en) | Detnet data packet processing method and apparatus | |
EP3157211A1 (en) | Isis-based flooding method and device | |
CN105262686B (zh) | 一种网络连通性验证方法和装置 | |
WO2015027738A1 (zh) | 一种传输、接收元数据的方法、开放流逻辑交换机 | |
WO2017166918A1 (zh) | 组播流量的控制方法及装置 | |
CN107911495B (zh) | 一种mac地址同步方法和vtep | |
WO2015131617A1 (zh) | 流表处理方法、装置、开放流控制器及开放流交换机 | |
WO2021164245A1 (zh) | 负载分担的方法、第一网络设备 | |
CN102263700A (zh) | 一种报文收发方法、装置和系统 | |
CN110601982B (zh) | 路由传递方法、装置及路由器 | |
WO2022257773A1 (zh) | 路由检测方法、设备、系统及存储介质 | |
CN115915098A (zh) | 一种5g与tsn跨域ptp中bmca实现方法 | |
CN111464441A (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: 14884971 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: 14884971 Country of ref document: EP Kind code of ref document: A1 |