Method, device and equipment for realizing self-calling out-of-band test of security machine and medium

By connecting the network card port to the management port of the baseboard management controller on the motherboard under test of the security machine, setting the IP address and deploying the network, the security machine can automatically call out-of-band testing, which solves the complexity problem of security machine production testing, improves testing efficiency and reduces costs.

CN116566872BActive Publication Date: 2025-12-12INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310403512.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-14
Publication Date
2025-12-12
Estimated Expiration
2043-04-14

AI Technical Summary

Technical Problem

Because secure devices are physically isolated from the internet, functional testing during board production requires separate testing of the management and control components and the operating system. Furthermore, network access is limited, typically necessitating remote access from an external machine, resulting in high testing complexity.

Method used

By connecting the network interface card (NIC) port to the management port of the baseboard management controller on the motherboard under test, setting the IP address of the baseboard management controller's management port, and deploying the network under the operating system, it can communicate with the NIC port to achieve out-of-band access, thus avoiding the deployment of external machines.

Benefits of technology

It enables out-of-band testing of the secure machine, solves the impact of physical isolation between the BMC and the operating system on production testing, saves testing costs, and improves testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116566872B_ABST
    Figure CN116566872B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of diagnostic testing, and specifically provides a method, device, equipment and medium for realizing self-calling out-of-band testing of a security machine, the method comprising the following steps: connecting a network card network port of a network card to be tested to a baseboard management controller management port to construct a self-calling out-of-band testing environment; remotely controlling the setting of the IP address of the baseboard management controller management port; after the baseboard management controller management port IP address is successfully set, deploying an operating system network to enable the baseboard management controller management port to communicate with the network card network port; and issuing operating instructions to the baseboard management controller through an out-of-band access mode to obtain or modify management information. The self-calling mode of the operating system of the to-be-tested mainboard accessing the BMC management system realizes out-of-band control and access to the BMC, and solves the influence of the physical isolation of the BMC and the operating system on production testing. Meanwhile, there is no need to deploy external machines, and the testing cost is saved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of out-of-band testing, in particular to a method, device and equipment for realizing out-of-band testing of a self-calling security machine and a medium. BACKGROUND

[0002] With the development of information technology, an IT bottom architecture and standard are gradually established, and an open ecology is formed. In simple terms, it is to realize self-ownership in the fields of core chips, basic hardware, operating systems, middleware and data servers. Thus, the self-determination and control in the field of information technology is realized, the information security is ensured, and the bottom architecture system and the whole-cycle ecological system of the domestic information technology software and hardware are constructed.

[0003] Xin creation, that is, information technology application innovation industry, is the basis of data security and network security, and is also an important part of new infrastructure. In the Xin creation product, the non-security machine product can directly communicate with the operating system and the baseboard management controller (hereinafter referred to as BMC), so that the operating system can directly issue operating instructions to the BMC through the intelligent platform management interface (hereinafter referred to as IPMI), and obtain or modify management information, so as to achieve the purpose of detecting whether the function is normal.

[0004] The security machine product adopts a physical isolation mode to isolate from the public information network such as the Internet, and the computer management control and the operating system cannot directly communicate. This mode causes the production function test of the board card to need to test the management control part and the operating system part respectively. At the same time, the security machine has network access restrictions and is not allowed to access the Internet. If you want to access the BMC, you usually need to deploy an external machine, and access remotely through the external machine, which has high test complexity. SUMMARY

[0005] The security machine product adopts a physical isolation mode to isolate from the public information network such as the Internet, and the computer management control and the operating system cannot directly communicate. This mode causes the production function test of the board card to need to test the management control part and the operating system part respectively. At the same time, the security machine has network access restrictions and is not allowed to access the Internet. If you want to access the BMC, you usually need to deploy an external machine, and access remotely through the external machine, which has high test complexity. The present application provides a method, device and equipment for realizing out-of-band testing of a self-calling security machine and a medium.

[0006] In a first aspect, the present application provides a method for realizing out-of-band testing of a self-calling security machine, comprising the following steps:

[0007] The network card network port of the network card of the to-be-tested mainboard is connected with the baseboard management controller management port to build a self-calling out-of-band test environment.

[0008] Remote control is carried out to set the IP address of the BMC management port;

[0009] After the IP address of the BMC management port is set successfully, the network deployment of the operating system is carried out to make the BMC management port communicate with the network port of the network card;

[0010] The operation instruction is sent to the BMC through the out-of-band access mode, and the test is completed by acquiring or modifying the management information.

[0011] As a further limitation of the technical scheme of the application, the step of connecting the network port of the network card of the to-be-tested mainboard to the BMC management port to construct the self-calling out-of-band test environment comprises:

[0012] The network port of the network card of the to-be-tested mainboard is connected to the BMC management port by using a network cable;

[0013] The serial port of the BMC is interconnected with the USB interface of the mainboard, and the construction of the self-calling out-of-band test environment is completed.

[0014] As a further limitation of the technical scheme of the application, the step of remote control to set the IP address of the BMC management port comprises:

[0015] The serial port of the BMC is logged in under the operating system of the to-be-tested mainboard, and the static IP address of the BMC is set.

[0016] As a further limitation of the technical scheme of the application, the step of logging in the serial port of the BMC under the operating system of the to-be-tested mainboard and setting the static IP address of the BMC comprises:

[0017] The serial port of the BMC is logged in through the USB interface of the mainboard by using the interactive instruction, and the static IP address of the BMC is set.

[0018] The network configuration information of the BMC management port is output for display;

[0019] The serial console information is output to the first file under the operating system.

[0020] As a further limitation of the technical scheme of the application, the step of outputting the serial console information to the first file under the operating system comprises:

[0021] The first file is parsed to check whether the IP address of the BMC management port is set successfully;

[0022] If yes, the step of carrying out the network deployment of the operating system to make the BMC management port communicate with the network port of the network card is executed;

[0023] If no, the step of logging into the baseboard management controller serial port using the interactive instruction, setting the baseboard management controller static management port IP address is executed.

[0024] As a further limitation of the technical scheme of the application, the step of operating system network deployment to enable the baseboard management controller management port to communicate with the network card network port comprises:

[0025] The IP address of the network card network port and the IP address of the baseboard management controller management port are set to be in the same network segment, so as to enable the baseboard management controller management port to communicate with the network card network port.

[0026] As a further limitation of the technical scheme of the application, the step of setting the IP address of the network card network port and the IP address of the baseboard management controller management port to be in the same network segment comprises:

[0027] The IP address of the network card network port connected to the baseboard management controller management port is obtained;

[0028] The network segment to which the IP address of the network card network port belongs is determined;

[0029] It is determined whether the IP address of the baseboard management controller management port and the IP address of the network port are in the same network segment;

[0030] If yes, the step of issuing an operation instruction to the baseboard management controller through out-of-band access to obtain or modify management information is executed;

[0031] If no, the IP address of the baseboard management controller management port is modified so that the IP address of the baseboard management controller management port and the IP address of the network card network port are in the same network segment.

[0032] In a second aspect, the technical scheme of the application further provides a device for realizing self-calling out-of-band testing of a secure machine, comprising a test environment construction module, an IP address remote setting module, a network deployment module, and an out-of-band testing module;

[0033] The test environment construction module is used to connect the network card network port of the network card to be assembled with the baseboard management controller management port to construct a self-calling out-of-band testing environment;

[0034] The IP address remote setting module is used to remotely control the setting of the IP address of the baseboard management controller management port;

[0035] The network deployment module is used to, after the setting of the IP address of the baseboard management controller management port is successful, perform operating system network deployment to enable the baseboard management controller management port to communicate with the network card network port;

[0036] The out-of-band testing module is used to issue an operation instruction to the baseboard management controller through out-of-band access to obtain or modify management information to complete testing.

[0037] As a further limitation of the technical scheme of the application, the test environment construction module comprises a first execution unit and a second execution unit.

[0038] The first execution unit is configured to connect the network card network port of the network card assembled on the mainboard to be tested to the baseboard management controller management port through a network cable.

[0039] The second execution unit is configured to interconnect the baseboard management controller serial port and the mainboard universal serial bus interface, and complete the construction of the self-calling out-of-band test environment.

[0040] As a further limitation of the technical scheme of the application, the IP address remote setting module is configured to log in the baseboard management controller serial port under the operating system of the mainboard to be tested, and set the static baseboard management controller IP address.

[0041] As a further limitation of the technical scheme of the application, the IP address remote setting module comprises a setting unit, a configuration information output unit and a console information output unit.

[0042] The setting unit is configured to log in the baseboard management controller serial port through the mainboard universal serial bus interface using an interactive instruction, and set the static baseboard management controller management port IP address.

[0043] The configuration information output unit is configured to output the baseboard management controller management port network configuration information for display.

[0044] The console information output unit is configured to output the serial port console information to the first file under the operating system.

[0045] As a further limitation of the technical scheme of the application, the IP address remote setting module further comprises an analysis and judgment unit configured to analyze the first file to check whether the baseboard management controller management port IP address is set successfully; if yes, trigger the network deployment module to perform operating system network deployment to enable the baseboard management controller management port to communicate with the network card network port; if not, trigger the setting unit to log in the baseboard management controller serial port using the interactive instruction, and reset the static baseboard management controller management port IP address.

[0046] As a further limitation of the technical scheme of the application, the network deployment module is specifically configured to set the network card network port IP address and the baseboard management controller management port IP address to be in the same network segment, so as to enable the baseboard management controller management port to communicate with the network card network port.

[0047] As a further limitation of the technical scheme of the application, the network deployment module comprises an acquisition unit, a determination unit, a judgment unit and a modification setting unit.

[0048] The acquisition unit is configured to acquire the IP address of the network card network port connected to the baseboard management controller management port.

[0049] The determining unit is configured to determine a network segment to which an IP address of a network interface of a network card belongs.

[0050] The judging unit is configured to judge whether the IP address of the management port of the baseboard management controller and the IP address of the network interface are in the same network segment; if yes, triggering the out-of-band testing module to issue an operation instruction to the baseboard management controller through out-of-band access to acquire or modify the management information; if not, triggering the modifying and setting unit to modify the IP address of the management port of the baseboard management controller so that the IP address of the management port of the baseboard management controller and the IP address of the network interface of the network card are in the same network segment.

[0051] In a third aspect, the present application also provides an electronic device, which comprises at least one processor and a memory connected with the at least one processor; the memory stores computer program instructions executable by the at least one processor, and the computer program instructions are executed by the at least one processor to enable the at least one processor to execute the method for realizing self-calling of out-of-band testing of a security machine according to the first aspect.

[0052] In a fourth aspect, the present application also provides a non-transitory computer readable storage medium, which stores computer instructions, and the computer instructions enable the computer to execute the method for realizing self-calling of out-of-band testing of a security machine according to the first aspect.

[0053] As can be seen from the above technical solutions, the present application has the following advantages:

[0054] Through the self-calling mode of the to-be-tested mainboard, the out-of-band access channel of the BMC is opened, and the out-of-band access is realized by only one tested machine, thereby solving the influence of the physical isolation between the security machine BMC and the OS system of the signal creation product on the production testing, without the need of deploying an external machine, and the management control part and the operating system part testing are integrated in a single machine, thereby saving the testing cost and improving the production testing efficiency.

[0055] In addition, the present application has reliable design principles, simple structure and very wide application prospect.

[0056] Therefore, compared with the prior art, the present application has outstanding substantial characteristics and significant progress, and the beneficial effects of the implementation are also obvious. BRIEF DESCRIPTION OF DRAWINGS

[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced as follows, and obviously, other drawings can also be obtained by those skilled in the art without any creative effort on the basis of these drawings.

[0058] Figure 1is a schematic flow chart of the method of one embodiment of the present application.

[0059] Figure 2 is a schematic flow chart of the method of another embodiment of the present application.

[0060] Figure 3 is a schematic diagram of a mainboard system to be tested provided by an embodiment of the present application.

[0061] Figure 4 is a schematic block diagram of the apparatus of one embodiment of the present application.

[0062] Figure 5 is a schematic diagram of an electronic device connection in an embodiment of the present application. DETAILED DESCRIPTION

[0063] Those skilled in the art can understand that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in general terms in the above description. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0064] The block diagram shown in the accompanying drawings is only a functional entity, and does not necessarily correspond to a physically independent entity. That is, the functional entities can be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0065] In the embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic. The division of the units is only a logical function division, and actual implementation can have another division manner. For example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units or components shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can also be electrical, mechanical or other forms of connection.

[0066] Moreover, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the technology can be practiced without one or more of the specific details, or with other methods, components, materials, and so forth. In other instances, well-known structures, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the technology. To avoid

[0067] The application relates to the field of diagnostic testing, and provides a self-calling out-of-band testing method based on a product security machine, which solves the problem that factory production function testing instructions cannot be issued to a BMC from an OS in a scenario where the BMC and the OS are physically isolated, does not need to deploy an external testing environment, integrates management control parts and OS parts for testing, and enables the two parts to be tested at the same time, thereby improving production testing efficiency. Figure 1 It is a schematic flowchart of a method for implementing self-calling out-of-band testing of a security machine provided by an embodiment of the application, and the method comprises the following steps:

[0068] Step 1: connecting a network card network port of a network card to be tested to a baseboard management controller management port to construct a self-calling out-of-band testing environment;

[0069] It should be noted that in this step, the network card to be tested is used, a network cable is used to connect the network card network port to the baseboard management controller management port, the baseboard management controller serial port is interconnected with the mainboard universal serial bus interface, and the construction of the self-calling out-of-band testing environment is completed.

[0070] Step 2: remotely controlling the setting of an IP address of the baseboard management controller management port;

[0071] Step 3: after the baseboard management controller management port IP address setting is successful, performing OS network deployment to enable the baseboard management controller management port to communicate with the network card network port;

[0072] Step 4: issuing operation instructions to the baseboard management controller in a manner of out-of-band access, and acquiring or modifying management information to complete testing.

[0073] Figure 2is a schematic flow chart of a method for realizing self-calling out-of-band testing of a security machine according to another embodiment of the present application, and the method comprises the following steps:

[0074] S1: connecting a network card network port of a network card assembled on a to-be-tested motherboard to a baseboard management controller management port to construct a self-calling out-of-band testing environment;

[0075] It should be noted that in this step, the network card assembled on the to-be-tested motherboard is used to connect the network card network port to the baseboard management controller management port by using a network cable; the baseboard management controller serial port is interconnected to the motherboard universal serial bus interface, and the construction of the self-calling out-of-band testing environment is completed. Through the self-calling mode of the to-be-tested motherboard operating system accessing the BMC management system, out-of-band control and access to the BMC are realized, and the influence of the physical isolation of the BMC and the operating system on production testing is solved. At the same time, there is no need to deploy external machines, and the testing cost is saved.

[0076] S2: remotely controlling to set the baseboard management controller management port IP address;

[0077] Since the BMC and the OS system are physically isolated in communication, in-band communication is not available. However, if the out-of-band control management mode is to be used, the BMC management IP address needs to be known. In this step, the test machine motherboard USB interface is interconnected to the BMC serial port in a self-calling mode, and the BMC serial port is logged in under the to-be-tested motherboard OS system to set the static BMC IP address. That is, the baseboard management controller serial port is logged in under the to-be-tested motherboard operating system to set the static baseboard management controller IP address, which specifically comprises:

[0078] S21: logging in the baseboard management controller serial port through the motherboard universal serial bus interface by using an interactive instruction to set the baseboard management controller static management port IP address;

[0079] S22: outputting baseboard management controller management port network configuration information for display;

[0080] S23: outputting serial port console information to a first file under the operating system;

[0081] S24: analyzing the first file to check whether the baseboard management controller management port IP address is set successfully;

[0082] If yes, step S3 is performed;

[0083] If no, step S21 is performed;

[0084] logging in the serial port by using an expect interactive instruction to set the BMC static management IP;

[0085] #logging in the BMC to set the static BMC IP, for example: 192.168.1.10;

[0086] send--"ipmitool-I lanplus-H 127.0.0.1-U admin-P admin lan set 1ipaddr192.168.1.10\r";

[0087] expect-exact"~#";

[0088] # Use the lan print instruction to output the BMC management port network configuration information;

[0089] send--"ipmitool-I lanplus-H 127.0.0.1-U admin-P admin lan print 1\r";

[0090] # and output the serial console information to the file lan.txt.

[0091] Parse the lan.txt file to check whether the BMC management IP is set successfully;

[0092] bmcip=`cat lan.txt | grep-i "IP Address" | awk "NR==2" | awk-F':''{print $2}'". The first file in this application refers to the lan.txt file.

[0093] S3: Perform operating system network deployment to enable the baseboard management controller management port to communicate with the network card network port;

[0094] The implementation of this step is to: set the network card network port IP address and the baseboard management controller management port IP address to be in the same network segment, so that the baseboard management controller management port communicates with the network card network port; specifically including:

[0095] S31: Obtain the IP address of the network card network port connected to the baseboard management controller management port;

[0096] S32: Determine the network segment to which the IP address of the network card network port belongs;

[0097] S33: Determine whether the baseboard management controller management port IP address and the network port IP address are in the same network segment;

[0098] If yes, execute step S4;

[0099] If no, execute step S34;

[0100] S34: Modify the baseboard management controller management port IP address, so that the baseboard management controller management port IP address and the network card network port IP address are in the same network segment; execute step S4;

[0101] For example, when the network card network port connected with the BMC management port is eth0, modify / etc / sysconfig / network-scripts / ifcfg-eth0 to set the network port as static IP 192.168.1.11.

[0102] S4: issuing operation instructions to the baseboard management controller through the out-of-band access mode to acquire or modify management information.

[0103] After the BMC management port and the network card network port are connected, we can issue operation instructions to the BMC through the out-of-band access mode to acquire or modify management information, and the specific implementation is as follows:

[0104] ipmitool -I lanplus -H BMCIP -U username -P password operation instruction;

[0105] For example, the BMC IP is 192.168.0.1, the username is admin, the password is admin, and the instruction for acquiring BMC version information is ipmitool -I lanplus -H 192.168.0.1 -U admin -P admin mc info. This mode is a general out-of-band instruction, and will not be described here.

[0106] The embodiment of the application further provides an out-of-band test method for a secure machine self-call, which is a method for testing a system realized based on the method provided in the above embodiment, and the system diagram is shown in Fig. 3, comprising a to-be-tested mainboard, wherein the to-be-tested mainboard is provided with a BMC serial port and a mainboard USB interface connected with the BMC serial port; the to-be-tested mainboard is assembled with a network card, the network card network port is connected with the BMC management port through the above method; the to-be-tested mainboard is provided with an OS+BMC test program, the OS+BMC test program sets the BMC IP address by accessing the BMC through the mainboard USB interface, and the OS+BMC test program performs out-of-band test through the network card, and the method comprises the following steps:

[0107] SS1: setting the IP address of the network card network port connected with the BMC management port;

[0108] SS2: setting the IP address of the BMC management port through the BMC serial port;

[0109] SS3: issuing operation instructions to the BMC through the out-of-band mode according to the set BMC management port IP address;

[0110] SS4: running the OS+BMC test program to perform test;

[0111] SS5: outputting the test result after the test is completed.

[0112] The self-calling mode through a serial port is used to log in the BMC serial port under the OS system of the measured machine, set a static BMC IP address, add a mainboard network card and interconnect the network port of the BMC management network, access the BMC management system through the self-calling mode of the operating system of the measured mainboard, open the out-of-band access channel, realize the out-of-band control and access the BMC, and solve the influence of the physical isolation of the communication between the BMC and the OS system on the production test, without deploying an external machine and saving the test cost.

[0113] As shown in Figure 4 the embodiment of the present application also provides a device for realizing the self-calling out-of-band test of the security machine, which comprises a test environment construction module, an IP address remote setting module, a network deployment module and an out-of-band test module.

[0114] The test environment construction module is used to connect the network port of the network card of the measured mainboard to the management port of the baseboard management controller to construct the self-calling out-of-band test environment.

[0115] The network port of the network card of the measured mainboard is connected to the management port of the baseboard management controller by using a network cable; the serial port of the baseboard management controller is interconnected to the universal serial bus interface of the mainboard to complete the construction of the self-calling out-of-band test environment. The self-calling mode of the operating system of the measured mainboard accessing the BMC management system is used to realize the out-of-band control and access the BMC, solve the influence of the physical isolation of the communication between the BMC and the operating system on the production test, and also save the test cost without deploying an external machine.

[0116] The IP address remote setting module is used to remotely control the setting of the IP address of the management port of the baseboard management controller.

[0117] Due to the physical isolation of the communication between the BMC and the OS system, the in-band communication is not available. If the out-of-band control management mode is used, the BMC management IP address must be known. The IP address remote setting module uses the self-calling mode of the serial port to interconnect the USB interface of the mainboard of the test machine to the serial port of the BMC, log in the serial port of the BMC under the OS system of the measured mainboard, and set the static BMC IP address.

[0118] The network deployment module is used to make the management port of the baseboard management controller and the network port of the network card communicate after the setting of the IP address of the management port of the baseboard management controller is successful.

[0119] The IP address of the network port of the network card and the IP address of the management port of the baseboard management controller are set to the same network segment to make the management port of the baseboard management controller and the network port of the network card communicate; for example, when the network port of the network card connected to the management port of the BMC is eth0, the network port is set to the static IP 192.168.1.11 by modifying / etc / sysconfig / network-scripts / ifcfg-eth0.

[0120] An out-of-band test module is configured to issue operation instructions to a baseboard management controller through out-of-band access, and to acquire or modify management information to complete testing.

[0121] After the BMC management port and the network port of the network card are connected, we can issue operation instructions to the BMC through out-of-band access, and acquire or modify management information, and the specific implementation is as follows:

[0122] ipmitool -I lanplus -H BMCIP -U username -P password operation instruction;

[0123] For example, BMCIP: 192.168.0.1, username: admin, password: admin, to acquire BMC version information, the instruction is ipmitool -I lanplus -H 192.168.0.1 -U admin -P admin mc info, and this mode is a general out-of-band instruction.

[0124] The embodiment of the application also provides a device for realizing self-calling out-of-band testing of a secure machine, comprising a test environment construction module, an IP address remote setting module, a network deployment module and an out-of-band test module.

[0125] The test environment construction module is configured to assemble a network card with a to-be-tested motherboard, and connect the network port of the network card with the management port of the baseboard management controller to construct a self-calling out-of-band test environment.

[0126] The test environment construction module comprises a first execution unit and a second execution unit.

[0127] The first execution unit is configured to assemble a network card with a to-be-tested motherboard, and connect the network port of the network card with the management port of the baseboard management controller.

[0128] The second execution unit is configured to interconnect the serial port of the baseboard management controller with the universal serial bus interface of the motherboard, and complete construction of the self-calling out-of-band test environment.

[0129] The network card is assembled with the to-be-tested motherboard, and the network port of the network card is connected with the management port of the BMC through a network cable, and the self-calling mode of accessing the BMC management system through the operating system of the to-be-tested motherboard is realized, so that the BMC is accessed and controlled out-of-band, and the influence of the physical isolation of the BMC and the operating system on production testing is solved.

[0130] The IP address remote setting module is configured to remotely control setting of the IP address of the management port of the baseboard management controller, and is specifically configured to log in to the serial port of the baseboard management controller under the operating system of the to-be-tested motherboard, and set a static baseboard management controller IP address. The IP address remote setting module comprises a setting unit, a configuration information output unit, a console information output unit and an analysis and judgment unit.

[0131] The setting unit is configured to log in to a baseboard management controller serial port through a mainboard universal serial bus interface using an interactive instruction, and set an IP address of a static management port of the baseboard management controller.

[0132] The configuration information output unit is configured to output network configuration information of the management port of the baseboard management controller for display.

[0133] The console information output unit is configured to output serial console information to a first file under an operating system.

[0134] The analysis and judgment unit is configured to analyze the first file to check whether the IP address of the management port of the baseboard management controller is set successfully, and if so, trigger the network deployment module to perform operating system network deployment to enable the management port of the baseboard management controller to communicate with a network card network port, and if not, trigger the setting unit to log in to the serial port of the baseboard management controller using the interactive instruction, and re-set the IP address of the static management port of the baseboard management controller.

[0135] The network deployment module is configured to, after the IP address of the management port of the baseboard management controller is set successfully, perform operating system network deployment to enable the management port of the baseboard management controller to communicate with the network card network port, and is specifically configured to set the IP address of the network card network port and the IP address of the management port of the baseboard management controller to be in the same network segment, so as to enable the management port of the baseboard management controller to communicate with the network card network port. The network deployment module comprises an acquisition unit, a determination unit, a judgment unit and a modification setting unit.

[0136] The acquisition unit is configured to acquire the IP address of the network card network port connected to the management port of the baseboard management controller.

[0137] The determination unit is configured to determine the network segment to which the IP address of the network card network port belongs.

[0138] The judgment unit is configured to judge whether the IP address of the management port of the baseboard management controller and the IP address of the network port are in the same network segment, and if so, trigger the out-of-band test module to issue an operating instruction to the baseboard management controller through an out-of-band access mode to acquire or modify management information, and if not, trigger the modification setting unit to modify the IP address of the management port of the baseboard management controller, so that the IP address of the management port of the baseboard management controller and the IP address of the network card network port are in the same network segment. For example, when the network card network port connected to the management port of the BMC is eth0, modify / etc / sysconfig / network-scripts / ifcfg-eth0 to set the network port to be a static IP 192.168.1.11.

[0139] The out-of-band test module is used for issuing operation instructions to the baseboard management controller and obtaining or modifying management information through out-of-band access. After the BMC management port and the network card network port are connected, we can issue operation instructions to the BMC through out-of-band access, obtain or modify management information, and the specific implementation is as follows:

[0140] ipmitool -I lanplus -H BMCIP -U username -P password operation instruction.

[0141] For example, BMCIP: 192.168.0.1, username: admin, password: admin, to obtain BMC version information, the instruction is ipmitool -I lanplus -H 192.168.0.1 -U admin -P admin mc info, and this way is a general out-of-band instruction.

[0142] As shown in Figure 5 The embodiment of the application also provides an electronic device, which comprises a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 complete mutual communication through the communication bus 540. The communication bus can be used for information transmission between the electronic device and the sensor. The processor can call logical instructions in the memory to execute the following method: S1: a network card is assembled on a to-be-tested mainboard, a network cable is used to connect the network card network port and the baseboard management controller management port; a baseboard management controller serial port and a mainboard universal serial bus interface are interconnected, and construction of a self-calling out-of-band test environment is completed. S2: remote control is performed on setting of a baseboard management controller management port IP address; specifically, S21: an interactive instruction is used to log in the baseboard management controller serial port through the mainboard universal serial bus interface, and a baseboard management controller static management port IP address is set;

[0143] S22: display the baseboard management controller management port network configuration information; S23: output the serial console information to a first file under the operating system; S24: analyze the first file to check whether the baseboard management controller management port IP address is set successfully; if yes, execute step S3; if not, execute step S21; S3: set the network card network port IP address and the baseboard management controller management port IP address to be in the same network segment, so that the baseboard management controller management port communicates with the network card network port; specifically comprising: S31: obtain the IP address of the network card network port connected with the baseboard management controller management port; S32: determine the network segment to which the IP address of the network card network port belongs; S33: determine whether the baseboard management controller management port IP address and the network port IP address are in the same network segment; if yes, execute step S4; if not, execute step S34; S34: modify the baseboard management controller management port IP address, so that the baseboard management controller management port IP address and the network card network port IP address are in the same network segment; execute step S4; S4: issue an operation instruction to the baseboard management controller in the form of out-of-band access, and obtain or modify the management information.

[0144] In addition, the logic instructions in the memory described above can be realized in the form of a software function unit and sold or used as an independent product, and can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in the various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk, and various program code storage media.

[0145] The embodiment of the present application provides a non-transitory computer readable storage medium, which stores computer instructions, and the computer instructions cause a computer to execute the method provided by the method embodiment described above, for example, comprising: S1: assemble a network card with a to-be-tested mainboard, and connect the network card network port and the baseboard management controller management port using a network cable; interconnect the baseboard management controller serial port and the mainboard universal serial bus interface, and complete the construction of a self-calling out-of-band test environment. S2: remotely control the setting of the baseboard management controller management port IP address; specifically comprising: S21: use an interactive instruction to log in the baseboard management controller serial port through the mainboard universal serial bus interface, and set the baseboard management controller static management port IP address;

[0146] S22: output the substrate management controller management port network configuration information for display; S23: output the serial console information to the first file under the operating system; S24: analyze the first file to check whether the substrate management controller management port IP address is set successfully; if yes, execute step S3; if no, execute step S21;

[0147] S3: set the network card network port IP address and the substrate management controller management port IP address to the same network segment, so that the substrate management controller management port communicates with the network card network port; specifically comprising: S31: acquire the IP address of the network card network port connected with the substrate management controller management port; S32: determine the network segment to which the IP address of the network card network port belongs; S33: judge whether the substrate management controller management port IP address and the network port IP address are in the same network segment; if yes, execute step S4; if no, execute step S34; S34: modify the substrate management controller management port IP address, so that the substrate management controller management port IP address and the network card network port IP address are in the same network segment; execute step S4; S4: issue operation instructions to the substrate management controller through the out-of-band access mode, and acquire or modify the management information.

[0148] The method, device, equipment and medium for realizing the out-of-band test of the security machine according to the present application are the units and algorithm steps of each example described in combination with the embodiments disclosed in the present application, which can be realized in electronic hardware, computer software or combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been described in the above description in general terms. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. The skilled in the art can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.

[0149] Although the present application has been described in detail through reference to preferred embodiments, the present application is not limited to such preferred embodiments. Various equivalent modifications or replacements can be made to the embodiments of the present application by those skilled in the art without departing from the spirit and essence of the present application, and such modifications or replacements should be within the scope of the present application. Any skilled in the art within the technical scope disclosed in the present application can easily think of changes or replacements, which should be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. Method for enabling a secure machine to call out-of-band tests, characterized in that, It comprises the following steps: connecting the network card network port of the network card assembled on the to-be-tested motherboard to the baseboard management controller management port to build a self-calling out-of-band test environment; remotely controlling the setting of the baseboard management controller management port IP address; after the baseboard management controller management port IP address is successfully set, deploying the operating system network to enable the baseboard management controller management port to communicate with the network card network port; issuing operation instructions to the baseboard management controller in an out-of-band access manner to obtain or modify management information to complete the test; the step of connecting the network card network port of the network card assembled on the to-be-tested motherboard to the baseboard management controller management port to build a self-calling out-of-band test environment comprises: connecting the network card network port of the network card assembled on the to-be-tested motherboard to the baseboard management controller management port by using a network cable; interconnecting the baseboard management controller serial port and the universal serial bus interface of the to-be-tested motherboard to complete the construction of the self-calling out-of-band test environment; the step of remotely controlling the setting of the baseboard management controller management port IP address comprises: logging in the baseboard management controller serial port under the operating system of the to-be-tested motherboard and setting the baseboard management controller static management port IP address; the step of deploying the operating system network to enable the baseboard management controller management port to communicate with the network card network port comprises: setting the network card network port IP address and the baseboard management controller management port IP address to be in the same network segment to enable the baseboard management controller management port to communicate with the network card network port; the step of setting the network card network port IP address and the baseboard management controller management port IP address to be in the same network segment comprises: obtaining the IP address of the network card network port connected to the baseboard management controller management port; determining the network segment to which the IP address of the network card network port belongs; judging whether the baseboard management controller management port IP address and the IP address of the network card network port are in the same network segment; if yes, executing the step of issuing operation instructions to the baseboard management controller in an out-of-band access manner to obtain or modify management information; if no, modifying the baseboard management controller management port IP address to enable the baseboard management controller management port IP address and the network card network port IP address to be in the same network segment; issuing operation instructions to the baseboard management controller in an out-of-band access manner to obtain or modify management information to complete the test comprises: the to-be-tested motherboard is provided with an OS+BMC test program, and the OS+BMC test program performs out-of-band testing through the network card.

2. The method of claim 1, wherein the method further comprises: the step of logging in the baseboard management controller serial port under the operating system of the to-be-tested motherboard and setting the baseboard management controller static management port IP address comprises: logging in the baseboard management controller serial port through the universal serial bus interface of the to-be-tested motherboard by using an interactive instruction and setting the baseboard management controller static management port IP address; outputting and displaying the baseboard management controller management port network configuration information; outputting the serial port console information to a first file under the operating system.

3. The method of claim 2, wherein the method further comprises: the step of outputting the serial port console information to a first file under the operating system is followed by: analyzing the first file to check whether the baseboard management controller management port IP address is successfully set; if yes, executing the step of deploying the operating system network to enable the baseboard management controller management port to communicate with the network card network port; If not, the step of logging into the baseboard management controller serial port through the universal serial bus interface of the to-be-tested motherboard using the interactive instruction and setting the baseboard management controller static management port IP address is performed.

4. Apparatus for enabling a secure machine to call out-of-band tests, characterized in that, The test environment construction module, the IP address remote setting module, the network deployment module, and the out-of-band test module are included. The test environment construction module is configured to connect the network card network port of the network card assembled on the to-be-tested motherboard to the baseboard management controller management port to construct a self-calling out-of-band test environment. The IP address remote setting module is configured to remotely control the setting of the baseboard management controller management port IP address. The network deployment module is configured to, after the baseboard management controller management port IP address is set successfully, perform operating system network deployment to enable the baseboard management controller management port to communicate with the network card network port. The out-of-band test module is configured to issue operation instructions to the baseboard management controller through out-of-band access to obtain or modify management information to complete the test. The step of connecting the network card network port of the network card assembled on the to-be-tested motherboard to the baseboard management controller management port to construct a self-calling out-of-band test environment includes: The network card network port of the network card assembled on the to-be-tested motherboard is connected to the baseboard management controller management port using a network cable. The baseboard management controller serial port is interconnected with the universal serial bus interface of the to-be-tested motherboard to complete the construction of the self-calling out-of-band test environment. The step of remotely controlling the setting of the baseboard management controller management port IP address includes: Logging into the baseboard management controller serial port under the operating system of the to-be-tested motherboard and setting the baseboard management controller static management port IP address. The step of performing operating system network deployment to enable the baseboard management controller management port to communicate with the network card network port includes: Setting the network card network port IP address and the baseboard management controller management port IP address to be in the same network segment to enable the baseboard management controller management port to communicate with the network card network port. The step of setting the network card network port IP address and the baseboard management controller management port IP address to be in the same network segment includes: Obtaining the IP address of the network card network port connected to the baseboard management controller management port; Determining the network segment to which the IP address of the network card network port belongs; Determining whether the baseboard management controller management port IP address and the IP address of the network card network port are in the same network segment; If yes, the step of issuing operation instructions to the baseboard management controller through out-of-band access to obtain or modify management information is performed. If not, the baseboard management controller management port IP address is modified to enable the baseboard management controller management port IP address and the network card network port IP address to be in the same network segment. The step of issuing operation instructions to the baseboard management controller through out-of-band access to obtain or modify management information to complete the test includes: The to-be-tested motherboard is provided with an OS+BMC test program, and the OS+BMC test program performs out-of-band testing through the network card.

5. An electronic device, comprising: The electronic device includes at least one processor and a memory connected in communication with the at least one processor. The memory stores computer program instructions executable by the at least one processor. The computer program instructions are executed by the at least one processor to enable the at least one processor to perform the method for implementing the self-calling out-of-band test of the security machine according to any one of claims 1 to 3.

6. A non-transitory computer-readable storage medium, comprising: The non-transitory computer readable storage medium stores computer instructions that cause the computer to perform the method of enabling secure machine self-calling out-of-band testing as claimed in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Recovery method and system against startup disability caused by BMC fault

    CN107832167A

  • TF Card signal integrity test system and method based on baseboard management controller (BMC)

    CN108809754A