LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Steps to troubleshoot the internet connection... (https://www.linuxquestions.org/questions/linux-newbie-8/steps-to-troubleshoot-the-internet-connection-571772/)

nahawand 07-23-2007 11:02 PM

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

Nylex 07-24-2007 12:21 AM

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).

nahawand 07-24-2007 02:10 AM

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


b0uncer 07-24-2007 02:29 AM

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, ...

Nylex 07-24-2007 03:08 AM

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?

nahawand 07-24-2007 09:19 PM

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.

nahawand 07-24-2007 09:24 PM

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!

nahawand 07-24-2007 09:54 PM

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


Nylex 07-24-2007 11:50 PM

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.

nahawand 07-25-2007 01:22 AM

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.

nahawand 07-25-2007 01:56 AM

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.

Nylex 07-25-2007 02:56 AM

I think putting the line "/sbin/modprobe 3c509" in /etc/rc.d/rc.modules is perhaps the "purer" way of doing it.

nahawand 07-26-2007 01:34 AM

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


All times are GMT -5. The time now is 09:30 PM.