Šta je novo?

Promjena MAC adrese...

vmiro

Čuven
Učlanjen(a)
31.03.2003
Poruke
297
Poena
619
Sistem je CentOS, RedHat bazirani linux OS. Pomocu komandi:
ifconfig eth0 down
ifconfig eth0 hw ether 01:02:03:04:05:06
ifconfig eth0 up

mogu da promijenim adresu mrežne kartice i to radi bez problema, medjutim, stara MAC adresa se vrati kada restartujem računar. Na koji način da zadržim promijenjenu adresu posle restarta??
 
Sta kazu drugari sa sajta

Kod:
http://codeghar.wordpress.com/2008/06/09/set-mac-address/

CentOS

Open the file of the network interface you want to modify and add the following:

HWADDR=xx:xx:xx:xx:xx:xx

For example, if you want to explicitly specify a MAC address for eth0, you do the following:

vim /etc/sysconfig/network-scripts/ifcfg-eth0

And then you add following line to end of file:
HWADDR=xx:xx:xx:xx:xx:xx
where xx:xx:xx:xx:xx:xx is the MAC address.

So now your ifcfg-eth0 file may look like:

DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
DHCP_HOSTNAME=localhost.localdomain
IPADDR=10.10.1.5
NETMASK=255.255.255.0
GATEWAY=10.10.1.1
TYPE=Ethernet
USERCTL=no
IPV6INIT=no
PEERDNS=yes
HWADDR=02:01:02:03:04:08

Do not forget to restart networking services to make changes effective: sudo service network restart.
 
Poslednja izmena:
Posle restarta, ista prica, HW adresa je opet stara :(
Dal mogu gdje da ubacim neku od gorepomenutih komandi da se izvrsi prije podizanja mrežnog interfejsa. Ima li ko kakvu ideju ?
 
Evo rijesenja:
U /etc/sysconfig/network-scripts/ifcfg-eth0 dodati liniju
MACADDR=00:01:02:03:04:05
gdje je 00:01:02:03:04:05 zeljena MAC adresa i promijeniti adresu pomocu jedne od komandi iz prethodna dva posta ifconfig... ili macchanger...

Jedini, meni poznati, način da lažirana MAC adresa ostane aktuelna i posle restarta !

Poz
 
Nazad
Vrh Dno