A server network port configuration method, device, server and readable storage medium

By judging the virtual LAN ID and configuration information in the ARM architecture server, only the shared network port is configured when it exists. Otherwise, switch to the shared network configuration, the communication blocking problem caused by the virtual LAN configuration error is solved, ensuring smooth server communication and improving Management efficiency.

CN113839815BActive Publication Date: 2024-11-01LANGCHAO ELECTRONIC INFORMATION IND CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111111033.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-18
Publication Date
2024-11-01
Estimated Expiration
2041-09-18

AI Technical Summary

Technical Problem

During the LAN failover process of ARM architecture servers, virtual LAN configuration errors cause the server to be unable to communicate with the external network, causing debugging and management problems to server managers.

Method used

When a failover mode is detected, determine whether the virtual LAN ID and corresponding configuration information are configured. If it exists, configure a shared network port. Otherwise, close the failover mode, obtain the shared network configuration information and configure the shared network port to ensure smooth communication .

Benefits of technology

It effectively avoids communication blocking problems caused by failure of virtual LAN configuration, ensures that the server can still communicate with the external network through the shared network port when the virtual LAN configuration fails, and improves the efficiency of server management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113839815B_ABST
    Figure CN113839815B_ABST
Patent Text Reader

Abstract

The present invention provides a server network port configuration method, device, server and medium. The method comprises: when it is detected that a failover mode is started, judging whether a virtual local area network ID is configured; if a virtual local area network ID is configured, judging whether corresponding virtual local area network configuration information can be obtained by using the virtual local area network ID; if the virtual local area network configuration information can be obtained, configuring a shared network port by using the virtual local area network configuration information; if the virtual local area network ID is not configured or the virtual local area network configuration information cannot be obtained, closing the failover mode, obtaining shared network configuration information, and configuring a shared network port by using the shared network configuration information; the present invention configures a virtual local area network for a shared network port only when both the virtual local area network ID and the corresponding configuration information are present, and configures a shared network for the shared network port when the information is missing, thereby ensuring smooth communication of the server shared network port, thereby avoiding the communication blocking problem caused by the failure of virtual local area network configuration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of servers, and in particular to a server network port configuration method, device, server and computer-readable storage medium. Background Art

[0002] During the LAN failover process of ARM architecture servers, the BMC software (Baseboard Manager Controller) usually needs to configure the shared network port for a virtual LAN before the subsequent operations of the LAN failover can be performed. However, the virtual LAN may be misconfigured, and the server will be unable to communicate with the external network through the shared network port, which will cause trouble for the debugging and management work of the server administrators. Summary of the invention

[0003] The purpose of the present invention is to provide a server network port configuration method, device, server and computer-readable storage medium, which can configure a virtual local area network for a shared network port only when the virtual local area network ID and the corresponding configuration information are available, and configure a shared network for the shared network port when the information is missing, thereby ensuring smooth communication of the server shared network port and avoiding communication blocking problems caused by virtual local area network configuration failure.

[0004] In order to solve the above technical problems, the present invention provides a server network port configuration method, comprising:

[0005] When it is detected that the failover mode is activated, determining whether a virtual local area network ID is configured;

[0006] If the virtual local area network ID is configured, determining whether the corresponding virtual local area network configuration information can be obtained using the virtual local area network ID;

[0007] If the virtual local area network configuration information can be obtained, the shared network port is configured using the virtual local area network configuration information;

[0008] If the virtual local area network ID is not configured or the virtual local area network configuration information cannot be obtained, the failover mode is turned off, the shared network configuration information is obtained, and the shared network port is configured using the shared network configuration information.

[0009] Optionally, after detecting that the failover mode is started, the method further includes:

[0010] Determine whether the hardware working status of the shared network port can be obtained;

[0011] If yes, then executing the step of determining whether a virtual local area network ID is configured;

[0012] If not, the preset prompt message is output.

[0013] Optionally, the determining whether the hardware working status of the shared network port can be obtained includes:

[0014] Determine whether the hardware working status of the shared network port can be obtained within a preset time period.

[0015] Optionally, the determining whether corresponding virtual local area network configuration information can be obtained by using the virtual local area network ID includes:

[0016] Generate a configuration request using the virtual local area network ID, and broadcast the configuration request;

[0017] Receiving a data packet, and determining whether the data packet contains the virtual local area network configuration information;

[0018] If yes, determining that the virtual local area network configuration information can be obtained;

[0019] If not, it is determined that the virtual local area network configuration information cannot be obtained, and a preset prompt message is output.

[0020] Optionally, before determining that the virtual local area network configuration information cannot be obtained and outputting preset prompt information, the method further includes:

[0021] Marking a data packet that does not contain the virtual local area network configuration information as an abnormal data packet;

[0022] Determine whether the number of abnormal data packets reaches a preset threshold;

[0023] If yes, executing the step of determining that the virtual local area network configuration information cannot be obtained and outputting a preset prompt message;

[0024] If not, the step of receiving the data packet and determining whether the data packet includes the virtual local area network configuration information is executed.

[0025] The present invention also provides a server network port configuration device, comprising:

[0026] A first determination module, configured to determine whether a virtual local area network ID is configured when detecting that the failover mode is started;

[0027] A second judgment module is used to judge whether the corresponding virtual local area network configuration information can be obtained by using the virtual local area network ID if the virtual local area network ID is configured;

[0028] A first configuration module, configured to configure a shared network port using the virtual local area network configuration information if the virtual local area network configuration information can be obtained;

[0029] The second configuration module is used to disable the failover mode if the virtual local area network ID is not configured or the virtual local area network configuration information cannot be obtained, obtain the shared network configuration information, and configure the shared network port using the shared network configuration information.

[0030] Optionally, the first determination module includes:

[0031] A working status judgment submodule is used to judge whether the hardware working status of the shared network port can be obtained;

[0032] An information configuration judgment submodule, for, if yes, executing the step of judging whether a virtual local area network ID is configured;

[0033] The prompt submodule is used to output a preset prompt message if no.

[0034] Optionally, the working status judgment submodule includes:

[0035] The working status judgment unit is used to judge whether the hardware working status of the shared network port can be obtained within a preset time period.

[0036] The present invention also provides a server, comprising:

[0037] Memory for storing computer programs;

[0038] The processor is used to implement the server network port configuration method as described above when executing the computer program.

[0039] The present invention also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are loaded and executed by a processor, the server network port configuration method as described above is implemented.

[0040] The present invention provides a server network port configuration method, comprising: when detecting that a failover mode is started, judging whether a virtual local area network ID is configured; if the virtual local area network ID is configured, judging whether corresponding virtual local area network configuration information can be obtained by using the virtual local area network ID; if the virtual local area network configuration information can be obtained, configuring a shared network port by using the virtual local area network configuration information; if the virtual local area network ID is not configured or the virtual local area network configuration information cannot be obtained, closing the failover mode, obtaining shared network configuration information, and configuring the shared network port by using the shared network configuration information.

[0041] It can be seen that when the present invention detects that the failover mode is activated, it will detect in sequence whether a virtual LAN ID is configured and whether the corresponding virtual LAN configuration information can be obtained through the virtual LAN ID. Only when the virtual LAN ID and the virtual LAN configuration information are both present, the shared network port is configured accordingly, which can effectively avoid the configuration failure problem caused by the lack of the virtual LAN ID or the virtual LAN configuration information; in addition, in the absence of the virtual LAN ID or the virtual LAN configuration information, the server network port configuration device will automatically turn off the failover mode and use the shared network configuration information to configure the shared network port with a shared network. In other words, when the virtual LAN fails to configure, the present invention will configure a common shared network environment for the shared network port to ensure that the virtual LAN can still communicate with the external network through the shared network port when the virtual LAN configuration fails, avoiding the server communication blocking problem caused by the virtual LAN configuration failure in the related technology, and improving the efficiency of the server administrator in debugging and managing the server. The present invention also provides a server network port configuration method, device, server and computer-readable storage medium, which have the above-mentioned beneficial effects. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0043] Figure 1 A flow chart of a server network port configuration method provided by an embodiment of the present invention;

[0044] Figure 2 A flowchart of another server network port configuration method provided by an embodiment of the present invention;

[0045] Figure 3 This is a structural block diagram of a server network port configuration device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0046] 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0047] During the LAN failover process of an ARM architecture server, the BMC software (Baseboard Manager Controller) usually needs to configure the shared network port for a virtual LAN before subsequent operations of the LAN failover can be performed. However, the virtual LAN may be misconfigured. In this case, the server will not be able to communicate with the external network through the shared network port, and the server administrator will not be able to control the server through the shared network port, which will cause trouble for the debugging and management work of the server administrator. In view of this, the present invention provides a server network port configuration method, which can configure the virtual LAN for the shared network port only when the virtual LAN ID and the corresponding configuration information are available, and will configure the shared network for the shared network port when the information is missing, thereby ensuring smooth communication of the server shared network port and avoiding communication blocking problems caused by virtual LAN configuration failure. Please refer to Figure 1 , Figure 1 A flow chart of a server network port configuration method provided by an embodiment of the present invention, the method may include:

[0048] S101. When it is detected that the failover mode is activated, determine whether a virtual LAN ID is configured; if so, proceed to step S102; if not, proceed to step S103.

[0049] A virtual local area network (VLAN) is a group of devices logically in the same network, and a virtual local area network ID (VLAN ID) is configuration information in a virtual local area network. In order to specify a specific virtual local area network, a server usually sets a virtual local area network ID to specify and obtain configuration information in the specific virtual local area network. Therefore, the virtual local area network ID is important information in the virtual local area network configuration. It is understandable that whether a virtual local area network ID is set in a server can be determined by reading the network configuration.

[0050] Furthermore, it should be noted that the embodiments of the present invention do not limit how to detect whether the failover mode is activated. For example, a special event can be set for the activation of the failover mode, and whether the failover mode is activated can be determined by monitoring whether the event is triggered. Alternatively, other startup detection methods can be set according to actual application requirements.

[0051] Further, it should be noted that the embodiment of the present invention does not limit whether it is necessary to determine whether the shared network port is working before determining whether the virtual LAN ID is configured. When the switching of the shared network port does not require hardware line switching, it is not necessary to determine the working state of the shared network port; when the switching of the shared network port needs to be effective after the hardware line switching, the working state of the shared network port can also be determined first. In the embodiment of the present invention, considering that when the server of the ARM architecture (AdvancedRISC Machine, Advanced Reduced Instruction Set Machine) switches the network port, for example, when switching from a dedicated network port to a shared network port, it is usually necessary to perform a hardware line switching to take effect, so before determining whether the virtual LAN ID is configured, the working state of the network port can be determined first, and the subsequent operation can be performed when it is determined that the network port is working normally, thereby avoiding the virtual LAN configuration error caused by the hardware not being configured. It can be understood that the shared network port can be determined by obtaining the working state of the network port hardware, and it can also be immediately. If the above hardware working state can be obtained, it means that the hardware line switching is successful and the subsequent operation can be performed.

[0052] In a possible case, after detecting that the failover mode is started, the following steps may also be included:

[0053] Step 11: Determine whether the hardware working status of the shared network port can be obtained; if so, proceed to step 12; if not, proceed to step 13;

[0054] Step 12: Execute the step of determining whether a virtual local area network ID is configured;

[0055] Step 13: Output the preset prompt information.

[0056] It should be noted that the embodiments of the present invention do not limit the specific content of the preset prompt information, which can be adjusted according to actual application requirements. The embodiments of the present invention do not limit the output form, for example, the output can be performed through screen display or buzzer alarm.

[0057] Of course, considering that the hardware working status requires a period of time to read and transmit, a preset time period can also be set. If the server can obtain the hardware working status of the shared network port within the preset time period, it means that the shared network port is working normally, otherwise it means that the shared network port cannot work normally. It should be noted that the embodiment of the present invention does not limit the specific value of the preset time period, and it can be set according to actual application requirements.

[0058] In one possible situation, determining whether the hardware working status of the shared network port can be obtained may include:

[0059] Step 21: Determine whether the hardware working status of the shared network port can be obtained within a preset time period.

[0060] S102: If a virtual local area network ID is configured, determine whether the corresponding virtual local area network configuration information can be obtained using the virtual local area network ID.

[0061] After determining that the server is configured with a virtual LAN ID, the ID can be used to obtain the virtual LAN configuration information corresponding to the specific virtual LAN. It should be noted that the embodiment of the present invention does not limit the specific process of obtaining the virtual LAN configuration information. Reference can be made to the relevant technology of DHCP, where DHCP (Dynamic Host Configuration Protocol) is a network protocol for a local area network, which refers to a range of IP addresses controlled by a DHCP server. When the client logs in, it can automatically obtain the IP address and subnet mask assigned by the DCHP server. It can be understood that in order to obtain the virtual LAN configuration information corresponding to the specified virtual LAN ID, it is necessary to use the ID and the DHCP protocol to generate a corresponding configuration request, and broadcast the configuration request, so as to obtain the virtual LAN configuration information issued by the DHCP server.

[0062] In one case, determining whether corresponding virtual local area network configuration information can be obtained using the virtual local area network ID may include:

[0063] Step 31: Generate a configuration request using the virtual local area network ID, and broadcast the configuration request;

[0064] Step 32: Receive a data packet and determine whether the data packet contains virtual LAN configuration information; if so, proceed to step 33; if not, proceed to step 34;

[0065] Step 33: Determine whether the virtual local area network configuration information can be obtained;

[0066] Step 34: Determine that the virtual local area network configuration information cannot be obtained, and output a preset prompt message.

[0067] It should be noted that the embodiments of the present invention do not limit the specific form of the configuration request, and reference may be made to the relevant technologies of DHCP and virtual LAN; the embodiments of the present invention do not limit the specific method of parsing data packets, and reference may be made to the relevant technologies of network message parsing; the embodiments of the present invention do not limit the specific method of determining whether a data packet contains virtual LAN configuration information, and reference may also be made to the relevant technologies of DHCP; the embodiments of the present invention do not limit the specific content and output method of the preset prompt information, and the description of the specific content and output method of the preset prompt information is consistent with the above description of the preset prompt information output when it is determined that the shared network port is not working, and reference may be made to the above embodiments.

[0068] Further, the embodiment of the present invention does not limit the execution method of judging whether a data packet contains virtual local area network configuration information. For example, the above operation can be performed on the first data packet received, and of course, the above operation can also be performed by polling the multiple data packets; when the data packet broadcast in the virtual local area network is relatively single, it can be ensured that the first data packet received can contain the virtual local area network configuration information, and the above operation can be performed on the first data packet received; when there are many data packets broadcast in the virtual local area network, multiple received data packets can also be polled for judgment. In the embodiment of the present invention, considering that multiple types of data packets may be broadcast simultaneously in the virtual local area network, the above judgment operation can be performed by polling multiple data packets. Further, the received data packets that do not contain the virtual local area network configuration information can be counted, and when it is determined that such data packets are greater than the preset threshold, it is determined that the virtual local area network configuration information cannot be obtained. It should be noted that the embodiment of the present invention does not limit the specific value of the preset threshold, and it can be set according to actual application requirements.

[0069] In a possible case, before determining that the virtual local area network configuration information cannot be obtained and outputting the preset prompt information, the following may also be included:

[0070] Step 41: Mark the data packet that does not contain the virtual local area network configuration information as an abnormal data packet;

[0071] Step 42: Determine whether the number of abnormal data packets reaches a preset threshold; if so, proceed to step 43; if not, proceed to step 44;

[0072] Step 43: Execute the step of determining that the virtual local area network configuration information cannot be obtained, and outputting a preset prompt message;

[0073] Step 44: Execute the step of receiving a data packet and determining whether the data packet contains virtual LAN configuration information.

[0074] S103: If the virtual local area network configuration information can be obtained, the shared network port is configured using the virtual local area network configuration information.

[0075] It should be noted that the embodiments of the present invention do not limit the specific virtual LAN configuration information, for example, it may be information of IP address, subnet mask, and default gateway, which can be selected according to actual application requirements; the embodiments of the present invention do not limit how to configure the virtual LAN configuration information, and reference may be made to relevant technologies for network device configuration.

[0076] S104: If the virtual local area network ID is not configured or the virtual local area network configuration information cannot be obtained, the failover mode is turned off, the shared network configuration information is obtained, and the shared network port is configured using the shared network configuration information.

[0077] When any of the virtual LAN ID and the virtual LAN configuration information cannot be obtained, it means that the virtual LAN will have a configuration error. For example, if the virtual LAN ID is missing, the configuration information of the corresponding virtual LAN cannot be obtained. For example, if the DHCP server in the virtual LAN is not started, the virtual LAN configuration information cannot be automatically obtained. At this time, in the embodiment of the present invention, the failover mode will be automatically turned off, and then the shared network port will be configured using the configuration information of the ordinary shared network to ensure that when the virtual LAN configuration fails, the server can still communicate with the outside world through the shared network port.

[0078] It should be noted that the embodiments of the present invention do not limit how to obtain the shared network configuration information. For example, the information can be temporarily stored before configuring the virtual local area network, and the information can be read when it is determined that the virtual local area network configuration fails. Of course, it can also be obtained through a DHCP server in the shared network, which can be set according to actual application requirements. The embodiments of the present invention also do not limit the specific information in the shared network configuration information. The limited description is consistent with the limited description of the virtual local area network configuration information, and will not be repeated here.

[0079] Based on the above embodiments, when the present invention detects that the failover mode is started, it will sequentially detect whether a virtual LAN ID is configured and whether the corresponding virtual LAN configuration information can be obtained through the virtual LAN ID. Only when the virtual LAN ID and the virtual LAN configuration information are both present, the shared network port will be configured accordingly, which can effectively avoid the configuration failure problem caused by the lack of the virtual LAN ID or the virtual LAN configuration information; in addition, in the absence of the virtual LAN ID or the virtual LAN configuration information, the server network port configuration device will automatically turn off the failover mode and use the shared network configuration information to configure a shared network for the shared network port. In other words, when there is a configuration failure in the virtual LAN, the present invention will configure a normal shared network environment for the shared network port to ensure that the virtual LAN can still communicate with the external network through the shared network port when the virtual LAN configuration fails, avoiding the server communication congestion problem caused by the virtual LAN configuration failure in the related technology, and can improve the efficiency of server administrators in debugging and managing servers.

[0080] The following is a detailed flow chart to describe the server network port configuration method. Figure 2 , Figure 2 A flowchart of another server network port configuration method provided by an embodiment of the present invention may include:

[0081] 1. When it is detected that the failover mode is activated, determine whether the hardware working status of the shared network port can be obtained within the preset time period; if so, proceed to step 2; if not, output hardware abnormality prompt information and proceed to step 1;

[0082] 2. Determine whether a virtual LAN ID is configured. If so, proceed to step 4. If not, proceed to step 3.

[0083] 3. Output the prompt message of no configuration environment and go to step 6;

[0084] 4. Generate a configuration request using the virtual LAN ID and broadcast the configuration request;

[0085] 5. Receive a data packet and determine whether the data packet contains virtual LAN configuration information; if so, proceed to step 7; if not, proceed to step 8;

[0086] 7. Use the virtual LAN configuration information to configure the shared network port;

[0087] 8. Mark the data packets that do not contain the virtual LAN configuration information as abnormal data packets, and determine whether the number of abnormal data packets reaches a preset threshold; if so, proceed to step 3, if not; proceed to step 4;

[0088] 10. Turn off the failover mode, obtain the shared network configuration information, and use the shared network configuration information to configure the shared network port.

[0089] The following is an introduction to the server network port configuration device, server and computer-readable storage medium provided in an embodiment of the present invention. The server network port configuration device, server and computer-readable storage medium described below can correspond to the server network port configuration method described above.

[0090] Please refer to Figure 3 , Figure 3 A structural block diagram of a server network port configuration device provided by an embodiment of the present invention, the device comprising:

[0091] The first determination module 301 is used to determine whether a virtual local area network ID is configured when it is detected that the failover mode is started;

[0092] The second determination module 302 is used to determine whether the corresponding virtual local area network configuration information can be obtained by using the virtual local area network ID if the virtual local area network ID is configured;

[0093] The first configuration module 303 is used to configure the shared network port using the virtual local area network configuration information if the virtual local area network configuration information can be obtained;

[0094] The second configuration module 304 is used to disable the failover mode if the virtual LAN ID is not configured or the virtual LAN configuration information cannot be obtained, obtain the shared network configuration information, and configure the shared network port using the shared network configuration information.

[0095] Optionally, the first determining module 301 may include:

[0096] The working status judgment submodule is used to judge whether the hardware working status of the shared network port can be obtained;

[0097] An information configuration judgment submodule, for, if yes, executing the step of judging whether a virtual local area network ID is configured;

[0098] The prompt submodule is used to output a preset prompt message if no.

[0099] Optionally, the working status judgment submodule may include:

[0100] The working status judgment unit is used to judge whether the hardware working status of the shared network port can be obtained within a preset time period.

[0101] Optionally, the second determination module 302 includes:

[0102] A broadcast submodule, used to generate a configuration request using the virtual local area network ID and broadcast the configuration request;

[0103] The configuration information confirmation submodule is used to receive a data packet and determine whether the data packet contains virtual local area network configuration information;

[0104] A first determination submodule, configured to determine whether the virtual local area network configuration information can be obtained if yes;

[0105] The second determination submodule is used to determine that the virtual local area network configuration information cannot be obtained and output a preset prompt message if no.

[0106] Optionally, the second determination submodule further includes:

[0107] A marking unit, used for marking a data packet that does not contain the virtual local area network configuration information as an abnormal data packet;

[0108] A quantity determination unit, used to determine whether the number of abnormal data packets reaches a preset threshold;

[0109] A first determination unit, configured to, if yes, execute the step of determining that the virtual local area network configuration information cannot be obtained, and output a preset prompt message;

[0110] The second determination unit is used to, if not, execute the step of receiving a data packet and determining whether the data packet contains the virtual local area network configuration information.

[0111] An embodiment of the present invention further provides a server, including:

[0112] Memory for storing computer programs;

[0113] The processor is used to implement the steps of the server network port configuration method as described above when executing a computer program.

[0114] Since the embodiments of the server part correspond to the embodiments of the server network port configuration method part, please refer to the description of the embodiments of the server network port configuration method part for the embodiments of the server part, which will not be repeated here.

[0115] An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the server network port configuration method of any of the above embodiments are implemented.

[0116] Since the embodiments of the computer-readable storage medium part correspond to the embodiments of the server network port configuration method part, the embodiments of the computer-readable storage medium part refer to the description of the embodiments of the server network port configuration method part, which will not be repeated here.

[0117] The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0118] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0119] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0120] The above is a detailed introduction to a server network port configuration method, device, server and computer-readable storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. A server network port configuration method, characterized in that: include: When it is detected that the failover mode is activated, determining whether the server is configured with a virtual local area network ID; If the virtual local area network ID is configured, determining whether the corresponding virtual local area network configuration information can be obtained using the virtual local area network ID; If the virtual local area network configuration information can be obtained, the shared network port is configured using the virtual local area network configuration information; If the virtual local area network ID is not configured or the virtual local area network configuration information cannot be obtained, the failover mode is turned off, the shared network configuration information is obtained, and the shared network port is configured using the shared network configuration information.

2. The server network port configuration method according to claim 1, characterized in that: After detecting that the failover mode is activated, it also includes: Determine whether the hardware working status of the shared network port can be obtained; If yes, then executing the step of determining whether a virtual local area network ID is configured; If not, the preset prompt message is output.

3. The server network port configuration method according to claim 2, characterized in that: The determining whether the hardware working status of the shared network port can be obtained includes: Determine whether the hardware working status of the shared network port can be obtained within a preset time period.

4. The server network port configuration method according to claim 1, characterized in that: The determining whether the corresponding virtual local area network configuration information can be obtained by using the virtual local area network ID includes: Generate a configuration request using the virtual local area network ID, and broadcast the configuration request; Receiving a data packet, and determining whether the data packet contains the virtual local area network configuration information; If yes, determining that the virtual local area network configuration information can be obtained; If not, it is determined that the virtual local area network configuration information cannot be obtained, and a preset prompt message is output.

5. The server network port configuration method according to claim 4, characterized in that: Before determining that the virtual local area network configuration information cannot be obtained and outputting the preset prompt information, the method further includes: Marking a data packet that does not contain the virtual local area network configuration information as an abnormal data packet; Determine whether the number of abnormal data packets reaches a preset threshold; If yes, executing the step of determining that the virtual local area network configuration information cannot be obtained and outputting a preset prompt message; If not, the step of receiving the data packet and determining whether the data packet includes the virtual local area network configuration information is executed.

6. A server network port configuration device, characterized in that: include: A first determination module, configured to determine whether the server is configured with a virtual local area network ID when detecting that the failover mode is started; A second judgment module is used to judge whether the corresponding virtual local area network configuration information can be obtained by using the virtual local area network ID if the virtual local area network ID is configured; A first configuration module, configured to configure a shared network port using the virtual local area network configuration information if the virtual local area network configuration information can be obtained; The second configuration module is used to disable the failover mode if the virtual local area network ID is not configured or the virtual local area network configuration information cannot be obtained, obtain the shared network configuration information, and configure the shared network port using the shared network configuration information.

7. The server network port configuration device according to claim 6, characterized in that: The first judgment module includes: A working status judgment submodule is used to judge whether the hardware working status of the shared network port can be obtained; An information configuration judgment submodule, for, if yes, executing the step of judging whether a virtual local area network ID is configured; The prompt submodule is used to output a preset prompt message if no.

8. The server network port configuration device according to claim 7, characterized in that: The working status judgment submodule includes: The working status judgment unit is used to judge whether the hardware working status of the shared network port can be obtained within a preset time period.

9. A server, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the server network port configuration method as described in any one of claims 1 to 5 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are loaded and executed by the processor, the server network port configuration method according to any one of claims 1 to 5 is implemented.