Day 9: Basic understanding- DNS The Domain Name system
DNS, a love story
Domain Name System; A domain name is just another website name(as we know it).
Example: blog.codarren.com is a domain name.
The horror stories
Before we begin with what DNS actually is, let’s talk about the horror stories.
Google.com - In 2016, the google.com domain was sold to Sanmay Ved for $12.
Google paid $6006.13 to him, to get the domain back before doubling the sum. You can read the story here
More DNS horror stories here
The best analogy that works for most of us would be the telephone directory.
A telephone directory allows you to look for someone’s phone number by searching for his name.
Codarren Velvindron --> 53182111 blog.codarren.com --> 188.8.131.52
Life without DNS ?
Our lives would be totally different without the DNS.
We’d have a much better memory.
Yes, you read this right.
Try it and see for yourself
So basically what lies behind google.com is simply this IP address 184.108.40.206, and this IP address corresponds to google’s server (or one of google’s servers)
And this is exacly the same story for every single website or web domain on the internet!
nslookup , the cool tool
nslookup allows you to check a domain’s ip address.
#If you're under linux open a terminal and type this command: nslookup google.com #Under windows, Windows Logo --> run : cmd, then type this: nslookup google.com # Interesting to note that commands are the same for both
Normally your results will look like this:
[email protected]:~$ nslookup google.com Server: 220.127.116.11 Address: 18.104.22.168#53 Non-authoritative answer: Name: google.com Address: 22.214.171.124 Name: google.com Address: 2a00:1450:401a:804::200e
The Server is the actual DNS server that is responding to our request, i.e. giving us the IP answer. The Address is the DNS server again, and it uses port 53, this is the standard/default DNS server port.
The answer section is the real results for our query/lookup. The first 2 lines of the answer: ipv4 address The last 2 lines of the answer: ipv6 address
reverse lookup, the reverse flash
Just like we are able to find an IP from a domain name With a reverse lookup, we attempt to find a domain name from an IP address.
Same command but this time we look for domain name
[email protected]:~$ nslookup 126.96.36.199 188.8.131.52.in-addr.arpa name = edge-star-mini-shv-01-jnb1.facebook.com. Authoritative answers can be found from:
There is much more to DNS but now we have a better basic understanding