2014年9月3日 星期三

How to change the order of the network cards on Ubuntu


My brand new Ubuntu 12.04 install assigned PCI network card as "eth0" and motherboards integrated network device as "eth1" by default. The problem is I want to use the integrated device as default (eth0) network interface.

I already edited :

Step 1  : Vi /etc/udev/rules.d/70-persistent-net.rules
Step 2  : delete old  PCI network card Name
Step 3  : Changed Eth1 to Eth0

To swap the names and everything seems to be ok and network is working but programs are still trying to use the PCI network card (which is now "eth1") as the default in terface. For example iftop now tries to use "eth1" as default device as it used "eth0" before the swap.

 Ubuntu has a mechanism, that is, the installed network card (NIC) will be renamed to another name when the system is booted. Although there...