How can I make a persistent change of my nic´s mac address, so it keeps the new value after a reboot? /JK -- "In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. Van De Snepscheut -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hi Jan,
How can I make a persistent change of my nic´s mac address, so it keeps the new value after a reboot?
AFAIK it depends on the Hardware (NIC) you have if it's possible at all. Maybe the manufacturer of your NIC provides a tool to change the MAC address. -- David Mayr, http://davey.de openSUSE LINUX, http://opensuse.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
David Mayr wrote:
Hi Jan,
How can I make a persistent change of my nic´s mac address, so it keeps the new value after a reboot?
AFAIK it depends on the Hardware (NIC) you have if it's possible at all. Maybe the manufacturer of your NIC provides a tool to change the MAC address.
Hi, in suse 10.2, according to /etc/sysconfig/network/ifcfg.template you can add the parameter LLADR=newmacaddress to your interface configuration, if the relevant network driver supports it. I also guess, that this will not work if you are using network manager. Hope this helps regards Eberhard -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
See /etc/udev/rules.d/30-net_persistent_names.rules Jan Karjalainen escreveu:
How can I make a persistent change of my nic´s mac address, so it keeps the new value after a reboot?
/JK
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Wednesday 2007-01-10 at 13:47 +0100, Jan Karjalainen wrote:
How can I make a persistent change of my nic´s mac address, so it keeps the new value after a reboot?
AFAIK, mac addresses are persistent, they don't change on reboots. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFFpOk8tTMYHG2NR9URAi4WAKCUeqBM+5NgjSDnObY+WLvxibCl4gCdF6Z5 WHQvdFewXcyyPBPsCenukLk= =WQI0 -----END PGP SIGNATURE-----
Carlos E. R. wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
The Wednesday 2007-01-10 at 13:47 +0100, Jan Karjalainen wrote:
How can I make a persistent change of my nic´s mac address, so it keeps the new value after a reboot?
AFAIK, mac addresses are persistent, they don't change on reboots.
- -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76
iD8DBQFFpOk8tTMYHG2NR9URAi4WAKCUeqBM+5NgjSDnObY+WLvxibCl4gCdF6Z5 WHQvdFewXcyyPBPsCenukLk= =WQI0 -----END PGP SIGNATURE-----
So if I run "ifconfig eth0 down hw ether 01:02:03:04:05:06 && eth0 up" it remembers this after a reboot? Won´t work on my machine (openSUSE 10.2)... /JK -- "In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. Van De Snepscheut -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
onsdag 10 januari 2007 14:36 skrev Jan Karjalainen:
Carlos E. R. wrote:
AFAIK, mac addresses are persistent, they don't change on reboots.
So if I run "ifconfig eth0 down hw ether 01:02:03:04:05:06 && eth0 up" it remembers this after a reboot? Won´t work on my machine (openSUSE 10.2)...
No, it means they never change at all... :-) As some other poster noted, it is by no means sure that your particular interface can change its mac address at all. By design, mac addresses are intended to by fixed, unique, and permanent. Some cards have the ability to change its mac address or to accept a second, "soft", mac address settable at run-time. YMMV. -- !++ ! Lennart Börjeson, Cinnober Financial Technology AB ! Industrigatan 2A, S-112 46 STOCKHOLM ! Sverige/Sweden/Schweden/Suède ! phone:+46-8-50304717 gsm:+46-70-3394717 fax:+46-8-50304701 !-- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Lennart Börjeson wrote:
onsdag 10 januari 2007 14:36 skrev Jan Karjalainen:
Carlos E. R. wrote:
AFAIK, mac addresses are persistent, they don't change on reboots.
So if I run "ifconfig eth0 down hw ether 01:02:03:04:05:06 && eth0 up" it remembers this after a reboot? Won´t work on my machine (openSUSE 10.2)...
No, it means they never change at all... :-)
As some other poster noted, it is by no means sure that your particular interface can change its mac address at all. By design, mac addresses are intended to by fixed, unique, and permanent.
Some cards have the ability to change its mac address or to accept a second, "soft", mac address settable at run-time. YMMV.
Just to make it clear: my nic supports the changing of mac address. Running "ifconfig eth0 down hw ether 01:02:03:04:05:06 && eth0 up" manually does work. As it reverts to the hard coded mac address after a reboot, I have to do this every time. So I´m looking for a setting somewhere where I can set the mac address to whatever I want during boot. /JK -- "In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. Van De Snepscheut -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wed, 2007-01-10 at 14:56 +0100, Jan Karjalainen wrote:
Lennart Börjeson wrote:
onsdag 10 januari 2007 14:36 skrev Jan Karjalainen:
Carlos E. R. wrote:
AFAIK, mac addresses are persistent, they don't change on reboots.
So if I run "ifconfig eth0 down hw ether 01:02:03:04:05:06 && eth0 up" it remembers this after a reboot? Won´t work on my machine (openSUSE 10.2)...
No, it means they never change at all... :-)
As some other poster noted, it is by no means sure that your particular interface can change its mac address at all. By design, mac addresses are intended to by fixed, unique, and permanent.
Some cards have the ability to change its mac address or to accept a second, "soft", mac address settable at run-time. YMMV.
Just to make it clear: my nic supports the changing of mac address. Running "ifconfig eth0 down hw ether 01:02:03:04:05:06 && eth0 up" manually does work.
This does _not_ change the embedded MAC address as it _cannot_ be permanently changed. This is so there never is a duplicate on the WWW. What you are doing is masquerading the address during your boot session. -- Ken Schneider UNIX since 1989, linux since 1994, SuSE since 1998 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Kenneth Schneider wrote:
On Wed, 2007-01-10 at 14:56 +0100, Jan Karjalainen wrote:
Lennart Börjeson wrote:
onsdag 10 januari 2007 14:36 skrev Jan Karjalainen:
Carlos E. R. wrote:
AFAIK, mac addresses are persistent, they don't change on reboots.
So if I run "ifconfig eth0 down hw ether 01:02:03:04:05:06 && eth0 up" it remembers this after a reboot? Won´t work on my machine (openSUSE 10.2)...
No, it means they never change at all... :-)
As some other poster noted, it is by no means sure that your particular interface can change its mac address at all. By design, mac addresses are intended to by fixed, unique, and permanent.
Some cards have the ability to change its mac address or to accept a second, "soft", mac address settable at run-time. YMMV.
Just to make it clear: my nic supports the changing of mac address. Running "ifconfig eth0 down hw ether 01:02:03:04:05:06 && eth0 up" manually does work.
This does _not_ change the embedded MAC address as it _cannot_ be permanently changed. This is so there never is a duplicate on the WWW. What you are doing is masquerading the address during your boot session.
Yeah, yeah, whatever... I don´t care if it´s called masquerading or painting or pooping, I just want to automatically change the mac address during boot! /JK -- "In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. Van De Snepscheut -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Kenneth Schneider wrote:
This does _not_ change the embedded MAC address as it _cannot_ be permanently changed. This is so there never is a duplicate on the WWW. What you are doing is masquerading the address during your boot session.
It doesn't matter about the WWW. It only matters on the local network. As soon as a packet hits the first router, the original MAC is discarded and replaced by another. This happens at every router along the route. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Wednesday 2007-01-10 at 14:43 -0500, James Knott wrote:
Kenneth Schneider wrote:
This does _not_ change the embedded MAC address as it _cannot_ be permanently changed. This is so there never is a duplicate on the WWW. What you are doing is masquerading the address during your boot session.
It doesn't matter about the WWW. It only matters on the local network. As soon as a packet hits the first router, the original MAC is discarded and replaced by another. This happens at every router along the route.
While that is true, ethernet was designed to work without tcp/ip routers, in a way that no two cards in the world have the same MAC, so that all can be connected to the same ethernet network - as far as MACs are concerned, of course. If I remember correctly, a part of the address is reserved for the maker, and the rest for the card - thus the maker can make only so many cards in its whole life. :-) - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFFpVDftTMYHG2NR9URAlHBAJ0R11Od/3w3t+3agcPi+9jWascnKQCeJj+W eBCkO9uz0K45txCBGcWTvAY= =I6bZ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlos E. R. wrote:
If I remember correctly, a part of the address is reserved for the maker, and the rest for the card - thus the maker can make only so many cards in its whole life. :-)
Unless they arrange for another block of numbers. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Probably/possibly a lame question, but why worry about changing MAC address? I thought the whole point was that a MAC address would make each NIC on the planet *unique*. The only occasions I've come across recently where users have wanted to change MAC address is where they're in a DHCP environment and want to get a new IP address (usually in order to circumvent any bandwidth restrictions applied to their old IP address) - -- Paul -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFFpPYEMgcRY6KQRjQRAn/eAJ99Oz1kX2zQz231lmTnNlOS/iNjnwCg0g3e HycWmTwev8XLZgvrYwj9G+g= =h0LK -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
onsdag 10 januari 2007 14:56 skrev Jan Karjalainen:
Just to make it clear: my nic supports the changing of mac address. Running "ifconfig eth0 down hw ether 01:02:03:04:05:06 && eth0 up" manually does work. As it reverts to the hard coded mac address after a reboot, I have to do this every time. So I´m looking for a setting somewhere where I can set the mac address to whatever I want during boot.
You can try and put that command in a script in /etc/sysconfig/network/if-up.d/. Any and all scripts here will be invoked after each interface is setup. They are passed parameters, if I remember correctly $2 is the interface name, so you can check that you only do your ifconfig hack on eth0. Kludgy, but it should work. -- !++ ! Lennart Börjeson, Cinnober Financial Technology AB ! Industrigatan 2A, S-112 46 STOCKHOLM ! Sverige/Sweden/Schweden/Suède ! phone:+46-8-50304717 gsm:+46-70-3394717 fax:+46-8-50304701 !-- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Jan Karjalainen wrote:
Lennart Börjeson wrote:
onsdag 10 januari 2007 14:36 skrev Jan Karjalainen:
Carlos E. R. wrote:
AFAIK, mac addresses are persistent, they don't change on reboots.
So if I run "ifconfig eth0 down hw ether 01:02:03:04:05:06 && eth0 up" it remembers this after a reboot? Won´t work on my machine (openSUSE 10.2)...
No, it means they never change at all... :-)
As some other poster noted, it is by no means sure that your particular interface can change its mac address at all. By design, mac addresses are intended to by fixed, unique, and permanent.
Some cards have the ability to change its mac address or to accept a second, "soft", mac address settable at run-time. YMMV.
Just to make it clear: my nic supports the changing of mac address. Running "ifconfig eth0 down hw ether 01:02:03:04:05:06 && eth0 up" manually does work. As it reverts to the hard coded mac address after a reboot, I have to do this every time. So I´m looking for a setting somewhere where I can set the mac address to whatever I want during boot.
You could add the command to /etc/init.d/boot.local. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Wednesday 2007-01-10 at 14:36 +0100, Jan Karjalainen wrote:
So if I run "ifconfig eth0 down hw ether 01:02:03:04:05:06 && eth0 up" it remembers this after a reboot? Won´t work on my machine (openSUSE 10.2)...
I didn't say it would "remember" those changes; that depends on the particular make of card. I said that the MAC is permanent. Usually. You change it, then next time reverts to the "permanent" MAC. If that command changes the mac for the time being it means that is stored in non permanent memory, and that you need to run the command every boot. As simple as that. There are means to automate boot scripts. Or, get the documentation for that card and see if it has an utility to make a permanent MAC change. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFFpQEitTMYHG2NR9URAknBAJ46VKrTl2gKKp+IwiZXrYPuDKyL6wCdE4Co /ondeSs83JhXWKKaI6cDetk= =r78F -----END PGP SIGNATURE-----
How can I make a persistent change of my nic´s mac address, so it keeps the new value after a reboot?
Add a line like ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx to your /etc/init.d/boot.local file -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
rmyster@gmail.com wrote:
How can I make a persistent change of my nic´s mac address, so it keeps the new value after a reboot?
Add a line like ifconfig eth0 hw ether xx:xx:xx:xx:xx:xx
to your /etc/init.d/boot.local file Thanks!
/JK -- "In theory, there is no difference between theory and practice. But, in practice, there is." - Jan L.A. Van De Snepscheut -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (10)
-
Carlos E. R.
-
David Mayr
-
Eberhard Roloff
-
James Knott
-
Jan Karjalainen
-
Kenneth Schneider
-
Lennart Börjeson
-
Paul Walsh
-
Rejaine Monteiro
-
rmyster@gmail.com