#!/usr/bin/perl
#
# $Copyright$
#
# $TAHI: ct-dhcpv6/dhcpv6.tahi/S_RFC3736_5.2_SLDHCPRelaySvr.seq,v 1.20 2006/11/07 06:38:28 hide Exp $
########################################################################
BEGIN { $V6evalTool::TestVersion = '$Name: $';
}
use strict;
use V6evalTool;
use DHCPv6_common;
use Server_pktdesc;
#--------------------------------------------------------------#
# Initialization
#--------------------------------------------------------------#
dhcpExitNS if ChkFuncSupport('STATELESSDHCP');
vLogHTML('==== NUT Initialization ====
');
my $IF0 = "Link0";
my $IF1 = "Link1";
my %NUT_Server_Config = (
'if_nut0'=> "$V6evalTool::NutDef{Link0_device}",
'if_add0' => "3ffe:501:ffff:100::a1a1",
'if_length0' => "64",
'if_type0'=> "unicast",
'init_opcode' => "vRemote(\"dhcp6s.rmt\", \"start\",\"dns=3ffe::10\",\"stateless\",\"link0=$V6evalTool::NutDef{Link0_device}\",\"valduid=$DUID_CLIENT\")"
);
dhcpSvrInit(\%NUT_Server_Config);
# set Options
$CID_OPTION = "opt_CID_LLT_client1";
$OptionRequest_OPTION = "opt_ORO_dns_servers";
# Receive the Relay_Forward messge(Solicit)
my($ret1, %rfsol1) = send_relay_forward($IF0,"relayforward_infomationrequest_client1_to_alldhcp_send");
if (0 != $ret1){
dhcpExitFail();
}
# Send the Relay-reply message(Reply)
#2006.11.07 hide modified
#my ($ret2, %rradv2) = wait_for_relay_reply_reply($IF0,5,"relay_reply_server1_to_client1_1relay");
my ($ret2, %rrep2) = wait_for_relay_reply_reply($IF0,5,"relay_reply_nut_relay");
dhcpExitFail if(0 != $ret2);
if(0!= options_exist(\%rrep2,$CMP_RELAYMSG)){
dhcpExitError("The expected Relay Message option can not be found.");
}
#-------------------------------------------------------------------
vLogHTML("The Message exchange is correct
");
#-------------------------------------------------------------------
dhcpExitPass();
#NOTREACHED
########################################################################
__END__
=head1 NAME
S_RFC3736_5.2_SLDHCPRelaySvr.seq - Checking Relay Message Option
=head1 TARGET
Server
=head1 SYNOPSIS
=begin html
S_RFC3736_5.2_SLDHCPRelaySvr.seq [-tooloption ...] -pkt S_RFC3736_5.2_SLDHCPRelaySvr.def -tooloption: v6eval tool option See Also DHCPv6.def=head1 INITIALIZATION =begin html
TN(Client1)
|
Link1 -------------+-------+-------------- 3ffe:501:ffff:101::/64
|
TN (Relay1)
|
Link0 ---------------------+---------+--- 3ffe:501:ffff:100::/64
|
NUT(Server1)
The Relay messages include Relay message options be exchanged correctly.
Device Name Device Type I/F Assigned Prefix Link Local Addr MAC Addr Server1 NUT Link0 3ffe:501:ffff:100::/64 NUT's Linklocal address NUT's MAC address Relay1(Link1) TN Link1 3ffe:501:ffff:101::/64 fe80::200:ff:fe00:a2a2 00:00:00:00:a2:a2 Relay1(Link0) TN Link0 3ffe:501:ffff:100::/64 fe80::200:ff:fe00:a4a4 00:00:00:00:a4:a4 Client1 TN Link1 3ffe:501:ffff:101::/64 fe80::200:ff:fe00:a2a2 00:00:00:00:a2:a2
NUT TN(Relay1) TN(Client1)
| | |
| | | initialize NUT (as a stateless DHCPv6 Server)
| | <---- | Information-request
| <---- | | Relay-forward (Information-request)
| ----> | | Relay-reply (Reply w/Relay Message option) (*1)
| | |
=end html
=head1 JUDGEMENT
(*1)PASS: The server returns the Relay-reply message, it includes Relay Message option.=head1 TERMINATION N/A =head1 REFERENCE =begin html
see also RFC3736 5.2. Options Required for Stateless DHCP Service=end html =head1 SEE ALSO perldoc V6evalTool =cut