A network card configuration recovery method and device
By binding the server serial number and PCIe bus number in the cloud platform, the network card configuration is automatically restored, solving the problem of difficult configuration recovery after network card replacement and improving the efficiency and reliability of server operation and maintenance.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NEW H3C TECH CO LTD
- Filing Date
- 2023-03-17
- Publication Date
- 2026-06-05
AI Technical Summary
After a network card is replaced, existing technology cannot accurately restore the network card configuration, resulting in low server maintenance efficiency.
By binding the server serial number and PCIe bus number in the cloud platform, the network card configuration file is obtained and sent, and the network card configuration is automatically restored, including the replacement of the name and device identifier, IP address conflict detection and authentication processing, ensuring the accurate restoration of the network card configuration file.
It improves server operation and maintenance efficiency and configuration recovery reliability, avoids the difficulty of configuration recovery after network card replacement, and improves the overall maintainability of the server.
Smart Images

Figure CN116346603B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of communication technology, and in particular to a method and apparatus for restoring network card configuration. Background Technology
[0002] With the popularization of network technology, servers, as devices that host application operation and data storage, have been more widely used. As an important component of servers, network interface cards (NICs) need to have higher reliability and maintainability.
[0003] When a network card malfunctions, the problem needs to be resolved by replacing the network card. After replacing the network card, the original configuration needs to be restored to the new network card. However, due to the change in network card name, the restoration process cannot be completed accurately, requiring manual configuration restoration by staff, which reduces server maintenance efficiency. Summary of the Invention
[0004] To overcome the problems existing in related technologies, this specification provides a method and apparatus for restoring network card configuration.
[0005] In conjunction with the first aspect of the embodiments described in this specification, this application provides a network interface card (NIC) configuration recovery method, applied to a cloud platform, comprising:
[0006] When the server starts up, obtain the server serial number, network card PCIe bus number, and network card configuration file announced by the access server;
[0007] If the corresponding network card configuration file is found based on the server serial number and the network card's PCIe bus number, the found network card configuration file is sent to the server so that the server can restore its own network card configuration based on the found network card configuration file.
[0008] If the corresponding network card configuration file cannot be found based on the server serial number and the network card's PCIe bus number, then the network card configuration file is stored, and a correspondence is established between the server serial number, the network card's PCIe bus number, and the network card configuration file.
[0009] Optionally, send the found network interface card (NIC) configuration file to the server, including:
[0010] Based on the name and device identifier in the obtained network interface card (NIC) configuration file, replace the name and device identifier in the currently stored NIC configuration file to form a modified NIC configuration file;
[0011] Send the modified network interface card configuration file to the server.
[0012] Optionally, send the found network interface card (NIC) configuration file to the server, including:
[0013] If the BOOTPROTO field in the found network interface configuration file is configured as static, then Internet Protocol (IP) address conflict detection will be started.
[0014] If there is an IP address conflict in the managed server, the IP address in the found network interface card (NIC) configuration file will be set to empty to form a modified NIC configuration file, and the modified NIC configuration file will be sent to the server.
[0015] If there are no IP address conflicts among the managed servers, the found network interface configuration file is sent to the server.
[0016] Optionally, after obtaining the server serial number announced by the access server, the PCIe bus number of the network card, and the network card configuration file, the following may also be included:
[0017] The server is authenticated based on its serial number and the PCIe bus number of the network card.
[0018] Optionally, the found network interface card (NIC) configuration file is sent to the server so that the server can restore its own NIC configuration based on the found NIC configuration file, including:
[0019] If the number of first ports of the network card to be replaced is not less than the number of second ports of the previous network card, based on the obtained network card configuration file and the found network card configuration file, the network port number of the found network card configuration file and the number of second ports is sent to the server so that the server can restore the network card to the corresponding network port based on the configuration in the found network card configuration file.
[0020] If the number of first ports of the network card to be replaced is less than the number of second ports of the previous network card, based on the obtained network card configuration file and the found network card configuration file, the network card number of the found network card configuration file and the number of second ports is sent to the server so that the server can restore the network card to the port based on the configuration in the found network card configuration file.
[0021] In conjunction with a second aspect of the embodiments described in this specification, this application provides a network interface card (NIC) configuration recovery device applied to a cloud platform, comprising:
[0022] The acquisition unit is used to acquire the server serial number, network card PCIe bus number, and network card configuration file announced by the accessing server when the server starts up.
[0023] The recovery unit is used to send the found network card configuration file to the server if the corresponding network card configuration file is found based on the server serial number and the network card's PCIe bus number, so that the server can restore its own network card configuration based on the found network card configuration file.
[0024] The creation unit is used to store the network card configuration file and establish the correspondence between the server serial number, the network card's PCIe bus number, and the network card configuration file if the corresponding network card configuration file cannot be found based on the server serial number and the network card's PCIe bus number.
[0025] Optional, the recovery unit includes:
[0026] The replacement module is used to replace the name and device identifier in the currently stored network interface card (NIC) configuration file based on the name and device identifier obtained in the NIC configuration file, thereby forming a modified NIC configuration file.
[0027] The sending module is used to send the modified network interface card configuration file to the server.
[0028] Optional, the recovery unit includes:
[0029] The startup module is used to start Internet IP address conflict detection if the BOOTPROTO field in the found network card configuration file is configured as static.
[0030] The conflict detection module is used to: if an IP address conflict exists in the managed server, set the IP address in the found network interface card (NIC) configuration file to empty, form a modified NIC configuration file, and send the modified NIC configuration file to the server; if no IP address conflict exists in the managed server, send the found NIC configuration file to the server.
[0031] Optionally, the device may also include:
[0032] The authentication unit is used to authenticate the server based on the server serial number and the PCIe bus number of the network card.
[0033] Optionally, the recovery unit is specifically used to send the port numbers of the found network interface card (NIC) configuration file and the number of the second network ports to the server if, based on the obtained NIC configuration file and the found NIC configuration file, it is confirmed that the number of the first network ports of the replaced NIC is not less than the number of the second network ports of the previous NIC, so that the server can restore the NIC to the corresponding network port based on the configuration in the found NIC configuration file; if, based on the obtained NIC configuration file and the found NIC configuration file, it is confirmed that the number of the first network ports of the replaced NIC is less than the number of the second network ports of the previous NIC, it sends the port numbers of the found NIC configuration file and the number of the second network ports to the server so that the server can restore the NIC to the port based on the configuration in the found NIC configuration file.
[0034] In conjunction with a third aspect of the embodiments of this specification, this application provides a server applied to a cloud platform, including a transceiver, a processor, and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, the processor being prompted by the machine-executable instructions to implement the method steps of any of the above.
[0035] In conjunction with the fourth aspect of the embodiments of this specification, this application provides a machine-readable storage medium storing machine-executable instructions that, when invoked and executed by a processor, cause the processor to implement the method steps of any of the above-described embodiments.
[0036] The technical solutions provided by the embodiments in this specification may include the following beneficial effects:
[0037] In the embodiments described in this specification, in the cloud platform, the network card configuration file is restored to the replaced network card by binding the server serial number and PCIe bus number, thereby avoiding the problem of not being able to restore the network card configuration after replacing the network card, and improving the server operation and maintenance efficiency.
[0038] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this specification. Attached Figure Description
[0039] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this specification and, together with the description, serve to explain the principles of this specification.
[0040] Figure 1 This is a flowchart of a network card configuration recovery method involved in this application;
[0041] Figure 2 This is a network topology diagram to which the network card configuration recovery method involved in this application applies;
[0042] Figure 3 This is a schematic diagram illustrating the modification of the name and device identifier in the network card configuration file in a network card configuration recovery method involved in this application;
[0043] Figure 4 This is a schematic diagram illustrating the modification of the IP address in the network card configuration file in a network card configuration recovery method involved in this application;
[0044] Figure 5 This is a schematic diagram of a network card configuration recovery device involved in this application;
[0045] Figure 6 This is a schematic diagram of the structure of a server in a cloud platform involved in this application. Detailed Implementation
[0046] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this specification.
[0047] This application provides a method for restoring network interface card (NIC) configuration, applicable to cloud platforms, such as... Figure 1 As shown, it includes:
[0048] S100: When the server is detected to be starting up, obtain the server serial number, network card PCIe bus number, and network card configuration file announced by the access server.
[0049] In such Figure 2 The network shown includes a cloud platform and servers connected to the cloud platform via a network. This cloud platform can be understood as a cluster of multiple servers providing application hosting and data storage. Hereinafter, the servers in the cloud platform will be referred to as cloud servers, and the servers connected to the cloud platform will be referred to as object servers. The network interface card (NIC) configuration recovery method involved in this application can run on one cloud server within the cloud platform, or it can be run collaboratively by multiple cloud platforms; there is no limitation on this. A NIC 1 can be configured on the object server. Here, NIC 1 is replaced by NIC 2.
[0050] After the object server starts, it can send login messages to the cloud platform, such as based on the AAA (Authentication, Authorization, Accounting) mechanism. Specific protocols include, but are not limited to, RADIUS (Remote Authentication Dial-In User Service) and LDAP (Lightweight Directory Access Protocol). Through the login message and authentication by the cloud platform, the cloud platform can manage the object server. The login message can carry the object server's serial number, the network interface card's (NIC) PCIe (Peripheral Component Interconnect Express) bus number, and the NIC configuration file. The NIC configuration file can be directly included in the login message or can be formed by including the NIC's configuration information within the login message; there are no restrictions on this. The login message is not limited to a single message; it can be a combination of several messages. The login message can also include the object server's IP (Internet Protocol) address and MAC (Media Access Control) address.
[0051] The cloud platform can authenticate object servers based on information or combinations thereof, such as IP address, MAC address, server serial number, and PCIe bus number of the network card. Authenticated object servers can be recorded in the cloud platform to facilitate subsequent logins.
[0052] The cloud platform can also establish a correspondence between the obtained server serial number, network interface card (NIC) PCIe bus number, and NIC configuration file to facilitate subsequent NIC configuration recovery. In a cloud platform, if an object server contains multiple NICs, there can be multiple NIC configuration files. The server serial number identifies an object server, and the PCIe bus number identifies a specific NIC within that object server. Therefore, the combination of the server serial number and the NIC's PCIe bus number uniquely identifies the location of a specific NIC within an object server.
[0053] S101. If the corresponding network card configuration file is found based on the server serial number and the network card's PCIe bus number, the found network card configuration file is sent to the server so that the server can restore its own network card configuration based on the found network card configuration file.
[0054] S102. If the corresponding network card configuration file is not found based on the server serial number and the network card's PCIe bus number, then store the network card configuration file and establish the correspondence between the server serial number, the network card's PCIe bus number, and the network card configuration file.
[0055] Assuming, such as Figure 2 As shown, if the cloud platform cannot find a network interface card (NIC) configuration file that matches the server serial number and the NIC's PCIe bus number, it indicates that the server is logging into the cloud platform for the first time or that a new NIC has been added. In this case, the cloud platform can create and store the NIC configuration file and establish a correspondence between it and the server serial number and the NIC's PCIe bus number for later retrieval and recovery.
[0056] That is, when the cloud platform first receives the server serial number, the PCIE bus number of network card 1 and the network card configuration file of network card 1 from the object server, it stores the network card configuration file and establishes the correspondence between the three in step S102.
[0057] In other words, after the cloud platform receives the server serial number and the network card's PCIe bus number, it searches for the matching network card configuration file based on these two information. The cloud platform can then send the found network card configuration file to the target server, allowing the target server to restore the configuration file to the corresponding network card based on its PCIe bus number.
[0058] After network interface card 1 (NIC 1) is replaced by NIC 2, the object server restarts and re-uploads the server serial number, the PCIe bus number of NIC 2 (since NIC 2 replaced NIC 1, the PCIe bus number of the NIC remains unchanged), and the NIC configuration file of NIC 2. Since the NIC configuration file of NIC 1 can be found based on the server serial number and the NIC's PCIe bus number, after step S101, the cloud platform can send the NIC configuration file of NIC 1 to the object server, enabling the object server to configure its own NIC based on the received NIC configuration file.
[0059] In the cloud platform, by associating the server serial number, the network card's PCIe bus number, and the network card configuration file, during the process of the object server requesting login to the cloud platform, the stored network card configuration file is obtained through the server serial number and the network card's PCIe bus number. The found network card configuration file is then sent to the object server, so that the object server can restore the network card configuration according to the network card configuration file, thereby improving the server's network card recovery efficiency.
[0060] Optionally, step S101 involves sending the found network interface card (NIC) configuration file to the server, including:
[0061] S101A: Based on the name and device identifier in the obtained network interface card (NIC) configuration file, replace the name and device identifier in the currently stored NIC configuration file to form a modified NIC configuration file.
[0062] S101B sends the modified network card configuration file to the server.
[0063] like Figure 3 As shown, the name of the replaced network interface card 1 is eth6, and the device identifier is eth6. The name of the new network interface card 2 is eth4, and the device identifier is eth4. In order to ensure that other configurations on the object server can also recognize the name and device identifier of network interface card 2, when distributing the network interface card configuration file to the object server, the name and device identifier in the stored network interface card configuration file can be modified to the name and device identifier of the new network interface card, and the modified network interface card configuration file can be sent to the object server to restore the network interface card configuration.
[0064] In this way, when the network interface card (NIC) configuration is restored on the target server, the configuration of NIC 2 can continue the configuration of NIC 1, avoiding identification errors caused by the direct inheritance of name and device identifier from NIC 1, and further improving the reliability of NIC configuration restoration.
[0065] Optionally, step S101 involves sending the found network interface card (NIC) configuration file to the server, including:
[0066] S101C: If the BOOTPROTO field in the found network card configuration file is configured as static, then IP address conflict detection will be started.
[0067] The network interface card (NIC) configuration file also contains a BOOTPROTO field, which indicates the NIC's IP address configuration method. The BOOTPROTO field can contain options for "not specified," "static," and "DHCP (Dynamic Host Configuration Protocol)." If configured as "not specified," no IP address will be provided. If configured as DHCP, the object server will dynamically obtain an unused IP address. Under these two methods, the NIC's IP address will not conflict, so no adjustments are needed when restoring the configuration; the contents of the NIC configuration file sent to the server do not need to be modified. However, if the BOOTPROTO field in the found NIC configuration file is configured as "static," it means that the NIC configuration file records the previous NIC IP address configuration. In this case, the object server may cause IP address conflicts when restoring the configuration. The cloud platform needs to adjust the configuration based on the currently managed object servers.
[0068] S101D: If there is an IP address conflict in the managed server, the IP address in the found network card configuration file will be set to empty, forming a modified network card configuration file, and the modified network card configuration file will be sent to the server.
[0069] S101E: If there is no IP address conflict among the managed servers, the found network card configuration file is sent to the server.
[0070] If the cloud platform detects that there is no IP address conflict with the managed object server, it can directly send the found network interface card (NIC) configuration file to the object server so that the object server can restore itself according to the NIC configuration file.
[0071] If the cloud platform detects an IP address conflict with a managed object server, it needs to set the IP address in the network interface configuration file to empty, such as... Figure 4 As shown, the modified network card configuration file is then sent to the target server. In this way, when the target server restores the network card configuration, there will be no IP address conflict. Subsequently, the staff can configure the IP address or set it to obtain an IP address via DHCP.
[0072] By using the methods described above, the cloud platform can avoid IP address conflicts during the process of restoring the configuration of the object server, thereby further improving the reliability of server configuration recovery.
[0073] Optionally, after step S100, obtaining the server serial number announced by the access server, the PCIe bus number of the network card, and the network card configuration file, the method further includes:
[0074] S103. Authenticate the server based on the server serial number and the PCIe bus number of the network card.
[0075] As described above, login authentication can also be configured in the cloud platform. Upon receiving a login message from the target server, authentication is performed based on either the IP address or MAC address, along with the server serial number and the network card's PCIe bus number. For example, using the MAC address, staff can pre-set a whitelist on the cloud platform containing the MAC address, IP address, server serial number, and network card's PCIe bus number. If the received MAC address, IP address, server serial number, and network card's PCIe bus number match the whitelist, the cloud platform considers the target server authenticable and will then send the found network card configuration file to the target server. If the whitelist is not matched, the cloud platform will not send the network card configuration file to the target server.
[0076] Through the above authentication process, the cloud platform can avoid forging information about the target server to restore network card and other configurations, thus improving the security of configuration restoration on the cloud platform.
[0077] Optionally, step S101, sending the found network interface card (NIC) configuration file to the server so that the server can restore its own NIC configuration based on the found NIC configuration file, includes:
[0078] S101F: If, based on the obtained network card configuration file and the found network card configuration file, it is confirmed that the number of the first network ports of the network card to be replaced is not less than the number of the second network ports of the previous network card, then the network port number of the found network card configuration file and the number of the second network ports is sent to the server so that the server can restore the network card to the corresponding network port based on the configuration in the found network card configuration file.
[0079] S101G: If, based on the obtained network card configuration file and the found network card configuration file, it is confirmed that the number of the first network ports of the network card to be replaced is less than the number of the second network ports of the previous network card, the network card number of the found network card configuration file and the number of the second network ports is sent to the server so that the server can restore the network card to the port based on the configuration in the found network card configuration file.
[0080] Since the replacement network interface card (NIC) may differ in structure from the previous one—for example, the number of network ports may be different—not all network ports need to be restored to their previous configuration. In this case, the cloud platform can compare the new NIC configuration file with the stored NIC configuration file to confirm the change in the number of network ports. If the replacement NIC 2 has a large number of network ports, the cloud platform can include the network port numbers of the ports whose configuration needs to be restored when distributing the NIC configuration file, so that the NIC configuration is restored to the relevant department's network ports. If the replacement NIC 2 has a small number of network ports, the cloud platform can restore the NIC configuration according to the number of network ports in NIC 2.
[0081] Through the above recovery methods, the cloud platform can adjust the recovery configuration according to the number of network ports of the network card, thereby improving the flexibility of the server in recovering the network card.
[0082] Correspondingly, this application also provides a network card configuration recovery device, applied to a cloud platform, such as... Figure 5 As shown, it includes:
[0083] The acquisition unit is used to acquire the server serial number, network card PCIe bus number, and network card configuration file announced by the accessing server when the server starts up.
[0084] The recovery unit is used to send the found network card configuration file to the server if the corresponding network card configuration file is found based on the server serial number and the network card's PCIe bus number, so that the server can restore its own network card configuration based on the found network card configuration file.
[0085] The creation unit is used to store the network card configuration file and establish the correspondence between the server serial number, the network card's PCIe bus number, and the network card configuration file if the corresponding network card configuration file cannot be found based on the server serial number and the network card's PCIe bus number.
[0086] Optional, the recovery unit includes:
[0087] The replacement module is used to replace the name and device identifier in the currently stored network interface card (NIC) configuration file based on the name and device identifier obtained in the NIC configuration file, thereby forming a modified NIC configuration file.
[0088] The sending module is used to send the modified network interface card configuration file to the server.
[0089] Optional, the recovery unit includes:
[0090] The startup module is used to start Internet IP address conflict detection if the BOOTPROTO field in the found network card configuration file is configured as static.
[0091] The conflict detection module is used to: if an IP address conflict exists in the managed server, set the IP address in the found network interface card (NIC) configuration file to empty, form a modified NIC configuration file, and send the modified NIC configuration file to the server; if no IP address conflict exists in the managed server, send the found NIC configuration file to the server.
[0092] Optionally, the device may also include:
[0093] The authentication unit is used to authenticate the server based on the server serial number and the PCIe bus number of the network card.
[0094] Optionally, the recovery unit is specifically used to send the port numbers of the found network interface card (NIC) configuration file and the number of the second network ports to the server if, based on the obtained NIC configuration file and the found NIC configuration file, it is confirmed that the number of the first network ports of the replaced NIC is not less than the number of the second network ports of the previous NIC, so that the server can restore the NIC to the corresponding network port based on the configuration in the found NIC configuration file; if, based on the obtained NIC configuration file and the found NIC configuration file, it is confirmed that the number of the first network ports of the replaced NIC is less than the number of the second network ports of the previous NIC, it sends the port numbers of the found NIC configuration file and the number of the second network ports to the server so that the server can restore the NIC to the port based on the configuration in the found NIC configuration file.
[0095] Correspondingly, this application also provides a server for use on a cloud platform, such as... Figure 6 As shown, it includes a transceiver, a processor, and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, which in turn causes the processor to implement the method steps of any of the above.
[0096] Correspondingly, this application also provides a machine-readable storage medium storing machine-executable instructions, which, when called and executed by a processor, cause the processor to implement the method steps of any of the above.
[0097] In the embodiments described in this specification, in the cloud platform, the network card configuration file is restored to the replaced network card by binding the server serial number and PCIe bus number, thereby avoiding the problem of not being able to restore the network card configuration after replacing the network card, and improving the server operation and maintenance efficiency.
[0098] It should be understood that this specification is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope.
[0099] The above description is merely a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification shall be included within the scope of protection of this specification.
Claims
1. A method for restoring network card configuration, characterized in that, Applied to cloud platforms, including: When the server starts up, obtain the server serial number announced by the connected server, the PCIe bus number of the network card, and the network card configuration file; If the corresponding network card configuration file is found based on the server serial number and the network card's PCIe bus number, the found network card configuration file is sent to the server so that the server can restore its own network card configuration based on the found network card configuration file. If no corresponding network card configuration file is found based on the server serial number and the network card's PCIe bus number, then the network card configuration file is stored, and a correspondence is established between the server serial number, the network card's PCIe bus number, and the network card configuration file.
2. The method according to claim 1, characterized in that, Sending the found network interface card configuration file to the server includes: Based on the name and device identifier in the obtained network interface card (NIC) configuration file, replace the name and device identifier in the currently stored NIC configuration file to form a modified NIC configuration file; Send the modified network interface card configuration file to the server.
3. The method according to claim 1, characterized in that, Sending the found network interface card configuration file to the server includes: If the BOOTPROTO field in the found network interface configuration file is configured as static, then Internet Protocol (IP) address conflict detection will be started. If there is an IP address conflict in the managed server, the IP address in the found network interface card (NIC) configuration file will be set to empty to form a modified NIC configuration file, and the modified NIC configuration file will be sent to the server. If there are no IP address conflicts among the managed servers, the found network interface card configuration file is sent to the server.
4. The method according to claim 1, characterized in that, After obtaining the server serial number, PCIe bus number of the network card, and network card configuration file announced by the access server, the following is also included: The server is authenticated based on its serial number and the PCIe bus number of the network card.
5. The method according to claim 1, characterized in that, Sending the found network interface card (NIC) configuration file to the server so that the server can restore its own NIC configuration based on the found NIC configuration file includes: If the number of first network ports of the network card to be replaced is not less than the number of second network ports of the previous network card, based on the obtained network card configuration file and the found network card configuration file, the network port number of the found network card configuration file and the number of second network ports is sent to the server so that the server can restore the network card to the corresponding network port based on the configuration in the found network card configuration file. If, based on the obtained network interface card (NIC) configuration file and the found NIC configuration file, it is confirmed that the number of the first network ports of the replacement NIC is less than the number of the second network ports of the previous NIC, the NIC configuration file and the number of the second network ports are sent to the server so that the server can restore the NIC to the correct port based on the configuration in the found NIC configuration file.
6. A network card configuration recovery device, characterized in that, Applied to cloud platforms, including: The acquisition unit is used to acquire the server serial number, network card PCIe bus number, and network card configuration file announced by the accessing server when the server starts up. The recovery unit is used to send the found network card configuration file to the server if a corresponding network card configuration file is found based on the server serial number and the network card's PCIe bus number, so that the server can restore its own network card configuration based on the found network card configuration file. A creation unit is used to store the network card configuration file and establish a correspondence between the server serial number, the network card's PCIe bus number, and the network card configuration file if no corresponding network card configuration file is found based on the server serial number and the network card's PCIe bus number.
7. The apparatus according to claim 6, characterized in that, The recovery unit includes: The replacement module is used to replace the name and device identifier in the currently stored network interface card (NIC) configuration file based on the name and device identifier obtained in the NIC configuration file, thereby forming a modified NIC configuration file. The sending module is used to send the modified network interface card configuration file to the server.
8. The apparatus according to claim 6, characterized in that, The recovery unit includes: The startup module is used to start Internet IP address conflict detection if the BOOTPROTO field in the found network card configuration file is configured as static. The conflict detection module is used to: if an IP address conflict exists in the managed server, set the IP address in the found network interface card (NIC) configuration file to empty, form a modified NIC configuration file, and send the modified NIC configuration file to the server; if no IP address conflict exists in the managed server, send the found NIC configuration file to the server.
9. The apparatus according to claim 6, characterized in that, Also includes: The authentication unit is used to authenticate the server based on the server serial number and the PCIe bus number of the network card.
10. The apparatus according to claim 6, characterized in that, The recovery unit is specifically used to send the network port numbers of the found network interface card configuration file and the number of the second network ports to the server if it is confirmed that the number of the first network ports of the network interface card to be replaced is not less than the number of the second network ports of the previous network interface card, based on the obtained network interface card configuration file and the found network interface card configuration file, so that the server can restore the network interface card to the corresponding network port based on the configuration in the found network interface card configuration file. If, based on the obtained network interface card (NIC) configuration file and the found NIC configuration file, it is confirmed that the number of the first network ports of the replacement NIC is less than the number of the second network ports of the previous NIC, the NIC configuration file and the number of the second network ports are sent to the server so that the server can restore the NIC to the correct port based on the configuration in the found NIC configuration file.
11. A server, characterized in that, The invention is applied to a cloud platform and includes a transceiver, a processor, and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, the processor being prompted by the machine-executable instructions to perform the steps of the method according to any one of claims 1-5.
12. A machine-readable storage medium, characterized in that, The device stores machine-executable instructions that, when invoked and executed by a processor, cause the processor to perform the steps of the method described in any one of claims 1-5.