Can dig and nslookup but can't ping or browse [WorkAround]

Issues Related to Networking (Wired and Wireless)

Moderator: Moderators

Can dig and nslookup but can't ping or browse [WorkAround]

Postby Mobius » Sat Aug 18, 2007 23:55

Hey guys,

I've decided to try out sabayon linux as it looks very nice. The live dvd ran sweet in my laptop, with the exception of not being able to access the net. I didn't panic too much about this and thought once I'd installed it the problem would be easily solved. Ha.

I'm using DHCP with NetworkManager, and get the correct IP range and everything is fine there. I can ping IP numbers throughout the internet. My resolv.conf looks ok:
Code: Select all
[email protected] $ cat /etc/resolv.conf
#generated by NetworkManager, do not edit!

search hol.net.local
nameserver 192.168.1.5
nameserver 203.96.152.4
nameserver 203.96.152.12

192.168.1.5 is my local DNS server, and the others are my ISP's.

I can successfully dig and nslookup any address and get the correct ip address:
Code: Select all
[email protected] $ nslookup www.sabayonlinux.org
Server:         192.168.1.5
Address:        192.168.1.5#53

Non-authoritative answer:
Name:   www.sabayonlinux.org
Address: 72.55.147.227

If I use the address given by nslookup manually I can contact the server:
Code: Select all
[email protected] $ ping 72.55.147.227
PING 72.55.147.227 (72.55.147.227) 56(84) bytes of data.
64 bytes from 72.55.147.227: icmp_seq=1 ttl=47 time=232 ms

However I cannot ping names!
Code: Select all
[email protected] $ ping www.sabayonlinux.org
ping: unknown host www.sabayonlinux.org

As this is a fresh install and the same problem happened on the live DVD, I'd imagine this isn't too uncommon... though I've never struck it before!
Anyone have any ideas on how to fix this?
Last edited by Mobius on Tue Aug 21, 2007 20:21, edited 2 times in total.
Mobius
Baby Hen
 
Posts: 7
Joined: Sat Aug 18, 2007 23:21
Location: Aotearoa

Postby WarraWarra » Sun Aug 19, 2007 4:21

The /etc/resolv.conf has a incorrect DNS ip in it if it does this.

Try to run
# net-setup
This should auto discover your isp modems DNS and add it then it should ping names.
Try to remove the 192.? one and try again as it would only work provided the dns in the router has the same isp dns ip's in it and passes the request on to the isp dns. Might also want to restart the router so it can update the dns in it to a current working one ? They might be bussy with maintance and the 1st isp dns is dead temporarily.

I precviously said to add the router ip under the presumption that the router has correct auto dns info in it.

Weard that it does not upon failure use the 2nd / 3rd entry in there or it can not figure out it has failed and switch ??

Hope this helps.
WarraWarra
Sagely Hen
 
Posts: 1989
Joined: Wed Jan 03, 2007 21:01
Location: 31.324270, -113.585511

Postby Mobius » Sun Aug 19, 2007 10:05

Hi WarraWarra,

Correct me if I'm wrong, but I believe that if my dns was set up wrongly I wouldn't get dig or nslookup responses?

The 192.168.1.5 is my local dns server that handles my home network, and forwards all other querys out to my isp. It works fine for all the other pcs on the network (including the same laptop I'm having trouble with when it is running another os).

Anyway, I'm not one to reject someones suggestion without trying it, so I removed the 192.168.1.5 line from /etc/resolv.conf and re-ran net-setup. No joy. I can still ping the outside world using ip addresses, and can find out those addresses using nslookup - but I still can't ping hostnames directly.

Maybe its a bug in the networking stack? How would I go about troubleshooting/rectifiying that?

UPDATE: Thinking of the network stack got me testing the hosts file: this is working fine, ie i can ping localhost or tucker (my machine name) or any other host I enter in there... so only dns bit not working... :?
Mobius
Baby Hen
 
Posts: 7
Joined: Sat Aug 18, 2007 23:21
Location: Aotearoa

Re: Can dig and nslookup but can't ping or browse

Postby WarraWarra » Sun Aug 19, 2007 19:35

You are correct , we had a few interesting things happen in the last few releases and doing this will remove them from the list of what can be wrong.
It should be software / settings bug in SL somewhere , maybe by trying to run " # net-setup " you might fix a possible buggy setting somewhere as it auto edits the files / add new woking settings.

Try using the live dvd and it's default settings , does it work in there ? , if so then copy the /etc/resolv.conf /etc/host ??? and all other related files over to the hd / installed version after renaming the current hd ones. Not in linux now can not check correct files / info.
Then restart and test = happy , compare and post if you find the wrong setting.
If live dvd does not work then the router / gateway is somehow blocking outside access.

This might helps as well:
http://www.gentoo.org/doc/en/handbook/h ... art1_chap3
and do the settings by hand and verify them against this how-to and if still not working then I am out of ideas.

LOL I am stupid , try to connect the pc directly to the modem / internet or bypassing the router / gateway , if this works then router / gateway.

Coffee ! , brain is still a bit slow has to warm up like a old Ford model T / diesel truck LOL.
WarraWarra
Sagely Hen
 
Posts: 1989
Joined: Wed Jan 03, 2007 21:01
Location: 31.324270, -113.585511

Re: Can dig and nslookup but can't ping or browse

Postby Mobius » Sun Aug 19, 2007 22:57

Hey WarraWarra,

You might be forgetting that I do have internet connectivity from this machine: ie I can nslookup web addresses and then ping their numbers separately, so lets rule out my router and modem. Its just somewhere on the machine the linking between resolving and contacting names is broken. The same thing happens when I boot using the live DVD, so perhaps there is an issue with this latest release? I downloaded 1.4e (and the checksum matches).

The dvd doesn't want to boot on my other machines (some bios error I'm told - but thats a different issue), so I've been unable to check if it is only on this machine, or if its a problem with the dvd. Have you tried this latest release?

Oh, and by the way - skype somehow manages to work despite this :?
Mobius
Baby Hen
 
Posts: 7
Joined: Sat Aug 18, 2007 23:21
Location: Aotearoa

Re: Can dig and nslookup but can't ping or browse

Postby Mobius » Mon Aug 20, 2007 0:47

Have now tested on multiple machines on different networks, and have filed a bug
http://bugs.sabayonlinux.org/show_bug.cgi?id=282
Mobius
Baby Hen
 
Posts: 7
Joined: Sat Aug 18, 2007 23:21
Location: Aotearoa

Re: Can dig and nslookup but can't ping or browse

Postby WarraWarra » Mon Aug 20, 2007 1:22

I know this but it is really weard if it happens in both dvd and installed. Usually 1 works and the other does not.
Did you try any other os / live cd /dvd on this machine.

Weard weard weard.
WarraWarra
Sagely Hen
 
Posts: 1989
Joined: Wed Jan 03, 2007 21:01
Location: 31.324270, -113.585511

Re: Can dig and nslookup but can't ping or browse

Postby Mobius » Mon Aug 20, 2007 21:27

I usually dual boot Vista(ew) and Kubuntu Fiesty... never had a problem like this before.
Mobius
Baby Hen
 
Posts: 7
Joined: Sat Aug 18, 2007 23:21
Location: Aotearoa

Re: Can dig and nslookup but can't ping or browse

Postby Belial » Mon Aug 20, 2007 21:34

Hello,

I recently suffered the same problem, on one of my gentoo boxes, and on sabayon 3.4 live and installed, i havent been able to find what package has been updated and is causing this (as i usually have search local to allow resolving of my local machines as router.local etc)

As a temporary fix, you can remove the line starting with 'search' in your /etc/resolv.conf , its only a workaround, ill report back if i find the offending package so we can mask it :)
User avatar
Belial
Young Hen
 
Posts: 34
Joined: Sun Aug 19, 2007 22:34

Re: Can dig and nslookup but can't ping or browse [WORKAROUND]

Postby Mobius » Tue Aug 21, 2007 14:28

Belial, you're a lifesaver!

Indeed, my network does use .local as its local network. This has also triggered my memory of a similar problem I had back with SuSE 9. It's some kind ofissue with mdns

I believe there are 3 methods of hiding this problem:

1) Remove the search line from /etc/resolv.conf. If you do this, you won't be able to resolve your local network addresses, but internet will work.
2) Rename your domain from *.local to something like *.home. Obviously this can be very tricky, but I did it in about 5 min ;). Not very handy if you roam onto someone else's network (um, excuse me, would you mind migrating your domain name for me??)
3) Edit /etc/nsswitch.conf: find the line that says something like
Code: Select all
hosts:        files mdns4_minimal [NOTFOUND=return] dns mdns4

and remove the [NOTFOUND=return] part.

Number 3 looks like the best option, just need someone with a bit more knowledge about linux networking to see if this would cause any other problems.
Still, that being said... I don't have this problem in Kubuntu...
Mobius
Baby Hen
 
Posts: 7
Joined: Sat Aug 18, 2007 23:21
Location: Aotearoa

Next

Return to Networking and Wireless

Who is online

Users browsing this forum: No registered users and 0 guests

cron