Linux refuses to see the internet

User-to-user help and troubleshooting.
Gandalf2
Posts: 3943
Joined: Wed Oct 13, 2004 7:00 am
Location: W. Midlands, UK

Post by Gandalf2 »

Where I live, there is a D-Link router, connected to the internet via PPPoA. There are two computers connected to this router, one is WindowsPC which is quite happy with ther internet, the other is LinuxPC. I cannot get the internet to work on LinuxPC (Mandrake v9 i think) no matter what settings I change. I can connect to the router by typing in 192.168.1.1 in my browser, but nothing else works. Though, bizzarely, sometimes one website works (http://news.bbc.co.uk) but I've yet to see any other works.

And, in a move of confusion, WindowsPC can ping router & LinuxPC, the router can ping WindowsPC and LinuxPC, BUT LinuxPC cant ping anything!!! /mad.gif" style="vertical-align:middle" emoid=":mad:" border="0" alt="mad.gif" />
Image
Image
spideycw - 'This is because Grav is a huge whining bitch. But we all knew that already' Dec 19 2010, 07:36 PM
FreeBeer
Posts: 10902
Joined: Tue Dec 27, 2005 8:00 am
Location: New Brunswick, Canada

Post by FreeBeer »

My guess is that the setting for the gateway address, or perhaps DNS address, isn't set on the Linux box properly. My Linux box (Fedora 5) never had a problem with the router, so I didn't have to tinker with its settings, so I can't tell you how, specifically. (I'm a Linux noob.)
[img]http://www.freeallegiance.org/forums/st ... erator.gif" alt="IPB Image">

chown -R us base
Gandalf2
Posts: 3943
Joined: Wed Oct 13, 2004 7:00 am
Location: W. Midlands, UK

Post by Gandalf2 »

I've tried putting the IP address of the router into every last darn input box I can find and it still won't work /mad.gif" style="vertical-align:middle" emoid=":mad:" border="0" alt="mad.gif" /> Currently I've given it a manual IP address of 192.168.1.22, which as I say, WindowsPC and the router are quite happy with, but linu isn't. Using DHCP produces no better results.
Image
Image
spideycw - 'This is because Grav is a huge whining bitch. But we all knew that already' Dec 19 2010, 07:36 PM
Next
Posts: 9
Joined: Fri Sep 22, 2006 5:22 am

Post by Next »

Maybe the wireless/ethernet card driver you are using for Linux isn't correct/very good. See if you can find a better driver?
Last edited by Next on Sun Oct 08, 2006 7:04 am, edited 1 time in total.
Gandalf2
Posts: 3943
Joined: Wed Oct 13, 2004 7:00 am
Location: W. Midlands, UK

Post by Gandalf2 »

Tried that - it's an ancient inbuilt thing, which intel stopped supporting long ago. /doh.gif" style="vertical-align:middle" emoid=":doh:" border="0" alt="doh.gif" />
Image
Image
spideycw - 'This is because Grav is a huge whining bitch. But we all knew that already' Dec 19 2010, 07:36 PM
beauty
Posts: 239
Joined: Thu Sep 16, 2004 7:00 am
Location: Portland, OR

Post by beauty »

What does 'netstat' report?
Do you have a 'default' route that goes through the router?
Can you ping external addresses by IP Address? (e.g. 4.2.2.1)

I suspect you are just missing a default route.

You may need to add the default route to your network card as well with 'ifconfig' ...
SaiSoma
Posts: 1222
Joined: Sat Jul 30, 2005 7:00 am
Location: AL
Contact:

Post by SaiSoma »

you're on mandrake 9. login as root, type setup. i'm fairly certain that was the command for mandrake then.

setup your network again. if the command isn't setup, maybe it was draknet? i highly recommend using dhcp if your dlink has it turned on. if it doesn't, then make sure you set your gateway AND dns server to use your router ip.
Gandalf2
Posts: 3943
Joined: Wed Oct 13, 2004 7:00 am
Location: W. Midlands, UK

Post by Gandalf2 »

SaiSoma - thanks for your help but niehter of those commands worked - all the setup I've done has been through the GUI. the gateway and DNS server are set up to be the router's IP, though it insists on the primary DNS server being 127.0.0.0 (or was that 127.0.0.1??) with the secondary DNS server being the router's IP.

I reset everything up again, with DHCP and leavking a few other things blank, and the internet still doesn't work, BUT now I can ping the router, WindowsPC and the internet! /huh.gif" style="vertical-align:middle" emoid=":huh:" border="0" alt="huh.gif" /> /ninja.gif" style="vertical-align:middle" emoid=":ninja:" border="0" alt="ninja.gif" />

Beauty - netstat produced pages & pages of info... I typed "info netstat" and from that, did netstat -r, which I hope is useful....
Destination Gateway Genmask Flags Window irtt Iface
192.168.1.0 * 255.255.255.0 U 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 lo
default mygateway.ar7 0.0.0.0 UG 0 0 eth0

The router IP address is 192.168.1.1.

Any more help would be appriciated....!
Image
Image
spideycw - 'This is because Grav is a huge whining bitch. But we all knew that already' Dec 19 2010, 07:36 PM
Dogbones
Posts: 2721
Joined: Mon Nov 24, 2003 8:00 am
Location: Virginia

Post by Dogbones »

dhcp should set things up correctly for you, but obviously it isn't.

On the windows machine
-open a cmd window
-type 'ipconfig'
-type 'nslookup'

Post the output of those two

Now on the linux machine you already posted the output of 'netstat -r', now post the output of 'netstat -rn'
The -rn will resolve mygateway.ar7 into an ip address you can check against the output of ipconfig above.
Also post the output of '/sbin/ifconfig' (you can leave out the block for 'lo')

Now type 'nslookup' on the linux machine and then type freeallegiance.org after the >

Code: Select all

You should get something like
> freeallegiance.org
Server:         192.168.1.2
Address:        192.168.1.2#53

Non-authoritative answer:
Name:   freeallegiance.org
Address: 205.134.242.91
>
Is the Server reported by nslookup on the linux box the same as that reported by windows? It should be. I am guessing it is not. You need to re-setup your dns on the linux box. One of the problem's with linux is there are 20 different ways to do things and only 2 or 3 will actually work, it all makes perfect sense if you know what you are doing. What specific version of linux are you running? and what tool/utility are you using to setup the network? (this may be dependent on what window manager you are running, etc, so you'll need to tell us which one you are using).
Image
DOG PROPERTY LAWS:
2. If it's in my mouth, it's mine.
[unless it tastes bad, then it is yours.]
beauty
Posts: 239
Joined: Thu Sep 16, 2004 7:00 am
Location: Portland, OR

Post by beauty »

If you can ping the internet then the problem is only DNS.

You can manually edit a file /etc/resolv.conf
It should look something like:

nameserver 204.xxx.yyy.1
nameserver 204.xxx.yyy.2

Set the IP addresses to the correct DNS servers that you want to use (Pull them off of your Windows box or ask your ISP what to put in there)

After that I think you should be good...
Post Reply