CL_RFC3403_4_NAPTR_flagS - Flag "S" to control rewriting and interpretation
Verify a NUT process when NUT received message that includes multiple
Naming Authority Pointer (NAPTR) Resource Records (RR) containing
different flags.
- FLAGS
- A containing flags to control aspects of the
- rewriting and interpretation of the fields in the record. Flags
- are single characters from the set A-Z and 0-9. The case of the
- alphabetic characters is not significant. The field can be empty.
- It is up to the Application specifying how it is using this
- Database to define the Flags in this field. It must define which
- ones are terminal and which ones are not.
- If this flag is not present then this rule is non-terminal. If a
- Rule is non-terminal then clients MUST use the Key produced by this
- Rewrite Rule as the new Key in the DDDS loop (i.e., causing the
- client to query for new NAPTR records at the domain-name that is the
- result of this Rule).
- The "S" flag means that the output of this Rule is a domain-name for
- which one or more SRV records exist.
Client (ADVANCED)
CL_RFC3403_4_NAPTR_flagS.seq [-tooloption ...]: KOI tool option
See also DNSConfig.pm
AP Server1(TN):A.example.com DNS Server1(TN)
|3ffe:501:ffff:101::10 |3ffe:501:ffff:101::20
|192.168.1.10 |192.168.1.20
| |
Net-y --+--------+-----------------------+-------- 3ffe:501:ffff:101::/64
| 192.168.1/24
|
|
ROUTER1(TN)
|3ffe:501:ffff:100::1
|192.168.0.1
|
Net-z --+--------+-------------------------------- 3ffe:501:ffff:100::/64
| 192.168.0/24
DNS Client1(NUT)
3ffe:501:ffff:100:XXXX
192.168.0.10
XXXX: EUI64 address
Setup
Set the DNS Server1 (TN)'s address on DNS Client1 (NUT) as above mentioned Network Topology.
DNS Client1 (NUT) needs a SIP user agent as DDDS application.
Note that it doesn't use SIP Proxy.
Application Unique String (AUS): +81-90-1111-0003
Converted to the Key: 819011110003
Used domain-name to retrieve Rewrite Rules as NAPTR records: 3.0.0.0.1.1.1.1.0.9.1.8.e164.arpa.
This test sequence is following.
DNS Client1 (NUT) DNS Server1 (TN)
| |
| Invoke some application |
| on NUT (Ex. SIP UA) |
| |
|---------------------------------------------->|
| 1. Send standard query |
| QNAME="3.0.0.0.1.1.1.1.0.9.1.8.e164.arpa." |
| QTYPE=NAPTR |
| |
|<----------------------------------------------|
| 2. Send standard response |
| |
|---------------------------------------------->|
| 3. Send standard query |
| QNAME="sip.example.com" |
| QTYPE=NAPTR |
| |
|<----------------------------------------------|
| 4. Send standard query response |
| |
|---------------------------------------------->|
| 5. Send standard query |
| QNAME="_sip._udp.sip.example.com" |
| QTYPE=SRV |
| |
v v
1. DNS Client1 (NUT) sends a standard query with QNAME = "3.0.0.0.1.1.1.1.0.9.1.8.e164.arpa." type = NAPTR
2. DNS Server1 (NUT) transmits a response to DNS Client1 (NUT) with:
$ORIGIN 3.0.0.0.1.1.1.1.0.9.1.8.e164.arpa.
;; order pref flags service regexp replacement
IN NAPTR 0 0 "u" "E2U+sip" "!^.*$!sip:info1@sip.example.com!i" .
3. DNS Client1 (NUT) sends a standard query with QNAME = "sip.example.com." type = NAPTR.
4. DNS Server1 (NUT) transmits a response to DNS Client1 (NUT) with:
$ORIGIN sip.example.com.
;; order pref flags service regexp replacement
IN NAPTR 0 0 "s" "SIP+D2U" "" _sip._udp.sip.example.com.
5. DNS Client1 (NUT) sends a standard query with QNAME = "_sip._udp.sip.example.com." type = SRV. Judgment (Check *5)
- Packet Description
- 1st packet.
|
Standard query from DNS Client1 (NUT) to Server1 (TN)
|
| IP Header |
Source Address |
NUT_NETZ |
| Destination Address |
SV1_NETY |
| UDP Header |
Src Port |
ANY |
| Dst Port |
53 |
| DNS Header |
ID |
ANY |
| QR |
0 |
| OPCODE |
0 |
| AA |
0 |
| TC |
0 |
| RD |
0 |
| RA |
0 |
| Z |
0 |
| RCODE |
0 |
| QDCOUNT |
1 |
| ANCOUNT |
0 |
| NSCOUNT |
0 |
| ARCOUNT |
0 |
| DNS Question section |
QNAME |
3.0.0.0.1.1.1.1.0.9.1.8.e164.arpa. |
| QTYPE |
NAPTR (0x0023) |
| QCLASS |
IN (0x0001) |
- 2nd packet.
|
Standard query response from DNS Server1 (TN) to Client1 (NUT)
|
| IP Header |
Source Address |
SV1_NETY |
| Destination Address |
NUT_NETZ |
| UDP Header |
Src Port |
53 |
| Dst Port |
Value that NUT uses |
| DNS Header |
ID |
Value that NUT uses |
| QR |
1 |
| OPCODE |
0 |
| AA |
1 |
| TC |
0 |
| RD |
0 |
| RA |
0 |
| Z |
0 |
| RCODE |
0 |
| QDCOUNT |
1 |
| ANCOUNT |
1 |
| NSCOUNT |
1 |
| ARCOUNT |
2 |
| DNS Question section |
QNAME |
3.0.0.0.1.1.1.1.0.9.1.8.e164.arpa. |
| QTYPE |
NAPTR (0x0023) |
| QCLASS |
IN (0x0001) |
| DNS Answer section |
NAME |
3.0.0.0.1.1.1.1.0.9.1.8.e164.arpa. (Pointer 0xC00C) |
| TYPE |
NAPTR (0x0023) |
| CLASS |
IN (0x0001) |
| TTL |
86400sec |
| RDLENGTH |
45 |
| ORDER |
0 |
| PREFERENCE |
0 |
| FLAGS |
u |
| SERVICES |
E2U+sip |
| REGEXP |
!^.*$!sip:info1@sip.example.com!i |
| REPLACEMENT |
. |
| DNS Authority section |
NAME |
1.1.1.1.0.9.1.8.e164.arpa. (Pointer 0xC014) |
| TYPE |
NS (0x0002) |
| CLASS |
IN (0x0001) |
| TTL |
86400sec |
| RDLENGTH |
17 |
| NSDNAME |
NS1.example.com |
| DNS Additional section |
NAME |
NS1.example.com (Pointer 0xC07C) |
| TYPE |
A (0x0001) |
| CLASS |
IN (0x0001) |
| TTL |
86400sec |
| RDLENGTH |
4 |
| ADDRESS |
192.168.1.20 |
| DNS Additional section |
NAME |
NS1.example.com (Pointer 0xC07C) |
TYPE
|
AAAA (0x001C) |
| CLASS |
IN (0x0001) |
| TTL |
86400sec |
| RDLENGTH |
16 |
| ADDRESS |
3ffe:501:ffff:101::20 |
- 3rd packet.
|
Standard query from DNS Client1 (NUT) to Server1 (TN)
|
| IP Header |
Source Address |
NUT_NETZ |
| Destination Address |
SV1_NETY |
| UDP Header |
Src Port |
ANY |
| Dst Port |
53 |
| DNS Header |
ID |
ANY |
| QR |
0 |
| OPCODE |
0 |
| AA |
0 |
| TC |
0 |
| RD |
0 |
| RA |
0 |
| Z |
0 |
| RCODE |
0 |
| QDCOUNT |
1 |
| ANCOUNT |
0 |
| NSCOUNT |
0 |
| ARCOUNT |
0 |
| DNS Question section |
QNAME |
sip.example.com. |
| QTYPE |
NAPTR (0x0023) |
| QCLASS |
IN (0x0001) |
- 4th packet.
|
Standard query response from DNS Server1 (TN) to Client1 (NUT)
|
| IP Header |
Source Address |
SV1_NETY |
| Destination Address |
NUT_NETZ |
| UDP Header |
Src Port |
53 |
| Dst Port |
Value that NUT uses |
| DNS Header |
ID |
Value that NUT uses |
| QR |
1 |
| OPCODE |
0 |
| AA |
1 |
| TC |
0 |
| RD |
0 |
| RA |
0 |
| Z |
0 |
| RCODE |
0 |
| QDCOUNT |
1 |
| ANCOUNT |
1 |
| NSCOUNT |
1 |
| ARCOUNT |
2 |
| DNS Question section |
QNAME |
sip.example.com. |
| QTYPE |
NAPTR (0x0023) |
| QCLASS |
IN (0x0001) |
| DNS Answer section |
NAME |
sip.example.com. (Pointer 0xC00C) |
| TYPE |
NAPTR (0x0023) |
| CLASS |
IN (0x0001) |
| TTL |
86400sec |
| RDLENGTH |
42 |
| ORDER |
0 |
| PREFERENCE |
0 |
| FLAGS |
s |
| SERVICES |
SIP+D2U |
| REGEXP |
(not present) |
| REPLACEMENT |
_sip._udp.sip.example.com |
| DNS Authority section |
NAME |
example.com. (Pointer 0xC04A) |
| TYPE |
NS (0x0002) |
| CLASS |
IN (0x0001) |
| TTL |
86400sec |
| RDLENGTH |
17 |
| NSDNAME |
NS1.example.com (NS1 + Pointer 0xC04A) |
| DNS Additional section |
NAME |
NS1.example.com (Pointer 0xC063) |
| TYPE |
A (0x0001) |
| CLASS |
IN (0x0001) |
| TTL |
86400sec |
| RDLENGTH |
4 |
| ADDRESS |
192.168.1.20 |
| DNS Additional section |
NAME |
NS1.example.com (Pointer 0xC063) |
TYPE
|
AAAA (0x001C) |
| CLASS |
IN (0x0001) |
| TTL |
86400sec |
| RDLENGTH |
16 |
| ADDRESS |
3ffe:501:ffff:101::20 |
- 5th packet.
|
Standard query from DNS Client1 (NUT) to Server1 (TN)
|
| IP Header |
Source Address |
NUT_NETZ |
| Destination Address |
SV1_NETY |
| UDP Header |
Src Port |
ANY |
| Dst Port |
53 |
| DNS Header |
ID |
ANY |
| QR |
0 |
| OPCODE |
0 |
| AA |
0 |
| TC |
0 |
| RD |
0 |
| RA |
0 |
| Z |
0 |
| RCODE |
0 |
| QDCOUNT |
1 |
| ANCOUNT |
0 |
| NSCOUNT |
0 |
| ARCOUNT |
0 |
| DNS Question section |
QNAME |
_sip._udp.sip.example.com. |
| QTYPE |
SRV (0x0021) |
| QCLASS |
IN (0x0001) |
- Exp.
| NUT_NETZ |
DNS Client1's (NUT) Net-z address |
| SV1_NETY |
DNS Server1's (TN) Net-y address |
5. Received a query message that it includes QNAME=_sip._udp.sip.example.com, TYPE=SRV.
If NUT has cache function, clear the cache.
RFC3403 Dynamic Delegation Discovery System (DDDS)
Part Three: The Domain Name System (DNS) Database
4. NAPTR RR Format
RFC3263 Session Initiation Protocol (SIP): Locating SIP Servers
RFC2782 A DNS RR for specifying the location of services (DNS SRV)