Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
forcing network device name
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
juniper
l33t
l33t


Joined: 22 Oct 2004
Posts: 959
Location: we the north

PostPosted: Mon Feb 07, 2005 1:18 am    Post subject: forcing network device name Reply with quote

hello all,

hi, i am having a bit of a problem. i just got an ethernet card and it works fine, but the only problem is the following. there is only on pcmcia slot and i want to use both the wired card and the wireless. luckily, i have hotplug running and i can just pull out one card and replace it with another and everything is detected right away.

The problem is that if i take out the wired ethernet card (which is recognized as eth0) and i put in the wireless card it is also recognized as eth0. this causes quite a bit of hassle.

so, my question is is there a way to force, say the wireless card, to be recognized as eth1?

i have an smc 2835w and i am using the prism54 module.

thanks.

j
Back to top
View user's profile Send private message
gakula
n00b
n00b


Joined: 05 Jan 2004
Posts: 72

PostPosted: Mon Feb 07, 2005 1:46 am    Post subject: Reply with quote

are you use udev or devfs?

udev gives you a flexabbility to name your device file based on model name , brand, serial number, whatever.

anyway, builting ethernet card is always present so you can bring it on before any pcmcia one by loading its driver (module) at the boot time. it then becomes eth0 and anything else loaded later on is eth1.
Back to top
View user's profile Send private message
juniper
l33t
l33t


Joined: 22 Oct 2004
Posts: 959
Location: we the north

PostPosted: Mon Feb 07, 2005 3:34 pm    Post subject: Reply with quote

i am using udev.

i am not certain that you understood my problem. i don't have a builtin ethernet card. in order to put the wireless card in, i must remove the wired ethernet card. the problem is that when the wired card is in, it is assigned eth0. when i remove the wired card and replace it with the wireless card, it is also assigned eth0 (since the wired card was removed, there is no longer an eth0, so the wired card picks it up).

how would you use udev to do this?

j
Back to top
View user's profile Send private message
juniper
l33t
l33t


Joined: 22 Oct 2004
Posts: 959
Location: we the north

PostPosted: Mon Feb 07, 2005 6:36 pm    Post subject: Reply with quote

ok, i read the udev docs and the page

http://www.reactivated.net/udevrules.php

i followed the example there and wrote a rule

KERNEL="eth*", SYSFS{address}="00:04:e2:64:0c:a3", NAME="lan"

however, it didn't make a difference. my wireless card is still eth0.

what i did to find the sys address is put the wireless card in and

udevinfo -a -p /sys/class/net/eth0

and it gave me the sysfs{address} info. it is different when i plug in the wired card.

help please. thanks.

j
Back to top
View user's profile Send private message
bendis
n00b
n00b


Joined: 06 Nov 2002
Posts: 15

PostPosted: Mon Feb 21, 2005 10:02 pm    Post subject: Reply with quote

Hi,
check ifrename(8) and iftab(5). If you are using hotplug all you need is /etc/iftab. Otherwise you will have to run ifrename before the interfaces are brought up to rename the interfaces.
Hope it'll help...

Regards,
Bendis
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware 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