CN115484229A - Method, device, terminal and medium for configuring IP (Internet protocol) of storage equipment in local area network - Google Patents

Method, device, terminal and medium for configuring IP (Internet protocol) of storage equipment in local area network Download PDF

Info

Publication number
CN115484229A
CN115484229A CN202211034751.6A CN202211034751A CN115484229A CN 115484229 A CN115484229 A CN 115484229A CN 202211034751 A CN202211034751 A CN 202211034751A CN 115484229 A CN115484229 A CN 115484229A
Authority
CN
China
Prior art keywords
information
static
storage device
local area
area network
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.)
Withdrawn
Application number
CN202211034751.6A
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202211034751.6A priority Critical patent/CN115484229A/en
Publication of CN115484229A publication Critical patent/CN115484229A/en
Withdrawn legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • H04L69/164Adaptation or special uses of UDP protocol

Landscapes

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

Abstract

The invention relates to the field of IP configuration of storage equipment, and particularly discloses a method, a device, a terminal and a medium for IP configuration of the storage equipment in a local area network, wherein dynamic IP information is automatically allocated to the storage equipment to be configured, so that the storage equipment to be configured is added into the local area network; obtaining static IP information of all online storage devices in the current local area network through UDP information communication, and refreshing an IP occupation information table of a database; all historical static IP occupation information is stored in the IP occupation information table; acquiring a refreshed IP occupation information table from a database, and screening available IP information according to the data of the IP occupation information table; generating network configuration information according to the screened available IP information; and configuring static IP for each storage device to be configured according to the network configuration information. The invention obtains the static IP occupation information of the storage equipment through UDP communication between the clients, screens out the available IP information and automatically configures the static IP for the storage equipment, greatly saves the test time and improves the probability of network IP availability.

Description

Method, device, terminal and medium for configuring IP (Internet protocol) of storage equipment in local area network
Technical Field
The invention relates to the field of storage device IP configuration, in particular to a storage device IP configuration method, a storage device IP configuration device, a terminal and a medium in a local area network.
Background
In each testing stage of the storage device, the available IP in the local area network is efficiently and quickly acquired and reasonably planned, which is very important for the smooth development of the test and the early preparation work. The network planning of the lan usually implements network interconnection and interworking between devices in the lan by configuring the switch and the network port of the network line. When a network IP is allocated to a device, control messages are generally transmitted among IP hosts, switches, and routers based on the ICMP protocol, so as to determine whether the network is clear, whether hosts are reachable, whether routes are available, and other information, and these control messages play an important role in transmitting user data.
In the actual testing stage at present, network IP planning and configuration between devices need a test engineer to judge whether an IP is occupied or not and whether the IP is available or not in a way of ping network IPs one by one on the premise that gateway and routing information is known in the testing preparation stage, so as to acquire network information of available IP configuration devices. However, when a test is performed in a complex network environment, the test engineer manually pings the network IPs one by one, and in the process of ping the network, due to factors such as time difference and power failure of the device, IP conflicts may occur between the planned network IPs and other devices, resulting in invalidity of the configured network IPs. Meanwhile, the selection and planning of the network IP are random and irregular due to manual configuration.
Disclosure of Invention
In order to solve the problems, the invention provides a method, a device, a terminal and a medium for configuring storage device IP in a local area network, static IP occupation information of the storage device is obtained through UDP communication between clients, available IP information is screened out according to all historical static IP occupation information to automatically configure the static IP for the storage device, test time is greatly saved, and the probability of network IP availability is improved.
In a first aspect, a technical solution of the present invention provides a method for configuring an IP of a storage device in a local area network, where the method is executed by a client and includes the following steps:
automatically distributing dynamic IP information for the storage equipment to be configured, so that the storage equipment to be configured is added into a local area network;
obtaining static IP information of all online storage devices in the current local area network through UDP information communication, and refreshing an IP occupation information table of a database; all historical static IP occupation information is stored in the IP occupation information table;
acquiring a refreshed IP occupation information table from a database, and screening available IP information according to the data of the IP occupation information table;
generating network configuration information according to the screened available IP information;
and configuring static IP for each storage device to be configured according to the network configuration information.
Further, the IP occupancy information table specifically stores: storage device identification, static IP information used by the storage device, online/offline state of the storage device, and offline time of the offline storage device.
Further, screening out available IP information according to the data in the IP occupancy information table specifically includes:
screening out all static IP information which is not occupied all the time;
judging whether the number of the static IP information which is not occupied all the time is larger than or equal to the number of the storage equipment to be configured or not; recording the number of the static IP information which is not occupied all the time as M, and recording the number of the storage equipment to be configured as N;
if yes, screening out N static IP information from the static IP information which is not occupied all the time as available IP information;
if not, screening (N-M) static IP information from the static IP information of the storage equipment in the current offline state, and forming available IP information together with M static IP information which is not occupied all the time.
Further, screening (N-M) pieces of static IP information from the static IP information of the storage device currently in the offline state includes:
according to the off-line time, performing priority configuration on all storage equipment in the off-line state, wherein the priority is higher the longer the off-line time is away from the current time;
and (N-M) static IP information is screened out from the static IP information of the storage equipment in the offline state from high to low according to the priority.
Further, after configuring the static IP for each storage device to be configured, the method further includes the following steps:
and refreshing the newly configured static IP information to an IP occupation information table of the database.
Further, the method comprises the following steps:
and when the dynamic IP information is automatically distributed to the storage equipment to be configured, the routing information is acquired at the same time.
In a second aspect, the present invention provides an IP configuration apparatus for a storage device in a local area network, where the apparatus is executed by a client and includes,
the dynamic IP information distribution module: automatically distributing dynamic IP information for the storage equipment to be configured, so that the storage equipment to be configured is added into a local area network;
the current storage device information acquisition module: obtaining static IP information of all online storage devices in the current local area network through UDP information communication, and refreshing an IP occupation information table of a database; all historical static IP occupation information is stored in the IP occupation information table;
available IP information screening module: acquiring a refreshed IP occupation information table from a database, and screening available IP information according to the data of the IP occupation information table;
a network configuration information generation module: generating network configuration information according to the screened available IP information;
a static IP configuration module: and configuring static IP for each storage device to be configured according to the network configuration information.
Further, the IP occupancy information table specifically stores: the method comprises the steps of storing equipment identification, static IP information used by the storage equipment, the online/offline state of the storage equipment and the offline time of the offline storage equipment;
the available IP information screening module screens out available IP information according to the data of the IP occupation information table, and the method specifically comprises the following steps:
screening out all static IP information which is not occupied all the time;
judging whether the number of the static IP information which is not occupied all the time is larger than or equal to the number of the storage equipment to be configured or not; recording the number of the static IP information which is not occupied all the time as M, and recording the number of the storage equipment to be configured as N;
if yes, screening out N static IP information from the static IP information which is not occupied all the time as available IP information;
if not, screening (N-M) static IP information from the static IP information of the storage equipment in the current offline state, and forming available IP information together with M static IP information which is not occupied all the time;
the method includes the steps of screening (N-M) static IP information from the static IP information of the storage device in the current offline state, and specifically includes the following steps:
according to the off-line time, performing priority configuration on all storage equipment in the off-line state, wherein the priority is higher the longer the off-line time is away from the current time;
and (N-M) static IP information is screened out from the static IP information of the storage equipment in the offline state from high to low according to the priority.
In a third aspect, a technical solution of the present invention provides a terminal, including:
the memory is used for storing the IP configuration method program of the storage equipment in the local area network;
and the processor is used for realizing the steps of the storage device IP configuration method in the local area network when executing the storage device IP configuration method program in the local area network.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, where a program of a method for configuring an IP storage device in a local area network is stored in the computer-readable storage medium, and when the program of the method for configuring an IP storage device in a local area network is executed by a processor, the method for configuring an IP storage device in a local area network includes any one of the steps described above.
Compared with the prior art, the method, the device, the terminal and the medium for configuring the IP of the storage equipment in the local area network have the following beneficial effects that: the static IP occupation information of the storage device is obtained through UDP communication between the client sides and is stored in the database, all historical static IP occupation information is captured from the database, available IP information is screened out according to all historical static IP occupation information to automatically configure the static IP for the storage device, and the network IP is rapidly, efficiently and automatically allocated through combination of the UDP communication, the database and network configuration of the storage device, so that the testing time is greatly saved, and the probability of network IP availability is improved.
Drawings
In order to clearly illustrate the embodiments or technical solutions of the present application, the drawings used in the embodiments or technical solutions of the present application will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of a method for configuring an IP of a storage device in a local area network according to an embodiment of the present invention.
Fig. 2 is a schematic flowchart of a process of screening available IP information in a method for configuring an IP of a storage device in a local area network according to an embodiment of the present invention.
Fig. 3 is a schematic block diagram of a structure of an IP configuration apparatus for a storage device in a local area network according to an embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the following detailed description is given with reference to the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The core of the invention is that aiming at the condition that invalid configuration and random non-systematic configuration can be caused by configuring and planning the network IP at present, the invention designs an acquisition method for efficiently planning the available test IP in the local area network, combines the characteristics of UDP communication and storage equipment network configuration, fully utilizes the characteristics of UDP message communication, and realizes the acquisition and reasonable planning of the available IP in the equipment local area network. Specifically, dynamic IP is automatically allocated to the storage device to be configured through UDP (User Datagram Protocol) communication between the clients, static IP information of all online storage devices in the current local area network is acquired through a UDP multicast function between the clients, and meanwhile, valid data is acquired through a data capture function and written into a database. The client filters the available IP through the network IP information of the online, offline and lease equipment. The acquisition of the available IP is realized by monitoring the occupied IP by the client, so that the test time can be greatly saved, and the availability probability of the network IP is improved.
Fig. 1 is a schematic flowchart of a method for configuring an IP of a storage device in a local area network, where the method is executed by a client, and as shown in fig. 1, the method includes the following steps.
S1, automatically distributing dynamic IP information for the storage equipment to be configured, and enabling the storage equipment to be configured to be added into a local area network.
At present, at least one storage device to be configured needs to be added into a local area network for testing, firstly, dynamic IP information is automatically and randomly allocated to each storage device to be configured by a DCHP (dynamic host configuration protocol) so that the storage device to be configured can be added into the local area network, then, available IP information is screened out to configure static IP information for each storage device to be configured, namely, the initial dynamic IP information is modified into the static IP information.
And S2, acquiring the static IP information of all online storage devices in the current local area network through UDP information communication, and refreshing an IP occupation information table of the database.
The IP occupancy information table stores all historical static IP occupancy information, that is, storage devices that include the current lan online (certainly not including storage devices to be configured that use dynamic IP information) and storage devices that have been added to the lan with static IP information (i.e., storage devices that are currently offline).
The method comprises the steps of firstly obtaining static IP information of all current online storage devices and refreshing the static IP information to an IP occupation information table of a database so as to screen available IP information by using the latest IP occupation information table and improve the availability of the IP information.
And S3, acquiring the refreshed IP occupation information table from the database, and screening out available IP information according to the data of the IP occupation information table.
And S4, generating network configuration information according to the screened available IP information.
And S5, configuring static IP for each storage device to be configured according to the network configuration information.
It can be understood that the specific implementation refers to modifying the current dynamic IP information of the storage device to be configured into the static IP allocated to the storage device.
The embodiment of the invention provides a method for configuring storage equipment IP in a local area network, which comprises the steps of obtaining static IP occupation information of the storage equipment through UDP communication between client sides, storing the static IP occupation information into a database, capturing all historical static IP occupation information from the database, screening available IP information according to all historical static IP occupation information, automatically configuring the static IP for the storage equipment, realizing fast, efficient and automatic network IP allocation through combination of the UDP communication, the database and network configuration of the storage equipment, greatly saving test time and improving the probability of network IP availability.
On the basis of the above embodiment, as a preferred implementation, the IP occupancy information table specifically stores: the storage device identification, the static IP information used by the storage device, the online/offline state of the storage device, and the offline time of the offline storage device. As shown in table 1.
Table 1: IP occupation information table
Storage device identification Static IP information Status of state Off-line time
Device 1 xxx.xxx.xxx.xxx On-line
Device 2 xxx.xxx.xxx.xxx Off-line 202208160919
Device n xxx.xxx.xxx.xxx On-line
All the currently occupied and ever occupied static IP information can be obtained from the table, and then the current available IP information is screened out.
On the basis of the above embodiment, as a preferred implementation manner, the screening out the available IP information according to the data of the IP occupancy information table in step S3 specifically includes the following steps. Fig. 2 is a flow chart of a screening process of available IP information.
And S3-1, screening all static IP information which is not occupied all the time.
And S3-2, judging whether the number of the static IP information which is not occupied all the time is larger than or equal to the number of the storage equipment to be configured.
And recording the number of the static IP information which is not occupied all the time as M, and recording the number of the storage equipment to be configured as N.
And S3-3, if yes, screening N static IP information from the static IP information which is not occupied all the time to serve as available IP information.
And S3-4, if not, screening (N-M) static IP information from the static IP information of the storage equipment in the current off-line state, and forming available IP information together with the M static IP information which is not occupied all the time.
According to the data in the IP occupation information table, whether the number of the static IP information which is never used can meet the configuration requirement of the storage device to be configured is checked, and if the number of the static IP information which is never used is enough, the corresponding number of the static IP information is directly selected from the static IP information which is never used and is distributed to the storage device to be configured for use. For example, if there are 10 static IP messages that have not been used all the time and there are 5 static IP messages for the secondary storage device, the number of static IP messages that have not been used all the time is greater than the number of static IP messages for the secondary storage device, and 5 static IP messages that have not been used all the time are selected for the secondary storage device. If the number of the static IP information is not enough, then screening out a corresponding number of static IP information from the static IP information of the current off-line storage equipment, for example, there are 3 static IP information which has not been used all the time, there are 5 static IP information of the storage equipment to be configured this time, the number of the static IP information which has not been used all the time is less than the number of the storage equipment to be configured this time, and if there is 2 static IP information, then selecting out 2 static IP information from the off-line storage equipment, and combining with the 3 static IP information which has not been used all the time to form 5 static IP information for the storage equipment to be configured this time.
Of course, when the number of the static IP information that has not been used is not enough and the user needs to borrow the static IP information from the offline storage device, the number of the offline storage device may be more than the number of the static IP information that needs to be used, for example, the number is 2, and 4 offline storage devices are provided, the priority is set according to the offline time of the offline storage device, and then 2 are selected according to the set priority, and the probability that the selection rule is larger as the offline time is longer.
Specifically, in step S3-4, (N-M) pieces of static IP information are screened from the static IP information of the storage device currently in the offline state, which specifically includes:
s3-41, performing priority configuration on all storage devices in an offline state according to the offline time, wherein the priority is higher the longer the offline time is away from the current time;
and S3-42, screening out (N-M) static IP information from the static IP information of the storage equipment in the current offline state according to the priority from high to low.
It should be noted that the offline time of the storage device is stored in table 1, and in the specific implementation, the offline time may be replaced by a lease time, as shown in table 2 below.
Table 1: IP occupation information table
Storage device identification Static IP information Status of state Lease time
Device 1 xxx.xxx.xxx.xxx On-line 202208170000
Device 2 xxx.xxx.xxx.xxx Off-line 202208160919
Device n xxx.xxx.xxx.xxx On-line 202208161800
Note: the current time is 202208160938.
For the offline storage device, the lease time of the offline storage device can be automatically updated to the offline time of the offline storage device, and correspondingly, when the priority is configured for the offline storage device, the priority is configured according to the time length between the lease time and the current time.
On the basis of the above embodiment, as a preferred implementation manner, after configuring a static IP for each storage device to be configured, the newly configured static IP information is refreshed into the IP occupation information table of the database, so that when the storage device is added to the local area network next time, a correct IP occupation information table can be obtained, and an IP collision is avoided.
On the basis of the above embodiment, as a preferred implementation manner, when the dynamic IP information is automatically allocated to the storage device to be configured, the routing information is simultaneously acquired, and then after the IP information is acquired, the static IP is configured for each storage device to be configured by matching with the routing information.
The above embodiment of the method for configuring the IP of the storage device in the local area network is described in detail, and based on the method for configuring the IP of the storage device in the local area network described in the above embodiment, the embodiment of the present invention further provides a device for configuring the IP of the storage device in the local area network corresponding to the method.
Fig. 3 is a schematic block diagram of a structure of an apparatus for configuring an IP of a storage device in a local area network according to an embodiment of the present invention, where the apparatus is executed by a client, and as shown in fig. 3, the apparatus includes: the system comprises a dynamic IP information distribution module 101, a current storage device information acquisition module 102, an available IP information screening module 103, a network configuration information generation module 104 and a static IP configuration module 105.
The dynamic IP information allocation module 101: and automatically distributing dynamic IP information for the storage equipment to be configured, so that the storage equipment to be configured is added into the local area network.
The current storage device information acquisition module 102: obtaining static IP information of all online storage devices in the current local area network through UDP information communication, and refreshing an IP occupation information table of a database; all historical static IP occupation information is stored in the IP occupation information table.
Available IP information screening module 103: and acquiring the refreshed IP occupation information table from the database, and screening out available IP information according to the data of the IP occupation information table.
The network configuration information generation module 104: and generating network configuration information according to the screened available IP information.
The static IP configuration module 105: and configuring static IP for each storage device to be configured according to the network configuration information.
The IP occupation information table specifically stores: the storage device identification, the static IP information used by the storage device, the online/offline state of the storage device, and the offline time of the offline storage device.
Correspondingly, the available IP information screening module 103 screens out available IP information according to the data in the IP occupancy information table, and specifically includes:
screening out all static IP information which is not occupied all the time;
judging whether the number of the static IP information which is not occupied all the time is larger than or equal to the number of the storage equipment to be configured or not; recording the number of the static IP information which is not occupied all the time as M, and recording the number of the storage equipment to be configured as N;
if yes, screening out N static IP information from the static IP information which is not occupied all the time as available IP information;
if not, screening (N-M) static IP information from the static IP information of the storage equipment in the current offline state, and forming available IP information together with M static IP information which is not occupied all the time.
The method includes the steps of screening (N-M) static IP information from the static IP information of the storage device in the current offline state, and specifically includes the following steps:
according to the off-line time, performing priority configuration on all storage equipment in the off-line state, wherein the priority is higher the longer the off-line time is away from the current time;
and (N-M) static IP information is screened out from the static IP information of the storage equipment in the offline state from high to low according to the priority.
The IP configuration apparatus of the storage device in the local area network of the embodiment is used to implement the foregoing IP configuration method of the storage device in the local area network, so that a specific implementation manner of the apparatus may be found in the foregoing embodiment section of the IP configuration method of the storage device in the local area network, and therefore, reference may be made to descriptions of corresponding embodiments of the respective sections for the specific implementation manner, and a description thereof will not be provided here.
In addition, since the IP configuration apparatus for storage devices in a local area network of this embodiment is used to implement the IP configuration method for storage devices in a local area network, the role of the IP configuration apparatus corresponds to that of the method described above, and details are not described here.
Fig. 4 is a schematic structural diagram of a terminal device 400 according to an embodiment of the present invention, including: a processor 410, a memory 420, and a communication unit 430. The processor 410 is configured to implement the following steps when implementing the in-lan storage device IP configuration program stored in the memory 420:
s1, automatically distributing dynamic IP information for storage equipment to be configured, and enabling the storage equipment to be configured to be added into a local area network;
s2, obtaining static IP information of all online storage devices in the current local area network through UDP information communication, and refreshing an IP occupation information table of a database; all historical static IP occupation information is stored in the IP occupation information table;
s3, acquiring a refreshed IP occupation information table from the database, and screening available IP information according to the data of the IP occupation information table;
s4, generating network configuration information according to the screened available IP information;
and S5, configuring static IP for each storage device to be configured according to the network configuration information.
The invention acquires the static IP occupation information of the storage equipment through UDP communication between the clients and stores the static IP occupation information in the database, captures all historical static IP occupation information from the database, screens out available IP information according to all historical static IP occupation information and automatically configures the static IP for the storage equipment, and realizes fast, efficient and automatic network IP allocation through the combination of UDP communication, the database and network configuration of the storage equipment, thereby greatly saving test time and improving the probability of network IP availability.
The terminal apparatus 400 includes a processor 410, a memory 420, and a communication unit 430. The components communicate via one or more buses, and those skilled in the art will appreciate that the architecture of the servers shown in the figures is not intended to be limiting, and may be a bus architecture, a star architecture, a combination of more or less components than those shown, or a different arrangement of components.
The memory 420 may be used for storing instructions executed by the processor 410, and the memory 420 may be implemented by any type of volatile or non-volatile storage terminal or combination thereof, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The executable instructions in memory 420, when executed by processor 410, enable terminal 400 to perform some or all of the steps in the method embodiments described below.
The processor 410 is a control center of the storage terminal, connects various parts of the entire electronic terminal using various interfaces and lines, and performs various functions of the electronic terminal and/or processes data by operating or executing software programs and/or modules stored in the memory 420 and calling data stored in the memory. The processor may be composed of an Integrated Circuit (IC), for example, a single packaged IC, or a plurality of packaged ICs connected with the same or different functions. For example, the processor 410 may include only a Central Processing Unit (CPU). In the embodiment of the present invention, the CPU may be a single operation core, or may include multiple operation cores.
A communication unit 430, configured to establish a communication channel so that the storage terminal can communicate with other terminals. And receiving user data sent by other terminals or sending the user data to other terminals.
The present invention also provides a computer storage medium, wherein the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a Random Access Memory (RAM).
The computer storage medium stores a storage device IP configuration program within a local area network, which when executed by a processor implements the steps of:
s1, automatically distributing dynamic IP information for storage equipment to be configured, and enabling the storage equipment to be configured to be added into a local area network;
s2, obtaining static IP information of all online storage devices in the current local area network through UDP information communication, and refreshing an IP occupation information table of a database; all historical static IP occupation information is stored in the IP occupation information table;
s3, acquiring a refreshed IP occupation information table from the database, and screening available IP information according to the data of the IP occupation information table;
s4, generating network configuration information according to the screened available IP information;
and S5, configuring static IP for each storage device to be configured according to the network configuration information.
The invention acquires the static IP occupation information of the storage equipment through UDP communication between the clients and stores the static IP occupation information in the database, captures all historical static IP occupation information from the database, screens out available IP information according to all historical static IP occupation information and automatically configures the static IP for the storage equipment, and realizes fast, efficient and automatic network IP allocation through the combination of UDP communication, the database and network configuration of the storage equipment, thereby greatly saving test time and improving the probability of network IP availability.
Those skilled in the art will readily appreciate that the techniques of the embodiments of the present invention may be implemented as software plus a required general purpose hardware platform. Based on such understanding, the technical solutions in the embodiments of the present invention may be embodied in the form of a software product, where the computer software product is stored in a storage medium, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and the like, and the storage medium can store program codes, and includes instructions for enabling a computer terminal (which may be a personal computer, a server, or a second terminal, a network terminal, and the like) to perform all or part of the steps of the method in the embodiments of the present invention.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The above disclosure is only for the preferred embodiments of the present invention, but the present invention is not limited thereto, and any non-inventive changes that can be made by those skilled in the art and several modifications and amendments made without departing from the principle of the present invention shall fall within the protection scope of the present invention.

Claims (10)

1. A storage device IP configuration method in a local area network is characterized in that the method is executed by a client and comprises the following steps:
automatically distributing dynamic IP information for the storage equipment to be configured, so that the storage equipment to be configured is added into a local area network;
obtaining static IP information of all online storage devices in the current local area network through UDP information communication, and refreshing an IP occupation information table of a database; all historical static IP occupation information is stored in the IP occupation information table;
acquiring a refreshed IP occupation information table from a database, and screening available IP information according to data of the IP occupation information table;
generating network configuration information according to the screened available IP information;
and configuring static IP for each storage device to be configured according to the network configuration information.
2. The IP configuration method for storage devices in a local area network according to claim 1, wherein the IP occupancy information table specifically stores: storage device identification, static IP information used by the storage device, online/offline state of the storage device, and offline time of the offline storage device.
3. The IP configuration method for storage devices in a local area network according to claim 2, wherein screening out available IP information according to data in an IP occupancy information table specifically comprises:
screening out all static IP information which is not occupied all the time;
judging whether the number of the static IP information which is not occupied all the time is larger than or equal to the number of the storage equipment to be configured or not; recording the number of the static IP information which is not occupied all the time as M, and recording the number of the storage equipment to be configured as N;
if yes, screening N static IP information from the static IP information which is not occupied all the time as available IP information;
if not, screening (N-M) static IP information from the static IP information of the storage equipment in the current offline state, and forming available IP information together with M static IP information which is not occupied all the time.
4. The IP configuration method for storage devices in a local area network according to claim 3, wherein the step of screening (N-M) pieces of static IP information from the static IP information of the storage device currently in an offline state specifically comprises:
according to the off-line time, performing priority configuration on all storage devices in the off-line state, wherein the priority is higher the longer the off-line time is away from the current time;
and (N-M) static IP information is screened out from the static IP information of the storage equipment in the offline state from high to low according to the priority.
5. The IP configuration method for storage devices in a local area network according to claim 4, further comprising the following steps after configuring a static IP for each storage device to be configured:
and refreshing the newly configured static IP information to an IP occupation information table of the database.
6. The IP configuration method for storage devices in lan according to claim 5, further comprising the steps of:
and when the dynamic IP information is automatically distributed to the storage equipment to be configured, the routing information is acquired at the same time.
7. An IP configuration device of a storage device in a local area network, which is executed by a client and comprises,
the dynamic IP information distribution module: automatically distributing dynamic IP information for the storage equipment to be configured, so that the storage equipment to be configured is added into a local area network;
the current storage device information acquisition module: obtaining static IP information of all online storage devices in the current local area network through UDP information communication, and refreshing an IP occupation information table of a database; all historical static IP occupation information is stored in the IP occupation information table;
available IP information screening module: acquiring a refreshed IP occupation information table from a database, and screening available IP information according to data of the IP occupation information table;
a network configuration information generation module: generating network configuration information according to the screened available IP information;
a static IP configuration module: and configuring static IP for each storage device to be configured according to the network configuration information.
8. The IP configuration apparatus for storage devices in a local area network according to claim 7, wherein the IP occupancy information table specifically stores: the method comprises the steps of storing a device identifier, static IP information used by the storage device, the online/offline state of the storage device and the offline time of the offline storage device;
the available IP information screening module screens out available IP information according to the data of the IP occupation information table, and the method specifically comprises the following steps:
screening out all static IP information which is not occupied all the time;
judging whether the number of the static IP information which is not occupied all the time is larger than or equal to the number of the storage equipment to be configured or not; recording the number of the static IP information which is not occupied all the time as M, and recording the number of the storage equipment to be configured as N;
if yes, screening out N static IP information from the static IP information which is not occupied all the time as available IP information;
if not, screening (N-M) static IP information from the static IP information of the storage equipment in the current offline state, and forming available IP information together with M static IP information which is not occupied all the time;
the method includes the steps of screening (N-M) static IP information from the static IP information of the storage device in the current offline state, and specifically includes the following steps:
according to the off-line time, performing priority configuration on all storage devices in the off-line state, wherein the priority is higher the longer the off-line time is away from the current time;
and (N-M) static IP information is screened out from the static IP information of the storage equipment in the offline state from high to low according to the priority.
9. A terminal, comprising:
the memory is used for storing an IP configuration program of the storage equipment in the local area network;
a processor for implementing the steps of the method for configuring an IP of a storage device in a local area network according to any one of claims 1 to 6 when executing the IP configuration program of the storage device in a local area network.
10. A computer-readable storage medium, wherein the readable storage medium stores thereon a storage device IP configuration program in a local area network, and the storage device IP configuration program when executed by a processor implements the steps of the storage device IP configuration method in the local area network according to any one of claims 1 to 6.
CN202211034751.6A 2022-08-26 2022-08-26 Method, device, terminal and medium for configuring IP (Internet protocol) of storage equipment in local area network Withdrawn CN115484229A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211034751.6A CN115484229A (en) 2022-08-26 2022-08-26 Method, device, terminal and medium for configuring IP (Internet protocol) of storage equipment in local area network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211034751.6A CN115484229A (en) 2022-08-26 2022-08-26 Method, device, terminal and medium for configuring IP (Internet protocol) of storage equipment in local area network

Publications (1)

Publication Number Publication Date
CN115484229A true CN115484229A (en) 2022-12-16

Family

ID=84420931

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211034751.6A Withdrawn CN115484229A (en) 2022-08-26 2022-08-26 Method, device, terminal and medium for configuring IP (Internet protocol) of storage equipment in local area network

Country Status (1)

Country Link
CN (1) CN115484229A (en)

Similar Documents

Publication Publication Date Title
US7440415B2 (en) Virtual network addresses
CN109344014B (en) Main/standby switching method and device and communication equipment
JP2015507466A (en) System and method for configuring a power distribution unit
CN111431758B (en) Cloud network equipment testing method and device, storage medium and computer equipment
EP3905598A1 (en) Message processing method and apparatus, control plane device, and computer storage medium
CN109194525A (en) A kind of network node configuration method and management node
CN110830324A (en) Method and device for detecting network connectivity of data center and electronic equipment
CN111182022A (en) Data transmission method and device, storage medium and electronic device
US9641595B2 (en) System management apparatus, system management method, and storage medium
CN114371912A (en) Virtual network management method of data center and data center system
CN114915561B (en) Network topology graph generation method and device
CN114465931A (en) Network detection method, device, electronic equipment and storage medium
CN105187312A (en) Method, device and router for carrying out network communication on batch terminal equipment
CN114448828A (en) Storage double-active function testing method, system, terminal and storage medium
CN112995042A (en) Method, device and equipment for generating service topological graph and storage medium
CN115484229A (en) Method, device, terminal and medium for configuring IP (Internet protocol) of storage equipment in local area network
CN109889421B (en) Router management method, device, terminal, system and storage medium
CN116319492A (en) Switch testing method and device, storage medium and electronic equipment
CN107172229B (en) Router configuration method and device
CN111277463B (en) Method, system, terminal and storage medium for testing accuracy of gateway address acquisition by BMC
CN107454210A (en) Communication means and system
CN114285739A (en) Node information batch configuration method, device, terminal and storage medium
CN113329104A (en) Multi-node server, interaction method, device, exchange chip and medium
CN111835534B (en) Method for cluster control, network device, master control node device and computer readable storage medium
CN115297004B (en) Method for realizing VPC peer-to-peer connection in single available area

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
WW01 Invention patent application withdrawn after publication

Application publication date: 20221216

WW01 Invention patent application withdrawn after publication