I have installed ubuntu server in Virtual Machine. I started exploring about the network, and read a book for it.
It says that my DNS server is given in /etc/resolv.conf file.
This is my server's IP.
luvpreet@server16:~$ hostname -I
192.168.122.62
This is the /etc/resolv.conf file,
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.122.1
Well, DNS server maps the human readable addresses to IP addresses. In my main machine(not in VM)
tcp 0 0 192.168.122.1:53 0.0.0.0:* LISTEN 2332/dnsmasq
The DNS server is running.
But how it works, I have no idea that how this IP address i.e, 192.168.122.1 is serving as my DNS Server. Please explain its working in detail and also the flow by which this DNS server works.
I know how a DNS server works, it is like a phonebook which helps us to locate to a particular website. Where is the DNS cache? I want to know how this IP address is working as my DNS server ? Can I bind any IP address as my DNS server ?If yes, How to do that ? If no, why ?
Sorry if this is dumb but I am not getting this.