CN102404168B - Method and device for comprehensively testing NUD - Google Patents

Method and device for comprehensively testing NUD Download PDF

Info

Publication number
CN102404168B
CN102404168B CN201110362017.8A CN201110362017A CN102404168B CN 102404168 B CN102404168 B CN 102404168B CN 201110362017 A CN201110362017 A CN 201110362017A CN 102404168 B CN102404168 B CN 102404168B
Authority
CN
China
Prior art keywords
under test
equipment under
message
timer
address
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.)
Active
Application number
CN201110362017.8A
Other languages
Chinese (zh)
Other versions
CN102404168A (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

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a method and a device for comprehensively testing NUD (Neighbour Unreachability Detection). The method comprises the following steps: automatically testing according to any one state transition from the first to ten state transitions of the NUD, or automatically testing the ten state transitions in turn, wherein the state transition comprises the following contents: from EMPTY to INCOMPLETE, from EMPTY to STALE, from EMPTY to INCOMPLETE to REACHABLE, from REACHABLE to STALE, from REACHABLE to STALE, from STALE to DELAY, from DELAY to PROBE, from DELAY to REACHABLE, from PROBE to REACHABLE, and from PROBE to EMPTY. The invention can realize the automatic test of the NUD.

Description

The integrated test facility of a kind of NUD and device
Technical field
The present invention relates to communication protocol technical field, particularly integrated test facility and the device of a kind of NUD (NeighborUnreachability Detection, the unreachable detection of neighbours).
Background technology
The network layer protocol that current internet is used is IPv4 (Internet Protocol version 4, internet protocol version 4) agreement, along with the fast development of Internet technology and the network demand day by day increasing progressively, IPv4 agreement cannot meet current network demand: 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.IPv6 agreement has not only solved the drawback that IPv4 agreement exists, and has also expanded the new features of oneself simultaneously:
1), the datagram header of new format, make router improve speed and the route speed of deal with data message;
2), stateless address configures automatically, the significantly simple and easy configuration step of network environment, has reduced network operation cost;
3), brand-new Neighbor Discovery Protocol, this protocol package has contained the interaction mechanism of neighbor node in a series of networks, perfect ARP in IPv4 agreement (Address Resolution Protocol, address resolution protocol), ICMP router are found, ICMP router is redirected etc.
Wherein, the address resolution mechanism in the Neighbor Discovery Protocol of IPv6, compared with the ARP agreement of IPv4, has increased a kind of new testing mechanism NUD.After completing address resolution, continue to determine the accessibility of neighbor node by this testing mechanism, thereby guarantee can reaching in real time of in communication process neighbor node; According to defined state machine in RFC2461 (Neighbor Discovery for IP Version 6, IPv6 Neighbor Discovery Protocol), when meeting certain condition between neighbours' state of reachability machine, can realize mutual migration in addition.
But, because defined state in NUD mechanism is comparatively complicated, and there is the more intermediateness situation of migration mutually, therefore, single demand that cannot cover full test from the angle of manual test, needs thus to invent a kind of automatic test approach, thereby realizes the full test of NUD.
Summary of the invention
The object 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, NUD first is tested automatically to any status change in the tenth status change, or described ten status changes are tested successively automatically, and wherein, the first status change is: from EMPTY to INCOMPLETE; The second status change is: from EMPTY to STALE; Third state transition are: from EMPTY to INCOMPLETE to REACHABLE; The 4th status change is: 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 described the first status change, comprise the following steps:
1a, check that the current neighbor table state of equipment under test 1 is EMPTY;
1b, equipment under test 1 send NS address resolution message to link-local, and wherein, described NS address resolution message comprises: IPv6 destination address and object link layer address;
1c, when sending described message, check the address entries information that equipment under test 1 neighbor table is corresponding, comprising: the IPv6 destination address of this equipment under test and object 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, send NS overtime;
1f, check the current neighbor table state of equipment under test 1, the corresponding address item before set up is deleted.
Wherein, for described the second status change, comprise the following steps:
2a, check the current neighbor table state of equipment under test 2, 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 the address entries information that equipment under test 2 neighbor table are corresponding, comprising: the IPv6 destination address of this equipment under test and object link layer address;
2e, check the current neighbor table state of equipment under test 2, corresponding address entries state is STALE.
Wherein, for described third state transition, comprise the following steps:
3a, carry out described testing procedure 1a-1d;
3b, equipment under test 2 send 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 address entries state corresponding to equipment under test 1 neighbor table is REACHABLE.
Wherein, for described the 4th status change, comprise the following steps:
4a, carry out described testing procedure 3a-3d;
The REACHABLE_TIME of 4b, equipment under test 1 neighbor table can reach timer and set timing time, can reach timer and start countdown;
4c, reaching in the time that timer sets, do not receive the accessibility confirmatory message about equipment under test 2;
4d, check that address entries state corresponding to equipment under test 1 neighbor table is STALE.
Wherein, for described the 5th status change, comprise the following steps:
5a, carry out described testing procedure 3a-3d;
5b, equipment under test 2 send NA message to equipment under test 1, and the constructing variable of this NA message is:
ICMPv6 request marks unequal to 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 address entries state corresponding to equipment under test 1 neighbor table is STALE.
Wherein, for described the 6th status change, comprise the following steps:
6a, carry out described 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 address entries state corresponding to equipment under test 1 neighbor table is DELAY.
Wherein, for described the 7th status change, comprise the following steps:
7a, carry out described testing procedure 6a-6d;
7b, the DELAY_FIRST_PROBE_TIMER time delay of equipment under test 1 neighbor table is acted on behalf of to timer carry out time setting, time delay is acted on behalf of timer and is started 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 address entries state corresponding to equipment under test 1 neighbor table is PROBE.
Wherein, for described the 8th status change, comprise the following steps:
8a, carry out described testing procedure 6a-6d;
8b, the time delay of equipment under test 1 neighbor table is acted on behalf of to timer carry out time setting, time delay is acted on behalf of timer and is started 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 address entries state corresponding to equipment under test 1 neighbor table is REACHABLE.
Wherein, for described the 9th status change, comprise the following steps:
9a, carry out described testing procedure 7a-7d;
9b, equipment under test 1 periodically send NS address resolution message to link-local;
9c, the maximum time interval RETRANS_TIMER that transmission is set are 1s, and maximum transmission times MAX_UNICAST_SOLICIT is 3 times; Wherein, MAX_UNICAST_SOLICIT is maximum unitcast request number of times;
The maximum timer of 9d, equipment under test 1 neighbor table is
MAX_TIMER=RETRANS_TIMER*MAX_UNICAST_SOLICIT,
MAX_TIMER timer starts countdown; Wherein, MAX_TIMER is maximum time;
9e, within the maximum time of setting, receive that the NA of equipment 2 replys;
9f, check that address entries state corresponding to equipment under test 1 neighbor table is REACHABLE.
Wherein, for described the tenth status change, comprise the following steps:
10a, carry out described testing procedure 7a-7d;
10b, equipment under test 1 periodically send NS address resolution message to link-local;
10c, the maximum time interval RETRANS_TIMER that transmission is set are 1s, and maximum transmission 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 timer of 10d, equipment under test 1 neighbor table is
MAX_TIMER=RETRANS_TIMER*MAX_UNICAST_SOLICIT,
MAX_TIMER timer starts countdown; Wherein, MAX_TIMER is maximum time;
10e, within the maximum time of setting, do not receive that the NA message of equipment 3 is replied;
10f, check the current neighbor table state of equipment under test 1, the corresponding address item before set up is deleted.
Wherein, when carrying out the test of NUD status change, optionally carry out the test of NUD communication message, described 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 NA message to equipment under test 1;
11c, equipment under test 2 recording parameterses, in local neighbor table, comprising: the IPv6 source address of equipment 1 and the source link layer address of equipment 1;
11d, equipment under test 1 recording parameters, in local neighbor table, comprising: the IPv6 source address of equipment 2 and source link layer address;
11e, equipment under test 1, according to the neighbor table information in equipment under test 1, send NS message to equipment under test 2, start NUD and detect;
11f, obtain this NS message, resolve;
11g, utilize NS message model checking parameters, and record result;
11h, equipment under test 2 are replied NA message to equipment under test 1;
11i, obtain this NA message, resolve;
11j, utilize NA message model checking parameters, and record result.
The comprehensive test device of NUD of the present invention, comprises NUD state verification module, for according to selecting, NUD first being tested automatically to the tenth any status change of status change, or described ten status changes is tested successively automatically.
Wherein, described NUD state verification module, comprises, acquisition module, creation module and sending module, and wherein, described acquisition module, for obtaining state information and the address information of neighbor table specific address item; Described creation module, for creating the needed NS message of communication process or NA message; Described sending module, for sending the message being created by creation module.
Further, the present invention can comprise communication message test module, described communication message test module, comprise: acquisition module, parsing module and judge module, wherein, described acquisition module, mutual message for obtaining communication process, comprises NS message and NA message; Described parsing module, the mutual message obtaining for resolving acquisition module, comprises NS message and NA message; Described judge module, whether consistent with defined message model for judging the message field (MFLD) of parsing module parsing.
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 by automation, and move different test scripts according to different test modules, thereby overcome the demand that the angle of manual test in prior art cannot cover full test, can realize the comprehensive automatic test of NUD module.
Accompanying drawing explanation
Fig. 1 is the schematic diagram of total mentality of designing of the present invention;
Fig. 2 is the schematic diagram that NUD status change is tested 10 kinds of status changes that comprise;
Fig. 3 is the schematic flow sheet of integrated test facility of the NUD of the embodiment of the present 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 schematic diagram 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 accompanying drawing 1~6, describe integrated test facility and the device of NUD of the present invention in detail.
The integrated test facility of NUD of the present invention, as shown in Figure 1, total mentality of designing of the present invention is: first divide test module, design the test case of tested module, comprise concrete testing procedure; According to designed test case, generate TCL test script; Then, in the test environment of disparate modules, move different TCL scripts, test, produce message and status change result; Finally, analyze message and status change result, automatically generate test result.
According to RFC2461 (Neighbor Discovery for IP Version 6, IPv6 Neighbor Discovery Protocol) definition, NUD status change comprises following 5 kinds of states altogether:
1) INCOMPLETE: " not completing " state, expression address resolution is carried out, and the link layer address of neighbor node is not yet definite;
2) REACHABLE: " can reach " state, represent address resolution success, neighbor node can arrive, but this can arrive state unsteady state;
3) STALE: " inefficacy " state, represents not determine whether neighbor node can reach, and this state is stable state;
4) DELAY: " time delay " state, represents do not determine whether neighbor node can reach, this state unsteady state;
5) PROBE: " detection " state, represent do not determine whether neighbor node can reach, need by continuing to send the accessibility of NS authentication of message neighbor node.
In this article, "---> " represent 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 (sending NS message to neighbor node), if do not checked at the appointed time, just checks less than this state.)
2) (STALE state is intermediateness to EMPTY---> STALE (receiving for the first time the NS message that neighbor node sends), only have equipment to receive for the first time when NA message is replied, just there will be this state, time is very short, conversion is fast, can be converted to REACHABLE or DELAY.)
3) (incomplete state wherein belongs to intermediateness to EMPTY---> INCOMPLETE---> REACHABLE, if do not checked at the appointed time, just checks less than this state.)
4) REACHABLE---> STALE (REACHABLE_TIME timer expiry) (cannot test in manual test, thereby need to construct the generation that message is realized this state by automatized script by this STALE state.)
5) REACHABLE---> STALE (receiving the NA message of the non-S set that neighbors sends) (cannot test in manual test, thereby need to construct the generation that message is realized this state by automatized script by this STALE state.)
6) STALE---> DELAY (also needs to construct message by automatized script by this STALE state to DELAY state and realizes, cannot see the change of these two states in manual test.)
7) DELAY---> PROBE (also not receiving NA message at DELAY_FIRST_PROBE_TIMER in the time) (conversion between these two states need to be set inner DELAY_FIRST_PROBE_TIMER time delay by automatized script and act on behalf of timer and realize)
8) DELAY---> REACHABLE (receiving NA message in the time at DELAY_FIRST_PROBE_TIMER) (conversion between these two states need to be set inner DELAY_FIRST_PROBE_TIMER time delay by automatized script and act on behalf of timer and realize)
9)PROBE——>REACHABLE
(receiving NA message in the time at RETRANS_TIMER*MAX_UNICAST_SOLICIT) (conversion between these two states need to be set inner maximum time MAX_TIMER timer by automatized script and realize)
10)PROBE——>EMPTY
(not receiving NA message in the time at RETRANS_TIMER*MAX_UNICAST_SOLICIT) (conversion between these two states need to be set inner maximum time MAX_TIMER timer by automatized script and realize)
According to above-mentioned state description, concrete testing procedure is divided as follows:
1) EMPTY---> INCOMPLETE (sending NS message to neighbor node)
1a, check that the current neighbor table state of equipment under test 1 is EMPTY;
1b, equipment under test 1 send NS address resolution message to link-local, and wherein, concrete message constructing variable is following, and (it should be noted that, NS message constructing variable herein, all with identical herein, while hereinafter occurring, no longer makes an explanation to it.):
Latter 24 of the requested node global unicast address of IPv6_Target_Address (IPv6 destination address)=FF02::1:FF+;
Latter 32 of the requested node multicast address of Target Link-Layer Address (object link layer address)=33:33+;
In the time of 1c, transmission message, check the address entries information that equipment under test 1 neighbor table is corresponding: the IPv6 destination address and the object 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, send NS overtime;
1f, check the current neighbor table state of equipment under test 1, the corresponding address item before set up is deleted.
2) EMPTY---> STALE (receiving for the first time the NS message that neighbor node sends)
2a, check the current neighbor table state of equipment under test 2, 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 the address entries information that equipment under test 2 neighbor table are corresponding, comprising: the IPv6 destination address of this equipment under test and object link layer address;
2e, check the current neighbor table state of equipment under test 2, corresponding address entries state is STALE.
3)EMPTY——>INCOMPLETE——>REACHABLE
3a, with above 1) in testing procedure 1a-1d;
3b, equipment under test 2 send 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 address entries state corresponding to equipment under test 1 neighbor table 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 as 30s, can reach timer and start countdown;
4c, reaching in the time that timer sets, do not receive " accessibility confirmatory message " about equipment under test 2;
4d, check that address entries state corresponding to equipment under test 1 neighbor table 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 NA message to equipment under test 1, and the constructing variable of this NA message is:
ICMPv6_Solicited Flag (ICMPv6 request marks) unequal to 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 address entries state corresponding to equipment under test 1 neighbor table 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 address entries state corresponding to equipment under test 1 neighbor table is DELAY.
7) DELAY---> PROBE (also not receiving NA message at DELAY_FIRST_PROBE_TIMER in the time)
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 as 5s, and time delay is acted on behalf of timer and started 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 address entries state corresponding to equipment under test 1 neighbor table is PROBE.
8) DELAY---> REACHABLE (receiving NA message in the time is acted on behalf of in time delay)
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 as 5s, and time delay is acted on behalf of timer and started 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 address entries state corresponding to equipment under test 1 neighbor table is REACHABLE.
9) PROBE---> REACHABLE receives 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, equipment under test 1 periodically send NS address resolution message to link-local;
9c, the maximum time interval RETRANS_TIMER that transmission is set are 1s, and maximum transmission times MAX_UNICAST_SOLICIT (maximum unitcast request) is 3 times;
The maximum timer of 9d, equipment under test 1 neighbor table is
MAX_TIMER (maximum time)=RETRANS_TIMER (number of retransmissions) * MAX_UNICAST_SOLICIT (maximum unitcast request), MAX_TIMER (maximum time) timer starts countdown;
9e, within the maximum time of setting, receive that the NA of equipment 2 replys;
9f, check that address entries state corresponding to equipment under test 1 neighbor table is REACHABLE.
10)PROBE——>EMPTY
(at RETRANS_TIMER*MAX_UNICAST_SOLICIT, in the time, not receiving NA message)
10a, with above-mentioned 7) in testing procedure 7a-7d;
10b, equipment under test 1 periodically send NS address resolution message to link-local;
10c, the maximum time interval RETRANS_TIMER (number of retransmissions) that transmission is set are 1s, and maximum transmission times MAX_UNICAST_SOLICIT (maximum unitcast request) is 3 times;
The maximum timer of 10d, equipment under test 1 neighbor table is
MAX_TIMER (maximum time)=RETRANS_TIMER (number of retransmissions) * MAX_UNICAST_SOLICIT (maximum unitcast request), MAX_TIMER (maximum time) timer starts countdown;
10e, within the maximum time of setting, do not receive that the NA message of equipment 3 is replied;
10f, check the current neighbor table state of equipment under test 1, the corresponding address item before 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 NA message to equipment under test 1;
C, equipment under test 2 recording parameterses, in local neighbor table, comprising: the IPv6 source address of equipment 1 and the source link layer address of equipment 1;
D, equipment under test 1 recording parameters, in local neighbor table, comprising: the IPv6 source address of equipment 2 and source link layer address;
E, equipment under test 1, according to the neighbor table information in equipment under test 1, send NS message to equipment under test 2, start NUD and detect;
F, obtain this NS message, resolve;
G, utilize NS message model checking parameters, and record result; Wherein, parameters is as follows:
ICMPv6_TYPE (icmp packet type): return to the types value in NS message
ICMPv6_Target Address (ICMPv6 destination address): return to global unicast address or link local address variable in NS message;
ICMPv6_Options TYPE (ICMPv6 option type): the types value that returns to Option Field in NS message;
ICMPv6_Options (ICMPv6 option): return to the Option Field variable in NS message;
Source Link-Layer Address (source link layer address);
H, equipment under test 2 are replied NA message to equipment under test 1;
I, obtain this NA message, resolve;
J, utilize NA message model checking parameters, and record result; Wherein, parameters is as follows:
ICMPv6_TYPE (icmp packet type): return to the types value in NS message;
ICMPv6_Target Address (ICMPv6 destination address): return to global unicast address or link local address variable in NA message;
ICMPv6_Options_TYPE (ICMPv6 option type): the types value that returns to Option Field in NA message;
ICMPv6_Options (ICMPv6 option): return to the Option Field variable in NA message;
Target Link-Layer Address (object link layer address);
ICMPv6_Solicited Flag (ICMPv6 request mark): the Option Field S flag bit variable that returns to NA message.
As shown in Figure 3, when specific implementation, can comprise the steps:
Step 301: the TCL test script writing is operated in test environment;
Step 302: input parameter test_module value, select test module;
Step 303: if test_module=1 represents that tested module is NUD status change module;
Step 304: input parameter status_module value, selection mode transition test submodule;
Step 305: if status_module=n (n=1,2......10) represents that tested status change is which kind situation recited above, moves the test case under this test environment then automatically;
Step 306: if status_module=all represents that 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 represents that tested module is NUD communication message module, moves the test case under this test environment then automatically;
Step 308: analyze message and status change result, automatically generate test result.
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, creation module 402, sending module 403.
Wherein, acquisition module 401, for obtaining the current state of neighbor table; Creation module 402, for creating the needed message of communication process; Sending module 403, for sending the message being created by creation module.In addition, can also be in sending module 403 built-in timer, to control the number of times that sends the time interval of message and repeat to send.
Wherein, acquisition module 401 may further include: the first acquiring unit 401a, for obtaining the state information of neighbor table specific address item; Second acquisition unit 401b, for obtaining the address information of neighbor table specific address item, wherein, this address information is mainly used in the address entries information of NUD list item and fills.
Wherein, creation module 402 may further include: the first creating unit 402a, for creating NS message, specifically comprises address resolution NS message and NUD state-detection NS message; The second creating unit 402b, for creating 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 communication message test module, and as shown in Figure 6, this communication message test module, comprising: acquisition module 601, parsing module 602, judge module 603.
Wherein, acquisition module 601, for the mutual message of obtaining communication process;
Parsing module 602, the mutual message obtaining for resolving acquisition module;
Judge module 603, whether consistent with defined message model for judging the message field (MFLD) of parsing module parsing.
Wherein, acquisition module 601 may further include: the first acquiring unit 601a, for the NS message of obtaining communication process; Second acquisition unit 601b, for the NA message of obtaining communication process.
In sum, integrated test facility and device according to NUD of the present invention, can move according to different test modules different test scripts, particularly in NUD status change test module, realized the test of ten kinds of status changes, overcome the demand that the angle of manual test in prior art cannot cover full test, can realize the comprehensive automatic test of NUD module.
More than in order to make those of ordinary skills understand the present invention; and the detailed description that the present invention is carried out; but can expect; within not departing from the scope that claim of the present invention contains, can also make other changes and modifications, these variations and revising all in protection scope of the present invention.

Claims (14)

1. an integrated test facility of NUD, is characterized in that, according to selecting, NUD first is tested automatically to any status change in the tenth status change, or described ten status changes are tested successively automatically, wherein,
The first status change is: from EMPTY to INCOMPLETE;
The second status change is: from EMPTY to STALE;
Third state transition are: from EMPTY to INCOMPLETE to REACHABLE;
The 4th status change is: 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;
For described the first status change, comprise the following steps:
1a, check that the current neighbor table state of equipment under test 1 is EMPTY;
1b, equipment under test 1 send NS address resolution message to link-local, and wherein, described NS address resolution message comprises: IPv6 destination address and object link layer address;
1c, when sending described message, check the address entries information that equipment under test 1 neighbor table is corresponding, comprising: the IPv6 destination address of this equipment under test and object 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, send NS overtime;
1f, check the current neighbor table state of equipment under test 1, the corresponding address item before set up is deleted.
2. the integrated test facility of NUD as claimed in claim 1, is characterized in that, for described the second status change, comprises the following steps:
2a, check the current neighbor table state of equipment under test 2, 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 the address entries information that equipment under test 2 neighbor table are corresponding, comprising: the IPv6 destination address of this equipment under test 2 and object link layer address;
2e, check the current neighbor table state of equipment under test 2, corresponding address entries state is STALE.
3. the integrated test facility of NUD as claimed in claim 1, is characterized in that, for described third state transition, comprises the following steps:
3a, carry out described testing procedure 1a-1d;
3b, equipment under test 2 send 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 address entries state corresponding to equipment under test 1 neighbor table is REACHABLE.
4. the integrated test facility of NUD as claimed in claim 3, is characterized in that, for described the 4th status change, comprises the following steps:
4a, carry out described testing procedure 3a-3d;
The REACHABLE_TIME of 4b, equipment under test 1 neighbor table can reach timer and set timing time, can reach timer and start countdown;
4c, reaching in the time that timer sets, do not receive the accessibility confirmatory message about equipment under test 2;
4d, check that address entries state corresponding to equipment under test 1 neighbor table is STALE.
5. the integrated test facility of NUD as claimed in claim 3, is characterized in that, for described the 5th status change, comprises the following steps:
5a, carry out described testing procedure 3a-3d;
5b, equipment under test 2 send NA message to equipment under test 1, and the constructing variable of this NA message is:
ICMPv6 request marks unequal to 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 address entries state corresponding to equipment under test 1 neighbor table is STALE.
6. the integrated test facility of NUD as claimed in claim 5, is characterized in that, for described the 6th status change, comprises the following steps:
6a, carry out described 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 address entries state corresponding to equipment under test 1 neighbor table is DELAY.
7. the integrated test facility of NUD as claimed in claim 6, is characterized in that, for described the 7th status change, comprises the following steps:
7a, carry out described testing procedure 6a-6d;
7b, the DELAY_FIRST_PROBE_TIMER time delay of equipment under test 1 neighbor table is acted on behalf of to timer carry out time setting, time delay is acted on behalf of timer and is started 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 address entries state corresponding to equipment under test 1 neighbor table is PROBE.
8. the integrated test facility of NUD as claimed in claim 6, is characterized in that, for described the 8th status change, comprises the following steps:
8a, carry out described testing procedure 6a-6d;
8b, the time delay of equipment under test 1 neighbor table is acted on behalf of to timer carry out time setting, time delay is acted on behalf of timer and is started 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 2 is replied;
8d, check that address entries state corresponding to equipment under test 1 neighbor table is REACHABLE.
9. the integrated test facility of NUD as claimed in claim 7, is characterized in that, for described the 9th status change, comprises the following steps:
9a, carry out described testing procedure 7a-7d;
9b, equipment under test 1 periodically send NS address resolution message to link-local;
9c, the maximum time interval RETRANS_TIMER that transmission is set are 1s, and maximum transmission times MAX_UNICAST_SOLICIT is 3 times; Wherein, MAX_UNICAST_SOLICIT is maximum unitcast request number of times;
The maximum timer of 9d, equipment under test 1 neighbor table is
MAX_TIMER=RETRANS_TIMER*MAX_UNICAST_SOLICIT,
MAX_TIMER timer starts countdown; Wherein, MAX_TIMER is maximum time;
9e, within the maximum time of setting, receive that the NA of equipment under test 2 replys;
9f, check that address entries state corresponding to equipment under test 1 neighbor table is REACHABLE.
10. the integrated test facility of NUD as claimed in claim 7, is characterized in that, for described the tenth status change, comprises the following steps:
10a, carry out described testing procedure 7a-7d;
10b, equipment under test 1 periodically send NS address resolution message to link-local;
10c, the maximum time interval RETRANS_TIMER that transmission is set are 1s, and maximum transmission 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 timer of 10d, equipment under test 1 neighbor table is
MAX_TIMER=RETRANS_TIMER*MAX_UNICAST_SOLICIT,
MAX_TIMER timer starts countdown; Wherein, MAX_TIMER is maximum time;
10e, within the maximum time of setting, do not receive that the NA message of equipment under test 2 is replied;
10f, check the current neighbor table state of equipment under test 1, the corresponding address item before set up is deleted.
The integrated test facility of 11. NUD as described in any one in claim 1 to 10, is characterized in that, when carrying out the test of NUD status change, optionally carries out the test of NUD communication message, and described 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 NA message to equipment under test 1;
11c, equipment under test 2 recording parameterses, in local neighbor table, comprising: the IPv6 source address of equipment under test 1 and the source link layer address of equipment under test 1;
11d, equipment under test 1 recording parameters, in local neighbor table, comprising: the IPv6 source address of equipment under test 2 and source link layer address;
11e, equipment under test 1, according to the neighbor table information in equipment under test 1, send NS message to equipment under test 2, start NUD and detect;
11f, obtain this NS message, resolve;
11g, utilize NS message model checking parameters, and record result;
11h, equipment under test 2 are replied NA message to equipment under test 1;
11i, obtain this NA message, resolve;
11j, utilize NA message model checking parameters, and record result.
The device of 12. 1 kinds of execution method as described in any one in claim 1 to 10, it is characterized in that, comprise NUD state verification module, for according to selecting, NUD first being tested automatically to the tenth any status change of status change, or described ten status changes are tested successively automatically.
13. devices as claimed in claim 12, is characterized in that, described NUD state verification module, comprises, acquisition module, creation module and sending module, wherein,
Described acquisition module, for obtaining state information and the address information of neighbor table specific address item;
Described creation module, for creating the needed NS message of communication process or NA message;
Described sending module, for sending the message being created by creation module.
14. devices as claimed in claim 12, is characterized in that, further comprise communication message test module, and described communication message test module, comprising: acquisition module, parsing module and judge module, wherein,
Described acquisition module, for the mutual message of obtaining communication process, comprises NS message and NA message;
Described parsing module, the mutual message obtaining for resolving acquisition module, comprises NS message and NA message;
Described judge module, whether consistent with defined message model for judging the message field (MFLD) of parsing module parsing.
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 CN102404168A (en) 2012-04-04
CN102404168B true 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)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107453901A (en) * 2017-07-28 2017-12-08 重庆金美通信有限责任公司 Method for graphically simulating OSPF network and realizing automatic test of routing capacity, routing convergence and routing oscillation
CN113535581B (en) * 2021-07-30 2023-12-12 东风商用车有限公司 Test script generation method, device, equipment and computer readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1540928A (en) * 2003-10-27 2004-10-27 中国科学院计算技术研究所 Method for designing cases for testing consistency with protocol of internet of next generation
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

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6597664B1 (en) * 1999-08-19 2003-07-22 Massachusetts Institute Of Technology Digital circuit synthesis system
CN1225695C (en) * 2002-01-11 2005-11-02 互慧科技股份有限公司 Program test system and method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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 中国科学院计算技术研究所 Method for designing cases for testing consistency with protocol of internet of next generation
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

Also Published As

Publication number Publication date
CN102404168A (en) 2012-04-04

Similar Documents

Publication Publication Date Title
CN110401568B (en) Network topology discovery method and equipment
CN101945043B (en) Topology discovery system of next generation Internet based on IPv6 (Internet Protocol Version 6) and realizing method thereof
CN113595897B (en) Path detection method and device
CN102571587B (en) Method and equipment for forwarding messages
CN101621414A (en) Method and apparatus for discovering network resource and topology
CN101917305A (en) Method for automatically checking topology in automatic test and automatic test system
CN108401037A (en) User terminal and the binding method of equipment, device and system
CN101771604B (en) Routing detection method, system and intermediate routing device
CN101854648A (en) Testing method, device and testing system for single board of communication apparatus
WO2013185731A2 (en) Method and system for managing ipv6 address conflict automatically
Chen et al. DAC: Generic and automatic address configuration for data center networks
CN108270602A (en) A kind of detection method of data link, apparatus and system
CN101848223B (en) Network processor-based method and device for realizing quick bidirectional forwarding detection of messages
Bartolozzi et al. ns-3 RPL module: IPv6 routing protocol for low power and lossy networks
CN106067862A (en) The construction method of network topology and device
CN104022956A (en) Method and device for data message processing in location/ID separation protocol network
CN102404168B (en) Method and device for comprehensively testing NUD
CN101771615A (en) Neighborhood relationship building method, communication equipment and system thereof
CN103002489A (en) Neighbor node discovery table item updating method and node device
CN104348731A (en) Community virtual network connection establishing method and network communication system
CN104579809B (en) The detection method and equipment of a kind of stacking splitting
WO2014079235A1 (en) Method, user node and remote access server for releasing address
CN104506440B (en) The data packet sending method and routing table amending method of router
CN101656639B (en) Empty identifying method, device and receiving equipment for MLPPP link
Siljanovski et al. Service discovery in resource constrained networks using multicast DNS

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 for 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.