WO2021253856A1 - 一种测试方法、装置、设备及存储介质 - Google Patents

一种测试方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2021253856A1
WO2021253856A1 PCT/CN2021/076974 CN2021076974W WO2021253856A1 WO 2021253856 A1 WO2021253856 A1 WO 2021253856A1 CN 2021076974 W CN2021076974 W CN 2021076974W WO 2021253856 A1 WO2021253856 A1 WO 2021253856A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
switch
test
state
ports
Prior art date
Application number
PCT/CN2021/076974
Other languages
English (en)
French (fr)
Inventor
杨帅
戴明甫
Original Assignee
浪潮电子信息产业股份有限公司
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 浪潮电子信息产业股份有限公司 filed Critical 浪潮电子信息产业股份有限公司
Publication of WO2021253856A1 publication Critical patent/WO2021253856A1/zh

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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5061Pools of addresses

Definitions

  • This application relates to the field of servers, in particular to a testing method, device, equipment, and storage medium.
  • the main purpose of the NCSI (Network Controller Sideband Interface) 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 a certain network port in the server After the function fails, other network ports can still be used to replace the failed network port and continue to provide corresponding services.
  • NCSI Network Controller Sideband Interface
  • 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.
  • the efficiency is often low.
  • the number of tests inside is relatively limited, so the probability of finding a problem during the test is low, and it is difficult to ensure the accuracy and reliability of the test.
  • the purpose of this application is to provide a test method, device, equipment and storage medium to relatively ensure the accuracy and reliability of the test.
  • this application provides a testing method, including:
  • the switch uses the switch to switch the on-off state with each server port; among them, in a unit time, the switch is only in a path state with one target server port among the server ports;
  • the test result is generated according to the network status information of the server under test in the on-off state.
  • the method before setting the same network address for the server ports with link redundancy in the server to be tested, the method further includes:
  • using the switch to switch the on-off state with each server port includes:
  • the switch By controlling the opening and closing of ports in the switch, the switch is used to switch the on-off state with each server port.
  • using the switch to switch the on-off state with each server port includes:
  • the switch In a preset test period, the switch is used to switch the on-off state with each server port at a preset switching frequency.
  • generating the test result according to the network state information of the server under test in the on-off state includes:
  • the corresponding test result is generated according to the network status information of the server under test in each on-off state during the test period.
  • the server port includes an NCSI port.
  • this application also provides a testing device, including:
  • the address setting module is used to set the same network address for the server ports with link redundancy in the server to be tested; among them, 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 with each server port; among them, in a unit time, the switch is in a path state with only one target server port in each server port;
  • the result generation module is used to generate the test result according to the network state information of the server under test in the on-off state.
  • the device further includes:
  • the address acquisition module is used to acquire the target network address assigned by the DHCP server;
  • Address setting module including:
  • the address setting sub-module is used to set the target network address of the server port with link redundancy relationship in the server to be tested.
  • test device including:
  • Memory used to store computer programs
  • the processor is used to implement the steps of the above-mentioned test method when the computer program is executed.
  • the present application also provides a computer-readable storage medium with a computer program 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.
  • the same network address is set for the server ports with link redundancy in the server to be tested.
  • the server ports of the server to be tested are all connected to the switch.
  • the switch is further used to switch The on-off state with each server port, and within a unit of time, the switch is only in a path state with one target server port in each server port, and then the test result is generated based on the network status information of the server under test in the on-off state . Because this method replaces manually plugging and unplugging the network cable of the network port of the server under test by switching the switch to the on-off state between the server ports of the server under test, the test of the server under test is realized, and the efficiency of the test is relatively improved.
  • this application also provides a testing device, equipment, and storage medium, with the same beneficial effects as described above.
  • FIG. 1 is a flowchart of a test method disclosed in an embodiment of the application
  • Fig. 2 is a schematic structural diagram of a testing device disclosed in an embodiment of the application.
  • the main purpose of the NCSI (Network Controller Sideband Interface) 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 a certain network port in the server After the function fails, other network ports can still be used to replace the failed network port and continue to provide corresponding services.
  • NCSI Network Controller Sideband Interface
  • 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.
  • the efficiency is often low.
  • the number of tests inside is relatively limited, so the probability of finding a problem during the test is low, and it is difficult to ensure the accuracy and reliability of the test.
  • the core of this application is to provide a test method to relatively ensure the accuracy and reliability of the test.
  • an embodiment of the present application discloses a test method, including:
  • Step S10 setting the same network address for the server ports with link redundancy relationship in the server to be tested.
  • the server ports of the server to be tested are all connected to the switch.
  • the executive body of this embodiment can be a server device that is independent of the server and switch to be tested and runs the corresponding test program server device, or the server device that runs the test program and other business programs at the same time, which should be determined according to actual needs. , There is no specific limitation here.
  • the focus of this step is to set the same network address for the server ports with link redundancy in the test server.
  • the link redundancy relationship refers to the existence of links between two or more server ports. Backup relationship. When the link of any server port fails, other server ports in the link redundancy relationship can be used to replace the failed server port to continue to provide corresponding data services. On this basis, there is a link in the server to be tested.
  • the same network address is set for the server ports of the link redundancy relationship, which is equivalent to binding the same network address to the server ports with the link redundancy relationship, and then the server ports with the link redundancy relationship can all use the same network address
  • the purpose of providing data services is to configure the corresponding server port of the server to be tested in the way that the server port is configured in the actual application scenario to ensure the accuracy of the test.
  • server ports of the server under test in this embodiment are all connected to the switch, and the purpose is to be able to control the on-off state with the server port of the server under test through the switch in the subsequent steps.
  • Step S11 Use the switch to switch the on-off state with each server port.
  • the switch in a unit time, is in a path state with only one target server port among the server ports.
  • the focus of this step is to control the on-off state between the switch switch and each server port to simulate manual plugging and unplugging of the network cable connected to each server port in the server to be tested, so as to realize the server under test. Redundant server ports are used for reliability testing of communication switching.
  • the switch is used to switch the on-off state between the server ports of the server under test At the time, within a unit time, the switch is only in a path state with one target server port among the server ports.
  • Step S12 Generate a test result according to the network state information of the server to be tested in the on-off state.
  • the server under test After using the switch to switch the on-off status between the ports of each server, the server under test 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 under test and the switch, Furthermore, in this step, the test result is generated according to the network state information of the server to be tested in the on-off state.
  • the same network address is set for the server ports with link redundancy in the server to be tested.
  • the server ports of the server to be tested are all connected to the switch.
  • the switch is further used to switch The on-off state with each server port, and within a unit of time, the switch is only in the path state with one target server port among the server ports, and then the test result is generated based on the network status information of the server under test in the on-off state . Because this method replaces manually plugging and unplugging the network cable of the network port of the server to be tested by switching the switch to the on-off state of each server port of the server to be tested, the test of the server to be tested is realized, and the efficiency of the test is relatively improved. , Relatively increase the number of tests within a certain period of time, thus increasing the probability of finding problems during the test process, and relatively ensuring the accuracy and reliability of the test.
  • the method before setting the same network address for the server ports with link redundancy in the server to be tested, the method further includes:
  • the focus of this embodiment is that before setting the same network address to the server ports with link redundancy in the server under test, 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 to be tested.
  • DHCP Dynamic Host Configuration Protocol
  • Dynamic Host Configuration Protocol refers to a server running dynamic host configuration protocol, which is a network protocol of a local area network.
  • the DHCP protocol avoids errors caused by manually setting the network address and subnet mask, 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 reduces the time it takes to configure or reconfigure workstations in the network.
  • the lease period of the address can be flexibly set by setting the DHCP server, so this embodiment can relatively ensure The efficiency of obtaining the target network address, and the availability of the target network address set by the server port with link redundancy in the server to be tested.
  • setting the target network address for the server port with link redundancy in the server to be tested can be specifically configured by setting the target network address on the server port with link redundancy in the server to be tested, so as to relatively ensure the treatment Test the overall efficiency of setting the target network address on the server port with link redundancy in the server.
  • using a switch to switch the on-off state with each server port includes:
  • the switch By controlling the opening and closing of ports in the switch, the switch is used to switch the on-off state with each server port.
  • this embodiment controls the opening and closing of ports in the switch to achieve the purpose of using the switch to switch and the on-off state between each server port, and relatively ensure the on-off state between the switch and each server port. The efficiency of the state.
  • using a switch to switch the on-off state with each server port includes:
  • the switch In a preset test period, the switch is used to switch the on-off state with each server port at a preset switching frequency.
  • the key point in this embodiment is to limit the test duration of the server under test, that is, use the switch to test the server under test during the preset test period, and control the The switch switches the on-off state between each server port according to the preset switching frequency, so as to ensure the consistency of the time interval between each switch of the on-off state of each server port by the switch, thereby further ensuring the overall test process flexibility.
  • generating the test result according to the network status information of the server under test in the on-off state includes:
  • the corresponding test result is generated according to the network status information of the server under test in each on-off state during the test period.
  • this embodiment Because in this embodiment, after the switch is used to switch the on-off state between each server port at a preset switching frequency in a preset test period, the server under test will generate a corresponding response every fixed time during the test period. Therefore, this embodiment generates corresponding test results according to the network status information of the server under test in each on-off state during the test cycle, which can further ensure the overall accuracy of the test results.
  • the server port includes an NCSI port.
  • NCSI Network Controller Sideband Interface, network controller sideband management
  • NCSI ports are server ports based on the redundant backup of the NCSI function.
  • the test of the NCSI function in the server under test is realized, which can further ensure the reliability of the NCSI function in the server under test, and thereby ensure the reliability of network communication of the server under test.
  • an embodiment of the present application provides a testing device, including:
  • the address setting module 10 is used to 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;
  • the on-off switching module 11 is used to switch the on-off state between the switch and each server port by using the switch; wherein, in a unit time, the switch is in a path state with only one target server port among the server ports;
  • the result generating module 12 is used to generate a test result according to the network state information of the server to be tested in the on-off state.
  • the device further includes:
  • the address acquisition module is used to acquire the target network address assigned by the DHCP server;
  • Address setting module including:
  • the address setting sub-module is used to set the target network address of the server port with link redundancy relationship in the server to be tested.
  • the same network address is set for the server ports with link redundancy in the server to be tested.
  • the server ports of the server to be tested are all connected to the switch.
  • the switch is further used to switch The on-off state with each server port, and within a unit of time, the switch is only in a path state with one target server port in each server port, and then the test result is generated based on the network status information of the server under test in the on-off state . Since the device uses the switch to switch the on-off state between each server port of the server to be tested instead of manually plugging and unplugging the network cable of the network port of the server to be tested, the test of the server to be tested is realized, and the efficiency of the test is relatively improved. , Relatively increase the number of tests within a certain period of time, thus increasing the probability of finding problems during the test process, and relatively ensuring the accuracy and reliability of the test.
  • test device including:
  • Memory used to store computer programs
  • the processor is used to implement the steps of the above-mentioned test method when the computer program is executed.
  • the same network address is set for the server ports with link redundancy in the server to be tested.
  • the server ports of the server to be tested are all connected to the switch.
  • the switch is further used to switch The on-off state with each server port, and within a unit of time, the switch is only in the path state with one target server port among the server ports, and then the test result is generated based on the network status information of the server under test in the on-off state . Because the device switches the on-off state between the server ports of the server under test through the switch instead of manually plugging and unplugging the network cable of the network port of the server under test, the test of the server under test is realized, and the efficiency of the test is relatively improved. , Relatively increase the number of tests within a certain period of time, thus increasing the probability of finding problems during the test process, and relatively ensuring the accuracy and reliability of the test.
  • the embodiments of the present application also provide a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium.
  • the computer program is executed by a processor, the steps of the above-mentioned test method are implemented.
  • the same network address is set for the server ports with link redundancy in the server to be tested.
  • the server ports of the server to be tested are all connected to the switch.
  • the switch is only in the path state with one target server port among the server ports, and then according to the network state information of the server under test in the on-off state Generate test results.
  • the computer-readable storage medium switches the on-off state between the server ports of the server under test through the switch, instead of manually plugging and unplugging the network cable of the network port of the server under test, the test of the server under test is realized, and the relative improvement This improves the efficiency of the test and relatively increases the number of tests within a certain period of time, thus increasing the probability of finding problems during the test process, and relatively ensuring the accuracy and reliability of the test.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

一种测试方法、装置、设备及存储介质。该方法的步骤包括:对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址;其中,待测服务器的服务器端口均与交换机连接;利用交换机切换与各服务器端口之间的通断状态;其中,在单位时刻内,交换机仅与各服务器端口中的一个目标服务器端口处于通路状态;根据待测服务器在通断状态下的网络状态信息生成测试结果。本方法提高了测试过程中发现问题的概率,相对确保了测试的准确性以及可靠性。此外,本申请还提供一种测试装置、设备及存储介质,有益效果同上所述。

Description

一种测试方法、装置、设备及存储介质
本申请要求于2020年6月19日提交中国专利局、申请号为CN202010568674.7、发明名称为“一种测试方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及服务器领域,特别是涉及一种测试方法、装置、设备及存储介质。
背景技术
随着网络技术的不断发展,传统信息化服务以及云计算服务对服务器的稳定性要求越来越高,因此当前在对服务器产品的研发阶段或生产阶段都需要对其进行可靠性测试,从而保证服务器产品的稳定性。
服务器中的NCSI(Network Controller Sideband Interface,网络控制器的边带管理)功能的主要目的是通过通信链路的冗余实现对服务器中的网络端口备份,以此确保当服务器中的某一网络端口功能故障后,依然可以通过其它网络端口取代故障的网络端口继续提供相应服务。
当前往往是以人工方式拔插待测服务器网络端口的网线的方式测试待测服务器中的NCSI功能的可靠性,但是目前通过人工手动测试服务器中的NCSI功能时,效率往往较低,在一定时间内的测试次数相对有限,因此测试过程中发现问题的概率较低,难以确保测试的准确性以及可靠性。
由此可见,提供一种测试方法,以相对确保测试的准确性以及可靠性,是本领域技术人员需要解决的问题。
发明内容
本申请的目的是提供一种测试方法、装置、设备及存储介质,以相对确保测试的准确性以及可靠性。
为解决上述技术问题,本申请提供一种测试方法,包括:
对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地 址;其中,待测服务器的服务器端口均与交换机连接;
利用交换机切换与各服务器端口之间的通断状态;其中,在单位时刻内,交换机仅与各服务器端口中的一个目标服务器端口处于通路状态;
根据待测服务器在通断状态下的网络状态信息生成测试结果。
优选地,在对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址之前,方法还包括:
获取由DHCP服务器分配的目标网络地址;
对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址,包括:
对待测服务器中具有链路冗余关系的服务器端口设置目标网络地址。
优选地,利用交换机切换与各服务器端口之间的通断状态,包括:
通过控制交换机中端口的开启和关闭的方式,利用交换机切换与各服务器端口之间的通断状态。
优选地,利用交换机切换与各服务器端口之间的通断状态,包括:
在预设的测试周期内利用交换机以预设切换频率切换与各服务器端口之间的通断状态。
优选地,根据待测服务器在通断状态下的网络状态信息生成测试结果,包括:
根据待测服务器在测试周期内各通断状态下的网络状态信息生成相应的测试结果。
优选地,服务器端口包括NCSI端口。
此外,本申请还提供一种测试装置,包括:
地址设置模块,用于对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址;其中,待测服务器的服务器端口均与交换机连接;
通断切换模块,用于利用交换机切换与各服务器端口之间的通断状态;其中,在单位时刻内,交换机仅与各服务器端口中的一个目标服务器端口处于通路状态;
结果生成模块,用于根据待测服务器在通断状态下的网络状态信息生成测试结果。
优选地,装置还包括:
地址获取模块,用于获取由DHCP服务器分配的目标网络地址;
地址设置模块,包括:
地址设置子模块,用于对待测服务器中具有链路冗余关系的服务器端口设置目标网络地址。
此外,本申请还提供一种测试设备,包括:
存储器,用于存储计算机程序;
处理器,用于执行计算机程序时实现如上述的测试方法的步骤。
此外,本申请还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现如上述的测试方法的步骤。
本申请所提供的测试方法,首先对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址,其中,待测服务器的服务器端口均与交换机连接,在此基础上,进一步利用交换机切换与各服务器端口之间的通断状态,并且在单位时刻内,交换机仅与各服务器端口中的一个目标服务器端口处于通路状态,进而根据待测服务器在通断状态下的网络状态信息生成测试结果。由于本方法通过交换机切换与待测服务器的各服务器端口之间的通断状态的方式替代以人工方式拔插待测服务器网络端口的网线,从而实现对待测服务器的测试,相对提高了测试的效率,相对增加了一定时间内的测试次数,因此提高了测试过程中发现问题的概率,相对确保了测试的准确性以及可靠性。此外,本申请还提供一种测试装置、设备及存储介质,有益效果同上所述。
附图说明
图1为本申请实施例公开的一种测试方法的流程图;
图2为本申请实施例公开的一种测试装置的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下,所获得的所有其他实施例,都属于本申请保护范围。
服务器中的NCSI(Network Controller Sideband Interface,网络控制器的边带管理)功能的主要目的是通过通信链路的冗余实现对服务器中的网络端口备份,以此确保当服务器中的某一网络端口功能故障后,依然可以通过其它网络端口取代故障的网络端口继续提供相应服务。
当前往往是以人工方式拔插待测服务器网络端口的网线的方式测试待测服务器中的NCSI功能的可靠性,但是目前通过人工手动测试服务器中的NCSI功能时,效率往往较低,在一定时间内的测试次数相对有限,因此测试过程中发现问题的概率较低,难以确保测试的准确性以及可靠性。
为此,本申请的核心是提供一种测试方法,以相对确保测试的准确性以及可靠性。
为了使本技术领域的人员更好地理解本申请方案,下面结合附图和具体实施方式对本申请作进一步的详细说明。
请参见图1所示,本申请实施例公开了一种测试方法,包括:
步骤S10:对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址。
其中,待测服务器的服务器端口均与交换机连接。
需要说明的是,本实施例的执行主体可以是独立于待测服务器以及交换机,并且运行有相应测试程序服务器设备,或同时运行有测试程序以及其它业务程序的服务器设备,应根据实际需求而定,在此不做具体限定。
本步骤的重点在于对测服务器中具有链路冗余关系的服务器端口设置相同的网络地址,其中,链路冗余关系指的是,两个或两个以上的服务器端口之间的链路存在备份关系,任意一个服务器端口的链路故障时,能够通过链路冗余关系中的其它服务器端口取代链路故障的服务器端口继续提 供相应的数据服务,在此基础上,对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址,相当于是对具有链路冗余关系的服务器端口进行相同网络地址的绑定,进而具有链路冗余关系的服务器端口均能够以相同的网络地址提供数据服务,目的是依照实际应用场景下对服务器端口进行配置的方式对待测服务器进行相应的服务器端口配置,确保测试的准确性。
另外,需要注意的是,本实施例中的待测服务器的服务器端口均与交换机连接,目的是能够在后续步骤中通过交换机控制与待测服务器的服务器端口之间的通断状态。
步骤S11:利用交换机切换与各服务器端口之间的通断状态。
其中,在单位时刻内,交换机仅与各服务器端口中的一个目标服务器端口处于通路状态。
需要说明的是,本步骤的重点是通过控制交换机切换与各服务器端口之间的通断状态,以此模拟人工的方式插拔接入待测服务器中各服务器端口的网线,实现对待测服务器中冗余的服务器端口进行通信切换的可靠性测试。
需要注意的是,由于实际的场景下,服务器中冗余备份的端口在同一时刻,只有一个端口处于工作状态,因此在测试时,利用交换机切换与待测服务器各服务器端口之间的通断状态时,单位时刻内,交换机仅与各服务器端口中的一个目标服务器端口处于通路状态。
步骤S12:根据待测服务器在通断状态下的网络状态信息生成测试结果。
在利用交换机切换与各服务器端口之间的通断状态之后,待测服务器会根据当前的网络状态生成相应的网络状态信息,由于网络状态信息能够反映出待测服务器与交换机之间的网络性能,进而本步骤根据待测服务器在通断状态下的网络状态信息生成测试结果。
本申请所提供的测试方法,首先对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址,其中,待测服务器的服务器端口均与交换机连接,在此基础上,进一步利用交换机切换与各服务器端口之间的通 断状态,并且在单位时刻内,交换机仅与各服务器端口中的一个目标服务器端口处于通路状态,进而根据待测服务器在通断状态下的网络状态信息生成测试结果。由于本方法通过交换机切换与待测服务器的各服务器端口之间的通断状态的方式替代以人工方式拔插待测服务器网络端口的网线,从而实现对待测服务器的测试,相对提高了测试的效率,相对增加了一定时间内的测试次数,因此提高了测试过程中发现问题的概率,相对确保了测试的准确性以及可靠性。
在上述实施例的基础上,作为一种优选的实施方式,在对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址之前,方法还包括:
获取由DHCP服务器分配的目标网络地址;
对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址,包括:
对待测服务器中具有链路冗余关系的服务器端口设置目标网络地址。
需要说明的是,本实施方式的重点是,在对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址之前,首先获取由DHCP服务器分配的目标网络地址,进而将目标网络地址设置为待测服务器中具有链路冗余关系的服务器端口的地址。
DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)服务器,指的是运行有动态主机配置协议的服务器,动态主机配置协议是一个局域网的网络协议。DHCP协议避免了因手工设置网络地址及子网掩码所产生的错误,同时也避免了把一个网络地址分配给多台服务器所造成的地址冲突。降低了管理网络地址设置的负担,使用DHCP服务器大大缩短了配置或重新配置网络中工作站所花费的时间,同时通过对DHCP服务器的设置可灵活的设置地址的租期,因此本实施方式能够相对确保获取目标网络地址时的高效性,以及对待测服务器中具有链路冗余关系的服务器端口设置的目标网络地址的可用性。
更进一步的,对待测服务器中具有链路冗余关系的服务器端口设置目标网络地址,可以具体是通过交换机对待测服务器中具有链路冗余关系的 服务器端口设置目标网络地址,以此相对确保对待测服务器中具有链路冗余关系的服务器端口设置目标网络地址时的整体效率。
在上述实施例的基础上,作为一种优选的实施方式,利用交换机切换与各服务器端口之间的通断状态,包括:
通过控制交换机中端口的开启和关闭的方式,利用交换机切换与各服务器端口之间的通断状态。
需要说明的是,由于交换机通过自身的端口与待测服务器的服务器端口建立有链路连接,因此待测服务器与交换机之间的网络通信,本质上是基于服务器端口与交换机中对应的接口建立的,因此本实施方式通过控制交换机中端口的开启和关闭的方式,以实现利用交换机切换与各服务器端口之间的通断状态的目的,相对确保了利用交换机切换与各服务器端口之间的通断状态的高效性。
在上述实施例的基础上,作为一种优选的实施方式,利用交换机切换与各服务器端口之间的通断状态,包括:
在预设的测试周期内利用交换机以预设切换频率切换与各服务器端口之间的通断状态。
需要说明的是,本实施方式中的重点是对待测服务器的测试时长进行了限定,即在预设的测试周期内利用交换机对待测服务器进行测试,并且在对待测服务器进行测试的过程中,控制交换机依照预设切换频率切换与各服务器端口之间的通断状态,以此确保交换机对各服务器端口的通断状态的各次切换之间时间间隔的一致性,进而进一步确保了测试过程的整体灵活性。
更进一步的,根据待测服务器在通断状态下的网络状态信息生成测试结果,包括:
根据待测服务器在测试周期内各通断状态下的网络状态信息生成相应的测试结果。
由于本实施方式中,在预设的测试周期内利用交换机以预设切换频率 切换与各服务器端口之间的通断状态后,在测试周期内,待测服务器每隔固定的时间均会生成相应的网络状态信息,因此本实施方式根据待测服务器在测试周期内各通断状态下的网络状态信息生成相应的测试结果,能够进一步确保测试结果的整体准确性。
在上述一系列实施方式的基础上,作为一种优选的实施方式,服务器端口包括NCSI端口。
需要说明的是,NCSI(Network Controller Sideband Interface,网络控制器的边带管理)是当前服务器中普遍采用的网络端口备份功能,而NCSI端口则为基于NCSI功能冗余备份的服务器端口,本实施方式实现了对于待测服务器中的NCSI功能的测试,能够进一步确保待测服务器中NCSI功能的可靠性,进而确保待测服务器的网络通信可靠性。
请参见图2所示,本申请实施例提供了一种测试装置,包括:
地址设置模块10,用于对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址;其中,待测服务器的服务器端口均与交换机连接;
通断切换模块11,用于利用交换机切换与各服务器端口之间的通断状态;其中,在单位时刻内,交换机仅与各服务器端口中的一个目标服务器端口处于通路状态;
结果生成模块12,用于根据待测服务器在通断状态下的网络状态信息生成测试结果。
更进一步的,作为一种优选的实施方式,装置还包括:
地址获取模块,用于获取由DHCP服务器分配的目标网络地址;
地址设置模块,包括:
地址设置子模块,用于对待测服务器中具有链路冗余关系的服务器端口设置目标网络地址。
本申请所提供的测试装置,首先对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址,其中,待测服务器的服务器端口均与交换机连接,在此基础上,进一步利用交换机切换与各服务器端口之间的通 断状态,并且在单位时刻内,交换机仅与各服务器端口中的一个目标服务器端口处于通路状态,进而根据待测服务器在通断状态下的网络状态信息生成测试结果。由于本装置通过交换机切换与待测服务器的各服务器端口之间的通断状态的方式替代以人工方式拔插待测服务器网络端口的网线,从而实现对待测服务器的测试,相对提高了测试的效率,相对增加了一定时间内的测试次数,因此提高了测试过程中发现问题的概率,相对确保了测试的准确性以及可靠性。
此外,本申请实施例还提供一种测试设备,包括:
存储器,用于存储计算机程序;
处理器,用于执行计算机程序时实现如上述的测试方法的步骤。
本申请所提供的测试设备,首先对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址,其中,待测服务器的服务器端口均与交换机连接,在此基础上,进一步利用交换机切换与各服务器端口之间的通断状态,并且在单位时刻内,交换机仅与各服务器端口中的一个目标服务器端口处于通路状态,进而根据待测服务器在通断状态下的网络状态信息生成测试结果。由于本设备通过交换机切换与待测服务器的各服务器端口之间的通断状态的方式替代以人工方式拔插待测服务器网络端口的网线,从而实现对待测服务器的测试,相对提高了测试的效率,相对增加了一定时间内的测试次数,因此提高了测试过程中发现问题的概率,相对确保了测试的准确性以及可靠性。
此外,本申请实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现如上述的测试方法的步骤。
本申请所提供的计算机可读存储介质,首先对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址,其中,待测服务器的服务器端口均与交换机连接,在此基础上,进一步利用交换机切换与各服务器端口之间的通断状态,并且在单位时刻内,交换机仅与各服务器端口中的一 个目标服务器端口处于通路状态,进而根据待测服务器在通断状态下的网络状态信息生成测试结果。由于本计算机可读存储介质通过交换机切换与待测服务器的各服务器端口之间的通断状态的方式替代以人工方式拔插待测服务器网络端口的网线,从而实现对待测服务器的测试,相对提高了测试的效率,相对增加了一定时间内的测试次数,因此提高了测试过程中发现问题的概率,相对确保了测试的准确性以及可靠性。
以上对本申请所提供的一种测试方法、装置、设备及存储介质进行了详细介绍。说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。对于实施例公开的装置而言,由于其与实施例公开的方法相对应,所以描述的比较简单,相关之处参见方法部分说明即可。应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以对本申请进行若干改进和修饰,这些改进和修饰也落入本申请权利要求的保护范围内。
还需要说明的是,在本说明书中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。

Claims (10)

  1. 一种测试方法,其特征在于,包括:
    对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址;其中,所述待测服务器的所述服务器端口均与交换机连接;
    利用所述交换机切换与各所述服务器端口之间的通断状态;其中,在单位时刻内,所述交换机仅与各所述服务器端口中的一个目标服务器端口处于通路状态;
    根据所述待测服务器在所述通断状态下的网络状态信息生成测试结果。
  2. 根据权利要求1所述的测试方法,其特征在于,在所述对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址之前,所述方法还包括:
    获取由DHCP服务器分配的目标网络地址;
    所述对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址,包括:
    对所述待测服务器中具有链路冗余关系的所述服务器端口设置所述目标网络地址。
  3. 根据权利要求1所述的测试方法,其特征在于,所述利用所述交换机切换与各所述服务器端口之间的通断状态,包括:
    通过控制所述交换机中端口的开启和关闭的方式,利用所述交换机切换与各所述服务器端口之间的通断状态。
  4. 根据权利要求1所述的测试方法,其特征在于,所述利用所述交换机切换与各所述服务器端口之间的通断状态,包括:
    在预设的测试周期内利用所述交换机以预设切换频率切换与各所述服务器端口之间的所述通断状态。
  5. 根据权利要求4所述的测试方法,其特征在于,所述根据所述待测服务器在所述通断状态下的网络状态信息生成测试结果,包括:
    根据所述待测服务器在所述测试周期内各所述通断状态下的所述网络状态信息生成相应的所述测试结果。
  6. 根据权利要求1至5任意一项所述的测试方法,其特征在于,所述服务器端口包括NCSI端口。
  7. 一种测试装置,其特征在于,包括:
    地址设置模块,用于对待测服务器中具有链路冗余关系的服务器端口设置相同的网络地址;其中,所述待测服务器的所述服务器端口均与交换机连接;
    通断切换模块,用于利用所述交换机切换与各所述服务器端口之间的通断状态;其中,在单位时刻内,所述交换机仅与各所述服务器端口中的一个目标服务器端口处于通路状态;
    结果生成模块,用于根据所述待测服务器在所述通断状态下的网络状态信息生成测试结果。
  8. 根据权利要求7所述的测试装置,其特征在于,所述装置还包括:
    地址获取模块,用于获取由DHCP服务器分配的目标网络地址;
    所述地址设置模块,包括:
    地址设置子模块,用于对所述待测服务器中具有链路冗余关系的所述服务器端口设置所述目标网络地址。
  9. 一种测试设备,其特征在于,包括:
    存储器,用于存储计算机程序;
    处理器,用于执行所述计算机程序时实现如权利要求1至6任一项所述的测试方法的步骤。
  10. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至6任一项所述的测试方法的步骤。
PCT/CN2021/076974 2020-06-19 2021-02-20 一种测试方法、装置、设备及存储介质 WO2021253856A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010568674.7A CN111901187B (zh) 2020-06-19 2020-06-19 一种测试方法、装置、设备及存储介质
CN202010568674.7 2020-06-19

Publications (1)

Publication Number Publication Date
WO2021253856A1 true WO2021253856A1 (zh) 2021-12-23

Family

ID=73206339

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/076974 WO2021253856A1 (zh) 2020-06-19 2021-02-20 一种测试方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN111901187B (zh)
WO (1) WO2021253856A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111901187B (zh) * 2020-06-19 2022-07-22 浪潮电子信息产业股份有限公司 一种测试方法、装置、设备及存储介质
CN113014451B (zh) * 2021-02-25 2022-07-26 国网河南省电力公司电力科学研究院 一种双核心局域网冗余可靠性测试系统和方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9491139B2 (en) * 2012-12-18 2016-11-08 Dell Products, Lp System and method to use common addresses on different interfaces in a management controller without conflict
CN107995068A (zh) * 2017-12-20 2018-05-04 北京百度网讯科技有限公司 网口测试方法及设备
CN108959097A (zh) * 2018-07-19 2018-12-07 郑州云海信息技术有限公司 一种快速测试服务器os的方法
CN109358490A (zh) * 2018-10-19 2019-02-19 郑州云海信息技术有限公司 一种冗余设备及其测试方法、系统和存储介质
CN111901187A (zh) * 2020-06-19 2020-11-06 浪潮电子信息产业股份有限公司 一种测试方法、装置、设备及存储介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102684946B (zh) * 2012-05-25 2014-08-27 中国舰船研究设计中心 用于信息集成系统的双网卡切换性能测试方法
US10298435B2 (en) * 2015-06-08 2019-05-21 Quanta Computer Inc. Server link state detection and notification
US10158569B2 (en) * 2017-03-08 2018-12-18 Arris Enterprises Llc Dynamic access-point link aggregation
CN107395396A (zh) * 2017-06-22 2017-11-24 中国科学院西安光学精密机械研究所 基于fpga的冗余双网口可配置以太网ip核
CN107204899A (zh) * 2017-06-30 2017-09-26 郑州云海信息技术有限公司 一种网卡的测试方法、装置及终端
CN108632110B (zh) * 2018-03-23 2020-06-19 北京网测科技有限公司 设备性能测试方法、系统、计算机设备和存储介质
CN109802867B (zh) * 2019-01-02 2022-04-26 郑州云海信息技术有限公司 一种测试网卡ncsi连接稳定性的方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9491139B2 (en) * 2012-12-18 2016-11-08 Dell Products, Lp System and method to use common addresses on different interfaces in a management controller without conflict
CN107995068A (zh) * 2017-12-20 2018-05-04 北京百度网讯科技有限公司 网口测试方法及设备
CN108959097A (zh) * 2018-07-19 2018-12-07 郑州云海信息技术有限公司 一种快速测试服务器os的方法
CN109358490A (zh) * 2018-10-19 2019-02-19 郑州云海信息技术有限公司 一种冗余设备及其测试方法、系统和存储介质
CN111901187A (zh) * 2020-06-19 2020-11-06 浪潮电子信息产业股份有限公司 一种测试方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN111901187A (zh) 2020-11-06
CN111901187B (zh) 2022-07-22

Similar Documents

Publication Publication Date Title
WO2021253856A1 (zh) 一种测试方法、装置、设备及存储介质
WO2017036288A1 (zh) 一种网元升级方法及设备
US7483390B2 (en) System and method for dynamically configuring and transitioning wired and wireless networks
Rehman et al. Fault-tolerance in the scope of software-defined networking (sdn)
EP3291499A1 (en) Method and apparatus for network service capacity expansion
US9838462B2 (en) Method, apparatus, and system for data transmission
US6651093B1 (en) Dynamic virtual local area network connection process
US6499115B1 (en) Burn rack dynamic virtual local area network
CN107666493B (zh) 一种数据库配置方法及其设备
WO2017202261A1 (zh) 一种网络备份重连方法、装置及机顶盒
US20160380830A1 (en) Method and system for managing multiple devices within a network system
CN113783765A (zh) 一种实现云内网和云外网互通的方法、系统、设备和介质
CN105471673A (zh) 服务器bmc专用网口和共享网口的批量自动测试方法
CN103490945A (zh) 一种测试最大telnet用户数的方法
CN110633174A (zh) 容灾切换方法、设备以及计算机可读存储介质
US20240155023A1 (en) Method and system for implementing bare metal inspection process, device, and storage medium
WO2020151447A1 (zh) 一种智能设备的离线配置方法及装置
US20200403938A1 (en) Port Configuration Method and Communications Device
CN115426258B (zh) 信息配置方法、装置、交换机及可读存储介质
CN107995059B (zh) 一种iOS网络测试策略
US20040267921A1 (en) System and method for describing network components and their associations
CN108965493A (zh) 双机热备中的数据传输切换方法
CN114697191A (zh) 一种资源迁移方法、装置、设备及存储介质
CN111314198A (zh) 一种白盒交换机设置端口ip的方法和设备
CN115086216B (zh) 一种多虚拟终端的测试方法及系统

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21825137

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21825137

Country of ref document: EP

Kind code of ref document: A1