無線LANのmacアドレスを変更する方法を探して

  • 久々にfoneraを起動したけど、つなぎ方が分からなかったのでメモ
    • speed 115200bps
    • root admin
# ifconfig
br0       Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
    • うちのルーターのアドレスも192.168.1.1なのでネットワーク繋がらないので変更する
# ifconfig br0 down
# ifconfig br0 192.168.1.4 netmask 255.255.255.0 broadcast 192.168.1.255

# ifdown eth0
# ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
# ifup eth0

# ip link set ath0 down
# ip link set ath0 address xx:xx:xx:xx:xx:xx
# ip link set ath0 up

# iwconfig ath0 ap xx:xx:xx:xx:xx:xx

  • まとめ...中
    • "ifconfig ath0 hr ether xx:xx:xx:xx:xx:xx" では ifconfig ath0 のMACアドレスは変わらない。
    • "ip link set ath0 address xx:xx:xx:xx:xx:xx" では ifconfig ath0 のMACアドレスは変更されるが、iwconfig ath0 のMACアドレスは変わらない。
    • "iwconfig ath0 ap" では "SET failed on device ath0 ; Operation not supported."というエラーになる。
    • nvramコマンドでmacアドレスを書き換えても起動すると戻る。iwconfig ath0 のmacアドレスは変わらない。
    • redbootのコマンドでも書き換えができるらしい。