Method and device for determining network configuration information, computer equipment and storage medium

By automatically detecting and obtaining the network mode and dynamic configuration information of the substrate management controller, or determining the network configuration based on the static configuration information, the inconvenience and inefficiency of manually setting the network mode and configuration information when deploying the server is solved, and automated settings and efficient deployment are achieved.

CN119814733APending Publication Date: 2025-04-11INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411912192.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-24
Publication Date
2025-04-11

AI Technical Summary

Technical Problem

When deploying servers, the prior art requires manual setting of network mode and configuration information for each server, resulting in inconvenient and inefficient process.

Method used

By obtaining the network mode of the target substrate management controller, it is detected whether to establish a communication connection with the dynamic host configuration protocol server. If the dynamic configuration information cannot be obtained, the target network configuration information will be automatically determined based on the number of servers and the static network configuration information.

Benefits of technology

It realizes that network configuration information can be automatically set without restarting the server, simplifies the deployment process, improves efficiency, and is suitable for environments with different server numbers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119814733A_ABST
    Figure CN119814733A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of communication, and discloses a method and device for determining network configuration information, computer equipment and a storage medium, and the method comprises the steps: obtaining a network mode of a target baseboard management controller; and when the network mode is determined to be the target network mode, detecting whether a target server establishes communication connection with a dynamic host configuration protocol server. And when the target server establishes communication connection with the dynamic host configuration protocol server, sending an application request to the dynamic host configuration protocol server. And when the dynamic network configuration information sent by the dynamic host configuration protocol server is not received within a preset time period, obtaining the number of servers and static network configuration information. And determining target network configuration information corresponding to the target baseboard management controller according to the number of the servers and the static network configuration information, so that the target baseboard management controller performs network access operation according to the target network configuration information. According to the invention, the process convenience and efficiency of deploying the server can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communication technology, and in particular to a method, an apparatus, a computer device and a storage medium for determining network configuration information. Background Art

[0002] In the field of communication technology, the Setup menu of the server's Basic Input / Output System (BIOS) includes network configuration information for a Baseboard Management Controller (BMC), such as the Internet Protocol (IP) address, mask, and gateway of the BMC.

[0003] Currently, the BIOS setup menu sets the BMC network mode to the Dynamic Host Configuration Protocol (DHCP) mode by default. However, for customers with a small number of server requirements, a separate DHCP server is generally not deployed. Therefore, for such customers, the network mode of each server is generally set to static mode at the site of server deployment, and static network configuration information is set for the server.

[0004] Since the server needs to be restarted each time the static mode is set, the server deployment process is inconvenient and inefficient. Summary of the invention

[0005] In view of this, the present invention provides a method, apparatus, computer device, storage medium and program product for determining network configuration information to solve the problem of inconvenient and low efficiency in deploying servers.

[0006] In a first aspect, the present invention provides a method for determining network configuration information, the method comprising:

[0007] Get the network mode of the target baseboard management controller;

[0008] Determine whether the network mode is the target network mode;

[0009] When the network mode is determined to be the target network mode, detecting whether a target server to which the target baseboard management controller belongs has established a communication connection with a dynamic host configuration protocol server;

[0010] When the target server establishes a communication connection with the dynamic host configuration protocol server, an application request is sent to the dynamic host configuration protocol server, wherein the application request is used to instruct the dynamic host configuration protocol server to allocate dynamic network configuration information to the target server;

[0011] When the dynamic network configuration information sent by the dynamic host configuration protocol server is not received within a preset time period, the number of servers and the static network configuration information are obtained;

[0012] According to the number of servers and the static network configuration information, target network configuration information corresponding to the target baseboard management controller is determined, so that the target baseboard management controller performs a network access operation according to the target network configuration information.

[0013] The method for determining network configuration information provided by the present invention has the following advantages:

[0014] Under this solution, for both customers with less server demand and customers with more server demand, the baseboard management controller in each server can automatically set the network configuration information for it in the above manner. Taking the target baseboard management controller as an example, the network mode of the target baseboard management controller can be obtained first. As long as the network mode is the target network mode, it can automatically detect whether the target server can obtain dynamic network configuration information through the dynamic host configuration protocol server. If the dynamic network configuration information cannot be obtained, the number of servers and static network configuration information can be obtained, and the static network configuration information is automatically determined for the target baseboard management controller based on the number of servers and the static network configuration information for subsequent network access. This means that the target network mode can be set by default, and then when deploying the server, there is no need to restart the server, nor is there a need for the user to reset the network mode and enter configuration information for each server separately. Instead, the network configuration information is set for all servers through automatic settings, and the process of deploying the server is more convenient and efficient.

[0015] In an optional embodiment, the static network configuration information includes communication address indication information, a gateway and a subnet mask. When the number of servers includes one, the communication address indication information is a preset communication address, or, when the number of servers includes multiple, the communication address indication information is a starting communication address or a communication address range.

[0016] Specifically, this solution sets different static network configuration information for different numbers of servers, and can determine and configure the network configuration information according to actual conditions, which is more convenient.

[0017] In an optional implementation, determining target network configuration information corresponding to a target baseboard management controller according to the number of servers and the static network configuration information includes:

[0018] When the number of servers is one, the static network configuration information is determined as the target network configuration information;

[0019] or,

[0020] When there are multiple servers, determining multiple static communication addresses equal in number to the number of servers according to the number of servers and the communication address indication information;

[0021] The target network configuration information is constructed based on the gateway, subnet mask and each static communication address.

[0022] Specifically, according to the number of servers, this solution can directly determine the static network configuration information as the target static network configuration information in the case of a single server. In the case of multiple servers, multiple static communication addresses can be determined first, and the target network configuration information can be formed based on the gateway, subnet mask and each static communication address. The user does not need to enter the static communication address for each server separately, making server deployment more convenient and efficient.

[0023] In an optional implementation, the communication address indication information is a starting communication address;

[0024] When there are multiple servers, multiple static communication addresses are determined according to the number of servers and the communication address indication information, including:

[0025] According to the preset incremental value and the number of servers, the last digit of the starting communication address is incremented multiple times to obtain multiple static communication addresses with the same number as the number of servers.

[0026] Specifically, by presetting the incremental value, the number of servers and the starting communication address, multiple static communication addresses can be automatically generated. When deploying servers, there is no need to enter a static communication address for each server, making server deployment more convenient and more efficient.

[0027] In an optional implementation, the communication address indication information is a communication address range;

[0028] When there are multiple servers, multiple static communication addresses are determined according to the number of servers and the communication address indication information, including:

[0029] A number of static communication addresses equal to the number of servers are randomly selected from the communication address range.

[0030] Specifically, multiple static communication addresses can be automatically generated based on the number of servers and the communication address range. When deploying servers, there is no need to enter a static communication address for each server, making server deployment more convenient and more efficient.

[0031] In an optional embodiment, the method further includes:

[0032] When the dynamic network configuration information sent by the dynamic host configuration protocol server is received within a preset time period, the dynamic network configuration information is determined as the target network configuration information.

[0033] Specifically, if the dynamic network configuration information sent by the dynamic host configuration protocol server is received within a certain time period, it can be determined that the target server supports the dynamic host configuration protocol, and the assigned dynamic network configuration information can be automatically determined as the target network configuration information for network access operations. In this way, the solution can support the dynamic network mode while supporting the static network mode, so that the server can use the corresponding network mode according to the actual situation, which is more convenient.

[0034] In an optional implementation, when the target object of the execution method is a target baseboard management controller, and the number of servers includes multiple, after determining the target network configuration information corresponding to the target baseboard management controller according to the number of servers and the static network configuration information, the method further includes:

[0035] Testing at least one static communication address respectively to determine a target static communication address that is not occupied by other devices in the network to which the target baseboard management controller is connected;

[0036] The target static communication address is set as the communication address of the target baseboard management controller for network access operations.

[0037] Specifically, when the target object is a target baseboard management controller and there are multiple servers, since the target network configuration information includes multiple static communication addresses, the baseboard management controller of each server can use one of the static communication addresses. Therefore, each baseboard management controller can test the static communication address, find the communication address that is not used by other devices in the indirect network, and perform network access operations. In this way, there is no need for users to enter the corresponding static network configuration information for each server separately, which is more convenient and more efficient in deploying servers.

[0038] In a second aspect, the present invention provides a device for determining network configuration information, the device comprising:

[0039] An acquisition module, used for acquiring a network mode of a target baseboard management controller;

[0040] A determination module, used to determine whether the network mode is a target network mode;

[0041] A detection module, used for detecting whether a target server to which a target baseboard management controller belongs has established a communication connection with a dynamic host configuration protocol server when the network mode is determined to be a target network mode;

[0042] A sending module, used for sending an application request to the dynamic host configuration protocol server when the target server establishes a communication connection with the dynamic host configuration protocol server, wherein the application request is used to instruct the dynamic host configuration protocol server to allocate dynamic network configuration information to the target server;

[0043] The acquisition module is further used to acquire the number of servers and the static network configuration information when the dynamic network configuration information sent by the dynamic host configuration protocol server is not received within a preset time period;

[0044] The determination module is also used to determine the target network configuration information corresponding to the target baseboard management controller according to the number of servers and the static network configuration information, so that the target baseboard management controller performs a network access operation according to the target network configuration information.

[0045] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method for determining network configuration information of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0046] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method for determining network configuration information of the first aspect or any corresponding embodiment thereof.

[0047] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions, wherein the computer instructions are used to enable a computer to execute the method for determining network configuration information of the above-mentioned first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0049] Figure 1 is a system architecture diagram according to an embodiment of the present invention;

[0050] Figure 2 is a flow chart of a method for determining network configuration information according to an embodiment of the present invention;

[0051] Figure 3 is a schematic diagram of a flow chart of performing a network configuration operation according to an embodiment of the present invention;

[0052] Figure 4 is a structural block diagram of an apparatus for determining network configuration information according to an embodiment of the present invention;

[0053] Figure 5 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0054] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0055] This solution can be applied to a server or server cluster. Figure 1 As shown, each server can be connected to a terminal device (e.g., a laptop, a desktop computer, etc.), and the server can include a baseboard management controller (Baseboard Management Controller, BMC), a basic input / output system (Base Input / Output System, BIOS) component, a central processing unit (Central Processing Unit, CPU), a complex programmable logic device (Complex Programmable Logic Device, CPLD), a field programmable gate array (Field-Programmable Gate Array, FPGA), and a memory. The BIOS component can run BIOS firmware, which can be used to determine network configuration information for the BMC. Alternatively, the memory can store target software, and the CPU can read the code of the target software from the memory and run it to determine the network configuration information for the BMC. Alternatively, the CPLD and FPGA can also run related firmware to determine the network configuration information for the BMC.

[0056] The BMC network can be configured as a dedicated network or a shared network. In a dedicated network, the BMC can only access the network through the server management network card. In a shared network, the BMC can access the network through the high-speed peripheral component interconnect interface (PCIE) network card. Regardless of the network, the target object can perform the following method to determine the configuration information. The target object can be any one of the BMC, BIOS components, CPU, CPLD, and FPGA included in the server.

[0057] The embodiment of the present invention provides a method for determining network configuration information, which automatically determines the network configuration information in a target network mode, eliminating the need for a user to allocate and execute network configuration operations for each server, thereby improving the convenience and efficiency of deploying servers.

[0058] According to an embodiment of the present invention, a method embodiment for determining network configuration information is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0059] In this embodiment, a method for determining network configuration information is provided, which can be executed by the target object. Figure 2 is a flow chart of a method for determining network configuration information according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0060] Step S201, obtaining a network mode of a target baseboard management controller.

[0061] The network mode is used to indicate the method of obtaining network configuration information, for example, the method of obtaining an Internet Protocol (IP) address. The network configuration information may include information such as a communication address (for example, an IP address), a gateway (Router IP Address), and a subnet mask.

[0062] Specifically, the target object can read the assignment of the network mode parameter from the firmware or software running on itself, and the assignment can be represented in different forms such as numerical values ​​and character strings. The assignment of the network mode parameter can represent the network mode of the target baseboard management controller. The user can select the network mode through the display interface of the terminal device connected to the target server to which the target baseboard management controller belongs.

[0063] For example, Network Mode=Static indicates that the network mode of the target baseboard management controller is a static network mode, Network Mode=Dynamic indicates that the network mode of the target baseboard management controller is a dynamic network mode, and Network Mode=Compatible indicates that the network mode of the target baseboard management controller is a dynamic network mode.

[0064] Step S202, determining whether the network mode is the target network mode.

[0065] The target network mode is used to indicate automatic determination of target network configuration information, that is, it is compatible with the above-mentioned static network mode and dynamic network mode.

[0066] Specifically, the target object can perform subsequent operations according to different network modes. When it is determined that the network mode is not the target network mode, the target object can perform the network configuration operation corresponding to the network mode in the original manner. For example, when the network mode is a static network mode, the user can enter the IP address, subnet mask and gateway in the relevant display interface of the terminal device and send it to the target object. The target object can generate target network configuration information based on the information entered by the user, which is used for the target baseboard management controller to perform network access operations. When the network mode is a dynamic network mode, the target baseboard management controller can perform network access operations according to the dynamic network configuration information assigned by the dynamic host configuration protocol server. When the network mode is determined to be the target network mode, the subsequent steps of this solution can be executed. In this way, the user can select any of the above three network modes in the relevant display interface, which can retain the multiple network configuration methods currently supported, and can also determine the network configuration information according to the automatic configuration method of this solution.

[0067] Step S203: when it is determined that the network mode is the target network mode, it is detected whether the target server to which the target baseboard management controller belongs has established a communication connection with the dynamic host configuration protocol server.

[0068] Specifically, in a storage cluster with a large number of deployed servers, a Dynamic Host Configuration Protocol (DHCP) server may be provided in the storage cluster, which may be a dedicated DHCP server for allocating dynamic network configuration information to each server in the storage cluster. Therefore, when the target object determines that the network mode is the target network mode, it may first detect whether the target server has established a communication connection with the DHCP server. If so, it indicates that the target server supports the use of dynamic network configuration information.

[0069] Step S204: When the target server establishes a communication connection with the dynamic host configuration protocol server, it sends an application request to the dynamic host configuration protocol server.

[0070] The application request may be used to instruct the dynamic host configuration protocol server to allocate dynamic network configuration information to the target server.

[0071] Specifically, when it is determined that the target server has established a communication connection with the dynamic host configuration protocol server, an application request can be directly sent to the dynamic host configuration protocol server. The application request can carry the identification information and physical communication address (for example, media access control address) of the target server. After receiving the application request, the dynamic host configuration protocol server can allocate dynamic network configuration information to the target server according to the allocation rules configured by itself.

[0072] Step S205, when the dynamic network configuration information sent by the dynamic host configuration protocol server is not received within the preset time period, the number of servers and the static network configuration information are obtained.

[0073] Among them, the static network configuration information may include communication address indication information, and may also include a gateway and a subnet mask. The communication address indication information is information used to indicate an IP address. When the number of servers includes one, the communication address indication information is a preset communication address. For example, the preset communication address may be 192.168.10.10. When the number of servers includes multiple, the communication address indication information is a starting communication address or a communication address range. For example, the starting communication address may be 192.168.10.1. The communication address range may be 192.168.10.1-192.168.10.100.

[0074] Specifically, when the dynamic network configuration information sent by the dynamic host configuration protocol server is not received within the preset time period of sending the application request, it indicates that the dynamic host configuration protocol server has a fault. In order to ensure that the external network access function of the target basic management controller can be realized in time, the target object can obtain the server quantity and static network configuration information.

[0075] The user may input the number of servers in advance in the relevant display interface of the terminal device, and obtain the corresponding static network configuration information according to the number of servers. Specifically, it may be: when the number of servers is one, directly read the preset first static network configuration information (wherein the communication address indication information includes the preset communication address) from the firmware or software running itself. When the number of servers is multiple, the preset second static network configuration information (wherein the communication address indication information includes the starting communication address or the communication address range) may be read from the firmware or software running itself, or the third static network configuration information sent by the terminal device may be received (which may be input by the user in advance into the relevant display interface of the terminal device, or may be input by the user through command line parameters, scripts, etc.).

[0076] Step S206: determining target network configuration information corresponding to the target baseboard management controller according to the number of servers and the static network configuration information.

[0077] Specifically, according to the number of servers and the static network configuration information corresponding to the number of servers, the operation of determining the target network configuration information may include the following two cases:

[0078] In case 1, when the number of servers is one, the static network configuration information is determined as the target network configuration information.

[0079] Specifically, when the number of servers is one, the target object may directly determine the first static network configuration information as the target network configuration information.

[0080] In case 2, when there are multiple servers, multiple static communication addresses equal in number to the number of servers are determined according to the number of servers and the communication address indication information.

[0081] Since the above communication address indication information can be a starting communication address or a communication address range, two corresponding methods for determining a static communication address are given below for different types of communication address indication information:

[0082] Method 1: According to the preset incremental value and the number of servers, the last digit of the starting communication address is incremented multiple times to obtain multiple static communication addresses whose number is equal to the number of servers.

[0083] Specifically, the target object can sum the preset incremental value and the last digit value in the starting communication address to obtain the first last digit value, replace the last digit value in the starting communication address with the first last digit value, and obtain the first static communication address. The current number of communication addresses is updated to determine whether the updated number of communication addresses is equal to the number of servers. If so, there is no need to generate new static communication addresses. If not, the second last digit value can be obtained by summing the preset incremental value and the first last digit value, and the last digit value in the starting communication address can be replaced with the second last digit value to obtain the second static communication address. The current number of communication addresses is updated to determine whether the updated number of communication addresses is equal to the number of servers. By analogy, multiple static communication addresses equal to the number of servers are obtained.

[0084] For example, the starting communication address is 192.168.10.1, the number of servers is 3, and the preset increment value is 1. After two increment operations, you can get 192.168.10.1, 192.168.10.2, and 192.168.10.3.

[0085] Method 2: randomly select multiple static communication addresses equal to the number of servers from the communication address range, and construct the target network configuration information based on the gateway, subnet mask and each static communication address.

[0086] For example, the communication address range is 192.168.10.1-192.168.10.100, the number of servers is 3, and the multiple static communication addresses randomly selected may be 192.168.10.10, 192.168.10.25, and 192.168.10.31.

[0087] When the target object is a target baseboard management controller, the target object can perform network configuration operations according to the target network configuration information and execute network access operations. Alternatively, when the target object is not a target baseboard management controller, that is, when the target object is one of a CPU, a BIOS component, a CPLD, and an FPGA, the target object can send the target network configuration information to the target baseboard management controller, and the target baseboard management controller performs network configuration according to the received target network configuration information and executes network access operations through the target network configuration information.

[0088] Due to the different number of servers and network modes, the content included in the target network configuration information is also different. Therefore, the target baseboard management controller can also perform different network configuration operations according to the target network configuration information determined by itself or the content included in the target network configuration information sent by the received target object:

[0089] First, when the target network configuration information includes a communication address (which may be the preset communication address mentioned above or the communication address included in the allocated dynamic network configuration information), the target baseboard management controller may directly set the communication address therein as the communication address for the target baseboard management controller to perform network access operations.

[0090] Second, when the target network configuration information includes multiple static communication addresses, that is, when the number of servers is multiple, the target baseboard management controller can test at least one static communication address separately, determine the target static communication address that is not occupied by other devices in the network connected to the target baseboard management controller, and set the target static communication address as the communication address for the target baseboard management controller to perform network access operations.

[0091] Specifically, the target object can first sort each static communication address included in the target network configuration information according to the size of the last value of the static communication address. Then, the target object can sort according to each static communication address and test at least one static communication address, which can be specifically: according to the static communication address ranked first and its own physical address, a data packet is generated and broadcasted. If no reply message is received within the preset time after the broadcast data packet, it can be determined that the static communication address is not used by other devices. The target object can determine the static communication address as the target static communication address, and set the target static communication address as the communication address for the target baseboard management controller to perform network access operations. If a reply message is received within the preset time after the broadcast data packet, it can be determined that the static communication address is not used by the baseboard management controller of other servers, and the static communication address ranked second can be tested, and so on, until the target static communication address that is not occupied by other devices in the network connected to the target baseboard management controller is determined, the test operation is stopped.

[0092] In some optional implementations, when the target object has not determined its own target static communication address and has intercepted data packets broadcast by other devices, the first static communication address can be extracted from the first data packet (any intercepted data packet), and it is determined whether the target network configuration information includes the first static communication address. If so, the first static communication address in the target network configuration information is marked as occupied. In subsequent testing processes, the static communication address marked as occupied can be ignored, which can save testing resources.

[0093] In some optional implementations, the target object can randomly select a static communication address from multiple static communication addresses included in the target network configuration information as a candidate static communication address, and obtain a target timestamp for selecting the candidate static communication address. According to the candidate static communication address and the target timestamp, a second data packet is generated and broadcast. Within the preset time period of determining the target network configuration information, when the target object does not listen to the data packet broadcast by other devices, the selected candidate static communication address can be directly determined as the target static communication address. Alternatively, when the target object listens to at least one data packet broadcast from other devices, the target object can parse each data packet to obtain a static communication address and a timestamp. The target object can determine whether there is a data packet including the candidate static communication address in at least one data packet, and if not, the candidate static communication address can be directly determined as the target static communication address. If yes, the timestamps can be compared, and if the target timestamp is less than the timestamp in the data packet including the candidate static communication address, the candidate static communication address can be determined as the target static communication address. If there is a data packet including the candidate static communication address whose timestamp is less than or equal to the target timestamp, the candidate static communication address can be reselected and the timestamp can be re-determined for subsequent comparison. In this way, through the above method, without user participation, each baseboard management controller can automatically determine the network configuration information and ensure that multiple baseboard management controllers will not occupy the same static communication address. At the same time, through the timestamp, it is possible to compare which device occupies the candidate static communication address earlier, which helps to avoid long conflict detection cycles, reduce the number of tests, and reduce network resource usage.

[0094] In some optional implementations, when it is determined that the target server has not established a communication connection with the dynamic host configuration protocol server, it means that the target server may be the only service that needs to be deployed currently, or the storage cluster is not provided with a dynamic host configuration protocol server, or the dynamic host configuration protocol server fails. Therefore, in order to ensure the implementation of the network access operation, the target object can obtain the number of servers and static network configuration information, and then determine the target network configuration information corresponding to the target baseboard management controller based on the number of servers and the static network configuration information (the specific process can refer to the description in the above steps S205 to S206, which will not be repeated here). Alternatively, the target object can perform the detection operation again. When the number of detection operations reaches the preset threshold, if it is still detected that the target server has not established a communication connection with the dynamic host configuration protocol server, the target object obtains the number of servers and static network configuration information again to perform subsequent operations.

[0095] In some optional embodiments, when the dynamic network configuration information sent by the dynamic host configuration protocol server is received within a preset time period, the target object can determine the dynamic network configuration information as the target network configuration information. Alternatively, when the dynamic network configuration information sent by the dynamic host configuration protocol server is received within a preset time period, the target object can still perform the above-mentioned operation of determining the target static communication address, so that the target object can determine both the dynamic communication address and the target static communication address included in the dynamic network configuration information as the communication address for the target baseboard management controller to perform network access operations. For example, the target baseboard management controller can simultaneously support 192.168.10.10 (target static communication address) and 10.100.168.3 (dynamic communication address) for network access operations.

[0096] like Figure 3 As shown, a complete flowchart for performing network configuration operations is given. The target object can obtain the network mode and determine whether the network mode is the target network mode. If so, an application request can be sent to the dynamic host configuration protocol server. When dynamic network configuration information is received within a preset time period, the network configuration operation is performed on the target baseboard management controller according to the dynamic network configuration information. When no dynamic network configuration information is received within a preset time period, the number of servers is obtained. If the number of servers is one, the network configuration operation is performed on the target baseboard management controller according to the preset communication address, subnet mask and gateway. If the number of servers is multiple, the target static communication address can be determined based on the starting communication address (or communication address range) and the number of servers, and the network configuration operation is performed on the target baseboard management controller according to the target static communication address, subnet mask and gateway.

[0097] The method for determining network configuration information provided in this embodiment is, first, whether it is for a customer with a small server demand or a customer with a large server demand, for the baseboard management controller in each server, the network configuration information can be automatically set for it in the above manner. Taking the target baseboard management controller as an example, the network mode of the target baseboard management controller can be obtained first. As long as the network mode is the target network mode, it can be automatically detected whether the target server can obtain dynamic network configuration information through the dynamic host configuration protocol server. If the dynamic network configuration information cannot be obtained, the number of servers and static network configuration information can be obtained, and the static network configuration information is automatically determined for the target baseboard management controller based on the number of servers and the static network configuration information for subsequent network access. This means that the target network mode can be set by default, and then when deploying the server, there is no need to restart the server, nor is there a need for the user to reset the network mode and input configuration information for each server separately. Instead, the network configuration information is set for all servers through automatic settings, and the process of deploying the server is more convenient and efficient.

[0098] Second, under the above scheme, the target object can re-determine the target network configuration information based on the above method each time the target server is started. In this way, after the deployment environment where the target server is located changes, the network access operation can also be performed according to the target network configuration information, which is more convenient.

[0099] Third, in order to improve the user experience, some manufacturers currently write the network mode selected by the customer into the BIOS firmware (specifically, it can be the setting menu of the BIOS firmware) before the server leaves the factory according to customer needs. If a static network mode is selected, it is still necessary to manually set the IP, gateway, subnet mask and other network parameters before use. In this way, the maintenance cost of the BIOS firmware is high (for example, when upgrading the firmware, it is necessary to upgrade each customized firmware for each customer), and it is inconvenient. However, this solution only requires the input of the server number and communication address indication information to automatically configure the network information, which is more convenient, has a better user experience, and has a lower firmware maintenance cost.

[0100] In this embodiment, a device for determining network configuration information is also provided, and the device is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made are not repeated here. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0101] This embodiment provides a device for determining network configuration information, such as Figure 4 As shown, including:

[0102] An acquisition module 401 is used to acquire a network mode of a target baseboard management controller;

[0103] A determination module 402 is used to determine whether the network mode is a target network mode;

[0104] The detection module 403 is used to detect whether the target server to which the target baseboard management controller belongs has established a communication connection with the dynamic host configuration protocol server when the network mode is determined to be the target network mode;

[0105] The sending module 404 is used to send an application request to the dynamic host configuration protocol server when the target server establishes a communication connection with the dynamic host configuration protocol server, wherein the application request is used to instruct the dynamic host configuration protocol server to allocate dynamic network configuration information to the target server;

[0106] The acquisition module 401 is further used to acquire the number of servers and the static network configuration information when the dynamic network configuration information sent by the dynamic host configuration protocol server is not received within a preset time period;

[0107] The determination module 402 is further used to determine target network configuration information corresponding to the target baseboard management controller according to the number of servers and the static network configuration information, so that the target baseboard management controller performs a network access operation according to the target network configuration information.

[0108] In some optional embodiments, the static network configuration information includes communication address indication information, a gateway, and a subnet mask. When the number of servers includes one, the communication address indication information is a preset communication address, or, when the number of servers includes multiple, the communication address indication information is a starting communication address or a communication address range.

[0109] In some optional implementations, the determination module 402 is specifically configured to:

[0110] When the number of servers is one, the static network configuration information is determined as the target network configuration information;

[0111] or,

[0112] When there are multiple servers, determining multiple static communication addresses equal in number to the number of servers according to the number of servers and the communication address indication information;

[0113] The target network configuration information is constructed based on the gateway, subnet mask and each static communication address.

[0114] In some optional implementations, the communication address indication information is a starting communication address;

[0115] The determination module 402 is specifically configured to:

[0116] According to the preset incremental value and the number of servers, the last digit of the starting communication address is incremented multiple times to obtain multiple static communication addresses with the same number as the number of servers.

[0117] In some optional implementations, the communication address indication information is a communication address range;

[0118] The determination module 402 is specifically configured to:

[0119] A number of static communication addresses equal to the number of servers are randomly selected from the communication address range.

[0120] In some optional implementations, the determination module 402 is further configured to:

[0121] When the dynamic network configuration information sent by the dynamic host configuration protocol server is received within a preset time period, the dynamic network configuration information is determined as the target network configuration information.

[0122] In some optional implementations, when the target object of the execution method is a target baseboard management controller, and the number of servers includes multiple, the device further includes a setting module 405, which is used to:

[0123] Testing at least one static communication address respectively to determine a target static communication address that is not occupied by other devices in the network to which the target baseboard management controller is connected;

[0124] The target static communication address is set as the communication address of the target baseboard management controller for network access operations.

[0125] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0126] The device for determining network configuration information in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0127] The embodiment of the present invention also provides a computer device having the above Figure 4 The device for determining network configuration information is shown.

[0128] See also Figure 5 , Figure 5 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 5As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 5 A processor 10 is taken as an example.

[0129] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware integrated circuit. The hardware integrated circuit may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable logic gate array, a general purpose array logic or any combination thereof.

[0130] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0131] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0132] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0133] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0134] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0135] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0136] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for determining network configuration information, characterized in that: The method comprises: Get the network mode of the target baseboard management controller; Determining whether the network mode is a target network mode; When it is determined that the network mode is the target network mode, detecting whether the target server to which the target baseboard management controller belongs has established a communication connection with the dynamic host configuration protocol server; when the target server has established a communication connection with the dynamic host configuration protocol server, sending an application request to the dynamic host configuration protocol server, wherein the application request is used to instruct the dynamic host configuration protocol server to allocate dynamic network configuration information to the target server; When the dynamic network configuration information sent by the dynamic host configuration protocol server is not received within a preset time period, obtaining the number of servers and static network configuration information; According to the number of servers and the static network configuration information, target network configuration information corresponding to the target baseboard management controller is determined, so that the target baseboard management controller performs a network access operation according to the target network configuration information.

2. The method according to claim 1, characterized in that The static network configuration information includes communication address indication information, a gateway and a subnet mask. When the number of servers includes one, the communication address indication information is a preset communication address, or, when the number of servers includes multiple, the communication address indication information is a starting communication address or a communication address range.

3. The method according to claim 2, characterized in that The step of determining target network configuration information corresponding to the target baseboard management controller according to the number of servers and the static network configuration information includes: When the number of the server is one, determining the static network configuration information as the target network configuration information; or, When there are multiple servers, determining multiple static communication addresses equal in number to the number of servers according to the number of servers and the communication address indication information; The target network configuration information is constructed according to the gateway, the subnet mask and each of the static communication addresses.

4. The method according to claim 3, characterized in that The communication address indication information is the starting communication address; When there are multiple servers, determining multiple static communication addresses according to the number of servers and the communication address indication information includes: According to the preset incremental value and the number of servers, the last digit of the initial communication address is incremented multiple times to obtain a plurality of static communication addresses whose number is equal to the number of servers.

5. The method according to claim 3, characterized in that: The communication address indication information is the communication address range; When there are multiple servers, determining multiple static communication addresses according to the number of servers and the communication address indication information includes: A plurality of static communication addresses whose number is equal to the number of the servers is randomly selected from the communication address range.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: When the dynamic network configuration information sent by the dynamic host configuration protocol server is received within the preset time period, the dynamic network configuration information is determined as the target network configuration information.

7. The method according to any one of claims 3 to 5, characterized in that: When the target object for executing the method is the target baseboard management controller, and the number of servers includes multiple, after determining the target network configuration information corresponding to the target baseboard management controller according to the number of servers and the static network configuration information, the method further includes: Testing at least one of the static communication addresses respectively to determine a target static communication address that is not occupied by other devices in the network connected to the target baseboard management controller; The target static communication address is set as the communication address of the target baseboard management controller for network access operation.

8. A device for determining network configuration information, characterized in that: The device comprises: An acquisition module, used for acquiring a network mode of a target baseboard management controller; A determination module, used to determine whether the network mode is a target network mode; A detection module, configured to detect whether a target server to which the target baseboard management controller belongs has established a communication connection with a dynamic host configuration protocol server when it is determined that the network mode is the target network mode; a sending module, configured to send an application request to the dynamic host configuration protocol server when the target server establishes a communication connection with the dynamic host configuration protocol server, wherein the application request is used to instruct the dynamic host configuration protocol server to allocate dynamic network configuration information to the target server; The acquisition module is further configured to acquire the number of servers and the static network configuration information when the dynamic network configuration information sent by the dynamic host configuration protocol server is not received within a preset time period; The determination module is further used to determine target network configuration information corresponding to the target baseboard management controller according to the number of servers and the static network configuration information, so that the target baseboard management controller performs a network access operation according to the target network configuration information.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method for determining network configuration information according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method for determining network configuration information according to any one of claims 1 to 7.

Citation Information

Cited By

  • Network address configuration method and electronic equipment

    CN120935144A

  • Network address configuration method and electronic device

    CN120935144B