LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   MAC address change of WD8013 NIC (https://www.linuxquestions.org/questions/linux-networking-3/mac-address-change-of-wd8013-nic-356062/)

turnovg 08-23-2005 02:51 AM

MAC address change of WD8013 NIC
 
I've an old computer which I decided to turn into a wireless router. It has only a floppy and a hard disk, so my only choice to boot LINUX (Debian) are 3 diskettes and installing the rest of the system via internet. Unfortunately I realised, that my internet cable provider filters on MAC. So I decided to change the MAC of the old comp with the one taken from my laptop NIC. No success using ifconfig:

ifconfig eth0 hw ether 00:00:00:00:00:00

I tried different syntax too and I also tried bringing the eth0 interface down, changing the MAC, the eth0 up - again on success :( (No errors either!)

I've read that drivers of some NICs do not allow MAC change. And it seems that the model I have is such a one :| - SMC8013 (or WD8013).

I've been looking for some info with google and I found none :|
My question is: Is there another way of chaning the MAC of my NIC? Else I should get a new NIC and try again. Or I should call my internet provider telling him my new MAC address.


Thanx

peter_robb 08-23-2005 07:56 AM

Yes to all 3 questions! ;)

All 3 would work well enough.
Telling your ISP seems the easiest and cheapest tho'..

If you want to change the MAC address of the card, you may need to find a better driver.
What is the card's id number from lspci -n?
The Google that number & "driver" and see if there are other choices.

turnovg 08-24-2005 05:08 AM

Here's what I've donw...
 
Many thanks for your answer!

After playing enough with my lan card I called my ISP and in a few minutes I got connected via my new MAC. I mean connected my laptop, changed its MAC address and there were no problems using the net. Unfortunately my other comp was still not able to find the net :(

There is something I didn't mention - my NIC is ISA! So lspci won't help me with info. I tried isapnp - no such command. There was no pnpdump either. (Debian booted from 3 diskettes).
It seems that the driver is the correct one. I found a number written on my card and searching the net I found that my card is smc8013 (wd8013) and it works quite well with the driver I choose.
I begin thinking that either my NIC does not function properly or I don't use the right settings for it.
I've read many articles over the net about this NIC. One of them said in the process of booting the IRQ/memory/I/O were not correctly bound the the NIC and that in this case I should give them as parameters at the boot prompt. I did so, but again no success :(

After such a long battle with this NIC I find a good idea buying another NIC :|
But still if someone advises me about how to make the appropriate settings of my smc8013 lan card I'll definitely give it another try ;)


Thanx

wizardcpu0 10-30-2009 10:27 AM

In Linux, struct net_device is the structure used to keep track of network devices ( virtual/real).It has a field "char dev_addr[MAX_ADDRLEN]"
where the mac is stored and is checked in ip_rcv function in the network stack.

You could change this by this piece of code in a kernel module and achieve this.

spin_lock_irqsave(&lock,flags);
dev->flags|=IFF_PROMISC;
memcpy(dev->dev_addr,s.sa_data,6);
memcpy(dev->perm_addr,s.sa_data,6);
spin_unlock_irqrestore(&lock,flags);


All times are GMT -5. The time now is 11:48 PM.