WO2015027477A1 - 流表控制方法、装置、交换机和控制器 - Google Patents

流表控制方法、装置、交换机和控制器 Download PDF

Info

Publication number
WO2015027477A1
WO2015027477A1 PCT/CN2013/082704 CN2013082704W WO2015027477A1 WO 2015027477 A1 WO2015027477 A1 WO 2015027477A1 CN 2013082704 W CN2013082704 W CN 2013082704W WO 2015027477 A1 WO2015027477 A1 WO 2015027477A1
Authority
WO
WIPO (PCT)
Prior art keywords
processed
flow
switch
rules
control
Prior art date
Application number
PCT/CN2013/082704
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/082704 priority Critical patent/WO2015027477A1/zh
Priority to CN201380001421.XA priority patent/CN104604194B/zh
Publication of WO2015027477A1 publication Critical patent/WO2015027477A1/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 application relates to the field of network communication technologies, and more particularly to a flow table control method, apparatus, switch, and controller.
  • SDN Software Defined Network
  • OpenFlow is one of the typical technologies for implementing software-defined networks.
  • the network element devices in the software-defined network based on OpenFlow technology mainly include an OpenFlow controller (OpenFlow Controller) and an OpenFlow switch (OpenFlow Switch).
  • OpenFlow Controller OpenFlow Controller
  • OpenFlow Switch OpenFlow Switch
  • the switch includes one or more flow tables.
  • the flow table consists of many flow entries. Each flow entry is a first-class rule.
  • the flow rule is generated by the controller and sent to the switch.
  • the switch receives the data, the switch performs the flow table matching by querying the received data in the flow table, and performs data forwarding and the like according to the execution operation specified in the matched flow rule. operating.
  • TCP Transmission Control Protocol
  • UDP User Datagram Protocol
  • TLS Transport Layer Security
  • control connection between the controller and the switch may be interrupted, and the data is at risk of unsafe transmission.
  • the present application provides a flow table control method, apparatus, switch, and controller for reducing the risk of insecure data transmission due to a control connection interruption between a controller and a switch.
  • a flow table control method including:
  • the switch detects the control connection status with the controller
  • the to-be-processed flow rule in the flow table is processed, so that the to-be-processed flow rule does not match the received data.
  • the processing, in the flow table, the to-be-processed flow rule, so that the to-be-processed flow rule does not match the received data includes:
  • the processing flow rule is processed such that the to-be-processed flow rule does not match the received data.
  • a second possible implementation manner of the first aspect is further provided, where the processing of the to-be-processed flow rule in the flow table is performed,
  • the matching of the to-be-processed flow rule with the received data includes:
  • the to-be-processed flow rule is deleted, so that the to-be-processed flow rule does not match the received data.
  • a third possible implementation manner of the first aspect is further provided, where the processing of the to-be-processed flow rule in the flow table is performed, After the flow rule to be processed is not matched with the received data, the method further includes: when the control connection is restored, processing the to-be-processed flow rule, so that the to-be-processed flow rule is Restore matches the received data.
  • the fifth possible implementation manner of the foregoing first aspect is further provided, that the processing the to-be-processed flow rule in the flow table is processed And causing the to-be-processed flow rule not to match the received data includes:
  • the failure control information includes the first failure control time and the second failure control The time parameter value of the time.
  • a seventh possible implementation manner of the first aspect is further provided, where the failure control information is an installation of the to-be-processed flow rule sent by the controller Carryed in the message.
  • an eighth possible implementation manner of the first aspect is further provided, where the to-be-processed flow rule is all flow rules or at least partial flow in the flow table.
  • the rule is that the failure control information is carried in a flow table configuration message sent by the controller.
  • a flow table control method including:
  • the controller sends the failure control information to the switch through a control connection with the switch, where the failure control information is used to trigger the switch to process the to-be-processed flow rule in the flow table when the control connection is detected to be invalid.
  • the to-be-processed flow rule is not matched with the received data.
  • the failing control information is specifically configured to trigger the switch to detect that the control connection fails, starting from a time when the control connection fails, and after a preset a failure control time, if the data matching the target flow rule is not received, or the preset second failure control time is processed, the to-be-processed flow rule is processed, so that the to-be-processed flow rule is not received The data is matched.
  • a second possible implementation manner of the second aspect is further provided, where the failure control information is specifically used to trigger the switch to detect When the control connection fails, the flow rule to be processed in the flow table is deleted.
  • a flow table control device including:
  • a detecting unit configured to detect a control connection state of the switch and the controller
  • a processing unit configured to: when the detecting unit detects that the control connection fails, process the to-be-processed flow rule in the flow table, so that the to-be-processed flow rule does not match the received data.
  • the processing unit is specifically configured to: after a failure time of the control connection, pass a preset first failure control time, if not received in the flow table to be processed The data to be matched by the flow rule, or the preset second failure control time, the flow to be processed The rules are processed such that the pending flow rules do not match the received data.
  • a second possible implementation manner of the first aspect is further provided, where the processing unit performs a flow rule to be processed in the flow table.
  • the processing specifically deletes the to-be-processed flow rule.
  • a third possible implementation manner of the first aspect is further provided, and the method further includes:
  • a recovery unit configured to: when the control connection is restored, process the to-be-processed flow rule, so that the to-be-processed flow rule is restored and matched with the received data.
  • the processing unit is specifically configured to send according to the controller
  • the failure control information processes the to-be-processed flow rule in the flow table so that the to-be-processed flow rule does not match the received data.
  • a flow table control device including:
  • a sending unit configured to send, by using a control connection with the switch, fail control information to the switch, where the fail control information is used to trigger the switch to detect the to-be-processed flow rule in the flow table when the control connection fails Processing such that the to-be-processed flow rule does not match the received data.
  • a switch comprising at least a memory and a processor connected to the memory through a bus;
  • the memory is configured to store a set of first program instructions
  • the first program instruction stored by the processor invoking the memory performs the following operations: detecting a control connection state with the controller; when detecting that the control connection fails, processing the to-be-processed flow rule, so that the The pending flow rules do not match the received data.
  • a controller comprising at least a memory, a transmitter, and a processor connected to the memory and the transmitter via a bus;
  • the memory is configured to store a set of second program instructions
  • the processor invoking the second program instruction stored in the memory performs the following operations: triggering the transmitter to send a failure control letter to the switch through a control connection with the switch
  • the failure control information is used to trigger the switch to detect the to-be-processed flow rule in the flow table when the switch detects that the control connection fails, so that the to-be-processed flow rule is not performed with the received data. match.
  • the present disclosure provides a flow table control method, apparatus, switch, and controller.
  • the switch detects a control connection state with a controller. When it detects that the control connection fails, the flow rule in the flow table is used. The processing is performed such that the to-be-processed flow rule does not match the received data, so that when the control connection fails, the flow rule can still be processed, the control of the flow table is realized, and the control operation of the data forwarding and the like is prevented from being out of control. Guarantee the security of data transmission.
  • FIG. 1 is a flowchart of an embodiment of a flow table control method according to an embodiment of the present application
  • FIG. 2 is a flowchart of another embodiment of a flow table control method according to an embodiment of the present application
  • FIG. 4 is a flowchart of still another embodiment of a flow table control method according to an embodiment of the present disclosure
  • FIG. 6 is a schematic structural diagram of a switch according to an embodiment of the present application;
  • FIG. 7 is a schematic structural diagram of another embodiment of a flow table control apparatus according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a controller according to an embodiment of the present application.
  • the technical solutions in the embodiments of the present application are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present application. It is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. example. Based on the embodiments in this application, those of ordinary skill in the art are not making All other embodiments obtained under the premise of sexual labor are within the scope of protection of the present application.
  • One of the main ideas of the embodiments of the present application may include:
  • FIG. 1 is a flowchart of an embodiment of a flow table control method according to an embodiment of the present application.
  • the technical solution in this embodiment may be specifically applied in a software-defined network based on OpenFlow technology.
  • the method can include:
  • Step 101 The switch detects the control connection status with the controller.
  • the switch and the controller are network element devices in a software defined network based on OpenFlow technology, and in the software-defined network, data forwarding and control are separated by a switch and a controller.
  • One or more flow tables are stored in the switch.
  • Each flow entry in the flow table is a first-class rule.
  • the flow rule includes flow matching information and operations.
  • the controller can determine the execution of the data according to the characteristics of the data, such as forwarding, discarding, and modifying the header. Therefore, the corresponding flow rule can be set and sent to the switch.
  • the switch stores the flow rule delivered by the controller as a flow entry in the flow table. When receiving the data, the switch matches the received data with each flow rule in the flow table. Therefore, the data can be forwarded and the like according to the execution operation defined by the flow rule matching the received data.
  • the controller controls the flow table in the switch based on the control connection. It can control the operation of querying, modifying, and deleting the flow rules.
  • the control of data forwarding can be controlled by controlling the flow table.
  • the switch detects the control connection state with the controller, and can detect in real time or periodically to determine whether the control connection is invalid.
  • Step 102 When it is detected that the control connection fails, the to-be-processed flow rule in the flow table is processed, so that the to-be-processed flow rule does not match the received data.
  • the flow rule to be processed in the flow table may be all flow rules in the flow table or at least part of the flow rule or any one of the flow rules.
  • the control connection failure between the switch detection and the controller may be implemented in various manners, for example, when the information is sent to the controller multiple times fails, or when the transmission information of the controller is not received within a preset time, it may be determined. The control connection is invalid.
  • the controller cannot implement the control of the flow table in the switch, so that the flow rule cannot be processed, and the processing operation such as data forwarding is out of control. Therefore, in the embodiment of the present application, the flow table is to be processed.
  • the flow rule is processed so that it does not match the received data.
  • the switch does not query the pending flow rule if it receives the data, and the received data does not match the pending flow rule.
  • the matching is performed so that the data processing can be prevented from being out of control when the data processing is continued in accordance with the to-be-processed flow rule.
  • the processing of the to-be-processed flow rule so that it does not match the received data may be implemented in multiple ways:
  • the pending flow rule is retained, and when the received data matches in the flow table, the pending flow rule is suspended. It may be that the to-be-processed flow rule is set with a corresponding mark symbol, and when the data is received, the flow rule with the mark symbol does not match the received data. Certainly, the method may also be implemented in other manners, and the present invention does not limit this, and only needs to implement that the received data does not match the to-be-processed flow rule.
  • the switch suspends the execution of the pending flow rule.
  • FIG. 2 is a flowchart of another embodiment of a flow table control method according to an embodiment of the present application, where the method may include the following steps:
  • Step 201 The switch detects a control connection state with the controller. .
  • Step 201 is the same as step 101 in the above embodiment, and details are not described herein again.
  • Step 202 When it is detected that the control connection fails, starting from the time when the control connection fails, after a preset first failure control time, if the data of the to-be-processed flow rule in the flow table is not received, or after The preset second failure control time processes the to-be-processed flow rule so that the to-be-processed flow rule does not match the received data.
  • the switch when the switch detects that the control connection fails, the switch starts to process the flow rule if the data to be processed is not received in the preset first failure control time. Therefore, it does not match the received data, that is, after the first failure control time, if the data is received again, it is no longer matched with the to-be-processed flow rule.
  • the time at which the control connection fails is started. If the preset second failure control time elapses, the flow rule to be processed is also processed so as not to match the received data.
  • the first failure control time and the second failure control time are failure processing parameters applied when the control connection fails, and may be set by the switch, or may be set by the controller and connected under control when the control connection is normal. It is sent to the switch, so that when the control connection fails, the controller still controls the convection rules.
  • the flow rule is sent by the controller and stored in the switch. It usually has a certain timeliness. After a certain period of time, the controller can control the modification and deletion of the flow rule. During this time, the flow rule will be normal. Matches the received data. Therefore, in the embodiment, by setting the first fail control time and the second fail control time, the control connection may be invalid, and the controller cannot implement the control process of the convection rule through the control connection, according to the preset first The failure control time and the second failure control time can still implement the control of the flow rule to be processed, so that the processing operations such as data forwarding are not out of control.
  • the flow rule to be processed is processed so that it does not match the received data.
  • One possible implementation manner is that the to-be-processed flow rule can be deleted.
  • Another possible implementation manner is to reserve the to-be-processed flow rule, but only when the data is received, pause the query of the to-be-processed flow rule, and no longer match the received data.
  • the flow rule to be processed may be marked. received When the data is matched in the flow table, it does not match the marked flow rule to be processed.
  • the switch passes the preset first failure control time. If the data matching the to-be-processed flow rule is not received, or the preset second failure control time passes, the switch can also determine whether the control connection is restored. If there is no recovery, the pending flow rules are processed so that they do not match the received data.
  • Step 203 When detecting that the control connection is restored, processing the to-be-processed flow rule to restore the matching with the received data.
  • the controller and the switch can control the normal interaction control signaling by controlling the connection.
  • the to-be-processed flow rule can be processed.
  • the matching function can be matched with the received data, that is, the matching function of the to-be-processed flow rule is restored, and when the data is received, the to-be-processed flow rule continues to match the received data.
  • the switch can also feed back the processing status of the pending rule to the controller.
  • the switch may be to the controller.
  • the information of the to-be-processed rule including the deletion time and the like is fed back.
  • the detection of whether the control connection with the controller is restored is not limited to the execution step in the embodiment. If the flow rule to be processed is not processed during the control connection failure process, after the control connection is restored, the flow rule is also not processed. Perform processing.
  • the switch detects the control connection state with the controller.
  • the preset first failure control time is passed from the time when the control connection fails, and if the switch does not receive the If the data to be processed by the flow rule is to be processed, or the preset second failure control time is passed, the to-be-processed flow rule may be processed so as not to match the received data, so that the control connection fails.
  • the flow rules in the flow table can still be processed, the data forwarding processing operation is not out of control, the data security is ensured, and in the case of controlling the connection recovery, the pending flow rules can be processed and restored. Matches the received data to restore the flow rules.
  • FIG. 3 is a flowchart of still another embodiment of a flow table control method according to an embodiment of the present application, where the method may To include the following steps:
  • Step 301 The switch detects the control connection state with the controller. .
  • Step 302 When the control connection fails, according to the failure control information sent by the controller, the to-be-processed flow rule in the flow table is processed so as not to be performed with the received data.
  • the failure control information is set by the controller and sent to the switch based on the control connection with the switch, and is used to trigger the switch to process the to-be-processed flow rule in the flow table according to the failure control information when the control connection fails.
  • the controller controls the flow table in the switch.
  • the failure control information may include a time parameter value of the first failure control time and the second failure control time, and the switch specifically starts from the failure time of the control connection according to the failure control information sent by the controller, and the preset a failure control time, if the data of the flow rule to be processed in the flow table is not received, or the preset second failure control time is passed, the to-be-processed flow rule is processed so as not to be processed with the received data. match.
  • the failure control information may be carried in the flow rule installation message sent by the controller, that is, the flow rule installation message in the flow rule installation message when the controller sends the flow rule, the flow control rule includes the flow control rule, and the flow rule installation message includes the flow.
  • Matching information, performing operations, etc. can also carry failure control information. Therefore, the flow rule to be processed may be any flow rule in the flow table.
  • the flow rule installation message sent by the controller carries its corresponding failure control information.
  • the parameter values of the first failure control time and the second failure control time corresponding to different flow rules may be different.
  • failure control information may also be carried in the flow table configuration information sent by the controller.
  • the flow table configuration information includes a flow table identifier, etc., and carries the failure control information.
  • the failure control information is corresponding to the flow table.
  • the flow rule to be processed may include all flow rules in the flow table, or may include at least part of the flow rule according to the indication of the failure control information.
  • the failure control information may be set by the controller for the flow rule to be processed, so that the switch can detect the flow rule with the failure control information in the flow table as the flow rule to be processed.
  • the switch processes the to-be-processed flow rule according to the failure control information sent by the controller.
  • the flow rule can be deleted according to the failure control information, or when the data is received. Pause the query for the pending flow rule.
  • the switch detects the control connection state with the controller, and when the control connection fails, processes the to-be-processed flow rule in the flow table according to the failure control information sent by the controller, so that the switch does not receive the received
  • the data is matched so that the control of the flow table can be realized under the control connection failure condition, and the flow rule can be processed, so that the processing operations such as data forwarding are not lost, and the security of data transmission is ensured.
  • FIG. 4 is a flowchart of still another embodiment of a flow table control method according to an embodiment of the present application, and the method may include:
  • Step 401 The controller sends the failure control information to the switch through a control connection with the switch.
  • the failure control information is used to trigger the switch to process the to-be-processed flow rule in the flow table when the control connection fails, so as not to match the received data.
  • the switch detects that the connection with the controller fails, and according to the failure control information, the flow rule to be processed in the flow table is processed so as not to match the received data.
  • the failure control information may be carried in the flow rule installation message sent by the controller to the switch, and the flow rule to be processed processed by the switch is any flow rule in the flow table.
  • the to-be-processed flow rule processed by the switch may include all flow rules or at least partial flow rules in the flow table.
  • the failure control information may include a time parameter value of the first failure control time and the second failure control time, where the failure control information is specifically triggered by the trigger switch when the control connection fails, starting from the time when the control connection fails.
  • the first failure control time is set, if the data matching the target flow rule is not received, or the preset second failure control time is passed, the to-be-processed flow rule is processed so as not to be received with the received data. Make a match.
  • the failure control information triggering the switch to process the to-be-processed flow rule in the flow table when the control connection is invalid may be triggered to delete the to-be-processed flow rule in the flow table when the control connection fails;
  • the trigger switch pauses the query flow table when receiving data. Pending flow rules.
  • the controller sends the failure control information to the switch through a control connection with the switch, where the failure control information is used to trigger the switch to process the to-be-processed flow rule in the flow table when the control connection fails. It does not match the received data, so that when the control connection fails, the control of the flow table can still be realized, so that the flow rule can be processed, and the processing operations such as data forwarding can still be controlled, and the data is guaranteed. Security of the transmission.
  • FIG. 5 is a schematic structural diagram of an embodiment of a flow table control apparatus according to an embodiment of the present application, and the apparatus may include:
  • the detecting unit 501 is configured to detect a control connection between the switch and the controller.
  • the processing unit 502 is configured to: when the detecting unit 501 detects that the control connection fails, process the to-be-processed flow rule in the flow table, so that the to-be-processed flow rule does not match the received data.
  • the processing unit may specifically start from the moment when the control connection fails, and after a preset first failure control time, if the data matching the to-be-processed flow rule is not received, or After the preset second failure control time, the to-be-processed flow rule is processed so as not to match the received data.
  • a possible implementation manner of the processing rule that the processing unit processes the to-be-processed flow rule as not matching the received data is: deleting the to-be-processed flow rule.
  • the processing unit processes the to-be-processed flow rule in the flow table, and may specifically process the to-be-processed flow rule according to the failure control information sent by the controller so as not to match the received data.
  • the failure control information may further include a time parameter value of the first failure control time and the second failure control time.
  • the flow rule to be processed may be any flow rule in the flow table, and the failure control information is carried in the installation message of the to-be-processed flow rule sent by the controller.
  • the to-be-processed flow rule may include all flow rules in the flow table or at least part of the flow rule Then, the failure control information may be carried in a flow table configuration message sent by the controller or sent by the controller separately.
  • the device may further include:
  • the recovery unit 503 is configured to process the to-be-processed flow rule when the control connection with the controller is restored, and restore and match the received data.
  • the switch detects the control connection with the controller.
  • the control connection fails, the flow rule to be processed is processed according to the failure control information sent by the controller so as not to match the received data.
  • the controller can also control the flow table, and can process the flow rule, so that the processing operations such as data forwarding do not lose control, and the security of data transmission is ensured.
  • the flow table control device provided in FIG. 5 can be integrated into the switch in a practical application, and the switch of the flow table control device in the embodiment of the present application can be deployed, and when the control connection between the controller and the switch fails, The control of the flow table can still be realized, and the control operation of data forwarding and the like can be avoided.
  • an embodiment of the present application further provides a switch including at least a memory 601 and a processor 603 connected to the memory 601 via a bus 602.
  • the memory 601 is configured to store a set of first program instructions
  • the processor 603 is configured to invoke the first program instruction stored in the memory 601, and perform the following operations: detecting a control connection with the controller, and processing the to-be-processed flow rule in the flow table when detecting that the control connection fails , causing the to-be-processed flow rule not to match the received data.
  • FIG. 7 is a schematic structural diagram of another embodiment of a flow table control apparatus according to an embodiment of the present application, and the apparatus may include:
  • the sending unit 701 is configured to send the failure control information to the switch by using a control connection with the switch.
  • the failure control information is used to trigger the switch to process the to-be-processed flow rule in the flow table when the control connection fails, so as not to match the received data.
  • the failure control information may be carried in a flow rule installation message sent by the controller to the switch, and the to-be-processed flow rule processed by the switch may be any flow rule in the flow table.
  • the flow rule to be processed processed by the switch may include all flow rules or at least partial flow rules in the flow table.
  • the failure control information may include a time parameter value of the first failure control time and the second failure control time, where the failure control information is specifically used to trigger the switch to detect the failure of the control connection from the Controlling the connection failure time, after the preset first failure control time, if the data matching the to-be-processed flow rule in the flow table is not received, or the preset second failure control time is passed, the to-be-processed flow is The rules are processed so that they do not match the received data.
  • the failure control information triggering the switch to process the to-be-processed flow rule in the flow table when the control connection is invalid may be triggered to trigger the switch to delete the pending flow table when the control connection fails.
  • the flow rule; of course, the trigger switch may suspend the flow rule to be processed in the query flow table when receiving the data.
  • the flow table control device may send the failure control information to the switch through a control connection with the switch, where the failure control information is used to trigger the switch to process the flow rule in the flow table when the control connection fails.
  • the processing is performed so as not to match the received data, so that when the control connection fails, the control of the flow table can still be realized, so that the flow rule can be processed, and the processing operations such as data forwarding can still be controlled.
  • the flow table control device provided in FIG. 7 may be integrated into the controller in a practical application, and the controller of the flow table control device in the embodiment of the present application may be deployed, and the control connection between the controller and the switch may be invalid. At the same time, the control of the flow table can still be realized, and the time for processing operations such as data forwarding can be avoided.
  • the embodiment of the present application further provides a controller including at least a memory 801, a transmitter 802, and a bus 803 and a memory 801. Transmitter 802 is coupled to processor 804.
  • the memory 801 is configured to store a set of second program instructions;
  • the processor 804 invokes the second program instruction stored in the memory to perform the following operations: triggering the transmitter 802 to send failure control information to the switch through a control connection with the switch, where the failure control information is used to trigger When detecting that the control connection fails, the switch processes the to-be-processed flow rule in the flow table so as not to match the received data.
  • the present application can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present application, which is essential or contributes to the prior art, may be embodied in the form of a software product, which may be stored in a storage medium such as a ROM/RAM or a disk. , an optical disk, etc., includes instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present application or portions of the embodiments.
  • a computer device which may be a personal computer, server, or network device, etc.

Abstract

本申请实施例提供了一种流表控制方法、装置、交换机和控制器,所述方法包括:交换机检测与控制器的控制连接状态,当检测到所述控制连接失效,将流表中的待处理流规则进行处理,使得所述待处理流规则不与接收到的数据进行匹配。通过本申请实施例实现了在控制连接失效时对流表的控制,避免了对数据转发等处理操作的失控,保证了数据的安全性。

Description

流表控制方法、 装置、 交换机和控制器 技术领域 本申请涉及网络通信技术领域, 更具体的说是涉及一种流表控制方法、装 置、 交换机和控制器。
背景技术
软件定义网络( Software Defined Network, SDN ), 是一种新型网络架构, 其通过将网络设备的控制层与转发层分离开来, 实现了网络流量的灵活控制, 提高了网络的管理效率, 为核心网络及应用的创新提供了良好的平台。
OpenFlow是实现软件定义网络的典型技术之一。 基于 OpenFlow技术的软 件定义网络中的网元设备主要包括 OpenFlow控制器( OpenFlow Controller )以 及 OpenFlow交换机( OpenFlow Switch )。 交换机中包括一个或多个流表, 流表 由很多流表项组成,每一流表项即为一流规则。 流规则由控制器生成并下发至 交换机中, 交换机接收到数据时, 通过将接收数据在流表中查询, 进行流表匹 配, 根据匹配的流规则中规定的执行操作, 进行数据转发等处理操作。
控制器与交换机之间存在基于 TCP ( Transmission Control Protocol, 传输 控制协议)、 UDP ( User Datagram Protocol,用户数据才艮协议 )或 TLS ( Transport Layer Security, 安全传输层协议)等建立的控制连接, 控制器通过该控制连接 可以控制交换机中的流表, 包括流规则的查询、 删除、 修改等, 从而实现对数 据转发等处理操作的控制。
在实际工作过程中,控制器与交换机之间的控制连接可能会发生中断,数 据面临传输不安全的风险。
发明内容 本申请提供了一种流表控制方法、 装置、 交换机和控制器, 用以降低由于 控制器与交换机之间的控制连接中断导致的数据传输不安全的风险。
为实现上述目的, 本申请提供如下技术方案:
第一方面, 提供了一种流表控制方法, 包括:
交换机检测与控制器的控制连接状态;
当检测到所述控制连接失效时,将流表中的待处理流规则进行处理,使得 所述待处理流规则不与接收到的数据进行匹配。
在所述第一方面的第一种可能实现方式中,所述将流表中的待处理流规则 进行处理, 使得所述待处理流规则不与接收到的数据进行匹配包括:
从所述控制连接失效时刻开始, 经过预设的第一失效控制时间, 若未接收 到流表中的待处理流规则匹配的数据, 或者经过预设的第二失效控制时间, 将 所述待处理流规则进行处理,使得所述待处理流规则不与接收到的数据进行匹 配。
结合所述第一方面或所述第一方面的第一种可能实现方式,还提供了所述 第一方面的第二种可能实现方式, 所述将流表中的待处理流规则进行处理,使 得所述待处理流规则不与接收到的数据进行匹配包括:
删除所述待处理流规则,使得所述待处理流规则不与接收到的数据进行匹 配。
结合所述第一方面或所述第一方面的第一种可能实现方式,还提供了所述 第一方面的第三种可能实现方式, 所述将流表中的待处理流规则进行处理,使 得所述待处理流规则不与接收到的数据进行匹配之后,, 所述方法还包括: 检测到所述控制连接恢复时,将所述待处理流规则进行处理,使得所述待 处理流规则恢复与接收到的数据进行匹配。
结合所述第一方面或所述第一方面的上述任意一种可能实现方式,还提供 了所述第一方面的第五种可能实现方式,所述将流表中的待处理流规则进行处 理, 使得所述待处理流规则不与接收到的数据进行匹配包括:
按照所述控制器发送的失效控制信息,将所述流表中的待处理流规则进行 处理, 使得所述待处理流规则不与接收到的数据进行匹配。 结合所述第一方面的第五种可能实现方式,还提供了所述第一方面的第六 种可能实现方式,所述失效控制信息包括所述第一失效控制时间和所述第二失 效控制时间的时间参数值。
结合所述第一方面的第五种可能实现方式,还提供了所述第一方面的第七 种可能实现方式,所述失效控制信息为所述控制器发送的所述待处理流规则的 安装消息中携带的。
结合所述第一方面的第五种可能实现方式,还提供了所述第一方面的第八 种可能实现方式,所述待处理流规则为所述流表中的全部流规则或者至少部分 流规则 , 所述失效控制信息为所述控制器发送的流表配置消息中携带的。
第二方面, 提供了一种流表控制方法, 包括:
控制器通过与交换机的控制连接向所述交换机发送失效控制信息,所述失 效控制信息用于触发所述交换机当检测到所述控制连接失效时,将流表中的待 处理流规则进行处理, 使得所述待处理流规则不与接收到的数据进行匹配。
在所述第二方面的第一种可能实现方式中,所述失效控制信息具体用于触 发所述交换机检测到所述控制连接失效时,从所述控制连接失效时刻开始, 经 过预设的第一失效控制时间, 若未接收到所述目标流规则匹配的数据, 或者经 过预设的第二失效控制时间,将所述待处理流规则进行处理,使得所述待处理 流规则不与接收到的数据进行匹配。
结合所述第二方面或所述第二方面的第一种可能实现方式,还提供了所述 第二方面的第二种可能实现方式,所述失效控制信息具体用于触发所述交换机 检测到所述控制连接失效时, 将流表中的待处理流规则删除。
第三方面, 提供了一种流表控制装置, 包括:
检测单元, 用于检测交换机与控制器的控制连接状态;
处理单元, 用于当所述检测单元检测到所述控制连接失效时,将流表中的 待处理流规则进行处理, 使得所述待处理流规则不与接收到的数据进行匹配。
在所述第三方面的第一种可能实现方式中,所述处理单元具体用于从所述 控制连接失效时刻开始, 经过预设的第一失效控制时间, 若未接收到流表中待 处理流规则匹配的数据, 或者经过预设的第二失效控制时间,将所述待处理流 规则进行处理, 使得所述待处理流规则不与接收到的数据进行匹配。
结合所述第三方面或所述第三方面的第一种可能实现方式,还提供了所述 第一方面的第二种可能实现方式,所述处理单元将流表中的待处理流规则进行 处理具体是删除所述待处理流规则。
结合所述第三方面或所述第三方面的第一种可能实现方式,还提供了所述 第一方面的第三种可能实现方式, 还包括:
恢复单元, 用于检测到所述控制连接恢复时,将所述待处理流规则进行处 理, 使得所述待处理流规则恢复与接收到的数据进行匹配。
结合所述第三方面或所述第三方面的上述任意一种可能实现方式,还提供 了所述第三方面的第四种可能实现方式,所述处理单元具体用于按照所述控制 器发送的失效控制信息,将流表中的待处理流规则进行处理,使得所述待处理 流规则不与接收到的数据进行匹配。
第四方面, 提供了一种流表控制装置, 包括:
发送单元, 用于通过与交换机的控制连接向所述交换机发送失效控制信 息, 所述失效控制信息用于触发所述交换机检测到所述控制连接失效时,将流 表中的待处理流规则进行处理,使得所述待处理流规则不与接收到的数据进行 匹配。
第五方面,提供了一种交换机, 至少包括存储器和通过总线与所述存储器 连接的处理器;
所述存储器用于存储一组第一程序指令;
所述处理器调用所述存储器存储的第一程序指令执行如下操作: 检测与控制器的控制连接状态; 当检测到所述控制连接失效时,将所述待 处理流规则进行处理, 使得所述待处理流规则不与接收到的数据进行匹配。
第六方面, 提供了一种控制器, 至少包括存储器、 发送器和通过总线与所 述存储器和所述发送器连接的处理器;
所述存储器用于存储一组第二程序指令;
所述处理器调用所述存储器存储的第二程序指令执行如下操作: 触发所述发送器通过与交换机的控制连接向所述交换机发送失效控制信 息,其中,所述失效控制信息用于触发所述交换机检测到所述控制连接失效时, 将流表中的待处理流规则进行处理,使得所述待处理流规则不与接收到的数据 进行匹配。
综上, 本申请提供的一种流表控制方法、 装置、 交换机和控制器, 交换机 检测与控制器的控制连接状态, 当检测到该控制连接失效时,将流表中的该待 处理流规则进行处理,使得所述待处理流规则不与接收到数据进行匹配,从而 使得在控制连接失效时, 仍可对流规则进行处理, 实现对流表的控制, 避免了 对数据转发等处理操作的失控, 保证数据传输的安全性。
附图说明 为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施 例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地, 下面描述 中的附图仅仅是本申请的实施例,对于本领域普通技术人员来讲,在不付出创 造性劳动的前提下, 还可以根据提供的附图获得其他的附图。
图 1 为本申请实施例提供的一种流表控制方法一个实施例的流程图; 图 2为本申请实施例提供的一种流表控制方法另一个实施例的流程图; 图 3 为本申请实施例提供的一种流表控制方法又一个实施例的流程图; 图 4为本申请实施例提供的一种流表控制方法又一个实施例的流程图; 图 5为本申请实施例提供的一种流表控制装置一个实施例的结构示意图; 图 6为本申请实施例提供的一种交换机的结构示意图;
图 7 为本申请实施例提供的一种流表控制装置另一个实施例的结构示意 图;
图 8为本申请实施例提供的一种控制器的结构示意图。 具体实施方式 下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例仅仅是本申请一部分实施例, 而不是 全部的实施例。基于本申请中的实施例, 本领域普通技术人员在没有做出创造 性劳动前提下所获得的所有其他实施例, 都属于本申请保护的范围。 本申请实施例的主要思想之一可以包括:
交换机检测与控制器的控制连接状态, 当该控制连接失效时,将流表中的 该待处理流规则进行处理, 使得所述待处理流规则不与接收到数据进行匹配, 从而使得在控制连接失效时, 仍可对流规则进行处理, 实现对流表的控制, 避 免了对数据转发等处理操作的失控, 保证数据传输的安全性。 图 1为本申请实施例一种流表控制方法一个实施例的流程图,本实施例所 述技术方案可具体应用基于 OpenFlow技术的软件定义网络中。
该方法可以包括:
步骤 101 : 交换机检测与控制器的控制连接状态。
本申请实施例中, 交换机和控制器为基于 OpenFlow技术的软件定义网络 中的网元设备,在该软件定义网络中, 通过交换机和控制器实现了数据转发和 控制的分离。
交换机中存储有一个或多个流表, 流表中每一流表项即为一流规则, 流规 则中包括流匹配信息以及执行操作等内容。控制器可以根据数据的特征确定数 据的执行操作, 例如转发、 丟弃、 修改报头等, 据此可以设置相应的流规则下 发至交换机中。 交换机将控制器下发的流规则, 作为流表项存储在流表中, 当 接收到数据时,将接收到的数据与流表中的各流规则进行匹配。 从而可按照与 接收到的数据相匹配的流规则定义的执行操作, 对数据进行转发等处理操作。
控制器对交换机中流表的控制是基于控制连接实现的,其可以控制流规则 的查询、修改, 删除等操作, 通过对流表的控制即可实现对数据转发等处理操 作的控制。
因此本实施例中, 为了保证数据转发等操作的控制 , 交换机检测与控制器 的控制连接状态,可以实时检测也可以周期性检测,以确定控制连接是否失效。
步骤 102: 当检测到所述控制连接失效时, 将流表中的待处理流规则进行 处理, 使得所述待处理流规则不与接收到的数据进行匹配。
该流表中的待处理流规则可以是流表中的全部流规则或者至少部分流规 则或者任意一个流规则。 交换机检测与控制器之间的控制连接失效可以有多种实现方式,例如可以 是在向控制器多次发送信息失败时,或者在预设时间内未接收到控制器的发送 信息时, 可以确定控制连接失效。
当然还可以通过与控制器间互发的心跳信令进行检测,本申请并不对此进 行限制。
为了避免控制连接失效后,控制器无法实现对交换机中流表的控制,使得 不能够对流规则进行处理,从而导致对数据转发等处理操作的失控, 因此本申 请实施例中,将流表中待处理流规则进行处理,使之不与接收到的数据进行匹 配,即当在控制连接失效时,交换机若接收到数据,不再查询该待处理流规则, 将该接收到数据不与待处理流规则进行匹配,从而可以避免继续按照该待处理 流规则执行数据处理时, 对数据处理失去控制。
其中,将该待处理流规则进行处理,使得其不与接收到的数据进行匹配可 以有多种实现方式:
一种可能实现方式为:
删除该待处理流规则。
另一种可能实现方式为:
保留该待处理流规则, 当接收到的数据在所述流表中匹配时, 暂停查询该 待处理流规则。可以是将待处理流规则设置相应的标记符号,当接收到数据时, 对于具有标记符号的流规则, 不与该接收到的数据进行匹配。 当然, 还可以采 用其他方式实现, 本发明并不对此做限定, 只需实现接收到数据不与待处理流 规则进行匹配即可。
由于待处理流规则不与接收到数据进行匹配,实现了交换机暂停对该待处 理流规则的执行操作。
在本实施例中, 若交换机检测与控制器的控制连接状态, 当该控制连接失 效,则将流表中的待处理流规则进行处理,使之不与接收到的数据进行匹配则, 从而接收到的数据不再按照控制连接失效后的流规则执行相应的操作,使得在 控制连接失效状态下,对流表仍可实现控制,避免了网络对数据转发等处理操 作的失控, 保证了数据传输的安全性。 图 2为本申请实施例一种流表控制方法另一个实施例的流程图,该方法可 以包括以下几个步骤:
步骤 201 : 交换机检测与控制器的控制连接状态。。
步骤 201与上述实施例中步骤 101的操作相同, 在此不再贅述。
步骤 202: 当检测到所述控制连接失效时,从所述控制连接失效时刻开始, 经过预设的第一失效控制时间, 若未接收到流表中的待处理流规则匹配的数 据, 或者经过预设的第二失效控制时间, 将所述待处理流规则进行处理, 使得 所述待处理流规则不与接收到的数据进行匹配。
本实施例中, 交换机检测到控制连接失效时开始计时,在预设的第一失效 控制时间内, 若未接收到该待处理流规则匹配的数据, 则即可将待处理流规则 进行处理, 使之不与接收到的数据进行匹配, 也即经过第一失效控制时间后, 若再接收到数据, 则不再与该待处理流规则进行匹配。
或者, 控制连接失效时刻开始计时, 若经过预设的第二失效控制时间, 则 同样将待处理流规则进行处理, 使之不与接收到的数据进行匹配。
该第一失效控制时间和该第二失效控制时间为应用于控制连接失效时的 失效处理参数, 可以是交换机设置的, 也可以是在控制连接正常情况下, 由控 制器设置并通过控制连接下发至交换机,从而可以实现在控制连接失效时,控 制器仍为实现对流规则的控制。
流规则由控制器下发并存储在交换机中,通常具有一定的时效性, 即在经 过一定时间后,控制器可以控制流规则的修改、删除等操作,在该一定时间内, 流规则会正常与接收到数据进行匹配。 因此, 本实施例中通过设置的第一失效 控制时间和第二失效控制时间的设置, 可以使得在控制连接失效,控制器无法 通过控制连接实现对流规则的控制处理时,根据预设的第一失效控制时间和第 二失效控制时间仍可实现对待处理流规则的控制,使得对数据转发等处理操作 不至于失控。
将待处理流规则进行处理,使之不与接收到数据进行匹配, 可以有多种实 现方式, 一种可能的实现方式为可以将该待处理流规则删除。 另一种可能实现 方式为保留该待处理流规则,只是当接收到数据时,暂停查询该待处理流规则, 不再与接收到的数据进行匹配, 例如可以将待处理流规则进行标记, 当接收到 的数据在流表中进行匹配时, 不与标记的待处理流规则的进行匹配。 其中, 交换机经过预设的第一失效控制时间, 若未接收到与待处理流规则 匹配的数据时, 或者经过预设的第二失效控制时间,还可以判断该控制连接是 否恢复, 若控制连接没有恢复, 再执行将待处理流规则进行处理, 使之不与接 收到数据进行匹配。
步骤 203 : 检测到所述控制连接恢复时, 将所述待处理流规则进行处理, 使之恢复与接收到的数据进行匹配。
当交换机与控制器的控制连接恢复时,控制器与交换机可以通过控制连接 正常交互控制信令, 此时待处理流规则未被删除的实现方式中, 可以将该待处 理流规则进行处理,使之能够与接收到数据进行匹配, 即恢复该待处理流规则 的匹配功能, 当接收到数据时, 该待处理流规则继续与接收到数据进行匹配。
交换机还可以将待处理规则的处理情况反馈给控制器。
作为另一个实施例,将待处理流规则进行处理具体为将该待处理规则删除 时, 则当控制连接恢复时, 该待处理流规则已不存在, 无法恢复, 此时, 交换 机可以向控制器反馈该待处理规则的包括删除时间等参数的信息。
其中,检测与控制器的控制连接是否恢复并不限定为本实施例中的执行步 骤, 若在控制连接失效过程, 待处理流规则未执行处理, 则控制连接恢复后, 同样无需对待处理流规则执行处理。
在本实施例中, 交换机检测与控制器的控制连接状态, 当该控制连接失效 时, 从控制连接失效时刻开始, 经过预设的第一失效控制时间, 若未接收到与 流表中的该待处理流规则匹配的数据, 或者经过预设的第二失效控制时间, 则 可以将该待处理流规则进行处理,使之不与接收到的数据进行匹配,从而使得 在控制连接失效的情况下,仍可对流表中的流规则进行处理,数据转发的处理 操作不至于失控, 保证了数据的安全性, 同时在控制连接恢复的情况下, 还可 以将待处理流规则进行处理,使之恢复与接收到的数据进行匹配, 恢复流规则 的功能。 图 3为本申请实施例一种流表控制方法又一个实施例的流程图,该方法可 以包括以下几个步骤:
步骤 301 : 交换机检测与控制器的控制连接状态。。
步骤 301的操作与上述实施例中步骤 101的操作相同, 在此不再贅述。 步骤 302: 当所述控制连接失效时,按照所述控制器发送的失效控制信息, 将流表中的待处理流规则进行处理, 使之不与接收到的数据进行。
该失效控制信息由控制器设置并基于与交换机之间的控制连接发送至交 换机, 用于触发交换机在控制连接失效时, 按照该失效控制信息, 对流表中的 待处理流规则进行处理,从而实现在控制连接失效时,控制器对交换机中流表 的控制。
该失效控制信息可以包括第一失效控制时间和第二失效控制时间的时间 参数值, 则交换机具体按照所述控制器发送的失效控制信息,从所述控制连接 失效时刻开始, 经过预设的第一失效控制时间, 若未接收到流表中待处理流规 则匹配的数据, 或者经过预设的第二失效控制时间,将所述待处理流规则进行 处理, 使之不与接收到的数据进行匹配。
该失效控制信息可以是控制器发送的流规则安装消息中携带的,也即控制 器下发流规则时的流规则安装消息中携带该流规则的失效控制信息,该流规则 安装消息中包括流匹配信息, 执行操作等, 还可以携带失效控制信息。 因此该 待处理流规则即可以是指流表中任一流规则,针对每一流规则,控制器发送的 流规则安装消息中均携带其对应的失效控制信息。其中, 不同流规则对应的第 一失效控制时间和第二失效控制时间的参数值可以不一样。
此外, 该失效控制信息还可以是控制器发送的流表配置信息中携带的。 流 表配置信息包括流表标识等,还携带该失效控制信息。失效控制信息对应流表, 此时该待处理流规则可以包括流表中全部的流规则,也可以根据失效控制信息 的指示, 包括至少部分流规则。
失效控制信息可以是控制器为待处理流规则设置的,从而交换机可以检测 流表中具有失效控制信息的流规则即为待处理流规则。
交换机按照控制器发送的失效控制信息, 将所述待处理流规则进行处理, 例如, 可以按照该失效控制信息, 将待处理流规则删除, 或者接收到数据时, 暂停查询该待处理流规则。
在本实施例中, 交换机检测与控制器的控制连接状态, 当该控制连接失效 时按照控制器发送的失效控制信息,将流表中的待处理流规则进行处理,使之 不与接收到的数据进行匹配,从而使得在控制连接失效情况下,还可以实现控 制器对流表的控制, 能够对流规则进行处理,使得对数据转发等处理操作不至 于失去控制, 保证了数据传输的安全性。 图 4为本申请实施例一种流表控制方法又一个实施例的流程图,该方法可 以包括:
步骤 401 : 控制器通过与交换机的控制连接向所述交换机发送失效控制信 息。
其中, 该失效控制信息用于触发所述交换机当所述控制连接失效时,将流 表中的待处理流规则进行处理, 使之不与接收到的数据进行匹配。
也即交换机检测到与控制器的连接失效时, 并按照该失效控制信息,将流 表中待处理流规则进行处理, 使之不与接收到的数据进行匹配。
该失效控制信息可以是控制器向交换机发送的流规则安装消息中携带的, 交换机处理的待处理流规则即为流表中的任一流规则。
当然还可以是控制器向交换机发送的流表配置信息中携带,或者作为独立 消息单独发送至交换机。根据该失效控制信息, 交换机处理的待处理流规则可 以包括流表中全部流规则或者至少部分流规则。
该失效控制信息可以包括第一失效控制时间和第二失效控制时间的时间 参数值, 则该失效控制信息具体是触发交换机当所述控制连接失效时,从所述 控制连接失效时刻开始, 经过预设的第一失效控制时间, 若未接收到所述目标 流规则匹配的数据, 或者经过预设的第二失效控制时间,将所述待处理流规则 进行处理, 使之不与接收到的数据进行匹配。
该失效控制信息触发交换机当所述控制连接失效时,将流表中的待处理流 规则进行处理具体可以是,触发该交换机当所述控制连接失效时,删除流表中 的待处理流规则; 当然还可以是触发交换机当接收到数据时, 暂停查询流表中 的待处理流规则。
在本实施例中 ,控制器通过与交换机之间的控制连接向交换机发送失效控 制信息, 该失效控制信息用于触发交换机在该控制连接失效时,将流表中的待 处理流规则进行处理,使之不与接收到的数据进行匹配,从而使得在控制连接 失效时, 仍可实现对流表的控制, 使得能够对流规则进行处理, 能仍够对数据 转发等处理操作等进行控制 , 保证了数据传输的安全性。
图 5为本申请实施例一种流表控制装置一个实施例的结构示意图,该装置 可以包括:
检测单元 501 , 用于检测交换机与控制器的控制连接。
处理单元 502, 用于当所述检测单元 501检测到所述控制连接失效时, 将 流表中的待处理流规则进行处理,使得所述待处理流规则不与接收到的数据进 行匹配。
其中,作为一种可能的实现方式, 该处理单元可以具体是从所述控制连接 失效时刻开始, 经过预设的第一失效控制时间, 若未接收到所述待处理流规则 匹配的数据, 或者经过预设的第二失效控制时间,将所述待处理流规则进行处 理, 使之不与接收到的数据进行匹配。
其中,处理单元将所述待处理流规则处理为不与接收到的数据进行匹配的 流规则一种可能的实现方式为: 删除该待处理流规则。
另一种可能的实现方式为: 当接收到数据时, 暂停查询该待处理流规则。 其中, 该处理单元将流表中的待处理流规则进行处理, 可以具体是按照控 制器发送的失效控制信息,将所述待处理流规则进行处理,使之不与接收到的 数据进行匹配。
该失效控制信息中还可以包括该第一失效控制时间和该第二失效控制时 间的时间参数值。
该待处理流规则可以是指流表中的任一流规则,该失效控制信息即是控制 器发送的所述待处理流规则的安装消息中携带的。
当然, 该待处理流规则可以包括流表中的全部流规则或者至少部分流规 则 ,该失效控制信息可以是所述控制器发送的流表配置消息中携带的或者控制 器单独发送的。
此外, 作为另一个实施例, 当未将该待处理流规则删除, 保留该待处理流 规则时, 该装置还可以包括:
恢复单元 503: 用于检测到与控制器的控制连接恢复时, 将所述待处理流 规则进行处理, 恢复与接收到的数据进行匹配。
在本实施例中, 交换机检测与控制器的控制连接, 当该控制连接失效时, 按照控制器发送的失效控制信息,将待处理流规则进行处理,使之不与接收到 的数据进行匹配。使得在控制连接失效情况下,还可以实现控制器对流表的控 制, 能够对流规则进行处理, 使得对数据转发等处理操作不至于失去控制, 保 证了数据传输的安全性。 如图 5所示提供的流表控制装置, 在实际应用中, 可以集成到交换机中, 部署本申请实施例该流表控制装置的交换机 ,可以在控制器与交换机之间的控 制连接失效时,仍可以实现对流表的控制,避免对数据转发等处理操作的失控。
通过以上描述可知,本领域的技术人员可以清楚地了解到本申请可借助软 件加必需的通用硬件平台的方式来实现。 因此, 参见图 6, 本申请实施例还提 供了一种交换机, 该交换机至少包括存储器 601和通过总线 602与存储器 601 连接的处理器 603。
该存储器 601用于存储一组第一程序指令;
该处理器 603用于调用该存储器 601存储的第一程序指令,执行如下操作: 检测与控制器的控制连接, 当检测到所述控制连接失效时,将流表中的待 处理流规则进行处理, 使得所述待处理流规则不与接收到的数据进行匹配。
图 7为本申请实施例一种流表控制装置另一个实施例的结构示意图,该装 置可以包括:
发送单元 701 , 用于通过与交换机的控制连接向所述交换机发送失效控制 信息。 其中, 该失效控制信息用于触发所述交换机当检测到所述控制连接失效 时, 将流表中的待处理流规则进行处理, 使之不与接收到的数据进行匹配。
该失效控制信息可以是控制器向交换机发送的流规则安装消息中携带的, 交换机处理的待处理流规则可以为流表中的任一流规则。
当然还可以是控制器向交换发送的流表配置信息中携带,或者作为独立消 息单独发送至交换机。根据该失效控制信息, 交换机处理的待处理流规则可以 包括流表中全部流规则或者至少部分流规则。
该失效控制信息中可以包括第一失效控制时间和第二失效控制时间的时 间参数值, 此时, 该失效控制信息具体用于触发所述交换机当检测到所述控制 连接失效时, 从所述控制连接失效时刻开始, 经过预设的第一失效控制时间, 若未接收到与流表中的待处理流规则匹配的数据,或者经过预设的第二失效控 制时间, 将所述待处理流规则进行处理, 使之不与接收到的数据进行匹配。
该失效控制信息触发交换机当检测到所述控制连接失效时,将流表中的待 处理流规则进行处理可以是, 触发该交换机当检测到所述控制连接失效时, 删 除流表中的待处理流规则; 当然还可以是触发交换机当接收到数据时, 暂停查 询流表中的待处理流规则。
在本实施例中,流表控制装置可以通过与交换机之间的控制连接向交换机 发送失效控制信息, 该失效控制信息用于触发交换机在该控制连接失效时, 将 流表中的待处理流规则进行处理,使之不与接收到的数据进行匹配,从而使得 在控制连接失效时, 仍可实现对流表的控制, 使得能够对流规则进行处理, 能 仍够对数据转发等处理操作等进行控制。
如图 7所示提供的流表控制装置, 在实际应用中, 可以集成到控制器中, 部署本申请实施例该流表控制装置的控制器,可以在控制器与交换机之间的控 制连接失效时,仍可以实现对流表的控制,避免对数据转发等处理操作的时刻。
通过以上描述可知,本领域的技术人员可以清楚地了解到本申请可借助软 件加必需的通用硬件平台的方式来实现。 因此, 参见图 8, 本申请实施例还提 供了一种控制器, 该控制器至少包括存储器 801、 发送器 802和通过总线 803 与存储器 801。 发送器 802连接的处理器 804。
该存储器 801用于存储一组第二程序指令; 该处理器 804用户调用该存储器存储的第二程序指令, 执行如下操作: 触发所述发送器 802通过与交换机的控制连接向所述交换机发送失效控 制信息, 其中, 所述失效控制信息用于触发所述交换机当检测所述控制连接失 效时, 将流表中的待处理流规则进行处理, 使之不与接收到的数据进行匹配。
本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是 与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于 实施例公开的装置而言, 由于其与实施例公开的方法相对应, 所以描述的比较 简单, 相关之处参见方法部分说明即可。
最后, 还需要说明的是, 在本文中, 诸如第一和第二等之类的关系术语仅 仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者 暗示这些实体或操作之间存在任何这种实际的关系或者顺序。 而且, 术语 "包 括"、 "包含"或者其任何其他变体意在涵盖非排他性的包含, 从而使得包括一 系列要素的过程、 方法、 物品或者设备不仅包括那些要素, 而且还包括没有明 确列出的其他要素, 或者是还包括为这种过程、 方法、 物品或者设备所固有的 要素。 在没有更多限制的情况下, 由语句 "包括一个 ... ... " 限定的要素, 并不 排除在包括所述要素的过程、 方法、 物品或者设备中还存在另外的相同要素。
为了描述的方便, 描述以上装置时以功能分为各种单元分别描述。 当然, 在实施本申请时可以把各单元的功能在同一个或多个软件和 /或硬件中实现。
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本 申请可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解, 本申 请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形 式体现出来,该计算机软件产品可以存储在存储介质中,如 ROM/RAM、磁碟、 光盘等, 包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器, 或者网络设备等)执行本申请各个实施例或者实施例的某些部分所述的方法。
对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本 申请。 对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见 的, 本文中所定义的一般原理可以在不脱离本申请的精神或范围的情况下, 在 其它实施例中实现。 因此, 本申请将不会被限制于本文所示的这些实施例, 而 是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。
+

Claims

权 利 要 求
1、 一种流表控制方法, 其特征在于, 包括:
交换机检测与控制器的控制连接状态;
当检测到所述控制连接失效时,将流表中的待处理流规则进行处理,使得 所述待处理流规则不与接收到的数据进行匹配。
2、 根据权利要求 1所述的方法, 其特征在于, 所述将流表中的待处理流 规则进行处理, 使得所述待处理流规则不与接收到的数据进行匹配包括:
从所述控制连接失效时刻开始, 经过预设的第一失效控制时间, 若未接收 到流表中的待处理流规则匹配的数据, 或者经过预设的第二失效控制时间, 将 所述待处理流规则进行处理,使得所述待处理流规则不与接收到的数据进行匹 配。
3、 根据权利要求 1或 2所述的方法, 其特征在于, 所述将流表中的待处 理流规则进行处理, 使得所述待处理流规则不与接收到的数据进行匹配包括: 删除所述待处理流规则,使得所述待处理流规则不与接收到的数据进行匹 配。
4、 根据权利要求 1或 2所述的方法, 其特征在于, 所述将流表中的待处 理流规则进行处理,使得所述待处理流规则不与接收到的数据进行匹配之后,, 所述方法还包括:
检测到所述控制连接恢复时,将所述待处理流规则进行处理,使得所述待 处理流规则恢复与接收到的数据进行匹配。
5、 根据权利要求 1〜4任一项所述的方法, 其特征在于, 所述将流表中的 待处理流规则进行处理,使得所述待处理流规则不与接收到的数据进行匹配包 括:
按照所述控制器发送的失效控制信息,将所述流表中的待处理流规则进行 处理, 使得所述待处理流规则不与接收到的数据进行匹配。
6、 根据权利要求 5所述的方法, 其特征在于, 所述失效控制信息包括所 述第一失效控制时间和所述第二失效控制时间的时间参数值。
7、 根据权利要求 5所述的方法, 其特征在于, 所述失效控制信息为所述 控制器发送的所述待处理流规则的安装消息中携带的。
8、 根据权利要求 5所述的方法, 其特征在于, 所述待处理流规则为所述 流表中的全部流规则或者至少部分流规则,所述失效控制信息为所述控制器发 送的流表配置消息中携带的。
9、 一种流表控制方法, 其特征在于, 包括:
控制器通过与交换机的控制连接向所述交换机发送失效控制信息,所述失 效控制信息用于触发所述交换机当检测到所述控制连接失效时,将流表中的待 处理流规则进行处理, 使得所述待处理流规则不与接收到的数据进行匹配。
10、 根据权利要求 9所述的方法, 其特征在于, 所述失效控制信息具体用 于触发所述交换机检测到所述控制连接失效时, 从所述控制连接失效时刻开 始, 经过预设的第一失效控制时间, 若未接收到所述目标流规则匹配的数据, 或者经过预设的第二失效控制时间,将所述待处理流规则进行处理,使得所述 待处理流规则不与接收到的数据进行匹配。
11、 根据权利要求 9或 10所述的方法, 其特征在于, 所述失效控制信息 具体用于触发所述交换机检测到所述控制连接失效时,将流表中的待处理流规 则删除。
12、 一种流表控制装置, 其特征在于, 包括:
检测单元, 用于检测交换机与控制器的控制连接状态;
处理单元, 用于当所述检测单元检测到所述控制连接失效时,将流表中的 待处理流规则进行处理, 使得所述待处理流规则不与接收到的数据进行匹配。
13、 根据权利要求 12所述的装置, 其特征在于, 所述处理单元具体用于 从所述控制连接失效时刻开始, 经过预设的第一失效控制时间, 若未接收到流 表中待处理流规则匹配的数据, 或者经过预设的第二失效控制时间,将所述待 处理流规则进行处理, 使得所述待处理流规则不与接收到的数据进行匹配。
14、 根据权利要求 12或 13所述的装置, 其特征在于, 所述处理单元将流 表中的待处理流规则进行处理具体是删除所述待处理流规则。
15、 根据权利要求 12或 13所述的装置, 其特征在于, 还包括: 恢复单元, 用于检测到所述控制连接恢复时,将所述待处理流规则进行处 理, 使得所述待处理流规则恢复与接收到的数据进行匹配。
16、根据权利要求 12〜15任一项所述的装置, 其特征在于, 所述处理单元 具体用于按照所述控制器发送的失效控制信息,将流表中的待处理流规则进行 处理, 使得所述待处理流规则不与接收到的数据进行匹配。
17、 一种流表控制装置, 其特征在于, 包括:
发送单元, 用于通过与交换机的控制连接向所述交换机发送失效控制信 息, 所述失效控制信息用于触发所述交换机检测到所述控制连接失效时,将流 表中的待处理流规则进行处理,使得所述待处理流规则不与接收到的数据进行 匹配。
18、 一种交换机, 其特征在于, 至少包括存储器和通过总线与所述存储器 连接的处理器;
所述存储器用于存储一组第一程序指令;
所述处理器调用所述存储器存储的第一程序指令执行如下操作:
检测与控制器的控制连接状态; 当检测到所述控制连接失效时,将所述待 处理流规则进行处理, 使得所述待处理流规则不与接收到的数据进行匹配。
19、 一种控制器, 其特征在于, 至少包括存储器、 发送器和通过总线与所 述存储器和所述发送器连接的处理器;
所述存储器用于存储一组第二程序指令;
所述处理器调用所述存储器存储的第二程序指令执行如下操作:
触发所述发送器通过与交换机的控制连接向所述交换机发送失效控制信 息,其中,所述失效控制信息用于触发所述交换机检测到所述控制连接失效时, 将流表中的待处理流规则进行处理,使得所述待处理流规则不与接收到的数据 进行匹配。
+
PCT/CN2013/082704 2013-08-30 2013-08-30 流表控制方法、装置、交换机和控制器 WO2015027477A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2013/082704 WO2015027477A1 (zh) 2013-08-30 2013-08-30 流表控制方法、装置、交换机和控制器
CN201380001421.XA CN104604194B (zh) 2013-08-30 2013-08-30 流表控制方法、装置、交换机和控制器

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2013/082704 WO2015027477A1 (zh) 2013-08-30 2013-08-30 流表控制方法、装置、交换机和控制器

Publications (1)

Publication Number Publication Date
WO2015027477A1 true WO2015027477A1 (zh) 2015-03-05

Family

ID=52585431

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2013/082704 WO2015027477A1 (zh) 2013-08-30 2013-08-30 流表控制方法、装置、交换机和控制器

Country Status (2)

Country Link
CN (1) CN104604194B (zh)
WO (1) WO2015027477A1 (zh)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106302265B (zh) * 2016-07-21 2019-08-06 新华三技术有限公司 报文转发方法及装置
CN108011815B (zh) * 2016-10-28 2020-12-01 中国电信股份有限公司 网络控制方法以及软件定义网络设备和系统
CN115348153B (zh) * 2022-08-15 2023-07-18 中国联合网络通信集团有限公司 转发设备的控制方法、装置、设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102685006A (zh) * 2012-05-03 2012-09-19 中兴通讯股份有限公司 一种转发数据报文的方法及装置
CN102859952A (zh) * 2010-04-19 2013-01-02 日本电气株式会社 交换机和流表控制方法
CN102946365A (zh) * 2012-11-09 2013-02-27 清华大学 一种基于软件定义网络的保持流表更新一致性的方法
CN102946325A (zh) * 2012-11-14 2013-02-27 中兴通讯股份有限公司 一种基于软件定义网络的网络诊断方法、系统及设备

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7076594B2 (en) * 2000-12-22 2006-07-11 Cisco Technology, Inc. Apparatus and method for preventing one way connectivity loops in a computer network
JP2004173136A (ja) * 2002-11-22 2004-06-17 Fujitsu Ltd ネットワーク管理装置
EP1503548A1 (en) * 2003-08-01 2005-02-02 fg microtec GmbH Distributed Quality of Service Management System
US20080120286A1 (en) * 2006-11-22 2008-05-22 Dettinger Richard D Method and system for performing a clean operation on a query result

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102859952A (zh) * 2010-04-19 2013-01-02 日本电气株式会社 交换机和流表控制方法
CN102685006A (zh) * 2012-05-03 2012-09-19 中兴通讯股份有限公司 一种转发数据报文的方法及装置
CN102946365A (zh) * 2012-11-09 2013-02-27 清华大学 一种基于软件定义网络的保持流表更新一致性的方法
CN102946325A (zh) * 2012-11-14 2013-02-27 中兴通讯股份有限公司 一种基于软件定义网络的网络诊断方法、系统及设备

Also Published As

Publication number Publication date
CN104604194B (zh) 2018-02-23
CN104604194A (zh) 2015-05-06

Similar Documents

Publication Publication Date Title
CN106656834B (zh) Is-is路由协议异构功能等价体并行归一化装置及方法
JP2014175924A5 (zh)
WO2017219779A1 (zh) 基于链路协议的设备主备倒换方法和装置、存储介质
WO2015000362A1 (zh) 一种业务节点配置方法、业务节点池注册器及系统
WO2014079271A1 (zh) 一种链路保活方法、控制器及交换机
WO2014067043A1 (zh) 网络流量检测方法、系统、设备及控制器
WO2015109497A1 (zh) 流表修改方法、流表修改装置和开放流网络系统
CN107645517A (zh) 数据推送方法及装置
WO2014166190A1 (zh) 一种网络设备数据转发方法及装置
WO2015027477A1 (zh) 流表控制方法、装置、交换机和控制器
US11038898B2 (en) Slow protocol packet processing method and related apparatus
WO2013097482A1 (zh) 邮件行为阻断方法、装置及网关
WO2014177012A1 (zh) 网络事务控制方法及执行方法及网络控制器及转发设备
WO2011060677A1 (zh) 主备倒换的方法、装置及系统
WO2015154366A1 (zh) 一种基于策略的m2m终端设备监测控制方法和装置
WO2015123853A1 (zh) 一种数据流处理方法及装置
US20160028716A1 (en) Routing protocol authentication migration
WO2019085651A1 (zh) 软件定义网络的设置方法、控制器、交换机及存储介质
WO2014000290A1 (zh) 数据报文的控制方法、设备及系统
US11122482B2 (en) Node handover method, apparatus, and system in a software defined protocol network
WO2015103869A1 (zh) 一种软件定义网络中OpenFlow消息跟踪和过滤的方法
WO2014113957A1 (zh) 一种链路管理方法、设备和通信系统
WO2015178415A1 (ja) 通信装置、制御装置、通信システム及び送信制御方法
WO2014019196A1 (zh) 拓扑信息处理方法及设备
JP5388211B2 (ja) 通信装置

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: 13892124

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: 13892124

Country of ref document: EP

Kind code of ref document: A1