CN113839815A - Server network port configuration method and device, server and readable storage medium - Google Patents

Server network port configuration method and device, server and readable storage medium Download PDF

Info

Publication number
CN113839815A
CN113839815A CN202111111033.XA CN202111111033A CN113839815A CN 113839815 A CN113839815 A CN 113839815A CN 202111111033 A CN202111111033 A CN 202111111033A CN 113839815 A CN113839815 A CN 113839815A
Authority
CN
China
Prior art keywords
local area
area network
virtual local
configuration information
acquired
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111111033.XA
Other languages
Chinese (zh)
Inventor
张国奇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Electronic Information Industry Co Ltd
Original Assignee
Inspur Electronic Information Industry Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Inspur Electronic Information Industry Co Ltd filed Critical Inspur Electronic Information Industry Co Ltd
Priority to CN202111111033.XA priority Critical patent/CN113839815A/en
Publication of CN113839815A publication Critical patent/CN113839815A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0663Performing the actions predefined by failover planning, e.g. switching to standby network elements

Abstract

The invention provides a method, a device, a server and a medium for configuring a server network port, wherein the method comprises the following steps: when detecting that the fault transfer mode is started, judging whether a virtual local area network (ID) is configured; if the virtual local area network ID is configured, judging whether the corresponding virtual local area network configuration information can be acquired by using the virtual local area network ID; if the configuration information of the virtual local area network can be obtained, configuring a shared network port by using the configuration information of the virtual local area network; if the virtual local area network ID is not configured or the virtual local area network configuration information cannot be acquired, closing the fault transfer mode, acquiring shared network configuration information, and configuring a shared network port by using the shared network configuration information; the invention configures the virtual local area network for the sharing network port only when the virtual local area network ID and the corresponding configuration information are both available, and configures the sharing network for the sharing network port when the information is lost, thereby ensuring the smooth communication of the sharing network port of the server and further avoiding the problem of communication blocking caused by the failure of the configuration of the virtual local area network.

Description

Server network port configuration method and device, server and readable storage medium
Technical Field
The present invention relates to the field of servers, and in particular, to a method and an apparatus for configuring a server portal, a server, and a computer-readable storage medium.
Background
In the process of performing lan failover on the ARM-based server, the BMC software (Baseboard management Controller) usually needs to perform virtual lan configuration on the shared network port before performing subsequent lan failover operations. However, the virtual lan may be configured incorrectly, and the server cannot communicate with the external network through the shared port, which causes trouble to the debugging and management of the server administrator.
Disclosure of Invention
The invention aims to provide a server network port configuration method, a device, a server and a computer readable storage medium, which can configure a virtual local area network for a shared network port only when a virtual local area network ID and corresponding configuration information are available, and configure the shared network for the shared network port when the information is lost, so that the smooth communication of the server shared network port can be ensured, and the problem of communication blocking caused by the failure of virtual local area network configuration is further avoided.
In order to solve the above technical problem, the present invention provides a server network port configuration method, including:
when detecting that the fault transfer mode is started, judging whether a virtual local area network (ID) is configured;
if the virtual local area network ID is configured, judging whether the corresponding virtual local area network configuration information can be acquired by using the virtual local area network ID;
if the configuration information of the virtual local area network can be acquired, configuring a shared network port by using the configuration information of the virtual local area network;
if the virtual local area network ID is not configured or the virtual local area network configuration information cannot be acquired, the fault transfer mode is closed, shared network configuration information is acquired, and the shared network port is configured by using the shared network configuration information.
Optionally, after detecting that the failover mode is started, the method further includes:
judging whether the hardware working state of the shared network port can be acquired or not;
if yes, executing the step of judging whether a virtual local area network (ID) is configured;
if not, outputting preset prompt information.
Optionally, the determining whether the hardware operating state of the shared internet port can be obtained includes:
and judging whether the hardware working state of the shared network port can be acquired within a preset time period.
Optionally, the determining whether the corresponding virtual local area network configuration information can be acquired by using the virtual local area network ID includes:
generating a configuration request by using the virtual local area network ID, and broadcasting the configuration request;
receiving a data packet and judging whether the data packet contains the virtual local area network configuration information or not;
if yes, judging that the configuration information of the virtual local area network can be acquired;
if not, judging that the configuration information of the virtual local area network cannot be acquired, and outputting preset prompt information.
Optionally, before determining that the virtual local area network configuration information cannot be acquired and outputting preset prompting information, the method further includes:
marking the data packet which does not contain the virtual local area network configuration information as an abnormal data packet;
judging whether the number of the abnormal data packets reaches a preset threshold value or not;
if yes, executing the step of judging that the configuration information of the virtual local area network cannot be acquired and outputting preset prompt information;
if not, executing the received data packet, and judging whether the data packet contains the virtual local area network configuration information.
The invention also provides a server network port configuration device, which comprises:
the first judgment module is used for judging whether a virtual local area network (ID) is configured or not when the fault transfer mode is detected to be started;
the second judgment module is used for judging whether the corresponding virtual local area network configuration information can be acquired by utilizing 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 by using the virtual local area network configuration information if the virtual local area network configuration information can be obtained;
and the second configuration module is used for closing the fault transfer mode, acquiring shared network configuration information and configuring the shared network port by using the shared network configuration information if the virtual local area network ID is not configured or the virtual local area network configuration information cannot be acquired.
Optionally, the first determining module includes:
the working state judgment submodule is used for judging whether the hardware working state of the shared network port can be acquired or not;
an information configuration judgment submodule, configured to, if yes, execute the step of judging whether a virtual local area network ID is configured;
and the prompting submodule is used for outputting preset prompting information if the current time is not less than the preset time.
Optionally, the working state determining sub-module includes:
and the working state judging unit is used for judging whether the hardware working state of the shared network port can be acquired within a preset time period.
The present invention also provides a server comprising:
a memory for storing a computer program;
and the processor is used for realizing the server network port configuration method when executing the computer program.
The invention also provides a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are loaded and executed by a processor, the server network port configuration method is implemented.
The invention provides a server network port configuration method, which comprises the following steps: when detecting that the fault transfer mode is started, judging whether a virtual local area network (ID) is configured; if the virtual local area network ID is configured, judging whether the corresponding virtual local area network configuration information can be acquired by using the virtual local area network ID; if the configuration information of the virtual local area network can be acquired, configuring a shared network port by using the configuration information of the virtual local area network; if the virtual local area network ID is not configured or the virtual local area network configuration information cannot be acquired, the fault transfer mode is closed, shared network configuration information is acquired, and the shared network port is configured by using the shared network configuration information.
Therefore, when the fault transfer mode is detected to be started, whether the virtual local area network ID is configured or not is detected in sequence, whether the corresponding virtual local area network configuration information can be acquired through the virtual local area network ID or not is detected, and the shared network port is configured only under the condition that the virtual local area network ID and the virtual local area network configuration information both exist, so that the problem of configuration failure caused by the loss of the virtual local area network ID or the virtual local area network configuration information can be effectively avoided; in addition, under the condition of lacking virtual local area network ID or virtual local area network configuration information, the server port configuration device automatically closes a fault transfer mode, and configures a shared network for the shared port by using the shared network configuration information, in other words, when the virtual local area network fails to be configured, the shared port configuration device configures a common shared network environment for the shared port so as to ensure that the virtual local area network can still communicate to an external network through the shared port when the virtual local area network fails to be configured, thereby avoiding the problem of server communication blockage caused by the failure of the virtual local area network configuration in the related technology and improving the efficiency of debugging and managing the server by a server administrator. The invention also provides a server network port configuration method, a server network port configuration device, a server and a computer readable storage medium, and has the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a server portal configuration method according to an embodiment of the present invention;
fig. 2 is a flowchart of another server portal configuration method according to an embodiment of the present invention;
fig. 3 is a block diagram of a server portal configuration apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In the process of performing lan failover on the ARM-based server, the BMC software (Baseboard management Controller) usually needs to perform virtual lan configuration on the shared network port before performing subsequent lan failover operations. However, the virtual lan may be configured incorrectly, and at this time, the server cannot communicate with the external network through the shared internet access, and the server administrator cannot control the server through the shared internet access, which brings trouble to the debugging and management work of the server administrator. In view of the above, the present invention provides a method for configuring a server portal, which can configure a virtual local area network for a shared portal only when both a virtual local area network ID and corresponding configuration information are available, and configure a shared network for the shared portal when the information is missing, so as to ensure smooth communication of the server shared portal, thereby avoiding a communication blocking problem caused by a virtual local area network configuration failure. Referring to fig. 1, fig. 1 is a flowchart of a server portal configuration method according to an embodiment of the present invention, where the method includes:
s101, when the fault transfer mode is detected to be started, judging whether a virtual local area network (ID) is configured; if yes, go to step S102; if not, the process proceeds to step S103.
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 the VLAN. To specify a particular vlan, the server typically sets a vlan ID to specify the configuration information for the particular vlan, so that the vlan ID is important information in the vlan configuration. It is understood that whether the virtual local area network ID is set in the server may be determined by reading the network configuration.
Further, it should be noted that the embodiment of the present invention does not limit how to detect that the failover mode is started, for example, a special event may be set for starting the failover mode, and whether the failover mode is started is determined by monitoring whether the event is triggered, or another start detection mode may be set, and the setting may be performed according to actual application requirements.
Further, it should be noted that the embodiment of the present invention does not limit whether to determine whether the shared portal works before determining whether the virtual local area network ID is configured, and when the shared portal does not need to be switched over by a hardware line, the working state of the shared portal does not need to be determined; when the switching of the shared network port is required to be effective after the hardware circuit switching is carried out, the working state of the shared network port can be determined firstly. In the embodiment of the present invention, when a server of an ARM architecture (Advanced RISC Machine) performs a network port switch, for example, a dedicated network port is switched to a shared network port, a hardware line switch is usually required to be performed to enable the server to be effective, so that before determining whether a virtual local area network ID is configured, a working state of the network port is determined, and a subsequent operation is performed when determining that the network port is normally working, thereby avoiding a virtual local area network configuration error caused by hardware non-configuration. It can be understood that whether the shared network port works can be determined by obtaining the working state of the network port hardware, and if the working state of the hardware can be obtained immediately, it indicates that the hardware line is successfully switched, and the subsequent operation can be performed.
In one possible case, after detecting that the failover mode is enabled, the method may further include:
step 11: judging whether the hardware working state of the shared network port can be acquired or not; if yes, go to step 12; if not, entering step 13;
step 12: executing a step of judging whether a virtual local area network ID is configured;
step 13: and outputting preset prompt information.
It should be noted that, the embodiment of the present invention does not limit the specific content of the preset prompt information, and can be adjusted according to the actual application requirement. The embodiment of the invention also does not limit the output form, and the output can be performed in a screen display mode or a buzzer alarm mode.
Of course, considering that the hardware operating state needs a period of time to be read and transmitted, a preset time period may also be set, and if the server can obtain the hardware operating state of the shared network port within the preset time period, it indicates that the shared network port is operating normally, otherwise, it indicates that the shared network port cannot operate normally. It should be noted that, the embodiment of the present invention does not limit the specific value of the preset time period, and can be set according to the actual application requirement.
In a possible case, the determining whether the hardware operating state of the shared network port can be obtained may include:
step 21: and judging whether the hardware working state of the shared network port can be acquired within a preset time period.
And S102, if the virtual local area network ID is configured, judging whether the corresponding virtual local area network configuration information can be acquired by using the virtual local area network ID.
After determining that the server is configured with the virtual local area network ID, the ID can be used to obtain the virtual local area network configuration information corresponding to the specific virtual local area network. It should be noted that, the embodiment of the present invention does not limit the specific process of acquiring the Configuration information of the virtual local area network, and may refer to the related technology of DHCP, where DHCP (dynamic Host Configuration protocol) is a network protocol of a local area network, and means that a DHCP server controls a segment of IP address range, and when a client logs in, an IP address and a subnet mask allocated by a DCHP server may be automatically obtained. It can be understood that, in order to obtain the virtual local area network configuration information corresponding to the specified virtual local area network ID, the ID and the DHCP protocol need to be used to generate a corresponding configuration request, and the configuration request is broadcasted, so that the virtual local area network configuration information issued by the DHCP server can be obtained.
In one case, determining whether the corresponding vlan configuration information can be obtained using the vlan ID may include:
step 31: generating a configuration request by using the virtual local area network ID, and broadcasting the configuration request;
step 32: receiving a data packet and judging whether the data packet contains virtual local area network configuration information or not; if yes, go to step 33; if not, go to step 34;
step 33: determining that the virtual local area network configuration information can be obtained;
step 34: and judging that the configuration information of the virtual local area network cannot be acquired, and outputting preset prompt information.
It should be noted that the embodiment of the present invention does not limit the specific form of the configuration request, and may refer to the related technologies of DHCP and virtual local area network; the embodiment of the invention does not limit the concrete mode of analyzing the data packet, and can refer to the related technology of network message analysis; the embodiment of the invention also does not limit the concrete way of determining whether the data packet contains the configuration information of the virtual local area network, and can refer to the related technology of DHCP; the embodiment of the present invention does not limit the specific content and the output mode of the preset prompt message, and the description of the specific content and the output mode of the preset prompt message is consistent with the description of the preset prompt message output when the shared portal is determined not to be operated, and reference may be made to the above embodiment.
Further, the embodiment of the present invention does not limit the execution manner for determining whether the data packet includes the vlan configuration information, for example, the above operation may be performed on the first received data packet, and of course, the above operation may also be performed by polling the multiple data packets; when the data packet broadcasted in the virtual local area network is single, namely the received first data packet can contain the configuration information of the virtual local area network, the operation can be executed on the received first data packet; when there are many data packets broadcasted in the virtual local area network, polling judgment can be performed on the received multiple data packets. In the embodiment of the present invention, in consideration of the situation that multiple types of packets are broadcast simultaneously in the vlan, the above determination operation may be performed by polling multiple packets. Further, the received data packets which do not contain the configuration information of the virtual local area network can be counted, and when the data packets are determined to be larger than a preset threshold value, the configuration information of the virtual local area network cannot be acquired. It should be noted that, the embodiment of the present invention does not limit the specific value of the preset threshold, and the preset value may be set according to the actual application requirement.
In a possible case, before determining that the virtual local area network configuration information cannot be acquired and outputting the preset prompting information, the method may further include:
step 41: marking the data packet which does not contain the configuration information of the virtual local area network as an abnormal data packet;
step 42: judging whether the number of the abnormal data packets reaches a preset threshold value or not; if yes, go to step 43; if not, go to step 44;
step 43: executing the step of judging that the configuration information of the virtual local area network cannot be acquired and outputting preset prompt information;
step 44: and executing the steps of receiving the data packet and judging whether the data packet contains the virtual local area network configuration information.
And S103, if the configuration information of the virtual local area network can be obtained, configuring the shared network port by using the configuration information of the virtual local area network.
It should be noted that, the embodiment of the present invention does not limit specific configuration information of the virtual local area network, for example, the configuration information may be information of an IP address, a subnet mask, and a default gateway, and may be selected according to actual application requirements; the embodiment of the invention also does not limit how to configure the virtual local area network configuration information, and can refer to the related technology of network equipment configuration.
And S104, if the virtual local area network ID is not configured or the virtual local area network configuration information cannot be acquired, closing the fault transfer mode, acquiring the shared network configuration information, and configuring the shared network port by using the shared network configuration information.
When any one of the virtual local area network ID and the virtual local area network configuration information cannot be acquired, it indicates that a configuration error occurs in the virtual local area network, for example, if the virtual local area network ID is missing, the configuration information of the corresponding virtual local area network cannot be acquired, and for example, if the DHCP server in the virtual local area network is not started, the configuration information of the virtual local area network cannot be automatically acquired. At this time, in the embodiment of the present invention, the failover mode is automatically turned off, and the configuration information of the common shared network is further used to configure the shared port, so as to ensure that the server can still communicate with the outside through the shared port when the configuration of the virtual local area network fails.
It should be noted that the embodiment of the present invention does not limit how to obtain the configuration information of the shared network, for example, the configuration information may be temporarily stored before configuring the virtual local area network, and the configuration information may be read when determining that the configuration of the virtual local area network fails; of course, the configuration information can also be obtained through a DHCP server in the shared network, and can be set according to the actual application requirements. The embodiment of the present invention also does not limit the specific information in the shared network configuration information, and the limited description is consistent with the limited description of the virtual local area network configuration information, which is not described herein again.
Based on the above embodiment, when it is detected that the failover mode is started, the present invention will sequentially detect whether a virtual local area network ID is configured, and whether corresponding virtual local area network configuration information can be acquired through the virtual local area network ID, and perform relevant configuration on the shared network port only in the presence of both the virtual local area network ID and the virtual local area network configuration information, so as to effectively avoid the problem of configuration failure caused by the absence of the virtual local area network ID or the virtual local area network configuration information; in addition, under the condition of lacking virtual local area network ID or virtual local area network configuration information, the server port configuration device automatically closes a fault transfer mode, and configures a shared network for the shared port by using the shared network configuration information, in other words, when the virtual local area network fails to be configured, the shared port configuration device configures a common shared network environment for the shared port so as to ensure that the virtual local area network can still communicate to an external network through the shared port when the virtual local area network fails to be configured, thereby avoiding the problem of server communication blockage caused by the failure of the virtual local area network configuration in the related technology and improving the efficiency of debugging and managing the server by a server administrator.
The server portal configuration method is described below based on a specific flowchart. Referring to fig. 2, fig. 2 is a flowchart of another server portal configuration method according to an embodiment of the present invention, where the flowchart may include:
1. when detecting that the fault transfer mode is started, judging whether the hardware working state of the shared network port can be acquired within a preset time period; if yes, entering step 2, otherwise, outputting hardware exception prompt information, and entering step 1;
2. judging whether a virtual local area network ID is configured, if so, entering a step 4, and if not; entering step 3;
3. outputting prompt information of the non-configuration environment, and entering step 6;
4. generating a configuration request by using the virtual local area network ID, and broadcasting the configuration request;
5. receiving a data packet and judging whether the data packet contains virtual local area network configuration information or not; if yes, entering step 7, otherwise; step 8 is entered;
7. configuring a sharing network port by utilizing the configuration information of the virtual local area network;
8. marking the data packets which do not contain the configuration information of the virtual local area network as abnormal data packets, and judging whether the number of the abnormal data packets reaches a preset threshold value or not; if yes, entering step 3, otherwise; entering step 4;
10. and closing the fault transfer mode, acquiring shared network configuration information, and configuring the shared network port by using the shared network configuration information.
In the following, the server portal configuration apparatus, the server and the computer readable storage medium provided by the embodiments of the present invention are introduced, and the server portal configuration apparatus, the server and the computer readable storage medium described below and the server portal configuration method described above may be referred to correspondingly.
Referring to fig. 3, fig. 3 is a block diagram of a server portal configuration apparatus according to an embodiment of the present invention, where the apparatus includes:
a first determining module 301, configured to determine whether a virtual local area network ID is configured when detecting that the failover mode is started;
a second determining module 302, configured 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;
a first configuration module 303, configured to configure the shared network port by using the virtual local area network configuration information if the virtual local area network configuration information can be obtained;
the second configuration module 304 is configured to, if the virtual local area network ID is not configured or the virtual local area network configuration information cannot be obtained, close the failover mode, obtain the shared network configuration information, and configure the shared network port using the shared network configuration information.
Optionally, the first determining module 301 may include:
the working state judgment submodule is used for judging whether the hardware working state of the shared network port can be acquired or not;
the information configuration judging submodule is used for executing the step of judging whether the virtual local area network ID is configured or not if the information configuration judging submodule is used for judging whether the virtual local area network ID is configured or not;
and the prompting submodule is used for outputting preset prompting information if the current time is not less than the preset time.
Optionally, the working state judgment sub-module may include:
and the working state judging unit is used for judging whether the hardware working state of the shared network port can be acquired within a preset time period.
Optionally, the second determining module 302 includes:
the broadcast submodule is used for generating a configuration request by utilizing the virtual local area network ID and broadcasting the configuration request;
the configuration information confirming submodule is used for receiving the data packet and judging whether the data packet contains the configuration information of the virtual local area network;
the first judgment submodule is used for judging that the configuration information of the virtual local area network can be acquired if the judgment result is positive;
and the second judging submodule is used for judging that the configuration information of the virtual local area network cannot be acquired if the configuration information of the virtual local area network is not acquired, and outputting preset prompt information.
Optionally, the second determining module further includes:
the marking unit is used for marking the data packet which does not contain the configuration information of the virtual local area network as an abnormal data packet;
the quantity judging unit is used for judging whether the quantity of the abnormal data packets reaches a preset threshold value or not;
the first judgment unit is used for judging that the configuration information of the virtual local area network cannot be acquired and outputting preset prompt information if the configuration information of the virtual local area network cannot be acquired;
and the second judging unit is used for executing the steps of receiving the data packet and judging whether the data packet contains the virtual local area network configuration information if the data packet does not contain the virtual local area network configuration information.
An embodiment of the present invention further provides a server, including:
a memory for storing a computer program;
a processor for implementing the steps of the server network port configuration method when executing the computer program.
Since the embodiment of the server portion corresponds to the embodiment of the server portal configuration method portion, please refer to the description of the embodiment of the server portal configuration method portion for the embodiment of the server portion, which is not repeated here.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the server network port configuration method according to any of the above embodiments are implemented.
Since the embodiment of the computer-readable storage medium portion corresponds to the embodiment of the server portal configuration method portion, please refer to the description of the embodiment of the server portal configuration method portion for the embodiment of the computer-readable storage medium portion, which is not repeated here.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The present invention provides a method, an apparatus, a server and a computer readable storage medium for configuring a server network port. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (10)

1. A server portal configuration method is characterized by comprising the following steps:
when detecting that the fault transfer mode is started, judging whether a virtual local area network (ID) is configured;
if the virtual local area network ID is configured, judging whether the corresponding virtual local area network configuration information can be acquired by using the virtual local area network ID;
if the configuration information of the virtual local area network can be acquired, configuring a shared network port by using the configuration information of the virtual local area network;
if the virtual local area network ID is not configured or the virtual local area network configuration information cannot be acquired, the fault transfer mode is closed, shared network configuration information is acquired, and the shared network port is configured by using the shared network configuration information.
2. The server portal configuration method of claim 1, further comprising, after detecting that failover mode is enabled:
judging whether the hardware working state of the shared network port can be acquired or not;
if yes, executing the step of judging whether a virtual local area network (ID) is configured;
if not, outputting preset prompt information.
3. The server portal configuration method according to claim 2, wherein the determining whether the hardware operating state of the shared portal can be obtained includes:
and judging whether the hardware working state of the shared network port can be acquired within a preset time period.
4. The server portal configuration method according to claim 1, wherein the determining whether the corresponding virtual local area network configuration information can be obtained by using the virtual local area network ID comprises:
generating a configuration request by using the virtual local area network ID, and broadcasting the configuration request;
receiving a data packet and judging whether the data packet contains the virtual local area network configuration information or not;
if yes, judging that the configuration information of the virtual local area network can be acquired;
if not, judging that the configuration information of the virtual local area network cannot be acquired, and outputting preset prompt information.
5. The server portal configuration method according to claim 4, wherein before determining that the virtual local area network configuration information cannot be acquired and outputting a preset prompt message, the method further comprises:
marking the data packet which does not contain the virtual local area network configuration information as an abnormal data packet;
judging whether the number of the abnormal data packets reaches a preset threshold value or not;
if yes, executing the step of judging that the configuration information of the virtual local area network cannot be acquired and outputting preset prompt information;
if not, executing the received data packet, and judging whether the data packet contains the virtual local area network configuration information.
6. A server portal configuration apparatus, comprising:
the first judgment module is used for judging whether a virtual local area network (ID) is configured or not when the fault transfer mode is detected to be started;
the second judgment module is used for judging whether the corresponding virtual local area network configuration information can be acquired by utilizing 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 by using the virtual local area network configuration information if the virtual local area network configuration information can be obtained;
and the second configuration module is used for closing the fault transfer mode, acquiring shared network configuration information and configuring the shared network port by using the shared network configuration information if the virtual local area network ID is not configured or the virtual local area network configuration information cannot be acquired.
7. The server portal configuration device according to claim 6, wherein the first determining module comprises:
the working state judgment submodule is used for judging whether the hardware working state of the shared network port can be acquired or not;
an information configuration judgment submodule, configured to, if yes, execute the step of judging whether a virtual local area network ID is configured;
and the prompting submodule is used for outputting preset prompting information if the current time is not less than the preset time.
8. The server portal configuration device according to claim 7, wherein the operating status determining sub-module comprises:
and the working state judging unit is used for judging whether the hardware working state of the shared network port can be acquired within a preset time period.
9. A server, comprising:
a memory for storing a computer program;
a processor for implementing the server portal configuration method of any of claims 1 to 5 when executing the computer program.
10. A computer-readable storage medium having stored thereon computer-executable instructions that, when loaded and executed by a processor, carry out a server portal configuration method according to any one of claims 1 to 5.
CN202111111033.XA 2021-09-18 2021-09-18 Server network port configuration method and device, server and readable storage medium Pending CN113839815A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111111033.XA CN113839815A (en) 2021-09-18 2021-09-18 Server network port configuration method and device, server and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111111033.XA CN113839815A (en) 2021-09-18 2021-09-18 Server network port configuration method and device, server and readable storage medium

Publications (1)

Publication Number Publication Date
CN113839815A true CN113839815A (en) 2021-12-24

Family

ID=78969066

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111111033.XA Pending CN113839815A (en) 2021-09-18 2021-09-18 Server network port configuration method and device, server and readable storage medium

Country Status (1)

Country Link
CN (1) CN113839815A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1429249A2 (en) * 2002-01-04 2004-06-16 Egenera, Inc. Virtual networking system and method in a processing system
US8332688B1 (en) * 2009-07-21 2012-12-11 Adobe Systems Incorporated Failover and recovery of a computing application hosted by a virtual instance of a machine
CN107517111A (en) * 2016-06-15 2017-12-26 中兴通讯股份有限公司 A kind of dynamic virtual local area network management method and its device, the network equipment
CN112099902A (en) * 2020-08-17 2020-12-18 杭州安恒信息安全技术有限公司 Network adapter configuration method and device of virtual machine, electronic device and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1429249A2 (en) * 2002-01-04 2004-06-16 Egenera, Inc. Virtual networking system and method in a processing system
US8332688B1 (en) * 2009-07-21 2012-12-11 Adobe Systems Incorporated Failover and recovery of a computing application hosted by a virtual instance of a machine
CN107517111A (en) * 2016-06-15 2017-12-26 中兴通讯股份有限公司 A kind of dynamic virtual local area network management method and its device, the network equipment
CN112099902A (en) * 2020-08-17 2020-12-18 杭州安恒信息安全技术有限公司 Network adapter configuration method and device of virtual machine, electronic device and storage medium

Similar Documents

Publication Publication Date Title
WO2018099249A1 (en) Method, device and system for detecting fault in nfv system
US9473346B2 (en) System and method for network path validation
US8134928B1 (en) Technique for identifying a failed network interface card within a team of network interface cards
CN108471369B (en) Network dialing method, device and storage medium
US10193747B2 (en) Fault detection method and device
US7545741B1 (en) Technique for identifying a failed network interface card within a team of network interface cards
JP2012509006A (en) Network node
US10833889B2 (en) Method and device for monitoring control systems
CN109982065B (en) Method, device and storage medium for equipment fault recovery in video monitoring network
CN112463281A (en) Remote assistance method, device, system, electronic equipment and storage medium
CN109450921B (en) Network state monitoring method and device, storage medium and server
CN108353027B (en) Software defined network system and method for detecting port fault
CN112738295B (en) IP address exception handling method, device, computer system and storage medium
CN112134775B (en) Switch loop detection method and device
CN106817316B (en) Method, device and system for detecting path MTU
CN113839815A (en) Server network port configuration method and device, server and readable storage medium
CN116708129A (en) Method, device and storage medium for link fault detection and quick recovery
CN110798381A (en) Method, device and equipment for verifying KCS channel communication stability
US11095496B2 (en) Network failure detection method and network failure detection device
CN115086219B (en) Virtual router determining method, device and computer readable storage medium
CN114205220B (en) Multi-machine room fault transfer method and system based on abnormal counting of clients
CN116015876B (en) Access control method, device, electronic equipment and storage medium
CN114697211B (en) Network configuration method, device, equipment and storage medium
CN111131287B (en) Method for starting remote service of equipment, server and storage medium
CN117610007A (en) Method and device for testing refused service

Legal Events

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