LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Changing Mac Address on Network Card? (https://www.linuxquestions.org/questions/linux-networking-3/changing-mac-address-on-network-card-140220/)

neopiper 01-29-2004 10:45 PM

Changing Mac Address on Network Card?
 
I'm running Libranet 2.8.1, really happy with it, however i need to change my Network card MAC address in order to connect to the campus network as my old laptop was registered under a different mac address.

Is there a way to change et0's mac address? especially in libranet?

Thanks in advanced.

hexbit 01-29-2004 11:05 PM

Re: Changing Mac Address on Network Card?
 
As root, try this (assuming your nic is eth0) :

# /sbin/ifconfig eth0 down
# /sbin/ifconfig eth0 hw ether 00:00:00:00:00:00
# /sbin/ifconfig eth0 up

Just replace the 00:00:00:00:00:00 w/whatever you need.

=)


Quote:

Originally posted by neopiper
I'm running Libranet 2.8.1, really happy with it, however i need to change my Network card MAC address in order to connect to the campus network as my old laptop was registered under a different mac address.

Is there a way to change et0's mac address? especially in libranet?

Thanks in advanced.


neopiper 01-29-2004 11:20 PM

great it works, how can i make it default during init and boot up?

King Richard 01-30-2004 12:27 AM

Um, I am probably going to sound like a dork, but I was under the impression that a MAC address was permanently burned into a card, and to prevent there from ever being two cards with the same MAC address, had a unique code not only identifying the specific card but also identifying the card manufacturer.

stickman 01-30-2004 08:00 AM

Yes, each NIC manufacturer is supposed to assign a unique MAC address to their NICs; however, it has been known that occasionally that they accidentally make dupes. There are instances (like system failover) where you do want to have a NIC changes its MAC address.

neopiper 01-30-2004 12:00 PM

so any idea how i can change it and apply to it automatically during boot up? :p

thx

PlatinumRik 02-26-2004 01:54 PM

there are two mac addresses, a software mac address and a hardware mac address

dubman 02-26-2004 08:09 PM

a MAC address i just some PHY registers in the EEPROM. These values can be easily changed if the kernel has a method to access these registers. Basically, you can spoof your MAC to be whatever you want it to be.

The PHY is going to reset each time you power cycle, so you will need to create a shell script to make the changes and place the script in your /etc/rc.local. This way the changes will be made upon boot, after all other services have been initialized.

--Hope this helps

Shantesh 06-28-2004 10:43 PM

tht ifconfig thing worked...cool...now i can access my frds account whuz not in town;)

m_yates 07-06-2004 02:36 PM

neopiper, this is a late reply, but I know how you can make it automatic at boot up. Edit the file /etc/rcS.d/S40networking. Scroll down until you see:
Quote:

echo -n "Configuring network interfaces: "
ifup -a
echo "done."
Add your commands above "ifup -a" so that the mac address is changed before the eth0 card is brought up
Quote:

echo -n "Configuring network interfaces: "
ifconfig eth0 down
ifconfig eth0 hw ether 00:00:00:00:00:00 up
ifup -a
echo "done."
Of course the zeros above should be your desired mac address.:)

Fond_of_Opensource 11-21-2007 02:14 AM

I have Redhat 9 machine.

I changed MaC address to 11:22:33:44:55 using ifconfig.


Now, I can ping to other hosts on my network and also to google.com


But when I try to open www.google.com in the Mozilla browser, I get Error as "The operation timed out when attempting to cotact www.google.com"


Please help how to solve this problem.


All times are GMT -5. The time now is 11:47 AM.