CN111885215A - Configuration method, device, system and medium for IP address of storage equipment - Google Patents

Configuration method, device, system and medium for IP address of storage equipment Download PDF

Info

Publication number
CN111885215A
CN111885215A CN202010662957.8A CN202010662957A CN111885215A CN 111885215 A CN111885215 A CN 111885215A CN 202010662957 A CN202010662957 A CN 202010662957A CN 111885215 A CN111885215 A CN 111885215A
Authority
CN
China
Prior art keywords
address
target
addresses
configuration information
equipment
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.)
Pending
Application number
CN202010662957.8A
Other languages
Chinese (zh)
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.)
Jinan Inspur Data Technology Co Ltd
Original Assignee
Jinan Inspur Data Technology 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 Jinan Inspur Data Technology Co Ltd filed Critical Jinan Inspur Data Technology Co Ltd
Priority to CN202010662957.8A priority Critical patent/CN111885215A/en
Publication of CN111885215A publication Critical patent/CN111885215A/en
Pending legal-status Critical Current

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

Abstract

The embodiment of the invention discloses a method, a device, a system and a medium for configuring an IP address of a storage device. Selecting a target IP address corresponding to the equipment identifier from all available IP addresses depending on the equipment identifier carried in the IP allocation request; and broadcasting the target IP address and the equipment identification as configuration information. And when the device identification carried in the configuration information is matched with the self device identification, the storage device takes the target IP address carried in the configuration information as the self IP address. The management center distributes the IP addresses for the storage devices depending on the device identifiers, so that the condition that the same IP address is occupied by a plurality of storage devices is avoided, the management center can automatically configure the IP addresses of the storage devices, and the efficiency of IP address configuration is improved on the premise of ensuring the availability of the IP addresses.

Description

Configuration method, device, system and medium for IP address of storage equipment
Technical Field
The present invention relates to the field of device management technologies, and in particular, to a method, an apparatus, a system, and a computer-readable storage medium for configuring an IP address of a storage device.
Background
When the storage device is initially deployed on a customer site, the device is in a factory setting state, and an Internet Protocol (IP) address is not configured between networks of nodes, so that each storage device needs to be configured with an IP address to log in a management interface for subsequent configuration and maintenance. Especially, under the large-capacity scene, dozens or even hundreds of sets of storage devices need to be configured with node IP addresses, the manual configuration process is complicated in work and easy to make mistakes, and a method for carrying out batch IP address configuration on the storage devices is urgently needed.
In the conventional manner, the IP address configuration for all storage devices is implemented depending on a central management device. In an initial state, the storage device does not have an IP address, and the central management device cannot realize direct communication with the storage device, so that the central management device needs to continuously broadcast the IP address to the outside, so that the storage device can complete the configuration of the IP address depending on the acquired broadcast information. However, in this implementation, it is easy to cause a plurality of storage devices to share the same IP address, which results in unavailability of the IP address. The same IP address can only be used by one storage device, the central management device broadcasts the IP address outwards, at this time, a plurality of storage devices can receive the IP address and use the IP address as the IP address of the central management device, in order to avoid the repetition of the IP address of the storage device, the IP address needs to be continuously modified and adjusted, and the configuration efficiency of the IP address is influenced.
It can be seen that how to improve the efficiency of IP address configuration on the premise of ensuring the availability of IP addresses is a problem to be solved by those skilled in the art.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, a system, and a computer-readable storage medium for configuring an IP address of a storage device, which can improve efficiency of configuring an IP address on the premise of ensuring availability of the IP address.
To solve the foregoing technical problem, an embodiment of the present invention provides a method for configuring an IP address of a storage device, which is applicable to a management center, where the method includes:
when an IP allocation request is obtained, traversing all IP addresses in a preset IP network segment, and screening out available IP addresses;
selecting a target IP address corresponding to the equipment identifier from all the available IP addresses depending on the equipment identifier carried in the IP allocation request;
and broadcasting the target IP address and the equipment identification as configuration information.
Optionally, the traversing all IP addresses in the preset IP network segment, and screening out available IP addresses includes:
sequentially executing ping operation on all IP addresses in the preset IP network segment;
marking the IP address of ping communication as an unavailable IP address; and marking the IP address which is not ping-through as an available IP address.
Optionally, after the selecting the target IP address corresponding to the device identifier from all the available IP addresses, the method further includes:
and recording the corresponding relation between the target IP address and the equipment identifier.
Optionally, the recording the correspondence between the target IP address and the device identifier includes:
and adding a TLV field in an LLDP message body, and writing the target IP address, the device identification corresponding to the target IP address and the message type into the TLV field.
Optionally, when there are multiple IP allocation requests, the selecting, depending on the device identifier carried in the IP allocation request, a target IP address corresponding to the device identifier from all the available IP addresses includes:
selecting a corresponding number of target IP addresses from the available IP addresses according to the number of the IP allocation requests; establishing a one-to-one corresponding relation between each equipment identifier and a target IP address;
correspondingly, the broadcasting the target IP address and the device identifier as configuration information includes:
and assembling each device identification and the corresponding target IP address into configuration information to be broadcast.
The embodiment of the invention also provides a configuration device of the IP address of the storage equipment, which is suitable for the management center and comprises a screening unit, a selecting unit and a broadcasting unit;
the screening unit is used for traversing all IP addresses in a preset IP network segment to screen out available IP addresses when the IP allocation request is obtained;
the selecting unit is configured to select a target IP address corresponding to the device identifier from all the available IP addresses depending on the device identifier carried in the IP allocation request;
the broadcasting unit is configured to broadcast the target IP address and the device identifier as configuration information.
Optionally, the screening unit comprises an execution subunit and a marking subunit;
the execution subunit is configured to sequentially execute ping communication operations on all IP addresses in the preset IP network segment;
the marking subunit is used for marking the IP address of ping communication as an unavailable IP address; and marking the IP address which is not ping-through as an available IP address.
Optionally, a recording unit is further included;
and the recording unit is used for recording the corresponding relation between the target IP address and the equipment identifier.
Optionally, the recording unit is specifically configured to add a TLV field in an LLDP message body, and write the target IP address, the device identifier corresponding to the target IP address, and the message type into the TLV field.
Optionally, when there are multiple IP allocation requests, the selecting unit is specifically configured to select a corresponding number of target IP addresses from the available IP addresses according to the number of the IP allocation requests; establishing a one-to-one corresponding relation between each equipment identifier and a target IP address;
correspondingly, the broadcasting unit is specifically configured to assemble each device identifier and the target IP address corresponding to the device identifier into configuration information for broadcasting.
The embodiment of the invention also provides a configuration method of the IP address of the storage equipment, which is suitable for the storage equipment and comprises the following steps:
after power-on starting, detecting whether the IP address is configured per se;
when the self is not configured with the IP address, an IP allocation request carrying the self equipment identification is broadcasted outwards;
when configuration information broadcasted by a management center is acquired, whether an equipment identifier carried in the configuration information is matched with an equipment identifier of the management center is judged;
and when the equipment identifier carried in the configuration information is matched with the own equipment identifier, taking the target IP address carried in the configuration information as the own IP address.
The embodiment of the invention also provides a configuration device of the IP address of the storage equipment, which is suitable for the storage equipment and comprises a detection unit, a broadcast unit, a judgment unit and an acting unit;
the detection unit is used for detecting whether the IP address is configured or not after the power-on starting;
the broadcasting unit is used for broadcasting an IP allocation request carrying the own equipment identifier outwards when the IP address is not configured;
the judging unit is used for judging whether the equipment identifier carried in the configuration information is matched with the equipment identifier of the judging unit when the configuration information broadcasted by the management center is acquired;
and the acting unit is used for taking the target IP address carried in the configuration information as the IP address of the device when the device identification carried in the configuration information is matched with the device identification of the device.
The embodiment of the invention also provides a configuration system of the IP address of the storage equipment, which comprises a management center and the storage equipment;
the management center is used for traversing all IP addresses in a preset IP network segment to screen out available IP addresses when an IP allocation request is obtained; selecting a target IP address corresponding to the equipment identifier from all the available IP addresses depending on the equipment identifier carried in the IP allocation request; broadcasting the target IP address and the equipment identification as configuration information;
the storage equipment is used for detecting whether the storage equipment is configured with an IP address or not after being electrified and started; when the self is not configured with the IP address, an IP allocation request carrying the self equipment identification is broadcasted outwards; when configuration information broadcasted by a management center is acquired, whether an equipment identifier carried in the configuration information is matched with an equipment identifier of the management center is judged; and when the equipment identifier carried in the configuration information is matched with the own equipment identifier, taking the target IP address carried in the configuration information as the own IP address.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for configuring an IP address of a storage device are implemented as any one of the above.
According to the technical scheme, after the storage equipment is powered on and started, whether the storage equipment is configured with the IP address or not is detected; and when the self is not configured with the IP address, the IP allocation request carrying the self equipment identification is broadcasted outwards. And when the management center acquires the IP allocation request, traversing all IP addresses in the preset IP network segment, and screening out available IP addresses. By screening the IP addresses in the IP network segment, the availability of the screened IP addresses can be ensured. In order to avoid the situation that different storage devices share the same IP address, the management center can select a target IP address corresponding to the equipment identifier from all available IP addresses depending on the equipment identifier carried in the IP allocation request; and broadcasting the target IP address and the equipment identification as configuration information. When the storage equipment acquires the configuration information broadcasted by the management center, judging whether the equipment identification carried in the configuration information is matched with the equipment identification of the storage equipment; when the device identifier carried in the configuration information matches the device identifier of the storage device, it indicates that the target IP address carried in the configuration information is the unique IP address allocated to the storage device by the management center, so that the storage device can use the target IP address carried in the configuration information as the IP address of the storage device. In the technical scheme, the IP address configuration process is initiated by the storage device, the management center allocates the IP addresses for the storage device depending on the device identifier, the situation that the same IP address is occupied by a plurality of storage devices is avoided, and the management center can realize automatic configuration of the IP addresses of the plurality of storage devices. The efficiency of IP address configuration is improved on the premise of ensuring the availability of the IP address.
Drawings
In order to illustrate the embodiments of the present invention more clearly, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a signaling diagram of a method for configuring an IP address of a storage device according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a configuration apparatus for an IP address of a storage device suitable for a management center according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of a configuration apparatus for an IP address of a storage device suitable for the storage device according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a configuration system for an IP address of a storage device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of the present invention without any creative work belong to the protection scope of the present invention.
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Next, a configuration method of an IP address of a storage device according to an embodiment of the present invention is described in detail. Fig. 1 is a signaling diagram of a method for configuring an IP address of a storage device according to an embodiment of the present invention, where the method includes:
s101: after the storage equipment is powered on and started, whether the storage equipment is configured with the IP address or not is detected.
After the storage equipment is powered on and started, whether the IP address is configured or not can be automatically detected. And when the IP address is configured, executing normal operation. When the storage device itself does not configure the IP address, the storage device needs to acquire the IP address at this time, i.e., S102 is performed.
S102: when the self is not configured with the IP address, the storage device broadcasts an IP allocation request carrying the self device identification outwards.
In the embodiment of the invention, in order to avoid the situation that different storage devices share the same IP address, the storage devices carry the device identifiers when broadcasting the IP allocation request outwards.
S103: and when the management center acquires the IP allocation request, traversing all IP addresses in the preset IP network segment, and screening out available IP addresses.
In the embodiment of the present invention, in order to improve the efficiency of the management center in allocating IP addresses to the storage device, an IP network segment may be set in advance in the management center, and the IP network segment includes a plurality of IP addresses.
In practical application, one IP address can only be used by one device, and in order to ensure the availability of the IP address allocated to the storage device, the management center can traverse all the IP addresses in the preset IP network segment, and detect the availability of each IP address, thereby screening out the available IP addresses.
In a specific implementation, whether the IP address is available or not may be detected in a ping communication manner. The management center can sequentially execute ping operation on all IP addresses in the preset IP network segment; when the IP address is already occupied by other devices, the management center can realize ping communication with the IP address, so that the management center can mark the IP address of ping communication as an unavailable IP address. When the IP address is not occupied by other devices, the management center cannot ping the IP address, so that the management center can mark the IP address which is not ping as an available IP address.
S104: the management center selects a target IP address corresponding to the equipment identifier from all available IP addresses depending on the equipment identifier carried in the IP allocation request.
It is considered that there are often a plurality of available IP addresses, and there may be a plurality of IP allocation requests received by the management center at the same time. In practical application, the management center can select a corresponding number of target IP addresses from the available IP addresses according to the number of the IP allocation requests; and a one-to-one correspondence relationship between each device identifier and the target IP address is established, namely, a corresponding target IP address is allocated to each device identifier, so that the condition that the IP addresses allocated to each storage device are not repeated is ensured.
S105: the management center broadcasts the target IP address and the equipment identification as configuration information.
The management center may use each destination IP address and its corresponding device identification as a piece of configuration information. Considering that there may be multiple storage devices that need to acquire IP addresses at the same time, the management center may obtain multiple pieces of configuration information.
In practical application, the management center may sequentially broadcast each piece of configuration information outwards, or may package all pieces of configuration information into one data packet to be broadcast outwards.
S106: and when the storage equipment acquires the configuration information broadcasted by the management center, judging whether the equipment identifier carried in the configuration information is matched with the equipment identifier of the storage equipment.
When the management center broadcasts each piece of configuration information outwards in sequence, the storage device can judge whether the device identifier carried in the piece of configuration information is matched with the device identifier of the storage device after acquiring each piece of configuration information. When there is a match between the device identifier carried in a certain piece of configuration information and the device identifier of the user, S107 is executed.
When the management center packs all the configuration information into a data packet for broadcasting, the storage device may sequentially determine the configuration information carried in the data packet after acquiring the data packet, and when there is configuration information matching with the device identifier of the storage device, execute S107.
S107: and when the equipment identifier carried in the configuration information is matched with the own equipment identifier, the storage equipment takes the target IP address carried in the configuration information as the own IP address.
In consideration of the fact that in practical application, in the period from the time when the management center broadcasts the configuration information to the time when the storage device acquires the configuration information, the target IP address carried in the configuration information may be occupied by other devices, so that, in order to further ensure the availability of the target IP address acquired by the storage device, the storage device may first determine whether the target IP address carried in the configuration information is ping-on before the target IP address carried in the configuration information is used as its own IP address; when the target IP address cannot ping, it indicates that the target IP address is not occupied, and at this time, the storage device may use the target IP address as its own IP address.
In practical application, the storage device may call an underlying CLI interface to configure the target IP address as its own IP address.
According to the technical scheme, after the storage equipment is powered on and started, whether the storage equipment is configured with the IP address or not is detected; and when the self is not configured with the IP address, the IP allocation request carrying the self equipment identification is broadcasted outwards. And when the management center acquires the IP allocation request, traversing all IP addresses in the preset IP network segment, and screening out available IP addresses. By screening the IP addresses in the IP network segment, the availability of the screened IP addresses can be ensured. In order to avoid the situation that different storage devices share the same IP address, the management center can select a target IP address corresponding to the equipment identifier from all available IP addresses depending on the equipment identifier carried in the IP allocation request; and broadcasting the target IP address and the equipment identification as configuration information. When the storage equipment acquires the configuration information broadcasted by the management center, judging whether the equipment identification carried in the configuration information is matched with the equipment identification of the storage equipment; when the device identifier carried in the configuration information matches the device identifier of the storage device, it indicates that the target IP address carried in the configuration information is the unique IP address allocated to the storage device by the management center, so that the storage device can use the target IP address carried in the configuration information as the IP address of the storage device. In the technical scheme, the IP address configuration process is initiated by the storage device, the management center allocates the IP addresses for the storage device depending on the device identifier, the situation that the same IP address is occupied by a plurality of storage devices is avoided, and the management center can realize automatic configuration of the IP addresses of the plurality of storage devices. The efficiency of IP address configuration is improved on the premise of ensuring the availability of the IP address.
In order to avoid that the management center reallocates the target IP address allocated to the storage device to other devices, the management center can record the corresponding relationship between the target IP address and the device identifier after selecting the target IP address corresponding to the device identifier from all available IP addresses, so that the management center can clearly know which IP addresses in the preset IP network segment have been allocated to the storage device.
In practical application, the management center may record the corresponding relationship between the target IP address and the device identifier in the LLDP message body manner. After the management center allocates a corresponding target IP address to the new device identifier each time, a TLV field may be added to the LLDP message body, and the target IP address, the device identifier corresponding to the target IP address, and the message type are written into the TLV field.
In consideration of that the LLDP message body of the management center records other types of information besides the corresponding relationship between the target IP address and the device identifier, in order to facilitate the management center to intuitively know the function of the stored information, the TLV field may store the corresponding message type, for example, the message type is an IP allocation request, in addition to the target IP address and the device identifier corresponding thereto.
By adopting the LLDP message body to record the target IP address and the corresponding device identification thereof, the management center can clearly know which IP addresses in the preset IP network segment are occupied by the storage device, thereby effectively avoiding the situation that the target IP address allocated to the storage device is reallocated to other devices, and ensuring the reasonable calling of the management center to the IP address in the preset IP network segment.
Fig. 2 is a schematic structural diagram of an apparatus for configuring an IP address of a storage device according to an embodiment of the present invention, which is suitable for a management center, and includes a screening unit 21, a selecting unit 22, and a broadcasting unit 23;
the screening unit 21 is configured to, when an IP allocation request is obtained, traverse all IP addresses in a preset IP network segment, and screen out available IP addresses;
a selecting unit 22, configured to select, depending on the device identifier carried in the IP allocation request, a target IP address corresponding to the device identifier from all available IP addresses;
and a broadcasting unit 23, configured to broadcast the target IP address and the device identifier as configuration information.
Optionally, the screening unit comprises an execution subunit and a marking subunit;
the execution subunit is used for sequentially executing ping communication operation on all IP addresses in the preset IP network segment;
the marking subunit is used for marking the IP address of ping communication as an unavailable IP address; and marking the IP address which is not ping-through as an available IP address.
Optionally, a recording unit is further included;
and the recording unit is used for recording the corresponding relation between the target IP address and the equipment identifier.
Optionally, the recording unit is specifically configured to add a TLV field in the LLDP message body, and write the target IP address, the device identifier corresponding to the target IP address, and the message type into the TLV field.
Optionally, when there are multiple IP allocation requests, the selecting unit is specifically configured to select a corresponding number of target IP addresses from the available IP addresses according to the number of the IP allocation requests; establishing a one-to-one corresponding relation between each equipment identifier and a target IP address;
correspondingly, the broadcasting unit is specifically configured to assemble the device identifiers and the corresponding target IP addresses into configuration information for broadcasting.
The description of the features in the embodiment corresponding to fig. 2 may refer to the related description of the embodiment corresponding to fig. 1, and is not repeated here.
According to the technical scheme, when the management center obtains the IP allocation request, all IP addresses in the preset IP network segment are traversed, and the available IP addresses are screened out. By screening the IP addresses in the IP network segment, the availability of the screened IP addresses can be ensured. In order to avoid the situation that different storage devices share the same IP address, the management center can select a target IP address corresponding to the equipment identifier from all available IP addresses depending on the equipment identifier carried in the IP allocation request; and broadcasting the target IP address and the equipment identifier as configuration information so that the storage equipment takes the target IP address carried in the corresponding configuration information as the IP address of the storage equipment. In the technical scheme, the IP address configuration process is initiated by the storage device, the management center allocates the IP addresses for the storage device depending on the device identifier, the situation that the same IP address is occupied by a plurality of storage devices is avoided, and the management center can realize automatic configuration of the IP addresses of the plurality of storage devices. The efficiency of IP address configuration is improved on the premise of ensuring the availability of the IP address.
Fig. 3 is a schematic structural diagram of an apparatus for configuring an IP address of a storage device, which is applicable to the storage device and includes a detection unit 31, a broadcast unit 32, a determination unit 33, and an acting unit 34;
the detecting unit 31 is configured to detect whether the IP address is configured after power-on start;
the broadcasting unit 32 is configured to broadcast an IP allocation request carrying an own device identifier to the outside when the IP address is not configured by the broadcasting unit;
the judging unit 33 is configured to, when the configuration information broadcasted by the management center is acquired, judge whether the device identifier carried in the configuration information matches with the device identifier of the management center;
and a unit 34, configured to use the target IP address carried in the configuration information as its own IP address when the device identifier carried in the configuration information matches with its own device identifier.
The description of the features in the embodiment corresponding to fig. 3 may refer to the related description of the embodiment corresponding to fig. 1, and is not repeated here.
According to the technical scheme, after the storage equipment is powered on and started, whether the storage equipment is configured with the IP address or not is detected; when the IP address is not configured, the IP allocation request carrying the equipment identifier of the management center is broadcasted outwards, so that the management center can traverse all the IP addresses in the preset IP network segment to screen out the available IP addresses when acquiring the IP allocation request. In order to avoid the situation that different storage devices share the same IP address, the management center can select a target IP address corresponding to the equipment identifier from all available IP addresses depending on the equipment identifier carried in the IP allocation request; and broadcasting the target IP address and the equipment identification as configuration information. When the storage equipment acquires the configuration information broadcasted by the management center, judging whether the equipment identification carried in the configuration information is matched with the equipment identification of the storage equipment; when the device identifier carried in the configuration information matches the device identifier of the storage device, it indicates that the target IP address carried in the configuration information is the unique IP address allocated to the storage device by the management center, so that the storage device can use the target IP address carried in the configuration information as the IP address of the storage device. In the technical scheme, the IP address configuration process is initiated by the storage device, the management center allocates the IP addresses for the storage device depending on the device identifier, the situation that the same IP address is occupied by a plurality of storage devices is avoided, and the management center can realize automatic configuration of the IP addresses of the plurality of storage devices. The efficiency of IP address configuration is improved on the premise of ensuring the availability of the IP address.
Fig. 4 is a schematic structural diagram of a configuration system for an IP address of a storage device according to an embodiment of the present invention, including a management center 41 and a storage device 42;
the management center 41 is configured to, when an IP allocation request is obtained, traverse all IP addresses in a preset IP network segment, and screen out available IP addresses; selecting a target IP address corresponding to the equipment identifier from all available IP addresses depending on the equipment identifier carried in the IP allocation request; broadcasting the target IP address and the equipment identification as configuration information;
the storage device 42 is used for detecting whether the IP address is configured or not after the power-on starting; when the self is not configured with the IP address, an IP allocation request carrying the self equipment identification is broadcasted outwards; when the configuration information broadcasted by the management center 41 is acquired, whether the equipment identifier carried in the configuration information is matched with the equipment identifier of the management center is judged; and when the equipment identifier carried in the configuration information is matched with the own equipment identifier, taking the target IP address carried in the configuration information as the own IP address.
The management center 41 may implement configuration of IP addresses of the plurality of storage devices 42, and fig. 4 is a schematic diagram illustrating n storage devices 42 as an example, and in order to distinguish the n storage devices 42, the n storage devices are respectively marked as storage device 1, storage device 2, and storage device n in fig. 4.
Since the IP allocation requests sent by each storage device are different in device identifier and the target IP addresses allocated to the storage device by the management center are different, in order to facilitate intuitive distinction, in fig. 4, suffixes are added to the IP allocation requests, the target IP addresses, and the device identifiers of the storage devices, respectively, for example, the IP allocation request of the storage device n is denoted as "IP allocation request n", the target IP address of the storage device n is denoted as "target IP address notation n", and the device identifier of the storage device n is denoted as "device identifier n".
The description of the features in the embodiment corresponding to fig. 4 may refer to the related description of the embodiment corresponding to fig. 1, and is not repeated here.
According to the technical scheme, after the storage equipment is powered on and started, whether the storage equipment is configured with the IP address or not is detected; and when the self is not configured with the IP address, the IP allocation request carrying the self equipment identification is broadcasted outwards. And when the management center acquires the IP allocation request, traversing all IP addresses in the preset IP network segment, and screening out available IP addresses. By screening the IP addresses in the IP network segment, the availability of the screened IP addresses can be ensured. In order to avoid the situation that different storage devices share the same IP address, the management center can select a target IP address corresponding to the equipment identifier from all available IP addresses depending on the equipment identifier carried in the IP allocation request; and broadcasting the target IP address and the equipment identification as configuration information. When the storage equipment acquires the configuration information broadcasted by the management center, judging whether the equipment identification carried in the configuration information is matched with the equipment identification of the storage equipment; when the device identifier carried in the configuration information matches the device identifier of the storage device, it indicates that the target IP address carried in the configuration information is the unique IP address allocated to the storage device by the management center, so that the storage device can use the target IP address carried in the configuration information as the IP address of the storage device. In the technical scheme, the IP address configuration process is initiated by the storage device, the management center allocates the IP addresses for the storage device depending on the device identifier, the situation that the same IP address is occupied by a plurality of storage devices is avoided, and the management center can realize automatic configuration of the IP addresses of the plurality of storage devices. The efficiency of IP address configuration is improved on the premise of ensuring the availability of the IP address.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method for configuring an IP address of a storage device according to any of the above embodiments are implemented.
The method, the apparatus, the system and the computer-readable storage medium for configuring the IP address of the storage device according to the embodiments of the present invention are described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

Claims (10)

1. A configuration method of an IP address of a storage device is suitable for a management center, and comprises the following steps:
when an IP allocation request is obtained, traversing all IP addresses in a preset IP network segment, and screening out available IP addresses;
selecting a target IP address corresponding to the equipment identifier from all the available IP addresses depending on the equipment identifier carried in the IP allocation request;
and broadcasting the target IP address and the equipment identification as configuration information.
2. The method of claim 1, wherein traversing all IP addresses in the preset IP network segment to screen out available IP addresses comprises:
sequentially executing ping operation on all IP addresses in the preset IP network segment;
marking the IP address of ping communication as an unavailable IP address; and marking the IP address which is not ping-through as an available IP address.
3. The method according to claim 2, further comprising, after the selecting the target IP address corresponding to the device identifier from all the available IP addresses:
and recording the corresponding relation between the target IP address and the equipment identifier.
4. The method according to claim 3, wherein the recording the correspondence between the target IP address and the device identifier comprises:
and adding a TLV field in an LLDP message body, and writing the target IP address, the device identification corresponding to the target IP address and the message type into the TLV field.
5. The method according to any one of claims 1 to 4, wherein when there are a plurality of IP allocation requests, the selecting, depending on a device identifier carried in the IP allocation request, a target IP address corresponding to the device identifier from all the available IP addresses includes:
selecting a corresponding number of target IP addresses from the available IP addresses according to the number of the IP allocation requests; establishing a one-to-one corresponding relation between each equipment identifier and a target IP address;
correspondingly, the broadcasting the target IP address and the device identifier as configuration information includes:
and assembling each device identification and the corresponding target IP address into configuration information to be broadcast.
6. A configuration device of an IP address of a storage device is characterized by being suitable for a management center and comprising a screening unit, a selecting unit and a broadcasting unit;
the screening unit is used for traversing all IP addresses in a preset IP network segment to screen out available IP addresses when the IP allocation request is obtained;
the selecting unit is configured to select a target IP address corresponding to the device identifier from all the available IP addresses depending on the device identifier carried in the IP allocation request;
the broadcasting unit is configured to broadcast the target IP address and the device identifier as configuration information.
7. A configuration method of an IP address of a storage device is suitable for the storage device, and comprises the following steps:
after power-on starting, detecting whether the IP address is configured per se;
when the self is not configured with the IP address, an IP allocation request carrying the self equipment identification is broadcasted outwards;
when configuration information broadcasted by a management center is acquired, whether an equipment identifier carried in the configuration information is matched with an equipment identifier of the management center is judged;
and when the equipment identifier carried in the configuration information is matched with the own equipment identifier, taking the target IP address carried in the configuration information as the own IP address.
8. The device for configuring the IP address of the storage equipment is characterized by being suitable for the storage equipment and comprising a detection unit, a broadcasting unit, a judgment unit and an acting unit;
the detection unit is used for detecting whether the IP address is configured or not after the power-on starting;
the broadcasting unit is used for broadcasting an IP allocation request carrying the own equipment identifier outwards when the IP address is not configured;
the judging unit is used for judging whether the equipment identifier carried in the configuration information is matched with the equipment identifier of the judging unit when the configuration information broadcasted by the management center is acquired;
and the acting unit is used for taking the target IP address carried in the configuration information as the IP address of the device when the device identification carried in the configuration information is matched with the device identification of the device.
9. A configuration system of IP address of storage device is characterized in that the configuration system comprises a management center and the storage device;
the management center is used for traversing all IP addresses in a preset IP network segment to screen out available IP addresses when an IP allocation request is obtained; selecting a target IP address corresponding to the equipment identifier from all the available IP addresses depending on the equipment identifier carried in the IP allocation request; broadcasting the target IP address and the equipment identification as configuration information;
the storage equipment is used for detecting whether the storage equipment is configured with an IP address or not after being electrified and started; when the self is not configured with the IP address, an IP allocation request carrying the self equipment identification is broadcasted outwards; when configuration information broadcasted by a management center is acquired, whether an equipment identifier carried in the configuration information is matched with an equipment identifier of the management center is judged; and when the equipment identifier carried in the configuration information is matched with the own equipment identifier, taking the target IP address carried in the configuration information as the own IP address.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for configuring an IP address of a storage device according to any one of claims 1 to 5.
CN202010662957.8A 2020-07-10 2020-07-10 Configuration method, device, system and medium for IP address of storage equipment Pending CN111885215A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010662957.8A CN111885215A (en) 2020-07-10 2020-07-10 Configuration method, device, system and medium for IP address of storage equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010662957.8A CN111885215A (en) 2020-07-10 2020-07-10 Configuration method, device, system and medium for IP address of storage equipment

Publications (1)

Publication Number Publication Date
CN111885215A true CN111885215A (en) 2020-11-03

Family

ID=73150086

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010662957.8A Pending CN111885215A (en) 2020-07-10 2020-07-10 Configuration method, device, system and medium for IP address of storage equipment

Country Status (1)

Country Link
CN (1) CN111885215A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002151A (en) * 2022-05-07 2022-09-02 通号城市轨道交通技术有限公司 Method and device for building test system of automatic train monitoring system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301141A (en) * 2014-10-10 2015-01-21 华为技术有限公司 Method, device and system for storing configuration information
CN106357838A (en) * 2016-09-26 2017-01-25 杭州昆海信息技术有限公司 Method and device for distributing IP (Internet protocol) address
CN106506236A (en) * 2016-12-08 2017-03-15 上海斐讯数据通信技术有限公司 The methods, devices and systems that a kind of WAP is declared automatically
CN109474709A (en) * 2017-09-08 2019-03-15 比亚迪股份有限公司 The IP address dynamic allocation method and system and device of Ethernet access equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104301141A (en) * 2014-10-10 2015-01-21 华为技术有限公司 Method, device and system for storing configuration information
CN106357838A (en) * 2016-09-26 2017-01-25 杭州昆海信息技术有限公司 Method and device for distributing IP (Internet protocol) address
CN106506236A (en) * 2016-12-08 2017-03-15 上海斐讯数据通信技术有限公司 The methods, devices and systems that a kind of WAP is declared automatically
CN109474709A (en) * 2017-09-08 2019-03-15 比亚迪股份有限公司 The IP address dynamic allocation method and system and device of Ethernet access equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002151A (en) * 2022-05-07 2022-09-02 通号城市轨道交通技术有限公司 Method and device for building test system of automatic train monitoring system

Similar Documents

Publication Publication Date Title
US7616588B2 (en) Simplified creation and termination of an ad hoc wireless network with internet connection sharing
JP4924157B2 (en) Identifier assigning device, identifier assigning system, and identifier assigning program
US10305822B2 (en) Service chain routing method and system, and equipment in system
WO2020001045A1 (en) Address management method and device
CN106657434B (en) method and device for checking IP address
CN110597664A (en) High-availability cluster resource deployment method, device and related components
CN108429824B (en) Address allocation method and device
CN108989476B (en) Address allocation method and device
CN111263377B (en) Network configuration method, device, equipment and system and distribution network testing method and system
CN112492063A (en) IP address pool allocation and application method, device, equipment and medium
CN111885215A (en) Configuration method, device, system and medium for IP address of storage equipment
CN112910986B (en) Network video recorder channel management method and network video recorder
CN111163245B (en) Method and device for adding network camera in network hard disk video recorder
CN108847999B (en) Equipment network connectivity detection method, device, terminal equipment and storage medium
CN112272244B (en) Router WAN end IPv6 internet mode configuration method and device
CN115314468B (en) IP address allocation method and system for container cloud platform
CN110247778B (en) Operating system installation method and device, electronic equipment and storage medium
CN109819059B (en) Method, device, equipment and storage medium for managing network equipment
CN109981813A (en) Message processing method and device
CN109284174A (en) A kind of multi-service process performance statistical method, device and system
CN107968893B (en) Communication method and device, electronic equipment and computer readable storage medium
CN108848033B (en) Method, device and storage medium for avoiding route conflict
CN110191055B (en) Label distribution method and device
CN111385520B (en) Automatic networking method and device of video monitoring equipment
CN114513455A (en) Route tracking method, device, equipment and storage medium

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