LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Mac address on linux server (https://www.linuxquestions.org/questions/linux-networking-3/mac-address-on-linux-server-4175725336/)

1s440 05-23-2023 05:55 AM

Mac address on linux server
 
Hi all,

I would need to change an mac address for one of the ip on the centos server, before changing the mac address, i would need to test. How can i test it?

pan64 05-23-2023 06:16 AM

on another host? in a vm? what do you want to test? You can either change that or not.

1s440 05-23-2023 06:19 AM

Quote:

Originally Posted by pan64 (Post 6432435)
on another host? in a vm? what do you want to test? You can either change that or not.


I used the below steps to change , but i think this is temporary . How can i test if the mac is working or not

Code:


$ sudo ifconfig eth0 down

$ sudo ifconfig eth0 hw ether AA:BB:CC:DD:EE:FF

$ sudo ifconfig eth0 up


TB0ne 05-23-2023 08:48 AM

Quote:

Originally Posted by 1s440 (Post 6432436)
I used the below steps to change , but i think this is temporary . How can i test if the mac is working or not
Code:

$ sudo ifconfig eth0 down
$ sudo ifconfig eth0 hw ether AA:BB:CC:DD:EE:FF
$ sudo ifconfig eth0 up


It's temporary, unless you configure it in the adapter config file, as you would with a static address/route/other-network-things. And you 'test' it by looking at the interface with "ip address" and looking at the MAC address. Again, did you do ANY research of your own??? Like putting "how to change mac address in linux permanently" into Google?
https://srijit.com/how-to-change-mac...s-in-centos-7/


All times are GMT -5. The time now is 12:46 AM.