LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Connecting to the network not reliable (https://www.linuxquestions.org/questions/linux-newbie-8/connecting-to-the-network-not-reliable-754504/)

ash_zz_00 09-11-2009 05:46 PM

Connecting to the network not reliable
 
Hi,

I have Slackware 12.2 installed on my HP dvt6 laptop. I used netconfig to setup the network for DHCP. The problem is that it doesn't connect to the network every time I start up. It's probably not the cable connection itself because it has never been a problem for Windows. So may be I haven't setup something right in Linux.

Here's some info which might be helpful. Of course this is when I was connected to the network.

##### ifconfig #####

eth0 Link encap:Ethernet HWaddr 00:23:8b:c8:d5:71
inet addr:10.1.11.50 Bcast:10.1.11.255 Mask:255.255.255.0
inet6 addr: fe80::223:8bff:fec8:d571/64 Scope:Link
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2890 errors:0 dropped:112591799 overruns:0 frame:0
TX packets:2195 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2941965 (2.8 MiB) TX bytes:264888 (258.6 KiB)
Interrupt:17 Base address:0xc000

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:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

##### rc.inet1.conf ####

# Config information for eth0:
IPADDR[0]=""
NETMASK[0]=""
USE_DHCP[0]="yes"
DHCP_HOSTNAME[0]=""

# Default gateway IP address:
GATEWAY=""

The eth1, eth2 and eth3 are all empty.

##### lspci ####

02:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g (rev 01)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 02)

Any suggestions on how I could make it more reliable?
Also let's say it didn't connect to the network on startup. Is there a way to manually force it?

Thanks in advance,

Ash.

salemboot 09-11-2009 05:53 PM

It could be your network card driver isn't loading before the connection is being brought up.

Identify the card, add an entry into the /etc/rc.d/rc.modules file near the bottom.

For instances:

/sbin/modprobe 8139too

I'm not sure the name of your driver.

lsmod | less

and look for it.

ash_zz_00 09-11-2009 06:14 PM

Here's the list from lsmod. So how do I know which is my driver?

Code:

Module                  Size  Used by
snd_seq_dummy          6788  0
snd_seq_oss            33408  0
snd_seq_midi_event    10240  1 snd_seq_oss
snd_seq                50928  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi_event
snd_seq_device        10380  3 snd_seq_dummy,snd_seq_oss,snd_seq
snd_pcm_oss            40480  0
snd_mixer_oss          17920  1 snd_pcm_oss
ipv6                  241956  18
pcmcia                36524  0
pcmcia_core            35604  1 pcmcia
lp                    13572  0
ppdev                  11268  0
parport_pc            28196  0
parport                34796  3 lp,ppdev,parport_pc
fuse                  54684  1
snd_hda_intel        367756  0
snd_pcm                70788  2 snd_pcm_oss,snd_hda_intel
snd_timer              23176  2 snd_seq,snd_pcm
snd_page_alloc        11400  2 snd_hda_intel,snd_pcm
uvcvideo              57096  0
compat_ioctl32          5120  1 uvcvideo
snd_hwdep              10756  1 snd_hda_intel
videodev              36736  1 uvcvideo
i2c_i801              12688  0
snd                    51748  9 snd_seq_oss,snd_seq,snd_seq_device,snd_pcm_oss,snd_mixer_oss,snd_hda_intel,snd_pcm,snd_timer,snd_hwdep
sg                    30516  0
intel_agp              29116  1
agpgart                32584  1 intel_agp
psmouse                40592  0
ac                      8196  0
button                10128  0
thermal                19484  0
video                  20624  0
output                  6656  1 video
v4l1_compat            17924  2 uvcvideo,videodev
r8169                  31236  0
serio_raw              9220  0
processor              36648  1 thermal
evdev                  13088  8
thermal_sys            15144  3 thermal,video,processor
battery                14340  0
wmi                    9768  0
mii                    8448  1 r8169
hwmon                  6300  1 thermal_sys
soundcore              10080  1 snd


ash_zz_00 09-15-2009 10:47 PM

Earlier the lsmod list was not formatted correctly. Figured out how to fix it so it's more readable. Could someone tell me which is my network driver?

It happened again today. I thought may be if I run the dhcp client after startup (assuming all the necessary modules are loaded), it might connect to the network. So I ran dhcpcd but that failed too. I had to reboot to get the network connection working.

Thanks,

Ash.

GrapefruiTgirl 09-15-2009 11:45 PM

Quote:

Originally Posted by ash_zz_00 (Post 3684475)
Could someone tell me which is my network driver?

In that lsmod list, your network driver for the realtek ethernet is "r8169"

I have a couple minor suggestions for the time being, though I'm not 100% sure whether either of them will completely solve the issue:

A) Search around LQ a bit for how to disable IPv6 for your network on Slackware. It's pretty easy; it takes two lines in a new file in /etc/modprobe.d as well as one optional line in /etc/rc.d/rc.inet1.conf and doing this may fix the problem. IPv6 is known to cause intermittent network bugginess, not to mention slightly slowing down browsers and DNS/DHCP systems. If you look, I guarantee you will find the instructions here.

B) Also in /etc/modprobe.d in the same file as mentioned above, OR in another new file, I suggest making an "alias" as follows:
Code:

alias eth0 r8169
options r8169 blah blah # this line is optional

What this does, is assure you that when the kernel discovers your NIC during boot, it will automatically associate it with the r8169 driver. The idea here is to make sure that the kernel is not being confused because you have 2 NICs on the machine. The "options" line is only needed if you need to pass some additional arguments to the r8169 module when it gets modprobed.

In addition to (B) above, it'd be a good idea to NAME your eth0 device in /etc/rc.d/rc.inet1.conf, like so, even though eth0 is the default (and here's one of the two things I mentioned for disabling IPv6 ;) ):
Code:

NETWORKING_IPV6="no"
IFNAME="eth0"

Best of luck; if this-all doesn't solve the problem, let us know -- we'll keep looking :)
Sasha

RockyMarrone 09-16-2009 12:16 AM

Hi, ash_zz_00

i think in the ~/.bashrc u will write a function like

# network settings function
function set_network() {
sudo ifconfig eth0 10.1.11.50 netmask 255.255.255.0
sudo route add default gw 10.1.11.1
ping www.google.com
}

then on the shell just write source ~/.bashrc and then set_network
i think it should work just after logging in to the Linux u just have to write set_network

Note: if you are not loggined as root u then should have entry into the
/etc/sudoers file


All times are GMT -5. The time now is 02:15 PM.