LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 07-24-2007, 12:02 AM   #1
nahawand
LQ Newbie
 
Registered: Jul 2007
Posts: 16

Rep: Reputation: 0
Steps to troubleshoot the internet connection...


Hi all,

I've searched this forum and the internet (via Google) for a how to or a document that simply shows how a Linux user (Slackware user) would go about troubleshooting the internet connection on a his/her machine, but found nothing complete or adequate.

In windows, if you wanted to troubleshoot the connection, you would start by checking the drivers for the network card, whether they are installed or not, if the network is enabled or disabled, what ip address the nic is getting, renew/release the ip etc...Is there anything similar to that in linux Slackware? Can someone just outline the steps that a novice would have to take to troubleshoot the internet connection on a machine that has Slackware 12.0, which is connected to a link sys router, and it gets its ip address dynamically?

Thanks
 
Old 07-24-2007, 01:21 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
The first thing I'd do is to run "ifconfig -a" to see if 1. your NIC is there and 2. it actually has an IP address. If you have N network cards in your machine, you should see devices for each of those, listed as ethx (where x = 0, 1, ..., N - 1). Do you know what kind of network card it is? If not, post the output of lspci here. Also run lsmod and post the output (that will list the kernel modules loaded, so we can see if the appropriate one for your card is loaded).
 
Old 07-24-2007, 03:10 AM   #3
nahawand
LQ Newbie
 
Registered: Jul 2007
Posts: 16

Original Poster
Rep: Reputation: 0
Hi,

the result of ifconfig -a:
Code:
lo     link encap: Local Loopback
inet addr: 127.0.0.1 Mask: 255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8 errors:0 dropped:0 overruns:0 frame:0
TX packetrs:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:560 (560.0 b) TX bytes:560 (560.0 b)
Obviously, ethn is not present in there.

The following is the output of the lspci command:

Code:
00:00.0 Host bridge: Intel corporation 430TX - 82439TX MTXC (rev 01)
00:07.0 ISA bridge: Intel corporation 82371AB/EB/MB PI IX4 ISA (rev 01)
00.07.1 IDE interface: Intel Corporation 82371AB/EB/MB PI IX4 IDE (rev 01)
00:07.2 USB Controller: Intel Corporation 82371AB/EB/MB PI IX4 USB (rev 01)
00:07. Bridge: Intel Corporation 82371AB/EB/MB PI IX4 ACPI (rev 01)
00:09.0 USB Controller: OPTi Inc. 82C861 (rev 01)
00:0b.0 VGA compatible controller: ATI Technologies Inc 3D Rage I/II 215GT [Mach64 GT] (rev 41)

The output of lsmod command:

Code:
Module         Size   Used by
ipv6           226016    25
pcmcia          30628    0
pcmcia_core     2400     1 pcmcia
capability      3336      0
comoncap         5376     1 capability
agpgart          26928    0
lp               9800     0
parport_pc       23844    1
parport          30152    2 lp,parport_pc
pcspkr            2304    0
psmouse           34440   0
i2c_piix4         7436    0
ata_generic       5252    0
evdev             7936    1
 
Old 07-24-2007, 03:29 AM   #4
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Code:
dmesg
- information about what has happened since you booted; should list your ethernet card stuff too, check out the name/model at least to make sure the system acknowledges the card is in
Code:
lsmod
- check if the module for your card is loaded; internet helps deducing what module it should be - if the module is not shown here, it could still be compiled into the kernel. If you find the correct module but it's not used, there's something wrong between the module ("driver") and your card.
Code:
ifconfig eth0
- see if there are settings for the (first) ethernet device, and if they're correct. If you get nothing, the card and it's driver aren't co-operating. If you do get something, make sure the information is valid, and try to 'ifconfig eth0 up' to start the device.
Code:
ping 66.249.73.42
- check to see if the connection works, but you just couldn't get DNS names resolved.
Code:
dhclient eth0
dhcpcd eth0
- depending on your configuration, either one of these should work and try to fetch information via DHCP to determine your ip address and the rest needed stuff. No output means it works, but if you do get output, it tells you can't get DHCP answers - maybe the error is even more informative

That's the way to go..there are several steps and several ways of checking the things. Basically you want to know:
- does the system know I have an ethernet card?
- has the system got the correct driver (kernel module) for my card?
- has the system loaded the appropriate driver (module)?
- is the device eth0 (or something) present?
- is the device eth0 configured properly?
- can I ping any IP addresses?
- can I get DHCP requests/answers all right, or not?

The tools to determine the answers for the above questions are many; dmesg, system logfiles, lsmod, modprobe, ping, ifconfig, dhclient/dhcpcd, ...
 
Old 07-24-2007, 04:08 AM   #5
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Is that your entire lspci output? If so, it doesn't seem like your network card is being seen. Can you give us any more info about your hardware?
 
Old 07-24-2007, 10:19 PM   #6
nahawand
LQ Newbie
 
Registered: Jul 2007
Posts: 16

Original Poster
Rep: Reputation: 0
My kernel version is: 2.6.21.5. I have the 3com Etherlink III card. And yes Nylex, that is my entire screen output.

It appears that my system does not know that I have a network card attached.

Bouncer, how do you use dmesg? If I just type it, it vomits 500000 lines of text on the screen. I am a fast reader, but not that fast! Is there a way or an argument to slow the output of the dmesg so I can read it? Is there a boot.ini file somewhere that I can access. Also, how do you use modprobe?

Remember comrades, I am a beginner, a nice way of saying Newbie!

When you provide the commands, please provide the arguments that I would need to use to make the command useful.

EDIT:

its worth mentioning that when I installed my Slackware, I had to use the huge.s kernel instead of the default (hugesmp.s). Because I do not have a Pentium machine.

Last edited by nahawand; 07-24-2007 at 10:20 PM.
 
Old 07-24-2007, 10:24 PM   #7
nahawand
LQ Newbie
 
Registered: Jul 2007
Posts: 16

Original Poster
Rep: Reputation: 0
Output of ifconfig eth0:

Code:
eth0: error fetching interface information: Device not found
Output of dhclient eth0

Code:
SIOCSFADDR: No such device
eth0: Error while getting the interface flags: No such device
eth0: Error while getting interface flags: No such device
Bind socket to interface: No such device

output of dhcpcd eth0: Nothing!
 
Old 07-24-2007, 10:54 PM   #8
nahawand
LQ Newbie
 
Registered: Jul 2007
Posts: 16

Original Poster
Rep: Reputation: 0
I noticed the following errors when I load into linux (only using command line):

Code:
Failed to create listening socket: address already in use

Could not reliably determine th server's fully qualifiedly domain name using 127.0.0.1 for serverName

Also, after the "Welcome to linux 2.6.21.5" message appears, i get the following error:

fileserver login: STOPPING server from pid file /var/run/mysql/mysql.pid
070724 22:50:47 mysqld ended
 
Old 07-25-2007, 12:50 AM   #9
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
Oh, it appears to be an ISA card and hence wouldn't show up when you run lspci. I've also found out that the module needed is 3c509, so try loading that with "modprobe 3c509" (you'll need to be root to run this). After that, check the end of dmesg to see if there's anything important there (and "ifconfig -a", too).

If you want to see the entire dmesg output, pipe the output to less: "dmesg | less" and then you can scroll up and down with the arrow keys.
 
Old 07-25-2007, 02:22 AM   #10
nahawand
LQ Newbie
 
Registered: Jul 2007
Posts: 16

Original Poster
Rep: Reputation: 0
Thank you Nylex, that worked! Thank you....Thanks for the dmesg tip too. Really useful.

I got an Ip address and was able to ping google. Connection up and running, thanks everyone.

PS. When I rebooted, the 3c509 module didn't start, and I had to start it manually with (modprobe 3c509) to get an Ip. Can I get it to start when linux starts? If yes, how?

Thanks again everyone, you've been a great help.

Last edited by nahawand; 07-25-2007 at 02:24 AM.
 
Old 07-25-2007, 02:56 AM   #11
nahawand
LQ Newbie
 
Registered: Jul 2007
Posts: 16

Original Poster
Rep: Reputation: 0
Should I edit rc.local and add "modprobe 3c509" to it? So it starts when linux starts?

EDIT:

I did the above, and it seems to work just fine. Please let me know if that was the correct way of going about it.

Last edited by nahawand; 07-25-2007 at 03:05 AM.
 
Old 07-25-2007, 03:56 AM   #12
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
I think putting the line "/sbin/modprobe 3c509" in /etc/rc.d/rc.modules is perhaps the "purer" way of doing it.
 
Old 07-26-2007, 02:34 AM   #13
nahawand
LQ Newbie
 
Registered: Jul 2007
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks Nylex, when I edited rc.modules, I found "/sbin/modprobe 3c509" commented, I uncommented, and it works like a charm.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
XIO: fatal IO error 104 (Connection reset by peer) on X server ":0.0" -- WITH STEPS! geodescent Linux - Software 3 07-30-2008 05:52 PM
Internet connection timeout on Fedora Core 5 using USB connection mike1111 Linux - Networking 0 07-23-2006 10:44 PM
need help to troubleshoot internet issue (from mdk 9.2 to LE2005) sirpelidor Linux - Networking 0 08-03-2005 03:38 PM
Steps I need to take to get my laptop internet access via a wireless card? {-_-} SUSE / openSUSE 2 11-18-2004 07:01 PM


All times are GMT -5. The time now is 04:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration