Please note: This project is no longer active. The website is kept online for historic purposes only.
If you´re looking for a Linux driver for your Atheros WLAN device, you should continue here .

Changes between Version 17 and Version 18 of UserDocs/ChangeMacAddress

Author:
mtaylor (IP: 0.0.0.0)
Timestamp:
11/22/07 06:46:15 (9 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UserDocs/ChangeMacAddress

    v17 v18  
    11== How can I change the MAC address of my card? == 
    22 
    3 ---- 
    4 '''NOTE:''' This currently does NOT work with madwifi-ng. Refer to ticket #323 for related information. Any help in solving this issue is welcome. 
    5 ---- 
     3With madwifi-ng, you change the MAC of the master device and VAP mac addresses are all based upon that.  This must be done '''before creating''' any VAPs for the corresponding master device. 
    64 
    7 The mac address can be changed only for master device, and this must be done '''before creating''' any VAPs for the corresponding master device.  
     5Ideally, load madwifi with autocreate=none as in this example: 
     6{{{ 
     7modprobe ath_pci autocreate=none 
     8}}} 
    89 
    9 Ensure that any autocreated VAPs are destroyed
     10Alternatively, you can try destroying any VAPs using wlanconfig destroy, as in this example
    1011{{{ 
    1112wlanconfig ath0 destroy 
    1213}}} 
    1314 
    14 Try the following (replacing the x's with the MAC) 
     15You cannot use ifconfig to change the mac at this time.  It should work with newer netlink API (iproute or macchanger).  The suggested approach is to use macchanger to alter the address.  Here's an example of changing the master device's MAC with macchanger: 
    1516{{{ 
    16 ifconfig wifi0 down hw ether xx:xx:xx:xx:xx:xx 
    17 ifconfig wifi0 up 
     17ip link set dev wifi0 down 
     18macchanger --mac=xx:xx:xx:xx:xx:xx wifi0 
     19ip link set dev wifi0 up 
    1820}}} 
     21NOTE: macchanger can also make random addresses ({{{--random}}}) or have another MAC for the same vendor ({{{--another}}}).  It's more specialized tool for the job than iproute2.  You can get macchanger at http://www.alobbs.com/macchanger/ 
    1922 
    20 Bring the VAP back up: 
    21 {{{ 
    22 wlanconfig ath0 create wlandev wifi0 wlanmode sta 
    23 }}} 
    24  
    25 It's also possible to use {{{macchanger}}} 
    26 Simply type 
    27 {{{ 
    28 macchanger --show wifi0 
    29 }}} 
    30 to show your MAC address (and maybe store it somewhere) 
    31 And use  
    32 {{{ 
    33 macchanger --mac=xx:xx:xx:xx:xx:xx wifi0 
    34 }}} 
    35 to set the hardware address to something new. 
    36 You can also make random addresses ({{{--random}}}) or have another MAC for the same vendor ({{{--another}}}). 
    37 This should work with all Ethernet/WLAN-Cards. 
    38  
    39 ------------------------------------------ 
    40 Edited by Jeff Sadowski on June 21 2006 
    41 ------------------------------------------ 
    42  
    43 {{{ 
    44 ifconfig wifi0 down hw ether xx:xx:xx:xx:xx:xx 
    45 }}} 
    46 no longer works use 
    47 {{{ 
    48 ifconfig wifi0 down 
    49 macchanger --mac=xx:xx:xx:xx:xx:xx wifi0 
    50 ifconfig wifi0 up 
    51 }}} 
    52 you can get macchanger at http://www.alobbs.com/macchanger/ 
    53  
    54 Otherwise, you can try with: 
     23You should also be able to use iproute2 (it uses netlink) to do the same thing with: 
    5524{{{ 
    5625ip link set dev wifi0 down 
    5928}}} 
    6029 
    61 This should also work. 
     30Now create your VAPs 
     31{{{ 
     32wlanconfig ath0 create wlandev wifi0 wlanmode sta 
     33}}}