WO2016202072A1 - Automatic configuration method, controller and device - Google Patents

Automatic configuration method, controller and device Download PDF

Info

Publication number
WO2016202072A1
WO2016202072A1 PCT/CN2016/079265 CN2016079265W WO2016202072A1 WO 2016202072 A1 WO2016202072 A1 WO 2016202072A1 CN 2016079265 W CN2016079265 W CN 2016079265W WO 2016202072 A1 WO2016202072 A1 WO 2016202072A1
Authority
WO
WIPO (PCT)
Prior art keywords
switch
controller
connection
configuration
packet
Prior art date
Application number
PCT/CN2016/079265
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 WO2016202072A1 publication Critical patent/WO2016202072A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • H04L41/0886Fully automatic configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0889Techniques to speed-up the configuration process

Definitions

  • the present invention relates to the field of communications, and in particular, to an automatic configuration method, a controller, and a device.
  • a data center consists of a large number of servers, switches, and other network devices that require the necessary configuration to function properly. But the data center is getting bigger and bigger, it may contain tens of thousands or even hundreds of thousands of servers and thousands of switches. Manually configuring so many devices requires a lot of manpower and is prone to configuration errors, so configuration automation is data center. A big demand is also an important research direction in cloud computing technology.
  • the controller sends a first configuration reply message to the first switch by using an OF connection between the controller and the first switch, where the first configuration reply message includes a configuration of the first device.
  • the information is forwarded by the first switch to the first device, and the first device performs device configuration according to the configuration information.
  • the controller sends a first flow entry to the first switch according to the first packet in packet, where the first flow entry is used to forward the first configuration request packet;
  • the controller receives the first configuration request message sent by the first switch according to the first flow entry.
  • the controller sends a first flow entry to the intermediate switch and the first switch according to the first packet in message, where the first flow entry is used to forward the first configuration request message;
  • the intermediate switch is a switch on the OF connection between the controller and the first switch;
  • the controller receives the first configuration request message sent by the first switch by using the intermediate switch; the intermediate switch forwards the first configuration request message according to the first flow entry;
  • the controller sends a first configuration reply message to the first switch by using an OF connection between the controller and the first switch, including:
  • the controller sends a second packet out message to the first switch by using the OF connection, where the second packet out message includes the first configuration reply message.
  • the controller establishes an OF connection with the first device.
  • the controller processes the OF connection request, and sends an OF connection response to the first switch, so that the first switch sends the OF connection response to the first device.
  • the controller sends a second flow entry to the intermediate switch and the first switch according to the third packet in message, where the second flow entry is used to forward the OF connection request;
  • the first device establishes an OF connection with the controller, including:
  • the first device receives an OF connection response sent by the first switch.
  • the first device sends the second configuration request message to the controller through the intermediate switch;
  • the intermediate switch is a switch on the OF connection between the controller and the first device;
  • the intermediate switch passes And the third flow entry that is sent by the controller to the intermediate switch to forward the second configuration request packet;
  • the first switch is a non-directly connected switch
  • the receiving unit is specifically configured to:
  • the sending unit is specifically configured to:
  • the first switch Receiving a third packet in message sent by the first switch by using an OF connection between the first switch and the controller; the first switch receiving the OF sent by the first device Sending the third packet in message when the connection request is determined and the flow entry that is not based on the OF connection request is determined in the first switch;
  • a configuration unit configured to perform device configuration according to the configuration information received by the first receiving unit.
  • the first device is a non-directly connected switch, and further includes:
  • a connection establishing unit is configured to establish an OF connection with the controller.
  • the first device receives an OF connection response sent by the first switch.
  • a second receiving unit configured to receive a second configuration request message sent by the second device, where the second configuration request message includes: device information of the second device;
  • the first device is a direct-connecting switch
  • the second sending unit is specifically configured to:
  • the intermediate switch is a switch on an OF connection between the controller and the first device; and the intermediate switch is respectively configured by the controller
  • the third flow entry sent to the intermediate switch forwards the second configuration request packet
  • the second sending unit is specifically configured to: send a fifth packet in packet to the controller, where the fifth The packet in packet includes the second configuration request packet;
  • the first device is a direct connection switch
  • the second receiving unit is further configured to: receive an OF connection request sent by the second device
  • the second sending unit is further configured to: send the OF connection request to the controller;
  • the first device is a non-direct connection switch
  • the second receiving unit is further configured to: receive an OF connection request sent by the second device
  • the second sending unit is further configured to: when it is determined that there is no flow entry for forwarding the OF connection request in the first device, send a fifth packet in report based on the OF connection request to the controller Text
  • the second receiving unit is further configured to: receive an OF connection response sent by the controller by using the intermediate switch;
  • the second sending unit is further configured to: send the OF connection response to the second device.
  • FIG. 1 is a structural diagram of an application network according to an embodiment of the present invention.
  • FIG. 8 is another flowchart of an automatic configuration method according to an embodiment of the present invention.
  • FIG. 11 is a schematic structural diagram of a first device according to an embodiment of the present invention.
  • Open Flow (OF) technology is a southward protocol proposed by Stanford University. It accelerates the transformation of the network by controlling the separation of control and forwarding, controlling the generalization of centralized software and forwarding hardware platforms.
  • An OpenFlow network based on OpenFlow technology includes an OpenFlow controller and an OpenFlow switch.
  • the OpenFlow switch is a core component and consists of an OpenFlow protocol, a secure channel, and a flow table.
  • the OF controller sends a flow entry to the flow table of the OF switch through the secure channel.
  • the OF switch performs the match + action according to the flow table.
  • the switch directly connected to the controller is called a direct connection switch; the switch that is not directly connected to the controller, and the controller connected to the controller through other switches is called a non-direct connection switch.
  • the connection between the direct switch and the controller can be either a physical connection or a tunnel connection.
  • FIG. 2 is a schematic flowchart of an automatic preparation method according to an embodiment of the present invention, where the method includes:
  • the first device may be a switch or a user equipment.
  • Step 202 The controller determines configuration information of the first device according to device information of the first device.
  • the controller receives the first configuration request message sent by the first switch by using the intermediate switch; the intermediate switch forwards the first configuration request message according to the first flow entry;
  • the controller sends the first configuration reply message to the first switch by using the intermediate switch, and the intermediate switch forwards the first configuration reply message according to the first flow entry.
  • the controller receives the first configuration request message of the first device that is forwarded by the first switch by using the OF connection between the first switch and the controller, and includes:
  • the first device is a non-directly connected switch, and further includes:
  • the controller establishes an OF connection with the first device.
  • the controller receives a third packet in message sent by the first switch by using an OF connection with the controller, and the first switch sends the first device to receive Sending the third packet in message when the OF connection request is requested and the flow entry of the first switch is not used to forward the OF connection request;
  • the controller sends a second flow entry for forwarding the OF connection request to the first switch according to the third packet in packet;
  • the controller receives the OF connection request sent by the first switch
  • the first device is a non-directly connected switch
  • the first switch is a non-directly connected switch
  • the controller establishes an OF connection with the first device, including:
  • the controller receives the OF connection request sent by the first switch by using the intermediate switch; the intermediate switch forwards the OF connection request by using the second flow entry;
  • the controller processes the OF connection request, and sends an OF connection response to the first switch by the intermediate switch, so that the first switch sends the OF connection response to the first device, where the middle The switch forwards the OF connection response by using the second flow entry.
  • the first configuration request message and the first configuration response message are messages that can be transmitted without a network address configuration.
  • the configuration information of the first device includes: an IP (Internet Protocol) address interconnected between the networks of the first device, or an IP address and a controller IP address of the first device.
  • IP Internet Protocol
  • the controller receives the first configuration request message of the first device that is forwarded by the first switch by using the OF connection between the first switch and the controller, where the first configuration request message includes: Device information of the first device; the first switch is located between the controller and the first device, and the first configuration request message is sent by the first device to the first switch, according to the The device information of the first device determines configuration information of the first device, and sends a first configuration reply message to the first switch by using an OF connection between the controller and the first switch, where the The configuration reply message includes the configuration information of the first device, so that the first switch forwards the first configuration reply message to the first device, and the first device performs the device according to the configuration information. Configuration, thus enabling automatic configuration of the first device.
  • FIG 3 is another schematic flowchart of an automatic preparation method according to an embodiment of the present invention, where the method includes:
  • Step 302 The first device receives a first configuration reply message sent by the first switch, where the first configuration reply message is used by the controller between the controller and the first switch.
  • the OF connection is sent to the first switch;
  • Step 303 The first device performs device configuration according to the configuration information.
  • the first device is a non-directly connected switch, and further includes:
  • the first device establishes an OF connection with the controller, including:
  • the first device receives an OF connection response sent by the first switch.
  • the first device receives a second configuration request message sent by the second device, where the second configuration request message includes: device information of the second device;
  • the first device sends the second configuration reply message to the second device.
  • the first device is a direct connection switch, and the first device sends the second configuration request message to the controller by using an OF connection between the first device and the controller, including :
  • the first device determines that there is no flow entry for forwarding the second configuration request packet
  • the first device sends the second configuration request packet to the controller by using the OF connection.
  • Fourth packet in message
  • the first device sends the second configuration request message to the controller.
  • the first device is a non-directly connected switch, and the first device sends the second configuration request message to the controller by using an OF connection between the first device and the controller.
  • the first device receives a third flow entry that is sent by the controller according to the fourth packet in packet to forward the second configuration request packet;
  • the first device sends the second configuration request message to the controller through the intermediate switch;
  • the intermediate switch is a switch on the OF connection between the controller and the first device;
  • the intermediate switch passes And the third flow entry that is sent by the controller to the intermediate switch to forward the second configuration request packet;
  • the first device receives the second configuration reply message sent by the controller through the intermediate switch, and the intermediate switch forwards the second configuration reply message by using the third flow entry.
  • the first device sends the second configuration request message to the controller by using an OF connection between the first device and the controller, including:
  • the first device receives the fifth packet out message sent by the controller, and the fifth packet out message includes the second configuration reply message.
  • the first device determines that there is no flow entry for forwarding the OF connection request, the first device sends a fifth packet in packet based on the OF connection request to the controller;
  • the first device receives an OF connection response sent by the controller, and sends the OF connection response to the second device.
  • the first device determines that there is no flow entry for forwarding the OF connection request, the first device sends a fifth packet in packet based on the OF connection request to the controller;
  • the first device sends the OF connection request to a controller through an intermediate switch;
  • the intermediate switch is a switch on an OF connection between the controller and the first device; and the intermediate switch passes the control
  • the fourth flow entry that is respectively delivered to the intermediate switch forwards the OF connection request;
  • the first device receives an OF connection response sent by the controller through the intermediate switch, and sends the OF connection response to the second device.
  • the first configuration request message and the first configuration response message are messages that can be transmitted without a network address configuration.
  • the first configuration request message and the first configuration response message are packets based on LLDP or DHCP protocol.
  • the configuration information of the first device includes: an IP address of the first device, or an IP address of the first device and a controller IP address.
  • the device information of the first device includes: a MAC address of the first device, and a first device ID.
  • the first device sends a first configuration request message to the first switch, so that the first switch sends the first configuration request report by using an OF connection between the first switch and the controller.
  • the first switch has a connection relationship with the first device, and receives a first configuration reply message sent by the first switch, where the first configuration reply message is used by the controller. And transmitting, by the OF connection between the controller and the first switch, to the first switch, performing device configuration according to the configuration information, thereby implementing automatic configuration of the first device.
  • FIG. 4A is a schematic diagram of a network structure according to an embodiment of the present invention, including: a controller, a direct connection switch directly connected to the controller, a first non-direct connection switch connected to the direct connection switch, and the first non-straight switch. a second indirect switch connected to the switch, a first user equipment connected to the direct switch, a second user equipment connected to the first indirect switch, and the like.
  • FIG. 4B is a flowchart of an automatic configuration method according to an embodiment of the present invention. The process for automatically configuring a direct-connected switch by a controller is described in conjunction with FIG. 4A, where the method includes:
  • the device information may include: a MAC address of the direct-connected switch, a direct-connected switch ID, and the like.
  • the first configuration request packet may be a packet that can be transmitted without a network address configuration, such as a packet based on LLDP or a DHCP protocol.
  • Step 402 The controller determines, according to the device information of the directly connected switch in the first configuration request message, the configuration information of the directly connected switch, and sends the first configuration reply message to the direct connection switch.
  • the first configuration reply message may include: configuration information of the directly connected switch, for example, an IP address assigned by the controller to the directly connected switch, an IP address of the controller, and the like, and the first configuration reply message may further include other direct connection.
  • the configuration information of the switch can be set independently in the actual application. There is no limit here.
  • Step 403 The direct switch performs device configuration according to the configuration information in the first configuration reply packet.
  • Step 405 The controller processes the OF connection request, and sends an OF connection response to the direct connection switch.
  • the device information may include: a MAC address of the first indirect switch, a first indirect switch ID, and the like.
  • the first configuration request packet may be a packet that can be transmitted without a network address configuration, such as a packet based on LLDP or a DHCP protocol.
  • the first configuration request packet may be periodically sent before the first indirect connection switch is configured.
  • Step 502 The direct switch sends a first packet in packet based on the first configuration request message to the controller by using the OF connection between the direct switch and the controller.
  • the packet in packet is used to report the packet that cannot be processed by the switch to the controller.
  • the first packet in packet based on the first configuration request packet has the same function, and is reported to the controller.
  • the direct switch receives the first configuration request packet.
  • the first packet in packet may include: an identifier of the directly connected switch (such as an IP address, a MAC address, and the like), and a port number of the first configuration request packet.
  • the first packet in the packet may also carry part of the information in the first configuration request packet, and the specific information carried in the packet is not limited in the embodiment of the present invention.
  • Step 503 The controller sends the first flow entry to the direct switch according to the first packet in packet.
  • the flow entry for forwarding the first configuration request packet is referred to as the first flow entry in the embodiment of the present invention.
  • the first flow entry in this step is actually two flow entries, which are assumed to be the flow entry A and the flow entry B.
  • the flow entry A is used to indicate that the direct switch sends the packet to the controller.
  • the flow entry is forwarded to the first indirect switch, and the flow entry B is used to indicate that the direct switch forwards the packet of the first indirect switch to the controller. Implementations The embodiments of the present invention are not limited.
  • the matching field of the flow entry A may include: the IP address of the source device and the MAC address of the destination device, and the IP address of the source device in the flow entry A is the IP address of the controller, and the MAC address of the destination device.
  • the matching field of the flow entry B can include: the MAC address of the source device, and the flow entry
  • the MAC address of the source device in the B is the MAC address of the first indirectly connected switch.
  • the action command set of the flow entry A may include: forwarding the packet to the first indirect switch, and the flow entry B
  • the action instruction set may include: an action of forwarding the message to the controller;
  • the directly connected switch can complete the forwarding of the packet.
  • Step 504 The direct connection switch saves the first flow entry, and sends the first configuration request packet to the controller according to the first flow entry.
  • the direct switch will forward the first configuration request packet according to the flow entry B.
  • Step 505 The controller determines the configuration information of the first indirect switch according to the device information of the first indirect switch, and sends a first configuration reply message to the direct switch, where the first configuration reply message includes the first indirect connection. Configuration information of the switch.
  • Step 506 The direct connection switch sends the first configuration reply message to the first non-directly connected switch according to the first flow entry.
  • the direct switch will forward the first configuration reply packet according to the flow entry A.
  • Step 507 The first indirect connection switch performs device configuration according to the configuration information in the first configuration reply message.
  • Step 508 The first indirect connection switch sends an OF connection request to the direct connection switch.
  • the directly connected switch has saved the first flow entry of the first indirect switch in step 504. If the OF connection request can match the matching field of the flow entry B, the direct switch determines that the flow of the OF connection request exists. The entry is otherwise determined to be a flow entry that does not have an OF connection request.
  • the field in the OF connection request may be different from the field in the matching field of the flow entry B, and there may be cases where the flow entry B cannot be matched.
  • Step 510 The direct connection switch sends the OF connection request to the controller according to the flow entry of the OF connection request, step 514 is performed;
  • Step 511 The direct connection switch sends a third packet in message based on the OF connection request to the controller by using an OF connection with the controller.
  • the third packet in message based on the OF connection request is used to report to the controller that the direct connection switch receives the OF connection request.
  • Step 512 The controller sends a second flow entry to the direct switch according to the third packet in packet.
  • the flow entry for forwarding the OF connection request is referred to as a second flow entry.
  • the implementation of the second flow entry may refer to the implementation of the first flow entry, except that the second flow entry is used to transmit the OF connection request and the OF connection response.
  • Step 513 The direct connection switch saves the second flow entry, and sends the OF connection request to the controller according to the second flow entry.
  • the direct connection switch may send the OF connection response to the first indirect direct switch according to the second flow entry.
  • Step 515 The first indirect connection switch receives the OF connection response, and completes establishment of the OF connection.
  • the direct connection switch is used as the first configuration request message and the first configuration reply between the intermediate switch forwarding controller and the first indirect direct switch.
  • the packet is configured to implement the configuration of the first non-directly connected switch by the controller, and the automatic configuration of the first non-direct connected switch is completed.
  • the user equipment can be automatically configured by referring to steps 501 to 507 in the embodiment, as long as the first non-direct-connected switch in the step is replaced with the user equipment. .
  • FIG. 6 is a schematic diagram of an automatic configuration process according to an embodiment of the present invention.
  • the controller under the condition that a controller configures a direct-connected switch and establishes an OF connection, the controller automatically configures the first non-directly connected switch.
  • An implementation process. The method includes:
  • Step 601 The first indirect connection switch sends a first configuration request message to the direct connection switch, where the first configuration request message includes: device information of the first indirect connection switch.
  • the device information may include: a MAC address of the first indirect switch, a first indirect switch ID, and the like.
  • the first configuration request packet may be a packet that can be transmitted without a network address configuration, such as a packet based on LLDP or a DHCP protocol.
  • the first configuration request packet may be periodically sent before the first indirect connection switch is configured.
  • Step 602 The direct switch sends a second packet in message to the controller through the OF connection between the direct switch and the controller.
  • Step 603 The controller obtains the first configuration request packet from the second packet in the packet, and determines the configuration information of the first indirect switch according to the device information of the first indirect switch in the first configuration request packet.
  • the first connection reply packet includes the first configuration reply packet, where the first configuration reply packet includes the first non-received packet, and the second packet out packet includes the first configuration reply packet, where the first configuration reply packet includes the first non- Directly connected to the switch configuration information.
  • Step 604 The direct connection switch obtains the first configuration reply message from the second packet out message, and sends the first configuration reply message to the first non-directly connected switch.
  • Step 605 The first indirectly connected switch performs device configuration according to the configuration information in the first configuration reply message.
  • Step 606 The first indirect connection switch sends an OF connection request to the direct connection switch.
  • Step 607 The direct switch determines whether the flow entry of the OF connection request exists in the directly connected switch. If yes, step 608 is performed. If not, step 609 is performed.
  • Step 608 The direct connection switch sends the OF connection request to the controller according to the flow entry of the OF connection request, step 612 is performed;
  • Step 609 The direct connection switch sends a third packet in message based on the OF connection request to the controller by using an OF connection with the controller.
  • Step 610 The controller sends a second flow entry to the direct switch according to the third packet in packet.
  • Step 611 The direct connection switch saves the second flow entry, and sends the OF connection request to the controller according to the second flow entry.
  • Step 612 The controller processes the OF connection request, and sends an OF connection response to the first non-direct connection switch through the direct connection switch.
  • the direct connection switch may send the OF connection response to the first indirect direct switch according to the second flow entry.
  • Step 613 The first indirect connection switch receives the OF connection response, and completes establishment of the OF connection.
  • the direct connection switch is used as the first configuration request message and the first configuration reply between the intermediate switch forwarding controller and the first indirect direct switch.
  • the packet is configured to implement the configuration of the first non-directly connected switch by the controller, and the automatic configuration of the first non-direct connected switch is completed.
  • the device information may include: a MAC address of the second indirect switch, a second indirect switch ID, and the like.
  • the first configuration request packet may be a packet that can be transmitted without a network address configuration, such as a packet based on LLDP or a DHCP protocol.
  • the intermediate switch existing between the controller and the first indirect switch is a direct switch
  • the next hop node of the direct switch is the first non-direct switch
  • the last hop node of the direct switch is Controller.
  • the flow entry A1 is used to indicate that the directly connected switch forwards the packet sent by the controller to the first indirect switch
  • the flow entry B1 is used to indicate that the direct switch is the first.
  • the packet of the indirect switch is forwarded to the flow entry of the controller.
  • the flow entry A2 is used to instruct the first indirect switch to forward the packet sent by the controller to the second indirect switch.
  • the flow entry B2 is used. Instructing the first indirect direct switch to forward the packet sent by the second indirect switch to the direct switch.
  • the specific implementation manner of the flow entry is not limited in the embodiment of the present invention.
  • the intermediate switch and the first indirect switch forward the first configuration reply message to the second indirect switch according to the first flow entry.
  • Step 707 The second indirect switch sends an OF connection request to the first indirect switch.
  • Step 708 The first indirectly connected switch determines whether there is a flow entry of the OF connection request in the first indirect switch, if yes, step 709 is performed, if not, step 710 is performed;
  • the first flow entry in step 704 may be a flow entry that can transmit an OF connection request, or may not be a flow entry that can transmit an OF connection request, which depends on a specific implementation of the first flow entry.
  • the intermediate switch and the first indirect switch have saved the first flow entry. If the transmission precision of the first flow entry is allowed, for example, the matching field in the first flow entry is the second non-directly connected switch.
  • the IP address, and the OF connection request carries the IP address of the second indirect switch, and the intermediate switch and the first indirect switch can forward the OF connection request according to the first flow entry, and finally send the OF connection request to the Controller.
  • Step 710 The first indirect connection switch sends a third packet in message based on the OF connection request to the controller by using an OF connection with the controller.
  • Step 711 The controller sends a second flow entry to the intermediate switch and the first indirect switch according to the third packet in packet.
  • Step 712 The intermediate switch and the first indirect switch save the second flow entry, and the first indirect switch and the intermediate switch send the OF connection request to the controller according to the second flow entry.
  • Step 713 The controller processes the OF connection request, and sends an OF connection response to the second indirect switch through the intermediate switch and the first indirect switch.
  • the intermediate switch and the first indirect direct switch can forward the OF connection response according to the second flow entry, and finally send the OF connection response to the second indirect switch.
  • the first non-direct connection switch and the direct connection switch are used as the first between the intermediate switch forwarding controller and the second non-direct connection switch through the OF connection established between the first indirect connection switch and the controller.
  • a configuration request message and a first configuration reply message are implemented, so that the controller configures the second non-directly connected switch, and completes automatic configuration of the second non-direct connected switch.
  • the user equipment may also implement automatic configuration according to steps 701 to 706 in this embodiment, as long as the step is The second non-direct connected switch can be replaced with a user equipment.
  • FIG. 8 is a schematic diagram of an automatic configuration process according to an embodiment of the present invention.
  • the controller under the condition that the controller has configured the direct connection switch and the first indirect connection switch and establishes an OF connection, the controller indicates that the controller is the second non- Another implementation process for direct configuration of a direct-connected switch.
  • the method includes:
  • Step 801 The second non-directly connected switch sends a first configuration request message to the first indirectly connected switch, where the first configuration request message includes: device information of the second non-directly connected switch.
  • the first configuration request packet may be a packet that can be transmitted without a network address configuration, such as a packet based on LLDP or a DHCP protocol.
  • the first configuration request packet may be sent periodically before the second indirectly connected switch is not configured.
  • Step 802 The first indirect switch sends a second packet in message to the controller by using an OF connection between the first indirect switch and the controller.
  • the second packet in packet includes the first configuration request packet.
  • the flow relationship between the first indirect switch and the controller is stored on the intermediate switch between the first indirect switch and the controller, so that the flow entry of the first indirect switch is stored.
  • the packet sent by the first indirect switch to the controller may be forwarded by the intermediate switch according to the flow entry, and finally transmitted to the controller.
  • the packet sent by the controller to the first indirect switch may be used by the intermediate switch.
  • the packet is forwarded according to the flow entry, and finally transmitted to the first indirect switch.
  • the packet transmission process is referred to as: sending by using the OF connection between the first indirect switch and the controller.
  • Step 803 The controller acquires the first configuration request packet from the second packet in packet, and reports according to the first configuration request.
  • the device information of the first indirectly connected switch determines the configuration information of the first indirect switch, and sends the second packet out packet to the first indirect switch through the OF connection with the first indirect switch.
  • the second packet out message includes the first configuration reply message, where the first configuration reply message includes configuration information of the first indirect direct switch.
  • Step 804 The first indirect connection switch obtains the first configuration reply message from the second packet out packet, and sends the first configuration reply message to the second non-directly connected switch.
  • Step 805 The second indirect switch performs device configuration according to the configuration information in the first configuration reply message.
  • Step 806 The second indirect connection switch sends an OF connection request to the first indirect direct switch.
  • Step 807 The first indirectly connected switch determines whether there is a flow entry of the OF connection request in the first indirect switch, if yes, step 808 is performed, if not, step 809 is performed;
  • Step 808 The first indirectly connected switch forwards the OF connection request to the next hop switch according to the flow entry, until the switch sends the OF connection request to the controller, and step 812 is performed;
  • Step 809 The first indirect connection switch sends a third packet in message based on the OF connection request to the controller by using an OF connection with the controller.
  • the intermediate switch is a switch on the OF connection of the controller and the first indirect switch.
  • the intermediate switch is a direct switch.
  • Step 811 The intermediate switch and the first indirect switch save the second flow entry, and the first indirect switch and the intermediate switch send the OF connection request to the controller according to the second flow entry.
  • Step 812 The controller processes the OF connection request, and sends an OF connection response to the second indirect switch through the intermediate switch and the first indirect switch.
  • the intermediate switch and the first indirect direct switch can forward the OF connection response according to the second flow entry, and finally send the OF connection response to the second indirect switch.
  • Step 813 The second indirect switch receives the OF connection response and completes establishment of the OF connection.
  • the first non-direct connection switch and the direct connection switch are used as the first between the intermediate switch forwarding controller and the second non-direct connection switch through the OF connection established between the first indirect connection switch and the controller.
  • a configuration request message and a first configuration reply message are implemented, so that the controller configures the second non-directly connected switch, and completes automatic configuration of the second non-direct connected switch.
  • the user equipment may also perform automatic configuration by referring to steps 801 to 705 in this embodiment, as long as the steps are of The second non-direct connected switch can be replaced with a user equipment.
  • FIG. 4B illustrates the process of the controller automatically configuring the direct-connected switch.
  • Figure 5 and Figure 6 illustrate the process of the controller automatically configuring the first indirect-connected switch through the direct-connected switch.
  • Figure 7 and Figure 8 illustrate The controller automatically configures the second indirect switch through the first indirect switch, and so on, the controller may configure the direct switch, and then configure the first indirect switch connected to the direct switch. Then, the second indirect direct switch connected to the first indirect switch is configured to complete the configuration of all the switches in the network layer by layer. As long as the switch to be configured is connected to a switch that has been configured and has an OF connection with the controller, the switch that needs to be configured can be automatically configured by referring to the processes shown in FIG. 5 to FIG. 8.
  • the user equipment connected to the switch can also be automatically configured by referring to the processes shown in FIG. 5 to FIG. 8.
  • the only difference is that the user equipment and the controller only need to perform configuration to the user equipment. There is no need to establish an OF connection between the user equipment and the controller.
  • the system includes: a controller, a direct-connect switch connected to the controller, a non-direct-connect switch connected to the direct-connect switch, and a user equipment connected to the non-direct-connect switch.
  • Step 901 The controller receives the first configuration request message sent by the direct switch, where the first configuration request message includes: device information of the directly connected switch;
  • Step 902 The controller determines, according to the device information of the direct-connected switch, configuration information of the direct-connected switch, and sends a first configuration reply packet to the direct-connecting switch, where the first configuration reply packet includes The configuration information of the directly connected switch is configured, so that the direct connection switch performs device configuration according to the configuration information;
  • Step 903 The controller establishes a first OF connection with the direct connection switch.
  • Step 906 The controller establishes a second OF connection with the non-directly connected switch.
  • Step 907 The controller receives a first configuration request message of the user equipment that is sent by the non-directly connected switch through the second OF connection, where the first configuration request message includes: device information of the user equipment;
  • the first configuration request message of the user equipment is sent by the user equipment to the indirectly connected switch;
  • Step 908 The controller determines, according to the device information of the user equipment, configuration information of the user equipment, and sends, by using the second OF connection, the first configuration response packet of the user equipment to the indirectly connected switch.
  • the first configuration reply message of the user equipment includes the configuration information of the user equipment, so that the fee direct connection switch sends the first configuration reply message of the user equipment to the user equipment, the user The device performs device configuration according to the configuration information of the user equipment.
  • the controller first configures the direct-connected switch, configures the indirect-connected switch through the direct-connected switch, and configures the user equipment through the direct-connected switch and the non-directly connected switch, thereby implementing the direct-connected switch, the non-direct-connected switch, and the user. Layer-by-layer configuration of the device.
  • an embodiment of the present invention provides a controller.
  • the controller 1000 includes:
  • the receiving unit 1010 is configured to receive a first configuration request message of the first device that is forwarded by the first switch by using the OF connection between the first switch and the controller, where the first configuration request message includes: Device information of a device; the first switch is located between the controller and the first device, and the first configuration request message is sent by the first device to the first switch;
  • a determining unit 1020 configured to determine configuration information of the first device according to the device information of the first device received by the receiving unit 1010;
  • the sending unit 1030 is configured to send, by using the OF connection between the controller and the first switch, a first configuration reply message to the first switch, where the first configuration reply message includes the determining unit 1020. Determining the configuration information of the first device, so that the first switch forwards the first configuration reply message to the first device, and the first device performs device configuration according to the configuration information.
  • the first switch is a direct switch
  • the receiving unit is specifically configured to:
  • the first switch is a non-directly connected switch
  • the receiving unit is specifically configured to:
  • the intermediate switch is a switch on the OF connection between the controller and the first switch;
  • the first flow entry is used to forward the first configuration request message;
  • the sending unit is specifically configured to:
  • the receiving unit is specifically configured to:
  • connection establishing unit configured to establish an OF connection with the first device.
  • Processing the OF connection request and transmitting an OF connection response to the first switch, so that the first switch sends the OF connection response to the first device.
  • the first device is a non-directly connected switch
  • the first switch is a non-directly connected switch
  • the connection establishing unit is specifically configured to:
  • the controller receives the first configuration request message of the first device that is forwarded by the first switch by using the OF connection between the first switch and the controller, where the first configuration request message includes: Device information of the first device; the first switch is located between the controller and the first device, and the first configuration request message is sent by the first device to the first switch, according to the The device information of the first device determines configuration information of the first device, and sends a first configuration reply message to the first switch by using an OF connection between the controller and the first switch, where the The configuration reply message includes the configuration information of the first device, so that the first switch forwards the first configuration reply message to the first device, and the first device performs the device according to the configuration information. Configuration, thus enabling automatic configuration of the first device.
  • the embodiment of the present invention further provides a first device.
  • the first device 1100 includes:
  • the first sending unit 1110 is configured to send a first configuration request message to the first switch, so that the first switch sends the first configuration request report by using an OF connection between the first switch and the controller.
  • the first switch has a connection relationship with the first device;
  • the first receiving unit 1120 is configured to receive a first configuration reply message sent by the first switch, where the first configuration reply message is used by the controller between the controller and the first switch.
  • the OF connection is sent to the first switch;
  • the first device is a non-directly connected switch, and further includes:
  • a connection establishing unit is configured to establish an OF connection with the controller.
  • connection establishing unit is specifically configured to:
  • the first device receives an OF connection response sent by the first switch.
  • the first device is a second switch, and the second switch is connected to the second device.
  • the method further includes:
  • a second receiving unit configured to receive a second configuration request message sent by the second device, where the second configuration request message includes: device information of the second device;
  • a second sending unit configured to send the second configuration request message to the controller by using an OF connection between the first device and the controller
  • the second receiving unit is further configured to: receive a second configuration reply message sent by the controller by using an OF connection between the first device and the controller, where the second configuration reply message includes The configuration information of the second device, where the configuration information of the second device is determined by the controller according to the device information of the second device;
  • the first device is a direct-connecting switch
  • the second sending unit is specifically configured to:
  • the first device is a non-directly connected switch
  • the second sending unit is specifically configured to:
  • the intermediate switch is a switch on an OF connection between the controller and the first device; and the intermediate switch is respectively configured by the controller
  • the third flow entry sent to the intermediate switch forwards the second configuration request packet
  • the second receiving unit is specifically configured to:
  • the second sending unit is specifically configured to: send a fifth packet in packet to the controller, where the fifth packet in packet includes the second configuration request packet;
  • the second receiving unit is specifically configured to:
  • the first device is a direct connection switch
  • the second receiving unit is further configured to: receive an OF connection request sent by the second device
  • the second receiving unit is further configured to: receive a fourth flow entry that is sent by the controller according to the fifth packet in packet, where the fourth flow entry is used to forward the OF connection request;
  • the second sending unit is further configured to: send the OF connection request to the controller;
  • the second receiving unit is further configured to: receive an OF connection response sent by the controller;
  • the second sending unit is further configured to: send the OF connection response to the second device.
  • the first device is a non-directly connected switch
  • the second receiving unit is further configured to: receive an OF connection request sent by the second device
  • the second sending unit is further configured to: when it is determined that there is no flow entry for forwarding the OF connection request in the first device, send a fifth packet in report based on the OF connection request to the controller Text
  • the second sending unit is further configured to: send the OF connection request to the controller by using an intermediate switch;
  • the intermediate switch is a switch on an OF connection between the controller and the first device;
  • the switch forwards the OF connection request by using the fourth flow entry that is sent by the controller to the intermediate switch by the controller;
  • the second receiving unit is further configured to: receive an OF connection response sent by the controller by using the intermediate switch;
  • the second sending unit is further configured to: send the OF connection response to the second device.
  • the first device sends a first configuration request message to the first switch, so that the first switch sends the first configuration request report by using an OF connection between the first switch and the controller.
  • the first switch has a connection relationship with the first device, and receives a first configuration reply message sent by the first switch, where the first configuration reply message is used by the controller. And transmitting, by the OF connection between the controller and the first switch, to the first switch, performing device configuration according to the configuration information, thereby implementing automatic configuration of the first device.
  • the techniques in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, the technical solution in the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product, which may be stored in a storage medium such as a ROM/RAM. , a disk, an optical disk, etc., including instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention or portions of the embodiments.
  • a computer device which may be a personal computer, server, or network device, etc.

Landscapes

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

Abstract

Disclosed are an automatic configuration method, a controller and a device in the embodiments of the present invention, and the method comprises: the controller receives a first configuration request message of a first device, which is forwarded by a first switch though an OF connection between the first switch and the controller, and the first configuration request message includes the device information of the first device; the first switch is located between the controller and the first device, and the first configuration request message is transmitted to the first switch by the first device; the controller determines the configuration information of the first device according to the device information of the first device; the controller transmits a first configuration reply message to the first switch through the OF connection between the controller and the first switch, and the first configuration reply message includes the configuration information of the first device so that the first switch forwards the first configuration reply message to the first device and the first device performs device configuration according to the configuration information. The embodiments of the present invention can realize automatic configuration for a data center device.

Description

自动配置方法、控制器及设备Automatic configuration method, controller and device
本申请要求于2015年6月19日提交中国专利局、申请号为201510345384.5、发明名称为“自动配置方法、控制器及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。The present application claims priority to Chinese Patent Application No. 201510345384.5, the entire disclosure of which is incorporated herein by reference. in.
技术领域Technical field
本发明涉及通信领域,尤其涉及一种自动配置方法、控制器及设备。The present invention relates to the field of communications, and in particular, to an automatic configuration method, a controller, and a device.
背景技术Background technique
云计算和大数据的兴起使得越来越多的数据中心在各地拔地而起。数据中心由大量服务器、交换机和其他网络设备组成,这些设备都需要进行必要的配置才能正常工作。但数据中心的规模越来越大,可能包含数万乃至几十万台服务器和千台交换机,手动配置这么多的设备需要很多人力的投入,而且容易出现配置错误,因此配置自动化是数据中心的一大需求,也是云计算技术中的一个重要研究方向。The rise of cloud computing and big data has caused more and more data centers to rise everywhere. A data center consists of a large number of servers, switches, and other network devices that require the necessary configuration to function properly. But the data center is getting bigger and bigger, it may contain tens of thousands or even hundreds of thousands of servers and thousands of switches. Manually configuring so many devices requires a lot of manpower and is prone to configuration errors, so configuration automation is data center. A big demand is also an important research direction in cloud computing technology.
发明内容Summary of the invention
本发明实施例中提供了一种自动配置方法、控制器及设备,能够实现数据中心中设备的自动化配置。An embodiment of the present invention provides an automatic configuration method, a controller, and a device, which can implement automatic configuration of devices in a data center.
第一方面,本发明实施例提供一种自动配置方法,包括:In a first aspect, an embodiment of the present invention provides an automatic configuration method, including:
控制器接收第一交换机通过所述第一交换机与所述控制器之间的OF连接转发的第一设备的第一配置请求报文,所述第一配置请求报文包括:第一设备的设备信息;所述第一交换机位于所述控制器与所述第一设备之间,所述第一配置请求报文由所述第一设备发送给所述第一交换机;The controller receives a first configuration request message of the first device that is forwarded by the first switch by using the OF connection between the first switch and the controller, where the first configuration request message includes: a device of the first device The first switch is located between the controller and the first device, and the first configuration request message is sent by the first device to the first switch;
所述控制器根据所述第一设备的设备信息确定所述第一设备的配置信息;Determining, by the controller, configuration information of the first device according to device information of the first device;
所述控制器通过所述控制器与所述第一交换机之间的OF连接向所述第一交换机发送第一配置回复报文,所述第一配置回复报文包括所述第一设备的配置信息,以便所述第一交换机将所述第一配置回复报文转发给所述第一设备、所述第一设备根据所述配置信息进行设备配置。The controller sends a first configuration reply message to the first switch by using an OF connection between the controller and the first switch, where the first configuration reply message includes a configuration of the first device. The information is forwarded by the first switch to the first device, and the first device performs device configuration according to the configuration information.
结合第一方面,在第一方面第一种可能的实现方式中,所述第一交换机是直连交换机,所述控制器接收第一交换机通过所述第一交换机与所述控制器之间的OF连接转发的第一设备的第一配置请求报文,包括:With reference to the first aspect, in a first possible implementation manner of the first aspect, the first switch is a direct switch, and the controller receives a first switch between the first switch and the controller The first configuration request packet of the first device that the OF connection is forwarded includes:
所述控制器接收所述第一交换机通过所述OF连接发送的第一packet in报文,所述第一packet in报文用于向控制器上报所述第一交换机接收到所述第一配置请求报文; Receiving, by the controller, the first packet in packet sent by the first switch by using the OF connection, where the first packet in packet is used to report to the controller that the first switch receives the first configuration Request message
所述控制器根据所述第一packet in报文向所述第一交换机下发第一流表项,所述第一流表项用于转发所述第一配置请求报文;The controller sends a first flow entry to the first switch according to the first packet in packet, where the first flow entry is used to forward the first configuration request packet;
所述控制器接收所述第一交换机按照所述第一流表项发送的所述第一配置请求报文。The controller receives the first configuration request message sent by the first switch according to the first flow entry.
结合第一方面,在第一方面第二种可能的实现方式中,所述第一交换机为非直连交换机,所述控制器接收第一交换机通过所述第一交换机与所述控制器之间的OF连接转发的第一设备的第一配置请求报文,包括:With reference to the first aspect, in a second possible implementation manner of the first aspect, the first switch is a non-directly connected switch, and the controller receives the first switch between the first switch and the controller The first configuration request message of the first device forwarded by the OF connection includes:
所述控制器接收所述第一交换机通过所述OF连接发送的、基于所述第一配置请求报文的第一packet in报文;Receiving, by the controller, the first packet in packet sent by the first switch by using the OF connection, based on the first configuration request packet;
所述控制器根据所述第一packet in报文向中间交换机以及所述第一交换机分别下发第一流表项,所述第一流表项用于转发所述第一配置请求报文;所述中间交换机是所述控制器与所述第一交换机之间的OF连接上的交换机;The controller sends a first flow entry to the intermediate switch and the first switch according to the first packet in message, where the first flow entry is used to forward the first configuration request message; The intermediate switch is a switch on the OF connection between the controller and the first switch;
所述控制器接收所述第一交换机通过所述中间交换机发送的所述第一配置请求报文;所述中间交换机按照所述第一流表项转发所述第一配置请求报文;The controller receives the first configuration request message sent by the first switch by using the intermediate switch; the intermediate switch forwards the first configuration request message according to the first flow entry;
所述控制器通过所述控制器与所述第一交换机之间的OF连接向所述第一交换机发送第一配置回复报文,包括:The controller sends a first configuration reply message to the first switch by using an OF connection between the controller and the first switch, including:
所述控制器通过所述中间交换机将所述第一配置回复报文发送给所述第一交换机,所述中间交换机按照所述第一流表项转发所述第一配置回复报文。The controller sends the first configuration reply message to the first switch by using the intermediate switch, and the intermediate switch forwards the first configuration reply message according to the first flow entry.
结合第一方面,在第一方面第三种可能的实现方式中,所述控制器接收第一交换机通过所述第一交换机与所述控制器之间的OF连接转发的第一设备的第一配置请求报文,包括:With reference to the first aspect, in a third possible implementation manner of the first aspect, the controller receives, by the first switch, the first device that is forwarded by the OF connection between the first switch and the controller Configure request packets, including:
所述控制器接收所述第一交换机通过所述OF连接发送的第二packet in报文,所述第二packte in报文中包括所述第一配置请求报文;The controller receives the second packet in packet sent by the first switch by using the OF connection, where the second packet in the packet includes the first configuration request packet;
所述控制器通过所述控制器与所述第一交换机之间的OF连接向所述第一交换机发送第一配置回复报文,包括:The controller sends a first configuration reply message to the first switch by using an OF connection between the controller and the first switch, including:
所述控制器通过所述OF连接向所述第一交换机发送第二packet out报文,所述第二packet out报文中包括所述第一配置回复报文。The controller sends a second packet out message to the first switch by using the OF connection, where the second packet out message includes the first configuration reply message.
结合第一方面,和/或第一方面第一种可能的实现方式,和/或第一方面第二种可能的实现方式,和/或第一方面第三种可能的实现方式,在第一方面第四种可能的实现方式中,所述第一设备为非直连交换机,还包括:In combination with the first aspect, and/or the first possible implementation of the first aspect, and/or the second possible implementation of the first aspect, and/or the third possible implementation of the first aspect, in the first In a fourth possible implementation manner, the first device is a non-directly connected switch, and further includes:
所述控制器与所述第一设备建立OF连接。The controller establishes an OF connection with the first device.
结合第一方面第四种可能的实现方式,在第一方面第五种可能的实现方式中,所述第一设备为非直连交换机,所述第一交换机为直连交换机,所述控制器与所述第一设备建立OF连接,包括:With reference to the fourth possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, the first device is a non-directly connected switch, the first switch is a direct-connecting switch, and the controller is Establishing an OF connection with the first device, including:
所述控制器接收所述第一交换机通过与所述控制器之间的OF连接发送的、基于所述OF连接请求的第三packet in报文;所述第一交换机在接收到所述第一设备发送的OF连接 请求且确定所述第一交换机中没有用于转发所述OF连接请求的流表项时发送所述第三packet in报文;Receiving, by the controller, a third packet in message sent by the first switch by using an OF connection with the controller, where the first switch receives the first The OF connection sent by the device And sending the third packet in packet when requesting and determining that the first switch does not have a flow entry for forwarding the OF connection request;
所述控制器根据所述第三packet in报文向所述第一交换机下发第二流表项,所述第二流表项用于转发所述OF连接请求;The controller sends a second flow entry to the first switch according to the third packet in packet, where the second flow entry is used to forward the OF connection request;
所述控制器接收所述第一交换机发送的所述OF连接请求;The controller receives the OF connection request sent by the first switch;
所述控制器处理所述OF连接请求,向所述第一交换机发送OF连接响应,以便所述第一交换机将所述OF连接响应发送给所述第一设备。The controller processes the OF connection request, and sends an OF connection response to the first switch, so that the first switch sends the OF connection response to the first device.
结合第一方面第四种可能的实现方式,在第一方面第六种可能的实现方式,所述第一设备为非直连交换机,所述第一交换机为非直连交换机,所述控制器与所述第一设备建立OF连接,包括:With reference to the fourth possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, the first device is a non-directly connected switch, the first switch is a non-directly connected switch, and the controller is Establishing an OF connection with the first device, including:
所述控制器接收所述第一交换机通过与所述控制器之间的OF连接发送的、基于所述OF连接请求的第三packet in报文;所述第一交换机在接收到所述第一设备发送的OF连接请求且确定所述第一交换机中没有用于转发所述OF连接请求的流表项时发送所述第三packet in报文;Receiving, by the controller, a third packet in message sent by the first switch by using an OF connection with the controller, where the first switch receives the first And sending, by the device, the third packet in the message that is sent by the device, and determining that the first switch does not have a flow entry for forwarding the OF connection request;
所述控制器根据所述第三packet in报文向所述中间交换机以及所述第一交换机分别下发第二流表项,所述第二流表项用于转发所述OF连接请求;The controller sends a second flow entry to the intermediate switch and the first switch according to the third packet in message, where the second flow entry is used to forward the OF connection request;
所述控制器接收所述第一交换机通过所述中间交换机发送的所述OF连接请求;所述中间交换机通过所述第二流表项转发所述OF连接请求;The controller receives the OF connection request sent by the first switch by using the intermediate switch; the intermediate switch forwards the OF connection request by using the second flow entry;
所述控制器处理所述OF连接请求,通过所述中间交换机向所述第一交换机发送OF连接响应,以便所述第一交换机将所述OF连接响应发送给所述第一设备,所述中间交换机通过所述第二流表项转发所述OF连接响应。The controller processes the OF connection request, and sends an OF connection response to the first switch by the intermediate switch, so that the first switch sends the OF connection response to the first device, where the middle The switch forwards the OF connection response by using the second flow entry.
第二方面,本发明实施例提供一种自动配置方法,包括:In a second aspect, an embodiment of the present invention provides an automatic configuration method, including:
第一设备向第一交换机发送第一配置请求报文,以便所述第一交换机通过所述第一交换机与所述控制器之间的OF连接发送所述第一配置请求报文至所述控制器,所述第一交换机与所述第一设备具有连接关系;The first device sends a first configuration request message to the first switch, so that the first switch sends the first configuration request message to the control by using an OF connection between the first switch and the controller. The first switch has a connection relationship with the first device;
所述第一设备接收所述第一交换机发送的第一配置回复报文,所述第一配置回复报文由所述控制器通过所述控制器与所述第一交换机之间的OF连接发送至所述第一交换机;The first device receives a first configuration reply message sent by the first switch, where the first configuration reply message is sent by the controller through an OF connection between the controller and the first switch. To the first switch;
所述第一设备根据所述配置信息进行设备配置。The first device performs device configuration according to the configuration information.
结合第二方面中,在第二方面第一种可能的实现方式中,所述第一设备为非直连交换机,还包括:With reference to the second aspect, in a first possible implementation manner of the second aspect, the first device is a non-directly connected switch, and the method further includes:
所述第一设备与所述控制器建立OF连接。The first device establishes an OF connection with the controller.
结合第二方面第一种可能的实现方式,在第二方面第二种可能的实现方式中,所述第一设备与所述控制器建立OF连接,包括:With reference to the first possible implementation manner of the second aspect, in a second possible implementation manner of the second aspect, the first device establishes an OF connection with the controller, including:
所述第一设备向所述第一交换机发送OF连接请求,以便所述第一交换机在确定所述第 一交换机中没有用于转发所述OF连接请求的流表项时向控制器发送基于所述OF连接请求的第三packet in报文、接收所述控制器下发的用于转发所述OF连接请求的第二流表项、向所述控制器发送OF连接请求、接收所述控制器发送的OF连接响应;The first device sends an OF connection request to the first switch, so that the first switch determines the first When a switch does not have a flow entry for forwarding the OF connection request, it sends a third packet in packet to the controller according to the OF connection request, and receives a forwarding of the OF connection by the controller. Requesting a second flow entry, sending an OF connection request to the controller, and receiving an OF connection response sent by the controller;
所述第一设备接收所述第一交换机发送的OF连接响应。The first device receives an OF connection response sent by the first switch.
结合第二方面,在第二方面第三种可能的实现方式中,所述第一设备为第二交换机,所述第二交换机连接第二设备,所述第一设备与所述控制器建立OF连接之后,还包括:With reference to the second aspect, in a third possible implementation manner of the second aspect, the first device is a second switch, the second switch is connected to the second device, and the first device establishes an OF with the controller After connecting, it also includes:
所述第一设备接收所述第二设备发送的第二配置请求报文,所述第二配置请求报文包括:第二设备的设备信息;The first device receives a second configuration request message sent by the second device, where the second configuration request message includes: device information of the second device;
所述第一设备通过所述第一设备与所述控制器之间的OF连接将所述第二配置请求报文发送给控制器;Transmitting, by the first device, the second configuration request message to the controller by using an OF connection between the first device and the controller;
所述第一设备接收所述控制器通过所述第一设备与所述控制器之间的OF连接发送的第二配置回复报文,所述第二配置回复报文包括所述第二设备的配置信息,所述第二设备的配置信息由所述控制器根据所述第二设备的设备信息确定;Receiving, by the first device, a second configuration reply message sent by the controller by using an OF connection between the first device and the controller, where the second configuration reply message includes the second device Configuration information, where the configuration information of the second device is determined by the controller according to device information of the second device;
所述第一设备将所述第二配置回复报文发送给所述第二设备。The first device sends the second configuration reply message to the second device.
结合第二方面第三种可能的实现方式,在第二方面第四种可能的实现方式中,所述第一设备为直连交换机,所述第一设备通过所述第一设备与所述控制器之间的OF连接将所述第二配置请求报文发送给控制器,包括:With reference to the third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the first device is a direct switch, and the first device is configured by the first device and the control The OF connection between the devices sends the second configuration request message to the controller, including:
所述第一设备确定所述第一设备中没有用于转发所述第二配置请求报文的流表项时,通过所述OF连接向所述控制器发送基于所述第二配置请求报文的第四packet in报文;When the first device determines that there is no flow entry for forwarding the second configuration request packet, the first device sends the second configuration request packet to the controller by using the OF connection. Fourth packet in message;
所述第一设备接收所述控制器下发的第三流表项,所述第三流表项用于转发所述第二配置请求报文;Receiving, by the first device, a third flow entry that is sent by the controller, where the third flow entry is used to forward the second configuration request packet;
所述第一设备将所述第二配置请求报文发送至所述控制器。The first device sends the second configuration request message to the controller.
结合第二方面第三种可能的实现方式,在第二方面第五种可能的实现方式中,所述第一设备为非直连交换机,所述第一设备通过所述第一设备与所述控制器之间的OF连接将所述第二配置请求报文发送给控制器,包括:With reference to the third possible implementation of the second aspect, in a fifth possible implementation manner of the second aspect, the first device is a non-directly connected switch, and the first device is configured by using the first device The OF connection between the controllers sends the second configuration request message to the controller, including:
所述第一设备向控制器发送基于所述第二配置请求报文的第四packet in报文;Sending, by the first device, a fourth packet in packet based on the second configuration request packet to the controller;
所述第一设备接收所述控制器根据所述第四packet in报文下发的第三流表项,所述第三流表项用于转发所述第二配置请求报文;Receiving, by the first device, the third flow entry that is sent by the controller according to the fourth packet in packet, where the third flow entry is used to forward the second configuration request packet;
所述第一设备通过中间交换机向控制器发送所述第二配置请求报文;所述中间交换机是所述控制器与所述第一设备之间的OF连接上的交换机;所述中间交换机通过所述控制器分别下发至所述中间交换机的所述第三流表项转发所述第二配置请求报文;The first device sends the second configuration request message to the controller through the intermediate switch; the intermediate switch is a switch on the OF connection between the controller and the first device; the intermediate switch passes And the third flow entry that is sent by the controller to the intermediate switch to forward the second configuration request packet;
所述第一设备接收所述控制器通过所述第一设备与所述控制器之间的OF连接发送的第二配置回复报文,包括:Receiving, by the first device, the second configuration reply message sent by the controller by using the OF connection between the first device and the controller, including:
所述第一设备接收所述控制器通过所述中间交换机发送的所述第二配置回复报文,所 述中间交换机通过所述第三流表项转发所述第二配置回复报文。Receiving, by the first device, the second configuration reply message sent by the controller by using the intermediate switch, where The intermediate switch forwards the second configuration reply message by using the third flow entry.
结合第二方面第三种可能的实现方式,在第二方面第六种可能的实现方式中,所述第一设备通过所述第一设备与所述控制器之间的OF连接将所述第二配置请求报文发送给控制器,包括:With reference to the third possible implementation manner of the second aspect, in a sixth possible implementation manner of the second aspect, the first device, by using an OF connection between the first device and the controller, The second configuration request message is sent to the controller, including:
所述第一设备向控制器发送第五packet in报文,所述第五packet in报文中包括所述第二配置请求报文;The first device sends a fifth packet in packet to the controller, where the fifth packet in packet includes the second configuration request packet;
所述第一设备接收所述控制器通过所述第一设备与所述控制器之间的OF连接发送的第二配置回复报文,包括:Receiving, by the first device, the second configuration reply message sent by the controller by using the OF connection between the first device and the controller, including:
所述第一设备接收所述控制器发送的第五packet out报文,所述第五packet out报文中包括所述第二配置回复报文。The first device receives the fifth packet out message sent by the controller, and the fifth packet out message includes the second configuration reply message.
结合第二方面第三种可能的实现方式,和/或第二方面第四种可能的实现方式,和/或第二方面第六种可能的实现方式,在第二方面第七种可能的实现方式中,所述第一设备为直连交换机,所述第一设备将所述第二配置回复报文发送给所述第二设备之后,还包括:In combination with the third possible implementation of the second aspect, and/or the fourth possible implementation of the second aspect, and/or the sixth possible implementation of the second aspect, the seventh possible implementation in the second aspect In the mode, the first device is a direct-connecting switch, and after the first device sends the second configuration reply packet to the second device, the method further includes:
所述第一设备接收所述第二设备发送的OF连接请求;Receiving, by the first device, an OF connection request sent by the second device;
所述第一设备确定所述第一设备中没有用于转发所述OF连接请求的流表项时,向所述控制器发送基于所述OF连接请求的第五packet in报文;When the first device determines that there is no flow entry for forwarding the OF connection request, the first device sends a fifth packet in packet based on the OF connection request to the controller;
所述第一设备接收所述控制器根据所述第五packet in报文下发的第四流表项,所述第四流表项用于转发所述OF连接请求;Receiving, by the first device, the fourth flow entry that is sent by the controller according to the fifth packet in packet, where the fourth flow entry is used to forward the OF connection request;
所述第一设备将所述OF连接请求发送给所述控制器;Sending, by the first device, the OF connection request to the controller;
所述第一设备接收所述控制器发送的OF连接响应,将所述OF连接响应发送给所述第二设备。The first device receives an OF connection response sent by the controller, and sends the OF connection response to the second device.
结合第二方面第三种可能的实现方式,和/或第二方面第五种可能的实现方式,和/或第二方面第六种可能的实现方式,在第二方面第八种可能的实现方式中,所述第一设备为非直连交换机,所述第一设备将所述第二配置回复报文发送给所述第二设备之后,还包括:In combination with the third possible implementation of the second aspect, and/or the fifth possible implementation of the second aspect, and/or the sixth possible implementation of the second aspect, the eighth possible implementation in the second aspect In the mode, the first device is a non-directly connected switch, and after the first device sends the second configuration reply message to the second device, the method further includes:
所述第一设备接收所述第二设备发送的OF连接请求;Receiving, by the first device, an OF connection request sent by the second device;
所述第一设备确定所述第一设备中没有用于转发所述OF连接请求的流表项时,向所述控制器发送基于所述OF连接请求的第五packet in报文;When the first device determines that there is no flow entry for forwarding the OF connection request, the first device sends a fifth packet in packet based on the OF connection request to the controller;
所述第一设备接收所述控制器根据所述第五packet in报文下发的第四流表项,所述第四流表项用于转发所述OF连接请求;Receiving, by the first device, the fourth flow entry that is sent by the controller according to the fifth packet in packet, where the fourth flow entry is used to forward the OF connection request;
所述第一设备通过中间交换机向控制器发送所述OF连接请求;所述中间交换机是所述控制器与所述第一设备之间的OF连接上的交换机;所述中间交换机通过所述控制器分别下发至所述中间交换机的所述第四流表项转发所述OF连接请求;The first device sends the OF connection request to a controller through an intermediate switch; the intermediate switch is a switch on an OF connection between the controller and the first device; and the intermediate switch passes the control The fourth flow entry that is respectively delivered to the intermediate switch forwards the OF connection request;
所述第一设备接收所述控制器通过所述中间交换机发送的OF连接响应,将所述OF连接响应发送给所述第二设备。 The first device receives an OF connection response sent by the controller through the intermediate switch, and sends the OF connection response to the second device.
第三方面,本发明实施例提供一种自动配置方法,包括:In a third aspect, an embodiment of the present invention provides an automatic configuration method, including:
控制器接收直连交换机发送的第一配置请求报文,所述第一配置请求报文包括:直连交换机的设备信息;The controller receives the first configuration request packet sent by the direct switch, where the first configuration request packet includes: device information of the directly connected switch;
所述控制器根据所述直连交换机的设备信息确定所述直连交换机的配置信息,向所述直连交换机发送第一配置回复报文,所述第一配置回复报文包括所述直连交换机的配置信息,以便所述直连交换机根据所述配置信息进行设备配置;Determining, by the controller, the configuration information of the direct switch according to the device information of the direct switch, and sending a first configuration reply message to the direct switch, where the first configuration reply message includes the direct connection Configuration information of the switch, so that the direct connection switch performs device configuration according to the configuration information;
所述控制器与所述直连交换机建立第一OF连接;The controller establishes a first OF connection with the direct connection switch;
所述控制器接收所述直连交换机通过所述第一OF连接发送的、非直连交换机的第一配置请求报文,所述第一配置请求报文包括:非直连交换机的设备信息;所述非直连交换机的第一配置请求报文由所述非直连交换机发送至所述直连交换机;Receiving, by the controller, a first configuration request message of the indirect connection switch that is sent by the direct connection switch by using the first OF connection, where the first configuration request message includes: device information of the indirectly connected switch; The first configuration request packet of the indirect switch is sent by the indirect switch to the direct switch;
所述控制器根据所述非直连交换机的设备信息确定所述非直连交换机的配置信息,通过所述第一OF连接向所述直连交换机发送所述非直连交换机的第一配置回复报文,所述非直连交换机的第一配置回复报文包括所述非直连交换机的配置信息,以便所述直连交换机将所述非直连交换机的第一配置回复报文发送至所述非直连交换机、所述非直连交换机根据所述非直连交换机的配置信息进行设备配置;Determining, by the controller, the configuration information of the indirect switch according to the device information of the indirectly connected switch, and sending, by using the first OF connection, the first configuration reply of the indirect switch to the direct switch The first configuration reply message of the indirect switch includes the configuration information of the indirect switch, so that the direct switch sends the first configuration reply message of the indirect switch to the The non-directly connected switch performs the device configuration according to the configuration information of the indirectly connected switch;
所述控制器与所述非直连交换机建立第二OF连接;The controller establishes a second OF connection with the indirect switch;
所述控制器接收所述非直连交换机通过所述第二OF连接发送的、用户设备的第一配置请求报文,所述第一配置请求报文包括:用户设备的设备信息;所述用户设备的第一配置请求报文由所述用户设备发送至所述非直连交换机;Receiving, by the controller, the first configuration request message of the user equipment that is sent by the non-directly connected switch by using the second OF connection, where the first configuration request message includes: device information of the user equipment; The first configuration request message of the device is sent by the user equipment to the indirect direct switch;
所述控制器根据所述用户设备的设备信息确定所述用户设备的配置信息,通过所述第二OF连接向所述非直连交换机发送所述用户设备的第一配置回复报文,所述用户设备的第一配置回复报文包括所述用户设备的配置信息,以便所述费直连交换机将所述用户设备的第一配置回复报文发送至所述用户设备、所述用户设备根据所述用户设备的配置信息进行设备配置。Determining, by the controller, the configuration information of the user equipment according to the device information of the user equipment, and sending, by using the second OF connection, the first configuration reply packet of the user equipment to the indirectly connected switch, where The first configuration reply message of the user equipment includes the configuration information of the user equipment, so that the fee direct connection switch sends the first configuration reply message of the user equipment to the user equipment, and the user equipment according to the The configuration information of the user equipment is used for device configuration.
第四方面,本发明实施例提供一种控制器,包括:In a fourth aspect, an embodiment of the present invention provides a controller, including:
接收单元,用于接收第一交换机通过所述第一交换机与所述控制器之间的OF连接转发的第一设备的第一配置请求报文,所述第一配置请求报文包括:第一设备的设备信息;所述第一交换机位于所述控制器与所述第一设备之间,所述第一配置请求报文由所述第一设备发送给所述第一交换机;a receiving unit, configured to receive a first configuration request message of the first device that is forwarded by the first switch by using the OF connection between the first switch and the controller, where the first configuration request message includes: Device information of the device; the first switch is located between the controller and the first device, and the first configuration request message is sent by the first device to the first switch;
确定单元,用于根据所述接收单元接收到的所述第一设备的设备信息确定所述第一设备的配置信息;a determining unit, configured to determine configuration information of the first device according to the device information of the first device received by the receiving unit;
发送单元,用于通过所述控制器与所述第一交换机之间的OF连接向所述第一交换机发送第一配置回复报文,所述第一配置回复报文包括所述确定单元确定的所述第一设备的配置信息,以便所述第一交换机将所述第一配置回复报文转发给所述第一设备、所述第一设备根 据所述配置信息进行设备配置。a sending unit, configured to send, by using an OF connection between the controller and the first switch, a first configuration reply message to the first switch, where the first configuration reply message includes the determining by the determining unit The configuration information of the first device, so that the first switch forwards the first configuration reply message to the first device, the first device root The device configuration is performed according to the configuration information.
结合第四方面,在第四方面第一种可能的实现方式中,所述第一交换机是直连交换机,所述接收单元具体用于:With reference to the fourth aspect, in a first possible implementation manner of the fourth aspect, the first switch is a direct-connecting switch, and the receiving unit is specifically configured to:
接收所述第一交换机通过所述OF连接发送的、基于所述第一配置请求报文的第一packet in报文;Receiving, by the first switch, the first packet in packet sent by the OF connection, based on the first configuration request message;
根据所述第一packet in报文向所述第一交换机下发第一流表项,所述第一流表项用于转发所述第一配置请求报文;And sending, by the first packet in the first packet, the first flow entry, where the first flow entry is used to forward the first configuration request packet;
接收所述第一交换机按照所述第一流表项发送的所述第一配置请求报文。Receiving, by the first switch, the first configuration request message sent according to the first flow entry.
结合第四方面,在第四方面第二种可能的实现方式中,所述第一交换机为非直连交换机,所述接收单元具体用于:With reference to the fourth aspect, in a second possible implementation manner of the fourth aspect, the first switch is a non-directly connected switch, and the receiving unit is specifically configured to:
接收所述第一交换机通过所述OF连接发送的、基于所述第一配置请求报文的第一packet in报文;Receiving, by the first switch, the first packet in packet sent by the OF connection, based on the first configuration request message;
根据所述第一packet in报文向中间交换机以及所述第一交换机分别下发第一流表项;所述中间交换机是所述控制器与所述第一交换机之间的OF连接上的交换机;所述第一流表项用于转发所述第一配置请求报文;Transmitting, by the first packet in the first packet, the first flow entry to the intermediate switch and the first switch; the intermediate switch is a switch on the OF connection between the controller and the first switch; The first flow entry is used to forward the first configuration request message;
接收所述第一交换机通过所述中间交换机发送的所述第一配置请求报文;所述中间交换机按照所述第一流表项转发所述第一配置请求报文;Receiving, by the first switch, the first configuration request packet sent by the intermediate switch; the intermediate switch forwarding the first configuration request packet according to the first flow entry;
所述发送单元具体用于:The sending unit is specifically configured to:
通过所述中间交换机将所述第一配置回复报文发送给所述第一交换机,所述中间交换机按照所述第一流表项转发所述第一配置回复报文。And sending, by the intermediate switch, the first configuration reply message to the first switch, where the intermediate switch forwards the first configuration reply message according to the first flow entry.
结合第四方面,在第四方面第三种可能的实现方式中,所述接收单元具体用于:With reference to the fourth aspect, in a third possible implementation manner of the fourth aspect, the receiving unit is specifically configured to:
接收所述第一交换机通过所述OF连接发送的第二packet in报文,所述第二packte in报文中包括所述第一配置请求报文;Receiving, by the first switch, a second packet in packet that is sent by using the OF connection, where the second packet in packet includes the first configuration request packet;
所述发送单元具体用于:The sending unit is specifically configured to:
通过所述OF连接向所述第一交换机发送第二packet out报文,所述第二packet out报文中包括所述第一配置回复报文。Sending, by the OF connection, the second packet out packet to the first switch, where the second packet out packet includes the first configuration reply packet.
结合第四方面,和/或第四方面第一种可能的实现方式,和/或第四方面第二种可能的实现方式,和/或第四方面第三种可能的实现方式,在第四方面第四种可能的实现方式中,所述第一设备为非直连交换机,还包括:With reference to the fourth aspect, and/or the first possible implementation of the fourth aspect, and/or the second possible implementation of the fourth aspect, and/or the third possible implementation of the fourth aspect, in the fourth In a fourth possible implementation manner, the first device is a non-directly connected switch, and further includes:
连接建立单元,用于与所述第一设备建立OF连接。a connection establishing unit, configured to establish an OF connection with the first device.
结合第四方面第四种可能的实现方式,在第四方面第五种可能的实现方式中,所述第一设备为非直连交换机,所述第一交换机为直连交换机,所述连接建立单元具体用于:With reference to the fourth possible implementation manner of the fourth aspect, in a fifth possible implementation manner of the fourth aspect, the first device is a non-directly connected switch, the first switch is a direct switch, and the connection is established. The unit is specifically used to:
接收所述第一交换机通过与所述控制器之间的OF连接发送的、基于OF连接请求的第三packet in报文;所述第一交换机在接收到所述第一设备发送的OF连接请求且确定所述第 一交换机中没有基于所述OF连接请求的流表项时发送所述第三packet in报文;Receiving a third packet in message sent by the first switch by using an OF connection between the first switch and the controller; the first switch receiving the OF connection request sent by the first device And determining the number Sending the third packet in packet when there is no flow entry based on the OF connection request in a switch;
根据所述第三packet in报文向所述第一交换机下发第二流表项,所述第二流表项用于转发所述OF连接请求;And sending, by the third packet in the second flow entry, the second flow entry, where the second flow entry is used to forward the OF connection request;
接收所述第一交换机发送的所述OF连接请求;Receiving the OF connection request sent by the first switch;
处理所述OF连接请求,向所述第一交换机发送OF连接响应,以便所述第一交换机将所述OF连接响应发送给所述第一设备。Processing the OF connection request, and transmitting an OF connection response to the first switch, so that the first switch sends the OF connection response to the first device.
结合第四方面第四种可能的实现方式,在第四方面第六种可能的实现方式,所述第一设备为非直连交换机,所述第一交换机为非直连交换机,所述连接建立单元具体用于:With reference to the fourth possible implementation manner of the fourth aspect, in a sixth possible implementation manner of the fourth aspect, the first device is a non-directly connected switch, the first switch is a non-directly connected switch, and the connection is established. The unit is specifically used to:
接收所述第一交换机通过与所述控制器之间的OF连接发送的、基于所述OF连接请求的第三packet in报文;所述第一交换机在接收到所述第一设备发送的OF连接请求且确定所述第一交换机中没有基于所述OF连接请求的流表项时发送所述第三packet in报文;Receiving a third packet in message sent by the first switch by using an OF connection between the first switch and the controller; the first switch receiving the OF sent by the first device Sending the third packet in message when the connection request is determined and the flow entry that is not based on the OF connection request is determined in the first switch;
根据所述第三packet in报文向所述中间交换机以及所述第一交换机分别下发第二流表项,所述第二流表项用于转发所述OF连接请求;And sending, by the third packet in the second flow entry, the second flow entry to the intermediate switch and the first switch, where the second flow entry is used to forward the OF connection request;
接收所述第一交换机通过所述中间交换机发送的所述OF连接请求;所述中间交换机通过所述第二流表项转发所述OF连接请求;Receiving, by the first switch, the OF connection request sent by the intermediate switch; the intermediate switch forwarding the OF connection request by using the second flow entry;
处理所述OF连接请求,通过所述中间交换机向所述第一交换机发送OF连接响应,以便所述第一交换机将所述OF连接响应发送给所述第一设备,所述中间交换机通过所述第二流表项转发所述OF连接响应。Processing the OF connection request, and sending, by the intermediate switch, an OF connection response to the first switch, so that the first switch sends the OF connection response to the first device, and the intermediate switch passes the The second flow entry forwards the OF connection response.
第五方面,本发明实施例提供一种第一设备,包括:In a fifth aspect, an embodiment of the present invention provides a first device, including:
第一发送单元,用于向第一交换机发送第一配置请求报文,以便所述第一交换机通过所述第一交换机与所述控制器之间的OF连接发送所述第一配置请求报文至所述控制器,所述第一交换机与所述第一设备具有连接关系;a first sending unit, configured to send a first configuration request message to the first switch, so that the first switch sends the first configuration request message by using an OF connection between the first switch and the controller Up to the controller, the first switch has a connection relationship with the first device;
第一接收单元,用于接收所述第一交换机发送的第一配置回复报文,所述第一配置回复报文由所述控制器通过所述控制器与所述第一交换机之间的OF连接发送至所述第一交换机;a first receiving unit, configured to receive a first configuration reply message sent by the first switch, where the first configuration reply message is used by the controller to pass an OF between the controller and the first switch The connection is sent to the first switch;
配置单元,用于根据所述第一接收单元接收到的所述配置信息进行设备配置。And a configuration unit, configured to perform device configuration according to the configuration information received by the first receiving unit.
结合第五方面中,在第五方面第一种可能的实现方式中,所述第一设备为非直连交换机,还包括:With reference to the fifth aspect, in a first possible implementation manner of the fifth aspect, the first device is a non-directly connected switch, and further includes:
连接建立单元,用于与所述控制器建立OF连接。A connection establishing unit is configured to establish an OF connection with the controller.
结合第五方面第一种可能的实现方式,在第五方面第二种可能的实现方式中,所述连接建立单元具体用于:With reference to the first possible implementation manner of the fifth aspect, in a second possible implementation manner of the fifth aspect, the connection establishing unit is specifically configured to:
向所述第一交换机发送OF连接请求,以便所述第一交换机在确定所述第一交换机中没有用于转发所述OF连接请求的流表项时向控制器发送基于所述OF连接请求的第三packet in报文、接收所述控制器下发的用于转发所述OF连接请求的第二流表项、向所述控制器发 送OF连接请求、接收所述控制器发送的OF连接响应;Transmitting an OF connection request to the first switch, so that the first switch sends, according to the OF connection request, the controller, when it is determined that there is no flow entry for forwarding the OF connection request in the first switch Receiving, by the third packet entry, a second flow entry that is sent by the controller and used to forward the OF connection request, and sends the second flow entry to the controller Sending an OF connection request, and receiving an OF connection response sent by the controller;
所述第一设备接收所述第一交换机发送的OF连接响应。The first device receives an OF connection response sent by the first switch.
结合第五方面,在第五方面第三种可能的实现方式中,所述第一设备为第二交换机,所述第二交换机连接第二设备,所述第一设备与所述控制器建立OF连接之后,还包括:With reference to the fifth aspect, in a third possible implementation manner of the fifth aspect, the first device is a second switch, the second switch is connected to the second device, and the first device establishes an OF with the controller After connecting, it also includes:
第二接收单元,用于接收所述第二设备发送的第二配置请求报文,所述第二配置请求报文包括:第二设备的设备信息;a second receiving unit, configured to receive a second configuration request message sent by the second device, where the second configuration request message includes: device information of the second device;
第二发送单元,用于通过所述第一设备与所述控制器之间的OF连接将所述第二配置请求报文发送给控制器;a second sending unit, configured to send the second configuration request message to the controller by using an OF connection between the first device and the controller;
所述第二接收单元还用于:接收所述控制器通过所述第一设备与所述控制器之间的OF连接发送的第二配置回复报文,所述第二配置回复报文包括所述第二设备的配置信息,所述第二设备的配置信息由所述控制器根据所述第二设备的设备信息确定;The second receiving unit is further configured to: receive a second configuration reply message sent by the controller by using an OF connection between the first device and the controller, where the second configuration reply message includes The configuration information of the second device, where the configuration information of the second device is determined by the controller according to the device information of the second device;
所述第二发送单元还用于:将所述第二配置回复报文发送给所述第二设备。The second sending unit is further configured to: send the second configuration reply message to the second device.
结合第五方面第三种可能的实现方式,在第五方面第四种可能的实现方式中,所述第一设备为直连交换机,所述第二发送单元具体用于:With reference to the third possible implementation manner of the fifth aspect, in a fourth possible implementation manner of the fifth aspect, the first device is a direct-connecting switch, and the second sending unit is specifically configured to:
确定所述第一设备中没有用于转发所述第二配置请求报文的流表项时,通过所述OF连接向所述控制器发送基于所述第二配置请求报文的第四packet in报文;And determining, when the first device does not have a flow entry for forwarding the second configuration request packet, sending, by the OF connection, the fourth packet in the second configuration request message to the controller by using the OF connection. Message
接收所述控制器下发的第三流表项,所述第三流表项用于转发所述第二配置请求报文;Receiving a third flow entry that is sent by the controller, where the third flow entry is used to forward the second configuration request packet;
将所述第二配置请求报文发送至所述控制器。Sending the second configuration request message to the controller.
结合第五方面第三种可能的实现方式,在第五方面第五种可能的实现方式中,所述第一设备为非直连交换机,所述第二发送单元具体用于:With reference to the third possible implementation manner of the fifth aspect, in a fifth possible implementation manner of the fifth aspect, the first device is a non-directly connected switch, and the second sending unit is specifically configured to:
向控制器发送基于所述第二配置请求报文的第四packet in报文;Sending, to the controller, a fourth packet in message based on the second configuration request message;
接收所述控制器根据所述第四packet in报文下发的第三流表项,所述第三流表项用于转发所述第二配置请求报文;Receiving, by the controller, a third flow entry that is sent according to the fourth packet in packet, where the third flow entry is used to forward the second configuration request packet;
通过中间交换机向控制器发送所述第二配置请求报文;所述中间交换机是所述控制器与所述第一设备之间的OF连接上的交换机;所述中间交换机通过所述控制器分别下发至所述中间交换机的所述第三流表项转发所述第二配置请求报文;Transmitting, by the intermediate switch, the second configuration request message to the controller; the intermediate switch is a switch on an OF connection between the controller and the first device; and the intermediate switch is respectively configured by the controller The third flow entry sent to the intermediate switch forwards the second configuration request packet;
所述第二接收单元具体用于:The second receiving unit is specifically configured to:
接收所述控制器通过所述中间交换机发送的所述第二配置回复报文,所述中间交换机通过所述第三流表项转发所述第二配置回复报文。Receiving, by the controller, the second configuration reply message sent by the intermediate switch, the intermediate switch forwarding the second configuration reply message by using the third flow entry.
结合第五方面第三种可能的实现方式,在第五方面第六种可能的实现方式中,所述第二发送单元具体用于:向控制器发送第五packet in报文,所述第五packet in报文中包括所述第二配置请求报文;With reference to the third possible implementation manner of the fifth aspect, in a sixth possible implementation manner of the fifth aspect, the second sending unit is specifically configured to: send a fifth packet in packet to the controller, where the fifth The packet in packet includes the second configuration request packet;
所述第二接收单元具体用于:The second receiving unit is specifically configured to:
接收所述控制器发送的第五packet out报文,所述第五packet out报文中包括所述第二 配置回复报文。Receiving a fifth packet out message sent by the controller, where the fifth packet out message includes the second Configure reply packets.
结合第五方面第三种可能的实现方式,和/或第五方面第四种可能的实现方式,和/或第五方面第六种可能的实现方式,在第五方面第七种可能的实现方式中,所述第一设备为直连交换机,所述第二接收单元还用于:接收所述第二设备发送的OF连接请求;Combining the third possible implementation manner of the fifth aspect, and/or the fourth possible implementation manner of the fifth aspect, and/or the sixth possible implementation manner of the fifth aspect, the seventh possible implementation in the fifth aspect In the mode, the first device is a direct connection switch, and the second receiving unit is further configured to: receive an OF connection request sent by the second device;
所述第二发送单元还用于:确定所述第一设备中没有用于转发所述OF连接请求的流表项时,向所述控制器发送基于所述OF连接请求的第五packet in报文;The second sending unit is further configured to: when it is determined that there is no flow entry for forwarding the OF connection request in the first device, send a fifth packet in report based on the OF connection request to the controller Text
所述第二接收单元还用于:接收所述控制器根据所述第五packet in报文下发的第四流表项,所述第四流表项用于转发所述OF连接请求;The second receiving unit is further configured to: receive a fourth flow entry that is sent by the controller according to the fifth packet in packet, where the fourth flow entry is used to forward the OF connection request;
所述第二发送单元还用于:将所述OF连接请求发送给所述控制器;The second sending unit is further configured to: send the OF connection request to the controller;
所述第二接收单元还用于:接收所述控制器发送的OF连接响应;The second receiving unit is further configured to: receive an OF connection response sent by the controller;
所述第二发送单元还用于:将所述OF连接响应发送给所述第二设备。The second sending unit is further configured to: send the OF connection response to the second device.
结合第五方面第三种可能的实现方式,和/或第五方面第五种可能的实现方式,和/或第五方面第六种可能的实现方式,在第五方面第八种可能的实现方式中,所述第一设备为非直连交换机,所述第二接收单元还用于:接收所述第二设备发送的OF连接请求;Combining the third possible implementation manner of the fifth aspect, and/or the fifth possible implementation manner of the fifth aspect, and/or the sixth possible implementation manner of the fifth aspect, the eighth possible implementation in the fifth aspect In the mode, the first device is a non-direct connection switch, and the second receiving unit is further configured to: receive an OF connection request sent by the second device;
所述第二发送单元还用于:确定所述第一设备中没有用于转发所述OF连接请求的流表项时,向所述控制器发送基于所述OF连接请求的第五packet in报文;The second sending unit is further configured to: when it is determined that there is no flow entry for forwarding the OF connection request in the first device, send a fifth packet in report based on the OF connection request to the controller Text
所述第二接收单元还用于:接收所述控制器根据所述第五packet in报文下发的第四流表项,所述第四流表项用于转发所述OF连接请求;The second receiving unit is further configured to: receive a fourth flow entry that is sent by the controller according to the fifth packet in packet, where the fourth flow entry is used to forward the OF connection request;
所述第二发送单元还用于:通过中间交换机向控制器发送所述OF连接请求;所述中间交换机是所述控制器与所述第一设备之间的OF连接上的交换机;所述中间交换机通过所述控制器分别下发至所述中间交换机的所述第四流表项转发所述OF连接请求;The second sending unit is further configured to: send the OF connection request to the controller by using an intermediate switch; the intermediate switch is a switch on an OF connection between the controller and the first device; The switch forwards the OF connection request by using the fourth flow entry that is sent by the controller to the intermediate switch by the controller;
所述第二接收单元还用于:接收所述控制器通过所述中间交换机发送的OF连接响应;The second receiving unit is further configured to: receive an OF connection response sent by the controller by using the intermediate switch;
所述第二发送单元还用于:将所述OF连接响应发送给所述第二设备。The second sending unit is further configured to: send the OF connection response to the second device.
本发明实施例中,控制器接收第一交换机通过所述第一交换机与所述控制器之间的OF连接转发的第一设备的第一配置请求报文,所述第一配置请求报文包括:第一设备的设备信息;所述第一交换机位于所述控制器与所述第一设备之间,所述第一配置请求报文由所述第一设备发送给所述第一交换机,根据所述第一设备的设备信息确定所述第一设备的配置信息,通过所述控制器与所述第一交换机之间的OF连接向所述第一交换机发送第一配置回复报文,所述第一配置回复报文包括所述第一设备的配置信息,以便所述第一交换机将所述第一配置回复报文转发给所述第一设备、所述第一设备根据所述配置信息进行设备配置,从而实现了对于第一设备的自动配置。In the embodiment of the present invention, the controller receives the first configuration request message of the first device that is forwarded by the first switch by using the OF connection between the first switch and the controller, where the first configuration request message includes The device information of the first device; the first switch is located between the controller and the first device, and the first configuration request message is sent by the first device to the first switch, according to The device information of the first device determines configuration information of the first device, and sends a first configuration reply message to the first switch by using an OF connection between the controller and the first switch, where The first configuration reply message includes the configuration information of the first device, so that the first switch forwards the first configuration reply message to the first device, and the first device performs the configuration according to the configuration information. The device is configured to enable automatic configuration of the first device.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例中所需要 使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following needs for the embodiments. BRIEF DESCRIPTION OF THE DRAWINGS The drawings used in the following description are merely illustrative of the embodiments of the present invention, and those of ordinary skill in the art can also The figure obtains other figures.
图1为本发明实施例应用网络结构图;1 is a structural diagram of an application network according to an embodiment of the present invention;
图2为本发明实施例自动配置方法流程图;2 is a flowchart of an automatic configuration method according to an embodiment of the present invention;
图3为本发明实施例自动配置方法另一种流程图;3 is another flowchart of an automatic configuration method according to an embodiment of the present invention;
图4A为本发明实施例应用网络示例图;4A is a schematic diagram of an application network according to an embodiment of the present invention;
图4B为本发明实施例自动配置方法另一种流程图;4B is another flowchart of an automatic configuration method according to an embodiment of the present invention;
图5为本发明实施例自动配置方法另一种流程图;FIG. 5 is another flowchart of an automatic configuration method according to an embodiment of the present invention;
图6为本发明实施例自动配置方法另一种流程图;6 is another flowchart of an automatic configuration method according to an embodiment of the present invention;
图7为本发明实施例自动配置方法另一种流程图;FIG. 7 is another flowchart of an automatic configuration method according to an embodiment of the present invention;
图8为本发明实施例自动配置方法另一种流程图;FIG. 8 is another flowchart of an automatic configuration method according to an embodiment of the present invention; FIG.
图9A为本发明实施例应用网络另一示例图;9A is another exemplary diagram of an application network according to an embodiment of the present invention;
图9B为本发明实施例自动配置方法另一流程图;9B is another flowchart of an automatic configuration method according to an embodiment of the present invention;
图10为本发明实施例控制器结构示意图;10 is a schematic structural diagram of a controller according to an embodiment of the present invention;
图11为本发明实施例第一设备结构示意图。FIG. 11 is a schematic structural diagram of a first device according to an embodiment of the present invention.
具体实施方式detailed description
开放流(OF,OpenFlow)技术是斯坦福大学提出的一种南向协议,通过控制与转发分离、控制集中软件化和转发硬件平台的通用化来加速网络的变革。基于OpenFlow技术组成的OpenFlow网络包括OpenFlow控制器、OpenFlow交换机。其中OpenFlow交换机是核心组件,由OpenFlow协议、安全通道和流表三部分组成。OF控制器通过安全通道下发流表项到OF交换机的流表中,OF交换机按照流表进行匹配(match)+动作(action)的操作。Open Flow (OF) technology is a southward protocol proposed by Stanford University. It accelerates the transformation of the network by controlling the separation of control and forwarding, controlling the generalization of centralized software and forwarding hardware platforms. An OpenFlow network based on OpenFlow technology includes an OpenFlow controller and an OpenFlow switch. The OpenFlow switch is a core component and consists of an OpenFlow protocol, a secure channel, and a flow table. The OF controller sends a flow entry to the flow table of the OF switch through the secure channel. The OF switch performs the match + action according to the flow table.
本发明实施例利用OpenFlow提供的灵活性和开放性,提出一种对设备进行自动配置的方法。The embodiment of the present invention provides a method for automatically configuring a device by utilizing the flexibility and openness provided by OpenFlow.
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整的描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有付出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention are clearly and completely described in the following with reference to the accompanying drawings in the embodiments of the present invention. It is obvious that the described embodiments are only a part of the embodiments of the present invention, but not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without departing from the inventive scope are the scope of the present invention.
参见图1,为本发明实施例自动配置方法应用场景的网络结构示意图,包括:控制器110、交换机120以及用户设备130,其中,控制器110与至少一个交换机120连接,所述至少一个交换机120还可以连接其他交换机120以及用户设备130。1 is a schematic diagram of a network structure of an application scenario of an automatic configuration method according to an embodiment of the present invention, including: a controller 110, a switch 120, and a user equipment 130. The controller 110 is connected to at least one switch 120, and the at least one switch 120 is connected. Other switches 120 and user devices 130 can also be connected.
其中,控制器、交换机均支持OF技术。 Among them, controllers and switches support OF technology.
其中,本发明实施例中,将直接与控制器连接的交换机称为直连交换机;不与控制器直接连接,通过其他交换机连接控制器的交换机称为非直连交换机。直连交换机与控制器的连接可以是物理方式连接,也可以是隧道连接。In the embodiment of the present invention, the switch directly connected to the controller is called a direct connection switch; the switch that is not directly connected to the controller, and the controller connected to the controller through other switches is called a non-direct connection switch. The connection between the direct switch and the controller can be either a physical connection or a tunnel connection.
参见图2,为本发明实施例自动配制方法流程示意图,该方法包括:2 is a schematic flowchart of an automatic preparation method according to an embodiment of the present invention, where the method includes:
步骤201:控制器接收第一交换机通过所述第一交换机与所述控制器之间的OF连接转发的第一设备的第一配置请求报文,所述第一配置请求报文包括:第一设备的设备信息;所述第一交换机位于所述控制器与所述第一设备之间,所述第一配置请求报文由所述第一设备发送给所述第一交换机。Step 201: The controller receives a first configuration request message of the first device that is forwarded by the first switch by using the OF connection between the first switch and the controller, where the first configuration request message includes: Device information of the device; the first switch is located between the controller and the first device, and the first configuration request message is sent by the first device to the first switch.
其中,所述第一设备可以是交换机或者用户设备。The first device may be a switch or a user equipment.
步骤202:所述控制器根据所述第一设备的设备信息确定所述第一设备的配置信息;Step 202: The controller determines configuration information of the first device according to device information of the first device.
步骤203:所述控制器通过所述控制器与所述第一交换机之间的OF连接向所述第一交换机发送第一配置回复报文,所述第一配置回复报文包括所述第一设备的配置信息,以便所述第一交换机将所述第一配置回复报文转发给所述第一设备、所述第一设备根据所述配置信息进行设备配置。Step 203: The controller sends a first configuration reply message to the first switch by using an OF connection between the controller and the first switch, where the first configuration reply message includes the first The configuration information of the device, so that the first switch forwards the first configuration reply message to the first device, and the first device performs device configuration according to the configuration information.
可选地,所述第一交换机是直连交换机,所述控制器接收第一交换机通过所述第一交换机与所述控制器之间的OF连接转发的第一设备的第一配置请求报文,包括:Optionally, the first switch is a direct switch, and the controller receives a first configuration request message of the first device forwarded by the first switch by using the OF connection between the first switch and the controller. ,include:
所述控制器接收所述第一交换机通过所述OF连接发送的、基于所述第一配置请求报文的第一packet in报文;Receiving, by the controller, the first packet in packet sent by the first switch by using the OF connection, based on the first configuration request packet;
所述控制器根据所述第一packet in报文向所述第一交换机下发用于转发所述第一配置请求报文的第一流表项;The controller sends a first flow entry for forwarding the first configuration request packet to the first switch according to the first packet in packet;
所述控制器接收所述第一交换机按照所述第一流表项发送的所述第一配置请求报文。The controller receives the first configuration request message sent by the first switch according to the first flow entry.
可选地,所述第一交换机为非直连交换机,所述控制器接收第一交换机通过所述第一交换机与所述控制器之间的OF连接转发的第一设备的第一配置请求报文,包括:Optionally, the first switch is a non-directly connected switch, and the controller receives a first configuration request report of the first device that is forwarded by the first switch by using the OF connection between the first switch and the controller. Text, including:
所述控制器接收所述第一交换机通过所述OF连接发送的、基于所述第一配置请求报文的第一packet in报文;Receiving, by the controller, the first packet in packet sent by the first switch by using the OF connection, based on the first configuration request packet;
所述控制器根据所述第一packet in报文向中间交换机以及所述第一交换机分别下发用于转发所述第一配置请求报文的第一流表项;所述中间交换机是所述控制器与所述第一交换机之间的OF连接上的交换机; The controller sends a first flow entry for forwarding the first configuration request packet to the intermediate switch and the first switch according to the first packet in message; the intermediate switch is the control a switch on the OF connection between the device and the first switch;
所述控制器接收所述第一交换机通过所述中间交换机发送的所述第一配置请求报文;所述中间交换机按照所述第一流表项转发所述第一配置请求报文;The controller receives the first configuration request message sent by the first switch by using the intermediate switch; the intermediate switch forwards the first configuration request message according to the first flow entry;
所述控制器通过所述控制器与所述第一交换机之间的OF连接向所述第一交换机发送第一配置回复报文,包括:The controller sends a first configuration reply message to the first switch by using an OF connection between the controller and the first switch, including:
所述控制器通过所述中间交换机将所述第一配置回复报文发送给所述第一交换机,所述中间交换机按照所述第一流表项转发所述第一配置回复报文。The controller sends the first configuration reply message to the first switch by using the intermediate switch, and the intermediate switch forwards the first configuration reply message according to the first flow entry.
可选地,所述控制器接收第一交换机通过所述第一交换机与所述控制器之间的OF连接转发的第一设备的第一配置请求报文,包括:Optionally, the controller receives the first configuration request message of the first device that is forwarded by the first switch by using the OF connection between the first switch and the controller, and includes:
所述控制器接收所述第一交换机通过所述OF连接发送的第二packet in报文,所述第二packte in报文中包括所述第一配置请求报文;The controller receives the second packet in packet sent by the first switch by using the OF connection, where the second packet in the packet includes the first configuration request packet;
所述控制器通过所述控制器与所述第一交换机之间的OF连接向所述第一交换机发送第一配置回复报文,包括:The controller sends a first configuration reply message to the first switch by using an OF connection between the controller and the first switch, including:
所述控制器通过所述OF连接向所述第一交换机发送第二packet out报文,所述第二packet out报文中包括所述第一配置回复报文。The controller sends a second packet out message to the first switch by using the OF connection, where the second packet out message includes the first configuration reply message.
可选地,所述第一设备为非直连交换机,还包括:Optionally, the first device is a non-directly connected switch, and further includes:
所述控制器与所述第一设备建立OF连接。The controller establishes an OF connection with the first device.
可选地,所述第一设备为非直连交换机,所述第一交换机为直连交换机,所述控制器与所述第一设备建立OF连接,包括:Optionally, the first device is an indirect switch, the first switch is a direct switch, and the controller establishes an OF connection with the first device, including:
所述控制器接收所述第一交换机通过与所述控制器之间的OF连接发送的、基于OF连接请求的第三packet in报文;所述第一交换机在接收到所述第一设备发送的OF连接请求且确定所述第一交换机中没有用于转发所述OF连接请求的流表项时发送所述第三packet in报文;The controller receives a third packet in message sent by the first switch by using an OF connection with the controller, and the first switch sends the first device to receive Sending the third packet in message when the OF connection request is requested and the flow entry of the first switch is not used to forward the OF connection request;
所述控制器根据所述第三packet in报文向所述第一交换机下发用于转发所述OF连接请求的第二流表项;The controller sends a second flow entry for forwarding the OF connection request to the first switch according to the third packet in packet;
所述控制器接收所述第一交换机发送的所述OF连接请求;The controller receives the OF connection request sent by the first switch;
所述控制器处理所述OF连接请求,向所述第一交换机发送OF连接响应,以便所述第一交换机将所述OF连接响应发送给所述第一设备。The controller processes the OF connection request, and sends an OF connection response to the first switch, so that the first switch sends the OF connection response to the first device.
可选地,所述第一设备为非直连交换机,所述第一交换机为非直连交换机,所述控制器与所述第一设备建立OF连接,包括:Optionally, the first device is a non-directly connected switch, the first switch is a non-directly connected switch, and the controller establishes an OF connection with the first device, including:
所述控制器接收所述第一交换机通过与所述控制器之间的OF连接发送的、基于所 述OF连接请求的第三packet in报文;所述第一交换机在接收到所述第一设备发送的OF连接请求且确定所述第一交换机中没有用于转发所述OF连接请求的流表项时发送所述第三packet in报文;The controller receives, based on the OF connection between the first switch and the controller, based on a third packet in packet of the OF connection request; the first switch receives the OF connection request sent by the first device, and determines that there is no flow table in the first switch for forwarding the OF connection request Transmitting the third packet in message;
所述控制器根据所述第三packet in报文向所述中间交换机以及所述第一交换机分别下发用于转发所述OF连接请求的第二流表项;The controller sends a second flow entry for forwarding the OF connection request to the intermediate switch and the first switch according to the third packet in message;
所述控制器接收所述第一交换机通过所述中间交换机发送的所述OF连接请求;所述中间交换机通过所述第二流表项转发所述OF连接请求;The controller receives the OF connection request sent by the first switch by using the intermediate switch; the intermediate switch forwards the OF connection request by using the second flow entry;
所述控制器处理所述OF连接请求,通过所述中间交换机向所述第一交换机发送OF连接响应,以便所述第一交换机将所述OF连接响应发送给所述第一设备,所述中间交换机通过所述第二流表项转发所述OF连接响应。The controller processes the OF connection request, and sends an OF connection response to the first switch by the intermediate switch, so that the first switch sends the OF connection response to the first device, where the middle The switch forwards the OF connection response by using the second flow entry.
可选地,所述第一配置请求报文和所述第一配置响应报文是能够在没有网络地址配置的情况下传输的报文。Optionally, the first configuration request message and the first configuration response message are messages that can be transmitted without a network address configuration.
可选地,所述第一配置请求报文和所述第一配置响应报文是基于链路层发现协议(LLDP,Link Layer Discovery Protocol)、或者动态主机设置协议(DHCP,Dynamic Host Configuration Protocol)的报文。Optionally, the first configuration request message and the first configuration response message are based on a Link Layer Discovery Protocol (LLDP) or a Dynamic Host Configuration Protocol (DHCP). Message.
可选地,所述第一设备的配置信息包括:第一设备的网络之间互连的协议(IP,Internet Protocol)地址,或者第一设备的IP地址和控制器IP地址。Optionally, the configuration information of the first device includes: an IP (Internet Protocol) address interconnected between the networks of the first device, or an IP address and a controller IP address of the first device.
可选地,所述第一设备的设备信息包括:所述第一设备的媒体介入控制层(MAC,Media Access Control)地址、第一设备标识(ID)。Optionally, the device information of the first device includes: a media access control layer (MAC) address of the first device, and a first device identifier (ID).
本实施例中,控制器接收第一交换机通过所述第一交换机与所述控制器之间的OF连接转发的第一设备的第一配置请求报文,所述第一配置请求报文包括:第一设备的设备信息;所述第一交换机位于所述控制器与所述第一设备之间,所述第一配置请求报文由所述第一设备发送给所述第一交换机,根据所述第一设备的设备信息确定所述第一设备的配置信息,通过所述控制器与所述第一交换机之间的OF连接向所述第一交换机发送第一配置回复报文,所述第一配置回复报文包括所述第一设备的配置信息,以便所述第一交换机将所述第一配置回复报文转发给所述第一设备、所述第一设备根据所述配置信息进行设备配置,从而实现了对于第一设备的自动配置。In this embodiment, the controller receives the first configuration request message of the first device that is forwarded by the first switch by using the OF connection between the first switch and the controller, where the first configuration request message includes: Device information of the first device; the first switch is located between the controller and the first device, and the first configuration request message is sent by the first device to the first switch, according to the The device information of the first device determines configuration information of the first device, and sends a first configuration reply message to the first switch by using an OF connection between the controller and the first switch, where the The configuration reply message includes the configuration information of the first device, so that the first switch forwards the first configuration reply message to the first device, and the first device performs the device according to the configuration information. Configuration, thus enabling automatic configuration of the first device.
参见图3,为本发明实施例自动配制方法另一流程示意图,该方法包括:3 is another schematic flowchart of an automatic preparation method according to an embodiment of the present invention, where the method includes:
步骤301:第一设备向第一交换机发送第一配置请求报文,以便所述第一交换机通过所述第一交换机与所述控制器之间的OF连接发送所述第一配置请求报文至所述控制器,所述 第一交换机与所述第一设备具有连接关系;Step 301: The first device sends a first configuration request message to the first switch, so that the first switch sends the first configuration request message to the first switch through the OF connection between the first switch and the controller. The controller, the The first switch has a connection relationship with the first device;
步骤302:所述第一设备接收所述第一交换机发送的第一配置回复报文,所述第一配置回复报文由所述控制器通过所述控制器与所述第一交换机之间的OF连接发送至所述第一交换机;Step 302: The first device receives a first configuration reply message sent by the first switch, where the first configuration reply message is used by the controller between the controller and the first switch. The OF connection is sent to the first switch;
步骤303:所述第一设备根据所述配置信息进行设备配置。Step 303: The first device performs device configuration according to the configuration information.
可选地,所述第一设备为非直连交换机,还包括:Optionally, the first device is a non-directly connected switch, and further includes:
所述第一设备与所述控制器建立OF连接。The first device establishes an OF connection with the controller.
可选地,所述第一设备与所述控制器建立OF连接,包括:Optionally, the first device establishes an OF connection with the controller, including:
所述第一设备向所述第一交换机发送OF连接请求,以便所述第一交换机在确定所述第一交换机中没有用于转发所述OF连接请求的流表项时向控制器发送基于所述OF连接请求的第三packet in报文、接收所述控制器下发的用于转发所述OF连接请求的第二流表项、向所述控制器发送OF连接请求、接收所述控制器发送的OF连接响应;Transmitting, by the first device, an OF connection request to the first switch, so that the first switch sends a basis to the controller when determining that the first switch does not have a flow entry for forwarding the OF connection request a third packet in message of the OF connection request, a second flow entry sent by the controller for forwarding the OF connection request, an OF connection request sent to the controller, and receiving the controller The transmitted OF connection response;
所述第一设备接收所述第一交换机发送的OF连接响应。The first device receives an OF connection response sent by the first switch.
可选地,所述第一设备为第二交换机,所述第二交换机连接第二设备,所述第一设备与所述控制器建立OF连接之后,还包括:Optionally, the first device is a second switch, and the second switch is connected to the second device. After the first device establishes an OF connection with the controller, the method further includes:
所述第一设备接收所述第二设备发送的第二配置请求报文,所述第二配置请求报文包括:第二设备的设备信息;The first device receives a second configuration request message sent by the second device, where the second configuration request message includes: device information of the second device;
所述第一设备通过所述第一设备与所述控制器之间的OF连接将所述第二配置请求报文发送给控制器;Transmitting, by the first device, the second configuration request message to the controller by using an OF connection between the first device and the controller;
所述第一设备接收所述控制器通过所述第一设备与所述控制器之间的OF连接发送的第二配置回复报文,所述第二配置回复报文包括所述第二设备的配置信息,所述第二设备的配置信息由所述控制器根据所述第二设备的设备信息确定;Receiving, by the first device, a second configuration reply message sent by the controller by using an OF connection between the first device and the controller, where the second configuration reply message includes the second device Configuration information, where the configuration information of the second device is determined by the controller according to device information of the second device;
所述第一设备将所述第二配置回复报文发送给所述第二设备。The first device sends the second configuration reply message to the second device.
可选地,所述第一设备为直连交换机,所述第一设备通过所述第一设备与所述控制器之间的OF连接将所述第二配置请求报文发送给控制器,包括:Optionally, the first device is a direct connection switch, and the first device sends the second configuration request message to the controller by using an OF connection between the first device and the controller, including :
所述第一设备确定所述第一设备中没有用于转发所述第二配置请求报文的流表项时,通过所述OF连接向所述控制器发送基于所述第二配置请求报文的第四packet in报文;When the first device determines that there is no flow entry for forwarding the second configuration request packet, the first device sends the second configuration request packet to the controller by using the OF connection. Fourth packet in message;
所述第一设备接收所述控制器下发的用于转发所述第二配置请求报文的第三流表项;Receiving, by the first device, a third flow entry that is sent by the controller and used to forward the second configuration request packet;
所述第一设备将所述第二配置请求报文发送至所述控制器。 The first device sends the second configuration request message to the controller.
可选地,所述第一设备为非直连交换机,所述第一设备通过所述第一设备与所述控制器之间的OF连接将所述第二配置请求报文发送给控制器,包括:Optionally, the first device is a non-directly connected switch, and the first device sends the second configuration request message to the controller by using an OF connection between the first device and the controller. include:
所述第一设备向控制器发送基于所述第二配置请求报文的第四packet in报文;Sending, by the first device, a fourth packet in packet based on the second configuration request packet to the controller;
所述第一设备接收所述控制器根据所述第四packet in报文下发的用于转发所述第二配置请求报文的第三流表项;The first device receives a third flow entry that is sent by the controller according to the fourth packet in packet to forward the second configuration request packet;
所述第一设备通过中间交换机向控制器发送所述第二配置请求报文;所述中间交换机是所述控制器与所述第一设备之间的OF连接上的交换机;所述中间交换机通过所述控制器分别下发至所述中间交换机的所述第三流表项转发所述第二配置请求报文;The first device sends the second configuration request message to the controller through the intermediate switch; the intermediate switch is a switch on the OF connection between the controller and the first device; the intermediate switch passes And the third flow entry that is sent by the controller to the intermediate switch to forward the second configuration request packet;
所述第一设备接收所述控制器通过所述第一设备与所述控制器之间的OF连接发送的第二配置回复报文,包括:Receiving, by the first device, the second configuration reply message sent by the controller by using the OF connection between the first device and the controller, including:
所述第一设备接收所述控制器通过所述中间交换机发送的所述第二配置回复报文,所述中间交换机通过所述第三流表项转发所述第二配置回复报文。The first device receives the second configuration reply message sent by the controller through the intermediate switch, and the intermediate switch forwards the second configuration reply message by using the third flow entry.
可选地,所述第一设备通过所述第一设备与所述控制器之间的OF连接将所述第二配置请求报文发送给控制器,包括:Optionally, the first device sends the second configuration request message to the controller by using an OF connection between the first device and the controller, including:
所述第一设备向控制器发送第五packet in报文,所述第五packet in报文中包括所述第二配置请求报文;The first device sends a fifth packet in packet to the controller, where the fifth packet in packet includes the second configuration request packet;
所述第一设备接收所述控制器通过所述第一设备与所述控制器之间的OF连接发送的第二配置回复报文,包括:Receiving, by the first device, the second configuration reply message sent by the controller by using the OF connection between the first device and the controller, including:
所述第一设备接收所述控制器发送的第五packet out报文,所述第五packet out报文中包括所述第二配置回复报文。The first device receives the fifth packet out message sent by the controller, and the fifth packet out message includes the second configuration reply message.
可选地,所述第一设备为直连交换机,所述第一设备将所述第二配置回复报文发送给所述第二设备之后,还包括:Optionally, the first device is a direct-connecting switch, and after the first device sends the second configuration reply packet to the second device, the method further includes:
所述第一设备接收所述第二设备发送的OF连接请求;Receiving, by the first device, an OF connection request sent by the second device;
所述第一设备确定所述第一设备中没有用于转发所述OF连接请求的流表项时,向所述控制器发送基于所述OF连接请求的第五packet in报文;When the first device determines that there is no flow entry for forwarding the OF connection request, the first device sends a fifth packet in packet based on the OF connection request to the controller;
所述第一设备接收所述控制器根据所述第五packet in报文下发的用于转发所述OF连接请求的第四流表项;Receiving, by the first device, the fourth flow entry that is sent by the controller according to the fifth packet in packet for forwarding the OF connection request;
所述第一设备将所述OF连接请求发送给所述控制器;Sending, by the first device, the OF connection request to the controller;
所述第一设备接收所述控制器发送的OF连接响应,将所述OF连接响应发送给所述第二设备。 The first device receives an OF connection response sent by the controller, and sends the OF connection response to the second device.
可选地,所述第一设备为非直连交换机,所述第一设备将所述第二配置回复报文发送给所述第二设备之后,还包括:Optionally, the first device is a non-directly connected switch, and after the first device sends the second configuration reply message to the second device, the method further includes:
所述第一设备接收所述第二设备发送的OF连接请求;Receiving, by the first device, an OF connection request sent by the second device;
所述第一设备确定所述第一设备中没有用于转发所述OF连接请求的流表项时,向所述控制器发送基于所述OF连接请求的第五packet in报文;When the first device determines that there is no flow entry for forwarding the OF connection request, the first device sends a fifth packet in packet based on the OF connection request to the controller;
所述第一设备接收所述控制器根据所述第五packet in报文下发的用于转发所述OF连接请求的第四流表项;Receiving, by the first device, the fourth flow entry that is sent by the controller according to the fifth packet in packet for forwarding the OF connection request;
所述第一设备通过中间交换机向控制器发送所述OF连接请求;所述中间交换机是所述控制器与所述第一设备之间的OF连接上的交换机;所述中间交换机通过所述控制器分别下发至所述中间交换机的所述第四流表项转发所述OF连接请求;The first device sends the OF connection request to a controller through an intermediate switch; the intermediate switch is a switch on an OF connection between the controller and the first device; and the intermediate switch passes the control The fourth flow entry that is respectively delivered to the intermediate switch forwards the OF connection request;
所述第一设备接收所述控制器通过所述中间交换机发送的OF连接响应,将所述OF连接响应发送给所述第二设备。The first device receives an OF connection response sent by the controller through the intermediate switch, and sends the OF connection response to the second device.
可选地,所述第一配置请求报文和所述第一配置响应报文是能够在没有网络地址配置的情况下传输的报文。Optionally, the first configuration request message and the first configuration response message are messages that can be transmitted without a network address configuration.
可选地,所述第一配置请求报文和所述第一配置响应报文是基于LLDP、或者DHCP协议的报文。Optionally, the first configuration request message and the first configuration response message are packets based on LLDP or DHCP protocol.
可选地,所述第一设备的配置信息包括:第一设备的IP地址,或者第一设备的IP地址和控制器IP地址。Optionally, the configuration information of the first device includes: an IP address of the first device, or an IP address of the first device and a controller IP address.
可选地,所述第一设备的设备信息包括:所述第一设备的MAC地址、第一设备ID。Optionally, the device information of the first device includes: a MAC address of the first device, and a first device ID.
本实施例中,第一设备向第一交换机发送第一配置请求报文,以便所述第一交换机通过所述第一交换机与所述控制器之间的OF连接发送所述第一配置请求报文至所述控制器,所述第一交换机与所述第一设备具有连接关系,接收所述第一交换机发送的第一配置回复报文,所述第一配置回复报文由所述控制器通过所述控制器与所述第一交换机之间的OF连接发送至所述第一交换机,根据所述配置信息进行设备配置,从而实现了第一设备的自动配置。In this embodiment, the first device sends a first configuration request message to the first switch, so that the first switch sends the first configuration request report by using an OF connection between the first switch and the controller. And the first switch has a connection relationship with the first device, and receives a first configuration reply message sent by the first switch, where the first configuration reply message is used by the controller. And transmitting, by the OF connection between the controller and the first switch, to the first switch, performing device configuration according to the configuration information, thereby implementing automatic configuration of the first device.
参见图4A,为本发明实施例适用的一种网络结构示意图,包括:控制器、与控制器直接连接的直连交换机、与直连交换机连接的第一非直连交换机、与第一非直连交换机连接的第二非直连交换机、与直连交换机连接的第一用户设备、与第一非直连交换机连接的第二用户设备等。 FIG. 4A is a schematic diagram of a network structure according to an embodiment of the present invention, including: a controller, a direct connection switch directly connected to the controller, a first non-direct connection switch connected to the direct connection switch, and the first non-straight switch. a second indirect switch connected to the switch, a first user equipment connected to the direct switch, a second user equipment connected to the first indirect switch, and the like.
参见图4B,为本发明实施例一种自动配置方法流程图,结合图4A说明控制器对直连交换机进行自动配置的过程,该方法包括:FIG. 4B is a flowchart of an automatic configuration method according to an embodiment of the present invention. The process for automatically configuring a direct-connected switch by a controller is described in conjunction with FIG. 4A, where the method includes:
步骤401:直连交换机向控制器发送第一配置请求报文,所述第一配置请求报文包括:直连交换机的设备信息。Step 401: The direct connection switch sends a first configuration request message to the controller, where the first configuration request message includes: device information of the directly connected switch.
所述设备信息可以包括:直连交换机的MAC地址、和直连交换机ID等。The device information may include: a MAC address of the direct-connected switch, a direct-connected switch ID, and the like.
其中,所述第一配置请求报文可以是能够在没有网络地址配置的情况下传输的报文,例如基于LLDP、或者DHCP协议的报文等。The first configuration request packet may be a packet that can be transmitted without a network address configuration, such as a packet based on LLDP or a DHCP protocol.
其中,直连交换机未被配置之前,可以周期性地发送第一配置请求报文。The first configuration request packet may be periodically sent before the direct connection switch is configured.
步骤402:控制器根据所述第一配置请求报文中直连交换机的设备信息确定直连交换机的配置信息,向直连交换机发送第一配置回复报文。Step 402: The controller determines, according to the device information of the directly connected switch in the first configuration request message, the configuration information of the directly connected switch, and sends the first configuration reply message to the direct connection switch.
第一配置回复报文可以包括:直连交换机的配置信息,例如控制器为直连交换机分配的IP地址、控制器的IP地址等,另外,第一配置回复报文还可以包括其他关于直连交换机的配置信息,具体可以在实际应用中自主设定,这里不限制。The first configuration reply message may include: configuration information of the directly connected switch, for example, an IP address assigned by the controller to the directly connected switch, an IP address of the controller, and the like, and the first configuration reply message may further include other direct connection. The configuration information of the switch can be set independently in the actual application. There is no limit here.
其中,控制器可以根据直连交换机的设备信息确定控制器中没有该直连交换机的信息,为该直连交换机分配IP地址,将为直连交换机分配的IP地址以及控制器的IP地址作为直连交换机的配置信息。The controller may determine, according to the device information of the directly connected switch, that the controller does not have the direct switch information, assign an IP address to the direct switch, and use the IP address assigned to the direct switch and the IP address of the controller as straight Connect to the switch configuration information.
其中,第一配置回复报文与其对应的第一配置请求报文一般基于同一协议,例如第一配置请求报文是基于LLDP协议的报文,则第一配置回复报文一般也是基于LLDP协议的报文;第一配置请求报文是基于DHCP协议的报文,第一配置回复报文一般也是基于DHCP协议的报文。The first configuration reply message is generally based on the same protocol as the first configuration request message. For example, the first configuration request message is a LLDP-based message, and the first configuration reply message is generally based on the LLDP protocol. The first configuration request message is a DHCP-based message. The first configuration reply message is also a DHCP-based message.
步骤403:直连交换机根据所述第一配置回复报文中的配置信息进行设备配置。Step 403: The direct switch performs device configuration according to the configuration information in the first configuration reply packet.
其中,配置信息包括直连交换机的IP地址,则直连交换机可以根据该IP地址配置自身的IP地址;配置信息包括控制器的IP地址,则直连交换机可以根据配置信息中控制器的IP地址在自身中配置控制器的IP地址,等等。该设备配置过程可以由直连交换机中的配置代理完成。The configuration information includes the IP address of the directly connected switch, and the direct switch can configure its own IP address according to the IP address. The configuration information includes the IP address of the controller, and the direct switch can be based on the IP address of the controller in the configuration information. Configure the controller's IP address in itself, and so on. This device configuration process can be done by a configuration agent in a direct-connected switch.
步骤404:直连交换机向控制器发送OF连接请求。Step 404: The direct connection switch sends an OF connection request to the controller.
步骤405:控制器处理所述OF连接请求,向直连交换机发送OF连接响应。Step 405: The controller processes the OF connection request, and sends an OF connection response to the direct connection switch.
之后,控制器与直连交换机之间就可以通过OF连接进行信息的传输,例如控制器的配置服务和直连交换机的配置代理可以通过rest/rpc等方式进行交互,完成其他信息的配置。本实施例中,直连交换机向控制器发送第一配置请求报文,控制器处理该第一配置请求报文, 向直连交换机发送第一配置回复报文,在第一配置回复报文中携带直连交换机的配置信息,从而直连交换机根据该配置信息完成设备配置,实现了直连交换机的自动配置。After that, the controller and the direct-connected switch can transmit information through the OF connection. For example, the configuration service of the controller and the configuration agent of the direct-connected switch can interact with each other through rest/rpc to complete other information configuration. In this embodiment, the direct connection switch sends a first configuration request message to the controller, and the controller processes the first configuration request message. The first configuration reply packet is sent to the direct switch, and the configuration information of the direct switch is carried in the first configuration reply packet, so that the direct switch completes the device configuration according to the configuration information, and implements automatic configuration of the direct switch.
参见图5,为本发明实施例自动配置流程示意图,结合图4A,在控制器对直连交换机进行配置且建立OF连接的条件下,说明控制器对第一非直连交换机进行自动配置的一种实现流程。该方法包括:5 is a schematic diagram of an automatic configuration process according to an embodiment of the present invention. Referring to FIG. 4A, under the condition that a controller configures a direct-connected switch and establishes an OF connection, the controller automatically configures the first non-directly connected switch. Implementation process. The method includes:
步骤501:第一非直连交换机向直连交换机发送第一配置请求报文,所述第一配置请求报文包括:第一非直连交换机的设备信息。Step 501: The first indirect connection switch sends a first configuration request message to the direct connection switch, where the first configuration request message includes: device information of the first non-directly connected switch.
所述设备信息可以包括:第一非直连交换机的MAC地址、和第一非直连交换机ID等。The device information may include: a MAC address of the first indirect switch, a first indirect switch ID, and the like.
其中,所述第一配置请求报文可以是能够在没有网络地址配置的情况下传输的报文,例如基于LLDP、或者DHCP协议的报文等。The first configuration request packet may be a packet that can be transmitted without a network address configuration, such as a packet based on LLDP or a DHCP protocol.
其中,第一非直连交换机未被配置之前,可以周期性地发送第一配置请求报文。The first configuration request packet may be periodically sent before the first indirect connection switch is configured.
步骤502:直连交换机通过直连交换机与控制器之间的OF连接向控制器发送基于第一配置请求报文的第一packet in报文。Step 502: The direct switch sends a first packet in packet based on the first configuration request message to the controller by using the OF connection between the direct switch and the controller.
在实际应用中,packet in报文用于向控制器上报交换机无法处理的报文,本步骤中基于第一配置请求报文的第一packet in报文的作用与此相同,在于向控制器上报直连交换机接收到了第一配置请求报文。第一packet in报文可以包括:直连交换机的标识(如IP地址、MAC地址等)、接收第一配置请求报文的端口号等信息。第一packet in报文中还可以携带第一配置请求报文中的部分信息,具体携带哪些信息本发明实施例并不限制。In the actual application, the packet in packet is used to report the packet that cannot be processed by the switch to the controller. In this step, the first packet in packet based on the first configuration request packet has the same function, and is reported to the controller. The direct switch receives the first configuration request packet. The first packet in packet may include: an identifier of the directly connected switch (such as an IP address, a MAC address, and the like), and a port number of the first configuration request packet. The first packet in the packet may also carry part of the information in the first configuration request packet, and the specific information carried in the packet is not limited in the embodiment of the present invention.
步骤503:控制器根据第一packet in报文向直连交换机发送第一流表项。Step 503: The controller sends the first flow entry to the direct switch according to the first packet in packet.
本发明实施例中将用于转发第一配置请求报文的流表项称为第一流表项。The flow entry for forwarding the first configuration request packet is referred to as the first flow entry in the embodiment of the present invention.
其中,本步骤中的第一流表项实际上是两个流表项,假设称为流表项A和流表项B,流表项A是用于指示直连交换机将控制器发送的报文转发至第一非直连交换机的流表项,流表项B是用于指示直连交换机将第一非直连交换机的报文转发至控制器的流表项,两个流表项的具体实现方式本发明实施例并不限制。The first flow entry in this step is actually two flow entries, which are assumed to be the flow entry A and the flow entry B. The flow entry A is used to indicate that the direct switch sends the packet to the controller. The flow entry is forwarded to the first indirect switch, and the flow entry B is used to indicate that the direct switch forwards the packet of the first indirect switch to the controller. Implementations The embodiments of the present invention are not limited.
流表项一般包括匹配域和动作指令集,当报文与流表项中的匹配域匹配时,直连交换机将执行流表项的动作指令集中的动作。举例来说:A flow entry generally includes a matching field and an action instruction set. When a packet matches a matching field in a flow entry, the direct switch performs an action in the action instruction set of the flow entry. for example:
本发明实施例中流表项A的匹配域中可以包括:源设备的IP地址和目的设备的MAC地址,则流表项A中源设备的IP地址为控制器的IP地址,目的设备的MAC地址为第一非直连交换机的MAC地址;流表项B的匹配域中可以包括:源设备的MAC地址,则流表项 B中源设备的MAC地址为第一非直连交换机的MAC地址;另外,流表项A的动作指令集中可以包括:将报文转发至第一非直连交换机的动作,流表项B的动作指令集中可以包括:将报文转发至控制器的动作;In the embodiment of the present invention, the matching field of the flow entry A may include: the IP address of the source device and the MAC address of the destination device, and the IP address of the source device in the flow entry A is the IP address of the controller, and the MAC address of the destination device. The MAC address of the first indirect switch; the matching field of the flow entry B can include: the MAC address of the source device, and the flow entry The MAC address of the source device in the B is the MAC address of the first indirectly connected switch. In addition, the action command set of the flow entry A may include: forwarding the packet to the first indirect switch, and the flow entry B The action instruction set may include: an action of forwarding the message to the controller;
相应的,只要报文中包括流表项匹配域中的字段,且字段内容匹配,直连交换机就可以完成报文的转发。Correspondingly, as long as the packet includes a field in the matching field of the flow entry, and the content of the field matches, the directly connected switch can complete the forwarding of the packet.
步骤504:直连交换机保存第一流表项,按照第一流表项将第一配置请求报文发送给控制器。Step 504: The direct connection switch saves the first flow entry, and sends the first configuration request packet to the controller according to the first flow entry.
沿用上述举例,直连交换机将按照流表项B转发第一配置请求报文。Using the above example, the direct switch will forward the first configuration request packet according to the flow entry B.
步骤505:控制器根据第一非直连交换机的设备信息确定第一非直连交换机的配置信息,向直连交换机发送第一配置回复报文,第一配置回复报文包括第一非直连交换机的配置信息。Step 505: The controller determines the configuration information of the first indirect switch according to the device information of the first indirect switch, and sends a first configuration reply message to the direct switch, where the first configuration reply message includes the first indirect connection. Configuration information of the switch.
步骤506:直连交换机按照第一流表项将第一配置回复报文发送给第一非直连交换机。Step 506: The direct connection switch sends the first configuration reply message to the first non-directly connected switch according to the first flow entry.
沿用上述举例,直连交换机将按照流表项A转发第一配置回复报文。According to the above example, the direct switch will forward the first configuration reply packet according to the flow entry A.
步骤507:第一非直连交换机根据第一配置回复报文中的配置信息进行设备配置。Step 507: The first indirect connection switch performs device configuration according to the configuration information in the first configuration reply message.
步骤508:第一非直连交换机向直连交换机发送OF连接请求。Step 508: The first indirect connection switch sends an OF connection request to the direct connection switch.
步骤509:直连交换机确定直连交换机中是否存在OF连接请求的流表项,如果存在,执行步骤510,如果不存在,执行步骤511。Step 509: The direct switch determines whether the flow entry of the OF connection request exists in the directly connected switch. If yes, go to step 510. If not, go to step 511.
其中,步骤504中直连交换机已经保存了关于第一非直连交换机的第一流表项,如果OF连接请求可以与流表项B的匹配域匹配,那么直连交换机确定存在OF连接请求的流表项,否则确定不存在OF连接请求的流表项。The directly connected switch has saved the first flow entry of the first indirect switch in step 504. If the OF connection request can match the matching field of the flow entry B, the direct switch determines that the flow of the OF connection request exists. The entry is otherwise determined to be a flow entry that does not have an OF connection request.
在实际应用中,OF连接请求中的字段与流表项B的匹配域中的字段可能不同,那么可能存在无法与流表项B匹配的情况。In an actual application, the field in the OF connection request may be different from the field in the matching field of the flow entry B, and there may be cases where the flow entry B cannot be matched.
步骤510:直连交换机依照OF连接请求的流表项将OF连接请求发送给控制器,执行步骤514;Step 510: The direct connection switch sends the OF connection request to the controller according to the flow entry of the OF connection request, step 514 is performed;
步骤511:直连交换机通过与所述控制器之间的OF连接向控制器发送基于OF连接请求的第三packet in报文;Step 511: The direct connection switch sends a third packet in message based on the OF connection request to the controller by using an OF connection with the controller.
基于OF连接请求的第三packet in报文用于向控制器上报所述直连交换机接收到所述OF连接请求。The third packet in message based on the OF connection request is used to report to the controller that the direct connection switch receives the OF connection request.
步骤512:控制器根据第三packet in报文向直连交换机发送第二流表项。Step 512: The controller sends a second flow entry to the direct switch according to the third packet in packet.
本发明实施例中,将用于转发OF连接请求的流表项称为第二流表项。 In the embodiment of the present invention, the flow entry for forwarding the OF connection request is referred to as a second flow entry.
其中,第二流表项的实现可以参考第一流表项的实现,区别在于第二流表项是用于传输OF连接请求和OF连接响应的。The implementation of the second flow entry may refer to the implementation of the first flow entry, except that the second flow entry is used to transmit the OF connection request and the OF connection response.
步骤513:直连交换机保存第二流表项,将OF连接请求按照第二流表项发送给控制器。Step 513: The direct connection switch saves the second flow entry, and sends the OF connection request to the controller according to the second flow entry.
步骤514:控制器处理OF连接请求,通过直连交换机向第一非直连交换机发送OF连接响应。Step 514: The controller processes the OF connection request, and sends an OF connection response to the first indirect switch through the direct connect switch.
其中,直连交换机可以按照第二流表项将OF连接响应发送给第一非直连交换机。The direct connection switch may send the OF connection response to the first indirect direct switch according to the second flow entry.
步骤515:第一非直连交换机接收OF连接响应,完成OF连接的建立。Step 515: The first indirect connection switch receives the OF connection response, and completes establishment of the OF connection.
本实施例中,通过直连交换机与控制器之间已经建立的OF连接,直连交换机作为中间交换机转发控制器与第一非直连交换机之间的第一配置请求报文和第一配置回复报文,从而实现了控制器对第一非直连交换机的配置,完成了第一非直连交换机的自动配置。In this embodiment, the direct connection switch is used as the first configuration request message and the first configuration reply between the intermediate switch forwarding controller and the first indirect direct switch. The packet is configured to implement the configuration of the first non-directly connected switch by the controller, and the automatic configuration of the first non-direct connected switch is completed.
其中,如果存在连接至直连交换机的用户设备,那么该用户设备也可以参考本实施例中步骤501~步骤507实现自动配置,只要将步骤中的第一非直连交换机替换为用户设备即可。If the user equipment is connected to the direct-connected switch, the user equipment can be automatically configured by referring to steps 501 to 507 in the embodiment, as long as the first non-direct-connected switch in the step is replaced with the user equipment. .
参见图6,为本发明实施例自动配置流程示意图,结合图4A,在控制器对直连交换机进行配置且建立OF连接的条件下,说明控制器对第一非直连交换机进行自动配置的另一种实现流程。该方法包括:6 is a schematic diagram of an automatic configuration process according to an embodiment of the present invention. In combination with FIG. 4A, under the condition that a controller configures a direct-connected switch and establishes an OF connection, the controller automatically configures the first non-directly connected switch. An implementation process. The method includes:
步骤601:第一非直连交换机向直连交换机发送第一配置请求报文,所述第一配置请求报文包括:第一非直连交换机的设备信息。Step 601: The first indirect connection switch sends a first configuration request message to the direct connection switch, where the first configuration request message includes: device information of the first indirect connection switch.
所述设备信息可以包括:第一非直连交换机的MAC地址、和第一非直连交换机ID等。The device information may include: a MAC address of the first indirect switch, a first indirect switch ID, and the like.
其中,所述第一配置请求报文可以是能够在没有网络地址配置的情况下传输的报文,例如基于LLDP、或者DHCP协议的报文等。The first configuration request packet may be a packet that can be transmitted without a network address configuration, such as a packet based on LLDP or a DHCP protocol.
其中,第一非直连交换机未被配置之前,可以周期性地发送第一配置请求报文。The first configuration request packet may be periodically sent before the first indirect connection switch is configured.
步骤602:直连交换机通过直连交换机与控制器之间的OF连接向控制器发送第二packet in报文。Step 602: The direct switch sends a second packet in message to the controller through the OF connection between the direct switch and the controller.
其中,第二packet in报文中包括第一配置请求报文。The second packet in packet includes the first configuration request packet.
步骤603:控制器从第二packet in报文中获取第一配置请求报文,根据第一配置请求报文中第一非直连交换机的设备信息确定第一非直连交换机的配置信息,通过与直连交换机之间的OF连接向直连交换机发送第二packet out报文,所述第二packet out报文中包括所述第一配置回复报文,第一配置回复报文包括第一非直连交换机的配置信息。 Step 603: The controller obtains the first configuration request packet from the second packet in the packet, and determines the configuration information of the first indirect switch according to the device information of the first indirect switch in the first configuration request packet. The first connection reply packet includes the first configuration reply packet, where the first configuration reply packet includes the first non-received packet, and the second packet out packet includes the first configuration reply packet, where the first configuration reply packet includes the first non- Directly connected to the switch configuration information.
步骤604:直连交换机从第二packet out报文中获取第一配置回复报文,将第一配置回复报文发送给第一非直连交换机。Step 604: The direct connection switch obtains the first configuration reply message from the second packet out message, and sends the first configuration reply message to the first non-directly connected switch.
步骤605:第一非直连交换机根据第一配置回复报文中的配置信息进行设备配置。Step 605: The first indirectly connected switch performs device configuration according to the configuration information in the first configuration reply message.
步骤606:第一非直连交换机向直连交换机发送OF连接请求。Step 606: The first indirect connection switch sends an OF connection request to the direct connection switch.
步骤607:直连交换机确定直连交换机中是否存在OF连接请求的流表项,如果存在,执行步骤608,如果不存在,执行步骤609。Step 607: The direct switch determines whether the flow entry of the OF connection request exists in the directly connected switch. If yes, step 608 is performed. If not, step 609 is performed.
如果在本步骤执行之前直连交换机中并未存储关于第一非直连交换机的流表项,本步骤的确定结果一般为不存在。If the flow entry for the first indirect switch is not stored in the direct switch before the step is performed, the determination result of this step is generally absent.
步骤608:直连交换机依照OF连接请求的流表项将OF连接请求发送给控制器,执行步骤612;Step 608: The direct connection switch sends the OF connection request to the controller according to the flow entry of the OF connection request, step 612 is performed;
步骤609:直连交换机通过与所述控制器之间的OF连接向控制器发送基于OF连接请求的第三packet in报文;Step 609: The direct connection switch sends a third packet in message based on the OF connection request to the controller by using an OF connection with the controller.
步骤610:控制器根据第三packet in报文向直连交换机发送第二流表项。Step 610: The controller sends a second flow entry to the direct switch according to the third packet in packet.
其中,第二流表项的实现可以参考步骤512中的相关描述,这里不赘述。For the implementation of the second flow entry, refer to the related description in step 512, and details are not described herein.
步骤611:直连交换机保存第二流表项,按照第二流表项将OF连接请求发送给控制器。Step 611: The direct connection switch saves the second flow entry, and sends the OF connection request to the controller according to the second flow entry.
步骤612:控制器处理OF连接请求,通过直连交换机向第一非直连交换机发送OF连接响应。Step 612: The controller processes the OF connection request, and sends an OF connection response to the first non-direct connection switch through the direct connection switch.
其中,直连交换机可以按照第二流表项将OF连接响应发送给第一非直连交换机。The direct connection switch may send the OF connection response to the first indirect direct switch according to the second flow entry.
步骤613:第一非直连交换机接收OF连接响应,完成OF连接的建立。Step 613: The first indirect connection switch receives the OF connection response, and completes establishment of the OF connection.
本实施例中,通过直连交换机与控制器之间已经建立的OF连接,直连交换机作为中间交换机转发控制器与第一非直连交换机之间的第一配置请求报文和第一配置回复报文,从而实现了控制器对第一非直连交换机的配置,完成了第一非直连交换机的自动配置。In this embodiment, the direct connection switch is used as the first configuration request message and the first configuration reply between the intermediate switch forwarding controller and the first indirect direct switch. The packet is configured to implement the configuration of the first non-directly connected switch by the controller, and the automatic configuration of the first non-direct connected switch is completed.
其中,如果存在连接至直连交换机的用户设备,例如图4A中的第一用户设备,那么该用户设备也可以参考本实施例中步骤601~步骤605实现自动配置,只要将步骤中的第一非直连交换机替换为用户设备即可。If there is a user equipment connected to the direct-connected switch, for example, the first user equipment in FIG. 4A, the user equipment may also implement automatic configuration by referring to steps 601 to 605 in this embodiment, as long as the first step in the step. Replace the indirect switch with a user device.
参见图7,为本发明实施例自动配置流程示意图,结合图4A,在控制器对直连交换机、第一非直连交换机已经进行配置且建立OF连接的条件下,说明控制器对第二非直连交换机进行自动配置的一种实现流程。该方法包括: 7 is a schematic diagram of an automatic configuration process according to an embodiment of the present invention. In combination with FIG. 4A, under the condition that the controller has configured the direct connection switch and the first non-direct connection switch and established an OF connection, the controller indicates the second non- An implementation process for direct configuration of a direct-connected switch. The method includes:
步骤701:第二非直连交换机向第一非直连交换机发送第一配置请求报文,所述第一配置请求报文包括:第二非直连交换机的设备信息。Step 701: The second non-directly connected switch sends a first configuration request message to the first indirectly connected switch, where the first configuration request message includes: device information of the second non-directly connected switch.
所述设备信息可以包括:第二非直连交换机的MAC地址、和第二非直连交换机ID等。The device information may include: a MAC address of the second indirect switch, a second indirect switch ID, and the like.
其中,所述第一配置请求报文可以是能够在没有网络地址配置的情况下传输的报文,例如基于LLDP、或者DHCP协议的报文等。The first configuration request packet may be a packet that can be transmitted without a network address configuration, such as a packet based on LLDP or a DHCP protocol.
其中,第二非直连交换机未被配置之前,可以周期性地发送第一配置请求报文。The first configuration request packet may be sent periodically before the second indirectly connected switch is not configured.
步骤702:第一非直连交换机通过第一非直连交换机与控制器之间的OF连接向控制器发送基于第一配置请求报文的第一packet in报文。Step 702: The first non-directly connected switch sends a first packet in message based on the first configuration request message to the controller by using the OF connection between the first indirectly connected switch and the controller.
其中,由于第一非直连交换机与控制器之间建立了OF连接,第一非直连交换机与控制器之间的中间交换机上存储有关于第一非直连交换机的流表项,从而第一非直连交换机发送给控制器的报文可以由中间交换机按照流表项进行转发,最终传输到控制器,相应的,控制器发送给第一非直连交换机的报文可以由中间交换机按照流表项进行转发,最终传输到第一非直连交换机,本发明实施例中将上述报文传输过程称为:通过第一非直连交换机与控制器之间的OF连接发送。The flow relationship between the first indirect switch and the controller is stored on the intermediate switch between the first indirect switch and the controller, and the flow entry of the first indirect switch is stored. A packet sent by the non-directly connected switch to the controller may be forwarded by the intermediate switch according to the flow entry, and finally transmitted to the controller. Correspondingly, the packet sent by the controller to the first indirect switch may be followed by the intermediate switch. The flow entry is forwarded and finally transmitted to the first indirect switch. In the embodiment of the present invention, the packet transmission process is referred to as: sending by using the OF connection between the first indirect switch and the controller.
其中,所述中间交换机是所述控制器与所述第非直连交换机之间的OF连接上的交换机,在本实施例中,中间交换机为直连交换机。The intermediate switch is a switch on the OF connection between the controller and the indirect direct switch. In this embodiment, the intermediate switch is a direct switch.
步骤703:控制器根据所述第一packet in报文向中间交换机以及第一非直连交换机分别下发第一流表项。Step 703: The controller sends the first flow entry to the intermediate switch and the first indirect switch according to the first packet in packet.
其中,本步骤中控制器发送给中间交换机的第一流表项是两个流表项,发送给第一非直连交换机的流表项也是两个流表项;发送给中间交换机的两个流表项假设称为流表项A1和流表项B1,流表项A1用于指示中间交换机将控制器发送的报文转发给下一跳节点,流表项B1用于指示中间交换机将第二非直连交换机发送的报文转发给上一跳节点;发送给第一非直连交换机的两个流表项假设称为流表项A2和流表项B2,流表项A2用于指示第一非直连交换机将控制器发送的报文转发给第二非直连交换机,流表项B2用于指示第一非直连交换机将第二非直连交换机发送的报文转发给上一跳节点;其中,所述上一跳和下一跳是基于将控制器、中间交换机、第一非直连交换机等按照控制器向第一非直连交换机发送报文的方向排序。沿用上述举例,控制器与第一非直连交换机之间存在的中间交换机为直连交换机,那么直连交换机的下一跳节点是第一非直连交换机,直连交换机的上一跳节点是控制器。本实施例中,流表项A1是用于指示直连交换机将控制器发送的报文转发至第一非直连交换机的流表项,流表项B1是用于指示直连交换机将第一非直连交换机的报文转发至控制器的流表项,流表项A2用于指示第一非直连交换机将控制器发送的报文转发给第二非直连交换机,流表项B2用于指示第一非直连交换机将第二非直连交换机发送的报文转发给直连交换机, 流表项的具体实现方式本发明实施例并不限制。The first flow entry sent by the controller to the intermediate switch in the step is two flow entries, and the flow entry sent to the first indirect switch is also two flow entries; two flows sent to the intermediate switch The entry is assumed to be the flow entry A1 and the flow entry B1. The flow entry A1 is used to instruct the intermediate switch to forward the packet sent by the controller to the next hop node, and the flow entry B1 is used to indicate that the intermediate switch will be the second. The packet sent by the indirectly connected switch is forwarded to the previous hop node; the two flow entries sent to the first indirect switch are assumed to be the flow entry A2 and the flow entry B2, and the flow entry A2 is used to indicate the first An indirectly connected switch forwards the packet sent by the controller to the second indirect switch, and the flow entry B2 is used to instruct the first indirect switch to forward the packet sent by the second indirect switch to the previous hop. a node; wherein the last hop and the next hop are based on sorting a controller, an intermediate switch, a first indirect switch, and the like according to a direction in which the controller sends a message to the first indirect switch. According to the above example, the intermediate switch existing between the controller and the first indirect switch is a direct switch, and the next hop node of the direct switch is the first non-direct switch, and the last hop node of the direct switch is Controller. In this embodiment, the flow entry A1 is used to indicate that the directly connected switch forwards the packet sent by the controller to the first indirect switch, and the flow entry B1 is used to indicate that the direct switch is the first. The packet of the indirect switch is forwarded to the flow entry of the controller. The flow entry A2 is used to instruct the first indirect switch to forward the packet sent by the controller to the second indirect switch. The flow entry B2 is used. Instructing the first indirect direct switch to forward the packet sent by the second indirect switch to the direct switch. The specific implementation manner of the flow entry is not limited in the embodiment of the present invention.
步骤704:中间交换机和第一非直连交换机保存第一流表项,第一非直连交换机和中间交换机按照第一流表项将第一配置请求报文发送给控制器。Step 704: The intermediate switch and the first indirect switch save the first flow entry, and the first indirect switch and the intermediate switch send the first configuration request message to the controller according to the first flow entry.
步骤705:控制器根据第二非直连交换机的设备信息确定第二非直连交换机的配置信息,通过中间交换机和第一非直连交换机将第一配置回复报文发送给第二非直连交换机。Step 705: The controller determines configuration information of the second indirect switch according to the device information of the second indirect switch, and sends the first configuration reply packet to the second indirect connection by using the intermediate switch and the first indirect switch. switch.
其中,中间交换机和第一非直连交换机按照第一流表项转发第一配置回复报文到第二非直连交换机。The intermediate switch and the first indirect switch forward the first configuration reply message to the second indirect switch according to the first flow entry.
步骤706:第二非直连交换机根据第一配置回复报文中的配置信息进行设备配置。Step 706: The second indirect switch performs device configuration according to the configuration information in the first configuration reply message.
步骤707:第二非直连交换机向第一非直连交换机发送OF连接请求。Step 707: The second indirect switch sends an OF connection request to the first indirect switch.
步骤708:第一非直连交换机确定第一非直连交换机中是否存在OF连接请求的流表项,如果存在,执行步骤709,如果不存在,执行步骤710;Step 708: The first indirectly connected switch determines whether there is a flow entry of the OF connection request in the first indirect switch, if yes, step 709 is performed, if not, step 710 is performed;
其中,步骤704中的第一流表项可以是能够传输OF连接请求的流表项,也可以不是能够传输OF连接请求的流表项,其取决于第一流表项的具体实现。The first flow entry in step 704 may be a flow entry that can transmit an OF connection request, or may not be a flow entry that can transmit an OF connection request, which depends on a specific implementation of the first flow entry.
步骤709:第一非直连交换机按照所述流表项转发OF连接请求至下一跳交换机、直到交换机将OF连接请求发送给控制器,执行步骤713;Step 709: The first indirectly connected switch forwards the OF connection request to the next hop switch according to the flow entry, until the switch sends the OF connection request to the controller, step 713 is performed;
其中,在步骤704中中间交换机和第一非直连交换机已经保存了第一流表项,如果第一流表项的传输精度允许,例如第一流表项中的匹配域为第二非直连交换机的IP地址,而OF连接请求中携带第二非直连交换机的IP地址,那么中间交换机和第一非直连交换机就可以按照第一流表项进行OF连接请求的转发,将OF连接请求最终发送至控制器。In the step 704, the intermediate switch and the first indirect switch have saved the first flow entry. If the transmission precision of the first flow entry is allowed, for example, the matching field in the first flow entry is the second non-directly connected switch. The IP address, and the OF connection request carries the IP address of the second indirect switch, and the intermediate switch and the first indirect switch can forward the OF connection request according to the first flow entry, and finally send the OF connection request to the Controller.
步骤710:第一非直连交换机通过与所述控制器之间的OF连接向控制器发送基于OF连接请求的第三packet in报文;Step 710: The first indirect connection switch sends a third packet in message based on the OF connection request to the controller by using an OF connection with the controller.
步骤711:控制器根据第三packet in报文向中间交换机和第一非直连交换机发送第二流表项;Step 711: The controller sends a second flow entry to the intermediate switch and the first indirect switch according to the third packet in packet.
其中,第二流表项的实现可以参考步骤703中关于第一流表项的实现,这里不赘述。For the implementation of the second flow entry, refer to the implementation of the first flow entry in step 703, and details are not described herein.
步骤712:中间交换机和第一非直连交换机保存第二流表项,第一非直连交换机和中间交换机按照第二流表项将OF连接请求发送给控制器。Step 712: The intermediate switch and the first indirect switch save the second flow entry, and the first indirect switch and the intermediate switch send the OF connection request to the controller according to the second flow entry.
步骤713:控制器处理OF连接请求,通过中间交换机和第一非直连交换机向第二非直连交换机发送OF连接响应。Step 713: The controller processes the OF connection request, and sends an OF connection response to the second indirect switch through the intermediate switch and the first indirect switch.
其中,中间交换机和第一非直连交换机可以按照第二流表项转发OF连接响应,最终将OF连接响应发送至第二非直连交换机。 The intermediate switch and the first indirect direct switch can forward the OF connection response according to the second flow entry, and finally send the OF connection response to the second indirect switch.
步骤714:第二非直连交换机接收OF连接响应,完成OF连接的建立。Step 714: The second indirect switch receives the OF connection response and completes establishment of the OF connection.
本实施例中,通过第一非直连交换机与控制器之间已经建立的OF连接,第一非直连交换机和直连交换机作为中间交换机转发控制器与第二非直连交换机之间的第一配置请求报文和第一配置回复报文,从而实现了控制器对第二非直连交换机的配置,完成了第二非直连交换机的自动配置。In this embodiment, the first non-direct connection switch and the direct connection switch are used as the first between the intermediate switch forwarding controller and the second non-direct connection switch through the OF connection established between the first indirect connection switch and the controller. A configuration request message and a first configuration reply message are implemented, so that the controller configures the second non-directly connected switch, and completes automatic configuration of the second non-direct connected switch.
其中,如果存在连接至第一非直连交换机的用户设备,例如图4A中的第二用户设备,那么该用户设备也可以参考本实施例中步骤701~步骤706实现自动配置,只要将步骤中的第二非直连交换机替换为用户设备即可。If there is a user equipment connected to the first indirect switch, for example, the second user equipment in FIG. 4A, the user equipment may also implement automatic configuration according to steps 701 to 706 in this embodiment, as long as the step is The second non-direct connected switch can be replaced with a user equipment.
参见图8,为本发明实施例自动配置流程示意图,结合图4A,在控制器对直连交换机、第一非直连交换机已经进行配置且建立OF连接的条件下,说明控制器对第二非直连交换机进行自动配置的另一种实现流程。该方法包括:FIG. 8 is a schematic diagram of an automatic configuration process according to an embodiment of the present invention. In combination with FIG. 4A, under the condition that the controller has configured the direct connection switch and the first indirect connection switch and establishes an OF connection, the controller indicates that the controller is the second non- Another implementation process for direct configuration of a direct-connected switch. The method includes:
步骤801:第二非直连交换机向第一非直连交换机发送第一配置请求报文,所述第一配置请求报文包括:第二非直连交换机的设备信息。Step 801: The second non-directly connected switch sends a first configuration request message to the first indirectly connected switch, where the first configuration request message includes: device information of the second non-directly connected switch.
所述设备信息可以包括:第二非直连交换机的MAC地址、和第二非直连交换机ID等。The device information may include: a MAC address of the second indirect switch, a second indirect switch ID, and the like.
其中,所述第一配置请求报文可以是能够在没有网络地址配置的情况下传输的报文,例如基于LLDP、或者DHCP协议的报文等。The first configuration request packet may be a packet that can be transmitted without a network address configuration, such as a packet based on LLDP or a DHCP protocol.
其中,第二非直连交换机未被配置之前,可以周期性地发送第一配置请求报文。The first configuration request packet may be sent periodically before the second indirectly connected switch is not configured.
步骤802:第一非直连交换机通过第一非直连交换机与控制器之间的OF连接向控制器发送第二packet in报文。Step 802: The first indirect switch sends a second packet in message to the controller by using an OF connection between the first indirect switch and the controller.
其中,第二packet in报文中包括第一配置请求报文。The second packet in packet includes the first configuration request packet.
其中,由于第一非直连交换机与控制器之间建立了OF连接,第一非直连交换机与控制器之间的中间交换机上就存储有关于第一非直连交换机的流表项,从而第一非直连交换机发送给控制器的报文可以由中间交换机按照流表项进行转发,最终传输到控制器,相应的,控制器发送给第一非直连交换机的报文可以由中间交换机按照流表项进行转发,最终传输到第一非直连交换机,本发明实施例中将上述报文传输过程称为:通过第一非直连交换机与控制器之间的OF连接发送。The flow relationship between the first indirect switch and the controller is stored on the intermediate switch between the first indirect switch and the controller, so that the flow entry of the first indirect switch is stored. The packet sent by the first indirect switch to the controller may be forwarded by the intermediate switch according to the flow entry, and finally transmitted to the controller. Correspondingly, the packet sent by the controller to the first indirect switch may be used by the intermediate switch. The packet is forwarded according to the flow entry, and finally transmitted to the first indirect switch. In the embodiment of the present invention, the packet transmission process is referred to as: sending by using the OF connection between the first indirect switch and the controller.
其中,所述中间交换机是所述控制器与所述第非直连交换机之间的OF连接上的交换机,在本实施例中,中间交换机为直连交换机。The intermediate switch is a switch on the OF connection between the controller and the indirect direct switch. In this embodiment, the intermediate switch is a direct switch.
步骤803:控制器从第二packet in报文中获取第一配置请求报文,根据第一配置请求报 文中第一非直连交换机的设备信息确定第一非直连交换机的配置信息,通过与第一非直连交换机之间的OF连接向第一非直连交换机发送第二packet out报文,所述第二packet out报文中包括所述第一配置回复报文,第一配置回复报文包括第一非直连交换机的配置信息。Step 803: The controller acquires the first configuration request packet from the second packet in packet, and reports according to the first configuration request. The device information of the first indirectly connected switch determines the configuration information of the first indirect switch, and sends the second packet out packet to the first indirect switch through the OF connection with the first indirect switch. The second packet out message includes the first configuration reply message, where the first configuration reply message includes configuration information of the first indirect direct switch.
步骤804:第一非直连交换机从第二packet out报文中获取第一配置回复报文,将第一配置回复报文发送给第二非直连交换机。Step 804: The first indirect connection switch obtains the first configuration reply message from the second packet out packet, and sends the first configuration reply message to the second non-directly connected switch.
步骤805:第二非直连交换机根据第一配置回复报文中的配置信息进行设备配置。Step 805: The second indirect switch performs device configuration according to the configuration information in the first configuration reply message.
步骤806:第二非直连交换机向第一非直连交换机发送OF连接请求。Step 806: The second indirect connection switch sends an OF connection request to the first indirect direct switch.
步骤807:第一非直连交换机确定第一非直连交换机中是否存在OF连接请求的流表项,如果存在,执行步骤808,如果不存在,执行步骤809;Step 807: The first indirectly connected switch determines whether there is a flow entry of the OF connection request in the first indirect switch, if yes, step 808 is performed, if not, step 809 is performed;
步骤808:第一非直连交换机按照所述流表项转发OF连接请求至下一跳交换机、直到交换机将OF连接请求发送给控制器,执行步骤812;Step 808: The first indirectly connected switch forwards the OF connection request to the next hop switch according to the flow entry, until the switch sends the OF connection request to the controller, and step 812 is performed;
步骤809:第一非直连交换机通过与所述控制器之间的OF连接向控制器发送基于OF连接请求的第三packet in报文;Step 809: The first indirect connection switch sends a third packet in message based on the OF connection request to the controller by using an OF connection with the controller.
步骤810:控制器根据第三packet in报文向中间交换机和第一非直连交换机发送第二流表项。Step 810: The controller sends the second flow entry to the intermediate switch and the first indirect switch according to the third packet in packet.
中间交换机是控制器和第一非直连交换机的OF连接上的交换机,本实施例中,中间交换机为直连交换机。The intermediate switch is a switch on the OF connection of the controller and the first indirect switch. In this embodiment, the intermediate switch is a direct switch.
步骤811:中间交换机和第一非直连交换机保存第二流表项,第一非直连交换机和中间交换机按照第二流表项将OF连接请求发送给控制器。Step 811: The intermediate switch and the first indirect switch save the second flow entry, and the first indirect switch and the intermediate switch send the OF connection request to the controller according to the second flow entry.
步骤812:控制器处理OF连接请求,通过中间交换机和第一非直连交换机向第二非直连交换机发送OF连接响应。Step 812: The controller processes the OF connection request, and sends an OF connection response to the second indirect switch through the intermediate switch and the first indirect switch.
其中,中间交换机和第一非直连交换机可以按照第二流表项转发OF连接响应,最终将OF连接响应发送至第二非直连交换机。The intermediate switch and the first indirect direct switch can forward the OF connection response according to the second flow entry, and finally send the OF connection response to the second indirect switch.
步骤813:第二非直连交换机接收OF连接响应,完成OF连接的建立。Step 813: The second indirect switch receives the OF connection response and completes establishment of the OF connection.
本实施例中,通过第一非直连交换机与控制器之间已经建立的OF连接,第一非直连交换机和直连交换机作为中间交换机转发控制器与第二非直连交换机之间的第一配置请求报文和第一配置回复报文,从而实现了控制器对第二非直连交换机的配置,完成了第二非直连交换机的自动配置。In this embodiment, the first non-direct connection switch and the direct connection switch are used as the first between the intermediate switch forwarding controller and the second non-direct connection switch through the OF connection established between the first indirect connection switch and the controller. A configuration request message and a first configuration reply message are implemented, so that the controller configures the second non-directly connected switch, and completes automatic configuration of the second non-direct connected switch.
其中,如果存在连接至第一非直连交换机的用户设备,例如图4A中的第二用户设备,那么该用户设备也可以参考本实施例中步骤801~步骤705实现自动配置,只要将步骤中的 第二非直连交换机替换为用户设备即可。If there is a user equipment connected to the first indirect switch, for example, the second user equipment in FIG. 4A, the user equipment may also perform automatic configuration by referring to steps 801 to 705 in this embodiment, as long as the steps are of The second non-direct connected switch can be replaced with a user equipment.
以上图4B说明了控制器对直连交换机进行自动配置的过程,图5和图6说明了控制器通过直连交换机对第一非直连交换机进行自动配置的过程,图7和图8说明了控制器通过第一非直连交换机对第二非直连交换机进行自动配置的过程,如此类推,控制器可以按照先配置直连交换机、再配置与直连交换机连接的第一非直连交换机、再配置与第一非直连交换机连接的第二非直连交换机这种方式逐层完成网络中所有交换机的配置。只要需要被配置的交换机连接某一已经配置完成且与控制器建立了OF连接的交换机,那么该需要被配置的交换机都可以参考图5~图8所示的流程实现自动配置。同理,在交换机被配置后,与交换机连接的用户设备也可以参考图5~图8所示的流程实现自动配置,区别仅在于用户设备与控制器之间只需执行至用户设备完成配置,用户设备与控制器之间无需建立OF连接。Figure 4B above illustrates the process of the controller automatically configuring the direct-connected switch. Figure 5 and Figure 6 illustrate the process of the controller automatically configuring the first indirect-connected switch through the direct-connected switch. Figure 7 and Figure 8 illustrate The controller automatically configures the second indirect switch through the first indirect switch, and so on, the controller may configure the direct switch, and then configure the first indirect switch connected to the direct switch. Then, the second indirect direct switch connected to the first indirect switch is configured to complete the configuration of all the switches in the network layer by layer. As long as the switch to be configured is connected to a switch that has been configured and has an OF connection with the controller, the switch that needs to be configured can be automatically configured by referring to the processes shown in FIG. 5 to FIG. 8. In the same way, after the switch is configured, the user equipment connected to the switch can also be automatically configured by referring to the processes shown in FIG. 5 to FIG. 8. The only difference is that the user equipment and the controller only need to perform configuration to the user equipment. There is no need to establish an OF connection between the user equipment and the controller.
以下通过图9A和图9B对本发明实施例控制器逐层进行交换机和用户设备配置的过程进行说明。The process of configuring the switch and the user equipment layer by layer according to the embodiment of the present invention will be described below with reference to FIG. 9A and FIG. 9B.
参见图9A的网络架构,包括:控制器、与控制器连接的直连交换机、与直连交换机连接的非直连交换机、与非直连交换机连接的用户设备。Referring to the network architecture of FIG. 9A, the system includes: a controller, a direct-connect switch connected to the controller, a non-direct-connect switch connected to the direct-connect switch, and a user equipment connected to the non-direct-connect switch.
结合图9A,图9B为本发明实施例自动配置方法另一流程示意图,说明控制器逐层配置直连交换机、非直连交换机、用户设备的过程。该方法包括:9A, FIG. 9B is another schematic flowchart of an automatic configuration method according to an embodiment of the present invention, illustrating a process in which a controller configures a direct-connected switch, a non-directly connected switch, and a user equipment layer by layer. The method includes:
步骤901:控制器接收直连交换机发送的第一配置请求报文,所述第一配置请求报文包括:直连交换机的设备信息;Step 901: The controller receives the first configuration request message sent by the direct switch, where the first configuration request message includes: device information of the directly connected switch;
步骤902:所述控制器根据所述直连交换机的设备信息确定所述直连交换机的配置信息,向所述直连交换机发送第一配置回复报文,所述第一配置回复报文包括所述直连交换机的配置信息,以便所述直连交换机根据所述配置信息进行设备配置;Step 902: The controller determines, according to the device information of the direct-connected switch, configuration information of the direct-connected switch, and sends a first configuration reply packet to the direct-connecting switch, where the first configuration reply packet includes The configuration information of the directly connected switch is configured, so that the direct connection switch performs device configuration according to the configuration information;
步骤903:所述控制器与所述直连交换机建立第一OF连接;Step 903: The controller establishes a first OF connection with the direct connection switch.
步骤904:所述控制器接收所述直连交换机通过所述第一OF连接发送的、非直连交换机的第一配置请求报文,所述第一配置请求报文包括:非直连交换机的设备信息;所述非直连交换机的第一配置请求报文由所述非直连交换机发送至所述直连交换机;Step 904: The controller receives a first configuration request packet of the indirect switch that is sent by the direct switch through the first OF connection, where the first configuration request packet includes: a non-directly connected switch Device information; the first configuration request message of the indirect switch is sent by the indirect switch to the direct switch;
步骤905:所述控制器根据所述非直连交换机的设备信息确定所述非直连交换机的配置信息,通过所述第一OF连接向所述直连交换机发送所述非直连交换机的第一配置回复报文,所述非直连交换机的第一配置回复报文包括所述非直连交换机的配置信息,以便所述直连交换机将所述非直连交换机的第一配置回复报文发送至所述非直连交换机、所述非直连交换机根据所述非直连交换机的配置信息进行设备配置; Step 905: The controller determines, according to the device information of the indirectly connected switch, configuration information of the indirectly connected switch, and sends, by using the first OF connection, the non-directly connected switch to the direct switch. a configuration reply message, where the first configuration reply message of the indirect switch includes configuration information of the indirect switch, so that the direct switch may reply the first configuration of the indirect switch Sending to the indirect switch, the indirect switch performs device configuration according to the configuration information of the indirectly connected switch;
步骤906:所述控制器与所述非直连交换机建立第二OF连接;Step 906: The controller establishes a second OF connection with the non-directly connected switch.
步骤907:所述控制器接收所述非直连交换机通过所述第二OF连接发送的、用户设备的第一配置请求报文,所述第一配置请求报文包括:用户设备的设备信息;所述用户设备的第一配置请求报文由所述用户设备发送至所述非直连交换机;Step 907: The controller receives a first configuration request message of the user equipment that is sent by the non-directly connected switch through the second OF connection, where the first configuration request message includes: device information of the user equipment; The first configuration request message of the user equipment is sent by the user equipment to the indirectly connected switch;
步骤908:所述控制器根据所述用户设备的设备信息确定所述用户设备的配置信息,通过所述第二OF连接向所述非直连交换机发送所述用户设备的第一配置回复报文,所述用户设备的第一配置回复报文包括所述用户设备的配置信息,以便所述费直连交换机将所述用户设备的第一配置回复报文发送至所述用户设备、所述用户设备根据所述用户设备的配置信息进行设备配置。Step 908: The controller determines, according to the device information of the user equipment, configuration information of the user equipment, and sends, by using the second OF connection, the first configuration response packet of the user equipment to the indirectly connected switch. The first configuration reply message of the user equipment includes the configuration information of the user equipment, so that the fee direct connection switch sends the first configuration reply message of the user equipment to the user equipment, the user The device performs device configuration according to the configuration information of the user equipment.
本实施例中,控制器先配置直连交换机,通过直连交换机配置非直连交换机,通过直连交换机和非直连交换机配置用户设备,从而实现了对于直连交换机、非直连交换机以及用户设备的逐层配置。In this embodiment, the controller first configures the direct-connected switch, configures the indirect-connected switch through the direct-connected switch, and configures the user equipment through the direct-connected switch and the non-directly connected switch, thereby implementing the direct-connected switch, the non-direct-connected switch, and the user. Layer-by-layer configuration of the device.
与上述方法相对应的,本发明实施例提供一种控制器,参见图10,控制器1000包括:Corresponding to the above method, an embodiment of the present invention provides a controller. Referring to FIG. 10, the controller 1000 includes:
接收单元1010,用于接收第一交换机通过所述第一交换机与所述控制器之间的OF连接转发的第一设备的第一配置请求报文,所述第一配置请求报文包括:第一设备的设备信息;所述第一交换机位于所述控制器与所述第一设备之间,所述第一配置请求报文由所述第一设备发送给所述第一交换机;The receiving unit 1010 is configured to receive a first configuration request message of the first device that is forwarded by the first switch by using the OF connection between the first switch and the controller, where the first configuration request message includes: Device information of a device; the first switch is located between the controller and the first device, and the first configuration request message is sent by the first device to the first switch;
确定单元1020,用于根据所述接收单元1010接收到的所述第一设备的设备信息确定所述第一设备的配置信息;a determining unit 1020, configured to determine configuration information of the first device according to the device information of the first device received by the receiving unit 1010;
发送单元1030,用于通过所述控制器与所述第一交换机之间的OF连接向所述第一交换机发送第一配置回复报文,所述第一配置回复报文包括所述确定单元1020确定的所述第一设备的配置信息,以便所述第一交换机将所述第一配置回复报文转发给所述第一设备、所述第一设备根据所述配置信息进行设备配置。The sending unit 1030 is configured to send, by using the OF connection between the controller and the first switch, a first configuration reply message to the first switch, where the first configuration reply message includes the determining unit 1020. Determining the configuration information of the first device, so that the first switch forwards the first configuration reply message to the first device, and the first device performs device configuration according to the configuration information.
可选地,所述第一交换机是直连交换机,所述接收单元具体用于:Optionally, the first switch is a direct switch, and the receiving unit is specifically configured to:
接收所述第一交换机通过所述OF连接发送的、基于所述第一配置请求报文的第一packet in报文;Receiving, by the first switch, the first packet in packet sent by the OF connection, based on the first configuration request message;
根据所述第一packet in报文向所述第一交换机下发第一流表项,所述第一流表项用于转发所述第一配置请求报文;And sending, by the first packet in the first packet, the first flow entry, where the first flow entry is used to forward the first configuration request packet;
接收所述第一交换机按照所述第一流表项发送的所述第一配置请求报文。 Receiving, by the first switch, the first configuration request message sent according to the first flow entry.
可选地,所述第一交换机为非直连交换机,所述接收单元具体用于:Optionally, the first switch is a non-directly connected switch, and the receiving unit is specifically configured to:
接收所述第一交换机通过所述OF连接发送的、基于所述第一配置请求报文的第一packet in报文;Receiving, by the first switch, the first packet in packet sent by the OF connection, based on the first configuration request message;
根据所述第一packet in报文向中间交换机以及所述第一交换机分别下发第一流表项;所述中间交换机是所述控制器与所述第一交换机之间的OF连接上的交换机;所述第一流表项用于转发所述第一配置请求报文;Transmitting, by the first packet in the first packet, the first flow entry to the intermediate switch and the first switch; the intermediate switch is a switch on the OF connection between the controller and the first switch; The first flow entry is used to forward the first configuration request message;
接收所述第一交换机通过所述中间交换机发送的所述第一配置请求报文;所述中间交换机按照所述第一流表项转发所述第一配置请求报文;Receiving, by the first switch, the first configuration request packet sent by the intermediate switch; the intermediate switch forwarding the first configuration request packet according to the first flow entry;
所述发送单元具体用于:The sending unit is specifically configured to:
通过所述中间交换机将所述第一配置回复报文发送给所述第一交换机,所述中间交换机按照所述第一流表项转发所述第一配置回复报文。And sending, by the intermediate switch, the first configuration reply message to the first switch, where the intermediate switch forwards the first configuration reply message according to the first flow entry.
可选地,所述接收单元具体用于:Optionally, the receiving unit is specifically configured to:
接收所述第一交换机通过所述OF连接发送的第二packet in报文,所述第二packte in报文中包括所述第一配置请求报文;Receiving, by the first switch, a second packet in packet that is sent by using the OF connection, where the second packet in packet includes the first configuration request packet;
所述发送单元具体用于:The sending unit is specifically configured to:
通过所述OF连接向所述第一交换机发送第二packet out报文,所述第二packet out报文中包括所述第一配置回复报文。Sending, by the OF connection, the second packet out packet to the first switch, where the second packet out packet includes the first configuration reply packet.
可选地,所述第一设备为非直连交换机,还包括:Optionally, the first device is a non-directly connected switch, and further includes:
连接建立单元,用于与所述第一设备建立OF连接。a connection establishing unit, configured to establish an OF connection with the first device.
可选地,所述第一设备为非直连交换机,所述第一交换机为直连交换机,所述连接建立单元具体用于:Optionally, the first device is a direct-connecting switch, and the first switch is a direct-connecting switch, where the connection establishing unit is specifically configured to:
接收所述第一交换机通过与所述控制器之间的OF连接发送的、基于OF连接请求的第三packet in报文;所述第一交换机在接收到所述第一设备发送的OF连接请求且确定所述第一交换机中没有基于所述OF连接请求的流表项时发送所述第三packet in报文;Receiving a third packet in message sent by the first switch by using an OF connection between the first switch and the controller; the first switch receiving the OF connection request sent by the first device And sending the third packet in packet when the first switch does not have a flow entry based on the OF connection request;
根据所述第三packet in报文向所述第一交换机下发第二流表项,所述第二流表项用于转发所述OF连接请求;And sending, by the third packet in the second flow entry, the second flow entry, where the second flow entry is used to forward the OF connection request;
接收所述第一交换机发送的所述OF连接请求;Receiving the OF connection request sent by the first switch;
处理所述OF连接请求,向所述第一交换机发送OF连接响应,以便所述第一交换机将所述OF连接响应发送给所述第一设备。 Processing the OF connection request, and transmitting an OF connection response to the first switch, so that the first switch sends the OF connection response to the first device.
可选地,所述第一设备为非直连交换机,所述第一交换机为非直连交换机,所述连接建立单元具体用于:Optionally, the first device is a non-directly connected switch, and the first switch is a non-directly connected switch, where the connection establishing unit is specifically configured to:
接收所述第一交换机通过与所述控制器之间的OF连接发送的、基于所述OF连接请求的第三packet in报文;所述第一交换机在接收到所述第一设备发送的OF连接请求且确定所述第一交换机中没有基于所述OF连接请求的流表项时发送所述第三packet in报文;Receiving a third packet in message sent by the first switch by using an OF connection between the first switch and the controller; the first switch receiving the OF sent by the first device Sending the third packet in message when the connection request is determined and the flow entry that is not based on the OF connection request is determined in the first switch;
根据所述第三packet in报文向所述中间交换机以及所述第一交换机分别下发第二流表项,所述第二流表项用于转发所述OF连接请求;And sending, by the third packet in the second flow entry, the second flow entry to the intermediate switch and the first switch, where the second flow entry is used to forward the OF connection request;
接收所述第一交换机通过所述中间交换机发送的所述OF连接请求;所述中间交换机通过所述第二流表项转发所述OF连接请求;Receiving, by the first switch, the OF connection request sent by the intermediate switch; the intermediate switch forwarding the OF connection request by using the second flow entry;
处理所述OF连接请求,通过所述中间交换机向所述第一交换机发送OF连接响应,以便所述第一交换机将所述OF连接响应发送给所述第一设备,所述中间交换机通过所述第二流表项转发所述OF连接响应。Processing the OF connection request, and sending, by the intermediate switch, an OF connection response to the first switch, so that the first switch sends the OF connection response to the first device, and the intermediate switch passes the The second flow entry forwards the OF connection response.
本实施例中,控制器接收第一交换机通过所述第一交换机与所述控制器之间的OF连接转发的第一设备的第一配置请求报文,所述第一配置请求报文包括:第一设备的设备信息;所述第一交换机位于所述控制器与所述第一设备之间,所述第一配置请求报文由所述第一设备发送给所述第一交换机,根据所述第一设备的设备信息确定所述第一设备的配置信息,通过所述控制器与所述第一交换机之间的OF连接向所述第一交换机发送第一配置回复报文,所述第一配置回复报文包括所述第一设备的配置信息,以便所述第一交换机将所述第一配置回复报文转发给所述第一设备、所述第一设备根据所述配置信息进行设备配置,从而实现了对于第一设备的自动配置。In this embodiment, the controller receives the first configuration request message of the first device that is forwarded by the first switch by using the OF connection between the first switch and the controller, where the first configuration request message includes: Device information of the first device; the first switch is located between the controller and the first device, and the first configuration request message is sent by the first device to the first switch, according to the The device information of the first device determines configuration information of the first device, and sends a first configuration reply message to the first switch by using an OF connection between the controller and the first switch, where the The configuration reply message includes the configuration information of the first device, so that the first switch forwards the first configuration reply message to the first device, and the first device performs the device according to the configuration information. Configuration, thus enabling automatic configuration of the first device.
本发明实施例还提供一种第一设备,参见图11,该第一设备1100包括:The embodiment of the present invention further provides a first device. Referring to FIG. 11, the first device 1100 includes:
第一发送单元1110,用于向第一交换机发送第一配置请求报文,以便所述第一交换机通过所述第一交换机与所述控制器之间的OF连接发送所述第一配置请求报文至所述控制器,所述第一交换机与所述第一设备具有连接关系;The first sending unit 1110 is configured to send a first configuration request message to the first switch, so that the first switch sends the first configuration request report by using an OF connection between the first switch and the controller. To the controller, the first switch has a connection relationship with the first device;
第一接收单元1120,用于接收所述第一交换机发送的第一配置回复报文,所述第一配置回复报文由所述控制器通过所述控制器与所述第一交换机之间的OF连接发送至所述第一交换机;The first receiving unit 1120 is configured to receive a first configuration reply message sent by the first switch, where the first configuration reply message is used by the controller between the controller and the first switch. The OF connection is sent to the first switch;
配置单元1130,用于根据所述第一接收单元接收到的所述配置信息进行设备配置。The configuration unit 1130 is configured to perform device configuration according to the configuration information received by the first receiving unit.
可选地,所述第一设备为非直连交换机,还包括:Optionally, the first device is a non-directly connected switch, and further includes:
连接建立单元,用于与所述控制器建立OF连接。 A connection establishing unit is configured to establish an OF connection with the controller.
可选地,所述连接建立单元具体用于:Optionally, the connection establishing unit is specifically configured to:
向所述第一交换机发送OF连接请求,以便所述第一交换机在确定所述第一交换机中没有用于转发所述OF连接请求的流表项时向控制器发送基于所述OF连接请求的第三packet in报文、接收所述控制器下发的用于转发所述OF连接请求的第二流表项、向所述控制器发送OF连接请求、接收所述控制器发送的OF连接响应;Transmitting an OF connection request to the first switch, so that the first switch sends, according to the OF connection request, the controller, when it is determined that there is no flow entry for forwarding the OF connection request in the first switch a third packet in the message, receiving a second flow entry that is sent by the controller to forward the OF connection request, sending an OF connection request to the controller, and receiving an OF connection response sent by the controller ;
所述第一设备接收所述第一交换机发送的OF连接响应。The first device receives an OF connection response sent by the first switch.
可选地,所述第一设备为第二交换机,所述第二交换机连接第二设备,所述第一设备与所述控制器建立OF连接之后,还包括:Optionally, the first device is a second switch, and the second switch is connected to the second device. After the first device establishes an OF connection with the controller, the method further includes:
第二接收单元,用于接收所述第二设备发送的第二配置请求报文,所述第二配置请求报文包括:第二设备的设备信息;a second receiving unit, configured to receive a second configuration request message sent by the second device, where the second configuration request message includes: device information of the second device;
第二发送单元,用于通过所述第一设备与所述控制器之间的OF连接将所述第二配置请求报文发送给控制器;a second sending unit, configured to send the second configuration request message to the controller by using an OF connection between the first device and the controller;
所述第二接收单元还用于:接收所述控制器通过所述第一设备与所述控制器之间的OF连接发送的第二配置回复报文,所述第二配置回复报文包括所述第二设备的配置信息,所述第二设备的配置信息由所述控制器根据所述第二设备的设备信息确定;The second receiving unit is further configured to: receive a second configuration reply message sent by the controller by using an OF connection between the first device and the controller, where the second configuration reply message includes The configuration information of the second device, where the configuration information of the second device is determined by the controller according to the device information of the second device;
所述第二发送单元还用于:将所述第二配置回复报文发送给所述第二设备。The second sending unit is further configured to: send the second configuration reply message to the second device.
可选地,所述第一设备为直连交换机,所述第二发送单元具体用于:Optionally, the first device is a direct-connecting switch, and the second sending unit is specifically configured to:
确定所述第一设备中没有用于转发所述第二配置请求报文的流表项时,通过所述OF连接向所述控制器发送基于所述第二配置请求报文的第四packet in报文;And determining, when the first device does not have a flow entry for forwarding the second configuration request packet, sending, by the OF connection, the fourth packet in the second configuration request message to the controller by using the OF connection. Message
接收所述控制器下发的第三流表项,所述第三流表项用于转发所述第二配置请求报文;Receiving a third flow entry that is sent by the controller, where the third flow entry is used to forward the second configuration request packet;
将所述第二配置请求报文发送至所述控制器。Sending the second configuration request message to the controller.
可选地,所述第一设备为非直连交换机,所述第二发送单元具体用于:Optionally, the first device is a non-directly connected switch, and the second sending unit is specifically configured to:
向控制器发送基于所述第二配置请求报文的第四packet in报文;Sending, to the controller, a fourth packet in message based on the second configuration request message;
接收所述控制器根据所述第四packet in报文下发的第三流表项,所述第三流表项用于转发所述第二配置请求报文;Receiving, by the controller, a third flow entry that is sent according to the fourth packet in packet, where the third flow entry is used to forward the second configuration request packet;
通过中间交换机向控制器发送所述第二配置请求报文;所述中间交换机是所述控制器与所述第一设备之间的OF连接上的交换机;所述中间交换机通过所述控制器分别下发至所述中间交换机的所述第三流表项转发所述第二配置请求报文;Transmitting, by the intermediate switch, the second configuration request message to the controller; the intermediate switch is a switch on an OF connection between the controller and the first device; and the intermediate switch is respectively configured by the controller The third flow entry sent to the intermediate switch forwards the second configuration request packet;
所述第二接收单元具体用于: The second receiving unit is specifically configured to:
接收所述控制器通过所述中间交换机发送的所述第二配置回复报文,所述中间交换机通过所述第三流表项转发所述第二配置回复报文。Receiving, by the controller, the second configuration reply message sent by the intermediate switch, the intermediate switch forwarding the second configuration reply message by using the third flow entry.
可选地,所述第二发送单元具体用于:向控制器发送第五packet in报文,所述第五packet in报文中包括所述第二配置请求报文;Optionally, the second sending unit is specifically configured to: send a fifth packet in packet to the controller, where the fifth packet in packet includes the second configuration request packet;
所述第二接收单元具体用于:The second receiving unit is specifically configured to:
接收所述控制器发送的第五packet out报文,所述第五packet out报文中包括所述第二配置回复报文。Receiving a fifth packet out message sent by the controller, where the fifth packet out message includes the second configuration reply message.
可选地,所述第一设备为直连交换机,所述第二接收单元还用于:接收所述第二设备发送的OF连接请求;Optionally, the first device is a direct connection switch, and the second receiving unit is further configured to: receive an OF connection request sent by the second device;
所述第二发送单元还用于:确定所述第一设备中没有用于转发所述OF连接请求的流表项时,向所述控制器发送基于所述OF连接请求的第五packet in报文;The second sending unit is further configured to: when it is determined that there is no flow entry for forwarding the OF connection request in the first device, send a fifth packet in report based on the OF connection request to the controller Text
所述第二接收单元还用于:接收所述控制器根据所述第五packet in报文下发的第四流表项,所述第四流表项用于转发所述OF连接请求;The second receiving unit is further configured to: receive a fourth flow entry that is sent by the controller according to the fifth packet in packet, where the fourth flow entry is used to forward the OF connection request;
所述第二发送单元还用于:将所述OF连接请求发送给所述控制器;The second sending unit is further configured to: send the OF connection request to the controller;
所述第二接收单元还用于:接收所述控制器发送的OF连接响应;The second receiving unit is further configured to: receive an OF connection response sent by the controller;
所述第二发送单元还用于:将所述OF连接响应发送给所述第二设备。The second sending unit is further configured to: send the OF connection response to the second device.
可选地,所述第一设备为非直连交换机,所述第二接收单元还用于:接收所述第二设备发送的OF连接请求;Optionally, the first device is a non-directly connected switch, and the second receiving unit is further configured to: receive an OF connection request sent by the second device;
所述第二发送单元还用于:确定所述第一设备中没有用于转发所述OF连接请求的流表项时,向所述控制器发送基于所述OF连接请求的第五packet in报文;The second sending unit is further configured to: when it is determined that there is no flow entry for forwarding the OF connection request in the first device, send a fifth packet in report based on the OF connection request to the controller Text
所述第二接收单元还用于:接收所述控制器根据所述第五packet in报文下发的第四流表项,所述第四流表项用于转发所述OF连接请求;The second receiving unit is further configured to: receive a fourth flow entry that is sent by the controller according to the fifth packet in packet, where the fourth flow entry is used to forward the OF connection request;
所述第二发送单元还用于:通过中间交换机向控制器发送所述OF连接请求;所述中间交换机是所述控制器与所述第一设备之间的OF连接上的交换机;所述中间交换机通过所述控制器分别下发至所述中间交换机的所述第四流表项转发所述OF连接请求;The second sending unit is further configured to: send the OF connection request to the controller by using an intermediate switch; the intermediate switch is a switch on an OF connection between the controller and the first device; The switch forwards the OF connection request by using the fourth flow entry that is sent by the controller to the intermediate switch by the controller;
所述第二接收单元还用于:接收所述控制器通过所述中间交换机发送的OF连接响应;The second receiving unit is further configured to: receive an OF connection response sent by the controller by using the intermediate switch;
所述第二发送单元还用于:将所述OF连接响应发送给所述第二设备。The second sending unit is further configured to: send the OF connection response to the second device.
其中,第一发送单元和第二发送单元可以通过发送器实现,第一接收单元和第二接收单元可以通过接收器实现,配置单元可以通过处理器实现。 The first sending unit and the second sending unit may be implemented by a transmitter, and the first receiving unit and the second receiving unit may be implemented by a receiver, and the configuration unit may be implemented by a processor.
本实施例中,第一设备向第一交换机发送第一配置请求报文,以便所述第一交换机通过所述第一交换机与所述控制器之间的OF连接发送所述第一配置请求报文至所述控制器,所述第一交换机与所述第一设备具有连接关系,接收所述第一交换机发送的第一配置回复报文,所述第一配置回复报文由所述控制器通过所述控制器与所述第一交换机之间的OF连接发送至所述第一交换机,根据所述配置信息进行设备配置,从而实现了第一设备的自动配置。In this embodiment, the first device sends a first configuration request message to the first switch, so that the first switch sends the first configuration request report by using an OF connection between the first switch and the controller. And the first switch has a connection relationship with the first device, and receives a first configuration reply message sent by the first switch, where the first configuration reply message is used by the controller. And transmitting, by the OF connection between the controller and the first switch, to the first switch, performing device configuration according to the configuration information, thereby implementing automatic configuration of the first device.
本领域的技术人员可以清楚地了解到本发明实施例中的技术可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本发明实施例中的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本发明各个实施例或者实施例的某些部分所述的方法。It will be apparent to those skilled in the art that the techniques in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such understanding, the technical solution in the embodiments of the present invention may be embodied in the form of a software product in essence or in the form of a software product, which may be stored in a storage medium such as a ROM/RAM. , a disk, an optical disk, etc., including instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to perform the methods described in various embodiments of the present invention or portions of the embodiments.
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于***实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。The various embodiments in the specification are described in a progressive manner, and the same or similar parts between the various embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiment.
以上所述的本发明实施方式,并不构成对本发明保护范围的限定。任何在本发明的精神和原则之内所作的修改、等同替换和改进等,均应包含在本发明的保护范围之内。 The embodiments of the invention described above are not intended to limit the scope of the invention. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (33)

  1. 一种自动配置方法,其特征在于,包括:An automatic configuration method, comprising:
    控制器接收第一交换机通过所述第一交换机与所述控制器之间的OF连接转发的第一设备的第一配置请求报文,所述第一配置请求报文包括:第一设备的设备信息;所述第一交换机位于所述控制器与所述第一设备之间,所述第一配置请求报文由所述第一设备发送给所述第一交换机;The controller receives a first configuration request message of the first device that is forwarded by the first switch by using the OF connection between the first switch and the controller, where the first configuration request message includes: a device of the first device The first switch is located between the controller and the first device, and the first configuration request message is sent by the first device to the first switch;
    所述控制器根据所述第一设备的设备信息确定所述第一设备的配置信息;Determining, by the controller, configuration information of the first device according to device information of the first device;
    所述控制器通过所述控制器与所述第一交换机之间的OF连接向所述第一交换机发送第一配置回复报文,所述第一配置回复报文包括所述第一设备的配置信息,以便所述第一交换机将所述第一配置回复报文转发给所述第一设备、所述第一设备根据所述配置信息进行设备配置。The controller sends a first configuration reply message to the first switch by using an OF connection between the controller and the first switch, where the first configuration reply message includes a configuration of the first device. The information is forwarded by the first switch to the first device, and the first device performs device configuration according to the configuration information.
  2. 根据权利要求1所述的方法,其特征在于,所述第一交换机是直连交换机,所述控制器接收第一交换机通过所述第一交换机与所述控制器之间的OF连接转发的第一设备的第一配置请求报文,包括:The method according to claim 1, wherein the first switch is a direct connect switch, and the controller receives a first switch forwarded by an OF connection between the first switch and the controller. The first configuration request message of a device includes:
    所述控制器接收所述第一交换机通过所述OF连接发送的第一packet in报文,所述第一packet in报文用于向控制器上报所述第一交换机接收到所述第一配置请求报文;Receiving, by the controller, the first packet in packet sent by the first switch by using the OF connection, where the first packet in packet is used to report to the controller that the first switch receives the first configuration Request message
    所述控制器根据所述第一packet in报文向所述第一交换机下发第一流表项,所述第一流表项用于转发所述第一配置请求报文;The controller sends a first flow entry to the first switch according to the first packet in packet, where the first flow entry is used to forward the first configuration request packet;
    所述控制器接收所述第一交换机按照所述第一流表项发送的所述第一配置请求报文。The controller receives the first configuration request message sent by the first switch according to the first flow entry.
  3. 根据权利要求1所述的方法,其特征在于,所述第一交换机为非直连交换机,所述控制器接收第一交换机通过所述第一交换机与所述控制器之间的OF连接转发的第一设备的第一配置请求报文,包括:The method according to claim 1, wherein the first switch is a non-direct connection switch, and the controller receives the first switch forwarded by an OF connection between the first switch and the controller. The first configuration request message of the first device includes:
    所述控制器接收所述第一交换机通过所述OF连接发送的、基于所述第一配置请求报文的第一packet in报文;Receiving, by the controller, the first packet in packet sent by the first switch by using the OF connection, based on the first configuration request packet;
    所述控制器根据所述第一packet in报文向中间交换机以及所述第一交换机分别下发第一流表项,所述第一流表项用于转发所述第一配置请求报文;所述中间交换机是所述控制器与所述第一交换机之间的OF连接上的交换机;The controller sends a first flow entry to the intermediate switch and the first switch according to the first packet in message, where the first flow entry is used to forward the first configuration request message; The intermediate switch is a switch on the OF connection between the controller and the first switch;
    所述控制器接收所述第一交换机通过所述中间交换机发送的所述第一配置请求报文;所述中间交换机按照所述第一流表项转发所述第一配置请求报文;The controller receives the first configuration request message sent by the first switch by using the intermediate switch; the intermediate switch forwards the first configuration request message according to the first flow entry;
    所述控制器通过所述控制器与所述第一交换机之间的OF连接向所述第一交换机发送第一配置回复报文,包括:The controller sends a first configuration reply message to the first switch by using an OF connection between the controller and the first switch, including:
    所述控制器通过所述中间交换机将所述第一配置回复报文发送给所述第一交换 机,所述中间交换机按照所述第一流表项转发所述第一配置回复报文。Sending, by the intermediate switch, the first configuration reply message to the first exchange by using the intermediate switch The intermediate switch forwards the first configuration reply message according to the first flow entry.
  4. 根据权利要求1所述的方法,其特征在于,所述控制器接收第一交换机通过所述第一交换机与所述控制器之间的OF连接转发的第一设备的第一配置请求报文,包括:The method according to claim 1, wherein the controller receives a first configuration request message of the first device forwarded by the first switch by the OF connection between the first switch and the controller, include:
    所述控制器接收所述第一交换机通过所述OF连接发送的第二packet in报文,所述第二packte in报文中包括所述第一配置请求报文;The controller receives the second packet in packet sent by the first switch by using the OF connection, where the second packet in the packet includes the first configuration request packet;
    所述控制器通过所述控制器与所述第一交换机之间的OF连接向所述第一交换机发送第一配置回复报文,包括:The controller sends a first configuration reply message to the first switch by using an OF connection between the controller and the first switch, including:
    所述控制器通过所述OF连接向所述第一交换机发送第二packet out报文,所述第二packet out报文中包括所述第一配置回复报文。The controller sends a second packet out message to the first switch by using the OF connection, where the second packet out message includes the first configuration reply message.
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述第一设备为非直连交换机,还包括:The method according to any one of claims 1 to 4, wherein the first device is a non-directly connected switch, and further includes:
    所述控制器与所述第一设备建立OF连接。The controller establishes an OF connection with the first device.
  6. 根据权利要求5所述的方法,其特征在于,所述第一设备为非直连交换机,所述第一交换机为直连交换机,所述控制器与所述第一设备建立OF连接,包括:The method according to claim 5, wherein the first device is a non-direct connection switch, the first switch is a direct connection switch, and the controller establishes an OF connection with the first device, including:
    所述控制器接收所述第一交换机通过与所述控制器之间的OF连接发送的、基于所述OF连接请求的第三packet in报文;所述第一交换机在接收到所述第一设备发送的OF连接请求且确定所述第一交换机中没有用于转发所述OF连接请求的流表项时发送所述第三packet in报文;Receiving, by the controller, a third packet in message sent by the first switch by using an OF connection with the controller, where the first switch receives the first And sending, by the device, the third packet in the message that is sent by the device, and determining that the first switch does not have a flow entry for forwarding the OF connection request;
    所述控制器根据所述第三packet in报文向所述第一交换机下发第二流表项,所述第二流表项用于转发所述OF连接请求;The controller sends a second flow entry to the first switch according to the third packet in packet, where the second flow entry is used to forward the OF connection request;
    所述控制器接收所述第一交换机发送的所述OF连接请求;The controller receives the OF connection request sent by the first switch;
    所述控制器处理所述OF连接请求,向所述第一交换机发送OF连接响应,以便所述第一交换机将所述OF连接响应发送给所述第一设备。The controller processes the OF connection request, and sends an OF connection response to the first switch, so that the first switch sends the OF connection response to the first device.
  7. 根据权利要求5所述的方法,其特征在于,所述第一设备为非直连交换机,所述第一交换机为非直连交换机,所述控制器与所述第一设备建立OF连接,包括:The method according to claim 5, wherein the first device is a non-direct connection switch, the first switch is a non-direct connection switch, and the controller establishes an OF connection with the first device, including :
    所述控制器接收所述第一交换机通过与所述控制器之间的OF连接发送的、基于所述OF连接请求的第三packet in报文;所述第一交换机在接收到所述第一设备发送的OF连接请求且确定所述第一交换机中没有用于转发所述OF连接请求的流表项时发送所述第三packet in报文;Receiving, by the controller, a third packet in message sent by the first switch by using an OF connection with the controller, where the first switch receives the first And sending, by the device, the third packet in the message that is sent by the device, and determining that the first switch does not have a flow entry for forwarding the OF connection request;
    所述控制器根据所述第三packet in报文向所述中间交换机以及所述第一交换机分别下发第二流表项,所述第二流表项用于转发所述OF连接请求;The controller sends a second flow entry to the intermediate switch and the first switch according to the third packet in message, where the second flow entry is used to forward the OF connection request;
    所述控制器接收所述第一交换机通过所述中间交换机发送的所述OF连接请求;所述中间交换机通过所述第二流表项转发所述OF连接请求;The controller receives the OF connection request sent by the first switch by using the intermediate switch; the intermediate switch forwards the OF connection request by using the second flow entry;
    所述控制器处理所述OF连接请求,通过所述中间交换机向所述第一交换机发送 OF连接响应,以便所述第一交换机将所述OF连接响应发送给所述第一设备,所述中间交换机通过所述第二流表项转发所述OF连接响应。The controller processes the OF connection request, and sends the first connection to the first switch by using the intermediate switch The OF connection responds, so that the first switch sends the OF connection response to the first device, and the intermediate switch forwards the OF connection response by using the second flow entry.
  8. 一种自动配置方法,其特征在于,包括:An automatic configuration method, comprising:
    第一设备向第一交换机发送第一配置请求报文,以便所述第一交换机通过所述第一交换机与所述控制器之间的OF连接发送所述第一配置请求报文至所述控制器,所述第一交换机与所述第一设备具有连接关系;The first device sends a first configuration request message to the first switch, so that the first switch sends the first configuration request message to the control by using an OF connection between the first switch and the controller. The first switch has a connection relationship with the first device;
    所述第一设备接收所述第一交换机发送的第一配置回复报文,所述第一配置回复报文由所述控制器通过所述控制器与所述第一交换机之间的OF连接发送至所述第一交换机;The first device receives a first configuration reply message sent by the first switch, where the first configuration reply message is sent by the controller through an OF connection between the controller and the first switch. To the first switch;
    所述第一设备根据所述配置信息进行设备配置。The first device performs device configuration according to the configuration information.
  9. 根据权利要求8所述的方法,其特征在于,所述第一设备为非直连交换机,还包括:The method according to claim 8, wherein the first device is a non-direct connection switch, and further includes:
    所述第一设备与所述控制器建立OF连接。The first device establishes an OF connection with the controller.
  10. 根据权利要求9所述的方法,其特征在于,所述第一设备与所述控制器建立OF连接,包括:The method according to claim 9, wherein the first device establishes an OF connection with the controller, including:
    所述第一设备向所述第一交换机发送OF连接请求,以便所述第一交换机在确定所述第一交换机中没有用于转发所述OF连接请求的流表项时向控制器发送基于所述OF连接请求的第三packet in报文、接收所述控制器下发的用于转发所述OF连接请求的第二流表项、向所述控制器发送OF连接请求、接收所述控制器发送的OF连接响应;Transmitting, by the first device, an OF connection request to the first switch, so that the first switch sends a basis to the controller when determining that the first switch does not have a flow entry for forwarding the OF connection request a third packet in message of the OF connection request, a second flow entry sent by the controller for forwarding the OF connection request, an OF connection request sent to the controller, and receiving the controller The transmitted OF connection response;
    所述第一设备接收所述第一交换机发送的OF连接响应。The first device receives an OF connection response sent by the first switch.
  11. 根据权利要求8所述的方法,其特征在于,所述第一设备为第二交换机,所述第二交换机连接第二设备,所述第一设备与所述控制器建立OF连接之后,还包括:The method according to claim 8, wherein the first device is a second switch, and the second switch is connected to the second device, and after the first device establishes an OF connection with the controller, :
    所述第一设备接收所述第二设备发送的第二配置请求报文,所述第二配置请求报文包括:第二设备的设备信息;The first device receives a second configuration request message sent by the second device, where the second configuration request message includes: device information of the second device;
    所述第一设备通过所述第一设备与所述控制器之间的OF连接将所述第二配置请求报文发送给控制器;Transmitting, by the first device, the second configuration request message to the controller by using an OF connection between the first device and the controller;
    所述第一设备接收所述控制器通过所述第一设备与所述控制器之间的OF连接发送的第二配置回复报文,所述第二配置回复报文包括所述第二设备的配置信息,所述第二设备的配置信息由所述控制器根据所述第二设备的设备信息确定;Receiving, by the first device, a second configuration reply message sent by the controller by using an OF connection between the first device and the controller, where the second configuration reply message includes the second device Configuration information, where the configuration information of the second device is determined by the controller according to device information of the second device;
    所述第一设备将所述第二配置回复报文发送给所述第二设备。The first device sends the second configuration reply message to the second device.
  12. 根据权利要求11所述的方法,其特征在于,所述第一设备为直连交换机,所述第一设备通过所述第一设备与所述控制器之间的OF连接将所述第二配置请求报文发送给控制器,包括: The method according to claim 11, wherein the first device is a direct connection switch, and the first device connects the second configuration by an OF connection between the first device and the controller. The request message is sent to the controller, including:
    所述第一设备确定所述第一设备中没有用于转发所述第二配置请求报文的流表项时,通过所述OF连接向所述控制器发送基于所述第二配置请求报文的第四packet in报文;When the first device determines that there is no flow entry for forwarding the second configuration request packet, the first device sends the second configuration request packet to the controller by using the OF connection. Fourth packet in message;
    所述第一设备接收所述控制器下发的第三流表项,所述第三流表项用于转发所述第二配置请求报文;Receiving, by the first device, a third flow entry that is sent by the controller, where the third flow entry is used to forward the second configuration request packet;
    所述第一设备将所述第二配置请求报文发送至所述控制器。The first device sends the second configuration request message to the controller.
  13. 根据权利要求11所述的方法,其特征在于,所述第一设备为非直连交换机,所述第一设备通过所述第一设备与所述控制器之间的OF连接将所述第二配置请求报文发送给控制器,包括:The method according to claim 11, wherein the first device is a non-direct connection switch, and the first device connects the second by an OF connection between the first device and the controller. Configure the request packet to be sent to the controller, including:
    所述第一设备向控制器发送基于所述第二配置请求报文的第四packet in报文;Sending, by the first device, a fourth packet in packet based on the second configuration request packet to the controller;
    所述第一设备接收所述控制器根据所述第四packet in报文下发的第三流表项,所述第三流表项用于转发所述第二配置请求报文;Receiving, by the first device, the third flow entry that is sent by the controller according to the fourth packet in packet, where the third flow entry is used to forward the second configuration request packet;
    所述第一设备通过中间交换机向控制器发送所述第二配置请求报文;所述中间交换机是所述控制器与所述第一设备之间的OF连接上的交换机;所述中间交换机通过所述控制器分别下发至所述中间交换机的所述第三流表项转发所述第二配置请求报文;The first device sends the second configuration request message to the controller through the intermediate switch; the intermediate switch is a switch on the OF connection between the controller and the first device; the intermediate switch passes And the third flow entry that is sent by the controller to the intermediate switch to forward the second configuration request packet;
    所述第一设备接收所述控制器通过所述第一设备与所述控制器之间的OF连接发送的第二配置回复报文,包括:Receiving, by the first device, the second configuration reply message sent by the controller by using the OF connection between the first device and the controller, including:
    所述第一设备接收所述控制器通过所述中间交换机发送的所述第二配置回复报文,所述中间交换机通过所述第三流表项转发所述第二配置回复报文。The first device receives the second configuration reply message sent by the controller through the intermediate switch, and the intermediate switch forwards the second configuration reply message by using the third flow entry.
  14. 根据权利要求11所述的方法,其特征在于,所述第一设备通过所述第一设备与所述控制器之间的OF连接将所述第二配置请求报文发送给控制器,包括:The method according to claim 11, wherein the first device sends the second configuration request message to the controller by using an OF connection between the first device and the controller, including:
    所述第一设备向控制器发送第五packet in报文,所述第五packet in报文中包括所述第二配置请求报文;The first device sends a fifth packet in packet to the controller, where the fifth packet in packet includes the second configuration request packet;
    所述第一设备接收所述控制器通过所述第一设备与所述控制器之间的OF连接发送的第二配置回复报文,包括:Receiving, by the first device, the second configuration reply message sent by the controller by using the OF connection between the first device and the controller, including:
    所述第一设备接收所述控制器发送的第五packet out报文,所述第五packet out报文中包括所述第二配置回复报文。The first device receives the fifth packet out message sent by the controller, and the fifth packet out message includes the second configuration reply message.
  15. 根据权利要求11、12、14任一项所述的方法,其特征在于,所述第一设备为直连交换机,所述第一设备将所述第二配置回复报文发送给所述第二设备之后,还包括:The method according to any one of claims 11 to 12, wherein the first device is a direct connection switch, and the first device sends the second configuration reply message to the second device. After the device, it also includes:
    所述第一设备接收所述第二设备发送的OF连接请求;Receiving, by the first device, an OF connection request sent by the second device;
    所述第一设备确定所述第一设备中没有用于转发所述OF连接请求的流表项时,向所述控制器发送基于所述OF连接请求的第五packet in报文;When the first device determines that there is no flow entry for forwarding the OF connection request, the first device sends a fifth packet in packet based on the OF connection request to the controller;
    所述第一设备接收所述控制器根据所述第五packet in报文下发的第四流表项,所述第四流表项用于转发所述OF连接请求; Receiving, by the first device, the fourth flow entry that is sent by the controller according to the fifth packet in packet, where the fourth flow entry is used to forward the OF connection request;
    所述第一设备将所述OF连接请求发送给所述控制器;Sending, by the first device, the OF connection request to the controller;
    所述第一设备接收所述控制器发送的OF连接响应,将所述OF连接响应发送给所述第二设备。The first device receives an OF connection response sent by the controller, and sends the OF connection response to the second device.
  16. 根据权利要求11、13、14任一项所述的方法,其特征在于,所述第一设备为非直连交换机,所述第一设备将所述第二配置回复报文发送给所述第二设备之后,还包括:The method according to any one of claims 11, 13, or 14, wherein the first device is a non-direct connection switch, and the first device sends the second configuration reply message to the first After the second device, it also includes:
    所述第一设备接收所述第二设备发送的OF连接请求;Receiving, by the first device, an OF connection request sent by the second device;
    所述第一设备确定所述第一设备中没有用于转发所述OF连接请求的流表项时,向所述控制器发送基于所述OF连接请求的第五packet in报文;When the first device determines that there is no flow entry for forwarding the OF connection request, the first device sends a fifth packet in packet based on the OF connection request to the controller;
    所述第一设备接收所述控制器根据所述第五packet in报文下发的第四流表项,所述第四流表项用于转发所述OF连接请求;Receiving, by the first device, the fourth flow entry that is sent by the controller according to the fifth packet in packet, where the fourth flow entry is used to forward the OF connection request;
    所述第一设备通过中间交换机向控制器发送所述OF连接请求;所述中间交换机是所述控制器与所述第一设备之间的OF连接上的交换机;所述中间交换机通过所述控制器分别下发至所述中间交换机的所述第四流表项转发所述OF连接请求;The first device sends the OF connection request to a controller through an intermediate switch; the intermediate switch is a switch on an OF connection between the controller and the first device; and the intermediate switch passes the control The fourth flow entry that is respectively delivered to the intermediate switch forwards the OF connection request;
    所述第一设备接收所述控制器通过所述中间交换机发送的OF连接响应,将所述OF连接响应发送给所述第二设备。The first device receives an OF connection response sent by the controller through the intermediate switch, and sends the OF connection response to the second device.
  17. 一种自动配置方法,其特征在于,包括:An automatic configuration method, comprising:
    控制器接收直连交换机发送的第一配置请求报文,所述第一配置请求报文包括:直连交换机的设备信息;The controller receives the first configuration request packet sent by the direct switch, where the first configuration request packet includes: device information of the directly connected switch;
    所述控制器根据所述直连交换机的设备信息确定所述直连交换机的配置信息,向所述直连交换机发送第一配置回复报文,所述第一配置回复报文包括所述直连交换机的配置信息,以便所述直连交换机根据所述配置信息进行设备配置;Determining, by the controller, the configuration information of the direct switch according to the device information of the direct switch, and sending a first configuration reply message to the direct switch, where the first configuration reply message includes the direct connection Configuration information of the switch, so that the direct connection switch performs device configuration according to the configuration information;
    所述控制器与所述直连交换机建立第一OF连接;The controller establishes a first OF connection with the direct connection switch;
    所述控制器接收所述直连交换机通过所述第一OF连接发送的、非直连交换机的第一配置请求报文,所述第一配置请求报文包括:非直连交换机的设备信息;所述非直连交换机的第一配置请求报文由所述非直连交换机发送至所述直连交换机;Receiving, by the controller, a first configuration request message of the indirect connection switch that is sent by the direct connection switch by using the first OF connection, where the first configuration request message includes: device information of the indirectly connected switch; The first configuration request packet of the indirect switch is sent by the indirect switch to the direct switch;
    所述控制器根据所述非直连交换机的设备信息确定所述非直连交换机的配置信息,通过所述第一OF连接向所述直连交换机发送所述非直连交换机的第一配置回复报文,所述非直连交换机的第一配置回复报文包括所述非直连交换机的配置信息,以便所述直连交换机将所述非直连交换机的第一配置回复报文发送至所述非直连交换机、所述非直连交换机根据所述非直连交换机的配置信息进行设备配置;Determining, by the controller, the configuration information of the indirect switch according to the device information of the indirectly connected switch, and sending, by using the first OF connection, the first configuration reply of the indirect switch to the direct switch The first configuration reply message of the indirect switch includes the configuration information of the indirect switch, so that the direct switch sends the first configuration reply message of the indirect switch to the The non-directly connected switch performs the device configuration according to the configuration information of the indirectly connected switch;
    所述控制器与所述非直连交换机建立第二OF连接;The controller establishes a second OF connection with the indirect switch;
    所述控制器接收所述非直连交换机通过所述第二OF连接发送的、用户设备的第一 配置请求报文,所述第一配置请求报文包括:用户设备的设备信息;所述用户设备的第一配置请求报文由所述用户设备发送至所述非直连交换机;Receiving, by the controller, the first user equipment that is sent by the indirect switch through the second OF connection Configuring a request packet, where the first configuration request message includes: device information of the user equipment; the first configuration request message of the user equipment is sent by the user equipment to the indirect direct switch;
    所述控制器根据所述用户设备的设备信息确定所述用户设备的配置信息,通过所述第二OF连接向所述非直连交换机发送所述用户设备的第一配置回复报文,所述用户设备的第一配置回复报文包括所述用户设备的配置信息,以便所述费直连交换机将所述用户设备的第一配置回复报文发送至所述用户设备、所述用户设备根据所述用户设备的配置信息进行设备配置。Determining, by the controller, the configuration information of the user equipment according to the device information of the user equipment, and sending, by using the second OF connection, the first configuration reply packet of the user equipment to the indirectly connected switch, where The first configuration reply message of the user equipment includes the configuration information of the user equipment, so that the fee direct connection switch sends the first configuration reply message of the user equipment to the user equipment, and the user equipment according to the The configuration information of the user equipment is used for device configuration.
  18. 一种控制器,其特征在于,包括:A controller, comprising:
    接收单元,用于接收第一交换机通过所述第一交换机与所述控制器之间的OF连接转发的第一设备的第一配置请求报文,所述第一配置请求报文包括:第一设备的设备信息;所述第一交换机位于所述控制器与所述第一设备之间,所述第一配置请求报文由所述第一设备发送给所述第一交换机;a receiving unit, configured to receive a first configuration request message of the first device that is forwarded by the first switch by using the OF connection between the first switch and the controller, where the first configuration request message includes: Device information of the device; the first switch is located between the controller and the first device, and the first configuration request message is sent by the first device to the first switch;
    确定单元,用于根据所述接收单元接收到的所述第一设备的设备信息确定所述第一设备的配置信息;a determining unit, configured to determine configuration information of the first device according to the device information of the first device received by the receiving unit;
    发送单元,用于通过所述控制器与所述第一交换机之间的OF连接向所述第一交换机发送第一配置回复报文,所述第一配置回复报文包括所述确定单元确定的所述第一设备的配置信息,以便所述第一交换机将所述第一配置回复报文转发给所述第一设备、所述第一设备根据所述配置信息进行设备配置。a sending unit, configured to send, by using an OF connection between the controller and the first switch, a first configuration reply message to the first switch, where the first configuration reply message includes the determining by the determining unit The configuration information of the first device, so that the first switch forwards the first configuration reply message to the first device, and the first device performs device configuration according to the configuration information.
  19. 根据权利要求18所述的控制器,其特征在于,所述第一交换机是直连交换机,所述接收单元具体用于:The controller according to claim 18, wherein the first switch is a direct-connecting switch, and the receiving unit is specifically configured to:
    接收所述第一交换机通过所述OF连接发送的、基于所述第一配置请求报文的第一packet in报文;Receiving, by the first switch, the first packet in packet sent by the OF connection, based on the first configuration request message;
    根据所述第一packet in报文向所述第一交换机下发第一流表项,所述第一流表项用于转发所述第一配置请求报文;And sending, by the first packet in the first packet, the first flow entry, where the first flow entry is used to forward the first configuration request packet;
    接收所述第一交换机按照所述第一流表项发送的所述第一配置请求报文。Receiving, by the first switch, the first configuration request message sent according to the first flow entry.
  20. 根据权利要求18所述的控制器,其特征在于,所述第一交换机为非直连交换机,所述接收单元具体用于:The controller according to claim 18, wherein the first switch is a non-direct exchange switch, and the receiving unit is specifically configured to:
    接收所述第一交换机通过所述OF连接发送的、基于所述第一配置请求报文的第一packet in报文;Receiving, by the first switch, the first packet in packet sent by the OF connection, based on the first configuration request message;
    根据所述第一packet in报文向中间交换机以及所述第一交换机分别下发第一流表项;所述中间交换机是所述控制器与所述第一交换机之间的OF连接上的交换机;所述第一流表项用于转发所述第一配置请求报文;Transmitting, by the first packet in the first packet, the first flow entry to the intermediate switch and the first switch; the intermediate switch is a switch on the OF connection between the controller and the first switch; The first flow entry is used to forward the first configuration request message;
    接收所述第一交换机通过所述中间交换机发送的所述第一配置请求报文;所述中 间交换机按照所述第一流表项转发所述第一配置请求报文;Receiving, by the first switch, the first configuration request message sent by the intermediate switch; The inter-switch forwards the first configuration request message according to the first flow entry;
    所述发送单元具体用于:The sending unit is specifically configured to:
    通过所述中间交换机将所述第一配置回复报文发送给所述第一交换机,所述中间交换机按照所述第一流表项转发所述第一配置回复报文。And sending, by the intermediate switch, the first configuration reply message to the first switch, where the intermediate switch forwards the first configuration reply message according to the first flow entry.
  21. 根据权利要求18所述的控制器,其特征在于,所述接收单元具体用于:The controller according to claim 18, wherein the receiving unit is specifically configured to:
    接收所述第一交换机通过所述OF连接发送的第二packet in报文,所述第二packte in报文中包括所述第一配置请求报文;Receiving, by the first switch, a second packet in packet that is sent by using the OF connection, where the second packet in packet includes the first configuration request packet;
    所述发送单元具体用于:The sending unit is specifically configured to:
    通过所述OF连接向所述第一交换机发送第二packet out报文,所述第二packet out报文中包括所述第一配置回复报文。Sending, by the OF connection, the second packet out packet to the first switch, where the second packet out packet includes the first configuration reply packet.
  22. 根据权利要求18至21任一项所述的控制器,其特征在于,所述第一设备为非直连交换机,还包括:The controller according to any one of claims 18 to 21, wherein the first device is a non-direct connection switch, and further includes:
    连接建立单元,用于与所述第一设备建立OF连接。a connection establishing unit, configured to establish an OF connection with the first device.
  23. 根据权利要求22所述的控制器,其特征在于,所述第一设备为非直连交换机,所述第一交换机为直连交换机,所述连接建立单元具体用于:The controller according to claim 22, wherein the first device is a non-direct connection switch, and the first switch is a direct connection switch, and the connection establishment unit is specifically configured to:
    接收所述第一交换机通过与所述控制器之间的OF连接发送的、基于OF连接请求的第三packet in报文;所述第一交换机在接收到所述第一设备发送的OF连接请求且确定所述第一交换机中没有基于所述OF连接请求的流表项时发送所述第三packet in报文;Receiving a third packet in message sent by the first switch by using an OF connection between the first switch and the controller; the first switch receiving the OF connection request sent by the first device And sending the third packet in packet when the first switch does not have a flow entry based on the OF connection request;
    根据所述第三packet in报文向所述第一交换机下发第二流表项,所述第二流表项用于转发所述OF连接请求;And sending, by the third packet in the second flow entry, the second flow entry, where the second flow entry is used to forward the OF connection request;
    接收所述第一交换机发送的所述OF连接请求;Receiving the OF connection request sent by the first switch;
    处理所述OF连接请求,向所述第一交换机发送OF连接响应,以便所述第一交换机将所述OF连接响应发送给所述第一设备。Processing the OF connection request, and transmitting an OF connection response to the first switch, so that the first switch sends the OF connection response to the first device.
  24. 根据权利要求22所述的控制器,其特征在于,所述第一设备为非直连交换机,所述第一交换机为非直连交换机,所述连接建立单元具体用于:The controller according to claim 22, wherein the first device is a non-direct connection switch, and the first switch is a non-direct connection switch, and the connection establishment unit is specifically configured to:
    接收所述第一交换机通过与所述控制器之间的OF连接发送的、基于所述OF连接请求的第三packet in报文;所述第一交换机在接收到所述第一设备发送的OF连接请求且确定所述第一交换机中没有基于所述OF连接请求的流表项时发送所述第三packet in报文;Receiving a third packet in message sent by the first switch by using an OF connection between the first switch and the controller; the first switch receiving the OF sent by the first device Sending the third packet in message when the connection request is determined and the flow entry that is not based on the OF connection request is determined in the first switch;
    根据所述第三packet in报文向所述中间交换机以及所述第一交换机分别下发第二流表项,所述第二流表项用于转发所述OF连接请求;And sending, by the third packet in the second flow entry, the second flow entry to the intermediate switch and the first switch, where the second flow entry is used to forward the OF connection request;
    接收所述第一交换机通过所述中间交换机发送的所述OF连接请求;所述中间交换机通过所述第二流表项转发所述OF连接请求; Receiving, by the first switch, the OF connection request sent by the intermediate switch; the intermediate switch forwarding the OF connection request by using the second flow entry;
    处理所述OF连接请求,通过所述中间交换机向所述第一交换机发送OF连接响应,以便所述第一交换机将所述OF连接响应发送给所述第一设备,所述中间交换机通过所述第二流表项转发所述OF连接响应。Processing the OF connection request, and sending, by the intermediate switch, an OF connection response to the first switch, so that the first switch sends the OF connection response to the first device, and the intermediate switch passes the The second flow entry forwards the OF connection response.
  25. 一种第一设备,其特征在于,包括:A first device, comprising:
    第一发送单元,用于向第一交换机发送第一配置请求报文,以便所述第一交换机通过所述第一交换机与所述控制器之间的OF连接发送所述第一配置请求报文至所述控制器,所述第一交换机与所述第一设备具有连接关系;a first sending unit, configured to send a first configuration request message to the first switch, so that the first switch sends the first configuration request message by using an OF connection between the first switch and the controller Up to the controller, the first switch has a connection relationship with the first device;
    第一接收单元,用于接收所述第一交换机发送的第一配置回复报文,所述第一配置回复报文由所述控制器通过所述控制器与所述第一交换机之间的OF连接发送至所述第一交换机;a first receiving unit, configured to receive a first configuration reply message sent by the first switch, where the first configuration reply message is used by the controller to pass an OF between the controller and the first switch The connection is sent to the first switch;
    配置单元,用于根据所述第一接收单元接收到的所述配置信息进行设备配置。And a configuration unit, configured to perform device configuration according to the configuration information received by the first receiving unit.
  26. 根据权利要求25所述的第一设备,其特征在于,所述第一设备为非直连交换机,还包括:The first device according to claim 25, wherein the first device is a non-direct connection switch, and further includes:
    连接建立单元,用于与所述控制器建立OF连接。A connection establishing unit is configured to establish an OF connection with the controller.
  27. 根据权利要求26所述的第一设备,其特征在于,所述连接建立单元具体用于:The first device according to claim 26, wherein the connection establishing unit is specifically configured to:
    向所述第一交换机发送OF连接请求,以便所述第一交换机在确定所述第一交换机中没有用于转发所述OF连接请求的流表项时向控制器发送基于所述OF连接请求的第三packet in报文、接收所述控制器下发的用于转发所述OF连接请求的第二流表项、向所述控制器发送OF连接请求、接收所述控制器发送的OF连接响应;Transmitting an OF connection request to the first switch, so that the first switch sends, according to the OF connection request, the controller, when it is determined that there is no flow entry for forwarding the OF connection request in the first switch a third packet in the message, receiving a second flow entry that is sent by the controller to forward the OF connection request, sending an OF connection request to the controller, and receiving an OF connection response sent by the controller ;
    所述第一设备接收所述第一交换机发送的OF连接响应。The first device receives an OF connection response sent by the first switch.
  28. 根据权利要求25所述的第一设备,其特征在于,所述第一设备为第二交换机,所述第二交换机连接第二设备,所述第一设备与所述控制器建立OF连接之后,还包括:The first device according to claim 25, wherein the first device is a second switch, and the second switch is connected to a second device, after the first device establishes an OF connection with the controller, Also includes:
    第二接收单元,用于接收所述第二设备发送的第二配置请求报文,所述第二配置请求报文包括:第二设备的设备信息;a second receiving unit, configured to receive a second configuration request message sent by the second device, where the second configuration request message includes: device information of the second device;
    第二发送单元,用于通过所述第一设备与所述控制器之间的OF连接将所述第二配置请求报文发送给控制器;a second sending unit, configured to send the second configuration request message to the controller by using an OF connection between the first device and the controller;
    所述第二接收单元还用于:接收所述控制器通过所述第一设备与所述控制器之间的OF连接发送的第二配置回复报文,所述第二配置回复报文包括所述第二设备的配置信息,所述第二设备的配置信息由所述控制器根据所述第二设备的设备信息确定;The second receiving unit is further configured to: receive a second configuration reply message sent by the controller by using an OF connection between the first device and the controller, where the second configuration reply message includes The configuration information of the second device, where the configuration information of the second device is determined by the controller according to the device information of the second device;
    所述第二发送单元还用于:将所述第二配置回复报文发送给所述第二设备。The second sending unit is further configured to: send the second configuration reply message to the second device.
  29. 根据权利要求28所述的第一设备,其特征在于,所述第一设备为直连交换机,所述第二发送单元具体用于:The first device according to claim 28, wherein the first device is a direct connection switch, and the second sending unit is specifically configured to:
    确定所述第一设备中没有用于转发所述第二配置请求报文的流表项时,通过所述 OF连接向所述控制器发送基于所述第二配置请求报文的第四packet in报文;When it is determined that there is no flow entry for forwarding the second configuration request packet in the first device, The OF connection sends a fourth packet in message based on the second configuration request message to the controller;
    接收所述控制器下发的第三流表项,所述第三流表项用于转发所述第二配置请求报文;Receiving a third flow entry that is sent by the controller, where the third flow entry is used to forward the second configuration request packet;
    将所述第二配置请求报文发送至所述控制器。Sending the second configuration request message to the controller.
  30. 根据权利要求28所述的第一设备,其特征在于,所述第一设备为非直连交换机,所述第二发送单元具体用于:The first device according to claim 28, wherein the first device is a non-direct connection switch, and the second sending unit is specifically configured to:
    向控制器发送基于所述第二配置请求报文的第四packet in报文;Sending, to the controller, a fourth packet in message based on the second configuration request message;
    接收所述控制器根据所述第四packet in报文下发的第三流表项,所述第三流表项用于转发所述第二配置请求报文;Receiving, by the controller, a third flow entry that is sent according to the fourth packet in packet, where the third flow entry is used to forward the second configuration request packet;
    通过中间交换机向控制器发送所述第二配置请求报文;所述中间交换机是所述控制器与所述第一设备之间的OF连接上的交换机;所述中间交换机通过所述控制器分别下发至所述中间交换机的所述第三流表项转发所述第二配置请求报文;Transmitting, by the intermediate switch, the second configuration request message to the controller; the intermediate switch is a switch on an OF connection between the controller and the first device; and the intermediate switch is respectively configured by the controller The third flow entry sent to the intermediate switch forwards the second configuration request packet;
    所述第二接收单元具体用于:The second receiving unit is specifically configured to:
    接收所述控制器通过所述中间交换机发送的所述第二配置回复报文,所述中间交换机通过所述第三流表项转发所述第二配置回复报文。Receiving, by the controller, the second configuration reply message sent by the intermediate switch, the intermediate switch forwarding the second configuration reply message by using the third flow entry.
  31. 根据权利要求28所述的第一设备,其特征在于,所述第二发送单元具体用于:向控制器发送第五packet in报文,所述第五packet in报文中包括所述第二配置请求报文;The first device according to claim 28, wherein the second sending unit is configured to: send a fifth packet in message to the controller, where the fifth packet in message includes the second Configure request packets;
    所述第二接收单元具体用于:The second receiving unit is specifically configured to:
    接收所述控制器发送的第五packet out报文,所述第五packet out报文中包括所述第二配置回复报文。Receiving a fifth packet out message sent by the controller, where the fifth packet out message includes the second configuration reply message.
  32. 根据权利要求28、29、31任一项所述的第一设备,其特征在于,所述第一设备为直连交换机,所述第二接收单元还用于:接收所述第二设备发送的OF连接请求;The first device according to any one of claims 28, 29, and 31, wherein the first device is a direct connection switch, and the second receiving unit is further configured to: receive, send by the second device OF connection request;
    所述第二发送单元还用于:确定所述第一设备中没有用于转发所述OF连接请求的流表项时,向所述控制器发送基于所述OF连接请求的第五packet in报文;The second sending unit is further configured to: when it is determined that there is no flow entry for forwarding the OF connection request in the first device, send a fifth packet in report based on the OF connection request to the controller Text
    所述第二接收单元还用于:接收所述控制器根据所述第五packet in报文下发的第四流表项,所述第四流表项用于转发所述OF连接请求;The second receiving unit is further configured to: receive a fourth flow entry that is sent by the controller according to the fifth packet in packet, where the fourth flow entry is used to forward the OF connection request;
    所述第二发送单元还用于:将所述OF连接请求发送给所述控制器;The second sending unit is further configured to: send the OF connection request to the controller;
    所述第二接收单元还用于:接收所述控制器发送的OF连接响应;The second receiving unit is further configured to: receive an OF connection response sent by the controller;
    所述第二发送单元还用于:将所述OF连接响应发送给所述第二设备。The second sending unit is further configured to: send the OF connection response to the second device.
  33. 根据权利要求28、30、31任一项所述的第一设备,其特征在于,所述第一设备为非直连交换机,所述第二接收单元还用于:接收所述第二设备发送的OF连接请求;The first device according to any one of claims 28, 30, and 31, wherein the first device is a non-direct connection switch, and the second receiving unit is further configured to: receive, send, by the second device OF connection request;
    所述第二发送单元还用于:确定所述第一设备中没有用于转发所述OF连接请求的流表项时,向所述控制器发送基于所述OF连接请求的第五packet in报文;The second sending unit is further configured to: when it is determined that there is no flow entry for forwarding the OF connection request in the first device, send a fifth packet in report based on the OF connection request to the controller Text
    所述第二接收单元还用于:接收所述控制器根据所述第五packet in报文下发的第 四流表项,所述第四流表项用于转发所述OF连接请求;The second receiving unit is further configured to: receive the first that is sent by the controller according to the fifth packet in packet a fourth flow entry, where the fourth flow entry is used to forward the OF connection request;
    所述第二发送单元还用于:通过中间交换机向控制器发送所述OF连接请求;所述中间交换机是所述控制器与所述第一设备之间的OF连接上的交换机;所述中间交换机通过所述控制器分别下发至所述中间交换机的所述第四流表项转发所述OF连接请求;The second sending unit is further configured to: send the OF connection request to the controller by using an intermediate switch; the intermediate switch is a switch on an OF connection between the controller and the first device; The switch forwards the OF connection request by using the fourth flow entry that is sent by the controller to the intermediate switch by the controller;
    所述第二接收单元还用于:接收所述控制器通过所述中间交换机发送的OF连接响应;The second receiving unit is further configured to: receive an OF connection response sent by the controller by using the intermediate switch;
    所述第二发送单元还用于:将所述OF连接响应发送给所述第二设备。 The second sending unit is further configured to: send the OF connection response to the second device.
PCT/CN2016/079265 2015-06-19 2016-04-14 Automatic configuration method, controller and device WO2016202072A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510345384.5A CN106330487B (en) 2015-06-19 2015-06-19 Method of automatic configuration, controller and equipment
CN201510345384.5 2015-06-19

Publications (1)

Publication Number Publication Date
WO2016202072A1 true WO2016202072A1 (en) 2016-12-22

Family

ID=57544848

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/079265 WO2016202072A1 (en) 2015-06-19 2016-04-14 Automatic configuration method, controller and device

Country Status (2)

Country Link
CN (1) CN106330487B (en)
WO (1) WO2016202072A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109474443B (en) * 2017-09-07 2022-10-18 中移(杭州)信息技术有限公司 Configuration method, device and system of newly added server and communication equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104202266A (en) * 2014-08-04 2014-12-10 福建星网锐捷网络有限公司 Communication method, switch, controller and communication system
US20150002616A1 (en) * 2013-06-27 2015-01-01 Electronics And Telecommunications Research Institute Apparatus and method for processing multicast traffic in openflow environment
CN104735000A (en) * 2013-12-23 2015-06-24 中兴通讯股份有限公司 OpenFlow signaling control method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103269282A (en) * 2013-04-25 2013-08-28 杭州华三通信技术有限公司 Method and device for automatically deploying network configuration
CN104104572B (en) * 2014-07-15 2017-12-08 新华三技术有限公司 Interchanger automatic deployment method and device in a kind of SDN
CN104202364B (en) * 2014-08-15 2018-08-28 新华三技术有限公司 A kind of automatic discovery of controller and configuration method and equipment

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150002616A1 (en) * 2013-06-27 2015-01-01 Electronics And Telecommunications Research Institute Apparatus and method for processing multicast traffic in openflow environment
CN104735000A (en) * 2013-12-23 2015-06-24 中兴通讯股份有限公司 OpenFlow signaling control method and device
CN104202266A (en) * 2014-08-04 2014-12-10 福建星网锐捷网络有限公司 Communication method, switch, controller and communication system

Also Published As

Publication number Publication date
CN106330487A (en) 2017-01-11
CN106330487B (en) 2019-11-22

Similar Documents

Publication Publication Date Title
EP2843906B1 (en) Method, apparatus, and system for data transmission
US9172550B2 (en) Management of a multicast system in a software-defined network
CN112468529B (en) Session management method and device
US20110268127A1 (en) Unsolicited FIP Packet Injection by Proxy and Spoofing and Autoconfiguring Intermediate Bridges using FIP Snooping
US10021030B2 (en) Method and system for forwarding information in distributed network
WO2019184653A1 (en) Link configuration method and controller
CN104980355A (en) Source controllable multicast data transmission method and system thereof under SDN Environment
CN104468371A (en) Multicast service message processing method and device
CN106101297B (en) A kind of message answer method and device
EP2892196B1 (en) Method, network node and system for implementing point-to-multipoint multicast
JP4543097B2 (en) Session-aware connection control method and apparatus
WO2015096707A1 (en) Method, device and system for acquiring information about configuration server
CN103107942B (en) The tracking of a kind of static routing and equipment
TWI581624B (en) Streaming service system, streaming service method and streaming service controlling device
WO2016202072A1 (en) Automatic configuration method, controller and device
CN105227334A (en) A kind of Fabric method for discovering network topology and device
WO2015058413A1 (en) Data configuration method and network management server
US10742539B2 (en) Control apparatus, communication system, relay apparatus control method, and program
WO2017164068A1 (en) Transport network control device, communication system, transfer node control method, and program
JP6729845B2 (en) Network system, packet transmission device, packet transmission method, and information processing program
WO2015074258A1 (en) Method, apparatus and system for controlling forwarding of service data in virtual network
KR101969304B1 (en) Method and computer program for handling trouble using packet-out message in software defined networking environment
WO2011044729A1 (en) Method and apparatus for checking anycast group configuration in communication network
JP4630298B2 (en) Function distributed communication apparatus, component element coupling control method, and program
CN106302860B (en) SDN-based free address resolution protocol sending method, device and system

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

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

Country of ref document: EP

Kind code of ref document: A1