I have two Fedora VM, with DNS configured (almost) on one.
On DNS configured machine, i get the following output with dig
Code:
[root@fedora ~]# dig www.google.com
; <<>> DiG 9.8.3-P1-RedHat-9.8.3-2.P1.fc15 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45257
;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 4, ADDITIONAL: 4
;; QUESTION SECTION:
;www.google.com. IN A
;; ANSWER SECTION:
www.google.com. 601813 IN CNAME www.l.google.com.
www.l.google.com. 300 IN A 173.194.79.105
www.l.google.com. 300 IN A 173.194.79.106
www.l.google.com. 300 IN A 173.194.79.147
www.l.google.com. 300 IN A 173.194.79.99
www.l.google.com. 300 IN A 173.194.79.103
www.l.google.com. 300 IN A 173.194.79.104
;; AUTHORITY SECTION:
google.com. 169813 IN NS ns3.google.com.
google.com. 169813 IN NS ns4.google.com.
google.com. 169813 IN NS ns1.google.com.
google.com. 169813 IN NS ns2.google.com.
;; ADDITIONAL SECTION:
ns1.google.com. 169813 IN A 216.239.32.10
ns2.google.com. 169813 IN A 216.239.34.10
ns3.google.com. 169813 IN A 216.239.36.10
ns4.google.com. 169813 IN A 216.239.38.10
;; Query time: 200 msec
;; SERVER: 192.168.0.117#53(192.168.0.117)
;; WHEN: Sun Jul 15 01:32:29 2012
;; MSG SIZE rcvd: 284
and /etc/resolv.conf reads
Code:
[root@fedora ~]# cat /etc/resolv.conf
# Generated by NetworkManager
domain mynetwork.internal
search mynetwork.internal
nameserver 192.168.0.117
nameserver 192.168.0.1
192.168.0.1 being my wireless router.
On the second machine, which doesn't has BIND or DNS configured
/etc/resolv.conf reads
Code:
[root@fed ~]# cat /etc/resolv.conf
# Generated by NetworkManager
domain mynetwork.internal
search mynetwork.internal
nameserver 192.168.0.117
nameserver 192.168.0.1
and i can ping the DNS machine too
Code:
[root@fed ~]# ping 192.168.0.117
PING 192.168.0.117 (192.168.0.117) 56(84) bytes of data.
64 bytes from 192.168.0.117: icmp_req=1 ttl=64 time=0.024 ms
64 bytes from 192.168.0.117: icmp_req=2 ttl=64 time=4.04 ms
64 bytes from 192.168.0.117: icmp_req=3 ttl=64 time=5.87 ms
^C
--- 192.168.0.117 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2014ms
rtt min/avg/max/mdev = 0.024/3.314/5.872/2.443 ms
but it does not uses my DNS machine to resolve the name
Code:
[root@fed ~]# dig www.google.com
; <<>> DiG 9.8.3-P1-RedHat-9.8.3-2.P1.fc15 <<>> www.google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 27182
;; flags: qr rd ra; QUERY: 1, ANSWER: 7, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;www.google.com. IN A
;; ANSWER SECTION:
www.google.com. 43096 IN CNAME www.l.google.com.
www.l.google.com. 196 IN A 74.125.127.106
www.l.google.com. 196 IN A 74.125.127.104
www.l.google.com. 196 IN A 74.125.127.105
www.l.google.com. 196 IN A 74.125.127.103
www.l.google.com. 196 IN A 74.125.127.147
www.l.google.com. 196 IN A 74.125.127.99
;; Query time: 8 msec
;; SERVER: 192.168.0.1#53(192.168.0.1)
;; WHEN: Sun Jul 15 01:37:35 2012
;; MSG SIZE rcvd: 158
When i force it to use my DNS machine, i get the following output.
Code:
[root@fed ~]# dig @192.168.0.117 www.google.com
; <<>> DiG 9.8.3-P1-RedHat-9.8.3-2.P1.fc15 <<>> @192.168.0.117 www.google.com
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached
What am i doing wrong?