LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 12-09-2008, 03:48 PM   #1
rabbit1101
LQ Newbie
 
Registered: Dec 2008
Posts: 2

Rep: Reputation: 0
Question How to change ifcfg-ethX names to a new name like ifcfg-switchname


I am running a special appliance made for capturing network traffic. So the box has alot of extra network ports in it to connect to various switches in my network. It is running Red Hat Enterprise Linux Server release 5.1 (Tikanga).My question is i want to change the interface names so that they represent the switch they are connected to.
Example. ifcfg-eth3 but i want ifcfg-switchname.
I have read to change the files name in /etc/sysconfig/network-scripts from ifcfg-eth3 to ifcfg-switchname. Then edit that file to
File name = ifcfg-switchname
DEVICE=NewNICName
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
HWADDR=00:00:00:00:00:00 (the MAC for that NIC)

Then a reboot would be the only thing to apply these new names. I do a reboot then it sets all the files and names back to the original name. So I edit the /boo/grub/menu.lst file to have PERSIST at the end of the kernal string. However this does not work and all the names still convert back to the original. Any Help or advice would be great help.

Thanks
 
Old 12-09-2008, 04:59 PM   #2
FragInHell
Member
 
Registered: Sep 2003
Location: Sydney Australia
Distribution: Redhat, Centos, Ubuntu
Posts: 282

Rep: Reputation: 45
Hi,

Guess you might need to modify modprobe.conf as well, so that the interface name relates to the right driver.
 
Old 12-09-2008, 09:25 PM   #3
rabbit1101
LQ Newbie
 
Registered: Dec 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for the reply,

All I see is this so I am not sure what i would need to modify.


[root@localhost etc]# more modprobe.conf
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptspi
alias scsi_hostadapter2 ata_piix
 
Old 12-14-2008, 05:09 PM   #4
FragInHell
Member
 
Registered: Sep 2003
Location: Sydney Australia
Distribution: Redhat, Centos, Ubuntu
Posts: 282

Rep: Reputation: 45
Ok I'm manged to make it work on a Cent OS 5.2 system so the same should apply to Redhat 5.x (Since they are the same base). I renamed my interface from eth0 to prod (for production network)

Here's some of my ifconfig output

prod Link encap:Ethernet HWaddr 08:00:27:4C:A3:53
inet addr:10.212.50.33 Bcast:10.212.50.255 Mask:255.255.255.0

Heres' how I did it, firstly rename the interface

1) Rename /etc/sysconfig/network-script/ifcfg-eth0 to /etc/sysconfig/network-script/ifcfg-prod
2) edit /etc/sysconfig/network-script/ifcfg-prod and change device=eth0 to device=prod

Now we must ensure that the system knows which hardware driver to use for our interface.

3) my modprobe.conf had the following entry, so I commented it out and created a new one

#alias eth0 pcnet32
alias prod pcnet32

This tells the system to use the pcnet32 driver and assign it to prod.

Finally reboot, and all should work.

Of course you need to change your modprobe.conf to reflect the correct driver, this is the driver used on my test system so would not work on yours.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why my ifcfg-eth1 file have the extension .bak (ifcfg-eth1.bak) cmx08 Linux - Networking 4 08-23-2008 08:28 AM
kudzu overwrite the ifcfg-ethX files !!! shaybery Red Hat 1 06-15-2008 09:38 PM
fedora/redhat: ifcfg-eth0 and ifcfg-eth1 Shaun2222 Linux - Networking 9 01-23-2008 04:25 PM
How to change /etc/sysconfig/network-scripts/ifcfg-eth0 ariana Linux - Networking 1 05-01-2005 02:37 PM
"ifcfg-ethx" and "network-functions" files peok Linux - Networking 12 08-13-2003 07:06 PM


All times are GMT -5. The time now is 05:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration