Koozali.org: home of the SME Server

Changing NIC hardware address

MarcB

Changing NIC hardware address
« on: September 05, 2001, 07:02:17 PM »
Hi.
I posted a question in general discussion about two weeks ago and got no reply, so I'm trying again.
I'm installing an E-smith server on a cable modem connection. I'd like to know if the normal command to change a MAC address would work with E-smith, and if it would still work after a reboot (the NIC is a 3com 905c-tx). I've only used it on PPPoE until now. Basically, I'm looking to change the address like on a linksys router's MAC Clone feature. The reason is that the person getting the server isn't sure he wants to keep it, and wants to be able to unplug the server and connect the cat5 cable back to his computer without calling for a re-provisioning of an ip from his cable isp.
This is the command I mean:
ifconfig eth0 down
ifconfig eth0 hw ether aa:bb:cc:dd:ee:ff
I hope this makes sense. Thanks for any help. I've been extremely happy with E-smith for the last 4 months. The only problems I've had with it were directly attributable to me. :-)

MarcB

Dan Brown

Re: Changing NIC hardware address
« Reply #1 on: September 05, 2001, 07:17:52 PM »
I'm pretty sure this would work, but it wouldn't survive a reboot.  I expect, though, that if you added those lines to the appropriate place in /etc/rc.d/init.d/network, it should work.

Jean-Guy

Re: Changing NIC hardware address
« Reply #2 on: September 07, 2001, 05:31:33 AM »
You cannot change a MAC address, it's controlled by a EEPROM or ROM on the controller itself.

Dan Brown

Re: Changing NIC hardware address
« Reply #3 on: September 08, 2001, 05:23:31 AM »
This is only partially correct.  Yes, it's controlled by a ROM, but most (if not all) NICs can still pretend to have a different MAC address--it's typically done in software by setting the card to promiscuous mode and then listening only for packets addressed to the desired MAC address, if I understand correctly.

Rob S.

Re: Changing NIC hardware address
« Reply #4 on: September 29, 2001, 01:16:27 AM »
I did it. It's working. I did put the line:
      ifconfig eth0 hw ether 00:00:00:00:00:01
in de file /init/init.d/network in section Start)
after part case "$IPX"in ............... esac
After reboot my ethernetcard Realtek 8139
has that new hardware-address.

ps I work with V5 for a day now.....I'm a newbie

Rob S.

Re: Changing NIC hardware address
« Reply #5 on: September 29, 2001, 01:21:30 AM »
See my previous message in the thread.

I ment file /etc/init.d/network !

I hope this will do the trick in version 4.xx also.

Rob S.

Re: Changing NIC hardware address
« Reply #6 on: September 29, 2001, 03:07:03 AM »
I'm sorry. Ifconfig gave me the impression that it worked.
I Know. Test first and then publish. Sorry... 1st time I made
a misstake like this.

MarcB

Re: Changing NIC hardware address
« Reply #7 on: September 29, 2001, 08:48:19 AM »
Hi.
What I finally ended up doing (I'm not proud of this...) is physically swapping the NIC card from my friends Win2K box (set up on cable modem) to the server. This took care of the MAC issue on the server, Then I changed the Win2K box's MAC address through device manager-network adapter-bindings-network address (enter without colons) Hey, i'm relatively new to Linux, but know windows. we do what we know...
Now if he wants he can take the server offline and still use his win2K box directly to cable by switching the wires if there are any problems. It makes the both of us feel better knowing he can at least get online fast if the E-smith box has problems (he doesn't know anything about Linux at all) Thanks for the help.

MarcB