LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   dns problem (https://www.linuxquestions.org/questions/linux-newbie-8/dns-problem-929146/)

llpapis 02-13-2012 12:38 PM

dns problem
 
[root@localhost ~]# cat /etc/resolv.conf
namesever 192.168.10.126
[root@localhost ~]# dig google.com

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5 <<>> google.com
;; global options: printcmd
;; connection timed out; no servers could be reached
[root@localhost ~]# dig google.com @192.168.10.126

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5 <<>> google.com @192.168.10.126
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30502
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;google.com. IN A

;; ANSWER SECTION:
google.com. 169 IN A 74.125.113.103
google.com. 169 IN A 74.125.113.104
google.com. 169 IN A 74.125.113.105
google.com. 169 IN A 74.125.113.106
google.com. 169 IN A 74.125.113.147
google.com. 169 IN A 74.125.113.99

;; Query time: 5 msec
;; SERVER: 192.168.10.126#53(192.168.10.126)
;; WHEN: Mon Feb 13 10:26:09 2012
;; MSG SIZE rcvd: 124

i can t ping for exemple google.com and have a response
etc/resolv.conf correctly configured

lithos 02-13-2012 02:11 PM

That is weird, but
- what is your distro (RHEL ?)

My /etc/resolv.conf is:
Code:

cat /etc/resolv.conf
nameserver 127.0.0.1
nameserver 192.168.0.7

So maybe you're missing 127.0.0.1 to make it working ?

- what is
Code:

# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
#BOOTPROTO=dhcp
HWADDR=00:xx:xx:xx:1x:xx
ONBOOT=yes
BOOTPROTO=static
BROADCAST=192.168.0.255
IPADDR=192.168.0.7
NETMASK=255.255.255.0
NETWORK=192.168.0.0
TYPE=Ethernet

- what is your
Code:

cat /etc/sysconfig/network
NETWORKING=yes
NETWORKING_IPV6=no
# HOSTNAME=localhost.localdomain
HOSTNAME=hostname.domain.com
GATEWAY=192.168.0.254

- what is
Code:

cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1      hostname hostname.domain.com localhost
::1            localhost6.localdomain6 localhost6
192.168.0.7    hostname hostname.domain.com

- what does your NAMED service (DNS) show in networking
Code:

netstat -tapln | grep 53
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
tcp        0      0 192.168.0.7:53              0.0.0.0:*                  LISTEN      -                 
tcp        0      0 127.0.0.1:53                0.0.0.0:*                  LISTEN      -                 
tcp        0      0 127.0.0.1:953              0.0.0.0:*                  LISTEN      -


devilboy09 02-13-2012 04:43 PM

Quote:

Originally Posted by llpapis (Post 4601377)
[root@localhost ~]# cat /etc/resolv.conf
namesever 192.168.10.126
[root@localhost ~]# dig google.com

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5 <<>> google.com
;; global options: printcmd
;; connection timed out; no servers could be reached
[root@localhost ~]# dig google.com @192.168.10.126

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-16.P1.el5 <<>> google.com @192.168.10.126
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30502
;; flags: qr rd ra; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;google.com. IN A

;; ANSWER SECTION:
google.com. 169 IN A 74.125.113.103
google.com. 169 IN A 74.125.113.104
google.com. 169 IN A 74.125.113.105
google.com. 169 IN A 74.125.113.106
google.com. 169 IN A 74.125.113.147
google.com. 169 IN A 74.125.113.99

;; Query time: 5 msec
;; SERVER: 192.168.10.126#53(192.168.10.126)
;; WHEN: Mon Feb 13 10:26:09 2012
;; MSG SIZE rcvd: 124

i can t ping for exemple google.com and have a response
etc/resolv.conf correctly configured

are you running your linux on vmware?
could you tell us a little bit more about your system
BTW use 4.2.2.4 as dns server.see what would happen.


All times are GMT -5. The time now is 03:05 AM.