In the world of network engineering, learning a new syntax for a NOS can be overwhelming if you need a specific set of config in a short timeframe. The command structure for RouterOS can be a bit challenging if you are used to Cisco CLI commands.
If you’ve been in networking for a while, there’s a good chance you started with Cisco gear and so it is helpful to draw comparisons between the commands, especially if you are trying to build a network with a MikroTik and Cisco router.
This is the second post in a series that creates a Rosetta stone essentially between IOS and RouterOS. We plan to tackle other command comparisons like MPLS, VLANs and basic operations to make it easier for network engineers trained in Cisco IOS to successfully implement Mikrotik / RouterOS devices.
Click here for the first article in this series – “Cisco to MikroTik BGP command translation”
While many commands have almost the exact same information, others are as close as possible. Since there isn’t always an exact match, sometimes you may have to run two or three commands to get the information needed.
Using EVE-NG for testing
In the last article, we used GNS3 to emulate both Cisco IOS and RouterOS so we could compare the different commands and ensure the translation was as close as possible. For this article, we decided to use EVE-NG as it’s becoming more and more popular for network emulation.
Network for Basic commands
|Cisco command||MikroTik Command|
|show ip ospf neighbor||routing ospf neighbor print|
|show ip ospf interface||routing ospf interface print|
|show ip ospf 1||routing ospf instance print detail|
|show ip ospf database||routing ospf lsa print|
|show ip route ospf||ip route print where ospf=yes|
|show ip ospf rib||routing ospf route print|
|show ip ospf border-routers||routing ospf area-border-router print|
|show ip ospf border-routers||routing ospf as-border-router print|
|Cisco(config)#router ospf 1||/routing ospf instance|
|Cisco(config-router)#router-id 203.0.113.1||/routing ospf instance set 0 router-id=203.0.113.2|
|Cisco(config-router)#network 203.0.113.1 0.0.0.0 area 0||/routing ospf network add area=backbone network=203.0.113.2/32|
|Cisco(config-router)#network 203.0.113.128 0.0.0.7 area 0||/routing ospf network
add area=backbone network=203.0.113.128/29
Cisco(config-if)# ip ospf network point-to-point
Cisco(config-if)# ip ospf dead-interval 4
Cisco(config-if)# ip ospf hello-interval 1
|/routing ospf interface add dead-interval=4s hello-interval=1s interface=ether1 network-type=point-to-point
Examples of the MikroTik RouterOS commands from the table above
[admin@MikroTik] > routing ospf neighbor print
This is a quick way to show all the OSPF neighbors the router is adjacent to.
[admin@MikroTik] > routing ospf interface print
This command lists all of the interfaces configured for OSPF, costs, authentication and whether or not the interface is passive. Unlike Cisco, MikroTik’s default behavior is to dynamically create an OPSF interface when a network statement is added which is what the ‘D’ flag stands for.
[admin@MikroTik] > routing ospf instance print detail
This command lists the details for all OSPF instances on the router including: router-id, redistribution settings, default metrics and filters applied in and out.
[admin@MikroTik] > routing ospf lsa print
This command lists all OPSF LSAs along with sequence number, originator and age.
[admin@MikroTik] > ip route print where ospf=yes
This command allows you to list all of the OSPF routes in the routing table. Unlike Cisco, RouterOS will list routes that aren’t active in the routing table instead of just in the RIB like Cisco.
[admin@MikroTik] > routing ospf route print
This is a quick way to show the routes that OSPF is aware of on the router, the state of the route, cost and the gateway/interface.
[admin@MikroTik] > routing ospf area-border-router print
Using this command will print all of the ABRs and areas the router is aware of.
[admin@MikroTik] > routing ospf as-border-router print
This command will list all ASBRs for the router.
[admin@MikroTik] > routing ospf export
Here is an example of a basic MikroTik OSPF config with a few options turned on like a standard area defined as well as redistribution of connected routes.
More Cisco to MikroTik articles are on the way!
This article covers most of the common OSPF commands. Some of the more advanced config and commands including OSPF flitering, Virtual and Sham Links will be tackled in a separate article. MPLS and VLANs are also on the list. Stay tuned for more!