MAC and IP addresses change on every reboot

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

MAC and IP addresses change on every reboot

1,179 Views
sp_qoriq
Contributor III

I have an LS2088ardb and running the bits (SDK-v2.0-1703) from fsl-image-core installed on a SATA disk (not ramdisk). I have added following lines to /etc/network/interfaces:

auto ni0
iface ni0 inet dhcp

However, on every reboot the network interface gets a new ip address. I also noticed that the HWaddr changes on every reboot.

After first reboot:

ni0 Link encap:Ethernet HWaddr 4e:70:bb:65:ab:8c
inet addr:172.29.10.71 Bcast:172.29.10.255 Mask:255.255.255.0
inet6 addr: fe80::4c70:bbff:fe65:ab8c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:10701 errors:0 dropped:40 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1668361 (1.5 MiB) TX bytes:1332 (1.3 KiB)

After 2nd reboot:

ni0 Link encap:Ethernet HWaddr 9a:9f:2c:40:51:f0
inet addr:172.29.10.38 Bcast:172.29.10.255 Mask:255.255.255.0
inet6 addr: fe80::989f:2cff:fe40:51f0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:931 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:160286 (156.5 KiB) TX bytes:1332 (1.3 KiB)

Any idea why this is happening and how to prevent it?

thanks,

-Shiva 

0 Kudos
3 Replies

951 Views
cyrilstrejc
Contributor III

I do not have experience with 2088ardb, but your MAC addresses are locally administered addresses:

MAC address - Wikipedia 

From my experience, the random locally administrated address is select by NIC driver if the MAC addresss is not set by another way - typically in u-boot environment, but I do not know, if the interface ni0 is internal NIC in the LS2088 SOC or whatever. Typically, internal NICs have MAC address set in u-boot environment, variables ethaddreth1addr, eth2addr, or similar.

Since the IP addresses are provided by your DHCP server, the IP address your board is receiving depends on the DHCP server settings. If your DHCP server is not under your maintenance, better is to use fixed IP address during development, but if you are lucky with static MAC address settings, DHCP server will probably provides the same IP address every reboot.

0 Kudos

951 Views
sp_qoriq
Contributor III

Thanks for the reply.

MAC addresses are set in the u-boot environment as follows:

eth1addr=00:e0:0c:00:77:01
eth2addr=00:e0:0c:00:77:02
eth3addr=00:e0:0c:00:77:03
eth4addr=00:e0:0c:00:77:04
eth5addr=00:e0:0c:00:77:05
eth6addr=00:e0:0c:00:77:06
eth7addr=00:e0:0c:00:77:07

However, the HWAddress is something completely different than what is set in the u-boot. Where is the driver (fsl_dpaa2_eth) getting this value from?

ni0 Link encap:Ethernet HWaddr 6a:c9:8c:b9:43:16
inet addr:172.29.10.131 Bcast:172.29.10.255 Mask:255.255.255.0
inet6 addr: fe80::68c9:8cff:feb9:4316/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:90 errors:0 dropped:1 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:13333 (13.0 KiB) TX bytes:648 (648.0 B)

Nothing to look in the DHCP server because, as far as it is concerned a completely new device is requesting for an IP address and hence the different IP address on each reboot.

0 Kudos

951 Views
sp_qoriq
Contributor III

Bump!! Anyone?

This is happening on a 2088ardb board with standard build images from the SDK. I'm surprised nobody else has run into this. Any NXP engineers looking at these threads on the forums?

0 Kudos