This demonstration shows how to successfully implement OSPF on a network topology involving three Mikrotik routers. I will share some of the features of OSPF as well as the practical implementation of OSPF on Mikrotik routers.
The Open Shortest Path First is an industry standard routing protocol that supports equipment from different vendors. It is a link state routing protocol that supports variable length subnetmask (VLSM), manual route summarization, authentication, etc. It has a default administrative distance of 110 and uses cost to determine the shortest path to a destination network. Unlike other internal routing protocols, ospf keeps all possible routes to a destination network. This is why ospf is processor-intensive. Consider the network topology below:
The objective of this lab is to successfully implement OSPF on the above displayed network topology to provide full connectivity such that each router’s routing table is updated with ospf routes to all available destinations.
I will commence my implementation on router 1. First, I will assign IP addresses. See below:
/ip address
add interface=ether1 address=192.168.0.1/30 comment=”connection_to_router2”
add interface=ether2 address=192.168.1.1/28 comment=”LAN”
/ip address
add interface=ether1 address=192.168.0.2/30 comment=”connection_to_router1”
add interface=ether2 address=192.168.0.5/30 comment=”connection_to_router3”
add interface=ether3 address=192.168.1.17/28 comment=”connection_to_LAN”
/ip address
add interface=ether1 address=192.168.0.6/30 comment=”connection_to_router2”
add interface=ether2 address=192.168.1.33/28 comment=”LAN”
You may also like: Configuring a single-area OSPF for a network topology of three Cisco routers and five networks
Next step is the creation of loopback interfaces (bridges). This ensures the stability of OSPF since the loopback interfaces are always on. I will create bridges on all three routers. See below:
/interface bridge
add name=ospf-bridge comment=”OSPF loopback”
/interface bridge
add name=ospf-bridge comment=”OSPF loopback”
/interface bridge
add name=ospf-bridge comment=”OSPF loopback”
Next, I will assign IP addresses to the bridges created above.
/ip address
add interface=ospf address=172.16.16.1
/ip address
add interface=ospf address=172.16.16.2
/ip address
add interface=ospf address=172.16.16.3
Next, I will configure OSPF instances on all three routers.
You may also like: Configuring Cisco route redistribution between EIGRP and OSPF
Here, I will configure the loopback IP addresses assigned in the previous step as the ospf router IDs. See below:
/routing ospf instance
set default router-id=172.16.16.1
/routing ospf instance
set default router-id=172.16.16.2
/routing ospf instance
set default router-id=172.16.16.3
Now that the ospf instances have been established, I will advertise connected networks. See below:
/routing ospf network
add network=172.16.16.1 area=backbone comment=Loopback
add network=192.168.0.0/30 area=backbone comment=”connection_to_router2″
add network=192.168.1.0/28 area=backbone comment=”LAN”
/routing ospf network
add network=172.16.16.2 area=backbone comment=Loopback
add network=192.168.0.0/30 area=backbone comment=”connection_to_router1″
add network=192.168.0.4/30 area=backbone comment=”connection_to_router3″
add network=192.168.1.16/28 area=backbone comment=”LAN”
/routing ospf network
add network=172.16.16.3 area=backbone comment=Loopback
add network=192.168.0.4/30 area=backbone comment=”connection_to_router2″
add network=192.168.1.32/28 area=backbone comment=”LAN”
To verify if ospf is working as it should, we can use the following commands:
/routing ospf neighbor print
The command above shows routers that the local router has formed ospf neighbor relationships with. The next command is the command that displays routes learned via ospf. See below:
/routing ospf route print
Optimizing Metro Ethernet segments with jumbo MTU (Maximum Transmission Unit) can significantly enhance network performance…
MikroTik's SwitchOS is an operating system specifically designed for their line of network switches. It…
A properly configured VRRP setup does not only track device uptime but also tracks connection…
Network Address Translation (NAT) is a technique used in networking to map private IP addresses…
In the ever-evolving landscape of networking technologies, the demand for efficient and scalable solutions has…
Setting up Multi-Area OSPF (Open Shortest Path First) on Mikrotik routers involves a few steps.…