Switch eth1 and eth0

Issues related to hardware problems
Post Reply
welbo
Posts: 17
Joined: 2009/10/07 01:51:51

Switch eth1 and eth0

Post by welbo » 2012/08/16 15:28:42

I believe this to be a hardware issue rather than networking, but correct me if I'm wrong...

My gateway server has an onboard 100Mbit network card and an add-on gigabit ethernet card. When I set the machine up, I used the add-on card for eth0 and set up all of my rules in iptables so that would be my external network card (internet access). The onboard card, eth1 serves the internal network. I am trying to upgrade all of my components to support gigabit ethernet to improve speeds on my internal network. I have all of the workstations and devices and switches in place. Now I just need my server to provide gigabit network service to the rest of the network. It looks to me like the simplest way to accomplish this is to use the udev program 'rename_device' so the physical pieces of hardware eth0 and eth1 are swapped. Then just change the cables out and I am good to go. Does anyone see any potential problems with this?
The other option is to change every reference to eth0 to eth1, and also every reference to eth1 to eth0. Besides being a big pain and time use, it goes against my standard ideology for device naming (external is eth0 on all my networks).
Are there any other options?

CentOS 5.8, 2.6.18-308.8.1.el5

welbo

lystor
Posts: 187
Joined: 2008/09/10 15:46:12
Location: Ukraine, Donetsk

Switch eth1 and eth0

Post by lystor » 2012/08/17 10:32:56

[quote]
welbo wrote:
Now I just need my server to provide gigabit network service to the rest of the network. [/quote]
Hi
It is easy to rename the eth0 and eth1:
1) Backup /etc directory
2) Fix [url=http://pkgs.org/download/udev]udev[/url] config - /etc/udev/rules.d/70-persistent-net.rules
3) Fix iptables config - /etc/sysconfig/iptables
4) Rename /etc/sysconfig/network-scripts/ifcfg-eth0 ifcfg-eth1
5) Fix the device name on ifcfg-eth0 and ifcfg-eth1
6) Reboot

Post Reply

Return to “CentOS 5 - Hardware Support”