To answer this as well as the other questions along the same lines, the story goes like this: As some have surmised, I'm using some software protected by flexlm (I've a fully paid & legal license, FWIW). It had been installed on a Windows machine that used a PCI Ethernet card. A few months ago, I purchased some new, faster hardware and migrated most of my work onto the new machine, a few applications at a time as I needed them. The flexlm-secured software was moved fairly late in the process, by which time the old machine was turned off most of the time. Now, when I got around to installing the flexlm-secured software, I could have gone to the vendor and asked for a new license file with a new MAC address key (they let you do that something like once or twice per year) but that would have taken a couple of days. Instead, I figured out that I could just change the MAC address on the NIC itself -- The new machine uses a motherboard with a built-in Ethernet interface (it's based on the SiS 730 chipset) and it comes with a utility to change the MAC address. So it was a piece of cake to get the software installed with the original license file. At that point, all was well. Some time later, I decided to put SuSE Linux on the old machine, and by then I had forgotten that that system had the same MAC address as my new system. Since in fact you can have two IP addresses on a wire with the same MAC address (think of a machine that has two IP addresses on the same NIC), this in fact worked just fine -- until I tried to serve files out of the older machine using Samba. I found that for some strange reason <grin>, the newer Windows machine couldn't properly mount the Linux machine's shares, even though they were showing up properly in the "network neighborhood" and all. I suppose that if I hadn't suddenly remembered the MAC address swap, it would have been a real challenge to troubleshoot, but after a few minutes of futzing it came to me what the problem was. Now again, I had a couple of choices. I could have gone down to the store and picked up a cheap Ethernet card, I could have reprogrammed the MAC on the old card (I looked but I didn't immediately see a utility to do this), or I could simply use ifconfig to change the runtime MAC address. The latter choice seemed to be the shortest path through to a resolution in this case, so I took it. It was a tiny bit harder than I thought, in that I had to modify the rc script, but once I did that, everything fell into place and Samba worked like it was supposed to. I would *not* recommend doing this in a production environment except in an urgent situation. I'm doing this on a piddly little home network and I'm the only one that could be affected by problems. Also, I have not tried using a runtime change in the MAC address to get a flexlm license to work on a different computer, and I'm not certain that it would work; I figure that it would depend on what procedure flexlm uses to read the MAC address. Anyway, it was Windows software in this case, and I haven't the foggiest idea how to do a runtime MAC change in Windows. Whatever, when I was trying to figure out how to make ifconfig do what I knew it should be able to do, I did a few web searches to try to find the answer, but I didn't find anything. After I figured out how to make it work, I posted my solution to (hopefully) make it easier for the next poor shmuck to figure it out. I don't think that I'm cheating the vendor out of anything; I expect that they'd actually rather I did what I did, because then I can't run the software on both machines at the same time on the same net like I could if I'd requested the new license file. And anyway, if they *really* cared that much they'd have made me use a dongle. Whatever, FWIW, YMMV, for entertainment purposes only, etc., etc. --Bob On Fri, Dec 07, 2001 at 12:08:22AM -0000, andy wrote:
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
To: Bob Drzyzgula ; SuSE Linux (English) ; andy Date: Thursday, December 06, 2001 3:36 AM Subject: Re: [SLE] Changing a hardware (MAC) address 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, then the code 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
-- 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