#!/usr/bin/perl # #$Copyright$ # #$Id: C_RFC3646_3_DnsSvrOpt_Req.seq,v 1.1 2007/02/08 01:20:23 hide Exp $ ############################################################################### BEGIN{ $V6evalTool::TestVersion = '$Name: $'; } use strict; use V6evalTool; use lib '../.'; use DHCPv6_common; use Client_pktdesc; dhcpExitNS if ChkFuncSupport('DNS'); #--------------------------------------------------------------# # Initialize variables #--------------------------------------------------------------# my $IF0_NUT = $V6evalTool::NutDef{"Link0_device"}; my $IF0 = "Link0"; vCapture($IF0); #--------------------------------------------------------------# # Initiate DHCPv6 Client #--------------------------------------------------------------# my $ret = initial_ra_w_ping($IF0,'ra_server2_to_all_MO_1'); if($ret == 0){ vLogHTML('Global Address of NUT is assigned by RA!
'); dhcpExitFail; } $ret = vRemote("dhcp6c.rmt", "start", "iana", "iaid=111111", "dns", "link0=$IF0_NUT"); if($ret != 0) { vLogHTML('Cannot Initialize DHCPv6 Client program.
'); dhcpExitFail; }; #--------------------------------------------------------------# # 1. Wait until Solicit arrives #--------------------------------------------------------------# my ($retsol,%sol) = wait_for_solicit($IF0,30) ; if($retsol != 0){ dhcpExitFail; } #--------------------------------------------------------------# # 2. send Advertise message #--------------------------------------------------------------# $SID_OPTION = "opt_SID_LLT_server1"; $IA_NA_OPTION = "opt_IA_NA_Addr_woStatus"; $DNS_SVR_OPTION = "opt_DNS_Name_Server1"; my ($retadv, %adv) = send_advertise($IF0, "advertise_server1_to_nut", \%sol, ""); if($retadv != 0){ dhcpExitFail; } #--------------------------------------------------------------# #3. Wait until Request arrives #--------------------------------------------------------------# my ($retreq,%req) = wait_for_request($IF0,30); if($retreq != 0){ dhcpExitFail; } vClear($IF0); #--------------------------------------------------------------# # Verification Point check #--------------------------------------------------------------# $ret = options_exist(\%req, ($CMP_IA_NA|$CMP_ORO)); if($ret != 0){ vLogHTML('DHCPv6 Client should send Request with ORO(DNS Recursive Name Server option)!
'); dhcpExitFail; } my $option_base = "Frame_Ether.Packet_IPv6.Upp_UDP.Udp_DHCPv6_Request.Opt_DHCPv6_OptionRequest"; my $option_code = $option_base."."."Code"; my $option_len = $option_base."."."Length"; my $optionCode = $option_base."."."OptionCode"; if(defined $req{$option_base}){ vLogHTML(" ORO Code = $req{$option_code}
"); vLogHTML(" ORO option Length = $req{$option_len}
"); vLogHTML(" ORO option OptionCode = $req{$optionCode}
"); } else{ vLogHTML(" NO ORO option
"); dhcpExitFail; } my $optcode = lookup_OptRequestCode(\%req,23); if($optcode != 0){ vLogHTML('requested-option-code is not DNS Recursive Name Server option!
'); dhcpExitFail; } #if($req{$optionCode} != 23){ # vLogHTML('requested-option-code is not DNS Recursive Name Server option
'); # dhcpExitFail; #} vClear($IF0); vStop($IF0); dhcpExitPass; ############################################################################### __END__ =head1 NAME C_RFC3646_3_DnsSvrOpt_Req.seq - Request message format with Option request Option Format(DNS Recursive Name Server option) =head1 TARGET Client =head1 SYNOPSIS =begin html
   C_RFC3646_3_DnsSvrOpt_Req.seq [-tooloption...] 
-pkt C_RFC3646_3_DnsSvrOpt_Req.def
-tooloption : v6eval tool option
See Also DHCPv6.def
=end html =head1 INITIALIZATION =begin html
  • Network Topology
  •           NUT(Client)
              |           
              |                        
    Link0   --+--------+------------------------ 3ffe:501:ffff:100::/64
                       |
                       |          
                       TN(Server) 
      
  • Verification Points

  •    The client MUST include a Client Identifier option to identify itself
       to the server.  The client adds any other appropriate options,
       including one or more IA options (if the client is requesting that
       the server assign it some network addresses).
    
    The client MUST include an Option Request option (see section 22.7) to indicate the options the client is interested in receiving. The client MAY include options with data values as hints to the server about parameter values the client would like to have returned.
  • Configurations


  • Device Name Device Type Interface Assigned Prefix Link Local Addr MAC Addr
    Client NUT Link0 3ffe:501:ffff:100::/64 NUT's Linklocal address NUT's MAC address
    Server TN Link0 3ffe:501:ffff:100::/64 fe80::200:ff:fe00:a1a1 00:00:00:00:a1:a1
=end html =head1 TEST PROCEDURE =begin html

NUT TN | | | |Initialize NUT(as a DHCPv6 Client) | ----> |Solicit | <---- |Advertise | ----> |Request (3*) | | w IA_NA w/ORO(DNS Recursive Name Server option) (1*) | | | |
=end html =head1 JUDGEMENT =begin html
  (3*)PASS: NUT transmits Request message with IA_NA option and ORO(DNS Recursive Name Server option).
=end html =head1 TERMINATION =begin html
  N/A
=end html =head1 REFERENCE =begin html
  Also see RFC3315 Section 18.1.1
  Also see RFC3646 Section 3

=end html =head1 SEE ALSO =begin html

perldoc V6evalTool
=end html