I have seen lot of people confuse between resolving dns vs reach IP. So this small blog.
Inorder to get data from any computer we need to know the address of the computer which is IP address. Let's say we want to get some data from google and its IP is
184.108.40.206 (currently). Its very hard to remember this IP and also they can have multiple machines(IPs) which will give the same data (horizontal scaling). So we cannot remember IPs. So we need a map (key: name, value: IP) stored in a server called DNS whose IP is configured automatically (done by DHCP server) when we connect to internet (220.127.116.11 or 18.104.22.168 or your custom dns server).
So when we do
www.google.com in browser
1) Check which dns server to use in `/etc/resolve.conf` 2) Use that dns server to get the `ip address` of www.google.com 3) Use that IP address to connect and transfer data
First two steps is
resolve and third step is
Let's say we have private network and to access machines inside that network, we have to connect to the VPN. There is an application running in that network in machine
22.214.171.124. We can add entry in dns. Key is
www.myapplication.comand value is
126.96.36.199. Once that is done, anybody can resolve
188.8.131.52as we added entry in public dns server. But it is reachable only to people who are connected to the VPN.
Let's say I want to expose/transfer some data to my colleagues. And my ip is
192.168.1.4which is private and will be accessible only to the people whose is in my network. Instead of asking my colleagues to use this IP, we can put an entry in public DNS server (184.108.40.206 or 220.127.116.11). Key is
www.dineshba.comand value is
192.168.1.4. Once that is done, anybody can resolve
192.168.1.4as we added entry in public dns server. But it is reachable only to people in my network.
The software industry moves fast. But if you keep up, you can have an incredible career.