Welcome! Log In Create A New Profile

Advanced

NAS326 Debian 4.12 rootfs Unable to set MAC address

Posted by michael_kaeppler 
NAS326 Debian 4.12 rootfs Unable to set MAC address
January 02, 2019 02:00PM
Hi all,
the method described in https://forum.doozan.com/read.php?2,32146 for setting the MAC address in /etc/network/interfaces does not work for me.
My router's webinterface shows a different MAC address for the box each time it connects, thus assigning a different IP each time.

My /etc/network/interfaces:
auto lo eth0
iface lo inet loopback
iface eth0 inet dhcp hwaddress ether 9a:b3:25:9d:b9:51

ethtool -P eth0
Permanent address: 00:00:00:00:00:00

ifconfig shows:
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.178.48  netmask 255.255.255.0  broadcast 192.168.178.255
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 792  bytes 149319 (145.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 36
        inet6 fe80::78c3:32ff:fe2d:c80d  prefixlen 64  scopeid 0x20<link>
        ether 7a:c3:32:2d:c8:0d  txqueuelen 532  (Ethernet)
        RX packets 2480  bytes 421784 (411.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 820  bytes 152867 (149.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 36
which matches the mac address shown in the router's webinterface.

- michael
Re: NAS326 Debian 4.12 rootfs Unable to set MAC address
January 02, 2019 09:01PM
Michael,

This has been solved in the latest kernel.

Quote

Updated 05 May 2018:

Kernel linux-4.16.7-mvebu-tld-1 package has been uploaded.

New in this release:

- Add Thecus N2350 supports. Installation instruction for this box will be available in the near future.
- Add NAS326 MAC address device-tree supports (no need to hardcode the MAC addess anymore, it will be automatically detected by the kernel using u-boot env ethaddr).

So upgrade to the latest kernel and make sure your u-boot env has the correct MAC address.

fw_printenv ethaddr

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: NAS326 Debian 4.12 rootfs Unable to set MAC address
January 03, 2019 06:40AM
Thank you, bodhi.
Will try this today.
Am I right I also have to set the uboot envs
regarding NAND?
fw_setenv mtdparts 'mtdparts=pxa3xx_nand-0:2m(u-boot),2m(env),2m(config),15m(kernel1),110m(rootfs1),15m(kernel2),-(rootfs2)'/code]

What do you mean with "correct MAC address"?
The hardware MAC of eth0? (Which I was unable to figure out with ethtool...)
Re: NAS326 Debian 4.12 rootfs Unable to set MAC address
January 03, 2019 12:03PM
Michael,

> Am I right I also have to set the uboot envs
> regarding NAND?
>
> fw_setenv mtdparts
> 'mtdparts=pxa3xx_nand-0:2m(u-boot),2m(env),2m(config),15m(kernel1),110m(rootfs1),15m(kernel2),-(rootfs2)'

Correct.

> What do you mean with "correct MAC address"?
> The hardware MAC of eth0? (Which I was unable to
> figure out with ethtool...)

The MAC address can be found in stock boot log (uboot env ethaddr), or the box sticker on bottom of the case.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: NAS326 Debian 4.12 rootfs Unable to set MAC address
January 03, 2019 03:26PM
Works like a charm. Thank you!
However, I had some problems first establishing a ssh connection. Seems that my router did recognize
the box as the "old NAS326" (from the MAC address it already knew), therefore somehow blocking the connection..?
I had to remove the device from the "List of known devices", then it worked.

- michael
Re: NAS326 Debian 4.12 rootfs Unable to set MAC address
January 03, 2019 09:07PM
Michael,

Usually, the router needs a period of time to clear up the old MAC address. So you'd either remove it manually right away, or the router will remove it an eventually if the device is power off for an extended period.

-bodhi
===========================
Forum Wiki
bodhi's corner
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: