LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Utter inability to connect to internet (https://www.linuxquestions.org/questions/linux-newbie-8/utter-inability-to-connect-to-internet-890468/)

Sweyn78 07-07-2011 01:25 PM

Utter inability to connect to internet
 
Hello! Today is the first day I've ever used Linux. I finished installing Debian 6.0 GNU/Linux at 4:00 this morning. I have a friend who is quite good with Debian Linux (he's been using it for years), but he was unable to help me. Over four hours of searching-around on the internet, typing gibberish into the terminal, etc. has done nothing but frustrate me. Even more frustrating: it worked at 5:00 this morning, before I went to sleep. Does anyone have any advice for me on how to fix this crippling issue?
My NIC is integrated, having come with the computer, and is the RealTek Family Fast Ethernet.
My Ethernet-cord is plugged-in.

Thank you greatly in advance.
~Sweyn78

anomie 07-07-2011 01:37 PM

Simple enough round of sanity checking -- post output from the following:
  • /sbin/ifconfig
  • cat /etc/resolv.conf
  • netstat -rn

Sweyn78 07-07-2011 05:53 PM

1 Attachment(s)
Quote:

Originally Posted by anomie (Post 4408085)
Simple enough round of sanity checking -- post output from the following:
  • /sbin/ifconfig
  • cat /etc/resolv.conf
  • netstat -rn

Here:
Attachment 7520

anomie 07-07-2011 06:19 PM

Well, you've got no IPv4 address assigned to eth0, there are no resolvers in /etc/resolv.conf, and you have no default gateway. That's enough to ruin your chances of connecting to the 'net.

It's likely your DHCP server is not leasing you an address, for whatever reason. In fact, you may be able to observe this failure by running dhclient from a terminal (as root).

Double-check your Ethernet cable. Try a new one. Bounce your home router/NAT device, if you're connected to one. Bounce your cable modem, if you're directly connected to that.

Sweyn78 07-07-2011 06:34 PM

Nothing happens when I type "dhclient" or "sudo dhclient" into the terminal. :\
The ethernet-cable's plugged firmly into both the router and the back of the computer. As it was just working this morning, I probably don't need a new ethernet-cord (and I don't have any others that are anywhere near long enough to reach my computer, so we have to just assume that the ethernet-cord is in good shape).
I'm not sure what you mean by "Bounce". Do you mean type "192.168.1.1" into a browser, or do you mean to ping the router? If it's the latter, I don't know how on Linux.

frankbell 07-07-2011 08:42 PM

I think by "bounce," Sweyn78 might mean "cycle" or "restart," but pinging is always a good idea for testing network connectivity.

Here are instructions for setting up a static ip address in Debian:

http://www.debian-administration.org/articles/254

Running the command cat /etc/network/interfaces in a terminal will allow you to see how your networking is currently configured by displaying the contents /etc/network/interfaces in the terminal.

anomie 07-07-2011 09:47 PM

Quote:

Originally Posted by Sweyn78
I'm not sure what you mean by "Bounce". Do you mean type "192.168.1.1" into a browser, or do you mean to ping the router? If it's the latter, I don't know how on Linux.

Power-cycle the router/NAT device. (I see you're on private IP space, so I am assuming you have one.) Afterward, either restart your networking service, or restart your workstation.

Sweyn78 07-07-2011 11:24 PM

Quote:

Originally Posted by frankbell (Post 4408378)
I think by "bounce," Sweyn78 might mean "cycle" or "restart," but pinging is always a good idea for testing network connectivity.

Here are instructions for setting up a static ip address in Debian:

http://www.debian-administration.org/articles/254

Running the command cat /etc/network/interfaces in a terminal will allow you to see how your networking is currently configured by displaying the contents /etc/network/interfaces in the terminal.

Thanks. I believe you've just identified the source of the problem. There are obvious errors in the files specified in the guide you linked to, but my computer refuses to let me edit them; they're read-only. How do I change this?

Quote:

Originally Posted by anomie (Post 4408409)
Power-cycle the router/NAT device. (I see you're on private IP space, so I am assuming you have one.) Afterward, either restart your networking service, or restart your workstation.

That's one of the first things I did.

bsat 07-08-2011 12:38 AM

Quote:

There are obvious errors in the files specified in the guide you linked to, but my computer refuses to let me edit them; they're read-only. How do I change this?
You will have to be root to edit the configuration files so use sudo
For eg:

Code:

sudo gedit /etc/network/interfaces

Sweyn78 07-08-2011 01:19 AM

I've made the changes to the files in the guide, I've tried to follow the advice of the comments on the guide, and, still, it's just not working.
Things I've noticed:
Nothing but headers appear when I type "netstat -nr".
Resolv.config keeps rewriting itself

salasi 07-08-2011 02:21 AM

Quote:

Originally Posted by Sweyn78 (Post 4408537)
Resolv.config keeps rewriting itself

resolv.conf being re-written is quite normal; various things (dhcp, ppp, and probably network manager/wicd) do this when they are active. Usually, there is a comment included in resolv.conf about which service has written its settings there, so posting the file in its overwritten state may be helpful (if you can, please paste directly into your reply, using code tags to surround the pasted portion - it improves readability).

Can you ping your router? You'll have to know the ip address of your router It will almost inevitably be on a private/non-routable ip address; probably 192.168.0.0 or 192.168.0.1.

To try ping, type the following into a terminal

Quote:

ping 192.168.0.1
(which will try to ping for ever control-C to terminate...or

Quote:

ping 192.168.0.1 -c 1
for a single ping; this will still stall, if the target is unavailable, but control-C will bring it to an end).

If you cannot ping the router, you'll find it difficult to make much progress. Any one of the things listed by anomie in post 4 are enough to stop you, but being unable to ping is pretty fundamental and low level, so start there.

Sweyn78 07-08-2011 02:35 AM

Our Linksys' IP is 192.168.1.1. I know because I've done port-forwarding and other such things before from this OS and my XP (which I formatted yesterday for Debian).
Whenever it changes that file, it leaves only one line of code, and it's always the same nameserver, which is some combination of 10's and 1's.
I'm about to reboot into Debian to try to ping my router and to try OpenDSN to see if it'll work.
I'll be watching this thread from my Blackberry and I'll post what happens (if anything).

Sweyn78 07-08-2011 03:00 AM

OpenDNS worked! :D
Thank you all so much for your help! It's nice to have the internet finally, haha. :)


All times are GMT -5. The time now is 12:32 AM.