WO2019000332A1 - 转发器和控制器建立连接的方法和装置 - Google Patents

转发器和控制器建立连接的方法和装置 Download PDF

Info

Publication number
WO2019000332A1
WO2019000332A1 PCT/CN2017/090898 CN2017090898W WO2019000332A1 WO 2019000332 A1 WO2019000332 A1 WO 2019000332A1 CN 2017090898 W CN2017090898 W CN 2017090898W WO 2019000332 A1 WO2019000332 A1 WO 2019000332A1
Authority
WO
WIPO (PCT)
Prior art keywords
address
sdn
sdn controller
address allocation
forwarder
Prior art date
Application number
PCT/CN2017/090898
Other languages
English (en)
French (fr)
Inventor
王新泉
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to PCT/CN2017/090898 priority Critical patent/WO2019000332A1/zh
Publication of WO2019000332A1 publication Critical patent/WO2019000332A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/40Network security protocols

Definitions

  • the present application relates to the field of communications technologies, and in particular, to a method and apparatus for establishing a connection between a repeater and a controller.
  • SDN Software Defined Network
  • SDN controller Controller
  • Switch SDN forwarder
  • SDN controller the SDN controller is the logical control center of the SDN network. It connects to the switching device through the southbound interface, provides network commands to the switching device, manages the network topology between the switching devices, and connects to the application server through the northbound interface.
  • the SDN repeater listens to the SDN controller, and the data it relies on is completely derived from the SDN controller.
  • the SDN forwarder maintains a flow table in the flow table.
  • the flow table includes multiple flow entries. If the packet to be forwarded has a corresponding flow entry in the flow table, the packet is forwarded according to the flow table. If there is no corresponding flow entry in the flow table, the forwarder requests an instruction from the controller. After receiving the request from the forwarder, the controller sends a flow entry to the forwarder to the forwarder. The forwarder obtains the flow table. The item is added to the flow table entry to forward the packet according to the new flow table.
  • the SDN forwarder After the SDN forwarder is started, the address of the SDN controller needs to be obtained, and then an OpenFlow connection is established with the SDN controller, and the SDN controller sends a flow table to guide the forwarding.
  • the current implementation manner is that the SDN forwarder obtains the address of the SDN controller through a startup script or a manual configuration manner. In this scenario, the configuration file of all SDN forwarders needs to be modified. In the scenario where a large number of SDN forwarders are deployed, the workload is large, resulting in inefficient service provisioning and network operation and maintenance.
  • the embodiment of the invention provides a method and a device for establishing a connection between a repeater and a controller, so that the forwarder can automatically obtain the address of the controller, thereby improving service delivery and network operation and maintenance efficiency.
  • a method for establishing a connection between a repeater and a controller is provided.
  • the repeater and the controller are an SDN forwarder and an SDN controller, and the SDN further includes an address allocation server, where the SDN forwarder and the SDN forwarder respectively
  • the address allocation server is connected to the SDN controller, and the address allocation server is connected to the SDN controller, the method comprising: the SDN forwarder obtaining its own address from the address allocation server; the SDN forwarding Sending an address request message to the address allocation server, the address request message is used to obtain a first address of the SDN controller, and the SDN forwarder receives a first address allocation report sent by the address allocation server
  • the first address allocation message carries a first address of the SDN controller; the SDN forwarder extracts a first address of the SDN controller from the first address allocation message, and then according to the A first address of the SDN controller establishes a connection with the SDN controller.
  • the SDN forwarder sends an address request message to the address distribution server, and the address distribution server sends the address of the SDN controller to the SDN forwarder through the address allocation message, and the SDN forwarder according to the address of the SDN controller Establish a connection with the SDN controller.
  • SDN forwarder can automatically obtain SDN control after power-on The device address does not need to modify the configuration file of the SDN forwarder, which improves service delivery and network operation and maintenance efficiency.
  • the method further includes: the SDN repeater receiving a second address allocation message sent by the address allocation server, where the second address allocation message carries the SDN controller a second address; the SDN forwarder extracts a second address of the SDN controller from the second address allocation message, and then establishes a connection with the SDN controller according to the second address of the SDN controller.
  • the method further includes: after receiving the address request message, the address allocation server confirms whether the address request message carries a preset field for acquiring an address of the SDN controller, If the packet is carried, the first address allocation packet is sent to the SDN forwarder, and the first address allocation packet carries the first address of the SDN controller.
  • the first address and the second address of the SDN controller both include a primary SDN controller address and/or a standby SDN controller address.
  • the address request message is a dynamic host configuration protocol discovery message
  • the address allocation server is a dynamic host configuration protocol server.
  • an SDN repeater including:
  • a first sending unit configured to send an address request message to the address allocation server, where the address request message is used to obtain a first address of the SDN controller;
  • a first receiving unit configured to obtain an address from the address allocation server, and receive a first address allocation message sent by the address allocation server, where the first address allocation message carries a first address of the SDN controller ;
  • a first processing unit configured to generate the address request message, and extract a first address of the SDN controller from the first address allocation message, and then control according to the first address of the SDN controller and the SDN Establish a connection.
  • the first receiving unit is further configured to receive a second address allocation message sent by the address allocation server, where the second address allocation message carries a second address of the SDN controller. ;
  • the first processing unit is further configured to extract a second address of the SDN controller from the second address allocation message, and then establish a connection with the SDN controller according to the second address of the SDN controller. .
  • the first and second addresses of the SDN controller include a primary SDN controller address and/or a standby SDN controller address.
  • the address request message is a dynamic host configuration protocol discovery message.
  • an address allocation server including:
  • a second receiving unit configured to receive an address request message sent by the SDN forwarder, where the address request message is used to obtain a first address of the SDN controller;
  • a second processing unit configured to generate a first address allocation message
  • a second sending unit configured to send the first address allocation message to the SDN forwarder, where the first address allocation message carries a first address of the SDN controller, and the SDN forwarder Extracting a first address of the SDN controller in the first address allocation message, and then establishing a connection with the SDN controller according to the first address of the SDN controller.
  • the second processing unit is further configured to: determine whether the address request packet carries a preset field for acquiring an address of the SDN controller, and if yes, send the first address allocation packet. Give the SDN And the first address allocation message carries the first address of the SDN controller.
  • the second processing unit is further configured to generate a second address allocation message
  • the second sending unit is further configured to: send a second address allocation message to the SDN forwarder, where The second address allocation message carries the second address of the SDN controller, and the SDN forwarder extracts the second address of the SDN controller from the second address allocation message, and then according to the SDN controller The second address establishes a connection with the SDN controller.
  • the first and second addresses of the SDN controller include a primary SDN controller address and/or a standby SDN controller address.
  • the address allocation server is a dynamic host configuration protocol server.
  • a fourth aspect provides a communication apparatus, including: a processor, a memory, a bus, and a communication interface; the memory is configured to store a computer execution instruction, and the processor is connected to the memory through the bus, when the device is running, the The processor executes the computer-executable instructions stored by the memory to cause the apparatus for establishing a connection between the SDN repeater and the SDN controller to perform the method of any of the above aspects.
  • an embodiment of the present invention provides a software-defined network system, including an address allocation server, an SDN forwarder, and an SDN controller in the foregoing method embodiment or the device embodiment.
  • an embodiment of the present invention provides a computer storage medium for storing computer software instructions used by the SDN forwarder or an address distribution server, which is configured to perform the foregoing aspects as an SDN forwarder or an address distribution server. Designed program.
  • an embodiment of the present invention provides a computer program product.
  • the computer program product includes computer software instructions executable by a processor to implement the flow in a method of establishing a connection between an SDN repeater of any of the above aspects and an SDN controller.
  • FIG. 1 is a schematic diagram of an SDN according to an embodiment of the present invention.
  • FIG. 2 is a schematic flowchart of a method for establishing a connection between an SDNSDN repeater and an SDN controller according to an embodiment of the present invention.
  • FIG. 3 is an interaction flowchart of a method for establishing a connection between an SDNSDN repeater and an SDN controller according to an embodiment of the present invention.
  • FIG. 4 is a schematic diagram of an SDN repeater in accordance with an embodiment of the present invention.
  • FIG. 5 is a schematic diagram of an address allocation server according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of an SDN system in accordance with an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of a computer device in accordance with an embodiment of the present invention.
  • the embodiments of the present invention and the following embodiments are mainly based on an OpenFlow forwarder in the OpenFlow OpenFlow protocol.
  • An OpenFlow SDN network consisting of an OpenFlow Controller (OFS) and an OpenFlow Controller (OFC) is used as an example to describe the solution.
  • OFS OpenFlow Controller
  • OFC OpenFlow Controller
  • SC OpenFlow Controller
  • a person skilled in the art can equate the SDN controller with the OFC and the SDN switch with the OFS.
  • the related schemes based on the OpenFlow network in the embodiments of the present invention are also applicable to other SDN networks implemented by similar protocols.
  • a traditional switch is not required in the SDN network, and the control plane and the data plane are all based on the same physical network.
  • control plane is similar to the concept of "control plane” in the prior art, that is, some related nodes (such as OFC and each OFS) and the links between these nodes form a link.
  • the network plane for transmitting the control message allows the OFS to obtain the flow entry delivered by the OFC through the interaction of the control messages with each other, but does not require a conventional switch to complete compared to the prior art.
  • data plane is also similar to that mentioned in the background art, that is, some related nodes (OFC and each OFS) and the links between these nodes form a network plane for transmitting data information, when each OFS receives After the flow entry sent by the OFC, the OFS forwards the received packet according to the flow entry.
  • SDN 100 includes one or more SDN forwarders (with multiple SDN repeaters as an example, such as SDN repeaters 110, 112, 114, 116, 118, 119), SDN controller 120 and address.
  • the server 130 is assigned.
  • Each SDN repeater can be connected to an address assignment server 130 and a plurality of SDN controllers, respectively.
  • the foregoing SDN controller 120 may be embodied in the form of an external SDN controller, wherein the SDN controller may also be integrated by multiple SDN controllers. Multiple controllers can be active or standby, or they can share a relationship.
  • the SDN forwarder is implemented by hardware, and the SDN controller can be implemented by hardware or by software.
  • the SDN forwarder is responsible for forwarding the data layer; the SDN controller is responsible for centralized control of the network to implement the functions of the control layer.
  • the repeater communicates with the controller through a control protocol.
  • a repeater can be connected to one or more other transponders, or to one or more entities that send/receive messages (eg, fixed terminals, mobile terminals, personal computers, etc.).
  • different SDN controllers may support different control forwarding protocols, and different SDN repeaters may also support different control forwarding protocols.
  • a plurality of plug-ins supporting different control forwarding protocols are set in the SDN controller; the SDN controller calls the corresponding plug-in to format the forwarding control signaling according to the type of the control forwarding protocol supported by the target SDN forwarder, and encapsulates the encapsulated
  • the forwarding control signaling can be successfully received and executed by the target SDN repeater, thereby completing the corresponding packet forwarding service.
  • the name of the address allocation server itself does not limit the device. In practice, it may be another name, such as an address server or an address controller.
  • the name of the SDN forwarder itself does not limit the device. In practice, it can be other names, such as an SDN switch, an SDN forwarding platform, or an SDN forwarding device.
  • the name of the SDN controller itself does not limit the device. In practice, it can be other names, such as the SDN control platform. A unified explanation is given here, and will not be described below.
  • the SDN includes an address distribution server in addition to the SDN forwarder and the plurality of SDN controllers, and the SDN forwarder is respectively connected to the address distribution server and the plurality of SDN controllers.
  • the network may be as shown in FIG. network of.
  • the method 200 is performed by an SDN repeater (e.g., SDN repeater 110 in FIG. 1). As shown in FIG. 2, the method 200 includes:
  • the SDN forwarder obtains its own address from the address distribution server, and establishes a connection with the address distribution server.
  • the SDN forwarder sends an address request message to the address allocation server, where the address request message is used to obtain Take the first address of the SDN controller.
  • the SDN forwarder receives a first address allocation message sent by the address allocation server, where the first address allocation message carries a first address of the SDN controller.
  • the address allocation server After receiving the address request message, the address allocation server confirms whether there is a preset field for obtaining the address of the SDN controller, and the preset field may be a reserved blank field, which is specifically used for the address allocation server to be the SDN controller.
  • the first address is populated into the blank field. If carried, the first address of the SDN controller is filled into the blank field to obtain a first address allocation message, and then the first address allocation message carrying the first address of the SDN controller is sent to the SDN forwarder.
  • the first address and the second address of the SDN controller include the primary SDN controller address and/or the standby SDN controller address.
  • the first address and the second address are IP addresses
  • the SDN forwarder establishes a Transmission Control Protocol (TCP) connection with the SDN controller according to the first address and the second address.
  • TCP Transmission Control Protocol
  • the address of the SDN controller can be It is an IP address, or it can be another type of address such as a MAC address, etc., without limitation.
  • the SDN forwarder extracts a first address of the SDN controller from the first address allocation message, and then establishes a connection with the SDN controller according to the first address of the SDN controller.
  • the address allocation server actively pushes the message to notify the SDN forwarder, and the foregoing embodiment may further include the following steps:
  • the SDN forwarder receives the second address allocation message sent by the address allocation server, where the second address allocation message carries the second address of the SDN controller.
  • the SDN forwarder extracts a second address of the SDN controller from the second address allocation message, and then establishes a connection with the SDN controller according to the second address of the SDN controller.
  • the size of the sequence numbers of the above processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not be taken to the embodiments of the present invention.
  • the implementation process constitutes any limitation.
  • the address request server sends an address request message to the address distribution server, and the address distribution server sends the address of the SDN controller to the SDN forwarder through the address allocation message, and the SDN forwarder according to the SDN controller
  • the address establishes a connection with the SDN controller.
  • the SDN forwarder can automatically obtain the address of the SDN controller from the address distribution server after the power is turned on, without manually modifying the configuration file of the SDN forwarder, thereby improving service delivery and network operation and maintenance efficiency.
  • the address request message is a DHCP Discover message
  • the SDN forwarder sends a DHCP Discover message after being powered on.
  • An Option is added to the Discover message to obtain the SDN controller address. Configure the primary and backup SDN controller addresses in advance on the DHCP server.
  • After receiving the Discover message check the packet. If the Option IP address is not carried, the device processes the packet as the normal DHCP packet. Otherwise, it is considered to be the address request packet sent by the SDN forwarder, and then sends the first address carrying the SDN controller.
  • the first address assignment message is sent to the SDN forwarder.
  • FIG. 3 is an interaction flowchart of a method for network virtualization according to an embodiment of the present invention.
  • the forwarding device in FIG. 3 may be any one of the forwarding devices in FIG. 1; the SDN controller may be the SDN controller in FIG. 1, and the address allocation server may be The address distribution server 103 in FIG.
  • the SDN forwarder obtains its own address from the address allocation server.
  • the SDN forwarder sends an address request message to the address allocation server, where the address request message is used to obtain the first address of the SDN controller.
  • the SDN forwarder receives a first address allocation message sent by the address allocation server, where the first address allocation message carries a first address of the SDN controller.
  • the address allocation server After receiving the address request message, the address allocation server confirms whether there is a preset field for obtaining the address of the SDN controller, and the preset field may be a reserved blank field, which is specifically used for the address allocation server to be the SDN controller.
  • the first address is populated into the blank field. If carried, the first address of the SDN controller is filled into the blank field to obtain a first address allocation message, and then the first address allocation message carrying the first address of the SDN controller is sent to the SDN forwarder.
  • the first address and the second address of the SDN controller include the primary SDN controller address and/or the standby SDN controller address.
  • the first address and the second address are IP addresses
  • the SDN forwarder establishes a Transmission Control Protocol (TCP) connection with the SDN controller according to the first address and the second address.
  • TCP Transmission Control Protocol
  • the address of the SDN controller can be It is an IP address, or it can be another type of address such as a MAC address, etc., without limitation.
  • the SDN forwarder extracts a first address of the SDN controller from the first address allocation message, and then establishes a connection with the SDN controller according to the first address of the SDN controller.
  • the address distribution server actively sends a message to notify the SDN forwarder.
  • the foregoing embodiment may further include the following steps:
  • the address allocation server detects that the address of the SDN controller has changed.
  • the SDN forwarder receives the second address allocation message sent by the address allocation server, where the second address allocation message carries the second address of the SDN controller.
  • the SDN forwarder extracts a second address of the SDN controller from the second address allocation message, and then establishes a connection with the SDN controller according to the second address of the SDN controller.
  • the size of the sequence numbers of the above processes does not mean the order of execution, and the order of execution of each process should be determined by its function and internal logic, and should not be taken to the embodiments of the present invention.
  • the implementation process constitutes any limitation.
  • the address request server sends an address request message to the address distribution server, and the address distribution server sends the address of the SDN controller to the SDN forwarder through the address allocation message, and the SDN forwarder according to the SDN
  • the address of the controller is connected to the SDN controller.
  • the address of the SDN controller can be automatically obtained from the address allocation server.
  • the configuration file of the SDN forwarder is not required to be modified, and the service delivery and network operation and maintenance efficiency are improved.
  • the SDN forwarder requests to obtain the address of the SDN controller.
  • One implementation method is to send a DHCP discovery (Discover) message to the SDN controller.
  • One way to customize the Option field is to use the type length value (type, length, value, TLV) format, as follows:
  • the device After receiving the DHCP Discovery packet, the device checks the packet. If the Option Option field of the Controller IP address is not carried, it is processed as a normal DHCP packet. Otherwise, it is considered to be an address request message sent by the SDN forwarder.
  • the custom Option field is carried as follows:
  • the SDN forwarder After receiving the DHCP Offer message, the SDN forwarder reads the address of the primary and secondary SDN controllers from the DHCP Offer message, and the SDN forwarder establishes a TCP connection with the SDN controller according to the address of the SDN controller.
  • FIG. 4 shows a schematic block diagram of an SDN repeater 400 in accordance with an embodiment of the present invention.
  • the SDN repeater 400 includes:
  • a first port 401 configured to connect to an address allocation server
  • the first sending unit 403 is configured to obtain an address of the AO controller from the address allocation server, and send the address request message to the address allocation server, where the address request message is used to obtain the first address of the SDN controller;
  • the first receiving unit 404 receives the first address allocation message sent by the address allocation server, where the first address allocation message carries the first address of the SDN controller;
  • the first processing unit 405 is configured to generate an address request message, and extract a first address of the SDN controller from the first address allocation message, and then establish a connection with the SDN controller according to the first address of the SDN controller.
  • the first receiving unit 404 is further configured to receive a second address allocation message sent by the address allocation server, where the second address allocation message carries a second address of the SDN controller.
  • the first processing unit 405 is further configured to extract a second address of the SDN controller from the second address allocation message, and then establish a connection with the SDN controller according to the second address of the SDN controller.
  • the first address and the second address of the SDN controller include a primary SDN controller address and/or a standby SDN controller address.
  • the primary SDN controller address and the standby SDN controller address can be switched to each other, or temporarily switched to the standby SDN controller address if the primary SDN controller address is invalid.
  • the address request message is a DHCP Discover message
  • the SDN forwarder sends a DHCP Discover message after being powered on.
  • An Option is added to the Discover message to obtain the SDN controller address.
  • After receiving the Discover message check the packet. If the Option IP address is not carried, the device will process the DHCP packet. Otherwise, it is considered to be
  • the address request message sent by the SDN forwarder is sent to the SDN forwarder by sending a first address assignment message carrying the first address of the SDN controller.
  • the SDN forwarder of the embodiment of the present invention sends an address request message to the address distribution server, and the address distribution server sends the address of the SDN controller to the SDN forwarder through the address allocation message, and the SDN forwarder according to the address of the SDN controller
  • the SDN controller establishes a connection. After the SDN forwarder is powered on, the SDN controller address can be automatically obtained from the address allocation server.
  • the configuration file of the SDN forwarder is not required to be modified, and the service delivery and network operation and maintenance efficiency are improved.
  • FIG. 5 shows a schematic block diagram of an address allocation server 500 in accordance with an embodiment of the present invention.
  • the address distribution server 500 includes:
  • the second receiving unit 501 is configured to receive an address request message sent by the SDN forwarder, where the address request message is used to obtain a first address of the SDN controller;
  • a second processing unit 502 configured to generate a first address allocation message
  • the second sending unit 503 is configured to send the first address allocation message to the SDN forwarder, where the first address allocation message carries the first address of the SDN controller.
  • the SDN forwarder extracts the first address of the SDN controller from the first address allocation message, and then establishes a connection with the SDN controller according to the first address of the SDN controller.
  • the second processing unit 502 is further configured to: when the second receiving unit 510 receives the address request message sent by the SDN forwarder, confirm whether the address request message is carried in the address request message. Obtaining a preset field of the SDN controller address, where the preset field may be a reserved blank field, specifically for the address allocation server to fill the first address of the SDN controller to the blank field. If carried, the first address of the SDN controller is filled into the blank field to obtain a first address allocation message, and then the first address allocation message carrying the first address of the SDN controller is sent to the SDN forwarder.
  • the second processing unit 502 is further configured to generate a second address allocation message
  • the second sending unit 503 is further configured to send the second address allocation message to the SDN forwarder, and the second address allocation report.
  • the file carries the second address of the SDN controller
  • the SDN forwarder extracts the second address of the SDN controller from the second address allocation message, and then establishes a connection with the SDN controller according to the second address of the SDN controller.
  • the address request message is a DHCP Discover message
  • the SDN forwarder sends a DHCP Discover message after being powered on.
  • An Option is added to the Discover message to obtain the SDN controller address. Configure the primary and backup SDN controller addresses in advance on the DHCP server.
  • After receiving the Discover message check the packet. If the Option IP address is not carried, the device processes the packet as the normal DHCP packet. Otherwise, it is considered to be the address request packet sent by the SDN forwarder, and then sends the first address carrying the SDN controller.
  • the first address assignment message is sent to the SDN forwarder.
  • FIG. 6 shows a system for implementing the connection between the SDN repeater and the SDN controller involved in the above embodiment.
  • the system includes an SDN repeater 601, an SDN controller 602, and an address assignment server 603.
  • the SDN forwarder 601 is configured to obtain an address from the address allocation server and send an address request message to the address allocation server, where the address request message is used to obtain the first address of the SDN controller, and receive the address. Allocating a first address allocation message sent by the server, the first address allocation message carries the first address of the SDN controller, and then the SDN forwarder extracts the first address of the SDN controller from the first address allocation message, and then according to The first address of the SDN controller establishes a connection with the SDN controller.
  • the SDN forwarder 601 further receives the second address allocation message sent by the address allocation server 603, and the second address allocation message carries the second address of the SDN controller.
  • SDN repeater 601 from said The second address allocation message extracts the second address of the SDN controller, and then re-establishes a connection with the SDN controller according to the second address of the SDN controller 602.
  • the SDN controller 602 is configured to send an address to the address allocation server.
  • the address allocation server 603 is configured to receive an address request message sent by the SDN forwarder 601, where the address request message is used to obtain a first address of the SDN controller, and generate a first address allocation message, and send the first address allocation The message is sent to the SDN forwarder, and the first address allocation message carries the first address of the SDN controller.
  • the address assignment server 603 generates a second address assignment message.
  • the second sending unit is further configured to: send a second address allocation message to the SDN forwarder, where the second address allocation message carries the second address of the SDN controller, and the SDN forwarder extracts the SDN control from the second address allocation message The second address of the device is then re-established with the SDN controller based on the second address of the SDN controller.
  • FIG. 7 is a schematic diagram of a computer device according to an embodiment of the present invention.
  • Computer device 700 includes at least one processor 701, a communication bus 702, a memory 703, and at least one communication interface 704.
  • the processor 701 can be a general purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the present invention.
  • CPU central processing unit
  • ASIC application-specific integrated circuit
  • Communication bus 702 can include a path for communicating information between the components described above.
  • Communication interface 704 using any type of transceiver, for communicating with other devices or communication networks, such as Ethernet, Radio Access Network (RAN), Wireless Local Area Networks (WLAN), and the like.
  • RAN Radio Access Network
  • WLAN Wireless Local Area Networks
  • the memory 703 can be a read-only memory (ROM) or other type of static storage device that can store static information and instructions, a random access memory (RAM) or other type that can store information and instructions.
  • the dynamic storage device can also be an Electrically Erasable Programmable Read-Only Memory (EEPROM), a Compact Disc Read-Only Memory (CD-ROM) or other optical disc storage, and a disc storage device. (including compact discs, laser discs, optical discs, digital versatile discs, Blu-ray discs, etc.), magnetic disk storage media or other magnetic storage devices, or can be used to carry or store desired program code in the form of instructions or data structures and can be Any other media accessed, but not limited to this.
  • the memory can exist independently and be connected to the processor via a bus.
  • the memory can also be integrated with the processor.
  • the memory 703 is used to store application code for executing the solution of the present invention, and is controlled by the processor 701 for execution.
  • the processor 701 is configured to execute application code stored in the memory 703.
  • the processor 701 may include one or more CPUs, such as CPU0 and CPU1 in FIG.
  • computer device 700 can include multiple processors, such as processor 701 and processor 708 in FIG. Each of these processors can be a single-CPU processor or a multi-core processor.
  • a processor herein may refer to one or more devices, circuits, and/or processing cores for processing data, such as computer program instructions.
  • computer device 700 may also include an output device 705 and an input device 706.
  • Output device 705 is in communication with processor 701 and can display information in a variety of ways.
  • an output device The 705 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector.
  • Input device 706 is in communication with processor 701 and can accept user input in a variety of ways.
  • input device 706 can be a mouse, keyboard, touch screen device, or sensing device, and the like.
  • the computer device 700 described above can be a general purpose computer device or a special purpose computer device.
  • the computer device 700 can be a desktop computer, a portable computer, a network server, a personal digital assistant (PDA), a mobile phone, a tablet, a wireless terminal device, a communication device, an embedded device, or have the same FIG. A device of similar structure.
  • PDA personal digital assistant
  • Embodiments of the invention do not limit the type of computer device 700.
  • the SDN repeater in FIG. 1 may be the device shown in FIG. 7, and one or more software modules are stored in the memory of the SDN forwarder.
  • the SDN transponder can implement the software module through the processor and the program code in the memory, and realize the connection between the SDN transponder and the SDN controller.
  • the address distribution server of FIG. 1 may be the device shown in FIG. 7, and one or more software modules are stored in the memory of the address distribution server.
  • the address distribution server can implement the software module through the processor and the program code in the memory, and realize the allocation of the address of the DN controller to the SDN forwarder, so as to establish a connection between the SDN forwarder and the SDN controller.
  • the embodiment of the present invention further provides a computer storage medium for storing computer software instructions used by the apparatus for implementing the connection between the SDN repeater and the SDN controller shown in FIG. 1-6, which is configured to perform the foregoing method implementation.
  • the program code designed by the example. By executing the stored program code, the SDN forwarder can automatically obtain the SDN controller address from the address allocation server, without manually modifying the configuration file of the SDN forwarder, thereby improving service delivery and network operation and maintenance efficiency.
  • the embodiment of the invention also provides a computer program product.
  • the computer program product includes computer software instructions that are loadable by a processor to implement the methods of the above method embodiments.
  • the term "and/or” is merely an association relationship describing an associated object, indicating that there may be three relationships.
  • a and/or B may indicate that A exists separately, and A and B exist simultaneously, and B cases exist alone.
  • the character "/" in this article generally indicates that the contextual object is an "or" relationship.
  • embodiments of the present application can be provided as a method, apparatus (device), or computer program product.
  • the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware aspects, which are collectively referred to herein as "module” or “system.”
  • the application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) including computer usable program code.
  • the computer program is stored/distributed in a suitable medium, provided with other hardware or as part of the hardware, or in other distributed forms, such as over the Internet or other wired or wireless telecommunication systems.
  • the present application is a flowchart and/or a method of a method, apparatus (device) and computer program product with reference to embodiments of the present invention.
  • the block diagram is used to describe. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG.
  • These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

本申请提供了一种转发器与控制器建立连接的方法,该转发器和该控制器为SDN转发器和SDN控制器,所述SDN还包括地址分配服务器,该方法包括:所述SDN转发器从所述地址分配服务器获取自身的地址;所述SDN转发器发送地址请求报文给所述地址分配服务器,所述地址请求报文用于获取所述SDN控制器的第一地址;所述SDN转发器接收所述地址分配服务器发送的第一地址分配报文,所述第一地址分配报文携带有所述SDN控制器的第一地址;所述SDN转发器从所述第一地址分配报文中提取SDN控制器的第一地址,然后根据SDN控制器的第一地址与SDN控制器建立连接。在该方案中,SDN转发器上电后能够自动获取SDN控制器地址,无需修改SDN转发器的配置文件,提高了业务发放和网络运维效率。

Description

转发器和控制器建立连接的方法和装置 技术领域
本申请涉及通信技术领域,尤其涉及一种转发器和控制器建立连接的方法和装置。
背景技术
软件定义网络(software Defined Network,SDN)是一种新型网络创新架构,SDN包括SDN控制器(Controller)以及SDN转发器(Switch)(也可以称之为交换机、路由设备等,下文中统称为SDN转发器),SDN控制器是SDN网络的逻辑控制中心,它通过南向接口与交换设备连接,向交换设备提供网络指令,并管理交换设备之间的网络拓扑,通过北向接口与应用服务器连接,SDN转发器听命于SDN控制器,其转发所依赖的数据完全来自于SDN控制器。
现在SDN的核心技术是基于开放流协议(OpenFlow Protocol)来实现。SDN转发器会在本地维护一个流表(Flow Table),流表中包括多个流表项,如果要转发的包在流表中有对应的流表项,则根据流表对包进行转发,如果流表中没有对应的流表项,则转发器会向控制器请求指令,控制器收到转发器请求后会给转发器下发流表的流表项,转发器得到下发的流表项后添加到流表项,从而根据新的流表对包进行转发。
SDN转发器启动后,需要获取SDN控制器的地址,然后与SDN控制器建立OpenFlow连接,由SDN控制器通过下发流表来指导转发。目前的实现方式是SDN转发器通过启动脚本或者手工配置方式获取SDN控制器的地址。这种方式需要修改所有SDN转发器的配置文件,对于部署大量SDN转发器的场景来说,工作量大,导致业务发放和网络运行维护效率低。
发明内容
本发明实施例提供了一种转发器与控制器建立连接的方法和装置,实现转发器能够自动获取控制器的地址,提高了业务发放和网络运维效率。
第一方面,提供了一种转发器与控制器建立连接的方法,该转发器和该控制器为SDN转发器和SDN控制器,所述SDN还包括地址分配服务器,所述SDN转发器分别与所述地址分配服务器和所述SDN控制器相连,所述地址分配服务器与所述SDN控制器连接,该方法包括:所述SDN转发器从所述地址分配服务器获取自身的地址;所述SDN转发器发送地址请求报文给所述地址分配服务器,所述地址请求报文用于获取所述SDN控制器的第一地址;所述SDN转发器接收所述地址分配服务器发送的第一地址分配报文,所述第一地址分配报文携带有所述SDN控制器的第一地址;所述SDN转发器从所述第一地址分配报文中提取SDN控制器的第一地址,然后根据所述SDN控制器的第一地址与所述SDN控制器建立连接。在该方案中,SDN转发器通过发送地址请求报文给地址分配服务器,地址分配服务器通过地址分配报文将SDN控制器的地址发送给SDN转发器,SDN转发器根据所述SDN控制器的地址与SDN控制器建立连接。SDN转发器上电后能够自动获取SDN控制 器地址,无需修改SDN转发器的配置文件,提高了业务发放和网络运维效率。
其中一种设计中,所述的方法进一步包括:所述SDN转发器接收所述地址分配服务器发送的第二地址分配报文,所述第二地址分配报文携带有所述SDN控制器的第二地址;所述SDN转发器从所述第二地址分配报文中提取所述SDN控制器的第二地址,然后根据所述SDN控制器的第二地址与所述SDN控制器建立连接。
其中一种设计中,所述的方法进一步包括:所述地址分配服务器接收所述地址请求报文后,确认所述地址请求报文是否携带有用于获取所述SDN控制器地址的预设字段,如果携带,则发送第一地址分配报文给所述SDN转发器,所述第一地址分配报文携带有所述SDN控制器的第一地址。
其中一种设计中,所述SDN控制器的第一地址和第二地址均包括主SDN控制器地址和/或备SDN控制器地址。
其中一种设计中,所述地址请求报文为动态主机配置协议发现报文,所述地址分配服务器为动态主机配置协议服务器。
第二方面,提供了一种SDN转发器,包括:
第一端口,用于连接地址分配服务器;
第二端口,用于连接SDN控制器;
第一发送单元,用于发送地址请求报文给所述地址分配服务器,所述地址请求报文用于获取所述SDN控制器的第一地址;
第一接收单元,用于从所述地址分配服务器获取地址以及接收所述地址分配服务器发送的第一地址分配报文,所述第一地址分配报文携带有所述SDN控制器的第一地址;
第一处理单元,用于生成所述地址请求报文以及从所述第一地址分配报文中提取SDN控制器的第一地址,然后根据所述SDN控制器的第一地址与所述SDN控制器建立连接。
其中一种设计中,所述第一接收单元,还用于接收所述地址分配服务器发送的第二地址分配报文,所述第二地址分配报文携带有所述SDN控制器的第二地址;
所述第一处理单元,还用于从所述第二地址分配报文中提取所述SDN控制器的第二地址,然后根据所述SDN控制器的第二地址与所述SDN控制器建立连接。
其中一种设计中,所述SDN控制器第一地址和第二地址包括主SDN控制器地址和/或备SDN控制器地址。
其中一种设计中,所述地址请求报文为动态主机配置协议发现报文。
第三方面,提供了一种地址分配服务器,包括:
第二接收单元,用于接收SDN转发器发送的地址请求报文,所述地址请求报文用于获取所述SDN控制器的第一地址;
第二处理单元,用于生成第一地址分配报文;
第二发送单元,用于发送所述第一地址分配报文给所述SDN转发器,所述第一地址分配报文携带有所述SDN控制器的第一地址,所述SDN转发器从所述第一地址分配报文中提取SDN控制器的第一地址,然后根据所述SDN控制器的第一地址与所述SDN控制器建立连接。
其中一种设计中,所述第二处理单元,还用于确认所述地址请求报文是否携带有用于获取所述SDN控制器地址的预设字段,如果携带,则发送第一地址分配报文给所述SDN 转发器,所述第一地址分配报文携带有所述SDN控制器的第一地址。
其中一种设计中,所述第二处理单元还用于生成第二地址分配报文;所述第二发送单元还用于:发送第二地址分配报文给所述SDN转发器,所述第二地址分配报文携带有所述SDN控制器的第二地址,所述SDN转发器从所述第二地址分配报文中提取所述SDN控制器的第二地址,然后根据所述SDN控制器的第二地址与所述SDN控制器建立连接。
其中一种设计中,所述SDN控制器第一地址和第二地址包括主SDN控制器地址和/或备SDN控制器地址。
其中一种设计中,所述地址分配服务器为动态主机配置协议服务器。
第四方面,提供了一种通信装置,包括:处理器、存储器、总线和通信接口;该存储器用于存储计算机执行指令,该处理器与该存储器通过该总线连接,当该设备运行时,该处理器执行该存储器存储的该计算机执行指令,以使该实现SDN转发器和SDN控制器建立连接的装置执行上述第一方面任意一项的方法。
第五方面,本发明的实施例提供一种软件定义网络系统,包括上述方法实施例中或装置实施例中的地址分配服务器、SDN转发器和SDN控制器。
第六方面,本发明实施例提供了一种计算机存储介质,用于储存为上述SDN转发器或地址分配服务器所用的计算机软件指令,其包含用于执行上述方面为SDN转发器或地址分配服务器所设计的程序。
第六方面,本发明实施例提供了一种计算机程序产品。该计算机程序产品包括计算机软件指令,该计算机软件指令可通过处理器进行加载来实现上述第一方面中任意一项的SDN转发器与SDN控制器建立连接的方法中的流程。
另外,第二方面至第六方面中任一种设计方式所带来的技术效果可参见第一方面中不同设计方式所带来的技术效果,此处不再赘述。
附图说明
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本发明实施例的SDN的一个示意图。
图2是根据本发明实施例的SDNSDN转发器和SDN控制器建立连接的方法的示意性流程图。
图3是本发明实施例的SDNSDN转发器和SDN控制器建立连接的方法的交互流程图。
图4是根据本发明实施例的SDN转发器的示意图。
图5是根据本发明实施例的地址分配服务器的示意图。
图6是根据本发明实施例的SDN系统的示意图。
图7是根据本发明实施例的一种计算机设备的示意图。
具体实施方式
下面结合附图,对本发明的实施例进行描述。
本发明实施例及以下各实施例中,主要基于由开放流OpenFlow协议中的开放流转发器 (OpenFlow Switch,OFS)以及开放流控制器(OpenFlow Controller,OFC)构成的OpenFlow SDN网络为例对本方案进行具体介绍,本领域技术人员可以将SDN控制器等同成OFC,将SDN交换机等同成OFS。当然,本发明各实施例中基于OpenFlow网络的相关方案也同样适用于其他类似协议实现的SDN网络。本实施例中,SDN网络中并不需要传统交换机,并且,控制面以及数据面都基于同一个物理网,例如,基于OpenFlow网络实现时,OFS中的一个物理端口既用于收发控制包,也用于收发包。SDN一般采用控制面和数据面分离的方式来获取流表。本实施例及以下各实施例中,“控制面”的概念与现有技术中“控制面”的概念类似,即一些相关节点(如OFC以及各OFS)以及这些节点之间的链路组成一个用于传输控制消息的网络平面,通过相互之间的控制消息的交互,让OFS获取由OFC下发的流表项,只不过相比于现有技术,并不需要传统交换机来完成。“数据面”的概念也与背景技术中提到的类似,即一些相关节点(OFC以及各OFS)以及这些节点之间的链路组成一个用于传输数据信息的网络平面,当各个OFS收到OFC下发的流表项后,OFS根据流表项对接收的包进行转发。
图1是本发明实施例的SDN网络的一个示意图。如图1所示,SDN100包括一个或多个SDN转发器(图中以多个SDN转发器作为示例,如SDN转发器110,112,114,116,118,119),SDN控制器120和地址分配服务器130。每个SDN转发器可以分别与地址分配服务器130和多个SDN控制器相连。前述SDN控制器120可以是对外体现为一个SDN控制器的形式表现,其中SDN控制器也可以由多个SDN控制器集成而成。多个控制器可以是主备关系,也可以是共同分担关系。其中SDN转发器由硬件实现,SDN控制器可以由硬件实现,也可以由软件实现。SDN转发器负责数据层的转发;SDN控制器负责对网络进行集中控制,实现控制层的功能。转发器与控制器之间通过控制协议进行通信。一个转发器可以与一个或多个其它的转发器相连,也可以与一个或多个发送/接收报文的实体(例如,固定终端、移动终端、个人电脑等)相连。SDN网络中,不同的SDN控制器可能支持不同的控制转发协议,不同的SDN转发器也可能支持不同的控制转发协议。通常,SDN控制器中设置有多个支持不同控制转发协议的插件;SDN控制器根据目标SDN转发器所支持的控制转发协议类型,调用相应的插件对转发控制信令进行格式封装,封装后的转发控制信令即可被该目标SDN转发器成功接收并执行,从而完成相应的报文转发业务。
应理解,地址分配服务器这个名字本身对设备不构成限定,实际中,可以为其他名字,比如:地址服务器或地址控制器。SDN转发器这个名字本身对设备不构成限定,实际中,可以为其他名字,比如:SDN交换机、SDN转发平台或者SDN转发设备等等。SDN控制器这个名字本身对设备不构成限定,实际中,可以为其他名字,比如:SDN控制平台等等。在此进行统一说明,以下不再赘述。
图2示出了根据本发明实施例的SDN转发器与SDN控制器建立连接的方法200的示意性流程图。该场景下SDN除了包括SDN转发器以及多个SDN控制器之外,还包括地址分配服务器,SDN转发器分别与地址分配服务器和多个SDN控制器相连,例如,该网络可以是图1所示的网络。该方法200由SDN转发器(例如图1中的SDN转发器110)执行。如图2所示,该方法200包括:
S210,SDN转发器从地址分配服务器获取自身的地址,跟地址分配服务器建立连接。
S220,该SDN转发器发送地址请求报文给该地址分配服务器,该地址请求报文用于获 取该SDN控制器的第一地址。
S230,该SDN转发器接收所述地址分配服务器发送的第一地址分配报文,该第一地址分配报文携带有SDN控制器的第一地址。
其中,地址分配服务器接收地址请求报文后,确认是否携带有用于获取所述SDN控制器地址的预设字段,预设字段可以是预留的空白字段,专门用于地址分配服务器将SDN控制器的第一地址填充到该空白字段。如果携带,则将SDN控制器的第一地址填充到该空白字段,得到第一地址分配报文,然后发送携带有SDN控制器第一地址的第一地址分配报文给SDN转发器。
需要说明的是,SDN控制器的第一地址和第二地址包括主SDN控制器地址和/或备SDN控制器地址。对于OpenFlow SDN来说,第一地址和第二地址为IP地址,SDN转发器根据第一地址和第二地址与SDN控制器建立传输控制协议(Transmission Control Protocol,TCP)连接。对于采用其他协议比如网络配置协议(netconf)、Open vSwitch数据库管理协议(Open vSwitch database management protocol,OVSDB)、路径计算单元协议(path computation element protocol,PCEP)的SDN来说,SDN控制器的地址可以是IP地址,也可以是其他类型的地址比如MAC地址等等,不做限制。
S240,SDN转发器从第一地址分配报文中提取SDN控制器的第一地址,然后根据SDN控制器的第一地址与SDN控制器建立连接。
其他实施例中,如果SDN控制器的地址发生了变化,地址分配服务器主动推送报文通知SDN转发器,上述实施例还可以包括步骤:
S250,SDN转发器接收地址分配服务器发送的第二地址分配报文,其中第二地址分配报文携带有SDN控制器的第二地址。
S260,SDN转发器从所述第二地址分配报文中提取SDN控制器的第二地址,然后根据SDN控制器的第二地址与SDN控制器建立连接。
应理解,在本发明的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。
本发明实施例中,SDN转发器上电后通过发送地址请求报文给地址分配服务器,地址分配服务器通过地址分配报文将SDN控制器的地址发送给SDN转发器,SDN转发器根据SDN控制器的地址与SDN控制器建立连接。本技术方案中SDN转发器上电后能够自动从地址分配服务器获取SDN控制器的地址,无需人工修改SDN转发器的配置文件,提高了业务发放和网络运维效率。
可选地,作为本发明的一个实施例,该地址请求报文为DHCP发现报文(DHCP Discover),SDN转发器上电后发送DHCP Discover报文。该Discover报文中新增一个Option,专门用于获取SDN控制器地址。DHCP服务器上提前配置好主、备SDN控制器地址。收到Discover报文后进行检查,如果未携带Controller IP的Option,则按普通DHCP报文处理,否则认为是SDN转发器发送的地址请求报文,然后发送携带有SDN控制器的第一地址的第一地址分配报文给SDN转发器。
图3是本发明实施例的网络虚拟化的方法的交互流程图。图3中的转发设备可以是图1中的任意一个转发设备;SDN控制器可以是图1中的SDN控制器,地址分配服务器可以是 图1中的地址分配服务器103。
301,SDN转发器从所述地址分配服务器获取自身的地址。
302,SDN转发器发送地址请求报文给该地址分配服务器,该地址请求报文用于获取该SDN控制器的第一地址。
303,该SDN转发器接收所述地址分配服务器发送的第一地址分配报文,该第一地址分配报文携带有SDN控制器的第一地址。
其中,地址分配服务器接收地址请求报文后,确认是否携带有用于获取所述SDN控制器地址的预设字段,预设字段可以是预留的空白字段,专门用于地址分配服务器将SDN控制器的第一地址填充到该空白字段。如果携带,则将SDN控制器的第一地址填充到该空白字段,得到第一地址分配报文,然后发送携带有SDN控制器第一地址的第一地址分配报文给SDN转发器。
需要说明的是,SDN控制器的第一地址和第二地址包括主SDN控制器地址和/或备SDN控制器地址。对于OpenFlow SDN来说,第一地址和第二地址为IP地址,SDN转发器根据第一地址和第二地址与SDN控制器建立传输控制协议(Transmission Control Protocol,TCP)连接。对于采用其他协议比如网络配置协议(netconf)、Open vSwitch数据库管理协议(Open vSwitch database management protocol,OVSDB)、路径计算单元协议(path computation element protocol,PCEP)的SDN来说,SDN控制器的地址可以是IP地址,也可以是其他类型的地址比如MAC地址等等,不做限制。
304,SDN转发器从第一地址分配报文中提取SDN控制器的第一地址,然后根据SDN控制器的第一地址与所述SDN控制器建立连接。
其中,如果SDN控制器的地址发生了变化,地址分配服务器主动推送报文通知SDN转发器,上述实施例还可以包括步骤:
305,地址分配服务器检测到SDN控制器的地址发生了改变。
306,SDN转发器接收所述地址分配服务器发送的第二地址分配报文,所述第二地址分配报文携带有所述SDN控制器的第二地址。
307,SDN转发器从所述第二地址分配报文中提取所述SDN控制器的第二地址,然后根据所述SDN控制器的第二地址与所述SDN控制器建立连接。
应理解,在本发明的各种实施例中,上述各过程的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本发明实施例的实施过程构成任何限定。
本发明实施例中,SDN转发器上电后通过发送地址请求报文给地址分配服务器,地址分配服务器通过地址分配报文将SDN控制器的地址发送给SDN转发器,SDN转发器根据所述SDN控制器的地址与SDN控制器建立连接。SDN转发器上电后能够自动从地址分配服务器获取SDN控制器的地址,无需人工修改SDN转发器的配置文件,提高了业务发放和网络运维效率。
下面将结合具体的例子详细描述本发明实施例。应注意,这只是为了帮助本领域技术人员更好地理解本发明实施例,而非限制本发明实施例的范围。
SDN转发器上电请求获取SDN控制器的地址,一种实现方式是发送DHCP发现(Discover)报文给SDN控制器。在DHCP发现报文中新增一个自定义的Option字段,用 于获取SDN控制器的第一地址。自定义的Option字段一种方式是采用类型长度值(type,length,value,TLV)格式,如下:
Option(XX)Controller IP
Length:8
Controller IP:0.0.0.0
Backup Controller IP:0.0.0.0
DHCP服务器上提前配置好主备SDN控制器的地址。收到DHCP发现报文后进行检查,如果未携带Controller IP的自定义的Option字段,则按普通DHCP报文处理。否则,认为是SDN转发器发送的地址请求报文,发送DHCP Offer报文时携带自定义的Option字段如下:
Option(XX)Controller IP
Length:8
Main Controller IP:1.1.1.1
Backup Controller IP:2.2.2.2
SDN转发器收到DHCP Offer报文后,从DHCP Offer报文中读取主、备SDN控制器的地址,SDN转发器根据所述SDN控制器的地址与SDN控制器建立TCP连接。
上文详细描述了根据本发明实施例SDN转发器与SDN控制器建立连接的方法,下面将描述根据本发明实施例的SDN转发器。
图4示出了根据本发明实施例的SDN转发器400的示意性框图。如图4所示,该SDN转发器400包括:
第一端口401,用于连接地址分配服务器;
第二端口402,用于连接SDN控制器;
第一发送单元403,用于从地址分配服务器获取自身的地址以及发送地址请求报文给地址分配服务器,该地址请求报文用于获取SDN控制器的第一地址;
第一接收单元404,接收地址分配服务器发送的第一地址分配报文,该第一地址分配报文携带有SDN控制器的第一地址;
第一处理单元405,用于生成地址请求报文以及从第一地址分配报文中提取SDN控制器的第一地址,然后根据该SDN控制器的第一地址与SDN控制器建立连接。
本发明实施例中,可选地,该第一接收单元404,还用于接收地址分配服务器发送的第二地址分配报文,第二地址分配报文携带有SDN控制器的第二地址。第一处理单元405,还用于从第二地址分配报文中提取SDN控制器的第二地址,然后根据SDN控制器的第二地址与SDN控制器建立连接。
在本发明实施例中,可选地,SDN控制器第一地址和第二地址包括主SDN控制器地址和/或备SDN控制器地址。主SDN控制器地址和备SDN控制器地址可以互相切换,或者在主SDN控制器地址无效的情况下临时切换到备SDN控制器地址。
可选地,作为本发明的一个实施例,该地址请求报文为DHCP Discover报文,SDN转发器上电后发送DHCP Discover报文。该Discover报文中新增一个Option,专门用于获取SDN控制器地址。DHCP服务器上提前配置好主、备SDN控制器地址。收到Discover报文后进行检查,如果未携带Controller IP的Option,则按普通DHCP报文处理,否则认为是 SDN转发器发送的地址请求报文,然后发送携带有SDN控制器的第一地址的第一地址分配报文给SDN转发器。
本发明实施例的SDN转发器,通过发送地址请求报文给地址分配服务器,地址分配服务器通过地址分配报文将SDN控制器的地址发送给SDN转发器,SDN转发器根据SDN控制器的地址与SDN控制器建立连接。SDN转发器上电后能够自动从地址分配服务器获取SDN控制器地址,无需人工修改SDN转发器的配置文件,提高了业务发放和网络运维效率。
图5示出了根据本发明实施例的地址分配服务器500的示意性框图。如图5所示,该地址分配服务器500包括:
第二接收单元501,用于接收SDN转发器发送的地址请求报文,其中该地址请求报文用于获取SDN控制器的第一地址;
第二处理单元502,用于生成第一地址分配报文;
第二发送单元503,用于发送第一地址分配报文给SDN转发器,其中该第一地址分配报文携带有SDN控制器的第一地址。SDN转发器从第一地址分配报文中提取SDN控制器的第一地址,然后根据SDN控制器的第一地址与SDN控制器建立连接。
在本发明实施例中,可选地,该第二处理单元502还进一步用于当第二接收单元510接收到SDN转发器发送的地址请求报文后确认该地址请求报文中是否携带有用于获取所述SDN控制器地址的预设字段,预设字段可以是预留的空白字段,专门用于地址分配服务器将SDN控制器的第一地址填充到该空白字段。如果携带,则将SDN控制器的第一地址填充到该空白字段,得到第一地址分配报文,然后发送携带有SDN控制器第一地址的第一地址分配报文给SDN转发器。
SDN控制器的地址发生改变后,第二处理单元502还用于生成第二地址分配报文,第二发送单元503还用于发送第二地址分配报文给SDN转发器,第二地址分配报文携带有SDN控制器的第二地址,SDN转发器从第二地址分配报文中提取SDN控制器的第二地址,然后根据SDN控制器的第二地址与SDN控制器建立连接。
可选地,作为本发明的一个实施例,该地址请求报文为DHCP Discover报文,SDN转发器上电后发送DHCP Discover报文。该Discover报文中新增一个Option,专门用于获取SDN控制器地址。DHCP服务器上提前配置好主、备SDN控制器地址。收到Discover报文后进行检查,如果未携带Controller IP的Option,则按普通DHCP报文处理,否则认为是SDN转发器发送的地址请求报文,然后发送携带有SDN控制器的第一地址的第一地址分配报文给SDN转发器。
图6示出了上述实施例中所涉及的一种实现SDN转发器和SDN控制器连接的系统。
该系统包括:SDN转发器601,SDN控制器602以及地址分配服务器603。
该SDN转发器601,用于从地址分配服务器获取自身的地址以及发送地址请求报文给地址分配服务器,该地址请求报文用于获取所述SDN控制器的第一地址;以及接收所述地址分配服务器发送的第一地址分配报文,第一地址分配报文携带有SDN控制器的第一地址,然后SDN转发器从第一地址分配报文中提取SDN控制器的第一地址,然后根据SDN控制器的第一地址与SDN控制器建立连接。
在一种具体实现中,SDN转发器601还接收所述地址分配服务器603发送的第二地址分配报文,第二地址分配报文携带有所述SDN控制器的第二地址。SDN转发器601从所述 第二地址分配报文中提取所述SDN控制器的第二地址,然后根据SDN控制器602的第二地址与SDN控制器重新建立连接。
该SDN控制器602,用于发送地址给地址分配服务器。
该地址分配服务器603,用于接收SDN转发器601发送的地址请求报文,地址请求报文用于获取SDN控制器的第一地址;以及生成第一地址分配报文;以及发送第一地址分配报文给SDN转发器,第一地址分配报文携带有SDN控制器的第一地址。
在一种具体实现中,该地址分配服务器603生成第二地址分配报文。第二发送单元还用于:发送第二地址分配报文给SDN转发器,第二地址分配报文携带有SDN控制器的第二地址,SDN转发器从第二地址分配报文中提取SDN控制器的第二地址,然后根据SDN控制器的第二地址与SDN控制器重新建立连接。
上述方法实施例涉及的各步骤的所有相关内容均可以援引到该系统中各设备,在此不再赘述。
上述的SDN转发器601或地址分配服务器603可以通过如图7所示的计算机设备(或系统)来实现。图7所示为本发明实施例提供的计算机设备示意图。计算机设备700包括至少一个处理器701,通信总线702,存储器703以及至少一个通信接口704。
处理器701可以是一个通用中央处理器(CPU),微处理器,特定应用集成电路(application-specific integrated circuit,ASIC),或一个或多个用于控制本发明方案程序执行的集成电路。
通信总线702可包括一通路,在上述组件之间传送信息。通信接口704,使用任何收发器一类的装置,用于与其他设备或通信网络通信,如以太网,无线接入网(RAN),无线局域网(Wireless Local Area Networks,WLAN)等。
存储器703可以是只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)或者可存储信息和指令的其他类型的动态存储设备,也可以是电可擦可编程只读存储器(Electrically Erasable Programmable Read-Only Memory,EEPROM)、只读光盘(Compact Disc Read-Only Memory,CD-ROM)或其他光盘存储、光碟存储(包括压缩光碟、激光碟、光碟、数字通用光碟、蓝光光碟等)、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质,但不限于此。存储器可以是独立存在,通过总线与处理器相连接。存储器也可以和处理器集成在一起。
其中,所述存储器703用于存储执行本发明方案的应用程序代码,并由处理器701来控制执行。所述处理器701用于执行所述存储器703中存储的应用程序代码。
在具体实现中,作为一种实施例,处理器701可以包括一个或多个CPU,例如图7中的CPU0和CPU1。
在具体实现中,作为一种实施例,计算机设备700可以包括多个处理器,例如图7中的处理器701和处理器708。这些处理器中的每一个可以是一个单核(single-CPU)处理器,也可以是一个多核(multi-CPU)处理器。这里的处理器可以指一个或多个设备、电路、和/或用于处理数据(例如计算机程序指令)的处理核。
在具体实现中,作为一种实施例,计算机设备700还可以包括输出设备705和输入设备706。输出设备705和处理器701通信,可以以多种方式来显示信息。例如,输出设备 705可以是液晶显示器(liquid crystal display,LCD),发光二级管(light emitting diode,LED)显示设备,阴极射线管(cathode ray tube,CRT)显示设备,或投影仪(projector)等。输入设备706和处理器701通信,可以以多种方式接受用户的输入。例如,输入设备706可以是鼠标、键盘、触摸屏设备或传感设备等。
上述的计算机设备700可以是一个通用计算机设备或者是一个专用计算机设备。在具体实现中,计算机设备700可以是台式机、便携式电脑、网络服务器、掌上电脑(Personal Digital Assistant,PDA)、移动手机、平板电脑、无线终端设备、通信设备、嵌入式设备或有图7中类似结构的设备。本发明实施例不限定计算机设备700的类型。
示例性的,图1中的SDN转发器可以为图7所示的设备,SDN转发器的存储器中存储了一个或多个软件模块。SDN转发器可以通过处理器以及存储器中的程序代码来实现软件模块,实现SDN转发器与SDN控制器建立连接。
又或者,图1中的地址分配服务器可以为图7所示的设备,地址分配服务器的存储器中存储了一个或多个软件模块。地址分配服务器可以通过处理器以及存储器中的程序代码来实现软件模块,实现分配DN控制器的地址给SDN转发器,实现SDN转发器与SDN控制器建立连接。
本发明实施例还提供了一种计算机存储介质,用于储存为上述图1-6所示的实现SDN转发器和SDN控制器连接的装置所用的计算机软件指令,其包含用于执行上述方法实施例所设计的程序代码。通过执行存储的程序代码,SDN转发器能够自动从地址分配服务器获取SDN控制器地址,无需人工修改SDN转发器的配置文件,提高了业务发放和网络运维效率。
本发明实施例还提供了计算机程序产品。该计算机程序产品包括计算机软件指令,该计算机软件指令可通过处理器进行加载来实现上述方法实施例中的方法。
尽管在此结合各实施例对本发明进行了描述,然而,在实施所要求保护的本发明过程中,本领域技术人员通过查看所述附图、公开内容、以及所附权利要求书,可理解并实现所述公开实施例的其他变化。在权利要求中,“包括”(comprising)一词不排除其他组成部分或步骤,“一”或“一个”不排除多个的情况。单个处理器或其他单元可以实现权利要求中列举的若干项功能。相互不同的从属权利要求中记载了某些措施,但这并不表示这些措施不能组合起来产生良好的效果。
应理解,在本发明实施例中,术语“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系。例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,一般表示前后关联对象是一种“或”的关系。
本领域技术人员应明白,本申请的实施例可提供为方法、装置(设备)、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式,这里将它们都统称为“模块”或“系统”。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。计算机程序存储/分布在合适的介质中,与其它硬件一起提供或作为硬件的一部分,也可以采用其他分布形式,如通过Internet或其它有线或无线电信系统。
本申请是参照本发明实施例的方法、装置(设备)和计算机程序产品的流程图和/或方 框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管结合具体特征及其实施例对本发明进行了描述,显而易见的,在不脱离本发明的精神和范围的情况下,可对其进行各种修改和组合。相应地,本说明书和附图仅仅是所附权利要求所界定的本发明的示例性说明,且视为已覆盖本发明范围内的任意和所有修改、变化、组合或等同物。显然,本领域的技术人员可以对本发明进行各种改动和变型而不脱离本发明的精神和范围。这样,倘若本发明的这些修改和变型属于本发明权利要求及其等同技术的范围之内,则本发明也意图包含这些改动和变型在内。

Claims (15)

  1. 一种转发器与控制器建立连接的方法,其特征在于,所述转发器和SDN控制器为SDN转发器和SDN控制器,所述SDN还包括地址分配服务器,所述SDN转发器分别与所述地址分配服务器和所述SDN控制器相连,所述地址分配服务器与所述SDN控制器连接,所述方法包括:
    所述SDN转发器从所述地址分配服务器获取自身的地址;
    所述SDN转发器发送地址请求报文给所述地址分配服务器,所述地址请求报文用于获取所述SDN控制器的第一地址;
    所述SDN转发器接收所述地址分配服务器发送的第一地址分配报文,所述第一地址分配报文携带有所述SDN控制器的第一地址;
    所述SDN转发器从所述第一地址分配报文中提取SDN控制器的第一地址,然后根据所述SDN控制器的第一地址与所述SDN控制器建立连接。
  2. 根据权利要求1所述的方法,其特征在于,进一步包括:
    所述SDN转发器接收所述地址分配服务器发送的第二地址分配报文,所述第二地址分配报文携带有所述SDN控制器的第二地址;
    所述SDN转发器从所述第二地址分配报文中提取所述SDN控制器的第二地址,然后根据所述SDN控制器的第二地址与所述SDN控制器建立连接。
  3. 根据权利要求1所述的方法,其特征在于,进一步包括:
    所述地址分配服务器接收所述地址请求报文后,确认所述地址请求报文是否携带有用于获取所述SDN控制器地址的预设字段,如果携带,则发送第一地址分配报文给所述SDN转发器,所述第一地址分配报文携带有所述SDN控制器的第一地址。
  4. 根据权利要求3所述的方法,其特征在于,
    所述SDN控制器的第一地址和第二地址均包括主SDN控制器地址和/或备SDN控制器地址。
  5. 根据权利要求1至4任一项所述的方法,其特征在于,所述地址请求报文为动态主机配置协议发现报文,所述地址分配服务器为动态主机配置协议服务器。
  6. 一种SDN转发器,其特征在于,包括:
    第一端口,用于连接地址分配服务器;
    第二端口,用于连接SDN控制器;
    第一发送单元,用于发送地址请求报文给所述地址分配服务器,所述地址请求报文用于获取所述SDN控制器的第一地址;
    第一接收单元,用于从所述地址分配服务器获取地址以及接收所述地址分配服务器发送的第一地址分配报文,所述第一地址分配报文携带有所述SDN控制器的第一地址;
    第一处理单元,用于生成所述地址请求报文以及从所述第一地址分配报文中提取SDN控制器的第一地址,然后根据所述SDN控制器的第一地址与所述SDN控制器建立连接。
  7. 根据权利要求6所述的SDN转发器,其特征在于,
    所述第一接收单元,还用于接收所述地址分配服务器发送的第二地址分配报文,所述第二地址分配报文携带有所述SDN控制器的第二地址;
    所述第一处理单元,还用于从所述第二地址分配报文中提取所述SDN控制器的第二地址,然后根据所述SDN控制器的第二地址与所述SDN控制器建立连接。
  8. 根据权利要求7所述的SDN转发器,其特征在于,
    所述SDN控制器第一地址和第二地址包括主SDN控制器地址和/或备SDN控制器地址。
  9. 根据权利要求6至8任一项所述的SDN转发器,其特征在于,所述地址请求报文为动态主机配置协议发现报文。
  10. 一种地址分配服务器,其特征在于,包括:
    第二接收单元,用于接收SDN转发器发送的地址请求报文,所述地址请求报文用于获取所述SDN控制器的第一地址;
    第二处理单元,用于生成第一地址分配报文;
    第二发送单元,用于发送所述第一地址分配报文给所述SDN转发器,所述第一地址分配报文携带有所述SDN控制器的第一地址,所述SDN转发器从所述第一地址分配报文中提取SDN控制器的第一地址,然后根据所述SDN控制器的第一地址与所述SDN控制器建立连接。
  11. 根据权利要求10所述的地址分配服务器,其特征在于,所述第二处理单元,还用于生成确认所述地址请求报文是否携带有用于获取所述SDN控制器地址的预设字段,如果携带,则发送第一地址分配报文给所述SDN转发器,所述第一地址分配报文携带有所述SDN控制器的第一地址。
  12. 根据权利要求10所述的地址分配服务器,其特征在于,所述第二处理单元还用于生成第二地址分配报文;所述第二发送单元还用于:发送第二地址分配报文给所述SDN转发器,所述第二地址分配报文携带有所述SDN控制器的第二地址,所述SDN转发器从所述第二地址分配报文中提取所述SDN控制器的第二地址,然后根据所述SDN控制器的第二地址与所述SDN控制器建立连接。
  13. 根据权利要求10至12任一项所述的地址分配服务器,其特征在于,所述SDN控制器第一地址和第二地址包括主SDN控制器地址和/或备SDN控制器地址。
  14. 根据权利要求10至12任一项所述的地址分配服务器,其特征在于,所述地址分配服务器为动态主机配置协议服务器。
  15. 一种通信装置,包括:处理器、存储器、总线和通信接口;该存储器用于存储计算机执行指令,该处理器与该存储器通过该总线连接,当该设备运行时,该处理器执行该存储器存储的该计算机执行指令,以使该实现SDN转发器和SDN控制器建立连接的装置执行所述权利要求1-5任意一项的方法。
PCT/CN2017/090898 2017-06-29 2017-06-29 转发器和控制器建立连接的方法和装置 WO2019000332A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/090898 WO2019000332A1 (zh) 2017-06-29 2017-06-29 转发器和控制器建立连接的方法和装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/090898 WO2019000332A1 (zh) 2017-06-29 2017-06-29 转发器和控制器建立连接的方法和装置

Publications (1)

Publication Number Publication Date
WO2019000332A1 true WO2019000332A1 (zh) 2019-01-03

Family

ID=64740744

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/090898 WO2019000332A1 (zh) 2017-06-29 2017-06-29 转发器和控制器建立连接的方法和装置

Country Status (1)

Country Link
WO (1) WO2019000332A1 (zh)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103209121A (zh) * 2013-03-15 2013-07-17 中兴通讯股份有限公司 基于开放流协议的控制面设备的发现处理方法及装置
CN103534992A (zh) * 2012-03-14 2014-01-22 华为技术有限公司 发送建立连接请求的方法、交换机、服务器及系统
CN104901825A (zh) * 2014-03-05 2015-09-09 杭州华三通信技术有限公司 一种实现零配置启动的方法和装置
WO2016206741A1 (en) * 2015-06-25 2016-12-29 Siemens Aktiengesellschaft Forwarding device, controller and method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103534992A (zh) * 2012-03-14 2014-01-22 华为技术有限公司 发送建立连接请求的方法、交换机、服务器及系统
CN103209121A (zh) * 2013-03-15 2013-07-17 中兴通讯股份有限公司 基于开放流协议的控制面设备的发现处理方法及装置
CN104901825A (zh) * 2014-03-05 2015-09-09 杭州华三通信技术有限公司 一种实现零配置启动的方法和装置
WO2016206741A1 (en) * 2015-06-25 2016-12-29 Siemens Aktiengesellschaft Forwarding device, controller and method

Similar Documents

Publication Publication Date Title
US12015503B2 (en) Virtual network communication method, device, and system
US11558346B2 (en) Address management method and system, and device
EP3471377B1 (en) Method, apparatus and system for selecting session management functional entity
US11563669B2 (en) Method for implementing network virtualization and related apparatus and communications system
WO2017113231A1 (zh) 一种报文传输的方法、装置和系统
JP6538986B2 (ja) 仮想マシンパケット制御
US20210274418A1 (en) Information Transmission Method and Apparatus
WO2015117401A1 (zh) 信息的处理方法及装置
WO2019062830A1 (zh) 实例业务拓扑的生成方法及装置
WO2016146077A1 (zh) 一种动态路由配置方法、装置及系统
WO2021136180A1 (zh) 一种业务处理的方法、装置和系统
WO2018153221A1 (zh) 传输网络中业务服务质量的控制方法、设备及系统
WO2017206183A1 (zh) 一种网络切片的确定方法、装置及系统
WO2018024121A1 (zh) 一种网络功能nf管理方法及nf管理设备
EP4247039A1 (en) Computing-aware session management method and communication device
WO2019120073A1 (zh) 数据传输方法、设备及系统
WO2018000202A1 (zh) 一种负载迁移方法、装置及系统
US20220086243A1 (en) Method, device, and system
WO2021254001A1 (zh) 会话建立方法、装置、系统及计算机存储介质
WO2020147081A1 (zh) 一种数据传输方法、相关设备及计算机存储介质
KR20190056914A (ko) 네트워크 슬라이스를 통한 서비스 제공 방법 및 장치
CN104320347B (zh) 一种主动更新lldp的方法及设备
WO2021012601A1 (zh) 报文处理方法、装置、设备及可读存储介质
WO2023273957A1 (zh) 算力发布方法、算力更新方法及装置
WO2020249032A1 (zh) 通信方法及装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17915863

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

Country of ref document: EP

Kind code of ref document: A1