Testing method, device and testing equipment
By acquiring messages from the device under test and the target device, identifying DCN information and assigning IP addresses, the testing problem of the DCN online interoperability mechanism of network elements is solved, and DCN automatic detection and interoperability are realized, meeting the standardized testing needs in future decoupled and open scenarios.
Patent Information
- Application Number
- CN202111653894.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2041-12-30
AI Technical Summary
In the existing technology, there is no solution for how to test the interoperability mechanism of network elements (DCNs) online. In particular, when the DCN mechanisms of various manufacturers need to interoperate in future decoupled and open scenarios, there is a lack of standardized testing methods.
By acquiring the messages of the device under test and the target device, identifying the DCN information, and assigning an IP address to the device under test based on consistency, the DCN test result is determined in combination with the IP address obtained by packet capture, thus achieving DCN automatic detection.
It realizes automatic DCN detection of flexible Ethernet, ensures the interoperability mechanism of DCN online network elements, and ensures that the DCN mechanism interoperability process of each manufacturer meets the standard requirements.
Smart Images

Figure CN116418719B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of communication technology, and in particular to a testing method, device and testing equipment. Background Art
[0002] The Data Communication Network (DCN) is a channel for transmitting management and control information between the network management and control system and the equipment. When a network element is initially connected to the network, it needs to establish a connection with the management and control system through the DCN and be included in the management of the management and control system. DCN is the basis for the decoupling and openness of the Slicing Packet Network (SPN). Generally, the DCN online process is a manufacturer's private mechanism. In the future decoupling and open scenario, the DCN mechanisms of various manufacturers need to be interoperable. To achieve interoperability of the DCN mechanisms of various manufacturers, each process of the network element online must meet the standard requirements. However, there is currently no solution for how to test the interoperability mechanism of the network element DCN online. Summary of the Invention
[0003] The purpose of the present invention is to provide a testing method, apparatus and testing equipment to solve the problem that there is currently no solution for how to test the intercommunication mechanism of network elements DCN online.
[0004] To achieve the above object, an embodiment of the present invention provides a testing method, comprising:
[0005] Obtaining a first message obtained from the device under test and a second message obtained from a target device; wherein the target device is an online network element device that is a neighbor of the device under test;
[0006] Allocating an IP address to the device under test according to the first message and the second message;
[0007] Get the IP address obtained by capturing the packet;
[0008] The data communication network DCN test result is determined according to the allocated IP address and the IP address obtained by the packet capture.
[0009] Optionally, obtaining a first message from the device under test includes:
[0010] Sending a first test instruction to the test instrument;
[0011] Obtain a first message obtained by the test instrument from the device under test according to the first test instruction; wherein, the first message is obtained by the test instrument initiating a test packet capture from the port corresponding to the device under test, and / or initiating a test packet capture from the link between the device under test and the target device.
[0012] Optionally, obtaining a second message from the target device includes:
[0013] Sending a second test instruction to the target device;
[0014] Obtain a second message fed back by the target device according to the second test instruction.
[0015] Optionally, allocating a first IP address to the device under test according to the first message and the second message includes:
[0016] Obtaining first DCN information from the first message;
[0017] Obtaining second DCN information from the second message;
[0018] If the first DCN information and the second DCN information are consistent, an IP address is allocated to the device under test.
[0019] Optionally, obtaining the first DCN information from the first message includes:
[0020] Identifying a DCN code block of the overhead frame according to a fixed bit block in the overhead frame corresponding to the first message;
[0021] According to the DCN code block, forming a Medium Access Control (MAC) frame through Ethernet decoding;
[0022] The first DCN information is identified and obtained according to the device identification information and / or DCN identification information in the MAC frame.
[0023] Optionally, if the first DCN information and the second DCN information are consistent, allocating an IP address to the device under test includes:
[0024] If both the first DCN information and the second DCN information include target information, determining that the first DCN information and the second DCN information are consistent, and allocating an IP address to the device under test;
[0025] The target information is one or more of a DCN identifier, a rack number, a system name, a system description, an IPv6 management address, and an IPv4 management address.
[0026] Optionally, after allocating an IP address to the device under test, the method further includes:
[0027] The IP address allocated to the device under test is sent to the target device.
[0028] Optionally, the method further includes:
[0029] A test report is generated according to the DCN test result; wherein the test report includes: one or more of the first DCN information, the second DCN information, the allocated IP address, and the IP address obtained by packet capture.
[0030] Optionally, obtaining the IP address obtained by packet capture includes:
[0031] sending a third test instruction to the test instrument;
[0032] Obtain an IP address obtained by the test instrument through packet capture according to the third test instruction.
[0033] Optionally, determining a data communication network (DCN) test result based on the assigned IP address and the IP address obtained by packet capture includes:
[0034] If the assigned IP address is consistent with the IP address obtained by packet capture, the DCN test result is determined to be passed;
[0035] If the allocated IP address is inconsistent with the IP address obtained by packet capture, the DCN test result is determined to be test failure.
[0036] To achieve the above objectives, an embodiment of the present invention provides a testing device, comprising:
[0037] A first acquisition module is configured to acquire a first message obtained from the device under test and a second message obtained from a target device; wherein the target device is an online network element device that is a neighbor of the device under test;
[0038] an allocation module, configured to allocate an IP address to the device under test according to the first overhead frame and the second message;
[0039] The second acquisition module is used to obtain the IP address obtained by capturing the packet;
[0040] The processing module is used to determine the data communication network DCN test result according to the allocated IP address and the IP address obtained by the packet capture.
[0041] Optionally, the first acquisition module includes:
[0042] A first sending unit, configured to send a first test instruction to the test instrument;
[0043] A first acquisition unit is used to acquire a first message obtained by the test instrument from the device under test according to the first test instruction; wherein, the first message is obtained by the test instrument initiating a test packet capture from the port corresponding to the device under test, and / or initiating a test packet capture from the link between the device under test and the target device.
[0044] Optionally, the first acquisition module includes:
[0045] A second sending unit, configured to send a second test instruction to the target device;
[0046] A second acquiring unit is configured to acquire a second message fed back by the target device according to the second test instruction.
[0047] Optionally, the allocation module includes:
[0048] a first processing unit, configured to obtain first DCN information from the first message;
[0049] a second processing unit, configured to obtain second DCN information from the second message;
[0050] The third processing unit is configured to allocate an IP address to the device under test if the first DCN information and the second DCN information are consistent.
[0051] Optionally, the first processing unit is further configured to:
[0052] Identifying a DCN code block of the overhead frame according to a fixed bit block in the overhead frame corresponding to the first message;
[0053] According to the DCN code block, forming a media access control MAC frame through Ethernet decoding;
[0054] The first DCN information is identified and obtained according to the device identification information and / or DCN identification information in the MAC frame.
[0055] Optionally, the third processing unit is further configured to:
[0056] If both the first DCN information and the second DCN information include target information, determining that the first DCN information and the second DCN information are consistent, and allocating an IP address to the device under test;
[0057] The target information is one or more of a DCN identifier, a rack number, a system name, a system description, an IPv6 management address, and an IPv4 management address.
[0058] Optionally, the device further comprises:
[0059] A sending module is used for sending the IP address allocated to the device under test to the target device after allocating the IP address to the device under test.
[0060] Optionally, the device further comprises:
[0061] A generating module is used to generate a test report according to the DCN test result; wherein the test report includes: one or more of the first DCN information, the second DCN information, the allocated IP address, and the IP address obtained by packet capture.
[0062] Optionally, the second acquisition module includes:
[0063] A second sending unit, configured to send a third test instruction to the test instrument;
[0064] The second acquiring unit is configured to acquire an IP address obtained by the test instrument through packet capture according to the third test instruction.
[0065] Optionally, the processing module includes:
[0066] a fourth processing unit, configured to determine that the DCN test result is a pass if the allocated IP address is consistent with the IP address obtained by packet capture;
[0067] The fifth processing unit is configured to determine that the DCN test result is a test failure if the allocated IP address is inconsistent with the IP address obtained by packet capture.
[0068] To achieve the above-mentioned purpose, an embodiment of the present invention provides a testing device, comprising: a transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; when the processor executes the program or instruction, the steps in the testing method described above are implemented.
[0069] To achieve the above objectives, an embodiment of the present invention provides a readable storage medium having a program or instruction stored thereon, which implements the steps of the above-mentioned testing method when executed by a processor.
[0070] The beneficial effects of the above technical solution of the present invention are as follows:
[0071] The embodiment of the present invention obtains a first message obtained from a device under test and a second message obtained from a target device; and allocates an IP address to the device under test based on the first message and the second message; obtains an IP address obtained by packet capture; and determines a data communication network DCN test result based on the allocated IP address and the IP address obtained by the packet capture, thereby realizing automatic DCN detection of a flexible Ethernet network to ensure an interoperability mechanism for network element DCN online implementation. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 is a block diagram of a test system according to an embodiment of the present invention;
[0073] Figure 2 is a flow chart of a testing method according to an embodiment of the present invention;
[0074] Figure 3 A schematic diagram of a test architecture according to an embodiment of the present invention;
[0075] Figure 4 is a block diagram of a test device according to an embodiment of the present invention;
[0076] Figure 5 FIG. 4 is a block diagram of a testing device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0077] In order to make the technical problems, technical solutions and advantages to be solved by the present invention clearer, a detailed description will be given below with reference to the accompanying drawings and specific embodiments.
[0078] It should be understood that references throughout this specification to "one embodiment" or "an embodiment" mean that a particular feature, structure, or characteristic associated with the embodiment is included in at least one embodiment of the present invention. Therefore, the appearances of "in one embodiment" or "in an embodiment" throughout this specification do not necessarily refer to the same embodiment. Furthermore, these particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0079] In various embodiments of the present invention, it should be understood that the size of the serial numbers of the following processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0080] Additionally, the terms "system" and "network" are often used interchangeably herein.
[0081] In the embodiments provided herein, it should be understood that "B corresponding to A" means that B is associated with A and B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B based solely on A; B can also be determined based on A and / or other information.
[0082] The DCN channel mode for Metro Transport Network (MTN) / SPN / FlexEthernet (FlexE) interfaces uses MTN overhead, SPN overhead, FlexE overhead, or client-side service transmission. During the initial launch of a network element (NE), when no client is configured for control, control messages are transmitted with other NEs (such as neighboring NEs) using overhead frames. After launch, control messages are transmitted along the configured client service channel.
[0083] In the future-oriented decoupled and open scenario, the DCN mechanisms of various manufacturers need to be interoperable. To achieve interoperability, each process of network element online must meet standard requirements. However, there is currently no solution for how to test the interoperability mechanism of network element DCN online.
[0084] To this end, an embodiment of the present invention provides a test system that can implement DCN automated testing of MTN / SPN / FlexE. The test system includes a first device, a second device, and a third device.
[0085] The first device may be referred to as a test device, which is configured to send test instructions, receive test data, process the test data, and generate test results to implement DCN automatic testing of MTN / SPN / FlexE.
[0086] The second device may be referred to as a device under test, which may be several or more devices with FlexE interfaces or MTN devices or SPN devices.
[0087] The third device may be called a test instrument, which is used to capture packets.
[0088] The first device, ie the testing equipment, includes: a first module, a second module, and a third module.
[0089] like Figure 1 As shown, the first module, that is, the DCN test function logic module, is used to send test instructions to the second module and the third module, and process the test data received from the second module and the third module, and generate test results.
[0090] The second module, namely the DCN southbound interface control processing module, is used to send test instructions to the device, process the test data fed back from the device, and report the processed or unprocessed test data or test results to the first module.
[0091] The third module, namely the DCN instrument control processing module, is used to send test instructions to the test instrument, process the test data fed back from the instrument, and report the processed or unprocessed test data or test results to the first module.
[0092] like Figure 2 As shown, an embodiment of the present invention provides a test method for testing equipment. The method can be applied to MTN, SPN, or FlexE. The method may specifically include the following steps:
[0093] Step 11: Obtain a first message obtained from the device under test and a second message obtained from the target device.
[0094] The target device is an online network element device that is a neighbor of the device under test.
[0095] Optionally, this solution can be applied to MTN, SPN, or FlexE. Accordingly, the devices under test can be several or more devices with FlexE interfaces, or MTN devices, or SPN devices, etc. Of course, the embodiments of the present invention are not limited thereto.
[0096] Step 12: Allocate an IP address to the device under test according to the first message and the second message.
[0097] Optionally, this solution can be applied to MTN, SPN or FlexE. Accordingly, the first message can be a first MTN message, a first SPN message or a first FlexE message, and accordingly, the second message can be a second MTN message, a second SPN message or a second FlexE message.
[0098] Step 13: Get the IP address obtained from the captured packet.
[0099] Optionally, the above step 13 may specifically include: sending a third test instruction to the test instrument; and obtaining an IP address obtained by the test instrument through packet capture according to the third test instruction.
[0100] For example, after allocating an IP address to the device under test, a third test instruction is sent to the test instrument. The test instrument can capture test data from the device under test according to the third test instruction and report it to the test device. The test device parses the data to obtain the IP address carried therein, that is, obtains the IP address obtained by the captured packet.
[0101] Step 14: Determine the data communication network DCN test result according to the allocated IP address and the IP address obtained by packet capture.
[0102] Optionally, the test result is test passed or test failed.
[0103] Specifically, if the assigned IP address is consistent with the IP address obtained by packet capture, the DCN test result is determined to be passed; if the assigned IP address is inconsistent with the IP address obtained by packet capture, the DCN test result is determined to be failed. Optionally, if no IP address is obtained by packet capture in step 13 above, the DCN test result is also determined to be failed.
[0104] In the above scheme, by obtaining a first message obtained from the device under test and a second message obtained from the target device; and assigning an IP address to the device under test based on the first message and the second message; obtaining the IP address obtained by packet capture; and determining the data communication network DCN test result based on the assigned IP address and the IP address obtained by the packet capture, the DCN automatic detection of the flexible Ethernet is realized to ensure that the interoperability mechanism of the network element DCN can be realized.
[0105] like Figure 3 This is a schematic diagram of the test architecture of an embodiment of the present invention. The DCN test function logic module can obtain a first message obtained by the test instrument from the port of the device under test and / or the packet capture of the link between the device under test and the target device, as well as a second message from the target device, and perform DCN testing of MTN / SPN / FlexE based on the first message and the second message.
[0106] Optionally, obtaining the first message from the device under test includes:
[0107] Send a first test instruction to the test instrument; obtain a first message obtained by the test instrument from the device under test according to the first test instruction; wherein, the first message is obtained by the test instrument initiating a test packet capture from the port corresponding to the device under test and / or from the link between the device under test and the target device.
[0108] For example: the test device sends a DCN test message (i.e., a first test instruction) to the test instrument, and the test instrument initiates a test packet capture from the corresponding port of the device under test, and / or the link between the device under test and the target device (i.e., the neighboring online network element of the device under test) to obtain a first message and send it to the test device.
[0109] Optionally, obtaining a second message from the target device includes:
[0110] Send a second test instruction to the target device; and obtain a second message fed back by the target device according to the second test instruction.
[0111] For example: the test device sends a second test instruction to the target device. Since the target device is an online network element, the test device can directly capture the packet from the target device to obtain the test data (i.e., the second message), that is, the target device can send the corresponding test data (i.e., the second message) to the test device.
[0112] Optionally, allocating a first IP address to the device under test according to the first message and the second message includes:
[0113] Obtaining first DCN information from the first message; obtaining second DCN information from the second message; and allocating an IP address to the device under test if the first DCN information and the second DCN information are consistent.
[0114] The obtaining of the first DCN information from the first message includes:
[0115] According to the fixed bit block in the overhead frame corresponding to the first message, the DCN code block of the overhead frame is identified; according to the DCN code block, a media access control MAC frame is formed through Ethernet decoding; according to the device identification information and / or DCN identification information in the MAC frame, the first DCN information is identified and obtained.
[0116] Specifically, the test device identifies the overhead frame based on the overhead frame identifier, identifies the DCN code block of the overhead frame based on the fixed bit block in the overhead frame, and forms a MAC frame based on the DCN code block in one or more overhead frames through Ethernet decoding. The test device also identifies the DCN message (i.e., the first DCN information) based on one or more of the device identification information and the DCN identifier in the Ethernet 66 / 64B decoded MAC frame, thereby recovering the first DCN information from the first message. Optionally, the device identification information may include, but is not limited to, at least one of the following: chassis ID, system name, system description, IPv6 management address, and IPv4 management address.
[0117] Optionally, the second DCN information obtained from the second message may include: one or more of: DCN identification, rack number, system name, system description, IPv6 management address, and IPv4 management address, which can be understood as new network element information reported by the target device or new network element information stored in the target device queried by the test device.
[0118] Optionally, if the first DCN information and the second DCN information are consistent, allocating an IP address to the device under test includes:
[0119] If both the first DCN information and the second DCN information include target information, determining that the first DCN information and the second DCN information are consistent, and allocating an IP address to the device under test;
[0120] The target information is one or more of a DCN identifier, a rack number, a system name, a system description, an IPv6 management address, and an IPv4 management address.
[0121] Specifically, based on the recovered DCN message, the test device compares the new network element information reported by the target device received by the test device or the new network element information stored in the target device queried by the test device (such as DCN identification, rack number, system name, system description, IPv6 management address, IPv4 management address or one or more information). When one or more of the above information is consistent, the test device assigns a management IP address to the device under test.
[0122] Optionally, after allocating an IP address to the device under test, the method further includes: sending the IP address allocated to the device under test to the target device.
[0123] Optionally, the test device is capable of generating a test report for the corresponding test results. Specifically, the method further includes:
[0124] A test report is generated based on the DCN test results, wherein the test report includes one or more of the first DCN information, the second DCN information, the assigned IP address, and the IP address obtained by packet capture. In other words, the test includes: DCN messages identified from overhead frames, new network element information reported by the target device, the assigned IP address, and the IP address obtained by packet capture, etc., but the embodiments of the present invention are not limited to this.
[0125] like Figure 4 As shown, a testing device 400 according to an embodiment of the present invention includes:
[0126] A first acquisition module 410 is configured to acquire a first message obtained from the device under test and a second message obtained from a target device; wherein the target device is an online neighboring network element device of the device under test;
[0127] an allocation module 420, configured to allocate an IP address to the device under test according to the first message and the second message;
[0128] The second acquisition module 430 is used to obtain the IP address obtained by packet capture;
[0129] The processing module 440 is configured to determine a data communication network DCN test result according to the allocated IP address and the IP address obtained by packet capture.
[0130] Optionally, the first obtaining module 410 includes:
[0131] A first sending unit, configured to send a first test instruction to the test instrument;
[0132] A first acquisition unit is used to acquire a first message obtained by the test instrument from the device under test according to the first test instruction; wherein, the first message is obtained by the test instrument initiating a test packet capture from the port corresponding to the device under test, and / or initiating a test packet capture from the link between the device under test and the target device.
[0133] Optionally, the first obtaining module 410 includes:
[0134] A second sending unit, configured to send a second test instruction to the target device;
[0135] A second acquiring unit is configured to acquire a second message fed back by the target device according to the second test instruction.
[0136] Optionally, the allocation module 420 includes:
[0137] a first processing unit, configured to obtain first DCN information from the first message;
[0138] a second processing unit, configured to obtain second DCN information from the second message;
[0139] The third processing unit is configured to allocate an IP address to the device under test if the first DCN information and the second DCN information are consistent.
[0140] Optionally, the first processing unit is further configured to:
[0141] Identifying a DCN code block of the overhead frame according to a fixed bit block in the overhead frame corresponding to the first message;
[0142] According to the DCN code block, forming a media access control MAC frame through Ethernet decoding;
[0143] The first DCN information is identified and obtained according to the device identification information and / or DCN identification information in the MAC frame.
[0144] Optionally, the third processing unit is further configured to:
[0145] If both the first DCN information and the second DCN information include target information, determining that the first DCN information and the second DCN information are consistent, and allocating an IP address to the device under test;
[0146] The target information is one or more of a DCN identifier, a rack number, a system name, a system description, an IPv6 management address, and an IPv4 management address.
[0147] Optionally, the apparatus 400 further includes:
[0148] A sending module is used for sending the IP address allocated to the device under test to the target device after allocating the IP address to the device under test.
[0149] Optionally, the apparatus 400 further includes:
[0150] A generating module is used to generate a test report according to the DCN test result; wherein the test report includes: one or more of the first DCN information, the second DCN information, the allocated IP address, and the IP address obtained by packet capture.
[0151] Optionally, the second obtaining module 430 includes:
[0152] A second sending unit, configured to send a third test instruction to the test instrument;
[0153] The second acquiring unit is configured to acquire an IP address obtained by the test instrument through packet capture according to the third test instruction.
[0154] Optionally, the processing module 440 includes:
[0155] a fourth processing unit, configured to determine that the DCN test result is a pass if the allocated IP address is consistent with the IP address obtained by packet capture;
[0156] The fifth processing unit is configured to determine that the DCN test result is a test failure if the allocated IP address is inconsistent with the IP address obtained by packet capture.
[0157] The device of this embodiment can implement each step of the above method and achieve the same technical effect. To avoid repetition, it will not be described here.
[0158] The embodiment of the present invention also provides a testing device, such as Figure 5As shown, it includes a transceiver 510, a processor 500, a memory 520, and a program or instruction stored in the memory 520 and executable on the processor 500; when the processor 500 executes the program or instruction, the steps in the above-mentioned test method are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.
[0159] The transceiver 510 is configured to receive and send data under the control of the processor 500 .
[0160] Among them, Figure 5 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically linking together various circuits of one or more processors represented by processor 500 and memory represented by memory 520. The bus architecture may also link together various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are all well known in the art and, therefore, will not be described further herein. The bus interface provides an interface. The transceiver 510 may be a plurality of components, i.e., a transmitter and a receiver, providing a unit for communicating with various other devices on a transmission medium. The processor 500 is responsible for managing the bus architecture and general processing, and the memory 520 may store data used by the processor 500 when performing operations.
[0161] A readable storage medium according to an embodiment of the present invention stores a program or instruction thereon. When the program or instruction is executed by a processor, the steps in the test method described above are implemented and the same technical effect can be achieved. To avoid repetition, they will not be described here.
[0162] The processor is the processor in the test device described in the above embodiment. The readable storage medium includes a computer-readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0163] It should be further noted that the terminals described in this specification include but are not limited to smartphones, tablet computers, etc., and many functional components described are referred to as modules in order to more particularly emphasize the independence of their implementation methods.
[0164] In embodiments of the present invention, modules can be implemented in software so that they can be executed by various types of processors. For example, an identified executable code module can include one or more physical or logical blocks of computer instructions, for example, which can be constructed as objects, procedures, or functions. Nevertheless, the executable code of the identified module does not need to be physically located together, but can include different instructions stored in different locations, which, when logically combined together, constitute the module and achieve the specified purpose of the module.
[0165] In fact, executable code module can be a single instruction or many instructions, and can even be distributed on a plurality of different code segments, distributed in the middle of different programs, and distributed across a plurality of memory devices.Similarly, operating data can be identified in the module, and can be implemented and organized in the data structure of any appropriate type according to any appropriate form.Described operating data can be collected as a single data set, or can be distributed in different locations (including on different storage devices), and can only be present on a system or network as an electronic signal at least in part.
[0166] When a module can be implemented using software, given the current state of hardware technology, those skilled in the art can build corresponding hardware circuits to implement the corresponding functions of the module, regardless of cost. The hardware circuits may include conventional very large scale integration (VLSI) circuits or gate arrays, as well as existing semiconductors such as logic chips and transistors, or other discrete components. Modules may also be implemented using programmable hardware devices, such as field programmable gate arrays, programmable array logic, or programmable logic devices.
[0167] The above exemplary embodiments are described with reference to the accompanying drawings. Many different forms and embodiments are possible without departing from the spirit and teachings of the present invention. Therefore, the present invention should not be construed as limited to the exemplary embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be complete and perfect and will convey the scope of the invention to those skilled in the art. In the drawings, component sizes and relative sizes may be exaggerated for clarity. The terminology used herein is for purposes of describing specific exemplary embodiments only and is not intended to be limiting. As used herein, the singular forms "a," "an," and "the" are intended to include plural forms, unless the context clearly indicates otherwise. It will be further understood that the terms "comprising" and / or "including," when used in this specification, indicate the presence of stated features, integers, steps, operations, components, and / or elements, but do not preclude the presence or addition of one or more other features, integers, steps, operations, components, elements, and / or groups thereof. Unless otherwise indicated, when stated, a range of values includes the upper and lower limits of that range and any subranges therebetween.
[0168] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A method for testing the intercommunication mechanism of a DCN online network element, characterized in that: include: Obtaining a first message obtained from the device under test and a second message obtained from a target device; wherein the target device is an online network element device that is a neighbor of the device under test; Allocating an IP address to the device under test according to the first message and the second message; Get the IP address obtained by capturing the packet; Determine a data communication network DCN test result based on the assigned IP address and the IP address obtained by the packet capture; Determining a data communication network DCN test result based on the assigned IP address and the IP address obtained by packet capture includes: If the assigned IP address is consistent with the IP address obtained by packet capture, the DCN test result is determined to be passed; If the assigned IP address is inconsistent with the IP address obtained by packet capture, the DCN test result is determined to be a test failure; Allocating a first IP address to the device under test according to the first message and the second message includes: Obtaining first DCN information from the first message; Obtaining second DCN information from the second message; If the first DCN information and the second DCN information are consistent, allocating an IP address to the device under test; If the first DCN information and the second DCN information are consistent, allocating an IP address to the device under test includes: If both the first DCN information and the second DCN information include target information, determining that the first DCN information and the second DCN information are consistent, and allocating an IP address to the device under test; The target information is one or more of a DCN identifier, a rack number, a system name, a system description, an IPv6 management address, and an IPv4 management address.
2. The method according to claim 1, characterized in that Obtaining the first message from the device under test, including: Sending a first test instruction to the test instrument; Obtain a first message obtained by the test instrument from the device under test according to the first test instruction; wherein, the first message is obtained by the test instrument initiating a test packet capture from the port corresponding to the device under test, and / or initiating a test packet capture from the link between the device under test and the target device.
3. The method according to claim 1, characterized in that Obtain the second message from the target device, including: Sending a second test instruction to the target device; Obtain a second message fed back by the target device according to the second test instruction.
4. The method according to claim 1, wherein The obtaining the first DCN information from the first message includes: Identifying a DCN code block of the overhead frame according to a fixed bit block in the overhead frame corresponding to the first message; According to the DCN code block, forming a media access control MAC frame through Ethernet decoding; The first DCN information is identified and obtained according to the device identification information and / or DCN identification information in the MAC frame.
5. The method according to claim 1, wherein After allocating an IP address to the device under test, the method further includes: The IP address allocated to the device under test is sent to the target device.
6. The method according to claim 1, characterized in that Also includes: A test report is generated according to the DCN test result; wherein the test report includes: one or more of the first DCN information, the second DCN information, the allocated IP address, and the IP address obtained by packet capture.
7. The method according to claim 1, characterized in that The method of obtaining the IP address obtained by packet capture includes: sending a third test instruction to the test instrument; Obtain an IP address obtained by the test instrument through packet capture according to the third test instruction.
8. A DCN online intercommunication mechanism testing device, characterized in that: include: A first acquisition module is configured to acquire a first message obtained from the device under test and a second message obtained from a target device; wherein the target device is an online network element device that is a neighbor of the device under test; an allocation module, configured to allocate an IP address to the device under test according to the first message and the second message; The second acquisition module is used to obtain the IP address obtained by capturing the packet; A processing module, configured to determine a data communication network DCN test result based on the assigned IP address and the IP address obtained by packet capture; The processing module includes: a fourth processing unit, configured to determine that the DCN test result is a pass if the allocated IP address is consistent with the IP address obtained by packet capture; a fifth processing unit, configured to determine that the DCN test result is a test failure if the allocated IP address is inconsistent with the IP address obtained by packet capture; The allocation module includes: a first processing unit, configured to obtain first DCN information from the first message; a second processing unit, configured to obtain second DCN information from the second message; a third processing unit, configured to allocate an IP address to the device under test if the first DCN information and the second DCN information are consistent; The third processing unit is further configured to: If both the first DCN information and the second DCN information include target information, determining that the first DCN information and the second DCN information are consistent, and allocating an IP address to the device under test; The target information is one or more of a DCN identifier, a rack number, a system name, a system description, an IPv6 management address, and an IPv4 management address.
9. A testing device comprising: A transceiver, a processor, a memory, and a program or instruction stored in the memory and executable on the processor; wherein the processor implements the steps of the test method according to any one of claims 1 to 7 when executing the program or instruction.
10. A readable storage medium having a program or instruction stored thereon, characterized in that: When the program or instruction is executed by a processor, the steps in the testing method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method and system for opening data communication network
CN101984581A
Automatic test method, equipment and system and storage medium
CN107896173A