NAME

        SV_RFC1034_4_3_1_RestrictRecursion - Name server acts in the role of a resolver


VERIFICATION POINTS

        Verify that if clients require recursive mode, name server acts in the role of a resolver
        and returns either an error or the answer, but never referrals. And the name server
        restricts the clients which can use recursive mode.


TARGET

        Authoritative Caching Server


SYNOPSIS

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


INITIALIZATION


TEST PROCEDURE

        This test sequence is following.
    AP Server1 (TN)             DNS Server1 (NUT)
        |                              |
        |                              |
        |----------------------------->|
        | 1. Send standard query       |
        |  QNAME = A.example.com       |
        |  QTYPE = A                   |
        |                              |
        |<-----------------------------|
        | 2. Standard query response   |
        |  RA = 0                      |
        |  QNAME = A.example.com       |
        |  QTYPE = A                   |
        |  ANSWER Name                 |
        |           = A.example.com    |
        |  ANSWER Address              |
        |           = 192.168.1.10     |
        |  AUTHORITY Name              |
        |           = example.com      |
        |  AUTHORITY Name Server       |
        |           = NS1.example.com  |
        |  ADDITIONAL Name             |
        |           = NS1.example.com  |
        |  ADDITIONAL Address          |
        |           = 192.168.0.10     |
        |                              |
        |----------------------------->|
        | 3. Send standard query       |
        |  QNAME = A.example.org       |
        |  QTYPE = A                   |
        |                              |
        |<-----------------------------|
        | 4. Standard query response   |
        |                              |
        |  RA = 0                      |
        |  RCODE = 0                   |
        |  QNAME = A.example.org       |
        |  QTYPE = A                   |
        |  AUTHORITY Name              |
        |           = <ROOT>           |
        |  AUTHORITY Name Server       |
        |           = A.ROOT.NET       |
        |                              |
        |            or                |
        |                              |
        |  RA = 0                      |
        |  RCODE = 3                   |
        |  QNAME = A.example.org       |
        |  QTYPE = A                   |
        |                              |
        v                              v
                                                                   <--------------- TN ------------------>
    DNS Client1 (TN)             DNS Server1 (NUT)                  DNS Server2 DNS Server3 DNS Server4
        |                              |                                 |           |           |
        |----------------------------->|                                 |           |           |
        | 5. Send standard query       |                                 |           |           |
        |  QNAME = A.example.com       |                                 |           |           |
        |  QTYPE = A                   |                                 |           |           |
        |                              |                                 |           |           |
        |<-----------------------------|                                 |           |           |
        | 6. Standard query response   |                                 |           |           |
        |  RA = 1                      |                                 |           |           |
        |  QNAME = A.example.com       |                                 |           |           |
        |  QTYPE = A                   |                                 |           |           |
        |  ANSWER Name                 |                                 |           |           |
        |           = A.example.com    |                                 |           |           |
        |  ANSWER Address              |                                 |           |           |
        |           = 192.168.1.10     |                                 |           |           |
        |  AUTHORITY Name              |                                 |           |           |
        |           = example.com      |                                 |           |           |
        |  AUTHORITY Name Server       |                                 |           |           |
        |           = NS1.example.com  |                                 |           |           |
        |  ADDITIONAL Name             |                                 |           |           |
        |           = NS1.example.com  |                                 |           |           |
        |  ADDITIONAL Address          |                                 |           |           |
        |           = 192.168.0.10     |                                 |           |           |
        |                              |                                 |           |           |
        |----------------------------->|                                 |           |           |
        | 7. Send standard query       |                                 |           |           |
        |  QNAME = A.example.org       |                                 |           |           |
        |  QTYPE = A                   |                                 |           |           |
        |                              |                                 |           |           |
        |                              |-------------------------------->|           |           |
        |                              | 8. Recv standard query          |           |           |
        |                              |  QNAME = A.example.org          |           |           |
        |                              |  QTYPE = A                      |           |           |
        |                              |                                 |           |           |
        |                              |<--------------------------------|           |           |
        |                              | 9. Send standard query response |           |           |
        |                              |  AA = 0                         |           |           |
        |                              |  QNAME = A.example.org          |           |           |
        |                              |  QTYPE = A                      |           |           |
        |                              |  AUTHORITY Name                 |           |           |
        |                              |            = org                |           |           |
        |                              |  AUTHORITY NSDNAME              |           |           |
        |                              |            = NS3.example.org    |           |           |
        |                              |  ADDITIONAL Name                |           |           |
        |                              |            = NS3.example.org    |           |           |
        |                              |  ADDITIONAL Address             |           |           |
        |                              |            = 192.168.1.30       |           |           |
        |                              |                                 |           |           |
        |                              |                                 v           |           |
        |                              |                                             |           |
        |                              |-------------------------------------------->|           |
        |                              |            10. Recv standard query          |           |
        |                              |              QNAME = A.example.org          |           |
        |                              |              QTYPE = A                      |           |
        |                              |                                             |           |
        |                              |<--------------------------------------------|           |
        |                              |            11. Send standard query response |           |
        |                              |              AA = 0                         |           |
        |                              |              QNAME = A.example.org          |           |
        |                              |              QTYPE = A                      |           |
        |                              |              AUTHORITY Name                 |           |
        |                              |                     = example.org           |           |
        |                              |              AUTHORITY NSDNAME              |           |
        |                              |                     = NS4.example.org       |           |
        |                              |              ADDITIONAL Name                |           |
        |                              |                     = NS4.example.org       |           |
        |                              |              ADDITIONAL Address             |           |
        |                              |                     = 192.168.1.40          |           |
        |                              |                                             v           |
        |                              |                                                         |
        |                              |-------------------------------------------------------->|
        |                              |                    12. Recv standard query              |
        |                              |                      QNAME = A.example.org              |
        |                              |                      QTYPE = A                          |
        |                              |                                                         |
        |                              |<--------------------------------------------------------|
        |                              |                    13. Send standard query response     |
        |                              |                      AA = 1                             |
        |                              |                      QNAME = A.example.org              |
        |                              |                      QTYPE = A                          |
        |                              |                      ANSWER Name                        |
        |                              |                             = A.example.org             |
        |                              |                      ANSWER Address                     |
        |                              |                             = 192.168.1.10              |
        |                              |                      AUTHORITY Name                     |
        |                              |                             = example.org               |
        |                              |                      AUTHORITY NSDNAME                  |
        |                              |                             = NS4.example.org           |
        |                              |                      ADDITIONAL Name                    |
        |                              |                             = NS4.example.org           |
        |                              |                      ADDITIONAL Address                 |
        |                              |                             = 192.168.1.40              |
        |                              |                                                         v
        |<-----------------------------|
        | 14. Standard query response  |
        |  RA = 1                      |
        |  QNAME = A.example.org       |
        |  QTYPE = A                   |
        |  ANSWER Name                 |
        |           = A.example.org    |
        |  ANSWER Address              |
        |           = 192.168.1.10     |
        |  AUTHORITY Name              |
        |           = example.org      |
        |  AUTHORITY Name Server       |
        |           = NS4.example.org  |
        |  ADDITIONAL Name             |
        |           = NS4.example.org  |
        |  ADDITIONAL Address          |
        |           = 192.168.1.40     |
        |                              |
        v                              v
    AP Server1 (TN)             DNS Server1 (NUT)
        |                              |
        |----------------------------->|
        | 15. Send standard query      |
        |  QNAME = A.example.org       |
        |  QTYPE = A                   |
        |                              |
        |<-----------------------------|
        | 16. Standard query response  |
        |  RA = 0                      |
        |  QNAME = A.example.org       |
        |  QTYPE = A                   |
        |  ANSWER Name                 |
        |           = A.example.org    |
        |  ANSWER Address              |
        |           = 192.168.1.10     |
        |  AUTHORITY Name              |
        |           = example.org      |
        |  AUTHORITY Name Server       |
        |           = NS4.example.org  |
        |  ADDITIONAL Name             |
        |           = NS4.example.org  |
        |  ADDITIONAL Address          |
        |           = 192.168.1.40     |
        |                              |
        v                              v
        This test sequence is following.
        1. AP Server1 (TN) send standard query QNAME=A.example.com, QTYPE=A to NUT.
        2. DNS Server1 (NUT) transmits standard query response to AP Server1 (TN). (Judgment *2)
        3. AP Server1 (TN) send standard query QNAME=A.example.org, QTYPE=A to DNS Server1 (NUT).
        4. DNS Server1 (NUT) transmits response contain a error to AP Server1 (TN). (Judgment *4)
        5. DNS Client1 (TN) send standard query QNAME=A.example.com, QTYPE=A to NUT.
        6. DNS Server1 (NUT) transmits standard query response to DNS Client1 (TN). (Judgment *6)
        7. DNS Client1 (TN) send standard query QNAME=A.example.org, QTYPE=A to DNS Server1 (NUT).
        8. DNS Server1 (NUT) transmits standard query QNAME=A.example.org, QTYPE=A to DNS Server2 (TN).
        9. DNS Server2 (TN) send standard query response to DNS Server1 (NUT).
        10. DNS Server1 (NUT) transmits standard query QNAME=A.example.org, QTYPE=A to DNS Server3 (TN).
        11. DNS Server3 (TN) send standard query response to DNS Server1 (NUT).
        12. DNS Server1 (NUT) transmits standard query QNAME=A.example.org, QTYPE=A to DNS Server4 (TN).
        13. DNS Server4 (TN) send standard query response to DNS Server1 (NUT).
        14. DNS Server1 (NUT) transmits standard query response to DNS Client1 (TN). (Judgment *14)
        15. AP Server1 (TN) send standard query QNAME=A.example.org, QTYPE=A to DNS Server1 (NUT) again.
        16. DNS Server1 (NUT) transmits standard query response to DNS Client1 (TN) from cache data. (Judgment *16)
        RA: Recursion Available


JUDGMENT

        2. Received standard query response with RA bit 0 to AP Server1. 
        4. Received error response containing a error (RCODE=3).
        6. Received standard query response with RA bit 1 to DNS Client1
        14. Received standard query response with RA bit 1 to DNS Client1
        16. Received standard query response with RA bit 0 to AP Server1.


TERMINATION

        None


REFERENCE

        RFC1034 DOMAIN NAMES - CONCEPTS AND FACILITIES
        4. NAME SERVERS
        4.3.1. Queries and responses