why does gateway ip address work to resolve names?
I have slackware 10.1 machine connected to a DLink router. The IP address of the router is 192.168.0.1, and the IP address of the linux box is 192.168.0.100 (assigned by router's DHCP server).
I found that I couldn't ping a host name, eg,
ping linuxquestions.org
would return "unknown host" unless I put in a line for a dns server in the resolv.conf file, eg,
nameserver 204.127.198.4
This makes sense to me, but by accident I tried this single line in the resolv.conf file:
nameserver 192.168.0.1
And this also worked! So my question is this: why does this work? I have extensively searched for references to just settting the nameserver address the same as the default gateway, but found nothing. Seems likes this is a lot easier than finding and entering dns server IP addresses.
Any comments?
|