Often our internet provider assigns us an IP based on the MAC addresses of network cards. You bought yourself a second network card, plugged it into the computer, boot up... and there's no internet. It's quite possible that the interface names
have changed. This happens because the system assigns names to interfaces in the order the modules are loaded. In this situation we have two options: ask our provider to change our card's MAC address on their end,
but then we're forced, among other things, to make changes in our firewall (iptables), or we can juggle the network interface names ourselves. A necessary condition for using this method is having kernel 2.6.x
and using udev.
We edit the file /etc/udev/rules.d/network-devices.rules, creating or modifying existing entries (after uncommenting them first):
KERNEL=="eth?", SYSFS{address}=="xx:xx:xx:xx:xx:xx", NAME="eth0"
KERNEL=="eth?", SYSFS{address}=="xx:xx:xx:xx:xx:xx", NAME="eth1".
Where xx:xx:xx:xx:xx:xx are the MAC identifiers of the network cards. If we have more network cards, we should add further entries following the
example above.