![]() |
|
|
#1 | |
|
Registered User
Join Date: Nov 2006
Posts: 5
|
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? |
|
|
|
|
|
|
#2 | |
|
Registered User
Join Date: Dec 2002
Location: Clausthal/Germany
Posts: 1,105
|
Quote:
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.... |
|
|
|
|
| Sponsored Ads - Guests Only | |
|
|
|
|
#3 | |
|
Registered User
Join Date: Nov 2006
Posts: 5
|
Quote:
It also fial to "BIND MAC ADDRESS" in network configuration. DRIVER ISSUE? HELP HELP |
|
|
|
|
|
|
#4 |
|
Custom :)
|
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
|
|
|
|
|
|
#5 |
|
Registered User
Join Date: Dec 2002
Location: Clausthal/Germany
Posts: 1,105
|
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. |
|
|
|
|
|
#6 |
|
Registered User
Join Date: Sep 2004
Posts: 783
|
Hmmm.. randomly changing mac-address sounds like a neat feature
![]() |
|
|
|
|
|
#7 |
|
Registered User
Join Date: Nov 2005
Posts: 178
|
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 |
|
|
|
|
|
#8 |
|
Registered User
Join Date: Jan 2006
Posts: 191
|
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. |
|
|
|
|
|
#9 |
|
Registered User
Join Date: Nov 2006
Posts: 5
|
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. |
|
|
|
|
|
#10 | |
|
Registered User
Join Date: Dec 2002
Location: Clausthal/Germany
Posts: 1,105
|
Quote:
you have to replace bla:bla.... with your mac-address ![]() |
|
|
|
|
|
|
#11 | |
|
Registered User
Join Date: Nov 2006
Posts: 5
|
Quote:
/* 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...... ![]() |
|
|
|
|
|
|
#12 |
|
Registered User
Join Date: Nov 2006
Posts: 5
|
I find Asus's mac registeration is 00-18-f3.
Hence, this is an ending problem. Who will be complain? Nvidia ? Asus ? Fedora ? |
|
|
|
![]() |
| Most Popular NVIDIA Based Graphics Cards | |
|
|
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|