CN114338462A - Method, device and system for monitoring connectivity of network card - Google Patents

Method, device and system for monitoring connectivity of network card Download PDF

Info

Publication number
CN114338462A
CN114338462A CN202111682720.7A CN202111682720A CN114338462A CN 114338462 A CN114338462 A CN 114338462A CN 202111682720 A CN202111682720 A CN 202111682720A CN 114338462 A CN114338462 A CN 114338462A
Authority
CN
China
Prior art keywords
network card
arbitration
network
standby
management
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.)
Withdrawn
Application number
CN202111682720.7A
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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111682720.7A priority Critical patent/CN114338462A/en
Publication of CN114338462A publication Critical patent/CN114338462A/en
Withdrawn legal-status Critical Current

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the invention relates to a method, a device and a system for monitoring network card connectivity, wherein the method comprises the following steps: monitoring the communication state between a main network card on a host and a management network arbitration IP; inquiring the communication state between the standby network card on the host and the management network arbitration IP when the communication state between the main network card and the management network arbitration IP is determined not to meet the preset communication requirement; and when the communication state between the standby network card and the arbitration IP of the management network is determined to meet the preset communication requirement, controlling the standby network card to serve as a main network card for executing business operation corresponding to the main network card. By the method, the state of the main network card on the host can be known in a monitoring mode, and once the main network card is determined to have problems, such as failure and network instability, the main network card can be switched to the standby network card in time, so that the service running in the system is not affected, the reliability of service running is ensured, and the extra load of the network card cannot be increased.

Description

Method, device and system for monitoring connectivity of network card
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a method, a device and a system for monitoring network card connectivity.
Background
With the rapid development of scientific technology, the application of the virtualization management system is more and more extensive, and with the continuous increase of users, various problems are also continuously generated. When the host in the management network in the virtualization management system has the problems of poor connectivity of a main network card, virtual connection of the network card and the like, but the network card cannot automatically switch the main network card and the standby network card, the normal operation of the service on the system can be influenced, and the reasons of the problems are difficult to find (because the network card is displayed or in a connection state) and difficult to find; only when the user finds that the service is abnormal, the user knows that the system has a problem. Obviously, this time has already caused inevitable impact on the user.
Therefore, how to timely check the main network card in the system for a fault or unstable network, and timely switch the standby network card, so as to ensure that the service running in the system is not affected, which is the technical problem to be solved by the application.
Disclosure of Invention
The application provides a method, a device and a system for monitoring network card connectivity, which aim to solve the technical problems in the prior art.
In a first aspect, the present application provides a method for monitoring network card connectivity, including:
monitoring the communication state between a main network card on a host and a management network arbitration IP;
when the communication state between the main network card and the arbitration IP of the management network is determined not to accord with the preset communication requirement, inquiring the communication state between the standby network card on the host and the arbitration IP of the management network;
and when the communication state between the standby network card and the arbitration IP of the management network is determined to meet the preset communication requirement, controlling the standby network card to serve as the main network card for executing the business operation corresponding to the main network card.
In a second aspect, the present application provides an apparatus for monitoring connectivity of a network card, the apparatus comprising:
the monitoring module is used for monitoring the communication state between the main network card on the host and the arbitration IP of the management network;
the query module is used for querying the communication state between the standby network card on the host and the arbitration IP of the management network when the communication state between the main network card and the arbitration IP of the management network is determined not to meet the preset communication requirement;
and the processing module is used for controlling the standby network card to serve as the main network card when the communication state between the standby network card and the arbitration IP of the management network is determined to meet the preset communication requirement, so as to execute the business operation corresponding to the main network card.
In a third aspect, an electronic device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
and the processor is used for realizing the steps of the method for monitoring the connectivity of the network card in any embodiment of the first aspect when executing the program stored in the memory.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for monitoring network card connectivity as in any one of the embodiments of the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:
the method provided by the embodiment of the application monitors the communication state between the main network card on the host and the arbitration IP of the management network, and inquires the communication state between the standby network card on the host and the arbitration IP of the management network when the communication state is determined to be not in accordance with the preset communication requirement. And when the communication state between the standby network card and the arbitration IP of the management network is determined to meet the preset communication requirement, controlling the standby network card to serve as the main network card for executing the business operation corresponding to the main network card. By the method, the state of the main network card on the host can be known in a monitoring mode, and once the main network card is determined to have problems, such as failure and network instability, the main network card can be switched to the standby network card in time, so that the service running in the system is not affected, the reliability of service running is ensured, and the extra load of the network card cannot be increased.
Drawings
Fig. 1 is a schematic flowchart of a method for monitoring connectivity of a network card according to an embodiment of the present invention;
fig. 2 is a schematic flow chart of a method for detecting a communication state between a main network card on a host and a management network arbitration IP according to the present invention;
fig. 3 is a schematic flowchart of another method for monitoring connectivity of a network card according to an embodiment of the present invention;
fig. 4 is a schematic flowchart of another method for monitoring connectivity of a network card according to an embodiment of the present invention;
FIG. 5 is a diagram of the overall workflow architecture for monitoring connectivity of network cards using arbitration IP according to the present invention;
fig. 6 is a schematic structural diagram of a device for monitoring connectivity of a network card according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a system for monitoring connectivity of a network card 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.
For the convenience of understanding of the embodiments of the present invention, the following description will be further explained with reference to specific embodiments, which are not to be construed as limiting the embodiments of the present invention.
Fig. 1 is a flowchart illustrating a method for monitoring connectivity of a network card according to an embodiment of the present invention, as shown in fig. 1, the method is executed by a host in a virtualization management system, where the virtualization management system includes at least one host, and each host is configured with an arbitration IP. Before describing the specific method embodiment of this embodiment, some preparation operations will be described first, specifically referring to the following:
firstly, a management network arbitration IP needs to be configured, and before configuration, connectivity between a network card corresponding to each host in the management network and the arbitration IP is detected to ensure that the network card can establish communication connection with the arbitration IP under a normal condition, and the communication state after the communication connection meets the preset communication requirement. Only in this case, the state of the communication connection between the arbitration IP and the network card can be subsequently used to verify whether the network card is abnormal, for example, virtual connection, failure, or connectivity problems exist. After determining that the connectivity between the network card corresponding to the host in the management network and the arbitration IP is good, the following operations are performed.
Specifically, the method comprises the following steps:
step 110, monitoring the communication state between the main network card on the host and the arbitration IP of the management network.
Specifically, when the host in the management network in the virtualization management system has problems of poor connectivity of the main network card, virtual connection of the network card, and the like, the network card may not automatically switch the main network card and the standby network card. The situation will inevitably affect that the service on the system cannot run normally, and the network card is not easy to find out by people (because the network card is in a display or connection state, the reason of the problem is difficult to find out) if the network card has the problem, and the user only knows that the system has the problem when finding that the service is abnormal. But now it is too late, which has already caused an inevitable impact on the user's traffic.
Therefore, in this embodiment, the communication status between the primary network card on the host and the management network arbitration IP is monitored.
Optionally, when detecting the communication state between the main network card on the host and the management network arbitration IP, the following method may be specifically implemented, specifically referring to fig. 2. Fig. 2 illustrates a specific implementation manner, which specifically includes:
step 210, periodically controlling the main network card to send a test message to the arbitration IP of the management network.
Step 220, determining the communication state between the main network card on the host and the arbitration IP of the management network according to the packet loss rate of the test message received by the arbitration IP of the management network.
In an optional example, when it is determined that the packet loss rate of the test packet received by the management network arbitration IP is less than or equal to the preset threshold, it is determined that the communication state between the main network card and the management network arbitration IP meets the preset communication requirement, otherwise, it is determined that the communication state between the main network card and the management network arbitration IP does not meet the preset communication requirement.
Specifically, it is beneficial to send a test message to the management network arbitration IP through the master network card every 20 seconds, and in a specific example, the test message may be a ping packet, or the test message may be a UDP message, and of course, it may also be other test message packets, and what is specifically the case. Preferably, in this embodiment, a ping packet is used.
Then, according to the packet loss rate of the test message received by the arbitration IP of the management network,
for example, in every 10 ping packets, the packet loss is 2, and the packet loss rate is 20%. In a specific example, if the packet loss rate of the test packet received by the management network arbitration IP is lower than or equal to 20%, it indicates that the communication state between the main network card and the management network arbitration IP meets the preset communication requirement, and otherwise, it indicates that the communication state does not meet the preset communication requirement.
Of course, the upper limit 20% set in the above example is only a specific example, and does not represent a specific limited value in practical application, and the upper limit of the specific packet loss rate can be set completely according to practical situations, which is not described in detail herein.
And step 120, when the communication state between the main network card and the arbitration IP of the management network is determined not to meet the preset communication requirement, inquiring the communication state between the standby network card on the host and the arbitration IP of the management network.
And step 130, when the communication state between the standby network card and the arbitration IP of the management network is determined to meet the preset communication requirement, controlling the standby network card to serve as the main network card for executing the business operation corresponding to the main network card.
Specifically, as described above, when the communication state between the main network card and the arbitration IP of the management network does not meet the preset communication requirement, the main network card is inevitably switched to the standby network card whose current communication state meets the preset communication requirement. That is, the standby network card meeting the preset communication requirement is controlled to be used as the main network card, and the subsequent operation is executed. Therefore, the communication status between the standby network card on the host and the management network arbitration IP needs to be queried.
And when the communication state between the standby network card and the arbitration IP of the management network is determined to meet the preset communication requirement, controlling the standby network card to serve as the main network card for executing the business operation corresponding to the main network card.
Specifically, whether the communication state between the standby network card and the arbitration IP of the management network meets the preset communication requirement or not may also be queried by the operation steps from step 210 to step 220. After sending a ping packet to the management network arbitration IP through the standby network card, inquiring the packet loss rate of the test message received by the management network arbitration IP, and determining the communication state between the standby network card and the management network arbitration IP.
Further optionally, as described above, after the standby network card is switched to the main network card, the method further includes: and switching the main network card with the communication state not meeting the preset communication requirement into a standby network card.
The method for monitoring the connectivity of the network card provided by the embodiment of the invention monitors the communication state between the main network card on the host and the arbitration IP of the management network, and inquires the communication state between the standby network card on the host and the arbitration IP of the management network when the communication state is determined to be not in accordance with the preset communication requirement. And when the communication state between the standby network card and the arbitration IP of the management network is determined to meet the preset communication requirement, controlling the standby network card to serve as the main network card for executing the business operation corresponding to the main network card. By the method, the state of the main network card on the host can be known in a monitoring mode, and once the main network card is determined to have problems, such as failure and network instability, the main network card can be switched to the standby network card in time, so that the service running in the system is not affected, the reliability of service running is ensured, and the extra load of the network card cannot be increased.
Optionally, on the basis of the foregoing embodiment, another method for monitoring connectivity of a network card is provided in the embodiments of the present invention, and the content of the method is the same as or similar to that in the foregoing embodiments, and is not described herein again. In this section, it will be described that when the spare network card does not include only one spare network card, but includes a plurality of spare network cards, the method may further include the following method steps, which are specifically shown in fig. 3:
step 310, selecting a first standby network card from the plurality of standby network cards to send a test message to the arbitration IP of the management network.
Specifically, when a plurality of standby network cards are included, one standby network card can be randomly selected from the standby network cards, that is, the first standby network card sends a test message to the arbitration IP of the management network. And then verifying whether the network communication state between the first standby network card and the arbitration IP of the management network meets the preset communication requirement.
And step 320, controlling the first standby network card to be a main network card when the communication state between the first standby network card and the arbitration IP of the management network is determined to meet the preset communication requirement according to the packet loss rate of the test message received by the arbitration IP of the management network.
The specific implementation processes of step 310 and step 320 refer to the above embodiment, and are not described herein again.
And step 330, when the communication state between the first standby network card and the arbitration IP of the management network is determined to be not in accordance with the preset communication requirement according to the packet loss rate of the test message received by the arbitration IP of the management network, continuing to select the next standby network card to send the test message to the arbitration IP of the management network.
And verifying whether the communication state of the next standby network card arbitrating the IP from the management network meets the preset communication requirement.
In a specific example, when it is determined that the packet loss rate of the test packet received by the management network arbitration IP is less than or equal to the preset threshold, it is determined that the communication state between the standby network card and the management network arbitration IP meets the preset communication requirement, otherwise, it is determined that the communication state between the standby network card and the management network arbitration IP does not meet the preset communication requirement.
The specific process of sending the test message, the preset threshold corresponding to the packet loss rate of the test message received by the management network arbitration IP, and the specific evaluation of whether the communication state between the standby network card and the management network arbitration IP meets the preset communication requirement, etc., may refer to the process of evaluating whether the communication state between the main network card and the management network arbitration IP meets the preset communication requirement, and will not be described herein again.
And 340, controlling a second standby network card to be a main network card until the communication state between the second standby network card in the plurality of standby network cards and the arbitration IP of the management network is determined to meet the preset communication requirement.
Of course, if the selection is not random, other manners may also be adopted, for example, numbering all the standby network cards, then preferentially selecting one standby network card according to the numbering sequence, then performing the operations of step 310 to step 320, and if the communication state between the first standby network card and the arbitration IP of the management network does not meet the preset communication requirement, continuing to select the next standby network card according to the numbering sequence, that is, performing the operation of step 330. After selecting a standby network card again, the operation of step 320 is executed repeatedly to verify whether the communication state between the next standby network card and the arbitration IP of the management network meets the preset communication requirement. And controlling the second standby network card to be the main network card until any standby network card, such as a second standby network card, is selected from the plurality of standby network cards and the communication state between the standby network card and the arbitration IP of the management network meets the preset communication requirement.
By the method, the service running in the system can be further ensured not to be influenced, the service in the system can run normally, and the extra load of the network card cannot be increased.
In the above, it is assumed that, in the current query process, a situation that a communication state between a certain standby network card and the arbitration IP of the management network meets the preset communication requirement can be queried in the standby network card.
In consideration of the above, during the execution process, it may be that the appropriate standby network card cannot be queried in the query, so as to ensure that the communication state between the network card and the arbitration IP of the management network meets the preset communication requirement. In this case, the method may further include the following method steps, specifically referring to fig. 4, where fig. 4 is another method for monitoring connectivity of a network card provided in the embodiment of the present invention, and the content of the method is the same as or similar to that in the above embodiment, and is not described here again.
And step 410, polling to use a network card on the host as a primary master network card at preset time intervals, and monitoring the communication state between the current master network card and the arbitration IP of the management network.
And step 420, until the communication state between one of the network cards on the host and the arbitration IP of the management network is determined to meet the preset communication requirement.
Alternatively, the first and second electrodes may be,
step 430, after polling for a preset number of times, ending when the communication state between the network card and the arbitration IP of the management network is not found to meet the preset communication requirement.
Specifically, if the difference queries each backup network card, it is not found that the communication state between the backup network card and the arbitration IP of the management network meets the preset communication requirement (for simplicity and convenience of description, it is simply stated that the backup network card does not meet the preset requirement hereinafter). Then, at this time, instead of distinguishing the main network card from the standby network card, each network card is used as a primary main network card, and then whether the communication state between the current main network card on the host and the arbitration IP of the management network meets the preset communication requirement is determined, and if not, after the interval of the preset time, whether the communication state between the next main network card and the arbitration IP of the management network meets the preset requirement is inquired again.
And when the communication state between one network card in the host and the arbitration IP of the management network is determined to meet the preset communication requirement, taking the network card as a main network card, and then executing subsequent operation tasks.
Or, all the network cards are used as the main network card, and the communication state between the main network card and the management network arbitration IP is inquired as one polling, for example, twice after the iterative polling is carried out for many times. And if the proper network card is not found as the main network card, ending the operation and informing the worker of the abnormal situation of the network card so that the worker can replace the network card in time.
Optionally, after each polling, the interval time may be increased according to a preset rule. For example, the first poll may be 20 seconds apart, the second poll may be 40 seconds apart, the third poll may be 60 seconds apart, and so on. However, the interval time cannot exceed 320 seconds at maximum.
Optionally, when the communication state between the network card and the management network arbitration IP is still not found to meet the preset communication requirement after polling for the preset number of times, the method further includes: the delete management network arbitrates the IP.
The reason is that if no network card can be found as the current main network card after polling for many times, it indicates that all network cards have failed, and the existence of the arbitration IP has no meaning any more, so in order to release the memory space and save the system resources, the arbitration IP of the management network can be deleted.
FIG. 5 illustrates an overall workflow architecture diagram for monitoring network card connectivity using arbitrated IP, comprising:
initially, the state before the management network arbitrates the IP is configured, and mainly, the application environment before the arbitrated IP is installed is configured.
Checking, namely detecting the connectivity between the management network and the arbitration IP, sending 10 ping packets at intervals of 2s, and if the packet loss is more than or equal to 2, indicating that the communication state between the main network card and the arbitration IP does not meet the preset communication requirement, or the connectivity is not good;
polling, switching the uplink network card and checking connectivity;
ending, deleting the arbitration IP.
The detailed operation steps may include:
a: configuring a management network arbitration IP, and checking the connectivity between the management network and the arbitration IP before configuration;
b: the connectivity between the management network and the arbitration IP is good, and the network is checked again after 20 s;
c: the connectivity between the management network and the arbitration IP is not good;
d: the uplink is switched (other standby network cards are switched), and the connectivity between the management network and the arbitration IP is good;
e: after the uplink of the management network is switched once and the IP is not communicated with the network, performing a second attempt, namely taking each network card of all the network cards of the uplink of the management network as a main network card, and verifying the connectivity once again;
f: the uplink network card is switched for 2 times (assuming that the preset times are 2 times) and is not communicated with the arbitration IP, and then the switching is stopped;
g: the arbitrated IP is manually deleted, or the management network uplink is changed from multi-block network cards to one block.
The purpose of changing from a plurality of network cards to one network card is also to save system resources and prevent operations such as arbitrating IP polling to search for a proper network card. Equivalent to the role of deleting arbitration IPs.
The above processes are all described in detail above, and therefore are not described in detail here.
Fig. 6 is a device for monitoring connectivity of a network card according to an embodiment of the present invention, where the device includes: a monitoring module 601, a query module 602, and a processing module 603.
The monitoring module 601 is configured to monitor a communication state between a host network card and a management network arbitration IP on a host;
the query module 602 is configured to query a communication state between a standby network card on the host and the arbitration IP of the management network when it is determined that the communication state between the main network card and the arbitration IP of the management network does not meet the preset communication requirement;
the processing module 603 is configured to control the standby network card as the main network card to execute a service operation corresponding to the main network card when it is determined that the communication state between the standby network card and the arbitration IP of the management network meets the preset communication requirement.
Optionally, the processing module 603 is further configured to, when it is determined that the communication state between the standby network card and the arbitration IP of the management network meets the preset communication requirement, control the standby network card to serve as the main network card, and then switch the main network card whose communication state does not meet the preset communication requirement into the standby network card.
Optionally, the monitoring module 601 is specifically configured to periodically control the master network card to send a test packet to the management network arbitration IP;
and determining the communication state between the main network card on the host and the arbitration IP of the management network according to the packet loss rate of the test message received by the arbitration IP of the management network.
Optionally, the processing module 603 is further configured to, when the number of the standby network cards includes multiple ones, select a first standby network card from the multiple standby network cards to send a test packet to the arbitration IP of the management network;
when the communication state between the first standby network card and the arbitration IP of the management network is determined to meet the preset communication requirement according to the packet loss rate of the test message received by the arbitration IP of the management network, controlling the first standby network card as a main network card;
or when the communication state between the first standby network card and the arbitration IP of the management network is determined to be not in accordance with the preset communication requirement according to the packet loss rate of the test message received by the arbitration IP of the management network, continuing to select the next standby network card to send the test message to the arbitration IP of the management network;
and controlling a second standby network card to be a main network card until the communication state between the second standby network card in the plurality of standby network cards and the arbitration IP of the management network is determined to meet the preset communication requirement.
Optionally, the query module 602 is specifically configured to determine that a communication state between the network card and the arbitration IP of the management network meets a preset communication requirement when it is determined that the packet loss rate of the test packet received by the arbitration IP of the management network is less than or equal to a preset threshold, where the network card includes a main network card and a standby network card.
Optionally, the query module 602 is further configured to, when it is determined that the communication state between the standby network card and the arbitration IP of the management network does not meet the preset communication requirement, poll a network card on the host as a primary master network card at every preset time interval, and monitor the communication state between the current master network card and the arbitration IP of the management network;
until the communication state between one of the network cards on the host and the arbitration IP of the management network is determined to meet the preset communication requirement;
or after the polling is carried out for the preset times, the communication state between the network card and the arbitration IP of the management network is not found to meet the preset communication requirement, and the process is finished.
Optionally, the processing module 603 is further configured to delete the arbitration IP of the management network when the communication state between the network card and the arbitration IP of the management network is not found to meet the preset communication requirement after the polling module 602 polls for the preset number of times.
The device for monitoring the connectivity of the network card provided by the embodiment of the invention monitors the communication state between the main network card on the host and the arbitration IP of the management network, and inquires the communication state between the standby network card on the host and the arbitration IP of the management network when the communication state is determined to be not in accordance with the preset communication requirement. And when the communication state between the standby network card and the arbitration IP of the management network is determined to meet the preset communication requirement, controlling the standby network card to serve as the main network card for executing the business operation corresponding to the main network card. By the method, the state of the main network card on the host can be known in a monitoring mode, and once the main network card is determined to have problems, such as failure and network instability, the main network card can be switched to the standby network card in time, so that the service running in the system is not affected, the reliability of service running is ensured, and the extra load of the network card cannot be increased.
As shown in fig. 7, an electronic device according to an embodiment of the present application includes a processor 111, a communication interface 112, a memory 113, and a communication bus 114, where the processor 111, the communication interface 112, and the memory 113 complete mutual communication via the communication bus 114,
a memory 113 for storing a computer program;
in an embodiment of the present application, when the processor 111 is configured to execute the program stored in the memory 123, the method for monitoring connectivity of the network card provided in any one of the foregoing method embodiments is implemented, including:
monitoring the communication state between a main network card on a host and a management network arbitration IP;
when the communication state between the main network card and the arbitration IP of the management network is determined not to accord with the preset communication requirement, inquiring the communication state between the standby network card on the host and the arbitration IP of the management network;
and when the communication state between the standby network card and the arbitration IP of the management network is determined to meet the preset communication requirement, controlling the standby network card to serve as the main network card for executing the business operation corresponding to the main network card.
Optionally, when it is determined that the communication state between the standby network card and the arbitration IP of the management network meets the preset communication requirement, after the standby network card is controlled to serve as the main network card, the main network card whose communication state does not meet the preset communication requirement is switched to the standby network card.
Optionally, periodically controlling the main network card to send a test message to the arbitration IP of the management network;
and determining the communication state between the main network card on the host and the arbitration IP of the management network according to the packet loss rate of the test message received by the arbitration IP of the management network.
Optionally, a first standby network card is selected from the plurality of standby network cards to send a test message to the arbitration IP of the management network;
when the communication state between the first standby network card and the arbitration IP of the management network is determined to meet the preset communication requirement according to the packet loss rate of the test message received by the arbitration IP of the management network, controlling the first standby network card as a main network card;
or when the communication state between the first standby network card and the arbitration IP of the management network is determined to be not in accordance with the preset communication requirement according to the packet loss rate of the test message received by the arbitration IP of the management network, continuing to select the next standby network card to send the test message to the arbitration IP of the management network;
and controlling a second standby network card to be a main network card until the communication state between the second standby network card in the plurality of standby network cards and the arbitration IP of the management network is determined to meet the preset communication requirement.
Optionally, when it is determined that the packet loss rate of the test packet received by the management network arbitration IP is less than or equal to the preset threshold, it is determined that the communication state between the network card and the management network arbitration IP meets the preset communication requirement, where the network card includes a main network card and a standby network card.
Optionally, polling to use a network card on the host as a primary master network card at preset intervals, and monitoring a communication state between the current master network card and the arbitration IP of the management network;
until the communication state between one of the network cards on the host and the arbitration IP of the management network is determined to meet the preset communication requirement;
or after the polling is carried out for the preset times, the communication state between the network card and the arbitration IP of the management network is not found to meet the preset communication requirement, and the process is finished.
Optionally, after the polling for the preset number of times, when the communication state between the network card and the management network arbitration IP is not found to meet the preset communication requirement, the method further includes:
the delete management network arbitrates the IP.
The present application further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the method for monitoring network card connectivity provided in any of the foregoing method embodiments.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present invention, which enable those skilled in the art to understand or practice the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for monitoring network card connectivity, the method comprising:
monitoring the communication state between a main network card on a host and a management network arbitration IP;
when the communication state between the main network card and the management network arbitration IP is determined not to meet the preset communication requirement, inquiring the communication state between the standby network card on the host and the management network arbitration IP;
and when the communication state between the standby network card and the arbitration IP of the management network is determined to meet the preset communication requirement, controlling the standby network card to serve as a main network card for executing business operation corresponding to the main network card.
2. The method according to claim 1, wherein after controlling the standby network card as the primary network card when it is determined that the communication status between the standby network card and the management network arbitration IP meets the preset communication requirement, the method further comprises:
and switching the main network card in the communication state which does not meet the preset communication requirement into a standby network card.
3. The method according to claim 1, wherein the monitoring of the communication status between the host network card and the management network arbitration IP specifically comprises:
periodically controlling the main network card to send a test message to the arbitration IP of the management network;
and determining the communication state between the main network card on the host and the arbitration IP of the management network according to the packet loss rate of the test message received by the arbitration IP of the management network.
4. The method of claim 3, wherein when the backup network card comprises a plurality of backup network cards, the method further comprises:
selecting a first standby network card from a plurality of standby network cards to send a test message to the arbitration IP of the management network;
when the communication state between the first standby network card and the management network arbitration IP is determined to meet the preset communication requirement according to the packet loss rate of the test message received by the management network arbitration IP, controlling the first standby network card to be a main network card;
or when the communication state between the first standby network card and the management network arbitration IP is determined to be not in accordance with the preset communication requirement according to the packet loss rate of the test message received by the management network arbitration IP, continuing to select the next standby network card to send the test message to the management network arbitration IP;
and controlling a second standby network card to be a main network card until the communication state between the second standby network card in the plurality of standby network cards and the arbitration IP of the management network is determined to meet the preset communication requirement.
5. The method according to claim 3 or 4, wherein determining that the communication state between the network card and the management network arbitration IP meets a preset communication requirement specifically comprises:
and when the packet loss rate of the test message received by the management network arbitration IP is smaller than or equal to a preset threshold value, determining that the communication state between the network card and the management network arbitration IP meets a preset communication requirement, wherein the network card comprises the main network card and the standby network card.
6. The method according to any one of claims 1 to 4, wherein when it is determined that the communication status between the standby network card and the management network arbitration IP does not meet the preset communication requirement, the method further comprises:
polling to use a network card on the host as a primary main network card at preset time intervals, and monitoring the communication state between the current main network card and the arbitration IP of the management network;
until the communication state between one of the network cards on the host and the arbitration IP of the management network is determined to meet the preset communication requirement;
or after the polling is carried out for the preset times, the communication state between the network card and the management network arbitration IP is not found to meet the preset communication requirement, and the process is finished.
7. The method of claim 6, wherein when the communication status between the network card and the management network arbitrating IP is not found to meet the preset communication requirement after polling for a preset number of times, the method further comprises:
and deleting the arbitration IP of the management network.
8. An apparatus for monitoring network card connectivity, the apparatus comprising:
the monitoring module is used for monitoring the communication state between the main network card on the host and the arbitration IP of the management network;
the query module is used for querying the communication state between the standby network card on the host and the management network arbitration IP when the communication state between the main network card and the management network arbitration IP is determined not to meet the preset communication requirement;
and the processing module is used for controlling the standby network card to serve as a main network card when the communication state between the standby network card and the arbitration IP of the management network is determined to meet the preset communication requirement, so as to execute the business operation corresponding to the main network card.
9. An electronic device is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor and the communication interface are used for realizing mutual communication by the memory through the communication bus;
a memory for storing a computer program;
a processor for implementing the steps of the method for monitoring network card connectivity of any one of claims 1-7 when executing the program stored in the memory.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method for monitoring the connectivity of a network card according to any one of claims 1 to 7.
CN202111682720.7A 2021-12-30 2021-12-30 Method, device and system for monitoring connectivity of network card Withdrawn CN114338462A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111682720.7A CN114338462A (en) 2021-12-30 2021-12-30 Method, device and system for monitoring connectivity of network card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111682720.7A CN114338462A (en) 2021-12-30 2021-12-30 Method, device and system for monitoring connectivity of network card

Publications (1)

Publication Number Publication Date
CN114338462A true CN114338462A (en) 2022-04-12

Family

ID=81022697

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111682720.7A Withdrawn CN114338462A (en) 2021-12-30 2021-12-30 Method, device and system for monitoring connectivity of network card

Country Status (1)

Country Link
CN (1) CN114338462A (en)

Similar Documents

Publication Publication Date Title
CN107688496B (en) Task distributed processing method and device, storage medium and server
CN109669762B (en) Cloud computing resource management method, device, equipment and computer readable storage medium
CN108847982B (en) Distributed storage cluster and node fault switching method and device thereof
CN109586952B (en) Server capacity expansion method and device
EP3142011B1 (en) Anomaly recovery method for virtual machine in distributed environment
CN106330475B (en) Method and device for managing main and standby nodes in communication system and high-availability cluster
CN106533805B (en) Micro-service request processing method, micro-service controller and micro-service architecture
US20010037473A1 (en) Backup apparatus and a backup method
US20070168201A1 (en) Formula for automatic prioritization of the business impact based on a failure on a service in a loosely coupled application
CN103560922A (en) Disaster recovery method and system
CN108199962B (en) Address migration method and device, network equipment and readable storage medium
CN111526038B (en) Service request distribution method and device, computer equipment and readable storage medium
CN112948128A (en) Target terminal selection method, system and computer readable medium
CN112416594A (en) Micro-service distribution method, electronic equipment and computer storage medium
US20150381498A1 (en) Network system and its load distribution method
CN110635968A (en) Monitoring method, device and equipment for stacked double-active detection channel and storage medium
US20140237306A1 (en) Management device, management method, and medium
CN114168071A (en) Distributed cluster capacity expansion method, distributed cluster capacity expansion device and medium
CN107426012B (en) Fault recovery method and device based on super-fusion architecture
US9317354B2 (en) Dynamically determining an external systems management application to report system errors
CN102546652B (en) System and method for server load balancing
CN112737844A (en) Method and device for switching between main and standby in redundant system
CN114338462A (en) Method, device and system for monitoring connectivity of network card
JP6269199B2 (en) Management server, failure recovery method, and computer program
WO2015101278A1 (en) Cell activation method and device

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
WW01 Invention patent application withdrawn after publication
WW01 Invention patent application withdrawn after publication

Application publication date: 20220412