On 27.11.2017 02:49, Freek de Kruijf wrote:
> Op zondag 26 november 2017 18:52:01 CET schreef Matwey V. Kornilov:
>> Currently, I have two issues. MAC addr are different after each reboot.
>> Link auto-detection either not work or not supposed to work.
>
> You can edit a file /etc/systemd/system/[email protected] with following
> content:
> [Unit]
> Description=MAC Address Change %I
> Wants=network-pre.target
> Before=network-pre.target
> BindsTo=sys-subsystem-net-devices-%i.device
> After=sys-subsystem-net-devices-%i.device
>
> [Service]
> Type=oneshot
> ExecStart=/usr/sbin/ip link set dev %i address <MAC_address>
> ExecStart=/usr/sbin/ip link set dev %i up
>
> [Install]
> WantedBy=multi-user.target
> --------------------
> Where you enter a MAC address at <MAC_address> you saw previously.
> After that you give the command (on one line) in case the device name for the
> Ethernet device is eth0:
> ln -s /etc/systemd/system/[email protected] /mnt/ll/etc/systemd/system/multi-
> user.target.wants/[email protected]
>
It seems that MAC issue is related to u-boot. When I touch network
commands in u-boot console, then MAC addr is set from ${ethaddr}
variable, which is read from EEPROM (where it is a right place to store
MAC actually).
--
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]