LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   No internet, but pings gateway fine (https://www.linuxquestions.org/questions/linux-networking-3/no-internet-but-pings-gateway-fine-79066/)

nateinabox 08-04-2003 10:36 PM

No internet, but pings gateway fine
 
I just installed Mandrake Linux 9.1 yesterday and I've encountered some networking issues which are driving me insane. Anyone who can offer any insight, it would be much appreciated.

I've connected my usb pocket ethernet network card to my system, and Linux recognizes the card and has drivers for it. The DHCP from my router appears to be working, it's been assigned an IP. I can ping the loopback fine (127.0.0.1) and I can ping the router fine (192.168.0.1), but when I try to use the internet with the browser, it doesn't work.

eth0 is up and working fine on 192.168.0.6 (DHCP from the router).

My friend was mentioning that I need to mess with the DNS settings, but I couldn't figure out how to do that.

I checked the routing using "netstat -r", but I didn't really understand the numbers since it responded that the eth0 destination was 192.168.0.0. It has a second entry for eth0 that says 'default' for the destination, and 192.168.0.1 for the gateway, which seems correct, but the subnet mask there is 0.0.0.0

destination Gateway Genmask Flags MSS
192.168.0.0 * 255.255.255.0 U 0
127.0.0.0 * 255.0.0.0 U 0
default 192.168.0.1 0.0.0.0 UG 0

Window irtt Iface
0 0 eth0
0 0 lo
0 0 eth0

I've tried to stay away from the KDE tools (Mandrake Control Center) because they don't seem to do anything that's helping at the moment. I don't know that many console commands yet though, as this is all pretty new to me. Thanks in advance.

ppuru 08-04-2003 10:48 PM

have you tried pinging an external ip? Try pinging 216.109.127.60 (which is mail.yahoo.com)

If you are indeed able to ping using an IP, you can train your efforts on DNS.

Important files are

/etc/resolv.conf that tells your resolver which DNS to use to resolve hostnames to ip
/etc/named.conf and files in /var/named - in case you want to use your own DNS.

some good help here
http://www.ibiblio.org/pub/Linux/docs/HOWTO/DNS-HOWTO
and in
RedHat Customization Guide.

fulcrum 08-04-2003 10:49 PM

In order to figure out whether you need to mess with the DNS settings, try pinging the IP address of a remote site (instead of the domain name). For example, ping 216.239.39.99 for www.google.com.

If you get a response then the problem is the DNS entries. To fix that edit the /etc/resolv.conf to add the IP address of the DNS server and the search paths.

thundersnows 08-04-2003 10:56 PM

hi,
i got almost the same problem like this.
but my problem is, i want to connect my computer to win2000 server, so i can have internet access.
i've tried to ping public ip and no response.
but i can ping to other computer in my network (win98). so what's the problem ?

nateinabox 08-04-2003 11:10 PM

Yep, you guys were right about the DNS for my problem. The public ip's pinged out fine.

I'm going to look up some DNS stuff and see if I can figure out how to edit that file. That ibiblio site link doesn't seem to be working for me at the moment though. Thanks for the help ppuru and fulcrum.

nateinabox 08-04-2003 11:45 PM

Ok, I edited my /etc/resolv.conf. It already had information in there regarding what I would assume is the domain. I have socal roadrunner as my ISP (socal.rr.com), so that's the information that was there. I added a domain line to the resolv.conf file, but still nothing from the web browser.

Here's what the resolv.conf looks like now. Tell me if something looks wrong.

domain socal.rr.com
search socal.rr.com
nameserver 192.168.0.1

ppuru 08-05-2003 12:05 AM

Does 192.168.0.1 have a DNS service running?

You can try using the DNS address of your ISP which dig reports as

24.30.200.3 (dns1.rr.com)

nateinabox 08-05-2003 12:20 AM

192.168.0.1 doesn't have a DNS service running. I put it there in a vain attempt to find a service that does do DNS, but I can't seem to find any information on what DNS routing IP I should use for my ISP.

I tried inputting the rr DNS address that you gave, but it still gives the same response, with no internet.

Here's my current resolv.conf:
search socal.rr.com rr.com dns1.rr.com
nameserver 24.30.200.3

ppuru 08-05-2003 12:32 AM

you can do away with

search

but that is not going to resolve your problem.

Are you able to ping the nameserver (24.30.200.3)?

Also, from your shell prompt, try

dig A www.yahoo.com @24.30.200.3

karaf 08-05-2003 12:40 AM

Hi,

I'm having the EXACT same issue as Nateinabox. I installed RedHat Linux 9 today. I have a router as a DHCP server, and it is assigning an IP just fine. I can ping my local lan, and external ip addresses. BUT, I cannot resolve addresses (eg: ping novell.com does not work, nor can I run Mozilla on the internet.)

I left the localhost line in my /etc/hosts file (as RedHat tells you to do), but there is no corresponding nameserver entry in the /etc/resolv.conf for 127.0.0.1. Is this the problem? I thought that would be put in by dhclient-script...???

Just like nateinabox, my resolv.conf has the ip addresses of my ISP DNS Servers listed (as fed to my Linux box by the router during startup), but it's not using those servers to resolve addresses.

Argh.

Any help is sincerley appreciated!

KARAF

HappyDude 08-05-2003 12:44 AM

Try putting 192.168.1.1 in the primary DNS spot. For some reason its requiered for a static IP behind a Linksys router.

karaf 08-05-2003 12:46 AM

Quote:

Originally posted by ppuru
>Also, from your shell prompt, try
> dig A www.yahoo.com @24.30.200.3
I tried this just now. "Connection timed out, no servers could be reached."

mmmmmmmmmm.......

KARAF

karaf 08-05-2003 12:49 AM

Quote:

Originally posted by HappyDude
Try putting 192.168.1.1 in the primary DNS spot. For some reason its required for a static IP behind a Linksys router.
HappyDude,

Is that your router's ip address? My SMC uses 192.168.123.254. Should I use that?

And I apologize for this STUPID question (long time since I was doing Unix administration), where is the "primary DNS spot"? You mean in resolv.conf?

Thanks,

KARAF

nateinabox 08-05-2003 12:52 AM

I pinged 24.30.200.3, but it couldn't find it (unknown host). The same thing happened with the dig command. I then tested one of the other public addresses listed earlier, and those still work, so I'm still connected.

I tried plugging in the 24.30.200.3 address through my Internet Explorer on my Windows machine, and the address came up not found, as well as the dns1.rr.com address and all variations I could think of. I know it exists, but I don't know why IE wouldn't be able to find that 24.30.200.3 address.

Btw Happydude, I put in the 192.168.0.1 address (my router address) into my /etc/resolv.conf, and it didn't help any. Perhaps it wasn't the "primary" space that karaf was talking about...

karaf 08-05-2003 01:10 AM

Quote:

Originally posted by nateinabox
I pinged 24.30.200.3, but it couldn't find it (unknown host).
MMMMmmmm. I was able to ping it fine.

Quote:

I tried plugging in the 24.30.200.3 address through my Internet Explorer on my Windows machine, and the address came up not found
Very strange. It said "refused connection" to me. The dig command timed out though.

Quote:


I put in the 192.168.0.1 address (my router address) into my /etc/resolv.conf, and it didn't help any.

Actually, when using DHCP, the dhclient-script is supposed to prefill /etc/resolv.conf for you, so in theory, any changes you make will be overwritten anyways. Hence my confusion at his suggestion.

:confused:

Strange issue, but never say die!

KARAF


All times are GMT -5. The time now is 08:58 PM.