Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] change ethernet order
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
-Zigulì-
n00b
n00b


Joined: 03 Sep 2004
Posts: 4

PostPosted: Mon Nov 08, 2004 9:39 pm    Post subject: [solved] change ethernet order Reply with quote

Hi all,
i need your help to solve a configuration issue.
I got a server with two ethernet card: a realtek based chip network card, and a QUAD network card based on starfire driver (this is a strange card with four RJ45 plug like four ethernet in one).
Gentoo releaved both card perfectly, and list me all the interfaces: eth0, eth1, eth2, eth3 and eth4.
But the realtek netcard is eth4 and for my needs, i want to change in eth0, but i don't know the way...

Do you know a tricks for this?!

Thanks in advanced!

CIAO CIAO
Matteo
P.S: Sorry for my english, but is is the problem clear?
_________________
~ Nulla è ciò che sembra ~


Last edited by -Zigulì- on Sat Nov 20, 2004 1:51 am; edited 1 time in total
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9625
Location: beyond the rim

PostPosted: Mon Nov 08, 2004 10:54 pm    Post subject: Reply with quote

Code:
man nameif
Back to top
View user's profile Send private message
-Zigulì-
n00b
n00b


Joined: 03 Sep 2004
Posts: 4

PostPosted: Sat Nov 20, 2004 1:51 am    Post subject: Reply with quote

Thank you Genone for you quickly reply and for yours hort and precious help ;-)

i solved in this way. I guess is quite elegant...
i created a file in /etc/init.d/with this lines:


Code:

depend() {
        need checkroot
}

start() {
        local retval=0

        ebegin "Setting ethernet name order"
        /sbin/nameif -c /etc/mactab
        /sbin/nameif -c /etc/mactable
        retval=$?
        eend ${retval} "Failed to set ethernet order"
        return ${retval}
}


And i put it on boot phase with rc-update command.
The two lines of nameid is needed because in one file i temporany change the name of all ethernet card and in the second i choose the right order.

CIAO CIAO
Matteo
_________________
~ Nulla è ciò che sembra ~
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