Zmiana adresu MAC karty sieciowej 2
Z openSUSE wiki
(Przekierowano z MAC-recznie)
Ja zmienić MAC Adres karty sieciowej ręcznie.
OK - ponieważ niejednokrotnie temat się przewija, więc raz a dobrze postaram się to opisać.
Spis treści |
Wersja openSUSE (co jest wymagane, przynajmniej u mnie na takich działa)
- openSUSE 11.0
- Jądro systemu !!! Linux sea-star 2.6.25.20-0.1-default #1 SMP 2008-12-12 20:30:38 +0100 i686 i686 i386 GNU/Linux
Kolejne komendy
sea-star:~ # ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:16:D4:1B:6C:51
inet addr:192.168.2.101 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::216:d4ff:fe1b:6c51/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:609185 errors:0 dropped:0 overruns:0 frame:0
TX packets:374944 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:820852999 (782.8 Mb) TX bytes:36800659 (35.0 Mb)
Interrupt:21
sea-star:~ # route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 eth0
sea-star:~ # which rcnetwork
/sbin/rcnetwork
sea-star:~ # rcnetwork stop
Shutting down network interfaces:
eth0 done
wlan0 done
Shutting down service network . . . . . . . . . . . . . done
sea-star:~ # ifconfig eth0 hw ether 80:10:AB:CD:EF:00
sea-star:~ # rcnetwork start
Hint: you may set mandatory devices in /etc/sysconfig/network/config
Setting up network interfaces:
lo
lo IP address: 127.0.0.1/8
IP address: 127.0.0.2/8 done
eth0
eth0 (DHCP) . . . . . . . . IP/Netmask: '192.168.2.10' / '255done.255.0'
wlan0
command 'iwconfig wlan0 nick sea-star' returned
Error for wireless request "Set Nickname" (8B1C) :
SET failed on device wlan0 ; Operation not supported.
wlan0 (DHCP) . . . . . . . . . . . . . . . no IP address yet..waitingrounding.
Setting up service network . . . . . . . . . . . . . . done
sea-star:~ # ifconfig eth0
eth0 Link encap:Ethernet HWaddr 80:10:AB:CD:EF:00
inet addr:192.168.2.10 Bcast:192.168.2.255 Mask:255.255.255.0
inet6 addr: fe80::8210:abff:fecd:ef00/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:609192 errors:0 dropped:0 overruns:0 frame:0
TX packets:374960 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:820854083 (782.8 Mb) TX bytes:36802523 (35.0 Mb)
Interrupt:21
sea-star:~ # ping -w3 -c3 www.abix.info.pl
PING www.abix.info.pl (91.203.134.137) 56(84) bytes of data.
64 bytes from vps.abix.info.pl (91.203.134.137): icmp_seq=1 ttl=59 time=11.3 ms
64 bytes from vps.abix.info.pl (91.203.134.137): icmp_seq=2 ttl=59 time=14.0 ms
64 bytes from vps.abix.info.pl (91.203.134.137): icmp_seq=3 ttl=59 time=11.8 ms
--- www.abix.info.pl ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2009ms
rtt min/avg/max/mdev = 11.346/12.395/14.034/1.180 ms
Najważniejsze
To jest najważniejsze, czyli wymuszenie nowego MAC adresu karty sieciowej.
sea-star:~ # ifconfig eth0 hw ether 80:10:AB:CD:EF:00
Zmiana adresu MAC karty sieciowej podczas uruchamiania systemu
1. edytujesz plik /etc/sysconfig/network/ifcfg-eth_id – gdzie id to nr karty sieciowej (z reguły jest to eth0), np.: /etc/sysconfig/network/ifcfg-eth0 2. zmieniasz/dodajesz wpis:
LLADDR='YY:YY:YY:YY:YY:YY'
– gdzie YY:YY:YY:YY:YY:YY to nowy adres MAC
3. restartujesz system
Mam nadzieję, że to komuś pomoże. Adam