Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
change device from eth1 to eth0
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
paulb787
Apprentice
Apprentice


Joined: 14 Nov 2005
Posts: 250

PostPosted: Tue Nov 22, 2005 5:29 am    Post subject: change device from eth1 to eth0 Reply with quote

how would i go about changing a device from eth1 to eth0
Back to top
View user's profile Send private message
volumen1
Guru
Guru


Joined: 01 Mar 2003
Posts: 393
Location: Missoula, MT

PostPosted: Tue Nov 22, 2005 5:48 am    Post subject: Reply with quote

I believe the devices are numbered based on the order that they are loaded into the kernel. I'm not sure how you'd do it if both of your drivers were built into the kernel. But, if you are using modules, then you could change the order the modules load in /etc/modules.autoload.d/. I'm sure there is a way to do it if you are using coldplug, but I don't know off the top of my head. I suppose you could kludge it by building the drivers for the card you want to be eth0 into your kernel and then configuring the other card's driver to be a module? I'm sure there's a classier way, though.
_________________
I was born with a freakin' dice bag on my belt.
-- www.howsyournetwork.com
Back to top
View user's profile Send private message
codergeek42
Bodhisattva
Bodhisattva


Joined: 05 Apr 2004
Posts: 5142
Location: Anaheim, CA (USA)

PostPosted: Tue Nov 22, 2005 5:48 am    Post subject: Reply with quote

You could try ifrename.
_________________
~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF
Back to top
View user's profile Send private message
volumen1
Guru
Guru


Joined: 01 Mar 2003
Posts: 393
Location: Missoula, MT

PostPosted: Tue Nov 22, 2005 6:48 am    Post subject: Reply with quote

Hmm... I've never heard of ifrename. Is it a debian tool? Is it in portage somewhere? "locate ifrename" on my machine only showed me some ifrename hotplug patches.
_________________
I was born with a freakin' dice bag on my belt.
-- www.howsyournetwork.com
Back to top
View user's profile Send private message
codergeek42
Bodhisattva
Bodhisattva


Joined: 05 Apr 2004
Posts: 5142
Location: Anaheim, CA (USA)

PostPosted: Tue Nov 22, 2005 6:44 pm    Post subject: Reply with quote

How odd. I could swear it was in Portage. Maybe I'm imagining things, sorry. :o Maybe on of the net-misc/ packages. I'l have to try that out when I get home later.
_________________
~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF
Back to top
View user's profile Send private message
JohnDoe
Tux's lil' helper
Tux's lil' helper


Joined: 15 Dec 2003
Posts: 96
Location: Lisbon, Portugal

PostPosted: Tue Nov 22, 2005 10:15 pm    Post subject: Reply with quote

You could use nameif I think

From nameif man page:
nameif renames network interfaces based on mac addresses.

nameif is part of sys-apps/net-tools. Read its man page before trying to use it as it gives some important info in the Notes section :)
Back to top
View user's profile Send private message
codergeek42
Bodhisattva
Bodhisattva


Joined: 05 Apr 2004
Posts: 5142
Location: Anaheim, CA (USA)

PostPosted: Tue Nov 22, 2005 10:19 pm    Post subject: Reply with quote

That's the one! Thanks, JohnDoe.
_________________
~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6837
Location: Blighty

PostPosted: Wed Nov 23, 2005 9:52 am    Post subject: Reply with quote

ifrename is part of wireless-tools

The preferred way of renaming things is to write a udev rule.
Other than that you can use (all change eth0 to eth1)

1) baselayout-1.12 and use rename_eth0="eth1" or rename_001122334455="eth1" (where 001122334455 is the MAC address)
2) iproute2 command - ip link set address eth1 dev eth0
3) net-tools command - ifconfig eth0 hw ether eth1
_________________
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
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