![]() ![]() ![]() This script is required as RouterOS does not allow hostnames to be used in the NTP configuration. This script resolves the hostnames of two NTP servers, compares the result with the current NTP settings and changes the addresses if they're different. :set message message] Īfter new entry is detected, it is saved in "message" variable, which you can use later to parse log message, for example, to get pppoe clients mac address.Īllow use of ntp.org pool service for NTP Now we can write a script to detect if new entry is added. :for i from=( - 1) to=0 do= while ($lineEnd /log print where buffer=pppoeġ3:11:08 pppoe,info PPPoE connection established from 00:0C:42:04:4C:EE This script is useful if you need ip address without netmask (for example to use it in firewall), but " /ip address get address" returns ip address and netmask. :put "ip address $currentIP changed to $newIP" This script will compare if dynamic IP address is changed. Sometimes provider gives dynamic IP addresses. ![]() In v3.x it is not possible to create file directly, however there is a workaround Script examples used in this section were tested with the latest 3.x version. This section contains some useful scripts and shows all available scripting features. 2.3 Include custom function in another script. ![]() 1.14 Other scripts known to work with latest v3.x.1.12 Allow use of ntp.org pool service for NTP.1.8 Check bandwidth and add limitations.1.6 Generate backup and send it by e-mail.1.5 Write simple queue stats in multiple files.1.2 Check if IP on interface have changed. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |