Questions about generating valid random MAC?

Forget the endless writings of @vingjfg who doesn’t read my posts,
so he doesn’t know that simply 2 lines are enough to generate MAC address without complicating things too much…

{
:local rndMAC "$[:rndstr length=1 from="0123456789abcdef"]$[:rndstr length=1 from="26ae"]"
for x from=0 to=4 do={:set rndMAC "$rndMAC:$[:rndstr length=2 from="0123456789abcdef"]"}
:put $rndMAC
}

It’s clear that you asked for a script that works with v6, so obviously, all features on v7 shouldn’t be used.

Like this for v7
http://forum.mikrotik.com/t/routeros-7-interface-random-mac-address/160723/8
This is for v6 except this use 2/6/A/E as requested.
:global rndMAC do={
:local rnd0F do={
:local arr0F [:toarray “0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F”]
:if ($1 = 2) do={:set arr0F [:toarray “2,2,2,2,6,6,6,6,A,A,A,A,E,E,E,E”]}
/system resource irq
:local tmpsum 0
:foreach i in=[find] do={:set tmpsum ($tmpsum + [get $i count])}
:delay 00:00:00.4
:return ($arr0F->($tmpsum % 16))
}
:local rnd “$[$rnd0F]$[$rnd0F 2]”
:for x from=0 to=4 step=1 do={:set rnd “$rnd:$[$rnd0F]$[$rnd0F]”}
:return $rnd
}

:put [$rndMAC]