You are not logged in.

#1 2009-09-07 16:25:40

lpb331
Member
From: Oregon
Registered: 2007-12-18
Posts: 44

Must use netcfg twice to connect to ethernet

For some reason, whenever I first try to connect to a wired connection using netcfg v 2.2.1-1, I get a "No connection" error. But then a second attempt is always successful. I am using the e100 driver, and editing rc.conf to use eth0="dhcp", INTERFACES=(eth0) and the network daemon does successfully start the ethernet up on startup. For what it's worth, my ethernet controller is, from lspci: 02:08.0 Ethernet controller: Intel Corporation 82801DB PRO/100 VE (MOB) Ethernet Controller (rev 81). My ethnet profile is:

CONNECTION="ethernet-iproute"
INTERFACE=eth0
IP="dhcp"
DHCLIENT="no"
DHCP_TIMEOUT=15

and the relevant parts of my rc.conf file are:

HOSTNAME="themoon"

gateway="default gw 192.168.0.1"
ROUTES=(!gateway)

NETWORKS=(ethnet wireless networks)

DAEMONS=(@hal @fam @alsa @net-profiles)

where wireless networks are other profiles. Whenever I go to campus, netcfg does correctly determine that I'm not using the ethernet and connects to whichever wireless network is nearby. If I put ethnet in my NETWORKS list twice, it will connect on startup, but I don't think that's what the developers had in mind. smile Any ideas on what might be causing this?

Offline

#2 2009-09-07 17:28:12

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Must use netcfg twice to connect to ethernet

I have this problem as well. Mine is an Intel NIC also (though a different one) and it doesn't report media status properly until it's brought up. I didn't spend much time on this, and just went back to non-profiled networking.

Offline

#3 2009-09-07 18:01:20

lpb331
Member
From: Oregon
Registered: 2007-12-18
Posts: 44

Re: Must use netcfg twice to connect to ethernet

Have you always had this problem with netcfg? All was well with it before this summer (oddly enough I left the ethernet at my apartment for a summer internship in Pittsburgh!), so I think it's the newest version of netcfg causing it.

Offline

#4 2009-09-07 23:02:57

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,355

Re: Must use netcfg twice to connect to ethernet

Something that comes to mind, I don't think hal is meant to be backgrounded. Try without.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#5 2009-09-08 00:26:03

lpb331
Member
From: Oregon
Registered: 2007-12-18
Posts: 44

Re: Must use netcfg twice to connect to ethernet

Thanks for the suggestion ngoonee, but that didn't get it. Could the kernel possibly be at fault as well? Just a thought...

Offline

#6 2009-09-08 03:52:49

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,355

Re: Must use netcfg twice to connect to ethernet

You should look at your logs and see what's causing the first attempt to fail. dmesg or anything from /var/log


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#7 2009-09-08 14:20:32

lpb331
Member
From: Oregon
Registered: 2007-12-18
Posts: 44

Re: Must use netcfg twice to connect to ethernet

Hmmm. I do notice that the phrase "e100 NIC Link is up 100 Mbps Full Duplex"  does not appear in dmesg until nearly the very end, long after the e100 module is loaded. Also, the errors.log mentions this:

rpcbind: cannot create socket for udp6
rpcbind: cannot create socket for tcp6

Lastly, since it said no connection, a little snooping on the forums made me look at /sys/class/net/eth0/carrier. If I don't start netcfg or use the INTERFACES=(eth0), then before the first time I try to bring up the ethernet via ifconfig, I get an error when I try "cat /sys/class/net/eth0/carrier", but after the first time I get 1 like I should. Any thoughts?

Offline

#8 2009-09-08 23:09:36

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,355

Re: Must use netcfg twice to connect to ethernet

Basically, your network card is taking quite a while to get to a working state. Try a pre-script on your netcfg to do ifconfig eth0 up or something along those lines.

As I said, sounds like hal has not finished loading when your netcfg is loaded up. I believe HAL is responsible for loading your network card properly (or it may be udev, not sure).

I think the rpcbind errors are due to the network card not being up yet.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#9 2009-09-09 00:13:04

lpb331
Member
From: Oregon
Registered: 2007-12-18
Posts: 44

Re: Must use netcfg twice to connect to ethernet

I took a look at dmesg without net-profiles being loaded, and e100 is not even listed as ready in dmesg until I try to bring eth0 up with ifconfig, regardless of whether hal is backgrounded or not. As for a pre-script, I've been looking at /usr/lib/network/connections/ethernet and ethernet-iproute, but adding interface eth0 up before the script checks for a carrier, for some reason beyond me, is not helping. If that's not what you had in mind, let me know and I'll see what happens.

Offline

#10 2009-09-09 01:08:53

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,355

Re: Must use netcfg twice to connect to ethernet

Add the following line to your config:-

PRE_UP="ifconfig eth0 up"

Note: this is very very hacky. I use an even hackier method (not using network-profiles at all, but putting ifconfig eth0 up and netcfg <profile_name> into my rc.local....) personally, but that's just me on my machine.


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#11 2009-09-09 01:43:35

lpb331
Member
From: Oregon
Registered: 2007-12-18
Posts: 44

Re: Must use netcfg twice to connect to ethernet

Hmmm. I think I had already tried that, so I tried it anyway, and again it doesn't connect on startup. It really doesn't make much sense to me why something like that wouldn't work. I know adding my ethernet profile a second time in rc.conf does get it started up, so I may have to live with it for now. Of course if you (or anyone else) have any other ideas, I'll willing to listen!

Offline

#12 2009-09-09 03:13:58

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Must use netcfg twice to connect to ethernet

Add

sleep 2

At line 22 of /usr/lib/network/connections/ethernet-iproute

I think I'll add some sort of option to disable the link check -- As you've found some hardware takes ages to be ready.

Those who have the problem, what driver do you have? I need to know so that I can properly document any change I make for this.

Last edited by iphitus (2009-09-09 03:16:45)

Offline

#13 2009-09-09 03:51:30

lpb331
Member
From: Oregon
Registered: 2007-12-18
Posts: 44

Re: Must use netcfg twice to connect to ethernet

I don't think my hardware is taking ages to get ready; I think something is preventing it from being ready. If I do not use netcfg or the network daemon in my startup, I never see in my dmesg that the e100 NIC Link is up. I also know that in mid May everything was working properly. I don't know how much you've edited the scripts since mid May, but if you didn't do much with the early parts of the script, then I'm not sure netcfg is at fault. That's just my thoughts on my particular problem. In any event, if you need anything else from me that isn't mentioned in this thread, let me know.

Offline

#14 2009-09-20 14:58:13

sm4tik
Member
From: Finland, Jyväskylä
Registered: 2006-11-05
Posts: 248
Website

Re: Must use netcfg twice to connect to ethernet

I'm also experiencing the same problem on my thinkpad x23 with Intel PRO/100 SP Mobile Combo Adapter. The adapter is also using e100 driver. I'm using currently static ethernet connection and changing line 22 of /usr/lib/network/connections/ethernet as suggested by iphitus solved the problem, though I had to increase the sleep value to 3 to establish the connection reliably every time. Sleep 2 was still some times no enough.

@iphitus: The connection was established correctly every second time I run /etc/rc.d/net-profiles restart, every second gave a "- No connection" error. So at the first run the connection was created, and the next run would then recognize it correctly. Maybe a while loop with a timeout in the next release would be an idea to consider? This way the people not affected by this thing wouldn't have to suffer from an extra second or two (you know how it is with the boot times wink ) Any further tests I can do or logs I can paste?

Offline

#15 2009-09-20 15:48:38

ataraxia
Member
From: Pittsburgh
Registered: 2007-05-06
Posts: 1,553

Re: Must use netcfg twice to connect to ethernet

Sorry I didn't see the "which driver" survey until now. I'm using e1000e.

Offline

#16 2009-10-05 21:56:42

MAC!EK
Member
Registered: 2005-09-27
Posts: 267

Re: Must use netcfg twice to connect to ethernet

I'm also using e1000e and I had that problem. Sleep 2 solved it.

Offline

#17 2009-10-05 22:44:23

fijam
Member
Registered: 2009-02-03
Posts: 244
Website

Re: Must use netcfg twice to connect to ethernet

I am also experiencing this with e100.

Offline

#18 2009-11-10 14:24:39

iosonofabio
Member
From: Australia
Registered: 2008-10-09
Posts: 105

Re: Must use netcfg twice to connect to ethernet

I also have e1000e on a ThinkPad X200s and I'm experiencing the same issue.

Please note that I had quite the same problem with my "old" ThinkPad T60 (see http://bugs.archlinux.org/task/13334 ). That time I kind of solved it by using following line in the profile config file:

PRE_UP='ifconfig eth0 up && sleep 3'

That bug was closed, but the last posts in it do not look very incouraging. Can it be the same issue?

Edit: editing line 22 of /usr/lib/network/connections/ethernet-iproute and line 15 of .../ethernet with a longer sleep value (3s) did the trick.

Last edited by iosonofabio (2009-11-10 14:32:06)

Offline

#19 2009-11-25 22:23:49

dmlawrence
Member
Registered: 2008-10-01
Posts: 21

Re: Must use netcfg twice to connect to ethernet

I also have this problem (using the sky2 module with a Marvell 88E8053).  "sleep 2" solved it.

Offline

Board footer

Powered by FluxBB