u-boot soft and hard ethernet addresses

classic Classic list List threaded Threaded
3 messages Options
DH
Reply | Threaded
Open this post in threaded view
|

u-boot soft and hard ethernet addresses

DH
Date: Tue, 14 Nov 2017 10:31:56 +0100
From: Mike Looijmans <[hidden email]>
To: Wolfgang Denk <[hidden email]>, Prabhakar Kushwaha
    <[hidden email]>
Cc: "[hidden email]" <[hidden email]>,
    "[hidden email]" <[hidden email]>
Subject: Re: [U-Boot] ethernet: ROM MAC address vs env variable MAC
    address
Message-ID: <[hidden email]>
Content-Type: text/plain; charset="utf-8"; format=flowed

On 13-11-17 20:49, Wolfgang Denk wrote:

> Dear Prabhakar,
>
> In message <[hidden email]> you wrote:
>>
>> Why ROM MAC address getting overwritten by environment env MAC address.
>
> Because in U-Boot we give the user the freedom to do what he
> needs/wants to do.  Usually the environment value gets initialized
> from the value in the ROM, so there is no difference anyway. But if
> the user wants a specific setting, he can change it.
>
>> MAC address is something unique and assigned to a particular device. So one should never change its MAC address.
>
> U-Boot follows good old UNIX style here:
>
> "UNIX was not designed to stop you from doing stupid things,  because
> that would also stop you from doing clever things."      - Doug Gwyn

Many board manufacturers "assign" this unique MAC address by printing it on a
sticker and sticking that on the board somewhere. It's pretty darn hard to
read a printed sticker in software, so we have to revert to solutions that
actually work.

In the "clever things" department, protocols like IPv6 merrily broadcast your
MAC address across gateways on the big bad internet, so if you value your
privacy, you'll appreciate the possibility to change your MAC address at will.



Kind regards,

Mike Looijmans
System Expert

TOPIC Products
Materiaalweg 4, NL-5681 RJ Best
Postbus 440, NL-5680 AK Best
Telefoon: +31 (0) 499 33 69 79
E-mail: [hidden email]
Website: www.topicproducts.com

Please consider the environment before printing this e-mail

P
to get the real hardware address used delete the variable ethaddr before saving the environment.
This forces the board code the load the actual hardware address, if there is one, into the environment at start time.
Otherwise you will always boot with the Ethernet address from the first time the environment was saved.

Which make the environment not portable to multiple boards.

 Duncan Hare

714 931 7952
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
Reply | Threaded
Open this post in threaded view
|

Re: u-boot soft and hard ethernet addresses

Wolfgang Denk
Dear Duncan,

In message <[hidden email]> you wrote:
>
> Many board manufacturers "assign" this unique MAC address by printing it on a
> sticker and sticking that on the board somewhere. It's pretty darn hard to
> read a printed sticker in software, so we have to revert to solutions that
> actually work.

Such solutions usually include a barcode reader attached to some PC
which is used when you commission the board.  And yes, in this case
it is mandatory that the MAC address(es) stored in the environment
(which gets initialized as part of the aforementioned commissioning
procedure) takes precedence over any MAC address(es) that might be
stored somewhere in the hardware.

> In the "clever things" department, protocols like IPv6 merrily broadcast your
> MAC address across gateways on the big bad internet, so if you value your
> privacy, you'll appreciate the possibility to change your MAC address at will.

Right, this is another of a list of reasons why changing the MAC
address makes a lot of sense.

Best regards,

Wolfgang Denk

--
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [hidden email]
Research is what I'm doing when I don't know what I'm doing.
                                                 -- Wernher von Braun
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot
DH
Reply | Threaded
Open this post in threaded view
|

Fw: u-boot soft and hard ethernet addresses

DH
Dear Duncan,

In message <[hidden email]> you wrote:
>
> Many board manufacturers "assign" this unique MAC address by printing it on a
> sticker and sticking that on the board somewhere. It's pretty darn hard to
> read a printed sticker in software, so we have to revert to solutions that
> actually work.

Such solutions usually include a barcode reader attached to some PC
which is used when you commission the board.  And yes, in this case
it is mandatory that the MAC address(es) stored in the environment
(which gets initialized as part of the aforementioned commissioning
procedure) takes precedence over any MAC address(es) that might be
stored somewhere in the hardware.

> In the "clever things" department, protocols like IPv6 merrily broadcast your
> MAC address across gateways on the big bad internet, so if you value your
> privacy, you'll appreciate the possibility to change your MAC address at will.

Right, this is another of a list of reasons why changing the MAC
address makes a lot of sense.

Best regards,

Wolfgang Denk

--

Wolfgang
I agree. Some Ethernet adapters/chip/cell libraries have burnt in Ethernet addresses.
Some do not.
I'm not saying anything is good or bad, I am,  stating , if one wants to use the burnt in address,
if it exists, there is a mechanism in U-Boot to do so.

I carefully did not state an opinion. Having a soft coded mac address makes replication of software
on units complex. Having a burnt in hardware address makes software replication simple, but addscomplexity to hardware manufacturing.

Having stated that, there has to be a unique address for the device somewhere, either in the
hardware or software. If in hardware the manufacturer provides the address, If in u-boot the
unique address has to be managed by the customer, and passed to the OS launched by u-boot.

IP is the second network architecture which I've used on which expanded its address space,  the first wasIBM's SNA. The expansion in both architectures was curtailed, or delayed, by having gateways, in IP's case NAT gateways,
in IBM's SNA it was SNI - SNA Network Interconnect.

Because of the extensive use of gateways, the risk of a device's mac address being braodcast to, is hopefully,limited by the gateway. If it is not then one need to buy a better gateway which protect one's privacy.

Regards
 Duncan Hare

714 931 7952


   

   
_______________________________________________
U-Boot mailing list
[hidden email]
https://lists.denx.de/listinfo/u-boot