I am new to using MikroTik routers and looking for some help if possible. I have created a virtual wireless network 2.4 & 5 Ghz for users who use our premises during the week but like to have it only available between 8-30am & 5pm Monday to Friday. Any help would be greatly appreciated.
Thanks
You could do this several ways…
A simple way to “learn” or “start” would be to make 2 scripts and 2 schedules.
One enables the INTERFACES
One disables the INTERFACES
What are the names of the virtual interfaces?
gotsprings thanks for your reply.
The virtual interfaces are called Training 2.4GHz & Training 5GHz, can it be done using a bridge?
Thanks
What gotspings mean is, set up your AP as you want (Wifi and SSID names etc) and then everything works you
add the switch on off function for Wifi i/f.
In system/Scheduler you can run scripts at certain time of the day.
Just put in the command you would enter into a terminal like below into the body of the schedule tab:
/interface wireless set MY_WIFI_IF disabled=yes
to disable it
/interface wireless set MY_WIFI_IF disabled=no
to enable it
Assign time of the day to run them as you want. With this the Wifi network will not work outside your hours.
For more control/granularity, use the “wireless”/ “Access List”.
In the Wifi interface tab uncheck default authenticate, now you will need “access list entry” that someone can connect
to your network.
If you want to block everybody, just create one, leave all fields empty (you can also select which Wifi i/f you want) and assign
at the bottom of the tab under “TIME” the day and individual times of the day to allow access.
Then this would kill it
:log info "Turning OFF Training."
/interface disable [find name~"Training"]
:log info "Training DOWN."
This would bring it back up.
:log info "Turning ON Training."
/interface enable [find name~"Training"]
:log info "Training UP."
You can get fancy with if then and time of day…
But a Scheduler Should be your first thing you figure out…
Blocking via firewalls with time is easy… but its way cooler to have the SSID Turn Off.
gotsprings,
Thanks for the scripts they done exactly what I wanted.
Thanks
Figured this out when I was working on caps-man. When you have to disable the SSID across more than one radio… that code made life much easier.
gotsprings,
The script and schedule work fine but I have an issue with the DHCP server linked to the bridge for the SSID’s when the off script runs the text for the DHCP Server goes red italic, when the on script runs it stays red but is no longer italic.
Any advise would be helpful.
Thanks
Connect a client and it will turn black?