I am fairly certain that you are changing the address which is seen by the rest of the sorld and which is published by the NIC. This is a logical change. Once the machine is rebooted, unless the address is being changed in the boot process, the original card's address is there again. So, yes the MAC address is hard-coded, but it can be changed to a logical address in this manner.
In the code below, the addrss is being changed with each start of the machine. So, when the machine first starts the original NIC's MAC address will exist,
I may regret asking this, but... Why are changing a MAC address? It's none
of my business, I was just wondering.
Andy
-----Original Message-----
From: James Bliss
changes the MAC address to the logical address being assigned.
12/05/01 06:02:31 PM, "andy"
wrote: Surprising - I thought MAC addresses were hard-coded by the manufacturer. Are uou sure you're not just assigning a variable rather than actually changing the address.
Andy
-----Original Message----- From: Bob Drzyzgula
To: SuSE Linux (English) Date: Wednesday, December 05, 2001 3:07 PM Subject: [SLE] Changing a hardware (MAC) address On one of my systems, I had need to change the MAC address on the Ethernet interface. I tried putting the "hw ether <addr>" spec in the IFCONFIG_0 variable, but ifconfig didn't seem to want to set the IP address and the MAC address at the same time. Also, I found that it was necessary to change the MAC address *before* setting the IP address, otherwise ifconfig would give an ioctl error.
To solve this problem, I made a change to /etc/rc.d/network as follows:
--- rc.d.old/network Fri Nov 30 20:05:59 2001 +++ rc.d/network Fri Nov 30 21:32:43 2001 @@ -68,6 +68,10 @@ ;; *) echo "Setting up network device $NETDEV" + IFCHMAC=`eval echo '$'IFCHMAC${I}` + if test "${IFCHMAC}" ; then + ifconfig $NETDEV $IFCHMAC + fi ifconfig $NETDEV $IFCONFIG rc_status -v1 ;;
And then adding an entry to /etc/rc.config of the form:
IFCHMAC_0="hw ether xx:xx:xx:xx:xx:xx"
After making these changes, the system will set the correct MAC address upon boot, before setting the IP address.
Just FYI.
--Bob Drzyzgula
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq and the archives at http://lists.suse.com
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq and the archives at http://lists.suse.com
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq and the archives at http://lists.suse.com