CN115378835A - Method, device and equipment for testing network card NCSI function and readable medium - Google Patents

Method, device and equipment for testing network card NCSI function and readable medium Download PDF

Info

Publication number
CN115378835A
CN115378835A CN202210998153.4A CN202210998153A CN115378835A CN 115378835 A CN115378835 A CN 115378835A CN 202210998153 A CN202210998153 A CN 202210998153A CN 115378835 A CN115378835 A CN 115378835A
Authority
CN
China
Prior art keywords
port
setting
dhcp service
restarting
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210998153.4A
Other languages
Chinese (zh)
Other versions
CN115378835B (en
Inventor
刘传彬
王安琪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
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 CN202210998153.4A priority Critical patent/CN115378835B/en
Publication of CN115378835A publication Critical patent/CN115378835A/en
Application granted granted Critical
Publication of CN115378835B publication Critical patent/CN115378835B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • 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/50Testing arrangements

Landscapes

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

Abstract

The invention provides a method, a device, equipment and a readable medium for testing network card NCSI function, wherein the method comprises the following steps: interconnecting a first port and a second port of a network card to be tested through a network cable; modifying a DHCP service configuration file to set the first port as a service end for providing DHCP service, and starting the DHCP service; setting IP information and subnet mask information of a first port, restarting the first port to set the first port to a server mode, and setting IP information of a second port, restarting the second port to set the second port to a client mode; and confirming whether the BMC shared port can acquire the IP address through the system command so as to check whether the NCSI function of the second port of the network card is normal. By using the scheme of the invention, the NCSI function of the network card can be tested under the condition of not using a switch and an additional server, so that the tooling cost is saved.

Description

Method, device and equipment for testing network card NCSI function and readable medium
Technical Field
The present invention relates to the field of computers, and in particular, to a method, an apparatus, a device and a readable medium for testing NCSI function of a network card.
Background
The rapid development of network technology makes people have higher requirements on out-of-band manageability and controllability of servers. Through out-of-band management, engineers can be connected to corresponding servers through a network at any place to carry out a series of management and maintenance, and do not need to stay in a noisy machine room environment for a long time. NCSI (Network Controller Sideband Interface) is an industry standard for a Sideband Interface Network Controller defined by a distributed management task force to support out-of-band management of servers.
NCSI must test as the basic function of network card in PCBA diagnostic process, in order to test this function at present either set up the switch environment in PCBA factory, or each test machine cooperates a server, and the frock cost is very high, and the test is very inconvenient. And the test process has the requirement to net twine length, must use the net twine that length is longer, when the test board increases, needs the quantity of increase switch, has the requirement to producing the line test board locating position, can not be too far away from the switch.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a method, an apparatus, a device, and a readable medium for testing a network card NCSI function, which can test the network card NCSI function without using a switch and an additional server, and save tooling cost.
Based on the above purpose, an aspect of the embodiments of the present invention provides a method for testing NCSI function of a network card, including the following steps:
interconnecting a first port and a second port of a network card to be tested through a network cable;
modifying the DHCP service configuration file to set the first port as a service end for providing DHCP service, and starting the DHCP service;
setting IP information and subnet mask information of a first port, restarting the first port to set the first port to a server mode, and setting IP information of a second port, restarting the second port to set the second port to a client mode;
and confirming whether the BMC sharing port can acquire the IP address through a system command so as to check whether the NCSI function of the second port of the network card is normal.
According to an embodiment of the present invention, further comprising:
modifying the DHCP service configuration file to set the second port as a service end for providing the DHCP service, and starting the DHCP service;
setting IP information and subnet mask information of the second port, restarting the second port to set the second port to a server mode, setting IP information of the first port, and restarting the first port to set the first port to a client mode;
restarting the BMC;
and confirming whether the BMC sharing port can acquire the IP address through a system command so as to check whether the NCSI function of the first port of the network card is normal.
According to one embodiment of the present invention, modifying the DHCP service configuration file to set the first port as a service providing the DHCP service, and starting the DHCP service includes:
modify a DHCP service configuration file dhcpd.conf using configuration DHCPDARGS = eth0 to set the first port as a service providing DHCP service;
modifying a DHCP service configuration file dhcpd.conf, and setting an IP address range acquired by the second port by using a configuration range 10.10.0.2010.10.0.240;
the DHCP service is started using the systemctl restart dhcpd command.
According to one embodiment of the present invention, setting the IP information and the subnet mask information of the first port, restarting the first port to set the first port to the server side mode, and setting the IP information of the second port, restarting the second port to set the second port to the client side mode includes:
setting the first port to obtain the IP mode as static obtaining, setting the IP address of the first port to be 10.10.0.10, setting the subnet mask of the first port to be 255.255.0.0, and restarting the first port;
and setting the IP obtaining mode of the second port as dynamic obtaining and restarting the second port.
In another aspect of the embodiments of the present invention, there is also provided a device for testing NCSI function of a network card, where the device includes:
the connection module is configured to interconnect a first port and a second port of the network card to be tested through a network cable;
the modification module is configured to modify the DHCP service configuration file so as to set the first port as a service end for providing DHCP service and start the DHCP service;
a setting module configured to set IP information and subnet mask information of the first port, restart the first port to set the first port to a server mode, and set IP information of the second port, restart the second port to set the second port to a client mode;
and the detection module is configured to confirm whether the BMC sharing port can acquire the IP address through a system command so as to check whether the NCSI function of the second port of the network card is normal.
According to an embodiment of the invention, the test system further comprises a test module configured to:
modifying the DHCP service configuration file to set the second port as a service end for providing the DHCP service, and starting the DHCP service;
setting IP information and subnet mask information of the second port, restarting the second port to set the second port to a server mode, setting IP information of the first port, and restarting the first port to set the first port to a client mode;
restarting the BMC;
and confirming whether the BMC sharing port can acquire the IP address through a system command so as to check whether the NCSI function of the first port of the network card is normal.
According to one embodiment of the invention, the modification module is further configured to:
conf, modifying a DHCP service configuration file dhcpd, using configuration DHCPDARGS = eth0 to set the first port as a service end for providing DHCP service;
modifying a DHCP service configuration file dhcpd.conf, and setting an IP address range acquired by the second port by using a configuration range 10.10.0.2010.10.0.240;
the DHCP service is started using the system restart dhcpd command.
According to one embodiment of the invention, the setup module is further configured to:
setting the first port to obtain the IP mode as static obtaining, setting the IP address of the first port to be 10.10.0.10, setting the subnet mask of the first port to be 255.255.0.0, and restarting the first port;
and setting the IP obtaining mode of the second port as dynamic obtaining and restarting the second port.
In another aspect of an embodiment of the present invention, there is also provided a computer apparatus including:
at least one processor; and
a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of any of the methods described above.
In another aspect of the embodiments of the present invention, a computer-readable storage medium is further provided, in which a computer program is stored, and the computer program realizes the steps of any one of the above methods when executed by a processor.
The invention has the following beneficial technical effects: the method for testing the NCSI function of the network card provided by the embodiment of the invention comprises the steps of interconnecting a first port and a second port of the network card to be tested through a network cable; modifying a DHCP service configuration file to set the first port as a service end for providing DHCP service, and starting the DHCP service; setting IP information and subnet mask information of a first port, restarting the first port to set the first port to a server mode, and setting IP information of a second port, restarting the second port to set the second port to a client mode; the technical scheme that whether the BMC sharing port can acquire the IP address or not to check whether the NCSI function of the second port of the network card is normal or not is confirmed through the system command, the NCSI function of the network card can be tested under the condition that a switch and an additional server are not needed, and the tooling cost is saved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for testing NCSI function of a network card according to an embodiment of the present invention;
fig. 2 is a schematic diagram of a device for testing NCSI function of a network card according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a computer device according to one embodiment of the present invention;
fig. 4 is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
Based on the above purpose, the first aspect of the embodiments of the present invention provides an embodiment of a method for testing the NCSI function of a network card. Fig. 1 shows a schematic flow diagram of the method.
As shown in fig. 1, the method may comprise the steps of:
s1, a first port and a second port of a network card to be tested are interconnected through a network cable. The network card to be tested is provided with two ports, the first port is LAN0, the second port is LAN1, and LAN0 and LAN1 are connected with each other through a network cable.
S2, the DHCP service configuration file is modified to set the first port as a service end for providing the DHCP service, and the DHCP service is started. Modify DHCP service configuration file dhcpd.conf, use configuration DHCPDARGS = eth0 to set LAN0 as the server side (server side) providing DHCP service, while modifying DHCP service configuration file dhcpd.conf, use configuration range 10.10.0.2010.10.0.240 to set the range of IP address acquired by the client (client side), and use systemctl restart dhcpd command to start DHCP service to validate the above settings.
And S3, setting the IP information and the subnet mask information of the first port, restarting the first port to set the first port to be in a service end mode, setting the IP information of the second port, and restarting the second port to set the second port to be in a client end mode. Setting the IP mode of LAN0 to be static acquisition, setting the command to be echo 'BOOTPROTO = static' >/etc/sysconfig/network-scripts/ifcfg-eth0, then setting the IP address of LAN0 to be 10.10.0.10, setting the subnet mask of LAN0 to be 255.255.0.0, setting the subnet mask of LAN0 to be 255.255.0, 'NETMASK = 255.0.0' >/etc/sysconfig/network-scripts/ifcfg-eth0, using ifdown eth0 to firstly stop LAN0 port, then using ifup eth0 to start LAN0, and setting the network card mode port to be effective through the steps. Setting the IP obtaining mode of the LAN1 as dynamic obtaining, commanding echo 'BOOTPROTO = dhcp' >/etc/sysconfig/network-scripts/ifcfg-eth1, using ifdown eth1 to firstly deactivate the LAN1 port, then using ifup eth1 to activate the LAN1, so as to enable the setting to be effective, thus the LAN1 port can dynamically obtain the IP address, and the LAN1 port of the network card can be set to be client end mode through the steps.
And S4, confirming whether the BMC shared port can acquire the IP address through a system command so as to check whether the NCSI function of the second port of the network card is normal. After the LAN1 port can dynamically acquire the IP, the BMC may acquire the IP through the LAN1 via the NCSI function, and confirm whether the BMC sharing port acquires the IP through the ipmitool LAN print 8 command, thereby checking whether the NCSI function of the second port of the network card is normal.
By using the technical scheme of the invention, the NCSI function of the network card can be tested without using a switch and an additional server, so that the tooling cost is saved.
In a preferred embodiment of the present invention, further comprising:
modifying the DHCP service configuration file to set the second port as a service end for providing the DHCP service, and starting the DHCP service;
setting IP information and subnet mask information of the second port, restarting the second port to set the second port to a server mode, setting IP information of the first port, and restarting the first port to set the first port to a client mode;
restarting the BMC;
and confirming whether the BMC shared port can acquire the IP address through the system command so as to check whether the NCSI function of the first port of the network card is normal. The process is the same as the method, only the settings of the first port and the second port are exchanged to detect the NCSI function of the first port, and the BMC is required to be restarted in the process to ensure that the IP originally acquired by the BMC is lost and prevent the cached data from influencing the test.
In a preferred embodiment of the present invention, modifying the DHCP service configuration file to set the first port as a server providing the DHCP service, and starting the DHCP service includes:
modify a DHCP service configuration file dhcpd.conf using configuration DHCPDARGS = eth0 to set the first port as a service providing DHCP service;
modifying a DHCP service configuration file dhcpd.conf, and setting an IP address range acquired by the second port by using a configuration range 10.10.0.2010.10.0.240;
the DHCP service is started using the system restart dhcpd command.
In a preferred embodiment of the present invention, setting the IP information and subnet mask information of the first port, restarting the first port to set the first port to the server side mode, and setting the IP information of the second port, restarting the second port to set the second port to the client side mode comprises:
setting the first port to obtain the IP mode as static obtaining, setting the IP address of the first port to be 10.10.0.10, setting the subnet mask of the first port to be 255.255.0.0, and restarting the first port;
and setting the IP acquiring mode of the second port as dynamic acquiring and restarting the second port.
The NCSI function of the network card can be tested without using an exchanger and an additional server, so that the tooling cost is saved; the invention does not need to limit the length of the network cable, and is convenient for arranging a test machine on a production line.
It should be noted that, as will be understood by those skilled in the art, all or part of the processes in the methods of the above embodiments may be implemented by instructing relevant hardware through a computer program, and the above programs may be stored in a computer-readable storage medium, and when executed, the programs may include the processes of the embodiments of the methods as described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like. The embodiments of the computer program may achieve the same or similar effects as any of the above-described method embodiments.
Furthermore, the method disclosed according to an embodiment of the present invention may also be implemented as a computer program executed by a CPU, and the computer program may be stored in a computer-readable storage medium. The computer program, when executed by the CPU, performs the functions defined above in the methods disclosed in the embodiments of the present invention.
In view of the above objects, in a second aspect of the embodiments of the present invention, there is provided an apparatus for testing NCSI function of a network card, as shown in fig. 2, the apparatus 200 includes:
the connection module is configured to interconnect a first port and a second port of the network card to be tested through a network cable;
the modification module is configured to modify the DHCP service configuration file so as to set the first port as a service end for providing DHCP service and start the DHCP service;
a setting module configured to set IP information and subnet mask information of the first port, restart the first port to set the first port to a server mode, and set IP information of the second port, restart the second port to set the second port to a client mode;
and the detection module is configured to confirm whether the BMC shared port can acquire the IP address through the system command so as to check whether the NCSI function of the second port of the network card is normal.
In a preferred embodiment of the present invention, the test module further comprises:
modifying the DHCP service configuration file to set the second port as a service end for providing the DHCP service, and starting the DHCP service;
setting IP information and subnet mask information of the second port, restarting the second port to set the second port to a server mode, and setting IP information of the first port, restarting the first port to set the first port to a client mode;
restarting the BMC;
and confirming whether the BMC shared port can acquire the IP address through the system command so as to check whether the NCSI function of the first port of the network card is normal.
In a preferred embodiment of the invention, the modification module is further configured to:
modify a DHCP service configuration file dhcpd.conf using configuration DHCPDARGS = eth0 to set the first port as a service providing DHCP service;
modifying a DHCP service configuration file dhcpd.conf, and setting an IP address range acquired by the second port by using a configuration range 10.10.0.2010.10.0.240;
the DHCP service is started using the systemctl restart dhcpd command.
In a preferred embodiment of the present invention, the setup module is further configured to:
setting the first port to obtain the IP mode as static obtaining, setting the IP address of the first port to be 10.10.0.10, setting the subnet mask of the first port to be 255.255.0.0, and restarting the first port;
and setting the IP obtaining mode of the second port as dynamic obtaining and restarting the second port.
In view of the above object, a third aspect of the embodiments of the present invention provides a computer device. Fig. 3 is a schematic diagram of an embodiment of a computer device provided by the present invention. As shown in fig. 3, an embodiment of the present invention includes the following means: at least one processor 21; and a memory 22, the memory 22 storing computer instructions 23 executable on the processor, the instructions when executed by the processor implementing the method of:
interconnecting a first port and a second port of a network card to be tested through a network cable;
modifying the DHCP service configuration file to set the first port as a service end for providing DHCP service, and starting the DHCP service;
setting IP information and subnet mask information of a first port, restarting the first port to set the first port to a server mode, and setting IP information of a second port, restarting the second port to set the second port to a client mode;
and confirming whether the BMC shared port can acquire the IP address through the system command so as to check whether the NCSI function of the second port of the network card is normal.
In a preferred embodiment of the present invention, the method further comprises:
modifying the DHCP service configuration file to set the second port as a service end for providing the DHCP service, and starting the DHCP service;
setting IP information and subnet mask information of the second port, restarting the second port to set the second port to a server mode, setting IP information of the first port, and restarting the first port to set the first port to a client mode;
restarting the BMC;
and confirming whether the BMC sharing port can acquire the IP address through a system command so as to check whether the NCSI function of the first port of the network card is normal.
In a preferred embodiment of the present invention, modifying the DHCP service configuration file to set the first port as a server providing the DHCP service, and starting the DHCP service includes:
modify a DHCP service configuration file dhcpd.conf using configuration DHCPDARGS = eth0 to set the first port as a service providing DHCP service;
modifying a DHCP service configuration file dhcpd.conf, and setting an IP address range acquired by the second port by using a configuration range 10.10.0.2010.10.0.240;
the DHCP service is started using the systemctl restart dhcpd command.
In a preferred embodiment of the present invention, setting the IP information and the subnet mask information of the first port, restarting the first port to set the first port to the server side mode, and setting the IP information of the second port, restarting the second port to set the second port to the client side mode comprises:
setting the first port to obtain the IP mode as static obtaining, setting the IP address of the first port to be 10.10.0.10, setting the subnet mask of the first port to be 255.255.0.0, and restarting the first port;
and setting the IP obtaining mode of the second port as dynamic obtaining and restarting the second port.
In view of the above object, a fourth aspect of the embodiments of the present invention proposes a computer-readable storage medium. FIG. 4 illustrates a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. As shown in fig. 4, the computer readable storage medium 31 stores a computer program 32 which, when executed by a processor, performs the method of:
interconnecting a first port and a second port of a network card to be tested through a network cable;
modifying a DHCP service configuration file to set the first port as a service end for providing DHCP service, and starting the DHCP service;
setting IP information and subnet mask information of a first port, restarting the first port to set the first port to a server mode, and setting IP information of a second port, restarting the second port to set the second port to a client mode;
and confirming whether the BMC shared port can acquire the IP address through the system command so as to check whether the NCSI function of the second port of the network card is normal.
In a preferred embodiment of the present invention, the method further comprises:
modifying the DHCP service configuration file to set the second port as a service end for providing the DHCP service, and starting the DHCP service;
setting IP information and subnet mask information of the second port, restarting the second port to set the second port to a server mode, setting IP information of the first port, and restarting the first port to set the first port to a client mode;
restarting the BMC;
and confirming whether the BMC sharing port can acquire the IP address through a system command so as to check whether the NCSI function of the first port of the network card is normal.
In a preferred embodiment of the present invention, modifying the DHCP service configuration file to set the first port as a service providing the DHCP service, and starting the DHCP service includes:
modify a DHCP service configuration file dhcpd.conf using configuration DHCPDARGS = eth0 to set the first port as a service providing DHCP service;
modifying a DHCP service configuration file dhcpd.conf, and setting an IP address range acquired by the second port by using a configuration range 10.10.0.2010.10.0.240;
the DHCP service is started using the systemctl restart dhcpd command.
In a preferred embodiment of the present invention, setting the IP information and subnet mask information of the first port, restarting the first port to set the first port to the server side mode, and setting the IP information of the second port, restarting the second port to set the second port to the client side mode comprises:
setting the first port to obtain the IP mode as static obtaining, setting the IP address of the first port to be 10.10.0.10, setting the subnet mask of the first port to be 255.255.0.0, and restarting the first port;
and setting the IP obtaining mode of the second port as dynamic obtaining and restarting the second port.
Furthermore, the methods disclosed according to embodiments of the invention may also be implemented as a computer program executed by a processor, which may be stored in a computer-readable storage medium. Which when executed by a processor performs the above-described functions defined in the methods disclosed in embodiments of the invention.
Further, the above method steps and system elements may also be implemented using a controller and a computer readable storage medium for storing a computer program for causing the controller to implement the functions of the above steps or elements.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
In one or more exemplary designs, the functions may be implemented in hardware, software, firmware, or any combination thereof. If implemented in software, the functions may be stored on or transmitted over as one or more instructions or code on a computer-readable medium. Computer-readable media includes both computer storage media and communication media including any medium that facilitates transfer of a computer program from one place to another. A storage media may be any available media that can be accessed by a general purpose or special purpose computer. By way of example, and not limitation, such computer-readable media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a general-purpose or special-purpose computer, or a general-purpose or special-purpose processor. Also, any connection is properly termed a computer-readable medium. For example, if the software is transmitted from a website, server, or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital Subscriber Line (DSL), or wireless technologies such as infrared, radio, and microwave, then the coaxial cable, fiber optic cable, twisted pair, DSL, or wireless technologies such as infrared, radio, and microwave are included in the definition of medium. Disk and disc, as used herein, includes Compact Disc (CD), laser disc, optical disc, digital Versatile Disc (DVD), floppy disk, blu-ray disc where disks usually reproduce data magnetically, while discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the above embodiments of the present invention are merely for description, and do not represent the advantages or disadvantages of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. A method for testing the NCSI function of a network card is characterized by comprising the following steps:
interconnecting a first port and a second port of a network card to be tested through a network cable;
modifying a DHCP service configuration file to set the first port as a service end for providing DHCP service, and starting the DHCP service;
setting IP information and subnet mask information of a first port, restarting the first port to set the first port to a server mode, and setting IP information of a second port, restarting the second port to set the second port to a client mode;
and confirming whether the BMC shared port can acquire the IP address through the system command so as to check whether the NCSI function of the second port of the network card is normal.
2. The method of claim 1, further comprising:
modifying the DHCP service configuration file to set the second port as a server side for providing the DHCP service, and starting the DHCP service;
setting IP information and subnet mask information of the second port, restarting the second port to set the second port to a server mode, setting IP information of the first port, and restarting the first port to set the first port to a client mode;
restarting the BMC;
and confirming whether the BMC shared port can acquire the IP address through the system command so as to check whether the NCSI function of the first port of the network card is normal.
3. The method of claim 1, wherein modifying the DHCP service configuration file to set the first port as a server for providing DHCP services and wherein initiating DHCP services comprises:
conf, modifying a DHCP service configuration file dhcpd, using configuration DHCPDARGS = eth0 to set the first port as a service end for providing DHCP service;
modifying a DHCP service configuration file dhcpd.conf, and setting an IP address range acquired by the second port by using a configuration range 10.10.0.2010.10.0.240;
the DHCP service is started using the systemctl restart dhcpd command.
4. The method of claim 1, wherein setting the IP information and subnet mask information for the first port, restarting the first port to set the first port to server mode, and setting the IP information for the second port, restarting the second port to set the second port to client mode comprises:
setting the first port to obtain the IP mode as static obtaining, setting the IP address of the first port to be 10.10.0.10, setting the subnet mask of the first port to be 255.255.0.0, and restarting the first port;
and setting the IP obtaining mode of the second port as dynamic obtaining and restarting the second port.
5. A device for NCSI function test of a network card is characterized by comprising:
the connection module is configured to interconnect a first port and a second port of the network card to be tested through a network cable;
the modification module is configured to modify the DHCP service configuration file so as to set the first port as a service end for providing the DHCP service and start the DHCP service;
a setting module configured to set IP information and subnet mask information of a first port, restart the first port to set the first port to a server mode, and set IP information of a second port, restart the second port to set the second port to a client mode;
and the detection module is configured to confirm whether the BMC sharing port can acquire the IP address through a system command so as to check whether the NCSI function of the second port of the network card is normal.
6. The apparatus of claim 5, further comprising a testing module configured to:
modifying the DHCP service configuration file to set the second port as a service end for providing the DHCP service, and starting the DHCP service;
setting IP information and subnet mask information of the second port, restarting the second port to set the second port to a server mode, and setting IP information of the first port, restarting the first port to set the first port to a client mode;
restarting the BMC;
and confirming whether the BMC sharing port can acquire the IP address through a system command so as to check whether the NCSI function of the first port of the network card is normal.
7. The apparatus of claim 5, wherein the modification module is further configured to:
modify a DHCP service configuration file dhcpd.conf using configuration DHCPDARGS = eth0 to set the first port as a service providing DHCP service;
modifying a DHCP service configuration file dhcpd.conf, and setting an IP address range acquired by the second port by using a configuration range 10.10.0.2010.10.0.240;
the DHCP service is started using the system restart dhcpd command.
8. The apparatus of claim 5, wherein the setup module is further configured to:
setting the first port to obtain the IP mode as static obtaining, setting the IP address of the first port to be 10.10.0.10, setting the subnet mask of the first port to be 255.255.0.0, and restarting the first port;
and setting the IP obtaining mode of the second port as dynamic obtaining and restarting the second port.
9. A computer device, comprising:
at least one processor; and
a memory storing computer instructions executable on the processor, the instructions when executed by the processor implementing the steps of the method of any one of claims 1 to 4.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 4.
CN202210998153.4A 2022-08-19 2022-08-19 Network card NCSI function test method, device, equipment and readable medium Active CN115378835B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210998153.4A CN115378835B (en) 2022-08-19 2022-08-19 Network card NCSI function test method, device, equipment and readable medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210998153.4A CN115378835B (en) 2022-08-19 2022-08-19 Network card NCSI function test method, device, equipment and readable medium

Publications (2)

Publication Number Publication Date
CN115378835A true CN115378835A (en) 2022-11-22
CN115378835B CN115378835B (en) 2023-08-04

Family

ID=84066691

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210998153.4A Active CN115378835B (en) 2022-08-19 2022-08-19 Network card NCSI function test method, device, equipment and readable medium

Country Status (1)

Country Link
CN (1) CN115378835B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2532054A (en) * 2014-11-07 2016-05-11 Ibm NC-SI port controller
US20170034120A1 (en) * 2015-07-31 2017-02-02 Fujitsu Limited Network device setting method and information processing device
CN111030892A (en) * 2019-12-26 2020-04-17 苏州浪潮智能科技有限公司 Method, equipment and medium for testing network function in BMC NCSI adaptive mode
CN114338493A (en) * 2022-02-24 2022-04-12 苏州浪潮智能科技有限公司 NCSI test method, system, device and storage medium based on network protocol stack
CN114443381A (en) * 2021-12-24 2022-05-06 苏州浪潮智能科技有限公司 Method, device, equipment and medium for checking server configuration

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2532054A (en) * 2014-11-07 2016-05-11 Ibm NC-SI port controller
US20170034120A1 (en) * 2015-07-31 2017-02-02 Fujitsu Limited Network device setting method and information processing device
CN111030892A (en) * 2019-12-26 2020-04-17 苏州浪潮智能科技有限公司 Method, equipment and medium for testing network function in BMC NCSI adaptive mode
CN114443381A (en) * 2021-12-24 2022-05-06 苏州浪潮智能科技有限公司 Method, device, equipment and medium for checking server configuration
CN114338493A (en) * 2022-02-24 2022-04-12 苏州浪潮智能科技有限公司 NCSI test method, system, device and storage medium based on network protocol stack

Also Published As

Publication number Publication date
CN115378835B (en) 2023-08-04

Similar Documents

Publication Publication Date Title
CN110879712B (en) Cloud data center physical host installation method and related device
CN112866017B (en) Method, system, medium and device for configuring BMC IP address of bare metal server
CN111030892B (en) Method, equipment and medium for testing network function in BMC NCSI adaptive mode
CN107666493B (en) Database configuration method and equipment thereof
EP2408140A1 (en) Method, control point, apparatus and communication system for configuring access right
CN110011877B (en) Switch testing method and device
CN114157639B (en) Method, device and equipment for collecting information of intelligent network card of server and readable medium
CN103475526A (en) IP setting and detecting method supporting multi-VLAN virtual machine
CN114422618B (en) Cloud-protogenesis-based IOT platform protocol adaptation method, device, equipment and medium
CN112003963B (en) Method, system, device and medium for mounting volume on bare metal server
CN114363334B (en) Cloud system, network configuration method, device and equipment of cloud desktop virtual machine
CN115378835A (en) Method, device and equipment for testing network card NCSI function and readable medium
CN114490746B (en) Equipment testing method and device, equipment to be tested and storage medium
CN114443381A (en) Method, device, equipment and medium for checking server configuration
US9949046B2 (en) Automating repairs to audio systems
CN112291096B (en) Configuration method and device of bare metal server
CN110798381B (en) Method, device and equipment for verifying KCS channel communication stability
EP3357219A1 (en) Addressing in a system of interconnected units
CN106789150B (en) Network fault detection method and device
CN111858300B (en) Automatic testing method, device and system for embedded equipment and storage medium
CN115426258B (en) Information configuration method, device, switch and readable storage medium
CN113472558B (en) Network deployment method and device
CN114416538A (en) Method, device, equipment and medium for multi-server concurrent test
CN116405598B (en) Telephone deployment method and device and electronic equipment
CN113886218B (en) Method, device, equipment and readable medium for verifying BIOS refreshing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant