Juniper To MikroTik – OSPF Commands

About the Juniper to MikroTik Series

In the world of network engineering, learning a new syntax for a NOS can be daunting if you need a specific config quickly.  Juniper is a popular option for service providers/data centers and is widely deployed across the world. 

This is a continuation of the Rosetta stone for network operating systems series.  In this portion of the series we will be covering Open Shortest Path First, OSPF, version 2 which is a popular interior gateway protocol (IGP).

You can find the first article of the series Juniper to Mikrotik – BGP Commands here.

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

We conducted all testing on EVE-NG utilizing the topology seen below.

JunOS CommandMikroTik Command
show ospf neighborrouting ospf neighbor print
show ospf interfacerouting ospf interface print
show ospf overview briefrouting ospf instance print detail
show ospf databaserouting ospf lsa print
show route protocol ospfip route print where ospf=yes
show ospf route abrrouting ospf area-border-router print
show ospf route asbrrouting ospf as-border-router print
edit protocols ospf/routing ospf instance
set routing-options router-id ospf instance set 0 router-id=
set protocols ospf area interface lo0.0/routing ospf network add area=backbone network=
set protocols ospf area interface ge-0/0/0.0 /routing ospf network
add area=backbone network=
set protocols ospf area interface ge-0/0/0.0 interface-type p2p
set protocols ospf area interface ge-0/0/0.0 hello-interval 1
set protocols ospf area interface ge-0/0/0.0 dead-interval 4
/routing ospf interface add dead-interval=4s hello-interval=1s interface=ether1 network-type=point-to-point
This image has an empty alt attribute; its file name is IPA-MikroTik-2.png

Examples of the commands above

This first command will show you all of the routers you have an OSPF neighbor adjacency with.

[[email protected]] > routing ospf neighbor print

[email protected]> show ospf neighbor

This next command lists all of the interface enabled for OSPF as well as some basic information such as cost, priority, and network type. Juniper displays slightly different information such as area, DR info, and number of neighbors. Juniper does not have the concept of a network statement so interfaces explicitly configured for OSPF will appear here. You can optionally add the detail command on JunOS for more information.

[[email protected]] > routing ospf interface print

[email protected]> show ospf interface

This command will list all of the details regarding the OSPF instances running on the router.

[[email protected]] > routing ospf instance print

[email protected]> show ospf overview brief

This command lists all of the OSPF LSAs as well as some details about them.

[[email protected]] > routing ospf lsa print

[email protected]> show ospf database

This next command will show all of the OSPF routes in the routing table.

[[email protected]] > ip route print where ospf=yes

[email protected]> show route protocol ospf

This next set of commands will show you the area-border-routers or autonomous-system-boundary routers. We injected a connected route into OSPF to generate a type-5 LSA for an external route.

[[email protected]] > routing ospf area-border-router print

[[email protected]] > routing ospf as-border-router print

[email protected]> show ospf route abr

[email protected]> show ospf route asbr

Mikrotik OSPF configuration

Juniper OSPF configuration

More Juniper to MikroTik articles are on the way!

This article covered some of basic and common OSPF commands. Check back in the future for examples of more advanced features and capabilities. Also stay tuned for our upcoming Juniper to MikroTik MPLS command translation.

One thought to “Juniper To MikroTik – OSPF Commands”

Leave a Reply

Your email address will not be published. Required fields are marked *