random MAC address

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

random MAC address

1,133 Views
fabio_poiatti
Contributor III

I have eth0 works but  ... how is possible to have fixed MAC? where the MAC in written in the boot?

 

We have this message during the startup ...

 

fec 2188000.ethernet: 2188000.ethernet supply phy not found, using dummy regulator
pps pps0: new PPS source ptp0
fec 2188000.ethernet (unnamed net_device) (uninitialized): Invalid MAC address: 00:00:00:00:00:00
fec 2188000.ethernet (unnamed net_device) (uninitialized): Using random MAC address: ce:10:be:1d:a5:c0
libphy: fec_enet_mii_bus: probed
fec 2188000.ethernet eth0: registered PHC device 0
PPP generic driver version 2.4.2

 

 

Thanks

Fabio

2 Replies

1,015 Views
b36401
NXP Employee
NXP Employee

You can use ifconfig to set exact MAC address:
# ifconfig eth0 hw ether 08:01:02:03:04:05

I mean you can add such command into startup.

1,015 Views
imed_jedidi
Contributor I

Hi Victor,

I have the same request. Is it the best solution to do it?

With this command, The device will start with a random Ethernet and after that Ethernet a ddress will be changed to selected on.

Does this behaviour acceptable in front of DHCP servers?

BR,

Imed

0 Kudos