Compact Export on Mikrotik

Compact Export on Mikrotik

 

Ever exported a config from RouterOS and saw tons of lines of garbage you didn't need or sometimes even recognize? If so, you will love this! Starting from v5.12 compact export was added. It allows to export only part of configuration that is not default RouterOS config.

      
[admin@SXT-ST] /routing ospf> export compact
/routing ospf instance
set [ find default=yes ] redistribute-connected=as-type-1
/routing ospf interface
add disabled=yes interface=wlan1 network-type=point-to-point
/routing ospf network
add area=backbone network=10.255.255.36/32
add area=backbone disabled=yes network=10.5.101.0/24
add area=backbone network=10.10.10.0/24
[admin@SXT-ST] /routing ospf>

    

Compact export introduces another feature that indicates which part of config is default on RouterOS and cannot be deleted. As in example below "*" indicates that this OSPF instance is part of default configuration.

      
[admin@SXT-ST] /routing ospf instance> print
Flags: X ? disabled, * ? default
0 * name=?default? router-id=0.0.0.0 distribute-default=never
redistribute-connected=as-type-1 redistribute-static=no
redistribute-rip=no redistribute-bgp=no redistribute-other-ospf=no
metric-default=1 metric-connected=20 metric-static=20 metric-rip=20
metric-bgp=auto metric-other-ospf=auto in-filter=ospf-in
out-filter=ospf-out

    

In version 6 compact is now the default. If you want more exported, use export verbose.

 
    • Related Articles

    • Using MikroTik LHG as a UE With a Baicells eNodeB

      If you want to use a MikroTik LHG CPE as a UE with your Baicells eNodeB, this blog post explains how.  Also shown is the tricky nature of inserting the SIM Card in the LHG. LEARN MORE
    • Mikrotik Mass Updater

        I converted an old perl backup utility written by Phillip Hutchison that was on the Mikrotik forums to make it a mass update utility for Mikrotik. There are 2 versions (Link is at bottom) version1 - "massupdater.pl" that uses only 1 username and ...
    • Cloning MikroTik Routers, Quick and Easy

      If you are wanting to configure multiple MikroTik routers with the same configuration, or to copy a config from one router to another, the best way is to use an export.  The export command dumps all of the configuration commands you added to a router ...
    • Mikrotik Background Scan for Wireless

      Beginning with Mikrotik version 6.35, the availability of Background Scan on the wireless interface.  From the wiki: "The scan command allows you to see available AP's in the frequency range defined in the scan-list. Using the scan command the ...
    • How to Upgrade MikroTik Software

        It is suggested to always keep your RouterOS installation up to date, MikroTik always keeps adding new functionality and improving performance and stability by releasing updates. RouterOS versions are numbered sequentially, when a period is used to ...