LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 06-05-2008, 10:16 PM   #1
CJS
Member
 
Registered: May 2008
Location: California, USA
Distribution: Ubuntu 8.10
Posts: 247

Rep: Reputation: 49
Question Ubuntu: How to change MAC address with ifconfig?


At least for Ubuntu, I've read that you can temporarily change the MAC address of your wireless NIC with something like:
Code:
sudo ifconfig wlan0 down
sudo ifconfig wlan0 hw ether 00:28:C7:0A:42:A2
sudo ifconfig wlan0 up
Unfortunately this doesn't seem to work for me. After doing the "sudo ifconfig wlan0 hw ether 00:28:C7:0A:42:A2", if I then do "ifconfig", it doesn't show my MAC has changed to the new value. And then when I do the "sudo ifconfig wlan0 up", it doesn't bring up my wireless connection fully; I have to do a "sudo /etc/init.d/networking restart" or "sudo ifup wlan0" to actually bring up my wireless connection.

Can someone please give me some insight what is happening? Why doesn't the ifconfig command change the MAC address, and why do I need more than the simple "sudo ifconfig wlan0 up" to bring up the interface?

Thanks for any help.
 
Old 06-06-2008, 08:13 AM   #2
Nick_Battle
Member
 
Registered: Dec 2006
Location: Bracknell, UK
Distribution: SUSE 13.1
Posts: 159

Rep: Reputation: 33
If you look at the man page for ifconfig, the "hw" options says, "Set the hardware address of this interface, if the device driver supports this operation."

My guess would be that your wireless card doesn't support the operation. Not all of them do.

HTH,
-nick
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to change MAC address cain_eve Linux - Software 11 02-05-2009 02:52 PM
ifconfig reports wrong mac address and wireless doesn't work blackdragonblood Linux - Wireless Networking 7 04-15-2006 01:08 PM
change mac address possible? kahn Linux - Networking 4 04-22-2005 05:43 AM
Need help spoofing MAC address, ifconfig down seems to remove wireless card sicc Linux - Wireless Networking 0 11-30-2004 03:42 AM
MAC address change? w9q Linux - Networking 3 09-10-2004 03:42 AM


All times are GMT -5. The time now is 04:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration