mercredi 4 février 2009

How to change the mac adress in Fedora


Some people may need to change the mac address of their ethernet network cards. This can be easily done with fedora with command line. Just follow the steps below:
1. Log as root on a textual console (ctrl+F2) or through "su -" command in your console
2. Print your network configuration with ifconfig

[root@localhost ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:23:8B:6A:7E:9E
inet addr:10.1.128.244 Bcast:10.1.255.255 Mask:255.255.0.0
inet6 addr: fe80::218:8bff:fedb:7e9e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:79086 errors:0 dropped:0 overruns:0 frame:0
TX packets:40319 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:72461556 (69.1 MiB) TX bytes:5245562 (5.0 MiB)
Interrupt:17


Here, eth0 is the ethernet interface of your system. The mac address is put in red.

3. Change your mac address using the following syntax

ifconfig eth0 hw ether 00:18:8B:CA:7E:90

The new value (in green) must be hexadecimal

4. if you have a dhcp server that distributes the adresses automatically, then request a new adress for your eth0 interface

[root@localhost ~]# dhclient eth0

5. Now, your interface is up and have a new mac and IP addresses. This feature may be useful if the network administrator ban you according to the mac adress, for example .........

3 commentaires: