Go Back   nV News Forums > Linux Support Forums > NVIDIA Linux


Sponsored Ad

Reply
 
Thread Tools
Old 11-01-06, 01:55 AM   #1
thchen414
Registered User
 
Join Date: Nov 2006
Posts: 5
Default Mac address always change (random) after reboot.

Dears,
In my platform (FC4 2.6.11smp + MCP61 (Asus M2N-MX MB)), the mac address always changes after reboot. WHY??? I need a fix mac address to maintain some tool license. Please tell me how to do it.
BTW, sound card is still non-detected. I google the solution and find hda-intel.c supporting MCP61 is above 2.6.17. How can I build new module on the 2.6.11smp? (Kernel upgrade is something trouble to me.)

I hack forcedeth to 2.6.11smp as follows.
1. download new forcedeth.c from website (not from nvidia website, v1.11 does not support MCP61 pci = 0x03ef)
2. Kernel re-compile to get forcedeth.ko
3. Override /lib/module/'uname -r'/.../net/forcedeth.ko

Then, network config tool can detec the NIC card.

Is the procedure something wrong to result MAC change all the times?
(Of cousre, I used HWADDR to fix it but fails.)

Can I use the similiar method to hack sound-card?
The format of hda-intel.c in 2.6.11 is very different one in 2.6.17.
Can anybody help me?
thchen414 is offline   Reply With Quote
Old 11-01-06, 02:01 AM   #2
energyman76b
Registered User
 
Join Date: Dec 2002
Location: Clausthal/Germany
Posts: 1,105
Default Re: Mac address always change (random) after reboot.

Quote:
Originally Posted by thchen414
Dears,
In my platform (FC4 2.6.11smp + MCP61 (Asus M2N-MX MB)), the mac address always changes after reboot. WHY??? I need a fix mac address to maintain some tool license. Please tell me how to do it.
with ifconfig

bring the interface down, set the mac as you wish, bring the interface up.

google would have told you that.
ifconfig eth0 down
ifconfig eth0 hw ether bla:bla:bla:bla:bla:bla
ifconfig eth0 up

That said, the MAC should not change - and certainly not randomly. Try a different kernel 2.6.17 or .18. 2.6.11 is from the stone age....
energyman76b is offline   Reply With Quote

Sponsored Ads - Guests Only

Old 11-01-06, 04:59 AM   #3
thchen414
Registered User
 
Join Date: Nov 2006
Posts: 5
Default Re: Mac address always change (random) after reboot.

Quote:
Originally Posted by energyman76b
with ifconfig

bring the interface down, set the mac as you wish, bring the interface up.

google would have told you that.
ifconfig eth0 down
ifconfig eth0 hw ether bla:bla:bla:bla:bla:bla
ifconfig eth0 up

That said, the MAC should not change - and certainly not randomly. Try a different kernel 2.6.17 or .18. 2.6.11 is from the stone age....
God, I upgrade kernel to 2.6.17. And it solves my soundCard issue but MAC address change also after reboot, WHY??? COST DOWN for EEPROM ????
It also fial to "BIND MAC ADDRESS" in network configuration. DRIVER ISSUE?
HELP HELP
thchen414 is offline   Reply With Quote
Old 11-01-06, 06:43 AM   #4
Darius.P
Custom :)
 
Join Date: Aug 2006
Location: Lithuania
Posts: 3
Send a message via Skype™ to Darius.P
Default Re: Mac address always change (random) after reboot.

check network interface init script and config, and if you find some like this mac_eth0="random-full", comment this line. I don't know where this line placed in FC 4, in gentoo it placed int /etc/conf.d/net file
Darius.P is offline   Reply With Quote
Old 11-01-06, 01:10 PM   #5
energyman76b
Registered User
 
Join Date: Dec 2002
Location: Clausthal/Germany
Posts: 1,105
Default Re: Mac address always change (random) after reboot.

http://en.wikipedia.org/wiki/MAC_address

google is your friend.

Why didn't you google first? Or looked into your distri's documentation?

-----
In Red Hat Linux and other similar systems (Fedora Core, etc) an easy way to make it "permanent" across reboots is to just add a variable like this to your ifcfg-eth0 or similar file:
MACADDR=12:34:56:78:90:ab
(Upper or lower case on the MAC address are fine, because the network function converts it to upper case.)
and service network restart for prompt results.
energyman76b is offline   Reply With Quote
Old 11-01-06, 02:38 PM   #6
Lithorus
Registered User
 
Lithorus's Avatar
 
Join Date: Sep 2004
Posts: 783
Default Re: Mac address always change (random) after reboot.

Hmmm.. randomly changing mac-address sounds like a neat feature
Lithorus is offline   Reply With Quote
Old 11-01-06, 03:26 PM   #7
Lethe
Registered User
 
Join Date: Nov 2005
Posts: 178
Default Re: Mac address always change (random) after reboot.

I think what he means is he sets the MAC address to one that the licenced software needs - then when he reboots it goes back to the HW MAC address of the card... i.e. it doesn't retain the one he sets.

I think.

Nick
Lethe is offline   Reply With Quote
Old 11-01-06, 05:24 PM   #8
piotrq__
Registered User
 
Join Date: Jan 2006
Posts: 191
Default Re: Mac address always change (random) after reboot.

Well I'd do what energyman76 said and placed that
ifconfig eth0 hw ether bla:bla:bla:bla:bla:bla command somewhere in your distro's init scripts. He got you a direct link to a tip for doing that:

In Red Hat Linux and other similar systems (Fedora Core, etc) an easy way to make it "permanent" across reboots is to just add a variable like this to your ifcfg-eth0 or similar file:
MACADDR=12:34:56:78:90:ab
(Upper or lower case on the MAC address are fine, because the network function converts it to upper case.)
and service network restart for prompt results.
piotrq__ is offline   Reply With Quote
Old 11-02-06, 04:22 AM   #9
thchen414
Registered User
 
Join Date: Nov 2006
Posts: 5
Default Re: Mac address always change (random) after reboot.

Hm... Let me explain more clearly.
What I need is a fix mac address (whatever it is, the value from EEPROM is the best.) But while I install FC4 on my new platform, I find the last 3 numbers of mac address is changed randomly. (The registered nVidia 00:00:06 are fixed in this case.)
I try to fix it by adding hwaddr=bla:bla:bla:bla:bla:bla, in ifcfg-eth0,
but it FAILs.
(very strange still NOW.)
I have two machines (one with broadcom and one with Marvell) work well
(installed 3 months ago.)

The max. possibility is the setting "mac_eth0="random-ending", and I still
try to find the file in FC4 very hard.......

Thanks to everybody's help, I appreciate very much.
thchen414 is offline   Reply With Quote
Old 11-02-06, 01:12 PM   #10
energyman76b
Registered User
 
Join Date: Dec 2002
Location: Clausthal/Germany
Posts: 1,105
Default Re: Mac address always change (random) after reboot.

Quote:
Originally Posted by thchen414
Hm... Let me explain more clearly.
What I need is a fix mac address (whatever it is, the value from EEPROM is the best.) But while I install FC4 on my new platform, I find the last 3 numbers of mac address is changed randomly. (The registered nVidia 00:00:06 are fixed in this case.)
I try to fix it by adding hwaddr=bla:bla:bla:bla:bla:bla, in ifcfg-eth0,
but it FAILs.
(very strange still NOW.)
I have two machines (one with broadcom and one with Marvell) work well
(installed 3 months ago.)

The max. possibility is the setting "mac_eth0="random-ending", and I still
try to find the file in FC4 very hard.......

Thanks to everybody's help, I appreciate very much.

you have to replace bla:bla.... with your mac-address
energyman76b is offline   Reply With Quote
Old 11-03-06, 12:28 AM   #11
thchen414
Registered User
 
Join Date: Nov 2006
Posts: 5
Default Re: Mac address always change (random) after reboot.

Quote:
Originally Posted by thchen414
Hm... Let me explain more clearly.
What I need is a fix mac address (whatever it is, the value from EEPROM is the best.) But while I install FC4 on my new platform, I find the last 3 numbers of mac address is changed randomly. (The registered nVidia 00:00:06 are fixed in this case.)
I try to fix it by adding hwaddr=bla:bla:bla:bla:bla:bla, in ifcfg-eth0,
but it FAILs.
(very strange still NOW.)
I have two machines (one with broadcom and one with Marvell) work well
(installed 3 months ago.)

The max. possibility is the setting "mac_eth0="random-ending", and I still
try to find the file in FC4 very hard.......

Thanks to everybody's help, I appreciate very much.
I find one thing interesting from source code.
/* read the mac address */
base = get_hwbase(dev);
np->orig_mac[0] = readl(base + NvRegMacAddrA);
np->orig_mac[1] = readl(base + NvRegMacAddrB);

dev->dev_addr[0] = (np->orig_mac[1] >> 8) & 0xff;
dev->dev_addr[1] = (np->orig_mac[1] >> 0) & 0xff;
dev->dev_addr[2] = (np->orig_mac[0] >> 24) & 0xff;
dev->dev_addr[3] = (np->orig_mac[0] >> 16) & 0xff;
dev->dev_addr[4] = (np->orig_mac[0] >> 8) & 0xff;
dev->dev_addr[5] = (np->orig_mac[0] >> 0) & 0xff;
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13)
memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);

if (!is_valid_ether_addr(dev->perm_addr)) {
#else
if (!is_valid_ether_addr(dev->dev_addr)) {
#endif
/*
* Bad mac address. At least one bios sets the mac address
* to 01:23:45:67:89:ab
*/
printk(KERN_ERR "%s: Invalid Mac address detected: %02x:%02x:%02x:%02x:%02x:%02x\n",
pci_name(pci_dev),
dev->dev_addr[0], dev->dev_addr[1], dev->dev_addr[2],
dev->dev_addr[3], dev->dev_addr[4], dev->dev_addr[5]);
printk(KERN_ERR "Please complain to your hardware vendor. Switching to a random MAC.\n");
dev->dev_addr[0] = 0x00;
dev->dev_addr[1] = 0x00;
dev->dev_addr[2] = 0x6c;
get_random_bytes(&dev->dev_addr[3], 3);
}
================================================== ======
From dmesg ...............
forcedeth: using HIGHDMA
0000:00:07.0: Invalid Mac address detected: a3:fa:40:f3:18:00
Please complain to your hardware vendor. Switching to a random MAC.
================================================== ======
It seems that I will complain to Asus a little......
thchen414 is offline   Reply With Quote
Old 11-03-06, 05:37 AM   #12
thchen414
Registered User
 
Join Date: Nov 2006
Posts: 5
Default Re: Mac address always change (random) after reboot.

I find Asus's mac registeration is 00-18-f3.
Hence, this is an ending problem.
Who will be complain? Nvidia ? Asus ? Fedora ?
thchen414 is offline   Reply With Quote
Reply


Most Popular NVIDIA Based Graphics Cards


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 08:43 AM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
nV News - Copyright ©1998-2010. All rights reserved.