Using ifrename for consistent naming of network interfaces
December 1st, 2006 by Rohanifrename (8) is a handy utility to assign consistent names to your network interfaces
My IBM ThinkPad has two network interfaces - ethernet and wireless. I normally use the wireless interface (eth1), but at boot time which hardware device actually picks up which device name is quite random.
I configured my /etc/iftab as follows:
# cat /etc/iftab
eth0 driver e1000
eth1 driver ipw2200
and added the /sbin/ifrename line near the end of my /etc/rc.d/rc.sysinit
# tail -8 /etc/rc.d/rc.sysinit
# network inetface names should be constant
/sbin/ifrename# Let rhgb know that we’re leaving rc.sysinit
if [ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client –ping ; then
/usr/bin/rhgb-client –sysinit
fi
So now my wireless interface is always eth1
