Network - DNS Lookup (Request|query)

Map Of Internet 1973


A DNS lookup is a request to a DNS server in order to get DNS record from a DNS name

Beware that not all DNS clients are performing a lookup on the content of the host file as ping does.

Example of response known as replies

Each message 1) consists of:

  • a header with:
    • ID: query identifier
    • QR: message type:
      • 0: query
      • 1: response
    • OPCODE: kind of query:
    • RCODE: Response code:
      • 0: No error
      • 1: Query Format error
      • 2: Server failure
      • 3: Name Error (the domain name referenced in the query does not exist)
      • 4: Query Type Not Implemented
      • 5: Refused (For Policy reason)
  • and four sections:
    • question: the question for the name server composed of:
      • a query type (QTYPE),
      • a query class (QCLASS),
      • a query domain name (QNAME).
    • answer: the answer (in resource records (RR) format),
      • with a status code 2)
    • authority: the authoritative name server (in RR format),
    • and an additional space information (in RR format)

A header field (flags) controls the content of these four sections

Example of A record query against

;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 56993
;; flags: qr rd ra ; qd: 1 an: 2 au: 0 ad: 1 

; EDNS: version: 0; flags: ; udp: 512
;;, type = A, class = IN

;; ANSWERS:	300	IN	A	300	IN	A



;; Message size: 76 bytes



A forward lookup translate a DNS name to an IP. See What is a DNS Forward Lookup?


A reverse lookup translate a an IP to a DNS name. See DNS - rDNS - Reverse DNS (lookup|resolution) - from IP to name

Discover More
Map Of Internet 1973
DNS - Record

A DNS record is a row in a DNS database. Example of a A record. where: api is a relative name IN is the INTERNET class (An other value is ANY) A is the A record is the Ip address...
Map Of Internet 1973
DNS - nslookup command line

Nslookup is a DNS client program to query (ie lookup) domain name servers and get back DNS record information nslookuphost fileping Nslookup has two modes: The local DNS file is /etc/resolv.conf...
Map Of Internet 1973
DNS - rDNS - Reverse DNS (lookup|resolution) - from IP to name

A reverse dns lookup is a dns lookup that: query the PTR record with a reverse map name in order to get the DNS name (known also as the reverse DNS name) from a IP address forward dns lookup...
Map Of Internet 1973
DNS Alias record

An alias is a DNS record with a name that resolves directly to an ip_address. cnamenamenamean ip addressDNS resolverroundtripip_addressCNAME Before creating an ALIAS record, check there are no: ...
Map Of Internet 1973
DNS clients - A list of client that can query the DNS database

A DNS client is an application that calls the resolver to query name database in order to perform forward lookup (IP from name) or reverse lookup(Name from IP). This page lists this application
Map Of Internet 1973
Network - dig ( DNS tool)

dig is DNS client tool to make dns lookup. Part of bind9 The containing package name is: debian/ubuntu: dnsutils centos: bind-utils alpine: ...
Map Of Internet 1973
The NS record determines your DNS server

An article about the NS record (nameserver), how they are managed and how you can query them
Firebug Netpanel Explained
Web - Page Load Time (Speed|Performance)

Goal: being interactive in under 5 seconds Duplicate of . Mobile web speeds matter. On average, faster experiences lead to 70% longer...
Dkim Entry
What is DKIM, the Email DomainKeys Identified Mail? (Mail Signatures)

DomainKeys Identified Mail (DKIM) is a method to sign digitally outgoing email, in order to authenticate a person, role, or organization allowing them to claim some responsibility for the message. The...
Dns Architecture
What is DNS ? The Domain Name System

The Domain Name System (DNS) is a database of name. It's naming system (service). It holds naming information for some kind of object (not only but mainly host) DNS can be seen as the phone book of...

Share this page:
Follow us:
Task Runner