You are not logged in.

#1 2007-05-03 09:15:57

trawler
Member
Registered: 2007-05-03
Posts: 2

bind interfaces and mac addresses

I have a server with arch linux installed.
The server has 2 interfaces, and my problem is that sometimes, whenever I reboot the server, I find that the interface names switch - I.E., what was eth0 is now eth1 and vice versa...
Of course, this is a major connectivity problem, which forces me to reboot again, and hope that this time Arch will "get it right"...

I also have several centos/redhat servers in which i found it pretty simple to just add the HWADDR to the ifcfg.ethX file, but i couldn't find anyplace where i can bind the interfaces to a specific mac address in Arch...

Anyone had the same problem before?

Offline

#2 2007-05-03 10:42:04

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

Re: bind interfaces and mac addresses

use ifrename,
save this to /etc/rc.d/, and add it do your daemons line on boot, before network.
http://archlinux.org/~james/projects/?p … me;hb=HEAD

then copy this example to /etc/iftab, and modify it to your setup.
http://archlinux.org/~james/projects/?p … ab;hb=HEAD

These may be in a future version of Arch's network scripts

James

Offline

#3 2007-05-03 11:57:44

trawler
Member
Registered: 2007-05-03
Posts: 2

Re: bind interfaces and mac addresses

Thanks smile

Offline

#4 2007-05-03 16:05:29

attila
Member
Registered: 2006-11-14
Posts: 293

Re: bind interfaces and mac addresses

These may be in a future version of Arch's network scripts

I use udev to get a specific name for my network:

KERNEL=="eth*", SYSFS{address}=="MAC_ADRESS", NAME="lan"

This works about a half year without any problems so i hope there will be a warning before doing this because than perhaps i have to change my configuration.

Offline

#5 2007-05-04 13:13:18

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

Re: bind interfaces and mac addresses

attila wrote:

These may be in a future version of Arch's network scripts

I use udev to get a specific name for my network:

KERNEL=="eth*", SYSFS{address}=="MAC_ADRESS", NAME="lan"

This works about a half year without any problems so i hope there will be a warning before doing this because than perhaps i have to change my configuration.

the udev method will continue to work as long as udev doesnt change it's syntax. the method i've suggested will not replace it, rather it will work alongside it.

James

Offline

Board footer

Powered by FluxBB