Skip to content

Idea: Script to assign RND MAC to bridge on startup if no admin-mac has been assigned #66

Closed Answered by eworm-de
netravnen asked this question in Q&A
Discussion options

You must be logged in to vote

This looks a bit over-complicated... This small snippet does the same, no?

:foreach Interface in=[ /interface/bridge/find where !admin-mac auto-mac ] do={
  /interface/bridge/set auto-mac=no admin-mac=([ :pick [ /interface/bridge/get $Interface mac-address ] 0 9 ] . [ $GetRandom20CharHex 2 ] . ":" . [ $GetRandom20CharHex 2 ] . ":" . [ $GetRandom20CharHex 2 ]); }

Some random thought on this:

  • The scripts are intended to be installed on the device, to be used regularly. I do not accept scripts for one-time configuration.
  • Most setups use a single bridge with vlan-filtering these days. Is it worth it having a script to set a mac address for that one interface?
  • Using random mac address brings…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@eworm-de
Comment options

Comment options

You must be logged in to vote
1 reply
@netravnen
Comment options

Answer selected by netravnen
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants