CN110708216A - Switch LLDP protocol test method and test system - Google Patents

Switch LLDP protocol test method and test system Download PDF

Info

Publication number
CN110708216A
CN110708216A CN201910965792.9A CN201910965792A CN110708216A CN 110708216 A CN110708216 A CN 110708216A CN 201910965792 A CN201910965792 A CN 201910965792A CN 110708216 A CN110708216 A CN 110708216A
Authority
CN
China
Prior art keywords
test
switch
tested
lldp protocol
protocol message
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201910965792.9A
Other languages
Chinese (zh)
Other versions
CN110708216B (en
Inventor
蔡玲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN JIXIANG TENDA TECHNOLOGY Co Ltd
Original Assignee
SHENZHEN JIXIANG TENDA 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 SHENZHEN JIXIANG TENDA TECHNOLOGY Co Ltd filed Critical SHENZHEN JIXIANG TENDA TECHNOLOGY Co Ltd
Priority to CN201910965792.9A priority Critical patent/CN110708216B/en
Publication of CN110708216A publication Critical patent/CN110708216A/en
Application granted granted Critical
Publication of CN110708216B publication Critical patent/CN110708216B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/18Protocol analysers
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Maintenance And Management Of Digital Transmission (AREA)

Abstract

The invention provides a method and a system for testing an LLDP protocol of a switch, belonging to the field of switch testing. The test method of the invention comprises the following steps: acquiring a test instruction; configuring parameter information of all switches to be tested; sending an LLDP protocol message containing parameter information according to the test item or acquiring the LLDP protocol message sent by the tested switch; acquiring real parameter information of the tested switch according to the interaction with the tested switch; comparing the configuration information of the step S2 with the real parameter information of the step S4 one by one until the comparison is finished; and outputting a test result. The invention has the beneficial effects that: the test time is saved, and the test efficiency is greatly improved.

Description

Switch LLDP protocol test method and test system
Technical Field
The invention relates to the field of switch testing, in particular to a method for testing a LLDP protocol of a switch, and also relates to a testing system for realizing the method for testing the LLDP protocol of the switch.
Background
LLDP protocol (link layer discovery protocol) role: the equipment of different manufacturers can mutually discover and interact respective system and configuration information in the network. The exchanger receives the LLDP protocol message sent by the opposite terminal device, analyzes the configuration parameters carried by the LLDP protocol message, and displays the configuration parameters in the neighbor information of the exchanger for the network management system to inquire and judge the communication condition of the link.
The LLDP protocol of the test switch needs to be connected in series by virtue of the switch with the LLDP function and perform repeated system function configuration on the device, check the correctness of neighbor information on the test switch repeatedly, and verify the operation manually and fussy. In addition, different vendors have different TLV information types carried by LLDP, and switches of different vendors need to be connected for verification.
Because the LLDP protocol message is found by the tested switch and the opposite terminal device, and verifies the correctness of the information of both sides, the following manual test scheme is adopted at present:
1. finding different vendor switches for butt joint test in order to verify different TLV types of the LLDP;
2. after the opposite terminal equipment system is configured, checking the correctness of the neighbor information on the tested switch;
3. and after the system configuration is carried out on the tested switch, the correctness of the neighbor information is checked on the opposite terminal equipment.
However, the existing manual test mode cannot verify all LLDP TLV categories, and the manual test is long in time consumption and low in efficiency.
Disclosure of Invention
In order to solve the problems in the prior art, the invention provides a method and a system for testing an LLDP protocol of a switch.
The method for testing the LLDP protocol of the switch comprises the following steps:
s1: acquiring a test instruction;
s2: configuring parameter information of all switches to be tested;
s3: sending an LLDP protocol message containing parameter information according to the test item or acquiring the LLDP protocol message sent by the tested switch;
s4: acquiring real parameter information of the tested switch according to the interaction with the tested switch;
s5: comparing the configuration information of the step S2 with the real parameter information of the step S4 one by one until the comparison is finished;
s6: and outputting a test result.
In step S3, the test items include a switch neighbor information display correctness test and a transmission LLDP protocol message correctness test.
The invention further improves, when the test item is the switch neighbor information display correctness test, the parameter information includes TLV category information to be tested, the TLV is a combination of Type, length, and Value, and the implementation process of step S4 is as follows:
s401: converting the parameter information into 16-system data fields, and integrating the 16-system data fields into a legal LLDP protocol message to be sent to the tested switch from the network card;
s402: after the LLDP protocol message is confirmed to be sent out, the serial port configuration of the switch is called, the command for displaying the neighbor information is automatically input, the neighbor information of the tested switch is obtained,
in step S5, the neighbor information of the tested switch is obtained and compared with the parameter information configured in step S2 one by one, and the test is completed after all comparisons are completed.
The present invention further improves, when the test item is the correctness test of sending the LLDP protocol message, the implementation process of step S4 is:
s411: after the configuration of the tested switch is completed, acquiring an LLDP protocol message sent by the tested switch;
s412: extracting all fields of the LLDP protocol message and analyzing;
s413: the required fields are converted into a character string,
in step S5, the converted information fields are compared with the parameters configured in step S2 one by one, and the test is completed after all the comparisons are completed.
The invention also provides a test system for realizing the method for testing the LLDP protocol of the switch, which comprises a test client and a plurality of switches to be tested connected with the test client, wherein a test tool is arranged in the test client, and the test tool comprises: a first obtaining module: the test instruction is obtained; a parameter setting module: the parameter information is used for setting the parameter information of the detected switch; a configuration module: the system comprises a plurality of switches to be tested, a plurality of switches to be tested and a plurality of switches to be tested, wherein the switches to be tested are used for configuring all the switches to be tested according to set parameter information; a second obtaining module: the test item information acquisition module is used for acquiring test item information; a sending module: the LLDP protocol message is used for sending the LLDP protocol message containing the parameter information; a receiving module: the method comprises the steps of obtaining an LLDP protocol message sent by a tested switch; a comparison module: the real parameter information of the tested switch acquired by the configuration information is compared one by one; an output module: for outputting the test results.
The invention is further improved, when the test item is the correctness test of sending the LLDP protocol message, the invention also comprises a first conversion module: the data processing device is used for converting the parameter information into 16-system data fields and integrating the 16-system data fields into a legal LLDP protocol message; a third obtaining module: and the neighbor information display module is used for acquiring the neighbor information of the tested switch according to the input neighbor information display command.
The invention is further improved, when the test item is the correctness test of sending the LLDP protocol message, the invention further comprises a fourth obtaining module: the method comprises the steps of obtaining an LLDP protocol message sent by a tested switch; an analysis module: the method is used for extracting all fields of the LLDP protocol message and analyzing the fields; a second conversion module: and the system is used for converting the required fields analyzed by the analysis module into character strings.
Compared with the prior art, the invention has the beneficial effects that: all TLV types related to the LLDP protocol can be easily covered without testing by switches of various manufacturers; the correctness of the display of the neighbor information of the switch and the correctness of the transmission of the LLDP protocol message can be tested without butting other equipment; the two devices do not need to be manually configured, so that the test time is saved, and the test efficiency is greatly improved.
Drawings
FIG. 1 is a flow chart of the method of the present invention;
FIG. 2 is a diagram of a test tool operating interface.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples.
As shown in fig. 1, the LLDP protocol testing method of the switch of the present invention includes the following steps:
s1: acquiring a test instruction;
s2: configuring parameter information of all switches to be tested;
s3: sending an LLDP protocol message containing parameter information according to the test item or acquiring the LLDP protocol message sent by the tested switch;
s4: acquiring real parameter information of the tested switch according to the interaction with the tested switch;
s5: comparing the configuration information of the step S2 with the real parameter information of the step S4 one by one until the comparison is finished;
s6: and outputting a test result.
In step S3, the test items include a switch neighbor information display correctness test and a transmission LLDP protocol message correctness test. The test procedure for the two test items is described in detail below.
The test system for realizing the switch LLDP protocol test method comprises a test client and a plurality of tested switches connected with the test client, wherein a switch LLDP protocol test tool is arranged in the test client. The invention tests the LLDP protocol function through two test programs, but can be configured in the same visual control interface of the test tool.
The two test procedures were:
1. receiving an LLDP checking program: the method is used for testing the correctness of the switch neighbor information display. After a test PC terminal (PC for short) generates LLDP protocol messages carrying different types of TLVs through an automation program and sends the LLDP protocol messages to a tested switch from a network card, the PC checks the neighbor information of the tested switch through a serial port to display the correctness.
2. Sending an LLDP check program: the method is used for testing the correctness of the transmitted LLDP protocol message. And after the test PC terminal calls the serial port through an automatic program and configures the system information and functions of the tested switch, the PC network card captures the LLDP protocol message, analyzes the LLDP protocol message and verifies the correctness of the sent message, thereby ensuring that the neighbor information of the test PC terminal in the opposite terminal equipment is displayed correctly.
As shown in fig. 2, the test flow of the received LLDP check program in this example is as follows:
1. starting a visual testing tool on the PC, clicking a [ LLDP enable ] button as shown in figure 1, automatically calling a CRT (display) to enter a serial port configuration interface of a tested switch by the PC, and automatically inputting a LLDP starting command;
2. inputting TLV type information to be tested on a visual interface, clicking an [ RX test ] button, converting parameters input by the visual interface into 16-system data fields by an automatic program, and integrating the data fields into a legal LLDP protocol message to be sent to a tested exchange from a network card;
3. after the LLDP protocol message is confirmed to be sent out, the automatic program recalls the configuration of the serial port of the switch and automatically inputs and displays the neighbor information command;
4. the program acquires the neighbor information of the tested equipment and compares the neighbor information with the input parameters one by one, and the test is completed after all the comparison is finished;
5. and outputting the receiving test result to a result column.
The flow of the transmission LLDP check program in this example is as follows:
1. starting a visual automatic program on the PC, clicking a [ LLDP enable ] button, automatically calling the CRT to enter a serial port configuration interface of the tested switch by the PC, and automatically inputting a command for starting the LLDP function;
2. firstly, inputting the configuration required by the tested switch into a parameter column of an automatic control interface, and pointing to a [ TX test ] button, wherein the automatic program configures various parameters to the tested switch through a CRT (cathode ray tube) serial port;
3. after the configuration of the tested switch is completed, the PC network card starts to capture packets, acquires the LLDP protocol message sent by the tested device, and extracts all fields of the LLDP protocol message;
4. analyzing the extracted LLDP protocol message fields, wherein the data fields of the message are all 16-system, and automatically converting the required fields into character strings;
5. comparing the converted information fields with the previously input parameters one by one, and completing the test after all the comparison is finished;
6. and outputting the sending test result to a result column.
As can be seen from the above, the invention is operated automatically in the whole process, and all TLV types related to the LLDP protocol can be easily covered without connecting switches of various manufacturers for testing; the correctness of the display of the neighbor information of the switch and the correctness of the transmission of the LLDP protocol message can be tested without butting other equipment; the two devices do not need to be manually configured, so that the test time is saved, and the test efficiency is greatly improved.
The above-described embodiments are intended to be illustrative, and not restrictive, of the invention, and all changes that come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.

Claims (7)

1. A method for testing a LLDP protocol of a switch is characterized by comprising the following steps:
s1: acquiring a test instruction;
s2: configuring parameter information of all switches to be tested;
s3: sending an LLDP protocol message containing parameter information according to the test item or acquiring the LLDP protocol message sent by the tested switch;
s4: acquiring real parameter information of the tested switch according to the interaction with the tested switch;
s5: comparing the configuration information of the step S2 with the real parameter information of the step S4 one by one until the comparison is finished;
s6: and outputting a test result.
2. The method for testing LLDP protocol of switch according to claim 1, characterized in that: in step S3, the test items include a switch neighbor information display correctness test and a correctness test for sending an LLDP protocol message.
3. The switch LLDP protocol testing method according to claim 2, characterized in that: when the test item is a switch neighbor information display correctness test, the parameter information includes TLV category information to be tested, where TLV is a combination of a Type, a length, and a Value, and the implementation process of step S4 is as follows:
s401: converting the parameter information into 16-system data fields, and integrating the 16-system data fields into a legal LLDP protocol message to be sent to the tested switch from the network card;
s402: after the LLDP protocol message is confirmed to be sent out, the serial port configuration of the switch is called, the command for displaying the neighbor information is automatically input, the neighbor information of the tested switch is obtained,
in step S5, the neighbor information of the tested switch is obtained and compared with the parameter information configured in step S2 one by one, and the test is completed after all comparisons are completed.
4. The switch LLDP protocol testing method according to claim 2, characterized in that: when the test item is the correctness test of sending the LLDP protocol packet, the implementation process of step S4 is:
s411: after the configuration of the tested switch is completed, acquiring an LLDP protocol message sent by the tested switch;
s412: extracting all fields of the LLDP protocol message and analyzing;
s413: the required fields are converted into strings.
In step S5, the converted information fields are compared with the parameters configured in step S2 one by one, and the test is completed after all the comparisons are completed.
5. A test system for implementing the LLDP protocol test method of the switch according to any of claims 1-4, characterized in that: including test client and a plurality of switch under test who links to each other with test client, wherein, be equipped with test tool in the test client, test tool includes:
a first obtaining module: the test instruction is obtained;
a parameter setting module: the parameter information is used for setting the parameter information of the detected switch;
a configuration module: the system comprises a plurality of switches to be tested, a plurality of switches to be tested and a plurality of switches to be tested, wherein the switches to be tested are used for configuring all the switches to be tested according to set parameter information;
a second obtaining module: the test item information acquisition module is used for acquiring test item information;
a sending module: the LLDP protocol message is used for sending the LLDP protocol message containing the parameter information;
a receiving module: the method comprises the steps of obtaining an LLDP protocol message sent by a tested switch;
a comparison module: the real parameter information of the tested switch acquired by the configuration information is compared one by one;
an output module: for outputting the test results.
6. The test system of claim 5, wherein: when the test item is a correctness test for sending an LLDP protocol message, the method further includes a first conversion module: the data processing device is used for converting the parameter information into 16-system data fields and integrating the 16-system data fields into a legal LLDP protocol message; a third obtaining module: and the neighbor information display module is used for acquiring the neighbor information of the tested switch according to the input neighbor information display command.
7. The test system of claim 5, wherein: when the test item is a correctness test for sending an LLDP protocol message, the method further includes a fourth obtaining module: the method comprises the steps of obtaining an LLDP protocol message sent by a tested switch; an analysis module: the method is used for extracting all fields of the LLDP protocol message and analyzing the fields; a second conversion module: and the system is used for converting the required fields analyzed by the analysis module into character strings.
CN201910965792.9A 2019-10-12 2019-10-12 Switch LLDP protocol test method and test system Expired - Fee Related CN110708216B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910965792.9A CN110708216B (en) 2019-10-12 2019-10-12 Switch LLDP protocol test method and test system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910965792.9A CN110708216B (en) 2019-10-12 2019-10-12 Switch LLDP protocol test method and test system

Publications (2)

Publication Number Publication Date
CN110708216A true CN110708216A (en) 2020-01-17
CN110708216B CN110708216B (en) 2021-11-12

Family

ID=69199432

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910965792.9A Expired - Fee Related CN110708216B (en) 2019-10-12 2019-10-12 Switch LLDP protocol test method and test system

Country Status (1)

Country Link
CN (1) CN110708216B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113067738A (en) * 2021-04-01 2021-07-02 深圳市吉祥腾达科技有限公司 Network topology visualization function equipment compatibility testing method and system
CN113630292A (en) * 2021-08-09 2021-11-09 深圳市厚石网络科技有限公司 Testing tool for Ethernet port rate and duplex mode of switch
CN118200215A (en) * 2024-05-15 2024-06-14 深圳市丰润达科技有限公司 Networking automation detection method, device, equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101369933A (en) * 2008-09-26 2009-02-18 中兴通讯股份有限公司 Automatic test method and system
CN201226523Y (en) * 2008-05-26 2009-04-22 北京星网锐捷网络技术有限公司 System for testing switch stability
CN101478458A (en) * 2009-01-20 2009-07-08 信息产业部电信传输研究所 SIP protocol security test method
CN101854648A (en) * 2010-04-14 2010-10-06 华为技术有限公司 Testing method, device and testing system for single board of communication apparatus
CN103746879A (en) * 2013-12-28 2014-04-23 国家电网公司 Testing system and method for consistency of IPv6 (Internet Protocol Version 6) protocol
CN104468279A (en) * 2014-12-22 2015-03-25 上海斐讯数据通信技术有限公司 Routing protocol interaction testing method and tool
CN106302027A (en) * 2016-08-29 2017-01-04 北京天地互连信息技术有限公司 A kind of SDN controller performance tester and method of testing
CN107682208A (en) * 2017-11-08 2018-02-09 西南民族大学 A kind of SDN piggy back service quality acquisition method based on LLDP agreements
CN109274555A (en) * 2018-10-11 2019-01-25 深圳市菲菱科思通信技术股份有限公司 Interchanger automatic test device and test method
US20190230026A1 (en) * 2018-01-19 2019-07-25 Super Micro Computer, Inc. Automatic multi-chassis link aggregation configuration with link layer discovery

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN201226523Y (en) * 2008-05-26 2009-04-22 北京星网锐捷网络技术有限公司 System for testing switch stability
CN101369933A (en) * 2008-09-26 2009-02-18 中兴通讯股份有限公司 Automatic test method and system
CN101478458A (en) * 2009-01-20 2009-07-08 信息产业部电信传输研究所 SIP protocol security test method
CN101854648A (en) * 2010-04-14 2010-10-06 华为技术有限公司 Testing method, device and testing system for single board of communication apparatus
CN103746879A (en) * 2013-12-28 2014-04-23 国家电网公司 Testing system and method for consistency of IPv6 (Internet Protocol Version 6) protocol
CN104468279A (en) * 2014-12-22 2015-03-25 上海斐讯数据通信技术有限公司 Routing protocol interaction testing method and tool
CN106302027A (en) * 2016-08-29 2017-01-04 北京天地互连信息技术有限公司 A kind of SDN controller performance tester and method of testing
CN107682208A (en) * 2017-11-08 2018-02-09 西南民族大学 A kind of SDN piggy back service quality acquisition method based on LLDP agreements
US20190230026A1 (en) * 2018-01-19 2019-07-25 Super Micro Computer, Inc. Automatic multi-chassis link aggregation configuration with link layer discovery
CN109274555A (en) * 2018-10-11 2019-01-25 深圳市菲菱科思通信技术股份有限公司 Interchanger automatic test device and test method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李莹莹: "基于LLDP协议功能的测试工具研究与实现", 《万方数据》 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113067738A (en) * 2021-04-01 2021-07-02 深圳市吉祥腾达科技有限公司 Network topology visualization function equipment compatibility testing method and system
CN113630292A (en) * 2021-08-09 2021-11-09 深圳市厚石网络科技有限公司 Testing tool for Ethernet port rate and duplex mode of switch
CN118200215A (en) * 2024-05-15 2024-06-14 深圳市丰润达科技有限公司 Networking automation detection method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN110708216B (en) 2021-11-12

Similar Documents

Publication Publication Date Title
CN110708216B (en) Switch LLDP protocol test method and test system
CN101478449B (en) Protocol automatic test method and system thereof
CN104717337B (en) A kind of method of batch testing mobile phone application and its equipment used
CN106776294B (en) Automatic android mobile phone testing method and system
CN110324612A (en) Test method, testing and control terminal and the television set of television set
CN102176140B (en) Remote control controlled area network (CAN) bus testing device and method
CN110069413A (en) Test data communication, test method, device, equipment and storage medium
CN113067738A (en) Network topology visualization function equipment compatibility testing method and system
US8816695B2 (en) Method and system for interoperability testing
CN112559289B (en) Monitoring system
CN113055101B (en) 3-frequency MESH product performance test system and test method
CN106598793B (en) Test system and test method based on BIOS serial port log data
CN113037526B (en) Security detection method, terminal, system and storage medium
CN113923146B (en) Visual block chain consensus algorithm performance test method
CN105866574A (en) Auxiliary identifying method and auxiliary identifying system for automated testing
CN113468054B (en) Automatic test system and method for satellite interface and function test
CN105827462A (en) Method and tool for detecting network device
CN115208807A (en) POE switch test system and method
CN115967660A (en) Method and device for testing CAN protocol conversion, terminal equipment and storage medium
CN112838938B (en) Test system of Internet of things platform
CN110460398B (en) Reliability test system for synchronous wireless channel of wireless expander
CN113472458A (en) Method, device, equipment, storage medium and system for testing performance of wireless equipment
CN111371654A (en) Automatic testing system and method for intelligent fusion product network port
CN1845478B (en) Simulator apparatus and method for testing remote communication monitoring system
CN105093154B (en) Data transmission method and device for the test of on-Line Monitor Device quality simulation

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20211112