SV_RFC2181_4_1_source_selection - UDP Source Address Selection
Verify that a NUT selects the correct Source Address.
- Servers when responding to queries using UDP
must cause the reply to be sent with the source address field in the
IP header set to the address that was in the destination address
field of the IP header of the packet containing the query causing the
response.
Authoritative Server
SV_RFC2181_4_1_source_selection.seq [-tooloption ...]: KOI tool option
See also DNSConfig.pm
This test sequence is following.
DNS Client1 (TN) DNS Server1 (NUT)
| |
|------------------------------------->|
| 1. Send standard query |
| *Destination address=192.168.0.10 |
| QNAME=A.example.com |
| QTYPE=A |
| |
|<-------------------------------------|
| 2. Standard query response |
| *Source address=192.168.0.10 |
| A=192.168.1.10 |
| |
|------------------------------------->|
| 3. Send standard query |
| *Destination address=192.168.0.11 |
| QNAME=A.example.com |
| QTYPE=A |
| |
|<-------------------------------------|
| 4. Standard query response |
| *Source address=192.168.0.11 |
| A=192.168.1.10 |
| |
| |
v v
1. TN send standard query QNAME=A.example.com, QTYPE=A to NUT that destination address=192.168.0.10.
2. NUT reply query response w/ A=192.168.1.10 to TN that source address=192.168.0.10(Judgment *2)
3. TN send standard query QNAME=A.example.com, QTYPE=A to NUT that destination address=192.168.0.11.
4. NUT reply query response w/ A=192.168.1.10 to TN that source address=192.168.0.11(Judgment *4)
- Packet Description
- 1st packet.
|
Standard query from DNS Client1 (TN) to Server1 (NUT)
|
| IP Header |
Source Address |
CL1_NETZ |
| Destination Address |
NUT_NETZ |
| UDP Header |
Src Port |
2000 |
| Dst Port |
53 |
| DNS Header |
ID |
0x1000 |
| QR |
0 |
| OPCODE |
0 |
| AA |
0 |
| TC |
0 |
| RD |
1 |
| RA |
0 |
| Z |
0 |
| RCODE |
0 |
| QDCOUNT |
1 |
| ANCOUNT |
0 |
| NSCOUNT |
0 |
| ARCOUNT |
0 |
| DNS Question section |
QNAME |
A.example.com |
| QTYPE |
A (0x0001) |
| QCLASS |
IN (0x0001) |
- 2nd packet.
|
Standard query response from DNS Server1 (NUT) to Client1 (TN)
|
| IP Header |
Source Address |
NUT_NETZ |
| Destination Address |
CL1_NETZ |
| UDP Header |
Src Port |
53 |
| Dst Port |
2000 |
| DNS Header |
ID |
0x1000 |
| QR |
1 |
| OPCODE |
0 |
| AA |
1 |
| TC |
0 |
| RD |
1 |
| RA |
ANY |
| Z |
0 |
| RCODE |
0 |
| QDCOUNT |
1 |
| ANCOUNT |
1 |
| NSCOUNT |
1 |
| ARCOUNT |
2 |
| DNS Question section |
QNAME |
A.example.com |
| QTYPE |
A (0x0001) |
| QCLASS |
IN (0x0001) |
| DNS Answer section |
NAME |
A.example.com (Pointer 0xC00C) |
| TYPE |
A (0x0001) |
| CLASS |
IN (0x0001) |
| TTL |
1 day (86400) |
| RDLENGTH |
4 |
| ADDRESS |
192.168.1.10 |
| DNS Authority section |
NAME |
example.com (Pointer 0xC00E) |
| TYPE |
NS (0x0002) |
| CLASS |
IN (0x0001) |
| TTL |
1 day (86400) |
| RDLENGTH |
6 |
| NSDNAME |
NS1.example.com (NS1 + Pointer 0xC00E) |
| DNS Additional section |
NAME |
NS1.example.com (Pointer 0xC03B) |
TYPE
|
A (0x0001) |
| CLASS |
IN (0x0001) |
| TTL |
1 day (86400) |
| RDLENGTH |
4 |
| ADDRESS |
192.168.0.10 |
| DNS Additional section |
NAME |
NS1.example.com (Pointer 0xC03B) |
TYPE
|
A (0x0001) |
| CLASS |
IN (0x0001) |
| TTL |
1 day (86400) |
| RDLENGTH |
4 |
| ADDRESS |
192.168.0.11 |
- 3rd packet.
|
Standard query from DNS Client1 (TN) to Server1 (NUT)
|
| IP Header |
Source Address |
CL1_NET |
| Destination Address |
NUT_NETZ2 |
| UDP Header |
Src Port |
2000 |
| Dst Port |
53 |
| DNS Header |
ID |
0x1001 |
| QR |
0 |
| OPCODE |
0 |
| AA |
0 |
| TC |
0 |
| RD |
1 |
| RA |
0 |
| Z |
0 |
| RCODE |
0 |
| QDCOUNT |
1 |
| ANCOUNT |
0 |
| NSCOUNT |
0 |
| ARCOUNT |
0 |
| DNS Question section |
QNAME |
A.example.com |
| QTYPE |
A (0x0001) |
| QCLASS |
IN (0x0001) |
- 4th packet.
|
Standard query response from DNS Server1 (NUT) to Client1 (TN)
|
| IP Header |
Source Address |
NUT_NETZ2 |
| Destination Address |
CL1_NETZ |
| UDP Header |
Src Port |
53 |
| Dst Port |
2000 |
| DNS Header |
ID |
0x1001 |
| QR |
1 |
| OPCODE |
0 |
| AA |
1 |
| TC |
0 |
| RD |
1 |
| RA |
ANY |
| Z |
0 |
| RCODE |
0 |
| QDCOUNT |
1 |
| ANCOUNT |
1 |
| NSCOUNT |
1 |
| ARCOUNT |
2 |
| DNS Question section |
QNAME |
A.example.com |
| QTYPE |
A (0x0001) |
| QCLASS |
IN (0x0001) |
| DNS Answer section |
NAME |
A.example.com (Pointer 0xC00C) |
| TYPE |
A (0x0001) |
| CLASS |
IN (0x0001) |
| TTL |
1 day (86400) |
| RDLENGTH |
4 |
| ADDRESS |
192.168.1.10 |
| DNS Authority section |
NAME |
example.com (Pointer 0xC00E) |
| TYPE |
NS (0x0002) |
| CLASS |
IN (0x0001) |
| TTL |
1 day (86400) |
| RDLENGTH |
6 |
| NSDNAME |
NS1.example.com (NS1 + Pointer 0xC00E) |
| DNS Additional section |
NAME |
NS1.example.com (Pointer 0xC03B) |
TYPE
|
A (0x0001) |
| CLASS |
IN (0x0001) |
| TTL |
1 day (86400) |
| RDLENGTH |
4 |
| ADDRESS |
192.168.0.11 |
| DNS Additional section |
NAME |
NS1.example.com (Pointer 0xC03B) |
TYPE
|
A (0x0001) |
| CLASS |
IN (0x0001) |
| TTL |
1 day (86400) |
| RDLENGTH |
4 |
| ADDRESS |
192.168.0.10 |
- Exp.
| NUT_NETZ |
DNS Server1's (NUT) Net-z address |
| NUT_NETZ2 |
DNS Server1's (NUT) another Net-z address |
| CL1_NETZ |
DNS Client1's (TN) Net-z address |
2. Received standard query response w/ A=192.168.1.10 that source address=192.168.0.10.
4. Received standard query response w/ A=192.168.1.10 that source address=192.168.0.11.
None
RFC2181 Clarifications to the DNS Specification
4.1. UDP Source Address Selection