NAME

  SrcSelectRule1.seq - Source Address Selection
                       Check Rule 1(Prefer same address)

  Rule 1: Prefer same address.
    If SA = D, then prefer SA.

  Source addresses used for this test are "preferred address".


TARGET

  Host and Router


INITIALIZATION

  None


TEST PROCEDURE

  This TEST performs the following Check procedures for
  every address group defined by Check 01 - *.
    
  *Check procedure
  
  1. Initialize :
     1.1. Set IPv6 Default Route in NUT
          (Default Router address = <TN-Link0-LinkLocalAddress>)
     1.2. Add Candidate Source Addresses in NUT
     1.3. Check Candidate Source Addresses by Ping6 (TN->NUT)
  2. Send Ping6 from NUT to Destination
     2.1. NUT send ICMPv6 echo request (NUT->TN)
  3. Judgment : don't recive packet & check ping6 result
  4. Cleanup :
     4.1. Delete Candidate Source Addresses in NUT
     4.2. Clear prefix list & NCE & default router list in NUT

        NUT              TN    Default Router
         |                |      |
         ======(INITIALIZE)=======
         |                |      |
         |<-<-<-<-<-<-<-<-+      | Set IPv6 Default Route
         |<-<-<-<-<-<-<-<-+      | Add Candidate Source Addresses
         |                |      |
         |<----------------------+ Echo Request to Candidate Source Addresses 1
         +---------------------->| Echo Reply
         |                |      |
         |<----------------------+ Echo Request to Candidate Source Addresses 2
         +---------------------->| Echo Reply
         |                |      |
         ======(INITIALIZE)=======
         |                |      |
         |<-<-<-<-<-<-<-<-+      | Excute ping6 command
         |                |      |

  LLA(Link Local Address)

  GS(Unicast Global Scope), GSM(Multicast Global Scope), OSM(Multicast Organization Scope),
  SS(Unicast Site local Scope), SSM(Multicast Site local Scope), LS(Link local Scope)
  LLA(Link Local Address)

  Check 01:
    Destination: 3ffe::1(GS)
    Candidate Source Addresses: 3ffe::1(GS) or fec0::1(SS) or LLA(LS)
    Result: 3ffe::1(GS)

  Check 02:
    Destination: fec0::1(SS)
    Candidate Source Addresses: 3ffe::1(GS) or fec0::1(SS) or LLA(LS)
    Result: fec::1(SS)

  Check 03:
    Destination: LLA(LS)
    Candidate Source Addresses: 3ffe::1(GS) or fec0::1(SS) or LLA(LS)
    Result: LLA(LS)


JUDGEMENT

  Check 01 - 03
    PASS: Don't receive Echo Request
        and if possible,
        Please check source address in ping6 command result by your eyes

          e.g.
          target5# /sbin/ping6 -n -c 1 -i 1 -h 64 -s 2 -p 00 -I ed0 3ffe::1
          PATTERN: 0x00
          PING6(50=40+8+2 bytes) 3ffe::1 --> 3ffe::1
                                 ^^^^^^^     ^^^^^^^
          if source address and destination adddress are equal, Check PASS

        *Please rewrite the following file.
         tn.def : "RemoteLog       1"

  TEST
    PASS: All Check = PASS


SEE ALSO

  perldoc V6evalTool
  ADDR_SELECT.html "Default Address Selection for IPv6" Test Common Utility
das_rules.html "Default Address Selection for IPv6" Rules