CN111901187A - Test method, device, equipment and storage medium - Google Patents
Test method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN111901187A CN111901187A CN202010568674.7A CN202010568674A CN111901187A CN 111901187 A CN111901187 A CN 111901187A CN 202010568674 A CN202010568674 A CN 202010568674A CN 111901187 A CN111901187 A CN 111901187A
- Authority
- CN
- China
- Prior art keywords
- server
- switch
- tested
- port
- test
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/50—Testing arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5061—Pools of addresses
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
技术领域technical field
本申请涉及服务器领域,特别是涉及一种测试方法、装置、设备及存储介质。The present application relates to the field of servers, and in particular, to a testing method, apparatus, device and storage medium.
背景技术Background technique
随着网络技术的不断发展,传统信息化服务以及云计算服务对服务器的稳定性要求越来越高,因此当前在对服务器产品的研发阶段或生产阶段都需要对其进行可靠性测试,从而保证服务器产品的稳定性。With the continuous development of network technology, traditional information services and cloud computing services have higher and higher requirements on the stability of servers. Therefore, at present, server products need to be tested for reliability in the R&D stage or production stage to ensure that Stability of server products.
服务器中的NCSI(Network Controller Sideband Interface,网络控制器的边带管理)功能的主要目的是通过通信链路的冗余实现对服务器中的网络端口备份,以此确保当服务器中的某一网络端口功能故障后,依然可以通过其它网络端口取代故障的网络端口继续提供相应服务。The main purpose of the NCSI (Network Controller Sideband Interface, network controller sideband management) function in the server is to realize the backup of the network port in the server through the redundancy of the communication link, so as to ensure that when a certain network port in the server is used. After a function failure, other network ports can still be used to replace the failed network port and continue to provide corresponding services.
当前往往是以人工方式拔插待测服务器网络端口的网线的方式测试待测服务器中的NCSI功能的可靠性,但是目前通过人工手动测试服务器中的NCSI功能时,效率往往较低,在一定时间内的测试次数相对有限,因此测试过程中发现问题的概率较低,难以确保测试的准确性以及可靠性。At present, the reliability of the NCSI function in the server under test is often tested by manually plugging and unplugging the network cable of the network port of the server under test. However, at present, when manually testing the NCSI function in the server, the efficiency is often low. The number of tests in the test is relatively limited, so the probability of finding problems during the test is low, and it is difficult to ensure the accuracy and reliability of the test.
由此可见,提供一种测试方法,以相对确保测试的准确性以及可靠性,是本领域技术人员需要解决的问题。It can be seen that it is a problem to be solved by those skilled in the art to provide a test method to relatively ensure the accuracy and reliability of the test.
发明内容SUMMARY OF THE INVENTION
本申请的目的是提供一种测试方法、装置、设备及存储介质,以相对确保测试的准确性以及可靠性。The purpose of the present application is to provide a test method, apparatus, device and storage medium to relatively ensure the accuracy and reliability of the test.
为解决上述技术问题,本申请提供一种测试方法,包括:In order to solve the above-mentioned technical problems, the present application provides a test method, comprising:
对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址;其中,待测服务器的服务器端口均与交换机连接;Set the same network address for the server ports with link redundancy in the server to be tested; wherein, the server ports of the server to be tested are all connected to the switch;
利用交换机切换与各服务器端口之间的通断状态;其中,在单位时刻内,交换机仅与各服务器端口中的一个目标服务器端口处于通路状态;Utilize the switch to switch the on-off state between each server port; wherein, in a unit time, the switch is only in a connected state with one target server port in each server port;
根据待测服务器在通断状态下的网络状态信息生成测试结果。Generate test results according to the network status information of the server to be tested in the on-off state.
优选地,在对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址之前,方法还包括:Preferably, before setting the same network address to the server port with the link redundancy relationship in the server to be tested, the method further includes:
获取由DHCP服务器分配的目标网络地址;Get the target network address assigned by the DHCP server;
对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址,包括:Set the same network address for the server ports with link redundancy in the server under test, including:
对待测服务器中具有链路冗余关系的服务器端口设置目标网络地址。Set the target network address for the server port with link redundancy in the server under test.
优选地,利用交换机切换与各服务器端口之间的通断状态,包括:Preferably, the switch is used to switch the on-off state between each server port, including:
通过控制交换机中端口的开启和关闭的方式,利用交换机切换与各服务器端口之间的通断状态。By controlling the opening and closing of the ports in the switch, the switch is used to switch the on-off state with each server port.
优选地,利用交换机切换与各服务器端口之间的通断状态,包括:Preferably, the switch is used to switch the on-off state between each server port, including:
在预设的测试周期内利用交换机以预设切换频率切换与各服务器端口之间的通断状态。In a preset test period, the switch is used to switch the on-off state with each server port at a preset switching frequency.
优选地,根据待测服务器在通断状态下的网络状态信息生成测试结果,包括:Preferably, the test result is generated according to the network status information of the server to be tested in the on-off state, including:
根据待测服务器在测试周期内各通断状态下的网络状态信息生成相应的测试结果。Corresponding test results are generated according to the network status information of the server to be tested in each on-off state during the test period.
优选地,服务器端口包括NCSI端口。Preferably, the server ports comprise NCSI ports.
此外,本申请还提供一种测试装置,包括:In addition, the present application also provides a test device, comprising:
地址设置模块,用于对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址;其中,待测服务器的服务器端口均与交换机连接;The address setting module is used to set the same network address for the server ports with the link redundancy relationship in the server to be tested; wherein, the server ports of the server to be tested are all connected to the switch;
通断切换模块,用于利用交换机切换与各服务器端口之间的通断状态;其中,在单位时刻内,交换机仅与各服务器端口中的一个目标服务器端口处于通路状态;The on-off switching module is used to use the switch to switch the on-off state between each server port; wherein, in a unit time, the switch is only in a connected state with one target server port in each server port;
结果生成模块,用于根据待测服务器在通断状态下的网络状态信息生成测试结果。The result generating module is used for generating the test result according to the network state information of the server to be tested in the on-off state.
优选地,装置还包括:Preferably, the device further includes:
地址获取模块,用于获取由DHCP服务器分配的目标网络地址;The address obtaining module is used to obtain the target network address assigned by the DHCP server;
地址设置模块,包括:Address setting module, including:
地址设置子模块,用于对待测服务器中具有链路冗余关系的服务器端口设置目标网络地址。The address setting submodule is used to set the target network address of the server port with link redundancy relationship in the server to be tested.
此外,本申请还提供一种测试设备,包括:In addition, the present application also provides a test equipment, including:
存储器,用于存储计算机程序;memory for storing computer programs;
处理器,用于执行计算机程序时实现如上述的测试方法的步骤。The processor is configured to implement the steps of the above-mentioned testing method when executing the computer program.
此外,本申请还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现如上述的测试方法的步骤。In addition, the present application also provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned test method are implemented.
本申请所提供的测试方法,首先对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址,其中,待测服务器的服务器端口均与交换机连接,在此基础上,进一步利用交换机切换与各服务器端口之间的通断状态,并且在单位时刻内,交换机仅与各服务器端口中的一个目标服务器端口处于通路状态,进而根据待测服务器在通断状态下的网络状态信息生成测试结果。由于本方法通过交换机切换与待测服务器的各服务器端口之间的通断状态的方式替代以人工方式拔插待测服务器网络端口的网线,从而实现对待测服务器的测试,相对提高了测试的效率,相对增加了一定时间内的测试次数,因此提高了测试过程中发现问题的概率,相对确保了测试的准确性以及可靠性。此外,本申请还提供一种测试装置、设备及存储介质,有益效果同上所述。In the test method provided by the present application, firstly, the server ports with link redundancy in the server to be tested are set to the same network address, wherein the server ports of the server to be tested are all connected to the switch, and on this basis, the switch is further used to switch On-off status with each server port, and in unit time, the switch is only in the channel state with one target server port in each server port, and then generates test results according to the network status information of the server to be tested in the on-off state . Because the method replaces manually unplugging and inserting the network cable of the network port of the server to be tested by switching the on-off state between the switch and each server port of the server to be tested, the test of the server to be tested is realized, and the test efficiency is relatively improved. , which relatively increases the number of tests within a certain period of time, thus increasing the probability of finding problems during the testing process, and relatively ensuring the accuracy and reliability of the test. In addition, the present application also provides a testing device, equipment and storage medium, the beneficial effects are the same as those described above.
附图说明Description of drawings
为了更清楚地说明本申请实施例,下面将对实施例中所需要使用的附图做简单的介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to describe the embodiments of the present application more clearly, the following will briefly introduce the drawings that are used in the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application, which are not relevant to ordinary skills in the art. As far as personnel are concerned, other drawings can also be obtained from these drawings on the premise of no creative work.
图1为本申请实施例公开的一种测试方法的流程图;1 is a flowchart of a testing method disclosed in an embodiment of the present application;
图2为本申请实施例公开的一种测试装置的结构示意图。FIG. 2 is a schematic structural diagram of a testing device disclosed in an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下,所获得的所有其他实施例,都属于本申请保护范围。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. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative work fall within the protection scope of the present application.
服务器中的NCSI(Network Controller Sideband Interface,网络控制器的边带管理)功能的主要目的是通过通信链路的冗余实现对服务器中的网络端口备份,以此确保当服务器中的某一网络端口功能故障后,依然可以通过其它网络端口取代故障的网络端口继续提供相应服务。The main purpose of the NCSI (Network Controller Sideband Interface, network controller sideband management) function in the server is to realize the backup of the network port in the server through the redundancy of the communication link, so as to ensure that when a certain network port in the server is used. After a function failure, other network ports can still be used to replace the failed network port and continue to provide corresponding services.
当前往往是以人工方式拔插待测服务器网络端口的网线的方式测试待测服务器中的NCSI功能的可靠性,但是目前通过人工手动测试服务器中的NCSI功能时,效率往往较低,在一定时间内的测试次数相对有限,因此测试过程中发现问题的概率较低,难以确保测试的准确性以及可靠性。At present, the reliability of the NCSI function in the server under test is often tested by manually plugging and unplugging the network cable of the network port of the server under test. However, at present, when manually testing the NCSI function in the server, the efficiency is often low. The number of tests in the test is relatively limited, so the probability of finding problems during the test is low, and it is difficult to ensure the accuracy and reliability of the test.
为此,本申请的核心是提供一种测试方法,以相对确保测试的准确性以及可靠性。Therefore, the core of this application is to provide a test method to relatively ensure the accuracy and reliability of the test.
为了使本技术领域的人员更好地理解本申请方案,下面结合附图和具体实施方式对本申请作进一步的详细说明。In order to make those skilled in the art better understand the solution of the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
请参见图1所示,本申请实施例公开了一种测试方法,包括:Referring to FIG. 1, an embodiment of the present application discloses a testing method, including:
步骤S10:对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址。Step S10: Set the same network address to the server port with the link redundancy relationship in the server to be tested.
其中,待测服务器的服务器端口均与交换机连接。The server ports of the server to be tested are all connected to the switch.
需要说明的是,本实施例的执行主体可以是独立于待测服务器以及交换机,并且运行有相应测试程序服务器设备,或同时运行有测试程序以及其它业务程序的服务器设备,应根据实际需求而定,在此不做具体限定。It should be noted that the execution body of this embodiment may be independent of the server to be tested and the switch, and run a corresponding test program server device, or run a test program and other business programs at the same time. The server device should be determined according to actual needs. , which is not specifically limited here.
本步骤的重点在于对测服务器中具有链路冗余关系的服务器端口设置相同的网络地址,其中,链路冗余关系指的是,两个或两个以上的服务器端口之间的链路存在备份关系,任意一个服务器端口的链路故障时,能够通过链路冗余关系中的其它服务器端口取代链路故障的服务器端口继续提供相应的数据服务,在此基础上,对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址,相当于是对具有链路冗余关系的服务器端口进行相同网络地址的绑定,进而具有链路冗余关系的服务器端口均能够以相同的网络地址提供数据服务,目的是依照实际应用场景下对服务器端口进行配置的方式对待测服务器进行相应的服务器端口配置,确保测试的准确性。The key point of this step is to set the same network address to the server ports with link redundancy relationship in the test server, wherein the link redundancy relationship refers to the existence of links between two or more server ports. In the backup relationship, when the link of any server port fails, other server ports in the link redundancy relationship can replace the server port with the link failure and continue to provide corresponding data services. Setting the same network address for the server ports with the link redundancy relationship is equivalent to binding the server ports with the link redundancy relationship to the same network address, and then the server ports with the link redundancy relationship can use the same network address. The purpose of providing data services is to configure the corresponding server port for the server under test according to the way of configuring the server port in the actual application scenario to ensure the accuracy of the test.
另外,需要注意的是,本实施例中的待测服务器的服务器端口均与交换机连接,目的是能够在后续步骤中通过交换机控制与待测服务器的服务器端口之间的通断状态。In addition, it should be noted that the server ports of the server under test in this embodiment are all connected to the switch, so that the switch can control the on-off state with the server port of the server under test in the subsequent steps.
步骤S11:利用交换机切换与各服务器端口之间的通断状态。Step S11: Use the switch to switch the on-off state with each server port.
其中,在单位时刻内,交换机仅与各服务器端口中的一个目标服务器端口处于通路状态。Wherein, in a unit time, the switch is in a channel state with only one target server port in each server port.
需要说明的是,本步骤的重点是通过控制交换机切换与各服务器端口之间的通断状态,以此模拟人工的方式插拔接入待测服务器中各服务器端口的网线,实现对待测服务器中冗余的服务器端口进行通信切换的可靠性测试。It should be noted that the focus of this step is to control the on-off state between the switch switch and each server port, so as to simulate the manual way of plugging and unplugging the network cable connected to each server port in the server under test, so as to realize the realization of the network cable in the server under test. Redundant server ports are used for reliability testing of communication switching.
需要注意的是,由于实际的场景下,服务器中冗余备份的端口在同一时刻,只有一个端口处于工作状态,因此在测试时,利用交换机切换与待测服务器各服务器端口之间的通断状态时,单位时刻内,交换机仅与各服务器端口中的一个目标服务器端口处于通路状态。It should be noted that, in the actual scenario, only one port of the redundant backup port in the server is in working state at the same time. Therefore, during the test, the switch is used to switch the on-off state between each server port of the server to be tested. , within a unit time, the switch is in a channel state with only one target server port in each server port.
步骤S12:根据待测服务器在通断状态下的网络状态信息生成测试结果。Step S12: Generate a test result according to the network state information of the server to be tested in the on-off state.
在利用交换机切换与各服务器端口之间的通断状态之后,待测服务器会根据当前的网络状态生成相应的网络状态信息,由于网络状态信息能够反映出待测服务器与交换机之间的网络性能,进而本步骤根据待测服务器在通断状态下的网络状态信息生成测试结果。After using the switch to switch the on-off status between the server ports, the server to be tested will generate corresponding network status information according to the current network status. Since the network status information can reflect the network performance between the server to be tested and the switch, Further, in this step, a test result is generated according to the network state information of the server to be tested in the on-off state.
本申请所提供的测试方法,首先对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址,其中,待测服务器的服务器端口均与交换机连接,在此基础上,进一步利用交换机切换与各服务器端口之间的通断状态,并且在单位时刻内,交换机仅与各服务器端口中的一个目标服务器端口处于通路状态,进而根据待测服务器在通断状态下的网络状态信息生成测试结果。由于本方法通过交换机切换与待测服务器的各服务器端口之间的通断状态的方式替代以人工方式拔插待测服务器网络端口的网线,从而实现对待测服务器的测试,相对提高了测试的效率,相对增加了一定时间内的测试次数,因此提高了测试过程中发现问题的概率,相对确保了测试的准确性以及可靠性。In the test method provided by the present application, firstly, the server ports with link redundancy in the server to be tested are set to the same network address, wherein the server ports of the server to be tested are all connected to the switch, and on this basis, the switch is further used to switch On-off status with each server port, and in unit time, the switch is only in the channel state with one target server port in each server port, and then generates test results according to the network status information of the server to be tested in the on-off state . Because the method replaces manually unplugging and inserting the network cable of the network port of the server to be tested by switching the on-off state between the switch and each server port of the server to be tested, the test of the server to be tested is realized, and the test efficiency is relatively improved. , which relatively increases the number of tests within a certain period of time, thus increasing the probability of finding problems during the testing process, and relatively ensuring the accuracy and reliability of the test.
在上述实施例的基础上,作为一种优选的实施方式,在对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址之前,方法还包括:On the basis of the above-mentioned embodiment, as a preferred implementation manner, before setting the same network address to the server port with the link redundancy relationship in the server to be tested, the method further includes:
获取由DHCP服务器分配的目标网络地址;Get the target network address assigned by the DHCP server;
对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址,包括:Set the same network address for the server ports with link redundancy in the server under test, including:
对待测服务器中具有链路冗余关系的服务器端口设置目标网络地址。Set the target network address for the server port with link redundancy in the server under test.
需要说明的是,本实施方式的重点是,在对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址之前,首先获取由DHCP服务器分配的目标网络地址,进而将目标网络地址设置为待测服务器中具有链路冗余关系的服务器端口的地址。It should be noted that the key point of this embodiment is that, before setting the same network address on the server port with the link redundancy relationship in the server to be tested, first obtain the target network address assigned by the DHCP server, and then set the target network address. It is the address of the server port with link redundancy in the server under test.
DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)服务器,指的是运行有动态主机配置协议的服务器,动态主机配置协议是一个局域网的网络协议。DHCP协议避免了因手工设置网络地址及子网掩码所产生的错误,同时也避免了把一个网络地址分配给多台服务器所造成的地址冲突。降低了管理网络地址设置的负担,使用DHCP服务器大大缩短了配置或重新配置网络中工作站所花费的时间,同时通过对DHCP服务器的设置可灵活的设置地址的租期,因此本实施方式能够相对确保获取目标网络地址时的高效性,以及对待测服务器中具有链路冗余关系的服务器端口设置的目标网络地址的可用性。A DHCP (Dynamic Host Configuration Protocol, Dynamic Host Configuration Protocol) server refers to a server running a Dynamic Host Configuration Protocol, which is a network protocol of a local area network. The DHCP protocol avoids errors caused by manually setting network addresses and subnet masks, and also avoids address conflicts caused by assigning a network address to multiple servers. The burden of managing network address settings is reduced, and the use of a DHCP server greatly shortens the time spent configuring or reconfiguring workstations in the network. At the same time, the address lease period can be flexibly set by setting the DHCP server, so this embodiment can relatively ensure Efficiency in obtaining the target network address, and availability of the target network address set by the server port with link redundancy relationship in the server under test.
更进一步的,对待测服务器中具有链路冗余关系的服务器端口设置目标网络地址,可以具体是通过交换机对待测服务器中具有链路冗余关系的服务器端口设置目标网络地址,以此相对确保对待测服务器中具有链路冗余关系的服务器端口设置目标网络地址时的整体效率。Further, to set the target network address of the server port with link redundancy relationship in the server under test, you can specifically set the target network address through the switch of the server port with link redundancy relationship in the server under test, so as to relatively ensure treatment. The overall efficiency of setting the target network address on the server port with link redundancy relationship in the test server.
在上述实施例的基础上,作为一种优选的实施方式,利用交换机切换与各服务器端口之间的通断状态,包括:On the basis of the above embodiment, as a preferred implementation, the switch is used to switch the on-off state between each server port, including:
通过控制交换机中端口的开启和关闭的方式,利用交换机切换与各服务器端口之间的通断状态。By controlling the opening and closing of the ports in the switch, the switch is used to switch the on-off state with each server port.
需要说明的是,由于交换机通过自身的端口与待测服务器的服务器端口建立有链路连接,因此待测服务器与交换机之间的网络通信,本质上是基于服务器端口与交换机中对应的接口建立的,因此本实施方式通过控制交换机中端口的开启和关闭的方式,以实现利用交换机切换与各服务器端口之间的通断状态的目的,相对确保了利用交换机切换与各服务器端口之间的通断状态的高效性。It should be noted that since the switch establishes a link connection with the server port of the server under test through its own port, the network communication between the server under test and the switch is essentially based on the server port and the corresponding interface in the switch. Therefore, in this embodiment, by controlling the opening and closing of ports in the switch, the purpose of using the switch to switch the on-off state between the server ports and each server port is relatively guaranteed, and the on-off state between the switch and each server port is relatively ensured. Efficiency of the state.
在上述实施例的基础上,作为一种优选的实施方式,利用交换机切换与各服务器端口之间的通断状态,包括:On the basis of the above embodiment, as a preferred implementation, the switch is used to switch the on-off state between each server port, including:
在预设的测试周期内利用交换机以预设切换频率切换与各服务器端口之间的通断状态。In a preset test period, the switch is used to switch the on-off state with each server port at a preset switching frequency.
需要说明的是,本实施方式中的重点是对待测服务器的测试时长进行了限定,即在预设的测试周期内利用交换机对待测服务器进行测试,并且在对待测服务器进行测试的过程中,控制交换机依照预设切换频率切换与各服务器端口之间的通断状态,以此确保交换机对各服务器端口的通断状态的各次切换之间时间间隔的一致性,进而进一步确保了测试过程的整体灵活性。It should be noted that the key point in this embodiment is that the test duration of the server to be tested is limited, that is, the switch is used to test the server to be tested within a preset test period, and during the testing of the server to be tested, the The switch switches the on-off state with each server port according to the preset switching frequency, so as to ensure the consistency of the time interval between each switch of the switch to the on-off state of each server port, thereby further ensuring the overall testing process. flexibility.
更进一步的,根据待测服务器在通断状态下的网络状态信息生成测试结果,包括:Further, the test results are generated according to the network status information of the server to be tested in the on-off state, including:
根据待测服务器在测试周期内各通断状态下的网络状态信息生成相应的测试结果。Corresponding test results are generated according to the network status information of the server to be tested in each on-off state during the test period.
由于本实施方式中,在预设的测试周期内利用交换机以预设切换频率切换与各服务器端口之间的通断状态后,在测试周期内,待测服务器每隔固定的时间均会生成相应的网络状态信息,因此本实施方式根据待测服务器在测试周期内各通断状态下的网络状态信息生成相应的测试结果,能够进一步确保测试结果的整体准确性。Because in this embodiment, after the switch is used to switch the on-off state with each server port at the preset switching frequency within the preset test period, the server to be tested will generate corresponding Therefore, in this embodiment, corresponding test results are generated according to the network status information of the server under test in each on-off state in the test period, which can further ensure the overall accuracy of the test results.
在上述一系列实施方式的基础上,作为一种优选的实施方式,服务器端口包括NCSI端口。On the basis of the foregoing series of embodiments, as a preferred embodiment, the server port includes an NCSI port.
需要说明的是,NCSI(Network Controller Sideband Interface,网络控制器的边带管理)是当前服务器中普遍采用的网络端口备份功能,而NCSI端口则为基于NCSI功能冗余备份的服务器端口,本实施方式实现了对于待测服务器中的NCSI功能的测试,能够进一步确保待测服务器中NCSI功能的可靠性,进而确保待测服务器的网络通信可靠性。It should be noted that NCSI (Network Controller Sideband Interface, network controller sideband management) is a network port backup function commonly used in current servers, and an NCSI port is a server port based on NCSI function redundancy backup. This embodiment The test of the NCSI function in the server to be tested is realized, and the reliability of the NCSI function in the server to be tested can be further ensured, thereby ensuring the reliability of network communication of the server to be tested.
请参见图2所示,本申请实施例提供了一种测试装置,包括:Referring to FIG. 2, an embodiment of the present application provides a test device, including:
地址设置模块10,用于对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址;其中,待测服务器的服务器端口均与交换机连接;The
通断切换模块11,用于利用交换机切换与各服务器端口之间的通断状态;其中,在单位时刻内,交换机仅与各服务器端口中的一个目标服务器端口处于通路状态;The on-off
结果生成模块12,用于根据待测服务器在通断状态下的网络状态信息生成测试结果。The
更进一步的,作为一种优选的实施方式,装置还包括:Further, as a preferred embodiment, the device also includes:
地址获取模块,用于获取由DHCP服务器分配的目标网络地址;The address obtaining module is used to obtain the target network address assigned by the DHCP server;
地址设置模块,包括:Address setting module, including:
地址设置子模块,用于对待测服务器中具有链路冗余关系的服务器端口设置目标网络地址。The address setting submodule is used to set the target network address of the server port with link redundancy relationship in the server to be tested.
本申请所提供的测试装置,首先对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址,其中,待测服务器的服务器端口均与交换机连接,在此基础上,进一步利用交换机切换与各服务器端口之间的通断状态,并且在单位时刻内,交换机仅与各服务器端口中的一个目标服务器端口处于通路状态,进而根据待测服务器在通断状态下的网络状态信息生成测试结果。由于本装置通过交换机切换与待测服务器的各服务器端口之间的通断状态的方式替代以人工方式拔插待测服务器网络端口的网线,从而实现对待测服务器的测试,相对提高了测试的效率,相对增加了一定时间内的测试次数,因此提高了测试过程中发现问题的概率,相对确保了测试的准确性以及可靠性。In the test device provided by the present application, firstly, the server ports with link redundancy relationship in the server to be tested are set with the same network address, wherein, the server ports of the server to be tested are all connected to the switch, and on this basis, the switch is further used to switch On-off status with each server port, and in unit time, the switch is only in the channel state with one target server port in each server port, and then generates test results according to the network status information of the server to be tested in the on-off state . Because the device switches the on-off state between each server port of the server to be tested by the switch instead of manually unplugging and plugging the network cable of the network port of the server to be tested, so as to realize the test of the server to be tested, and the efficiency of the test is relatively improved. , which relatively increases the number of tests within a certain period of time, thus increasing the probability of finding problems during the testing process, and relatively ensuring the accuracy and reliability of the test.
此外,本申请实施例还提供一种测试设备,包括:In addition, the embodiment of the present application also provides a test equipment, including:
存储器,用于存储计算机程序;memory for storing computer programs;
处理器,用于执行计算机程序时实现如上述的测试方法的步骤。The processor is configured to implement the steps of the above-mentioned testing method when executing the computer program.
本申请所提供的测试设备,首先对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址,其中,待测服务器的服务器端口均与交换机连接,在此基础上,进一步利用交换机切换与各服务器端口之间的通断状态,并且在单位时刻内,交换机仅与各服务器端口中的一个目标服务器端口处于通路状态,进而根据待测服务器在通断状态下的网络状态信息生成测试结果。由于本设备通过交换机切换与待测服务器的各服务器端口之间的通断状态的方式替代以人工方式拔插待测服务器网络端口的网线,从而实现对待测服务器的测试,相对提高了测试的效率,相对增加了一定时间内的测试次数,因此提高了测试过程中发现问题的概率,相对确保了测试的准确性以及可靠性。In the test equipment provided by the present application, firstly, the server ports with link redundancy relationship in the server to be tested are set with the same network address, wherein, the server ports of the server to be tested are all connected to the switch, and on this basis, the switch is further used to switch On-off status with each server port, and in unit time, the switch is only in the channel state with one target server port in each server port, and then generates test results according to the network status information of the server to be tested in the on-off state . Because the device switches the on-off state between the server ports of the server to be tested by the switch instead of manually plugging and unplugging the network cables of the network ports of the server to be tested, the test of the server to be tested is realized, and the test efficiency is relatively improved. , which relatively increases the number of tests within a certain period of time, thus increasing the probability of finding problems during the testing process, and relatively ensuring the accuracy and reliability of the test.
此外,本申请实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现如上述的测试方法的步骤。In addition, an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned test method are implemented.
本申请所提供的计算机可读存储介质,首先对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址,其中,待测服务器的服务器端口均与交换机连接,在此基础上,进一步利用交换机切换与各服务器端口之间的通断状态,并且在单位时刻内,交换机仅与各服务器端口中的一个目标服务器端口处于通路状态,进而根据待测服务器在通断状态下的网络状态信息生成测试结果。由于本计算机可读存储介质通过交换机切换与待测服务器的各服务器端口之间的通断状态的方式替代以人工方式拔插待测服务器网络端口的网线,从而实现对待测服务器的测试,相对提高了测试的效率,相对增加了一定时间内的测试次数,因此提高了测试过程中发现问题的概率,相对确保了测试的准确性以及可靠性。In the computer-readable storage medium provided by the present application, firstly, the server ports with link redundancy relationship in the server to be tested are set with the same network address, wherein the server ports of the server to be tested are all connected to the switch, and on this basis, further Use the switch to switch the on-off state between each server port, and in a unit time, the switch is only in a state of connection with one target server port in each server port, and then according to the network state information of the server to be tested in the on-off state Generate test results. Because the computer-readable storage medium switches the on-off state between each server port of the server to be tested by the switch instead of manually unplugging and plugging the network cable of the network port of the server to be tested, so as to realize the test of the server to be tested, and the relative improvement is relatively high. The efficiency of the test is increased, and the number of tests in a certain period of time is relatively increased, so the probability of finding problems during the test process is improved, and the accuracy and reliability of the test are relatively ensured.
以上对本申请所提供的一种测试方法、装置、设备及存储介质进行了详细介绍。说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。A test method, apparatus, device and storage medium provided by the present application have been described in detail above. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant part can be referred to the description of the method. It should be pointed out that for those of ordinary skill in the art, without departing from the principles of the present application, several improvements and modifications can also be made to the present application, and these improvements and modifications also fall within the protection scope of the claims of the present application.
还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should also be noted that, in this specification, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply these entities or operations. There is no such actual relationship or sequence between operations. Moreover, the terms "comprising", "comprising" or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.
Claims (10)
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010568674.7A CN111901187B (en) | 2020-06-19 | 2020-06-19 | Test method, device, equipment and storage medium |
| PCT/CN2021/076974 WO2021253856A1 (en) | 2020-06-19 | 2021-02-20 | Test method and apparatus, and device and storage medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010568674.7A CN111901187B (en) | 2020-06-19 | 2020-06-19 | Test method, device, equipment and storage medium |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN111901187A true CN111901187A (en) | 2020-11-06 |
| CN111901187B CN111901187B (en) | 2022-07-22 |
Family
ID=73206339
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010568674.7A Active CN111901187B (en) | 2020-06-19 | 2020-06-19 | Test method, device, equipment and storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN111901187B (en) |
| WO (1) | WO2021253856A1 (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113014451A (en) * | 2021-02-25 | 2021-06-22 | 国网河南省电力公司电力科学研究院 | System and method for testing redundancy reliability of dual-core local area network |
| WO2021253856A1 (en) * | 2020-06-19 | 2021-12-23 | 浪潮电子信息产业股份有限公司 | Test method and apparatus, and device and storage medium |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN116866224A (en) * | 2023-07-14 | 2023-10-10 | 苏州浪潮智能科技有限公司 | A multi-server network card performance testing method and related components |
| CN118200061B (en) * | 2024-05-16 | 2024-09-10 | 南京沁恒微电子股份有限公司 | Ethernet control method and device for network terminal |
Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102684946A (en) * | 2012-05-25 | 2012-09-19 | 中国舰船研究设计中心 | Dual-network-interface-card switching performance testing method for information integration system |
| US20160359982A1 (en) * | 2015-06-08 | 2016-12-08 | Quanta Computer Inc. | Server link state detection and notification |
| CN107204899A (en) * | 2017-06-30 | 2017-09-26 | 郑州云海信息技术有限公司 | A kind of method of testing of network interface card, device and terminal |
| CN107395396A (en) * | 2017-06-22 | 2017-11-24 | 中国科学院西安光学精密机械研究所 | Redundant double-network-port configurable Ethernet IP core based on FPGA |
| CN107995068A (en) * | 2017-12-20 | 2018-05-04 | 北京百度网讯科技有限公司 | Network port testing method and equipment |
| US20180262428A1 (en) * | 2017-03-08 | 2018-09-13 | Arris Enterprises Llc | Dynamic Access-Point Link Aggregation |
| CN108632110A (en) * | 2018-03-23 | 2018-10-09 | 广州网测科技有限公司 | Equipment performance test method, system, computer equipment and storage medium |
| CN109802867A (en) * | 2019-01-02 | 2019-05-24 | 郑州云海信息技术有限公司 | A kind of method and system for testing network interface card NCSI connective stability |
Family Cites Families (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US9197596B2 (en) * | 2012-12-18 | 2015-11-24 | Dell Products, Lp | System and method to use common addresses on a management controller without conflict |
| CN108959097A (en) * | 2018-07-19 | 2018-12-07 | 郑州云海信息技术有限公司 | A kind of method of quick testing service device OS |
| CN109358490A (en) * | 2018-10-19 | 2019-02-19 | 郑州云海信息技术有限公司 | A redundant device and its testing method, system and storage medium |
| CN111901187B (en) * | 2020-06-19 | 2022-07-22 | 浪潮电子信息产业股份有限公司 | Test method, device, equipment and storage medium |
-
2020
- 2020-06-19 CN CN202010568674.7A patent/CN111901187B/en active Active
-
2021
- 2021-02-20 WO PCT/CN2021/076974 patent/WO2021253856A1/en not_active Ceased
Patent Citations (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102684946A (en) * | 2012-05-25 | 2012-09-19 | 中国舰船研究设计中心 | Dual-network-interface-card switching performance testing method for information integration system |
| US20160359982A1 (en) * | 2015-06-08 | 2016-12-08 | Quanta Computer Inc. | Server link state detection and notification |
| US20180262428A1 (en) * | 2017-03-08 | 2018-09-13 | Arris Enterprises Llc | Dynamic Access-Point Link Aggregation |
| CN107395396A (en) * | 2017-06-22 | 2017-11-24 | 中国科学院西安光学精密机械研究所 | Redundant double-network-port configurable Ethernet IP core based on FPGA |
| CN107204899A (en) * | 2017-06-30 | 2017-09-26 | 郑州云海信息技术有限公司 | A kind of method of testing of network interface card, device and terminal |
| CN107995068A (en) * | 2017-12-20 | 2018-05-04 | 北京百度网讯科技有限公司 | Network port testing method and equipment |
| CN108632110A (en) * | 2018-03-23 | 2018-10-09 | 广州网测科技有限公司 | Equipment performance test method, system, computer equipment and storage medium |
| CN109802867A (en) * | 2019-01-02 | 2019-05-24 | 郑州云海信息技术有限公司 | A kind of method and system for testing network interface card NCSI connective stability |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2021253856A1 (en) * | 2020-06-19 | 2021-12-23 | 浪潮电子信息产业股份有限公司 | Test method and apparatus, and device and storage medium |
| CN113014451A (en) * | 2021-02-25 | 2021-06-22 | 国网河南省电力公司电力科学研究院 | System and method for testing redundancy reliability of dual-core local area network |
| CN113014451B (en) * | 2021-02-25 | 2022-07-26 | 国网河南省电力公司电力科学研究院 | System and method for testing redundancy reliability of dual-core local area network |
Also Published As
| Publication number | Publication date |
|---|---|
| CN111901187B (en) | 2022-07-22 |
| WO2021253856A1 (en) | 2021-12-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111901187A (en) | Test method, device, equipment and storage medium | |
| CN112328440B (en) | Method and device for determining physical location of hard disk | |
| CN113783765B (en) | Method, system, equipment and medium for realizing intercommunication between cloud internal network and cloud external network | |
| CN102035862B (en) | Configuration node fault transfer method and system in SVC cluster | |
| US6651093B1 (en) | Dynamic virtual local area network connection process | |
| CN107666493B (en) | Database configuration method and equipment thereof | |
| CN106685733A (en) | A FC‑AE‑1553 network rapid configuration and automated testing method | |
| US12113848B2 (en) | Method and system for implementing bare metal inspection process, device, and storage medium | |
| CN115842759A (en) | Parallel test system, method, electronic equipment and storage medium | |
| WO2020151447A1 (en) | Offline configuration method and apparatus for smart device | |
| US20050268043A1 (en) | Reconfiguring logical settings in a storage system | |
| CN115426258B (en) | Information configuration method, device, switch and readable storage medium | |
| CN113448688A (en) | Method, system and computer medium for automatically correcting network configuration in cloud migration scene | |
| CN112099902A (en) | Network adapter configuration method, device, electronic device and storage medium for virtual machine | |
| CN110413225B (en) | Highly reliable cluster storage active-active configuration method, system, terminal and storage medium | |
| CN110633174A (en) | Disaster-tolerant switching method, device, and computer-readable storage medium | |
| US10841163B2 (en) | Autoinitialization of clustered storage | |
| CN112130958A (en) | A method and system for virtual machine hot migration based on OVS | |
| CN118075126A (en) | Device management method, device, equipment and storage medium | |
| CN111800511B (en) | Synchronous login state processing method, system, equipment and readable storage medium | |
| CN109039958A (en) | A kind of method, apparatus and FC terminal device of FC port virtualization | |
| CN107800802A (en) | A kind of Rack whole machine cabinets write-in and the method for reading UUID | |
| CN107645421A (en) | A kind of ISCSI protocol implementing methods of distributed storage | |
| CN116170337B (en) | Method, device and system for testing network equipment reliability | |
| CN114153655B (en) | Disaster recovery system creation method, disaster recovery method, device, equipment and medium |
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 |