[go: up one dir, main page]

CN102404168A - NUD comprehensive test method and device - Google Patents

NUD comprehensive test method and device Download PDF

Info

Publication number
CN102404168A
CN102404168A CN2011103620178A CN201110362017A CN102404168A CN 102404168 A CN102404168 A CN 102404168A CN 2011103620178 A CN2011103620178 A CN 2011103620178A CN 201110362017 A CN201110362017 A CN 201110362017A CN 102404168 A CN102404168 A CN 102404168A
Authority
CN
China
Prior art keywords
message
under test
equipment under
timer
nud
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
CN2011103620178A
Other languages
Chinese (zh)
Other versions
CN102404168B (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.)
Beijing Topsec Technology Co Ltd
Original Assignee
Beijing Topsec 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 Beijing Topsec Technology Co Ltd filed Critical Beijing Topsec Technology Co Ltd
Priority to CN201110362017.8A priority Critical patent/CN102404168B/en
Publication of CN102404168A publication Critical patent/CN102404168A/en
Application granted granted Critical
Publication of CN102404168B publication Critical patent/CN102404168B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a NUD comprehensive test method and a device, wherein the method comprises the following steps: automatically testing any one of the first state transition to the tenth state transition of the NUD according to selection, or automatically testing the ten state transitions in sequence, wherein the state transitions comprise: from EMPTY to INCOMPLETE; from EMPTY to STALE; from EMPTY to uncompellet to read; from READABLE to STALE; from READABLE to STALE; from STALE to DELAY; from DELAY to PROBE; from DELAY to read; from PROBE to REACHABLE; from PROBE to EMPTY. The invention can realize the automatic test of NUD.

Description

The integrated test facility of a kind of NUD and device
Technical field
The present invention relates to the communication protocol technical field, integrated test facility and the device of particularly a kind of NUD (NeighborUnreachability Detection, the unreachable detection of neighbours).
Background technology
The employed network layer protocol of current internet is IPv4 (Internet Protocol version 4; Internet protocol version 4) agreement; Along with the fast development of Internet technology and the network demand that increases progressively day by day; The IPv4 agreement can't satisfy the current network demand: the IP address is exhausted, routing list capacity pressure increases severely, NA (Neighbor Advertisement, neighbors bulletin) T pattern is destroyed application end to end etc.
In order to address the above problem, IPv6 (Internet Protocol version 6, internet protocol version 6) agreement is given birth at once.The IPv6 agreement has not only solved the drawback that the IPv4 agreement exists, and has also expanded the new features of oneself simultaneously:
1), the datagram header of new format, make router improve the speed and the route speed of deal with data message;
2), stateless address disposes automatically, the significantly simple and easy configuration step of network environment has reduced the network operation cost;
3), brand-new Neighbor Discovery Protocol; This agreement has comprised the interaction mechanism of neighbor node in a series of networks; Perfect ARP in the IPv4 agreement (Address Resolution Protocol, address resolution protocol), ICMP router are found, the ICMP router is redirected etc.
Wherein, the address resolution mechanism in the Neighbor Discovery Protocol of IPv6 than the ARP agreement of IPv4, has increased a kind of new testing mechanism NUD.After accomplishing address resolution, continue to confirm the accessibility of neighbor node, thereby guarantee can reaching in real time of in communication process neighbor node through this testing mechanism; According to defined state machine among the RFC2461 (Neighbor Discovery for IP Version 6, IPv6 Neighbor Discovery Protocol), when satisfying certain condition between neighbours' state of reachability machine, can realize mutual migration in addition.
But,, and have the more intermediateness situation of migration mutually because defined state is comparatively complicated in the NUD mechanism; Therefore; Singly can't cover the demand of full test, need invent a kind of automatic test approach thus, thereby realize the full test of NUD from the angle of manual test.
Summary of the invention
The objective of the invention is to, the integrated test facility of a kind of NUD is provided, can realize the automatic test of NUD.
Another object of the present invention is to, the comprehensive test device of a kind of NUD is provided, can realize the automatic test of NUD.
The integrated test facility of NUD of the present invention; According to selecting any status change in NUD first to the tenth status change is tested automatically; Perhaps said ten status changes are tested successively automatically, wherein, first status change is: from EMPTY to INCOMPLETE; Second status change is: from EMPTY to STALE; Third state transition are: from EMPTY to INCOMPLETE to REACHABLE; The four condition transition are: from REACHABLE to STALE; The 5th status change is: from REACHABLE to STALE; The 6th status change is: from STALE to DELAY; The 7th status change is: from DELAY to PROBE; The 8th status change is: from DELAY to REACHABLE; The 9th status change is: from PROBE to REACHABLE; The tenth status change is: from PROBE to EMPTY.
Wherein, for said first status change, comprise the following steps:
1a, check that equipment under test 1 current neighbor table state is EMPTY;
1b, equipment under test 1 send NS address resolution message to link-local, and wherein, said NS address resolution message comprises: IPv6 destination address and purpose link layer address;
1c, when sending said message, check equipment under test 1 neighbor table corresponding address item information, comprising: the IPv6 destination address of this equipment under test and purpose link layer address;
1d, check that corresponding address item state is INCOMPLETE;
1e, repeat to send identical NS address resolution message pre-determined number, do not receive that any NA message responds, it is overtime promptly to send NS;
1f, check equipment under test 1 current neighbor table state, the corresponding address item of before being set up is deleted.
Wherein, for said second status change, comprise the following steps:
2a, check equipment under test 2 current neighbor table states, state is EMPTY;
2b, equipment under test 1 send NS address resolution message to link-local;
2c, equipment under test 2 are received this NS address resolution message for the first time;
2d, when receiving message, check equipment under test 2 neighbor table corresponding address item information, comprising: the IPv6 destination address of this equipment under test and purpose link layer address;
2e, check equipment under test 2 current neighbor table states, corresponding address item state is STALE.
Wherein, for said third state transition, comprise the following steps:
3a, the said testing procedure 1a-1d of execution;
3b, equipment under test 2 send the NA message to equipment under test 1, and the constructing variable of this NA message is: ICMPv6 request marks=1;
3c, equipment under test 1 receive that the NA that equipment under test 2 sends replys message;
3d, when receiving message, check that equipment under test 1 neighbor table corresponding address item state is REACHABLE.
Wherein, for said four condition transition, comprise the following steps:
4a, the said testing procedure 3a-3d of execution;
The REACHABLE_TIME of 4b, equipment under test 1 neighbor table can reach timer and set timing time, can reach timer and begin countdown;
4c, reaching in the time that timer sets, do not receive accessibility confirmatory message about equipment under test 2;
4d, check that equipment under test 1 neighbor table corresponding address item state is STALE.
Wherein, for said the 5th status change, comprise the following steps:
5a, the said testing procedure 3a-3d of execution;
5b, equipment under test 2 send the NA message to equipment under test 1, and the constructing variable of this NA message is:
An ICMPv6 request marks!=1
5c, equipment under test 1 are received the NA message of the non-S set that equipment under test 2 sends;
5d, when receiving message, check that equipment under test 1 neighbor table corresponding address item state is STALE.
Wherein, for said the 6th status change, comprise the following steps:
6a, the said testing procedure 5a-5d of execution;
6b, equipment under test 2 send NS address resolution message to link-local;
6c, equipment under test 1 are received the NS address resolution message that equipment under test 2 sends;
6d, when receiving message, check that equipment under test 1 neighbor table corresponding address item state is DELAY.
Wherein, for said the 7th status change, comprise the following steps:
7a, the said testing procedure 6a-6d of execution;
7b, time-delay is acted on behalf of timer and is carried out time set to the DELAY_FIRST_PROBE_TIMER of equipment under test 1 neighbor table, and time-delay is acted on behalf of timer and begun countdown;
7c, in the time that timer sets is acted on behalf of in time-delay, do not receive that the NA message of equipment under test 2 is replied;
7d, check that equipment under test 1 neighbor table corresponding address item state is PROBE.
Wherein, for said the 8th status change, comprise the following steps:
8a, the said testing procedure 6a-6d of execution;
8b, timer is acted on behalf of in the time-delay of equipment under test 1 neighbor table carried out time set, time-delay is acted on behalf of timer and is begun countdown;
8c, in the time that timer sets is acted on behalf of in time-delay, receive that the NA message of equipment under test 3 is replied;
8d, check that equipment under test 1 neighbor table corresponding address item state is REACHABLE.
Wherein, for said the 9th status change, comprise the following steps:
9a, the said testing procedure 7a-7d of execution;
9b, the equipment under test 1 periodic NS address resolution message that sends are to link-local;
9c, transmission is set maximum time at interval RETRANS_TIMER be 1s, maximum transmission number of times MAX_UNICAST_SOLICIT is 3 times; Wherein, MAX_UNICAST_SOLICIT is maximum unitcast request number of times;
The maximum timing device of 9d, equipment under test 1 neighbor table does
MAX_TIMER=RETRANS_TIMER*MAX_UNICAST_SOLICIT,
The MAX_TIMER timer begins countdown; Wherein, MAX_TIMER is maximum time;
9e, in the maximum time of setting, receive that the NA of equipment 2 replys;
9f, check that equipment under test 1 neighbor table corresponding address item state is REACHABLE.
Wherein, for said the tenth status change, comprise the following steps:
10a, the said testing procedure 7a-7d of execution;
10b, the equipment under test 1 periodic NS address resolution message that sends are to link-local;
10c, transmission is set maximum time at interval RETRANS_TIMER be 1s, maximum transmission number of times MAX_UNICAST_SOLICIT is 3 times; Wherein, RETRANS_TIMER is the number of retransmissions time interval; MAX_UNICAST_SOLICIT is maximum unitcast request number of times;
The maximum timing device of 10d, equipment under test 1 neighbor table does
MAX_TIMER=RETRANS_TIMER*MAX_UNICAST_SOLICIT,
The MAX_TIMER timer begins countdown; Wherein, MAX_TIMER is maximum time;
10e, in the maximum time of setting, do not receive that the NA message of equipment 3 is replied;
10f, check equipment under test 1 current neighbor table state, the corresponding address item of before being set up is deleted.
Wherein, when carrying out the test of NUD status change, optionally carry out the test of NUD communication message, said NUD communication message test comprises the following steps:
11a, equipment under test 1 send NS address resolution message to link-local;
11b, equipment under test 2 send the NA message to equipment under test 1;
11c, equipment under test 2 recording parameterses comprise in local neighbor table: the IPv6 source address of equipment 1 and the source link layer address of equipment 1;
11d, equipment under test 1 recording parameters comprise in local neighbor table: the IPv6 source address of equipment 2 and source link layer address;
11e, equipment under test 1 send the NS message to equipment under test 2 according to the neighbor table information in the equipment under test 1, and beginning NUD detects;
11f, obtain this NS message, resolve;
11g, utilize each parameter of NS message model checking, and the record result;
11h, equipment under test 2 are replied the NA message and are given equipment under test 1;
11i, obtain this NA message, resolve;
11j, utilize each parameter of NA message model checking, and the record result.
The comprehensive test device of NUD of the present invention comprises NUD state verification module, is used for according to selecting NUD first to the tenth any status change of status change being tested automatically, perhaps said ten status changes is tested successively automatically.
Wherein, said NUD state verification module comprises, acquisition module, creates module and sending module, and wherein, said acquisition module is used for obtaining the state information and the address information of neighbor table specific address item; Said establishment module is used for creating needed NS message of communication process or NA message; Said sending module is used to send by creating the good message of module creation.
Further, the present invention can comprise the communication message test module, said communication message test module; Comprise: acquisition module, parsing module and judge module, wherein, said acquisition module; The mutual message that is used for the obtaining communication process comprises NS message and NA message; Said parsing module is used to resolve the mutual message that acquisition module obtains, and comprises NS message and NA message; Said judge module is used to judge whether the message field (MFLD) of resolving module parses is consistent with defined message model.
The invention has the beneficial effects as follows: according to integrated test facility and the device of NUD of the present invention; Testing apparatus is realized through automation; And according to the different different test scripts of test module operation; Thereby overcome the demand that the angle of manual test in the prior art can't cover full test, can realize the comprehensive automatic test of NUD module.
Description of drawings
Fig. 1 is the sketch map of total mentality of designing of the present invention;
Fig. 2 tests the sketch map of 10 kinds of status changes that comprise for the NUD status change;
Fig. 3 is the schematic flow sheet of integrated test facility of the NUD of the embodiment of the invention;
Fig. 4 is the structural representation of NUD status change test module in the comprehensive test device of NUD of the present invention;
Fig. 5 is the sketch map of the comprehensive test device of NUD of the present invention;
Fig. 6 is the structural representation of communication message test module of the present invention.
Embodiment
Below, with reference to integrated test facility and the device of accompanying drawing 1~6 detailed description NUD of the present invention.
The integrated test facility of NUD of the present invention, as shown in Figure 1, total mentality of designing of the present invention is: divide test module earlier, design the test case of module to be tested, comprise concrete testing procedure; According to the test case that is designed, generate the TCL test script; Then, the different TCL script of operation is tested in the test environment of disparate modules, produces message and status change result; At last, analyze message and status change result, generate test result automatically.
According to RFC2461 (Neighbor Discovery for IP Version 6, IPv6 Neighbor Discovery Protocol) definition, the NUD status change comprises following 5 kinds of states altogether:
1) INCOMPLETE: " not accomplishing " state, presentation address is resolved and is carried out, and the link layer address of neighbor node is not confirmed as yet;
2) REACHABLE: " can reach " state, presentation address is resolved successfully, and neighbor node can arrive, but this can arrive state and unsteady state;
3) STALE: " inefficacy " state, expression do not confirm whether neighbor node can reach, and this state is a stable state;
4) DELAY: " time-delay " state, expression do not confirm whether neighbor node can reach this state and unsteady state;
5) PROBE: " detection " state, expression do not confirm whether neighbor node can reach, and need through continuing to send the accessibility of NS authentication of message neighbor node.
In this article, "--->" expression status change direction, as shown in Figure 2, the test of NUD status change comprises following 10 kinds of situations:
1) (incomplete state wherein belongs to intermediateness to EMPTY--->INCOMPLETE (send the NS message and give neighbor node), if do not check at the appointed time, just checks less than this state.)
2) (the STALE state is an intermediateness to EMPTY--->STALE (receiving the NS message that neighbor node sends for the first time), has only equipment to receive for the first time when the NA message is replied, and just this state can occur, the time is very short, and conversion is fast, can convert REACHABLE or DELAY into.)
3) (incomplete state wherein belongs to intermediateness to EMPTY--->INCOMPLETE--->REACHABLE, if do not check at the appointed time, just checks less than this state.)
4) REACHABLE--->STALE (REACHABLE_TIME timer expiry) (can't test in manual test, thereby need construct the generation that message is realized this state through automatized script by this STALE state.)
5) REACHABLE--->STALE (receiving the NA message of the non-S set that neighbors sends) (can't test in manual test, thereby need construct the generation that message is realized this state through automatized script by this STALE state.)
6) STALE--->DELAY (also need be realized through automatized script structure message to the DELAY state by this STALE state, in manual test, can't see the change of these two states.)
7) DELAY--->PROBE (also not receiving the NA message in the time) (conversion between these two states need be set inner DELAY_FIRST_PROBE_TIMER time-delay through automatized script and act on behalf of timer and realize) at DELAY_FIRST_PROBE_TIMER
8) DELAY--->REACHABLE (receiving the NA message in the time) (conversion between these two states need be set inner DELAY_FIRST_PROBE_TIMER time-delay through automatized script and act on behalf of timer and realize) at DELAY_FIRST_PROBE_TIMER
9)PROBE——>REACHABLE
(receiving the NA message in the time) (conversion between these two states need be set inner maximum time MAX_TIMER timer through automatized script and realize) at RETRANS_TIMER*MAX_UNICAST_SOLICIT
10)PROBE——>EMPTY
(not receiving the NA message in the time) (conversion between these two states need be set inner maximum time MAX_TIMER timer through automatized script and realize) at RETRANS_TIMER*MAX_UNICAST_SOLICIT
According to above-mentioned state description, concrete testing procedure is divided as follows:
1) EMPTY--->INCOMPLETE (send the NS message and give neighbor node)
1a, check that equipment under test 1 current neighbor table state is EMPTY;
1b, equipment under test 1 send NS address resolution message to link-local, and wherein, concrete message constructing variable (need to prove that the NS message constructing variable among this paper is all identical with here, when hereinafter occurring, no longer it is made an explanation as follows.):
IPv6_Target_Address (IPv6 destination address)=FF02::1:FF+ is by back 24 of the requesting node global unicast address;
Target Link-Layer Address (purpose link layer address)=33:33+ is by back 32 of the requesting node multicast address;
In the time of 1c, transmission message, check equipment under test 1 neighbor table corresponding address item information: the IPv6 destination address and the purpose link layer address that comprise this equipment under test;
1d, check that corresponding address item state is INCOMPLETE;
1e, repeat to send identical NS address resolution message pre-determined number (for example three times), do not receive that any NA message responds, it is overtime promptly to send NS;
1f, check equipment under test 1 current neighbor table state, the corresponding address item of before being set up is deleted.
2) EMPTY--->STALE (receiving the NS message that neighbor node sends for the first time)
2a, check equipment under test 2 current neighbor table states, state is EMPTY;
2b, equipment under test 1 send NS address resolution message to link-local;
2c, equipment under test 2 are received this NS address resolution message for the first time;
2d, when receiving message, check equipment under test 2 neighbor table corresponding address item information, comprising: the IPv6 destination address of this equipment under test and purpose link layer address;
2e, check equipment under test 2 current neighbor table states, corresponding address item state is STALE.
3)EMPTY——>INCOMPLETE——>REACHABLE
3a, above 1) middle testing procedure 1a-1d;
3b, equipment under test 2 send the NA message to equipment under test 1, and the constructing variable of this NA message is: ICMPv6_Solicited Flag (ICMPv6 request marks)=1;
3c, equipment under test 1 receive that the NA that equipment under test 2 sends replys message;
3d, when receiving message, check that equipment under test 1 neighbor table corresponding address item state is REACHABLE.
4) REACHABLE--->STALE (REACHABLE_TIME timer expiry)
4a, with above-mentioned 3) in testing procedure 3a-3d;
The REACHABLE_TIME of 4b, equipment under test 1 neighbor table can reach timer and be set at 30s, can reach timer and begin countdown;
4c, reaching in the time that timer sets, do not receive " accessibility confirmatory message " about equipment under test 2;
4d, check that equipment under test 1 neighbor table corresponding address item state is STALE.
5) REACHABLE--->STALE (receiving the NA message of the non-S set that neighbors sends)
5a, with above-mentioned 3) in testing procedure 3a-3d;
5b, equipment under test 2 send the NA message to equipment under test 1, and the constructing variable of this NA message is:
An ICMPv6_Solicited Flag (ICMPv6 request marks)!=1
5c, equipment under test 1 are received the NA message of the non-S set that equipment under test 2 sends;
5d, when receiving message, check that equipment under test 1 neighbor table corresponding address item state is STALE.
6)STALE——>DELAY
6a, with above-mentioned 5) in testing procedure 5a-5d;
6b, equipment under test 2 send NS address resolution message to link-local;
6c, equipment under test 1 are received the NS address resolution message that equipment under test 2 sends;
6d, when receiving message, check that equipment under test 1 neighbor table corresponding address item state is DELAY.
7) DELAY--->PROBE (also not receiving the NA message in the time) at DELAY_FIRST_PROBE_TIMER
7a, with above-mentioned 6) in testing procedure 6a-6d;
The DELAY_FIRST_PROBE_TIMER time-delay of 7b, equipment under test 1 neighbor table is acted on behalf of timer and is set at 5s, and time-delay is acted on behalf of timer and begun countdown;
7c, in the time that timer sets is acted on behalf of in time-delay, do not receive that the NA message of equipment under test 2 is replied;
7d, check that equipment under test 1 neighbor table corresponding address item state is PROBE.
8) DELAY--->REACHABLE (in the time is acted on behalf of in time-delay, receiving the NA message)
8a, with above-mentioned 6) in testing procedure 6a-6d;
The time-delay of 8b, equipment under test 1 neighbor table is acted on behalf of timer and is set at 5s, and time-delay is acted on behalf of timer and begun countdown;
8c, in the time that timer sets is acted on behalf of in time-delay, receive that the NA message of equipment under test 3 is replied;
8d, check that equipment under test 1 neighbor table corresponding address item state is REACHABLE.
9) PROBE--->REACHABLE receives the NA message at RETRANS_TIMER number of retransmissions * MAX_UNICAST_SOLICIT (maximum unitcast request) in the time
9a, with above-mentioned 7) in testing procedure 7a-7d;
9b, the equipment under test 1 periodic NS address resolution message that sends are to link-local;
9c, transmission is set maximum time at interval RETRANS_TIMER be 1s, maximum transmission number of times MAX_UNICAST_SOLICIT (maximum unitcast request) is 3 times;
The maximum timing device of 9d, equipment under test 1 neighbor table does
MAX_TIMER (maximum time)=RETRANS_TIMER (number of retransmissions) * MAX_UNICAST_SOLICIT (maximum unitcast request), MAX_TIMER (maximum time) timer begins countdown;
9e, in the maximum time of setting, receive that the NA of equipment 2 replys;
9f, check that equipment under test 1 neighbor table corresponding address item state is REACHABLE.
10)PROBE——>EMPTY
(not receiving the NA message in the time) at RETRANS_TIMER*MAX_UNICAST_SOLICIT
10a, with above-mentioned 7) in testing procedure 7a-7d;
10b, the equipment under test 1 periodic NS address resolution message that sends are to link-local;
10c, transmission is set maximum time at interval RETRANS_TIMER (number of retransmissions) be 1s, maximum transmission number of times MAX_UNICAST_SOLICIT (maximum unitcast request) is 3 times;
The maximum timing device of 10d, equipment under test 1 neighbor table does
MAX_TIMER (maximum time)=RETRANS_TIMER (number of retransmissions) * MAX_UNICAST_SOLICIT (maximum unitcast request), MAX_TIMER (maximum time) timer begins countdown;
10e, in the maximum time of setting, do not receive that the NA message of equipment 3 is replied;
10f, check equipment under test 1 current neighbor table state, the corresponding address item of before being set up is deleted.
In addition, the present invention can also when carrying out the test of NUD status change, optionally carry out the test of NUD communication message according to actual needs, and this NUD communication message test comprises the following steps:
A, equipment under test 1 send NS address resolution message to link-local;
B, equipment under test 2 send the NA message to equipment under test 1;
C, equipment under test 2 recording parameterses comprise in local neighbor table: the IPv6 source address of equipment 1 and the source link layer address of equipment 1;
D, equipment under test 1 recording parameters comprise in local neighbor table: the IPv6 source address of equipment 2 and source link layer address;
E, equipment under test 1 send the NS message to equipment under test 2 according to the neighbor table information in the equipment under test 1, and beginning NUD detects;
F, obtain this NS message, resolve;
G, utilize each parameter of NS message model checking, and the record result; Wherein, each parameter is following:
ICMPv6_TYPE (icmp packet type): return the types value in the NS message
ICMPv6_Target Address (ICMPv6 destination address): return global unicast address or link local address variable in the NS message;
ICMPv6_Options TYPE (ICMPv6 option type): the types value that returns Option Field in the NS message;
ICMPv6_Options (ICMPv6 option): return the Option Field variable in the NS message;
Source Link-Layer Address (source link layer address);
H, equipment under test 2 are replied the NA message and are given equipment under test 1;
I, obtain this NA message, resolve;
J, utilize each parameter of NA message model checking, and the record result; Wherein, each parameter is following:
ICMPv6_TYPE (icmp packet type): return the types value in the NS message;
ICMPv6_Target Address (ICMPv6 destination address): return global unicast address or link local address variable in the NA message;
ICMPv6_Options_TYPE (ICMPv6 option type): the types value that returns Option Field in the NA message;
ICMPv6_Options (ICMPv6 option): return the Option Field variable in the NA message;
Target Link-Layer Address (purpose link layer address);
ICMPv6_Solicited Flag (ICMPv6 request mark): the Option Field S flag bit variable that returns the NA message.
As shown in Figure 3, when concrete the realization, can comprise the steps:
Step 301: the TCL test script that writes is operated in the test environment;
Step 302: input parameter test_module value, select test module;
Step 303: if test_module=1 representes that then tested module is a NUD status change module;
Step 304: input parameter status_module value, selection mode transition test submodule;
Step 305: if (n=1 2......10), representes that then tested status change is which kind situation recited above, moves the test case under this test environment then automatically to status_module=n;
Step 306: if status_module=all representes that then tested status change is whole ten kinds of situations recited above, moves the test case under this test environment then automatically;
Step 307: if test_module=2 representes that then tested module is a NUD communication message module, moves the test case under this test environment then automatically;
Step 308: analyze message and status change result, generate test result automatically.
Fig. 4 is the structural representation of NUD status change test module in the comprehensive test device of NUD of the present invention.This NUD status change test module comprises acquisition module 401, creates module 402, sending module 403.
Wherein, acquisition module 401 is used to obtain the current state of neighbor table; Create module 402, be used for creating the needed message of communication process; Sending module 403 is used to send by creating the good message of module creation.In addition, can also be in sending module 403 built-in timer, send the time interval of message and the number of times that repeats to send with control.
Wherein, acquisition module 401 may further include: the first acquiring unit 401a is used for obtaining the state information of neighbor table specific address item; Second acquisition unit 401b is used for obtaining the address information of neighbor table specific address item, and wherein, this address information is mainly used in the address entries information of NUD list item and fills.
Wherein, create module 402 and may further include: the first establishment unit 402a, be used to create the NS message, specifically comprise address resolution NS message and NUD state-detection NS message; The second establishment unit 402b is used to create the NA message, specifically comprises address resolution NA message and NUD state-detection NA message.
As shown in Figure 5, the comprehensive test device of NUD of the present invention may further include the communication message test module, and is as shown in Figure 6, and this communication message test module comprises: acquisition module 601, parsing module 602, judge module 603.
Wherein, acquisition module 601 is used for the mutual message of obtaining communication process;
Parsing module 602 is used to resolve the mutual message that acquisition module obtains;
Judge module 603 is used to judge whether the message field (MFLD) of resolving module parses is consistent with defined message model.
Wherein, acquisition module 601 may further include: the first acquiring unit 601a is used for the NS message of obtaining communication process; Second acquisition unit 601b is used for the NA message of obtaining communication process.
In sum; Integrated test facility and device according to NUD of the present invention; Can particularly in NUD status change test module, realize the test of ten kinds of status changes according to the different different test scripts of test module operation; Overcome the demand that the angle of manual test in the prior art can't cover full test, can realize the comprehensive automatic test of NUD module.
More than be in order to make those of ordinary skills understand the present invention; And to detailed description that the present invention carried out; But can expect; In the scope that does not break away from claim of the present invention and contained, can also make other variation and modification, these variations and revising all in protection scope of the present invention.

Claims (15)

1. the integrated test facility of a NUD is characterized in that, according to selecting any status change in NUD first to the tenth status change is tested automatically, perhaps said ten status changes are tested successively automatically, wherein,
First status change is: from EMPTY to INCOMPLETE;
Second status change is: from EMPTY to STALE;
Third state transition are: from EMPTY to INCOMPLETE to REACHABLE;
The four condition transition are: from REACHABLE to STALE;
The 5th status change is: from REACHABLE to STALE;
The 6th status change is: from STALE to DELAY;
The 7th status change is: from DELAY to PROBE;
The 8th status change is: from DELAY to REACHABLE;
The 9th status change is: from PROBE to REACHABLE;
The tenth status change is: from PROBE to EMPTY.
2. the integrated test facility of NUD as claimed in claim 1 is characterized in that, for said first status change, comprises the following steps:
1a, check that equipment under test 1 current neighbor table state is EMPTY;
1b, equipment under test 1 send NS address resolution message to link-local, and wherein, said NS address resolution message comprises: IPv6 destination address and purpose link layer address;
1c, when sending said message, check equipment under test 1 neighbor table corresponding address item information, comprising: the IPv6 destination address of this equipment under test and purpose link layer address;
1d, check that corresponding address item state is INCOMPLETE;
1e, repeat to send identical NS address resolution message pre-determined number, do not receive that any NA message responds, it is overtime promptly to send NS;
1f, check equipment under test 1 current neighbor table state, the corresponding address item of before being set up is deleted.
3. the integrated test facility of NUD as claimed in claim 1 is characterized in that, for said second status change, comprises the following steps:
2a, check equipment under test 2 current neighbor table states, state is EMPTY;
2b, equipment under test 1 send NS address resolution message to link-local;
2c, equipment under test 2 are received this NS address resolution message for the first time;
2d, when receiving message, check equipment under test 2 neighbor table corresponding address item information, comprising: the IPv6 destination address of this equipment under test and purpose link layer address;
2e, check equipment under test 2 current neighbor table states, corresponding address item state is STALE.
4. the integrated test facility of NUD as claimed in claim 1 is characterized in that, for said third state transition, comprises the following steps:
3a, the said testing procedure 1a-1d of execution;
3b, equipment under test 2 send the NA message to equipment under test 1, and the constructing variable of this NA message is: ICMPv6 request marks=1;
3c, equipment under test 1 receive that the NA that equipment under test 2 sends replys message;
3d, when receiving message, check that equipment under test 1 neighbor table corresponding address item state is REACHABLE.
5. the integrated test facility of NUD as claimed in claim 4 is characterized in that, for said four condition transition, comprises the following steps:
4a, the said testing procedure 3a-3d of execution;
The REACHABLE_TIME of 4b, equipment under test 1 neighbor table can reach timer and set timing time, can reach timer and begin countdown;
4c, reaching in the time that timer sets, do not receive accessibility confirmatory message about equipment under test 2;
4d, check that equipment under test 1 neighbor table corresponding address item state is STALE.
6. the integrated test facility of NUD as claimed in claim 4 is characterized in that, for said the 5th status change, comprises the following steps:
5a, the said testing procedure 3a-3d of execution;
5b, equipment under test 2 send the NA message to equipment under test 1, and the constructing variable of this NA message is:
An ICMPv6 request marks!=1
5c, equipment under test 1 are received the NA message of the non-S set that equipment under test 2 sends;
5d, when receiving message, check that equipment under test 1 neighbor table corresponding address item state is STALE.
7. the integrated test facility of NUD as claimed in claim 6 is characterized in that, for said the 6th status change, comprises the following steps:
6a, the said testing procedure 5a-5d of execution;
6b, equipment under test 2 send NS address resolution message to link-local;
6c, equipment under test 1 are received the NS address resolution message that equipment under test 2 sends;
6d, when receiving message, check that equipment under test 1 neighbor table corresponding address item state is DELAY.
8. the integrated test facility of NUD as claimed in claim 7 is characterized in that, for said the 7th status change, comprises the following steps:
7a, the said testing procedure 6a-6d of execution;
7b, time-delay is acted on behalf of timer and is carried out time set to the DELAY_FIRST_PROBE_TIMER of equipment under test 1 neighbor table, and time-delay is acted on behalf of timer and begun countdown;
7c, in the time that timer sets is acted on behalf of in time-delay, do not receive that the NA message of equipment under test 2 is replied;
7d, check that equipment under test 1 neighbor table corresponding address item state is PROBE.
9. the integrated test facility of NUD as claimed in claim 7 is characterized in that, for said the 8th status change, comprises the following steps:
8a, the said testing procedure 6a-6d of execution;
8b, timer is acted on behalf of in the time-delay of equipment under test 1 neighbor table carried out time set, time-delay is acted on behalf of timer and is begun countdown;
8c, in the time that timer sets is acted on behalf of in time-delay, receive that the NA message of equipment under test 3 is replied;
8d, check that equipment under test 1 neighbor table corresponding address item state is REACHABLE.
10. the integrated test facility of NUD as claimed in claim 8 is characterized in that, for said the 9th status change, comprises the following steps:
9a, the said testing procedure 7a-7d of execution;
9b, the equipment under test 1 periodic NS address resolution message that sends are to link-local;
9c, transmission is set maximum time at interval RETRANS_TIMER be 1s, maximum transmission number of times MAX_UNICAST_SOLICIT is 3 times; Wherein, MAX_UNICAST_SOLICIT is maximum unitcast request number of times;
The maximum timing device of 9d, equipment under test 1 neighbor table does
MAX_TIMER=RETRANS_TIMER*MAX_UNICAST_SOLICIT,
The MAX_TIMER timer begins countdown; Wherein, MAX_TIMER is maximum time;
9e, in the maximum time of setting, receive that the NA of equipment 2 replys;
9f, check that equipment under test 1 neighbor table corresponding address item state is REACHABLE.
11. the integrated test facility of NUD as claimed in claim 8 is characterized in that, for said the tenth status change, comprises the following steps:
10a, the said testing procedure 7a-7d of execution;
10b, the equipment under test 1 periodic NS address resolution message that sends are to link-local;
10c, transmission is set maximum time at interval RETRANS_TIMER be 1s, maximum transmission number of times MAX_UNICAST_SOLICIT is 3 times; Wherein, RETRANS_TIMER is the number of retransmissions time interval; MAX_UNICAST_SOLICIT is maximum unitcast request number of times;
The maximum timing device of 10d, equipment under test 1 neighbor table does
MAX_TIMER=RETRANS_TIMER*MAX_UNICAST_SOLICIT,
The MAX_TIMER timer begins countdown; Wherein, MAX_TIMER is maximum time;
10e, in the maximum time of setting, do not receive that the NA message of equipment 3 is replied;
10f, check equipment under test 1 current neighbor table state, the corresponding address item of before being set up is deleted.
12. the integrated test facility like each described NUD in the claim 1 to 11 is characterized in that, when carrying out the test of NUD status change, optionally carries out the test of NUD communication message, said NUD communication message test comprises the following steps:
11a, equipment under test 1 send NS address resolution message to link-local;
11b, equipment under test 2 send the NA message to equipment under test 1;
11c, equipment under test 2 recording parameterses comprise in local neighbor table: the IPv6 source address of equipment 1 and the source link layer address of equipment 1;
11d, equipment under test 1 recording parameters comprise in local neighbor table: the IPv6 source address of equipment 2 and source link layer address;
11e, equipment under test 1 send the NS message to equipment under test 2 according to the neighbor table information in the equipment under test 1, and beginning NUD detects;
11f, obtain this NS message, resolve;
11g, utilize each parameter of NS message model checking, and the record result;
11h, equipment under test 2 are replied the NA message and are given equipment under test 1;
11i, obtain this NA message, resolve;
11j, utilize each parameter of NA message model checking, and the record result.
13. the device of execution such as the said method of claim 1 to 12; It is characterized in that; Comprise NUD state verification module, be used for NUD first to the tenth any status change of status change being tested automatically, perhaps said ten status changes are tested successively automatically according to selecting.
14. device as claimed in claim 13 is characterized in that, said NUD state verification module comprises, acquisition module, establishment module and sending module, wherein,
Said acquisition module is used for obtaining the state information and the address information of neighbor table specific address item;
Said establishment module is used for creating needed NS message of communication process or NA message;
Said sending module is used to send by creating the good message of module creation.
15. device as claimed in claim 13 is characterized in that, further comprises the communication message test module, said communication message test module comprises: acquisition module, parsing module and judge module, wherein,
Said acquisition module is used for the mutual message of obtaining communication process, comprises NS message and NA message;
Said parsing module is used to resolve the mutual message that acquisition module obtains, and comprises NS message and NA message;
Said judge module is used to judge whether the message field (MFLD) of resolving module parses is consistent with defined message model.
CN201110362017.8A 2011-11-15 2011-11-15 Method and device for comprehensively testing NUD Active CN102404168B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110362017.8A CN102404168B (en) 2011-11-15 2011-11-15 Method and device for comprehensively testing NUD

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110362017.8A CN102404168B (en) 2011-11-15 2011-11-15 Method and device for comprehensively testing NUD

Publications (2)

Publication Number Publication Date
CN102404168A true CN102404168A (en) 2012-04-04
CN102404168B CN102404168B (en) 2014-10-22

Family

ID=45885981

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110362017.8A Active CN102404168B (en) 2011-11-15 2011-11-15 Method and device for comprehensively testing NUD

Country Status (1)

Country Link
CN (1) CN102404168B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107453901A (en) * 2017-07-28 2017-12-08 重庆金美通信有限责任公司 A method for graphically simulating an OSPF network and realizing automatic testing of routing capacity, routing convergence, and routing oscillation
CN113535581A (en) * 2021-07-30 2021-10-22 东风商用车有限公司 Test script generation method, device, equipment and computer readable storage medium
CN116248601A (en) * 2023-03-30 2023-06-09 杭州云合智网技术有限公司 Method and device for improving NUD state machine of network operating system

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1431598A (en) * 2002-01-11 2003-07-23 互慧科技股份有限公司 Program test system and method
US20040052215A1 (en) * 1999-08-19 2004-03-18 Massachusetts Institute Of Technology, A Massachusetts Corporation Digital circuit synthesis system
CN1540928A (en) * 2003-10-27 2004-10-27 中国科学院计算技术研究所 Next Generation Internet Protocol Conformance Test Case Design Method
EP2187565A1 (en) * 2007-10-26 2010-05-19 Huawei Technologies Co., Ltd. Detecting and processing method and device of node fault within a peer-to-peer network
CN101730063A (en) * 2009-11-19 2010-06-09 福建星网锐捷网络有限公司 Neighbor table entry resource recovery method, device and IPv6 (internet protocol version 6) node
CN101753458A (en) * 2009-12-30 2010-06-23 杭州华三通信技术有限公司 Method and device for processing ND neighbor table entry
US7769885B1 (en) * 2003-05-23 2010-08-03 Juniper Networks, Inc. Determining liveness of protocols and interfaces

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040052215A1 (en) * 1999-08-19 2004-03-18 Massachusetts Institute Of Technology, A Massachusetts Corporation Digital circuit synthesis system
CN1431598A (en) * 2002-01-11 2003-07-23 互慧科技股份有限公司 Program test system and method
US7769885B1 (en) * 2003-05-23 2010-08-03 Juniper Networks, Inc. Determining liveness of protocols and interfaces
CN1540928A (en) * 2003-10-27 2004-10-27 中国科学院计算技术研究所 Next Generation Internet Protocol Conformance Test Case Design Method
EP2187565A1 (en) * 2007-10-26 2010-05-19 Huawei Technologies Co., Ltd. Detecting and processing method and device of node fault within a peer-to-peer network
CN101730063A (en) * 2009-11-19 2010-06-09 福建星网锐捷网络有限公司 Neighbor table entry resource recovery method, device and IPv6 (internet protocol version 6) node
CN101753458A (en) * 2009-12-30 2010-06-23 杭州华三通信技术有限公司 Method and device for processing ND neighbor table entry

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
柳鑫等: "邻居发现协议在五款IPv6路由器中的一致性测试比较", 《小型微型计算机系统》 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107453901A (en) * 2017-07-28 2017-12-08 重庆金美通信有限责任公司 A method for graphically simulating an OSPF network and realizing automatic testing of routing capacity, routing convergence, and routing oscillation
CN113535581A (en) * 2021-07-30 2021-10-22 东风商用车有限公司 Test script generation method, device, equipment and computer readable storage medium
CN113535581B (en) * 2021-07-30 2023-12-12 东风商用车有限公司 Test script generation method, device, equipment and computer readable storage medium
CN116248601A (en) * 2023-03-30 2023-06-09 杭州云合智网技术有限公司 Method and device for improving NUD state machine of network operating system
CN116248601B (en) * 2023-03-30 2025-04-18 云合智网(上海)技术有限公司 Improvement method and device for NUD state machine of network operating system

Also Published As

Publication number Publication date
CN102404168B (en) 2014-10-22

Similar Documents

Publication Publication Date Title
CN101945043B (en) Topology discovery system of next generation Internet based on IPv6 (Internet Protocol Version 6) and realizing method thereof
Villaverde et al. Service discovery protocols for constrained machine-to-machine communications
CN110401568B (en) Network topology discovery method and equipment
CN113595897B (en) Path detection method and device
CN102984288B (en) A kind of method and system of automatic management IPv6 address conflicts
CN108401037A (en) User terminal and the binding method of equipment, device and system
TWI599201B (en) Network system and method of establishing data connection
Thombre et al. IP based wireless sensor networks: performance analysis using simulations and experiments
Kristensen et al. Specification and validation of an edge router discovery protocol for mobile ad hoc networks
JP2005204016A (en) Address-assigning method in sensor network
JP2010531602A (en) Method and apparatus for communication of diagnostic data in a real-time communication network
CN106067862A (en) The construction method of network topology and device
CN102404168B (en) Method and device for comprehensively testing NUD
CN104022956A (en) Method and device for data message processing in location/ID separation protocol network
CN103037361A (en) Internet protocol (IP) distribution system in wireless Mesh network based on Ad-hoc and IP distribution method in the wireless Mesh network based on the Ad-hoc
Song et al. Design of a networked monitoring system for home automation
Gray et al. Simulation framework for distributed SDN-controller architectures in OMNeT++
Chen et al. DAC: Generic and automatic address configuration for data center networks
CN102315926A (en) Main device selection method, gateway device and network system
Siljanovski et al. Service discovery in resource constrained networks using multicast DNS
CN103002064A (en) Method, user node and remote access server for releasing address
Rozi et al. Implementation OSPFv3 For Internet Protocol Verses 6 (IPv6) Based On Juniper Routers Use Emulator Virtual Engine–Next Generation (Eve-NG)
CN102469016A (en) Device and method for determining path maximum transmission unit (PMTU) reversely
CN106452963A (en) Network path sensing method and system
CN101217446B (en) A method and system to realize the automatic learning of IPv6 route of edge device in the tunnel

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 100085 Beijing East Road, No. 1, building No. 301, building on the north side of the floor, room 3, room 3

Applicant after: BEIJING TOPSEC TECHNOLOGY CO., LTD.

Address before: 100085 Beijing East Road, No. 1, building No. 301, building on the north side of the floor, room 3, room 3

Applicant before: Beijing heaven melts letter Science Technologies Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: BEIJING HEAVEN MELTS LETTER SCIENCE TECHNOLOGIES CO., LTD. TO: BEIJING TOPSEC TECHNOLOGY CO., LTD.

C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee

Owner name: BEIJING HEAVEN MELTS LETTER SCIENCE TECHNOLOGIES C

Free format text: FORMER NAME: BEIJING TOPSEC TECHNOLOGY CO., LTD.

CP01 Change in the name or title of a patent holder

Address after: 100085 Beijing East Road, No. 1, building No. 301, building on the north side of the floor, room 3, room 3

Patentee after: Beijing heaven melts letter Science Technologies Co., Ltd.

Address before: 100085 Beijing East Road, No. 1, building No. 301, building on the north side of the floor, room 3, room 3

Patentee before: BEIJING TOPSEC TECHNOLOGY CO., LTD.

C56 Change in the name or address of the patentee
CP01 Change in the name or title of a patent holder

Address after: 100085 Beijing East Road, No. 1, building No. 301, building on the north side of the floor, room 3, room 3

Patentee after: BEIJING TOPSEC TECHNOLOGY CO., LTD.

Address before: 100085 Beijing East Road, No. 1, building No. 301, building on the north side of the floor, room 3, room 3

Patentee before: Beijing heaven melts letter Science Technologies Co., Ltd.

C56 Change in the name or address of the patentee
CP01 Change in the name or title of a patent holder

Address after: 100085 Beijing East Road, No. 1, building No. 301, building on the north side of the floor, room 3, room 3

Patentee after: Beijing heaven melts letter Science Technologies Co., Ltd.

Address before: 100085 Beijing East Road, No. 1, building No. 301, building on the north side of the floor, room 3, room 3

Patentee before: BEIJING TOPSEC TECHNOLOGY CO., LTD.