Welcome to LQ,
If you want exact answers, you should fill the "distribution" field of your profile.
Lets assume that you have a debian style distro:
Add this to your /etc/network/interfaces, under eth0 if you want this interface to be changed:
hwaddress ether 02:01:02:03:04:08
this could also be achieved maybe by putting a script before the interface is brought up:
Code:
#echo "/sbin/ifconfig eth0 hw ether 01:02:03:04:05:06" > /etc/network/if-pre-up.d/change_adress
#chmod +x /etc/network/if-pre-up.d/change_adress
But I'm not 100% sure that the order is ok. If not, try to move this script to /etc/network/if-up.d