You are not logged in.

#1 2009-06-07 17:17:26

beroal
Member
From: Ukraine
Registered: 2009-06-07
Posts: 359
Website

[solved] stable network card name eth0 eth1

Hello, I'm new to Arch Linux. I have two Ethernet interface adapters, let's distinguish them by their MAC addresses MAC0 and MAC1. Relationship between MAC addresses and 'eth' unit numbers may change after reboot. Sometimes
MAC0~eth0
MAC1~eth1
sometimes
MAC0~eth1
MAC1~eth0
When they swap, I should change 'rc.conf' settings (IP addresses and such) or keep rebooting until they swap back. I want to name devices in 'rc.conf' by their MAC addresses, is it possible?

Last edited by beroal (2009-06-14 01:47:57)


we are not condemned to write ugly code

Offline

#2 2009-06-07 17:32:12

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [solved] stable network card name eth0 eth1

Udev can fix that for you - see here.

Offline

#3 2009-06-07 17:33:13

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

Re: [solved] stable network card name eth0 eth1

Had this issue recently. The best solution is to create a rule in udev which handles the naming task. See http://wiki.archlinux.org/index.php/Udev. The general solution didn't solve my problem. The udev rule has been effective so far. I renamed to lan0 and lan1. If you do rename remember to change your configs that refer to the network cards.

*edit: just a little late, typing with 1 hand...*

Last edited by stryder (2009-06-07 17:34:59)

Offline

#4 2009-06-07 20:11:25

s3kt0r
Member
Registered: 2009-01-20
Posts: 208

Re: [solved] stable network card name eth0 eth1

Thanks for the tips on this topic, just another workaround:

I had similar problem, but since I don't use the 2 network cards at the same time, ever, i just !driver_name in MODULES array, driver_name setting the network card i dont want to use.


box1: Arch (linux-3.17-rc5)
box2: Gentoo (linux-3.17-rc5)
wm: subtle

Offline

#5 2009-06-08 00:49:22

beroal
Member
From: Ukraine
Registered: 2009-06-07
Posts: 359
Website

Re: [solved] stable network card name eth0 eth1

Thank you guys.


we are not condemned to write ugly code

Offline

#6 2009-06-08 22:58:59

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [solved] stable network card name eth0 eth1

If you need just a quick workaround you can add eth1 to your rc.conf settings so that dhcp tries to use them both (eth0 and eth1) - worked for me.

Offline

Board footer

Powered by FluxBB