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/...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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? |
|
|||
|
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. |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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. |
|
|||
|
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. |
|
|||
|
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 |
|
|||
|
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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|