EDIT: Ignore issue #2 about /tool e-mail listed here, I found the cause of it, described in the next post below this one.
I just got RANCID 2.3.8 working which has built in Mikrotik support. It’s working well with the exception of some spurious changes that show up in the configuration from time to time. I haven’t dug in too deep but I believe the output in question comes from the /export command. There are 2 differences that pop up on some runs of /export:
- The /port section , which we never touch is sometimes present and sometimes not.
- A scheduled script runs to send a backup file via email. tool-email config shows last use status… or not
Here’s an example of #1:
Index: configs/myrouter
===================================================================
retrieving revision 1.10
diff -U 4 -r1.10 myrouter
@@ -50,8 +50,11 @@
/ip hotspot user profile
set [ find default=yes ] idle-timeout=none keepalive-timeout=2m mac-cookie-timeout=3d
/ip pool
add name=vpn-pool ranges=10.1.1.240-10.1.1.248
+ /port
+ set 0 name=serial0
+ set 1 name=serial1
/ppp profile
add bridge=vpn-bridge change-tcp-mss=yes local-address=vpn-pool name=ovpn remote-address=vpn-pool
/routing ospf area
add area-id=0.0.0.1 name=area1
Sometimes those three /port lines will be missing, resulting in an email and diff file (showing -'s instead of +'s of course), then some time later they reappear and I get another email showing they were added back. Rancid runs every hour to check and diff the config of the router.
Here’s an example of the diff for #2
Index: configs/myrouter
===================================================================
retrieving revision 1.11
diff -U 4 -r1.11 myrouter
@@ -435,9 +435,9 @@
/system script
add name=backupscript policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api source="/system backup save name=myrouter"
add name=mailscript policy=ftp,reboot,read,write,policy,test,winbox,password,sniff,sensitive,api source="/tool e-mail send file=myrouter.backup to=mtbu@example.com subject=[/system identity get name]"
/tool e-mail
- set address=10.1.1.10 from=<myrouter@example.com> last-status=succeeded port=587
+ set address=10.1.1.10 from=<myrouter@example.com> port=587
/tool graphing interface
add allow-address=10.1.0.0/20
/tool graphing resource
add allow-address=10.1.0.0/20
as you can see, in this case the “last-status” argument for the /tool e-mail is disappearing and reappearing.
I checked the uptime on this router and it’s over 16 days, so it’s not rebooting and nobody is making any changes to the router either. I realize 6.x change the /export default mode to “compact”, but then my question is: Why does the /port config, which is untouched and still at the defaults, ever show up at all?
For the /tool e-mail config… why does last-status seem to time-out and dissappear?
RANCID has or can be made to have a method of filtering out trivial changes like this, but I thought I’d ask about them here and see if anyone had any ideas why RouterOS is acting like this.
Thank you in advance!