NAME

  hManyMulticast.seq - "Multicast Listener Discovery for IPv6" Test
                        use Many Multicast (use Global scope)


TARGET

  Host


INITIALIZATION

  None


TEST PROCEDURE

  This test check following, if node listen to three Global scope Multicast.
  
  *1: A node transmit an Unsolicited Report message,
      when a node start listening to a multicast.

   -- in RFC2710 page 6 --
   When a node starts listening to a multicast address on an interface,
   it should immediately transmit an unsolicited Report for that address
   on that interface, in case it is the first listener on the link.  To
   cover the possibility of the initial Report being lost or damaged, it
   is recommended that it be repeated once or twice after short delays
   [Unsolicited Report Interval].
   -- in RFC2710 page 6 --

  *2: A node transmit an Report message,
      when a node receives a General Query message.

   -- in RFC2710 page 5 --
   When a node receives a General Query, it sets a delay timer for each
   multicast address to which it is listening on the interface from
   which it received the Query, EXCLUDING the link-scope all-nodes
   address and any multicast addresses of scope 0 (reserved) or 1
   (node-local).
   -- in RFC2710 page 5 --
   -- in RFC2710 page 6 --
   If a node's timer for a particular multicast address on a particular
   interface expires, the node transmits a Report to that address via
   that interface; the address being reported is carried in both the
   IPv6 Destination Address field and the MLD Multicast Address field of
   the Report packet.  The IPv6 Hop Limit of 1 (as well as the presence
   of a link-local IPv6 Source Address) prevent the packet from
   traveling beyond the link to which the reporting interface is
   attached.
   -- in RFC2710 page 6 --

  *3: A node transmit an Report message,
      when a node receives a Multicast-Address-Specific Query message,
      if it is listening to the queried Multicast Address.

   -- in RFC2710 page 6 --
   When a node receives a Multicast-Address-Specific Query, if it is
   listening to the queried Multicast Address on the interface from
   which the Query was received, it sets a delay timer for that address
   to a random value selected from the range [0, Maximum Response
   Delay], as above.
   -- in RFC2710 page 6 --
   -- in RFC2710 page 6 --
   If a node's timer for a particular multicast address on a particular
   interface expires, the node transmits a Report to that address via
   that interface; the address being reported is carried in both the
   IPv6 Destination Address field and the MLD Multicast Address field of
   the Report packet.  The IPv6 Hop Limit of 1 (as well as the presence
   of a link-local IPv6 Source Address) prevent the packet from
   traveling beyond the link to which the reporting interface is
   attached.
   -- in RFC2710 page 6 --

  *4: A node don't transmit an Report message,
      when a node receives a Multicast-Address-Specific Query message,
      if it is not listening to the queried Multicast Address.

   -- in RFC2710 page 6 --
   When a node receives a Multicast-Address-Specific Query, if it is
   listening to the queried Multicast Address on the interface from
   which the Query was received, it sets a delay timer for that address
   to a random value selected from the range [0, Maximum Response
   Delay], as above.
   -- in RFC2710 page 6 --

  *5: A node don't transmit an Report message,
      when a node receives a Query message
      and a node recives another node's Report message
      before node transmit an Report message.

   -- in RFC2710 page 6 --
   If a node receives another node's Report from an interface for a
   multicast address while it has a timer running for that same address
   on that interface, it stops its timer and does not send a Report for
   that address, thus suppressing duplicate reports on the link.
   -- in RFC2710 page 6 --

  *6: A node don't transmit an Done message,
      When a node ceases to listen to a multicast.

   -- in RFC2710 page 7 --
   If the node's most
   recent Report message was suppressed by hearing another Report
   message, it MAY send nothing, as it is highly likely that there is
   another listener for that address still present on the same link.
   -- in RFC2710 page 7 --

  *7: A node transmit an Done message,
      When a node ceases to listen to a multicast.

   -- in RFC2710 page 7 --
   When a node ceases to listen to a multicast address on an interface,
   it SHOULD send a single Done message to the link-scope all-routers
   multicast address (FF02::2), carrying in its Multicast Address field
   the address to which it is ceasing to listen.
   -- in RFC2710 page 7 --

  -Test flow 
  
  1. Listen to Multicast of MULTICAST1
     1.1. Wait 1 or 2 Unsolicited Report message of MULTICAST1 from NUT
          Check *1
          Now Idle Listener state of MULTICAST1
  2. Listen to Multicast of MULTICAST2
     2.1. Wait 1 or 2 Unsolicited Report message of MULTICAST2 from NUT
          Check *1
          Now Idle Listener state of MULTICAST2
  3. Listen to Multicast of MULTICAST3
     3.1. Wait 1 or 2 Unsolicited Report message of MULTICAST3 from NUT
          Check *1
          Now Idle Listener state of MULTICAST3
  4. TN send General Query message (Maximum Response Delay = 700 ms)
     4.1. TN waits for 3 Report message for 700 ms
          Check *2
  5. TN send Multicast-Address-Specific Query message
     (Maximum Response Delay = 700 ms
      Multicast Address = MULTICAST1)
     5.1. TN waits for only a Report message of MULTICAST1 for 700 ms
          Check *3
  6. TN Send Multicast-Address-Specific Query message
     (Maximum Response Delay = 700 ms
      Multicast Address = NUT is not listening to)
     6.1. NUT don't transmit any Report message
          Check *4
  7. TN send General Query message (Maximum Response Delay = 7000 ms)
     7.1. TN send another node's Report message of MULTICAST1
     7.2. NUT don't transmit an Report message of MULTICAST1
          NUT transmit an Report message of MULTICAST2 & MULTICAST3
          Check *5
  8. TN send Multicast-Address-Specific Query message
     (Maximum Response Delay = 7000 ms
      Multicast Address = MULTICAST1)
     8.1. TN send another node's Report message of MULTICAST1
     8.2. NUT don't transmit any Report message
          Check *5
  9. Stop to Listen Multicast of MULTICAST1
     9.1. NUT don't transmit an Done message of MULTICAST1
          Check *6
  10. Stop to Listen Multicast of MULTICAST2
     10.1. Wait Done message  of MULTICAST2 from NUT
          Check *7
  11. Stop to Listen Multicast of MULTICAST3
     11.1. Wait Done message  of MULTICAST3 from NUT
          Check *7

        NUT       TN 
         |        |
         |<-<-<-<-+ Command: Listen to Multicast of MULTICAST1
         |        |
         +------->| Unsolicited Report message of MULTICAST1
         +------->| Unsolicited Report message of MULTICAST1
         |        | Check *1
         |        |
         |<-<-<-<-+ Command: Listen to Multicast of MULTICAST2
         |        |
         +------->| Unsolicited Report message of MULTICAST2
         +------->| Unsolicited Report message of MULTICAST2
         |        | Check *1
         |        |
         |<-<-<-<-+ Command: Listen to Multicast of MULTICAST3
         |        |
         +------->| Unsolicited Report message of MULTICAST3
         +------->| Unsolicited Report message of MULTICAST3
         |        | Check *1
         |        |
         |<-------+ General Query message (Maximum Response Delay = 700 ms)
         +------->| Report message of MULTICAST1
         +------->| Report message of MULTICAST2
         +------->| Report message of MULTICAST3
         |        | Check *2
         |        |
         |<-------+ Multicast-Address-Specific Query message
         |        | (Maximum Response Delay = 700 ms
         |        |  Multicast Address = MULTICAST1)
         +------->| Report message of MULTICAST1
         |        | Check *3
         |        |
         |<-------+ Multicast-Address-Specific Query message
         |        | (Maximum Response Delay = 700 ms
         |        |  Multicast Address = NUT is not listening to)
         |        |
         |        | No Report message
         |        | Check *4
         |        |
         |<-------+ General Query message (Maximum Response Delay = 7000 ms)
         |<-------+ another node's Report message of MULTICAST1
         +------->| Report message of MULTICAST2
         +------->| Report message of MULTICAST3
         |        | Check *5
         |        |
         |<-------+ Multicast-Address-Specific Query message
         |        | (Maximum Response Delay = 7000 ms
         |        |  Multicast Address = MULTICAST1)
         |<-------+ another node's Report message of MULTICAST1
         |        |
         |        | No Report message
         |        | Check *5
         |        |
         |<-<-<-<-+ Command: Stop to Listen Multicast of MULTICAST1
         |        |
         |        | No Done message of MULTICAST1
         |        | Check *6
         |        |
         |<-<-<-<-+ Command: Stop to Listen Multicast of MULTICAST2
         |        |
         +------->| Done message of MULTICAST2
         |        | Check *2
         |        |
         |<-<-<-<-+ Command: Stop to Listen Multicast of MULTICAST3
         |        |
         +------->| Done message of MULTICAST3
         |        | Check *2
         |        |


JUDGEMENT

  PASS: 
        flow 1-3
               3 Unsolicited Report message Received
        flow 4
               3 Report message Received
        flow 5
               Report message of MULTICAST1 Received
        flow 6
               Don't receive any Report message
        flow 7
               Don't receive any Report message of MULTICAST1
               Report message Received of MULTICAST2, MULTICAST3
        flow 8
               Don't receive any Report message
        flow 9
               Don't receive any Done message of MULTICAST1
        flow 10-11
               Done message Received


SEE ALSO

  perldoc V6evalTool
  MLD.pm "Multicast Listener Discovery for IPv6" Test Common Utility