como puedo poner escrip para saltar entre los portales . necesito de su ayuda
este es el script que se le pone a cada interfaz wan virtual para que reanude y cambie la maq:
## Define chars table
:global chArray "0ABCDEF0123456789ABCDEF012345ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF";
## Define WAN interface
:local WanInterface "wlan1";
## Define others
:local CurrentTime [/system clock get time];
:local CurrentCpuLoad [/system resource get cpu-load];
:local CurrentUptime [/system resource get uptime];
#get counters
:local ch1num 0;
:local ch2num 0;
:local ch3num [:tonum [
ick $CurrentTime 6 8] ];
:local ch4num [:tonum [
ick $CurrentTime 3 5] ];
:local ch5num [:tonum [
ick $CurrentTime 0 2] ];
:local ch6num [:tonum [
ick $CurrentTime 7 8] ];
:local ch7num [:tonum [
ick ($CurrentCpuLoad + 2)] ];
:local ch8num [:tonum [
ick ($CurrentCpuLoad / 2)] ];
:local ch9num [:tonum [
ick $CurrentUptime 7 8] ];
:local ch10num [:tonum [
ick $CurrentUptime 6 8] ];
:local ch11num [:tonum [
ick $CurrentUptime 3 5] ];
:local ch12num [:tonum [
ick $CurrentCpuLoad] ];
## Get now MacAddress
:local OldMAC [/interface wireless get $WanInterface mac-address];
## Generate Random MAC Address
:local RndMAC ( \
[:tostr [
ick $chArray $ch1num]].[:tostr [
ick $chArray $ch2num]].":". \
[:tostr [
ick $chArray $ch3num]].[:tostr [
ick $chArray $ch4num]].":". \
[:tostr [
ick $chArray $ch5num]].[:tostr [
ick $chArray $ch6num]].":". \
[:tostr [
ick $chArray $ch7num]].[:tostr [
ick $chArray $ch8num]].":". \
[:tostr [
ick $chArray $ch9num]].[:tostr [
ick $chArray $ch10num]].":". \
[:tostr [
ick $chArray $ch11num]].[:tostr [
ick $chArray $ch12num]] \
);
:if ( [:len $RndMAC] = 17) do={
:log warning "Change MAC to random ($OldMAC -> $RndMAC)";
:do {
/interface wireless set $WanInterface mac-address=$RndMAC;
:delay 4;
:local NewMAC [/interface wireless get $WanInterface mac-address];
:if ( $NewMAC = $RndMAC) do={
:log info "MAC address on \"$WanInterface\" changed successfully! New MAC is $NewMAC";
} else={
:log warning "MAC address was NOT changed (now is $NewMAC)";
}
} on-error={
:log warning "Failed changing MAC address on \"$WanInterface\" to $RndMAC";
};
} else={
:log warning "Wrong random MAC ($RndMAC) length";
}