CN115242696A - Network card test environment building method, device and medium - Google Patents

Network card test environment building method, device and medium Download PDF

Info

Publication number
CN115242696A
CN115242696A CN202210883313.0A CN202210883313A CN115242696A CN 115242696 A CN115242696 A CN 115242696A CN 202210883313 A CN202210883313 A CN 202210883313A CN 115242696 A CN115242696 A CN 115242696A
Authority
CN
China
Prior art keywords
network card
information
network
test
dynamic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210883313.0A
Other languages
Chinese (zh)
Inventor
夏海超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Shandong Computer Technology Co Ltd
Original Assignee
Inspur Shandong Computer 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 Inspur Shandong Computer Technology Co Ltd filed Critical Inspur Shandong Computer Technology Co Ltd
Priority to CN202210883313.0A priority Critical patent/CN115242696A/en
Publication of CN115242696A publication Critical patent/CN115242696A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/50Testing arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting

Abstract

The application discloses a network card test environment building method, a network card test environment building device and a network card test environment building medium, and relates to the technical field of networks. The network card testing environment building method is applied to a testing end provided with a network card, and network card information of the network card is obtained; setting IP information of each network port corresponding to the network card according to the network card information; and sending dynamic IP information to the server according to the IP information and the DHCP service, so that the server receives the dynamic IP information after acquiring the network card information of the network card, and generating a network port configuration file according to the dynamic IP information and the network card information to complete the establishment of the test environment. Therefore, the scheme supports the remote connection of the test end and the service end, the IP information of the service end is distributed by setting the DHCP service of the test end, the complex operation of remote construction environment is avoided, and the efficiency of project coordination and cooperation is improved.

Description

Network card test environment building method, device and medium
Technical Field
The application relates to the technical field of networks, in particular to a network card test environment building method, device and medium.
Background
A Network Interface Controller (NIC) is a piece of computer hardware designed to allow computers to communicate over a computer Network, which allows computer users to connect to each other via cable or wirelessly. Therefore, the network card plays a very important role in computer communication. For the evaluation of a network card, the performance test of the network card is an important index of the reliability of the network card.
At present, the testing method for the network card is generally performed through manual control, testers not only need to control the testing end and the service end at the same time, but also need to frequently change the testing environments at the two ends according to different requirements, and therefore the testing efficiency is greatly reduced. In addition, under the condition that the corresponding test end and the corresponding service end are not located at the same place, the establishment of the environments at the two ends often needs to remotely control the service end, and the condition requirement of a remote network is additionally increased.
In view of the above problems, it is an urgent need to solve the problem in the art to design a network card test environment construction method, which can implement the network card test environment construction to satisfy the high-efficiency network card test.
Disclosure of Invention
The application aims to provide a network card test environment construction method, a network card test environment construction device and a network card test environment construction medium, which can realize the construction of a network card test environment so as to meet the requirement of high-efficiency network card test.
In order to solve the technical problem, the present application provides a network card testing environment construction method, which is applied to a testing end provided with a network card, and the method includes:
acquiring network card information of the network card;
setting IP information of each network port corresponding to the network card according to the network card information;
and sending dynamic IP information to a server according to the IP information and the DHCP service, so that the server receives the dynamic IP information after acquiring the network card information of the network card, and generates a network port configuration file according to the dynamic IP information and the network card information to complete the construction of a test environment.
Preferably, before the setting the IP information of each network port corresponding to the network card according to the network card information, the method further includes:
judging whether the network card information accords with preset network card information or not;
if yes, entering the step of setting the IP information of each network port corresponding to the network card according to the network card information;
if not, updating the network card information, and returning to the step of judging whether the network card information accords with the preset network card information.
Preferably, the setting of the IP information of each network port corresponding to the network card according to the network card information includes:
and sequentially setting the IP information of each network port corresponding to the network card according to the interface information of the network card and the network port information of the network card.
In order to solve the technical problem, the present application further provides another network card test environment establishment method, which is applied to a server side provided with a network card, and the method includes:
acquiring network card information of the network card;
receiving dynamic IP information sent by a test end according to the IP information and DHCP service; the IP information is the IP information of each network port corresponding to the network card, which is set according to the network card information after the network card information of the network card is acquired by the testing terminal;
and generating a network port configuration file according to the network card information and the dynamic IP information so as to complete the construction of the test environment.
Preferably, the generating a network port configuration file according to the network card information and the dynamic IP information includes:
acquiring the network interface information of each network interface corresponding to the network card according to the network card information;
according to the information of each network port, the dynamic IP information is in one-to-one correspondence with each network port;
and converting the dynamic IP information into static IP information and generating a static network port configuration file.
Preferably, after generating the network interface configuration file according to the network card information and the dynamic IP information, the method further includes:
acquiring a preset test module and a target network card;
and simultaneously operating the preset test module with the test terminal according to the network port configuration file so as to execute the test of the target network card.
For solving above-mentioned technical problem, this application still provides a device is built to network card test environment, is applied to the test end that is provided with the network card, the device includes:
the first acquisition module is used for acquiring network card information of the network card;
the setting module is used for setting the IP information of each network port corresponding to the network card according to the network card information;
and the sending module is used for sending dynamic IP information to a server according to the IP information and the DHCP service, so that the server receives the dynamic IP information after acquiring the network card information of the network card, and generates a network port configuration file according to the dynamic IP information and the network card information to complete the construction of a test environment.
For solving above-mentioned technical problem, this application still provides another kind of network card test environment and builds the device, is applied to the server side that is provided with the network card, the device includes:
the second acquisition module is used for acquiring the network card information of the network card;
the receiving module is used for receiving the dynamic IP information sent by the testing end according to the IP information and the DHCP service; the IP information is the IP information of each network port corresponding to the network card, which is set according to the network card information after the network card information of the network card is acquired by the testing terminal;
and the generating module is used for generating an internet access configuration file according to the network card information and the dynamic IP information so as to complete the construction of the test environment.
In order to solve the above technical problem, the present application further provides another network card test environment setting-up device, including:
a memory for storing a computer program;
and the processor is used for realizing the steps of the network card test environment building method when executing the computer program.
In order to solve the technical problem, the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program, when executed by a processor, implements the steps of the network card test environment building method.
The network card test environment building method is applied to a test end provided with a network card. Obtaining network card information of a network card; setting IP information of each network port corresponding to the network card according to the network card information; and sending dynamic IP information to the server according to the IP information and the DHCP service, so that the server receives the dynamic IP information after acquiring the network card information of the network card, and generating a network port configuration file according to the dynamic IP information and the network card information to complete the establishment of the test environment. Therefore, the scheme supports the remote connection of the test end and the service end, the IP information of the service end is distributed by setting the DHCP service of the test end, the complex operation of remote construction environment is avoided, and the efficiency of project coordination and cooperation is improved.
In addition, the embodiment of the application also provides a network card test environment building device and a computer readable storage medium, and the effect is the same as the above.
Drawings
In order to more clearly illustrate the embodiments of the present application, the drawings needed for the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained by those skilled in the art without inventive effort.
Fig. 1 is a flowchart of a method for building a network card test environment applied to a test terminal according to an embodiment of the present application;
fig. 2 is a flowchart of a method for building a network card test environment applied to a server according to an embodiment of the present application;
fig. 3 is a structural diagram of a network card test environment setup device applied to a test end according to an embodiment of the present application;
fig. 4 is a structural diagram of a network card test environment setup device applied to a server according to an embodiment of the present application;
fig. 5 is a structural diagram of a network card test environment setup device according to an embodiment of the present application;
fig. 6 is a flowchart of a network card test environment establishment method provided in the embodiment of the present application in an application scenario.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without any creative effort belong to the protection scope of the present application.
The core of the application is to provide a network card test environment building method, device and medium.
In order that those skilled in the art will better understand the disclosure, the following detailed description will be given with reference to the accompanying drawings.
Fig. 1 is a flowchart of a method for building a network card test environment applied to a test terminal according to an embodiment of the present application. As shown in fig. 1, the method is applied to a testing end provided with a network card, and specifically includes:
s10: and obtaining network card information of the network card.
S11: and setting IP information of each network port corresponding to the network card according to the network card information.
S12: and sending dynamic IP information to the server according to the IP information and the DHCP service, so that the server receives the dynamic IP information after acquiring the network card information of the network card, and generating a network port configuration file according to the dynamic IP information and the network card information to complete the establishment of the test environment.
It can be understood that, in the testing process of the network card, the testing of the network card is generally divided into a network card hardware performance test and a network card data traffic test. In order to implement the network card test, a plurality of network devices provided with network cards are generally used to perform the network card test, wherein the network devices are connected through the network cards in a communication manner. Therefore, the test end provided with the network card in this embodiment is a network device for testing the network card. The test end can be a server or a host; the specific device selected by the testing end is not limited in this embodiment, and is determined according to the specific implementation situation. The test end is provided with a plurality of network cards and is in communication connection with the server end which is also provided with a plurality of network cards through the network cards. It should be noted that the network cards at the two ends may be directly connected through a network cable or wirelessly connected through a switch, and the connection manner between the network cards at the two ends is not limited in this embodiment and is determined according to specific implementation conditions. Therefore, the test end and the service end form a remote network through the network card, and a network card test environment can be set up between the two ends.
In specific implementation, the network card may be respectively installed at a high-speed serial computer expansion bus (PCIE) interface position designated by the test end and the service end according to the development requirement of the network card test project. In order to avoid frequent installation of the network cards, the network cards can be all installed according to specific implementation conditions, so that the network cards in corresponding quantity and positions on corresponding test items can be selected for testing. In this embodiment, the network card installation modes of the test end and the service end are not limited, and are determined according to specific implementation conditions.
In the process of establishing the network card test environment, the test end and the service end firstly identify the network card of the test end and the service end to obtain network card information. In the Linux system, all network card information can be found in the/sys/class/net directory: the network card information mainly includes network interface information, firmware (FW) information, and network card driving information of the network card. Specifically, all network interface information of the network card can be acquired through an ifconfig command; and the network card driving information and the FW information can be acquired through an ethtool-i command.
Furthermore, the test end sets the IP information of each network port corresponding to the network card according to the network card information. In this embodiment, a specific process of setting the IP information of each network port corresponding to the network card is not limited, the IP information may be set for each network port in sequence, and the IP information may also be set for each network port according to a preset sequence, which is determined according to a specific implementation condition. The test terminal further sends dynamic IP information to the service terminal according to the IP information and the DHCP service. The Dynamic Host Configuration Protocol (DHCP) is a network Protocol of a local area network, and means that a server controls a range of IP addresses, and a client can automatically obtain an IP address and a subnet mask allocated by the server when logging in the server. The section of IP address range is the dynamic IP information. In specific implementation, after acquiring network card information of the network card, the server can receive dynamic IP information sent by the test terminal, generate a network port configuration file according to the dynamic IP information and the network card information, and finally complete the construction of the test environment.
In this embodiment, the network card test environment establishment method is applied to a test terminal provided with a network card. Obtaining network card information of a network card; setting IP information of each network port corresponding to the network card according to the network card information; and sending dynamic IP information to the server according to the IP information and the DHCP service, so that the server receives the dynamic IP information after acquiring the network card information of the network card, and generating a network port configuration file according to the dynamic IP information and the network card information to complete the establishment of the test environment. Therefore, the scheme supports the remote connection of the test end and the service end, the IP information of the service end is distributed by setting the DHCP service of the test end, the complex operation of remote construction environment is avoided, and the efficiency of project coordination and cooperation is improved.
On the basis of the above-described embodiment:
as a preferred embodiment, before setting the IP information of each network port corresponding to the network card according to the network card information, the method further includes:
judging whether the network card information accords with preset network card information or not;
if yes, entering a step of setting IP information of each network port corresponding to the network card according to the network card information;
if not, updating the network card information, and returning to the step of judging whether the network card information conforms to the preset network card information.
It can be understood that, in the process of testing the network card, the IP information of the test port may be set through default network card information, that is, default FW information and default network card drive information. However, different network card test environments need to be constructed according to different test requirements, so that the related information of the network card is tested in the network card test environment; and different network card information, namely FW information and network card driving information, corresponds to different network card test environments. Therefore, in order to meet the preset test requirement for the network card, before setting the IP information of each network port corresponding to the network card according to the network card information, it is further necessary to determine whether the network card information conforms to the preset network card information.
Specifically, comparing FW information and network card drive information in the current network card information with FW information and network card drive information in the preset network card information, and judging whether the FW information and the network card drive information are the same; if the current network card information is confirmed to accord with the preset network card information, carrying out the subsequent steps; and if the current network card information does not accord with the preset network card information, updating the current network card information, specifically updating the network card driving information and the FW information, and comparing with the preset network card information again until the current network card information accords with the preset network card information.
In this embodiment, before setting the IP information of each network port corresponding to the network card according to the network card information, it is determined whether the network card information conforms to the preset network card information; if yes, entering a step of setting IP information of each network port corresponding to the network card according to the network card information; if not, updating the network card information, and returning to the step of judging whether the network card information accords with the preset network card information, so that the setting of the network card information is realized, and the network card test requirements are met conveniently.
On the basis of the above-described embodiment:
as a preferred embodiment, the setting of IP information of each network port corresponding to the network card according to the network card information includes:
and sequentially setting IP information of each network port corresponding to the network card according to the interface information of the network card and the network port information of the network card.
In the above embodiment, the specific process of setting the IP information of each network port corresponding to the network card is not limited. As a preferred embodiment, a specific process of setting the IP information of each network port corresponding to the network card according to the network card information in this embodiment is as follows:
and the test end sequentially sets the IP information of each network port corresponding to the network card according to the interface information of the network card and the network port information of the network card. Here, two dual-port network cards installed at the PCIE0 interface position and the PCIE1 interface position are taken as an example: the way of setting the IP information of the network port of the test port is that the network card installation position is extended, that is, the IP information of 4 network ports of two dual-port network cards installed at the PCIE0 and PCIE1 positions are set to 192.168.1.1, 192.168.2.1, 192.168.3.1, and 192.168.4.1 in sequence.
In this embodiment, the IP information of each network port corresponding to the network card is sequentially set according to the interface information of the network card and the network port information of the network card, so that the setting of the IP information of each network port of the network card at the test end is realized.
Fig. 2 is a flowchart of a method for building a network card test environment applied to a server according to an embodiment of the present application. As shown in fig. 2, the method is applied to a server side provided with a network card, and specifically includes:
s13: and obtaining network card information of the network card.
S14: and receiving the dynamic IP information sent by the test terminal according to the IP information and the DHCP service. The IP information is the IP information of each network port corresponding to the network card set according to the network card information after the test end acquires the network card information of the network card.
S15: and generating a network port configuration file according to the network card information and the dynamic IP information so as to complete the construction of the test environment.
It can be understood that the server and the test end together construct a network card test environment. And after the server side acquires the network card information of the network card, waiting for receiving the dynamic IP information sent by the test side according to the IP information and the DHCP service. As can be seen from the foregoing embodiment, the IP information is the IP information of each network port corresponding to the network card set by the test terminal according to the network card information after the test terminal obtains the network card information of its own network card. And further, generating an internet port configuration file according to the network card information and the dynamic IP information so as to complete the construction of the test environment. It should be noted that the network port configuration file includes the name of each network port, IP information, and network card location information, and the network card can be tested by the server in the built test environment through the network port configuration file. The specific process of the network card test in this embodiment is not limited, and is determined according to the specific implementation situation.
In this embodiment, the network card test environment establishment method is applied to a server side provided with a network card. Obtaining network card information of a network card; and receiving the dynamic IP information sent by the test terminal according to the IP information and the DHCP service. And the IP information is the IP information of each network port corresponding to the network card set according to the network card information after the test terminal acquires the network card information of the network card. And generating a network port configuration file according to the network card information and the dynamic IP information so as to complete the construction of the test environment. Therefore, the scheme supports the remote connection of the test end and the service end, the IP information of the service end is distributed by setting the DHCP service of the test end, the complex operation of remote construction environment is avoided, and the efficiency of project coordination and cooperation is improved.
Further, in consideration of stable connection between the server and the test end, as a preferred embodiment, generating the portal configuration file according to the network card information and the dynamic IP information includes:
acquiring network interface information of each network interface corresponding to the network card according to the network card information;
according to the information of each network port, the dynamic IP information corresponds to each network port one by one;
and converting the dynamic IP information into static IP information and generating a static internet access configuration file.
In specific implementation, all network card information of a server in the Linux system is stored in a/sys/class/net directory, and the information of each network port in the directory can be enumerated by ls, so that the name of the network port is obtained; and according to the information of each network port, the dynamic IP information corresponds to each network port one by one, so that the dynamic IP information, the subnet mask and the gateway distributed by the test end through the DHCP service are obtained in each network port. Further converting the dynamic IP information into static IP information, and creating a static internet access configuration file through a touch command; the default of the file directory is touch/etc/sysconfig/network-scripts/ifcfg-internet port name. Therefore, the connection between the server and the client is more stable, and a static network port configuration file is generated at the same time, so that the subsequent network card test is facilitated.
On the basis of the above-described embodiment:
as a preferred embodiment, after generating the network interface configuration file according to the network card information and the dynamic IP information, the method further includes:
acquiring a preset test module and a target network card;
and simultaneously operating a preset test module with the test terminal according to the network port configuration file to execute the test of the target network card.
In specific implementation, after the test environments of the test end and the service end are set up, the corresponding test module can be selected to test the network card according to actual network card test requirements. Specifically, a preset test module and a target network card are obtained; the preset test module is a preset module for performing performance test on the network card, and may be an Iperf or Netperf, or other performance test modules, depending on the specific implementation. And further, simultaneously operating a preset test module with the test terminal according to the network port configuration file to execute the test of the target network card.
Taking a netPerf module for performance test as an example, after a server generates a network port configuration file, listing the network port name, IP information and network card position information of a target network card; simultaneously listing the network port name, IP information and network card position information of the target network card at the test end; further starting interruption, starting netserver service, carrying out NetPerf performance test on the target network card, and reserving the test result.
It should be noted that, in the process of testing the network card, the same target network card may be selected at both ends, and different target network cards may also be selected for testing. And a plurality of target network cards can be tested simultaneously. In this embodiment, the selection of the target network card in the test process is not limited, and is determined according to specific implementation conditions.
In the embodiment, a preset test module and a target network card are obtained; and the preset test module is operated simultaneously with the test terminal according to the network port configuration file, so that the target network card is tested.
In the above embodiment, the network card test environment establishment method is described in detail, and the application also provides an embodiment corresponding to the network card test environment establishment device. It should be noted that the present application describes the embodiments of the apparatus portion from two perspectives, one is based on the functional module, and the other is based on the hardware structure.
Fig. 3 is a structural diagram of a network card test environment setup device applied to a test end according to an embodiment of the present application. As shown in fig. 3, the device is applied to a testing end provided with a network card, and specifically includes:
the first obtaining module 10 is configured to obtain network card information of a network card.
And the setting module 11 is configured to set IP information of each network port corresponding to the network card according to the network card information.
And the sending module 12 is configured to send dynamic IP information to the server according to each IP information and the DHCP service, so that the server receives the dynamic IP information after acquiring the network card information of the network card, and generates a network port configuration file according to the dynamic IP information to complete the establishment of the test environment.
In this embodiment, the network card test environment establishing device is applied to a test terminal provided with a network card, and includes a first obtaining module, a setting module, and a sending module. Obtaining network card information of a network card; setting IP information of each network port corresponding to the network card according to the network card information; and sending dynamic IP information to the server according to the IP information and the DHCP service, so that the server receives the dynamic IP information after acquiring the network card information of the network card, and generating a network port configuration file according to the dynamic IP information and the network card information to complete the establishment of the test environment. Therefore, the scheme supports the remote connection of the test end and the service end, the IP information of the service end is distributed by setting the DHCP service of the test end, the complex operation of remote construction environment is avoided, and the efficiency of project coordination and cooperation is improved.
Fig. 4 is a structural diagram of a network card test environment setup device applied to a server according to an embodiment of the present application. As shown in fig. 4, the apparatus is applied to a server with a network card, and specifically includes:
the second obtaining module 13 is configured to obtain network card information of the network card.
And the receiving module 14 is configured to receive dynamic IP information sent by the test end according to the IP information and the DHCP service.
The IP information is the IP information of each network port corresponding to the network card set according to the network card information after the test end acquires the network card information of the network card.
And the generating module 15 is configured to generate an internet access configuration file according to the network card information and the dynamic IP information, so as to complete the building of the test environment.
In this embodiment, the network card test environment establishment method is applied to a server side provided with a network card, and includes a second obtaining module, a receiving module and a generating module. Obtaining network card information of a network card; and receiving the dynamic IP information sent by the test terminal according to the IP information and the DHCP service. And the IP information is the IP information of each network port corresponding to the network card set according to the network card information after the test terminal acquires the network card information of the network card. And generating an internet access configuration file according to the network card information and the dynamic IP information so as to complete the construction of the test environment. Therefore, the scheme supports the remote connection of the test end and the service end, the IP information of the service end is distributed by setting the DHCP service of the test end, the complex operation of remote construction environment is avoided, and the efficiency of project coordination and cooperation is improved.
Fig. 5 is a structural diagram of a network card test environment setting device according to an embodiment of the present application. As shown in fig. 5, the network card test environment building apparatus includes:
a memory 20 for storing a computer program;
the processor 21 is configured to implement the steps of the network card test environment building method mentioned in the above embodiments when executing the computer program.
The network card test environment establishing device provided by this embodiment may include, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, or the like.
The processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The Processor 21 may be implemented in hardware using at least one of a Digital Signal Processor (DSP), a Field-Programmable Gate Array (FPGA), and a Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor, where the main processor is a processor for Processing data in an awake state, and is also called a Central Processing Unit (CPU); a coprocessor is a low power processor for processing data in a standby state. In some embodiments, the processor 21 may be integrated with a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content required to be displayed on the display screen. In some embodiments, the processor 21 may further include an Artificial Intelligence (AI) processor for processing computational operations related to machine learning.
The memory 20 may include one or more computer-readable storage media, which may be non-transitory. Memory 20 may also include high speed random access memory, as well as non-volatile memory, such as one or more magnetic disk storage devices, flash memory storage devices. In this embodiment, the memory 20 is at least used for storing the following computer program 201, wherein after the computer program is loaded and executed by the processor 21, the relevant steps of the network card test environment building method disclosed in any one of the foregoing embodiments can be implemented. In addition, the resources stored in the memory 20 may also include an operating system 202, data 203, and the like, and the storage manner may be a transient storage manner or a permanent storage manner. Operating system 202 may include, among other things, windows, unix, linux, etc. Data 203 may include, but is not limited to, data involved in the network card test environment set-up method.
In some embodiments, the network card test environment building apparatus may further include a display 22, an input/output interface 23, a communication interface 24, a power supply 25, and a communication bus 26.
Those skilled in the art will appreciate that the configuration shown in fig. 5 does not constitute a limitation of the network card test environment setup, and may include more or fewer components than those shown.
In this embodiment, the network card test environment setting device includes a memory and a processor. The processor is used for implementing the steps of the network card test environment building method mentioned in the above embodiments when executing the computer program. Obtaining network card information of a network card; setting IP information of each network port corresponding to the network card according to the network card information; and sending dynamic IP information to the server according to the IP information and the DHCP service, so that the server receives the dynamic IP information after acquiring the network card information of the network card, and generating a network port configuration file according to the dynamic IP information and the network card information to complete the establishment of the test environment. Therefore, the scheme supports the remote connection of the test end and the service end, the IP information of the service end is distributed by setting the DHCP service of the test end, the complex operation of remote construction environment is avoided, and the efficiency of project coordination and cooperation is improved.
Finally, the application also provides a corresponding embodiment of the computer readable storage medium. The computer-readable storage medium stores a computer program, and when executed by the processor, the computer program implements the steps described in the above method embodiments (which may be a method corresponding to the test side, a method corresponding to the service side, or a method corresponding to the test side and the service side).
It is to be understood that if the method in the above embodiments is implemented in the form of software functional units and sold or used as a stand-alone product, it can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium and executes all or part of the steps of the methods described in the embodiments of the present application, or all or part of the technical solutions. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, an optical disk, or other various media capable of storing program codes.
In this embodiment, the computer program realizes the steps described in the above method embodiments (which may be a method corresponding to a test end side, a method corresponding to a service end side, or a method corresponding to a test end side and a service end side) when executed by a processor. Obtaining network card information of a network card; setting IP information of each network port corresponding to the network card according to the network card information; and sending dynamic IP information to the server according to the IP information and the DHCP service, so that the server receives the dynamic IP information after acquiring the network card information of the network card, and generating a network port configuration file according to the dynamic IP information and the network card information to complete the establishment of the test environment. Therefore, the scheme supports the remote connection of the test end and the service end, the IP information of the service end is distributed by setting the DHCP service of the test end, the complex operation of remote construction environment is avoided, and the efficiency of project coordination and cooperation is improved.
In order to make those skilled in the art better understand the technical solution of the present application, the present application is further described in detail below with reference to fig. 6. Fig. 6 is a flowchart of a network card test environment building method provided in the embodiment of the present application in an application scenario. As shown in fig. 6, the method includes:
s16: the test end obtains network card information of the network card;
s17: the test terminal compares and updates the network card information with preset network card information until the network card information accords with the preset network card information;
s18: the test end sets IP information of each network port of the network card;
s19: the test end sends dynamic IP information to the server end according to the IP information and the DHCP service;
s20: the server side converts the dynamic IP information into static IP information and generates a static network port configuration file;
s21: the test end tests the target network card through a preset test module;
s22: and the server side tests the target network card through a preset test module.
The application scenario is specifically as follows: the test terminal identifies network card information of the network card, including network card driving information and firmware information. And the test terminal compares the network card information with preset network card information and judges whether the preset network card information is met. If not, updating the network card drive and the firmware information until the preset network card information is met. And after the network card information is met, setting the IP information of the network interface of the test terminal. The setting sequence of the IP information is the sequence of network card installation interfaces. The test end passes through the DHCP service and sends dynamic IP information to the service end according to the IP information. After the server receives the dynamic IP information, in order to stabilize the connection, the dynamic IP information is converted into static IP information, and a static network port configuration file is generated through touch according to the network card information of the server. The file contains the network interface name, IP information and network card position information of the network card. When the target network card is tested, the target network card and a preset test module for testing are selected, the target network card is tested at the test end and the service end simultaneously, and a test result is stored.
The method, the device and the medium for establishing the network card test environment provided by the application are described in detail above. The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed in the embodiment corresponds to the method disclosed in the embodiment, so that the description is simple, and the relevant points can be referred to the description of the method part. It should be noted that, for those skilled in the art, it is possible to make several improvements and modifications to the present application without departing from the principle of the present application, and such improvements and modifications also fall within the scope of the claims of the present application.
It is further noted that, in the present specification, relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising a," "8230," "8230," or "comprising" does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.

Claims (10)

1. A network card test environment building method is characterized by being applied to a test end provided with a network card, and the method comprises the following steps:
acquiring network card information of the network card;
setting IP information of each network port corresponding to the network card according to the network card information;
and sending dynamic IP information to a server according to the IP information and the DHCP service, so that the server receives the dynamic IP information after acquiring the network card information of the network card, and generates a network port configuration file according to the dynamic IP information and the network card information to complete the construction of a test environment.
2. The method for establishing the network card test environment according to claim 1, before setting the IP information of each network interface corresponding to the network card according to the network card information, further comprising:
judging whether the network card information accords with preset network card information or not;
if yes, entering the step of setting the IP information of each network port corresponding to the network card according to the network card information;
if not, updating the network card information, and returning to the step of judging whether the network card information accords with the preset network card information.
3. The method for establishing the network card test environment according to claim 1 or 2, wherein the setting of the IP information of each network interface corresponding to the network card according to the network card information includes:
and sequentially setting the IP information of each network port corresponding to the network card according to the interface information of the network card and the network port information of the network card.
4. A network card test environment building method is characterized by being applied to a server side provided with a network card, and comprises the following steps:
acquiring network card information of the network card;
receiving dynamic IP information sent by a test terminal according to the IP information and the DHCP service; the IP information is the IP information of each network port corresponding to the network card, which is set according to the network card information after the network card information of the network card is obtained by the test terminal;
and generating an internet access configuration file according to the network card information and the dynamic IP information so as to complete the construction of the test environment.
5. The method for establishing the network card test environment according to claim 4, wherein the generating the network interface configuration file according to the network card information and the dynamic IP information comprises:
acquiring the network interface information of each network interface corresponding to the network card according to the network card information;
according to the information of each network port, the dynamic IP information is in one-to-one correspondence with each network port;
and converting the dynamic IP information into static IP information and generating a static internet access configuration file.
6. The method for establishing the network card test environment according to claim 4, after generating the network interface configuration file according to the network card information and the dynamic IP information, further comprising:
acquiring a preset test module and a target network card;
and simultaneously operating the preset test module with the test terminal according to the network port configuration file so as to execute the test of the target network card.
7. The utility model provides a network card test environment sets up device which characterized in that is applied to the test end that is provided with the network card, the device includes:
the first acquisition module is used for acquiring network card information of the network card;
the setting module is used for setting the IP information of each network port corresponding to the network card according to the network card information;
and the sending module is used for sending dynamic IP information to a server according to the IP information and the DHCP service, so that the server receives the dynamic IP information after acquiring the network card information of the network card, and generates a network port configuration file according to the dynamic IP information and the network card information to complete the construction of a test environment.
8. The utility model provides a network card test environment sets up device which characterized in that is applied to the server side that is provided with the network card, the device includes:
the second acquisition module is used for acquiring the network card information of the network card;
the receiving module is used for receiving the dynamic IP information sent by the testing end according to the IP information and the DHCP service; the IP information is the IP information of each network port corresponding to the network card, which is set according to the network card information after the network card information of the network card is acquired by the testing terminal;
and the generating module is used for generating an internet access configuration file according to the network card information and the dynamic IP information so as to complete the construction of the test environment.
9. The utility model provides a network card test environment sets up device which characterized in that includes:
a memory for storing a computer program;
a processor for implementing the steps of the network card test environment construction method according to any one of claims 1 to 6 when executing the computer program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when executed by a processor, implements the steps of the network card test environment building method according to any one of claims 1 to 6.
CN202210883313.0A 2022-07-26 2022-07-26 Network card test environment building method, device and medium Pending CN115242696A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210883313.0A CN115242696A (en) 2022-07-26 2022-07-26 Network card test environment building method, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210883313.0A CN115242696A (en) 2022-07-26 2022-07-26 Network card test environment building method, device and medium

Publications (1)

Publication Number Publication Date
CN115242696A true CN115242696A (en) 2022-10-25

Family

ID=83676159

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210883313.0A Pending CN115242696A (en) 2022-07-26 2022-07-26 Network card test environment building method, device and medium

Country Status (1)

Country Link
CN (1) CN115242696A (en)

Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101201779A (en) * 2006-12-14 2008-06-18 英业达股份有限公司 On-line test system and method by establishing mainboard managerial control using local loop
US20090109864A1 (en) * 2007-10-24 2009-04-30 Inventec Corporation Network card testing system
KR20110078900A (en) * 2009-12-31 2011-07-07 김태웅 Control system controlling for a computer by the remote access using an wire and wireless communication network and controlling method therefore
CN102457405A (en) * 2010-10-26 2012-05-16 鸿富锦精密工业(深圳)有限公司 PXE (Pre-boot Execution Environment) test device and PXE test method
CN102468992A (en) * 2010-11-16 2012-05-23 鸿富锦精密工业(深圳)有限公司 PXE function test system and method
KR101796054B1 (en) * 2016-09-02 2017-12-01 (주)유비쿼터스통신 Smart fire perception system using ip network
CN109358994A (en) * 2018-09-26 2019-02-19 深圳市吉祥腾达科技有限公司 A kind of router PPPOE server band machine weight testing method
CN109802867A (en) * 2019-01-02 2019-05-24 郑州云海信息技术有限公司 A kind of method and system for testing network interface card NCSI connective stability
CN110677316A (en) * 2019-09-05 2020-01-10 苏州浪潮智能科技有限公司 Distributed storage server network card detection method and system
CN111708422A (en) * 2020-07-15 2020-09-25 深圳安讯数字科技有限公司 Service equipment for realizing remote automatic installation of operating system and use method thereof
CN112653600A (en) * 2020-12-26 2021-04-13 苏州浪潮智能科技有限公司 Network card performance testing method and device based on USB network card and electronic equipment
US20210176123A1 (en) * 2018-08-21 2021-06-10 Viasat, Inc. Automated configuration of devices of a remote network
US20210282080A1 (en) * 2019-06-24 2021-09-09 Shenzhen Ucloudlink New Technology Co., Ltd. Network search and configuring method, registratio method, device and system

Patent Citations (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101201779A (en) * 2006-12-14 2008-06-18 英业达股份有限公司 On-line test system and method by establishing mainboard managerial control using local loop
US20090109864A1 (en) * 2007-10-24 2009-04-30 Inventec Corporation Network card testing system
KR20110078900A (en) * 2009-12-31 2011-07-07 김태웅 Control system controlling for a computer by the remote access using an wire and wireless communication network and controlling method therefore
CN102457405A (en) * 2010-10-26 2012-05-16 鸿富锦精密工业(深圳)有限公司 PXE (Pre-boot Execution Environment) test device and PXE test method
CN102468992A (en) * 2010-11-16 2012-05-23 鸿富锦精密工业(深圳)有限公司 PXE function test system and method
KR101796054B1 (en) * 2016-09-02 2017-12-01 (주)유비쿼터스통신 Smart fire perception system using ip network
US20210176123A1 (en) * 2018-08-21 2021-06-10 Viasat, Inc. Automated configuration of devices of a remote network
CN109358994A (en) * 2018-09-26 2019-02-19 深圳市吉祥腾达科技有限公司 A kind of router PPPOE server band machine weight testing method
CN109802867A (en) * 2019-01-02 2019-05-24 郑州云海信息技术有限公司 A kind of method and system for testing network interface card NCSI connective stability
US20210282080A1 (en) * 2019-06-24 2021-09-09 Shenzhen Ucloudlink New Technology Co., Ltd. Network search and configuring method, registratio method, device and system
CN110677316A (en) * 2019-09-05 2020-01-10 苏州浪潮智能科技有限公司 Distributed storage server network card detection method and system
CN111708422A (en) * 2020-07-15 2020-09-25 深圳安讯数字科技有限公司 Service equipment for realizing remote automatic installation of operating system and use method thereof
CN112653600A (en) * 2020-12-26 2021-04-13 苏州浪潮智能科技有限公司 Network card performance testing method and device based on USB network card and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李欣伟: "一种WLAN自动化测试平台的设计及实现", 北京中电华大电子设计有限责任公司, 30 March 2015 (2015-03-30) *

Similar Documents

Publication Publication Date Title
CN102819461A (en) Desktop synchronization method, device, equipment and system
CN108563579B (en) White box testing method, device and system and storage medium
CN115114219B (en) PCI-E topology method, device, equipment and storage medium
CN114650223A (en) Network configuration method and device of Kubernetes cluster and electronic equipment
JP6767479B2 (en) System and cloud-based computer server for matching cabling test results with cabling test configuration
CN111107177B (en) Method for modifying HMI self IP and PLC IP through HMI
CN113407469A (en) Parameter configuration method and device, storage medium and electronic device
KR101619923B1 (en) Gateway apparatus for supporting the connection of electric power devices
CN115242696A (en) Network card test environment building method, device and medium
CN111124874B (en) Method for debugging webpage, debugging server and main control equipment
CN109005054B (en) Method, server and terminal for building and accessing built network topology
CN114070889B (en) Configuration method, traffic forwarding device, storage medium, and program product
CN110858175A (en) Test control method, master control equipment, controlled equipment and test system
CN113347287B (en) Host discovery and addition method, device, equipment and medium in data center
CN113326192B (en) Application testing method, device, equipment and storage medium for mobile terminal
CN115374042A (en) Bus switching method, device, equipment and medium
CN113612643B (en) Network configuration method, device and equipment of cloud mobile phone and storage medium
CN113961504A (en) Mobile terminal group control method, device, system, server and storage medium
CN115268951A (en) Installation method, device, equipment and storage medium of operating system
CN109062744A (en) A kind of method and system for realizing batch testing server memory
CN114995888A (en) Intelligent network card deployment method, device and medium
CN114546444A (en) Vehicle upgrading method and device, electronic equipment, medium and automatic driving vehicle
CN103118012A (en) General instrument VXI-11 protocol adaptation system and general instrument and adaptation control method
CN216216967U (en) Communication device
CN110971665A (en) Management method, system, equipment and storage medium for interfacing multi-type storage

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