CN115333932A - Automatic networking method of server, storage medium and electronic equipment - Google Patents

Automatic networking method of server, storage medium and electronic equipment Download PDF

Info

Publication number
CN115333932A
CN115333932A CN202210960458.6A CN202210960458A CN115333932A CN 115333932 A CN115333932 A CN 115333932A CN 202210960458 A CN202210960458 A CN 202210960458A CN 115333932 A CN115333932 A CN 115333932A
Authority
CN
China
Prior art keywords
server
address
network card
idc
console
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.)
Granted
Application number
CN202210960458.6A
Other languages
Chinese (zh)
Other versions
CN115333932B (en
Inventor
李艳波
王鑫哲
贾宏伟
郭建君
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Weiling Times Technology Co Ltd
Original Assignee
Beijing Weiling Times 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 Beijing Weiling Times Technology Co Ltd filed Critical Beijing Weiling Times Technology Co Ltd
Priority to CN202210960458.6A priority Critical patent/CN115333932B/en
Publication of CN115333932A publication Critical patent/CN115333932A/en
Application granted granted Critical
Publication of CN115333932B publication Critical patent/CN115333932B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0876Aspects of the degree of configuration automation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/09Mapping addresses
    • H04L61/25Mapping addresses of the same type
    • H04L61/2503Translation of Internet protocol [IP] addresses
    • H04L61/255Maintenance or indexing of mapping tables

Landscapes

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

Abstract

The application relates to an automatic networking method of a server, which is applied to the server on the shelf in a machine room and comprises the following steps: acquiring a corresponding network card address according to the server management IP address, and sending the network card address to an IDC console so that the IDC console adds the network card address to an IP information generation list corresponding to the server, wherein the IP information generation list also comprises the server management IP address, the server IP address, the serial number and the position information of the cabinet; acquiring a temporary network based on the installed operating system, and acquiring a server IP address corresponding to the network card address from the IDC console based on the temporary network; and replacing the IP address of the temporary network with the IP address of the server. The server IP address corresponding to the network card address is searched through the IDC console, and the temporary network IP address is replaced by the server IP address, so that the installation of an operating system and the configuration of network information by the server can be automatically completed, and the effect of improving the networking efficiency of the server is further realized.

Description

Automatic networking method of server, storage medium and electronic equipment
Technical Field
The application relates to the technical field of server networking, in particular to an automatic networking method of a server, a storage medium and electronic equipment.
Background
With the development of technology, the role of the server is very important for the modern network, and basically, the terminal cannot operate normally after leaving the support of the server. The server mainly has two functions: the first is to respond to the service request of the terminal and process. When a user surfs the internet, the user is difficult to directly connect with the network, the network needs to be connected through the server, and the user can be networked only after the server responds to a networking request of the user and processes the networking request; and secondly, the storage function is realized, the storage space of the server is generally sufficient, and a great deal of information can be stored. In addition, the server plays a great role in the development of cloud computing, and a cloud computing platform needs a huge number of server clusters as hardware support, so that tens of thousands of data can be processed in a short time, and strong network service is achieved.
In the related art, each server erected in a machine room needs to be manually installed by a worker to complete the installation of an operating system of the server, the network information configuration of the server is then entered into a management background, and finally the networking of the servers in the machine room is completed.
With respect to the related art among the above, the inventors consider that the following drawbacks exist: when the number of servers on the rack in the machine room is large, the servers are all connected in a manual mode to complete the process so as to realize the connection of the servers, long time is needed, and the connection efficiency is low.
Disclosure of Invention
In order to improve networking efficiency, the application provides an automatic networking method of a server, a storage medium and an electronic device.
In a first aspect of the present application, an automatic networking method for servers is provided, which is applied to servers on rack in a computer room, and includes:
acquiring a network card address, and sending the network card address to an IDC console so that the IDC console adds the network card address to an IP information generation list corresponding to the server, wherein the IP information generation list also comprises a server management IP address, a server IP address, a serial number and position information of a cabinet;
acquiring a temporary network based on the installed operating system, and acquiring a server IP address corresponding to the network card address from the IDC console based on the temporary network;
and replacing the IP address of the temporary network with the IP address of the server.
By adopting the technical scheme, the IDC console establishes a one-to-one correspondence relationship between the network card address and the generated server IP address, the operating system is automatically installed for the server by the PXE server, and after the server obtains the temporary network, the server on the machine room acquires the server IP address corresponding to the network card address through the IDC console, and replaces the temporary network IP with the server IP address, so that the installation of the operating system and the configuration of network information by the server can be automatically completed, and the effect of improving the networking efficiency is further realized.
Optionally, the acquiring the network card address includes:
acquiring a server management IP address configured according to a server label;
and acquiring the network card address of the server corresponding to the cabinet according to the server management IP address.
By adopting the technical scheme, the network card address cannot be directly acquired when the server is newly put on the computer room. Based on a system carried in the server, a network card address of the server corresponding to the scaling cabinet is obtained through a server management IP address configured by a server label on the cabinet, and the server management IP address also establishes a corresponding relation with the network card address.
Optionally, the obtaining a temporary network based on the installed operating system includes:
installing an operating system based on the operating system provided by the PXE server;
and acquiring the temporary network based on the IP address of the temporary network allocated by the DHCP server.
By adopting the technical scheme, the PXE server downloads the operating system image from the remote server, and after the downloading is finished, the server on the shelf in the machine room requests the PXE server to download the operating system image to the storage space. The server in the machine room can install the operating system, the operating system is connected with the network to be initialized after being installed, and the DHCP server allocates the IP address of a temporary network, so that the server in the machine room can surf the internet temporarily.
Optionally, the sending the network card address to the IDC console includes:
and requesting an API of the IDC console, and sending the network card address to the IDC console through the API.
By adopting the technical scheme, after the network card address is obtained, the server requests the API of the IDC console, and the server management IP address is sent to the IDC console through the API interface, so that the IP information generation list corresponding to the server is completed, and the subsequent management of the IDC console on the server is facilitated.
Optionally, the obtaining, from the IDC console, the server IP address corresponding to the network card address based on the temporary network includes:
and requesting an API of the IDC console according to the network card address, and acquiring a corresponding server IP address from the IDC console through the API.
By adopting the technical scheme, after the server is provided with the operating system and acquires the temporary network, the server carries the network card address to send a request to the API of the IDC console, and then the server receives the server IP address corresponding to the network card address through the API, so that the server can accurately acquire the matched server IP address.
Optionally, an automatic networking method for a server is applied to an IDC console, and includes:
receiving an operation instruction of an IP information generation page of an IDC console, and generating an IP information generation list corresponding to at least one server on the rack of a machine room based on the operation instruction, wherein the IP information generation list comprises a server management IP address, a server IP address, a serial number and position information of a cabinet;
acquiring network card addresses corresponding to the management IP addresses of the servers, and adding the network card addresses to an IP information generation list corresponding to the servers;
and receiving a request sent by each server based on the acquired temporary network after an operating system is installed, wherein the request carries the network card address, searching server IP addresses corresponding to the network card addresses in the IP information generation list respectively, and sending the server IP addresses to the corresponding servers so that the servers replace the IP addresses of the temporary network with the server IP addresses.
By adopting the technical scheme, an operation instruction generated by the operation of a person on the IP information generation page on the IDC console is received, the IDC console generates an IP information generation list corresponding to the number of servers in the machine room, and then the request of the server is received to obtain the network card address uploaded by the server. And adding the network card address into an IP information generation list of the corresponding server according to the corresponding relation between the server management IP address and the network card address, so that the network card address, the server IP address, the server management IP address, the serial number and the position information of the cabinet form the corresponding relation. When a request that the server carries the network card address is received, the IDC console searches the corresponding server IP address in the IP information generation list according to the network card address and then sends the server IP address to the corresponding server, so that the server can replace the IP address of the temporary network with the server IP address, and further the servers in the machine room can be automatically networked in batches.
Optionally, the obtaining a network card address corresponding to each server management IP address, and adding each network card address to an IP information generation list corresponding to each server includes:
and receiving a request sent by each server to the API of the IDC console, and acquiring a network card address corresponding to the management IP address of each server from each server through the API.
By adopting the technical scheme, after the server acquires the network card address, the API of the IDC console receives the request of the server, and then receives the network card address uploaded by the server through the API, so that the network card address corresponds to the server management IP address, the server IP, the serial number and the position information of the cabinet.
Optionally, the receiving, after the operating system is installed in each server, a request sent by the acquired temporary network based on the acquired temporary network, respectively searching for a server IP address corresponding to each network card address in the IP information generation list, and sending each server IP address to the corresponding server, so that each server replaces the IP address of the temporary network with the server IP address, includes:
receiving an API request of each server carrying a network card address, and respectively searching a server IP address corresponding to each network card address in the IP information generation list;
and sending the server IP address to a corresponding server through the API, so that each server replaces the IP address of the temporary network with the server IP address.
By adopting the technical scheme, after the server obtains the temporary network, the API of the IDC console receives the request of the server, the IDC console searches the server IP address corresponding to the network card address from the IP information generation list according to the network card address carried in the request, and then sends the server IP address to the corresponding server through the API, so that the server can replace the IP address of the temporary network with the server IP address, and further the server is automatically and successfully networked.
In summary, the present application includes at least one of the following beneficial technical effects:
1. the network card address of the server and the IP address of the server generated by the IDC console are matched one by one, an operating system is automatically installed for the server by the PXE server, and after the operating system obtains a temporary network, the server requests the API of the IDC console, the IP address of the server corresponding to the network card address is found by the IDC console, and the IP address of the temporary network is replaced by the IP address of the server, so that the network configuration information of the server can be automatically completed, and the effect of improving the networking efficiency is further realized;
2. based on the operation instruction, the IDC console generates an IP information generation list corresponding to the number of the servers in the machine room, and then receives a request of the server to acquire a network card address uploaded by the server. And adding the network card address into an IP information generation list of a corresponding server in the IDC console according to the corresponding relation between the server management IP address and the network card address, so that the network card address, the server IP address, the server management IP address, the serial number and the position information of the cabinet form the corresponding relation.
Drawings
Fig. 1 is a schematic architecture diagram of an automatic networking system of a server provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of an automatic networking method for a server according to an embodiment of the present application;
fig. 3 is a schematic diagram of an IP information generation list of an automatic networking method for a server according to an embodiment of the present application;
fig. 4 is a schematic flowchart of step S10 of an automatic networking method for a server according to an embodiment of the present application;
fig. 5 is a schematic flowchart of step S11 of an automatic networking method for a server according to an embodiment of the present application;
FIG. 6 is a flow chart illustrating another method for automatically networking servers according to an embodiment of the present application;
fig. 7 is a flowchart illustrating step S22 of another method for automatically networking a server according to an embodiment of the present application.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments.
In the description of the embodiments of the present application, the words "exemplary," "for example," or "for instance" are used to indicate instances, or illustrations. Any embodiment or design described herein as "exemplary," "for example," or "for example" is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the words "exemplary," "such as," or "for example" are intended to present relevant concepts in a concrete fashion.
In the description of the embodiments of the present application, the term "and/or" is only one kind of association relationship describing an association object, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, B exists alone, and A and B exist at the same time. In addition, the term "plurality" means two or more unless otherwise specified. For example, the plurality of systems refers to two or more systems, and the plurality of screen terminals refers to two or more screen terminals. Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicit indication of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
Referring to fig. 1, the embodiment of the present application discloses an architecture diagram of an automatic networking system of a server, which specifically includes: the system comprises a server on the rack in the machine room, a PXE server, a DHCP server and an IDC console.
The DHCP Server, which is a Dynamic Host Configuration Protocol Server (DHCP Server), can dynamically allocate an IP address to a requested Server from an address pool, and also can provide other network Configuration parameters, such as a default gateway, a DNS Server, a domain name, a location of a Host mapping file within a network range, and the like.
The IDC console, namely an Internet Data Center (IDC), is a professional management and perfect application service platform with perfect equipment (including high-speed Internet access bandwidth, high-performance local area network, safe and reliable computer room environment and the like). On the basis of the platform, the IDC service provider provides Internet basic platform services (server hosting, virtual host, mail caching, virtual mail and the like) and various value-added services (site renting services, domain name system services, load balancing systems, database systems, data backup services and the like) for the client. In the embodiment of the application, the IDC console is a software system which is used for carrying out corresponding control, instruction sending, management and monitoring of the environment in the machine room, all cabinets, servers in the cabinets, comprehensive power utilization and the like.
The PXE Server is a preboot execution Environment (PXE) Server, operates in a Client/Server network mode, and supports a workstation to download an image from a remote Server through a network, and thus supports booting an operating system through the network.
Specifically, the DHCP server and the PXE server are configured in advance in the computer room, and are co-located in the intranet of the computer room with the servers on the rack of the computer room. The PXE server downloads the mirror image of the operating system from the remote server, the operating system is automatically installed for the server on the rack in the machine room, after the operating system is installed, the DHCP server allocates an IP address of a temporary network for the operating system of the server on the rack in the machine room, the server on the rack in the machine room sends a request to the IDC console based on the temporary network to obtain the IP address of each server, and the server on the rack in the machine room replaces the IP address of the temporary network with the corresponding IP address of the server, so that the networking efficiency of the server on the rack in the machine room is improved.
The present application is described in further detail below with reference to figures 2-7.
Referring to fig. 2, a flow chart of an automatic networking method for servers provided in the embodiment of the present application is applied to servers installed in a computer room, and can also be implemented by relying on a computer program and running on an automatic networking device for a von neumann-based server. The computer program can be integrated in an application, and can also be operated as an independent tool application, and specifically comprises the following steps:
s10: acquiring a network card address, and sending the network card address to an IDC console so that the IDC console adds the network card address to an IP information generation list corresponding to a server, wherein the IP information generation list also comprises a server management IP address, a server IP address, a number and position information of a cabinet;
specifically, in the embodiment of the present application, a network card address, i.e. a Media Access Control (MAC) address, or referred to as a physical address and a hardware address, is used to define the location of the network device. The network card address is set when the server leaves a factory, and is globally unique and unchangeable. After the network card address is obtained, the server sends a request to the IDC console, so that the server sends the network card address to the IDC console. It should be noted that, as shown in fig. 3, the IP information generation list is a detailed and complete statistic of various types of IP address information of servers on shelf in the machine room, so as to facilitate the management of the servers in the later period. The IP information generation list comprises a network card address, a server management IP address, a server IP address, a number and position information of the cabinet, the IDC console generates the number, the server management IP address, the server IP address and the position information of the cabinet, but lacks the network card address of the server, and the server sends the network card address to the IDC console to complete the corresponding IP information generation list. It should be noted that the cabinet is a casing for storing the server in the computer room, and the location information of the cabinet is the location of the cabinet in the computer room.
Referring to fig. 4, further, the obtaining a network card address specifically includes:
s101: acquiring a server management IP address configured according to a server label;
specifically, the server management IP address, the server IP address, the number and the location information of the cabinet are generated by the IDC in the earlier stage according to the number of the servers, then, according to the location information of the cabinet, a label printed with the server management IP address, the server IP address and the number is attached to the cabinet of the corresponding server, an installer manually configures the server management IP address for the server according to the server management IP address on the server label, then, the server receives a request of the IDC console, and the server obtains the server management IP address.
S102: and acquiring the network card address of the server corresponding to the cabinet according to the server management IP address.
Specifically, after the server management IP address is obtained, the server management IP corresponds to the labeled cabinet, and the network card address of the server corresponding to the cabinet is obtained through the system built in the server and according to the server management IP address. The system built in the server refers to a system set in a home server by a server manufacturer, and the network card address of the server can be obtained through the system.
Further, sending the network card address to the IDC console specifically includes:
s103: requesting an API of the IDC console, and sending a network card address to the IDC console through the API;
specifically, in the embodiment of the present Application, an Application Programming Interface (API) is used as a channel for communicating a program in a server with an IDC console, and the API is a predefined Interface function in nature. After the network card address is obtained, the server sends a request to an API of the IDC console, and after the IDC console processes the request, the server sends the network card address to the IDC console through the API, so that the IDC console generates and completes an IP information generation list corresponding to the server.
S11: acquiring a temporary network based on the installed operating system, and acquiring a server IP address corresponding to the network card address from the IDC console based on the temporary network;
specifically, after the server is erected in a machine room, the operating system is installed on the server, and the server can be used only by initializing under the networking condition after the operating system is installed. After the server obtains the temporary network, the server requests the IDC console to obtain the server IP address corresponding to the network card address through the temporary network, so that the server completes system initialization. The initialization mainly refers to replacing the IP address of the temporary network with the IP address of the server after the operating system of the server is installed, and the initialization is mainly used for enabling the server to be used.
Referring to fig. 5, further, obtaining a temporary network based on the installed operating system specifically includes:
s111: installing an operating system based on the operating system provided by the PXE server;
specifically, before the servers are erected in the machine room, PXE servers are configured in advance in the machine room intranet; after the servers are erected in the machine room, the servers in the machine room and the PXE servers are in an intranet. And the PXE server downloads the image of the operating system and then installs the operating system for the server.
S112: acquiring a temporary network based on the IP address of the temporary network allocated by the DHCP server;
specifically, before the server is erected to the machine room, a DHCP server is configured in advance in the machine room intranet; after the server is erected in the machine room, the server in the machine room and the DHCP server are in the same intranet. After the operating system of the server is installed, the DHCP server searches an IP address of a temporary network in a preset IP address pool, then an ARP entry is created, the ARP entry comprises a network card address and IP address information of the temporary network, the network card address and the IP address information of the temporary network are distributed to the corresponding server in a unicast mode by using DHCPOffer, and finally the server obtains the temporary network. It should be noted that unicast refers to communication between a single sender and a recipient via a network. The method can be applied to the fields of the network and the like, and can also solve practical problems by utilizing a multicast and unicast hybrid algorithm.
Further, acquiring a server IP address corresponding to the network card address from the IDC console based on the temporary network specifically includes:
s113: and based on the temporary network, requesting the API of the IDC console according to the network card address, and acquiring the corresponding server IP address from the IDC console through the API.
Specifically, after the server is allocated with an IP address of a temporary network to obtain the temporary network, based on the temporary network, the server sends a request carrying a network card address of the corresponding server to an API of the IDC console, and according to a corresponding relationship between the server management IP address, the server IP address, the serial number, and the network card address, the server receives the IDC console through the API and finds out the server management IP address corresponding to the network card address in an IP information generation list. It should be noted that the network card address can be understood as an identity card of the corresponding server visually, and by means of the identity card request API, the IDC console knows who sent the request, and finds out the corresponding server management IP address, and returns the server management IP address to the corresponding server.
S12: the IP address of the temporary network is replaced with the server IP address.
Specifically, after receiving the server IP address sent by the IDC console, the server replaces the IP address of the temporary network with the received server management IP address, so that the server successfully configures network information and finally obtains networking capability.
Referring to fig. 6, a schematic flow chart of another automatic networking method for a server provided in the embodiment of the present application is applied to an IDC console, and specifically includes:
s20: receiving an operation instruction of an IP information generation page of an IDC console, and generating an IP information generation list corresponding to at least one server on the rack of a machine room based on the operation instruction, wherein the IP information generation list comprises a server management IP address, a server IP address, a number and position information of a cabinet;
specifically, the IDC console is provided with a button capable of generating an IP information generation list, and when a person presses the button, an IP information generation page appears on the IDC console. The person then performs an operation on the page to generate an operation instruction, for example, to set a starting IP address and the number of IP address generations. Based on the operation instruction, a plurality of groups of IP information generation lists containing numbers, server management IP addresses, server IP addresses and cabinet position information are generated, the number of the groups of the IP information generation lists is matched with the number of the servers, the numbers, the server management IP addresses and the server IP addresses in each group of the IP information generation lists are in one-to-one correspondence, the numbers mainly play a role of identification, so that the IP information generation lists in each group are different, and the IP information generation lists in each group are distinguished. For example, if there are 100 servers newly installed in the machine room, the IDC console will generate 100 numbers, 100 server management IP addresses and 100 server IP addresses accordingly. The serial numbers are generated in sequence, wherein the serial numbers are generated from 0001-0100 at this time, and the serial numbers are 0101-0200 if 100 servers are put on shelf next time; the IP address is generated with each digit ranging from 0-255, advancing the bit and zeroing the bit as it proceeds to 256. Such as: 10.1.255.1 wherein the IP when the third digit 255 is incremented is: 10.2.0.1. IP generation is performed based on a predetermined initial IP and the number of IPs required to be generated. The number of servers newly installed in the computer room is 100, the number of generated IPs is 100, and the initial IP is: 10.0.0.1, then the IP generated is: 10.0.0.1 to 10.0.0.100. It should be noted that in the embodiment of the present application, the IP information generation list is generated according to a preset rule, the preset rule is a background algorithm of the IDC console, and in the embodiment of the present application, the background algorithm may adopt a 6gen.6gen algorithm.
S21: acquiring network card addresses corresponding to the management IP addresses of the servers, and adding the network card addresses to an IP information generation list corresponding to the servers;
specifically, after an IP information generation list is generated by an IDC console, a person makes the generated IP information generation list as a label and attaches the label to a server, the person configures a server management IP address according to the label, a network card address is obtained through the server management IP address, and a matching relationship is established between the network card address and the server management IP address. The IDC console receives a request of a server, acquires network card address information, and then adds the network card address to a group of IP information containing corresponding server management IP addresses according to the matching relation between the network card address and the server management IP addresses, so that the serial number, the server management IP addresses, the network card address and the server IP addresses form a one-to-one corresponding relation.
The control console receives a request sent by each server to an API of the IDC control console, network card addresses corresponding to management IP addresses of the servers are obtained from the servers through the API, the network card addresses are added to an IP information generation list corresponding to the servers, and the servers comprise at least one network card.
Specifically, after the network card address is acquired by the server, the API of the IDC console receives a request from the server, after the IDC console receives the request, the network card address uploaded by the server is acquired through the API, and the IDC console adds the network card address to the corresponding IP information generation list according to the matching relationship between the network card address and the server management IP address, so that the IP information generation list is completed, and the subsequent management of each server by the IDC console is facilitated.
S22: receiving a request sent by each server based on the acquired temporary network after an operating system is installed, wherein the request carries a network card address, searching a server IP address corresponding to each network card address in an IP information generation list respectively, and sending each server IP address to the corresponding server so that each server replaces the IP address of the temporary network with the server IP address;
specifically, after the servers are provided with the operating systems and obtain the temporary networks, the IDC console receives requests sent by the servers, the requests sent by the servers carry network card addresses of the corresponding servers, the IDC console searches a group of IP information generation lists containing the network card addresses of the corresponding servers from different groups of IP information generation lists according to the network card addresses, and it is required to say that the network card addresses are already added in the IP information generation lists. And finally, the server IP address corresponding to the network card address is found in the group of IP information generation lists and is sent to the corresponding server, so that each server can replace the IP address of the first temporary network with the server IP address, and automatic networking is realized.
Referring to fig. 7, S221: receiving an API request of each server carrying a network card address, and respectively searching a server IP address corresponding to each network card address in an IP information generation list;
specifically, the IDC console receives a request of the server through an API of the IDC console, the request carries a network card address of the corresponding server, and the request aims to acquire a server IP address corresponding to each network card address. After receiving the request, the API starts to process the request sent by the server according to the network card address IDC console, and searches the corresponding server IP address in the IP information generation list.
S222: and sending the server IP address to the corresponding server through the API, so that each server replaces the IP address of the temporary network with the server IP address.
Specifically, when the IDC console finds out the server IP address corresponding to the network card address, the IDC console completes processing of the request sent by the server, and then sends the corresponding server IP address to each corresponding server through the same API, so that each server can replace the IP address of the temporary network with the server IP address, and each server completes network information configuration to obtain networking capability.
The implementation principle of the automatic networking method of the server in the embodiment of the application is as follows: the IDC console generates a plurality of groups of IP information generation lists according to the number of the servers, the server on the machine room acquires corresponding network card addresses according to the server management IP, and the network card addresses are uploaded to the IDC console and added into the corresponding IP information generation lists. After the server is provided with an operating system and obtains a temporary network, the server sends a request carrying a network card address to an API of an IDC console based on the temporary network, the IDC console searches a server IP address corresponding to the network card address in an IP information generation list, the server IP address is sent to a corresponding server through the API, and the server replaces the IP address of the temporary network with the server IP address, so that the server on the machine room automatically completes system installation and network information configuration, and finally obtains networking capacity in batch.
The embodiment of the application further discloses a computer-readable storage medium, and the computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the automatic networking method of the server of the above embodiment is adopted.
The computer program may be stored in a computer readable medium, the computer program includes computer program code, the computer program code may be in a source code form, an object code form, an executable file or some intermediate form, and the like, and the computer readable medium includes any entity or device capable of carrying the computer program code, a recording medium, a usb disk, a removable hard disk, a magnetic disk, an optical disk, a computer memory, a Read Only Memory (ROM), a Random Access Memory (RAM), an electrical carrier signal, a telecommunication signal, a software distribution medium, and the like.
The automatic networking method of the server in the embodiment is stored in the computer-readable storage medium through the computer-readable storage medium, and is loaded and executed on the processor, so as to facilitate the storage and application of the method.
The embodiment of the application also discloses an electronic device, wherein a computer program is stored in a computer readable storage medium, and when the computer program is loaded and executed by a processor, the automatic networking method of the server is adopted.
The electronic device may be an electronic device such as a desktop computer, a notebook computer, or a cloud server, and the electronic device includes but is not limited to a processor and a memory, for example, the electronic device may further include an input/output device, a network access device, a bus, and the like.
The processor may be a Central Processing Unit (CPU), and of course, according to an actual use situation, other general processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like may also be used, and the general processor may be a microprocessor or any conventional processor, and the present application does not limit the present invention.
The memory may be an internal storage unit of the electronic device, for example, a hard disk or a memory of the electronic device, or an external storage device of the electronic device, for example, a plug-in hard disk, a smart card (SMC), a secure digital card (SD) or a flash memory card (FC) provided on the electronic device, and the memory may also be a combination of the internal storage unit of the electronic device and the external storage device, and the memory is used for storing a computer program and other programs and data required by the electronic device, and may also be used for temporarily storing data that has been output or will be output, which is not limited in this application.
The electronic device stores the automatic networking method of the server in the embodiment in a memory of the electronic device, and the method is loaded and executed on a processor of the electronic device, so that the electronic device is convenient to use.
The above description is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure should not be limited thereby. That is, all equivalent changes and modifications made in accordance with the teachings of the present disclosure are intended to be included within the scope of the present disclosure. Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. An automatic networking method of a server is characterized in that the method is applied to the server on the rack in a machine room and comprises the following steps:
acquiring a network card address, and sending the network card address to an IDC console so as to enable the IDC console to add the network card address to an IP information generation list corresponding to the server, wherein the IP information generation list also comprises a server management IP address, a server IP address, a serial number and position information of a cabinet;
acquiring a temporary network based on the installed operating system, and acquiring a server IP address corresponding to the network card address from the IDC console based on the temporary network;
and replacing the IP address of the temporary network with the IP address of the server.
2. The method of claim 1, wherein the obtaining the network card address comprises:
acquiring a server management IP address configured according to a server label;
and acquiring the network card address of the server corresponding to the cabinet according to the server management IP address.
3. The method of claim 1, wherein obtaining a temporary network based on the installed operating system comprises:
installing an operating system based on the operating system provided by the PXE server;
and acquiring the temporary network based on the IP address of the temporary network allocated by the DHCP server.
4. The method for automatically networking a server according to claim 1, wherein the sending the network card address to an IDC console comprises:
and requesting an API of the IDC console, and sending the network card address to the IDC console through the API.
5. The method for automatically networking the server according to claim 1, wherein the obtaining the server IP address corresponding to the network card address from the IDC console based on the temporary network comprises:
and requesting an API of the IDC console according to the network card address, and acquiring a corresponding server IP address from the IDC console through the API.
6. An automatic networking method of a server, which is applied to an IDC console, comprises the following steps:
receiving an operation instruction of an IP information generation page of an IDC console, and generating an IP information generation list corresponding to at least one server on the rack of a machine room based on the operation instruction, wherein the IP information generation list comprises a server management IP address, a server IP address, a serial number and position information of a cabinet;
acquiring network card addresses corresponding to the management IP addresses of the servers, and adding the network card addresses to an IP information generation list corresponding to the servers;
and receiving a request sent by each server based on the acquired temporary network after an operating system is installed, wherein the request carries the network card address, searching server IP addresses corresponding to the network card addresses in the IP information generation list respectively, and sending the server IP addresses to the corresponding servers so that the servers replace the IP addresses of the temporary network with the server IP addresses.
7. The method according to claim 6, wherein the obtaining a network card address corresponding to each of the server management IP addresses, and adding each of the network card addresses to an IP information generation list corresponding to each of the servers comprises:
and receiving a request sent by each server to an API of the IDC console, acquiring a network card address corresponding to the management IP address of each server from each server through the API, and adding each network card address to an IP information generation list corresponding to each server.
8. The method of claim 6, wherein the receiving of the request sent by each server based on the acquired temporary network after installing the operating system, respectively searching for the server IP address corresponding to each network card address in the IP information generation list, and sending each server IP address to the corresponding server, so that each server replaces the IP address of the temporary network with the server IP address, comprises:
receiving an API request of each server carrying a network card address, and respectively searching a server IP address corresponding to each network card address in the IP information generation list;
and sending the server IP address to a corresponding server through the API, so that each server replaces the IP address of the temporary network with the server IP address.
9. A computer-readable storage medium, in which a computer program is stored, which, when loaded and executed by a processor, carries out the method of any one of claims 1-5 or 6-8.
10. An electronic device comprising a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the method of any one of claims 1-5 or 6-8 is employed when the computer program is loaded and executed by the processor.
CN202210960458.6A 2022-08-11 2022-08-11 Automatic networking method of server, storage medium and electronic equipment Active CN115333932B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210960458.6A CN115333932B (en) 2022-08-11 2022-08-11 Automatic networking method of server, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210960458.6A CN115333932B (en) 2022-08-11 2022-08-11 Automatic networking method of server, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN115333932A true CN115333932A (en) 2022-11-11
CN115333932B CN115333932B (en) 2024-04-19

Family

ID=83921671

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210960458.6A Active CN115333932B (en) 2022-08-11 2022-08-11 Automatic networking method of server, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN115333932B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090106404A1 (en) * 2007-10-18 2009-04-23 Christenson David A Method and Apparatus for Dynamically Configuring Virtual Internet Protocol Addresses
CN103327136A (en) * 2013-07-01 2013-09-25 浪潮电子信息产业股份有限公司 Method for managing ip address of server management network card under dhcp network
CN106789168A (en) * 2016-11-28 2017-05-31 华为技术有限公司 A kind of data center server manages the dispositions method and frame top formula interchanger of network
CN106850262A (en) * 2016-12-27 2017-06-13 郑州云海信息技术有限公司 A kind of server network management using proxy servers method
CN107566518A (en) * 2017-09-27 2018-01-09 郑州云海信息技术有限公司 The method and apparatus of management equipment information during installation file
CN109167687A (en) * 2018-09-05 2019-01-08 山东浪潮云投信息科技有限公司 A kind of method and system of batch initialization physical server cluster network configuration
CN110879712A (en) * 2019-11-07 2020-03-13 北京浪潮数据技术有限公司 Cloud data center physical host installation method and related device
CN111224815A (en) * 2019-11-22 2020-06-02 山东英信计算机技术有限公司 Data center equipment access method, device and related components
CN111784179A (en) * 2020-07-10 2020-10-16 重庆顺戴网络科技有限公司 Server basic information management system and method
CN112272246A (en) * 2020-10-26 2021-01-26 北京首都在线科技股份有限公司 Out-of-band network IP automatic configuration method and device, electronic equipment and storage medium
CN113268256A (en) * 2021-06-09 2021-08-17 中国建设银行股份有限公司 Batch installation method and device, server and computer storage medium
CN113766041A (en) * 2020-08-10 2021-12-07 北京京东尚科信息技术有限公司 Method and device for acquiring Media Access Control (MAC) address of first server

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090106404A1 (en) * 2007-10-18 2009-04-23 Christenson David A Method and Apparatus for Dynamically Configuring Virtual Internet Protocol Addresses
CN103327136A (en) * 2013-07-01 2013-09-25 浪潮电子信息产业股份有限公司 Method for managing ip address of server management network card under dhcp network
CN106789168A (en) * 2016-11-28 2017-05-31 华为技术有限公司 A kind of data center server manages the dispositions method and frame top formula interchanger of network
CN106850262A (en) * 2016-12-27 2017-06-13 郑州云海信息技术有限公司 A kind of server network management using proxy servers method
CN107566518A (en) * 2017-09-27 2018-01-09 郑州云海信息技术有限公司 The method and apparatus of management equipment information during installation file
CN109167687A (en) * 2018-09-05 2019-01-08 山东浪潮云投信息科技有限公司 A kind of method and system of batch initialization physical server cluster network configuration
CN110879712A (en) * 2019-11-07 2020-03-13 北京浪潮数据技术有限公司 Cloud data center physical host installation method and related device
CN111224815A (en) * 2019-11-22 2020-06-02 山东英信计算机技术有限公司 Data center equipment access method, device and related components
CN111784179A (en) * 2020-07-10 2020-10-16 重庆顺戴网络科技有限公司 Server basic information management system and method
CN113766041A (en) * 2020-08-10 2021-12-07 北京京东尚科信息技术有限公司 Method and device for acquiring Media Access Control (MAC) address of first server
CN112272246A (en) * 2020-10-26 2021-01-26 北京首都在线科技股份有限公司 Out-of-band network IP automatic configuration method and device, electronic equipment and storage medium
CN113268256A (en) * 2021-06-09 2021-08-17 中国建设银行股份有限公司 Batch installation method and device, server and computer storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
XUEBIAO YUCHI等: "Dealing with temporary domain name issues in the DNS", 《2016 IEEE SYMPOSIUM ON COMPUTERS AND COMMUNICATION (ISCC)》, 18 August 2016 (2016-08-18) *
陈伟荣;: "基于CentOS的中小学校园网DNS、DHCP服务器的架设", 中国教育信息化, no. 24, 10 December 2014 (2014-12-10) *

Also Published As

Publication number Publication date
CN115333932B (en) 2024-04-19

Similar Documents

Publication Publication Date Title
CN107404544B (en) Method and apparatus for IP address assignment
US6810478B1 (en) System for remote booting of muntliple operating systems using chained bootstrap mechanism in a network
US7139816B2 (en) Method, apparatus, and program for server based network computer load balancing across multiple boot servers
US20030069948A1 (en) Automated online subscription
CN110677405A (en) Data processing method and device, electronic equipment and storage medium
US20030069884A1 (en) Database structure
US20060039352A1 (en) System and method for designating a priority access order of domain name service servers
CN111885216B (en) DNS query method, device, equipment and storage medium
JP2002169694A (en) Method and system for automatic allocation of boot server to pxe client on network via dhcp server
JP2005505830A (en) Central directory server
CN101808131B (en) Method for automatically upgrading network terminal edition
CN104767649A (en) Bare metal server deployment method and device
US20020073303A1 (en) Method and system for remotely managing the selection of an operating system for a target device
CN107547274B (en) Multi-network-port aggregation method and device
US7631054B2 (en) Method and system for generating list of operating systems for a target device
CN115333933B (en) Automatic management method, medium and equipment for servers on machine room
CN111245944B (en) Domain name resolution method and device, electronic equipment and storage medium
CN113067803A (en) Resource isolation system, request processing method and request processing device
CN115333932B (en) Automatic networking method of server, storage medium and electronic equipment
CN114124883B (en) Data access method and device based on cloud storage address, computer equipment and medium
CN114338383A (en) Simplified configuration method and system for video equipment
CN105763667B (en) A kind of method and device realizing Hadoop host and finding automatically
CN112367415B (en) Generation method and device of attribute information, electronic equipment and computer readable medium
US20050132084A1 (en) Method and apparatus for providing server local SMBIOS table through out-of-band communication
WO2012054023A1 (en) Computer system with computers that perform network boots

Legal Events

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