CN110247778A - Installation method of operating system, device, electronic equipment and storage medium - Google Patents

Installation method of operating system, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN110247778A
CN110247778A CN201910522568.2A CN201910522568A CN110247778A CN 110247778 A CN110247778 A CN 110247778A CN 201910522568 A CN201910522568 A CN 201910522568A CN 110247778 A CN110247778 A CN 110247778A
Authority
CN
China
Prior art keywords
server
address
network
request
operating system
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
CN201910522568.2A
Other languages
Chinese (zh)
Other versions
CN110247778B (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 Dajia Internet Information Technology Co Ltd
Original Assignee
Beijing Dajia Internet Information 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 Dajia Internet Information Technology Co Ltd filed Critical Beijing Dajia Internet Information Technology Co Ltd
Priority to CN201910522568.2A priority Critical patent/CN110247778B/en
Publication of CN110247778A publication Critical patent/CN110247778A/en
Application granted granted Critical
Publication of CN110247778B publication Critical patent/CN110247778B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/02Details
    • H04L12/16Arrangements for providing special services to substations
    • H04L12/18Arrangements for providing special services to substations for broadcast or conference, e.g. multicast
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/12Shortest path evaluation
    • H04L45/123Evaluation of link metrics
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/24Multipath
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/2866Architectures; Arrangements
    • H04L67/30Profiles
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Abstract

The disclosure is directed to a kind of installation method of operating system, device, electronic equipment and storage medium, belong to computer communication technology field, this method is applied in the second server of the second network, second network includes second server and the second gateway, when first server initiates the first request in first network, the destination path that second server is provided based on the first gateway in first network, obtain the first request of the first server, and based on first request, unappropriated target ip address is obtained from the IP address resource pool of the second server, request response is sent to the first server, first server receives request response, and based on the target ip address carried in request response, operating system mount request is sent to second server, first server is sent based on second server Operating system configuration file installs operating system in the first server, improves the installation effectiveness and accuracy of operating system.

Description

Installation method of operating system, device, electronic equipment and storage medium
Technical field
This disclosure relates to computer communication technology field more particularly to installation method of operating system, device, electronic equipment and Storage medium.
Background technique
PXE (Preboot Execute Environment, Pre-boot Execution Environment) technology refers to that by network be calculating Machine equipment provides the technology of operating system installation service., can be by PXE technology in this field, the automatic behaviour for installing server Make system.
In the related technology, if operating system installation process includes: that there is no provide in network environment where server A When the server of operating system installation service, for example, newly-built network, needs user by USB flash disk, CD etc. manually in the network Server A operating system is installed, and manual configuration PXE is serviced in the server A, which can be taken by the PXE Business provides operating system installation service for the bare machine server of the network.
In the above process, whenever in network environment there is no the operating system server that installation services is provided, require The operating system of server, takes a long time in the manually installed network, and manually installed error-prone, leads to aforesaid operations system Installation process low efficiency, accuracy are poor.
Summary of the invention
The disclosure provides a kind of installation method of operating system, device, electronic equipment and storage medium, at least to solve correlation The installation process low efficiency of operating system, the problem of accuracy difference in technology.The technical solution of the disclosure is as follows:
According to the first aspect of the embodiments of the present disclosure, a kind of installation method of operating system is provided, the method is applied In the first server of one network, the first network includes first server and the first gateway, comprising:
Based on the broadcast address of the first network, the first request, first request are broadcasted in the first network For requesting to be that the first server distributes internet protocol address;
Based on first request, the request response that second server is sent in the second network, the request response are obtained Target ip address is carried, second network is different from the IP address network segment range of the first network;
It is responded based on the request, Xiang Suoshu second server sends operating system mount request;
When the operating system configuration file for receiving the second server transmission based on the operating system mount request When, it is based on the operating system configuration file, operating system is installed in the first server.
In one possible implementation, the broadcast address based on the first network, in the first network Middle broadcast first is requested
Local area network MAC Address and business designation date that the first server is are encapsulated as the first message, the industry Business designation date, which is used to indicate, distributes service distribution IP address based on IP address;
Based on the broadcast address of the first network, first message is broadcasted in the first network.
In one possible implementation, described to be responded based on the request, Xiang Suoshu second server sends operation System mount request includes:
When request response also carries the IP address of the second server, from request response described in acquisition The IP address of target ip address and the second server;
Based on the IP address of the second server, Xiang Suoshu second server sends the operating system mount request, The operating system mount request carries the target ip address.
According to the second aspect of an embodiment of the present disclosure, a kind of installation method of operating system is provided, the method is applied In first gateway of one network, the first network includes first server and the first gateway, comprising:
Based on the broadcast address of the first network, the first server is broadcasted in the first network is obtained One request, first request are that the first server distributes internet protocol address for requesting;
Based on the address of service of IP address distribution service, destination path is obtained, the destination path includes providing IP address The IP address of the second server of service is distributed, the second server is located at the second network, second network and described the The IP address network segment range of one network is different;
Based on the IP address of the second server, Xiang Suoshu second server sends first request;
When receiving the operating system mount request of the first server, Xiang Suoshu second server sends the behaviour Make system mount request.
In one possible implementation, the address of service based on IP address distribution service, obtains destination path Include:
According to the address of service, the IP address net that source address belongs to the first network is obtained from shared routing table Section, destination address are the address of service and the destination path for being directed toward the IP address that address is second server, the direction ground Location, which is used to indicate, provides the IP address of the equipment of the IP address distribution service.
In one possible implementation, first gateway, second gateway and second clothes Neighborhood is established between business device, the shared routing table includes the routing table of first gateway, the second service The routing table of second gateway in the routing table of device and second network;
It is described according to the address of service, the IP address that source address belongs to the first network is obtained from shared routing table Network segment, destination address are the service and are directed toward before the destination path of IP address that address is second server, the method Further include:
Second cost of the first cost of first path, the second path and first path and the second path is added to institute It states in shared routing table;
Wherein, first cost is greater than second cost, the first path are as follows: source address is the second network and the The IP address network segment range of one network, destination address are the address of service, are directed toward the IP that address is the second server Location;
Second path are as follows: source address is the IP address network segment range of the second network, destination address is the service ground The IP address that address is the second server is directed toward in location.
In one possible implementation, the method also includes:
When receiving the operating system mount request of third server in the first network, from the shared routing table The middle source address that obtains belongs to that IP address network segment, the destination address of the first network are the address of service and to be directed toward address be the The first path of the IP address of one server;
Based on the IP address of the first server, Xiang Suoshu first server sends the operation system of the third server System mount request.
In one possible implementation, the method also includes:
When the first server failure, source address is obtained from the shared routing table and belongs to the first network IP address network segment, destination address are the address of service and the second path for being directed toward the IP address that address is second server;
Based on the IP address of the second server, Xiang Suoshu second server sends the operation system of the third server System mount request.
According to the third aspect of an embodiment of the present disclosure, a kind of installation method of operating system is provided, the method is applied In the second server of two networks, second network includes second server and the second gateway, comprising:
Based on the first gateway in first network, the first request of first server in the first network, institute are received State the first request for request be the first server distribution internet protocol address, second network and described first The IP address network segment range of network is different;
Based on first request, unappropriated Target IP is obtained from the IP address resource pool of the second server Address;
Request response is sent to the first server, the request response carries the target ip address;
When receiving the operating system mount request of the first server, it is based on the target ip address, Xiang Suoshu Second server sends operating system configuration file, and the operating system configuration file is used to indicate installation operation on the server The installation process of system.
In one possible implementation, described based on first request, from the IP address of the second server Unappropriated target ip address is obtained in resource pool includes:
When first request is the first message, the local of the first server is parsed from first message Net MAC Address;
Based on the MAC Address of the first server, first network belonging to the first server is determined;
The corresponding multiple alternative IP address of the first network are obtained in secondary IP address resource pool, from the multiple alternative IP The target ip address is obtained in address.
In one possible implementation, described to include: to first server transmission request response
When the request response be the second message when, by the MAC Address of the target ip address, the first server with And the IP address of the second server is encapsulated as second message;
Based on the MAC Address of the first server, second message is sent to the first server.
In one possible implementation, IP address distribution service, second clothes are provided on the second server The IP address of the local winding port of business device is the address of service of IP address distribution service, and the IP address distribution service is Refer to the service based on IP address resource pool distribution IP address.
According to a fourth aspect of embodiments of the present disclosure, a kind of operating system mounting device is provided, described device is applied In the first server of one network, the first network includes first server and the first gateway, comprising:
Broadcast module is configured as the broadcast address based on the first network, broadcasts first in the first network Request, first request are that the first server distributes internet protocol address for requesting;
Module is obtained, is configured as obtaining the request that second server is sent in the second network based on first request The IP address network segment range of response, the request response carrying target ip address, second network and the first network is not Together;
Sending module is configured as responding based on the request, and Xiang Suoshu second server sends operating system installation and asks It asks;
Module is installed, is configured as to receive what the second server was sent based on the operating system mount request When operating system configuration file, it is based on the operating system configuration file, operating system is installed in the first server.
In one possible implementation, the broadcast module is additionally configured to the office for being by the first server Domain net MAC Address and business designation date are encapsulated as the first message, and the business designation date is used to indicate based on IP address point IP address is distributed with service;Based on the broadcast address of the first network, first message is broadcasted in the first network.
In one possible implementation, the sending module is additionally configured to also carry institute when request response When stating the IP address of second server, the IP of the target ip address and the second server is obtained from the request response Address;Based on the IP address of the second server, Xiang Suoshu second server sends the operating system mount request, described Operating system mount request carries the target ip address.
According to a fifth aspect of the embodiments of the present disclosure, a kind of operating system mounting device is provided, described device is applied In first gateway of one network, the first network includes first server and the first gateway, comprising:
Module is obtained, the broadcast address based on the first network is configured as, obtains the first server described The first request broadcasted in first network, first request are that the first server distributes Internet protocol IP for requesting Address;
The acquisition module is additionally configured to be distributed the address of service of service based on IP address, obtains destination path, described Destination path includes providing the IP address of the second server of IP address distribution service, and the second server is located at the second net Network, second network are different from the IP address network segment range of the first network;
Sending module, is configured as the IP address based on the second server, described in Xiang Suoshu second server is sent First request;
The sending module is additionally configured to when receiving the operating system mount request of the first server, to The second server sends the operating system mount request.
In one possible implementation, the acquisition module, is additionally configured to according to the address of service, from shared Source address is obtained in routing table to belong to the IP address network segment of the first network, destination address for the address of service and be directed toward ground Location is the destination path of the IP address of second server, and the address of being directed toward is used to indicate the offer IP address distribution service The IP address of equipment.
In one possible implementation, first gateway, second gateway and second clothes Neighborhood is established between business device, the shared routing table includes the routing table of first gateway, the second service The routing table of second gateway in the routing table of device and second network;
Described device further include:
Adding module is configured as the first cost of first path, the second path and first path and the second path The second cost be added in the shared routing table;
Wherein, first cost is greater than second cost, the first path are as follows: source address is the second network and the The IP address network segment range of one network, destination address are the address of service, are directed toward the IP that address is the second server Location;
Second path are as follows: source address is the IP address network segment range of the second network, destination address is the service ground The IP address that address is the second server is directed toward in location.
In one possible implementation, the acquisition module is additionally configured to receive in the first network When the operating system mount request of third server, source address is obtained from the shared routing table and belongs to the first network IP address network segment, destination address are the address of service and the first path for being directed toward the IP address that address is first server;
The sending module is additionally configured to the IP address based on the first server, Xiang Suoshu first server hair Send the operating system mount request of the third server.
In one possible implementation, described device further include:
The acquisition module is additionally configured to when the first server failure, is obtained from the shared routing table Source address belong to the first network IP address network segment, destination address be the address of service and be directed toward address be second service Second path of the IP address of device;
The sending module is additionally configured to the IP address based on the second server, Xiang Suoshu second server hair Send the operating system mount request of the third server.
According to a sixth aspect of an embodiment of the present disclosure, a kind of operating system mounting device is provided, described device is applied In the second server of two networks, second network includes second server and the second gateway, comprising:
Receiving module is configured as receiving the first clothes in the first network based on the first gateway in first network First request of business device, first request distributes internet protocol address for requesting for the first server, described Second network is different from the IP address network segment range of the first network;
Module is obtained, is configured as obtaining from the IP address resource pool of the second server based on first request Take unappropriated target ip address;
Sending module is configured as sending request response to the first server, and the request response carries the mesh Mark IP address;
The sending module is additionally configured to when receiving the operating system mount request of the first server, base In the target ip address, Xiang Suoshu second server sends operating system configuration file, and the operating system configuration file is used The installation process of operating system is installed on the server in instruction.
In one possible implementation, the acquisition module is additionally configured to when first request be the first report Wen Shi parses the local area network MAC Address of the first server from first message;Based on the first server MAC Address determines first network belonging to the first server;It is corresponding that the first network is obtained in secondary IP address resource pool Multiple alternative IP address, obtain the target ip address from the multiple alternative IP address.
In one possible implementation, the sending module is additionally configured to when request response be the second report The IP address of the target ip address, the MAC Address of the first server and the second server is encapsulated as by Wen Shi Second message;Based on the MAC Address of the first server, second message is sent to the first server.
In one possible implementation, IP address distribution service, second clothes are provided on the second server The IP address of the local winding port of business device is the address of service of IP address distribution service, and the IP address distribution service is Refer to the service based on IP address resource pool distribution IP address.
According to the 7th of the embodiment of the present disclosure the aspect, a kind of electronic equipment is provided, the electronic equipment includes one or more A processor and one or more memories, are stored at least one instruction in one or more of memories, it is described at least One instruction is loaded by one or more of processors and is executed to realize above-mentioned first aspect any one of to the third aspect Operation performed by the installation method of operating system.
According to the eighth aspect of the embodiment of the present disclosure, a kind of non-transitorycomputer readable storage medium is provided, it is described to deposit At least one instruction is stored in storage media, at least one instruction is loaded by processor and executed to realize above-mentioned first party Operation performed by face to the installation method of operating system described in any one of the third aspect.
According to the 9th of the embodiment of the present disclosure the aspect, a kind of computer program product, including one or more instruction are provided, When one or more instruction can be executed by the processor of electronic equipment, so that the electronic equipment can be realized above-mentioned first Operation performed by aspect to the installation method of operating system described in any one of the third aspect.
The technical scheme provided by this disclosed embodiment at least bring the utility model has the advantages that
When first server initiates the first request in first network, second server can be based in first network first The destination path that gateway provides obtains the first request of the first server, and based on first request, from second clothes It is engaged in obtaining unappropriated target ip address in the IP address resource pool of device, sends request to the first server and respond, first Server receives request response, and based on the target ip address carried in request response, sends and operate to second server System mount request, first server is based on the operating system configuration file for stating second server transmission, in the first server Upper installation operating system improves the installation effectiveness and accuracy of operating system without manually installing operating system.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not The disclosure can be limited.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure Example, and together with specification for explaining the principles of this disclosure, do not constitute the improper restriction to the disclosure.
Fig. 1 is a kind of implementation environment schematic diagram of installation method of operating system shown according to an exemplary embodiment;
Fig. 2 is a kind of flow chart of installation method of operating system shown according to an exemplary embodiment;
Fig. 3 is a kind of flow chart of installation method of operating system shown according to an exemplary embodiment;
Fig. 4 is a kind of flow chart of installation method of operating system shown according to an exemplary embodiment;
Fig. 5 is a kind of flow chart of installation method of operating system shown according to an exemplary embodiment;
Fig. 6 is a kind of block diagram of operating system mounting device shown according to an exemplary embodiment;
Fig. 7 is a kind of block diagram of operating system mounting device shown according to an exemplary embodiment;
Fig. 8 is a kind of block diagram of operating system mounting device shown according to an exemplary embodiment;
Fig. 9 is a kind of block diagram of server shown according to an exemplary embodiment.
Specific embodiment
In order to make ordinary people in the field more fully understand the technical solution of the disclosure, below in conjunction with attached drawing, to this public affairs The technical solution opened in embodiment is clearly and completely described.
It should be noted that the specification and claims of the disclosure and term " first " in above-mentioned attached drawing, " Two " etc. be to be used to distinguish similar objects, without being used to describe a particular order or precedence order.It should be understood that using in this way Data be interchangeable under appropriate circumstances, so as to embodiment of the disclosure described herein can in addition to illustrating herein or Sequence other than those of description is implemented.Embodiment described in following exemplary embodiment does not represent and disclosure phase Consistent all embodiments.On the contrary, they are only and as detailed in the attached claim, the disclosure some aspects The example of consistent device and method.
Fig. 1 is a kind of implementation environment schematic diagram for installation method of operating system that the embodiment of the present disclosure provides, such as Fig. 1 institute It states, which includes: first network and the second network.It include first server, the second network packet in the first network Include second server.Configured with operating system installation service on the second server, operating system installation service, which refers to, to be based on Network is the service that computer equipment installs operating system, and operating system installation service is not needed using the computer equipment Hard disk does not need the locally-installed operating system of the computer equipment yet.In a kind of possible example, operating system installation Service can service for PXE (Preboot eXecution Environment, Pre-boot Execution Environment).In the first network There is no that can provide the server of operating system installation service, when the first server needs to install operating system, this Two servers can install operating system based on operating system installation service for the first server.
Wherein, IP address distribution service can be provided on the second server in advance, which is based on the IP Address allocation services are that first server distributes IP address.Also configured in advance has HTTP (HyperText on the second server Transfer Protocol, hypertext transfer protocol) service, TFTP (Trivial File Transfer Protocol, letter Monofile transport protocol) service, the first server obtain IP address after, the second server can based on the HTTP service, TFTP service is embodied as the process of first server installation operating system, that is to say that PXE is serviced.
In a kind of possible scene, which can be newly-built network, which can be built good Network.The IP address network segment range of the first network and the second network is different, for example, the corresponding IP address net of second network Segment limit can be 10.10.0.0/16;The corresponding IP address network segment of the first network may range from 10.20.0.0/16.It should Further include the first gateway in first network, further includes the second gateway in second network.Second gateway and It is physically connected between first gateway.When creating the first network, first gateway can with the second gateway, Between second server establish communication connection, for example, first gateway can with the second gateway, second server it Between establish OSPF (Open Shortest Path First, ospf) neighborhood, and in gateway DHCP (agreement is arranged in Dynamic Host Configuration Protocol, DynamicHost) agency is opened, agent address refers to To second server, then the first server can be based on the communication connection, second server is obtained as first server point The IP address matched is based on the IP address, establishes and communicates to connect with second server, so that the second server is based on the communication link It connects, operating system is installed for the first server.
Fig. 2 is a kind of flow chart of installation method of operating system shown according to an exemplary embodiment, as shown in Fig. 2, The installation method of operating system can be real by the interaction of the first server in the second server and first network in the second network It is existing, include the following steps.
201, broadcast address of the first server based on the first network broadcasts the first request in the first network.
First request is that the first server distributes IP address for requesting, should in a kind of possible embodiment First server can initiate first request by the way of broadcasting packet.The process may include: that the first server obtains The second message is taken, the broadcast address based on the first network broadcasts the first message in the first network, which carries The first request for requesting to distribute IP address for first server.Wherein, which can be the message of UDP type, First message can for DHCP Discovery (it was found that) form of data packet.
First message can carry MAC (Media Access Control, local area network) address of first server, should First message can also carry destination address, which can be the broadcast address of the first network, for example, first net The IP address of network can be 10.20.0.0/16, and the broadcast address of the first network can be 10.20.255.255;It that is to say, The broadcast address of first message can be 10.20.255.255.First message can carry business designation date, and business refers to Registration evidence, which is used to indicate, distributes service distribution IP address based on IP address, that is to say that first message is that IP address distributes service pair The message answered.For example, the type of message that first message can carry the message is DHCP type, to indicate that first message is The corresponding message of DHCP service.
In a kind of possible embodiment, after which initiates the first request, which may be used also According to the time is initiated, to continue to initiate request, which may include: that the first server initiates the first request, according to this The initiation time of one request starts timing, in preset period of time, if the first server does not receive in the preset period of time Request response, the first server initiate the first request again, until receiving request response.
202, broadcast address of first gateway based on the first network obtains the first server in the first network First request of middle broadcast.
First gateway can monitor the message in first network based on the broadcast address of first network in real time, when When listening to the first message of the broadcast address that destination address is first network, which obtains first message.
203, address of service of first gateway based on IP address distribution service, obtains destination path.
The destination path includes providing the IP address of the second server of IP address distribution service, which is located at Second network, second network are different from the IP address network segment range of the first network.In first gateway with being stored with IP The address of service of location distribution service, the address of service can serve to indicate that the one or more for providing IP address distribution service is set It is standby.In the embodiment of the present disclosure, in the network built up, can provide IP address distribution service number of devices can for one or It is multiple.It therefore, can be in the one or more equipment for providing IP address distribution service, unification be with configuring the service Location.For example, for second server configured with operating system installation service, operating system installation service includes IP in second network Address allocation services, second server can provide IP address distribution service for first server.The IP address distributes service can Think DHCP (agreement is arranged in Dynamic Host Configuration Protocol, DynamicHost) service, that is to say, it should Address of service can be the agent IP address of a DHCP service.For example, the address of service can be 10.10.10.10, then should The agent IP address that first gateway can store DHCP service is 10.10.10.10.
In this step, which is based on first request, determines and provides the service of IP address distribution service Address, first gateway obtain the IP that source address belongs to the first network according to the address of service from shared routing table Address network segment, destination address are the address of service and the destination path for being directed toward the IP address that address is second server, the direction Address, which is used to indicate, provides the IP address of the equipment of IP address distribution service.
Wherein, neighborhood is established between first gateway, second gateway and the second server, this is total Enjoying routing table includes the routing table of first gateway, the second gateway in the routing table of the second server and second network The routing table of equipment;Therefore, in the first gateway according to the address of service, source address is obtained from shared routing table and belongs to this IP address network segment, the destination address of first network are the address of service and the target for being directed toward the IP address that address is second server Before path, this method further include: the first gateway by the first cost of first path, the second path and first path and Second cost in the second path is added in the shared routing table;Wherein, which is greater than second cost, the first via Diameter are as follows: source address is the second network and the IP address network segment range of first network, destination address are the address of service, are directed toward address For the IP address of the second server;Second path are as follows: source address is the IP address network segment range of the second network, destination address For the address of service, it is directed toward the IP address that address is the second server.
In addition, the second server can configure the IP address of local winding port to the clothes of IP address distribution service Business address is virtual IP address since the local winding port is corresponding, even if second server is set with the second gateway Some physical connection failure between the other equipment such as standby will not cause the connection between second server and other equipment disconnected It opens, ensure that the reliability of connection.
It should be noted that the DHCP service is the network protocol based on local area network, worked using udp protocol, it should DHCP service can be used for intranet or Internet service provider's automatic IP address allocation, alternatively, the DHCP service can also be used In intranet administrator as the means that all computers are made with central management.Then first gateway can be provided in advance The agent IP address of DHCP service.
In the embodiment of the present invention, this in first gateway is stored with routing table, and the routing table is for storing the first net IP address distribution services the route metric in corresponding at least one path and each path in network, which can be each The cost in path.It may include source address, destination address and direction address that IP address distribution, which services corresponding path,.Wherein, The equipment that source address IP address to be dispensed such as is used to indicate, installs operating system, that is to say and initiate IP address distribution request Equipment, destination address are used to indicate required service, and in the embodiment of the present disclosure, the destination address is with being used to indicate required IP Location distribution service.Direction address in each path, which is used to indicate, provides the equipment of IP address distribution service in the path.
In addition, being stored with first network in each equipment routing table, each path and each path in the second network Route metric.Each path refers to the path of equipment of the access for providing IP address distribution service.Second gateway is set The first path of the first cost is stored in standby routing table, the first path are as follows: source address is for the IP in the whole network segment limit Location, destination address are that IP address distribution services corresponding address and is directed toward the IP address that address is second server.Second clothes The second path of the second cost, second path are stored in the routing table of device of being engaged in are as follows: source address is the network segment model of the second network IP address, destination address in enclosing are that IP address distribution services corresponding address and with being directed toward the IP that address is second server Location.Wherein, the first cost is greater than the second cost.For example, the address of service can be 10.10.10.10, the second server IP address can be 10.10.1.1, and the first path and its cost can be with are as follows: source address is 10.0.0.0/8 network segment, destination Location is 10.10.10.10, direction address is 10.10.1.1, and cost (cost) is 200;Second path and its cost can be with are as follows: source Address be 10.10.0.0/16 network segment, destination address 10.10.10.10, be directed toward address be 10.10.1.1, cost 100.
In the embodiment of the present disclosure, first gateway, the second gateway and the second server pre-establish neighbours OSPF (Open Shortest Path First, ospf) relationship, second gateway, the first gateway Equipment and second server can be based on the neighborhood, share respective routing table.Therefore, the second gateway, first Gateway and second server can get first path and the second path and first path and the second path is respective Cost.In a kind of possible embodiment, which can be based on the path in routing table, to the first business device hair Give first request.The process may include: first gateway according to the address of service stored, search from routing table At least one path that source address belongs to the network segment of first network, destination address is the address of service, from least one path In filter out the smallest destination path of cost, according to the destination path, which is sent to, IP address distribution clothes is provided The second server of business.Wherein, the smallest path of cost that is to say shortest path.It certainly, should if an only paths Path is directly as destination path.
It should be noted that building neighborhood between second gateway, the first gateway and second server Process may include: the IP address that second server obtains physical internet ports, and install routing finger daemon application, for example, BIRD Using, and enable BGP (Border Gateway Protocol, borde gateway) agreement.The second clothes of configuration in second gateway The gateway of the physical internet ports of business device, and bgp protocol is opened, because of the Autonomous Domain information configuration of second server and the second gateway Identical, therefore, the second gateway and second server establish neighborhood.First gateway, which enables bgp protocol and does, matches It sets, because being physically connected between the second gateway and the first gateway, the second gateway and the first gateway It can establish neighbours, second server belongs to the neighbour of the same Autonomous Domain with the second gateway and the first gateway at this time Occupy, therefore, second server declare local loopback port IP address can by the second gateway and with the first gateway Study, the equipment connecting with the second gateway and the first gateway can be connected to second server.
204, IP address of first gateway based on second server sends the first request to the second server.
First request is sent to the second gateway by the first gateway, which receives first gateway The first message that equipment is sent configures the address of service in second gateway, second gateway can parse this One message, if first message is IP address, distribution services corresponding message, for example, the first message is the report of DHCP type Text, then second gateway is based on the address of service, which is sent to second server.In a kind of possible reality It applies in mode, after which obtains first message, which can parse first message, if First message is that IP address distribution services corresponding message, for example, the first message is the message of DHCP type, then first net Equipment is closed based on the address of service stored, which is sent to the second gateway configured with IP address distribution service Equipment.
It should be noted that the address of service that the first gateway can forward the first message to configure to the first gateway, It that is to say second server.Wherein, the first gateway can first be forwarded to the second gateway and pass through the second gateway again To second server.For example, first message can be DHCP discovery message, certainly, which may be used also To forward DHCP REQUEST message.
In a kind of possible embodiment, third server in the first network can also initiate operating system peace Dress request, when the first gateway receives the operating system mount request of third server in the first network, the first net Pass equipment shares acquisition source address in routing table from this and belongs to the IP address network segment of the first network, destination address for the service Location and the first path for being directed toward the IP address that address is first server;IP of first gateway based on the first server Location sends the operating system mount request of the third server to the first server.Also, work as the first server failure When, the first gateway can also be shared from this obtains IP address network segment, mesh that source address belongs to the first network in routing table Address be the address of service and be directed toward address be second server IP address the second path;First gateway is based on should The IP address of second server sends the operating system mount request of the third server to the second server.
205, second server is based on the first gateway, obtains the first request of first server.
206, second server is based on first request, obtains from the IP address resources bank of second server unoccupied Target ip address.
In a kind of possible embodiment, since the first network is newly-built network, the network segment model of the first network Enclose not identical as the network segment range of the second network, the IP address of first server distribution belongs to the network segment range of the first network It is interior.The second server can also be the IP address in the corresponding network segment of server distribution belonging network for belong to heterogeneous networks. It therefore, can also include the corresponding multiple and different IP address of heterogeneous networks in the resource pool of the second server.The IP address Acquisition process may include: when this first request be the first message when, which parses from first message The local area network MAC Address of the first server;MAC Address of the second server based on the first server, determine this first First network belonging to server;It is corresponding multiple alternative that the first network is obtained in the second server secondary IP address resource pool IP address obtains the target ip address from multiple alternative IP address.For example, being said so that request response is message as an example Bright, the first message carries the MAC Address of first server.Wherein, the first server institute can also be carried in first message The network identity of the first network of category, then the second server directly parses the affiliated net of the first server from the first message The network identity of network and the MAC Address of first server, alternatively, first message can not carry belonging to the first server The network identity of first network, then the second server is also based on the MAC Address of the first server, determines first clothes Network belonging to business device.
207, second server returns to request response to the first server.
Request response carry be first server distribution target ip address, request response can also carry this The MAC Address of one server and the IP address of the second server.In a kind of possible embodiment, this step be can wrap Include: when request response is the second message, the second server is by the target ip address, the MAC Address of the first server And the IP address of the second server is encapsulated as second message, the MAC Address based on the first server, this second is reported Text is sent to the first server.
In a kind of possible embodiment, it is the first server that request response, which can also carry the second server, The subnet mask address of distribution, then the second server be also based on the subnet mask address, the target ip address, this first The IP address of the MAC Address of server and the second server sends request response to the first server.
In a kind of possible embodiment, which can send request response using message form.It should Request response can be the second message, which can be a UDP message, which can be this IP address DHCP Offer (offer) message in assigning process.In a kind of possible embodiment, second message may include for The MAC Address and business designation date of target ip address, the first server that first server is distributed, the business indicated number It is that IP address distribution services corresponding message according to first message is used to indicate, then the second Receive message process can be with are as follows: this Two servers can will distribute to my MAC Address, the business designation date of the IP address of first server, the first server It is encapsulated as the second message.In alternatively possible embodiment, when the second server is also first server distribution subnet When mask address, which can be with are as follows: the second server can will distribute to the mesh of first server Mark IP address, the MAC Address of the first server, the business designation date and the subnet mask for first server distribution Address is encapsulated as the second message.
The second server is based on above-mentioned Receive message process, obtains second message, by the way of unicast, by this Two messages are sent to first server.
208, the first server obtains the request response that second server is sent, and is responded based on the request, to the second clothes Business device sends operating system mount request.
Request response carries target ip address, and by taking request response is the second message as an example, which is received Second message parses the IP address of the target ip address, the second server from second message, is based on the Target IP Address is established with second server and is communicated to connect, and the communication connection is based on, and sends operating system installation to second server and asks It asks.Operating system mount request is that first server installs operating system for requesting.
209, when the second server receives the operating system mount request of the first server, the second server Based on the target ip address, operating system configuration file is sent to the second server.
Wherein, which is used to indicate the installation process for installing operating system on the server.
210, the operating system configuration of second server is received based on the operating system mount request when first server When file, it is based on the operating system configuration file, executes operating system installation process.
The second server can be provided in advance other than IP address distribution service, also be pre-configured on the second server Have TFTP service, HTTP service and SYSLINUX service, the second server can based on TFTP service, HTTP service and The operating system configuration file used when installing operating system is sent to first server by SYSLINUX service, first clothes Device be engaged in based on the operating system configuration file, executes the installation process of operating system.
It, can in the first server after which installs operating system in a kind of possible embodiment It is returned with configuration of IP address allocation services and TFTP service, HTTP service and SYSLINUX service, the local of the first server The IP address of central port can be the address of service, for example, configuration of IP 10.10.10.10 is to the local winding end of first server Mouthful, so that first server may be that other equipment provide operating system installation service.In addition, the first server can be with First gateway establishes neighborhood, installs Routing Software with the router B that is connected and establishes neighborhood, at this time second service Device, first server, the second gateway and the first gateway be ospf neighbor relationship, second server, first server, Shared routing between second gateway and the first gateway includes the routing table of four equipment, thus multiple equipment it Between routing table can mutually learn.In addition, the first server can also add third in the routing table of the first server The third path of cost, the third path can be with are as follows: source address is IP address within the scope of the network segment of first network, destination address Corresponding address is serviced for IP address distribution and is directed toward the IP address that address is first server, and the third cost is less than first Cost.For example, source address is that the data that 10.20.0.0/16 network segment destination address is 10.10.10.10 are taking by first server It is 100 that the address 10.20.1.1 cost is directed toward in device B routing table of being engaged in.In a kind of possible embodiment, which can To be added in system installation service cluster, to provide operating system installation service for the equipment in first network, for example, when first When bare machine server in network needs to install operating system, cost minimal path can be selected from shared routing table, namely Bare machine server installation operating system in be by first server be corresponding first network.Certainly, bare machine takes in other networks Being engaged in device can also be preferential that the server for belonging to consolidated network is selected to provide operating system installation service based on shared routing table.? In a kind of possible example, when belonging to the server failure of consolidated network, it can also be based on routing table, choose the service of across a network Device provides operating system installation service.For example, can preferentially be selected when third server needs to install operating system in first network First server in first network is selected, reasons can also be by the second network when unavailable if first server breaks down etc. Middle second server provides operating system installation service.Similarly, the 4th server also can preferentially select the second clothes in the second network Business device also can choose first server in first network and install operating system if second server is unavailable.
In the embodiment of the present disclosure, when first server initiates the first request in first network, second server can be with base The destination path that the first gateway provides in first network, obtains the first request of the first server, and based on this One request, obtains unappropriated target ip address from the IP address resource pool of the second server, to the first server Send request response, first server receives request response, and based on the target ip address that carries in request response, to the Two servers send operating system mount request, and first server is based on the operating system configuration text for stating second server transmission Part installs operating system in the first server, without manually installing operating system, improves operating system Installation effectiveness and accuracy.
Fig. 3 is a kind of flow chart of installation method of operating system shown according to an exemplary embodiment, as shown in figure 3, This method is applied in the first server of first network, which includes first server and the first gateway, packet It includes:
301, based on the broadcast address of the first network, the first request is broadcasted in the first network, which uses It is that the first server distributes internet protocol address in request;
302, based on first request, the request response that second server is sent in the second network, request response are obtained Target ip address is carried, second network is different from the IP address network segment range of the first network;
303, it is responded based on the request, sends operating system mount request to the second server;
304, when the operating system configuration file for receiving second server transmission based on the operating system mount request When, it is based on the operating system configuration file, operating system is installed in the first server.
In one possible implementation, it is somebody's turn to do the broadcast address based on the first network, is broadcasted in the first network First request include:
Local area network MAC Address and business designation date that the first server is are encapsulated as the first message, which refers to Registration evidence, which is used to indicate, distributes service distribution IP address based on IP address;
Broadcast address based on the first network broadcasts first message in the first network.
In one possible implementation, it should be responded based on the request, and send operating system peace to the second server Dress is requested
When request response also carries the IP address of the second server, from request response with obtaining the Target IP The IP address of location and the second server;
IP address based on the second server sends the operating system mount request, the operation to the second server System mount request carries the target ip address.
In the embodiment of the present disclosure, when first server initiates the first request in first network, second server can be with base The destination path that the first gateway provides in first network, obtains the first request of the first server, and based on this One request, obtains unappropriated target ip address from the IP address resource pool of the second server, to the first server Send request response, first server receives request response, and based on the target ip address that carries in request response, to the Two servers send operating system mount request, and first server is based on the operating system configuration text for stating second server transmission Part installs operating system in the first server, without manually installing operating system, improves operating system Installation effectiveness and accuracy.
Fig. 4 is a kind of flow chart of installation method of operating system shown according to an exemplary embodiment, as shown in figure 4, The installation method of operating system can be applied in the first gateway of first network, which includes first server With the first gateway, comprising:
401, based on the broadcast address of the first network, the first server is broadcasted in the first network first is obtained Request, first request are that the first server distributes internet protocol address for requesting;
402, the address of service based on IP address distribution service, obtains destination path, which includes with providing IP The IP address of the second server of location distribution service, the second server are located at the second network, second network and first net The IP address network segment range of network is different;
403, based on the IP address of the second server, first request is sent to the second server;
404, when receiving the operating system mount request of the first server, the operation is sent to the second server System mount request.
In one possible implementation, destination path packet should be obtained based on the address of service of IP address distribution service It includes:
According to the address of service, IP address network segment, mesh that source address belongs to the first network are obtained from shared routing table Address be the address of service and be directed toward address be second server IP address destination path, which is used to indicate The IP address of the equipment of IP address distribution service is provided.
In one possible implementation, first gateway, second gateway and the second server it Between establish neighborhood, the shared routing table include the routing table of first gateway, the routing table of the second server and The routing table of second gateway in second network;
This according to the address of service, obtained from shared routing table source address belong to the first network IP address network segment, Destination address is the service and is directed toward before the destination path of IP address that address is second server, this method further include:
Second cost of the first cost of first path, the second path and first path and the second path is added to this In shared routing table;
Wherein, which is greater than second cost, the first path are as follows: source address is the second network and first network IP address network segment range, destination address be the address of service, be directed toward address be the second server IP address;
Second path are as follows: source address is that the IP address network segment range of the second network, destination address are the address of service, refer to It is the IP address of the second server to address.
In one possible implementation, this method further include:
When receiving the operating system mount request of third server in the first network, shares in routing table and obtain from this Taking source address to belong to, IP address network segment, the destination address of the first network are the address of service and direction address is first server IP address first path;
IP address based on the first server sends the operating system installation of the third server to the first server Request.
In one possible implementation, this method further include:
When the first server failure, the IP address for obtaining source address in routing table and belonging to the first network is shared from this Network segment, destination address are the address of service and the second path for being directed toward the IP address that address is second server;
IP address based on the second server sends the operating system installation of the third server to the second server Request.
In the embodiment of the present disclosure, when first server initiates the first request in first network, second server can be with base The destination path that the first gateway provides in first network, obtains the first request of the first server, and based on this One request, obtains unappropriated target ip address from the IP address resource pool of the second server, to the first server Send request response, first server receives request response, and based on the target ip address that carries in request response, to the Two servers send operating system mount request, and first server is based on the operating system configuration text for stating second server transmission Part installs operating system in the first server, without manually installing operating system, improves operating system Installation effectiveness and accuracy.
Fig. 5 is a kind of flow chart of installation method of operating system shown according to an exemplary embodiment, as shown in figure 5, The installation method of operating system can be applied in the second server of the second network, second network include second server and Second gateway, comprising:
501, based on the first gateway in first network, the first request of first server in the first network is received, First request is that the first server distributes internet protocol address for requesting, second network and the first network IP address network segment range is different;
502, based on first request, unappropriated Target IP is obtained from the IP address resource pool of the second server Address;
503, request response is sent to the first server, request response carries the target ip address;
504, when receiving the operating system mount request of the first server, be based on the target ip address, to this Two servers send operating system configuration file, which is used to indicate installs operating system on the server Installation process.
It in one possible implementation, should be based on first request, from the IP address resource pool of the second server It is middle to obtain unappropriated target ip address and include:
When first request is the first message, the local area network MAC of the first server is parsed from first message Address;
MAC Address based on the first server determines first network belonging to the first server;
The corresponding multiple alternative IP address of the first network are obtained in secondary IP address resource pool, from multiple alternative IP address Middle acquisition target ip address.
In one possible implementation, this sends request and respond to the first server includes:
When request response is the second message, by the target ip address, the first server MAC Address and this The IP address of two servers is encapsulated as second message;
Second message is sent to the first server by the MAC Address based on the first server.
In one possible implementation, IP address distribution service, the second server are provided on the second server Local winding port IP address be the IP address distribution service address of service, the IP address distribution service refer to based on IP The service of address resource pond distribution IP address.
In the embodiment of the present disclosure, when first server initiates the first request in first network, second server can be with base The destination path that the first gateway provides in first network, obtains the first request of the first server, and based on this One request, obtains unappropriated target ip address from the IP address resource pool of the second server, to the first server Send request response, first server receives request response, and based on the target ip address that carries in request response, to the Two servers send operating system mount request, and first server is based on the operating system configuration text for stating second server transmission Part installs operating system in the first server, without manually installing operating system, improves operating system Installation effectiveness and accuracy.
Fig. 6 is a kind of block diagram of operating system mounting device shown according to an exemplary embodiment, as shown in fig. 6, should Device is applied in the first server of first network, which includes first server and the first gateway, comprising:
Broadcast module 601 is configured as the broadcast address based on the first network, and first is broadcasted in the first network and is asked It asks, which is that the first server distributes internet protocol address for requesting;
Module 602 is obtained, is configured as obtaining the request that second server is sent in the second network based on first request Response, request response carry target ip address, and second network is different from the IP address network segment range of the first network;
Sending module 603 is configured as responding based on the request, sends operating system installation to the second server and asks It asks;
Module 604 is installed, is configured as that second server transmission ought be received based on the operating system mount request When operating system configuration file, it is based on the operating system configuration file, operating system is installed in the first server.
In one possible implementation, the broadcast module 601, is additionally configured to the local for being by the first server Net MAC Address and business designation date are encapsulated as the first message, which is used to indicate to be distributed based on IP address and be taken Business distribution IP address;Broadcast address based on the first network broadcasts first message in the first network.
In one possible implementation, the sending module 603, be additionally configured to when request response also carry this When the IP address of two servers, the IP address of the target ip address He the second server is obtained from request response;It is based on The IP address of the second server sends the operating system mount request to the second server, the operating system mount request Carry the target ip address.
In the embodiment of the present disclosure, when first server initiates the first request in first network, second server can be with base The destination path that the first gateway provides in first network, obtains the first request of the first server, and based on this One request, obtains unappropriated target ip address from the IP address resource pool of the second server, to the first server Send request response, first server receives request response, and based on the target ip address that carries in request response, to the Two servers send operating system mount request, and first server is based on the operating system configuration text for stating second server transmission Part installs operating system in the first server, without manually installing operating system, improves operating system Installation effectiveness and accuracy.
Fig. 7 is a kind of block diagram of operating system mounting device shown according to an exemplary embodiment, as shown in fig. 7, should Device is applied in the first gateway of first network, which includes first server and the first gateway, packet It includes:
Obtain module 701, be configured as the broadcast address based on the first network, obtain the first server this first The first request broadcasted in network, first request are that the first server distributes internet protocol address for requesting;
The acquisition module 701 is additionally configured to be distributed the address of service of service based on IP address, obtains destination path, should Destination path includes providing the IP address of the second server of IP address distribution service, which is located at the second network, Second network is different from the IP address network segment range of the first network;
Sending module 702 is configured as the IP address based on the second server, to the second server send this first Request;
The sending module 702 is additionally configured to when receiving the operating system mount request of the first server, to this Second server sends the operating system mount request.
In one possible implementation, the acquisition module 701, is additionally configured to according to the address of service, from shared In routing table obtain source address belong to the first network IP address network segment, destination address be the address of service and be directed toward address be The destination path of the IP address of second server, which, which is used to indicate, provides the IP of the equipment of IP address distribution service Address.
In one possible implementation, first gateway, second gateway and the second server it Between establish neighborhood, the shared routing table include the routing table of first gateway, the routing table of the second server and The routing table of second gateway in second network;
The device further include:
Adding module is configured as the first cost of first path, the second path and first path and the second path The second cost be added in the shared routing table;
Wherein, which is greater than second cost, the first path are as follows: source address is the second network and first network IP address network segment range, destination address be the address of service, be directed toward address be the second server IP address;
Second path are as follows: source address is that the IP address network segment range of the second network, destination address are the address of service, refer to It is the IP address of the second server to address.
In one possible implementation, the acquisition module 701 is additionally configured to when receiving in the first network the When the operating system mount request of three servers, the IP address for obtaining source address in routing table and belonging to the first network is shared from this Network segment, destination address are the address of service and the first path for being directed toward the IP address that address is first server;
The sending module 702, is additionally configured to the IP address based on the first server, and sending to the first server should The operating system mount request of third server.
In one possible implementation, the device further include:
The acquisition module 701 is additionally configured to when the first server failure, is shared source is obtained in routing table from this IP address network segment, the destination address that location belongs to the first network are the address of service and are directed toward the IP that address is second server Second path of location;
The sending module 702, is additionally configured to the IP address based on the second server, and sending to the second server should The operating system mount request of third server.
In the embodiment of the present disclosure, when first server initiates the first request in first network, second server can be with base The destination path that the first gateway provides in first network, obtains the first request of the first server, and based on this One request, obtains unappropriated target ip address from the IP address resource pool of the second server, to the first server Send request response, first server receives request response, and based on the target ip address that carries in request response, to the Two servers send operating system mount request, and first server is based on the operating system configuration text for stating second server transmission Part installs operating system in the first server, without manually installing operating system, improves operating system Installation effectiveness and accuracy.
Fig. 8 is a kind of block diagram of operating system mounting device shown according to an exemplary embodiment, as shown in figure 8, should Device is applied in the second server of the second network, which includes second server and the second gateway, comprising:
Receiving module 801 is configured as receiving the first clothes in the first network based on the first gateway in first network First request of business device, first request distribute internet protocol address, second net for requesting for the first server Network is different from the IP address network segment range of the first network;
Module 802 is obtained, is configured as obtaining from the IP address resource pool of the second server based on first request Unappropriated target ip address;
Sending module 803 is configured as sending request response to the first server, and request response carries the Target IP Address;
The sending module 803 is additionally configured to be based on when receiving the operating system mount request of the first server The target ip address sends operating system configuration file to the second server, which is used to indicate The installation process of operating system is installed on server.
In one possible implementation, the acquisition module 802 is additionally configured to when first request be the first message When, the local area network MAC Address of the first server is parsed from first message;MAC Address based on the first server, Determine first network belonging to the first server;The corresponding multiple alternative IP of the first network are obtained in secondary IP address resource pool Address obtains the target ip address from multiple alternative IP address.
In one possible implementation, the sending module 803 is additionally configured to when request response be the second message When, the IP address of the target ip address, the MAC Address of the first server and the second server is encapsulated as second report Text;Second message is sent to the first server by the MAC Address based on the first server.
In one possible implementation, IP address distribution service, the second server are provided on the second server Local winding port IP address be the IP address distribution service address of service, the IP address distribution service refer to based on IP The service of address resource pond distribution IP address.
In the embodiment of the present disclosure, when first server initiates the first request in first network, second server can be with base The destination path that the first gateway provides in first network, obtains the first request of the first server, and based on this One request, obtains unappropriated target ip address from the IP address resource pool of the second server, to the first server Send request response, first server receives request response, and based on the target ip address that carries in request response, to the Two servers send operating system mount request, and first server is based on the operating system configuration text for stating second server transmission Part installs operating system in the first server, without manually installing operating system, improves operating system Installation effectiveness and accuracy.
About the device in above-described embodiment, wherein modules execute the concrete mode of operation in related this method Embodiment in be described in detail, no detailed explanation will be given here.
It should be understood that operating system mounting device provided by the above embodiment is when installing operating system, only more than The division progress of each functional module is stated for example, can according to need and in practical application by above-mentioned function distribution by difference Functional module complete, i.e., the internal structure of electronic equipment is divided into different functional modules, it is described above complete to complete Portion or partial function.In addition, operating system mounting device provided by the above embodiment and installation method of operating system embodiment Belong to same design, specific implementation process is detailed in embodiment of the method, and which is not described herein again.
Fig. 9 is a kind of structural schematic diagram for server that the embodiment of the present disclosure provides, which can be because of configuration or property Energy is different and generates bigger difference, may include one or more processors (central processing Units, CPU) 901 and one or more memory 902, wherein at least one finger is stored in the memory 902 It enables, at least one instruction is loaded by the processor 901 and executed the behaviour to realize above-mentioned each embodiment of the method offer Make system installation method.Certainly, which can also have wired or wireless network interface, keyboard and input/output interface Equal components, to carry out input and output, which can also include other for realizing the component of functions of the equipments, not do herein It repeats.
In the exemplary embodiment, a kind of computer readable storage medium is additionally provided, the memory for example including instruction, Above-metioned instruction can be set by electronics in processor execute to complete the installation method of operating system in above-described embodiment.For example, The computer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, floppy disk and light data Store equipment etc..
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure Its embodiment.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following Claim is pointed out.
It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by the accompanying claims.

Claims (10)

1. a kind of installation method of operating system, which is characterized in that the method is applied in the first server of first network, institute Stating first network includes first server and the first gateway, comprising:
Based on the broadcast address of the first network, the first request is broadcasted in the first network, first request is used for Request is that the first server distributes internet protocol address;
Based on first request, the request response that second server is sent in the second network is obtained, the request response carries Target ip address, second network are different from the IP address network segment range of the first network;
It is responded based on the request, Xiang Suoshu second server sends operating system mount request;
When receiving the operating system configuration file that the second server is sent based on the operating system mount request, base In the operating system configuration file, operating system is installed in the first server.
2. installation method of operating system according to claim 1, which is characterized in that it is described to be responded based on the request, to The second server sends operating system mount request
When request response also carries the IP address of the second server, the target is obtained from request response The IP address of IP address and the second server;
Based on the IP address of the second server, Xiang Suoshu second server sends the operating system mount request, described Operating system mount request carries the target ip address.
3. a kind of installation method of operating system, which is characterized in that the method is applied in the first gateway of first network, The first network includes first server and the first gateway, comprising:
Based on the broadcast address of the first network, obtains the first server is broadcasted in the first network first and ask It asks, first request is that the first server distributes internet protocol address for requesting;
Based on the address of service of IP address distribution service, destination path is obtained, the destination path includes providing IP address distribution The IP address of the second server of service, the second server are located at the second network, second network and first net The IP address network segment range of network is different;
Based on the IP address of the second server, Xiang Suoshu second server sends first request;
When receiving the operating system mount request of the first server, Xiang Suoshu second server sends the operation system System mount request.
4. installation method of operating system according to claim 3, which is characterized in that described to distribute service based on IP address Address of service, obtaining destination path includes:
According to the address of service, IP address network segment, mesh that source address belongs to the first network are obtained from shared routing table Address be the address of service and be directed toward address be second server IP address destination path, the direction address is used for It indicates to provide the IP address of the equipment of the IP address distribution service.
5. a kind of installation method of operating system, which is characterized in that the method is applied in the second server of the second network, institute Stating the second network includes second server and the second gateway, comprising:
Based on the first gateway in first network, the first request of first server in the first network is received, described the One request is that the first server distributes internet protocol address, second network and the first network for requesting IP address network segment range it is different;
Based on first request, from the IP address resource pool of the second server with obtaining unappropriated Target IP Location;
Request response is sent to the first server, the request response carries the target ip address;
When receiving the operating system mount request of the first server, it is based on the target ip address, Xiang Suoshu second Server sends operating system configuration file, and the operating system configuration file is used to indicate installs operating system on the server Installation process.
6. a kind of operating system mounting device, which is characterized in that described device is applied in the first server of first network, institute Stating first network includes first server and the first gateway, comprising:
Broadcast module is configured as the broadcast address based on the first network, and the first request is broadcasted in the first network, First request is that the first server distributes internet protocol address for requesting;
Module is obtained, is configured as obtaining the request response that second server is sent in the second network based on first request, The request response carries target ip address, and second network is different from the IP address network segment range of the first network;
Sending module is configured as responding based on the request, and Xiang Suoshu second server sends operating system mount request;
Module is installed, is configured as when the operation for receiving the second server transmission based on the operating system mount request When system configuration file, it is based on the operating system configuration file, operating system is installed in the first server.
7. a kind of operating system mounting device, which is characterized in that described device is applied in the first gateway of first network, The first network includes first server and the first gateway, comprising:
Module is obtained, the broadcast address based on the first network is configured as, obtains the first server described first The first request broadcasted in network, first request is for requesting as the first server with distributing Internet protocol IP Location;
The acquisition module is additionally configured to be distributed the address of service of service based on IP address, obtains destination path, the target Path includes providing the IP address of the second server of IP address distribution service, and the second server is located at the second network, institute It is different from the IP address network segment range of the first network to state the second network;
Sending module, is configured as the IP address based on the second server, and Xiang Suoshu second server sends described first Request;
The sending module is additionally configured to when receiving the operating system mount request of the first server, Xiang Suoshu Second server sends the operating system mount request.
8. a kind of operating system mounting device, which is characterized in that described device is applied in the second server of the second network, institute Stating the second network includes second server and the second gateway, comprising:
Receiving module is configured as receiving first server in the first network based on the first gateway in first network First request, it is described first request for request be the first server distribute internet protocol address, described second Network is different from the IP address network segment range of the first network;
Module is obtained, is configured as obtaining not from the IP address resource pool of the second server based on first request Occupied target ip address;
Sending module is configured as sending request response to the first server, and the request response carries the Target IP Address;
The sending module is additionally configured to when receiving the operating system mount request of the first server, is based on institute Target ip address is stated, Xiang Suoshu second server sends operating system configuration file, and the operating system configuration file is for referring to Show the installation process for installing operating system on the server.
9. a kind of electronic equipment, which is characterized in that the electronic equipment includes that one or more processors and one or more are deposited Reservoir is stored at least one instruction in one or more of memories, and at least one instruction is by one or more A processor is loaded and is executed to realize such as claim 1 to the described in any item installation method of operating system institutes of claim 5 The operation of execution.
10. a kind of non-transitorycomputer readable storage medium, which is characterized in that be stored at least one in the storage medium Instruction, at least one instruction is as processor loads and executes to realize as described in claim 1 to any one of claim 5 Operating system Method for Installation performed by operation.
CN201910522568.2A 2019-06-17 2019-06-17 Operating system installation method and device, electronic equipment and storage medium Active CN110247778B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910522568.2A CN110247778B (en) 2019-06-17 2019-06-17 Operating system installation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910522568.2A CN110247778B (en) 2019-06-17 2019-06-17 Operating system installation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110247778A true CN110247778A (en) 2019-09-17
CN110247778B CN110247778B (en) 2022-03-25

Family

ID=67887591

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910522568.2A Active CN110247778B (en) 2019-06-17 2019-06-17 Operating system installation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110247778B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110769040A (en) * 2019-10-10 2020-02-07 北京达佳互联信息技术有限公司 Access request processing method, device, equipment and storage medium
CN114884812A (en) * 2022-04-20 2022-08-09 深圳市同泰怡信息技术有限公司 Method and device for automatically installing OS (operating system) by sharing same PXE (PCI extensions for instrumentation) server by multiple platforms

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030097553A1 (en) * 2001-09-29 2003-05-22 Frye James F. PXE server appliance
US20040254978A1 (en) * 2003-06-12 2004-12-16 International Business Machines Corporation System and method of remotely accessing a computer system to initiate remote mainteneance and management accesses on network computer systems
KR20100060505A (en) * 2008-11-27 2010-06-07 에스케이커뮤니케이션즈 주식회사 Method and system for automatically installing operating system, and media that can record computer program sources thereof
US20120131179A1 (en) * 2010-11-22 2012-05-24 Chih-Kai Hu Method and system for remote os installation capable of monitoring an installation procedure
CN103907091A (en) * 2011-10-31 2014-07-02 惠普发展公司,有限责任合伙企业 Remote software depolyment across network
CN103957117A (en) * 2014-04-14 2014-07-30 武汉烽火网络有限责任公司 System and method for achieving intelligent installation of network equipment
CN103984575A (en) * 2014-05-28 2014-08-13 浪潮电子信息产业股份有限公司 Rapid deployment method of cluster Linux operation system in cloud-computing environment
CN108600408A (en) * 2018-03-30 2018-09-28 新华三技术有限公司 The method and device of request address
CN109165028A (en) * 2018-08-20 2019-01-08 郑州云海信息技术有限公司 Installation method of operating system and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030097553A1 (en) * 2001-09-29 2003-05-22 Frye James F. PXE server appliance
US20040254978A1 (en) * 2003-06-12 2004-12-16 International Business Machines Corporation System and method of remotely accessing a computer system to initiate remote mainteneance and management accesses on network computer systems
KR20100060505A (en) * 2008-11-27 2010-06-07 에스케이커뮤니케이션즈 주식회사 Method and system for automatically installing operating system, and media that can record computer program sources thereof
US20120131179A1 (en) * 2010-11-22 2012-05-24 Chih-Kai Hu Method and system for remote os installation capable of monitoring an installation procedure
CN103907091A (en) * 2011-10-31 2014-07-02 惠普发展公司,有限责任合伙企业 Remote software depolyment across network
CN103957117A (en) * 2014-04-14 2014-07-30 武汉烽火网络有限责任公司 System and method for achieving intelligent installation of network equipment
CN103984575A (en) * 2014-05-28 2014-08-13 浪潮电子信息产业股份有限公司 Rapid deployment method of cluster Linux operation system in cloud-computing environment
CN108600408A (en) * 2018-03-30 2018-09-28 新华三技术有限公司 The method and device of request address
CN109165028A (en) * 2018-08-20 2019-01-08 郑州云海信息技术有限公司 Installation method of operating system and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
无: "怎么搞PXE跨不同局域网间的系统自动安装", 《百度文库》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110769040A (en) * 2019-10-10 2020-02-07 北京达佳互联信息技术有限公司 Access request processing method, device, equipment and storage medium
CN110769040B (en) * 2019-10-10 2022-07-29 北京达佳互联信息技术有限公司 Access request processing method, device, equipment and storage medium
CN114884812A (en) * 2022-04-20 2022-08-09 深圳市同泰怡信息技术有限公司 Method and device for automatically installing OS (operating system) by sharing same PXE (PCI extensions for instrumentation) server by multiple platforms

Also Published As

Publication number Publication date
CN110247778B (en) 2022-03-25

Similar Documents

Publication Publication Date Title
CN115380514B (en) Automatic deployment of network elements for heterogeneous computing elements
CN111711557B (en) Remote access system and method for network target range users
EP3681110B1 (en) A region interconnect control using vrf tables across heterogeneous networks
US6286038B1 (en) Method and apparatus for remotely configuring a network device
EP2457159B1 (en) Dynamically migrating computer networks
CN111224821B (en) Security service deployment system, method and device
CN110266833B (en) IP address management method and edge cluster
CN107666419B (en) Virtual broadband access method, controller and system
CN110572484B (en) Container-based production environment simulation method
CN102148879A (en) Port mapping method and device and communication system
CN101300779B (en) Method and system for providing service to subscribers
CN106878480B (en) DHCP service process sharing method and device
CN101001264B (en) Method, device, network edge equipment and addressing server for L1VPN address distribution
US20120182994A1 (en) Address compatibility in a network device reload
CN101753460A (en) Method and device for processing internet protocol version 6(IPV6) routing prefix
US20150139036A1 (en) Method and system for an overlay management control network
CN112187958A (en) Method and device for registering, discovering and forwarding microservice
CN103561122B (en) IPv6 address collocation method, IPv6 client and server
CN110247778A (en) Installation method of operating system, device, electronic equipment and storage medium
CN114448937A (en) Access request response method and device and storage medium
CN105723687B (en) The configuration of IP network and management method, corresponding equipment and computer program
WO2017050343A1 (en) Advertising method and system in network functions virtualization environment
CN112667293B (en) Method, device and storage medium for deploying operating system
EP4236270A2 (en) Software defined access fabric without subnet restriction to a virtual network
CN103141072B (en) IP address acquiring method and network access equipment

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