CN116319407A - Line sequence detection method, device, system, equipment and storage medium for cabinet network line - Google Patents

Line sequence detection method, device, system, equipment and storage medium for cabinet network line Download PDF

Info

Publication number
CN116319407A
CN116319407A CN202211089153.9A CN202211089153A CN116319407A CN 116319407 A CN116319407 A CN 116319407A CN 202211089153 A CN202211089153 A CN 202211089153A CN 116319407 A CN116319407 A CN 116319407A
Authority
CN
China
Prior art keywords
port
detected
server node
current
ports
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211089153.9A
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 CN202211089153.9A priority Critical patent/CN116319407A/en
Publication of CN116319407A publication Critical patent/CN116319407A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0811Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/50Reducing energy consumption in communication networks in wire-line communication networks, e.g. low power modes or reduced link rate

Landscapes

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

Abstract

The invention discloses a line sequence detection method, device, system, equipment and storage medium for cabinet network cables, and relates to the technical field of servers. The method comprises the following steps: sequentially obtaining port numbers of one or more ports to be detected of a switch to be detected and MAC addresses corresponding to the one or more ports to be detected, and generating a port-MAC address relation log; initializing corresponding detection parameters; and in the port-MAC address relation log, sequentially taking the port numbers corresponding to the ports to be detected which are sequentially arranged as the current port numbers, and carrying out port U-bit detection and network card connection detection of the server node on the ports corresponding to the current port numbers. By implementing the line sequence detection method for the cabinet network line disclosed by the embodiment of the invention, the automation of line sequence detection of the network line can be realized, the production line test efficiency is improved, the labor cost is reduced, the product quality is improved, and the line sequence detection method is suitable for line sequence detection of a large number of cabinet network lines.

Description

Line sequence detection method, device, system, equipment and storage medium for cabinet network line
Technical Field
The present invention relates to the field of server technologies, and in particular, to a method, an apparatus, a system, a device, and a storage medium for detecting a line sequence of a cabinet network cable.
Background
With the development of server industry, the delivery of large data center servers gradually evolves from complete machine delivery to complete machine cabinet delivery. The whole cabinet delivery is a whole set of processes of server production, racking, switch installation, wiring, testing, packaging, transportation, installation and delivery. For suppliers, the whole cabinet delivery has greater cost and timeliness advantages than traditional whole cabinet delivery.
Then, the whole cabinet delivery means that the original machine room wiring work is moved forward to the production process, and the risk of the misconnection of the cables is also transferred to the production process while the delivery is convenient. Once a network cable is connected in a staggered manner, huge troubles are generated, extra barriers are brought to machine room operation and data management, and economic losses are caused. Therefore, in the production process of the whole cabinet, the line sequence inspection of the net wires is particularly important. The traditional line sequence checking method of the network cable is realized by the modes of personnel working such as labels, line hunting instruments and the like, has low working efficiency, has potential risks of errors and is not suitable for detection of mass production operation. Therefore, a method, a device, equipment and a readable storage medium for detecting the line sequence of the network cable of the cabinet are needed, the line sequence detection operation flow of the cabinet is adapted, the automatic detection of the line sequence of the network cable is realized, and the method, the device, the equipment and the readable storage medium are suitable for mass cabinet production detection operation while ensuring the accuracy of the line sequence detection.
Disclosure of Invention
In order to solve the prior art, the line sequence detection operation mode of the cabinet network cable is manually carried out, the error risk exists, the operation efficiency is low, and the problem that the detection of mass production operation is difficult to adapt to is solved. The embodiment of the invention provides a line sequence detection method, device, system, equipment and storage medium for cabinet network cables, which replace manual detection operation, have high accuracy and high compatibility with production line operation, and are suitable for mass cabinet production detection operation while ensuring line sequence detection accuracy.
In order to solve one or more of the above technical problems, the technical solution adopted by the present invention is as follows:
in a first aspect, a method for detecting a line sequence of a cabinet network cable is provided, including:
sequentially acquiring port numbers of one or more ports to be detected of a switch to be detected and MAC addresses corresponding to the one or more ports to be detected, and generating a port-MAC address relation log; the port to be detected is connected with a network card of the server through a network cable, and the port-MAC address relation log at least records: the port numbers corresponding to the ports to be detected, the MAC addresses corresponding to the ports to be detected and the U bits where the ports to be detected are located are sequentially arranged;
Initializing detection parameters for detecting network card connection of the port to be detected and a server node, wherein the detection parameters comprise: the temporary server node parameter is used for storing a server node number corresponding to the port to be detected, and the counter is used for detecting the network card connection between the port to be detected and the server node;
in the port-MAC address relation log, sequentially taking the port numbers corresponding to the ports to be detected which are sequentially arranged as the current port number, and carrying out port U-bit detection and network card connection detection of the server node on the ports corresponding to the current port number.
Further, sequentially obtaining port numbers of one or more target ports of the switch to be detected and MAC addresses corresponding to the one or more target ports, generating a port-MAC address relationship log, including:
according to the configuration of the cabinet where the switch to be detected is located, the manufacturer and the model of the switch to be detected are obtained from the material table, wherein the configuration at least comprises: hardware information of the switch to be detected, hardware information of one or more servers connected with the switch to be detected through a network cable, and at least the following description of a material table: manufacturer of switch to be detected, model of switch to be detected;
Acquiring an MAC address grabbing program corresponding to the switch to be detected according to the manufacturer and model of the switch to be detected;
executing an MAC address grabbing program on the switch to be detected through the serial port, grabbing port numbers of one or more ports to be detected of the switch to be detected, and MAC addresses corresponding to the one or more ports to be detected, wherein U bits of one or more target ports are located;
and recording port numbers of one or more ports to be detected, generating a port-MAC address relation log corresponding to the one or more ports to be detected, and sequentially arranging the port numbers in the port-MAC address relation log according to the port definition of the switch to be detected.
Further, initializing detection parameters for detecting network card connection of the port to be detected and the server node includes:
setting the temporary server node parameter to be null;
the counter is assigned a value of 1.
Further, performing port U-bit detection on a port corresponding to the current port number includes:
searching in a port-U bit corresponding relation dictionary, and acquiring the current actual U bit of a port corresponding to the current port number, wherein at least the description of the port-U bit corresponding relation dictionary is as follows: port number of port to be detected and actual U bit of port to be detected;
Searching in a port-MAC address relation log, acquiring an MAC address corresponding to the current port number, and taking the MAC address as the current MAC address;
searching in a server node-MAC address corresponding relation list, and acquiring a current server node number corresponding to a current MAC address, wherein at least the description of the server node-MAC address corresponding relation list is as follows: the method comprises the steps of server node numbers, server node network card serial numbers corresponding to the server node numbers and MAC addresses corresponding to the server node network card serial numbers;
searching in a server node-U bit corresponding relation list, and acquiring a current expected U bit corresponding to the current server node number, wherein at least the description is recorded in the server node-U bit corresponding relation list: server node number, expected U bit corresponding to server node number;
judging whether the current actual U bit is consistent with the current expected U bit or not;
if the current actual U bit is consistent with the current expected U bit, detecting network card connection of the server node on a port corresponding to the current port number.
If the current actual U bit is inconsistent with the current expected U bit, prompting that the inspection fails, and ending the inspection.
Further, the detecting the network card connection of the server node for the port corresponding to the current port number includes:
Searching in a server node-MAC address relation list, and acquiring a current server node network card serial number corresponding to a current server node serial number;
judging whether the temporary server node parameter is consistent with the current server node number;
if the temporary server node parameter is consistent with the current server node number, adding 1 to the counter to serve as a current value of the counter;
if the temporary server node parameter is inconsistent with the current server node number, the temporary server node parameter is assigned to be the current server node number SN, and the counter is assigned to be 1 to be used as the current value of the counter;
judging whether the current value of the counter is consistent with the serial number of the network card of the current server node;
if the current value of the counter is consistent with the serial number of the network card of the current server node, judging whether the current port number is the last port number in the port-MAC address relation log;
if the current port number is the last port number in the port-MAC address relation log, ending the inspection;
if the current port number is not the last port number in the port-MAC address relation log, taking the next port number as the current port number, and carrying out port U-bit detection and network card connection detection of the server node on the port corresponding to the current port number;
If the current value of the counter is inconsistent with the current network card serial number of the server node, prompting that the inspection fails, and ending the inspection.
Further, the method for detecting the line sequence of the cabinet network line further comprises the following steps:
generating a server node-MAC address correspondence list;
generating a port-U bit corresponding relation dictionary;
generating a server node-U bit corresponding relation list;
and the detection server is connected with the switch to be detected and the detection server for executing the line sequence detection method of the cabinet network line through the serial port.
In a second aspect, a line sequence detecting device for a cabinet network cable is provided, including: the system comprises a log acquisition module, a parameter initialization module and a detection execution module;
the log acquisition module is used for: sequentially acquiring port numbers of one or more ports to be detected of a switch to be detected and MAC addresses corresponding to the one or more ports to be detected, and generating a port-MAC address relation log; the port to be detected is connected with a network card of the server through a network cable, and the port-MAC address relation log at least records: the port numbers corresponding to the ports to be detected, the MAC addresses corresponding to the ports to be detected and the U bits where the ports to be detected are located are sequentially arranged;
the parameter initialization module is used for: initializing detection parameters for detecting network card connection of the port to be detected and a server node, wherein the detection parameters comprise: the temporary server node parameter is used for storing a server node number corresponding to the port to be detected, and the counter is used for detecting the network card connection between the port to be detected and the server node;
The detection execution module is used for: in the port-MAC address relation log, sequentially taking the port numbers corresponding to the ports to be detected which are sequentially arranged as the current port number, and carrying out port U-bit detection and network card connection detection of the server node on the ports corresponding to the current port number.
In a third aspect, a line sequence detecting system for a cabinet network cable is provided, at least including: the equipment comprises a cabinet, a switch, one or more servers and a detection server;
the switch comprises at least: ports and serial ports, wherein the ports are arranged according to the definition sequence of the switch;
the switch is arranged in the cabinet, and the network card of one or more servers is connected with the port of the switch through a network cable;
the detection server is connected with a serial port of the switch;
the detection server is configured to execute the line sequence detection method of the cabinet network cable according to the first aspect.
In a fourth aspect, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method of the first aspect described above when the computer program is executed by the processor.
In a fifth aspect, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method of the first aspect described above.
The technical scheme provided by the embodiment of the invention has the beneficial effects that:
1. by implementing the line sequence detection method for the cabinet network line, which is disclosed by the invention, the automation of line sequence detection of the network line can be realized, the production line test efficiency is improved, the labor cost is reduced, the product quality is improved, and the line sequence detection method is suitable for line sequence detection of a large number of cabinet network lines;
2. for the relation between the server equipment address and the server space position (MAC address and U bit) which cannot be intuitively acquired, the method disclosed by the invention can be used for realizing the accurate correspondence between the equipment address and the physical position of the server.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic diagram of a line sequence detection method of a cabinet network cable according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a line sequence detecting device of a cabinet network cable according to an embodiment of the present invention;
Fig. 3 is a schematic diagram of a line sequence detecting device for a cabinet network cable according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some examples of the present invention, not all examples. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Unless defined otherwise, technical or scientific terms used in this disclosure should be given the ordinary meaning as understood by one of ordinary skill in the art to which this disclosure belongs. The terms "first," "second," and the like, as used in this disclosure, do not denote any order, quantity, or importance, but rather are used to distinguish one element from another. Likewise, the terms "a," "an," or "the" and similar terms do not denote a limitation of quantity, but rather denote the presence of at least one. The numerals in the drawings of the specification merely denote distinction of respective functional components or modules, and do not denote logical relationships between the components or modules. The word "comprising" or "comprises", and the like, means that elements or items preceding the word are included in the element or item listed after the word and equivalents thereof, but does not exclude other elements or items. The terms "connected" or "connected," and the like, are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "upper", "lower", "left", "right", etc. are used merely to indicate relative positional relationships, which may also be changed when the absolute position of the object to be described is changed.
For the component symbol referred to in the specification of the present application, the type of component is referred to in the circuit diagram, and the individual components are distinguished, for example: r is R 1 ,R 2 C, etc.; the sizes of the corresponding physical quantities of the components are represented in the corresponding formulas, and are distinguished by italics, for example: resistor R 1 The corresponding resistance value is R 1
Hereinafter, various embodiments according to the present disclosure will be described in detail with reference to the accompanying drawings. Note that in the drawings, the same reference numerals are given to constituent parts having substantially the same or similar structures and functions, and repeated description thereof will be omitted.
Aiming at the problem that in the prior art, the electromagnetic radiation exceeds standard due to the compatibility design of the printed circuit board, which is caused by the clock signal which is not connected with the baseboard management controller. The embodiment of the invention provides a clock signal electromagnetic radiation suppression circuit, a circuit board and a method, which replace manual work and automatically close clock signals which are not connected with a substrate management controller so as to reduce electromagnetic radiation level and enable electromagnetic radiation of products to reach corresponding standards.
In one embodiment, as shown in fig. 1, a method for detecting a line sequence of a cabinet network cable includes:
s10: and sequentially acquiring port numbers of one or more ports to be detected of the switch to be detected and MAC addresses corresponding to the one or more ports to be detected, and generating a port-MAC address relation log.
S20: and initializing detection parameters for detecting the network card connection of the port to be detected and the server node.
S30: in the port-MAC address relation log, sequentially taking the port numbers corresponding to the ports to be detected which are sequentially arranged as the current port number, and carrying out port U-bit detection and network card connection detection of the server node on the ports corresponding to the current port number.
In another embodiment, a method for detecting a line sequence of a cabinet network cable specifically includes:
s10: sequentially acquiring port numbers of one or more ports to be detected of a switch to be detected and MAC addresses corresponding to the one or more ports to be detected, and generating a port-MAC address relation log; the port to be detected is connected with a network card of the server through a network cable, and the port-MAC address relation log at least records: the port numbers corresponding to the ports to be detected, the MAC addresses corresponding to the ports to be detected and the U bits where the ports to be detected are located are sequentially arranged.
Specifically, sequentially obtaining port numbers of one or more target ports of the switch to be detected and MAC addresses corresponding to the one or more target ports, generating a port-MAC address relationship log, including:
S11: according to the configuration of the cabinet where the switch to be detected is located, the manufacturer and the model of the switch to be detected are obtained from the material table, wherein the configuration at least comprises: hardware information of the switch to be detected, hardware information of one or more servers connected with the switch to be detected through a network cable, and at least the following description of a material table: manufacturer of switch to be detected, model of switch to be detected;
s12: and acquiring an MAC address grabbing program corresponding to the switch to be detected according to the manufacturer and model of the switch to be detected.
Because different manufacturers and different types of switches use different MAC address grabbing programs, corresponding MAC address grabbing programs are required to be acquired according to the specific manufacturers and types of the switches to be detected.
S13: executing an MAC address grabbing program on the switch to be detected through the serial port, grabbing port numbers of one or more ports to be detected of the switch to be detected, and MAC addresses corresponding to the one or more ports to be detected, wherein U bits of one or more target ports are located;
s14: and recording port numbers of one or more ports to be detected, generating a port-MAC address relation log corresponding to the one or more ports to be detected, and sequentially arranging the port numbers in the port-MAC address relation log according to the port definition of the switch to be detected.
When a network cable is used to connect a switch port and a server according to a switch port definition, a sequential connection mode is generally adopted. Specifically, when the servers corresponding to the plurality of server nodes only have one network card interface, the network card interfaces of the server nodes corresponding to the plurality of server nodes are sequentially connected by network cables according to the serial numbers of the switch ports; when the server corresponding to the server node has a plurality of network card interfaces, the network cards of a corresponding server arranged in sequence are sequentially connected according to the serial numbers of the ports of the switch. And after the connection between the network card of the current server node and the port of the switch is completed, connecting the server port with the network card of the next server node in the same way.
Illustrating: the server corresponding to the No. 1 server node is provided with 1 network card port NIC1; the server corresponding to the No. 2 server node is provided with 2 network card ports NIC1 and NIC2;3, the server corresponding to the good server node is provided with 2 network card ports NIC1 and NIC2;
the switch PORTs are sequentially ranked as PORT1, PORT2, PORT3, PORT4 and PORT5;
during connection, PORT1 is connected with server No. 1 NIC1, PORT2 is connected with server No. 2 NIC1, PORT3 is connected with server No. 2 NIC2, PORT4 is connected with server No. 3 NIC1, and PORT5 is connected with server No. 3 NIC 2. On the premise of conforming to the connection mode, the application does not limit specific numbers of the switch port and the network card port number.
S20: initializing detection parameters for detecting network card connection of the port to be detected and a server node, wherein the detection parameters comprise: the temporary server node parameter is used for storing a server node number corresponding to the port to be detected, and the counter is used for detecting the network card connection detection state of the port to be detected and the server node.
Specifically, initializing detection parameters for detecting network card connection of the port to be detected and the server node includes:
s21: setting the temporary server node parameter to be null;
defining temp_sn as a temporary server power-on parameter, and assigning null: temp_sn= ".
S22: assigning the counter to 1;
defining SN_count as a counter, and assigning 1: sn_count=1.
The temporary server node parameter is used for recording the current port number when detecting the port corresponding to the current port number to connect the network card of the server node.
S30: in the port-MAC address relation log, sequentially taking the port numbers corresponding to the ports to be detected which are sequentially arranged as the current port number, and carrying out port U-bit detection and network card connection detection of the server node on the ports corresponding to the current port number.
Wherein, S31: the method for detecting the port U bit of the port corresponding to the current port number specifically comprises the following steps:
s311: searching in a port-U bit corresponding relation dictionary, and acquiring the current actual U bit of a port corresponding to the current port number, wherein at least the description of the port-U bit corresponding relation dictionary is as follows: port number of port to be detected and actual U bit of port to be detected;
s312: searching in a port-MAC address relation log, acquiring an MAC address corresponding to the current port number, and taking the MAC address as the current MAC address;
s313: searching in a server node-MAC address corresponding relation list, and acquiring a current server node number corresponding to a current MAC address, wherein at least the description of the server node-MAC address corresponding relation list is as follows: server node number, server node network card serial number corresponding to server node number, MAC address corresponding to server node network card serial number.
The server nodes are correspondingly accessed to the server of the switch to be detected.
S314: searching in a server node-U bit corresponding relation list, and acquiring a current expected U bit corresponding to the current server node number, wherein at least the description is recorded in the server node-U bit corresponding relation list: server node number, expected U bit corresponding to server node number;
S315: judging whether the current actual U bit is consistent with the current expected U bit or not;
if the current actual U bit is consistent with the current expected U bit, then S32 is executed: and detecting the network card connection of the server node on the port corresponding to the current port number.
If the current actual U bit is inconsistent with the current expected U bit, then S316 is performed: and prompting failure of the inspection, and ending the inspection.
S32: and detecting the network card connection of the server node on the port corresponding to the current port number. Because there are multiple network cards connected to the switch in the server node, in order to check the line sequence, it is further necessary to detect the connection between the port and the network card. The following is a specific flow of the method, comprising:
s321: searching in a server node-MAC address relation list, and acquiring a current server node network card serial number corresponding to a current server node serial number;
s322: judging whether the temporary server node parameter is consistent with the current server node number;
if the temporary server node parameter is consistent with the current server node number, then S323: adding 1 to the counter as the current value of the counter;
if the temporary server node parameter is inconsistent with the current server node number, then S323' is executed: the temporary server node parameter is assigned as the current server node number SN, and the counter is assigned as 1 as the current value of the counter.
When the detection method is executed for the first time, the value of temp_sn is null, if the temporary server node parameter temp_sn is inconsistent with the current server node number, the temporary server node parameter is assigned as the current server node number SN, and the counter is assigned as 1: sn_count++.
When detecting that the server corresponding to the current server node has two network card ports, the temporary server node parameter is consistent with the number of the current server node, the counter is added with 1, at the moment, SN_count=2, and when detecting in the next round, the second network card port of the server corresponding to the current server node is continuously detected, and whether the second network card port is correctly connected or not is judged.
S324: and judging whether the current value of the counter is consistent with the serial number of the network card of the current server node.
If the current value of the counter is inconsistent with the current network card serial number of the server node, executing S325': and prompting failure of the inspection, and ending the inspection.
If the current value of the counter is consistent with the serial number of the current server node network card, S325 is executed: judging whether the current port number is the last port number in the port-MAC address relation log;
if the current port number is the last port number in the port-MAC address relationship log, then S326' is performed: ending the inspection. At this time, each port of the switch to be detected is detected by the line sequence, and the connection is normal.
If the current port number is not the last port number in the port-MAC address relationship log, then S326 is performed: and taking the next port number as the current port number, and carrying out port U-bit detection and network card connection detection of the server node on the port corresponding to the current port number.
In one embodiment, before implementing the line sequence detection method of the cabinet network line, the method further includes:
s01: generating a server node-MAC address correspondence list;
the server node-MAC address correspondence list at least comprises a corresponding Server Node (SN), an MAC address and a server node network card serial number (NIC number). As shown in table 1.
Table 1 also shows the correspondence between server nodes and MAC addresses, which may be one-to-one or one-to-many. The specific form and content of the table may be adapted for specific implementation scenarios. However, the specific form of the server node-MAC address correspondence list is not limited to a method for detecting a line sequence of a cabinet network cable claimed in the present application.
S02: generating a port-U bit corresponding relation dictionary;
under the condition that different users use switches of different manufacturers in different cabinets, the corresponding relations between the switch ports and U bits of different configurations (PN) are different, and each configuration (PN) needs to define own corresponding relation, as shown in Table 2.
Table 1 schematic list of server node-MAC address correspondences
Figure SMS_1
TABLE 2 Port-U bit correspondence dictionary schematic table
Figure SMS_2
Since there is one-to-many case between the server node and the MAC address, the correspondence may also have the following case: PNx: port0: ulocation0, port1: ulocation0, … …, port x: ulocationx.
The specific form of the port-U bit correspondence dictionary is not limited to the line sequence detection method of the cabinet network line claimed in the application.
S03: generating a server node-U bit corresponding relation list;
this table is generated when the server and the exchange are assembled on shelf.
Table 3 list of server node-U bit correspondences
Figure SMS_3
The specific form of the server node-U bit correspondence list will not limit the line sequence detection method of the cabinet network line claimed in the application.
S04: and the detection server is connected with the switch to be detected and the detection server for executing the line sequence detection method of the cabinet network line through the serial port.
The connection mode needs to be sequentially connected according to the network card port numbers of the corresponding servers of the switch ports and the server nodes. For a specific connection, see the description in S14.
Because the MAC address grabbing procedure needs to be executed on the switch through the serial port, before executing a line sequence detection method of the cabinet network cable, the switch needs to be connected with the detection server through the serial port.
In another embodiment, as shown in fig. 2, a line sequence detecting device for a cabinet network cable includes: the system comprises a log acquisition module, a parameter initialization module and a detection execution module;
the log acquisition module is used for: sequentially acquiring port numbers of one or more ports to be detected of a switch to be detected and MAC addresses corresponding to the one or more ports to be detected, and generating a port-MAC address relation log; the port to be detected is connected with a network card of the server through a network cable, and the port-MAC address relation log at least records: the port numbers corresponding to the ports to be detected, the MAC addresses corresponding to the ports to be detected and the U bits where the ports to be detected are located are sequentially arranged;
the parameter initialization module is used for: initializing detection parameters for detecting network card connection of the port to be detected and a server node, wherein the detection parameters comprise: the temporary server node parameter is used for storing a server node number corresponding to the port to be detected, and the counter is used for detecting the network card connection between the port to be detected and the server node;
the detection execution module is used for: in the port-MAC address relation log, sequentially taking the port numbers corresponding to the ports to be detected which are sequentially arranged as the current port number, and carrying out port U-bit detection and network card connection detection of the server node on the ports corresponding to the current port number.
In another embodiment, a line sequence detection system for a cabinet network line at least includes: the system comprises a cabinet, a switch, one or more servers and a detection server.
The switch comprises at least: the ports and the serial ports are arranged according to the definition sequence of the switch.
The switch is arranged in the cabinet, and the network card of one or more servers is connected with the port of the switch through a network cable; the hardware devices such as the switch and the server connected by the network line constitute a configuration for the hardware device information such as the manufacturer and model of the switch, the server manufacturer and model, and the like described in the Bill of materials (BOM).
The detection server is connected with a serial port of the switch.
The detection server is used for executing the steps of the line sequence detection method of the cabinet network line.
In another embodiment, as shown in fig. 3, a computer device includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, where the processor executes the computer program to implement the steps of the method for detecting a line sequence of a cabinet network cable.
In another embodiment, a computer readable storage medium has a computer program stored thereon, which when executed by a processor implements a method for line sequence detection of a rack network cable as described above.
Any combination of the above optional solutions may be adopted to form an optional embodiment of the present invention, which is not described herein.
Example 1
A line sequence detection method of a cabinet network line, as shown in figure 1, comprises the following steps:
s10: and sequentially acquiring port numbers of one or more ports to be detected of the switch to be detected and MAC addresses corresponding to the one or more ports to be detected, and generating a port-MAC address relation log.
S20: and initializing detection parameters for detecting the network card connection of the port to be detected and the server node.
S30: in the port-MAC address relation log, sequentially taking the port numbers corresponding to the ports to be detected which are sequentially arranged as the current port number, and carrying out port U-bit detection and network card connection detection of the server node on the ports corresponding to the current port number.
Example two
S10: sequentially obtaining port numbers of one or more ports to be detected of the switch to be detected and MAC addresses corresponding to the one or more ports to be detected, generating a port-MAC address relation log, including:
s11: according to the configuration of the cabinet where the switch to be detected is located, the manufacturer and model of the switch to be detected are obtained from the material table;
S12: acquiring an MAC address grabbing program corresponding to the switch to be detected according to the manufacturer and model of the switch to be detected;
s13: executing an MAC address grabbing program on the switch to be detected through the serial port, grabbing port numbers of one or more ports to be detected of the switch to be detected, and MAC addresses corresponding to the one or more ports to be detected, wherein U bits of one or more target ports are located;
s14: and recording port numbers of one or more ports to be detected, generating a port-MAC address relation log corresponding to the one or more ports to be detected, and sequentially arranging the port numbers in the port-MAC address relation log according to the port definition of the switch to be detected.
S20: initializing detection parameters for detecting network card connection of the port to be detected and a server node, including:
s21: setting the temporary server node parameter to be null;
s22: the counter is assigned a value of 1.
S30: in the port-MAC address relation log, sequentially taking port numbers corresponding to ports to be detected which are sequentially arranged as current port numbers, and carrying out port U-bit detection and network card connection detection of a server node on the ports corresponding to the current port numbers, wherein the method comprises the following steps:
S311: searching in a port-U bit corresponding relation dictionary, and acquiring the current actual U bit of a port corresponding to the current port number;
s312: searching in a port-MAC address relation log, acquiring an MAC address corresponding to the current port number, and taking the MAC address as the current MAC address;
s313: searching in a server node-MAC address corresponding relation list, and acquiring a current server node number corresponding to a current MAC address;
s314: searching in a server node-U bit corresponding relation list, and acquiring a current expected U bit corresponding to the current server node number;
s315: judging whether the current actual U bit is consistent with the current expected U bit or not;
if the current actual U bit is consistent with the current expected U bit, then S32 is executed: and detecting the network card connection of the server node on the port corresponding to the current port number.
If the current actual U bit is inconsistent with the current expected U bit, then S316 is performed: and prompting failure of the inspection, and ending the inspection.
S32: the network card connection detection of the server node is carried out on the port corresponding to the current port number, and the network card connection detection comprises the following steps:
s321: searching in a server node-MAC address relation list, and acquiring a current server node network card serial number corresponding to a current server node serial number;
S322: judging whether the temporary server node parameter is consistent with the current server node number;
if the temporary server node parameter is consistent with the current server node number, then S323: adding 1 to the counter as the current value of the counter;
if the temporary server node parameter is inconsistent with the current server node number, then S323' is executed: assigning the temporary server node parameter as a current server node number SN, and assigning the counter as 1 as a current counter value;
s324: and judging whether the current value of the counter is consistent with the serial number of the network card of the current server node.
If the current value of the counter is inconsistent with the current network card serial number of the server node, executing S325': and prompting failure of the inspection, and ending the inspection.
If the current value of the counter is consistent with the serial number of the current server node network card, S325 is executed: judging whether the current port number is the last port number in the port-MAC address relation log;
if the current port number is the last port number in the port-MAC address relationship log, then S326' is performed: ending the inspection. At this time, each port of the switch to be detected is detected by the line sequence, and the connection is normal.
If the current port number is not the last port number in the port-MAC address relationship log, then S326 is performed: and taking the next port number as the current port number, and carrying out port U-bit detection and network card connection detection of the server node on the port corresponding to the current port number.
In one embodiment, before implementing the line sequence detection method of the cabinet network line, the method further includes:
s01: generating a server node-MAC address correspondence list;
s02: generating a port-U bit corresponding relation dictionary;
s03: generating a server node-U bit corresponding relation list;
s04: and the detection server is connected with the switch to be detected and the detection server for executing the line sequence detection method of the cabinet network line through the serial port.
Example III
A line sequence detection device of a cabinet network line, as shown in figure 2, comprises: the system comprises a log acquisition module, a parameter initialization module and a detection execution module;
the log acquisition module is used for: sequentially acquiring port numbers of one or more ports to be detected of a switch to be detected and MAC addresses corresponding to the one or more ports to be detected, and generating a port-MAC address relation log;
the parameter initialization module is used for: initializing detection parameters for detecting network card connection of the port to be detected and a server node;
The detection execution module is used for: in the port-MAC address relation log, sequentially taking the port numbers corresponding to the ports to be detected which are sequentially arranged as the current port number, and carrying out port U-bit detection and network card connection detection of the server node on the ports corresponding to the current port number.
Example IV
A line sequence detection system of a cabinet network line at least comprises: the equipment comprises a cabinet, a switch, one or more servers and a detection server;
the switch comprises at least: ports and serial ports, wherein the ports are arranged according to the definition sequence of the switch;
the switch is arranged in the cabinet, and the network card of one or more servers is connected with the port of the switch through a network cable;
the detection server is connected with a serial port of the switch;
the detection server is used for executing the line sequence detection method of the cabinet network line.
Example five
A computer device, as shown in fig. 3, includes a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor implements the line sequence detection method of the cabinet network line when executing the computer program, and specifically includes:
s10: sequentially obtaining port numbers of one or more ports to be detected of the switch to be detected and MAC addresses corresponding to the one or more ports to be detected, generating a port-MAC address relation log, including:
S11: according to the configuration of the cabinet where the switch to be detected is located, the manufacturer and model of the switch to be detected are obtained from the material table;
s12: acquiring an MAC address grabbing program corresponding to the switch to be detected according to the manufacturer and model of the switch to be detected;
s13: executing an MAC address grabbing program on the switch to be detected through the serial port, grabbing port numbers of one or more ports to be detected of the switch to be detected, and MAC addresses corresponding to the one or more ports to be detected, wherein U bits of one or more target ports are located;
s14: and recording port numbers of one or more ports to be detected, generating a port-MAC address relation log corresponding to the one or more ports to be detected, and sequentially arranging the port numbers in the port-MAC address relation log according to the port definition of the switch to be detected.
S20: initializing detection parameters for detecting network card connection of the port to be detected and a server node, including:
s21: setting the temporary server node parameter to be null;
s22: the counter is assigned a value of 1.
S30: in the port-MAC address relation log, sequentially taking port numbers corresponding to ports to be detected which are sequentially arranged as current port numbers, and carrying out port U-bit detection and network card connection detection of a server node on the ports corresponding to the current port numbers, wherein the method comprises the following steps:
S311: searching in a port-U bit corresponding relation dictionary, and acquiring the current actual U bit of a port corresponding to the current port number;
s312: searching in a port-MAC address relation log, acquiring an MAC address corresponding to the current port number, and taking the MAC address as the current MAC address;
s313: searching in a server node-MAC address corresponding relation list, and acquiring a current server node number corresponding to a current MAC address;
s314: searching in a server node-U bit corresponding relation list, and acquiring a current expected U bit corresponding to the current server node number;
s315: judging whether the current actual U bit is consistent with the current expected U bit or not;
if the current actual U bit is consistent with the current expected U bit, then S32 is executed: and detecting the network card connection of the server node on the port corresponding to the current port number.
If the current actual U bit is inconsistent with the current expected U bit, then S316 is performed: and prompting failure of the inspection, and ending the inspection.
S32: the network card connection detection of the server node is carried out on the port corresponding to the current port number, and the network card connection detection comprises the following steps:
s321: searching in a server node-MAC address relation list, and acquiring a current server node network card serial number corresponding to a current server node serial number;
S322: judging whether the temporary server node parameter is consistent with the current server node number;
if the temporary server node parameter is consistent with the current server node number, then S323: adding 1 to the counter as the current value of the counter;
if the temporary server node parameter is inconsistent with the current server node number, then S323' is executed: assigning the temporary server node parameter as a current server node number SN, and assigning the counter as 1 as a current counter value;
s324: and judging whether the current value of the counter is consistent with the serial number of the network card of the current server node.
If the current value of the counter is inconsistent with the current network card serial number of the server node, executing S325': and prompting failure of the inspection, and ending the inspection.
If the current value of the counter is consistent with the serial number of the current server node network card, S325 is executed: judging whether the current port number is the last port number in the port-MAC address relation log;
if the current port number is the last port number in the port-MAC address relationship log, then S326' is performed: ending the inspection. At this time, each port of the switch to be detected is detected by the line sequence, and the connection is normal.
If the current port number is not the last port number in the port-MAC address relationship log, then S326 is performed: and taking the next port number as the current port number, and carrying out port U-bit detection and network card connection detection of the server node on the port corresponding to the current port number.
In one embodiment, before implementing the line sequence detection method of the cabinet network line, the method further includes:
s01: generating a server node-MAC address correspondence list;
s02: generating a port-U bit corresponding relation dictionary;
s03: generating a server node-U bit corresponding relation list;
s04: and the detection server is connected with the switch to be detected and the detection server for executing the line sequence detection method of the cabinet network line through the serial port.
Example six
A computer readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements a method for detecting a line sequence of a cabinet network cable, comprising:
s10: sequentially obtaining port numbers of one or more ports to be detected of the switch to be detected and MAC addresses corresponding to the one or more ports to be detected, generating a port-MAC address relation log, including:
s11: according to the configuration of the cabinet where the switch to be detected is located, the manufacturer and model of the switch to be detected are obtained from the material table;
S12: acquiring an MAC address grabbing program corresponding to the switch to be detected according to the manufacturer and model of the switch to be detected;
s13: executing an MAC address grabbing program on the switch to be detected through the serial port, grabbing port numbers of one or more ports to be detected of the switch to be detected, and MAC addresses corresponding to the one or more ports to be detected, wherein U bits of one or more target ports are located;
s14: and recording port numbers of one or more ports to be detected, generating a port-MAC address relation log corresponding to the one or more ports to be detected, and sequentially arranging the port numbers in the port-MAC address relation log according to the port definition of the switch to be detected.
S20: initializing detection parameters for detecting network card connection of the port to be detected and a server node, including:
s21: setting the temporary server node parameter to be null;
s22: the counter is assigned a value of 1.
S30: in the port-MAC address relation log, sequentially taking port numbers corresponding to ports to be detected which are sequentially arranged as current port numbers, and carrying out port U-bit detection and network card connection detection of a server node on the ports corresponding to the current port numbers, wherein the method comprises the following steps:
S311: searching in a port-U bit corresponding relation dictionary, and acquiring the current actual U bit of a port corresponding to the current port number;
s312: searching in a port-MAC address relation log, acquiring an MAC address corresponding to the current port number, and taking the MAC address as the current MAC address;
s313: searching in a server node-MAC address corresponding relation list, and acquiring a current server node number corresponding to a current MAC address;
s314: searching in a server node-U bit corresponding relation list, and acquiring a current expected U bit corresponding to the current server node number;
s315: judging whether the current actual U bit is consistent with the current expected U bit or not;
if the current actual U bit is consistent with the current expected U bit, then S32 is executed: and detecting the network card connection of the server node on the port corresponding to the current port number.
If the current actual U bit is inconsistent with the current expected U bit, then S316 is performed: and prompting failure of the inspection, and ending the inspection.
S32: the network card connection detection of the server node is carried out on the port corresponding to the current port number, and the network card connection detection comprises the following steps:
s321: searching in a server node-MAC address relation list, and acquiring a current server node network card serial number corresponding to a current server node serial number;
S322: judging whether the temporary server node parameter is consistent with the current server node number;
if the temporary server node parameter is consistent with the current server node number, then S323: adding 1 to the counter as the current value of the counter;
if the temporary server node parameter is inconsistent with the current server node number, then S323' is executed: assigning the temporary server node parameter as a current server node number SN, and assigning the counter as 1 as a current counter value;
s324: and judging whether the current value of the counter is consistent with the serial number of the network card of the current server node.
If the current value of the counter is inconsistent with the current network card serial number of the server node, executing S325': and prompting failure of the inspection, and ending the inspection.
If the current value of the counter is consistent with the serial number of the current server node network card, S325 is executed: judging whether the current port number is the last port number in the port-MAC address relation log;
if the current port number is the last port number in the port-MAC address relationship log, then S326' is performed: ending the inspection. At this time, each port of the switch to be detected is detected by the line sequence, and the connection is normal.
If the current port number is not the last port number in the port-MAC address relationship log, then S326 is performed: and taking the next port number as the current port number, and carrying out port U-bit detection and network card connection detection of the server node on the port corresponding to the current port number.
In one embodiment, before implementing the line sequence detection method of the cabinet network line, the method further includes:
s01: generating a server node-MAC address correspondence list;
s02: generating a port-U bit corresponding relation dictionary;
s03: generating a server node-U bit corresponding relation list;
s04: and the detection server is connected with the switch to be detected and the detection server for executing the line sequence detection method of the cabinet network line through the serial port.
In particular, according to embodiments of the present application, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program loaded on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via a communication device, or from memory, or from ROM. The above-described functions defined in the methods of the embodiments of the present application are performed when the computer program is executed by an external processor.
It should be noted that, the computer readable medium of the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of the present application, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. Whereas in embodiments of the present application, the computer-readable signal medium may comprise a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (Radio Frequency), and the like, or any suitable combination thereof.
The computer readable medium may be contained in the server; or may exist alone without being assembled into the server. The computer readable medium carries one or more programs which, when executed by the server, cause the server to: acquiring a frame rate of an application on the terminal in response to detecting that a peripheral mode of the terminal is not activated; when the frame rate meets the screen-extinguishing condition, judging whether a user is acquiring screen information of the terminal; and controlling the screen to enter an immediate dimming mode in response to the judgment result that the user does not acquire the screen information of the terminal.
Computer program code for carrying out operations for embodiments of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C++ or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for a system or system embodiment, since it is substantially similar to a method embodiment, the description is relatively simple, with reference to the description of the method embodiment being made in part. The systems and system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The foregoing has outlined the detailed description of the preferred embodiment of the present application, and the detailed description of the principles and embodiments of the present application has been provided herein by way of example only to facilitate the understanding of the method and core concepts of the present application; also, as will occur to those of ordinary skill in the art, many modifications are possible in view of the teachings of the present application, both in the detailed description and the scope of its applications. In view of the foregoing, this description should not be construed as limiting the application.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.

Claims (10)

1. The method for detecting the line sequence of the cabinet network line is characterized by comprising the following steps:
sequentially obtaining port numbers of one or more ports to be detected of a switch to be detected and MAC addresses corresponding to the one or more ports to be detected, and generating a port-MAC address relation log; the port to be detected is connected with a network card of the server through a network cable, and the port-MAC address relation log at least records: the port numbers corresponding to the ports to be detected, the MAC addresses corresponding to the ports to be detected and the U bits where the ports to be detected are located are sequentially arranged;
initializing detection parameters for detecting network card connection of the port to be detected and a server node, wherein the detection parameters comprise: the temporary server node parameters are used for storing server node numbers corresponding to the ports to be detected, and the counter is used for detecting network card connection between the ports to be detected and the server nodes;
And in the port-MAC address relation log, sequentially taking the port numbers corresponding to the ports to be detected which are sequentially arranged as the current port numbers, and carrying out port U-bit detection and network card connection detection of the server node on the ports corresponding to the current port numbers.
2. The method for detecting the line sequence of the cabinet network cable according to claim 1, wherein the sequentially obtaining the port numbers of the one or more target ports of the switch to be detected and the MAC addresses corresponding to the one or more target ports, generating the port-MAC address relationship log includes:
according to the configuration of the cabinet where the switch to be detected is located, the manufacturer and the model of the switch to be detected are obtained from the material table, wherein the configuration at least comprises: hardware information of a switch to be detected and hardware information of one or more servers connected with the switch to be detected through a network cable, wherein the material table at least records: the manufacturer of the switch to be detected and the model of the switch to be detected;
acquiring an MAC address grabbing program corresponding to the switch to be detected according to the manufacturer and model of the switch to be detected;
Executing the MAC address grabbing program on the switch to be detected through a serial port, and grabbing port numbers of one or more ports to be detected of the switch to be detected and MAC addresses corresponding to the one or more ports to be detected, wherein the one or more target ports are located in U-bits;
and recording port numbers of the one or more ports to be detected, generating a port-MAC address relation log according to MAC addresses corresponding to the one or more ports to be detected, and sequentially arranging the port numbers in the port-MAC address relation log according to the port definition of the switch to be detected.
3. The method for detecting the line sequence of the cabinet network cable according to claim 1, wherein initializing detection parameters for detecting the network card connection between the port to be detected and the server node includes:
setting the temporary server node parameter to be null;
the counter is assigned a value of 1.
4. The method for detecting the line sequence of the cabinet network cable according to claim 1, wherein the detecting the port U bit of the port corresponding to the current port number includes:
searching in a port-U bit corresponding relation dictionary, and obtaining the current actual U bit of a port corresponding to the current port number, wherein at least the following is recorded in the port-U bit corresponding relation dictionary: the port number of the port to be detected and the actual U-bit of the port to be detected;
Searching in the port-MAC address relation log, acquiring an MAC address corresponding to the current port number, and taking the MAC address as a current MAC address;
searching in a server node-MAC address corresponding relation list, and acquiring a current server node number corresponding to the current MAC address, wherein at least the description of the server node-MAC address corresponding relation list is as follows: server node numbers, server node network card serial numbers corresponding to the server node numbers and MAC addresses corresponding to the server node network card serial numbers;
searching in a server node-U bit corresponding relation list, and acquiring a current expected U bit corresponding to the current server node number, wherein at least the description of the server node-U bit corresponding relation list is as follows: server node numbers and expected U bits corresponding to the server node numbers;
judging whether the current actual U bit is consistent with the current expected U bit or not;
and if the current actual U bit is consistent with the current expected U bit, detecting network card connection of the server node for the port corresponding to the current port number.
5. The method for detecting the line sequence of the cabinet network cable according to claim 4, wherein the detecting the network card connection of the server node for the port corresponding to the current port number includes:
Searching in the server node-MAC address relation list, and acquiring a current server node network card serial number corresponding to the current server node serial number;
judging whether the temporary server node parameter is consistent with the current server node number or not;
if the temporary server node parameter is consistent with the current server node number, adding 1 to the counter to serve as a current counter value;
if the temporary server node parameter is inconsistent with the current server node number, assigning the temporary server node parameter as the current server node number SN, and assigning the counter as 1 as the current value of the counter;
judging whether the current value of the counter is consistent with the serial number of the network card of the current server node;
if the current value of the counter is consistent with the serial number of the current server node network card, judging whether the current port number is the last port number in the port-MAC address relation log;
and if the current port number is not the last port number in the port-MAC address relation log, taking the next port number as the current port number, and carrying out port U bit detection and network card connection detection of the server node on the port corresponding to the current port number.
6. The method for detecting the line sequence of the cabinet network cable according to claim 1, wherein the method further comprises:
generating a server node-MAC address correspondence list;
generating a port-U bit corresponding relation dictionary;
generating a server node-U bit corresponding relation list;
and the detection server is connected with the switch to be detected and the detection server for executing the line sequence detection method of the cabinet network line through the serial port.
7. The utility model provides a line preface detection device of rack net twine which characterized in that, the device includes: the system comprises a log acquisition module, a parameter initialization module and a detection execution module;
the log acquisition module is used for: sequentially obtaining port numbers of one or more ports to be detected of a switch to be detected and MAC addresses corresponding to the one or more ports to be detected, and generating a port-MAC address relation log; the port to be detected is connected with a network card of the server through a network cable, and the port-MAC address relation log at least records: the port numbers corresponding to the ports to be detected, the MAC addresses corresponding to the ports to be detected and the U bits where the ports to be detected are located are sequentially arranged;
the parameter initialization module is used for: initializing detection parameters for detecting network card connection of the port to be detected and a server node, wherein the detection parameters comprise: the temporary server node parameters are used for storing server node numbers corresponding to the ports to be detected, and the counter is used for detecting network card connection between the ports to be detected and the server nodes;
The detection execution module is used for: and in the port-MAC address relation log, sequentially taking the port numbers corresponding to the ports to be detected which are sequentially arranged as the current port numbers, and carrying out port U-bit detection and network card connection detection of the server node on the ports corresponding to the current port numbers.
8. A line sequence detection system for a cabinet network line, the system comprising at least: the equipment comprises a cabinet, a switch, one or more servers and a detection server;
the switch comprises at least: the ports and the serial ports are arranged according to the switch definition sequence;
the switch is arranged in the cabinet, and the network cards of the one or more servers are connected with ports of the switch through network cables;
the detection server is connected with a serial port of the switch;
the detection server is used for executing the line sequence detection method of the cabinet network line according to any one of claims 1 to 6.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 6 when the computer program is executed by the processor.
10. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any one of claims 1 to 6.
CN202211089153.9A 2022-09-07 2022-09-07 Line sequence detection method, device, system, equipment and storage medium for cabinet network line Pending CN116319407A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211089153.9A CN116319407A (en) 2022-09-07 2022-09-07 Line sequence detection method, device, system, equipment and storage medium for cabinet network line

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211089153.9A CN116319407A (en) 2022-09-07 2022-09-07 Line sequence detection method, device, system, equipment and storage medium for cabinet network line

Publications (1)

Publication Number Publication Date
CN116319407A true CN116319407A (en) 2023-06-23

Family

ID=86776682

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211089153.9A Pending CN116319407A (en) 2022-09-07 2022-09-07 Line sequence detection method, device, system, equipment and storage medium for cabinet network line

Country Status (1)

Country Link
CN (1) CN116319407A (en)

Similar Documents

Publication Publication Date Title
CN109361562B (en) Automatic testing method based on associated network equipment access
CN109089398B (en) Method for determining slot position of equipment rack
US20110258302A1 (en) System And Method For Remotely Determining Identification And Physical Location Of Equipment In A Rack
CN110405759B (en) Chip control system
US11450993B2 (en) Automated capture of information about fixed cabling
CN112040016A (en) Server management method and server management device
CN106302864A (en) A kind of IP in order arranges system
CN112311574B (en) Network topology connection checking method, device and equipment
CN116319407A (en) Line sequence detection method, device, system, equipment and storage medium for cabinet network line
CN107800802A (en) A kind of Rack whole machine cabinets write-in and the method for reading UUID
CN110413311A (en) ' In System Reconfiguration Method and server
CN111083246A (en) Data transmission processing method, Ethernet switch and storage medium
CN115686575A (en) Edge controller firmware updating method, system, storage medium and server
CN109254796A (en) A kind of upper disk configuration method and host of USB device
US7962645B2 (en) Apparatus, system, and method for automatically mapping a tape library system
CN113835936A (en) Universal test system and method for Andriod equipment
CN108694105B (en) Wiring prompting method of rack-mounted server system
CN113254290A (en) Memory particle multidimensional test method, device and system and readable storage medium
CN111083019A (en) Two-out-of-two hardware platform function test system and method based on network communication
CN111162974B (en) Configurable two-out-of-two hardware platform aging test system and test method
US20070101397A1 (en) Interoperability of network components having different identification schemes
CN111833453A (en) Space code positioning method and device
TWI698101B (en) Server management method and server management device
CN116501563B (en) Storage device testing method, system, device, communication device and storage medium
CN114356624B (en) Positioning method, system, terminal and storage medium of composite CRC error reporting information

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