[go: up one dir, main page]

WO2018018567A1 - 一种管理交换机的方法及装置 - Google Patents

一种管理交换机的方法及装置 Download PDF

Info

Publication number
WO2018018567A1
WO2018018567A1 PCT/CN2016/092176 CN2016092176W WO2018018567A1 WO 2018018567 A1 WO2018018567 A1 WO 2018018567A1 CN 2016092176 W CN2016092176 W CN 2016092176W WO 2018018567 A1 WO2018018567 A1 WO 2018018567A1
Authority
WO
WIPO (PCT)
Prior art keywords
flow table
table group
group
message
switch
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2016/092176
Other languages
English (en)
French (fr)
Inventor
乔晓强
李岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to PCT/CN2016/092176 priority Critical patent/WO2018018567A1/zh
Publication of WO2018018567A1 publication Critical patent/WO2018018567A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Definitions

  • SDN Software Defined Networking
  • the SDN decouples the control logic and forwarding functions of the network element into control plane devices and forwarding plane devices to implement centralized deployment of control logic.
  • the control and maintenance of the network can be easily implemented through centralized deployment of control plane devices.
  • the idea of SDN is being widely applied to data center networks and telecommunication networks.
  • a network device also referred to as a switch
  • a forwarding plane device is used to perform packet transmission on the forwarding plane.
  • a network controller also known as a controller, is a control plane device that is used to configure and manage switches through a control channel.
  • the application is used to implement various network functions, including routing control, tunnel encapsulation, firewall, secure access, and QoS control.
  • the functions to be implemented by the switch are configured through the network application on the controller. If the switch needs to implement complex network functions, such as routing control, tunnel encapsulation, firewall, secure access, and QoS control, then A variety of web applications need to be installed on the controller. The centralized deployment of such network functions will bring great operational overhead to the controller, which is easy to cause control. On the other hand, when the network needs to be expanded or expanded, the cumulative stacking method can only be adopted. The network application on the controller will become larger and larger, which may cause operational stability and reliability problems. .
  • complex network functions such as routing control, tunnel encapsulation, firewall, secure access, and QoS control
  • the embodiments of the present invention provide a method and a device for managing a switch, which are used to solve a bottleneck problem caused by centralized deployment of a network function of a controller, and implement a multi-controller cooperative control switch.
  • a method of managing a switch includes:
  • the controller sends a packet indication message to the switch, where the packet indication message is used to instruct the switch to group the at least one flow table;
  • the controller determines a flow table group to be bound, and sends a flow table group binding message to the switch, where the flow table group binding message carries the identification information of the flow table group to be bound, and the flow table group
  • the binding message is used to establish a binding relationship between the controller and the flow table group to be bound, so that the controller manages the flow table group to be bound.
  • the identifier information of each flow table group includes a flow table group identifier of the flow table group and/or a service function name of the flow table group.
  • the method further includes:
  • the controller obtaining, by the controller, the service flow information of the switch, where the service flow is formed by at least one flow table having a preset execution sequence, where the service flow information is used to describe the at least one flow table;
  • the controller parses the at least one flow table according to the preset execution order according to the service flow information, and determines at least one service function included in the service flow;
  • the controller divides the at least one flow table into at least one flow table group according to the at least one service function, and generates a group indication message;
  • the packet indication message includes a flow table group identifier of each flow table group in the at least one flow table group, a service function name of each flow table group, and indication information including a flow table in each flow table group.
  • the method provided by the embodiment of the present invention can implement grouping of flow tables in the switch to implement effective management of service flows in the switch.
  • the method further includes:
  • the controller obtains the description information corresponding to the at least one newly added flow table.
  • the controller divides the at least one newly added flow table into at least one newly added flow table group according to the at least one newly added service function, and generates a newly added group indication message, where the newly added group indication message includes a The flow table group identifier of each newly added flow table group in the at least one new flow table group, the service function name of each newly added flow table group, and the indication information of the flow table included in each newly added flow table group, each The execution order identifier of the newly added flow table group;
  • the controller sends the newly added packet indication message to the switch, where the newly added packet indication message is used to instruct the switch to group the at least one newly added flow table.
  • the method provided by the embodiment of the present invention can also group the newly added flow tables in the switch to implement effective management of the service flow in the switch.
  • the method further includes:
  • the controller sends a flow table group deletion message to the switch, where the flow table group deletion message carries the identifier information of the flow table group to be deleted or deletes the indication information of all the flow table groups.
  • the controller sends a packet query message to the switch, where the packet query message carries the identifier information of the flow table group to be queried; the controller receives the packet query response message sent by the switch, where the packet query response message includes The flow table group identifier of the flow table group to be queried, the service function name of the flow table group to be queried, and the flow table group to be queried includes the flow table indication information;
  • the controller sends a packet query message to the switch, the packet query message Carrying instruction information for querying all flow table groups; the controller receives a packet query response message sent by the switch, where the packet query response message includes a flow table of each flow table group in all flow table groups included in the switch Group ID, the name of the service function of each flow table group.
  • Each flow table group contains the indication information of the flow table.
  • the method provided by the embodiment of the present invention can implement comprehensive query and partial query on the flow table group in the switch, so as to implement effective management of the business process in the switch.
  • the method further includes:
  • the controller determines, according to the binding state of each flow table group in the entire flow table group, the unbound flow table group, and determines that the unbound flow table group is to be tied. Constant flow table group.
  • the method provided by the embodiment of the present invention can determine the flow table group to be bound by using the binding state carried in the packet query response message, so as to implement effective management of the service flow in the switch.
  • the method further includes:
  • the controller sends a control instruction to the switch, the control instruction carrying identification information of a flow table group that has been bound by the controller.
  • the method provided by the embodiment of the present invention can directly send a control command to the flow table group in the switch, so as to implement effective control on the service flow in the switch.
  • the method further includes:
  • a method of managing a switch includes:
  • the switch according to the packet indication message, grouping the at least one flow table to obtain at least one flow table group;
  • the switch receives the flow table group binding message sent by the controller, where the flow table group binding message carries the identification information of the flow table group to be bound, and the flow table group binding message is used to enable the control Establishing a binding relationship with the flow table group to be bound, so that the controller manages the flow table group to be bound;
  • the switch stores a binding relationship between the to-be-bound flow table group and the controller according to the flow table group binding message.
  • the packet indication message includes a flow table group identifier of each flow table group in the at least one flow table group, a service function name of each flow table group, and each flow table group Contains instructions for the flow table;
  • the switch according to the packet indication message, grouping the at least one flow table to obtain at least one flow table group, including:
  • the method further includes:
  • the switch receives a new packet indication message sent by the controller, where the newly added packet indication message includes the at least one new The flow table group ID of each newly added flow table group in the flow-increasing table group, the service function name of each newly added flow table group, the indication information of the flow table in each newly added flow table group, and each new flow An execution sequence identifier of the table group, where the newly added group indication message is used to instruct the switch to group the at least one newly added flow table;
  • the switch receives the flow table group deletion message sent by the controller, where the flow table group deletion message carries the indication information for deleting all the flow table groups; the switch deletes the message according to the flow table group deletion message.
  • the service function name of each flow table group and the corresponding relationship between each flow table group and the flow table group are deleted.
  • the switch Receiving, by the switch, a packet query message sent by the controller, where the packet query message carries identifier information of a flow table group to be queried; the switch sends a packet query response message to the controller, where the packet query response message includes The flow table group identifier of the flow table group to be queried, the service function name of the flow table group to be queried, and the flow table group to be queried includes the flow table indication information;
  • the switch after the switch, according to the flow table group binding message, the binding relationship between the flow table group to be bound and the controller, the switch further includes:
  • the switch receives the flow table group unbinding message sent by the controller, where the flow table group unbinding message carries the identification information of the flow table group to be unbound;
  • a transceiver unit configured to send a packet indication message to the switch, where the packet indication message is used to instruct the switch to group the at least one flow table;
  • a processing unit configured to determine a flow table group to be bound, and the switching is performed by the transceiver unit
  • the device sends a flow table group binding message, where the flow table group binding message carries the identifier information of the to-be-bound flow table group, where the flow table group binding message is used to enable the device to be bound to the
  • the flow table group establishes a binding relationship, so that the device manages the flow table group to be bound.
  • the identifier information of each flow table group includes a flow table group identifier of the flow table group and/or a service function name of the flow table group.
  • processing unit is further configured to:
  • the newly added group indication message includes the at least one new The flow table group ID of each newly added flow table group in the flow-increasing table group, the service function name of each newly added flow table group, the indication information of the flow table in each newly added flow table group, and each new flow The execution order identifier of the table group;
  • the transceiver unit is further configured to:
  • the transceiver unit is further configured to:
  • the packet query message carries the identifier information of the flow table group to be queried; and receives a packet query response message sent by the switch, where the packet query response message includes the flow table group to be queried a flow table group identifier, a service function name of the flow table group to be queried, and the flow table group to be queried includes indication information of the flow table;
  • the flow table group ID of each flow table group in the flow table group, the service function name of each flow table group, and the flow table group includes the flow table indication information.
  • the packet query response message further includes a binding state of the to-be-queried flow table group, where a binding state of the to-be-queried flow table group is used to indicate the to-be-queried flow Whether the table group has been bound; or the group query response message further includes a binding state of each flow table group in the entire flow table group, wherein a binding state of any flow table group is used to indicate the flow Whether the table group has been bound;
  • the processing unit is further configured to:
  • the flow table group to be bound is determined in the flow table group outside the flow table group to be queried;
  • the transceiver unit before sending the flow table group binding message to the switch by using the transceiver unit, determining, according to the binding state of each flow table group in the entire flow table group, the unbound flow table group, and Determining a flow table group to be bound from the unbound flow table group.
  • the transceiver unit is further configured to:
  • a control instruction is sent to the switch, where the control instruction carries the identification information of the flow table group that has been bound by the controller.
  • the transceiver unit is further configured to:
  • the flow table group unbinding message is sent to the switch, where the flow table group unbinding message carries the to-be-bound data table group to be unbound. Identification information.
  • an apparatus for managing a switch includes:
  • a transceiver unit configured to receive a packet indication message sent by the controller, where the packet indication message is used to instruct the device to group at least one flow table;
  • a processing unit configured to group the at least one flow table according to the grouping indication message to obtain at least one flow table group
  • the transceiver unit is configured to receive a flow table group binding message sent by the controller, where the flow table group binding message carries identifier information of a flow table group to be bound, and the flow table group binding message is used for Establishing a binding relationship between the controller and the flow table group to be bound, so that the controller manages the flow table group to be bound;
  • the processing unit is configured to store, according to the flow table group binding message, a binding relationship between the to-be-bound flow table group and the controller.
  • the identifier information of each flow table group includes a flow table group identifier of the flow table group and/or a service function name of the flow table group.
  • the packet indication message includes a flow table group identifier of each flow table group in the at least one flow table group, a service function name of each flow table group, and each flow table group Contains instructions for the flow table;
  • the processing unit is specifically configured to:
  • the processing unit is further configured to: determine, according to the newly added grouping indication message, a flow table group identifier of each newly added flow table group in the at least one newly added flow table group, and each newly added flow table group The service function name, the correspondence between each newly added flow table group and the flow table in the newly added flow table group, and the execution order of each newly added flow table group in the business process.
  • the transceiver unit is further configured to: receive a flow table group deletion message sent by the controller, where the flow table group deletion message carries identifier information of the flow table group to be deleted;
  • the processing unit is further configured to: identify, according to the flow table group deletion message, the flow table group of the flow table group to be deleted, the service function name of the to-be-delete flow table group, and the flow table group to be deleted The corresponding relationship of the flow table in the flow table group is deleted;
  • the sending and receiving unit is further configured to: receive a flow table group deletion message sent by the controller, where the flow table group deletion message carries indication information for deleting all flow table groups; the processing unit is further configured to: And identifying, according to the flow table group deletion message, a flow table group identifier of each flow table group in all flow table groups included in the switch, a service function name of each flow table group, each flow table group, and the flow table The corresponding relationship of the flow table in the group is deleted.
  • the transceiver unit is further configured to: receive a packet query message sent by the controller, where the packet query message carries identifier information of a flow table group to be queried; and sends the identifier information to the controller a packet query response message, where the packet query response message includes a flow table group identifier of the to-be-queried flow table group, a service function name of the to-be-queried flow table group, and an indication of the flow table in the to-be-queried flow table group information;
  • the transceiver unit is further configured to receive a packet query message sent by the controller, where the packet query message carries indication information for querying all flow table groups; and sends a packet query response message to the controller, where the packet
  • the query response message includes a flow table group identifier of each flow table group in the flow table group included in the switch, a service function name of each flow table group, and a flow in each flow table group. The indication of the table.
  • the transceiver unit is further configured to:
  • the processing unit After the processing unit stores the binding relationship between the to-be-bound flow table group and the controller, the processing unit receives the flow table group unbinding message sent by the controller, according to the flow table group binding message, The flow table group unbinding message carries the identifier information of the flow table group to be unbound;
  • the processing unit is further configured to delete the binding relationship between the to-be-unbound flow table group and the controller according to the identifier information of the to-be-unbound flow table group.
  • an embodiment of the present invention provides a controller, including:
  • the packet indication message is used to instruct the switch to group the at least one flow table
  • the controller is configured to establish a binding relationship with the flow table group to be bound, so that the controller manages the flow table group to be bound.
  • an embodiment of the present invention provides a switch, including:
  • a memory for storing instructions
  • a processor coupled to the memory and the transceiver, for executing instructions to execute the instructions Perform the following steps:
  • Each controller deploys a corresponding network application according to the service function corresponding to the bound flow table group, and does not need to be deployed in the controller.
  • the network function realizes the sharing of multiple service functions of the switch by multiple controllers, solves the bottleneck problem caused by the centralized deployment of the network functions of the controller, and realizes the multi-controller cooperative control switch.
  • FIG. 1 is a schematic diagram of an SDN network architecture in the background art of the present invention.
  • FIG. 2 is a schematic diagram of an SDN network architecture including an OF Controller and an OF Switch according to an embodiment of the present invention
  • FIG. 4 is a flow chart of an OF Controller based on a Pipeline to an OF Switch according to an embodiment of the present invention. The specific process of grouping;
  • FIG. 7 is a specific process of querying and deleting a flow table group in an OF Switch by an OF Controller according to an embodiment of the present invention
  • FIG. 8 is a specific process of binding and unbinding a flow table group in an OF switch by an OF Controller according to an embodiment of the present invention
  • FIG. 11 is a schematic structural diagram of an apparatus for managing a switch according to an embodiment of the present invention.
  • FIG. 12 is a second schematic structural diagram of an apparatus for managing a switch according to an embodiment of the present invention.
  • the OpenFlow protocol is a typical technology of an SDN network.
  • the network elements in the OpenFlow protocol include an OpenFlow controller (corresponding to the network controller in FIG. 1 and hereinafter referred to as OF Controller) and an OpenFlow switch (corresponding to the network device in FIG. 1 , hereinafter referred to as OF Switch).
  • OF Controller controls the flow table in the OF Switch by pre-specified interface operations, thereby achieving the purpose of controlling data forwarding.
  • the OF Controller is a control plane device in the SDN network architecture, and is responsible for determining the forwarding action of the service flow according to the packet characteristics, and delivering the corresponding flow rule to the OF Switch.
  • the OF Switch is a user plane device in the SDN network architecture. It is also called a forwarding plane device. It acquires and stores the flow rules from the OF Controller. The corresponding action is performed on the packets conforming to the flow rule, so that the packets are forwarded or processed. .
  • a method for managing a switch includes:
  • Step 300 The controller sends a packet indication message to the switch, where the packet indication message is used to instruct the switch to group at least one flow table.
  • Step 310 The controller determines the flow table group to be bound, and sends a flow table group binding message to the switch.
  • the flow table group binding message carries the identification information of the flow table group to be bound, and the flow table group binding message is used for control.
  • the device establishes a binding relationship with the flow table group to be bound, so that the controller manages the bound flow table group.
  • the controller first obtains the service flow information of the switch, and then parses the at least one flow table according to the preset execution sequence according to the business process information, and determines at least one service function included in the business process. Further, the controller divides the at least one flow table into at least one flow table group according to the at least one service function, and generates a group indication message.
  • the above business process is composed of at least one flow table having a preset execution order, as shown in FIG. 2 .
  • Business process information is used to describe each flow table that constitutes a business process, for example, the business performed by each flow table.
  • the packet indication message includes a flow table group identifier of each flow table group in at least one flow table group, a service function name of each flow table group, and indication information including a flow table in each flow table group.
  • the following is a specific process of the flow table grouping of the OF Switch by the OF Controller based on the Pipeline.
  • the OF Controller sends a packet indication message (OFPT_BP_MOD) to the OF Switch.
  • OFPT_BP_MOD packet indication message
  • the message includes the following parameters:
  • the value is OFPBP_INIT, indicating that the flow tables that make up the Pipeline are grouped;
  • Tg_id(table group identifier) the flow table group identifier
  • Bs_name(business service name) The name of the service function, which should be a common name in the service area, such as Forwarding, Charing, etc.
  • Table_numbers Number of flow tables assigned to the current flow table group.
  • the OF Switch groups at least one flow table group according to the group indication message to obtain at least one flow table group.
  • the flow table group identifier of each flow table group included in the packet indication message, the service function name of each flow table group, and the indication information of the flow table group in each flow table group are in the preset execution order. arrangement. Therefore, the OF switch sequentially parses the flow table group identifier of each flow table group in the at least one flow table group included in the packet indication message, the service function name of each flow table group, and each flow table group included according to the packet indication message.
  • the flow table indication information is that the flow group group is sequentially added in the order of the message list, and the corresponding flow table group identifier is assigned, and the flow table grouping order in the message list represents the position of the flow table group in the Pipeline, and then
  • the OF switch stores the flow table group identifier of each flow table group, the service function name of each flow table group, and the corresponding relationship between each flow table group and the flow table group.
  • the group indication message further includes an execution order position corresponding to each flow table group.
  • the OF switch groups the at least one flow table according to the group indication message according to the group indication message to obtain at least one flow table group, and sequentially stores the flow table group identifier of each flow table group, the service function name of each flow table group, and each The corresponding relationship between the flow table group and the flow table group in the flow table group.
  • the controller parses the at least one flow table according to the preset service execution order according to the service flow information, and determines that the service process includes a service function such as decapsulation and charging, and further, the controller performs charging according to the encapsulation.
  • the service function divides at least one flow table into corresponding flow table groups. Referring to FIG. 5, the grouping result is a decapsulated flow table group including Flow table0 and Flow table1, and a flow flow table group including Flow table 2 and Flow table 3. Etc., the controller generates a packet indication message.
  • the grouping indication information includes: command: the value is OFPBP_INIT;
  • the OF switch stores tg_id:1, bs_name:Decapsulation;table_numbers:2 according to the above message, that is, the service function of the flow table group 1 is decapsulated, including Flow table0 and Flow table1, that is, starting from the first Flow table in the Pipeline. And storing tg_id: 2, bs_name: Charging; table_numbers: 2, that is, the service function of the flow table group 2 is charging, including Flow table 2 and Flow table 3, that is, the first flow table remaining after the last flow table component group Start.
  • This step is an optional step where type is OFPET_BP_MOD_FAILED and code is the cause of the error.
  • code is the cause of the error.
  • the controller can also group the new flow table in the switch. Specifically, when at least one flow table is added to the service flow of the switch, the controller first obtains the description information corresponding to at least one newly added flow table. Then, at least one new service function included in the at least one newly added flow table is determined according to the description information corresponding to the at least one newly added flow table. Then, the controller divides the at least one newly added flow table into at least one new flow table group according to the at least one new service function, and generates a new group indication message.
  • the new grouping indication message includes the flow table group identifier of each new flow table group in the at least one new flow table group, the service function name of each newly added flow table group, and each new flow table group includes The indication information of the flow table and the execution order identifier of each newly added flow table group.
  • the controller The switch sends a new packet indication message, and the newly added packet indication message is used to instruct the switch to group at least one newly added flow table.
  • FIG. 6 takes FIG. 6 as an example to illustrate the specific process of the OF Controller to group the newly added flow table in the OF Switch.
  • the OF Controller sends a new packet indication message (OFPT_BP_MOD) to the OF Switch.
  • OFPT_BP_MOD a new packet indication message
  • the message includes the following parameters:
  • the value is OFPTG_ADD, indicating that a flow table group is added.
  • Tg_id Adds the flow table group ID of the flow table group.
  • Bs_name Name of the service function of the new flow table group.
  • Table_numbers The number of flow tables assigned to the current flow table group.
  • the OF Switch determines the flow table group identifier of each newly added flow table group in each of the at least one new flow table group, the service function name of each newly added flow table group, and each new flow table group according to the newly added group indication message. Correspondence with the flow table in the newly added flow table group, and the execution order of each new flow table group in the business process.
  • This step is an optional step where type is OFPET_TG_MOD_FAILED and code is the cause of the error.
  • the embodiment of the present invention further provides a specific method for deleting a flow table group and a query flow table group.
  • the controller may send a flow table group deletion message to the switch, where the flow table group deletion message carries the identification information of the flow table group to be deleted or deletes the indication information of all the flow table groups.
  • the switch receives the flow table group deletion message sent by the controller.
  • the switch deletes the flow table group identifier according to the flow table group, and identifies the flow table group of the flow table group to be deleted.
  • Delete the service function name of the flow table group delete the corresponding relationship between the flow table group to be deleted and the flow table in the flow table group.
  • the switch identifies the flow table group of each flow table group in each flow table group included in the switch according to the flow table group deletion message, and each flow The service function name of the table group, the corresponding relationship between each flow table group and the flow table group in the flow table group is deleted.
  • the controller sends a packet query message to the switch, where the packet query message carries the identifier information of the flow table group to be queried, and the controller receives the packet query response message sent by the switch, where the packet query response message includes the flow table to be queried.
  • the flow table group ID of the group, the service function name of the flow table group to be queried, and the flow table group to be queried contains the flow table indication information;
  • the controller sends a packet query message to the switch, where the packet query message carries the indication information of querying all the flow table groups, and the controller receives the packet query response message sent by the switch, where the packet query response message includes each of the flow table groups included in the switch.
  • the flow table group ID of the flow table group, the service function name of each flow table group, and each flow table group contains the flow table indication information.
  • the packet query response message further includes a binding state of the flow table group to be queried, wherein the binding state of the flow table group to be queried is used to indicate whether the flow table group to be queried has been bound; or the group query response message is further The binding state of each flow table group in all flow table groups is included, where the binding state of any flow table group is used to indicate whether the flow table group has been bound.
  • the flow table group query process may be performed by the controller grouping the flow table group, or the controller may group the newly added flow table, or the controller needs to delete the flow table group, or the controller binds or unbinds the flow table group. Set a variety of application scenarios before or after.
  • FIG. 7 takes FIG. 7 as an example to illustrate the specific process of the OF Controller querying and deleting the flow table group in the OF Switch.
  • the OF Controller sends a packet query message (OFPT_BP_REQUEST) to the OF Switch.
  • OFPT_BP_REQUEST a packet query message
  • the parameters included in the message are:
  • Is_used indicates whether the OF Controller is bound to the current flow table group, that is, the current flow table. Whether the group is bound.
  • the remaining parameters are the same as those in the packet indication message.
  • S701 The OF Controller sends a packet query message (OFPT_TG_REQUEST) to the OF Switch.
  • OFPT_TG_REQUEST a packet query message
  • Tg_id ID of the flow table group of the flow table group to be queried
  • the parameters included in the message are:
  • Is_used Indicates whether the OF Controller is bound to the flow table group to be queried, that is, whether the flow table group to be queried is bound.
  • the OF Controller sends a flow table group deletion message (OFPT_BP_MOD) to the OF Switch.
  • OFPT_BP_MOD flow table group deletion message
  • the parameters included in the message are:
  • the value is OFPBP_DEL, indicating that all relevant information based on Pipeline is cleared.
  • the OF Switch determines that the deletion of the flow table group is unsuccessful, and the OF Switch returns the flow table group deletion failure message (OFPT_ERROR_MSG) to the OF Controller, and the flow table group deletion failure message carries the flow table group deletion failure reason.
  • OFPT_ERROR_MSG flow table group deletion failure message
  • This step is an optional step where type is OFPET_BP_MOD_FAILED and code is the cause of the error.
  • S703 The OF Controller sends a flow table group deletion message (OFPT_TG_MOD) to the OF Switch.
  • OFPT_TG_MOD flow table group deletion message
  • the parameters included in the message are:
  • Tg_id ID of the flow table group to be deleted.
  • the OF Switch determines that the deletion of the flow table group is unsuccessful, and the OF Switch returns the flow table group deletion failure message (OFPT_ERROR_MSG) to the OF Controller, and the flow table group deletion failure message carries the flow table group deletion failure reason.
  • OFPT_ERROR_MSG flow table group deletion failure message
  • This step is an optional step where type is OFPET_TG_MOD_FAILED, code For the cause of the error.
  • the packet query message can be used to query the packet status and binding status of a flow table group, and can also be used to query the packet status and binding status of all flow tables in the switch.
  • the flow table group deletion message can be used. Delete the entire flow table grouping, or you can delete at least one of the flow table groups.
  • the controller selects a flow table group having a service function that matches its own service requirement as the flow table group to be bound.
  • the controller may determine, according to the binding state of the flow table group to be queried, that the flow table group to be queried has been When binding, determine the flow table group to be bound from the flow table group except the flow table group to be queried.
  • the controller determines the unbound flow table group according to the binding state of each flow table group in the entire flow table group, and determines the flow table group to be bound from the unbound flow table group.
  • the controller originally determines that the flow table group to be bound is the flow table group 1, but when the controller performs the flow table component group query before binding the flow table group 1, the controller queries the response message according to the packet feedback by the switch. If the flow table group 1 is bound, the controller can choose to continue to bind to the flow table group 1 to overwrite the previous binding relationship, or no longer bind to the flow table group 1, and select other flow table groups. As the flow table group to be bound.
  • the controller may perform unbinding on the bound flow table group. Specifically, the controller sends a flow table group unbinding message to the switch, and the flow table group unbinds the message carrying The identification information of the flow table group to be unbound.
  • FIG. 8 takes FIG. 8 as an example to illustrate the specific process of the OF Controller binding and unbinding the flow table group in the OF Switch.
  • the OF Controller sends a flow table group binding message (OFPT_TG_MOD) to the OF Switch.
  • OFPT_TG_MOD flow table group binding message
  • the parameters included in the message are:
  • the value is OFPTG_BIND, indicating that the current OF Controller is bound to a flow table group;
  • Tg_id Name of the flow table group to be bound to the flow table group.
  • the OF switch binds the flow table group binding message to the binding relationship between the flow table group to be bound and the OF Controller, and updates the binding state of the flow table group to be bound to be bound.
  • This step is an optional step where type is OFPET_TG_MOD_FAILED and code is the cause of the error.
  • the OF Controller sends a flow table group unbinding message (OFPT_TG_MOD) to the OF Switch.
  • OFPT_TG_MOD flow table group unbinding message
  • the parameters included in the message are:
  • the value is OFPTG_UNBIND, indicating that the current OF Controller unbinds a flow table group.
  • Tg_id Name of the flow table group to be unbound to the flow table group.
  • This step is an optional step where type is OFPET_TG_MOD_FAILED and code is the cause of the error.
  • the OF switch unbinds the packet according to the flow table group, deletes the binding relationship between the unbind flow table group and the OF Controller, and updates the binding state of the unbind flow table group to be unbound.
  • the controller can implement the management and control of the binding flow table group, and carry the flow table group identification information to be bound in the delivered message.
  • the controller may also configure a logical ID for each flow table in the flow table group that is bound to itself, that is, re-number the flow table included in each flow table group.
  • the controller may also add control instructions for the flow table group, for example, Goto_TG, the flow table group identifier carrying the flow table group to be processed, indicated by tg_id, and the Goto_TG message may be used to indicate the next flow table group to be processed. For example, in FIG.
  • Controller1 may send an identifier of Goto_TG carrying flow table group 4 (TG4) for indicating which data packets in the data packet processed by flow table group 2 (TG2) may not enter flow table group 3 (TG3). ), and directly into the flow table group 4 (TG4).
  • TG4 Goto_TG carrying flow table group 4
  • the embodiment of the present invention further proposes that the configuration mode, that is, OF Config, Pipeline-based management is implemented.
  • the controller can divide each flow table that constitutes a service flow into at least one logical switch by using a configuration mode (for example, OF Config).
  • a configuration mode for example, OF Config
  • the logical switch is physically composed of at least one flow table in the switch, and can be logically regarded as a single switch.
  • the controller divides each flow table constituting the business process into at least one logical switch, which is completed through a configuration port, and the controller sends a packet indication message to the switch through the service port.
  • an apparatus for managing a switch includes:
  • the transceiver unit 1101 is configured to send, to the switch, a packet indication message, where the packet indication message is used to instruct the switch to group the at least one flow table.
  • the identifier information of each flow table group includes a flow table group identifier of the flow table group and/or a service function name of the flow table group.
  • processing unit 1102 is further configured to:
  • the transceiver unit 1101 is further configured to:
  • the packet query response message further includes a binding state of the to-be-queried flow table group, where a binding state of the to-be-queried flow table group is used to indicate the to-be-queried flow Whether the table group has been bound; or the group query response message further includes a binding state of each flow table group in the entire flow table group, wherein a binding state of any flow table group is used to indicate the flow Table group Whether it has been bound;
  • the flow table group binding message before the sending, by the transceiver unit 1101, the flow table group binding message to the switch, determining, according to the binding state of each flow table group in the entire flow table group, determining the unbound flow table group. And determining, from the unbound flow table group, the flow table group to be bound.
  • the transceiver unit 1101 is further configured to:
  • the transceiver unit 1101 is further configured to:
  • the flow table group unbinding message is sent to the switch, where the flow table group unbinding message carries the to-be-bound data table group to be unbound. Identification information.
  • an apparatus for managing a switch includes:
  • the transceiver unit 1201 is configured to receive a packet indication message sent by the controller, where the packet indication message is used to instruct the device to group the at least one flow table.
  • the processing unit 1202 is configured to group the at least one flow table according to the packet indication message to obtain at least one flow table group;
  • the transceiver unit 1201 is configured to receive a flow table group binding message that is sent by the controller, where the flow table group binding message carries the identifier information of the flow table group to be bound, and the flow table group binding message is used by Establishing a binding relationship between the controller and the flow table group to be bound, so that the controller manages the flow table group to be bound;
  • the processing unit 1202 is configured to store, according to the flow table group binding message, a binding relationship between the to-be-bound flow table group and the controller.
  • the identifier information of each flow table group includes a flow table group identifier of the flow table group and/or a service function name of the flow table group.
  • the packet indication message includes a flow table group identifier of each flow table group in the at least one flow table group, a service function name of each flow table group, and each flow table group Contains instructions for the flow table;
  • the processing unit 1202 is specifically configured to:
  • the transceiver unit 1201 is further configured to: when a service flow of the device adds at least one flow table, receive a new packet indication message sent by the controller, where the new The grouping indication message includes a flow table group identifier of each newly added flow table group in the at least one newly added flow table group, a service function name of each newly added flow table group, and a flow included in each newly added flow table group.
  • the processing unit 1202 is further configured to: determine, according to the newly added grouping indication message, a flow table group identifier of each newly added flow table group in the at least one newly added flow table group, and each newly added flow table group The business function name, the correspondence between each newly added flow table group and the flow table in the newly added flow table group, and the execution order of each newly added flow table group in the business process.
  • the transceiver unit 1201 is further configured to: receive a flow table group deletion message sent by the controller, where the flow table group deletion message carries identifier information of the flow table group to be deleted;
  • the processing unit 1202 is further configured to: identify, according to the flow table group deletion message, a flow table group of the to-be-deleted flow table group, a service function name of the to-be-delete flow table group, and the to-be-delete flow table The corresponding relationship between the group and the flow table in the flow table group is deleted.
  • the transceiver unit 1201 is further configured to: receive a flow table group deletion message sent by the controller, where the flow table group deletion message carries indication information for deleting all flow table groups; the processing unit 1202.
  • the method further includes: identifying, according to the flow table group deletion message, a flow table group identifier of each flow table group in all flow table groups included in the switch, a service function name of each flow table group, and each flow The correspondence between the table group and the flow table in the flow table group is deleted.
  • the transceiver unit 1201 is further configured to: receive a packet query message sent by the controller, where the packet query message carries identifier information of a flow table group to be queried; to the controller Sending a packet query response message, where the packet query response message includes a flow table group identifier of the flow table group to be queried, a service function name of the flow table group to be queried, and a flow table group in the to-be-queried flow table group Indication information;
  • the transceiver unit 1201 is further configured to receive a packet query message sent by the controller, where the packet query message carries indication information for querying all flow table groups, and sends a packet query response message to the controller, where
  • the packet query response message includes a flow table group identifier of each flow table group in the flow table group included in the switch, a service function name of each flow table group, and each flow table group includes indication information of the flow table.
  • the packet query response message further includes a binding state of the to-be-queried flow table group, where a binding state of the to-be-queried flow table group is used to indicate the to-be-queried flow Whether the table group has been bound; or the group query response message further includes a binding state of each flow table group in the entire flow table group, wherein a binding state of any flow table group is used to indicate the flow Whether the table group has been bound.
  • the processing unit 1202 is further configured to delete the binding relationship between the to-be-unbound flow table group and the controller according to the identifier information of the to-be-unbound flow table group.
  • the embodiment of the present invention further provides a controller, which is a physical device of the device shown in FIG. 11. Therefore, the implementation manner of the controller provided by the embodiment of the present invention can be referred to the embodiment shown in FIG. The repetitions are not repeated here.
  • an embodiment of the present invention provides a controller, including:
  • the processor 1302 is respectively connected to the memory 1303 and the transceiver 1301 for executing an instruction to perform the following steps when executing the instruction:
  • the packet indication message is used to instruct the switch to group the at least one flow table
  • an embodiment of the present invention provides a switch, including:
  • the processor 1402 is respectively connected to the memory 1403 and the transceiver 1401 for executing instructions to perform the following steps when executing the instructions:
  • the embodiment of the present invention further provides an extension of other related commands, including: the control instruction issued by the controller needs to include the flow table group identifier of the flow table group, the controller operates the corresponding flow table according to the logical id of the flow table, and adds Goto. - TG command format, etc., to achieve flexible and efficient management and control of the flow table group.
  • the embodiment of the present invention also proposes to implement management of each flow table in the switch for the multi-service controller by using the configuration mode (ie, OF Config), and the switch directly performs flow table grouping, query, delete, binding, and cancellation according to the configuration information. Bind the logical switch.
  • the method provided by the embodiment of the present invention can implement the isolation and sequence arrangement of different service functions based on the flow table grouping, and ensure that the corresponding service functions of different control network elements (ie, controllers) are executed in order.
  • the embodiment of the invention provides control and management of the switch by multiple controllers based on the OpenFlow protocol and the OF Config mode, thereby ensuring the flexibility of the programmable forwarding plane.
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种管理交换机的方法,该方法包括:控制器向交换机发送分组指示消息,分组指示消息用于指示交换机对至少一个流表进行分组;控制器确定待绑定流表组,向交换机发送流表组绑定消息,流表组绑定消息携带待绑定流表组的标识信息,流表组绑定消息用于使控制器与待绑定流表组建立绑定关系,以使控制器对待绑定流表组进行管理。因此,多个控制器可以分别与交换机中各个流表组建立绑定关系,实现了多控制器对交换机中多种业务功能的分担,解决控制器因网络功能集中部署造成的瓶颈问题,实现多控制器协作控制交换机。

Description

一种管理交换机的方法及装置 技术领域
本发明涉及网络技术领域,特别是涉及一种管理交换机的方法及装置。
背景技术
在当前的网络中,存在众多复杂的网络设备,如路由器、网关、交换机、防火墙和各类服务器等。这些设备分别支持各种不同的标准协议,具有各自独立的控制模块,因此这种分布式的控制模式导致网络部署管理非常复杂。为了实施某个控制功能的升级或者参数修改,网络操作员可能需要对每台设备进行单独地操作。
为了实现网元的部署灵活性和可管理性,业界提出了软件定义网络(Software Defined Networking,SDN)的概念。SDN将网元的控制逻辑和转发功能解耦,分为控制面设备和转发面设备,实现将控制逻辑进行集中部署,对网络的控制和维护能够简单地通过集中部署的控制面设备实现,从而提高网络的管理效率,同时也使转发面设备更为简单化和通用化,有利于实现转发面设备的高性能和可重用性。目前,SDN的思想正在被广泛地应用到数据中心网络和电信网络中。
具体的,参阅图1所示,网络设备(Network Device),又称交换机,为转发面设备,用于执行转发面的报文传输。网络控制器(Network Controller),又称控制器,为控制面设备,用于通过控制信道对交换机进行配置和管理。网络应用(Application)用于实现各种网络功能,包括路由控制、隧道封装、防火墙、安全接入、QoS控制等。
现有技术中,交换机要实现的功能都需通过控制器上的网络应用进行配置,如果交换机需要实现复杂的网络功能,如路由控制、隧道封装、防火墙、安全接入、QoS控制等,那么就需要在控制器上安装多种网络应用。这种网络功能的集中部署方式,一方面会给控制器带来极大的运行开销,容易造成控 制面的瓶颈;另一方面,当网络需要进行设备扩容或者功能扩展时,只能采用累积叠加的方式,控制器上的网络应用会越来越庞大,可能造成运行的稳定性与可靠性问题。
发明内容
本发明实施例提供一种管理交换机的方法及装置,用以解决控制器因网络功能集中部署造成的瓶颈问题,实现多控制器协作控制交换机。
本发明实施例提供的具体技术方案如下:
第一方面,一种管理交换机的方法,包括:
控制器向交换机发送分组指示消息,所述分组指示消息用于指示所述交换机对至少一个流表进行分组;
所述控制器确定待绑定流表组,向所述交换机发送流表组绑定消息,所述流表组绑定消息携带所述待绑定流表组的标识信息,所述流表组绑定消息用于使所述控制器与所述待绑定流表组建立绑定关系,以使所述控制器对所述待绑定流表组进行管理。
在一种可能的实现方式中,每个流表组的标识信息包括该流表组的流表组标识和/或该流表组的业务功能名称。
在一种可能的实现方式中,还包括:
所述控制器获取所述交换机的业务流程信息,所述业务流程由具有预设执行顺序的至少一个流表构成,所述业务流程信息用于描述所述至少一个流表;
所述控制器根据所述业务流程信息,按照所述预设执行顺序解析所述至少一个流表,确定所述业务流程包含的至少一种业务功能;
所述控制器根据所述至少一种业务功能将所述至少一个流表划分为至少一个流表组,并生成分组指示消息;
其中,所述分组指示消息包括所述至少一个流表组中每个流表组的流表组标识、每个流表组的业务功能名称以及每个流表组中包含流表的指示信息。
因此,采用本发明实施例提供的方法能够实现对交换机中的流表进行分组,以实现对交换机中业务流程的有效管理。
在一种可能的实现方式中,还包括:
当所述交换机的业务流程新增至少一个流表时,所述控制器获取至少一个新增流表分别对应的描述信息;
所述控制器根据所述至少一个新增流表分别对应的描述信息,确定所述至少一个新增流表包含的至少一种新增业务功能;
所述控制器根据所述至少一种新增业务功能将所述至少一个新增流表划分为至少一个新增流表组,并生成新增分组指示消息,所述新增分组指示消息包括所述至少一个新增流表组中每个新增流表组的流表组标识、每个新增流表组的业务功能名称、每个新增流表组中包含流表的指示信息、每个新增流表组的执行顺序标识;
所述控制器向所述交换机发送所述新增分组指示消息,所述新增分组指示消息用于指示所述交换机对所述至少一个新增流表进行分组。
因此,采用本发明实施例提供的方法还能够对交换机中的新增的流表进行分组,以实现对交换机中业务流程的有效管理。
在一种可能的实现方式中,还包括:
所述控制器向所述交换机发送流表组删除消息,所述流表组删除消息携带待删除流表组的标识信息或删除全部流表组的指示信息。
因此,采用本发明实施例提供的方法能够实现对交换机中的流表组全部删除和部分删除操作,以实现对交换机中业务流程的有效管理。
在一种可能的实现方式中,还包括:
所述控制器向所述交换机发送分组查询消息,所述分组查询消息携带待查询流表组的标识信息;所述控制器接收所述交换机发送的分组查询响应消息,所述分组查询响应消息包括所述待查询流表组的流表组标识,所述待查询流表组的业务功能名称,所述待查询流表组中包含流表的指示信息;
或者,所述控制器向所述交换机发送分组查询消息,所述分组查询消息 携带查询全部流表组的指示信息;所述控制器接收所述交换机发送的分组查询响应消息,所述分组查询响应消息包括所述交换机包含的全部流表组中每个流表组的流表组标识,每个流表组的业务功能名称,每个流表组中包含流表的指示信息。
因此,采用本发明实施例提供的方法能够实现对交换机中的流表组进行全面查询和部分查询,以实现对交换机中业务流程的有效管理。
在一种可能的实现方式中,所述分组查询响应消息还包括所述待查询流表组的绑定状态,其中,所述待查询流表组的绑定状态用于指示所述待查询流表组是否已被绑定;或者,所述分组查询响应消息还包括所述全部流表组中每个流表组的绑定状态,其中,任一流表组的绑定状态用于指示该流表组是否已被绑定;
在所述控制器向所述交换机发送流表组绑定消息之前,还包括:
所述控制器根据所述待查询流表组的绑定状态,确定所述待查询流表组已被绑定时,从除所述待查询流表组外的流表组中确定待绑定流表组;
或者,所述控制器根据所述全部流表组中每个流表组的绑定状态,确定未被绑定的流表组,并从所述未被绑定的流表组中确定待绑定流表组。
因此,采用本发明实施例提供的方法能够利用分组查询响应消息中携带的绑定状态确定待绑定流表组,以实现对交换机中业务流程的有效管理。
在一种可能的实现方式中,在所述控制器向所述交换机发送流表组绑定消息后,还包括:
所述控制器向所述交换机发送控制指令,所述控制指令携带已被所述控制器绑定的流表组的标识信息。
因此,采用本发明实施例提供的方法能够实现对交换机中的流表组直接发送控制指令,以实现对交换机中业务流程的有效控制。
在一种可能的实现方式中,在所述控制器向所述交换机发送流表组绑定消息后,还包括:
所述控制器向所述交换机发送流表组取消绑定消息,所述流表组取消绑 定消息携带待取消绑定流表组的标识信息。
因此,采用本发明实施例提供的方法还能够实现对交换机中的已绑定流表组解除绑定关系,以实现对交换机中业务流程的有效管理。
第二方面,一种管理交换机的方法,包括:
交换机接收控制器发送的分组指示消息,所述分组指示消息用于指示所述交换机对至少一个流表进行分组;
所述交换机根据所述分组指示消息对所述至少一个流表分组得到至少一个流表组;
所述交换机接收所述控制器发送的流表组绑定消息,所述流表组绑定消息携带待绑定流表组的标识信息,所述流表组绑定消息用于使所述控制器与所述待绑定流表组建立绑定关系,以使所述控制器对所述待绑定流表组进行管理;
所述交换机根据所述流表组绑定消息,存储所述待绑定流表组与所述控制器的绑定关系。
在一种可能的实现方式中,每个流表组的标识信息包括该流表组的流表组标识和/或该流表组的业务功能名称。
在一种可能的实现方式中,所述分组指示消息包括所述至少一个流表组中每个流表组的流表组标识、每个流表组的业务功能名称以及每个流表组中包含流表的指示信息;
所述交换机根据所述分组指示消息对所述至少一个流表分组得到至少一个流表组,包括:
所述交换机根据所述分组指示消息,确定所述至少一个流表组中每个流表组的流表组标识、每个流表组的业务功能名称以及每个流表组与该流表组中包含流表的对应关系。
在一种可能的实现方式中,还包括:
当所述交换机的业务流程新增至少一个流表时,所述交换机接收所述控制器发送的新增分组指示消息,所述新增分组指示消息包括所述至少一个新 增流表组中每个新增流表组的流表组标识、每个新增流表组的业务功能名称、每个新增流表组中包含流表的指示信息、每个新增流表组的执行顺序标识,所述新增分组指示消息用于指示所述交换机对所述至少一个新增流表进行分组;
所述交换机根据所述新增分组指示消息,确定所述至少一个新增流表组中每个新增流表组的流表组标识、每个新增流表组的业务功能名称、每个新增流表组与该新增流表组中包含流表的对应关系,以及每个新增流表组在所述业务流程中的执行顺序。
在一种可能的实现方式中,还包括:
所述交换机接收所述控制器发送的流表组删除消息,所述流表组删除消息携带待删除流表组的标识信息;所述交换机根据所述流表组删除消息,将所述待删除流表组的流表组标识,所述待删除流表组的业务功能名称、所述待删除流表组与该流表组中包含流表的对应关系删除;
或者,所述交换机接收所述控制器发送的流表组删除消息,所述流表组删除消息携带删除全部流表组的指示信息;所述交换机根据所述流表组删除消息,将所述交换机包含的全部流表组中每个流表组的流表组标识,每个流表组的业务功能名称、每个流表组与该流表组中包含流表的对应关系删除。
在一种可能的实现方式中,还包括:
所述交换机接收所述控制器发送的分组查询消息,所述分组查询消息携带待查询流表组的标识信息;所述交换机向所述控制器发送分组查询响应消息,所述分组查询响应消息包括所述待查询流表组的流表组标识,所述待查询流表组的业务功能名称,所述待查询流表组中包含流表的指示信息;
或者,所述交换机接收所述控制器发送的分组查询消息,所述分组查询消息携带查询全部流表组的指示信息;所述交换机向所述控制器发送分组查询响应消息,所述分组查询响应消息包括所述交换机包含的全部流表组中每个流表组的流表组标识,每个流表组的业务功能名称,每个流表组中包含流表的指示信息。
在一种可能的实现方式中,所述分组查询响应消息还包括所述待查询流表组的绑定状态,其中,所述待查询流表组的绑定状态用于指示所述待查询流表组是否已被绑定;或者,所述分组查询响应消息还包括所述全部流表组中每个流表组的绑定状态,其中,任一流表组的绑定状态用于指示该流表组是否已被绑定。
在一种可能的实现方式中,在所述交换机根据所述流表组绑定消息,存储所述待绑定流表组与所述控制器的绑定关系之后,还包括:
所述交换机接收所述控制器发送的流表组取消绑定消息,所述流表组取消绑定消息携带待取消绑定流表组的标识信息;
所述交换机根据所述待取消绑定流表组的标识信息,删除所述待取消绑定流表组与所述控制器的绑定关系。
此外,控制器能够实现对绑定流表组的管理和控制,在下发的消息中携带待绑定流表组标识信息。控制器还可以对自身已绑定的流表组中的各个流表配置逻辑ID,即对每个流表组的包括的流表重新进行编号。控制器还可增加针对流表组的控制指令,携带待处理流表组的流表组标识。此外,本发明实施例还提出通过配置方式,即OF Config,实现基于Pipeline的管理,具体的,对于不支持流表组的交换机,控制器可以通过配置方式将构成业务流程的各个流表划分为至少一个逻辑交换机。须知,逻辑交换机在物理上是由交换机中的至少一个流表构成,逻辑上可以看作一个单独的交换机。控制器将构成业务流程的各个流表划分为至少一个逻辑交换机是通过配置端口完成的,而控制器向交换机发送分组指示消息是通过业务端口完成的。此外,对于不支持流表组的交换机,还可通过配置方式实现对逻辑交换机进行绑定和取消绑定,以及新增逻辑交换机和删除逻辑交换机。
第三方面,一种管理交换机的装置,包括:
收发单元,用于向交换机发送分组指示消息,所述分组指示消息用于指示所述交换机对至少一个流表进行分组;
处理单元,用于确定待绑定流表组,通过所述收发单元所述向所述交换 机发送流表组绑定消息,所述流表组绑定消息携带所述待绑定流表组的标识信息,所述流表组绑定消息用于使所述装置与所述待绑定流表组建立绑定关系,以使所述装置对所述待绑定流表组进行管理。
在一种可能的实现方式中,每个流表组的标识信息包括该流表组的流表组标识和/或该流表组的业务功能名称。
在一种可能的实现方式中,所述处理单元,还用于:
获取所述交换机的业务流程信息,所述业务流程由具有预设执行顺序的至少一个流表构成,所述业务流程信息用于描述所述至少一个流表;
根据所述业务流程信息,按照所述预设执行顺序解析所述至少一个流表,确定所述业务流程包含的至少一种业务功能;
根据所述至少一种业务功能将所述至少一个流表划分为至少一个流表组,并生成分组指示消息;
其中,所述分组指示消息包括所述至少一个流表组中每个流表组的流表组标识、每个流表组的业务功能名称以及每个流表组中包含流表的指示信息。
在一种可能的实现方式中,所述处理单元,还用于:
当所述交换机的业务流程新增至少一个流表时,获取至少一个新增流表分别对应的描述信息;
根据所述至少一个新增流表分别对应的描述信息,确定所述至少一个新增流表包含的至少一种新增业务功能;
根据所述至少一种新增业务功能将所述至少一个新增流表划分为至少一个新增流表组,并生成新增分组指示消息,所述新增分组指示消息包括所述至少一个新增流表组中每个新增流表组的流表组标识、每个新增流表组的业务功能名称、每个新增流表组中包含流表的指示信息、每个新增流表组的执行顺序标识;
通过所述收发单元向所述交换机发送所述新增分组指示消息,所述新增分组指示消息用于指示所述交换机对所述至少一个新增流表进行分组。
在一种可能的实现方式中,所述收发单元,还用于:
向所述交换机发送流表组删除消息,所述流表组删除消息携带待删除流表组的标识信息或删除全部流表组的指示信息。
在一种可能的实现方式中,所述收发单元,还用于:
向所述交换机发送分组查询消息,所述分组查询消息携带待查询流表组的标识信息;接收所述交换机发送的分组查询响应消息,所述分组查询响应消息包括所述待查询流表组的流表组标识,所述待查询流表组的业务功能名称,所述待查询流表组中包含流表的指示信息;
或者,向所述交换机发送分组查询消息,所述分组查询消息携带查询全部流表组的指示信息;接收所述交换机发送的分组查询响应消息,所述分组查询响应消息包括所述交换机包含的全部流表组中每个流表组的流表组标识,每个流表组的业务功能名称,每个流表组中包含流表的指示信息。
在一种可能的实现方式中,所述分组查询响应消息还包括所述待查询流表组的绑定状态,其中,所述待查询流表组的绑定状态用于指示所述待查询流表组是否已被绑定;或者,所述分组查询响应消息还包括所述全部流表组中每个流表组的绑定状态,其中,任一流表组的绑定状态用于指示该流表组是否已被绑定;
所述处理单元,还用于:
在通过所述收发单元向所述交换机发送流表组绑定消息之前,根据所述待查询流表组的绑定状态,确定所述待查询流表组已被绑定时,从除所述待查询流表组外的流表组中确定待绑定流表组;
或者,在通过所述收发单元向所述交换机发送流表组绑定消息之前,根据所述全部流表组中每个流表组的绑定状态,确定未被绑定的流表组,并从所述未被绑定的流表组中确定待绑定流表组。
在一种可能的实现方式中,所述收发单元,还用于:
在通过所述收发单元向所述交换机发送流表组绑定消息后,向所述交换机发送控制指令,所述控制指令携带已被所述控制器绑定的流表组的标识信息。
在一种可能的实现方式中,所述收发单元,还用于:
在通过所述收发单元向所述交换机发送流表组绑定消息后,向所述交换机发送流表组取消绑定消息,所述流表组取消绑定消息携带待取消绑定流表组的标识信息。
第四方面,一种管理交换机的装置,包括:
收发单元,用于接收控制器发送的分组指示消息,所述分组指示消息用于指示所述装置对至少一个流表进行分组;
处理单元,用于根据所述分组指示消息对所述至少一个流表分组得到至少一个流表组;
所述收发单元,用于接收所述控制器发送的流表组绑定消息,所述流表组绑定消息携带待绑定流表组的标识信息,所述流表组绑定消息用于使所述控制器与所述待绑定流表组建立绑定关系,以使所述控制器对所述待绑定流表组进行管理;
所述处理单元,用于根据所述流表组绑定消息,存储所述待绑定流表组与所述控制器的绑定关系。
在一种可能的实现方式中,每个流表组的标识信息包括该流表组的流表组标识和/或该流表组的业务功能名称。
在一种可能的实现方式中,所述分组指示消息包括所述至少一个流表组中每个流表组的流表组标识、每个流表组的业务功能名称以及每个流表组中包含流表的指示信息;
所述处理单元,具体用于:
根据所述分组指示消息对所述至少一个流表分组得到至少一个流表组时,根据所述分组指示消息,确定所述至少一个流表组中每个流表组的流表组标识、每个流表组的业务功能名称以及每个流表组与该流表组中包含流表的对应关系。
在一种可能的实现方式中,所述收发单元,还用于:当所述装置的业务流程新增至少一个流表时,接收所述控制器发送的新增分组指示消息,所述 新增分组指示消息包括所述至少一个新增流表组中每个新增流表组的流表组标识、每个新增流表组的业务功能名称、每个新增流表组中包含流表的指示信息、每个新增流表组的执行顺序标识,所述新增分组指示消息用于指示所述交换机对所述至少一个新增流表进行分组;
所述处理单元,还用于:根据所述新增分组指示消息,确定所述至少一个新增流表组中每个新增流表组的流表组标识、每个新增流表组的业务功能名称、每个新增流表组与该新增流表组中包含流表的对应关系,以及每个新增流表组在所述业务流程中的执行顺序。
在一种可能的实现方式中,所述收发单元,还用于:接收所述控制器发送的流表组删除消息,所述流表组删除消息携带待删除流表组的标识信息;所述处理单元,还用于:根据所述流表组删除消息,将所述待删除流表组的流表组标识,所述待删除流表组的业务功能名称、所述待删除流表组与该流表组中包含流表的对应关系删除;
或者,所述收发单元,还用于:接收所述控制器发送的流表组删除消息,所述流表组删除消息携带删除全部流表组的指示信息;所述处理单元,还用于:根据所述流表组删除消息,将所述交换机包含的全部流表组中每个流表组的流表组标识,每个流表组的业务功能名称、每个流表组与该流表组中包含流表的对应关系删除。
在一种可能的实现方式中,所述收发单元,还用于:接收所述控制器发送的分组查询消息,所述分组查询消息携带待查询流表组的标识信息;向所述控制器发送分组查询响应消息,所述分组查询响应消息包括所述待查询流表组的流表组标识,所述待查询流表组的业务功能名称,所述待查询流表组中包含流表的指示信息;
或者,所述收发单元,还用于接收所述控制器发送的分组查询消息,所述分组查询消息携带查询全部流表组的指示信息;向所述控制器发送分组查询响应消息,所述分组查询响应消息包括所述交换机包含的全部流表组中每个流表组的流表组标识,每个流表组的业务功能名称,每个流表组中包含流 表的指示信息。
在一种可能的实现方式中,所述分组查询响应消息还包括所述待查询流表组的绑定状态,其中,所述待查询流表组的绑定状态用于指示所述待查询流表组是否已被绑定;或者,所述分组查询响应消息还包括所述全部流表组中每个流表组的绑定状态,其中,任一流表组的绑定状态用于指示该流表组是否已被绑定。
在一种可能的实现方式中,所述收发单元,还用于:
在所述处理单元根据所述流表组绑定消息,存储所述待绑定流表组与所述控制器的绑定关系之后,接收所述控制器发送的流表组取消绑定消息,所述流表组取消绑定消息携带待取消绑定流表组的标识信息;
所述处理单元,还用于根据所述待取消绑定流表组的标识信息,删除所述待取消绑定流表组与所述控制器的绑定关系。
第五方面,本发明实施例提供一种控制器,包括:
收发器;
存储器,用于存储指令;和
处理器,与存储器和收发器分别相连,用于执行指令,以在执行指令时执行如下步骤:
向交换机发送分组指示消息,所述分组指示消息用于指示所述交换机对至少一个流表进行分组;
确定待绑定流表组,向所述交换机发送流表组绑定消息,所述流表组绑定消息携带所述待绑定流表组的标识信息,所述流表组绑定消息用于使所述控制器与所述待绑定流表组建立绑定关系,以使所述控制器对所述待绑定流表组进行管理。
第六方面,本发明实施例提供一种交换机,包括:
收发器;
存储器,用于存储指令;和
处理器,与存储器和收发器分别相连,用于执行指令,以在执行指令时 执行如下步骤:
接收控制器发送的分组指示消息,所述分组指示消息用于指示所述交换机对至少一个流表进行分组;
根据所述分组指示消息对所述至少一个流表分组得到至少一个流表组;
接收所述控制器发送的流表组绑定消息,所述流表组绑定消息携带待绑定流表组的标识信息,所述流表组绑定消息用于使所述控制器与所述待绑定流表组建立绑定关系,以使所述控制器对所述待绑定流表组进行管理;
根据所述流表组绑定消息,存储所述待绑定流表组与所述控制器的绑定关系。
本发明实施例的有益效果如下:
本发明实施例中控制器向交换机发送分组指示消息,分组指示消息用于指示交换机对至少一个流表进行分组,即控制器实现对交换机中构成业务流程的各个流表进行分组,控制器根据分组指示消息确定待绑定流表组的标识信息,向交换机发送流表组绑定消息,流表组绑定消息携带待绑定流表组的标识信息,流表组绑定消息用于使控制器与待绑定流表组建立绑定关系,以使控制器对待绑定流表组进行管理。因此,多个控制器可以分别与交换机中各个流表组建立绑定关系,每个控制器根据绑定的流表组对应的业务功能部署相应的网络应用,无需再在控制器中集中部署多个网络功能,进而实现了多控制器对交换机中多种业务功能的分担,解决控制器因网络功能集中部署造成的瓶颈问题,实现多控制器协作控制交换机。
附图说明
图1为本发明背景技术中SDN网络架构示意图;
图2为本发明实施例中包含OF Controller和OF Switch的SDN网络架构示意图;
图3为本发明实施例中管理交换机概述流程图;
图4为本发明实施例中OF Controller基于Pipeline对OF Switch进行流表 分组的具体流程;
图5为本发明实施例中OF Controller基于Pipeline对OF Switch进行流表分组的示意图;
图6为本发明实施例中OF Controller对OF Switch中的新增流表进行分组的具体流程;
图7为本发明实施例中OF Controller对OF Switch中的流表组进行查询和删除的具体流程;
图8为本发明实施例中OF Controller对OF Switch中的流表组进行绑定和解除绑定的具体流程;
图9为本发明实施例中控制器对绑定流表组的管理和控制的示意图;
图10为本发明实施例中通过配置方式实现基于Pipeline的管理的示意图;
图11为本发明实施例中管理交换机的装置结构示意图之一;
图12为本发明实施例中管理交换机的装置结构示意图之二;
图13为本发明实施例中控制器的结构示意图;
图14为本发明实施例中交换机的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
本发明实施例提供一种管理交换机的方法及装置,用以解决控制器因网络功能集中部署造成的瓶颈问题,实现多控制器协作控制交换机。其中,方法和装置是基于同一发明构思的,由于方法及装置解决问题的原理相似,因此装置与方法的实施可以相互参见,重复之处不再赘述。
首先对本发明实施例涉及的应用场景做简单介绍。
现有技术中,OpenFlow协议是SDN网络的一种典型技术。OpenFlow协议中的网元包括OpenFlow控制器(对应中图1中的网络控制器,以下简称OF Controller)和OpenFlow交换机(对应图1中的网络设备,以下简称OF Switch)。其中,OF Controller通过事先规定好的接口操作来控制OF Switch中的流表,从而达到控制数据转发的目的。
参阅图2所示,在SDN网络中,OF Controller是SDN网络架构中的控制面设备,负责根据报文特征确定业务流的转发动作,并将对应的流规则下发给OF Switch。OF Switch是SDN网络架构中的用户面设备,又叫转发面设备,它从OF Controller获取并存储流规则,对于符合该流规则的报文,执行对应的动作,从而实现报文的转发或处理。
在一个OF Switch内部,OF Controller可以通过通道来配置和管理OF Switch,一个OF Switch可以有多个通道,可以同时连接到多个OF Controller,如图2所示。
因此,要实现多个OF Controller分别承担不同的业务功能,通过分布式协同实现对OF Switch的共享控制,就需要解决以下两个问题:
1)如何保证业务功能的执行顺序?
2)如何有效地避免多个OF Controller的控制冲突?
下面结合附图对本发明优选的实施方式进行详细说明。
参阅图3所示,一种管理交换机的方法,包括:
步骤300:控制器向交换机发送分组指示消息,分组指示消息用于指示交换机对至少一个流表进行分组。
步骤310:控制器确定待绑定流表组,向交换机发送流表组绑定消息,流表组绑定消息携带待绑定流表组的标识信息,流表组绑定消息用于使控制器与待绑定流表组建立绑定关系,以使控制器对待绑定流表组进行管理。
每个流表组的标识信息包括该流表组的流表组标识和/或该流表组的业务功能名称。因此,待绑定流表组的标识信息可以为该流表组的流表组标识和/或该流表组的业务功能名称。
可选地,针对步骤300,控制器首先获取交换机的业务流程信息,然后,根据业务流程信息,按照预设执行顺序解析至少一个流表,确定业务流程包含的至少一种业务功能。进一步地,控制器根据至少一种业务功能将至少一个流表划分为至少一个流表组,并生成分组指示消息。
具体的,在控制器对交换机进行初始化时,控制器可直接下发整个业务流程,即Pipeline,此时,控制器已知交换机的业务流程信息。或者,该交换机对应的Pipeline不是由当前控制器下发时,则需通过查询等方法获取该交换机的业务流程信息。
例如,OF Controller 1直接下发Pipeline至OF Switch1,当OF Controller 1需要对OF Switch1发送分组指示消息时,OF Controller 1已知OF Switch1的Pipeline信息,而当OF Controller 2需要对OF Switch1发送分组指示消息时,则需先向OF Switch1查询OF Switch1的Pipeline信息。
上述业务流程是由具有预设执行顺序的至少一个流表(Flow table)构成,如图2所示。业务流程信息用于描述构成业务流程的每个流表,例如,每个流表执行的业务。
上述分组指示消息包括至少一个流表组中每个流表组的流表组标识、每个流表组的业务功能名称以及每个流表组中包含流表的指示信息。
这里的每个流表组中包含流表的指示信息可以为流表组中包含的每个流表的标识,或者按照预设执行顺序分配至该流表组的流表数目。
下面以图4为例说明OF Controller基于Pipeline对OF Switch进行流表分组的具体过程。
图4中,OF Controller在初始化时直接下发Pipeline至OF Switch。
S401:OF Controller向OF Switch发送分组指示消息(OFPT_BP_MOD)。
该消息中包括以下参数:
Command(命令):值为OFPBP_INIT,表明对构成Pipeline的流表进行分组;
针对每个流表组包括[tg_id,bs_name,table_numbers]n
tg_id(table group identifier):流表组标识;
bs_name(business service name):业务功能名称,应为业务领域内的通用名称,如Forwarding(转发),Charing(计费)等;
table_numbers:分配给当前流表组的流表数目。
OF Switch根据分组指示消息对至少一个流表分组得到至少一个流表组。
可选的,分组指示消息中包括的每个流表组的流表组标识、每个流表组的业务功能名称以及每个流表组中包含流表的指示信息按照所述预设执行顺序排列。因此,OF Switch根据分组指示消息依次解析分组指示消息中包括的至少一个流表组中每个流表组的流表组标识、每个流表组的业务功能名称以及每个流表组中包含流表的指示信息,即根据流表组在消息列表中的顺序依次添加分组,并分配相应的流表组标识,消息列表中的流表分组顺序代表了流表组在Pipeline中的位置,然后,OF Switch依次存储每个流表组的流表组标识、每个流表组的业务功能名称以及每个流表组与该流表组中包含流表的对应关系。
或者,可选的,分组指示消息还包括每个流表组对应的执行顺序标识(position)。
OF Switch根据分组指示消息,按照position的指示对至少一个流表进行分组得到至少一个流表组,依次存储每个流表组的流表组标识、每个流表组的业务功能名称以及每个流表组与该流表组中包含流表的对应关系。
例如,控制器根据业务流程信息,按照预设执行顺序解析至少一个流表,确定业务流程中包含解封装(Decapsulation),计费(Charging)等业务功能,进一步地,控制器根据封装,计费等业务功能将至少一个流表划分为对应的流表组,参阅图5所示,分组结果为包含Flow table0和Flow table1的解封装流表组,包含Flow table2和Flow table3的计费流表组等,控制器生成分组指示消息。
分组指示信息包括:command:值为OFPBP_INIT;
下面以解封装流表组和计费流表组为例说明分组指示信息中携带的信 息:
针对解封装流表组:
tg_id(table group identifier):1;
bs_name(business service name):Decapsulation;
table_numbers:2。
针对计费流表组:
tg_id(table group identifier):2;
bs_name(business service name):Charging;
table_numbers:2。
OF Switch根据上述消息存储tg_id:1,bs_name:Decapsulation;table_numbers:2,即流表组1的业务功能为解封装,包含Flow table0和Flow table1,即从Pipeline中的第一个Flow table开始算起,以及存储tg_id:2,bs_name:Charging;table_numbers:2,即流表组2的业务功能为计费,包含Flow table2和Flow table3,即从上一个流表组分组后剩余的第一个流表开始。
S402:OF Switch确定分组失败时,返回分组失败消息(OFPT_ERROR_MSG)给OF Controller,分组失败消息携带分组失败原因。
此步骤为可选的步骤,其中,type(类型)为OFPET_BP_MOD_FAILED,code(编码)为错误原因。当OF Switch分组成功时,OF Switch可以不必向OF Controller反馈消息。
同理,控制器还可对交换机中新增的流表进行分组,具体的,当交换机的业务流程新增至少一个流表时,控制器首先获取至少一个新增流表分别对应的描述信息,然后,根据至少一个新增流表分别对应的描述信息,确定至少一个新增流表包含的至少一种新增业务功能。接着,控制器根据至少一种新增业务功能将至少一个新增流表划分为至少一个新增流表组,并生成新增分组指示消息。其中,新增分组指示消息包括至少一个新增流表组中每个新增流表组的流表组标识、每个新增流表组的业务功能名称、每个新增流表组中包含流表的指示信息、每个新增流表组的执行顺序标识。最后,控制器向 交换机发送新增分组指示消息,新增分组指示消息用于指示交换机对至少一个新增流表进行分组。
下面以图6为例说明OF Controller对OF Switch中的新增流表进行分组的具体过程。
S601:OF Controller向OF Switch发送新增分组指示消息(OFPT_BP_MOD)。
该消息中包括以下参数:
command:值为OFPTG_ADD,表明为添加一个流表分组;
tg_id:新增流表组的流表组标识;
bs_name:新增流表组的业务功能名称;
position:新增流表组对应业务功能在pipeline中的执行顺序;
table_numbers:分配给当前流表分组的流表数目。
OF Switch根据新增分组指示消息,确定至少一个新增流表组中每个新增流表组的流表组标识、每个新增流表组的业务功能名称、每个新增流表组与该新增流表组中包含流表的对应关系,以及每个新增流表组在业务流程中的执行顺序。
S602:OF Switch确定新增分组失败时,返回新增分组失败消息(OFPT_ERROR_MSG)给OF Controller,分组失败消息携带分组失败原因。
此步骤为可选的步骤,其中,type为OFPET_TG_MOD_FAILED,code为错误原因。
此外,本发明实施例还提供删除流表组和查询流表组的具体方法。
针对删除流表组的场景,控制器可以向交换机发送流表组删除消息,流表组删除消息携带待删除流表组的标识信息或删除全部流表组的指示信息。
交换机接收控制器发送的流表组删除消息,当流表组删除消息携带待删除流表组的标识信息时,交换机根据流表组删除消息,将待删除流表组的流表组标识,待删除流表组的业务功能名称、待删除流表组与该流表组中包含流表的对应关系删除。
或者,当流表组删除消息携带删除全部流表组的指示信息时,交换机根据流表组删除消息,将交换机包含的全部流表组中每个流表组的流表组标识,每个流表组的业务功能名称、每个流表组与该流表组中包含流表的对应关系删除。
针对查询流表组的场景,控制器向交换机发送分组查询消息,分组查询消息携带待查询流表组的标识信息,控制器接收交换机发送的分组查询响应消息,分组查询响应消息包括待查询流表组的流表组标识,待查询流表组的业务功能名称,待查询流表组中包含流表的指示信息;
或者,控制器向交换机发送分组查询消息,分组查询消息携带查询全部流表组的指示信息,控制器接收交换机发送的分组查询响应消息,分组查询响应消息包括交换机包含的全部流表组中每个流表组的流表组标识,每个流表组的业务功能名称,每个流表组中包含流表的指示信息。
此外,分组查询响应消息还包括待查询流表组的绑定状态,其中,待查询流表组的绑定状态用于指示待查询流表组是否已被绑定;或者,分组查询响应消息还包括全部流表组中每个流表组的绑定状态,其中,任一流表组的绑定状态用于指示该流表组是否已被绑定。
这里的流表组查询过程可以发生在控制器对流表组进行分组,或者控制器对新增流表进行分组,或者控制器需要删除流表组,或者控制器对流表组进行绑定或取消绑定之前或之后等多种应用场景中。
下面以图7为例说明OF Controller对OF Switch中的流表组进行查询和删除的具体过程。
S701:OF Controller向OF Switch发送分组查询消息(OFPT_BP_REQUEST)。
S702:OF Switch返回分组查询响应消息(OFPT_BP_REPLY)。
该消息中包括的参数有:
[tg_id,bs_name,table_numbers,is_used]n
其中,is_used:指明是否有OF Controller绑定当前流表组,即当前流表 组是否被绑定。
其余参数与分组指示消息中的参数相同。
或者,S701:OF Controller向OF Switch发送分组查询消息(OFPT_TG_REQUEST)。
tg_id:待查询流表组的流表组标识;
S702:OF Switch返回分组查询响应消息(OFPT_TG_REPLY)。
该消息中包括的参数有:
is_used:指明是否有OF Controller绑定待查询流表组,即待查询流表组是否被绑定。
此外,还包括对应该待查询流表组的tg_id,,bs_name和table_numbers。
S703:OF Controller向OF Switch发送流表组删除消息(OFPT_BP_MOD)。
该消息中包括的参数有:
command:值为OFPBP_DEL,表明为清除基于Pipeline的所有相关信息。
S704:OF Switch确定删除流表组不成功时,则OF Switch返回流表组删除失败消息(OFPT_ERROR_MSG)给OF Controller,流表组删除失败消息携带流表组删除失败原因。
此步骤为可选的步骤,其中,type为OFPET_BP_MOD_FAILED,code为错误原因。
或者,S703:OF Controller向OF Switch发送流表组删除消息(OFPT_TG_MOD)。
该消息中包括的参数有:
command:值为OFPTG_DEL,表明为删除一个流表分组;
tg_id:待删除的流表组标识。
S704:OF Switch确定删除流表组不成功时,则OF Switch返回流表组删除失败消息(OFPT_ERROR_MSG)给OF Controller,流表组删除失败消息携带流表组删除失败原因。
此步骤为可选的步骤,其中,type为OFPET_TG_MOD_FAILED,code 为错误原因。
由上可知,分组查询消息可以用于查询某个流表组的分组状况和绑定状态,也可以用于查询交换机中全部流表的分组状况和绑定状态,流表组删除消息可以用于删除整个流表分组,也可以用于删除其中至少一个流表组。
针对步骤310,可选的,控制器选择具有与自身业务需要匹配的业务功能的流表组作为待绑定流表组。
可选的,在控制器向交换机发送流表组绑定消息之前,若事先向交换机发送了分组查询消息,控制器可根据待查询流表组的绑定状态,确定待查询流表组已被绑定时,从除待查询流表组外的流表组中确定待绑定流表组。或者,控制器根据全部流表组中每个流表组的绑定状态,确定未被绑定的流表组,并从未被绑定的流表组中确定待绑定流表组。
例如,控制器原来确定待绑定的流表组为流表组1,但是当控制器在绑定流表组1之前进行了流表组分组查询,控制器根据交换机反馈的分组查询响应消息,得知流表组1已被绑定,此时控制器可以选择继续与流表组1进行绑定,覆盖之前的绑定关系,或者不再与流表组1绑定,选择其他流表组作为待绑定流表组。
进一步地,在执行完S310后,控制器还可针对绑定后的流表组进行解除绑定,具体的,控制器向交换机发送流表组取消绑定消息,流表组取消绑定消息携带待取消绑定流表组的标识信息。
下面以图8为例说明OF Controller对OF Switch中的流表组进行绑定和解除绑定的具体过程。
S801:OF Controller向OF Switch发送流表组绑定消息(OFPT_TG_MOD)。
该消息中包括的参数有:
command:值为OFPTG_BIND,表明当前OF Controller绑定一个流表分组;
tg_id:待绑定流表组的流表组标识。
OF Switch根据流表组绑定消息,存储待绑定流表组与OF Controller的绑定关系,并更新待绑定流表组的绑定状态为已被绑定。
S802:OF Switch确定绑定不成功时,则OF Switch返回流表组绑定失败消息(OFPT_ERROR_MSG)给OF Controller。
此步骤为可选的步骤,其中,type为OFPET_TG_MOD_FAILED,code为错误原因
S803:OF Controller向OF Switch发送流表组取消绑定消息(OFPT_TG_MOD)。
该消息中包括的参数有:
command:值为OFPTG_UNBIND,表明当前OF Controller解除绑定一个流表组。
tg_id:待取消绑定流表组的流表组标识。
S804:OF Switch确定解除绑定不成功时,则OF Switch返回流表组绑定解除失败消息(OFPT_ERROR_MSG)给OF Controller。
此步骤为可选的步骤,其中type为OFPET_TG_MOD_FAILED,code为错误原因。
OF Switch根据流表组取消绑定消息,删除待取消绑定流表组与OF Controller的绑定关系,并更新待取消绑定流表组的绑定状态为未被绑定。
因此,控制器能够实现对绑定流表组的管理和控制,在下发的消息中携带待绑定流表组标识信息。参阅图9所示,控制器还可以对自身已绑定的流表组中的各个流表配置逻辑ID,即对每个流表组的包括的流表重新进行编号。控制器还可增加针对流表组的控制指令,例如,Goto_TG,携带待处理流表组的流表组标识,以tg_id指明,Goto_TG消息可以用来指明下一个需要处理的流表组。例如,图9中,Controller1可以发送Goto_TG携带流表组4(TG4)的标识,用于指明经流表组2(TG2)处理后的数据包中哪些数据包可以不进入流表组3(TG3),而直接进入流表组4(TG4)。
此外,参阅图10所示,本发明实施例还提出通过配置方式,即OF Config, 实现基于Pipeline的管理,具体的,对于不支持流表组的交换机,控制器可以通过配置方式(例如OF Config)将构成业务流程的各个流表划分为至少一个逻辑交换机。须知,逻辑交换机在物理上是由交换机中的至少一个流表构成,逻辑上可以看作一个单独的交换机。控制器将构成业务流程的各个流表划分为至少一个逻辑交换机是通过配置端口完成的,而控制器向交换机发送分组指示消息是通过业务端口完成的。此外,对于不支持流表组的交换机,还可通过配置方式(例如OF Config)实现对逻辑交换机进行绑定和取消绑定,以及新增逻辑交换机和删除逻辑交换机。
参阅图11所示,本发明实施例一种管理交换机的装置,包括:
收发单元1101,用于向交换机发送分组指示消息,所述分组指示消息用于指示所述交换机对至少一个流表进行分组;
处理单元1102,用于确定待绑定流表组,通过所述收发单元所述向所述交换机发送流表组绑定消息,所述流表组绑定消息携带所述待绑定流表组的标识信息,所述流表组绑定消息用于使所述装置与所述待绑定流表组建立绑定关系,以使所述装置对所述待绑定流表组进行管理。
在一种可能的实现方式中,每个流表组的标识信息包括该流表组的流表组标识和/或该流表组的业务功能名称。
在一种可能的实现方式中,所述处理单元1102,还用于:
获取所述交换机的业务流程信息,所述业务流程由具有预设执行顺序的至少一个流表构成,所述业务流程信息用于描述所述至少一个流表;
根据所述业务流程信息,按照所述预设执行顺序解析所述至少一个流表,确定所述业务流程包含的至少一种业务功能;
根据所述至少一种业务功能将所述至少一个流表划分为至少一个流表组,并生成分组指示消息;
其中,所述分组指示消息包括所述至少一个流表组中每个流表组的流表组标识、每个流表组的业务功能名称以及每个流表组中包含流表的指示信息。
在一种可能的实现方式中,所述处理单元1102,还用于:
当所述交换机的业务流程新增至少一个流表时,获取至少一个新增流表分别对应的描述信息;
根据所述至少一个新增流表分别对应的描述信息,确定所述至少一个新增流表包含的至少一种新增业务功能;
根据所述至少一种新增业务功能将所述至少一个新增流表划分为至少一个新增流表组,并生成新增分组指示消息,所述新增分组指示消息包括所述至少一个新增流表组中每个新增流表组的流表组标识、每个新增流表组的业务功能名称、每个新增流表组中包含流表的指示信息、每个新增流表组的执行顺序标识;
通过所述收发单元1101向所述交换机发送所述新增分组指示消息,所述新增分组指示消息用于指示所述交换机对所述至少一个新增流表进行分组。
在一种可能的实现方式中,所述收发单元1101,还用于:
向所述交换机发送流表组删除消息,所述流表组删除消息携带待删除流表组的标识信息或删除全部流表组的指示信息。
在一种可能的实现方式中,所述收发单元1101,还用于:
向所述交换机发送分组查询消息,所述分组查询消息携带待查询流表组的标识信息;接收所述交换机发送的分组查询响应消息,所述分组查询响应消息包括所述待查询流表组的流表组标识,所述待查询流表组的业务功能名称,所述待查询流表组中包含流表的指示信息;
或者,向所述交换机发送分组查询消息,所述分组查询消息携带查询全部流表组的指示信息;接收所述交换机发送的分组查询响应消息,所述分组查询响应消息包括所述交换机包含的全部流表组中每个流表组的流表组标识,每个流表组的业务功能名称,每个流表组中包含流表的指示信息。
在一种可能的实现方式中,所述分组查询响应消息还包括所述待查询流表组的绑定状态,其中,所述待查询流表组的绑定状态用于指示所述待查询流表组是否已被绑定;或者,所述分组查询响应消息还包括所述全部流表组中每个流表组的绑定状态,其中,任一流表组的绑定状态用于指示该流表组 是否已被绑定;
所述处理单元1102,还用于:
在通过所述收发单元1101向所述交换机发送流表组绑定消息之前,根据所述待查询流表组的绑定状态,确定所述待查询流表组已被绑定时,从除所述待查询流表组外的流表组中确定待绑定流表组;
或者,在通过所述收发单元1101向所述交换机发送流表组绑定消息之前,根据所述全部流表组中每个流表组的绑定状态,确定未被绑定的流表组,并从所述未被绑定的流表组中确定待绑定流表组。
在一种可能的实现方式中,所述收发单元1101,还用于:
在通过所述收发单元向所述交换机发送流表组绑定消息后,向所述交换机发送控制指令,所述控制指令携带已被所述控制器绑定的流表组的标识信息。
在一种可能的实现方式中,所述收发单元1101,还用于:
在通过所述收发单元向所述交换机发送流表组绑定消息后,向所述交换机发送流表组取消绑定消息,所述流表组取消绑定消息携带待取消绑定流表组的标识信息。
参阅图12所述,一种管理交换机的装置,包括:
收发单元1201,用于接收控制器发送的分组指示消息,所述分组指示消息用于指示所述装置对至少一个流表进行分组;
处理单元1202,用于根据所述分组指示消息对所述至少一个流表分组得到至少一个流表组;
所述收发单元1201,用于接收所述控制器发送的流表组绑定消息,所述流表组绑定消息携带待绑定流表组的标识信息,所述流表组绑定消息用于使所述控制器与所述待绑定流表组建立绑定关系,以使所述控制器对所述待绑定流表组进行管理;
所述处理单元1202,用于根据所述流表组绑定消息,存储所述待绑定流表组与所述控制器的绑定关系。
在一种可能的实现方式中,每个流表组的标识信息包括该流表组的流表组标识和/或该流表组的业务功能名称。
在一种可能的实现方式中,所述分组指示消息包括所述至少一个流表组中每个流表组的流表组标识、每个流表组的业务功能名称以及每个流表组中包含流表的指示信息;
所述处理单元1202,具体用于:
根据所述分组指示消息对所述至少一个流表分组得到至少一个流表组时,根据所述分组指示消息,确定所述至少一个流表组中每个流表组的流表组标识、每个流表组的业务功能名称以及每个流表组与该流表组中包含流表的对应关系。
在一种可能的实现方式中,所述收发单元1201,还用于:当所述装置的业务流程新增至少一个流表时,接收所述控制器发送的新增分组指示消息,所述新增分组指示消息包括所述至少一个新增流表组中每个新增流表组的流表组标识、每个新增流表组的业务功能名称、每个新增流表组中包含流表的指示信息、每个新增流表组的执行顺序标识,所述新增分组指示消息用于指示所述装置对所述至少一个新增流表进行分组;
所述处理单元1202,还用于:根据所述新增分组指示消息,确定所述至少一个新增流表组中每个新增流表组的流表组标识、每个新增流表组的业务功能名称、每个新增流表组与该新增流表组中包含流表的对应关系,以及每个新增流表组在所述业务流程中的执行顺序。
在一种可能的实现方式中,所述收发单元1201,还用于:接收所述控制器发送的流表组删除消息,所述流表组删除消息携带待删除流表组的标识信息;所述处理单元1202,还用于:根据所述流表组删除消息,将所述待删除流表组的流表组标识,所述待删除流表组的业务功能名称、所述待删除流表组与该流表组中包含流表的对应关系删除;
或者,所述收发单元1201,还用于:接收所述控制器发送的流表组删除消息,所述流表组删除消息携带删除全部流表组的指示信息;所述处理单元 1202,还用于:根据所述流表组删除消息,将所述交换机包含的全部流表组中每个流表组的流表组标识,每个流表组的业务功能名称、每个流表组与该流表组中包含流表的对应关系删除。
在一种可能的实现方式中,所述收发单元1201,还用于:接收所述控制器发送的分组查询消息,所述分组查询消息携带待查询流表组的标识信息;向所述控制器发送分组查询响应消息,所述分组查询响应消息包括所述待查询流表组的流表组标识,所述待查询流表组的业务功能名称,所述待查询流表组中包含流表的指示信息;
或者,所述收发单元1201,还用于接收所述控制器发送的分组查询消息,所述分组查询消息携带查询全部流表组的指示信息;向所述控制器发送分组查询响应消息,所述分组查询响应消息包括所述交换机包含的全部流表组中每个流表组的流表组标识,每个流表组的业务功能名称,每个流表组中包含流表的指示信息。
在一种可能的实现方式中,所述分组查询响应消息还包括所述待查询流表组的绑定状态,其中,所述待查询流表组的绑定状态用于指示所述待查询流表组是否已被绑定;或者,所述分组查询响应消息还包括所述全部流表组中每个流表组的绑定状态,其中,任一流表组的绑定状态用于指示该流表组是否已被绑定。
在一种可能的实现方式中,所述收发单元1201,还用于:
在所述处理单元根据所述流表组绑定消息,存储所述待绑定流表组与所述控制器的绑定关系之后,接收所述控制器发送的流表组取消绑定消息,所述流表组取消绑定消息携带待取消绑定流表组的标识信息;
所述处理单元1202,还用于根据所述待取消绑定流表组的标识信息,删除所述待取消绑定流表组与所述控制器的绑定关系。
需要说明的是,本发明实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,另外,在本申请各个实施例中的各功能模块可以集成在一个处理模块中,也可以是各个模块单独物 理存在,也可以两个或两个以上模块集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。
所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
基于同一发明构思,本发明实施例中还提供了一种控制器,为图11所示装置的实体设备,因此本发明实施例提供的控制器的实施方式可以参见图3所示的实施例,重复之处不再赘述。
参阅图13所示,本发明实施例提供一种控制器,包括:
收发器1301;
存储器1303,用于存储指令;和
处理器1302,与存储器1303和收发器1301分别相连,用于执行指令,以在执行指令时执行如下步骤:
向交换机发送分组指示消息,所述分组指示消息用于指示所述交换机对至少一个流表进行分组;
确定待绑定流表组,向所述交换机发送流表组绑定消息,所述流表组绑定消息携带所述待绑定流表组的标识信息,所述流表组绑定消息用于使所述控制器与所述待绑定流表组建立绑定关系,以使所述控制器对所述待绑定流表组进行管理。
基于同一发明构思,本发明实施例中还提供了一种交换机,为图12所示装置的实体设备,重复之处不再赘述。
参阅图14所示,本发明实施例提供一种交换机,包括:
收发器1401;
存储器1403,用于存储指令;和
处理器1402,与存储器1403和收发器1401分别相连,用于执行指令,以在执行指令时执行如下步骤:
接收控制器发送的分组指示消息,所述分组指示消息用于指示所述交换机对至少一个流表进行分组;
根据所述分组指示消息对所述至少一个流表分组得到至少一个流表组;
接收所述控制器发送的流表组绑定消息,所述流表组绑定消息携带待绑定流表组的标识信息,所述流表组绑定消息用于使所述控制器与所述待绑定流表组建立绑定关系,以使所述控制器对所述待绑定流表组进行管理;
根据所述流表组绑定消息,存储所述待绑定流表组与所述控制器的绑定关系。
需要说明的是图13和图14所示的各部分之间的连接方式仅为一种可能的示例,也可以是,收发器与存储器均与处理器连接,且收发器与存储器之间没有连接,或者,也可以是其他可能的连接方式。
本发明实施例中控制器向交换机发送分组指示消息,分组指示消息用于指示交换机对至少一个流表进行分组,即控制器实现对交换机中构成业务流程的各个流表进行分组,控制器根据分组指示消息确定待绑定流表组,向交换机发送流表组绑定消息,流表组绑定消息携带待绑定流表组的标识信息,流表组绑定消息用于使控制器与待绑定流表组建立绑定关系,以使控制器对待绑定流表组进行管理。
因此,采用本发明实施例提供的控制器对交换机中对构成业务流程进行分组的方法、对分组后的流表组进行绑定和取消绑定的方法。多个控制器可以分别与交换机中各个流表组建立绑定关系,每个控制器根据绑定的流表组对应的业务功能部署相应的网络应用,无需再在控制器中集中部署多个网络功能,进而实现了多控制器对交换机中多种业务功能的分担,解决控制器因 网络功能集中部署造成的瓶颈问题,实现多控制器协作控制交换机,也保证了控制器运行的稳定性与可靠性。
本发明实施例还提供流表分组的增加、查询、删除、以及取消绑定的操作过程,以及各个操作对应的相关参数,从而实现面向多业务控制器的针对对交换机中流表的多种管理。
此外,本发明实施例还提供其它相关命令的扩展,包括:控制器下发的控制指令需包含流表组的流表组标识、控制器根据流表的逻辑id操作相应流表,以及增加Goto-TG指令格式等,以实现对流表组的灵活有效地管理和控制。本发明实施例还提出通过配置方式(即OF Config)来实现面向多业务控制器的对交换机中各个流表的管理,由交换机直接根据配置信息进行流表分组、查询、删除、绑定和取消绑定逻辑交换机。
本发明实施例提供的方法能够基于流表分组实现不同业务功能的隔离与顺序编排,保证不同控制网元(即控制器)对应业务功能按序执行。本发明实施例提供了基于OpenFlow协议和OF Config两种方式实现多控制器对交换机的控制和管理,从而保证了可编程转发面的灵活性。
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的 装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本发明的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本发明范围的所有变更和修改。
显然,本领域的技术人员可以对本发明实施例进行各种改动和变型而不脱离本发明实施例的精神和范围。这样,倘若本发明实施例的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。

Claims (34)

  1. 一种管理交换机的方法,其特征在于,包括:
    控制器向交换机发送分组指示消息,所述分组指示消息用于指示所述交换机对至少一个流表进行分组;
    所述控制器确定待绑定流表组,向所述交换机发送流表组绑定消息,所述流表组绑定消息携带所述待绑定流表组的标识信息,所述流表组绑定消息用于使所述控制器与所述待绑定流表组建立绑定关系,以使所述控制器对所述待绑定流表组进行管理。
  2. 如权利要求1所述的方法,其特征在于,每个流表组的标识信息包括该流表组的流表组标识和/或该流表组的业务功能名称。
  3. 如权利要求1或2所述的方法,其特征在于,还包括:
    所述控制器获取所述交换机的业务流程信息,所述业务流程由具有预设执行顺序的至少一个流表构成,所述业务流程信息用于描述所述至少一个流表;
    所述控制器根据所述业务流程信息,按照所述预设执行顺序解析所述至少一个流表,确定所述业务流程包含的至少一种业务功能;
    所述控制器根据所述至少一种业务功能将所述至少一个流表划分为至少一个流表组,并生成分组指示消息;
    其中,所述分组指示消息包括所述至少一个流表组中每个流表组的流表组标识、每个流表组的业务功能名称以及每个流表组中包含流表的指示信息。
  4. 如权利要求1-3任一项所述的方法,其特征在于,还包括:
    当所述交换机的业务流程新增至少一个流表时,所述控制器获取至少一个新增流表分别对应的描述信息;
    所述控制器根据所述至少一个新增流表分别对应的描述信息,确定所述至少一个新增流表包含的至少一种新增业务功能;
    所述控制器根据所述至少一种新增业务功能将所述至少一个新增流表划 分为至少一个新增流表组,并生成新增分组指示消息,所述新增分组指示消息包括所述至少一个新增流表组中每个新增流表组的流表组标识、每个新增流表组的业务功能名称、每个新增流表组中包含流表的指示信息、每个新增流表组的执行顺序标识;
    所述控制器向所述交换机发送所述新增分组指示消息,所述新增分组指示消息用于指示所述交换机对所述至少一个新增流表进行分组。
  5. 如权利要求1-4任一项所述的方法,其特征在于,还包括:
    所述控制器向所述交换机发送流表组删除消息,所述流表组删除消息携带待删除流表组的标识信息或删除全部流表组的指示信息。
  6. 如权利要求1-5任一项所述的方法,其特征在于,还包括:
    所述控制器向所述交换机发送分组查询消息,所述分组查询消息携带待查询流表组的标识信息;所述控制器接收所述交换机发送的分组查询响应消息,所述分组查询响应消息包括所述待查询流表组的流表组标识,所述待查询流表组的业务功能名称,所述待查询流表组中包含流表的指示信息;
    或者,所述控制器向所述交换机发送分组查询消息,所述分组查询消息携带查询全部流表组的指示信息;所述控制器接收所述交换机发送的分组查询响应消息,所述分组查询响应消息包括所述交换机包含的全部流表组中每个流表组的流表组标识,每个流表组的业务功能名称,每个流表组中包含流表的指示信息。
  7. 如权利要求6所述的方法,其特征在于,所述分组查询响应消息还包括所述待查询流表组的绑定状态,其中,所述待查询流表组的绑定状态用于指示所述待查询流表组是否已被绑定;或者,所述分组查询响应消息还包括所述全部流表组中每个流表组的绑定状态,其中,任一流表组的绑定状态用于指示该流表组是否已被绑定;
    在所述控制器向所述交换机发送流表组绑定消息之前,还包括:
    所述控制器根据所述待查询流表组的绑定状态,确定所述待查询流表组已被绑定时,从除所述待查询流表组外的流表组中确定待绑定流表组;
    或者,所述控制器根据所述全部流表组中每个流表组的绑定状态,确定未被绑定的流表组,并从所述未被绑定的流表组中确定待绑定流表组。
  8. 如权利要求1-7任一项所述的方法,其特征在于,在所述控制器向所述交换机发送流表组绑定消息后,还包括:
    所述控制器向所述交换机发送控制指令,所述控制指令携带已被所述控制器绑定的流表组的标识信息。
  9. 如权利要求1-8任一项所述的方法,其特征在于,在所述控制器向所述交换机发送流表组绑定消息后,还包括:
    所述控制器向所述交换机发送流表组取消绑定消息,所述流表组取消绑定消息携带待取消绑定流表组的标识信息。
  10. 一种管理交换机的方法,其特征在于,包括:
    交换机接收控制器发送的分组指示消息,所述分组指示消息用于指示所述交换机对至少一个流表进行分组;
    所述交换机根据所述分组指示消息对所述至少一个流表分组得到至少一个流表组;
    所述交换机接收所述控制器发送的流表组绑定消息,所述流表组绑定消息携带待绑定流表组的标识信息,所述流表组绑定消息用于使所述控制器与所述待绑定流表组建立绑定关系,以使所述控制器对所述待绑定流表组进行管理;
    所述交换机根据所述流表组绑定消息,存储所述待绑定流表组与所述控制器的绑定关系。
  11. 如权利要求10所述的方法,其特征在于,每个流表组的标识信息包括该流表组的流表组标识和/或该流表组的业务功能名称。
  12. 如权利要求10或11所述的方法,其特征在于,所述分组指示消息包括所述至少一个流表组中每个流表组的流表组标识、每个流表组的业务功能名称以及每个流表组中包含流表的指示信息;
    所述交换机根据所述分组指示消息对所述至少一个流表分组得到至少一 个流表组,包括:
    所述交换机根据所述分组指示消息,确定所述至少一个流表组中每个流表组的流表组标识、每个流表组的业务功能名称以及每个流表组与该流表组中包含流表的对应关系。
  13. 如权利要求10-12任一项所述的方法,其特征在于,还包括:
    当所述交换机的业务流程新增至少一个流表时,所述交换机接收所述控制器发送的新增分组指示消息,所述新增分组指示消息包括所述至少一个新增流表组中每个新增流表组的流表组标识、每个新增流表组的业务功能名称、每个新增流表组中包含流表的指示信息、每个新增流表组的执行顺序标识,所述新增分组指示消息用于指示所述交换机对所述至少一个新增流表进行分组;
    所述交换机根据所述新增分组指示消息,确定所述至少一个新增流表组中每个新增流表组的流表组标识、每个新增流表组的业务功能名称、每个新增流表组与该新增流表组中包含流表的对应关系,以及每个新增流表组在所述业务流程中的执行顺序。
  14. 如权利要求10-13任一项所述的方法,其特征在于,还包括:
    所述交换机接收所述控制器发送的流表组删除消息,所述流表组删除消息携带待删除流表组的标识信息;所述交换机根据所述流表组删除消息,将所述待删除流表组的流表组标识,所述待删除流表组的业务功能名称、所述待删除流表组与该流表组中包含流表的对应关系删除;
    或者,所述交换机接收所述控制器发送的流表组删除消息,所述流表组删除消息携带删除全部流表组的指示信息;所述交换机根据所述流表组删除消息,将所述交换机包含的全部流表组中每个流表组的流表组标识,每个流表组的业务功能名称、每个流表组与该流表组中包含流表的对应关系删除。
  15. 如权利要求10-14任一项所述的方法,其特征在于,还包括:
    所述交换机接收所述控制器发送的分组查询消息,所述分组查询消息携带待查询流表组的标识信息;所述交换机向所述控制器发送分组查询响应消 息,所述分组查询响应消息包括所述待查询流表组的流表组标识,所述待查询流表组的业务功能名称,所述待查询流表组中包含流表的指示信息;
    或者,所述交换机接收所述控制器发送的分组查询消息,所述分组查询消息携带查询全部流表组的指示信息;所述交换机向所述控制器发送分组查询响应消息,所述分组查询响应消息包括所述交换机包含的全部流表组中每个流表组的流表组标识,每个流表组的业务功能名称,每个流表组中包含流表的指示信息。
  16. 如权利要求15所述的方法,其特征在于,所述分组查询响应消息还包括所述待查询流表组的绑定状态,其中,所述待查询流表组的绑定状态用于指示所述待查询流表组是否已被绑定;或者,所述分组查询响应消息还包括所述全部流表组中每个流表组的绑定状态,其中,任一流表组的绑定状态用于指示该流表组是否已被绑定。
  17. 如权利要求10-16任一项所述的方法,其特征在于,在所述交换机根据所述流表组绑定消息,存储所述待绑定流表组与所述控制器的绑定关系之后,还包括:
    所述交换机接收所述控制器发送的流表组取消绑定消息,所述流表组取消绑定消息携带待取消绑定流表组的标识信息;
    所述交换机根据所述待取消绑定流表组的标识信息,删除所述待取消绑定流表组与所述控制器的绑定关系。
  18. 一种管理交换机的装置,其特征在于,包括:
    收发单元,用于向交换机发送分组指示消息,所述分组指示消息用于指示所述交换机对至少一个流表进行分组;
    处理单元,用于确定待绑定流表组,通过所述收发单元所述向所述交换机发送流表组绑定消息,所述流表组绑定消息携带所述待绑定流表组的标识信息,所述流表组绑定消息用于使所述装置与所述待绑定流表组建立绑定关系,以使所述装置对所述待绑定流表组进行管理。
  19. 如权利要求18所述的装置,其特征在于,每个流表组的标识信息包 括该流表组的流表组标识和/或该流表组的业务功能名称。
  20. 如权利要求18或19所述的装置,其特征在于,所述处理单元,还用于:
    获取所述交换机的业务流程信息,所述业务流程由具有预设执行顺序的至少一个流表构成,所述业务流程信息用于描述所述至少一个流表;
    根据所述业务流程信息,按照所述预设执行顺序解析所述至少一个流表,确定所述业务流程包含的至少一种业务功能;
    根据所述至少一种业务功能将所述至少一个流表划分为至少一个流表组,并生成分组指示消息;
    其中,所述分组指示消息包括所述至少一个流表组中每个流表组的流表组标识、每个流表组的业务功能名称以及每个流表组中包含流表的指示信息。
  21. 如权利要求18-20任一项所述的装置,其特征在于,所述处理单元,还用于:
    当所述交换机的业务流程新增至少一个流表时,获取至少一个新增流表分别对应的描述信息;
    根据所述至少一个新增流表分别对应的描述信息,确定所述至少一个新增流表包含的至少一种新增业务功能;
    根据所述至少一种新增业务功能将所述至少一个新增流表划分为至少一个新增流表组,并生成新增分组指示消息,所述新增分组指示消息包括所述至少一个新增流表组中每个新增流表组的流表组标识、每个新增流表组的业务功能名称、每个新增流表组中包含流表的指示信息、每个新增流表组的执行顺序标识;
    通过所述收发单元向所述交换机发送所述新增分组指示消息,所述新增分组指示消息用于指示所述交换机对所述至少一个新增流表进行分组。
  22. 如权利要求18-21任一项所述的装置,其特征在于,所述收发单元,还用于:
    向所述交换机发送流表组删除消息,所述流表组删除消息携带待删除流 表组的标识信息或删除全部流表组的指示信息。
  23. 如权利要求18-22任一项所述的装置,其特征在于,所述收发单元,还用于:
    向所述交换机发送分组查询消息,所述分组查询消息携带待查询流表组的标识信息;接收所述交换机发送的分组查询响应消息,所述分组查询响应消息包括所述待查询流表组的流表组标识,所述待查询流表组的业务功能名称,所述待查询流表组中包含流表的指示信息;
    或者,向所述交换机发送分组查询消息,所述分组查询消息携带查询全部流表组的指示信息;接收所述交换机发送的分组查询响应消息,所述分组查询响应消息包括所述交换机包含的全部流表组中每个流表组的流表组标识,每个流表组的业务功能名称,每个流表组中包含流表的指示信息。
  24. 如权利要求23所述的装置,其特征在于,所述分组查询响应消息还包括所述待查询流表组的绑定状态,其中,所述待查询流表组的绑定状态用于指示所述待查询流表组是否已被绑定;或者,所述分组查询响应消息还包括所述全部流表组中每个流表组的绑定状态,其中,任一流表组的绑定状态用于指示该流表组是否已被绑定;
    所述处理单元,还用于:
    在通过所述收发单元向所述交换机发送流表组绑定消息之前,根据所述待查询流表组的绑定状态,确定所述待查询流表组已被绑定时,从除所述待查询流表组外的流表组中确定待绑定流表组;
    或者,在通过所述收发单元向所述交换机发送流表组绑定消息之前,根据所述全部流表组中每个流表组的绑定状态,确定未被绑定的流表组,并从所述未被绑定的流表组中确定待绑定流表组。
  25. 如权利要求18-24任一项所述的装置,其特征在于,所述收发单元,还用于:
    在通过所述收发单元向所述交换机发送流表组绑定消息后,向所述交换机发送控制指令,所述控制指令携带已被所述控制器绑定的流表组的标识信 息。
  26. 如权利要求18-25任一项所述的装置,其特征在于,所述收发单元,还用于:
    在通过所述收发单元向所述交换机发送流表组绑定消息后,向所述交换机发送流表组取消绑定消息,所述流表组取消绑定消息携带待取消绑定流表组的标识信息。
  27. 一种管理交换机的装置,其特征在于,包括:
    收发单元,用于接收控制器发送的分组指示消息,所述分组指示消息用于指示所述装置对至少一个流表进行分组;
    处理单元,用于根据所述分组指示消息对所述至少一个流表分组得到至少一个流表组;
    所述收发单元,用于接收所述控制器发送的流表组绑定消息,所述流表组绑定消息携带待绑定流表组的标识信息,所述流表组绑定消息用于使所述控制器与所述待绑定流表组建立绑定关系,以使所述控制器对所述待绑定流表组进行管理;
    所述处理单元,用于根据所述流表组绑定消息,存储所述待绑定流表组与所述控制器的绑定关系。
  28. 如权利要求27所述的装置,其特征在于,每个流表组的标识信息包括该流表组的流表组标识和/或该流表组的业务功能名称。
  29. 如权利要求27或28所述的装置,其特征在于,所述分组指示消息包括所述至少一个流表组中每个流表组的流表组标识、每个流表组的业务功能名称以及每个流表组中包含流表的指示信息;
    所述处理单元,具体用于:
    根据所述分组指示消息对所述至少一个流表分组得到至少一个流表组时,根据所述分组指示消息,确定所述至少一个流表组中每个流表组的流表组标识、每个流表组的业务功能名称以及每个流表组与该流表组中包含流表的对应关系。
  30. 如权利要求27-29任一项所述的装置,其特征在于,所述收发单元,还用于:当所述装置的业务流程新增至少一个流表时,接收所述控制器发送的新增分组指示消息,所述新增分组指示消息包括所述至少一个新增流表组中每个新增流表组的流表组标识、每个新增流表组的业务功能名称、每个新增流表组中包含流表的指示信息、每个新增流表组的执行顺序标识,所述新增分组指示消息用于指示所述装置对所述至少一个新增流表进行分组;
    所述处理单元,还用于:根据所述新增分组指示消息,确定所述至少一个新增流表组中每个新增流表组的流表组标识、每个新增流表组的业务功能名称、每个新增流表组与该新增流表组中包含流表的对应关系,以及每个新增流表组在所述业务流程中的执行顺序。
  31. 如权利要求27-30任一项所述的装置,其特征在于,所述收发单元,还用于:接收所述控制器发送的流表组删除消息,所述流表组删除消息携带待删除流表组的标识信息;所述处理单元,还用于:根据所述流表组删除消息,将所述待删除流表组的流表组标识,所述待删除流表组的业务功能名称、所述待删除流表组与该流表组中包含流表的对应关系删除;
    或者,所述收发单元,还用于:接收所述控制器发送的流表组删除消息,所述流表组删除消息携带删除全部流表组的指示信息;所述处理单元,还用于:根据所述流表组删除消息,将所述交换机包含的全部流表组中每个流表组的流表组标识,每个流表组的业务功能名称、每个流表组与该流表组中包含流表的对应关系删除。
  32. 如权利要求27-31任一项所述的装置,其特征在于,所述收发单元,还用于:接收所述控制器发送的分组查询消息,所述分组查询消息携带待查询流表组的标识信息;向所述控制器发送分组查询响应消息,所述分组查询响应消息包括所述待查询流表组的流表组标识,所述待查询流表组的业务功能名称,所述待查询流表组中包含流表的指示信息;
    或者,所述收发单元,还用于接收所述控制器发送的分组查询消息,所述分组查询消息携带查询全部流表组的指示信息;向所述控制器发送分组查 询响应消息,所述分组查询响应消息包括所述装置包含的全部流表组中每个流表组的流表组标识,每个流表组的业务功能名称,每个流表组中包含流表的指示信息。
  33. 如权利要求32所述的装置,其特征在于,所述分组查询响应消息还包括所述待查询流表组的绑定状态,其中,所述待查询流表组的绑定状态用于指示所述待查询流表组是否已被绑定;或者,所述分组查询响应消息还包括所述全部流表组中每个流表组的绑定状态,其中,任一流表组的绑定状态用于指示该流表组是否已被绑定。
  34. 如权利要求27-33任一项所述的装置,其特征在于,所述收发单元,还用于:
    在所述处理单元根据所述流表组绑定消息,存储所述待绑定流表组与所述控制器的绑定关系之后,接收所述控制器发送的流表组取消绑定消息,所述流表组取消绑定消息携带待取消绑定流表组的标识信息;
    所述处理单元,还用于根据所述待取消绑定流表组的标识信息,删除所述待取消绑定流表组与所述控制器的绑定关系。
PCT/CN2016/092176 2016-07-29 2016-07-29 一种管理交换机的方法及装置 Ceased WO2018018567A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/092176 WO2018018567A1 (zh) 2016-07-29 2016-07-29 一种管理交换机的方法及装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2016/092176 WO2018018567A1 (zh) 2016-07-29 2016-07-29 一种管理交换机的方法及装置

Publications (1)

Publication Number Publication Date
WO2018018567A1 true WO2018018567A1 (zh) 2018-02-01

Family

ID=61015357

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/092176 Ceased WO2018018567A1 (zh) 2016-07-29 2016-07-29 一种管理交换机的方法及装置

Country Status (1)

Country Link
WO (1) WO2018018567A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109194517A (zh) * 2018-09-20 2019-01-11 郑州云海信息技术有限公司 一种用于对虚拟交换机部件进行初始化的方法和装置
CN118802743A (zh) * 2024-09-13 2024-10-18 杭州海康威视系统技术有限公司 一种流表更新方法、装置、网络系统及电子设备

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102640464A (zh) * 2009-11-26 2012-08-15 日本电气株式会社 负载分配系统、负载分配方法及程序
WO2013146808A1 (ja) * 2012-03-28 2013-10-03 日本電気株式会社 コンピュータシステム、及び通信経路変更方法
CN104796336A (zh) * 2014-01-20 2015-07-22 华为技术有限公司 一种配置、下发流表项的方法及装置
CN104796344A (zh) * 2014-01-16 2015-07-22 中兴通讯股份有限公司 基于SDN实现报文转发的方法、系统、Openflow交换机及服务器
CN105430113A (zh) * 2015-11-03 2016-03-23 上海斐讯数据通信技术有限公司 Sdn网络arp报文处理方法、系统、控制器及交换机

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102640464A (zh) * 2009-11-26 2012-08-15 日本电气株式会社 负载分配系统、负载分配方法及程序
WO2013146808A1 (ja) * 2012-03-28 2013-10-03 日本電気株式会社 コンピュータシステム、及び通信経路変更方法
CN104796344A (zh) * 2014-01-16 2015-07-22 中兴通讯股份有限公司 基于SDN实现报文转发的方法、系统、Openflow交换机及服务器
CN104796336A (zh) * 2014-01-20 2015-07-22 华为技术有限公司 一种配置、下发流表项的方法及装置
CN105430113A (zh) * 2015-11-03 2016-03-23 上海斐讯数据通信技术有限公司 Sdn网络arp报文处理方法、系统、控制器及交换机

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109194517A (zh) * 2018-09-20 2019-01-11 郑州云海信息技术有限公司 一种用于对虚拟交换机部件进行初始化的方法和装置
CN118802743A (zh) * 2024-09-13 2024-10-18 杭州海康威视系统技术有限公司 一种流表更新方法、装置、网络系统及电子设备

Similar Documents

Publication Publication Date Title
CN105323136B (zh) 信息的处理方法及装置
CN107222353B (zh) 支持协议无关的软件定义网络虚拟化管理平台
EP2645632B1 (en) Methods and apparatus for improving compatibility between network devices
CN113556284B (zh) 数据包处理的方法及设备
CN105657081B (zh) 提供dhcp服务的方法、装置及系统
CN104426680B (zh) 数据传输方法、装置和系统
CN102395144B (zh) 无线接入点升级方法、系统及设备
JP2022533238A (ja) Tsn内のコントローラ間の通信のための方法、装置、およびシステム
CN116192726A (zh) 转发路径建立方法、装置以及计算机可读存储介质
CN109768908B (zh) 一种vxlan的配置方法、设备及系统
CN107624240A (zh) 用于自动的基于策略的路由的网络元件的配置
CN102823205A (zh) 聚合来自接入域的数据业务
US20190075048A1 (en) Label database synchronization in a packet switched communication network
KR20190111108A (ko) 트래픽 엔지니어링 서비스 매핑
CN112187649A (zh) 一种报文转发方法、报文处理方法及装置
CN107276798A (zh) 一种虚拟化网络服务功能链的实现方法及装置
CN113595670A (zh) 业务接口的创建方法、装置、系统、设备及介质
WO2018219300A1 (zh) Sdn中的报文交互方法及装置
CN112910704B (zh) 一种支持动态自适应网络配置的局域网系统、方法和装置
CN108965134A (zh) 报文转发方法及装置
WO2018018567A1 (zh) 一种管理交换机的方法及装置
CN112491709A (zh) 交叉SR/SRv6路径下发方法和装置、存储介质及电子装置
JP7685076B2 (ja) メッセージ処理方法、装置、ネットワークデバイス及び媒体
CN112217680B (zh) 基于软件定义广域网的控制器能力基准测试方法和装置
CN106209634B (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: 16910148

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

Country of ref document: EP

Kind code of ref document: A1