WO2015074396A1 - Automatic configuration method, device and system of software defined network - Google Patents

Automatic configuration method, device and system of software defined network Download PDF

Info

Publication number
WO2015074396A1
WO2015074396A1 PCT/CN2014/078472 CN2014078472W WO2015074396A1 WO 2015074396 A1 WO2015074396 A1 WO 2015074396A1 CN 2014078472 W CN2014078472 W CN 2014078472W WO 2015074396 A1 WO2015074396 A1 WO 2015074396A1
Authority
WO
WIPO (PCT)
Prior art keywords
controller
switch
request
address
assigned
Prior art date
Application number
PCT/CN2014/078472
Other languages
French (fr)
Chinese (zh)
Inventor
张习通
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2015074396A1 publication Critical patent/WO2015074396A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0895Configuration of virtualised networks or elements, e.g. virtualised network function or OpenFlow elements

Definitions

  • the invention relates to an automatic configuration method, device and system for software-defined network SDN.
  • the application is submitted to the Chinese Patent Office on November 21, 2013, and the application number is 201310594163.2.
  • the invention name is "a software-defined network SDN automatic configuration method and device. The priority of the Chinese Patent Application, the entire disclosure of which is incorporated herein by reference.
  • the present invention relates to the field of computer technologies, and in particular, to an automatic configuration method, device, and system for a software-defined network. Background technique
  • SDN Software Defined Network
  • OpenFlow OpenFlow
  • Each OpenFlow switch has a flow table for packet lookup and forwarding.
  • the switch can connect to the i3 ⁇ 4 table through the OpenFlow protocol via a secure channel to check and manage the i3 ⁇ 4 table, as shown in Figure 1.
  • a typical solution is to group a large number of controllers into a distributed cluster, each switch is connected to a different controller in the cluster, which can reduce the performance pressure of a single controller, and the controller itself Will not become the bottleneck of the entire system.
  • There is a leader controller in the controller cluster to manage the cluster's resources and task assignments.
  • the other controllers are follower controllers.
  • an administrator is required to configure an access controller for each switch.
  • One configuration scheme is to configure two controllers for each switch, one for the master controller and one for the secondary (second).
  • the controller as shown in Figure 2, is the controller configuration diagram of the switch. The switch and the two controllers remain connected, but only the master controller interacts with the switch. When the master controller fails, the secondary controller takes over the business interaction with the switch.
  • the embodiments of the present invention provide a method, a device, and a system for automatically configuring a software-defined network, which are used to solve the problem of low configuration efficiency when manually configuring a controller for a switch.
  • a method for automatically configuring a software-defined network includes:
  • any controller determines that it becomes the primary controller, it enables the IP address to be used when any controller becomes the primary controller;
  • the controller assigned to the switch is determined and sent to the switch to indicate the assignment to the switch. Controller's message.
  • the any controller determines a controller that is allocated to the switch, and includes:
  • the controller determines the current load status of each controller
  • the controller determines the controller assigned to the switch based on the load conditions of the current respective controllers.
  • the controller that is allocated to the switch includes:
  • the master controller and the auxiliary controller are allocated to the switch, and the auxiliary controller is configured to replace the master controller to manage the switch when the master controller fails.
  • the request for the allocation controller sent by the receiving switch includes:
  • the method further includes: deactivating the IP address when the controller determines that it becomes a slave controller.
  • the method further includes: - a controller management message.
  • a method for automatically configuring a software-defined network includes:
  • the switch sends a request for allocating a controller, and the destination address carried in the request message is an IP address that needs to be used when any controller becomes the primary controller;
  • the switch receives a message returned by any controller that becomes the primary controller to indicate a controller assigned to the switch;
  • the switch configures a controller allocated by the primary controller according to the received message.
  • the sending, by the switch, a request for an allocation controller includes:
  • the switch sends a request to allocate a controller upon initial access
  • a controller device includes: An IP address enabling unit, configured to enable an IP address to be used when any controller becomes the primary controller when it is determined to be the primary controller;
  • an allocation indication unit configured to: when receiving a request from the distribution controller that the switch sends the IP address as the destination address, determine a controller allocated to the switch, and send the switch to indicate the allocation to the switch Controller's message.
  • the allocation indication unit when used to determine a controller that is allocated to the switch, specifically:
  • the controller assigned to the switch is determined according to the load conditions of the current respective controllers.
  • the controller that is allocated by the allocation indication unit and allocated to the switch includes: a master that is allocated to the switch
  • the control controller and the auxiliary controller are configured to replace the main control controller to manage the switch when the main control controller fails.
  • the allocation indication unit is configured to receive a request of a distribution controller sent by a switch, specifically:
  • the device further includes:
  • the IP address deactivation unit is configured to deactivate the IP address when it is determined to be a slave controller.
  • the device further includes: an application layer communication unit, configured to receive, by the application layer device, a controller management message that sends the IP address as a destination address.
  • a switch device includes:
  • a request sending unit configured to send a request for assigning a controller, where the destination address carried in the request message is an IP address that is required when any controller becomes the primary controller;
  • a message receiving unit configured to receive a message returned by the controller that becomes the primary controller to indicate a controller allocated to the switch
  • the request sending unit is specifically configured to:
  • a request to allocate a controller is sent when it is determined that all of the assigned controllers have failed.
  • a controller device includes:
  • the processor when used to determine that it is the primary controller, enables an IP address to be used when any controller becomes the primary controller; and assigns control when any of the switches receives the IP address as the destination address Determining, by the device, a controller assigned to the switch; transmitting means for receiving a request from the distribution controller that the switch sends the IP address as the destination address, and sending the switch to indicate the assignment to the Switch controller Message.
  • the controller assigned to the switch is determined according to the load conditions of the current respective controllers.
  • the determining, by the processor, the controller that is allocated to the switch includes:
  • the master controller and the auxiliary controller are allocated to the switch, and the auxiliary controller is configured to replace the master controller to manage the switch when the master controller fails.
  • the transmitting device when configured to receive a request from a distribution controller sent by a switch, specifically:
  • the processor is further configured to: when the slave controller is determined to be a slave controller, disable the IP address.
  • the transmitting apparatus is further configured to: receive, by the application layer device, a controller management message that is sent by using the IP address as a destination address.
  • a switch device includes:
  • a transmission device configured to send a request for assigning a controller, where the destination address carried in the request message is an IP address that needs to be used when any controller becomes a primary controller; and receives any controller returned as a primary controller a message indicating the controller assigned to the switch;
  • a processor configured to configure, according to the received message, a controller allocated by the primary controller.
  • a request to allocate a controller is sent when it is determined that all of the assigned controllers have failed.
  • a seventh aspect a software-defined network system, comprising: a controller cluster consisting of multiple controllers, and a switch;
  • the controller is configured to enable an IP address to be used when any controller becomes a primary controller when it becomes a primary controller; and send the IP address as a destination address when any switch is received
  • assigning a request from the controller determining a controller assigned to the switch and transmitting a message to the switch indicating the controller assigned to the switch;
  • the switch is configured to send a request for a distribution controller, where the destination address carried in the request message is an IP address that needs to be used when any controller becomes the primary controller; receiving any controller that becomes the primary controller returns A message for indicating a controller assigned to the switch; configuring a controller assigned by the primary controller according to the received message.
  • the IP address used for when any controller becomes the primary controller is enabled; when any of the controllers receives any
  • a switch requests the allocation controller to send the IP address as the destination address, it determines the controller assigned to the switch and sends a message to the switch indicating the controller assigned to the switch.
  • the switch can find the main controller through the IP address and request the main controller to assign a controller to itself, which solves the problem that the switch cannot be The problem that the main controller sends the request realizes that the main controller allocates the controller for each switch, and the controller configuration of the switch can be completed more efficiently than the manually configured method.
  • FIG. 1 is a schematic diagram of an apparatus of an open flow technology
  • FIG. 2 is a schematic diagram of a controller configuration of a switch
  • FIG. 3 is a schematic flowchart of an automatic configuration method of an SDN according to an embodiment of the present invention
  • FIG. 4 is another schematic flowchart of an automatic configuration method of an SDN according to an embodiment of the present invention. Schematic diagram of the deployment process;
  • FIG. 6 is a schematic diagram of message flow of a switch and a controller in an SDN according to an embodiment of the present invention
  • FIG. 7 is a schematic diagram of a controller allocation result according to an embodiment of the present invention
  • FIG. 8 is a schematic flowchart of a re-election of a controller according to an embodiment of the present invention
  • FIG. 9 is a schematic flowchart of a fault processing process of a controller according to an embodiment of the present invention.
  • FIG. 10 is a schematic structural diagram of a controller device according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of a switch device according to an embodiment of the present invention.
  • FIG. 12 is another schematic structural diagram of a control device according to an embodiment of the present invention.
  • FIG. 13 is another schematic structural diagram of a switch device according to an embodiment of the present disclosure.
  • FIG. 14 is a schematic structural diagram of an SDN system according to an embodiment of the present invention. detailed description
  • the embodiments of the present invention provide an automatic configuration method, device, and system for a software-defined network SDN, which are used to improve controller configuration efficiency of a switch.
  • an automatic configuration method of an SDN according to an embodiment of the present invention includes:
  • any controller of the S 30K determines itself to be the primary controller, it enables the IP address to be used when any controller becomes the primary controller.
  • the controller determines that it becomes a master control or a slave controller according to an instruction of the controller cluster management software.
  • the controller cluster management software currently used is called zookeeper and is used to manage the controller cluster.
  • Each controller is pre-installed with a zookeeper, and the controllers are elected by zookeeper to determine the primary controller and the secondary controller.
  • Each controller is pre-configured with an identical IP address.
  • the IP address is used only when the controller is elected as the primary controller. When the controller is a slave controller, the IP address is not used.
  • each switch is also pre-configured. The IP address is configured such that no matter which controller is the primary controller, the switch can send a message to the primary controller through the IP address to establish contact with the primary controller.
  • the IP address is used as a destination.
  • the controller assigned to the switch is determined and a message is sent to the switch indicating the controller assigned to the switch.
  • the primary controller when receiving the request of the distribution controller sent by the switch, can obtain the IP address of the sender switch by parsing the request message, and after determining the controller allocated to the switch, pass the acquired sender.
  • the IP address of the switch indicates the result of the assignment to the switch.
  • the controller is automatically allocated to each switch by the main controller, which improves the configuration efficiency of the switch.
  • a switch that does not send a request to the distribution controller it may not be started, or it may have been assigned to a controller, and the primary controller does not need to be assigned.
  • any controller in step S302 determines a controller that is allocated to the switch, and includes: any one of the controllers determines a current load status of each controller; The load status of the controller determines the controller assigned to the switch. The controller is assigned to the switch according to the load status of the controller, which can balance the load of each controller, effectively utilize resources, and improve network work efficiency.
  • a possible specific allocation method is: determining the allocation priority of each controller according to the number of switches currently managed by the controller, wherein the controller with the least number of currently managed switches has the highest allocation priority, according to the allocation priority. The switch assigns a controller.
  • the controller allocated to the switch determined in step S302 comprises: a master controller and a secondary controller assigned to the switch, and the auxiliary controller is configured to replace when the master controller fails
  • the master controller manages the switch. Assigning two controllers to a switch is a typical distribution scheme, but embodiments of the present invention may also assign one controller or more than two controllers to the switch.
  • the receiving the request of the distribution controller sent by the switch in step S302 comprises: receiving a request of the allocation controller sent by the switch when initially accessed; or sending the receiving switch when determining that the allocated controllers are all invalid. A request to assign a controller. Switch in initial access
  • the controller In the SDN network, no controller is configured, and the controller is requested to be allocated to the main controller. When the switch finds that the assigned controllers have failed in succession, the controller is requested again from the main controller. It can be seen that the method of assigning a controller to the switch by the main controller can process the controller in the event that the controller has been faulty in time, which is more efficient and network fault-tolerant than the method of manually configuring the controller for the switch. Stronger, improving the robustness of SDN.
  • the method further comprises: when the controller determines that it is a slave controller, deactivating the IP address.
  • the controller determines to become a slave controller when determining that it has failed, or determines that the controller becomes a slave controller according to the instruction of the controller cluster management software.
  • the zookeeper software of each controller exchanges information, determines that the original host controller loses support from most controllers, or determines that the original primary controller has failed to contact, and then re-initiates.
  • the election determines the new primary controller.
  • the newly determined primary controller enables the IP address that the primary controller needs to use, and the original primary controller becomes the secondary controller, and the IP address is no longer used.
  • the method further includes: the any controller receiving a controller management message that the application layer device sends the IP address as a destination address.
  • the application layer device is used to send a flow table to the controller, manage the flow table of the controller, and configure and manage the main controller. Therefore, the application layer device needs to be able to determine the main controller and communicate with the main controller. .
  • the application layer device is pre-configured with the IP address that the primary controller needs to use.
  • the application layer device can communicate with the primary controller through the IP address.
  • the election result of the primary controller and the change of the primary controller are not correct.
  • the application layer device has any impact, which improves the efficiency of the network.
  • an automatic configuration method of an SDN according to an embodiment of the present invention includes:
  • the S40K switch sends a request to allocate a controller.
  • the destination address carried in the request message is the IP address to be used when any controller becomes the primary controller.
  • the switch receives a message returned by any controller that becomes the primary controller to indicate a controller assigned to the switch.
  • the switch configures a controller allocated by the primary controller according to the received message. In this way, the controller is automatically assigned to the switch by the main controller, which improves the configuration efficiency of the switch compared to manually inputting the controller configured in the switch.
  • the controller allocated to the switch includes: a master controller and a secondary controller; and the auxiliary controller is configured to take over the master controller to manage the switch when the master controller fails.
  • the switch sends a request to allocate a controller, including:
  • the switch sends a request to allocate a controller upon initial access; or,
  • the switch sends a request to the distribution controller when it determines that the assigned controllers have failed.
  • each controller is configured with an identical IP address called a floating IP, and is added as a primary controller.
  • the switch allocates the corresponding program of the controller, and an agent (agent) program is added to each switch for communication related to the controller allocation of the main controller, and the floating IP address needs to be pre-configured in the agent.
  • agent agent
  • the deployment process of the SDN environment includes:
  • the S50 installs the application layer function software on the application layer device, and configures the controller's floating IP information for subsequent service communication.
  • the zookeeper After installing zookeeper, the zookeeper starts to manage the controller cluster;
  • the zookeeper initiates the election of the main controller, and the floating IP of the main controller is the up state, that is, the use state, and the floating IP of the slave controller is kept in the down state;
  • the switch triggering agent uses the configured floating IP to communicate with the controller cluster to obtain information about the controller that needs to be accessed.
  • the primary controller After receiving the request sent by the agent, the primary controller allocates a controller that needs to be accessed to the switch.
  • the agent receives the returned information and configures the controller for the switch.
  • FIG. 6 is a message flow diagram of the switch and the controller in the SDN; the agent uses the floating IP to request the controller to allocate the access to the main controller, and the main controller instructs the switch to allocate the controller, and the allocation result is as shown in FIG. 7. Show.
  • the re-election process of the controller cluster includes:
  • the S80 master controller fails or loses most of the slave controller support
  • the zookeeper initiates re-election of the main controller
  • the new primary controller floating IP is turned to the up state, the original primary controller becomes the slave controller, and the floating IP is turned to the down state.
  • the fault handling process of the controller connected to the switch includes:
  • the switch determines that the connection with the master controller is interrupted.
  • the switch switches to the auxiliary controller for service processing.
  • the network failure or the auxiliary controller process is abnormal, and the switch determines that the connection with the auxiliary controller is interrupted;
  • the controller triggers the agent to communicate with the primary controller in the controller cluster through the floating IP, and regains the accessed controller information.
  • the primary controller reassigns the accessed controller to the switch.
  • a controller device provided by an embodiment of the present invention includes:
  • the IP address enabling unit 1001 is configured to enable an IP address to be used when any controller becomes the primary controller when it is determined to be the primary controller;
  • the allocation instructing unit 1002 is configured to: when receiving a request from the distribution controller that the switch sends the IP address as the destination address, determine a controller allocated to the switch, and send the switch to indicate the allocation to the switch The message of the controller of the switch.
  • the allocation indication unit 1002 is used to determine the controller allocated to the switch, specifically for:
  • the controller assigned to the switch is determined according to the load conditions of the current respective controllers.
  • the controller assigned to the switch by the allocation indication unit 1002 includes:
  • the master controller and the auxiliary controller are allocated to the switch, and the auxiliary controller is configured to replace the master controller to manage the switch when the master controller fails.
  • the allocation indication unit 1002 is configured to receive the distribution controller sent by the switch. When requested, it is specifically used to:
  • the device further comprises:
  • the IP address deactivation unit is configured to deactivate the IP address when it is determined to be a slave controller.
  • the device further comprises:
  • the application layer communication unit is configured to receive a controller management message that the application layer device sends the IP address as a destination address.
  • controller device of this embodiment is for implementing the above steps S301-S302, and the above explanation and limitation of the method are also applicable to the controller device of the embodiment.
  • a switch device provided by an embodiment of the present invention includes:
  • the request sending unit 1101 is configured to send a request for assigning a controller, where the destination address carried in the request message is an IP address that is required when any controller becomes the primary controller;
  • the message receiving unit 1102 is configured to receive a message returned by the controller that becomes the primary controller to indicate a controller that is allocated to the switch;
  • a configuration unit 1103 configured to configure, according to the received message, a control assigned by the primary controller, crying
  • the controller allocated to the switch indicated by the message received by the message receiving unit 1102 includes:
  • the main controller and the auxiliary controller; the auxiliary controller is used to replace the main controller to manage the switch when the main controller fails.
  • the request sending unit 1101 is specifically configured to:
  • a request to allocate a controller is sent when it is determined that all of the assigned controllers have failed.
  • switch device of this embodiment is to implement the foregoing steps S401-S403, and the foregoing explanation and limitation of the method are also applicable to the switch device of the embodiment.
  • a controller device provided by an embodiment of the present invention includes:
  • the processor 1201 is configured to enable an IP address to be used when any controller becomes the primary controller when it becomes the primary controller; and allocate the IP address as the destination address when any switch is received.
  • the transmitting device 1202 configured to receive a request from the distribution controller that the switch sends the IP address as the destination address, and send the switch to indicate the allocation A message to the controller of the switch.
  • the processor 1201 when the processor 1201 is configured to determine a controller allocated to the switch, specifically, the processor 1201 is configured to:
  • the controller assigned to the switch is determined according to the load conditions of the current respective controllers.
  • the controller allocated by the processor 1201 to the switch includes: a master controller and an auxiliary controller assigned to the switch, and the auxiliary controller is configured to take over the master when the master controller fails The controller manages the switch.
  • the transmitting device 1202 when the transmitting device 1202 is configured to receive a request from the distribution controller sent by the switch, the transmitting device 1202 is specifically configured to:
  • the processor 1201 is further configured to disable the IP address when it becomes a slave controller.
  • the transmitting device 1202 is further configured to receive, by the application layer device, the controller management message sent by using the IP address as a destination address.
  • a switch device provided by an embodiment of the present invention includes:
  • the transmitting device 1301 is configured to send a request for allocating a controller, where the destination address carried in the request message is an IP address that needs to be used when any controller becomes the primary controller; receiving any controller that becomes the primary controller returns a message indicating the controller assigned to the switch;
  • the processor 1302 is configured to configure, according to the received message, a controller that is allocated by the primary controller.
  • the controller allocated to the switch indicated by the message received by the transmitting device 1301 includes:
  • the main controller and the auxiliary controller; the auxiliary controller is used to replace the main controller to manage the switch when the main controller fails.
  • the transmitting device 1301 when configured to send a request for assigning a controller, specifically: sending a request for allocating a controller during initial access; or
  • a request to allocate a controller is sent when it is determined that all of the assigned controllers have failed.
  • an SDN system includes: a controller cluster composed of a plurality of controllers 1401, and a switch 1402;
  • the controller 1401 is configured to enable an IP address to be used when any controller becomes a primary controller when it becomes a primary controller; and send the IP address as a destination address when receiving any switch Determining a controller request, determining a controller assigned to the switch, and transmitting a message to the switch indicating the controller assigned to the switch;
  • the switch 1402 is configured to send a request for the allocation controller, where the destination address carried in the request message is an IP address that needs to be used when any controller becomes the primary controller; receiving any controller that becomes the primary controller returns a message for indicating a controller assigned to the switch; configuring a controller assigned by the master controller according to the received message.
  • the embodiment of the present invention provides an automatic configuration method, device, and system for an SDN.
  • the controller cluster is a whole for the application layer device and the switch, and the application layer
  • the device and the switch do not need to distinguish which controller is the primary controller, which realizes that the primary controller automatically allocates controllers for each switch, which improves the configuration efficiency of the switch. Rate, which improves the robustness of the system; and, when the main controller changes, the application layer devices and switches are not affected, improving network efficiency.
  • 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 be embodied in the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • 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

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

Abstract

An automatic configuration method, a device and a system of a Software Defined Network (SDN) are used for improving controller configuration efficiency of a switch. The method comprises: when any one controller determines that itself becomes a main controller, enabling an IP address that needs to be used when the any one controller becomes the main controller; and when the any one controller receives a controller allocation request sent by any one switch with the IP address used as a target address, determining a controller to be allocated to the switch, and sending the switch a message used for indicating the controller allocated to the switch.

Description

一种软件定义网络 SDN的自动配置方法、 设备及系统 本申请要求于 2013 年 11 月 21 日提交中国专利局、 申请号为 201310594163.2, 发明名称为 "一种软件定义网络 SDN 的自动配置方法、 设备及系统" 的中国专利申请的优先权, 其全部内容通过引用结合在本申 请中。  The invention relates to an automatic configuration method, device and system for software-defined network SDN. The application is submitted to the Chinese Patent Office on November 21, 2013, and the application number is 201310594163.2. The invention name is "a software-defined network SDN automatic configuration method and device. The priority of the Chinese Patent Application, the entire disclosure of which is incorporated herein by reference.
技术领域 Technical field
本发明涉及计算机技术领域, 尤其涉及一种软件定义网络的自动配置 方法、 设备及系统。 背景技术  The present invention relates to the field of computer technologies, and in particular, to an automatic configuration method, device, and system for a software-defined network. Background technique
软件定义网络 ( Software Defined Network, SDN), 是一种新型网络 架构, 其核心技术开放流(OpenFlow)通过将网络设备控制面与数据面分 离开来, 实现了网络流量的灵活控制, 为核心网络及应用的创新提供了良 好的平台。  Software Defined Network (SDN) is a new type of network architecture. Its core technology OpenFlow (OpenFlow) realizes flexible control of network traffic by separating the control plane of the network device from the data plane. And application innovation provides a good platform.
每个 OpenFlow交换机 ( switch)都有一张流表 ( flow table), 用于 进行数据包查找和转发。 交换机可以通过 OpenFlow协议经一个安全通道 ( secure channel )连接 J夕卜 々控 l)器 ( controller ), 对 i¾表进行查 i句 和管理, 如图 1所示。  Each OpenFlow switch has a flow table for packet lookup and forwarding. The switch can connect to the i3⁄4 table through the OpenFlow protocol via a secure channel to check and manage the i3⁄4 table, as shown in Figure 1.
当连接到控制器上的交换机过多时, 会给控制器带来很大的性能压力, 同时控制器会成为整个系统环境的瓶颈。 一种典型的解决办法是, 将很多 个控制器组成一个分布式的集群(cluster), 各交换机接入到集群中的不 同控制器上, 这样可以降低单个控制器的性能压力, 并且控制器本身不会 成为整个系统的瓶颈。 控制器集群中存在一个主 ( leader )控制器, 用来 管理集群的资源、 任务分配, 其它控制器为从属 (follower)控制器。 此 夕卜, 还需要管理员为每一个交换机配置接入的控制器, 一种配置方案是, 为每个交换机配置两个控制器, 一个为主控 (master )控制器, 一个为辅 助 (second)控制器; 如图 2 所示, 是交换机的控制器配置示意图。 交换 机和两个控制器一直保持连接状态, 但是只有主控控制器才与交换机做业 务交互, 当主控控制器故障时, 辅助控制器接管和交换机的业务交互。  When there are too many switches connected to the controller, it will bring a lot of performance pressure to the controller, and the controller will become the bottleneck of the entire system environment. A typical solution is to group a large number of controllers into a distributed cluster, each switch is connected to a different controller in the cluster, which can reduce the performance pressure of a single controller, and the controller itself Will not become the bottleneck of the entire system. There is a leader controller in the controller cluster to manage the cluster's resources and task assignments. The other controllers are follower controllers. In addition, an administrator is required to configure an access controller for each switch. One configuration scheme is to configure two controllers for each switch, one for the master controller and one for the secondary (second). The controller; as shown in Figure 2, is the controller configuration diagram of the switch. The switch and the two controllers remain connected, but only the master controller interacts with the switch. When the master controller fails, the secondary controller takes over the business interaction with the switch.
对于管理员而言, 需要知道控制器集群中的每个控制器的信息, 并根 据各个控制器的情况决定每个交换机配置哪些控制器。 当集群中的控制器 比较多时, 配置效率低。 发明内容 本发明实施例提供了一种软件定义网络的自动配置方法、 设备及系统, 用以解决人工为交换机配置控制器时配置效率低的问题。 For the administrator, you need to know the information of each controller in the controller cluster, and decide which controllers are configured for each switch according to the condition of each controller. When there are more controllers in the cluster, the configuration is inefficient. Summary of the invention The embodiments of the present invention provide a method, a device, and a system for automatically configuring a software-defined network, which are used to solve the problem of low configuration efficiency when manually configuring a controller for a switch.
本发明实施例提供的具体技术方案如下:  The specific technical solutions provided by the embodiments of the present invention are as follows:
第一方面, 一种软件定义网络的自动配置方法, 包括:  In a first aspect, a method for automatically configuring a software-defined network includes:
任一控制器确定自身成为主控制器时, 启用用于当任一控制器成为主 控制器时需要使用的 IP地址;  When any controller determines that it becomes the primary controller, it enables the IP address to be used when any controller becomes the primary controller;
当所述任一控制器接收到任一交换机将所述 IP地址作为目的地址发送 的分配控制器的请求时, 确定分配给该交换机的控制器, 并向该交换机发 送用于指示分配给该交换机的控制器的消息。  When any of the controllers receives a request from any of the switches to allocate the IP address as a destination controller, the controller assigned to the switch is determined and sent to the switch to indicate the assignment to the switch. Controller's message.
结合第一方面, 在第一种可能的实现方式中, 所述任一控制器确定分 配给该交换机的控制器, 包括:  With reference to the first aspect, in a first possible implementation manner, the any controller determines a controller that is allocated to the switch, and includes:
所述任一控制器确定当前各个控制器的负载状况;  The controller determines the current load status of each controller;
所述任一控制器根据所述当前各个控制器的负载状况, 确定分配给该 交换机的控制器。  The controller determines the controller assigned to the switch based on the load conditions of the current respective controllers.
结合第一方面或第一方面的第一种可能的实现方式, 在第二种可能的 实现方式中, 所述分配给该交换机的控制器, 包括:  With reference to the first aspect, or the first possible implementation manner of the first aspect, in a second possible implementation manner, the controller that is allocated to the switch includes:
分配给该交换机的主控控制器和辅助控制器, 所述辅助控制器用于当 所述主控控制器故障时, 接替所述主控控制器对该交换机进行管理。  The master controller and the auxiliary controller are allocated to the switch, and the auxiliary controller is configured to replace the master controller to manage the switch when the master controller fails.
结合第一方面, 在第三种可能的实现方式中, 接收交换机发送的分配 控制器的请求, 包括:  With reference to the first aspect, in a third possible implementation manner, the request for the allocation controller sent by the receiving switch includes:
接收交换机在初次接入时发送的分配控制器的请求; 或者,  Receiving a request from the distribution controller sent by the switch at the initial access; or
接收交换机在确定分配到的控制器均失效时发送的分配控制器的请 求。  The request of the distribution controller sent by the receiving switch when it determines that the assigned controllers have failed.
结合第一方面, 在第四种可能的实现方式中, 该方法还包括: 所述任一控制器确定自身成为从属控制器时, 停用所述 IP地址。  In conjunction with the first aspect, in a fourth possible implementation, the method further includes: deactivating the IP address when the controller determines that it becomes a slave controller.
结合第一方面, 在第五种可能的实现方式中, 该方法还包括: - 制器管理消息。  In conjunction with the first aspect, in a fifth possible implementation, the method further includes: - a controller management message.
第二方面, 一种软件定义网络的自动配置方法, 包括:  In a second aspect, a method for automatically configuring a software-defined network includes:
交换机发送分配控制器的请求, 该请求消息中携带的目的地址为当任 一控制器成为主控制器时需要使用的 IP地址;  The switch sends a request for allocating a controller, and the destination address carried in the request message is an IP address that needs to be used when any controller becomes the primary controller;
所述交换机接收任一成为主控制器的控制器返回的用于指示分配给所 述交换机的控制器的消息;  The switch receives a message returned by any controller that becomes the primary controller to indicate a controller assigned to the switch;
所述交换机根据接收的消息, 配置所述主控制器分配的控制器。  The switch configures a controller allocated by the primary controller according to the received message.
结合第二方面, 在第一种可能的实现方式中, 所述交换机发送分配控 制器的请求, 包括:  With reference to the second aspect, in a first possible implementation manner, the sending, by the switch, a request for an allocation controller includes:
所述交换机在初始接入时发送分配控制器的请求; 或者,  The switch sends a request to allocate a controller upon initial access; or
所述交换机在确定分配到的控制器均失效时发送分配控制器的请求。 第三方面, 一种控制器设备, 包括: IP地址启用单元, 用于确定自身成为主控制器时, 启用用于当任一控 制器成为主控制器时需要使用的 IP地址; The switch sends a request to allocate a controller when it is determined that all of the assigned controllers have failed. In a third aspect, a controller device includes: An IP address enabling unit, configured to enable an IP address to be used when any controller becomes the primary controller when it is determined to be the primary controller;
分配指示单元, 用于当接收到任一交换机将所述 IP地址作为目的地址 发送的分配控制器的请求时, 确定分配给该交换机的控制器, 并向该交换 机发送用于指示分配给该交换机的控制器的消息。  And an allocation indication unit, configured to: when receiving a request from the distribution controller that the switch sends the IP address as the destination address, determine a controller allocated to the switch, and send the switch to indicate the allocation to the switch Controller's message.
结合第三方面, 在第一种可能的实现方式中, 所述分配指示单元用于 确定分配给该交换机的控制器时, 具体用于:  With reference to the third aspect, in a first possible implementation manner, when the allocation indication unit is used to determine a controller that is allocated to the switch, specifically:
确定当前各个控制器的负载状况;  Determine the current load status of each controller;
根据所述当前各个控制器的负载状况, 确定分配给该交换机的控制器。 结合第三方面或第三方面的第一种可能的实现方式, 在第二种可能的 实现方式中, 所述分配指示单元确定的分配给该交换机的控制器, 包括: 分配给该交换机的主控控制器和辅助控制器, 所述辅助控制器用于当 所述主控控制器故障时, 接替所述主控控制器对该交换机进行管理。  The controller assigned to the switch is determined according to the load conditions of the current respective controllers. With reference to the third aspect, or the first possible implementation manner of the third aspect, in a second possible implementation manner, the controller that is allocated by the allocation indication unit and allocated to the switch includes: a master that is allocated to the switch The control controller and the auxiliary controller are configured to replace the main control controller to manage the switch when the main control controller fails.
结合第三方面, 在第三种可能的实现方式中, 所述分配指示单元用于 接收交换机发送的分配控制器的请求时, 具体用于:  With reference to the third aspect, in a third possible implementation manner, when the allocation indication unit is configured to receive a request of a distribution controller sent by a switch, specifically:
接收交换机在初次接入时发送的分配控制器的请求; 或者,  Receiving a request from the distribution controller sent by the switch at the initial access; or
接收交换机在确定分配到的控制器均失效时发送的分配控制器的请 求。  The request of the distribution controller sent by the receiving switch when it determines that the assigned controllers have failed.
结合第三方面, 在第四种可能的实现方式中, 该设备还包括:  In combination with the third aspect, in a fourth possible implementation, the device further includes:
IP地址停用单元,用于确定自身成为从属控制器时,停用所述 IP地址。 结合第三方面, 在第五种可能的实现方式中, 该设备还包括: 应用层通信单元, 用于接收应用层设备将所述 IP地址作为目的地址发 送的控制器管理消息。  The IP address deactivation unit is configured to deactivate the IP address when it is determined to be a slave controller. With reference to the third aspect, in a fifth possible implementation, the device further includes: an application layer communication unit, configured to receive, by the application layer device, a controller management message that sends the IP address as a destination address.
第四方面, 一种交换机设备, 包括:  In a fourth aspect, a switch device includes:
请求发送单元, 用于发送分配控制器的请求, 该请求消息中携带的目 的地址为当任一控制器成为主控制器时需要使用的 IP地址;  a request sending unit, configured to send a request for assigning a controller, where the destination address carried in the request message is an IP address that is required when any controller becomes the primary controller;
消息接收单元, 用于接收任一成为主控制器的控制器返回的用于指示 分配给本交换机的控制器的消息;  a message receiving unit, configured to receive a message returned by the controller that becomes the primary controller to indicate a controller allocated to the switch;
配置单元, 用于根据接收的消息, 配置所述主控制器分配的控制器。 结合第四方面, 在第一种可能的实现方式中, 所述请求发送单元, 具 体用于:  a configuration unit, configured to configure, according to the received message, a controller allocated by the primary controller. With reference to the fourth aspect, in a first possible implementation manner, the request sending unit is specifically configured to:
在初始接入时发送分配控制器的请求; 或者,  Sending a request to allocate a controller upon initial access; or,
在确定分配到的控制器均失效时发送分配控制器的请求。  A request to allocate a controller is sent when it is determined that all of the assigned controllers have failed.
第五方面, 一种控制器设备, 包括:  In a fifth aspect, a controller device includes:
处理器, 用于确定自身成为主控制器时, 启用用于当任一控制器成为 主控制器时需要使用的 IP地址; 当接收到任一交换机将所述 IP地址作为 目的地址发送的分配控制器的请求时, 确定分配给该交换机的控制器; 传输装置, 用于接收任一交换机将所述 IP地址作为目的地址发送的分 配控制器的请求, 以及向该交换机发送用于指示分配给该交换机的控制器 的消息。 The processor, when used to determine that it is the primary controller, enables an IP address to be used when any controller becomes the primary controller; and assigns control when any of the switches receives the IP address as the destination address Determining, by the device, a controller assigned to the switch; transmitting means for receiving a request from the distribution controller that the switch sends the IP address as the destination address, and sending the switch to indicate the assignment to the Switch controller Message.
结合第五方面, 在第一种可能的实现方式中, 所述处理器用于确定分 配给该交换机的控制器时, 具体用于:  With reference to the fifth aspect, in a first possible implementation manner, when the processor is used to determine a controller that is allocated to the switch, specifically:
确定当前各个控制器的负载状况;  Determine the current load status of each controller;
根据所述当前各个控制器的负载状况, 确定分配给该交换机的控制器。 结合第五方面或第五方面的第一种可能的实现方式, 在第二种可能的 实现方式中, 所述处理器确定的分配给该交换机的控制器, 包括:  The controller assigned to the switch is determined according to the load conditions of the current respective controllers. With reference to the fifth aspect, or the first possible implementation manner of the fifth aspect, in a second possible implementation, the determining, by the processor, the controller that is allocated to the switch includes:
分配给该交换机的主控控制器和辅助控制器, 所述辅助控制器用于当 所述主控控制器故障时, 接替所述主控控制器对该交换机进行管理。  The master controller and the auxiliary controller are allocated to the switch, and the auxiliary controller is configured to replace the master controller to manage the switch when the master controller fails.
结合第五方面, 在第三种可能的实现方式中, 所述传输装置用于接收 交换机发送的分配控制器的请求时, 具体用于:  With reference to the fifth aspect, in a third possible implementation manner, when the transmitting device is configured to receive a request from a distribution controller sent by a switch, specifically:
接收交换机在初次接入时发送的分配控制器的请求; 或者,  Receiving a request from the distribution controller sent by the switch at the initial access; or
接收交换机在确定分配到的控制器均失效时发送的分配控制器的请 求。  The request of the distribution controller sent by the receiving switch when it determines that the assigned controllers have failed.
结合第五方面, 在第四种可能的实现方式中, 所述处理器还用于确定 自身成为从属控制器时, 停用所述 IP地址。  In conjunction with the fifth aspect, in a fourth possible implementation, the processor is further configured to: when the slave controller is determined to be a slave controller, disable the IP address.
结合第五方面, 在第五种可能的实现方式中, 所述传输装置还用于接 收应用层设备将所述 IP地址作为目的地址发送的控制器管理消息。  With reference to the fifth aspect, in a fifth possible implementation, the transmitting apparatus is further configured to: receive, by the application layer device, a controller management message that is sent by using the IP address as a destination address.
第六方面, 一种交换机设备, 包括:  In a sixth aspect, a switch device includes:
传输装置, 用于发送分配控制器的请求, 该请求消息中携带的目的地 址为当任一控制器成为主控制器时需要使用的 IP地址; 接收任一成为主控 制器的控制器返回的用于指示分配给本交换机的控制器的消息;  a transmission device, configured to send a request for assigning a controller, where the destination address carried in the request message is an IP address that needs to be used when any controller becomes a primary controller; and receives any controller returned as a primary controller a message indicating the controller assigned to the switch;
处理器, 用于根据接收的消息, 配置所述主控制器分配的控制器。 结合第六方面, 在第一种可能的实现方式中, 所述传输装置用于发送 分配控制器的请求时, 具体用于:  a processor, configured to configure, according to the received message, a controller allocated by the primary controller. With reference to the sixth aspect, in a first possible implementation manner, when the transmitting apparatus is configured to send a request for a distribution controller, specifically:
在初始接入时发送分配控制器的请求; 或者,  Sending a request to allocate a controller upon initial access; or,
在确定分配到的控制器均失效时发送分配控制器的请求。  A request to allocate a controller is sent when it is determined that all of the assigned controllers have failed.
第七方面, 一种软件定义网络系统, 包括: 由多个控制器组成的控制 器集群, 以及交换机;  A seventh aspect, a software-defined network system, comprising: a controller cluster consisting of multiple controllers, and a switch;
所述控制器, 用于确定自身成为主控制器时, 启用用于当任一控制器 成为主控制器时需要使用的 IP地址; 当接收到任一交换机将所述 IP地址 作为目的地址发送的分配控制器的请求时, 确定分配给该交换机的控制器, 并向该交换机发送用于指示分配给该交换机的控制器的消息;  The controller is configured to enable an IP address to be used when any controller becomes a primary controller when it becomes a primary controller; and send the IP address as a destination address when any switch is received When assigning a request from the controller, determining a controller assigned to the switch and transmitting a message to the switch indicating the controller assigned to the switch;
所述交换机, 用于发送分配控制器的请求, 该请求消息中携带的目的 地址为当任一控制器成为主控制器时需要使用的 IP地址; 接收任一成为主 控制器的控制器返回的用于指示分配给本交换机的控制器的消息; 根据接 收的消息, 配置所述主控制器分配的控制器。  The switch is configured to send a request for a distribution controller, where the destination address carried in the request message is an IP address that needs to be used when any controller becomes the primary controller; receiving any controller that becomes the primary controller returns A message for indicating a controller assigned to the switch; configuring a controller assigned by the primary controller according to the received message.
本发明实施例, 任一控制器确定自身成为主控制器时, 启用用于当任 一控制器成为主控制器时需要使用的 IP地址; 当所述任一控制器接收到任 一交换机将所述 IP地址作为目的地址发送的分配控制器的请求时, 确定分 配给该交换机的控制器, 并向该交换机发送用于指示分配给该交换机的控 制器的消息。 通过在软件定义网络中预设主控制器专用的 IP地址, 使得交 换机能够通过该 IP地址找到主控制器并请求主控制器为自己分配控制器, 解决了交换机因为主控制器不确定而无法向主控制器发送请求的问题, 实 现了由主控制器为各个交换机分配控制器, 相比于人工配置的方法, 能够 更加高效地完成交换机的控制器配置。 附图说明 In the embodiment of the present invention, when any controller determines that it becomes the primary controller, the IP address used for when any controller becomes the primary controller is enabled; when any of the controllers receives any When a switch requests the allocation controller to send the IP address as the destination address, it determines the controller assigned to the switch and sends a message to the switch indicating the controller assigned to the switch. By presetting the IP address specific to the main controller in the software-defined network, the switch can find the main controller through the IP address and request the main controller to assign a controller to itself, which solves the problem that the switch cannot be The problem that the main controller sends the request realizes that the main controller allocates the controller for each switch, and the controller configuration of the switch can be completed more efficiently than the manually configured method. DRAWINGS
图 1是开放流技术的设备示意图;  1 is a schematic diagram of an apparatus of an open flow technology;
图 2是交换机的控制器配置示意图;  2 is a schematic diagram of a controller configuration of a switch;
图 3是本发明实施例提供的 SDN的自动配置方法的流程示意图; 图 4是本发明实施例提供的 SDN的自动配置方法的另一流程示意图; 图 5是本发明实施例提供的 SDN环境的部署流程示意图;  3 is a schematic flowchart of an automatic configuration method of an SDN according to an embodiment of the present invention; FIG. 4 is another schematic flowchart of an automatic configuration method of an SDN according to an embodiment of the present invention; Schematic diagram of the deployment process;
图 6是本发明实施例提供的 SDN中交换机和控制器的消息流示意图; 图 7是本发明实施例提供的控制器分配结果示意图;  6 is a schematic diagram of message flow of a switch and a controller in an SDN according to an embodiment of the present invention; FIG. 7 is a schematic diagram of a controller allocation result according to an embodiment of the present invention;
图 8是本发明实施例提供的控制器的重新选举的流程示意图; 图 9是本发明实施例提供的控制器的故障处理流程示意图;  8 is a schematic flowchart of a re-election of a controller according to an embodiment of the present invention; FIG. 9 is a schematic flowchart of a fault processing process of a controller according to an embodiment of the present invention;
图 10是本发明实施例提供的控制器设备的结构示意图;  FIG. 10 is a schematic structural diagram of a controller device according to an embodiment of the present invention;
图 11是本发明实施例提供的交换机设备的结构示意图;  11 is a schematic structural diagram of a switch device according to an embodiment of the present invention;
图 12是本发明实施例提供的控制设备的另一结构示意图;  FIG. 12 is another schematic structural diagram of a control device according to an embodiment of the present invention;
图 1 3是本发明实施例提供的交换机设备的另一结构示意图;  FIG. 13 is another schematic structural diagram of a switch device according to an embodiment of the present disclosure;
图 14是本发明实施例提供的 SDN系统的结构示意图。 具体实施方式  FIG. 14 is a schematic structural diagram of an SDN system according to an embodiment of the present invention. detailed description
本发明实施例提供了一种软件定义网络 SDN 的自动配置方法、 设备及 系统, 用于提高交换机的控制器配置效率。  The embodiments of the present invention provide an automatic configuration method, device, and system for a software-defined network SDN, which are used to improve controller configuration efficiency of a switch.
参见图 3, 本发明实施例提供的一种 SDN的自动配置方法, 包括:  Referring to FIG. 3, an automatic configuration method of an SDN according to an embodiment of the present invention includes:
S 30K 任一控制器确定自身成为主控制器时, 启用用于当任一控制器 成为主控制器时需要使用的 IP地址。  When any controller of the S 30K determines itself to be the primary controller, it enables the IP address to be used when any controller becomes the primary controller.
具体的, 控制器根据控制器集群管理软件的指示, 确定自身成为主控 制或从属控制器。 目前使用的控制器集群管理软件名为 zookeeper , 用于对 控制器集群进行管理。 每个控制器都预装有 zookeeper , 控制器之间通过 zookeeper进行选举以确定主控制器以及从属控制器。  Specifically, the controller determines that it becomes a master control or a slave controller according to an instruction of the controller cluster management software. The controller cluster management software currently used is called zookeeper and is used to manage the controller cluster. Each controller is pre-installed with a zookeeper, and the controllers are elected by zookeeper to determine the primary controller and the secondary controller.
每个控制器中预先配置有一个相同的 IP地址, 该 IP地址仅在控制器 被选举为主控制器时使用,控制器为从属控制器时不使用该 IP地址,同时, 各个交换机也会预先配置该 IP地址, 这样, 不论哪个控制器为主控制器, 交换机都能够通过该 IP地址向主控制器发送消息,建立与主控制器的联系。  Each controller is pre-configured with an identical IP address. The IP address is used only when the controller is elected as the primary controller. When the controller is a slave controller, the IP address is not used. At the same time, each switch is also pre-configured. The IP address is configured such that no matter which controller is the primary controller, the switch can send a message to the primary controller through the IP address to establish contact with the primary controller.
S 302、 当所述任一控制器接收到任一交换机将所述 IP地址作为目的地 址发送的分配控制器的请求时, 确定分配给该交换机的控制器, 并向该交 换机发送用于指示分配给该交换机的控制器的消息。 S302. When any one of the controllers receives any switch, the IP address is used as a destination. When a request is sent from the distribution controller, the controller assigned to the switch is determined and a message is sent to the switch indicating the controller assigned to the switch.
具体的, 主控制器在接收到交换机发送的分配控制器的请求时, 能够 通过解析请求消息获取到发送方交换机的 IP地址, 在确定分配给该交换机 的控制器之后, 通过所获取的发送方交换机的 IP地址将分配结果指示给该 交换机。  Specifically, when receiving the request of the distribution controller sent by the switch, the primary controller can obtain the IP address of the sender switch by parsing the request message, and after determining the controller allocated to the switch, pass the acquired sender. The IP address of the switch indicates the result of the assignment to the switch.
本发明实施例, 实现了由主控制器自动为各个交换机分配控制器, 提 升了交换机的配置效率。 对于没有发送分配控制器请求的交换机, 可能未 启动, 也可能已分配到控制器, 主控制器不需要进行分配。  In the embodiment of the present invention, the controller is automatically allocated to each switch by the main controller, which improves the configuration efficiency of the switch. For a switch that does not send a request to the distribution controller, it may not be started, or it may have been assigned to a controller, and the primary controller does not need to be assigned.
较佳的, 步骤 S302中所述任一控制器确定分配给该交换机的控制器, 包括: 所述任一控制器确定当前各个控制器的负载状况; 所述任一控制器 根据所述当前各个控制器的负载状况, 确定分配给该交换机的控制器。 根 据控制器的负载状况为交换机分配控制器, 能够均衡各个控制器的负载, 有效利用资源, 提高网络工作效率。 一种可能的具体分配方式是, 根据控 制器当前管理的交换机的数目确定各个控制器的分配优先级, 其中, 当前 管理的交换机的数目最少的控制器的分配优先级最高, 按照分配优先级为 交换机分配控制器。  Preferably, any controller in step S302 determines a controller that is allocated to the switch, and includes: any one of the controllers determines a current load status of each controller; The load status of the controller determines the controller assigned to the switch. The controller is assigned to the switch according to the load status of the controller, which can balance the load of each controller, effectively utilize resources, and improve network work efficiency. A possible specific allocation method is: determining the allocation priority of each controller according to the number of switches currently managed by the controller, wherein the controller with the least number of currently managed switches has the highest allocation priority, according to the allocation priority. The switch assigns a controller.
较佳的, 步骤 S302中确定的分配给该交换机的控制器, 包括: 分配给 该交换机的主控控制器和辅助控制器, 所述辅助控制器用于当所述主控控 制器故障时, 接替所述主控控制器对该交换机进行管理。 为交换机分配两 个控制器是一种典型的分配方案, 但是本发明实施例也可以为交换机分配 一个控制器或两个以上控制器。  Preferably, the controller allocated to the switch determined in step S302 comprises: a master controller and a secondary controller assigned to the switch, and the auxiliary controller is configured to replace when the master controller fails The master controller manages the switch. Assigning two controllers to a switch is a typical distribution scheme, but embodiments of the present invention may also assign one controller or more than two controllers to the switch.
较佳的, 步骤 S302中接收交换机发送的分配控制器的请求, 包括: 接 收交换机在初次接入时发送的分配控制器的请求; 或者, 接收交换机在确 定分配到的控制器均失效时发送的分配控制器的请求。 交换机在初始接入 Preferably, the receiving the request of the distribution controller sent by the switch in step S302 comprises: receiving a request of the allocation controller sent by the switch when initially accessed; or sending the receiving switch when determining that the allocated controllers are all invalid. A request to assign a controller. Switch in initial access
SDN网络时, 没有配置任何控制器, 向主控制器请求分配控制器; 当交换机 在运行过程中, 发现已分配的控制器先后失效时, 则重新向主控制器请求 分配控制器。 可见, 由主控制器为交换机分配控制器的方法, 相比于人工 为交换机配置控制器的方法, 能够及时地在交换机已分配的控制器均发生 故障时进行处理, 效率更高, 网络容错能力更强, 提升了 SDN的鲁棒性。 In the SDN network, no controller is configured, and the controller is requested to be allocated to the main controller. When the switch finds that the assigned controllers have failed in succession, the controller is requested again from the main controller. It can be seen that the method of assigning a controller to the switch by the main controller can process the controller in the event that the controller has been faulty in time, which is more efficient and network fault-tolerant than the method of manually configuring the controller for the switch. Stronger, improving the robustness of SDN.
较佳的, 该方法还包括: 所述任一控制器确定自身成为从属控制器时, 停用所述 IP地址。 具体的, 控制器在确定自身发生故障时确定自身成为从 属控制器, 或者, 控制器根据所述控制器集群管理软件的指示确定自身成 为从属控制器。 以使用 zookeepe r 进行控制器集群管理的场景为例, 各个 控制器的 zookeeper软件之间交互信息, 确定原主控制器失去大多数控制 器的支持, 或者确定原主控制器发生故障失去联系, 则重新发起选举确定 新的主控制器, 新确定的主控制器启用主控制器需要使用的 IP地址, 而原 主控制器成为从属控制器, 不再使用该 IP地址。 这样, 所有控制器可以看 作一个整体, 主控制器的变化对交换机是不可见的, 交换机不需要因为主 控制器变更进行任何操作, 仍然通过主控制器需要使用的 IP地址与主控制 器进行通信, 提升了网络的工作效率。 Preferably, the method further comprises: when the controller determines that it is a slave controller, deactivating the IP address. Specifically, the controller determines to become a slave controller when determining that it has failed, or determines that the controller becomes a slave controller according to the instruction of the controller cluster management software. Take the scene of controller cluster management using zookeepe r as an example. The zookeeper software of each controller exchanges information, determines that the original host controller loses support from most controllers, or determines that the original primary controller has failed to contact, and then re-initiates. The election determines the new primary controller. The newly determined primary controller enables the IP address that the primary controller needs to use, and the original primary controller becomes the secondary controller, and the IP address is no longer used. In this way, all controllers can be considered as a whole, and the changes of the main controller are invisible to the switch, and the switch does not need to be the main The controller changes any operation and still communicates with the main controller through the IP address that the main controller needs to use, which improves the working efficiency of the network.
较佳的, 该方法还包括: 所述任一控制器接收应用层设备将所述 IP地 址作为目的地址发送的控制器管理消息。 应用层设备用于向控制器下发流 表, 对控制器的流表进行管理等, 以及对主控制器进行配置、 管理, 因此, 应用层设备需要能够确定主控制器并与主控制器通信。 与交换机类似, 应 用层设备中预先配置有主控制器需要使用的 IP地址, 应用层设备能够通过 该 IP地址与主控制器进行通信, 主控制器的选举结果以及主控制器的变更 不会对应用层设备产生任何影响, 提升了网络的工作效率。  Preferably, the method further includes: the any controller receiving a controller management message that the application layer device sends the IP address as a destination address. The application layer device is used to send a flow table to the controller, manage the flow table of the controller, and configure and manage the main controller. Therefore, the application layer device needs to be able to determine the main controller and communicate with the main controller. . Similar to the switch, the application layer device is pre-configured with the IP address that the primary controller needs to use. The application layer device can communicate with the primary controller through the IP address. The election result of the primary controller and the change of the primary controller are not correct. The application layer device has any impact, which improves the efficiency of the network.
参见图 4, 本发明实施例提供的一种 SDN的自动配置方法, 包括: Referring to FIG. 4, an automatic configuration method of an SDN according to an embodiment of the present invention includes:
S40K 交换机发送分配控制器的请求, 该请求消息中携带的目的地址 为当任一控制器成为主控制器时需要使用的 IP地址。 The S40K switch sends a request to allocate a controller. The destination address carried in the request message is the IP address to be used when any controller becomes the primary controller.
S402、 所述交换机接收任一成为主控制器的控制器返回的用于指示分 配给所述交换机的控制器的消息。  S402. The switch receives a message returned by any controller that becomes the primary controller to indicate a controller assigned to the switch.
S403、 所述交换机根据接收的消息, 配置所述主控制器分配的控制器。 这样, 由主控制器自动为交换机分配控制器, 相比于人工在交换机中 输入该交换机配置的控制器, 提升了交换机的配置效率。  S403. The switch configures a controller allocated by the primary controller according to the received message. In this way, the controller is automatically assigned to the switch by the main controller, which improves the configuration efficiency of the switch compared to manually inputting the controller configured in the switch.
较佳的, 分配给交换机的控制器, 包括: 主控控制器和辅助控制器; 辅助控制器用于当主控控制器故障时, 接替主控控制器对本交换机进行管 理。  Preferably, the controller allocated to the switch includes: a master controller and a secondary controller; and the auxiliary controller is configured to take over the master controller to manage the switch when the master controller fails.
较佳的, 交换机发送分配控制器的请求, 包括:  Preferably, the switch sends a request to allocate a controller, including:
交换机在初始接入时发送分配控制器的请求; 或者,  The switch sends a request to allocate a controller upon initial access; or,
交换机在确定分配到的控制器均失效时发送分配控制器的请求。  The switch sends a request to the distribution controller when it determines that the assigned controllers have failed.
下面结合具体的应用场景, 对本发明实施例提供的方法进行说明。  The method provided by the embodiment of the present invention is described below in conjunction with a specific application scenario.
为了能够在现有的 SDN 中应用本发明实施例提供的方法, 每个控制器 上配置了一个相同的称作浮动(f loa t ing ) IP的 IP地址, 并添加了作为主 控制器时为交换机分配控制器的相应程序, 每个交换机上添加一个代理 ( agent )程序, 用于与主控制器进行控制器分配相关的通信, 代理程序中 也需要预先配置浮动 IP地址。 任一时刻, SDN内仅有主控制器在使用浮动 IP地址。  In order to be able to apply the method provided by the embodiment of the present invention in an existing SDN, each controller is configured with an identical IP address called a floating IP, and is added as a primary controller. The switch allocates the corresponding program of the controller, and an agent (agent) program is added to each switch for communication related to the controller allocation of the main controller, and the floating IP address needs to be pre-configured in the agent. At any one time, only the primary controller in the SDN is using a floating IP address.
参见图 5, SDN环境的部署流程包括:  Referring to Figure 5, the deployment process of the SDN environment includes:
S50 在应用层设备安装应用层功能软件, 并配置控制器的浮动 IP信 息用于后续业务通信;  The S50 installs the application layer function software on the application layer device, and configures the controller's floating IP information for subsequent service communication.
5502、 在各控制器安装控制器功能软件, 并为每个控制器配置同一浮 动 IP, 初始浮动 IP为推下 ( down )状态即未使用状态;  5502. Install controller function software on each controller, and configure the same floating IP for each controller, and the initial floating IP is a down state, that is, an unused state;
5503、 安装 zookeeper , zookeeper运行后开始管理控制器集群; 5503. After installing zookeeper, the zookeeper starts to manage the controller cluster;
5504、 zookeeper发起主控制器选举, 主控制器的浮动 IP为拉起( up ) 状态即使用状态, 从属控制器的浮动 IP保持为 down状态; 5504. The zookeeper initiates the election of the main controller, and the floating IP of the main controller is the up state, that is, the use state, and the floating IP of the slave controller is kept in the down state;
5505、 在各交换机安装交换机功能软件, 并在交换机的代理程序中配 置浮动 IP的信息; 5505. Install switch function software on each switch and configure it in the agent of the switch. Set the floating IP information;
5506、 交换机触发代理程序利用配置的浮动 IP与控制器集群通信, 获 取需要接入的控制器的信息;  5506. The switch triggering agent uses the configured floating IP to communicate with the controller cluster to obtain information about the controller that needs to be accessed.
5507、 主控制器收到代理程序发来的请求后, 为交换机分配需要接入 的控制器;  5507. After receiving the request sent by the agent, the primary controller allocates a controller that needs to be accessed to the switch.
5508、 代理程序接收返回的信息, 为交换机配置控制器。  5508. The agent receives the returned information and configures the controller for the switch.
参见图 6, 是 SDN中交换机和控制器的消息流示意图; 代理程序使用浮 动 IP向主控制器请求分配接入的控制器, 主控制器指示交换机配置分配的 控制器, 分配结果如图 7所示。  Referring to FIG. 6, is a message flow diagram of the switch and the controller in the SDN; the agent uses the floating IP to request the controller to allocate the access to the main controller, and the main controller instructs the switch to allocate the controller, and the allocation result is as shown in FIG. 7. Show.
参见图 8, 控制器集群的重新选举的流程包括:  See Figure 8. The re-election process of the controller cluster includes:
S80 主控制器故障或者失去大多数从属控制器支持;  The S80 master controller fails or loses most of the slave controller support;
5802、 zookeeper发起主控制器重新选举;  5802. The zookeeper initiates re-election of the main controller;
5803、 新的主控制器浮动 IP转为 up状态, 原主控制器成为从属控制 器, 浮动 IP转为 down状态。  5803, the new primary controller floating IP is turned to the up state, the original primary controller becomes the slave controller, and the floating IP is turned to the down state.
参见图 9, 交换机连接的控制器的故障处理流程包括:  See Figure 9. The fault handling process of the controller connected to the switch includes:
S90K 网络故障或者主控控制器进程异常, 交换机确定和主控控制器 的连接中断;  If the S90K network is faulty or the master controller process is abnormal, the switch determines that the connection with the master controller is interrupted.
5902、 交换机切换到辅助控制器上进行业务处理;  5902. The switch switches to the auxiliary controller for service processing.
5903、 网络故障或者辅助控制器进程异常, 交换机确定和辅助控制器 的连接中断;  5903, the network failure or the auxiliary controller process is abnormal, and the switch determines that the connection with the auxiliary controller is interrupted;
5904、 控制器触发代理程序通过浮动 IP与控制器集群中的主控制器通 信, 重新获取接入的控制器信息;  5904. The controller triggers the agent to communicate with the primary controller in the controller cluster through the floating IP, and regains the accessed controller information.
5905、 主控制器为交换机重新分配接入的控制器。  5905. The primary controller reassigns the accessed controller to the switch.
参见图 10、 本发明实施例提供的一种控制器设备包括:  Referring to FIG. 10, a controller device provided by an embodiment of the present invention includes:
IP地址启用单元 1001, 用于确定自身成为主控制器时, 启用用于当任 一控制器成为主控制器时需要使用的 IP地址;  The IP address enabling unit 1001 is configured to enable an IP address to be used when any controller becomes the primary controller when it is determined to be the primary controller;
分配指示单元 1002,用于当接收到任一交换机将所述 IP地址作为目的 地址发送的分配控制器的请求时, 确定分配给该交换机的控制器, 并向该 交换机发送用于指示分配给该交换机的控制器的消息。  The allocation instructing unit 1002 is configured to: when receiving a request from the distribution controller that the switch sends the IP address as the destination address, determine a controller allocated to the switch, and send the switch to indicate the allocation to the switch The message of the controller of the switch.
较佳的,所述分配指示单元 1002用于确定分配给该交换机的控制器时, 具体用于:  Preferably, when the allocation indication unit 1002 is used to determine the controller allocated to the switch, specifically for:
确定当前各个控制器的负载状况;  Determine the current load status of each controller;
根据所述当前各个控制器的负载状况, 确定分配给该交换机的控制器。 较佳的, 所述分配指示单元 1002确定的分配给该交换机的控制器, 包 括:  The controller assigned to the switch is determined according to the load conditions of the current respective controllers. Preferably, the controller assigned to the switch by the allocation indication unit 1002 includes:
分配给该交换机的主控控制器和辅助控制器, 所述辅助控制器用于当 所述主控控制器故障时, 接替所述主控控制器对该交换机进行管理。  The master controller and the auxiliary controller are allocated to the switch, and the auxiliary controller is configured to replace the master controller to manage the switch when the master controller fails.
较佳的, 所述分配指示单元 1002用于接收交换机发送的分配控制器的 请求时, 具体用于: Preferably, the allocation indication unit 1002 is configured to receive the distribution controller sent by the switch. When requested, it is specifically used to:
接收交换机在初次接入时发送的分配控制器的请求; 或者,  Receiving a request from the distribution controller sent by the switch at the initial access; or
接收交换机在确定分配到的控制器均失效时发送的分配控制器的请 求。  The request of the distribution controller sent by the receiving switch when it determines that the assigned controllers have failed.
较佳的, 该设备还包括:  Preferably, the device further comprises:
IP地址停用单元,用于确定自身成为从属控制器时,停用所述 IP地址。 较佳的, 该设备还包括:  The IP address deactivation unit is configured to deactivate the IP address when it is determined to be a slave controller. Preferably, the device further comprises:
应用层通信单元, 用于接收应用层设备将所述 IP地址作为目的地址发 送的控制器管理消息。  The application layer communication unit is configured to receive a controller management message that the application layer device sends the IP address as a destination address.
需要说明的是, 该实施例的控制器设备是为实现上述步骤 S301 - S302 的, 上述的对方法的解释和限定同样适用于本实施例的控制器设备。  It should be noted that the controller device of this embodiment is for implementing the above steps S301-S302, and the above explanation and limitation of the method are also applicable to the controller device of the embodiment.
参见图 11, 本发明实施例提供的一种交换机设备包括:  Referring to FIG. 11, a switch device provided by an embodiment of the present invention includes:
请求发送单元 1101, 用于发送分配控制器的请求, 该请求消息中携带 的目的地址为当任一控制器成为主控制器时需要使用的 IP地址;  The request sending unit 1101 is configured to send a request for assigning a controller, where the destination address carried in the request message is an IP address that is required when any controller becomes the primary controller;
消息接收单元 1102, 用于接收任一成为主控制器的控制器返回的用于 指示分配给本交换机的控制器的消息;  The message receiving unit 1102 is configured to receive a message returned by the controller that becomes the primary controller to indicate a controller that is allocated to the switch;
配置单元 1103, 用于根据接收的消息, 配置所述主控制器分配的控制 哭  a configuration unit 1103, configured to configure, according to the received message, a control assigned by the primary controller, crying
较佳的, 所述消息接收单元 1102接收的消息所指示的分配给本交换机 的控制器, 包括:  Preferably, the controller allocated to the switch indicated by the message received by the message receiving unit 1102 includes:
主控控制器和辅助控制器; 辅助控制器用于当主控控制器故障时, 接 替主控控制器对本交换机进行管理。  The main controller and the auxiliary controller; the auxiliary controller is used to replace the main controller to manage the switch when the main controller fails.
较佳的, 所述请求发送单元 1101, 具体用于:  Preferably, the request sending unit 1101 is specifically configured to:
在初始接入时发送分配控制器的请求; 或者,  Sending a request to allocate a controller upon initial access; or,
在确定分配到的控制器均失效时发送分配控制器的请求。  A request to allocate a controller is sent when it is determined that all of the assigned controllers have failed.
需要说明的是, 该实施例的交换机设备是为实现上述步骤 S401 - S403 的, 上述的对方法的解释和限定同样适用于本实施例的交换机设备。  It should be noted that the switch device of this embodiment is to implement the foregoing steps S401-S403, and the foregoing explanation and limitation of the method are also applicable to the switch device of the embodiment.
参见图 12, 本发明实施例提供的一种控制器设备包括:  Referring to FIG. 12, a controller device provided by an embodiment of the present invention includes:
处理器 1201, 用于确定自身成为主控制器时, 启用用于当任一控制器 成为主控制器时需要使用的 IP地址; 当接收到任一交换机将所述 IP地址 作为目的地址发送的分配控制器的请求时, 确定分配给该交换机的控制器; 传输装置 1202,用于接收任一交换机将所述 IP地址作为目的地址发送 的分配控制器的请求, 以及向该交换机发送用于指示分配给该交换机的控 制器的消息。  The processor 1201 is configured to enable an IP address to be used when any controller becomes the primary controller when it becomes the primary controller; and allocate the IP address as the destination address when any switch is received. At the request of the controller, determining a controller assigned to the switch; the transmitting device 1202, configured to receive a request from the distribution controller that the switch sends the IP address as the destination address, and send the switch to indicate the allocation A message to the controller of the switch.
较佳的, 所述处理器 1201用于确定分配给该交换机的控制器时, 具体 用于:  Preferably, when the processor 1201 is configured to determine a controller allocated to the switch, specifically, the processor 1201 is configured to:
确定当前各个控制器的负载状况; 根据所述当前各个控制器的负载状况, 确定分配给该交换机的控制器。 较佳的, 所述处理器 1201确定的分配给该交换机的控制器, 包括: 分配给该交换机的主控控制器和辅助控制器, 辅助控制器用于当主控 控制器故障时, 接替主控控制器对该交换机进行管理。 Determine the current load status of each controller; The controller assigned to the switch is determined according to the load conditions of the current respective controllers. Preferably, the controller allocated by the processor 1201 to the switch includes: a master controller and an auxiliary controller assigned to the switch, and the auxiliary controller is configured to take over the master when the master controller fails The controller manages the switch.
较佳的, 所述传输装置 1202用于接收交换机发送的分配控制器的请求 时, 具体用于:  Preferably, when the transmitting device 1202 is configured to receive a request from the distribution controller sent by the switch, the transmitting device 1202 is specifically configured to:
接收交换机在初次接入时发送的分配控制器的请求; 或者,  Receiving a request from the distribution controller sent by the switch at the initial access; or
接收交换机在确定分配到的控制器均失效时发送的分配控制器的请 求。  The request of the distribution controller sent by the receiving switch when it determines that the assigned controllers have failed.
较佳的, 所述处理器 1201还用于确定自身成为从属控制器时, 停用所 述 IP地址。  Preferably, the processor 1201 is further configured to disable the IP address when it becomes a slave controller.
较佳的, 所述传输装置 1202还用于接收应用层设备将所述 IP地址作 为目的地址发送的控制器管理消息。  Preferably, the transmitting device 1202 is further configured to receive, by the application layer device, the controller management message sent by using the IP address as a destination address.
参见图 13, 本发明实施例提供的一种交换机设备, 包括:  Referring to FIG. 13, a switch device provided by an embodiment of the present invention includes:
传输装置 1301, 用于发送分配控制器的请求, 该请求消息中携带的目 的地址为当任一控制器成为主控制器时需要使用的 IP地址; 接收任一成为 主控制器的控制器返回的用于指示分配给本交换机的控制器的消息;  The transmitting device 1301 is configured to send a request for allocating a controller, where the destination address carried in the request message is an IP address that needs to be used when any controller becomes the primary controller; receiving any controller that becomes the primary controller returns a message indicating the controller assigned to the switch;
处理器 1302, 用于根据接收的消息, 配置所述主控制器分配的控制器。 较佳的, 所述传输装置 1301接收的消息所指示的分配给本交换机的控 制器, 包括:  The processor 1302 is configured to configure, according to the received message, a controller that is allocated by the primary controller. Preferably, the controller allocated to the switch indicated by the message received by the transmitting device 1301 includes:
主控控制器和辅助控制器; 辅助控制器用于当主控控制器故障时, 接 替主控控制器对本交换机进行管理。  The main controller and the auxiliary controller; the auxiliary controller is used to replace the main controller to manage the switch when the main controller fails.
较佳的,所述传输装置 1301用于发送分配控制器的请求时,具体用于: 在初始接入时发送分配控制器的请求; 或者,  Preferably, when the transmitting device 1301 is configured to send a request for assigning a controller, specifically: sending a request for allocating a controller during initial access; or
在确定分配到的控制器均失效时发送分配控制器的请求。  A request to allocate a controller is sent when it is determined that all of the assigned controllers have failed.
参见图 14, 本发明实施例提供的一种 SDN系统, 包括: 由多个控制器 1401组成的控制器集群, 以及交换机 1402;  Referring to FIG. 14, an SDN system according to an embodiment of the present invention includes: a controller cluster composed of a plurality of controllers 1401, and a switch 1402;
所述控制器 1401, 用于确定自身成为主控制器时, 启用用于当任一控 制器成为主控制器时需要使用的 IP地址; 当接收到任一交换机将所述 IP 地址作为目的地址发送的分配控制器的请求时, 确定分配给该交换机的控 制器, 并向该交换机发送用于指示分配给该交换机的控制器的消息;  The controller 1401 is configured to enable an IP address to be used when any controller becomes a primary controller when it becomes a primary controller; and send the IP address as a destination address when receiving any switch Determining a controller request, determining a controller assigned to the switch, and transmitting a message to the switch indicating the controller assigned to the switch;
所述交换机 1402, 用于发送分配控制器的请求, 该请求消息中携带的 目的地址为当任一控制器成为主控制器时需要使用的 IP地址; 接收任一成 为主控制器的控制器返回的用于指示分配给本交换机的控制器的消息; 根 据接收的消息, 配置所述主控制器分配的控制器。  The switch 1402 is configured to send a request for the allocation controller, where the destination address carried in the request message is an IP address that needs to be used when any controller becomes the primary controller; receiving any controller that becomes the primary controller returns a message for indicating a controller assigned to the switch; configuring a controller assigned by the master controller according to the received message.
综上所述, 本发明实施例提供了一种 SDN 的自动配置方法、 设备及系 统, 通过在网络中定义预设 IP, 使得控制器集群对于应用层设备和交换机 而言是一个整体, 应用层设备和交换机不需要区分哪个控制器是主控制器, 实现了由主控制器自动为各个交换机分配控制器, 提升了交换机的配置效 率, 提升了系统的鲁棒性; 并且, 在主控制器变更时应用层设备和交换机 不受影响, 提高了网络效率。 In summary, the embodiment of the present invention provides an automatic configuration method, device, and system for an SDN. By defining a preset IP in the network, the controller cluster is a whole for the application layer device and the switch, and the application layer The device and the switch do not need to distinguish which controller is the primary controller, which realizes that the primary controller automatically allocates controllers for each switch, which improves the configuration efficiency of the switch. Rate, which improves the robustness of the system; and, when the main controller changes, the application layer devices and switches are not affected, improving network efficiency.
本领域内的技术人员应明白, 本发明的实施例可提供为方法、 系统、 或计算机程序产品。 因此, 本发明可釆用完全硬件实施例、 完全软件实施 例、 或结合软件和硬件方面的实施例的形式。 而且, 本发明可釆用在一个 或多个其中包含有计算机可用程序代码的计算机可用存储介质 (包括但不 限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。  Those skilled in the art will appreciate that 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 be embodied in the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
本发明是参照根据本发明实施例的方法、 设备(系统)、 和计算机程序 产品的流程图和 /或方框图来描述的。 应理解可由计算机程序指令实现流 程图和 /或方框图中的每一流程和 /或方框、 以及流程图和 /或方框图中 的流程和 /或方框的结合。 可提供这些计算机程序指令到通用计算机、 专 用计算机、 嵌入式处理机或其他可编程数据处理设备的处理器以产生一个 机器, 使得通过计算机或其他可编程数据处理设备的处理器执行的指令产 生用于实现在流程图一个流程或多个流程和 /或方框图一个方框或多个方 框中指定的功能的装置。  The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart and/or block diagrams, and combinations of flows and/or blocks in the flowcharts and/or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理 设备以特定方式工作的计算机可读存储器中, 使得存储在该计算机可读存 储器中的指令产生包括指令装置的制造品, 该指令装置实现在流程图一个 流程或多个流程和 /或方框图一个方框或多个方框中指定的功能。  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.
本发明的精神和范围。 这样, 倘若本发明的这些修改和变型属于本发明权 利要求及其等同技术的范围之内, 则本发明也意图包含这些改动和变型在 The spirit and scope of the invention. Thus, it is intended that the present invention covers such modifications and variations as the modifications and variations of the present invention are intended to be included within the scope of the present invention.

Claims

权利要求 Rights request
1、一种软件定义网络 SDN的自动配置方法,其特征在于, 该方法包括: 任一控制器确定自身成为主控制器时, 启用用于当任一控制器成为主 控制器时需要使用的 IP地址; 1. An automatic configuration method for software-defined network SDN, characterized in that the method includes: when any controller determines that it becomes the master controller, enabling the IP that needs to be used when any controller becomes the master controller address;
当所述任一控制器接收到任一交换机将所述 IP地址作为目的地址发送 的分配控制器的请求时, 确定分配给该交换机的控制器, 并向该交换机发 送用于指示分配给该交换机的控制器的消息。 When any controller receives a request from any switch to allocate the IP address as the destination address, determine the controller allocated to the switch, and send an instruction to the switch indicating allocation to the switch. messages from the controller.
2、 如权利要求 1所述的方法, 其特征在于, 所述任一控制器确定分配 给该交换机的控制器, 包括: 2. The method according to claim 1, characterized in that the any controller determines the controller assigned to the switch, including:
所述任一控制器确定当前各个控制器的负载状况; Any of the controllers determines the current load status of each controller;
所述任一控制器根据所述当前各个控制器的负载状况, 确定分配给该 交换机的控制器。 The any controller determines the controller assigned to the switch based on the current load status of each controller.
3、 如权利要求 1或 2所述的方法, 其特征在于, 所述分配给该交换机 的控制器, 包括: 3. The method according to claim 1 or 2, characterized in that the controller assigned to the switch includes:
分配给该交换机的主控控制器和辅助控制器, 所述辅助控制器用于当 所述主控控制器故障时, 接替所述主控控制器对该交换机进行管理。 A main control controller and an auxiliary controller are assigned to the switch. The auxiliary controller is used to take over the management of the switch from the main control controller when the main control controller fails.
4、 如权利要求 1所述的方法, 其特征在于, 接收交换机发送的分配控 制器的请求, 包括: 4. The method of claim 1, wherein receiving a request to allocate a controller sent by the switch includes:
接收交换机在初次接入时发送的分配控制器的请求; 或者, Receive the request to assign a controller sent by the switch upon initial access; or,
接收交换机在确定分配到的控制器均失效时发送的分配控制器的请 求。 Receives a request to assign a controller sent by the switch when it determines that all assigned controllers have failed.
5、 如权利要求 1所述的方法, 其特征在于, 该方法还包括: 5. The method of claim 1, characterized in that, the method further includes:
所述任一控制器确定自身成为从属控制器时, 停用所述 IP地址。 When any controller determines that it has become a slave controller, it deactivates the IP address.
6、 如权利要求 1所述的方法, 其特征在于, 该方法还包括: - 制器管理消息。 6. The method of claim 1, wherein the method further includes: - controller management messages.
7、一种软件定义网络 SDN的自动配置方法,其特征在于, 该方法包括: 交换机发送分配控制器的请求, 该请求消息中携带的目的地址为当任 一控制器成为主控制器时需要使用的 IP地址; 7. An automatic configuration method for software-defined network SDN, characterized in that the method includes: The switch sends a request to allocate a controller. The destination address carried in the request message is the one that needs to be used when any controller becomes the master controller. IP address;
所述交换机接收任一成为主控制器的控制器返回的用于指示分配给所 述交换机的控制器的消息; The switch receives a message returned by any controller that becomes the master controller indicating the controller assigned to the switch;
所述交换机根据接收的消息, 配置所述主控制器分配的控制器。 The switch configures the controller allocated by the main controller according to the received message.
8、 如权利要求 7所述的方法, 其特征在于, 所述交换机发送分配控制 器的请求, 包括: 8. The method of claim 7, wherein the switch sends a request to allocate a controller, including:
所述交换机在初始接入时发送分配控制器的请求; 或者, The switch sends a request to allocate a controller during initial access; or,
所述交换机在确定分配到的控制器均失效时发送分配控制器的请求。 The switch sends a request to allocate a controller when it is determined that all assigned controllers are invalid.
9、 一种控制器设备, 其特征在于, 该设备包括: IP地址启用单元, 用于确定自身成为主控制器时, 启用用于当任一控 制器成为主控制器时需要使用的 IP地址; 9. A controller device, characterized in that the device includes: The IP address enabling unit is used to determine when it becomes the master controller and enable the IP address that needs to be used when any controller becomes the master controller;
分配指示单元, 用于当接收到任一交换机将所述 IP地址作为目的地址 发送的分配控制器的请求时, 确定分配给该交换机的控制器, 并向该交换 机发送用于指示分配给该交换机的控制器的消息。 An allocation instruction unit, configured to determine the controller assigned to the switch when receiving a request from any switch to assign the IP address as the destination address, and send an instruction to the switch to assign the controller to the switch. messages from the controller.
10、 如权利要求 9 所述的设备, 其特征在于, 所述分配指示单元用于 确定分配给该交换机的控制器时, 具体用于: 10. The device according to claim 9, wherein when the allocation indication unit is used to determine the controller allocated to the switch, it is specifically used to:
确定当前各个控制器的负载状况; Determine the current load status of each controller;
根据所述当前各个控制器的负载状况, 确定分配给该交换机的控制器。 According to the current load status of each controller, the controller assigned to the switch is determined.
11、 如权利要求 9或 10所述的设备, 其特征在于, 所述分配指示单元 确定的分配给该交换机的控制器, 包括: 11. The device according to claim 9 or 10, characterized in that the controller assigned to the switch determined by the allocation instructing unit includes:
分配给该交换机的主控控制器和辅助控制器, 所述辅助控制器用于当 所述主控控制器故障时, 接替所述主控控制器对该交换机进行管理。 A main control controller and an auxiliary controller are assigned to the switch. The auxiliary controller is used to take over the management of the switch from the main control controller when the main control controller fails.
12、 如权利要求 9 所述的设备, 其特征在于, 所述分配指示单元用于 接收交换机发送的分配控制器的请求包括: 12. The device according to claim 9, wherein the allocation instruction unit is configured to receive the allocation controller request sent by the switch and includes:
所述分配指示单元接收交换机在初次接入时发送的分配控制器的请 求; 或者, The allocation instruction unit receives a request from the allocation controller sent by the switch during initial access; or,
所述分配指示单元接收交换机在确定分配到的控制器均失效时发送的 分配控制器的请求。 The allocation instructing unit receives a request to allocate a controller sent by the switch when it is determined that all allocated controllers have failed.
13、 如权利要求 9所述的设备, 其特征在于, 该设备还包括: 13. The device according to claim 9, characterized in that, the device further includes:
IP地址停用单元,用于确定自身成为从属控制器时,停用所述 IP地址。 The IP address deactivation unit is used to deactivate the IP address when it determines that it becomes a slave controller.
14、 如权利要求 9所述的设备, 其特征在于, 该设备还包括: 应用层通信单元, 用于接收应用层设备将所述 IP地址作为目的地址发 送的控制器管理消息。 14. The device according to claim 9, characterized in that the device further comprises: an application layer communication unit, configured to receive a controller management message sent by the application layer device using the IP address as a destination address.
15、 一种交换机设备, 其特征在于, 该设备包括: 15. A switch device, characterized in that the device includes:
请求发送单元, 用于发送分配控制器的请求, 该请求消息中携带的目 的地址为当任一控制器成为主控制器时需要使用的 IP地址; The request sending unit is used to send a request to allocate a controller. The destination address carried in the request message is the IP address that needs to be used when any controller becomes the main controller;
消息接收单元, 用于接收任一成为主控制器的控制器返回的用于指示 分配给本交换机的控制器的消息; The message receiving unit is used to receive a message returned by any controller that becomes the master controller to indicate the controller assigned to the switch;
配置单元, 用于根据接收的消息, 配置所述主控制器分配的控制器。 A configuration unit, configured to configure the controller assigned by the main controller according to the received message.
16、 如权利要求 15所述的设备, 其特征在于, 所述请求发送单元, 具 体用于: 16. The device according to claim 15, characterized in that the request sending unit is specifically used to:
在初始接入时发送分配控制器的请求; 或者, Send a request to assign a controller on initial access; or,
在确定分配到的控制器均失效时发送分配控制器的请求。 A request to allocate a controller is sent when it is determined that all assigned controllers have failed.
17、 一种软件定义网络 SDN 系统, 包括: 由多个控制器组成的控制器 集群, 以及交换机, 其特征在于, 17. A software-defined network SDN system, including: a controller cluster composed of multiple controllers, and a switch, characterized by:
所述控制器, 用于确定自身成为主控制器时, 启用用于当任一控制器 成为主控制器时需要使用的 IP地址; 当接收到任一交换机将所述 IP地址 作为目的地址发送的分配控制器的请求时, 确定分配给该交换机的控制器, 并向该交换机发送用于指示分配给该交换机的控制器的消息; 所述交换机, 用于发送分配控制器的请求, 该请求消息中携带的目的 地址为当任一控制器成为主控制器时需要使用的 IP地址; 接收任一成为主 控制器的控制器返回的用于指示分配给本交换机的控制器的消息; 根据接 收的消息, 配置所述主控制器分配的控制器。 The controller, when determining that it becomes the master controller, enables the IP address that needs to be used when any controller becomes the master controller; when receiving the IP address sent by any switch as the destination address When assigning a controller request, determine the controller assigned to the switch, And send a message to the switch indicating the controller assigned to the switch; the switch is used to send a request to assign a controller, and the destination address carried in the request message is when any controller becomes the master controller. The IP address that needs to be used; Receive a message returned by any controller that becomes the master controller indicating the controller assigned to this switch; Configure the controller assigned by the master controller according to the received message.
PCT/CN2014/078472 2013-11-21 2014-05-27 Automatic configuration method, device and system of software defined network WO2015074396A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201310594163.2A CN103618621B (en) 2013-11-21 2013-11-21 A kind of software defined network SDN method of automatic configuration, equipment and system
CN201310594163.2 2013-11-21

Publications (1)

Publication Number Publication Date
WO2015074396A1 true WO2015074396A1 (en) 2015-05-28

Family

ID=50169325

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/078472 WO2015074396A1 (en) 2013-11-21 2014-05-27 Automatic configuration method, device and system of software defined network

Country Status (2)

Country Link
CN (1) CN103618621B (en)
WO (1) WO2015074396A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105430116A (en) * 2015-11-30 2016-03-23 北京邮电大学 Control channel establishment method and device
CN115516829A (en) * 2020-06-02 2022-12-23 思科技术公司 Provisioning configuration changes with deployment freeze options

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103618621B (en) * 2013-11-21 2017-08-11 华为技术有限公司 A kind of software defined network SDN method of automatic configuration, equipment and system
CN104092560B (en) * 2014-06-10 2016-01-20 深圳市腾讯计算机系统有限公司 The method and system of switch connection control device cluster and switch and controller
CN104104572B (en) * 2014-07-15 2017-12-08 新华三技术有限公司 Interchanger automatic deployment method and device in a kind of SDN
CN104092774B (en) * 2014-07-23 2018-03-09 新华三技术有限公司 Control method and device are established in software defined network connection
CN105471755B (en) * 2014-09-03 2019-11-05 中兴通讯股份有限公司 The method and super controller of network flow equilibrium
CN105634765A (en) * 2014-10-29 2016-06-01 中兴通讯股份有限公司 Controller replacement method and controller replacement device
WO2016077948A1 (en) * 2014-11-17 2016-05-26 华为技术有限公司 Switch port control method, apparatus and system
CN104579975B (en) * 2015-02-10 2018-01-05 广州市品高软件股份有限公司 A kind of dispatching method of software defined network controller cluster
CN104579801B (en) * 2015-02-10 2018-01-16 广州市品高软件股份有限公司 A kind of dispatching method of software defined network controller cluster
CN105049549B (en) * 2015-08-07 2018-12-28 北京思特奇信息技术股份有限公司 A kind of method and system for realizing floating IP address automatic drift
CN106936608B (en) * 2015-12-29 2020-09-18 华为技术有限公司 Method, related equipment and system for establishing SSH connection
CN107809495B (en) * 2016-09-09 2021-06-22 华为技术有限公司 Address management method and device
CN108737125B (en) * 2017-04-13 2021-06-29 国网信息通信产业集团有限公司 SDN network multi-control-domain communication method and system
CN107294773B (en) * 2017-05-30 2020-01-31 浙江工商大学 software definable network service configuration method
CN107395439A (en) * 2017-08-24 2017-11-24 郑州云海信息技术有限公司 A kind of network collocating method, device and controller
CN108199890B (en) * 2018-01-11 2019-11-22 重庆邮电大学 A kind of software defined network resilient controller dispositions method
CN110391929B (en) * 2018-04-23 2022-07-26 深圳市格瑞信息科技有限公司 Fault-tolerant control method and device and fault-tolerant component
CN110838935B (en) * 2018-08-15 2023-01-03 上海宽带技术及应用工程研究中心 High-availability SDN controller clustering method, system, storage medium and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130058350A1 (en) * 2011-05-04 2013-03-07 Bryan J. Fulton Network control apparatus and method for port isolation
CN103067534A (en) * 2012-12-26 2013-04-24 中兴通讯股份有限公司 Network address translation (NAT) implementing system, method and openflow switch
CN103209121A (en) * 2013-03-15 2013-07-17 中兴通讯股份有限公司 Discovery method and device based on Open Flow protocol for control plane device
CN103618621A (en) * 2013-11-21 2014-03-05 华为技术有限公司 Method, device and system for automatic configuration of SDN

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100389392C (en) * 2006-05-29 2008-05-21 杭州华三通信技术有限公司 Method for realizing load uniform in clustering system, system and storage controller
CN101355521B (en) * 2008-09-12 2010-12-15 北京星网锐捷网络技术有限公司 Control method for equalizing load, communication apparatus and communication system
US20120250496A1 (en) * 2009-11-26 2012-10-04 Takeshi Kato Load distribution system, load distribution method, and program
US9769016B2 (en) * 2010-06-07 2017-09-19 Brocade Communications Systems, Inc. Advanced link tracking for virtual cluster switching
CN102882719B (en) * 2012-09-26 2015-06-17 盛科网络(苏州)有限公司 Method and system for implementation of redundant backup of controllers in Openflow switch system
CN103269278B (en) * 2013-04-19 2016-06-29 江苏省未来网络创新研究院 A kind of terminal unit based on SDN accesses in real time, leaves cognitive method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130058350A1 (en) * 2011-05-04 2013-03-07 Bryan J. Fulton Network control apparatus and method for port isolation
CN103067534A (en) * 2012-12-26 2013-04-24 中兴通讯股份有限公司 Network address translation (NAT) implementing system, method and openflow switch
CN103209121A (en) * 2013-03-15 2013-07-17 中兴通讯股份有限公司 Discovery method and device based on Open Flow protocol for control plane device
CN103618621A (en) * 2013-11-21 2014-03-05 华为技术有限公司 Method, device and system for automatic configuration of SDN

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
DIXIT, A. ET AL.: "Towards an Elastic Distributed SDN Controller", HOTSDN'13, 16 August 2013 (2013-08-16), pages 8 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105430116A (en) * 2015-11-30 2016-03-23 北京邮电大学 Control channel establishment method and device
CN105430116B (en) * 2015-11-30 2019-03-01 北京邮电大学 A kind of method and device for establishing control channel
CN115516829A (en) * 2020-06-02 2022-12-23 思科技术公司 Provisioning configuration changes with deployment freeze options
CN115516829B (en) * 2020-06-02 2024-05-17 思科技术公司 Provisioning configuration changes with deployment freeze options

Also Published As

Publication number Publication date
CN103618621B (en) 2017-08-11
CN103618621A (en) 2014-03-05

Similar Documents

Publication Publication Date Title
WO2015074396A1 (en) Automatic configuration method, device and system of software defined network
US10938710B2 (en) Protection switching method and system, and network device
US10171567B2 (en) Load balancing computer device, system, and method
EP3046288B1 (en) Virtual network function network elements management method, device and system
EP2993838B1 (en) Methods for setting a member identity of gateway device and corresponding management gateway devices
EP3016316B1 (en) Network control method and apparatus
WO2016015559A1 (en) Bearer resource allocation method, apparatus and system for cloudified data center network
US10979285B2 (en) Service transmission method, device, and system
JP6466003B2 (en) Method and apparatus for VNF failover
EP3588853A1 (en) Disaster recovery deployment method, device and system
JP6608069B2 (en) Address assignment method, gateway, and system
CN110061855B (en) Service processing method, system and device
WO2012083669A1 (en) Method and apparatus for switching between primary-standby devices based on access gateway
CN110661894A (en) User IP address allocation method, network device and storage medium
CN109495593B (en) Address allocation method and system
CN103546315A (en) System, method and equipment for backing up DHCP (dynamic host configuration protocol) server
WO2018161795A1 (en) Routing priority configuration method, device, and controller
JP2016119583A (en) Ip telephone network system, server, ip exchange unit and resource capacity expansion method
CN107547674B (en) Address allocation method and device
CN106254095B (en) The backup processing method and equipment of tunnel traffic
WO2011009326A1 (en) Method, device and broadband access server for service control
WO2015101100A1 (en) Network device and service processing method in network
CN107769973B (en) Message forwarding method and device
CN113596188A (en) Multi-device management method and device
WO2015106506A1 (en) Methods for setting control information and establishing communication, management controller and controller

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

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

Country of ref document: EP

Kind code of ref document: A1