Ubuntu MAC change how to
December 12, 2007 , 9:52 am
Adica daca vrei sa folosesti vechiul MAC ca sa nu mai suni la ISP.
Ubuntu 7.10 [server, da nu conteaza] cu update-urile la zi. Un ISP care da net prin DHCP dupa MAC.
Teoretic ar trebui sa editezi in
/etc/network/interfaces
si sa bagi ceva de genu:
auto eth0
iface eth0 inet dhcp
hwaddress ether mac:vechi
iar cu un restart:
/etc/init.d/networking restart
sa mearga.
Ei bine nu merge. O posibila [si plauzibila] explicatie e:
Busybox had a similar bug, fixed here:
http://bugs.busybox.net/view.php?id=880
Summary: 0000880: ifupdown fails to set hwaddress
Description: When using ifup to enable an interface that has a hwaddress line in /etc/network/interfaces the SIOCSIFHWADDR ioctl fails with a message that the device is busy. This happens because all the parameters are sent on a single ifconfig line and thus the interface is set to an UP state before the hwaddress portion is processed.
si atunci ar fi ceva de genul:
auto eth0
iface eth0 inet dhcp
pre-up ifconfig eth0 hw ether mac:vechi
Dar evident nici asta nu merge.
Asa ca good old Slack way, ad labam:
In rc.local
echo Nani
sleep 5
ifconfig eth0 down
#eventual un
rm -f /var/log/dhclient.pid
ifconfig eth0 hw ether mac:vechi
dhclient eth0
echo Mornin net
Evdent se poate rezolva in nenumarate moduri.
Scris de admin in How-To,IT&C Related,Linux | Comenteaza! (0)