CN107295113B - Network configuration method, switch and server - Google Patents

Network configuration method, switch and server Download PDF

Info

Publication number
CN107295113B
CN107295113B CN201610204202.7A CN201610204202A CN107295113B CN 107295113 B CN107295113 B CN 107295113B CN 201610204202 A CN201610204202 A CN 201610204202A CN 107295113 B CN107295113 B CN 107295113B
Authority
CN
China
Prior art keywords
address
switch
controller
network server
port number
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610204202.7A
Other languages
Chinese (zh)
Other versions
CN107295113A (en
Inventor
彭和平
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201610204202.7A priority Critical patent/CN107295113B/en
Publication of CN107295113A publication Critical patent/CN107295113A/en
Application granted granted Critical
Publication of CN107295113B publication Critical patent/CN107295113B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]

Landscapes

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

Abstract

The embodiment of the invention discloses a network configuration method, a switch and a server. The method is applied to an OpenFlow network, and the switch sends a DHCP client request message to a network server; the switch receives the first IP address and the second IP address sent by the network server, and the switch establishes connection with the controller according to the first IP address, the second IP address and the first monitoring port number. The embodiment of the invention greatly reduces the workload of IP address configuration in the OpenFlow network and is beneficial to subsequent updating and maintenance.

Description

Network configuration method, switch and server
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a network configuration method, a switch, and a server.
Background
The open flow (english: OpenFlow) technology was first proposed by stanford university, and OpenFlow networks generally include OpenFlow switches (english: OpenFlow Switch) and controllers (english: Controller). The OpenFlow technology converts a packet forwarding process originally controlled by a switch or a router into a packet forwarding process completed by an OpenFlow switch and a controller respectively. The flow direction of the data packet is specified by a switch or a router in the traditional network, and the flow direction is converted into a transmission path of the data packet in the network specified by the controller.
In an OpenFlow network, an OpenFlow switch establishes a Transmission Control Protocol (TCP) connection with a controller. The OpenFlow switch serves as a TCP client, and the controller serves as a TCP server. And the OpenFlow switch statically configures the IP address and the destination port number of the controller, and initiates TCP connection according to the IP address and the destination port number of the controller so as to establish connection with the controller.
In a larger OpenFlow network, the number of OpenFlow switches is large, and IP addresses of controllers need to be configured on all OpenFlow switches, which brings a large configuration workload.
Disclosure of Invention
The application provides a network configuration method, a switch and a server, which greatly reduce the workload of IP address configuration in an OpenFlow network and are beneficial to subsequent updating and maintenance.
In a first aspect, the present application provides a method for configuring a network, where the method is applied to an OpenFlow network, and the method includes:
the switch sends a DHCP client request message to the network server. The network server may be a Dynamic Host Configuration Protocol (DHCP) server. The DHCP client request message may be a DHCP discover (english: DHCP discover) message or a DHCP request (english: DHCP request) message.
The switch receives a first IP address and a second IP address sent by the network server, wherein the first IP address is an IP address distributed to the switch by the network server in response to the DHCP client request message. The network server may send the first IP address to the switch through a DHCP response message, which may be a DHCP offer (DHCP offer) message and/or a DHCP acknowledge (DHCP ACK) message. The Your IP address (yiaddr) field of the DHCP response message is the first IP address. In the OpenFlow network, the controller and the switch are configured, where the second IP address is an IP address of the controller, and the second IP address may also be sent to the switch by the network server together with the first IP address through a DHCP response message.
The switch establishes connection with the controller according to the first IP address, the second IP address and a first monitoring port number, wherein the first monitoring port number is a monitoring port number of the controller.
The switch in the OpenFlow network obtains the IP address of the controller from the network server, so that the workload of IP address configuration in the OpenFlow network is greatly reduced, and subsequent updating and maintenance are facilitated.
In an optional implementation, the first monitoring port number may be a default monitoring port number, the default monitoring port number may be preset, and the first monitoring port number may also be sent to the switch by the network server, for example, the first monitoring port number may also be sent to the switch by the network server through a DHCP response message together with the first IP address and the second IP address.
In an optional implementation, after the IP address of the controller in the network server is updated from the second IP address to the third IP address, the method further includes:
and if the switch determines that the connection established between the switch and the controller is invalid, the switch sends a DHCP (dynamic host configuration protocol) message to the network server so that the network server sends the third IP address of the controller.
The switch receives the third IP address from the network server.
And the switch reestablishes the connection with the controller according to the third IP address, the first IP address and a second monitoring port number, wherein the second monitoring port number is the first monitoring port number or the monitoring port number of the controller acquired by the network server after the IP address of the controller is updated.
After the IP address of the controller is updated, the switch in the OpenFlow network automatically acquires the updated IP address, so that the workload of configuring the IP address in the OpenFlow network is greatly reduced.
In another optional implementation, the DHCP client request message includes a device type identifier of a switch, where the device type identifier is used for determining, by the network server, that the switch is a switch in the OpenFlow network, at this time, the network server may determine, according to the device type identifier, whether the DHCP client request message is an effective request, and after determining that the DHCP client request message is a switch in the OpenFlow network, the network server sends information such as the first IP address, the second IP address, and the first monitoring port number.
In a second aspect, the present application provides a method of network configuration, the method comprising:
the network server receives a DHCP client request message sent by the switch;
the network server allocates a first IP address for the switch;
the network server acquires a second IP address of the controller;
the network server sends the first IP address and the second IP address to the switch.
In an alternative implementation, the obtaining, by the network server, the second IP address of the controller includes:
the network server receives the second IP address sent by the controller,
alternatively, the first and second electrodes may be,
the network server configures the second IP address for the controller.
In another optional implementation, the network server obtaining the second IP address of the controller further includes: and the network server receives the first monitoring port number, or the network server configures the first monitoring port number for the controller.
In another optional implementation, after the IP address of the controller in the network server is updated from the second IP address to a third IP address, the method further includes:
the network server receives a DHCP information message sent by the switch;
the network server acquires the third IP address;
the network server sends the third IP address to the switch.
In a third aspect, the present application provides a switch, comprising:
a sending unit, configured to send a DHCP client request message to a network server;
a receiving unit, configured to receive a first IP address and a second IP address sent by the network server, where the first IP address is an IP address allocated to the switch by the network server in response to the DHCP client request packet, the second IP address is an IP address of a controller, and the controller and the switch are in the OpenFlow network;
and the processing unit is used for establishing connection with the controller according to the first IP address, the second IP address and a first monitoring port number, wherein the first monitoring port number is the monitoring port number of the controller.
In an optional implementation, after the IP address of the controller in the network server is updated from the second IP address to a third IP address, the sending unit is further configured to send a DHCP information packet to the network server if the switch determines that the connection established with the controller is failed, so that the network server sends the third IP address of the controller;
the receiving unit is further configured to receive the third IP address from the network server;
the processing unit is further configured to reestablish a connection with the controller according to the third IP address, the first IP address, and the second monitoring port number, where the second monitoring port number is the first monitoring port number, or the monitoring port number of the controller acquired by the network server after the IP address of the controller is updated.
In another optional implementation, the DHCP client request packet includes a device type identifier of the switch, where the device type identifier is used for the network server to determine that the switch is a switch in an OpenFlow network.
In a fourth aspect, the present application provides a network server, comprising:
a receiving unit, configured to receive a DHCP client request message sent by the switch;
the distribution unit is used for distributing a first IP address for the switch;
an acquisition unit configured to acquire a second IP address of the controller;
a sending unit, configured to send the first IP address and the second IP address to the switch.
In an optional implementation, the receiving unit is further configured to receive the second IP address sent by the controller, or the allocating unit is further configured to configure the second IP address for the controller.
In another optional implementation, after the IP address of the controller in the network server is updated from the second IP address to a third IP address, the receiving unit is further configured to receive a DHCP information packet sent by the switch;
the obtaining unit is further configured to obtain the third IP address;
the sending unit is further configured to send the third IP address to the switch.
In a fifth aspect, the present application provides a switch comprising a processor and a communication interface, wherein the processor is configured to: said processor being configured to:
sending a DHCP client request message to a network server through the communication interface;
receiving a first IP address and a second IP address sent by the network server through the communication interface, wherein the first IP address is an IP address distributed to the switch by the network server in response to the DHCP client request message, the second IP address is an IP address of a controller, and the controller and the switch are in an OpenFlow network;
and establishing connection with the controller according to the first IP address, the second IP address and a first monitoring port number, wherein the first monitoring port number is the monitoring port number of the controller.
In an optional implementation, after the IP address of the controller in the network server is updated from the second IP address to a third IP address, the processor is further configured to:
if the connection established between the network server and the controller is determined to be invalid, sending a DHCP information message to the network server through the communication interface so that the network server sends a third IP address of the controller;
receiving the third IP address from the network server through the communication interface;
and reestablishing the connection with the controller according to the third IP address, the first IP address and a second monitoring port number, wherein the second monitoring port number is the first monitoring port number or the monitoring port number of the controller acquired by the network server after the IP address of the controller is updated.
In another optional implementation, the DHCP client request packet includes a device type identifier of the switch, where the device type identifier is used for the network server to determine that the switch is a switch in an OpenFlow network.
In a sixth aspect, the present application provides a network server comprising a processor and a transceiver,
the transceiver is used for receiving a DHCP client request message sent by the switch;
the processor is used for acquiring a second IP address of the controller, allocating a first IP address to the switch, and sending the first IP address and the second IP address to the switch through the transceiver.
In an optional implementation, the processor is configured to receive, through the transceiver, the second IP address sent by the controller, or configure the second IP address for the controller.
In another optional implementation, after the IP address of the controller in the network server is updated from the second IP address to a third IP address, the transceiver is further configured to receive a DHCP information packet sent by the switch; the processor is further configured to obtain a third IP address of the controller and send the third IP address to the switch.
In a seventh aspect, an embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a program, and when the program is executed, the program includes some or all of the steps of at least the method for configuring a network described in the foregoing method embodiments.
Drawings
Fig. 1 is a schematic diagram of an OpenFlow network architecture according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an embodiment of a method for network configuration in an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an embodiment of a switch in the embodiment of the present invention;
fig. 4 is a schematic structural diagram of another embodiment of a switch in the embodiment of the present invention;
FIG. 5 is a block diagram illustrating an embodiment of a network server according to the present invention;
fig. 6 is a schematic structural diagram of another embodiment of the network server in the embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a network configuration method, a switch and a server, which greatly reduce the workload of IP address configuration in an OpenFlow network and are beneficial to subsequent updating and maintenance.
The terms "first," "second," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. .
As shown in fig. 1, which is an OpenFlow network architecture diagram in an embodiment of the present invention, an OpenFlow network in the embodiment of the present invention includes at least one OpenFlow switch, a controller, and a network server, where each OpenFlow switch may be connected to one or more terminals. In the embodiment of the present invention, the OpenFlow switch is referred to as a switch for short, the OpenFlow controller is referred to as a controller for short, the network server may be a Dynamic Host Configuration Protocol (DHCP) server, and the network server may be configured to allocate an IP address to the controller or the switch.
An embodiment of a method for network configuration in an embodiment of the present invention is described below.
Referring to fig. 2, an embodiment of a method for network configuration according to an embodiment of the present invention is applied to the OpenFlow network shown in fig. 1, where the method includes:
201. the switch sends a DHCP client request message to the network server.
The network server may be a Dynamic Host Configuration Protocol (DHCP) server, and the DHCP client request message may be a DHCP discover (english: DHCP discover) message or a DHCP request (english: DHCP request) message.
The DHCP client request message may include a device type identifier of the switch, so that the network server determines that the switch is a switch in an OpenFlow network. For example, in the DHCP client request message, a DHCP Option (english: Option) is added to identify that the client type is a switch. For example, the Option may be Option 224. The value field of the Option224 is "1" to define that the device sending the DHCP client request message is a switch, and the value field of the Option224 is "2" to define that the device sending the DHCP client request message is a controller.
At this time, the network server receives a DHCP client request message sent by the switch.
202. The network server allocates a first IP address to the switch.
The first IP address is an IP address distributed to the switch by the network server after receiving the DHCP client request message, and the second IP address is an IP address of the controller acquired by the network server in advance.
203. The network server obtains a second IP address of the controller.
The obtaining, by the network server, the second IP address of the controller may include: and the network server receives the second IP address sent by the controller, or the network server configures the second IP address for the controller.
204. The network server sends the first IP address and the second IP address to the switch;
the network server may send a DHCP response message to the switch to send the first IP address and the second IP address. The DHCP response message may be a DHCP offer (DHCP offer) message and/or a DHCP acknowledge (DHCPACK) message. The Your IP address (yiaddr) field of the DHCP response message is the first IP address. Optionally, the network server may further send the first listening port number to the switch.
The network server may add a DHCP option to the DHCP offer message and/or the DHCPACK message. The DHCP Option may be Option225, for example. The second IP address and the first listening port number information may be added in the DHCP option. The DHCP Option may include only the second I P address, and the IP address may be denoted by ipaddr, for example, when the Option is the Option225, the Option225 ═ ipaddr ═ 10.10.10.5 ". If the first listening port number is not included in the DHCP option, the first listening port number is a default port number, which may be 6633. Optionally, the DHCP Option may further include at least one of a listening port number and an IP address type, for example, in the Option225, the first listening port number is included, and the IP address is: 10.10.10.5, the first listening port number is 6633. For example, the representation may be port 6633. An IP address type, such as internet Protocol version 4 (IPv 4) or IPv6, may be denoted by type, e.g., type IPv 4. If Option225 equals to "ipaddr equals to 10.10.10.5; 6633; type is IPv4, "i.e., it means that the second IP address is 10.10.10.5, the first listening port number is 6633, and the second IP address type is IPv 4.
At this time, the switch receives the first IP address and the second IP address sent by the network server, or the switch receives the first IP address, the second IP address and the first monitoring port number sent by the network server.
205. And the switch establishes connection with the controller according to the first IP address, the second IP address and the first monitoring port number.
In the embodiment of the invention, the switch in the OpenFlow network acquires the IP address and the monitoring port number of the controller from the network server, so that the workload of IP address configuration in the OpenFlow network is greatly reduced, and the subsequent updating and maintenance are facilitated.
Optionally, after the IP address of the controller in the network server is updated from the second IP address to a third IP address, the method may further include:
and if the switch determines that the connection established between the switch and the controller is invalid, the switch sends a DHCP (dynamic host configuration protocol) information message to the network server. After receiving the DHCP information sent by the switch, the network server sends the third IP address to the switch, and optionally, the network server may also send a second monitoring port number to the switch.
The switch receiving the third IP address from the network server;
the switch reestablishes connection with the controller according to the third IP address, the first IP address and the second monitoring port number, wherein the second monitoring port number is the first monitoring port number or the monitoring port number of the controller acquired by the network server after the IP address of the controller is updated.
After the IP address of the controller is updated, the switch in the OpenFlow network automatically acquires the updated IP address and the monitoring port number, so that the workload of configuring the IP address in the OpenFlow network is greatly reduced.
An embodiment of a switch in an embodiment of the invention is described below.
Referring to fig. 3, an embodiment of a switch according to an embodiment of the present invention is shown, where the switch includes:
a sending unit 301, configured to send a DHCP client request packet to a network server;
a receiving unit 302, configured to receive a first IP address and a second IP address sent by the network server, where the first IP address is an IP address allocated by the network server to the switch in response to the DHCP client request packet, the second IP address is an IP address of a controller, and the controller and the switch are in an OpenFlow network;
the processing unit 303 is configured to establish a connection with the controller according to the first IP address, the second IP address, and a first monitoring port number, where the first monitoring port number is a monitoring port number of the controller.
Optionally, after the IP address of the controller in the network server is updated from the second IP address to a third IP address, the sending unit 301 is further configured to send a DHCP information packet to the network server if the switch determines that the connection established between the switch and the controller is failed, so that the network server sends the third IP address of the controller;
the receiving unit 302 is further configured to receive the third IP address from the network server;
the processing unit 303 is further configured to reestablish a connection with the controller according to the third IP address, the first IP address, and a second monitoring port number, where the second monitoring port number is the first monitoring port number, or is a monitoring port number of the controller acquired by the network server after the IP address of the controller is updated.
Optionally, the DHCP client request packet includes a device type identifier of the switch, where the device type identifier is used for the network server to determine that the switch is a switch in the OpenFlow network.
The switch in the embodiment of the present invention is described above from the perspective of the modular functional entity, and the switch in the embodiment of the present invention is described below from the perspective of hardware processing.
As shown in fig. 4, which is another embodiment of the switch in the embodiment of the present invention, the switch includes a processor 401 and a communication interface 402, wherein the processor 401 and the communication interface 402 may be connected by a bus or by other means, and fig. 4 illustrates the connection by the bus as an example.
The processor 401 is configured to:
sending a DHCP client request message to a network server through the communication interface 402;
receiving a first IP address and a second IP address sent by the network server through the communication interface 402, where the first IP address is an IP address allocated to the switch by the network server in response to the DHCP client request packet, the second IP address is an IP address of a controller, the first monitoring port number is a monitoring port number of the controller, and the controller and the switch are in an OpenFlow network;
and establishing connection with the controller according to the first IP address, the second IP address and the first monitoring port number.
Optionally, after the IP address of the controller in the network server is updated from the second IP address to a third IP address, the processor 401 is further configured to:
if the connection established between the network server and the controller is determined to be invalid, sending a DHCP information message to the network server through the communication interface so that the network server sends a third IP address of the controller;
receiving the third IP address from the web server through the communication interface 402;
and reestablishing the connection with the controller according to the third IP address, the first IP address and a second monitoring port number, wherein the second monitoring port number is the first monitoring port number or the monitoring port number of the controller acquired by the network server after the IP address of the controller is updated.
Optionally, the DHCP client request packet includes a device type identifier of the switch, where the device type identifier is used for the network server to determine that the switch is a switch in the OpenFlow network.
An embodiment of a network server in an embodiment of the present invention is described below.
As shown in fig. 5, which is an embodiment of a network server in the embodiment of the present invention, the network server includes:
a receiving unit 501, configured to receive a DHCP client request message sent by the switch;
an allocating unit 502, configured to allocate a first IP address to the switch;
an obtaining unit 503, configured to obtain a second IP address of the controller;
a sending unit 504, configured to send the first IP address and the second IP address to the switch.
Optionally, the receiving unit is further configured to receive the second IP address sent by the controller, or,
the allocation unit 502 is further configured to configure the second IP address for the controller.
Optionally, after the IP address of the controller in the network server is updated from the second IP address to a third IP address, the receiving unit 501 is further configured to receive a DHCP information packet sent by the switch;
the obtaining unit 503 is further configured to obtain the third IP address;
the sending unit 504 is further configured to send the third IP address to the switch.
The network server in the embodiment of the present invention is described above from the perspective of the modular functional entity, and the network server in the embodiment of the present invention is described below from the perspective of hardware processing.
As shown in fig. 6, which is another embodiment of the network server according to the embodiment of the present invention, the network server includes a processor 601 and a transceiver 602; the processor 601 and the transceiver 602 may be connected by a bus or other means, wherein fig. 6 illustrates the connection by the bus.
The transceiver 602 is configured to receive a DHCP client request message sent by the switch;
the processor 601 is configured to obtain a second IP address of the controller, allocate a first IP address to the switch, and send the first IP address and the second IP address to the switch through the transceiver.
Optionally, the processor 601 is configured to receive the second IP address sent by the controller through the transceiver, or configure the second IP address for the controller.
Optionally, after the IP address of the controller in the network server is updated from the second IP address to a third IP address, the transceiver 602 is further configured to receive a DHCP information packet sent by the switch; the processor 601 is further configured to obtain a third IP address of the controller, and send the third IP address to the switch.
An embodiment of the present invention further provides a computer storage medium, where the computer storage medium may store a program, and the program includes, when executed, some or all of the steps of at least the method for configuring a network described in the above method embodiments.
It will be clear to those skilled in the art that for convenience and brevity of description, in the above embodiments, the description of each embodiment has a respective emphasis, and for parts not described in detail in a certain embodiment, reference may be made to the related description of other embodiments.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required for the invention.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some interfaces, devices or units, and may be an electric or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may also be distributed on a plurality of network devices. Some or all of the devices can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based upon such an understanding, all or part of the technical solutions of the present invention may be embodied in the form of a software product. The computer software product is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to perform all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a universal serial bus flash disk (USB flash disk), a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, and an optical disk.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the scope of the claims.

Claims (12)

1. A method of network configuration, the method comprising:
the switch sends a Dynamic Host Configuration Protocol (DHCP) client request message to a network server;
the switch receives a first IP address and a second IP address sent by the network server, the first IP address is an IP address distributed to the switch by the network server in response to the DHCP client request message, the second IP address is an IP address of a controller, and the controller and the switch are in an OpenFlow network;
the switch establishes connection with the controller according to the first IP address, the second IP address and a first monitoring port number, wherein the first monitoring port number is a monitoring port number of the controller;
after the IP address of the controller in the network server is updated from the second IP address to a third IP address, the method further includes:
if the switch determines that the connection established between the switch and the controller is invalid, the switch sends a DHCP information message to the network server so that the network server sends a third IP address of the controller;
the switch receiving the third IP address from the network server;
the switch reestablishes connection with the controller according to the third IP address, the first IP address and a second monitoring port number, wherein the second monitoring port number is the first monitoring port number or the monitoring port number of the controller acquired by the network server after the IP address of the controller is updated.
2. The method according to claim 1, wherein the DHCP client request message includes a device type identifier of the switch, and the device type identifier is used for the network server to determine that the switch is a switch in the OpenFlow network.
3. A method of network configuration, the method comprising:
the network server receives a DHCP client request message sent by the switch;
the network server allocates a first IP address for the switch;
the network server acquires a second IP address of the controller;
the network server sends the first IP address and the second IP address to the switch;
after the IP address of the controller in the network server is updated from the second IP address to a third IP address, the method further includes:
the network server receives a DHCP information message sent by the switch;
the network server acquires the third IP address;
the network server sends the third IP address to the switch.
4. The method of claim 3, wherein the network server obtaining the second IP address of the controller comprises:
the network server receives the second IP address sent by the controller,
alternatively, the first and second electrodes may be,
the network server configures the second IP address for the controller.
5. A switch, comprising:
a sending unit, configured to send a DHCP client request message to a network server;
a receiving unit, configured to receive a first IP address and a second IP address sent by the network server, where the first IP address is an IP address allocated to the switch by the network server in response to the DHCP client request packet, the second IP address is an IP address of a controller, and the controller and the switch are in an OpenFlow network;
the processing unit is used for establishing connection with the controller according to the first IP address, the second IP address and a first monitoring port number, wherein the first monitoring port number is a monitoring port number of the controller;
after the IP address of the controller in the network server is updated from the second IP address to a third IP address, the sending unit is further configured to send a DHCP information packet to the network server if the switch determines that the connection established with the controller is failed, so that the network server sends the third IP address of the controller;
the receiving unit is further configured to receive the third IP address from the network server;
the processing unit is further configured to reestablish a connection with the controller according to the third IP address, the first IP address, and a second monitoring port number, where the second monitoring port number is the first monitoring port number, or is a monitoring port number of the controller acquired by the network server after the IP address of the controller is updated.
6. The switch according to claim 5, wherein the DHCP client request packet includes a device type identifier of the switch, and the device type identifier is used by the network server to determine that the switch is a switch in the OpenFlow network.
7. A network server, comprising:
the receiving unit is used for receiving a DHCP client request message sent by the switch;
the distribution unit is used for distributing a first IP address for the switch;
an acquisition unit configured to acquire a second IP address of the controller;
a sending unit, configured to send the first IP address and the second IP address to the switch;
after the IP address of the controller in the network server is updated from the second IP address to a third IP address, the receiving unit is further configured to receive a DHCP information packet sent by the switch;
the obtaining unit is further configured to obtain the third IP address;
the sending unit is further configured to send the third IP address to the switch.
8. The network server according to claim 7, wherein the receiving unit is further configured to receive the second IP address sent by the controller,
alternatively, the first and second electrodes may be,
the allocation unit is further configured to configure the second IP address for the controller.
9. A switch, comprising a processor and a communication interface, wherein the processor is configured to:
sending a DHCP client request message to a network server through the communication interface;
receiving a first IP address and a second IP address sent by the network server through the communication interface, wherein the first IP address is an IP address distributed to the switch by the network server in response to the DHCP client request message, the second IP address is an IP address of a controller, and the controller and the switch are in an OpenFlow network;
establishing connection with the controller according to the first IP address, the second IP address and a first monitoring port number, wherein the first monitoring port number is a monitoring port number of the controller;
after the IP address of the controller in the network server is updated from the second IP address to a third IP address, the processor is further configured to:
if the connection established between the network server and the controller is determined to be invalid, sending a DHCP information message to the network server through the communication interface so that the network server sends a third IP address of the controller;
receiving the third IP address from the network server through the communication interface;
and reestablishing the connection with the controller according to the third IP address, the first IP address and a second monitoring port number, wherein the second monitoring port number is the first monitoring port number or the monitoring port number of the controller acquired by the network server after the IP address of the controller is updated.
10. The switch according to claim 9, wherein the DHCP client request packet includes a device type identifier of the switch, and the device type identifier is used by the network server to determine that the switch is a switch in the OpenFlow network.
11. A network server comprising a processor and a transceiver;
the transceiver is used for receiving a DHCP client request message sent by the switch;
the processor is used for acquiring a second IP address of the controller, allocating a first IP address to the switch and sending the first IP address and the second IP address to the switch through the transceiver;
after the IP address of the controller in the network server is updated from the second IP address to a third IP address, the transceiver is further configured to receive a DHCP information packet sent by the switch; the processor is further configured to obtain a third IP address of the controller and send the third IP address to the switch.
12. The network server of claim 11, wherein the processor is configured to receive the second IP address sent by the controller through the transceiver or configure the second IP address for the controller.
CN201610204202.7A 2016-03-31 2016-03-31 Network configuration method, switch and server Active CN107295113B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610204202.7A CN107295113B (en) 2016-03-31 2016-03-31 Network configuration method, switch and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610204202.7A CN107295113B (en) 2016-03-31 2016-03-31 Network configuration method, switch and server

Publications (2)

Publication Number Publication Date
CN107295113A CN107295113A (en) 2017-10-24
CN107295113B true CN107295113B (en) 2020-08-25

Family

ID=60087037

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610204202.7A Active CN107295113B (en) 2016-03-31 2016-03-31 Network configuration method, switch and server

Country Status (1)

Country Link
CN (1) CN107295113B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109525516B (en) * 2018-11-16 2021-05-11 盛科网络(苏州)有限公司 Method and system for notifying OpenFlow controller information through DHCP

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103973828A (en) * 2013-02-01 2014-08-06 华为技术有限公司 Method and device for acquiring IP (internet protocol) addresses for DHCP (dynamic host configuration protocol) clients
CN104580029A (en) * 2015-01-26 2015-04-29 杭州华三通信技术有限公司 Address distribution method and device
CN104901825A (en) * 2014-03-05 2015-09-09 杭州华三通信技术有限公司 Method and device for realizing zero configuration startup

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8856384B2 (en) * 2011-10-14 2014-10-07 Big Switch Networks, Inc. System and methods for managing network protocol address assignment with a controller
CN104158916A (en) * 2013-05-13 2014-11-19 中兴通讯股份有限公司 Method and device for device accessing to network
CN104104744B (en) * 2014-07-09 2018-02-09 新华三技术有限公司 A kind of method and apparatus of IP address distribution

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103973828A (en) * 2013-02-01 2014-08-06 华为技术有限公司 Method and device for acquiring IP (internet protocol) addresses for DHCP (dynamic host configuration protocol) clients
CN104901825A (en) * 2014-03-05 2015-09-09 杭州华三通信技术有限公司 Method and device for realizing zero configuration startup
CN104580029A (en) * 2015-01-26 2015-04-29 杭州华三通信技术有限公司 Address distribution method and device

Also Published As

Publication number Publication date
CN107295113A (en) 2017-10-24

Similar Documents

Publication Publication Date Title
CN107925626B (en) Method and apparatus for use in a network element
EP3316532A1 (en) Computer device, system and method for implementing load balancing
US10298724B2 (en) Communication device and method for transmitting data within an industrial automation system
EP2645679A1 (en) Method and apparatus for message transmission
CN111988353B (en) IPv4 and IPv6 compatible internet service and load balancing service loading system and method
CN114070723B (en) Virtual network configuration method and system of bare metal server and intelligent network card
EP2704403A1 (en) Method and device for controlling address configuration manner
CN106101297B (en) A kind of message answer method and device
EP3267633B1 (en) Information processing system, proxy server, address duplication prevention method, and computer-readable recording medium
RU2638880C2 (en) Method of installing uninterrupted communication connection and communication device
EP2469802A1 (en) Method, device and system for address assignment in internet protocol (ip) networks
JP6445408B2 (en) Communication system and setting method
EP3267656B1 (en) Methods and apparatuses for message processing during pppoe authentication
CN104104749A (en) Method and device for allocating tunnel IP addresses
EP3761577A1 (en) Message processing method and apparatus, and storage medium
CN107295113B (en) Network configuration method, switch and server
EP3048756A1 (en) Management method and apparatus for dynamic host configuration protocol server and relay
CN107172229B (en) Router configuration method and device
JP6360012B2 (en) Network integration system and network integration method
EP2975828B1 (en) Method for configuring a network connection, telecommunications network, program and computer program product
CN107786682B (en) Method and device for processing DHCP REQUEST message
EP3264724B1 (en) Method and apparatus for sending, transferring and acquiring capability
CN104363310B (en) A kind of method for configuring device IP
US11552928B2 (en) Remote controller source address verification and retention for access devices
CN110505620B (en) Communication method, management station and hotspot device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant