You are not logged in.
I use this command:
ifconfig eth0 192.168.132.2 hw ether 00:FF:FF:DC:EF:FD
but it said device busy.
And, how can I modify my HWaddr permanently?
Offline
Hmm.. You should set the hardware address with
ifconfig eth0 hw ether 00:FF:FF:DC:EF:FD
before you bring the interface up. Not all network cards support this operation, though.
If you can set the hardware address manually and have a static IP address, a permanent solution might be to edit the line in /etc/rc.conf that starts with eth0=... to something like this:
eth0="192.168.132.2 hw ether 00:FF:FF:DC:EF:FD netmask 255.255.255.0 broadcast 192.168.0.255"
With a dynamic IP address I don't see a way to do it without tweaking /etc/rc.d/network...
A natural question in this context is: why would you want to forge your hardware address?
Offline
The /etc/conf.d/dhcpcd parameters get passed to the daemon when you use dhcp. For example, you can specify a '-R' there if you don't want /etc/resolv.conf to be overwritten. I presume you could put 'ether 00:FF:FF:DC:EF:FD' on that line too.
Spoofing mac addresses is sometimes needed for aDSL connections, as the telco often only accepts the mac used to activate the service. You can phone in and get it changed if you have the time.
Also, sometimes the hardware has an invalid mac address and it neets to be over ridden.
I was just looking and it seems dhcpcd wont let you do it. Maybe you could set up a script to run ifconfig and put it before the network one in rc.conf?
Offline
Hmm.. You should set the hardware address with
ifconfig eth0 hw ether 00:FF:FF:DC:EF:FD
before you bring the interface up. Not all network cards support this operation, though.
If you can set the hardware address manually and have a static IP address, a permanent solution might be to edit the line in /etc/rc.conf that starts with eth0=... to something like this:
eth0="192.168.132.2 hw ether 00:FF:FF:DC:EF:FD netmask 255.255.255.0 broadcast 192.168.0.255"
With a dynamic IP address I don't see a way to do it without tweaking /etc/rc.d/network...
A natural question in this context is: why would you want to forge your hardware address?
I tried you ways, but seems not work
the hw did not change.
A natural question in this context is: why would you want to forge your hardware address?
just for study.
Offline