CL_RFC2782_SRV_weight - Weight comparing
Verify that a NUT compares Weight of Target
- The weight field specifies a relative weight for entries with the same priority.
- Larger weights should be given a proportionately higher probability of being selected.
Client
CL_RFC2782_SRV_weight.seq [-tooloption ...]: KOI tool option
See also DNSConfig.pm
AP Server1(TN):B.example.com AP Server2(TN):C.example.com DNS Server1(TN)
|3ffe:501:ffff:101::60 |3ffe:501:ffff:101::70 |3ffe:501:ffff:101::20
|192.168.1.60 |192.168.1.70 |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 NUT as above mentioned Network Topology.
Pre-Sequence
In order to send the query for SRV type(IN class) of _http._tcp.example.com. to the DNS Server1(TN),
NUT start TCP communication (SYN) to _http._tcp.example.com.
This test sequence is following.
DNS Client1 (NUT) DNS Server1 (TN) AP Server1 (TN) AP Server2 (TN)
| | | |
|--------------------------------------------->| | |
| 1. Send standard query | | |
| QNAME=_http._tcp.example.com. | | |
| QTYPE=SRV | | |
| | | |
|<---------------------------------------------| | |
| 2. Standard query response | | |
| QNAME=_http._tcp.example.com. | | |
| QTYPE=SRV | | |
| ANSWER | | |
| Priority = 1 | | |
| Weight = 1 | | |
| Port = 80 | | |
| Target = B.example.com. | | |
| ANSWER | | |
| Priority = 1 | | |
| Weight = 2 | | |
| Port = 80 | | |
| Target = C.example.com. | | |
| ADDITIONAL Name | | |
| = B.example.com. | | |
| ADDITIONAL Address | | |
| = 192.168.1.60 | | |
| ADDITIONAL Name | | |
| = C.example.com. | | |
| ADDITIONAL Address | | |
| = 192.168.1.70 | | |
| | | |
|-------------------------------------------------------------------------------------------->|
| 3. start TCP communication (SYN) | | |
| | | |
|<--------------------------------------------------------------------------------------------|
| 4. port unreachable (ACK-RST) | | |
| | | |
|-------------------------------------------------------------------------------------------->|
| 5. start TCP communication (SYN) | | |
| | | |
|<--------------------------------------------------------------------------------------------|
| 6. port unreachable (ACK-RST) | | |
| | | |
|-------------------------------------------------------------------->| |
| 7. start TCP communication (SYN) | | |
| | | |
v v v v
1. NUT send standard query to DNS Server1(TN).
Judgment (Check *1)
2. TN send standard query response to NUT.
3. NUT start TCP communication (SYN) to AP Server2(TN).
Judgment (Check *3)
4. TN send port unreachable (ACK-RST) to NUT.
5. NUT start TCP communication (SYN) to AP Server2(TN).
Judgment (Check *5)
6. TN send port unreachable (ACK-RST) to NUT.
7. NUT start TCP communication (SYN) to AP Server1(TN).
Judgment (Check *7)
- Packet Description
1st Packet
|
1. Standard query from DNS Client1 (NUT) to DNS Server1 (TN)
|
| IP Header |
Source Address |
NUT_NETZ |
| Destination Address |
SV_NETY |
UDP Header
|
Src Port
|
any
|
Dst Port
|
53
|
DNS Header
|
ID |
any |
QR
|
0
|
OPCODE
|
0
|
AA
|
any
|
| TC |
0 |
| RD |
any |
RA
|
any
|
Z
|
any
|
RCODE
|
any
|
QDCOUNT
|
1
|
ANCOUNT
|
0
|
NSCOUNT
|
0
|
ARCOUNT
|
any
|
DNS Question section
|
QNAME |
_http._tcp.example.com. |
QTYPE
|
SRV (0x0031)
|
QCLASS
|
IN (0x0001)
|
2nd packet.
|
2. Standard query response from DNS Server1 (TN) to Client1 (NUT)
|
| IP Header |
Source Address |
SV_NETY |
| Destination Address |
NUT_NETZ |
| UDP Header |
Src Port |
53 |
| Dst Port |
Same as 1st Packet's Src Port |
| DNS Header |
ID |
Same as 1st Packet's ID |
| QR |
1 |
| OPCODE |
0 |
| AA |
1 |
| TC |
0 |
| RD |
Same as 1st Packet's RD |
| RA |
0 |
| Z |
0 |
| RCODE |
0 |
| QDCOUNT |
1 |
| ANCOUNT |
1 |
| NSCOUNT |
0 |
| ARCOUNT |
0 |
| DNS Question section |
QNAME |
_http._tcp.example.com. |
| QTYPE |
SRV (0x0021) |
| QCLASS |
IN (0x0001) |
| DNS Answer section |
NAME |
_http._tcp.example.org. (Pointer 0xC00C) |
| TYPE |
SRV (0x0021) |
| CLASS |
IN (0x0001) |
| TTL |
1 day (86400) |
| RDLENGTH |
21 |
| Priority |
11 |
| Weight |
10 |
| Port |
80 |
| Target |
B.example.com. |
| DNS Answer section |
NAME |
_http._tcp.example.org. (Pointer 0xC00C) |
| TYPE |
SRV (0x0021) |
| CLASS |
IN (0x0001) |
| TTL |
1 day (86400) |
| RDLENGTH |
21 |
| Priority |
10 |
| Weight |
21 |
| Port |
80 |
| Target |
C.example.com. |
| DNS Additional section |
NAME |
B.example.com. (Pointer 0xC03A) |
TYPE
|
A (0x0001) |
| CLASS |
IN (0x0001) |
| TTL |
1 day (86400) |
| RDLENGTH |
4 |
| ADDRESS |
192.168.1.60 |
| DNS Additional section |
NAME |
C.example.com. (Pointer 0xC05B) |
TYPE
|
A (0x0001) |
| CLASS |
IN (0x0001) |
| TTL |
1 day (86400) |
| RDLENGTH |
4 |
| ADDRESS |
192.168.1.70 |
3rd Packet
|
3. Start TCP communication (SYN) from DNS Client1 (NUT) to AP Server1 (TN)
|
| IP Header |
Source Address |
NUT_NETZ |
| Destination Address |
AP2_NETY |
| TCP |
Source Port | any |
| Destination Port | 80 |
| Control Bits |
URG | false |
| ACK | false |
| PSH | false |
| RST | false |
| SYN | true |
| FIN | false |
4th Packet
|
4. port unreachable (ACK-RST) from AP Server1 (TN) to DNS Client1 (NUT)
|
| IP Header |
Source Address |
AP2_NETY |
| Destination Address |
NUT_NETZ |
| TCP |
Source Port | 80 |
| Destination Port | same as Source Port of 3rd Packet |
| Control Bits |
URG | false |
| ACK | true |
| PSH | false |
| RST | true |
| SYN | false |
| FIN | false |
5th Packet
|
5. Start TCP communication (SYN) from DNS Client1 (NUT) to AP Server1 (TN)
|
| IP Header |
Source Address |
NUT_NETZ |
| Destination Address |
AP2_NETY |
| TCP |
Source Port | any |
| Destination Port | 80 |
| Control Bits |
URG | false |
| ACK | false |
| PSH | false |
| RST | false |
| SYN | true |
| FIN | false |
6th Packet
|
6. port unreachable (ACK-RST) from AP Server1 (TN) to DNS Client1 (NUT)
|
| IP Header |
Source Address |
AP2_NETY |
| Destination Address |
NUT_NETZ |
| TCP |
Source Port | 80 |
| Destination Port | same as Source Port of 5th Packet |
| Control Bits |
URG | false |
| ACK | true |
| PSH | false |
| RST | true |
| SYN | false |
| FIN | false |
7th Packet
|
7. Start TCP communication (SYN) from DNS Client1 (NUT) to AP Server1 (TN)
|
| IP Header |
Source Address |
NUT_NETZ |
| Destination Address |
AP1_NETY |
| TCP |
Source Port | any |
| Destination Port | 80 |
| Control Bits |
URG | false |
| ACK | false |
| PSH | false |
| RST | false |
| SYN | true |
| FIN | false |
Exp.
| NUT_NETZ |
DNS Client1's (NUT) Net-z address |
| SV_NETY |
DNS Server1's (TN) Net-y address |
| AP1_NETY |
AP Server1's (TN) Net-y address |
| AP2_NETY |
AP Server2's (TN) Net-y address |
1. Received standard query QNAME=_http._tcp.example.com. from NUT.
3. Received TCP packet (SYN) from NUT.
5. Received TCP packet (SYN) from NUT.
7. Received TCP packet (SYN) from NUT.
If NUT has cache function, clear the cache.
RFC1035 DOMAIN NAMES - CONCEPTS AND FACILITIES
5.2.1. Typical functions RFC2782 DNS SRV RR