CN114006822B - Method and device for judging link between switch and server - Google Patents
Method and device for judging link between switch and server Download PDFInfo
- Publication number
- CN114006822B CN114006822B CN202010685560.0A CN202010685560A CN114006822B CN 114006822 B CN114006822 B CN 114006822B CN 202010685560 A CN202010685560 A CN 202010685560A CN 114006822 B CN114006822 B CN 114006822B
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 36
- 238000004590 computer program Methods 0.000 claims description 6
- 238000012545 processing Methods 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 8
- 230000009191 jumping Effects 0.000 description 5
- 238000012360 testing method Methods 0.000 description 5
- 230000006978 adaptation Effects 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 230000010354 integration Effects 0.000 description 3
- 230000005540 biological transmission Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 241001290266 Sciaenops ocellatus Species 0.000 description 1
- 230000002776 aggregation Effects 0.000 description 1
- 238000004220 aggregation Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/12—Discovery or management of network topologies
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address 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 judging method of the link between the switch and the server comprises the following steps: obtaining 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 system MAC of the switch; selecting an address from the set of MAC addresses; judging whether the address is in a 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; if D and D' are consistent and the system MAC of the switch in the MAC address set is consistent with the system MAC of the opposite end device in the first information set, the switch is judged to be connected with the correct server. The technical scheme of the invention can judge the link between the switch and the server without using a network protocol.
Description
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 links between the switch and the server are reachable or not affects the subsequent software installation is particularly important in the automated testing process, and if a problem occurs in a certain link between the server and the switch, the scenario that the automated deployment needs to involve multiple devices and has a relatively long time is fatal to the automated testing process. Therefore, an automatic inspection of the link at the time of hardware integration is necessary. The link checking generally comprises two steps, namely logging in two devices, namely checking whether the connected opposite terminal device is correct or not, and checking whether the connected interface is correct or not; or sometimes, it is verified whether the connected interface is correct or not, and then it is verified whether the device where the connected interface is located is correct or not. Among them, the switch connected to the server is generally called an access switch, and is abbreviated as TOR.
The general link judgment is to use a method of link judgment between two switches, to start a certain network protocol, such as a link layer discovery protocol (LINK LAYER Discovery Protocol, LLDP), on the two switches, and then to verify the information learned by the protocol, such as verifying whether the learned device is a device in the collected information, whether the interface where the learned MAC address is located is an interface in the collected information, and verifying whether the local port in the collected information is consistent with the view. The LLDP protocol is used because the link determination by using the information learned by another protocol requires one more step to determine whether the device is directly connected. Such algorithms can be consulted for links of switches and servers. Fig. 1 is a view of LLDP information of a certain interface on a switch. The link between two switches can be judged by directly comparing the information on the switches with the collected link information.
Fig. 2 is a schematic diagram of a network for performing hardware integrated automation testing, where two networks are taken as an example. Wherein, the solid line is the service network, the broken line is the management network, TOR a is the access switch of the service network, TOR B and TOR C are the access switches of the management network, and the service network and the management network are three-layer reachable.
The prior art uses a network protocol to make a link judgment between switches, but such a manner cannot be fully applied to a link judgment 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 an LLDP-related package and corresponding driver are required to be installed on the server. Even though the LLDP module is installed on the server, adaptation and compatibility test are required for the LLDP protocol on the network device and the LLDP protocol module installed on the server.
(2) With the LLDP protocol, there are also situations where the acquired information of the server is incomplete, for example, the MAC address of the network card of the server can be learned on TOR, but the system information and the peer interface information of the server cannot be acquired.
(3) In addition, even if a hostname (hostname) is acquired, if the hostname is not unique (may be a design problem or may be 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 no LLDP protocol is installed, the LLDP protocol needs to be additionally and independently installed on all the storage servers, and the difficulty of a hardware integration scheme is increased.
(5) The network devices are the same type of devices, and can interact information through a certain protocol. Different kinds of devices are arranged between the server and the switch, and it is difficult to exchange information through a certain common protocol.
Disclosure of Invention
The invention aims to provide 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.
In order to solve the technical problems, the embodiment of the invention provides the following technical scheme:
In one aspect, a method for determining a link between a switch and a server is provided, including:
The method comprises the steps of obtaining link information and server information from a server to obtain a first information set, wherein the server information comprises a server serial number and 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 system MAC of the switch;
A selecting step, for selecting an address from the MAC address set;
Judging, wherein the judging step is used for judging whether the address is 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; if D and D' are consistent and the system MAC of the exchanger 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 exchanger is connected with a correct server;
and deleting the address from the MAC address set, and turning to the selecting step.
In some embodiments, the MAC address set further includes each interface number of the switch, the link information further includes a local interface number corresponding to a MAC address of the server network card and an interface number of the peer device, and the determining step further includes:
And if the switch is judged to be connected with a correct server, acquiring an interface of opposite terminal equipment corresponding to the address from the first information set, and if the interface of the opposite terminal 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 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 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 the 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 error 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 includes: system MAC address, port number, and login information of TOR of access switch.
The embodiment of the invention also provides a judging device of the link between the switch and the server, which comprises the following steps:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring link information and server information from a server to obtain a 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 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 system MAC of the switch;
a selection module for selecting an address from the set of MAC addresses;
The judging module is used for judging whether the address is 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; if D and D' are consistent and the system MAC of the exchanger 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 exchanger is connected with a correct server;
and the deleting module is used for deleting the address from the MAC address set.
In some embodiments, the judging module is further configured to obtain, from the first information set, an interface of the peer device corresponding to the address if it is determined that the switch is connected to the correct server, and determine that the switch is connected to the correct interface of the server if the interface of the peer device is the same as the interface number of the address in the MAC address set.
In some embodiments, the judging module is further configured to judge that the switch is connected to the wrong server if 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 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 judging module is further configured to judge 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 includes: system MAC address, port number, and login information of TOR of access switch.
The embodiment of the invention also provides a judging device of the link between the switch and the server, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor; the processor, when executing the program, implements the method for determining the link between the switch and the server as described above.
Embodiments of the present invention also provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps in the method of 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 by comparing the information of the MAC address set with the information in the first information set, it can be determined whether the switch is connected with the correct server.
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 flow chart of a method for determining a link between a switch and a server according to an embodiment of the present invention;
fig. 4 is a flow chart of 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 device for determining a link between a switch and a server according to an embodiment of the present invention;
Fig. 7 is a schematic diagram of a device for determining a link 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 more apparent, the following detailed description will be given with reference to the accompanying drawings and the 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.
The embodiment of the invention provides a method for judging a link between a switch and a server, as shown in fig. 3, comprising the following steps:
An obtaining step 101, configured to obtain link information and server information from a server, where the server information includes a server serial number and intelligent platform management interface IMPI information, and the link information includes a system MAC of a peer device 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 system MAC of the switch;
a selecting step 102, configured to select an address from the MAC address set;
A judging step 103, configured to judge whether the address is in the first information set, and if yes, acquire a server serial number D and IMPI information corresponding to the address from the first information set, and acquire a server serial number D' connected to the switch according to the IMPI information; if D and D' are consistent and the system MAC of the exchanger 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 exchanger is connected with a correct server;
If the address is in the first set of information, the address is the link that needs to be detected.
And a deleting step 104 of deleting the address from the MAC address set, and turning to the selecting step.
And repeating the selecting step and the deleting step until the MAC address set is empty, and completing 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 by comparing the information of the MAC address set with the information in the first information set, it can be determined whether the switch is connected with a correct server.
The technical scheme of the embodiment can be applied to a program execution machine, and can realize detection of whether the switch is 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 each interface number of the switch, the link information further includes a local interface number corresponding to a MAC address of the server network card and an interface number of the peer device, and the determining step further includes:
And if the switch is judged to be connected with a correct server, acquiring an interface of opposite terminal equipment corresponding to the address from the first information set, and if the interface of the opposite terminal 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 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 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 the 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 error 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 includes: system MAC address, port number, and login information of TOR of access switch.
The technical solution of the present invention will be further described with reference to the accompanying drawings and specific embodiments, as shown in fig. 4, where the embodiment includes the following steps:
(1) The collected server information and link information are stored in a file in some format, but not limited to, xml or json. Assuming that the collected server information and link information are stored in the file a, the server information is: an IMPI address, an IMPI username, an IMPI password (other protocol information may be used, such as redfish, which is used to obtain server information, specifically, obtain a real serial number of a server), a server network card MAC address, a hostname, and a server serial number; the link information is: the network port of the home terminal corresponding to the MAC address of the server network card, the interface of the opposite terminal equipment, the system MAC or 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 executing machine reads the switch login information in a certain link record in the file A and logs in an access switch (a service network represented by a solid line of a network schematic diagram), acquires the system name or the system MAC of the switch, and simultaneously acquires the content of a switch MAC table and forms a MAC address set. The MAC set is characterized by the information of which MAC is learned only at which port, and not at which device this learned MAC address is, as shown in fig. 5.
(3) Judging whether the MAC address set is empty or not, if so, directly jumping to completion, otherwise, executing the step (4);
(4) Reading a data item from the MAC address set, namely obtaining an MAC address which can be marked as an MAC B;
(5) Judging whether the MAC B is contained in the file A in the step (1), if yes, turning to the step (6), otherwise deleting the address B from the MAC address set and turning to the step (3);
In this embodiment, only the link to be detected is detected, and if the MAC B is not in the file a, it is indicated that the link where the MAC address is located is not the link to be detected, such as the link between the access switch and the aggregation switch.
(6) Reading corresponding server information in the step (1) through the MAC B;
The host information, namely server information, corresponding to the local information, namely MAC B in the step (1) is read through the MAC B, and the host information comprises server serial number information D (recorded in a file A), IMPI information E (comprising a user name, a password, an address and the like) and the like.
(7) The program execution machine reads the real serial number information D' of the server through the IMPI information E in the step (6);
the step is performed through the management network of the network schematic diagram, specifically, if the link between the server a and the TOR a is determined at this time, the program execution machine obtains the real serial number of the server a through the IMPI protocol through the management network among the TOR C, the intermediate network, the TOR B and the server a. That is, the present embodiment is not limited to processing and comparing data in one network plane.
(8) Determining whether D is equal to D' and whether the system MAC of the switch read in the step (2) is the same as that in the information A, and if so, jumping to the step (9); the two comparisons are different, the server information recording error (the serial number recording error, the IMPI information recording error or the exchanger information recording error) where the MAC is positioned is recorded, the current link connection error is skipped to the step (10);
In addition, the scene with the non-unique acquired system name is also solved or shielded in the step.
(9) Reading the corresponding link information in the step (1) through the MAC B, namely judging whether the interfaces of the opposite terminal equipment corresponding to the MAC B read from the information A are the same as the interfaces corresponding to the MAC B in the MAC address set, if so, jumping to the step (11), otherwise, recording that the link equipment is correctly connected, but the port connection is wrong, and jumping to the step (12);
in this embodiment, the device information of the peer device is not required to be verified, because the present embodiment starts the link determination by logging in the switch of the peer device and acquiring the MAC learned by the switch.
(10) The host information of the MAC B records errors, the link where the host information is connected is wrong, and the step (13) is skipped;
(11) The link where the MAC B is located is connected correctly, namely, the link is the interface (the interface is the interface corresponding to the MAC B in the MAC table of the TOR) of the access switch of the network port (the MAC address is the MAC B) connection opposite end of the server with the serial number of D, and the step (13) is skipped;
(12) The link where the MAC B is positioned is connected with the wrong port, and the step (13) is skipped;
(13) Removing link information of the address B from the file A, and updating the link information of the MAC B in the file A';
(14) And (3) judging whether the A is empty or not, deleting the address B from the MAC address set if the A is not empty, jumping to the step (3), and finishing all the judgment if the A is empty.
The link detection for a switch can be completed through the steps. In this embodiment, the acquired server serial number is unique, so that the method is suitable for a scenario in which the server hostname is not acquired, and is also suitable for a scenario in which the storage server has an operating system. The embodiment not only judges the correctness of the information of the host machine of the MAC address, but also judges the correctness of the interface of the opposite end connected with the MAC address.
The embodiment of the invention also provides a device for judging the link between the switch and the server, as shown in fig. 6, comprising:
An obtaining module 21, configured to obtain link information and server information from a server, where the server information includes a server serial number and intelligent platform management interface IMPI information, and the link information includes a system MAC of a peer device 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 system MAC of the switch;
a selection module 22 for selecting an address from the set of MAC addresses;
A judging module 23, configured to judge whether the address is in the first information set, and if yes, acquire a server serial number D and IMPI information corresponding to the address from the first information set, and acquire a server serial number D' connected to the switch according to the IMPI information; if D and D' are consistent and the system MAC of the exchanger 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 exchanger 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 by comparing the information of the MAC address set with the information in the first information set, it can be determined whether the switch is connected with a correct server.
In some embodiments, the determining module 23 is further configured to, if it is determined that the switch is connected to a correct server, obtain, from the first set of information, an interface of a peer device corresponding to the address, and if the interface of the peer device is the same as the interface number of the address in the MAC address set, determine that the switch is connected to the correct interface of the server.
In some embodiments, the determining module 23 is further configured to determine that the switch is connected to the wrong server if the system MAC of the switch in the MAC address set is inconsistent with D ' or the system MAC of the peer device corresponding to the address in the first information set is inconsistent with D ' or D '.
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 includes: system MAC address, port number, and login information of TOR of access switch.
The embodiment of the invention also provides a judging device of the link between the switch and the server, as shown in fig. 7, comprising a memory 31, a processor 32 and a computer program stored on the memory 31 and capable of running on the processor 32; the processor implements the method for determining the link between the switch and the server according to the foregoing embodiment when executing the program, which is not described herein.
Embodiments of the present invention also provide a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps in the method of 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 storage media for a computer 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, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
While the foregoing is directed to the preferred embodiments of the present invention, it will be appreciated by those skilled in the art that various modifications and adaptations can be made without departing from the principles of the present invention, and such modifications and adaptations are intended to be comprehended within the scope of the present invention.
Claims (10)
1. A method for determining a link between a switch and a server, comprising:
The method comprises the steps of obtaining link information and server information from a server to obtain a first information set, wherein the server information comprises a server serial number and 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 system MAC of the switch;
A selecting step, for selecting an address from the MAC address set;
Judging, wherein the judging step is used for judging whether the address is 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; if D and D' are consistent and the system MAC of the exchanger 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 exchanger is connected with a correct server;
And deleting the address from the MAC address set, and turning to the selecting step.
2. The method according to claim 1, wherein the MAC address set further includes each interface number of the switch, the link information further includes a local interface number corresponding to a MAC address of the server network card and an interface number of the peer device, and the determining step further includes:
And if the switch is judged to be connected with a correct server, acquiring an interface of opposite terminal equipment corresponding to the address from the first information set, and if the interface of the opposite terminal 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 for determining a link between a switch and a server according to claim 1, further comprising:
and if 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 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 the wrong server.
4. The method for determining a link between a switch and a server according to 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 error interface of the server.
5. The method for determining a link between a switch and a server according to claim 1, wherein the IMPI information includes at least one of: IMPI address, IMPI username, IMPI password.
6. The method according to claim 1, wherein the server information further includes a server network card MAC address and a hostname.
7. The method for determining a link between a switch and a server according to claim 1, wherein the link information further comprises: system MAC address, port number, and login information of TOR of access switch.
8. A device for determining a link between a switch and a server, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring link information and server information from a server to obtain a 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 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 system MAC of the switch;
a selection module for selecting an address from the set of MAC addresses;
The judging module is used for judging whether the address is 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; if D and D' are consistent and the system MAC of the exchanger 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 exchanger is connected with a correct server;
and the deleting module is used for deleting the address from the MAC address set.
9. A judging device of a link between a switch and a server comprises a memory, a processor and a computer program which is stored in the memory and can run on the processor; the method according to any one of claims 1 to 7, characterized in that the processor, when executing the program, implements a method for determining a link between a switch and a server.
10. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements the steps in the method of determining a link between a switch and a server according to any one of claims 1-7.
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 CN114006822A (en) | 2022-02-01 |
CN114006822B true 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) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN115185759B (en) * | 2022-09-05 | 2023-09-29 | 平安银行股份有限公司 | Method, device and system for checking server wiring based on LLDP |
Citations (6)
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 |
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 |
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 |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
US10298435B2 (en) * | 2015-06-08 | 2019-05-21 | Quanta Computer Inc. | Server link state detection and notification |
-
2020
- 2020-07-16 CN CN202010685560.0A patent/CN114006822B/en active Active
Patent Citations (6)
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 |
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 |
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 |
Also Published As
Publication number | Publication date |
---|---|
CN114006822A (en) | 2022-02-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113572645B (en) | Method, device, storage medium and processor for generating network topology | |
CN110677292A (en) | Optical interface rate configuration method and device | |
CN114006822B (en) | Method and device for judging link between switch and server | |
CN109428783B (en) | Network equipment testing method and device | |
CN109873737B (en) | Test method and device | |
CN116204438A (en) | Test case generation method, automatic test method and related device | |
CN115542875A (en) | Vehicle detection method based on SOA service and related equipment | |
CN112333758B (en) | Stability monitoring management method, system and application of television gateway system | |
CN116132268A (en) | Control method and system for managing multiple nodes based on CANopen master station | |
CN101510172B (en) | Test system and 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 | |
CN113538725B (en) | Method for testing hardware products and related equipment | |
CN111740881B (en) | Network card link detection method, system, equipment and computer storage medium | |
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 | |
CN111625449A (en) | File filtering rule testing method, device, equipment and readable storage medium | |
CN115065613B (en) | Network connectivity analysis system and analysis method based on firewall configuration | |
CN117520129B (en) | Data center equipment monitoring method, device, equipment and medium | |
CN117439871B (en) | Meter reading fault positioning method and device, storage medium and electronic equipment | |
CN113872639B (en) | Function test method of power line carrier module, electronic device and storage medium | |
CN116048615B (en) | Distributed program slicing method, device and equipment based on natural language processing | |
CN114241735B (en) | Method and system for high risk positioning of sensing data loading IP address in model | |
CN109358803B (en) | Abnormal idle storage analysis method, device and system |
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 |