It changes the MAC in each reboot, so when I did a WOL the MAC changes for another (randomly defined) and I had to reconfigure the client in each reboot...
It also had done another problem that solved here: MAC changed so ubuntu didn't recognize the ethernet card and created a new entry for it in 70-persistent-net-rules creating new sequentialy eth1, eth2, eth3, eth4... in each reboot. I said in a previous post how to avoid that sequence but this is a better way:
The problem appears to be that the kernel didn't recognize the ethernet adapter manufacturer (that have it's own code: the first 3 numbers of the MAC) and changed it for another randomly choiced number (so in each reboot you have a random new MAC).
A bug -I think- in a driver called forcedeth:
kernel: [ 0.786758] forcedeth 0000:00:07.0: PCI INT A -> Link[LMAC] -> GSI 23 (level, low) -> IRQ 23
kernel: [ 0.786763] forcedeth 0000:00:07.0: setting latency timer to 64
kernel: [ 0.786812] forcedeth 0000:00:07.0: Invalid Mac address detected: xx:38:37:35:34:00
kernel: [ 0.786815] forcedeth 0000:00:07.0: Please complain to your hardware vendor. Switching to a random MAC.
Or may the MAC be invalid for another reason... I don't care... my choices where to do what I've done or to hack it and recompile the kernel (and I want to compile a kernel, I've never do such thing, but I'll do in a virtual machine)
So I have solve it this way:
![]() |
| There is too the MAC address |
Download macchanger (it can be do too using ifconfig) via:
sudo apt-get install macchanger
Or apptitude, or synaptic....
Make a file using it and wiving it a MAC number of your choice nd your ethernet name (mine is eth0, find it typing 'ifconfig' in console):
#!/bin/bash
sudo macchanger eth0 --mac=12:34:56:78:90:a1
Save it. Copy it to /etc/init.d (you must be root, so do it graphically 'sudo nautilus' in console, to do in console go to file's directory and type 'sudo mv ./(filename) /etc/init.d/' without ' and changing (filename) with you file name)
Change file owner via file properties in nautilus or
sudo chown root:root (filename)
And make it executable via properties (giving it permissions of execution and read for all) or via console:
sudo chmod 755 (filename)
After this put it in your startup sequence:
sudo update-rc.d -f (filename) defaults 21
The 21 its the position in the startup sequence, this is important: i've tried 20 and didn't works and 80 and it worked to change the MAC but not for WOL.
This way you always will have the same MAC on your PC on startup.
Good luck

No hay comentarios:
Publicar un comentario