Jump to content
    

Откуда малина берет MAC адрес?

К LAN9514-JZX eeprom с MACом не подключена. Откуда малина берет макадрес?

Share this post


Link to post
Share on other sites

If a properly configured EEPROM is not detected, it is the responsibility of the Host LAN Driver to set the IEEE addresses.

Share this post


Link to post
Share on other sites

4 hours ago, megajohn said:

If a properly configured EEPROM is not detected, it is the responsibility of the Host LAN Driver to set the IEEE addresses.

Так и где Host LAN Driver берёт MAC адреса?

Share this post


Link to post
Share on other sites

Вариантов много - это может быть случайный адрес,  он может извлекаться из efuse на разных этапах и т.п.

Начните с dmesg | grep lan95 (название драйвера не помню, можно grep -i mac)

Share this post


Link to post
Share on other sites

3 hours ago, aaarrr said:

Вариантов много - это может быть случайный адрес,  он может извлекаться из efuse на разных этапах и т.п.

Начните с dmesg | grep lan95 (название драйвера не помню, можно grep -i mac)

Сорри, я ниразу не малиновый программист, dmesg | grep мне ниочём не говорит. Просто хочу понять(спросить неукого).

У одной и той же малины один и тот же MAC при подключении в разные сети. При том у разных малин с идентичными "прошивками" разные MACи. Вопрос будет ли МАС всегда один и тот же или может меняться при опдейте или ещё каких-то ситуациях?

 

Share this post


Link to post
Share on other sites

Если адрес при перезагрузке остаётся один и тот же, то вряд ли изменится и при апдейте. Можете загуглить "oui lookup" и пробить первые три байта адреса - это код производителя. Возможно, наведет на мысли об источнике.

Share this post


Link to post
Share on other sites

Спасибо! Нверно останется тайной откуда он берется :wink2:

MAC Address/OUI Vendor {Company}

B827EB81666E

Raspberry Pi Foundation  

Share this post


Link to post
Share on other sites

9 часов назад, skripach сказал:

Спасибо! Нверно останется тайной откуда он берется :wink2:

Зная mac можно просто поискать его или часть в текстах установленного линукса.

Share this post


Link to post
Share on other sites

16 часов назад, skripach сказал:

Спасибо! Нверно останется тайной откуда он берется :wink2:

   

что-то типа:

"Currently the MAC address generated on the Pi simply concatenates the OUI with the last 24 bits of the randomly-generated serial number embedded in the SoC OTP. This is passed through the command line to Linux which has a driver-specific hack to set the MAC address on the attached LAN9512 (there are problems with this approach, but it suffices for now)."

https://www.raspberrypi.org/forums/viewtopic.php?t=264095

и там по треду есть упоминания о OTP для custom MAC https://www.raspberrypi.org/forums/viewtopic.php?t=231700

серийник процессора (у меня rPi3) можно посмотреть командой

cat /proc/cpuinfo

у меня в системе совпадает

Share this post


Link to post
Share on other sites

Кошмар, крохоборство. А продали уже заметно поболее 16,7 млн.

Share this post


Link to post
Share on other sites

3 hours ago, Jury093 said:

Currently the MAC address generated on the Pi

Спасибо! Что-то такое я и предпологал.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...