ifrename to map physical interfaces permanently

Submitted by stylesen on Mon, 2008-08-11 17:45.

In machines where we have two interfaces say eth0 and eth1, for which you have specified static ip in /etc/network/interfaces, after a reboot the static ip which we have assigned gets screwed among these interfaces ie., the physical interfaces to which eth0 and eth1 must be mapped may change after a reboot, which creates problem when both these networks are entirely different in your servers. This happens with Debian etch. The following could be done in order to overcome this.

In your /etc/network/interfaces give names like eth-pvt, eth-pub, eth-dep, etc and assign the static ip addresses.

Install ifrename 'apt-get install ifrename'

Put something like the following in your /etc/iftab file:

eth-pvt         mac 00:xx:79:xx:xx:BB
eth-pub         mac 00:xx:79:xx:xx:DD
eth-dep         mac 00:xx:79:xx:xx:FF

The above will see that the same names are mapped to the same physical interface each time you reboot your Debian etch GNU/Linux box.

stylesen's blog | add new comment | |