CN113347285B - Automatic allocation method, device and equipment for managing IP address - Google Patents

Automatic allocation method, device and equipment for managing IP address Download PDF

Info

Publication number
CN113347285B
CN113347285B CN202110647173.2A CN202110647173A CN113347285B CN 113347285 B CN113347285 B CN 113347285B CN 202110647173 A CN202110647173 A CN 202110647173A CN 113347285 B CN113347285 B CN 113347285B
Authority
CN
China
Prior art keywords
address
management
state
allocated
sdn controller
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
CN202110647173.2A
Other languages
Chinese (zh)
Other versions
CN113347285A (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.)
New H3C Big Data Technologies Co Ltd
Original Assignee
New H3C Big Data 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 New H3C Big Data Technologies Co Ltd filed Critical New H3C Big Data Technologies Co Ltd
Priority to CN202110647173.2A priority Critical patent/CN113347285B/en
Publication of CN113347285A publication Critical patent/CN113347285A/en
Application granted granted Critical
Publication of CN113347285B publication Critical patent/CN113347285B/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
    • 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/5046Resolving address allocation conflicts; Testing of addresses
    • 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/5053Lease time; Renewal aspects
    • 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/5061Pools of addresses
    • 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/5092Address allocation by self-assignment, e.g. picking addresses at random and testing if they are already in use

Abstract

The embodiment of the application discloses a method, a device and equipment for automatically allocating management IP addresses. In the application, in response to allocating a management IP address to a network device to be managed, an SDN controller may automatically find a management IP address that is not allocated and unused from a management IP address pool, perform conflict detection on the management IP address, allocate the management IP address to the network device when no conflict exists, and the network device to be managed may automatically perform conflict detection on a received management IP address allocated to the network device by the SDN controller, and establish a control channel with the SDN controller when no conflict exists. By the method and the device, the allocation operation of the management IP address can be simplified, the allocation efficiency of the management IP address is improved, and errors of the network equipment in the process of establishing the control channel by using the management IP address and the SDN controller are avoided.

Description

Automatic allocation method, device and equipment for managing IP address
Technical Field
The present application relates to the field of communications, and in particular, to an automatic allocation method, apparatus, and device for managing IP addresses.
Background
In the actual application process of the SDN technology, manually allocating a management IP address to a Network device to be managed, and establishing a control channel between the Network device to be managed and an SDN controller according to the management IP address allocated to the Network device to be managed is a first step of the SDN controller managing the Network device, and is also a crucial step. However, the number of network devices to be managed in the large network is often very large, so that the operation of allocating and managing IP addresses to the network devices to be managed is very complicated.
Disclosure of Invention
The application discloses a method, a device and equipment for automatically allocating management IP addresses, which are used for simplifying allocation operation of the management IP addresses and improving allocation efficiency of the management IP addresses.
According to a first aspect of embodiments of the present application, there is provided a method for automatically allocating a management IP address, where the method is applied to an SDN controller, and includes:
responding to the management IP address distributed to the network equipment to be managed, and searching a management IP address which is not distributed and unused from the management IP address pool;
detecting whether the searched management IP address conflicts with an IP address allocated to the existing network equipment in the SDN network;
if not, allocating the management IP address to the network equipment, and updating the state of the management IP address in the management IP address pool from the unallocated unused state to the allocated unused state;
if so, updating the state of the management IP address in the management IP address pool from the unallocated unused state to the unallocated used state.
According to a second aspect of the embodiments of the present application, there is provided an automatic allocation method for managing IP addresses, where the method is applied to a network device, where the network device is a network device to be managed by an SDN controller, and the method includes:
in response to receiving a management IP address allocated to the network device by an SDN controller, detecting whether the management IP address conflicts with a LoopBack address LoopBck address or a dynamic IP address of other network devices, wherein the management IP address is allocated to be unused in a management IP address pool;
if not, establishing a control channel with the SDN controller by using the management IP address so that the SDN controller manages the network equipment through the control channel.
According to a third aspect of embodiments of the present application, there is provided an automatic allocation apparatus for managing IP addresses, the apparatus being applied to an SDN controller, and the apparatus including:
the management IP address searching unit is used for responding to the allocation of the management IP address for the network equipment to be managed and searching one management IP address which is not allocated and used from the management IP address pool;
the management IP address allocation unit is used for detecting whether the searched management IP address conflicts with an IP address allocated to the existing network equipment in the SDN network; if not, allocating the management IP address to the network equipment, and updating the state of the management IP address in the management IP address pool from the unallocated unused state to the allocated unused state; if so, updating the state of the management IP address in the management IP address pool from the unallocated unused state to the unallocated used state.
According to a fourth aspect of the embodiments of the present application, there is provided an automatic allocation apparatus for managing IP addresses, where the apparatus is applied to a network device, where the network device is a network device to be managed by an SDN controller, and the apparatus includes:
the management IP address receiving unit is used for responding to the received management IP address distributed to the network equipment by the SDN controller, detecting whether the management IP address conflicts with a LoopBack address or a dynamic IP address of other network equipment, and the state of the management IP address in a management IP address pool is that the management IP address is distributed and not used;
a control channel establishing unit, configured to establish a control channel with the SDN controller using the management IP address, so that the SDN controller manages the network device through the control channel.
According to a fifth aspect of embodiments herein, there is provided an electronic apparatus including: a processor and a memory;
the memory for storing machine executable instructions;
the processor is configured to read and execute the machine executable instructions stored in the memory to implement the above-mentioned automatic allocation method for a management IP address applied to an SDN controller or an automatic allocation method for a management IP address applied to a network device.
The technical scheme provided by the embodiment of the application can have the following beneficial effects:
as can be seen from the foregoing technical solutions, in the solution provided in the present application, in response to allocating a management IP address to a network device to be managed, an SDN controller may automatically search, from a management IP address pool, a management IP address whose state is an unallocated unused management IP address, perform collision detection on the management IP address, allocate the management IP address to the network device when there is no collision, without manually allocating a management IP address to the network device, and in this embodiment, the network device to be managed may automatically perform collision detection on a management IP address allocated to the network device by the SDN controller when receiving the management IP address, and establish a control channel with the SDN controller when there is no collision. By the method and the device, the allocation operation of the management IP address can be simplified, the allocation efficiency of the management IP address is improved, and errors of the network equipment in the process of establishing the control channel by using the management IP address and the SDN controller are avoided.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present specification and together with the description, serve to explain the principles of the specification.
Fig. 1 is a flowchart of a method for managing IP address allocation provided in the related art;
fig. 2 is a flowchart of an automatic allocation method for managing IP addresses according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of a spine-leaf-access three-layer network provided in the embodiment of the present application;
fig. 4 is a flowchart of another automatic allocation method for managing IP addresses according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of an automatic allocation apparatus for managing IP addresses according to an embodiment of the present application;
fig. 6 is a schematic diagram of another automatic allocation apparatus for managing IP addresses according to an embodiment of the present application;
fig. 7 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
In order to make those skilled in the art better understand the technical solutions provided in the embodiments of the present application and make the above objects, features and advantages of the embodiments of the present application more obvious and understandable, a description is first given below of a method for allocating an IP address according to the related art.
Referring to fig. 1, the process may include the following steps:
step 101, responding to the SDN controller allocating a management IP address to the network device to be managed, and finding a management IP address which is not allocated to other network devices from the management IP address pool.
Step 102, allocating the searched management IP address to the network device to be managed, so that the network device to be managed establishes a control channel with the SDN controller by using the management IP address.
The flow shown in fig. 1 is thus completed.
Through the method flow shown in fig. 1, it may be implemented that the SDN controller allocates a management IP address to the network device to be managed, but the management IP address allocated to the network device to be managed by the SDN controller may conflict with IP addresses of other network devices (such as LoopBack addresses or dynamic IP addresses), and in the case of a conflict, if the network device to be managed configures a conflicting management IP address, an error may occur in a process of establishing a control channel with the network device to be managed by the SDN controller using the management IP address.
In order to solve the problems in the allocation method for managing IP addresses provided by the related art, an embodiment of the present application provides an automatic allocation method for managing IP addresses, and the following describes the technical solution in the embodiment of the present application in further detail with reference to the accompanying drawings.
Referring to fig. 2, fig. 2 is a flowchart of an automatic allocation method for managing IP addresses according to an embodiment of the present disclosure. As an embodiment, the flow illustrated in fig. 2 may be applied to an SDN controller.
As shown in fig. 2, the process may include the following steps:
step 201, in response to allocating a management IP address to a network device to be managed, finding out one management IP address which is not allocated and unused from the management IP address pool.
First, in this embodiment of the present application, in order to facilitate maintenance of resources of a management IP address pool, four states of management IP addresses are set for a case where each management IP address in the management IP address pool is currently allocated and used: the method comprises the steps of allocating unused, used, unused and used resources, and adding a page for displaying the state of each management IP address in a management IP address pool on a display interface of gateway software for managing the network equipment by an SDN controller so as to check the resource use condition of the management IP address pool.
If the current state of one management IP address is unallocated and unused, the management IP address is not allocated to any network equipment and is not used by any network equipment currently, wherein the use refers to that the management IP address is configured on the network equipment, and the network equipment can communicate with the outside by using the management IP address; if the current state of a management IP address is unallocated already-used, it indicates that the management IP address is already used by a network device, but the same IP address on the network device as the management IP address is not allocated by the SDN controller. The meaning of other two states of the management IP address can refer to the meaning of unused unallocated and used unallocated, which are not described in detail here.
Further, if the status of the management IP address is checked as being used without allocation, this means that the management IP address may be a management IP address of a network device managed manually, or may be an IP address (such as a LoopBack address, or a dynamic IP address) of a network device in the SDN network that is not managed but has an address conflict with the management IP address. If there is an IP address in the network device with an address conflict, since the network device does not configure a management IP address but configures another IP address that is the same as the management IP address, it is necessary to manually process the management IP address configuration of the network device and establish a control channel with the SDN controller to manage the network device.
Based on the four states of the management IP address, in this embodiment of the application, if the SDN controller receives a management IP address allocation request message sent by a network device to be managed, a management IP address that is currently in an unallocated state and is not used for allocation may be found from a database storing management IP address pool resources, where the database storing management IP address pool resources may be set on the SDN controller or on another device independent of the SDN controller.
As an embodiment, if the SDN controller receives the management IP address allocation request message, the SDN controller may sequentially detect the states of the management IP addresses stored in the management IP address pool from the large to the small directions according to the management IP addresses, find a management IP address whose state is not allocated and unused, use the management IP address whose state is not allocated and unused as the management IP address to be allocated to the network device, stop detecting the state of the management IP address stored in the management IP address pool, and start performing collision detection on the management IP address.
It should be noted that, here, the size of the management IP address is related to the numerical value for managing the IP address, and the larger the numerical value for managing the IP address is, the larger the management IP address is; the smaller the value for managing the IP address, the smaller the management IP address.
As another embodiment, if the SDN controller receives the management IP address allocation request message, it may also find out all the management IP addresses in the management IP address pool that are not allocated and unused, randomly select one management IP address from all the management IP addresses that are not allocated and unused, serve as the management IP address to be allocated to the network device, and perform collision detection on the management IP address.
Step 202, detecting whether the searched management IP address conflicts with an IP address allocated to an existing network device in the SDN network, if not, executing step 203, and if yes, executing step 204.
In a specific implementation, if the management IP address status is unallocated and unused, it indicates that the SDN controller does not allocate a management IP address to any network device, and no network device currently managed by the SDN controller uses the management IP address, but a LoopBack address or a dynamic IP address configured by a network device that is not managed in the SDN network may conflict with the management IP address. Therefore, the embodiment of the application performs conflict detection on the management IP address to be allocated to the network device to ensure that the management IP address allocated to the network device is available.
Optionally, in this step 202, detecting whether the management IP address conflicts with an IP address allocated to an existing network device in the SDN network, may be implemented in the following manner: sending a ping packet to a management IP address, if a response of the ping packet is received within a specified time, determining that the management IP address conflicts with an IP address allocated to the existing network equipment in the SDN, and if the response of the ping packet is not received within the specified time, determining that the management IP address does not conflict with the IP address allocated to the existing network equipment in the SDN.
Step 203, if the management IP address is determined not to conflict with the IP address allocated to the existing network device in the SDN network, allocating the management IP address to the network device, and updating the state of the management IP address in the management IP address pool from unallocated to unused to allocated to unused.
In the embodiment of the application, after the management IP address is allocated to the network device, if it is known that the network device detects that the allocated management IP address does not conflict with the LoopBack address or the dynamic IP address of other network devices, the state of the management IP address in the management IP address pool is updated from allocated unused to allocated used; if it is known that the network device detects that the allocated management IP address conflicts with the LoopBack address or the dynamic IP address of other network devices, the state of the management IP address in the management IP address pool is updated from allocated unused to unallocated used.
In specific implementation, the SDN learns whether the network device detects that the allocated management IP address conflicts with a LoopBack address or a dynamic IP address of another network device, and may determine, according to a conflict detection result of the management IP address reported by the network device after the management IP address is allocated to the network device to be managed.
It should be noted that, as an embodiment, in order to allocate a management IP address to a Network device to be managed, an SDN controller may create a temporary connection with the Network device according to a dynamic IP address configured on the Network device to be managed based on a specified Protocol (e.g., a Network Configuration Protocol), where the SDN controller may allocate the management IP address and a collision detection result of the Network device reporting the management IP address, where the SDN controller may implement the temporary connection, and if the SDN controller knows that the Network device detects that there is no address collision in the management IP address, the SDN controller may establish a control channel with the Network device by using the management IP address, implement management of the Network device, and destroy the created temporary connection.
As for how the network device detects whether the allocated management IP address conflicts with the LoopBack address or the dynamic IP address of other network devices, reference may be made to the related description in the method flow shown in fig. 4, which is not described herein again.
Step 204, if the management IP address is determined to conflict with the IP address allocated to the existing network device in the SDN network, updating the state of the management IP address in the management IP address pool from unallocated and unused to unallocated and used.
Optionally, after the step 204, the step of finding a management IP address which is not allocated and unused from the management IP address pool in the step 201 may be returned, and a management IP address which is not allocated and unused is found again, and the steps 201 to 204 are repeated to allocate a management IP address to the network device to be managed; or, if after this step 204, an unused management IP address is not found to be not allocated in the state, which indicates that there is no management IP address that can be allocated to the network device to be managed in the current SDN controller, the process of allocating a management IP address to the network device to be managed may be ended. This is only one implementation step provided by the present application, and optionally, after step 204, the process of allocating a management IP address to a network device to be managed may also be directly ended, and the content executed after step 204 is not limited in the present application.
At this point, the flow shown in fig. 2 is completed.
As can be seen from the process shown in fig. 2, in response to allocating a management IP address to a network device to be managed, an SDN controller may automatically find a management IP address that is not allocated and unused from a management IP address pool, perform conflict detection on the management IP address, and allocate the management IP address to the network device to be managed without a conflict, without manually allocating the management IP address to the network device, thereby simplifying the allocation operation of the management IP address, improving the allocation efficiency of the management IP address, and avoiding an error occurring in the process of establishing a control channel between the management IP address and the SDN controller by the network device.
The above examples are merely for convenience of understanding, and the embodiments of the present application are not particularly limited.
It should be noted that, in the embodiment of the present application, in a case that the SDN controller is not required to manage the network device, the managed network device may be deleted, and a state of a management IP address used by the managed network device in the management IP address pool is updated from allocated used state to unallocated unused state, so as to implement recovery of the management IP address.
Illustratively, the SDN controller may be triggered to send a message for deleting the management IP address to the network device by selecting, on the network management software, to delete the management relationship with the network device, and the management IP address may be reused by deleting the correspondence between the management IP address and the network device recorded in the SDN controller.
Referring to fig. 4, fig. 4 is a flowchart of another method for automatically allocating an IP address according to the embodiment of the present application. The flow shown in fig. 4 may be applied to a network device as one embodiment. The network device is a network device to be managed by the SDN controller.
As shown in fig. 4, the process may include the following steps:
step 401, in response to receiving a management IP address allocated to the network device by the SDN controller, detecting whether the management IP address conflicts with a LoopBack address or a dynamic IP address of another network device, where a state of the management IP address in a management IP address pool is allocated and unused.
In this embodiment of the application, if the state of the management IP address is allocated and not used, it indicates that the management IP address is currently allocated to the network device by the SDN controller, but the network device does not configure the management IP address to communicate with the SDN controller.
In specific implementation, the detailed process that the SDN controller allocates to the management IP address of the network device in the method flow shown in fig. 2 may be referred to in the specific acquiring process of the management IP address received in step 401, and is not described herein again.
Optionally, in order to respond to receiving a management IP address allocated to the network device by the SDN controller, in this step 401, it is detected whether the management IP address conflicts with a LoopBack address or a dynamic IP address of another network device, where the conflict detection may be specifically implemented in multiple ways, and the application does not limit this:
as an embodiment, a ping packet may be sent to the management IP address, and if a response of the ping packet is received within a specified time, it is determined that the management IP address conflicts with the loop back address LoopBack address or the dynamic IP address of the other network device, and if a response of the ping packet is not received within the specified time, it is determined that the management IP address does not conflict with the loop back address LoopBack address or the dynamic IP address of the other network device.
As another embodiment, an ARP (Address Resolution Protocol) request carrying a management IP Address may be broadcasted in a network where the network device is located, and if an ARP response of the ARP request is received within a specified time, it is determined that the management IP Address conflicts with a LoopBack Address or a dynamic IP Address of another network device, and if an ARP response of the ARP request is not received within the specified time, it is determined that the management IP Address does not conflict with a LoopBack Address or a dynamic IP Address of another network device.
And step 402, if not, establishing a control channel with the SDN controller by using the management IP address so that the SDN controller manages the network device through the control channel.
In the embodiment of the application, if it is detected that a received management IP address does not conflict with a LoopBack address or a dynamic IP address of other network equipment, sending a message indicating that the management IP address does not conflict to an SDN controller, so that the SDN controller updates the state of the management IP address in a management IP address pool from allocated unused to allocated used; if the management IP address is detected to conflict with the LoopBack address LoopBak address or the dynamic IP address of other network equipment, sending a message for indicating the management IP address conflict to the SDN controller so as to update the state of the management IP address in the management IP address pool from allocated unused to unallocated used. In this embodiment, the network device may send a message to the SDN controller through a temporary connection established between the network device and the SDN controller based on the configured dynamic IP address.
Further, if the SDN controller receives a message indicating that the management IP address does not conflict, the SDN controller may initiate a request for establishing a control channel to the network device based on the management IP address, so that the SDN controller may manage the network device through the established control channel. Here, after the SDN controller establishes a control channel with a network device, the network device will become a network device managed by the SDN controller.
It should be noted that the embodiment of the present application can be applied to the architecture of a spine-leaf-access three-layer network as shown in fig. 3. In a scenario where an SDN controller is used to manage network devices in a spine-leaf-access three-layer network, a network device to be managed in this embodiment may be any one of a spine device, a leaf device, and an access device. In the network architecture, the spine device and the leaf device are three-layer network devices, the spine device and the leaf device are configured with a LoopBack address and a dynamic IP address before being managed, the access device is a two-layer network device, and the access device is configured with the dynamic IP address before being managed. In the network architecture, the LoopBack addresses configured by the spine device and the leaf device are used for realizing routing planning of the SDN network, and the dynamic IP addresses configured on the three network devices can be used for establishing temporary connection with the SDN controller. The specific configuration process of the LoopBack address and the dynamic IP address can refer to the related art, and is not described herein again.
For different network devices, in the embodiment of the present application, when it is determined that the management IP address does not conflict with the LoopBack address or the dynamic IP address of other network devices, the manner of configuring the management IP address is different.
As an embodiment, a management IP address is configured for a spine device or a leaf device, and the management IP address needs to be configured to a VSI (Virtual Switch Interface) Virtual Interface set on the spine device or the leaf device; and configuring a management IP address for the access device requires configuring the management IP address to a VLAN virtual interface set on the access device.
Further, if the managed network device in the embodiment of the present application receives a message sent by the SDN controller to delete a management IP address, the management IP address configured at the VSI virtual interface or the VLAN virtual interface of the network device is deleted.
The flow shown in fig. 4 is completed.
As can be seen from the flow shown in fig. 4, the network device to be managed may automatically perform collision detection on the management IP address allocated to the network device by the SDN controller, and establish a control channel with the SDN controller by using the management IP address when there is no collision. By the method and the device, the allocation operation of the management IP address can be simplified, the allocation efficiency of the management IP address is improved, and errors of the network equipment in the process of establishing the control channel by using the management IP address and the SDN controller are avoided.
The method provided by the embodiment of the application is described above. The following describes the apparatus provided in the embodiments of the present application:
referring to fig. 5, fig. 5 is a schematic diagram of an apparatus for implementing automatic allocation of management IP addresses according to an embodiment of the present application, where the embodiment of the apparatus is applied to an SDN controller. The device includes:
a management IP address searching unit 501, configured to search, in response to allocating a management IP address to a network device to be managed, one management IP address that is not allocated and unused in the state from the management IP address pool.
Optionally, the searching, by the management IP address searching unit 501, a management IP address that is not allocated and not used from the management IP address pool includes:
sequentially detecting the states of the management IP addresses stored in the management IP address pool from big to small according to the management IP addresses, and searching one management IP address which is not allocated and not used;
or, all the management IP addresses in the management IP address pool are found out, wherein the management IP addresses are not allocated to be unused, and one management IP address is randomly selected from the management IP addresses in all the states, wherein the management IP addresses are not allocated to be unused.
Optionally, the apparatus further comprises:
the management IP address state modifying unit is used for updating the state of the management IP address in the management IP address pool from allocated unused state to allocated used state if the fact that the network equipment detects that the management IP address does not conflict with the LoopBack address loopBack address or the dynamic IP address of other network equipment is known; and if the fact that the network equipment detects that the management IP address conflicts with the LoopBack address loopBack address or the dynamic IP address of other network equipment is known, updating the state of the management IP address in the management IP address pool from allocated unused state to unallocated used state.
Optionally, the management IP address status modifying unit is further configured to update, in response to deleting the managed network device, the status of the management IP address used by the managed network device in the management IP address pool from allocated used state to unallocated unused state.
A management IP address allocating unit 502, configured to detect whether the searched management IP address conflicts with an IP address allocated to an existing network device in the SDN network; if not, allocating the management IP address to the network equipment, and updating the state of the management IP address in the management IP address pool from unallocated unused state to allocated unused state; if so, updating the state of the management IP address in the management IP address pool from unallocated unused to unallocated used.
Optionally, if the management IP address allocating unit 502 updates the state of the management IP address in the management IP address pool from the unallocated unused state to the unallocated used state, the management IP address searching unit 501 is further configured to search for a management IP address in the management IP address pool, where the state is unallocated unused.
Thus, the structure of the embodiment of the apparatus shown in FIG. 5 is completed.
Referring to fig. 6, fig. 6 is a schematic view of another automatic allocation apparatus for managing IP addresses according to an embodiment of the present application, where the apparatus is applied to a network device, and the network device is a network device to be managed by an SDN controller. The device includes:
a management IP address receiving unit 601, configured to detect, in response to receiving a management IP address allocated to the network device by the SDN controller, whether the management IP address conflicts with a LoopBack address or a dynamic IP address of another network device, where a state of the management IP address in a management IP address pool is that the management IP address is allocated and unused.
A control channel establishing unit 602, configured to establish a control channel with the SDN controller using the management IP address, so that the SDN controller manages the network device through the control channel.
Optionally, the apparatus further comprises:
a detection result reporting unit, configured to send, if it is detected that the management IP address does not conflict with a LoopBack address or a dynamic IP address of another network device, a message indicating that the management IP address does not conflict, so that the SDN controller updates a state of the management IP address in a management IP address pool from allocated unused to allocated used; if the management IP address is detected to conflict with the LoopBack address LoopBak address or the dynamic IP address of other network equipment, sending a message for indicating the management IP address conflict to the SDN controller so that the SDN controller updates the state of the management IP address in the management IP address pool from allocated unused to unallocated used.
Thus, the structure of the embodiment of the apparatus shown in FIG. 6 is completed.
Correspondingly, an embodiment of the present application further provides a hardware structure diagram of an electronic device, and specifically, as shown in fig. 7, the electronic device may be a device that implements the automatic allocation method for a management IP address applied to an SDN controller or a network device. As shown in fig. 6, the hardware structure includes: a processor and a memory.
Wherein the memory is for storing machine executable instructions;
the processor is configured to read and execute the above-mentioned machine executable instructions stored in the memory, so as to implement the corresponding method embodiment of automatic allocation of management IP addresses applied to the SDN controller or the network device as shown above.
For one embodiment, the memory may be any electronic, magnetic, optical, or other physical storage device that may contain or store information such as executable instructions, data, and the like. For example, the memory may be: volatile memory, non-volatile memory, or similar storage media. In particular, the Memory may be a RAM (random Access Memory), a flash Memory, a storage drive (e.g., a hard disk drive), a solid state disk, any type of storage disk (e.g., an optical disk, a DVD, etc.), or similar storage medium, or a combination thereof.
So far, the description of the electronic apparatus shown in fig. 6 is completed.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (8)

1. An automatic allocation method for managing IP addresses is applied to an SDN controller and comprises the following steps:
responding to the management IP address distributed to the network equipment to be managed, and searching a management IP address which is not distributed and unused from the management IP address pool;
detecting whether the searched management IP address conflicts with an IP address allocated to the existing network equipment in the SDN network;
if not, allocating the management IP address to the network equipment, and updating the state of the management IP address in the management IP address pool from the unallocated unused state to the allocated unused state;
if yes, updating the state of the management IP address in the management IP address pool from the unallocated unused state to an unallocated used state;
the method further comprises the following steps:
if the fact that the network equipment detects that the management IP address does not conflict with a LoopBack address loopBack address or a dynamic IP address of other network equipment is known, updating the state of the management IP address in the management IP address pool from the distributed unused state to the distributed used state;
and if the fact that the network equipment detects that the management IP address conflicts with a LoopBack address loopBack address or a dynamic IP address of other network equipment is known, updating the state of the management IP address in the management IP address pool from the distributed unused state to the unallocated used state.
2. The method of claim 1, wherein the finding a management IP address from the management IP address pool that is not allocated to be unused comprises:
sequentially detecting the states of the management IP addresses stored in the management IP address pool from big to small according to the management IP addresses, and searching one management IP address which is not allocated and not used;
or, all the management IP addresses in the management IP address pool are found out, wherein the management IP addresses are not allocated to be unused, and one management IP address is randomly selected from the management IP addresses in all the states, wherein the management IP addresses are not allocated to be unused.
3. The method of claim 1, further comprising:
updating a status of a management IP address used by the managed network device in a management IP address pool from allocated used to unallocated unused in response to deleting the managed network device.
4. The method of claim 1, wherein if the status of the management IP address in the management IP address pool is updated from the unallocated unused to an unallocated used, the method further comprises:
and returning to the step of searching the management IP address which is not allocated and not used from the management IP address pool.
5. An automatic allocation method for managing an IP address, which is applied to a network device to be managed by an SDN controller, and comprises the following steps:
in response to receiving a management IP address allocated to the network device by an SDN controller, detecting whether the management IP address conflicts with a LoopBack address LoopBck address or a dynamic IP address of other network devices, wherein the management IP address is allocated to be unused in a management IP address pool;
if not, establishing a control channel with the SDN controller by using the management IP address so that the SDN controller manages the network device through the control channel;
if the fact that the management IP address does not conflict with a LoopBack address LoopBck address or a dynamic IP address of other network equipment is detected, sending a message for indicating that the management IP address does not conflict to an SDN controller so that the SDN controller updates the state of the management IP address in the management IP address pool from the allocated unused state to the allocated used state;
if the management IP address conflicts with a LoopBack address LoopBck address or a dynamic IP address of other network equipment, sending a message for indicating the management IP address conflict to an SDN controller so that the SDN controller updates the state of the management IP address in the management IP address pool from the allocated unused state to the unallocated used state.
6. An automatic allocation device for managing IP addresses, which is applied to an SDN controller, comprises:
the management IP address searching unit is used for responding to the allocation of a management IP address for the network equipment to be managed and searching one management IP address which is not allocated and not used from the management IP address pool;
the management IP address allocation unit is used for detecting whether the searched management IP address conflicts with an IP address allocated to the existing network equipment in the SDN network; if not, allocating the management IP address to the network equipment, and updating the state of the management IP address in the management IP address pool from the unallocated unused state to the allocated unused state; if yes, updating the state of the management IP address in the management IP address pool from the unallocated unused state to an unallocated used state;
the apparatus further comprises:
the management IP address state modifying unit is used for updating the state of the management IP address in the management IP address pool from allocated unused state to allocated used state if the fact that the network equipment detects that the management IP address does not conflict with the LoopBack address loopBack address or the dynamic IP address of other network equipment is known; and if the fact that the network equipment detects that the management IP address conflicts with the LoopBack address loopBack address or the dynamic IP address of other network equipment is known, updating the state of the management IP address in the management IP address pool from allocated unused state to unallocated used state.
7. An automatic allocation device for managing an IP address, the device being applied to a network device to be managed by an SDN controller, the device comprising:
the management IP address receiving unit is used for responding to the received management IP address distributed to the network equipment by the SDN controller, detecting whether the management IP address conflicts with a LoopBack address or a dynamic IP address of other network equipment, and the state of the management IP address in a management IP address pool is that the management IP address is distributed and not used;
a control channel establishing unit configured to establish a control channel with the SDN controller using the management IP address to cause the SDN controller to manage the network device through the control channel;
the apparatus further comprises:
a detection result reporting unit, configured to send a message indicating that the management IP address does not conflict to an SDN controller if it is detected that the management IP address does not conflict with a LoopBack address or a dynamic IP address of another network device, so that the SDN controller updates a state of the management IP address in a management IP address pool from allocated unused to allocated used; if the management IP address is detected to conflict with the LoopBack address LoopBak address or the dynamic IP address of other network equipment, sending a message for indicating the management IP address conflict to the SDN controller so that the SDN controller updates the state of the management IP address in the management IP address pool from allocated unused to unallocated used.
8. An electronic device, comprising: a processor and a memory;
the memory for storing machine executable instructions;
the processor is configured to read and execute the machine executable instructions stored by the memory to implement the method of any one of claims 1 to 4 or the method of claim 5.
CN202110647173.2A 2021-06-10 2021-06-10 Automatic allocation method, device and equipment for managing IP address Active CN113347285B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110647173.2A CN113347285B (en) 2021-06-10 2021-06-10 Automatic allocation method, device and equipment for managing IP address

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110647173.2A CN113347285B (en) 2021-06-10 2021-06-10 Automatic allocation method, device and equipment for managing IP address

Publications (2)

Publication Number Publication Date
CN113347285A CN113347285A (en) 2021-09-03
CN113347285B true CN113347285B (en) 2022-05-31

Family

ID=77475659

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110647173.2A Active CN113347285B (en) 2021-06-10 2021-06-10 Automatic allocation method, device and equipment for managing IP address

Country Status (1)

Country Link
CN (1) CN113347285B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104580548A (en) * 2014-12-24 2015-04-29 北京华胜天成科技股份有限公司 IP (Internet protocol) address conflict detecting method and device
CN106134164A (en) * 2014-03-26 2016-11-16 高通股份有限公司 The method and apparatus assigned for fast IP address
CN106899704A (en) * 2016-12-21 2017-06-27 新华三技术有限公司 A kind of method and apparatus of station address distribution
CN108259218A (en) * 2017-10-30 2018-07-06 新华三技术有限公司 A kind of IP address distribution method and device
CN111010459A (en) * 2019-12-06 2020-04-14 紫光云(南京)数字技术有限公司 Method for solving IP address conflict when SLB is used as SNAT

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9806970B2 (en) * 2015-02-06 2017-10-31 Crestron Electronics, Inc. IP address conflict resolution system and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106134164A (en) * 2014-03-26 2016-11-16 高通股份有限公司 The method and apparatus assigned for fast IP address
CN104580548A (en) * 2014-12-24 2015-04-29 北京华胜天成科技股份有限公司 IP (Internet protocol) address conflict detecting method and device
CN106899704A (en) * 2016-12-21 2017-06-27 新华三技术有限公司 A kind of method and apparatus of station address distribution
CN108259218A (en) * 2017-10-30 2018-07-06 新华三技术有限公司 A kind of IP address distribution method and device
CN111010459A (en) * 2019-12-06 2020-04-14 紫光云(南京)数字技术有限公司 Method for solving IP address conflict when SLB is used as SNAT

Also Published As

Publication number Publication date
CN113347285A (en) 2021-09-03

Similar Documents

Publication Publication Date Title
US20190042659A1 (en) Data writing and reading and apparatus and cloud storage system
EP3451592B1 (en) Packet transmission between vxlan domains
US7496685B2 (en) Method and system for managing a device within a private network using a management device external to the private network
CN108259218B (en) IP address allocation method and device
CN108429824B (en) Address allocation method and device
US10282120B2 (en) Method, apparatus and system for inserting disk
CN113810230A (en) Method, device and system for carrying out network configuration on containers in container cluster
CN102571416A (en) Positioning method and device for virtual machine
CN111638853A (en) Data storage method and device, storage cluster, gateway equipment and main equipment
US7903678B2 (en) Internet protocol address management system and method
CN111163245B (en) Method and device for adding network camera in network hard disk video recorder
CN109039939B (en) Load sharing method and device
CN108089934A (en) Cluster management method and cluster server
CN102025797A (en) Address prefix processing method, device, system and network equipment
CN113347285B (en) Automatic allocation method, device and equipment for managing IP address
CN113472799B (en) Interconnection management method, device and equipment based on cloud platform
US20060067246A1 (en) Method and apparatus assigning network addresses for network devices
CN108632400B (en) IPv6 address allocation method and Leaf node equipment
CN112367256B (en) Creation method, device and storage medium
CN112637033A (en) VLAN (virtual local area network) distribution method, device and equipment based on hardware service board card
CN111049948B (en) Domain name detection method and device
CN110912760B (en) Link state detection method and device
CN114172853A (en) Flow forwarding and bare computer server configuration method and device
CN110838966B (en) Equipment connection control method and device
CN109347742B (en) PBR-based multiple next hop load sharing method and 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