May 2019
Intermediate to advanced
478 pages
11h 21m
English
The DNS Question Format consists of a name followed by two 16-bit values—QTYPE and QCLASS. This Question Format is illustrated as follows:

QTYPE indicates the record type we are asking for, and QCLASS should be set to 1 to indicate the internet.
The name field involves a special encoding. First, a hostname should be broken up into its individual labels. For example, www.example.com would be broken up into www, example, and com. Then, each label should be prepended with 1 byte, indicating the label length. Finally, the entire name ends with a 0 byte.
Visually, the name www.example.com is encoded as follows:
If the QTYPE and ...
Read now
Unlock full access