Changing your MAC address
*NIX
How to do it all on *nix
To set ones MAC address under *NIX (from Linux to FreeBSD to Unix on a Sun
U-SPARC machine) the syntax SHOULD¹ be as follows:
/sbin/ifconfig eth0 down
where eth0 is the ethernet device; ifconfig without /sbin/ should also work
and would be preferred on the afore mentioned Sun machine where the ifconfig
location is /usr/sbin/ifconfig
/sbin/ifconfig eth0 hw ether 00:00:00:00:00:00
where /sbin/ifconfig and eth0 are as before, and 00:00:00:00:00:00 represents
the MAC address you would like to take and call your own. From this point, you
should be able to use the connection again, if not try
/sbin/ifconfig eth0 up
If this presents errors I suggest you set the MAC address back to the original
one (you did write it down, didn't you :Þ).
This method has been tested in all of RedHat 6.2 and 7.1 (linux) and FreeBSD
4.3 (BSD), however not all linux, BSD and Unix distros definately work, you
may need to use another command to change this, however if you are running a
sun box you should already know it or how to find it :) google is your friend.
So, as always - proceed with care, changing it to a non-working MAC may stop
your machine dead in its tracks, however for the MAC change to be permanant
it has to be set on startup (ifconfig must use the real MAC by default on startup)
just add the "ifconfig eth0 hw ether" etc to your rc.d or similar file.
¹ - SHOULD implies we are right, which as often as not may well be the
opposite of the truth.
My BSD box failed to renew its new IP from the DHCP server and hence lost all networking until reboot - hence the following warning - DO NOT try this on mission critical networked machines, especially not servers.
< < Back - Windows 98 || Next - DHCP & Conclusion >>
|