WO2015106506A1 - Methods for setting control information and establishing communication, management controller and controller - Google Patents

Methods for setting control information and establishing communication, management controller and controller Download PDF

Info

Publication number
WO2015106506A1
WO2015106506A1 PCT/CN2014/076687 CN2014076687W WO2015106506A1 WO 2015106506 A1 WO2015106506 A1 WO 2015106506A1 CN 2014076687 W CN2014076687 W CN 2014076687W WO 2015106506 A1 WO2015106506 A1 WO 2015106506A1
Authority
WO
WIPO (PCT)
Prior art keywords
controller
forwarding device
network
information
management
Prior art date
Application number
PCT/CN2014/076687
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 WO2015106506A1 publication Critical patent/WO2015106506A1/en

Links

Classifications

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

Definitions

  • the present invention relates to the field of network communication technologies, and in particular, to a configuration, a connection method, a management controller, and a controller in a software-defined network. Background technique
  • SDN Software Defined Network
  • the typical architecture of SDN is divided into three layers, the uppermost layer is the application layer, including various services and applications; the middle control layer is mainly responsible for processing the data plane resources, maintaining network topology, state information, etc.; the lowest infrastructure The layer is responsible for data processing, forwarding, and state collection based on flowtables.
  • the control and forwarding of traffic depend on the implementation of the network device, and the operating system and dedicated hardware tightly coupled with the service characteristics are integrated in the device. These operating systems and dedicated hardware are developed and designed by each manufacturer. .
  • the forwarding device is only responsible for pure data forwarding, and its hardware architecture will tend to be unified, and its components tend to be generalized among various vendors.
  • the original control plane responsible for routing, security, policy, QoS, traffic engineering, etc. will be implemented by a dedicated SDN controller. Service functions and features such as routing, security, policy, QoS, and traffic engineering can be implemented programmatically.
  • the SDN controller has no fixed requirements for the hardware form. It can be a device, a virtual machine or a physical server.
  • the protocol for communication between the forwarding device and the SDN controller is generally the OpenFlow protocol.
  • the forwarding device establishes a connection with the controller and transmits the information using the OpenFlow protocol.
  • a forwarding device can establish connections with multiple controllers. These controllers have different roles and can be classified into three types: MASTER, SLAVE, and EQUAL.
  • MASTER has forwarding The full control authority of the device. For a forwarding device, the MASTER controller is unique. SLAVE has read-only access and can have multiple controllers for this identity. EQUAL, with full control of the forwarding device, can have multiple controllers for this identity. It can be seen that there is a management relationship between the controller and the forwarding device. The so-called management relationship includes: What identity is the controller connected with which forwarding devices in the network, that is, the connection between the forwarding device and the controller. Relationship and controller identity information. To illustrate in detail the management relationship between the controller and the forwarding device, an example is given below.
  • the first controller establishes a connection with the first forwarding device, and the first controller acts as the MASTER controller of the first forwarding device;
  • the second controller establishes a connection with the second forwarding device, and the second controller acts as the second forwarding device The MASTER controller;
  • the third controller establishes a connection with the third and fourth forwarding devices, and the third controller acts as the MASTER controller of the third and fourth forwarding devices.
  • the management relationship between the controller and the forwarding device is: the first controller establishes a connection with the first forwarding device as the MASTER controller; the second controller is the identity of the MASTER controller and the second forwarding device. A connection is established; the third controller establishes a connection with the third and fourth forwarding devices as the MASTER controller. Further, if the third controller is also the SALVE controller of the first forwarding device, the management relationship in the network further includes: the third controller establishes a connection with the first forwarding device as the identity of the SALVE controller.
  • the management relationship between each controller and the forwarding device is determined through election, and since each controller is in the same level relationship and operates independently, the management relationship between each controller and the forwarding device is mutually exclusive. Influential, this will result in an unreasonable management relationship between the controller and the forwarding device in the network.
  • a controller in the network has better performance, so most of the forwarding devices that pass the election determine the MASTER controller (here, the MASTER controller is used as an example, or other controllers of other identities).
  • the MASTER controller is used as an example, or other controllers of other identities.
  • Causing the controller's load to be overloaded The other controllers in the network may be in an idle state. Because the controllers operate independently, the management relationship between the controllers and the forwarding devices does not affect each other, so the controller in the overload state will always be overloaded.
  • the controller that is idle is also in an idle state. Summary of the invention
  • the embodiments of the present invention provide a method for setting control information, establishing a communication, and a management controller and a controller, thereby solving the problem that the management relationship between the controller and the forwarding device in the existing software-defined network is unreasonable.
  • An embodiment of the present invention provides a method for setting control information, including: a management controller acquiring information of a controller and a forwarding device in a network; and a management controller setting each controller to a forwarding device according to information of the controller and the forwarding device. Control information; The management controller sends control information to the corresponding controller.
  • control information comprises: management information of the forwarding device allocated by the controller to the controller; and control authority of the controller to the forwarding device assigned to the controller.
  • the management controller before the management controller acquires the information of the controller and the forwarding device in the network, the management controller further includes: the management controller establishes communication with all forwarding devices found in the network.
  • the management controller sets or updates the control information of the corresponding controller:
  • New forwarding devices and/or controllers in the network are New forwarding devices and/or controllers in the network.
  • the forwarding device and/or controller sends a fault.
  • the management controller when a new controller or a controller in the network is in an idle state, obtains information about the controller and the forwarding device in the network, including: adding a controller or being idle. Controller information; management controller setting controller control information includes: management controller adjusts existing controllers in the network according to controller and forwarding device information Control information for the forwarding device; assigning a forwarding device to the newly added controller or the controller in an idle state;
  • the management controller obtains information about the controller and the forwarding device in the network, including: adding information of the forwarding device; and managing the controller to set the controller to control the forwarding device includes: The new forwarding device specifies the controller, and is set to control the newly added forwarding device by the controller specified by the new forwarding device.
  • the management controller sets the controller's control information for the forwarding device to include: the management controller assigns a new controller to the forwarding device connected to the failed controller, and sets a new controller pair The control authority of the forwarding device to which the failed controller is connected.
  • the information of the controller in the network acquired by the management controller includes: a load condition of the controller;
  • the management controller sets the control information of the controller to the forwarding device according to the controller information, including: the management controller sets the control information of the controller to the forwarding device according to the load condition.
  • the information of each controller and the forwarding device in the network acquired by the management controller includes: a load condition of the controller and a network topology of the controller and the forwarding device in the network;
  • the management controller sets the control information of the controller to the forwarding device according to the controller and the forwarding device information.
  • the management controller includes: the management controller sets the control information of the controller to the forwarding device according to the load situation and the network topology.
  • the present invention also provides a method for establishing communication, specifically comprising: the controller transmitting its own information to the management controller;
  • the controller receives control information of the controller and the forwarding device set by the controller according to the information of the controller and the forwarding device;
  • the controller establishes communication with the corresponding forwarding device according to the control information.
  • the information sent to the management controller includes: a load condition of the controller.
  • the present invention also provides a management controller, which is applied in a software-defined network, where the management controller includes a first Ethernet port, a first memory, and a processor, where the first Ethernet port is used to acquire a controller and forward in the network.
  • the information of the device is stored in the first memory; the first memory is further configured to set control information of the controller to the forwarding device according to the information of the controller and the forwarding device; the first Ethernet port is further configured to send the control information to the corresponding Controller.
  • the first Ethernet port is also used to establish communication with all forwarding devices found in the network during network initialization.
  • the processor is further configured to detect whether at least a forwarding device and/or a controller is added to the network, whether the controller is in an idle state, and whether the forwarding device and/or the controller are faulty. In one case, if yes, the control information of the corresponding controller is set or updated.
  • the information of the controller and the forwarding device in the network acquired by the first Ethernet interface is: a load condition of the controller and a network topology of the controller and the forwarding device; the processor is configured to use the load according to the load The situation and the network topology set the controller's control information for the forwarding device.
  • the present invention further provides a controller, which is applied in a software-defined network, where the controller includes a second Ethernet port, and the second Ethernet port is used to send information of the controller itself to a management controller in the network;
  • the second Ethernet port is further configured to receive, by the management controller, control information of the controller to the forwarding device according to the information set by the controller and the forwarding device; the second Ethernet port is further configured to use the controller information and the corresponding forwarding device. Establish communication.
  • the controller further includes a second memory, where the second memory is used to calculate the load condition of the controller; and the information of the controller itself sent by the second Ethernet port is: the load condition of the controller .
  • the invention also provides another management controller, which includes a first Ethernet port, a first memory and a processor, the first Ethernet port is configured to acquire information of the controller and the forwarding device in the network, and is stored in the first memory; the first memory is further configured to set the controller according to the information of the controller and the forwarding device Control information for the forwarding device; the first Ethernet port is further configured to send control information to the corresponding controller.
  • another management controller which includes a first Ethernet port, a first memory and a processor, the first Ethernet port is configured to acquire information of the controller and the forwarding device in the network, and is stored in the first memory; the first memory is further configured to set the controller according to the information of the controller and the forwarding device Control information for the forwarding device; the first Ethernet port is further configured to send control information to the corresponding controller.
  • the present invention further provides another controller, the controller includes a second Ethernet port, and the second Ethernet port is configured to send information of the controller itself to a management controller in the network; the second Ethernet port further The controller is configured to receive control information of the forwarding device according to the information set by the controller and the forwarding device, and the second Ethernet port is further configured to establish communication with the corresponding forwarding device according to the controller information.
  • the beneficial effects of the invention are:
  • the invention provides a method for setting control information, establishing communication, a management controller and a controller, which can solve the problem that the management relationship between the controller and the forwarding device in the existing software-defined network is unreasonable.
  • the method provided by the present invention specifically includes: the management controller acquires information of the controller and the forwarding device in the network; the management controller sets control information of each controller to the forwarding device according to the information of the controller and the forwarding device; the management controller controls The information is sent to the corresponding controller.
  • the control information setting method provided by the present invention is to set the control information of each controller according to the acquired information of the controller and the forwarding device, and the control information is set from a macroscopic point of view, so that the forwarding device and the controller are The management relationship between the two is more reasonable.
  • FIG. 1 is a schematic structural diagram of a software-defined network in the prior art
  • FIG. 2 is a schematic structural diagram of a software definition network according to Embodiment 2 of the present invention.
  • FIG. 3 is a schematic structural diagram of a software definition network according to Embodiment 3 of the present invention.
  • FIG. 4 is a schematic structural diagram of a software definition network according to Embodiment 4 of the present invention.
  • FIG. 5 is a schematic structural diagram of a management controller according to Embodiment 6 of the present invention
  • FIG. 6 is a schematic structural diagram of a controller according to Embodiment 7 of the present invention
  • FIG. 7 is a schematic structural diagram of a management controller according to Embodiment 8 of the present invention.
  • FIG. 8 is a schematic structural diagram of a controller according to an embodiment of the present invention.
  • FIG. 9 is a schematic structural diagram of a management controller according to an embodiment of the present invention. detailed description
  • Embodiment 1 is a diagrammatic representation of Embodiment 1:
  • the embodiment provides a method for setting control information. As shown in FIG. 2, the method includes the following steps: Step 201: The management controller acquires information about a controller and a forwarding device in the network; Step 202: The controller is based on the controller and the forwarding device. Information, setting control information of each of the controllers on the forwarding device;
  • Step 203 The management controller sends control information to the corresponding controller.
  • the control information includes at least: information of a forwarding device allocated by the management controller to the controller; and control authority of the controller to the forwarding device assigned to the controller.
  • the information of the forwarding device allocated by the management controller to the controller includes: address information of the forwarding device.
  • the control authority of the controller to the forwarding device assigned to it is: The controller reads and writes the right to the forwarding device. For example, when the controller establishes a connection with the forwarding device as the MASTER controller, the controller has full control of the forwarding device. When the controller establishes a connection with the forwarding device as the SLAVE controller, the controller has read-only access and can have multiple controllers for this identity. When the controller establishes a connection with the forwarding device as the EQUAL controller, the controller has full control rights for the forwarding device, and multiple controllers can have this identity.
  • the management controller may allocate multiple forwarding devices to the controller.
  • the controller communicates with multiple forwarding devices, there may be a controller that is a MASTER controller for a part of the forwarding devices.
  • the identity is SLAVE Controller.
  • the controller may have different control rights for the controller with which it communicates.
  • at least one controller may be determined as a management controller from among existing controllers in the software-defined network, and at least one new controller may be re-arranged as a management controller for the network. If the management controller is determined from an existing controller in the software-defined network, at least one controller may be set as a management controller by means of artificial setting, or at least one management controller may be elected by election. .
  • Each controller has an ID number, which can be specified manually or automatically based on its address.
  • the election method is that the controllers broadcast their ID numbers to each other, and the controller with the largest ID number is automatically selected. Because each controller knows how many controllers are in the network and the addresses of those controllers, it knows when all the ID numbers have been received.
  • the management controller before the management controller acquires the information of each controller and the forwarding device in the network, the management controller first discovers the controller and the forwarding device in the network, and the forwarding device may include a switch; After the switch or controller is powered on, it will request to assign an address and send a Hello message so that the device connected to it discovers it.
  • the controller If the controller and the management controller are directly connected, after the controller is powered on, the controller requests the management controller and other devices connected to the management controller to allocate an address and send a Hello message; After receiving the message, the controller discovers the controller, thereby obtaining information of the controller from the controller.
  • the controller may send a Hello message to the management controller through the forwarding device that has established communication with the management controller, so that the management controller discovers The controller acquires information of the controller.
  • the management controller is very likely Without knowing the information of other controllers in the network, the management controller must first discover all the controllers in the network. All the controllers here refer to the controllers in the network that are working normally.
  • the management controller establishes communication with all the forwarding devices found in the network before acquiring all the controller information in the network where the network is located, so that the information of the forwarding device can be obtained from the forwarding device, and the communication is established through the communication device.
  • the forwarding device discovers other forwarding devices and controllers in the network.
  • the management controller can obtain information of all controllers and forwarding devices in the network, so that the control information of the forwarding device can be set according to the information of the forwarding device and the controller in the network.
  • the management controller when the management controller knows at least one of the following situations, the management controller configures the management relationship between the forwarding device and the controller: a new forwarding device and/or a controller in the network; There is a controller in the idle state; the forwarding device and/or controller has failed.
  • the hello can be directly sent to the management controller.
  • the management controller can be informed by the forwarding device and/or controller to which it is connected.
  • the forwarding device connected to it can inform the management controller by sending "Unable to connect to the management controller" to the management controller.
  • the management controller acquires information about the controller and the forwarding device in the network, including: adding a controller or a controller in an idle state. information.
  • the management controller sets the control information of the controller, including: the management controller adjusts control information of the existing controller in the network to the forwarding device according to the information of the controller and the forwarding device; is added to the controller or is in an idle state.
  • the controller assigns a forwarding device. Since there is only one MASTER controller for each forwarding device, if the newly added controller or the idle controller is configured as the MASTER controller to the selected forwarding device, the forwarding device must be disconnected from the previously connected MASTER controller. Communication; if the newly added controller or the idle controller is configured as a SALVE controller or an EQUAL controller to the selected forwarding device, the forwarding device can select whether to disconnect the previously connected controller according to the specific situation.
  • the management controller when the forwarding device is newly added to the network, the management controller further acquires information about the newly added forwarding device.
  • the management controller setting the controller to control the forwarding device may include: The added forwarding device specifies the controller, and is set to control the newly added forwarding device by the controller specified by the new forwarding device.
  • setting the control information of the controller to the forwarding device may include: the management controller assigning a new controller to the forwarding device connected to the failed controller, and setting a new controller pair Control authority for the forwarding device that is connected to the failed controller.
  • the controller's control right to the forwarding device When setting the controller's control right to the forwarding device, it can be set according to the control authority of the failed controller to the forwarding device.
  • the fault controller is the MASTER controller of the forwarding device
  • the controller designated by the management controller for the forwarding device has all control rights to the forwarding device and is the MASTER controller of the forwarding device.
  • the information of the controller and the forwarding device acquired by the management controller includes at least one of the following: a performance of the controller, a load condition, a network topology of the controller and the forwarding device.
  • the management controller obtains the performance information of each controller, analyzes the performance information, calculates the number of forwarding devices most suitable for the controller, and allocates the forwarding to the controller according to the calculation result. The number of devices.
  • the management controller acquires the load status of each controller in the network, and sets the control information of the controller to the forwarding device according to the load condition.
  • the management controller obtains the load status of each controller in the network, and obtains various methods.
  • Method 1 The management controller records the number of forwarding devices managed by each controller. Therefore, the load condition of each controller is known; Method 2: All controllers calculate their load conditions in real time, and periodically transmit their load conditions to the management controller.
  • Each controller can calculate the load by the following methods: (1) calculating the load by using the bandwidth usage of the management interface connected to the forwarding device by the controller; (2) periodically counting the number of flow tables sent by the controller to the forwarding device, Calculate the load based on the number of flow tables. After the management controller knows the load status of each controller, in setting the controller's control information for the forwarding device, the principle is set to: Ensure load balancing of each controller.
  • the management controller can obtain the network topology of the controller and the forwarding device in the network by acquiring the addresses of the controllers and the forwarding devices in the network.
  • the management controller learns the connection topology of the new forwarding device based on the address of the forwarding device or controller connected to the newly added forwarding device.
  • the setting principle is: Ensure that the connection hop between the controller establishing the communication and the forwarding device is small.
  • the management controller can simultaneously acquire the load condition of the controller and the network topology of the controller and the forwarding device in the network, manage the integrated load situation of the controller, and the network topology information, and configure the forwarding device and the controller.
  • manage the integrated load situation of the controller, and the network topology information and configure the forwarding device and the controller.
  • the management controller may notify the controller of the control information of the forwarding device by sending a message.
  • the forwarding device includes a switch, an optical network, and the like.
  • this embodiment provides how the management controller sets the control information of the controller to the forwarding device by the method provided by the present invention during the network initialization process.
  • the forwarding device is a switch.
  • the SDN network has 3 controllers and 11 switches.
  • the controller and the switch communicate with each other through a 100M Ethernet connection to deliver openflow protocol packets.
  • the switches are connected through 10 Gigabit Ethernet (10GE) to transmit service packets and openflow protocol packets.
  • the initialization process of the network firstly sets the first controller as the management controller.
  • the management controller first discovers the second switch, specifies its MASTER controller as the first controller, and uses the openflow protocol pair.
  • the second switch is configured to establish communication between the second switch and the controller after the configuration.
  • the "new access message" is notified to the management controller.
  • the management controller assigns its MASTER controller to the first controller, the third switch, and the eighth switch as the first controller, and configures it with the openflow protocol. After the configuration, the first, third, and eighth switches and controls are configured. Communication is established between the devices. Similarly, other switches and two other controllers were also discovered.
  • the number of switches responsible for the first controller is 11, the number of switches responsible for the second controller is 0, and the switch responsible for the third controller The number is 0.
  • the management controller re-designates the MASTER controller of the switch, and the specific process is: (1) retaining the MASTER controllers of the first, second, eighth, and ninth switches as the first controller; (2) to the second control
  • the device sends 4 "MASTER controller allocation messages," and the 4 messages respectively contain the addresses of the third, fourth, fifth, and seventh switches, and the second controller establishes an openflow with the four switches after receiving the message.
  • the "Load Statistics Table" of the management controller records the following items: The number of switches responsible for the first controller is 4, the number of switches responsible for the second controller is 4, and the number of switches responsible for the third controller is 3. At this point, the controller's load is more balanced.
  • the present embodiment provides how the management controller sets the controller's control information for the forwarding device by the method provided by the present invention when a controller fails.
  • the forwarding device is a switch.
  • the MASTER controllers of the first, second, eighth, and ninth switches are the first controller, and the MASTER controllers of the third, fourth, fifth, and seventh switches are the second.
  • the MASTER controller of the controller, the sixth, tenth, and eleventh switches is a third controller.
  • the first controller is a management controller, and the second controller and the third controller send a "load statistics message" to the first controller every 10 seconds, and the first controller uses these messages to generate a "load statistics table". If the second controller fails to cause unreachability, the third, fourth, fifth, and seventh switches send a "MASTER controller unreachable" message to the management controller.
  • the management controller utilizes the "load statistics table, and the network topology (assuming the load conditions of the first controller and the third controller are equivalent), and selects the first load for the third and fourth switches with a light load and a small number of connection hops.
  • the controller acts as the MASTER controller, and selects the third controller with light load and fewer connection hops as the MASTER controller for the fifth and seventh switches.
  • the management controller allocates the controller for the twelfth switch, the controller The structure of the network is shown in Figure 4. Example 4:
  • this embodiment provides how the management controller sets the controller to the forwarding device by using the method provided by the present invention when a forwarding device is newly added in the network. Control information.
  • the forwarding device is a switch.
  • the MASTER controllers of the first, second, eighth, and ninth switches are the first controller
  • the MASTER controllers of the third, fourth, fifth, and seventh switches are the first
  • the controller of the second controller, the MASTER controller of the sixth, tenth, and eleventh switches is a third controller.
  • the "load statistics table of the management controller the following items are recorded: the number of switches responsible for the first controller is 4, the number of switches responsible for the second controller is 4, and the number of switches responsible for the third controller is 3.
  • a new twelfth switch is added to the network, and the fifth switch and the sixth interaction machine send a "new access message" notification management controller to the management controller.
  • the management controller is based on the "load statistics table" and The network topology selects the third controller with light load and fewer connection hops as the MASTER controller for the twelfth switch. At the same time, the number of switches responsible for the third controller in the management controller update "load statistics table" is 4
  • the management controller sends a "MASTER controller allocation message" to the third controller, the message includes the address of the twelfth switch, and after receiving the message, the third controller establishes an openflow connection with the twelfth switch, and configures the MASTER identity. Twelfth switch.
  • the second controller can be set as the standby management controller.
  • the first controller is unreachable, it is automatically upgraded to the primary management controller.
  • This embodiment provides a method for establishing a communication, as shown in FIG. 6, including:
  • Step 601 The controller sends its own information to the management controller in the network.
  • Step 602 The controller receives control information sent by the management controller, where the control information is the management controller. Control information of the controller to the forwarding device according to the information of the controller and the forwarding device;
  • Step 603 The controller establishes communication with the corresponding forwarding device according to the control information.
  • the information of the self includes: a load condition of the controller.
  • Example 6
  • the present embodiment provides a management controller, which is configured according to the management controller in the above method.
  • the method includes: an obtaining module 71, a setting module 72, and a first sending module 73;
  • the obtaining module 71 is configured to obtain information about the controller and the forwarding device in the network;
  • the setting module 72 is configured to set control information of the controller to the forwarding device according to the information of the controller and the forwarding device;
  • the first sending module 73 is configured to send the control information to a corresponding controller.
  • the management controller may further include a first communication module configured to establish communication with all forwarding devices found in the network.
  • the management controller may further include a monitoring module configured to monitor whether a forwarding device and/or a controller is newly added in the network, whether the controller is in an idle state, whether the forwarding device and/or the controller are faulty. At least one of the cases, if yes, notifying the setting module to set or update the control information of the corresponding controller.
  • the obtaining module 71 is configured to acquire the load condition of the controller in the network and the network topology of the controller and the forwarding device.
  • the setting module 72 is configured to set the controller to control the forwarding device according to the load situation and the network topology. information.
  • the information of the forwarding device allocated by the management controller to the controller includes: address information of the forwarding device.
  • the controller has the control permission for the forwarding device assigned to it: the controller has read and write permissions to the forwarding device. For example, when the controller establishes a connection with the forwarding device as the MASTER controller, the controller has full control of the forwarding device. When the controller establishes a connection with the forwarding device as the SLAVE controller, the controller has read-only access and can have multiple controllers for this identity. When the controller establishes a connection with the forwarding device as the EQUAL controller, the controller has full control rights of the forwarding device, and multiple controllers can have this identity.
  • the management controller may allocate multiple forwarding devices to the controller.
  • controller When the controller communicates with multiple forwarding devices, there may be a controller that is a MASTER controller for a part of the forwarding devices.
  • the identity of the other part of the forwarding device is the SLAVE controller. This means that the controller may have different control rights for the controller with which it communicates.
  • At least one controller may be determined as a management controller from among existing controllers in the software-defined network, or at least one new controller may be re-arranged as a management controller for the network. If the management controller is determined from an existing controller in the software-defined network, at least one controller may be set as a management controller by means of artificial setting, or at least one management controller may be elected by election. .
  • Each controller has an ID number, which can be specified manually or automatically based on its address.
  • the election method is that the controllers broadcast their ID numbers to each other, and the controller with the largest ID number is automatically selected. Because each controller knows how many controllers are in the network and the addresses of those controllers, it knows when all the ID numbers have been received.
  • the management controller before the management controller acquires the information of each controller and the forwarding device in the network, the management controller first discovers the controller and the forwarding device in the network, and the forwarding device may include a switch; After the switch or controller is powered on, it will request to assign an address and send a Hello message so that the device connected to it discovers it.
  • the controller If the controller and the management controller are directly connected, after the controller is powered on, the controller requests the management controller and other devices connected to the management controller to allocate an address and send a Hello message; After receiving the message, the controller discovers the controller, thereby obtaining information of the controller from the controller.
  • the controller can pass The management controller has established a forwarding device for communication, and sends a Hello message to the management controller, so that the management controller discovers the controller and acquires information of the controller.
  • the management controller may not know the information of other controllers in the network.
  • the obtaining module 71 first discovers all controllers in the network, where All controllers refer to controllers that are working properly in the network.
  • the obtaining module 71 establishes communication with all the forwarding devices found in the network before acquiring all the controller information in the network where the network is located, so that the forwarding device information can be obtained from the forwarding device, and the established communication is established through the forwarding device.
  • the forwarding device discovers other forwarding devices and controllers in the network.
  • the acquiring module 71 may obtain information about all controllers and forwarding devices in the network, so that the control information of the forwarding device can be performed on each controller according to the information of the forwarding device and the controller in the network. Settings.
  • the management controller configures the management relationship between the forwarding device and the controller: a new forwarding device and/or controller is added to the network. ; The controller in the network is idle; the forwarding device and/or controller has failed.
  • the hello can be directly sent to the management controller.
  • the management controller can be informed by the forwarding device and/or controller to which it is connected.
  • the forwarding device connected to it can inform the management controller by sending "Unable to connect to the management controller" to the management controller.
  • the management controller acquires information about the controller and the forwarding device in the network, including: adding a controller or a controller in an idle state. information.
  • the management controller sets the control information of the controller, including: the management controller adjusts control information of the existing controller in the network to the forwarding device according to the information of the controller and the forwarding device; is added to the controller or is in an idle state.
  • the controller assigns a forwarding device.
  • the forwarding device Since there is only one MASTER controller for each forwarding device, if the newly added controller or the idle controller is configured as the MASTER controller to the selected forwarding device, the forwarding device must be disconnected from the previously connected MASTER controller. Communication; if the newly added controller or the idle controller is configured as a SALVE controller or an EQUAL controller to the selected forwarding device, the forwarding device can select whether to disconnect the previously connected controller according to the specific situation.
  • the acquiring module 71 further acquires the information of the newly added forwarding device.
  • the setting module 72 is configured to specify a controller for the newly added forwarding device, and set Controls the newly added forwarding device for the controller specified by the new forwarding device.
  • the setting module 72 the forwarding device configured to connect with the failed controller, specifies a new controller, and sets a new controller to control the forwarding device connected to the failed controller.
  • the controller's control right to the forwarding device When setting the controller's control right to the forwarding device, it can be set according to the control authority of the failed controller to the forwarding device.
  • the fault controller is a MASTER controller of the forwarding device
  • the setting module 72 is configured such that the controller designated for the forwarding device has all control rights to the forwarding device and is the MASTER controller of the forwarding device.
  • the information of the controller and the forwarding device acquired by the management controller includes at least one of the following: a performance of the controller, a load condition, a network topology of the controller and the forwarding device.
  • the management controller obtains the performance information of each controller, analyzes the performance information, calculates the number of forwarding devices most suitable for the controller, and allocates the forwarding to the controller according to the calculation result. The number of devices.
  • the obtaining module 71 is configured to acquire when the acquired information is a load condition of the controller. The load status of each controller in the network, and set the controller's control information for the forwarding device according to the load.
  • Method 1 The management controller records the number of forwarding devices that each controller is responsible for, so as to know the load status of each controller; Method 2, all control The load is calculated in real time and its load is periodically sent to the management controller.
  • Each controller can calculate the load by the following methods: (1) calculating the load by using the bandwidth usage of the management interface connected to the forwarding device by the controller; (2) periodically counting the number of flow tables sent by the controller to the forwarding device, Calculate the load based on the number of flow tables. After the management controller knows the load status of each controller, in setting the controller's control information for the forwarding device, the principle is set to: Ensure load balancing of each controller.
  • the obtaining module 71 is configured to obtain the network topology of the controller and the forwarding device in the network by acquiring the addresses of the controllers and the forwarding devices in the network when the acquired information is the network topology of the controller and the forwarding device. .
  • the obtaining module 71 is configured to learn the connection topology of the newly-added forwarding device according to the address of the forwarding device or the controller connected to the newly-added forwarding device when the forwarding device is added to the network.
  • the setting principle is: Ensure that the number of connection hops between the controller that establishes communication and the forwarding device is small.
  • the management controller can simultaneously acquire the load condition of the controller and the network topology of the controller and the forwarding device in the network, manage the integrated load situation of the controller, and the network topology information, and configure the forwarding device and the controller.
  • manage the integrated load situation of the controller, and the network topology information and configure the forwarding device and the controller.
  • the first sending module 73 is configured to notify the controller of the control information of the forwarding device by sending a message.
  • the forwarding device includes a switch, an optical network, and the like.
  • the obtaining module may be implemented by an I/O interface, a CPU or an I/O interface, and a hardware such as a DSP;
  • the setting module may be implemented by hardware such as a CPU or a DSP;
  • the first sending module may be an I/O interface and a CPU. Or I / O interface and DSP and other hardware combined implementation.
  • the embodiment provides a controller, which is set according to the controller in the above method.
  • the controller includes: a second sending module 81, a receiving module 82, and a communication. Module 83; wherein
  • the second sending module 81 is configured to send information of the controller itself to a management controller in the network;
  • the receiving module 82 is configured to receive, by the management controller, control information of the controller and the forwarding device according to the information set by the controller and the forwarding device;
  • the communication module 83 is configured to establish communication with the corresponding forwarding device according to the control information.
  • Example 8
  • This embodiment provides a management controller, which is configured according to the management controller in the above method.
  • the management controller includes a first Ethernet port 91, a first memory 92, and a processor. 93; Among them,
  • the first Ethernet port 91 is configured to acquire information about a controller and a forwarding device in the network, and store the information in the first memory.
  • the first memory 92 is configured to set control information of the controller to the forwarding device according to the information of the controller and the forwarding device;
  • the first Ethernet port is configured to send control information to the corresponding controller.
  • the first Ethernet port is further configured to establish communication with all forwarding devices found in the network.
  • the processor 93 is configured to detect whether at least one of the forwarding device and/or the controller is added to the network, whether the controller is in an idle state, whether the forwarding device and/or the controller are faulty. If yes, set or update the control information of the corresponding controller.
  • the information of the controller and the forwarding device in the network acquired by the first Ethernet interface is: a load condition of the controller and a network topology of the controller and the forwarding device; the processor is configured to be based on the load situation and the network extension Pu sets the controller's control information for the forwarding device.
  • the embodiment provides a controller, which is set according to the controller in the above method, the controller includes a second Ethernet port, and the second Ethernet port is used to send information of the controller itself to the network.
  • the second Ethernet port is further configured to receive, by the management controller, control information of the controller to the forwarding device according to the information set by the controller and the forwarding device; the second Ethernet port is further configured to be used according to the controller The information establishes communication with the corresponding forwarding device.
  • the controller further includes a second memory, where the second memory is used to count the load condition of the controller; and the information of the controller itself sent by the second Ethernet port is: a load condition of the controller.

Abstract

The present invention provides methods for setting control information and establishing communication, a management controller and a controller, which can solve the problem of unreasonable management relationship between controllers and a forwarding device in an existing software defined network. The method for setting control information provided in the present invention specifically comprises: the management controller acquiring information of controllers and a forwarding device in a network where the management controller is located; the management controller setting control information of each controller on the forwarding device according to the information of the controllers and the forwarding device; and the management controller sending the control information to the corresponding controller.

Description

设置控制信息、 建立通信的方法及管理控制器及控制器 技术领域  Setting control information, establishing communication method, and managing controller and controller
本发明涉及网络通信技术领域, 尤其涉及软件定义网络中的配置、 连 接方法及管理控制器及控制器。 背景技术  The present invention relates to the field of network communication technologies, and in particular, to a configuration, a connection method, a management controller, and a controller in a software-defined network. Background technique
软件定义网络( SDN, Software Defined Network )是一种新型的网络架 构, 它的设计理念是将网络的控制平面与数据转发平面进行分离, 并实现 可编程化控制。 SDN的典型架构分三层, 最上层为应用层, 包括各种不同 的业务和应用; 中间的控制层主要负责处理数据平面资源的编排, 维护网 络拓朴、 状态信息等; 最底层的基础设施层负责基于流表(flowtable )的数 据处理、 转发和状态收集。  Software Defined Network (SDN) is a new type of network architecture. It is designed to separate the control plane of the network from the data forwarding plane and implement programmable control. The typical architecture of SDN is divided into three layers, the uppermost layer is the application layer, including various services and applications; the middle control layer is mainly responsible for processing the data plane resources, maintaining network topology, state information, etc.; the lowest infrastructure The layer is responsible for data processing, forwarding, and state collection based on flowtables.
现有网络中, 对流量的控制和转发都依赖于网络设备实现, 且设备中 集成了与业务特性紧耦合的操作系统和专用硬件, 这些操作系统和专用硬 件都是各个厂家自己开发和设计的。 而在 SDN网络中, 转发设备只负责单 純的数据转发, 其硬件架构将趋向于统一化, 其各个部件在各个厂家之间 趋向于通用化。 而原来负责路由、 安全、 策略、 QoS、 流量工程等的控制平 面将由专门的 SDN控制器实现。 路由、 安全、 策略、 QoS、 流量工程等业 务功能和特性可以通过编程实现。 SDN控制器对硬件形态没有固定的要求, 可以是一个装置, 一个虚拟机或是一个物理服务器, 完全可以釆用像 x86 这样高性能低成本的通用架构。 转发设备与 SDN控制器之间通讯的协议一 般是 OpenFlow协议。 转发设备与控制器建立连接, 使用 OpenFlow协议传 递信息。  In the existing network, the control and forwarding of traffic depend on the implementation of the network device, and the operating system and dedicated hardware tightly coupled with the service characteristics are integrated in the device. These operating systems and dedicated hardware are developed and designed by each manufacturer. . In the SDN network, the forwarding device is only responsible for pure data forwarding, and its hardware architecture will tend to be unified, and its components tend to be generalized among various vendors. The original control plane responsible for routing, security, policy, QoS, traffic engineering, etc. will be implemented by a dedicated SDN controller. Service functions and features such as routing, security, policy, QoS, and traffic engineering can be implemented programmatically. The SDN controller has no fixed requirements for the hardware form. It can be a device, a virtual machine or a physical server. It can use a high-performance and low-cost general architecture like x86. The protocol for communication between the forwarding device and the SDN controller is generally the OpenFlow protocol. The forwarding device establishes a connection with the controller and transmits the information using the OpenFlow protocol.
一台转发设备可以与多台控制器建立连接, 这些控制器有不同的身份 ( role ), 可以分为 MASTER, SLAVE, EQUAL三种。 MASTER拥有转发 设备的全部控制权限, 对于某一台转发设备而言, MASTER控制器是唯一 的。 SLAVE拥有只读权限, 可以有多台控制器为此身份。 EQUAL, 拥有转 发设备的全部控制权限, 可以有多台控制器为此身份。 由此可见, 控制器 与转发设备之间存在一种管理关系, 所谓的管理关系包括: 控制器以什么 身份与网络中的哪些转发设备建立连接, 也即: 转发设备与控制器之间的 连接关系和控制器的身份信息。 为详细地说明控制器与转发设备之间的管 理关系, 下面以一个例子进行说明, 请参见图 1 : 网络中存在三台控制器, 分别是第一控制器、 第二控制器和第三控制器, 网络中还存在四台转发设 备, 分别是第一转发设备、 第二转发设备、 第三转发设备和第四转发设备。 第一控制器与第一转发设备建立连接, 且第一控制器扮演第一转发设备的 MASTER控制器; 第二控制器与第二转发设备建立连接, 且第二控制器扮 演第二转发设备的 MASTER控制器; 第三控制器与第三、 第四转发设备建 立连接, 且第三控制器扮演第三和第四转发设备的 MASTER控制器。 则该 网络中, 控制器与转发设备之间的管理关系是: 第一控制器以 MASTER控 制器的身份与第一转发设备建立连接; 第二控制器以 MASTER控制器的身 份与第二转发设备建立连接;第三控制器以 MASTER控制器的身份与第三、 第四转发设备建立连接。 进一步地, 如果第三控制器还是第一转发设备的 SALVE控制器, 那么网络中的管理关系还包括: 第三控制器以 SALVE控 制器的身份与第一转发设备建立连接。 A forwarding device can establish connections with multiple controllers. These controllers have different roles and can be classified into three types: MASTER, SLAVE, and EQUAL. MASTER has forwarding The full control authority of the device. For a forwarding device, the MASTER controller is unique. SLAVE has read-only access and can have multiple controllers for this identity. EQUAL, with full control of the forwarding device, can have multiple controllers for this identity. It can be seen that there is a management relationship between the controller and the forwarding device. The so-called management relationship includes: What identity is the controller connected with which forwarding devices in the network, that is, the connection between the forwarding device and the controller. Relationship and controller identity information. To illustrate in detail the management relationship between the controller and the forwarding device, an example is given below. See Figure 1: There are three controllers in the network, namely the first controller, the second controller and the third controller. There are also four forwarding devices in the network, which are a first forwarding device, a second forwarding device, a third forwarding device, and a fourth forwarding device. The first controller establishes a connection with the first forwarding device, and the first controller acts as the MASTER controller of the first forwarding device; the second controller establishes a connection with the second forwarding device, and the second controller acts as the second forwarding device The MASTER controller; the third controller establishes a connection with the third and fourth forwarding devices, and the third controller acts as the MASTER controller of the third and fourth forwarding devices. Then, in the network, the management relationship between the controller and the forwarding device is: the first controller establishes a connection with the first forwarding device as the MASTER controller; the second controller is the identity of the MASTER controller and the second forwarding device. A connection is established; the third controller establishes a connection with the third and fourth forwarding devices as the MASTER controller. Further, if the third controller is also the SALVE controller of the first forwarding device, the management relationship in the network further includes: the third controller establishes a connection with the first forwarding device as the identity of the SALVE controller.
现有技术中, 各控制器与转发设备之间的管理关系是通过选举确定的, 而且因各控制器是同级关系, 独立运作, 所以各控制器与转发设备之间的 管理关系是互不影响的, 这样会导致网络中控制器与转发设备之间的管理 关系不合理。 例如, 网络中某控制器因性能较好, 所以大多数转发设备通 过选举后确定的 MASTER控制器 (这里以 MASTER控制器为例, 也可以 是其他身份的控制器)都是该控制器, 从而导致该控制器的负载超负荷, 而网络中其他的控制器可能处于闲置的状态, 因各控制器独立运作, 所以 各控制器与转发设备之间的管理关系互不影响, 所以处于超负荷状态的控 制器会一直处于超负荷, 而处于闲置状态的控制器也会一致处于闲置状态。 发明内容 In the prior art, the management relationship between each controller and the forwarding device is determined through election, and since each controller is in the same level relationship and operates independently, the management relationship between each controller and the forwarding device is mutually exclusive. Influential, this will result in an unreasonable management relationship between the controller and the forwarding device in the network. For example, a controller in the network has better performance, so most of the forwarding devices that pass the election determine the MASTER controller (here, the MASTER controller is used as an example, or other controllers of other identities). Causing the controller's load to be overloaded, The other controllers in the network may be in an idle state. Because the controllers operate independently, the management relationship between the controllers and the forwarding devices does not affect each other, so the controller in the overload state will always be overloaded. The controller that is idle is also in an idle state. Summary of the invention
有鉴于此, 本发明实施例提供了设置控制信息、 建立通信的方法及管 理控制器及控制器, 从而解决现有的软件定义网络中控制器与转发设备之 间的管理关系不合理的问题。  In view of this, the embodiments of the present invention provide a method for setting control information, establishing a communication, and a management controller and a controller, thereby solving the problem that the management relationship between the controller and the forwarding device in the existing software-defined network is unreasonable.
本发明实施例提供了一种设置控制信息的方法, 包括: 管理控制器获 取所在网络中控制器及转发设备的信息; 管理控制器依据控制器及转发设 备的信息设置各控制器对转发设备的控制信息; 管理控制器将控制信息发 送给对应的控制器。  An embodiment of the present invention provides a method for setting control information, including: a management controller acquiring information of a controller and a forwarding device in a network; and a management controller setting each controller to a forwarding device according to information of the controller and the forwarding device. Control information; The management controller sends control information to the corresponding controller.
优选地, 控制信息包括: 管理控制器为控制器分配的转发设备的信息; 控制器对分配给控制器的转发设备的控制权限。  Preferably, the control information comprises: management information of the forwarding device allocated by the controller to the controller; and control authority of the controller to the forwarding device assigned to the controller.
优选地, 在网络初始化过程中, 管理控制器获取所在网络中控制器及 转发设备的信息之前还包括: 管理控制器与网络中发现的所有转发设备建 立通信。  Preferably, before the management controller acquires the information of the controller and the forwarding device in the network, the management controller further includes: the management controller establishes communication with all forwarding devices found in the network.
优选地, 当管理控制器获知以下情况中的至少一种时, 管理控制器设 置或更新相应控制器的控制信息:  Preferably, when the management controller knows at least one of the following conditions, the management controller sets or updates the control information of the corresponding controller:
网络中新增转发设备和 /或控制器;  New forwarding devices and/or controllers in the network;
网络中有控制器处于闲置状态;  There are controllers in the network that are idle;
转发设备和 /或控制器发送故障。  The forwarding device and/or controller sends a fault.
在本发明的一种实施例中, 当网络中新增控制器或有控制器处于闲置 状态时, 管理控制器获取所在网络中控制器及转发设备的信息包括: 新增 控制器或处于闲置状态的控制器的信息; 管理控制器设置控制器的控制信 息包括: 管理控制器依据控制器和转发设备的信息调整网络中已有控制器 对转发设备的控制信息; 为新增控制器或处于闲置状态的控制器分配转发 设备; In an embodiment of the present invention, when a new controller or a controller in the network is in an idle state, the management controller obtains information about the controller and the forwarding device in the network, including: adding a controller or being idle. Controller information; management controller setting controller control information includes: management controller adjusts existing controllers in the network according to controller and forwarding device information Control information for the forwarding device; assigning a forwarding device to the newly added controller or the controller in an idle state;
当网络中新增转发设备时, 管理控制器获取所在网络中控制器及转发 设备的信息包括: 新增转发设备的信息; 管理控制器设置控制器对转发设 备的控制权限包括: 管理控制器为新增的转发设备指定控制器, 并设置为 新增转发设备指定的控制器对新增转发设备的控制权限;  When a forwarding device is added to the network, the management controller obtains information about the controller and the forwarding device in the network, including: adding information of the forwarding device; and managing the controller to set the controller to control the forwarding device includes: The new forwarding device specifies the controller, and is set to control the newly added forwarding device by the controller specified by the new forwarding device.
当网络中控制器发送故障时, 管理控制器设置控制器对转发设备的控 制信息包括: 管理控制器为与发生故障的控制器连接的转发设备指定新的 控制器, 并设置新控制器对与发生故障的控制器连接的转发设备的控制权 限。  When the controller in the network sends a fault, the management controller sets the controller's control information for the forwarding device to include: the management controller assigns a new controller to the forwarding device connected to the failed controller, and sets a new controller pair The control authority of the forwarding device to which the failed controller is connected.
在本发明的一种实施例中, 管理控制器获取的网络中控制器的信息包 括: 控制器的负载情况;  In an embodiment of the present invention, the information of the controller in the network acquired by the management controller includes: a load condition of the controller;
管理控制器依据控制器信息设置控制器对转发设备的控制信息包括: 管理控制器依据负载情况设置控制器对转发设备的控制信息。  The management controller sets the control information of the controller to the forwarding device according to the controller information, including: the management controller sets the control information of the controller to the forwarding device according to the load condition.
在本发明的一种实施例中, 管理控制器获取的网络中各控制器及转发 设备的信息包括: 控制器的负载情况及所在网络中控制器和转发设备的网 络拓朴;  In an embodiment of the present invention, the information of each controller and the forwarding device in the network acquired by the management controller includes: a load condition of the controller and a network topology of the controller and the forwarding device in the network;
管理控制器依据控制器及转发设备信息设置控制器对转发设备的控制 信息包括: 管理控制器依据负载情况及网络拓朴设置控制器对转发设备的 控制信息。  The management controller sets the control information of the controller to the forwarding device according to the controller and the forwarding device information. The management controller includes: the management controller sets the control information of the controller to the forwarding device according to the load situation and the network topology.
本发明还提供了一种建立通信的方法, 具体包括: 控制器将其自身的 信息发送给管理控制器;  The present invention also provides a method for establishing communication, specifically comprising: the controller transmitting its own information to the management controller;
控制器接收管理控制器依据控制器及转发设备的信息设置的控制器对 转发设备的控制信息;  The controller receives control information of the controller and the forwarding device set by the controller according to the information of the controller and the forwarding device;
控制器依据控制信息与相应的转发设备建立通信。 在本发明的一种实施例中, 发送给管理控制器的信息包括: 控制器的 负载情况。 The controller establishes communication with the corresponding forwarding device according to the control information. In an embodiment of the invention, the information sent to the management controller includes: a load condition of the controller.
本发明还提供了一种管理控制器, 应用在软件定义网络中, 该管理控 制器包括第一以太网口、 第一存储器和处理器, 第一以太网口用于获取网 络中控制器及转发设备的信息, 并存储于第一存储器中; 第一存储器还用 于依据控制器及转发设备的信息设置控制器对转发设备的控制信息; 第一 以太网口还用于将控制信息发送给相应的控制器。  The present invention also provides a management controller, which is applied in a software-defined network, where the management controller includes a first Ethernet port, a first memory, and a processor, where the first Ethernet port is used to acquire a controller and forward in the network. The information of the device is stored in the first memory; the first memory is further configured to set control information of the controller to the forwarding device according to the information of the controller and the forwarding device; the first Ethernet port is further configured to send the control information to the corresponding Controller.
在本发明的一种实施例中, 在网络初始化过程中, 第一以太网口还用 于与网络中发现的所有转发设备建立通信。  In an embodiment of the invention, the first Ethernet port is also used to establish communication with all forwarding devices found in the network during network initialization.
在本发明的一种实施例中, 处理器还用于检测网络中是否新增转发设 备和 /或控制器、 是否有控制器处于闲置状态、 转发设备和 /或控制器是否发 生故障中的至少一种情况, 如是, 则对相应控制器的控制信息进行设置或 更新。  In an embodiment of the present invention, the processor is further configured to detect whether at least a forwarding device and/or a controller is added to the network, whether the controller is in an idle state, and whether the forwarding device and/or the controller are faulty. In one case, if yes, the control information of the corresponding controller is set or updated.
在本发明的一种实施例中, 第一以太网口获取的网络中的控制器及转 发设备的信息为: 控制器的负载情况及控制器和转发设备的网络拓朴; 处 理器用于依据负载情况及网络拓朴设置控制器对转发设备的控制信息。  In an embodiment of the present invention, the information of the controller and the forwarding device in the network acquired by the first Ethernet interface is: a load condition of the controller and a network topology of the controller and the forwarding device; the processor is configured to use the load according to the load The situation and the network topology set the controller's control information for the forwarding device.
本发明还提供了一种控制器, 应用在软件定义网络中, 该控制器包括 第二以太网口, 第二以太网口用于将控制器自身的信息发送给所在网络中 的管理控制器; 第二以太网口还用于接收管理控制器发送的依据控制器及 转发设备的信息设置的控制器对转发设备的控制信息; 第二以太网口还用 于依据控制器信息与相应的转发设备建立通信。  The present invention further provides a controller, which is applied in a software-defined network, where the controller includes a second Ethernet port, and the second Ethernet port is used to send information of the controller itself to a management controller in the network; The second Ethernet port is further configured to receive, by the management controller, control information of the controller to the forwarding device according to the information set by the controller and the forwarding device; the second Ethernet port is further configured to use the controller information and the corresponding forwarding device. Establish communication.
在本发明的一种实施例中, 该控制器还包括第二存储器, 第二存储器 用于统计控制器的负载情况; 第二以太网口发送的控制器自身的信息为: 控制器的负载情况。  In an embodiment of the present invention, the controller further includes a second memory, where the second memory is used to calculate the load condition of the controller; and the information of the controller itself sent by the second Ethernet port is: the load condition of the controller .
本发明还提供了另一种管理控制器, 该管理控制器包括第一以太网口、 第一存储器和处理器, 第一以太网口用于获取网络中控制器及转发设备的 信息, 并存储于第一存储器中; 第一存储器还用于依据控制器及转发设备 的信息设置控制器对转发设备的控制信息; 第一以太网口还用于将控制信 息发送给相应的控制器。 The invention also provides another management controller, which includes a first Ethernet port, a first memory and a processor, the first Ethernet port is configured to acquire information of the controller and the forwarding device in the network, and is stored in the first memory; the first memory is further configured to set the controller according to the information of the controller and the forwarding device Control information for the forwarding device; the first Ethernet port is further configured to send control information to the corresponding controller.
本发明还提供了另一种控制器, 该控制器包括第二以太网口, 第二以 太网口用于将控制器自身的信息发送给所在网络中的管理控制器; 第二以 太网口还用于接收管理控制器发送的依据控制器及转发设备的信息设置的 控制器对转发设备的控制信息; 第二以太网口还用于依据控制器信息与相 应的转发设备建立通信。 本发明的有益效果是:  The present invention further provides another controller, the controller includes a second Ethernet port, and the second Ethernet port is configured to send information of the controller itself to a management controller in the network; the second Ethernet port further The controller is configured to receive control information of the forwarding device according to the information set by the controller and the forwarding device, and the second Ethernet port is further configured to establish communication with the corresponding forwarding device according to the controller information. The beneficial effects of the invention are:
本发明提供的一种设置控制信息、 建立通信的方法及管理控制器及控 制器, 能解决现有的软件定义网络中控制器与转发设备之间的管理关系不 合理的问题。 本发明提供的方法具体包括: 管理控制器获取所在网络中控 制器及转发设备的信息; 管理控制器依据控制器及转发设备的信息设置各 控制器对转发设备的控制信息; 管理控制器将控制信息发送给对应的控制 器。 因本发明提供的控制信息设置方法是依据获取的控制器和转发设备的 信息对各控制器的控制信息进行的设置, 是从宏观的角度出发对控制信息 进行设置, 使转发设备和控制器之间的管理关系更合理。 附图说明  The invention provides a method for setting control information, establishing communication, a management controller and a controller, which can solve the problem that the management relationship between the controller and the forwarding device in the existing software-defined network is unreasonable. The method provided by the present invention specifically includes: the management controller acquires information of the controller and the forwarding device in the network; the management controller sets control information of each controller to the forwarding device according to the information of the controller and the forwarding device; the management controller controls The information is sent to the corresponding controller. The control information setting method provided by the present invention is to set the control information of each controller according to the acquired information of the controller and the forwarding device, and the control information is set from a macroscopic point of view, so that the forwarding device and the controller are The management relationship between the two is more reasonable. DRAWINGS
图 1为现有技术中软件定义网络的结构示意图;  1 is a schematic structural diagram of a software-defined network in the prior art;
图 2为本发明实施例二提供的软件定义网络的结构示意图;  2 is a schematic structural diagram of a software definition network according to Embodiment 2 of the present invention;
图 3为本发明实施例三提供的软件定义网络的结构示意图;  3 is a schematic structural diagram of a software definition network according to Embodiment 3 of the present invention;
图 4为本发明实施例四提供的软件定义网络的结构示意图;  4 is a schematic structural diagram of a software definition network according to Embodiment 4 of the present invention;
图 5为本发明实施例六提供的管理控制器的结构示意图; 图 6为本发明实施例七提供的控制器的结构示意图; FIG. 5 is a schematic structural diagram of a management controller according to Embodiment 6 of the present invention; FIG. 6 is a schematic structural diagram of a controller according to Embodiment 7 of the present invention;
图 7为本发明实施例八提供的管理控制器的结构示意图;  7 is a schematic structural diagram of a management controller according to Embodiment 8 of the present invention;
图 8为本发明实施例中控制器的结构示意图;  8 is a schematic structural diagram of a controller according to an embodiment of the present invention;
图 9为本发明实施例中管理控制器的结构示意图。 具体实施方式  FIG. 9 is a schematic structural diagram of a management controller according to an embodiment of the present invention. detailed description
下面通过具体实施方式结合附图对本发明作进一步详细说明。  The present invention will be further described in detail below with reference to the accompanying drawings.
实施例一:  Embodiment 1:
本实施例提供一种设置控制信息的方法, 如图 2所示, 包括: 步骤 201 : 管理控制器获取所在网络中控制器及转发设备的信息; 步骤 202: 管理控制器依据控制器及转发设备的信息,设置各个所述控 制器对转发设备的控制信息;  The embodiment provides a method for setting control information. As shown in FIG. 2, the method includes the following steps: Step 201: The management controller acquires information about a controller and a forwarding device in the network; Step 202: The controller is based on the controller and the forwarding device. Information, setting control information of each of the controllers on the forwarding device;
步骤 203: 管理控制器将控制信息发送给相应的控制器。  Step 203: The management controller sends control information to the corresponding controller.
其中, 所述控制信息至少包括: 管理控制器为控制器分配的转发设备 的信息; 控制器对分配给控制器的转发设备的控制权限。  The control information includes at least: information of a forwarding device allocated by the management controller to the controller; and control authority of the controller to the forwarding device assigned to the controller.
所述管理控制器为控制器分配的转发设备的信息包括: 转发设备的地 址信息。  The information of the forwarding device allocated by the management controller to the controller includes: address information of the forwarding device.
所述控制器对分配给它的转发设备的控制权限为: 控制器对转发设备 的读写权限。 例如, 当控制器以 MASTER控制器的身份与转发设备建立连 接时, 控制器拥有转发设备的全部控制权限。 当控制器以 SLAVE控制器的 身份与转发设备建立连接时, 控制器拥有只读权限, 可以有多台控制器为 此身份。 当控制器以 EQUAL控制器的身份与转发设备建立连接时,控制器 拥有转发设备的全部控制权限, 可以有多台控制器为此身份。  The control authority of the controller to the forwarding device assigned to it is: The controller reads and writes the right to the forwarding device. For example, when the controller establishes a connection with the forwarding device as the MASTER controller, the controller has full control of the forwarding device. When the controller establishes a connection with the forwarding device as the SLAVE controller, the controller has read-only access and can have multiple controllers for this identity. When the controller establishes a connection with the forwarding device as the EQUAL controller, the controller has full control rights for the forwarding device, and multiple controllers can have this identity.
优选地, 所述管理控制器可以为控制器分配多台转发设备, 当控制器 与多台转发设备之间进行通信时, 则可能存在控制器对于其中一部分转发 设备的身份是 MASTER控制器,而对于另一部分转发设备的身份是 SLAVE 控制器。 也就是说控制器对于与之通信的控制器的控制权限是可能不同的。 在本实施例中, 可以从软件定义网络中已有的控制器中确定至少一台 控制器作为管理控制器, 也可以重新为网络安排至少一台新的控制器作为 管理控制器。 如果管理控制器是从软件定义网络中已有的控制器中确定的, 则可以通过人为设定的方式设定至少一台控制器作为管理控制器, 也可以 通过选举产生至少一台管理控制器。 Preferably, the management controller may allocate multiple forwarding devices to the controller. When the controller communicates with multiple forwarding devices, there may be a controller that is a MASTER controller for a part of the forwarding devices. For another part of the forwarding device, the identity is SLAVE Controller. This means that the controller may have different control rights for the controller with which it communicates. In this embodiment, at least one controller may be determined as a management controller from among existing controllers in the software-defined network, and at least one new controller may be re-arranged as a management controller for the network. If the management controller is determined from an existing controller in the software-defined network, at least one controller may be set as a management controller by means of artificial setting, or at least one management controller may be elected by election. .
为更详细地说明本实施例中如何通过选举产生管理控制器, 下面以一 个例子进行说明:  To explain in more detail how the management controller is elected by this embodiment, an example will be described below:
每台控制器都一个 ID号, 这个 ID号可以是人为指定, 也可以是依据 其地址自动生成。  Each controller has an ID number, which can be specified manually or automatically based on its address.
选举方法为控制器之间相互广播其 ID号, ID号最大的控制器被自动选 中。 因为每个控制器都清楚网络中有多少台控制器, 以及这些控制器的地 址, 所以会知道什么时候已经收到了所有的 ID号。  The election method is that the controllers broadcast their ID numbers to each other, and the controller with the largest ID number is automatically selected. Because each controller knows how many controllers are in the network and the addresses of those controllers, it knows when all the ID numbers have been received.
在本实施例中, 管理控制器在获取网络中各控制器及转发设备的信息 之前, 管理控制器要先发现网络中的控制器及转发设备, 所述转发设备可 以包括交换机; 当新接入的交换机或控制器上电后, 会请求分配地址、 以 及发送 Hello消息, 使得与其连接的设备发现它。  In this embodiment, before the management controller acquires the information of each controller and the forwarding device in the network, the management controller first discovers the controller and the forwarding device in the network, and the forwarding device may include a switch; After the switch or controller is powered on, it will request to assign an address and send a Hello message so that the device connected to it discovers it.
如果控制器和管理控制器之间直接连接, 则控制器上电之后, 控制器 就会向管理控制器及其他与所述管理控制器连接的设备, 请求分配地址和 发送 Hello消息; 所述管理控制器在接收到消息之后, 就发现所述控制器, 从而从控制器获取控制器的信息。  If the controller and the management controller are directly connected, after the controller is powered on, the controller requests the management controller and other devices connected to the management controller to allocate an address and send a Hello message; After receiving the message, the controller discovers the controller, thereby obtaining information of the controller from the controller.
如果控制器和管理控制器之间并不是直接连接, 则控制器可以通过与 所述管理控制器已经建立通信的转发设备,将 Hello消息发给所述管理控制 器, 使得所述管理控制器发现所述控制器并获取控制器的信息。  If the controller and the management controller are not directly connected, the controller may send a Hello message to the management controller through the forwarding device that has established communication with the management controller, so that the management controller discovers The controller acquires information of the controller.
另一种情况下, 比如在网络初始化过程中, 所述管理控制器很有可能 不知道网络中其他控制器的信息, 这时, 管理控制器要先发现网络中的所 有控制器, 这里的所有控制器指的是网络中处于正常工作的控制器。 In another case, such as during network initialization, the management controller is very likely Without knowing the information of other controllers in the network, the management controller must first discover all the controllers in the network. All the controllers here refer to the controllers in the network that are working normally.
所述管理控制器在获取自身所在网络中的所有控制器信息之前, 会与 网络中发现的所有转发设备建立通信, 这样可以从所述转发设备获取转发 设备的信息, 并通过这些已经建立通信的转发设备发现网络中的其他转发 设备和控制器。  The management controller establishes communication with all the forwarding devices found in the network before acquiring all the controller information in the network where the network is located, so that the information of the forwarding device can be obtained from the forwarding device, and the communication is established through the communication device. The forwarding device discovers other forwarding devices and controllers in the network.
优选地, 在网络初始化完成之后, 管理控制器可以获取网络中所有控 制器和转发设备的信息, 从而可依据网络中转发设备与控制器的信息对各 控制器对转发设备的控制信息进行设置。  Preferably, after the network initialization is completed, the management controller can obtain information of all controllers and forwarding devices in the network, so that the control information of the forwarding device can be set according to the information of the forwarding device and the controller in the network.
在本实施例中, 当管理控制器获知以下情况中的至少一种时, 管理控 制器对转发设备与控制器之间的管理关系进行配置: 网络中新增转发设备 和 /或控制器; 网络中有控制器处于闲置状态; 转发设备和 /或控制器发生故 障。  In this embodiment, when the management controller knows at least one of the following situations, the management controller configures the management relationship between the forwarding device and the controller: a new forwarding device and/or a controller in the network; There is a controller in the idle state; the forwarding device and/or controller has failed.
相应的, 当网络中新增转发设备和 /或控制器和 /或有控制器处于闲置状 态时, 如果转发设备和 /或控制器与管理控制器直接连接, 则可直接向管理 控制器发送 hello消息;如果转发设备和 /或控制器与管理控制器并不是直接 连接, 则可通过与之连接的转发设备和 /或控制器告知管理控制器。  Correspondingly, when a new forwarding device and/or controller and/or a controller are in an idle state in the network, if the forwarding device and/or the controller are directly connected to the management controller, the hello can be directly sent to the management controller. Message; if the forwarding device and/or controller is not directly connected to the management controller, the management controller can be informed by the forwarding device and/or controller to which it is connected.
当控制器发生故障时, 与之连接的转发设备可通过向管理控制器发送 "无法连接管理控制器"告知管理控制器。  When the controller fails, the forwarding device connected to it can inform the management controller by sending "Unable to connect to the management controller" to the management controller.
在本实施例中, 当网络中新增控制器或有控制器处于闲置状态时, 管 理控制器获取所在网络中控制器及转发设备的信息包括: 新增控制器或处 于闲置状态的控制器的信息。  In this embodiment, when a new controller or a controller in the network is in an idle state, the management controller acquires information about the controller and the forwarding device in the network, including: adding a controller or a controller in an idle state. information.
优选地, 所述管理控制器设置控制器的控制信息包括: 管理控制器依 据控制器和转发设备的信息调整网络中已有控制器对转发设备的控制信 息; 为新增控制器或处于闲置状态的控制器分配转发设备。 因为每个转发设备的 MASTER控制器只有一个, 所以如果新增的控制 器或处于闲置的控制器是作为 MASTER控制器配置给选中的转发设备时, 转发设备必须与之前连接的 MASTER控制器断开通信; 而如果新增的控制 器或处于闲置的控制器是作为 SALVE控制器或 EQUAL控制器配置给选中 的转发设备时, 转发设备可以依据具体情况选择与之前连接的控制器是否 断开通信。 Preferably, the management controller sets the control information of the controller, including: the management controller adjusts control information of the existing controller in the network to the forwarding device according to the information of the controller and the forwarding device; is added to the controller or is in an idle state. The controller assigns a forwarding device. Since there is only one MASTER controller for each forwarding device, if the newly added controller or the idle controller is configured as the MASTER controller to the selected forwarding device, the forwarding device must be disconnected from the previously connected MASTER controller. Communication; if the newly added controller or the idle controller is configured as a SALVE controller or an EQUAL controller to the selected forwarding device, the forwarding device can select whether to disconnect the previously connected controller according to the specific situation.
优选地, 当网络中新增转发设备时, 管理控制器还要获取新增转发设 备的信息; 相应的, 所述管理控制器设置控制器对转发设备的控制权限可 以包括: 管理控制器为新增的转发设备指定控制器, 并设置为新增转发设 备指定的控制器对新增转发设备的控制权限。  Preferably, when the forwarding device is newly added to the network, the management controller further acquires information about the newly added forwarding device. Correspondingly, the management controller setting the controller to control the forwarding device may include: The added forwarding device specifies the controller, and is set to control the newly added forwarding device by the controller specified by the new forwarding device.
优选地, 当网络中控制器发送故障时, 设置控制器对转发设备的控制 信息可以包括: 管理控制器为与发生故障的控制器连接的转发设备指定新 的控制器, 并设置新控制器对与发生故障的控制器连接的转发设备的控制 权限。  Preferably, when the controller in the network sends a fault, setting the control information of the controller to the forwarding device may include: the management controller assigning a new controller to the forwarding device connected to the failed controller, and setting a new controller pair Control authority for the forwarding device that is connected to the failed controller.
在设置控制器对转发设备的控制权限时, 可依据发生故障的控制器对 转发设备的控制权限而设置。 例如, 故障控制器是转发设备的 MASTER控 制器, 则管理控制器为该转发设备指定的控制器拥有对转发设备的所有控 制权限, 且是转发设备的 MASTER控制器。  When setting the controller's control right to the forwarding device, it can be set according to the control authority of the failed controller to the forwarding device. For example, the fault controller is the MASTER controller of the forwarding device, and the controller designated by the management controller for the forwarding device has all control rights to the forwarding device and is the MASTER controller of the forwarding device.
在本实施例中, 在管理控制器获取的控制器及转发设备的信息包括以 下至少一种: 控制器的性能、 负载情况、 控制器和转发设备的网络拓朴。  In this embodiment, the information of the controller and the forwarding device acquired by the management controller includes at least one of the following: a performance of the controller, a load condition, a network topology of the controller and the forwarding device.
当获取的信息为控制器的性能时, 管理控制器获取各控制器的性能信 息, 分析该性能信息, 计算最适合该控制器承载的转发设备的数目, 依据 计算结果分配给该控制器的转发设备的数目。  When the obtained information is the performance of the controller, the management controller obtains the performance information of each controller, analyzes the performance information, calculates the number of forwarding devices most suitable for the controller, and allocates the forwarding to the controller according to the calculation result. The number of devices.
当获取的信息为控制器的负载情况时, 管理控制器获取所在网络中各 控制器的负载情况, 并依据负载情况设置控制器对转发设备的控制信息。 其中, 管理控制器获取该网络中的各控制器的负载情况, 获取的方式 有多种, 在这里提供两种常用的方法: 方法一、 管理控制器记录各个控制 器所负责管理的转发设备数量, 从而获知各控制器的负载情况; 方法二、 所有控制器实时地计算其负载情况, 并将其负载情况周期地发送给管理控 制器。 When the obtained information is the load condition of the controller, the management controller acquires the load status of each controller in the network, and sets the control information of the controller to the forwarding device according to the load condition. The management controller obtains the load status of each controller in the network, and obtains various methods. Here, two common methods are provided: Method 1. The management controller records the number of forwarding devices managed by each controller. Therefore, the load condition of each controller is known; Method 2: All controllers calculate their load conditions in real time, and periodically transmit their load conditions to the management controller.
各控制器可釆用以下方法计算负载: (1 )通过控制器与转发设备连接 的管理接口的带宽使用率计算负载; (2 )周期性地统计本控制器向转发设 备发送的流表数量, 依据流表数量计算负载。 管理控制器在获知各控制器 的负载情况之后, 在设置控制器对转发设备的控制信息的过程中, 设置的 原则是: 确保各控制器的负载均衡。  Each controller can calculate the load by the following methods: (1) calculating the load by using the bandwidth usage of the management interface connected to the forwarding device by the controller; (2) periodically counting the number of flow tables sent by the controller to the forwarding device, Calculate the load based on the number of flow tables. After the management controller knows the load status of each controller, in setting the controller's control information for the forwarding device, the principle is set to: Ensure load balancing of each controller.
当获取的信息为控制器及转发设备的网络拓朴时, 管理控制器可通过 获取网络中各控制器及转发设备的地址从而获取网络中控制器和转发设备 的网络拓朴。 当网络中新增转发设备时, 管理控制器依据与新增转发设备 连接的转发设备或控制器的地址获知新增转发设备的连接拓朴。 相应地, 管理控制器在获知网络拓朴之后, 在设置控制器对转发设备的控制信息的 过程中, 设置的原则是: 确保建立通信的控制器与转发设备之间的连接跳 数较少。  When the obtained information is the network topology of the controller and the forwarding device, the management controller can obtain the network topology of the controller and the forwarding device in the network by acquiring the addresses of the controllers and the forwarding devices in the network. When a forwarding device is added to the network, the management controller learns the connection topology of the new forwarding device based on the address of the forwarding device or controller connected to the newly added forwarding device. Correspondingly, after the management controller knows the network topology, in setting the controller's control information for the forwarding device, the setting principle is: Ensure that the connection hop between the controller establishing the communication and the forwarding device is small.
在本实施例中, 管理控制器可同时获取控制器的负载情况及所在网络 中控制器和转发设备的网络拓朴, 管理控制器综合负载情况及网络拓朴信 息, 在配置转发设备与控制器之间的管理关系时, 确保各控制器的负载均 衡, 并兼顾建立通信的控制器与转发设备之间的连接跳数较少。  In this embodiment, the management controller can simultaneously acquire the load condition of the controller and the network topology of the controller and the forwarding device in the network, manage the integrated load situation of the controller, and the network topology information, and configure the forwarding device and the controller. When managing relationships, ensure that each controller is load balanced, and that the number of connection hops between the controller that establishes communication and the forwarding device is small.
本实施例中, 在管理控制器设置好控制器对转发设备的控制信息之后, 管理控制器可通过发送消息的方式告知控制器其对转发设备的控制信息。  In this embodiment, after the management controller sets the control information of the controller to the forwarding device, the management controller may notify the controller of the control information of the forwarding device by sending a message.
在本实施例中, 转发设备包括交换机、 光网络等设备。 为更详细地说明本发明提供的设置控制信息方法, 本实施例提供在网 络初始化过程中, 管理控制器如何通过本发明提供的方法设置控制器对转 发设备的控制信息。 在本实施例中, 转发设备为交换机。 In this embodiment, the forwarding device includes a switch, an optical network, and the like. To describe in more detail the method for setting control information provided by the present invention, this embodiment provides how the management controller sets the control information of the controller to the forwarding device by the method provided by the present invention during the network initialization process. In this embodiment, the forwarding device is a switch.
请参见图 3, 该 SDN网络有 3台控制器, 11台交换机。 控制器与交换 机之间通过百兆以太网连接, 传递 openflow协议报文。 交换机之间通过万 兆以太网 (10GE )连接, 传递业务报文及 openflow协议报文。  Referring to Figure 3, the SDN network has 3 controllers and 11 switches. The controller and the switch communicate with each other through a 100M Ethernet connection to deliver openflow protocol packets. The switches are connected through 10 Gigabit Ethernet (10GE) to transmit service packets and openflow protocol packets.
本实施例为此网络的初始化过程, 首先人为设定第一控制器作为管理 控制器, 管理控制器首先发现了第二交换机, 指定其 MASTER控制器为第 一控制器, 并釆用 openflow协议对第二交换机进行配置, 在进行配置之后, 第二交换机和控制器之间建立了通信。  In this embodiment, the initialization process of the network firstly sets the first controller as the management controller. The management controller first discovers the second switch, specifies its MASTER controller as the first controller, and uses the openflow protocol pair. The second switch is configured to establish communication between the second switch and the controller after the configuration.
第二交换机发现第一、 第三、 第八交换机后, 以"新接入消息,,通知管理 控制器。  After the second switch discovers the first, third, and eighth switches, the "new access message" is notified to the management controller.
管理控制器为第一交换机、 第三交换机和第八交换机指定其 MASTER 控制器为第一控制器, 并釆用 openflow协议对其进行配置, 在进行配置之 后, 第一、 三、 八交换机和控制器之间建立了通信。 以此类似, 其它的交 换机和另 2台控制器也被发现。  The management controller assigns its MASTER controller to the first controller, the third switch, and the eighth switch as the first controller, and configures it with the openflow protocol. After the configuration, the first, third, and eighth switches and controls are configured. Communication is established between the devices. Similarly, other switches and two other controllers were also discovered.
在网络初始化完成之后, 在管理控制器的"负载统计表 "记录了如下项 目: 第一控制器负责的交换机数量为 11, 第二控制器负责的交换机数量为 0, 第三控制器负责的交换机数量为 0。  After the network initialization is completed, the following items are recorded in the "load statistics table" of the management controller: The number of switches responsible for the first controller is 11, the number of switches responsible for the second controller is 0, and the switch responsible for the third controller The number is 0.
控制器的负载并不均衡。于是,管理控制器重新指定交换机的 MASTER 控制器, 具体过程为: (1 )保留第一、第二、第八、 第九交换机的 MASTER 控制器为第一控制器; ( 2 )向第二控制器发送 4个" MASTER控制器分配消 息,,, 这 4个消息分别包含第三、 第四、 第五、 第七交换机的地址, 第二控 制器收到消息后,与这 4个交换机建立 openflow连接,并 MASTER身份配 置这 4个交换机; (3 )向第三控制器发送 3个" MASTER控制器分配消息", 这 3 个消息分别包含第六、 第十、 第十一交换机的地址, 第三控制器收到 消息后, 与这 3个交换机建立 openflow连接, 并 MASTER身份配置这 3 个交换机。在管理控制器的"负载统计表"记录了如下项目: 第一控制器负责 的交换机数量为 4, 第二控制器负责的交换机数量为 4, 第三控制器负责的 交换机数量为 3。 此时, 控制器的负载比较均衡。 实施例三: The load on the controller is not balanced. Therefore, the management controller re-designates the MASTER controller of the switch, and the specific process is: (1) retaining the MASTER controllers of the first, second, eighth, and ninth switches as the first controller; (2) to the second control The device sends 4 "MASTER controller allocation messages," and the 4 messages respectively contain the addresses of the third, fourth, fifth, and seventh switches, and the second controller establishes an openflow with the four switches after receiving the message. Connect, and configure the four switches in the MASTER identity; (3) send three "MASTER controller assignment messages" to the third controller, The three messages respectively include the addresses of the sixth, tenth, and eleventh switches, and after receiving the message, the third controller establishes an openflow connection with the three switches, and configures the three switches by the MASTER identity. The "Load Statistics Table" of the management controller records the following items: The number of switches responsible for the first controller is 4, the number of switches responsible for the second controller is 4, and the number of switches responsible for the third controller is 3. At this point, the controller's load is more balanced. Embodiment 3:
为更详细地说明本发明提供的方法, 本实施例提供在网络中当某个控 制器发生故障时, 管理控制器如何通过本发明提供的方法设置控制器对转 发设备的控制信息。 在本实施例中, 转发设备为交换机。  To explain the method provided by the present invention in more detail, the present embodiment provides how the management controller sets the controller's control information for the forwarding device by the method provided by the present invention when a controller fails. In this embodiment, the forwarding device is a switch.
请参见图 3, SDN网络中,第一、第二、第八、第九交换机的 MASTER 控制器为第一控制器, 第三、 第四、 第五、 第七交换机的 MASTER控制器 为第二控制器, 第六、 第十、 第十一交换机的 MASTER控制器为第三控制 器。 第一控制器为管理控制器, 第二控制器、 第三控制器每隔 10秒向第一 控制器发送"负载统计消息", 第一控制器利用这些消息生成"负载统计表"。 如果第二控制器出现故障导致不可达, 第三、 第四、 第五、 第七交换机向 管理控制器发送 "MASTER控制器不可达 "信息。管理控制器利用"负载统计 表,,和网络拓朴(假设第一控制器和第三控制器的负载情况相当), 为第三、 第四交换机选择负载轻且连接跳数较少的第一控制器作为 MASTER控制 器, 为第五、 第七交换机选择负载轻且连接跳数较少的第三控制器作为 MASTER控制器。 在管理控制器为第十二交换机调配控制器之后, 其所在 的网络的结构示意图如图 4所示。 实施例四:  Referring to FIG. 3, in the SDN network, the MASTER controllers of the first, second, eighth, and ninth switches are the first controller, and the MASTER controllers of the third, fourth, fifth, and seventh switches are the second. The MASTER controller of the controller, the sixth, tenth, and eleventh switches is a third controller. The first controller is a management controller, and the second controller and the third controller send a "load statistics message" to the first controller every 10 seconds, and the first controller uses these messages to generate a "load statistics table". If the second controller fails to cause unreachability, the third, fourth, fifth, and seventh switches send a "MASTER controller unreachable" message to the management controller. The management controller utilizes the "load statistics table, and the network topology (assuming the load conditions of the first controller and the third controller are equivalent), and selects the first load for the third and fourth switches with a light load and a small number of connection hops. The controller acts as the MASTER controller, and selects the third controller with light load and fewer connection hops as the MASTER controller for the fifth and seventh switches. After the management controller allocates the controller for the twelfth switch, the controller The structure of the network is shown in Figure 4. Example 4:
为更详细地说明本发明提供的方法, 本实施例提供在网络中新增转发 设备时, 管理控制器如何通过本发明提供的方法设置控制器对转发设备的 控制信息。 在本实施例中, 转发设备为交换机。 In order to explain the method provided by the present invention in more detail, this embodiment provides how the management controller sets the controller to the forwarding device by using the method provided by the present invention when a forwarding device is newly added in the network. Control information. In this embodiment, the forwarding device is a switch.
请参见图 5,, SDN网络中,第一、第二、第八、第九交换机的 MASTER 控制器为第一控制器, 第三、 第四、 第五、 第七交换机的 MASTER控制器 为第二控制器, 第六、 第十、 第十一交换机的 MASTER控制器为第三控制 器。 此时, 在管理控制器的"负载统计表,,记录了如下项目: 第一控制器负责 的交换机数量为 4, 第二控制器负责的交换机数量为 4, 第三控制器负责的 交换机数量为 3。 假设, 网络中新增了一台第十二交换机, 第五交换机和第 六交互机向管理控制器发送 "新接入消息"通知管理控制器。管理控制器依据 "负载统计表"和网络拓朴,为第十二交换机选择负载轻且连接跳数较少的第 三控制器作为 MASTER控制器。 同时, 管理控制器更新"负载统计表"中第 三控制器负责的交换机数量为 4。管理控制器向第三控制器发送 "MASTER 控制器分配消息", 这个消息包含第十二交换机的地址, 第三控制器收到消 息后, 与第十二交换机建立 openflow连接,并 MASTER身份配置第十二交 换机。  Referring to FIG. 5, in the SDN network, the MASTER controllers of the first, second, eighth, and ninth switches are the first controller, and the MASTER controllers of the third, fourth, fifth, and seventh switches are the first The controller of the second controller, the MASTER controller of the sixth, tenth, and eleventh switches is a third controller. At this time, in the "load statistics table of the management controller, the following items are recorded: the number of switches responsible for the first controller is 4, the number of switches responsible for the second controller is 4, and the number of switches responsible for the third controller is 3. Assume that a new twelfth switch is added to the network, and the fifth switch and the sixth interaction machine send a "new access message" notification management controller to the management controller. The management controller is based on the "load statistics table" and The network topology selects the third controller with light load and fewer connection hops as the MASTER controller for the twelfth switch. At the same time, the number of switches responsible for the third controller in the management controller update "load statistics table" is 4 The management controller sends a "MASTER controller allocation message" to the third controller, the message includes the address of the twelfth switch, and after receiving the message, the third controller establishes an openflow connection with the twelfth switch, and configures the MASTER identity. Twelfth switch.
为了提高网络可靠性, 可以设定第二控制器为备用管理控制器, 当第 一控制器不可达时, 自动升级为主管理控制器。 实施例五:  In order to improve network reliability, the second controller can be set as the standby management controller. When the first controller is unreachable, it is automatically upgraded to the primary management controller. Embodiment 5:
本实施例提供了一种建立通信方法, 如图 6所示, 包括:  This embodiment provides a method for establishing a communication, as shown in FIG. 6, including:
步骤 601 : 控制器将自身的信息发送给所在网络中的管理控制器; 步骤 602: 所述控制器接收所述管理控制器发来的控制信息, 其中, 所 述控制信息为所述管理控制器依据所述控制器及转发设备的信息设置的所 述控制器对转发设备的控制信息;  Step 601: The controller sends its own information to the management controller in the network. Step 602: The controller receives control information sent by the management controller, where the control information is the management controller. Control information of the controller to the forwarding device according to the information of the controller and the forwarding device;
步骤 603: 控制器依据控制信息与相应的转发设备建立通信。  Step 603: The controller establishes communication with the corresponding forwarding device according to the control information.
在本发明提供的方法的一个实施例中, 所述自身的信息包括: 控制器 的负载情况。 实施例六: In an embodiment of the method provided by the present invention, the information of the self includes: a load condition of the controller. Example 6:
本实施例提供了一种管理控制器, 该管理控制器依据上述方法中的管 理控制器进行设置, 请参见图 7, 包括: 获取模块 71、 设置模块 72及第一 发送模块 73; 其中,  The present embodiment provides a management controller, which is configured according to the management controller in the above method. Referring to FIG. 7, the method includes: an obtaining module 71, a setting module 72, and a first sending module 73;
所述获取模块 71, 配置为获取所在网络中控制器及转发设备的信息; 所述设置模块 72, 配置为依据控制器及转发设备的信息设置控制器对 转发设备的控制信息;  The obtaining module 71 is configured to obtain information about the controller and the forwarding device in the network; the setting module 72 is configured to set control information of the controller to the forwarding device according to the information of the controller and the forwarding device;
所述第一发送模块 73, 配置为将所述控制信息发送给对应的控制器。 在本实施例中, 管理控制器还可以包括第一通信模块, 配置为与网络 中发现的所有转发设备建立通信。  The first sending module 73 is configured to send the control information to a corresponding controller. In this embodiment, the management controller may further include a first communication module configured to establish communication with all forwarding devices found in the network.
在本实施例中, 管理控制器还可以包括监测模块, 配置为监测网络中 是否新增转发设备和 /或控制器、 是否有控制器处于闲置状态、 转发设备和 / 或控制器是否发生故障中的至少一种情况, 如是, 则通知设置模块对相应 控制器的控制信息进行设置或更新。  In this embodiment, the management controller may further include a monitoring module configured to monitor whether a forwarding device and/or a controller is newly added in the network, whether the controller is in an idle state, whether the forwarding device and/or the controller are faulty. At least one of the cases, if yes, notifying the setting module to set or update the control information of the corresponding controller.
在本实施例中, 获取模块 71配置为获取网络中控制器的负载情况及控 制器和转发设备的网络拓朴; 设置模块 72配置为依据负载情况及网络拓朴 设置控制器对转发设备的控制信息。  In this embodiment, the obtaining module 71 is configured to acquire the load condition of the controller in the network and the network topology of the controller and the forwarding device. The setting module 72 is configured to set the controller to control the forwarding device according to the load situation and the network topology. information.
优选地, 所述管理控制器为控制器分配的转发设备的信息包括: 转发 设备的地址信息。  Preferably, the information of the forwarding device allocated by the management controller to the controller includes: address information of the forwarding device.
所述控制器对分配给它的转发设备的控制权限为: 控制器对转发设备 的读写权限。 例如, 当控制器以 MASTER控制器的身份与转发设备建立连 接时, 控制器拥有转发设备的全部控制权限。 当控制器以 SLAVE控制器的 身份与转发设备建立连接时, 控制器拥有只读权限, 可以有多台控制器为 此身份。 当控制器以 EQUAL控制器的身份与转发设备建立连接时,控制器 拥有转发设备的全部控制权限, 可以有多台控制器为此身份。 优选地, 所述管理控制器可以为控制器分配多台转发设备, 当控制器 与多台转发设备之间进行通信时, 则可能存在控制器对于其中一部分转发 设备的身份是 MASTER控制器,而对于另一部分转发设备的身份是 SLAVE 控制器。 也就是说控制器对于与之通信的控制器的控制权限是可能不同的。 The controller has the control permission for the forwarding device assigned to it: the controller has read and write permissions to the forwarding device. For example, when the controller establishes a connection with the forwarding device as the MASTER controller, the controller has full control of the forwarding device. When the controller establishes a connection with the forwarding device as the SLAVE controller, the controller has read-only access and can have multiple controllers for this identity. When the controller establishes a connection with the forwarding device as the EQUAL controller, the controller has full control rights of the forwarding device, and multiple controllers can have this identity. Preferably, the management controller may allocate multiple forwarding devices to the controller. When the controller communicates with multiple forwarding devices, there may be a controller that is a MASTER controller for a part of the forwarding devices. The identity of the other part of the forwarding device is the SLAVE controller. This means that the controller may have different control rights for the controller with which it communicates.
在本实施例中, 可以从软件定义网络中已有的控制器中确定至少一台 控制器作为管理控制器, 也可以重新为网络安排至少一台新的控制器作为 管理控制器。 如果管理控制器是从软件定义网络中已有的控制器中确定的, 则可以通过人为设定的方式设定至少一台控制器作为管理控制器, 也可以 通过选举产生至少一台管理控制器。  In this embodiment, at least one controller may be determined as a management controller from among existing controllers in the software-defined network, or at least one new controller may be re-arranged as a management controller for the network. If the management controller is determined from an existing controller in the software-defined network, at least one controller may be set as a management controller by means of artificial setting, or at least one management controller may be elected by election. .
为更详细地说明本实施例中如何通过选举产生管理控制器, 下面以一 个例子进行说明:  To explain in more detail how the management controller is elected by this embodiment, an example will be described below:
每台控制器都一个 ID号, 这个 ID号可以是人为指定, 也可以是依据 其地址自动生成。  Each controller has an ID number, which can be specified manually or automatically based on its address.
选举方法为控制器之间相互广播其 ID号, ID号最大的控制器被自动选 中。 因为每个控制器都清楚网络中有多少台控制器, 以及这些控制器的地 址, 所以会知道什么时候已经收到了所有的 ID号。  The election method is that the controllers broadcast their ID numbers to each other, and the controller with the largest ID number is automatically selected. Because each controller knows how many controllers are in the network and the addresses of those controllers, it knows when all the ID numbers have been received.
在本实施例中, 管理控制器在获取网络中各控制器及转发设备的信息 之前, 管理控制器要先发现网络中的控制器及转发设备, 所述转发设备可 以包括交换机; 当新接入的交换机或控制器上电后, 会请求分配地址、 以 及发送 Hello消息, 使得与其连接的设备发现它。  In this embodiment, before the management controller acquires the information of each controller and the forwarding device in the network, the management controller first discovers the controller and the forwarding device in the network, and the forwarding device may include a switch; After the switch or controller is powered on, it will request to assign an address and send a Hello message so that the device connected to it discovers it.
如果控制器和管理控制器之间直接连接, 则控制器上电之后, 控制器 就会向管理控制器及其他与所述管理控制器连接的设备, 请求分配地址和 发送 Hello消息; 所述管理控制器在接收到消息之后, 就发现所述控制器, 从而从控制器获取控制器的信息。  If the controller and the management controller are directly connected, after the controller is powered on, the controller requests the management controller and other devices connected to the management controller to allocate an address and send a Hello message; After receiving the message, the controller discovers the controller, thereby obtaining information of the controller from the controller.
如果控制器和管理控制器之间并不是直接连接, 则控制器可以通过与 所述管理控制器已经建立通信的转发设备,将 Hello消息发给所述管理控制 器, 使得所述管理控制器发现所述控制器并获取控制器的信息。 If there is no direct connection between the controller and the management controller, the controller can pass The management controller has established a forwarding device for communication, and sends a Hello message to the management controller, so that the management controller discovers the controller and acquires information of the controller.
另一种情况下, 比如在网络初始化过程中, 所述管理控制器很有可能 不知道网络中其他控制器的信息, 这时, 所述获取模块 71要先发现网络中 的所有控制器, 这里的所有控制器指的是网络中处于正常工作的控制器。  In another case, for example, during the network initialization process, the management controller may not know the information of other controllers in the network. In this case, the obtaining module 71 first discovers all controllers in the network, where All controllers refer to controllers that are working properly in the network.
所述获取模块 71, 在获取自身所在网络中的所有控制器信息之前, 会 与网络中发现的所有转发设备建立通信, 这样可以从所述转发设备获取转 发设备的信息, 并通过这些已经建立通信的转发设备发现网络中的其他转 发设备和控制器。  The obtaining module 71 establishes communication with all the forwarding devices found in the network before acquiring all the controller information in the network where the network is located, so that the forwarding device information can be obtained from the forwarding device, and the established communication is established through the forwarding device. The forwarding device discovers other forwarding devices and controllers in the network.
优选地, 在网络初始化完成之后, 所述获取模块 71可以获取网络中所 有控制器和转发设备的信息, 从而可依据网络中转发设备与控制器的信息 对各控制器对转发设备的控制信息进行设置。  Preferably, after the network initialization is completed, the acquiring module 71 may obtain information about all controllers and forwarding devices in the network, so that the control information of the forwarding device can be performed on each controller according to the information of the forwarding device and the controller in the network. Settings.
在本实施例中, 当所述设置模块 72获知以下情况中的至少一种时, 管 理控制器对转发设备与控制器之间的管理关系进行配置: 网络中新增转发 设备和 /或控制器; 网络中有控制器处于闲置状态; 转发设备和 /或控制器发 生故障。  In this embodiment, when the setting module 72 knows at least one of the following situations, the management controller configures the management relationship between the forwarding device and the controller: a new forwarding device and/or controller is added to the network. ; The controller in the network is idle; the forwarding device and/or controller has failed.
相应的, 当网络中新增转发设备和 /或控制器和 /或有控制器处于闲置状 态时, 如果转发设备和 /或控制器与管理控制器直接连接, 则可直接向管理 控制器发送 hello消息;如果转发设备和 /或控制器与管理控制器并不是直接 连接, 则可通过与之连接的转发设备和 /或控制器告知管理控制器。  Correspondingly, when a new forwarding device and/or controller and/or a controller are in an idle state in the network, if the forwarding device and/or the controller are directly connected to the management controller, the hello can be directly sent to the management controller. Message; if the forwarding device and/or controller is not directly connected to the management controller, the management controller can be informed by the forwarding device and/or controller to which it is connected.
当控制器发生故障时, 与之连接的转发设备可通过向管理控制器发送 "无法连接管理控制器"告知管理控制器。  When the controller fails, the forwarding device connected to it can inform the management controller by sending "Unable to connect to the management controller" to the management controller.
在本实施例中, 当网络中新增控制器或有控制器处于闲置状态时, 管 理控制器获取所在网络中控制器及转发设备的信息包括: 新增控制器或处 于闲置状态的控制器的信息。 优选地, 所述管理控制器设置控制器的控制信息包括: 管理控制器依 据控制器和转发设备的信息调整网络中已有控制器对转发设备的控制信 息; 为新增控制器或处于闲置状态的控制器分配转发设备。 In this embodiment, when a new controller or a controller in the network is in an idle state, the management controller acquires information about the controller and the forwarding device in the network, including: adding a controller or a controller in an idle state. information. Preferably, the management controller sets the control information of the controller, including: the management controller adjusts control information of the existing controller in the network to the forwarding device according to the information of the controller and the forwarding device; is added to the controller or is in an idle state. The controller assigns a forwarding device.
因为每个转发设备的 MASTER控制器只有一个, 所以如果新增的控制 器或处于闲置的控制器是作为 MASTER控制器配置给选中的转发设备时, 转发设备必须与之前连接的 MASTER控制器断开通信; 而如果新增的控制 器或处于闲置的控制器是作为 SALVE控制器或 EQUAL控制器配置给选中 的转发设备时, 转发设备可以依据具体情况选择与之前连接的控制器是否 断开通信。  Since there is only one MASTER controller for each forwarding device, if the newly added controller or the idle controller is configured as the MASTER controller to the selected forwarding device, the forwarding device must be disconnected from the previously connected MASTER controller. Communication; if the newly added controller or the idle controller is configured as a SALVE controller or an EQUAL controller to the selected forwarding device, the forwarding device can select whether to disconnect the previously connected controller according to the specific situation.
优选地, 当网络中新增转发设备时, 所述获取模块 71还要获取新增转 发设备的信息; 相应的, 所述设置模块 72, 配置为为新增的转发设备指定 控制器, 并设置为新增转发设备指定的控制器对新增转发设备的控制权限。  Preferably, when the forwarding device is added to the network, the acquiring module 71 further acquires the information of the newly added forwarding device. Correspondingly, the setting module 72 is configured to specify a controller for the newly added forwarding device, and set Controls the newly added forwarding device for the controller specified by the new forwarding device.
优选地, 所述设置模块 72, 配置为与发生故障的控制器连接的转发设 备指定新的控制器, 并设置新控制器对与发生故障的控制器连接的转发设 备的控制权限。  Preferably, the setting module 72, the forwarding device configured to connect with the failed controller, specifies a new controller, and sets a new controller to control the forwarding device connected to the failed controller.
在设置控制器对转发设备的控制权限时, 可依据发生故障的控制器对 转发设备的控制权限而设置。 例如, 故障控制器是转发设备的 MASTER控 制器, 所述设置模块 72, 配置为为该转发设备指定的控制器拥有对转发设 备的所有控制权限, 且是转发设备的 MASTER控制器。  When setting the controller's control right to the forwarding device, it can be set according to the control authority of the failed controller to the forwarding device. For example, the fault controller is a MASTER controller of the forwarding device, and the setting module 72 is configured such that the controller designated for the forwarding device has all control rights to the forwarding device and is the MASTER controller of the forwarding device.
在本实施例中, 在管理控制器获取的控制器及转发设备的信息包括以 下至少一种: 控制器的性能、 负载情况、 控制器和转发设备的网络拓朴。  In this embodiment, the information of the controller and the forwarding device acquired by the management controller includes at least one of the following: a performance of the controller, a load condition, a network topology of the controller and the forwarding device.
当获取的信息为控制器的性能时, 管理控制器获取各控制器的性能信 息, 分析该性能信息, 计算最适合该控制器承载的转发设备的数目, 依据 计算结果分配给该控制器的转发设备的数目。  When the obtained information is the performance of the controller, the management controller obtains the performance information of each controller, analyzes the performance information, calculates the number of forwarding devices most suitable for the controller, and allocates the forwarding to the controller according to the calculation result. The number of devices.
所述获取模块 71, 配置为当获取的信息为控制器的负载情况时, 获取 所在网络中各控制器的负载情况, 并依据负载情况设置控制器对转发设备 的控制信息。 The obtaining module 71 is configured to acquire when the acquired information is a load condition of the controller. The load status of each controller in the network, and set the controller's control information for the forwarding device according to the load.
其中, 获取的方式有多种, 在这里提供两种常用的方法: 方法一、 管 理控制器记录各个控制器所负责管理的转发设备数量, 从而获知各控制器 的负载情况; 方法二、 所有控制器实时地计算其负载情况, 并将其负载情 况周期地发送给管理控制器。  There are several ways to obtain, and two common methods are provided here: Method 1. The management controller records the number of forwarding devices that each controller is responsible for, so as to know the load status of each controller; Method 2, all control The load is calculated in real time and its load is periodically sent to the management controller.
各控制器可釆用以下方法计算负载: (1 )通过控制器与转发设备连接 的管理接口的带宽使用率计算负载; (2 )周期性地统计本控制器向转发设 备发送的流表数量, 依据流表数量计算负载。 管理控制器在获知各控制器 的负载情况之后, 在设置控制器对转发设备的控制信息的过程中, 设置的 原则是: 确保各控制器的负载均衡。  Each controller can calculate the load by the following methods: (1) calculating the load by using the bandwidth usage of the management interface connected to the forwarding device by the controller; (2) periodically counting the number of flow tables sent by the controller to the forwarding device, Calculate the load based on the number of flow tables. After the management controller knows the load status of each controller, in setting the controller's control information for the forwarding device, the principle is set to: Ensure load balancing of each controller.
所述获取模块 71, 配置为当获取的信息为控制器及转发设备的网络拓 朴时, 可通过获取网络中各控制器及转发设备的地址从而获取网络中控制 器和转发设备的网络拓朴。  The obtaining module 71 is configured to obtain the network topology of the controller and the forwarding device in the network by acquiring the addresses of the controllers and the forwarding devices in the network when the acquired information is the network topology of the controller and the forwarding device. .
所述获取模块 71, 配置为当网络中新增转发设备时, 依据与新增转发 设备连接的转发设备或控制器的地址获知新增转发设备的连接拓朴。 相应 地, 管理控制器在获知网络拓朴之后, 在设置控制器对转发设备的控制信 息的过程中, 设置的原则是: 确保建立通信的控制器与转发设备之间的连 接跳数较少。  The obtaining module 71 is configured to learn the connection topology of the newly-added forwarding device according to the address of the forwarding device or the controller connected to the newly-added forwarding device when the forwarding device is added to the network. Correspondingly, after the management controller knows the network topology, in setting the controller's control information for the forwarding device, the setting principle is: Ensure that the number of connection hops between the controller that establishes communication and the forwarding device is small.
在本实施例中, 管理控制器可同时获取控制器的负载情况及所在网络 中控制器和转发设备的网络拓朴, 管理控制器综合负载情况及网络拓朴信 息, 在配置转发设备与控制器之间的管理关系时, 确保各控制器的负载均 衡, 并兼顾建立通信的控制器与转发设备之间的连接跳数较少。  In this embodiment, the management controller can simultaneously acquire the load condition of the controller and the network topology of the controller and the forwarding device in the network, manage the integrated load situation of the controller, and the network topology information, and configure the forwarding device and the controller. When managing relationships, ensure that each controller is load balanced, and that the number of connection hops between the controller that establishes communication and the forwarding device is small.
本实施例中, 所述第一发送模块 73, 配置为通过发送消息的方式告知 控制器其对转发设备的控制信息。 在本实施例中, 转发设备包括交换机、 光网络等设备。 In this embodiment, the first sending module 73 is configured to notify the controller of the control information of the forwarding device by sending a message. In this embodiment, the forwarding device includes a switch, an optical network, and the like.
上述获取模块可以由 I/O接口以及 CPU或 I/O接口以及 DSP等硬件结 合实现; 所述设置模块可以由 CPU或 DSP等硬件实现; 所述第一发送模块 可以由 I/O接口以及 CPU或 I/O接口以及 DSP等硬件结合实现。 实施例七:  The obtaining module may be implemented by an I/O interface, a CPU or an I/O interface, and a hardware such as a DSP; the setting module may be implemented by hardware such as a CPU or a DSP; the first sending module may be an I/O interface and a CPU. Or I / O interface and DSP and other hardware combined implementation. Example 7:
本实施例提供一种控制器, 该控制器是依据上述方法中的控制器设置 的, 该控制器的结构示意图请参见图 8, 该控制器包括: 第二发送模 81、 接收模块 82及通信模块 83; 其中,  The embodiment provides a controller, which is set according to the controller in the above method. For a schematic diagram of the structure of the controller, refer to FIG. 8. The controller includes: a second sending module 81, a receiving module 82, and a communication. Module 83; wherein
第二发送模块 81, 配置为将控制器自身的信息发送给所在网络中的管 理控制器;  The second sending module 81 is configured to send information of the controller itself to a management controller in the network;
接收模块 82, 配置为接收管理控制器发送的依据控制器及转发设备的 信息设置的控制器对转发设备的控制信息;  The receiving module 82 is configured to receive, by the management controller, control information of the controller and the forwarding device according to the information set by the controller and the forwarding device;
通信模块 83, 配置为依据控制信息与相应的转发设备建立通信。 实施例八:  The communication module 83 is configured to establish communication with the corresponding forwarding device according to the control information. Example 8:
本实施例提供了一种管理控制器, 该管理控制器依据上述方法中的管 理控制器进行设置, 请参见图 9, 该管理控制器包括第一以太网口 91、 第 一存储器 92和处理器 93; 其中,  This embodiment provides a management controller, which is configured according to the management controller in the above method. Referring to FIG. 9, the management controller includes a first Ethernet port 91, a first memory 92, and a processor. 93; Among them,
所述第一以太网口 91, 配置为获取网络中控制器及转发设备的信息, 并存储于第一存储器中;  The first Ethernet port 91 is configured to acquire information about a controller and a forwarding device in the network, and store the information in the first memory.
所述第一存储器 92, 配置为依据控制器及转发设备的信息设置控制器 对转发设备的控制信息;  The first memory 92 is configured to set control information of the controller to the forwarding device according to the information of the controller and the forwarding device;
第一以太网口, 配置为将控制信息发送给相应的控制器。  The first Ethernet port is configured to send control information to the corresponding controller.
在本实施例中, 在网络初始化过程中, 第一以太网口还用于与网络中 发现的所有转发设备建立通信。 在本实施例中, 处理器 93, 配置为检测网络中是否新增转发设备和 /或 控制器、 是否有控制器处于闲置状态、 转发设备和 /或控制器是否发生故障 中的至少一种情况, 如是, 则对相应控制器的控制信息进行设置或更新。 In this embodiment, during the network initialization process, the first Ethernet port is further configured to establish communication with all forwarding devices found in the network. In this embodiment, the processor 93 is configured to detect whether at least one of the forwarding device and/or the controller is added to the network, whether the controller is in an idle state, whether the forwarding device and/or the controller are faulty. If yes, set or update the control information of the corresponding controller.
在本实施例中, 第一以太网口获取的网络中的控制器及转发设备的信 息为: 控制器的负载情况及控制器和转发设备的网络拓朴; 处理器用于依 据负载情况及网络拓朴设置控制器对转发设备的控制信息。 实施例九:  In this embodiment, the information of the controller and the forwarding device in the network acquired by the first Ethernet interface is: a load condition of the controller and a network topology of the controller and the forwarding device; the processor is configured to be based on the load situation and the network extension Pu sets the controller's control information for the forwarding device. Example 9:
本实施例提供一种控制器, 该控制器是依据上述方法中的控制器设置 的, 该控制器包括第二以太网口, 第二以太网口用于将控制器自身的信息 发送给所在网络中的管理控制器; 第二以太网口还用于接收管理控制器发 送的依据控制器及转发设备的信息设置的控制器对转发设备的控制信息; 第二以太网口还用于依据控制器信息与相应的转发设备建立通信。  The embodiment provides a controller, which is set according to the controller in the above method, the controller includes a second Ethernet port, and the second Ethernet port is used to send information of the controller itself to the network. The second Ethernet port is further configured to receive, by the management controller, control information of the controller to the forwarding device according to the information set by the controller and the forwarding device; the second Ethernet port is further configured to be used according to the controller The information establishes communication with the corresponding forwarding device.
在本实施例中, 该控制器还包括第二存储器, 第二存储器用于统计控 制器的负载情况; 第二以太网口发送的控制器自身的信息为: 控制器的负 载情况。 以上内容是结合具体的实施方式对本发明所作的进一步详细说明, 不 能认定本发明的具体实施只局限于这些说明。 对于本发明所属技术领域的 普通技术人员来说, 在不脱离本发明构思的前提下, 还可以做出若干简单 推演或替换, 都应当视为属于本发明的保护范围。  In this embodiment, the controller further includes a second memory, where the second memory is used to count the load condition of the controller; and the information of the controller itself sent by the second Ethernet port is: a load condition of the controller. The above is a further detailed description of the present invention in connection with the specific embodiments, and the specific embodiments of the present invention are not limited to the description. It is to be understood by those skilled in the art that the present invention may be practiced without departing from the spirit and scope of the invention.

Claims

权利要求书 claims
1、 一种设置控制信息的方法, 包括: 1. A method of setting control information, including:
管理控制器获取所在网络中控制器及转发设备的信息; The management controller obtains information about the controllers and forwarding devices in the network;
所述管理控制器依据所述控制器及转发设备的信息, 设置各个所述控 制器对转发设备的控制信息; The management controller sets the control information of each controller on the forwarding device based on the information of the controller and the forwarding device;
所述管理控制器将所述控制信息发送给对应的控制器。 The management controller sends the control information to the corresponding controller.
2、 如权利要求 1所述的设置控制信息的方法, 其中, 所述控制信息包 括: 所述管理控制器为所述控制器分配的转发设备的信息; 所述控制器对 分配给所述控制器的转发设备的控制权限。 2. The method of setting control information according to claim 1, wherein the control information includes: information about the forwarding device assigned by the management controller to the controller; The control authority of the forwarding device of the server.
3、 如权利要求 1所述的设置控制信息的方法, 其中, 在网络初始化过 程中, 所述管理控制器获取所在网络中控制器及转发设备的信息之前, 所 述还包括: 所述管理控制器与网络中发现的所有转发设备建立通信。 3. The method of setting control information according to claim 1, wherein during the network initialization process, before the management controller obtains the information of the controller and forwarding device in the network, the method further includes: the management control The server establishes communication with all forwarding devices discovered on the network.
4、 如权利要求 1所述的设置控制信息的方法, 其中, 当所述管理控制 器获知以下情况中的至少一种时, 所述管理控制器设置或更新相应控制器 的控制信息: 4. The method of setting control information according to claim 1, wherein when the management controller learns at least one of the following situations, the management controller sets or updates the control information of the corresponding controller:
网络中新增转发设备和 /或控制器; Add new forwarding devices and/or controllers to the network;
网络中有控制器处于闲置状态; There are controllers in the network that are idle;
转发设备和 /或控制器发送故障。 Forwarding device and/or controller transmit failure.
5、 如权利要求 4所述的设置控制信息的方法, 其中, 5. The method of setting control information as claimed in claim 4, wherein,
当网络中新增控制器、 或网络中有控制器处于闲置状态时, 所述管理 控制器获取所在网络中控制器及转发设备的信息, 包括: 所述新增控制器 或处于闲置状态的控制器的信息; When a controller is added to the network, or a controller in the network is in an idle state, the management controller obtains information about the controllers and forwarding devices in the network, including: The newly added controller or the controller in an idle state device information;
其中, 所述管理控制器设置控制器的控制信息包括: 所述管理控制器 依据控制器和转发设备的信息调整网络中已有控制器对转发设备的控制信 息; 为新增控制器或处于闲置状态的控制器分配转发设备; 当网络中新增转发设备时, 所述管理控制器获取所在网络中控制器及 转发设备的信息包括: 新增转发设备的信息; 所述控制器对分配给所述控 制器的转发设备的控制权限包括: 所述管理控制器为新增的转发设备指定 控制器, 并设置为新增转发设备指定的控制器对所述新增转发设备的控制 权限; Wherein, the management controller setting the control information of the controller includes: the management controller adjusts the control information of the existing controller on the forwarding device in the network based on the information of the controller and the forwarding device; For a new controller or it is idle The stateful controller allocates forwarding devices; When a new forwarding device is added to the network, the information obtained by the management controller about the controller and the forwarding device in the network includes: the information about the new forwarding device; the controller's control of the forwarding device assigned to the controller The permissions include: the management controller designates a controller for the newly added forwarding device, and sets the control authority of the controller designated for the newly added forwarding device over the newly added forwarding device;
当网络中控制器发送故障时, 设置各个所述控制器对转发设备的控制 信息包括: 管理控制器为与发生故障的控制器连接的转发设备指定新的控 制器, 并设置所述新控制器对与发生故障的控制器连接的转发设备的控制 权限。 When a controller in the network transmits a fault, setting the control information of each controller on the forwarding device includes: the management controller designates a new controller for the forwarding device connected to the failed controller, and sets the new controller Control of the forwarding device connected to the failed controller.
6、 如权利要求 1-5任一项所述的设置控制信息的方法, 其中, 所在网 络中控制器及转发设备的信息包括: 控制器的负载情况; 6. The method of setting control information according to any one of claims 1 to 5, wherein the information about the controller and the forwarding device in the network includes: the load status of the controller;
相应的, 所述管理控制器依据所述控制器及转发设备的信息, 设置各 个所述控制器对转发设备的控制信息包括: 所述管理控制器依据所述负载 情况设置控制器对转发设备的控制信息。 Correspondingly, the management controller setting the control information of each controller to the forwarding device based on the information of the controller and the forwarding device includes: the management controller setting the control information of the controller to the forwarding device based on the load condition. control information.
7、 如权利要求 1-5任一项所述的设置控制信息的方法, 其中, 所在网 络中控制器及转发设备的信息包括: 控制器的负载情况及所在网络中控制 器和转发设备的网络拓朴; 7. The method of setting control information according to any one of claims 1 to 5, wherein the information about the controller and the forwarding device in the network includes: the load status of the controller and the network of the controller and the forwarding device in the network. topology;
相应的, 所述管理控制器依据所述控制器及转发设备的信息, 设置各 个所述控制器对转发设备的控制信息包括: 所述管理控制器依据所述负载 情况及所述网络拓朴设置控制器对转发设备的控制信息。 Correspondingly, the management controller, based on the information of the controller and the forwarding device, sets the control information of each controller on the forwarding device including: the management controller sets based on the load condition and the network topology. Control information from the controller to the forwarding device.
8、 一种建立通信的方法, 包括: 8. A method of establishing communication, including:
所述控制器将自身的信息发送给所在网络中的管理控制器; The controller sends its own information to the management controller in the network;
所述控制器接收所述管理控制器发来的控制信息, 其中, 所述控制信 息为所述管理控制器依据所述控制器及转发设备的信息设置的所述控制器 对转发设备的控制信息; 所述控制器依据所述控制信息与相应的转发设备建立通信。 The controller receives the control information sent by the management controller, where the control information is the control information of the controller on the forwarding device that is set by the management controller based on the information of the controller and the forwarding device. ; The controller establishes communication with the corresponding forwarding device according to the control information.
9、如权利要求 8所述的建立通信的方法,其中, 所述自身的信息包括: 所述控制器的负载情况。 9. The method of establishing communication according to claim 8, wherein the self-information includes: the load condition of the controller.
10、 一种管理控制器, 所述管理控制器包括: 获取模块、 设置模块和 第一发送模块; 其中, 10. A management controller, the management controller includes: an acquisition module, a setting module and a first sending module; wherein,
所述获取模块, 配置为获取网络中控制器及转发设备的信息; 所述设置模块, 配置为依据所述控制器及所述转发设备的信息设置控 制器对转发设备的控制信息; The acquisition module is configured to obtain information about the controller and the forwarding device in the network; the setting module is configured to set the control information of the controller on the forwarding device based on the information about the controller and the forwarding device;
所述第一发送模块, 配置为将所述控制信息发送给对应的控制器。 The first sending module is configured to send the control information to the corresponding controller.
11、 如权利要求 10所述的管理控制器, 其中, 所述获取模块, 配置为 获取网络中控制器的负载情况及控制器和转发设备的网络拓朴; 11. The management controller as claimed in claim 10, wherein the acquisition module is configured to acquire the load status of the controller in the network and the network topology of the controller and the forwarding device;
所述设置模块, 配置为依据所述负载情况及所述网络拓朴设置控制器 对转发设备的控制信息。 The setting module is configured to set the control information of the controller to the forwarding device according to the load condition and the network topology.
12、 一种控制器, 所述控制器包括: 第二发送模块、 接收模块及通信 模块; 其中, 12. A controller, the controller includes: a second sending module, a receiving module and a communication module; wherein,
所述第二发送模块, 配置为将控制器自身的信息发送给所在网络中的 管理控制器; The second sending module is configured to send the controller's own information to the management controller in the network;
所述接收模块, 配置为接收所述管理控制器发送的依据所述控制器及 转发设备的信息设置的控制器对转发设备的控制信息; The receiving module is configured to receive the control information of the controller on the forwarding device sent by the management controller based on the information of the controller and the forwarding device;
所述通信模块, 配置为依据所述控制器信息与相应的转发设备建立通 信。 The communication module is configured to establish communication with the corresponding forwarding device based on the controller information.
13、 一种管理控制器, 所述管理控制器包括: 第一以太网口、 第一存 储器和处理器; 其中, 13. A management controller, the management controller includes: a first Ethernet port, a first memory and a processor; wherein,
所述第一以太网口, 配置为获取网络中控制器及转发设备的信息, 并 存储于第一存储器中; 所述第一存储器, 配置为依据所述控制器及所述转发设备的信息设置 控制器对转发设备的控制信息; The first Ethernet port is configured to obtain information about the controller and forwarding devices in the network and store it in the first memory; The first memory is configured to set the control information of the controller to the forwarding device based on the information of the controller and the forwarding device;
处理器, 配置为检测网络中是否新增转发设备和 /或控制器、 是否有控 制器处于闲置状态、转发设备和 /或控制器是否发生故障中的至少一种情况, 如是, 则对相应控制器的控制信息进行设置或更新; The processor is configured to detect at least one of the following situations: whether a new forwarding device and/or controller is added to the network, whether a controller is in an idle state, or whether the forwarding device and/or controller fails, and if so, to the corresponding control Set or update the control information of the device;
其中, 所述第一以太网口, 配置为将所述控制信息发送给相应的控制 器。 Wherein, the first Ethernet port is configured to send the control information to the corresponding controller.
14、 一种控制器, 应用在软件定义网络中, 所述控制器包括第二以太 网口, 配置为将控制器自身的信息发送给所在网络中的管理控制器; 14. A controller applied in a software-defined network, the controller including a second Ethernet port configured to send the controller's own information to a management controller in the network;
所述第二以太网口, 配置为接收所述管理控制器发送的依据所述控制 器及转发设备的信息设置的控制器对转发设备的控制信息; 依据所述控制 器信息与相应的转发设备建立通信。 The second Ethernet port is configured to receive the control information of the controller to the forwarding device sent by the management controller based on the information of the controller and the forwarding device; based on the controller information and the corresponding forwarding device Establish communication.
PCT/CN2014/076687 2014-01-16 2014-04-30 Methods for setting control information and establishing communication, management controller and controller WO2015106506A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410018969.1 2014-01-16
CN201410018969.1A CN104796269A (en) 2014-01-16 2014-01-16 Control information setting method, communication establishing method, management controller, and controller

Publications (1)

Publication Number Publication Date
WO2015106506A1 true WO2015106506A1 (en) 2015-07-23

Family

ID=53542335

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2014/076687 WO2015106506A1 (en) 2014-01-16 2014-04-30 Methods for setting control information and establishing communication, management controller and controller

Country Status (2)

Country Link
CN (1) CN104796269A (en)
WO (1) WO2015106506A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108011815B (en) * 2016-10-28 2020-12-01 中国电信股份有限公司 Network control method and software defined network device and system
CN115426327B (en) * 2022-11-04 2023-01-13 北京邮电大学 Calculation force scheduling method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103346971A (en) * 2013-06-19 2013-10-09 华为技术有限公司 Data forwarding method, controller, forwarding device and system
CN103401786A (en) * 2013-07-12 2013-11-20 华为技术有限公司 Method, device and system for establishing network topology, controlling path and transmitting message
CN103501236A (en) * 2013-08-26 2014-01-08 武汉烽火网络有限责任公司 Method and device for generating network control plane logical topology

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101488879B (en) * 2008-01-15 2013-09-11 上海贝尔阿尔卡特股份有限公司 Failure protection method and apparatus in network appliance for Ethernet spanning tree protocol
CN102209035B (en) * 2011-05-25 2014-10-15 杭州华三通信技术有限公司 Traffic forwarding method and devices
CN102281195B (en) * 2011-08-03 2014-07-30 华为技术有限公司 Switch and switch system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103346971A (en) * 2013-06-19 2013-10-09 华为技术有限公司 Data forwarding method, controller, forwarding device and system
CN103401786A (en) * 2013-07-12 2013-11-20 华为技术有限公司 Method, device and system for establishing network topology, controlling path and transmitting message
CN103501236A (en) * 2013-08-26 2014-01-08 武汉烽火网络有限责任公司 Method and device for generating network control plane logical topology

Also Published As

Publication number Publication date
CN104796269A (en) 2015-07-22

Similar Documents

Publication Publication Date Title
US9531643B2 (en) Extending virtual station interface discovery protocol (VDP) and VDP-like protocols for dual-homed deployments in data center environments
US9143439B2 (en) System and method for cluster link aggregation control in a network environment
US10050824B2 (en) Managing a cluster of switches using multiple controllers
US9338097B2 (en) Method and system for load balancing at a data network
RU2651149C2 (en) Sdn-controller, data processing center system and the routed connection method
US10587494B2 (en) Network control method and apparatus
EP3261290A1 (en) Software defined data center and method for deploying service cluster therein
EP3016316B1 (en) Network control method and apparatus
US8948176B1 (en) Distributed fibre channel forwarder
JP6384696B2 (en) Forwarding table synchronization method, network device and system
WO2015074396A1 (en) Automatic configuration method, device and system of software defined network
EP2911346B1 (en) Method and network device for establishing virtual cluster
JP5866083B1 (en) Control method, control apparatus and processor in software definition network
WO2015131757A1 (en) Channel between software defined networking device and controller
CN106797319B (en) Network service aware router and application thereof
TW201914265A (en) Software Defined Network system with auto-deployment switches and auto-deploying method thereof
KR101665276B1 (en) System and method for a pass thru mode in a virtual chassis system
WO2015106506A1 (en) Methods for setting control information and establishing communication, management controller and controller
KR20170000787A (en) Method for link configuration between SFF and SF for ensuring stability of service function chaining
KR20150085464A (en) Apparatus and method for servers interconnection
US10367681B2 (en) Maintenance of data forwarder connection state information
US8732335B2 (en) Device communications over unnumbered interfaces
US20150200813A1 (en) Server connection apparatus and server connection method
CN106712994B (en) Software defined network management method and communication system
JP2022518451A (en) Systems and methods for a single logical IP subnet across multiple independent Layer 2 (L2) subnets in a high performance computing environment

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

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

Country of ref document: EP

Kind code of ref document: A1