It would be a nice feature addition to be able to change the mac address on a nic. I have included a possible modification for allowing this. You should see that I am having the script change the mac address before assigning the ip. This is needed for those of us who need to have a specific mac assigned before we negotiate a dhcp address with our provider.
Created attachment 4727 [details] Example of what I would like to see changed. Here is an example of what I would like to see changed in the networking scripts.
Cant you change it in the same call to ifconfig that sets the ip ?
You can, but many cards don't allow you to change the hardware address. This gives bettter feedback if that is the case.
Well, my opinion is that the user should know if his can or not. That is the whole idea behind iface_eth0="foo", and not useing stuff like: IP= SUBMASK= etc .. so that you can add extra ifconfig commands if needed. Gentoo's rc-scripts is supposed to be lite, and easy to modify by user to suit their needs .. that with CONFIG_PROTECT. And net.eth0 is already too loaded for my linking.
Basically, you want an app to change your mac address. See here: http://www.alobbs.com/modules.php?op=modload&name=macc&file=index This bug should be marked invalid.
I think people that have been responding to this bug are missing the point. There are those of us who need to be able to change our MAC *before* we ask for a dhcp address from our provider. It's that simple. Any other details are peripheral to the problem. I'm not saying my solution is the way to do it. What I am saying is that a solution needs to be found. When my firewall/gateway comes up, it would be nice if it could do so automatically without me having to manually set the mac address and *then* get my dhcp address (although, I don't have to do it manually, because I implemented these changes). I also believe that this should be a configuration issue, not a script hacking issue.
The Kenneth Rawlings's script is a good resolution. I hope it will be patched to the next Gentoo release.
Please have a look at the newest net.eth0 from baselayout, it has this feature.
I'm closing this, as it was my macchanger patch that got into baselayout.