DNS not working well on ubuntu8

This is a discussion on DNS not working well on ubuntu8 within the Linux Networking forums, part of the Linux Forums category; Hi, I am connected to the internet, and is able to ping with IP address. I see in the /etc/...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-02-2008
David Shen
 
Posts: n/a
Default DNS not working well on ubuntu8

Hi,

I am connected to the internet, and is able to ping with IP address. I
see in the /etc/resolv.conf file that the nameservers are listed
correctly. Also, I am able to ping the machines by hostname in my
domain, which means it is able to resolve the name. But when I try to
ping a Internet website by its name, say ping google.com, the ping
exited immediately, stating a unknown host. It looks like it never tried
to resolve it.

I am new to the Linux world...really frustrated by this. Please someone
help me!


Thanks,
David
Reply With Quote
  #2 (permalink)  
Old 05-02-2008
Dave Uhring
 
Posts: n/a
Default Re: DNS not working well on ubuntu8

On Fri, 02 May 2008 14:19:28 +0800, David Shen wrote:

> I am connected to the internet, and is able to ping with IP address. I
> see in the /etc/resolv.conf file that the nameservers are listed
> correctly. Also, I am able to ping the machines by hostname in my
> domain, which means it is able to resolve the name. But when I try to
> ping a Internet website by its name, say ping google.com, the ping
> exited immediately, stating a unknown host. It looks like it never tried
> to resolve it.


Check /etc/nsswitch.conf. This is from Debian but you should have a
similar entry for hosts:

hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
Reply With Quote
  #3 (permalink)  
Old 05-02-2008
David Shen
 
Posts: n/a
Default Re: DNS not working well on ubuntu8

Dave Uhring wrote:
> On Fri, 02 May 2008 14:19:28 +0800, David Shen wrote:
>
>> I am connected to the internet, and is able to ping with IP address. I
>> see in the /etc/resolv.conf file that the nameservers are listed
>> correctly. Also, I am able to ping the machines by hostname in my
>> domain, which means it is able to resolve the name. But when I try to
>> ping a Internet website by its name, say ping google.com, the ping
>> exited immediately, stating a unknown host. It looks like it never tried
>> to resolve it.

>
> Check /etc/nsswitch.conf. This is from Debian but you should have a
> similar entry for hosts:
>
> hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4


Yes, I do! So...what should I do?
Reply With Quote
  #4 (permalink)  
Old 05-02-2008
Dave Uhring
 
Posts: n/a
Default Re: DNS not working well on ubuntu8

On Fri, 02 May 2008 15:56:37 +0800, David Shen wrote:
> Dave Uhring wrote:
>> On Fri, 02 May 2008 14:19:28 +0800, David Shen wrote:
>>
>>> I am connected to the internet, and is able to ping with IP address. I
>>> see in the /etc/resolv.conf file that the nameservers are listed
>>> correctly. Also, I am able to ping the machines by hostname in my
>>> domain, which means it is able to resolve the name. But when I try to
>>> ping a Internet website by its name, say ping google.com, the ping
>>> exited immediately, stating a unknown host. It looks like it never
>>> tried to resolve it.

>>
>> Check /etc/nsswitch.conf. This is from Debian but you should have a
>> similar entry for hosts:
>>
>> hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4

>
> Yes, I do! So...what should I do?


OK, you state that the nameservers are listed correctly in
/etc/resolv.conf, however that statement is really unconvincing. Please
post the contents of that file. You may, of course, munge the numbers,
but nothing else.
Reply With Quote
  #5 (permalink)  
Old 05-02-2008
Clifford Kite
 
Posts: n/a
Default Re: DNS not working well on ubuntu8

David Shen <davidshen84@googlemail.com> wrote:
> Dave Uhring wrote:
>> On Fri, 02 May 2008 14:19:28 +0800, David Shen wrote:
>>
>>> I am connected to the internet, and is able to ping with IP address. I
>>> see in the /etc/resolv.conf file that the nameservers are listed
>>> correctly. Also, I am able to ping the machines by hostname in my
>>> domain, which means it is able to resolve the name. But when I try to
>>> ping a Internet website by its name, say ping google.com, the ping
>>> exited immediately, stating a unknown host. It looks like it never tried
>>> to resolve it.

>>
>> Check /etc/nsswitch.conf. This is from Debian but you should have a
>> similar entry for hosts:
>>
>> hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4


> Yes, I do! So...what should I do?


Aside from something unusual such as a missing or broken libnss, e.g.,
/lib/libnss_dns.so.x, the only things I know that would cause the problem
you have described are no functional nameserver IP addresses configured
in /etc/resolv.conf or a "hosts" line in /etc/nsswitch.conf that either
doesn't contain "dns" or the "dns" cannot be read by the program that
needs it. If "host <internet host>" succeeds then it's very likely a
problem with /etc/nsswitch.conf since "host" is one of the few programs
(two others are dig and nslookup) that don't use that file.

I don't use Debian and so don't know what "mdns4" means. But if the file
/etc/hosts contains local hostname to IP address mappings then you might
try commenting out the current "hosts" line and replacing it with

hosts: files dns

HTH
--
Clifford Kite
Reply With Quote
  #6 (permalink)  
Old 05-03-2008
David Shen
 
Posts: n/a
Default Re: DNS not working well on ubuntu8

Dave Uhring wrote:
> On Fri, 02 May 2008 15:56:37 +0800, David Shen wrote:
>> Dave Uhring wrote:
>>> On Fri, 02 May 2008 14:19:28 +0800, David Shen wrote:
>>>
>>>> I am connected to the internet, and is able to ping with IP address. I
>>>> see in the /etc/resolv.conf file that the nameservers are listed
>>>> correctly. Also, I am able to ping the machines by hostname in my
>>>> domain, which means it is able to resolve the name. But when I try to
>>>> ping a Internet website by its name, say ping google.com, the ping
>>>> exited immediately, stating a unknown host. It looks like it never
>>>> tried to resolve it.
>>> Check /etc/nsswitch.conf. This is from Debian but you should have a
>>> similar entry for hosts:
>>>
>>> hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4

>> Yes, I do! So...what should I do?

>
> OK, you state that the nameservers are listed correctly in
> /etc/resolv.conf, however that statement is really unconvincing. Please
> post the contents of that file. You may, of course, munge the numbers,
> but nothing else.



My /etc/resolv.conf file looks like this:

search my.corp.domain.com
nameserver ip1
nameserver ip2
nameserver ip3

I compared the IPs and the domain name with what was get from one of my
Windows PC, they are the same. So, I think it should work.

On thing I forgot to tell you last time, is that, I am in a domain which
is controlled by a ISA server. I am not sure if accessing the DNS server
needs authentication also...


Thanks,
David
Reply With Quote
  #7 (permalink)  
Old 05-03-2008
Dave Uhring
 
Posts: n/a
Default Re: DNS not working well on ubuntu8

On Sat, 03 May 2008 13:19:02 +0800, David Shen wrote:
> Dave Uhring wrote:


>> OK, you state that the nameservers are listed correctly in
>> /etc/resolv.conf, however that statement is really unconvincing. Please
>> post the contents of that file. You may, of course, munge the numbers,
>> but nothing else.

>
>
> My /etc/resolv.conf file looks like this:
>
> search my.corp.domain.com
> nameserver ip1
> nameserver ip2
> nameserver ip3


OK, it's in the correct format. More than one person has had entries
looking like

server 12.34.56.78

> I compared the IPs and the domain name with what was get from one of my
> Windows PC, they are the same. So, I think it should work.
>
> On thing I forgot to tell you last time, is that, I am in a domain which
> is controlled by a ISA server. I am not sure if accessing the DNS server
> needs authentication also...


Your system is configured correctly as far as name service is concerned.
You will have to ask the administrator of that Windoes thing about that
other problem.

Reply With Quote
  #8 (permalink)  
Old 05-03-2008
Bill Marcum
 
Posts: n/a
Default Re: DNS not working well on ubuntu8

On 2008-05-03, David Shen <davidshen84@googlemail.com> wrote:
>
>
> My /etc/resolv.conf file looks like this:
>
> search my.corp.domain.com
> nameserver ip1
> nameserver ip2
> nameserver ip3
>
> I compared the IPs and the domain name with what was get from one of my
> Windows PC, they are the same. So, I think it should work.
>

Make sure you can ping at least one of those addresses. You might need a
route command.
Reply With Quote
  #9 (permalink)  
Old 05-04-2008
David Shen
 
Posts: n/a
Default Re: DNS not working well on ubuntu8

Bill Marcum wrote:
> On 2008-05-03, David Shen <davidshen84@googlemail.com> wrote:
>>
>> My /etc/resolv.conf file looks like this:
>>
>> search my.corp.domain.com
>> nameserver ip1
>> nameserver ip2
>> nameserver ip3
>>
>> I compared the IPs and the domain name with what was get from one of my
>> Windows PC, they are the same. So, I think it should work.
>>

> Make sure you can ping at least one of those addresses. You might need a
> route command.


errr...I cannot ping those DNS server...

I used route -n, and the return look like this:
12.34.56.0 0.0.0.0 255.255.255.0 U
0.0.0.0 12.34.56.1 0.0.0.0 UG


And I just noticed, I cannot ping any machine now...But I could before.
I do not remember I changed the machine's configuration.


Thanks,
David
Reply With Quote
  #10 (permalink)  
Old 05-05-2008
Moe Trin
 
Posts: n/a
Default Re: DNS not working well on ubuntu8

On Sun, 04 May 2008, in the Usenet newsgroup comp.os.linux.networking, in
article <fvj135$s5q$1@aioe.org>, David Shen wrote:

>Bill Marcum wrote:
>> On 2008-05-03, David Shen <davidshen84@googlemail.com> wrote:
>>>
>>> My /etc/resolv.conf file looks like this:
>>>
>>> search my.corp.domain.com


You may want to look at 'man 5 resolver' to see if that line is really
useful. Depending on the situation, this can be a security problem.

>>> nameserver ip1
>>> nameserver ip2
>>> nameserver ip3
>>>
>>> I compared the IPs and the domain name with what was get from one of
>>> my Windows PC, they are the same. So, I think it should work.


From that aspect - yes. The next question might be routing and firewalls.

>> Make sure you can ping at least one of those addresses. You might
>> need a route command.

>
>errr...I cannot ping those DNS server...


Ping uses ICMP packets (DNS normally uses UDP) and has been abused so
much that many block pings in defense.

>I used route -n, and the return look like this:
>12.34.56.0 0.0.0.0 255.255.255.0 U
>0.0.0.0 12.34.56.1 0.0.0.0 UG


12.34.56.xx is actually 8 different sub-nets from a /29 to a /25, but
assuming the actual values you see are similar, this is ok.

>And I just noticed, I cannot ping any machine now...But I could before.
>I do not remember I changed the machine's configuration.


And the error message is...

1. cables
2. /sbin/ifconfig -a
3. /sbin/iptables -Ln
4. /usr/sbin/traceroute -n 72.14.214.193

Old guy
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:20 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0