CN114006822A - Method and device for judging link between switch and server - Google Patents

Method and device for judging link between switch and server Download PDF

Info

Publication number
CN114006822A
CN114006822A CN202010685560.0A CN202010685560A CN114006822A CN 114006822 A CN114006822 A CN 114006822A CN 202010685560 A CN202010685560 A CN 202010685560A CN 114006822 A CN114006822 A CN 114006822A
Authority
CN
China
Prior art keywords
server
information
switch
address
mac
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.)
Granted
Application number
CN202010685560.0A
Other languages
Chinese (zh)
Other versions
CN114006822B (en
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.)
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Communications Ltd Research Institute
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 China Mobile Communications Group Co Ltd, China Mobile Communications Ltd Research Institute filed Critical China Mobile Communications Group Co Ltd
Priority to CN202010685560.0A priority Critical patent/CN114006822B/en
Publication of CN114006822A publication Critical patent/CN114006822A/en
Application granted granted Critical
Publication of CN114006822B publication Critical patent/CN114006822B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/12Discovery or management of network topologies
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)

Abstract

The invention provides a method and a device for judging a link between a switch and a server, and belongs to the technical field of communication. The method for judging the link between the switch and the server comprises the following steps: acquiring link information and server information from a server to obtain a first information set; acquiring an MAC table from a switch to form an MAC address set, wherein the MAC address set comprises an address and a system MAC of the switch; selecting an address from a set of MAC addresses; judging whether the address is located in the first information set, if so, acquiring a server serial number D and IMPI information corresponding to the address from the first information set, and acquiring a server serial number D' connected with the switch according to the IMPI information; and if the D is consistent with the D' and the system MAC of the switch in the MAC address set is consistent with the system MAC of the opposite-end equipment in the first information set, judging that the switch is connected with a correct server. The technical scheme of the invention can judge the link between the switch and the server without using a network protocol.

Description

Method and device for judging link between switch and server
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for determining a link between a switch and a server.
Background
Whether the link of the switch and the server is accessible or not affects subsequent software installation is particularly important in an automatic test process, and if the link of a certain server and the switch has a problem, a scene that multiple devices are required for automatic deployment and the time is long is fatal to the automatic test process. Therefore, an automatic check of the link upon hardware integration is very necessary. The link check generally comprises two steps, and the link check is logged in two devices, namely, whether the connected opposite-end device is correct is checked, and then whether the connected interface is correct is checked; or sometimes, whether the connected interface is correct is verified, and then whether the device where the connected interface is located is correct is verified. Among them, the switch connected to the server, commonly referred to as an access switch, is abbreviated as TOR.
In general Link judgment, by means of a Link judgment method between two switches, a certain network Protocol, such as Link Layer Discovery Protocol (LLDP), needs to be started on the two switches, and then information learned by the Protocol is verified, such as whether the learned device is a device in the collected information, whether an interface where the learned MAC address is located is an interface in the collected information, and whether a local port in the collected information is consistent with the observed port. The reason why the LLDP protocol is used is that a step of determining whether the device is directly connected needs to be added when the link determination is performed by using the information learned by another protocol. Such an algorithm can be used for the links of the switch and the server. Fig. 1 is a diagram of viewing LLDP information for an interface on a switch. The information on the switches is directly compared with the collected link information to judge the link between the two switches.
Fig. 2 is a schematic diagram of a network for performing hardware integration automation test, in which two networks are taken as an example. Wherein, the solid line is a service network, the dotted line is a management network, TOR a is an access switch of the service network, TOR B and TOR C are access switches of the management network, and the three layers of the service network and the management network are accessible.
In the prior art, a network protocol is adopted to determine a link between switches, but such a method cannot be completely applied to determine a link between a switch and a server, because the following problems are caused:
(1) with network protocols such as LLDP, a server is required to install an operating system, and a packet and a corresponding driver related to LLDP are required to be installed on the server. Even if the LLDP module is installed on the server, the LLDP protocol on the network device and the LLDP protocol module installed on the server need to be adapted and subjected to compatibility test.
(2) Using the LLDP protocol, there may be a case where the acquired information of the server is incomplete on the TOR, for example, the TOR can learn the MAC address of the network card of the server, but cannot acquire the system information and the opposite-end interface information of the server.
(3) In addition, even if a host name (hostname) is obtained, if the hostname is not unique (which may be a design problem or a problem caused by carelessness of an operating system installer), it cannot be determined whether the link between the server and the switch is correct.
(4) If the storage servers are self-contained operating systems and the LLDP protocol is not installed, the LLDP protocol needs to be additionally and independently installed on all the storage servers, so that the difficulty of a hardware integration scheme is increased.
(5) The network devices are the same kind of devices, and can exchange information through a certain protocol. Different kinds of equipment are arranged between the server and the switch, and information interaction through a certain common protocol is difficult.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method and an apparatus for determining a link between a switch and a server, which can determine the link between the switch and the server without using a network protocol.
To solve the above technical problem, embodiments of the present invention provide the following technical solutions:
in one aspect, a method for determining a link between a switch and a server is provided, including:
the method comprises an obtaining step, a first information set and a second information set, wherein the obtaining step is used for obtaining link information and server information from a server, the server information comprises a server serial number and intelligent platform management interface (IMPI) information, and the link information comprises a system MAC of opposite terminal equipment corresponding to a server network card MAC address; acquiring an MAC table from a switch to form an MAC address set, wherein the MAC address set comprises at least one address and a system MAC of the switch;
a selection step for selecting an address from the MAC address set;
a judging step, configured to judge whether the address is located in the first information set, if so, obtain a server serial number D and IMPI information corresponding to the address from the first information set, and obtain a server serial number D' connected to the switch according to the IMPI information; if D is consistent with D' and the system MAC of the switch in the MAC address set is consistent with the system MAC of the opposite terminal equipment corresponding to the address in the first information set, judging that the switch is connected with a correct server;
a deletion step of deleting the address from the MAC address set, and turning to the selection step.
In some embodiments, the MAC address set further includes interface numbers of the switches, the link information further includes a local interface number corresponding to the MAC address of the network card of the server and an interface number of the peer device, and the determining step further includes:
if the switch is judged to be connected with a correct server, acquiring an interface of opposite-end equipment corresponding to the address from the first information set, and if the interface of the opposite-end equipment is the same as the interface number of the address in the MAC address set, judging that the switch is connected with the correct interface of the server.
In some embodiments, the method further comprises:
and if the D is inconsistent with the D' or the system MAC of the switch in the MAC address set is inconsistent with the system MAC of the opposite terminal equipment corresponding to the address in the first information set, judging that the switch is connected with a wrong server.
In some embodiments, the method further comprises:
and if the interface of the opposite terminal equipment is different from the interface number of the address in the MAC address set, judging that the switch is connected with the wrong interface of the server.
In some embodiments, the IMPI information comprises at least one of: IMPI address, IMPI username, IMPI password.
In some embodiments, the server information further includes a server network card MAC address and a hostname.
In some embodiments, the link information further comprises: and accessing the system MAC address, the port number and the login information of the TOR of the switch.
The embodiment of the present invention further provides a device for determining a link between a switch and a server, including:
the system comprises an acquisition module, a first information set and a second information set, wherein the acquisition module is used for acquiring link information and server information from a server to obtain the first information set, the server information comprises a server serial number and intelligent platform management interface (IMPI) information, and the link information comprises a system MAC of opposite-end equipment corresponding to a network card MAC address of the server; acquiring an MAC table from a switch to form an MAC address set, wherein the MAC address set comprises at least one address and a system MAC of the switch;
a selection module for selecting an address from the MAC address set;
a judging module, configured to judge whether the address is in the first information set, if so, obtain a server serial number D and IMPI information corresponding to the address from the first information set, and obtain a server serial number D' connected to the switch according to the IMPI information; if D is consistent with D' and the system MAC of the switch in the MAC address set is consistent with the system MAC of the opposite terminal equipment corresponding to the address in the first information set, judging that the switch is connected with a correct server;
a deletion module to delete the address from the MAC address set.
In some embodiments, the determining module is further configured to obtain, from the first information set, an interface of an opposite-end device corresponding to the address if it is determined that the switch is connected to a correct server, and determine that the switch is connected to the correct interface of the server if the interface of the opposite-end device is the same as the interface number of the address in the MAC address set.
In some embodiments, the determining module is further configured to determine that the switch is connected to the wrong server if D is inconsistent with D' or the system MAC of the switch in the MAC address set is inconsistent with the system MAC of the peer device corresponding to the address in the first information set.
In some embodiments, the determining module is further configured to determine that the switch is connected to the wrong interface of the server if the interface of the peer device is different from the interface number of the address in the MAC address set.
In some embodiments, the IMPI information comprises at least one of: IMPI address, IMPI username, IMPI password.
In some embodiments, the server information further includes a server network card MAC address and a hostname.
In some embodiments, the link information further comprises: and accessing the system MAC address, the port number and the login information of the TOR of the switch.
The embodiment of the invention also provides a device for judging the link between the switch and the server, which comprises a memory, a processor and a computer program, wherein the computer program is stored on the memory and can run on the processor; the processor implements the method for determining a link between the switch and the server as described above when executing the program.
An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps in the method for determining a link between a switch and a server as described above.
The embodiment of the invention has the following beneficial effects:
in the above scheme, the link information and the server information are acquired from the server to form the first information set, the MAC address set is acquired from the switch, and whether the switch is connected with the correct server can be judged by comparing the information of the MAC address set with the information in the first information set.
Drawings
Fig. 1 is a schematic diagram of LLDP information of an interface on a switch;
FIG. 2 is a schematic diagram of a network for performing automated testing of hardware integration;
fig. 3 is a flowchart illustrating a method for determining a link between a switch and a server according to an embodiment of the present invention;
fig. 4 is a flowchart illustrating a method for determining a link between a switch and a server according to an embodiment of the present invention;
FIG. 5 is a diagram of a MAC address table according to an embodiment of the invention;
fig. 6 is a block diagram of a link determining apparatus between a switch and a server according to an embodiment of the present invention;
fig. 7 is a schematic diagram illustrating a link determining apparatus between a switch and a server according to an embodiment of the present invention.
Detailed Description
In order to make the technical problems, technical solutions and advantages to be solved by the embodiments of the present invention clearer, the following detailed description will be given with reference to the accompanying drawings and specific embodiments.
The embodiment of the invention provides a method and a device for judging a link between a switch and a server, which can judge the link between the switch and the server without using a network protocol.
An embodiment of the present invention provides a method for determining a link between a switch and a server, as shown in fig. 3, including:
an obtaining step 101, configured to obtain link information and server information from a server to obtain a first information set, where the server information includes a server serial number and IMPI information of an intelligent platform management interface, and the link information includes a system MAC of an opposite device corresponding to a network card MAC address of the server; acquiring an MAC table from a switch to form an MAC address set, wherein the MAC address set comprises at least one address and a system MAC of the switch;
a selecting step 102, for selecting an address from the MAC address set;
a judging step 103, configured to judge whether the address is located in the first information set, if so, obtain a server serial number D and IMPI information corresponding to the address from the first information set, and obtain a server serial number D' connected to the switch according to the IMPI information; if D is consistent with D' and the system MAC of the switch in the MAC address set is consistent with the system MAC of the opposite terminal equipment corresponding to the address in the first information set, judging that the switch is connected with a correct server;
if the address is in the first set of information, the address is a link that needs to be detected.
A deletion step 104 of deleting the address from the MAC address set, and turning to the selection step.
Repeating the selecting step and the deleting step until the MAC address set is empty, and finishing the link detection of one switch.
In this embodiment, the link information and the server information are acquired from the server to form a first information set, the MAC address set is acquired from the switch, and whether the switch is connected to the correct server can be determined by comparing the information of the MAC address set with the information in the first information set.
The technical scheme of the embodiment can be applied to a program execution machine, and can realize the detection of whether the switch is currently connected with a correct server or not and whether the switch is connected with a correct interface of the correct server or not.
In some embodiments, the MAC address set further includes interface numbers of the switches, the link information further includes a local interface number corresponding to the MAC address of the network card of the server and an interface number of the peer device, and the determining step further includes:
if the switch is judged to be connected with a correct server, acquiring an interface of opposite-end equipment corresponding to the address from the first information set, and if the interface of the opposite-end equipment is the same as the interface number of the address in the MAC address set, judging that the switch is connected with the correct interface of the server.
In some embodiments, the method further comprises:
and if the D is inconsistent with the D' or the system MAC of the switch in the MAC address set is inconsistent with the system MAC of the opposite terminal equipment corresponding to the address in the first information set, judging that the switch is connected with a wrong server.
In some embodiments, the method further comprises:
and if the interface of the opposite terminal equipment is different from the interface number of the address in the MAC address set, judging that the switch is connected with the wrong interface of the server.
In some embodiments, the IMPI information comprises at least one of: IMPI address, IMPI username, IMPI password.
In some embodiments, the server information further includes a server network card MAC address and a hostname.
In some embodiments, the link information further comprises: and accessing the system MAC address, the port number and the login information of the TOR of the switch.
The technical solution of the present invention is further described with reference to the accompanying drawings and specific embodiments, as shown in fig. 4, the embodiment includes the following steps:
(1) the collected server information and link information are stored in a file in a format, which is not limited, and is typically xml or json. Assuming that the collected server information and link information are stored in the file a, the server information includes: the server comprises an IMPI address, an IMPI user name, an IMPI password (other protocol information such as redfish can be adopted, and the protocols are all used for acquiring server information, namely acquiring the real serial number of a server), a server network card MAC address, a hostname and a server serial number; the link information includes: the network interface of the local terminal corresponding to the MAC address of the network card of the server, the interface of the opposite terminal equipment, the system MAC or the system name of the opposite terminal equipment, login information and the like. In order to simplify the flow, this embodiment only counts the links between the access switch and the server, and does not count other links, and this step may be performed on the program execution machine.
(2) The program execution machine reads the switch login information in a certain link record in the file A and logs in an access switch (a service network indicated by a solid line of a network schematic diagram), obtains the system name or system MAC of the switch, and simultaneously obtains the content of a switch MAC table and forms an MAC address set. The MAC set is characterized by only learning information about which MAC is learned at which port, but not about which device the learned MAC address is on, as shown in fig. 5.
(3) Judging whether the MAC address set is empty or not, directly jumping to finish if the MAC address set is empty, and otherwise, executing the step (4);
(4) reading a data from the MAC address set, that is, obtaining a MAC address, which can be recorded as MAC B;
(5) judging whether the MAC B is contained in the file A in the step (1), if so, turning to the step (6), otherwise, deleting the address B from the MAC address set and jumping to the step (3);
in this embodiment, detection is performed only on a link that needs to be detected, and if the MAC B is not in the file a, it is described that the link where the MAC address is located is not a link that needs to be detected, such as a link between an access switch and an aggregation switch.
(6) Reading corresponding server information in the step (1) through the MAC B;
and (2) reading host information, namely server information, corresponding to the local terminal information, namely MAC B in the step (1), through MAC B, wherein the host information, namely the server information comprises server serial number information D (recorded in the file A), IMPI information E (comprising a user name, a password, an address and the like) and the like.
(7) The program executive machine reads the real serial number information D' of the server through the IMPI information E in the step (6);
specifically, if the link between server a and TOR a is determined this time, the program execution machine obtains the real serial number of server a through IMPI protocol through the management network among TOR C, the intermediate network, TOR B, and server a. That is, the present embodiment is not limited to processing and comparing data in only one network plane.
(8) Judging whether D is equal to D' or not and whether the system MAC of the switch read in the step (2) is the same as that in the information A or not, and if yes, jumping to (9); the two comparisons are different, and both record the server information record error (possibly sequence number record error, also IMPI information record error, also switch information error) of the MAC, the current link connection error, and jump to the step (10);
in addition, the method also solves or shields the scene that the acquired system name is not unique.
(9) Reading the corresponding link information in the step (1) through the MAC B, namely judging whether the interface of the opposite terminal device corresponding to the MAC B read from the information A is the same as the interface corresponding to the MAC B in the MAC address set, and jumping to the step (11) if the interface is the same, otherwise, recording that the link device is connected correctly but the port is connected incorrectly, and jumping to the step (12);
in this embodiment, the device information of the peer device does not need to be verified, because the link determination is started by logging in the switch of the peer and acquiring the MAC learned by the switch in this embodiment.
(10) If the host information of the MAC B is recorded wrongly, the link where the MAC B is located is connected wrongly, and the step (13) is skipped;
(11) the link where the MAC B is located is correctly connected, that is, the link is an interface where the network port of the server with the sequence number D (the MAC address is MAC B) is connected to the access switch of the opposite end (the interface is an interface corresponding to MAC B in the MAC table of the TOR), and the step (13) is skipped;
(12) the link where the MAC B is located is connected with an error, the MAC B is connected with an error port, and the step (13) is skipped;
(13) removing the link information of the address B from the file A, and updating the link information of the MAC B in a file A';
(14) and (4) judging whether the A is empty or not, if not, deleting the address B from the MAC address set and jumping to the step (3), and if so, finishing all judgments.
The link detection for one switch can be completed through the steps. In this embodiment, the obtained server serial number is unique, and thus the method is suitable for a scenario in which the hostname of the server cannot be obtained, and is also suitable for a scenario in which the storage server is provided with an operating system. The embodiment not only judges the correctness of the MAC address host information, but also judges the correctness of the opposite terminal interface connected with the MAC address.
An embodiment of the present invention further provides an apparatus for determining a link between a switch and a server, as shown in fig. 6, including:
an obtaining module 21, configured to obtain link information and server information from a server to obtain a first information set, where the server information includes a server serial number and IMPI information of an intelligent platform management interface, and the link information includes a system MAC of an opposite device corresponding to a network card MAC address of the server; acquiring an MAC table from a switch to form an MAC address set, wherein the MAC address set comprises at least one address and a system MAC of the switch;
a selection module 22, configured to select an address from the MAC address set;
a judging module 23, configured to judge whether the address is located in the first information set, if so, obtain a server serial number D and IMPI information corresponding to the address from the first information set, and obtain a server serial number D' connected to the switch according to the IMPI information; if D is consistent with D' and the system MAC of the switch in the MAC address set is consistent with the system MAC of the opposite terminal equipment corresponding to the address in the first information set, judging that the switch is connected with a correct server;
a deleting module 24 configured to delete the address from the MAC address set.
In this embodiment, the link information and the server information are acquired from the server to form a first information set, the MAC address set is acquired from the switch, and whether the switch is connected to the correct server can be determined by comparing the information of the MAC address set with the information in the first information set.
In some embodiments, the determining module 23 is further configured to obtain, from the first information set, an interface of an opposite end device corresponding to the address if it is determined that the switch is connected to a correct server, and determine that the switch is connected to the correct interface of the server if the interface of the opposite end device is the same as the interface number of the address in the MAC address set.
In some embodiments, the determining module 23 is further configured to determine that the switch is connected to the wrong server if D is inconsistent with D' or the system MAC of the switch in the MAC address set is inconsistent with the system MAC of the peer device corresponding to the address in the first information set.
In some embodiments, the determining module 23 is further configured to determine that the switch is connected to the wrong interface of the server if the interface of the peer device is different from the interface number of the address in the MAC address set.
In some embodiments, the IMPI information comprises at least one of: IMPI address, IMPI username, IMPI password.
In some embodiments, the server information further includes a server network card MAC address and a hostname.
In some embodiments, the link information further comprises: and accessing the system MAC address, the port number and the login information of the TOR of the switch.
An embodiment of the present invention further provides a device for determining a link between a switch and a server, as shown in fig. 7, including a memory 31, a processor 32, and a computer program stored on the memory 31 and executable on the processor 32; when the processor executes the program, the method for determining a link between the switch and the server according to the embodiment is implemented, and details are not described here.
An embodiment of the present invention also provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps in the method for determining a link between a switch and a server as described above.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
While the foregoing is directed to the preferred embodiment of the present invention, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A method for judging a link between a switch and a server is characterized by comprising the following steps:
the method comprises an obtaining step, a first information set and a second information set, wherein the obtaining step is used for obtaining link information and server information from a server, the server information comprises a server serial number and intelligent platform management interface (IMPI) information, and the link information comprises a system MAC of opposite terminal equipment corresponding to a server network card MAC address; acquiring an MAC table from a switch to form an MAC address set, wherein the MAC address set comprises at least one address and a system MAC of the switch;
a selection step for selecting an address from the MAC address set;
a judging step, configured to judge whether the address is located in the first information set, if so, obtain a server serial number D and IMPI information corresponding to the address from the first information set, and obtain a server serial number D' connected to the switch according to the IMPI information; if D is consistent with D' and the system MAC of the switch in the MAC address set is consistent with the system MAC of the opposite terminal equipment corresponding to the address in the first information set, judging that the switch is connected with a correct server;
a deletion step for deleting the address from the MAC address set, and turning to the selection step.
2. The method according to claim 1, wherein the MAC address set further includes interface numbers of the switches, the link information further includes a local interface number corresponding to the MAC address of the network card of the server and an interface number of the peer device, and the determining step further includes:
if the switch is judged to be connected with a correct server, acquiring an interface of opposite-end equipment corresponding to the address from the first information set, and if the interface of the opposite-end equipment is the same as the interface number of the address in the MAC address set, judging that the switch is connected with the correct interface of the server.
3. The method of claim 1, further comprising:
and if the D is inconsistent with the D' or the system MAC of the switch in the MAC address set is inconsistent with the system MAC of the opposite terminal equipment corresponding to the address in the first information set, judging that the switch is connected with a wrong server.
4. The method of claim 2, further comprising:
and if the interface of the opposite terminal equipment is different from the interface number of the address in the MAC address set, judging that the switch is connected with the wrong interface of the server.
5. The method of claim 1, wherein the IMPI information comprises at least one of: IMPI address, IMPI username, IMPI password.
6. The method of claim 1, wherein the server information further includes a server network card MAC address and a hostname.
7. The method of claim 1, wherein the link information further comprises: and accessing the system MAC address, the port number and the login information of the TOR of the switch.
8. An apparatus for determining a link between a switch and a server, comprising:
the system comprises an acquisition module, a first information set and a second information set, wherein the acquisition module is used for acquiring link information and server information from a server to obtain the first information set, the server information comprises a server serial number and intelligent platform management interface (IMPI) information, and the link information comprises a system MAC of opposite-end equipment corresponding to a network card MAC address of the server; acquiring an MAC table from a switch to form an MAC address set, wherein the MAC address set comprises at least one address and a system MAC of the switch;
a selection module for selecting an address from the MAC address set;
a judging module, configured to judge whether the address is in the first information set, if so, obtain a server serial number D and IMPI information corresponding to the address from the first information set, and obtain a server serial number D' connected to the switch according to the IMPI information; if D is consistent with D' and the system MAC of the switch in the MAC address set is consistent with the system MAC of the opposite terminal equipment corresponding to the address in the first information set, judging that the switch is connected with a correct server;
a deletion module to delete the address from the MAC address set.
9. A device for judging a link between a switch and a server comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor; characterized in that the processor, when executing the program, implements the method for determining a link between a switch and a server according to any of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, carries out the steps of the method for determining a link between a switch and a server according to any one of claims 1 to 7.
CN202010685560.0A 2020-07-16 2020-07-16 Method and device for judging link between switch and server Active CN114006822B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010685560.0A CN114006822B (en) 2020-07-16 2020-07-16 Method and device for judging link between switch and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010685560.0A CN114006822B (en) 2020-07-16 2020-07-16 Method and device for judging link between switch and server

Publications (2)

Publication Number Publication Date
CN114006822A true CN114006822A (en) 2022-02-01
CN114006822B CN114006822B (en) 2024-06-04

Family

ID=79920204

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010685560.0A Active CN114006822B (en) 2020-07-16 2020-07-16 Method and device for judging link between switch and server

Country Status (1)

Country Link
CN (1) CN114006822B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115185759A (en) * 2022-09-05 2022-10-14 平安银行股份有限公司 LLDP-based server wiring verification method, device and system

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101044917B1 (en) * 2010-10-12 2011-06-28 주식회사 에이씨앤티시스템 Network switch system for checking link connection state and switch included in the same
US20120294192A1 (en) * 2011-05-19 2012-11-22 Hitachi, Ltd. Method and apparatus of connectivity discovery between network switch and server based on vlan identifiers
CN103428034A (en) * 2013-08-23 2013-12-04 浪潮电子信息产业股份有限公司 Mounting position checking method for servers in batches
WO2016169121A1 (en) * 2015-04-20 2016-10-27 华为技术有限公司 Link analysis method, device and system
US20160359982A1 (en) * 2015-06-08 2016-12-08 Quanta Computer Inc. Server link state detection and notification
CN109587005A (en) * 2018-12-26 2019-04-05 华为技术服务有限公司 Connecting detection method, apparatus, computer equipment and readable storage medium storing program for executing
CN110430265A (en) * 2019-08-06 2019-11-08 北京奇艺世纪科技有限公司 A kind of method and device obtaining server and inter-exchange corresponding relationship
CN110806946A (en) * 2019-11-01 2020-02-18 华云超融合科技有限公司 Detection method, device, server and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101044917B1 (en) * 2010-10-12 2011-06-28 주식회사 에이씨앤티시스템 Network switch system for checking link connection state and switch included in the same
US20120294192A1 (en) * 2011-05-19 2012-11-22 Hitachi, Ltd. Method and apparatus of connectivity discovery between network switch and server based on vlan identifiers
CN103428034A (en) * 2013-08-23 2013-12-04 浪潮电子信息产业股份有限公司 Mounting position checking method for servers in batches
WO2016169121A1 (en) * 2015-04-20 2016-10-27 华为技术有限公司 Link analysis method, device and system
US20160359982A1 (en) * 2015-06-08 2016-12-08 Quanta Computer Inc. Server link state detection and notification
CN109587005A (en) * 2018-12-26 2019-04-05 华为技术服务有限公司 Connecting detection method, apparatus, computer equipment and readable storage medium storing program for executing
CN110430265A (en) * 2019-08-06 2019-11-08 北京奇艺世纪科技有限公司 A kind of method and device obtaining server and inter-exchange corresponding relationship
CN110806946A (en) * 2019-11-01 2020-02-18 华云超融合科技有限公司 Detection method, device, server and storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115185759A (en) * 2022-09-05 2022-10-14 平安银行股份有限公司 LLDP-based server wiring verification method, device and system

Also Published As

Publication number Publication date
CN114006822B (en) 2024-06-04

Similar Documents

Publication Publication Date Title
CN108132663A (en) The analytic method of vehicle trouble messages, device and system
US7571239B2 (en) Credential management and network querying
CN113472607B (en) Application program network environment detection method, device, equipment and storage medium
CN107948943A (en) The recognition methods of rete mirabile card and server in double-terminal
CN109873737B (en) Test method and device
CN109428783B (en) Network equipment testing method and device
CN116204438A (en) Test case generation method, automatic test method and related device
CN114006822B (en) Method and device for judging link between switch and server
CN111355740A (en) Method for rapidly and conveniently detecting firewall configuration
CN113301155B (en) Data routing method, device, equipment and storage medium
CN111181808B (en) Method and system for testing BMC IP access control
CN117271178A (en) Parameter configuration method and board fault diagnosis method
CN112600703A (en) Network equipment remote access fault positioning method and device
CN116841645A (en) Database flow processing method and system for database audit
CN106899429B (en) SNMP-based equipment management method and device
CN116566873A (en) ELK-based automatic log analysis method, system and storage medium
CN114443381A (en) Method, device, equipment and medium for checking server configuration
CN109039770B (en) Server CMC refreshing method and device and related equipment
CN113448745A (en) Service request tracking method and device and electronic equipment
CN116795724B (en) Method, system, equipment and medium for testing unmanned aerial vehicle loading equipment software interface
CN115065613B (en) Network connectivity analysis system and analysis method based on firewall configuration
CN108763008A (en) A kind of server storage hard disk performance batch testing system, server and method
CN113098904B (en) Communication method and device of network equipment
CN113849364B (en) Edge application management method, device, equipment and readable storage medium
CN113271235B (en) Fuzzy test method and device for network traffic, storage medium and processor

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
GR01 Patent grant
GR01 Patent grant