You are not logged in.

#1 2009-09-10 13:35:35

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

[half-SOLVED] eth0 and eth1 getting swapped every time

Hi,

The title says it all, but I don't know what else to do.

I've tried putting the modules in order in the MODULES array in /etc/rc.conf, but it doesn't work. Apparently, the modules in MODULES aren't guaranteed to load in the order they are anymore.

I've tried following this wiki page, about Udev, but it didn't work, too.

I also tried closing my eyes and pretending it doesn't happen, but it didn't work too. tongue

TIA

Last edited by andre.ramaciotti (2009-09-11 15:06:06)


(lambda ())

Offline

#2 2009-09-10 13:39:41

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

Re: [half-SOLVED] eth0 and eth1 getting swapped every time

Try using aliases in /etc/modprobe.d/modprobe.conf, such as the following

alias eth0 your_module_name
alias wlan0 other_module_name

what goes up must come down

Offline

#3 2009-09-10 13:43:12

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: [half-SOLVED] eth0 and eth1 getting swapped every time

Wow, that was quick.

I thought in doing that, but after reading "man modprobe" I thought that "alias" wasn't meant for this kind of configuration. I'll test it and I'll report here.

Thanks.


(lambda ())

Offline

#4 2009-09-10 13:45:15

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [half-SOLVED] eth0 and eth1 getting swapped every time

http://wiki.archlinux.org/index.php/Ude … _Each_Boot

The wiki 1 - you 0

Last edited by Mr.Elendig (2009-09-10 13:45:46)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#5 2009-09-10 14:08:09

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: [half-SOLVED] eth0 and eth1 getting swapped every time

Mr.Elendig, Are you sure you did read what I wrote?

andre.ramaciotti wrote:

I've tried following this wiki page, about Udev, but it didn't work, too.

Can you help me debug it instead of being a smartass?


brazzmonkey, I've tried using alias, but I can't get the wireless connection to work now.

/etc/modprobe.d/modprobe.conf

alias eth0 sky2
alias wlan0 wl

eth0 (wired) is up and running, but there's no sign of wlan0 or eth1.

iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

vboxnet0  no wireless extensions.
ifconfig eth1
eth1: error fetching interface information: Device not found
ifconfig wlan0  
wlan0: error fetching interface information: Device not found

Last edited by andre.ramaciotti (2009-09-10 14:11:54)


(lambda ())

Offline

#6 2009-09-10 14:13:58

Dheart
Member
From: Sofia, Bulgaria
Registered: 2006-10-26
Posts: 956

Re: [half-SOLVED] eth0 and eth1 getting swapped every time

hwd -s
and see what module does the wireless card use.
Recently sometimes at boot b43 autoloads before wl and takes control over the wireless card, which, alas is bcm4312 and the open source driver is incapable of controling. If this is the case hwd -s will report the module as b43-pci-bridge and you'll have to modprobe b43 & modprobe -r b43 and then reload the wl module.


My victim you are meant to be
No, you cannot hide nor flee
You know what I'm looking for
Pleasure your torture, I will endure...

Offline

#7 2009-09-10 14:23:10

brazzmonkey
Member
From: between keyboard and chair
Registered: 2006-03-16
Posts: 818

Re: [half-SOLVED] eth0 and eth1 getting swapped every time

Make sure you load the proper modules, add them to the module array of rc.conf and disable MOD_AUTOLOAD. Then reboot and see how it goes.


what goes up must come down

Offline

#8 2009-09-10 14:25:31

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: [half-SOLVED] eth0 and eth1 getting swapped every time

I didn't think that could be the problem ("b43" is blacklisted in the MODULES array and it isn't loaded right now, only "wl"), but you're right, hwd -s did show b43-pci-bridge as the module being used.

I did

rmmod wl
modprobe b43
rmmod b43
modprobe wl

but I still can't get any other interface to work (neither wlan0 or eth1).

This is my dmesg after the commands above:

cfg80211: Calling CRDA to update world regulatory domain
b43-phy0: Broadcom 4312 WLAN found (core revision 15)
b43-phy0 ERROR: FOUND UNSUPPORTED PHY (Analog 6, Type 5, Revision 1)
b43: probe of ssb0:0 failed with error -95
Broadcom 43xx driver loaded [ Features: PMLR, Firmware-ID: FW13 ]
cfg80211: World regulatory domain updated:
    (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
    (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
    (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)

(lambda ())

Offline

#9 2009-09-10 15:43:03

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: [half-SOLVED] eth0 and eth1 getting swapped every time

You could always use rc.local, remove the modules for your network cards and reinsert them by the order you want.


R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K

Offline

#10 2009-09-10 15:44:32

Gen2ly
Member
From: Sevierville, TN
Registered: 2009-03-06
Posts: 1,529
Website

Re: [half-SOLVED] eth0 and eth1 getting swapped every time

I've had to do like Mr.Elendig on my Debian system because I had two network cards of the same brand.  Did you get the mac address right when you edited /etc/udev/rules.d/10-network.rules??


Setting Up a Scripting Environment | Proud donor to wikipedia - link

Offline

#11 2009-09-10 15:59:02

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: [half-SOLVED] eth0 and eth1 getting swapped every time

R00KIE, I'll try it, thanks.

Gen2ly, I did exactly as it's in the wiki.


(lambda ())

Offline

#12 2009-09-11 06:07:26

stryder
Member
Registered: 2009-02-28
Posts: 500

Re: [half-SOLVED] eth0 and eth1 getting swapped every time

I too use udev/rules.d to solve my problem, mapping the cards to lan0 and lan1. You seem to be continuing to use eth0 - the advice is to use something else.

I also had a problem where the tulip module kept taking the place of dmfe which is what one of my cards needed. What finally worked for me was to add my network card modules to /etc/mkinitcpio.conf so the right modules are loaded first, and rebuilt the initrd image. HTH.

Offline

#13 2009-09-11 12:50:40

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: [half-SOLVED] eth0 and eth1 getting swapped every time

stryder, I did exactly as it's in the wiki, with 'lan0' e 'wlan0', but thanks for your tip.

I'll try to set everything up in rc.local as R00KIE suggested.


(lambda ())

Offline

#14 2009-09-11 14:10:24

hw-tph
Member
Registered: 2006-11-01
Posts: 149

Re: [half-SOLVED] eth0 and eth1 getting swapped every time

Read the manpage for iftab: man 5 iftab
Quickest and cleanest way, IMHO.

Offline

#15 2009-09-11 14:33:50

brenix
Member
From: California
Registered: 2008-03-05
Posts: 185

Re: [half-SOLVED] eth0 and eth1 getting swapped every time

This is what I did, to me its the easiest solution...

Offline

#16 2009-09-11 15:01:45

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: [half-SOLVED] eth0 and eth1 getting swapped every time

brenix wrote:

This is what I did, to me its the easiest solution...

Yeah, except it doesn't work here.

hw-tph wrote:

Read the manpage for iftab: man 5 iftab
Quickest and cleanest way, IMHO.

It's half working. I've edited /etc/iftab and I've put 'ifrename' in /etc/rc.local . My wired connection does get renamed, but my wireless doesn't. It gives me an error saying that eth1 is busy, which doesn't make sense as I load wicd only after ifrename.

I think now I have a predictable behaviour: wired is always 'wired' and wireless is always 'eth1', so I'll keep it. It wasn't exactly what I wanted, but it's better than completely random.

As hw-tph's solution is the one that suckless™, I'll stay with it. Thanks to all of you that tried to help. smile

Last edited by andre.ramaciotti (2009-09-11 15:05:43)


(lambda ())

Offline

#17 2009-09-11 15:47:00

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: [half-SOLVED] eth0 and eth1 getting swapped every time

andre, how about instead of snapping at me, you post your udev rule, including where you put it, and the mac adresses for your cards?

Edit: hmm, didn't see that wiki page link in your op before it was edited >_>

Last edited by Mr.Elendig (2009-09-11 15:49:03)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#18 2009-09-11 16:17:44

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: [half-SOLVED] eth0 and eth1 getting swapped every time

Mr.Elendig, I don't want to have problems here in the Arch forums. I know I overreacted to the provocative tone in "The wiki 1 - you 0", but it's nothing personal and I'm sorry.

cat /etc/udev/rules.d/10-network.rules 
SUBSYSTEM=="net", ATTRS{address}=="00:23:ae:ea:ca:c6", NAME="lan0"
SUBSYSTEM=="net", ATTRS{address}=="00:23:4e:85:c4:b2", NAME="wlan0"

and the MAC addresses are the ones above, but just to be sure:

udevadm info -a -p /sys/class/net/wired | grep address
    ATTR{address}=="00:23:ae:ea:ca:c6"
udevadm info -a -p /sys/class/net/eth1 | grep address 
    ATTR{address}=="00:23:4e:85:c4:b2"

My cards are:

09:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8040 PCI-E Fast Ethernet Controller (rev 12)
0b:00.0 Network controller: Broadcom Corporation BCM4312 802.11b/g (rev 01)

And the modules they use are sky2 (open source) and broadcom-wl (closed source).


(lambda ())

Offline

#19 2009-09-12 08:35:48

hw-tph
Member
Registered: 2006-11-01
Posts: 149

Re: [half-SOLVED] eth0 and eth1 getting swapped every time

Andre, I haven't really used iftab renaming for wireless interfaces much (only with plain WEP, no fancy stuff like wicd or NetworkManager), so I probably should have put a disclaimer in my post. At least, it is some means of getting it sort of working.

Offline

#20 2009-09-12 12:27:55

andre.ramaciotti
Member
From: Brazil
Registered: 2007-04-06
Posts: 649

Re: [half-SOLVED] eth0 and eth1 getting swapped every time

Thanks anyway, at least now I have a predictable behavior. Maybe it's the driver fault, as it's proprietary and Broadcom's drivers aren't famous for their high quality. Maybe when b43 finally supports my card things will get better.


(lambda ())

Offline

Board footer

Powered by FluxBB