Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problem with wireless and ethernet: devices names not const
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
quentin.fr
n00b
n00b


Joined: 27 Aug 2006
Posts: 47

PostPosted: Mon Sep 04, 2006 7:31 am    Post subject: Problem with wireless and ethernet: devices names not const Reply with quote

I got some strange behaviour with names of the network devices. I mean, sometimes the wireless device is known as eth0 and sometimes as eth1. When it turns to be eth0, none of my wireless or ethernet works. I would like to know the configuration files to take a look at in order to solve this and if someone knows how it can happen, or knows a tutorial which explains the mounting of devices, let me know.

Thanks for the replies


Last edited by quentin.fr on Wed Sep 06, 2006 7:27 pm; edited 1 time in total
Back to top
View user's profile Send private message
fusion1275
Apprentice
Apprentice


Joined: 30 Oct 2005
Posts: 185

PostPosted: Wed Sep 06, 2006 7:30 am    Post subject: Reply with quote

Try going through:

/etc/conf.d/net
/etc/conf.d/wireless

And double check you haven't got any duplicates of NIC names that might be confusing the startup scripts. Are you using multi NIC's? Or just the one?

Cheers
_________________
AMD XP 2600+
Mem: 1gb
Disk1: 60gb
Disk2: 250gb
Disk3: 250gb
Kernel: 2.6.19-r5
KDE: 3.5.5
Back to top
View user's profile Send private message
quentin.fr
n00b
n00b


Joined: 27 Aug 2006
Posts: 47

PostPosted: Wed Sep 06, 2006 11:00 am    Post subject: Reply with quote

Thanks for the reply.
/etc/conf.d/net is an empty file /etc/conf.d/wireless is the default one. I only change the wireless device's name to what it should be: eth1.
Do you think it can be solved by using a simple rule with udev? I wonder if I can set a stupid rule such as "the first device to be mounted (eth0) is the one named "name of my ethernet card" which should ensure that wireless is set to eth1.
Any idea is welcome.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Wed Sep 06, 2006 11:27 am    Post subject: Reply with quote

Write a udev rule to give your interfaces persistent names.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
fusion1275
Apprentice
Apprentice


Joined: 30 Oct 2005
Posts: 185

PostPosted: Wed Sep 06, 2006 11:29 am    Post subject: Reply with quote

So do you have a built in network card & a wireless card in your machine? Please let me know if you are using 2 cards.

If you are using 2 cards and you only want 1 to come up when booting you can remove it from the rc scripts using "rc-update del <NIC> default. And then you can also remove the adapter name from /etc/conf.d/net for example "rm net.eth1".

Cheers
_________________
AMD XP 2600+
Mem: 1gb
Disk1: 60gb
Disk2: 250gb
Disk3: 250gb
Kernel: 2.6.19-r5
KDE: 3.5.5
Back to top
View user's profile Send private message
quentin.fr
n00b
n00b


Joined: 27 Aug 2006
Posts: 47

PostPosted: Wed Sep 06, 2006 11:55 am    Post subject: Reply with quote

thanks for the replies.
My comp is a laptop and I have 2 built-in cards (ethernet card and wireless).
I would like that if the ethernet one is not able to get an ip (not connected) then the wireless card goes up and try to connect.
So, I'm not sure that it is a good idea (in my case) to boot with only 1 card since the computer don't know yet if ethernet is ok or not.
I'm interested in how to set such an udev rule. I should take a look at tutorials and how-to but if you can give me an example it would help me greatly. (not because I'm lazy ;) but I'm noob, and until the time I can make it properly...)
Back to top
View user's profile Send private message
fusion1275
Apprentice
Apprentice


Joined: 30 Oct 2005
Posts: 185

PostPosted: Wed Sep 06, 2006 12:11 pm    Post subject: Reply with quote

Oh ok didnt know you were on a laptop. Well you will need to Use netplug or ifplugd to manage the wired interface and wpa_supplicant for the wireless. But wpa_supplicant can be a bit of a bitch so be prepared for some brain ache.

There is another posting with similar issues as you are having my friend "https://forums.gentoo.org/viewtopic-t-495231-highlight-laptop.html". Maybe take a look.

Cheers
_________________
AMD XP 2600+
Mem: 1gb
Disk1: 60gb
Disk2: 250gb
Disk3: 250gb
Kernel: 2.6.19-r5
KDE: 3.5.5
Back to top
View user's profile Send private message
quentin.fr
n00b
n00b


Joined: 27 Aug 2006
Posts: 47

PostPosted: Wed Sep 06, 2006 12:17 pm    Post subject: Reply with quote

Ok thank you for all. I will take a look at it.
Have a nice day
Back to top
View user's profile Send private message
quentin.fr
n00b
n00b


Joined: 27 Aug 2006
Posts: 47

PostPosted: Wed Sep 06, 2006 6:55 pm    Post subject: Reply with quote

Another problem to solve. I set this on 50-udev.rules in /etc/udev/rules.d

Code:

KERNEL=="eth*", SYSFS{address}=="MAC ADDRESS", NAME="wlan"
KERNEL=="eth*", SYSFS{address}=="MAC ADDRESS", NAME="lan"


and I suppressed all the references to eth0 and eth1 (net.eth0,net.et1).

Wlan and lan are well recognised since when I type
Code:

ifconfig wlan
ifconfig lan

I don't get any error.
I can even make a iwlist and get something looking (I mean usual stuff).

But these devices are no longer brought up while the system boot, and when i make lan up I'm not able to connect on the net anymore.
Any idea?
Back to top
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Wed Sep 06, 2006 7:04 pm    Post subject: Reply with quote

quentin.fr wrote:
I set this on 50-udev.rules

Don't edit that file, because it will be overwritten when you update udev. Create your own file in that directory, named e.g. 10-local.rules or 91-local.rules (the filename is important because the rules files are processed in alphabetical order of filename).
Back to top
View user's profile Send private message
quentin.fr
n00b
n00b


Joined: 27 Aug 2006
Posts: 47

PostPosted: Wed Sep 06, 2006 7:20 pm    Post subject: Reply with quote

thanks for the tip.
But, I tried to reboot once more and now when I up wlan and then make iwlist scanning
it says:
Code:

wlan    Interface doesn't support scanning : No such device....

but when I do
iwconfig wlan I get
Code:

wlan     IEEE 802.11b/g ESSID:off/any Nickname:"Broadcom 4306"
            Mode:Managed Access Point: Invalid   Bit Rate=1 Mb/s
            RTS thr:off   Fragment thr:off
            Encryption key: off
            Link quality:0  Signal level:0    Noise level:0
 bla bla bla


I get the same problem as before... I mean the wifi is working 1/3 of the times... The only difference is that the name of wifi is constant....

At this point, with this rules, I broke my cable and wireless........ Good... Well, if any idea of what is happening....
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum