Course Overview

/

DNS forward lookup

DNS forward lookup

DNS forward lookup



Aforward lookup, also known as forward DNS resolution, is the processof translating a domain name into its corresponding IP address. Itinvolves querying DNS servers to retrieve the IP address associatedwith a given domain name.

Whenperforming a forward lookup, you start with a domain name and requestits IP address. Here are a few examples of how to do a forward lookupusing the digand hostcommand-line tools:

Dig

DigA google.com

Thesyntax above is using the tool dig to request an A record for thedomain google.com (remember the A record is the IPv4 addressassociated with a domain name).  





Whilea normal DNS forward lookup will use whatever nameserver has beenconfigured.  It is also possible to specify which DNS server toquery.  This is possible by adding the @<name server> parameter(for example we can use the cloudflare DNS server located at 1.1.1.1)



DigA google.com @1.1.1.1



Host

Host-t A google.com

Thesyntax above is using the tool host to request the A record for thedomain google.com

Itis possible to define specific DNS servers with the host tool byproviding the IP address

Host-t A google.com 1.1.1.1