Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-13-2011, 01:47 PM
|
#1
|
|
LQ Newbie
Registered: May 2011
Distribution: Fedora, ubuntu
Posts: 18
Rep: 
|
ping www.google.co.in gives unknown host error ,ping to LAN address works fine
even ping google's ip address doesn't work. unknown host error
using backtrack4
able to browse net with these settings.
my network settings:
/etc/networking/interfaces
--------------------------
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet static
address 10.0.0.54
netmask 255.255.252.0
network 10.0.0.0
broadcast 10.0.3.255
gateway 10.0.0.254
--------------------------
/etc/resolv.conf
nameserver 202.141.81.2
nameserver 202.141.80.9
(note ping to DNS 202.141.81.2 works fine)
-----------------
/etc/nsswitch.conf
passwd: compat
group: compat
shadow: compat
hosts: files dns
networks: files
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: nis
------------------------
/etc/hosts
127.0.0.1 localhost
127.0.1.1 backtrack bt
--------------------------
/etc/host.conf
order hosts,bind
multi on
---------------------
please explain what's the problem with these settings...
|
|
|
|
05-13-2011, 01:54 PM
|
#2
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,830
|
OK, so your first comment is wonky...
Quote:
|
even ping google's ip address doesn't work. unknown host error
|
You'll *only* get that error from a failed DNS lookup, NOT by pinging an IP. So it seems there's some sort of DNS issue, step away from the ping, and concentrate on DNS only. what does "dig google.com" do? What about "dig google.com @202.141.81.2"? and the other DNS server IP?
|
|
|
|
05-13-2011, 02:02 PM
|
#3
|
|
Senior Member
Registered: Aug 2006
Location: C:\MSDOS\
Distribution: LFS 3.8.11 with OpenBox 3.5.0
Posts: 1,493
|
pinging an IP address will not get you a "host unknown" error that I know of.
you can use 'dig' or 'nslookup' to test your DNS configuration.
if you can ping 8.8.8.8 (google dns)
and not www.google.com
then you are having DNS problems.
If you are able to ping internal addresses, and not external addresses, it might also be your default route. use 'route' to verify.
|
|
|
|
05-13-2011, 03:31 PM
|
#4
|
|
LQ Newbie
Registered: May 2011
Distribution: Fedora, ubuntu
Posts: 18
Original Poster
Rep: 
|
@acid_kewpie: ok... my bad. actually i am not able to ping external addresses.
output of dig www.google.com@202.141.81.2
; <<>> DiG 9.5.0-P2.1 <<>> www.google.com@202.141.81.2
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 34420
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
; www.google.com\@202.141.81.2. IN A
;; Query time: 9 msec
;; SERVER: 202.141.81.2#53(202.141.81.2)
;; WHEN: Thu May 12 16:43:43 2011
;; MSG SIZE rcvd: 45
@szboardstretcher: not able to ping 8.8.8.8 either
nslookup gives
;; Got SERVFAIL reply from 202.141.81.2, trying next server
;; connection timed out; no servers could be reached
route gives
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
10.0.0.0 * 255.255.252.0 U 0 0 0 eth0
default 10.0.0.254 0.0.0.0 UG 100 0 0 eth0
|
|
|
|
05-13-2011, 04:37 PM
|
#5
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,830
|
You typed the dig command wrong. There is a space before the @.
|
|
|
|
05-14-2011, 05:15 AM
|
#6
|
|
LQ Newbie
Registered: May 2011
Distribution: Fedora, ubuntu
Posts: 18
Original Poster
Rep: 
|
ok.. output of "dig www.google.com @202.141.81.2"
; <<>> DiG 9.5.0-P2.1 <<>> www.google.com @202.141.81.2
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 26157
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
; www.google.com. IN A
;; Query time: 11 msec
;; SERVER: 202.141.81.2#53(202.141.81.2)
;; WHEN: Fri May 13 03:40:38 2011
;; MSG SIZE rcvd: 32
seems space before '@' doesn't matter since output is same except line "; www.google.com\@202.141.81.2. IN A"
|
|
|
|
05-14-2011, 06:44 AM
|
#7
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,830
|
of course it matters, it makes the command work differently. If you don't understand what the command is even doing I'd suggest you don't question it.
Your DNS can't resolve google.com, so fix your DNS server.
|
|
|
|
05-14-2011, 07:44 AM
|
#8
|
|
LQ Newbie
Registered: May 2011
Distribution: Fedora, ubuntu
Posts: 18
Original Poster
Rep: 
|
Thanks for all the replies.
I am still not able to sort out the DNS problem. what should be done ?
|
|
|
|
05-14-2011, 07:48 AM
|
#9
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,830
|
you need to make the DNS server resolve the name, or use a different DNS server. What other solution are you expecting??
|
|
|
|
05-24-2011, 03:21 PM
|
#10
|
|
LQ Newbie
Registered: May 2011
Distribution: Fedora, ubuntu
Posts: 18
Original Poster
Rep: 
|
I think iptables blocks my ping requests. As this DNS server is not setup on my machine I can't exactly pin point the problem .But Yes I have tested it on my own LAN setup with one machine as dns and other as client and got the same error when tried to resolve domain name from client machine.Trying to figure out the problem, I found iptables was blocking my requests from other machines.After fixing it, now everything works fine.
Thanks acid_kewpie for all the responses and help.
|
|
|
|
05-24-2011, 03:26 PM
|
#11
|
|
Senior Member
Registered: May 2007
Distribution: RHEL, CentOS
Posts: 1,232
Rep:
|
Quote:
Originally Posted by aspiring_stellar
Trying to figure out the problem, I found iptables was blocking my requests from other machines.After fixing it, now everything works fine.
|
Nice to hear that. Please mark this thread as SOLVED (follow my signature).
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 12:20 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|