#!/usr/bin/perl # # $Copyright$ # # $Id: DADFail_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"; 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 /^sd=(\S+)/ && do {$seqdebugopt=$1; # sequence debug options next; }; # sample: qR /^dadfail=(\S+)/ && do {$exst_dadfail=$1; # exit status of dad fail next; }; # default: OK /^dadsuccess=(\S+)/ && do {$exst_dadsuccess=$1; # exit status of dad success next; }; # default: NG 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 DAD Packet to NUT vLog("TN send the DAD Packet($DAD::dadpkt_to_NUT) to NUT to force NUT to be state DADFinishFail."); %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) { vLog("Although TN send the DAD NS to NUT, NUT assigned the address to the interface."); seqExitWARN() if $exst_dadsuccess eq "WARN"; seqNG(); }else{ seqExitWARN() if $exst_dadfail eq "WARN"; seqOK(); } } #----- if timeout if( $ret{status} == 1 ) { #timeout vLog("TN received no DAD Packet send 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 DADFail_DADPostSendNS - check if NUT detect address duplication in state DADPostSendNS(after sending out first DAD NS) =head1 TARGET Host and Router =head1 SYNOPSIS DADFail_DADPostSendNS.seq [-tooloption ...] -pkt [addrconf=] [init=,...] [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 : 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 Fail when NUT received Valid NS (dst MAC addr != MAC addr of NUT) on Stateless Link-local address autoconfiguration DAD Fail when NUT received Valid NA (dst MAC addr != MAC addr of NUT) on Stateless Link-local address autoconfiguration DAD Fail when NUT received Valid NS (dst MAC addr == MAC addr of NUT) on Stateless Link-local address autoconfiguration DAD Fail when NUT received Valid NA (dst MAC addr == MAC addr of NUT) on Stateless Link-local address autoconfiguration DAD Fail when NUT received NA (No TLL option) on Stateless Link-local address autoconfiguration DAD Fail when NUT received NA (dst addr == solicited node multicast) on Stateless Link-local address autoconfiguration DAD Fail when NUT received Valid NS (dst MAC addr == MAC addr of NUT) on Manual Global address configuration DAD Fail when NUT received Valid NA (dst MAC addr == MAC addr of NUT) 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 DAD Packet to force NUT to detect address duplication. ==== Action #1: DAD NS ====> name: dadpkt_to_NUT Wait for NUT to finish DAD. (sleep $RetransTimerSec [sec]) Check if NUT's address is not configured ==== Action #2: DAD NS ====> name: chkconf_dadns_to_NUT DAD NA does not come because NUT detect address duplicated and address is not configured. <=== Judgement #2: DAD NA does not come==== name: chkconf_dadna_from_NUT (or chkconf_dadna_from_NUT_rf1 if NUT is a Router) =head1 JUDGEMENT B B< DAD Fail when NUT received Valid NS (dst MAC addr != MAC addr of NUT) on Stateless Link-local address autoconfiguration -pkt LLOCAL_valNS_DiffMacAddr.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 DAD NS to force NUT to detect address duplication. name: dadpkt_to_NUT ether src: different as NUT's MAC address src: ::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 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 Fail when NUT received Valid NA (dst MAC addr != MAC addr of NUT) on Stateless Link-local address autoconfiguration -pkt LLOCAL_valNA_DiffMacAddr.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 DAD NA to force NUT to detect address duplication. 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 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 Fail when NUT received Valid NS (dst MAC addr == MAC addr of NUT) on Stateless Link-local address autoconfiguration -pkt LLOCAL_valNS_SameMacAddr.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 DAD NS to force NUT to detect address duplication. name: dadpkt_to_NUT ether src: the same as NUT's MAC address src: ::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 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 Fail when NUT received Valid NA (dst MAC addr == MAC addr of NUT) on Stateless Link-local address autoconfiguration -pkt LLOCAL_valNA_SameMacAddr.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 DAD NA to force NUT to detect address duplication. name: dadpkt_to_NUT ether src: the same as NUT's MAC address src: NUT's tentative Link-local address dst: allnodes multicast TargetAddress: NUT's tentative 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 Fail when NUT received NA (No TLL option) on Stateless Link-local address autoconfiguration -pkt LLOCAL_irregNA_notllopt.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 DAD NA to force NUT to detect address duplication. name: dadpkt_to_NUT src: NUT's tentative Link-local address dst: allnodes multicast No TLL option ... TLL option must include on sending NA. TargetAddress: NUT's tentative 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 does 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 Fail when NUT received NA (dst addr == solicited node multicast) on Stateless Link-local address autoconfiguration -pkt LLOCAL_unspecNA_dst_solnode.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 DAD NA to force NUT to detect address duplication. name: dadpkt_to_NUT src: NUT's tentative Link-local address dst: solnode[NUT's Link-local address] ... Regularly dst is allnode multicast, but NUT's interface receives solnode too, so NUT accept the packet and 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 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 does 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 Fail when NUT received Valid NS (dst MAC addr == MAC addr of NUT) on Manual Global address configuration -pkt GLOBAL0A0N_valNS_SameMacAddr.def addrconf=manual+_GLOBAL0A0N_UCAST init=DADSuccess_boot> Judgement #1. DAD NS must come from NUT on Manual Global 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 DAD NS to force NUT to detect address duplication. name: dadpkt_to_NUT ether src: the same as NUT's MAC address src: ::0 dst: solnode[NUT's tentative _GLOBAL0A0N_UCAST_ADDR] TargetAddress: NUT's tentative _GLOBAL0A0N_UCAST_ADDR 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 _GLOBAL0A0N_UCAST_ADDR] TargetAddress: NUT's _GLOBAL0A0N_UCAST_ADDR 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 or _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 Fail when NUT received Valid NA (dst MAC addr == MAC addr of NUT) on Manual Global address configuration -pkt GLOBAL0A0N_valNA_SameMacAddr.def addrconf=manual+_GLOBAL0A0N_UCAST init=DADSuccess_boot> Judgement #1. DAD NS must come from NUT on Manual Global 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 DAD NA to force NUT to detect address duplication. name: dadpkt_to_NUT ether src: the same as NUT's MAC address src: NUT's tentative _GLOBAL0A0N_UCAST_ADDR dst: allnodes multicast TargetAddress: NUT's tentative _GLOBAL0A0N_UCAST_ADDR 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 _GLOBAL0A0N_UCAST_ADDR] TargetAddress: NUT's _GLOBAL0A0N_UCAST_ADDR 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 or _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