#!/usr/bin/perl # # $Copyright$ # # $Id: DADSuccess_DADPostSendNS.seq,v 1.1.1.1 2000/09/28 00:15:16 sekiya Exp $ ######################################################################## BEGIN { $V6evalTool::TestVersion = '$Name: $ '; } use V6evalTool; use DAD; #----- get sequence arguments $howto_initNUT="none"; $send = "ok"; foreach (@ARGV) { /^addrconf=(\S+)/ && do {$DAD::howto_addrconf=$1; # How to configure address of NUT? next; }; # sample: boot, ra, manual+_GLOBAL0A0N_UCAST /^init=(\S+)/ && do {$howto_initNUT=$1; # How to initialize NUT? next; }; # sample: none, DADSuccess_boot, DADFail_boot /^send=(\S+)/ && do {$send=$1; # "none" if send no pakcet to NUT in state DADPostSendNS next; }; # sample: ok, none /^sd=(\S+)/ && do {$seqdebugopt=$1; # sequence debug options next; }; # sample: qR seqERROR("Unknown sequence option '$_'"); } #----- test condition $IF=Link0; # network interface seqSetDADParam($seqdebugopt); #----- set %pktdesc seqSetPktdesc(); #----- initialize NUT vLog("*** Target initialization phase ***"); seqInitNUT($IF, $howto_initNUT); #----- start Capturing vLog("*** Target testing phase ***"); vCapture($IF); #----- Configure Address on NUT seqConfAddrNUT($IF); #----- wait a DAD NS comming from NUT %ret=seqWaitDADNSfromNUT($IF); #----- if received frame is a DAD NS if( $ret{status} == 0) { vLog("TN received the DAD NS sends from NUT."); #----- send a no packet or invalid DAD NS to NUT if ($send eq "none" ) { vLog("TN send no Packet to NUT."); }else{ vLog("TN send the strange DAD Packet($DAD::dadpkt_to_NUT) to NUT, check if NUT ignore this."); %ret=vSend($IF, $DAD::dadpkt_to_NUT); seqERROR(vErrmsg(%ret)) if $ret{status} != 0 ; } #----- wait for NUT to finish DAD vSleep($DAD::RetransTimerSec, "Wait for NUT to finish DAD. ($DAD::RetransTimerSec [sec])"); #----- check if NUT's address is configured #seqWaitNUTbeReady(); vSleep($DAD::RetransTimerSec); if (seqCheckNUTAddrConfigured($IF) eq TRUE) { seqOK(); }else{ seqNG(); } } #----- if timeout if( $ret{status} == 1 ) { #timeout vLog("TN received no DAD NS sends from NUT. It seems that NUT doesn't perform DAD process."); #----- check if NUT's address is configured #seqWaitNUTbeReady(); vSleep($DAD::RetransTimerSec); if (seqCheckNUTAddrConfigured($IF) eq TRUE) { vLog('Without DAD, NUT assigned the address to the interface.'); if ($DAD::DupAddrDetectTransmits == 0) { vLog("So DupAddrDetectTransmits == 0"); seqOK(); }else{ seqNG(); } }else{ vLog("NUT's interface is down or in strange state."); seqNG(); } } #----- error if( $ret{status} != 0 ) { seqERROR(vErrmsg(%ret)); #exit } #end ###################################################################### __END__ =head1 NAME DADSuccess_DADPostSendNS - check if NUT does not detect address duplication in state DADPostSendNS(after sending out first DAD NS) =head1 TARGET Host and Router =head1 SYNOPSIS DADSuccess_DADPostSendNS.seq [-tooloption ...] -pkt [addrconf=] [init=,...] [send=] [sd=] -tooloption : v6eval tool option : packet definition file (v6eval tool option) : how to configure address on NUT; boot/manual+/ra : how to initialize NUT; DADSuccess_boot/DADFail_boot/ra : send packet or not when NUT performs DAD; none/send : debug options =begin html
 detail of v6eval tool option: see perldoc V6evalTool.pm, perldoc V6evalRemote.pm
 detail of parameters: see Test sequence for IPv6 Stateless Address Autoconfiguration.
=end html =head1 INITIALIZATION =begin html
 detail of Initialization: see Test sequence for IPv6 Stateless Address Autoconfiguration.
=end html =head1 TEST PROCEDURE The following tests are prepared in this test package. See INDEX file. B DAD Success when NUT received no packet on Stateless Link-local address autoconfiguration DAD Success when NUT received Invalid NS (Dst addr is Allnodes) on Stateless Link-local address autoconfiguration DAD Success when NUT received Invalid NS (Dst addr is Tentative) on Stateless Link-local address autoconfiguration DAD Success when NUT received Invalid NS (Hoplimit != 255) on Stateless Link-local address autoconfiguration DAD Success when NUT received Invalid NS (Include SLL opt) on Stateless Link-local address autoconfiguration DAD Success when NUT received NS (Src addr is Unicast) on Stateless Link-local address autoconfiguration DAD Success when NUT received Invalid NA (Hoplimit != 255) on Stateless Link-local address autoconfiguration DAD Success when NUT received Invalid NA (S flag == 1) on Stateless Link-local address autoconfiguration DAD Success when NUT received NA (Dst addr is unicast) on Stateless Link-local address autoconfiguration DAD Success when NUT received no packet on Manual Link-local address configuration DAD Success when NUT received no packet on Manual Global address configuration DAD Success when NUT received Invalid NS (Dst addr is Allnodes) on Manual Global address configuration DAD Success when NUT received Invalid NS (Dst addr is Tentative) on Manual Global address configuration B TN(or X) NUT ------------------------------ Initialize NUT (see ...) Configure address of NUT (boot or manual or ra, see ...) TN wait the DAD NS sends from NUT <=== Judgement #1: DAD NS ==== name: dadns_from_NUT Immediately (within $RetransTimerSec [sec]) send strange DAD Packet to NUT to check if NUT ignore this. ==== Action #1: DAD NS ====> name: dadpkt_to_NUT Wait for NUT to finish DAD. (sleep $RetransTimerSec [sec]) Check if NUT's address is configured ==== Action #2: DAD NS ====> name: chkconf_dadns_to_NUT DAD NA come from NUT because NUT does not detect address duplication and address is configured. <=== Judgement #2: DAD NA ==== name: chkconf_dadna_from_NUT (or chkconf_dadna_from_NUT_rf1 if NUT is a Router) =head1 JUDGEMENT B B< DAD Success when NUT received no packet on Stateless Link-local address autoconfiguration -pkt LLOCAL.def addrconf=boot send=none> Judgement #1. DAD NS must come from NUT on Link-local address autoconfiguration. name: dadns_from_NUT src: ::0 dst: solnode[NUT's tentative Link-local address] TargetAddress: NUT's tentative Link-local address Action #1. Send No Packet to NUT (NUT does not detect address duplication). Action #2. Send DAD NS to check if NUT's address is configured name: chkconf_dadns_to_NUT src: ::0 dst: solnode[NUT's Link-local address] TargetAddress: NUT's Link-local address Judgement #2. DAD NA must come from NUT because NUT does not detect address duplication. name: chkconf_dadna_from_NUT (or chkconf_dadna_from_NUT_rf1 if NUT is a Router) src: NUT's Link-local address dst: allnodes multicast TargetAddress: NUT's Link-local address OFlag: 1 RFlag: 0 ( if NUT is a Router then 1) B< DAD Success when NUT received Invalid NS (Dst addr is Allnodes) on Stateless Link-local address autoconfiguration -pkt LLOCAL_invalNS_dst_allnodes.def addrconf=boot> Judgement #1. DAD NS must come from NUT on Link-local address autoconfiguration. name: dadns_from_NUT src: ::0 dst: solnode[NUT's tentative Link-local address] TargetAddress: NUT's tentative Link-local address Action #1. Send Invalid DAD NS to NUT to check if NUT ignore this. name: dadpkt_to_NUT src: ::0 dst: allnodes multicast (invalid, it must be solnode) TargetAddress: NUT's Link-local address Action #2. Send DAD NS to check if NUT's address is not configured name: chkconf_dadns_to_NUT src: ::0 dst: solnode[NUT's Link-local address] TargetAddress: NUT's Link-local address Judgement #2. DAD NA must not come from NUT because NUT detect address duplication. name: chkconf_dadna_from_NUT (or chkconf_dadna_from_NUT_rf1 if NUT is a Router) src: NUT's Link-local address dst: allnodes multicast TargetAddress: NUT's Link-local address OFlag: 1 RFlag: 0 ( if NUT is a Router then 1) B< DAD Success when NUT received Invalid NS (Dst addr is Tentative) on Stateless Link-local address autoconfiguration -pkt LLOCAL_invalNS_dst_tentative.def addrconf=boot> Judgement #1. DAD NS must come from NUT on Link-local address autoconfiguration. name: dadns_from_NUT src: ::0 dst: solnode[NUT's tentative Link-local address] TargetAddress: NUT's tentative Link-local address Action #1. Send Invalid DAD NS to NUT to check if NUT ignore this. name: dadpkt_to_NUT src: ::0 dst: NUT's tentative address (invalid, it must be solnode) TargetAddress: NUT's tentative Link-local address Action #2. Send DAD NS to check if NUT's address is configured name: chkconf_dadns_to_NUT src: ::0 dst: solnode[NUT's Link-local address] TargetAddress: NUT's Link-local address Judgement #2. DAD NA must come from NUT because NUT does not detect address duplication. name: chkconf_dadna_from_NUT (or chkconf_dadna_from_NUT_rf1 if NUT is a Router) src: NUT's Link-local address dst: allnodes multicast TargetAddress: NUT's Link-local address OFlag: 1 RFlag: 0 ( if NUT is a Router then 1) B< DAD Success when NUT received Invalid NS (Hoplimit != 255) on Stateless Link-local address autoconfiguration -pkt LLOCAL_invalNS_hoplimit.def addrconf=boot> Judgement #1. DAD NS must come from NUT on Link-local address autoconfiguration. name: dadns_from_NUT src: ::0 dst: solnode[NUT's tentative Link-local address] TargetAddress: NUT's tentative Link-local address Action #1. Send Invalid DAD NS to NUT to check if NUT ignore this. name: dadpkt_to_NUT src: ::0 dst: solnode[NUT's tentative Link-local address] hoplimit: 64 (invalid, it must be 255) TargetAddress: NUT's tentative Link-local address Action #2. Send DAD NS to check if NUT's address is configured name: chkconf_dadns_to_NUT src: ::0 dst: solnode[NUT's Link-local address] TargetAddress: NUT's Link-local address Judgement #2. DAD NA must come from NUT because NUT does not detect address duplication. name: chkconf_dadna_from_NUT (or chkconf_dadna_from_NUT_rf1 if NUT is a Router) src: NUT's Link-local address dst: allnodes multicast TargetAddress: NUT's Link-local address OFlag: 1 RFlag: 0 ( if NUT is a Router then 1) B< DAD Success when NUT received Invalid NS (Include SLL opt) on Stateless Link-local address autoconfiguration -pkt LLOCAL_invalNS_sllopt.def addrconf=boot> Judgement #1. DAD NS must come from NUT on Link-local address autoconfiguration. name: dadns_from_NUT src: ::0 dst: solnode[NUT's tentative Link-local address] TargetAddress: NUT's tentative Link-local address Action #1. Send Invalid DAD NS to NUT to check if NUT ignore this. name: dadpkt_to_NUT src: ::0 dst: solnode[NUT's tentative Link-local address] TargetAddress: NUT's tentative Link-local address SLL option exists (invalid, it must not exists SLL option) Action #2. Send DAD NS to check if NUT's address is configured name: chkconf_dadns_to_NUT src: ::0 dst: solnode[NUT's Link-local address] TargetAddress: NUT's Link-local address Judgement #2. DAD NA must come from NUT because NUT does not detect address duplication. name: chkconf_dadna_from_NUT (or chkconf_dadna_from_NUT_rf1 if NUT is a Router) src: NUT's Link-local address dst: allnodes multicast TargetAddress: NUT's Link-local address OFlag: 1 RFlag: 0 ( if NUT is a Router then 1) B< DAD Success when NUT received NS (Src addr is Unicast) on Stateless Link-local address autoconfiguration -pkt LLOCAL_irregNS_src_ucast.def addrconf=boot> Judgement #1. DAD NS must come from NUT on Link-local address autoconfiguration. name: dadns_from_NUT src: ::0 dst: solnode[NUT's tentative Link-local address] TargetAddress: NUT's tentative Link-local address Action #1. Send strange DAD NS to NUT to check if NUT ignore this. name: dadpkt_to_NUT src: unicast address (NUT's tentative address) (invalid, it must be ::0) dst: solnode[NUT's tentative Link-local address] TargetAddress: NUT's tentative Link-local address Action #2. Send DAD NS to check if NUT's address is configured name: chkconf_dadns_to_NUT src: ::0 dst: solnode[NUT's Link-local address] TargetAddress: NUT's Link-local address Judgement #2. DAD NA come from NUT because NUT does not detect address duplication. name: chkconf_dadna_from_NUT (or chkconf_dadna_from_NUT_rf1 if NUT is a Router) src: NUT's Link-local address dst: allnodes multicast TargetAddress: NUT's Link-local address OFlag: 1 RFlag: 0 ( if NUT is a Router then 1) B< DAD Success when NUT received Invalid NA (Hoplimit != 255) on Stateless Link-local address autoconfiguration -pkt LLOCAL_invalNA_hoplimit.def addrconf=boot> Judgement #1. DAD NS must come from NUT on Link-local address autoconfiguration. name: dadns_from_NUT src: ::0 dst: solnode[NUT's tentative Link-local address] TargetAddress: NUT's tentative Link-local address Action #1. Send Invalid DAD NA to NUT to check if NUT ignore this. name: dadpkt_to_NUT ether src: different as NUT's MAC address src: NUT's tentative Link-local address dst: allnodes multicast TargetAddress: NUT's tentative Link-local address hoplimit: 64 (invalid, it must be 255) Action #2. Send DAD NS to check if NUT's address is configured name: chkconf_dadns_to_NUT src: ::0 dst: solnode[NUT's Link-local address] TargetAddress: NUT's Link-local address Judgement #2. DAD NA come from NUT because NUT does not detect address duplication. name: chkconf_dadna_from_NUT (or chkconf_dadna_from_NUT_rf1 if NUT is a Router) src: NUT's Link-local address dst: allnodes multicast TargetAddress: NUT's Link-local address OFlag: 1 RFlag: 0 ( if NUT is a Router then 1) B< DAD Success when NUT received Invalid NA (S flag == 1) on Stateless Link-local address autoconfiguration -pkt LLOCAL_invalNA_sflag1.def addrconf=boot> Judgement #1. DAD NS must come from NUT on Link-local address autoconfiguration. name: dadns_from_NUT src: ::0 dst: solnode[NUT's tentative Link-local address] TargetAddress: NUT's tentative Link-local address Action #1. Send Invalid DAD NA to NUT to check if NUT ignore this. name: dadpkt_to_NUT ether src: different as NUT's MAC address src: NUT's tentative Link-local address dst: allnodes multicast TargetAddress: NUT's tentative Link-local address SFlag: 1 ( invalid, must be zero if DestinationAddress is a multicast) Action #2. Send DAD NS to check if NUT's address is configured name: chkconf_dadns_to_NUT src: ::0 dst: solnode[NUT's Link-local address] TargetAddress: NUT's Link-local address Judgement #2. DAD NA come from NUT because NUT does not detect address duplication. name: chkconf_dadna_from_NUT (or chkconf_dadna_from_NUT_rf1 if NUT is a Router) src: NUT's Link-local address dst: allnodes multicast TargetAddress: NUT's Link-local address OFlag: 1 RFlag: 0 ( if NUT is a Router then 1) B< DAD Success when NUT received NA (Dst addr is unicast) on Stateless Link-local address autoconfiguration -pkt LLOCAL_unspecNA_dst_ucast.def addrconf=boot> Judgement #1. DAD NS must come from NUT on Link-local address autoconfiguration. name: dadns_from_NUT src: ::0 dst: solnode[NUT's tentative Link-local address] TargetAddress: NUT's tentative Link-local address Action #1. Send strange DAD NA to NUT to check if NUT ignore this. name: dadpkt_to_NUT ether src: different as NUT's MAC address src: NUT's Link-local address dst: NUT's Link-local address ... Regularly dst is allnodes multicast. At this point, NUT doesnot assign the address, so NUT cannot accept the packet and cannot detect address duplication. It's not specified in RFC but looks like natural. TargetAddress: NUT's tentative Link-local address Action #2. Send DAD NS to check if NUT's address is configured name: chkconf_dadns_to_NUT src: ::0 dst: solnode[NUT's Link-local address] TargetAddress: NUT's Link-local address Judgement #2. DAD NA come from NUT because NUT does not detect address duplication. name: chkconf_dadna_from_NUT (or chkconf_dadna_from_NUT_rf1 if NUT is a Router) src: NUT's Link-local address dst: allnodes multicast TargetAddress: NUT's Link-local address OFlag: 1 RFlag: 0 ( if NUT is a Router then 1) B< DAD Success when NUT received no packet on Manual Link-local address configuration -pkt LLOCAL0A0N.def addrconf=manual+_LLOCAL0A0N_UCAST init=DADSuccess_boot send=none> Judgement #1. DAD NS must come from NUT on Manual Link-local address configuration. name: dadns_from_NUT src: ::0 dst: solnode[NUT's tentative _LLOCAL0A0N_UCAST_ADDR] TargetAddress: NUT's tentative _LLOCAL0A0N_UCAST_ADDR Action #1. Send No Packet to NUT (NUT does not detect address duplication). Action #2. Send DAD NS to check if NUT's address is configured name: chkconf_dadns_to_NUT src: ::0 dst: solnode[NUT's _LLOCAL0A0N_UCAST_ADDR] TargetAddress: NUT's _LLOCAL0A0N_UCAST_ADDR Judgement #2. DAD NA must come from NUT because NUT does not detect address duplication. name: chkconf_dadna_from_NUT (or chkconf_dadna_from_NUT_rf1 if NUT is a Router) src: NUT's _LLOCAL0A0N_UCAST_ADDR dst: allnodes multicast TargetAddress: NUT's _LLOCAL0A0N_UCAST_ADDR OFlag: 1 RFlag: 0 ( if NUT is a Router then 1) B< DAD Success when NUT received no packet on Manual Global address configuration -pkt GLOBAL0A0N.def addrconf=manual+_GLOBAL0A0N_UCAST init=DADSuccess_boot send=none> Judgement #1. DAD NS must come from NUT on Manual Link-local address configuration. name: dadns_from_NUT src: ::0 dst: solnode[NUT's tentative _GLOBAL0A0N_UCAST_ADDR] TargetAddress: NUT's tentative _GLOBAL0A0N_UCAST_ADDR Action #1. Send No Packet to NUT (NUT does not detect address duplication). Action #2. Send DAD NS to check if NUT's address is configured name: chkconf_dadns_to_NUT src: ::0 dst: solnode[NUT's _GLOBAL0A0N_UCAST_ADDR] TargetAddress: NUT's _GLOBAL0A0N_UCAST_ADDR Judgement #2. DAD NA must come from NUT because NUT does not detect address duplication. name: chkconf_dadna_from_NUT (or chkconf_dadna_from_NUT_rf1 if NUT is a Router) src: NUT's _GLOBAL0A0N_UCAST_ADDR dst: allnodes multicast TargetAddress: NUT's _GLOBAL0A0N_UCAST_ADDR OFlag: 1 RFlag: 0 ( if NUT is a Router then 1) B< DAD Success when NUT received Invalid NS (Dst addr is Allnodes) on Manual Global address configuration -pkt GLOBAL0A0N_invalNS_dst_allnodes.def addrconf=manual+_GLOBAL0A0N_UCAST init=DADSuccess_boot> Judgement #1. DAD NS must come from NUT on Manual Link-local address configuration. name: dadns_from_NUT src: ::0 dst: solnode[NUT's tentative _GLOBAL0A0N_UCAST_ADDR] TargetAddress: NUT's tentative _GLOBAL0A0N_UCAST_ADDR Action #1. Send Invalid DAD NS to NUT to check if NUT ignore this. name: dadpkt_to_NUT src: ::0 dst: allnodes multicast (invalid, it must be solnode) TargetAddress: NUT's tentative _GLOBAL0A0N_UCAST_ADDR Action #2. Send DAD NS to check if NUT's address is configured name: chkconf_dadns_to_NUT src: ::0 dst: solnode[NUT's _GLOBAL0A0N_UCAST_ADDR] TargetAddress: NUT's _GLOBAL0A0N_UCAST_ADDR Judgement #2. DAD NA must come from NUT because NUT does not detect address duplication. name: chkconf_dadna_from_NUT (or chkconf_dadna_from_NUT_rf1 if NUT is a Router) src: NUT's _GLOBAL0A0N_UCAST_ADDR dst: allnodes multicast TargetAddress: NUT's _GLOBAL0A0N_UCAST_ADDR OFlag: 1 RFlag: 0 ( if NUT is a Router then 1) B< DAD Success when NUT received Invalid NS (Dst addr is Tentative) on Manual Global address configuration -pkt GLOBAL0A0N_invalNS_dst_tentative.def addrconf=manual+_GLOBAL0A0N_UCAST init=DADSuccess_boot> Judgement #1. DAD NS must come from NUT on Manual Link-local address configuration. name: dadns_from_NUT src: ::0 dst: solnode[NUT's tentative _GLOBAL0A0N_UCAST_ADDR] TargetAddress: NUT's tentative _GLOBAL0A0N_UCAST_ADDR Action #1. Send Invalid DAD NS to NUT to check if NUT ignore this. name: dadpkt_to_NUT src: ::0 dst: NUT's tentative address _GLOBAL0A0N_UCAST_ADDR (invalid, it must be solnode) TargetAddress: NUT's tentative _GLOBAL0A0N_UCAST_ADDR Action #2. Send DAD NS to check if NUT's address is configured name: chkconf_dadns_to_NUT src: ::0 dst: solnode[NUT's _GLOBAL0A0N_UCAST_ADDR] TargetAddress: NUT's _GLOBAL0A0N_UCAST_ADDR Judgement #2. DAD NA must come from NUT because NUT does not detect address duplication. name: chkconf_dadna_from_NUT (or chkconf_dadna_from_NUT_rf1 if NUT is a Router) src: NUT's _GLOBAL0A0N_UCAST_ADDR dst: allnodes multicast TargetAddress: NUT's _GLOBAL0A0N_UCAST_ADDR OFlag: 1 RFlag: 0 ( if NUT is a Router then 1) =head1 SEE ALSO =begin html
 detail of v6eval tool option: see perldoc V6evalTool.pm, perldoc V6evalRemote.pm
 detail of parameters: see Test sequence for IPv6 Stateless Address Autoconfiguration.
=end html =cut