NAME

        SV_RFC1995_2_IXFR_client_TCP - an IXFR client tries to use TCP, if the reply does not fit in a single DNS packet.


VERIFICATION POINTS

        Verify that a NUT switches to use TCP as IXFR message.


TARGET

        Server (an IXFR client)


SYNOPSIS

	SV_RFC1995_2_IXFR_client_TCP.seq [-tooloption ...]: KOI tool option
	See also DNSConfig.pm


INITIALIZATION


PRE-TEST SEQUENCE

        After all zone information are transferred between primary DNS server7 (TN) 
        and slave DNS server1 (NUT), following pre-test sequence is performed.
    DNS Client1 (TN)             DNS Server1 (NUT)              DNS Server7 (TN)
        |                              |                              |
        |----------------------------->|                              |
        | 1. Send standard query       |                              |
        |  QNAME = CL2.sec.example.com |                              |
        |  QTYPE = A                   |                              |
        |                              |                              |
        |<-----------------------------|                              |
        | 2. Standard query response   |                              |
        |  QNAME = CL2.sec.example.com |                              |
        |  QTYPE = A                   |                              |
        |  ANSWER Name                 |                              |
        |        = CL2.sec.example.com |                              |
        |  ANSWER Type                 |                              |
        |        = A (0x0001)          |                              |
        |  ANSWER Address              |                              |
        |        = 192.168.0.21        |                              |
        |                              |                              |
        v                              v                              v


TEST PROCEDURE

        This test sequence is following.
        NOTE: SOA's parameter and $TTL are same as above sec.example.com zone information.
              TN includes NS7 and NS1.sub.example.com into Authority as type = NS.
              Also TN includes NS7 and NS1.sub.example.com address into Additional section.
              Thus NUT may reply to answer client with Authority and Additional section including
              those values.
    DNS Client1 (TN)             DNS Server1 (NUT)              DNS Server7 (TN)
        |                              |                              |
        |                              |                              |
        |                              |  Before SOA REFRESH (180sec) |
        |                              |  timeout expired             |
        |                              |                              |
        |                              |----------------------------->|
        |                              | 1. Standard query            |
        |                              |    (in UDP)                  |
        |                              |  QNAME = sec.example.com     |
        |                              |  QTYPE = SOA (0x0006)        |
        |                              |                              |
        |                              |<-----------------------------|
        |                              | 2. Standard query response   |
        |                              |    (in UDP)                  |
        |                              |  QNAME = sec.example.com     |
        |                              |  QTYPE = SOA (0x0006)        |
        |                              |  ANSWER Name                 |
        |                              |       = sec.example.com      |
        |                              |  ANSWER Type                 |
        |                              |       = SOA (0x0006)         |
        |                              |  ANSWER SERIAL               |
        |                              |       = 2                    |
        |                              |                              |
        |                              |----------------------------->|
        |                              | 3. Standard query            |
        |                              |    (in UDP)                  |
        |                              |  QNAME = sec.example.com     |
        |                              |  QTYPE = IXFR (0x00FB)       |
        |                              |  AUTHORITY Name              |
        |                              |       = sec.example.com      |
        |                              |  AUTHORITY Type              |
        |                              |       = SOA (0x0006)         |
        |                              |  AUTHORITY SERIAL            |
        |                              |       = 1                    |
        |                              |                              |
        |                              |<-----------------------------|
        |                              | 4. Standard query response   |
        |                              |    (in UDP)                  |
        |                              |                              |
        |                              |  QNAME = sec.example.com     |
        |                              |  QTYPE = IXFR (0x00FB)       |
        |                              |                              |
        |                              |  ANSWER Name                 |
        |                              |       = sec.example.com      |
        |                              |  ANSWER Type                 |
        |                              |       = SOA (0x0006)         |
        |                              |  ANSWER SERIAL               |
        |                              |       = 2                    |
        |                              |                              |
        |                              |----------------------------->|
        |                              | 5. Standard query            |
        |                              |    (in TCP)                  |
        |                              |  QNAME = sec.example.com     |
        |                              |  QTYPE = IXFR (0x00FB)       |
        |                              |  AUTHORITY Name              |
        |                              |       = sec.example.com      |
        |                              |  AUTHORITY Type              |
        |                              |       = SOA (0x0006)         |
        |                              |  AUTHORITY SERIAL            |
        |                              |       = 1                    |
        |                              |                              |
        |                              |<-----------------------------|
        |                              | 6. Standard query response   |
        |                              |    (in TCP)                  |
        |                              |                              |
        |                              |  add new record              |
        |                              |                              |
        |                              |  QNAME = sec.example.com     |
        |                              |  QTYPE = IXFR (0x00FB)       |
        |                              |                              |
        |                              |  ANSWER Name                 |
        |                              |       = sec.example.com      |
        |                              |  ANSWER Type                 |
        |                              |       = SOA (0x0006)         |
        |                              |  ANSWER SERIAL               |
        |                              |       = 2                    |
        |                              |                              |
        |                              |  ANSWER Name                 |
        |                              |       = sec.example.com      |
        |                              |  ANSWER Type                 |
        |                              |       = SOA (0x0006)         |
        |                              |  ANSWER SERIAL               |
        |                              |       = 1                    |
        |                              |                              |
        |                              |  ANSWER Name                 |
        |                              |       = CL2.sec.example.com  |
        |                              |  ANSWER Type                 |
        |                              |       = A (0x0001)           |
        |                              |  ANSWER Address              |
        |                              |       = 192.168.0.21         |
        |                              |                              |
        |                              |  ANSWER Name                 |
        |                              |       = sec.example.com      |
        |                              |  ANSWER Type                 |
        |                              |       = SOA (0x0006)         |
        |                              |  ANSWER SERIAL               |
        |                              |       = 2                    |
        |                              |                              |
        |                              |  ANSWER Name                 |
        |                              |       = CL2.sec.example.com  |
        |                              |  ANSWER Type                 |
        |                              |       = A (0x0001)           |
        |                              |  ANSWER Address              |
        |                              |       = 192.168.0.22         |
        |                              |                              |
        |                              |  ANSWER Name                 |
        |                              |       = sec.example.com      |
        |                              |  ANSWER Type                 |
        |                              |       = SOA (0x0006)         |
        |                              |  ANSWER SERIAL               |
        |                              |       = 2                    |
        |                              |                              |
        |----------------------------->|                              |
        | 7. Send standard query       |                              |
        |    (in UDP)                  |                              |
        |  QNAME = CL2.sec.example.com |                              |
        |  QTYPE = A                   |                              |
        |                              |                              |
        |<-----------------------------|                              |
        | 8. Standard query response   |                              |
        |    (in UDP)                  |                              |
        |  QNAME = CL2.sec.example.com |                              |
        |  QTYPE = A                   |                              |
        |  ANSWER Name                 |                              |
        |        = CL2.sec.example.com |                              |
        |  ANSWER Type                 |                              |
        |        = A (0x0001)          |                              |
        |  ANSWER Address              |                              |
        |        = 192.168.0.22        |                              |
        |                              |                              |
        v                              v                              v
        This test sequence is following.
        1. After SOA refresh time expired, DNS Server1 (NUT) transmits standard query 
           QNAME = sec.example.com, Type = SOA using UDP to DNS Server7 (TN). (Judgment *1)
        2. DNS Server7 (TN) sends standard query response with SOA serial = 2 using UDP to DNS Server1 (NUT).
        3. DNS Server1 (NUT) transmits standard query with QNAME = sec.example.com, Type = IXFR, 
           including Authority Name = sec.example.com, Type = SOA serial = 1 using UDP to DNS Server7 (TN). 
           (Judgment *3)
        4. DNS Server7 (TN) sends standard query response using UDP to DNS Server1 (NUT) with a single SOA record including serial=2.
        5. DNS Server1 (NUT) transmits standard query with QNAME = sec.example.com, Type = IXFR, 
           including Authority Name = sec.example.com, Type = SOA serial = 1 using TCP to DNS Server7 (TN). 
           (Judgment *5)
        6. DNS Server7 (TN) sends standard query response including only difference RRs previous one
           using TCP to DNS Server1 (NUT). Its difference is that CL2.sec.example.com's record is changed.
        7. DNS Client1 (TN) sends standard query QNAME = CL2.sec.example.com using UDP to DNS Server1 (NUT).
        8. DNS Server1 (NUT) transmits standard query response ANSWER Address = 192.168.0.22
           using UDP to DNS Client1 (TN). (Judgment *6)


JUDGMENT

        1. Received standard query with Type=SOA after SOA refresh time expired.
        3. Received standard query with Type=IXFR serial=1.
        6. Received standard query response QNAME=CL2.sec.example.com and Answer address 192.168.0.22.


TERMINATION

        None


REFERENCE

        RFC1995 Incremental Zone Transfer in DNS
        2. Brief Description of the Protocol
        3. Query Format