Topic: tech mikrotik prev next
tech mikrotik > OSPF
There are many ways to configure OSPF. This example creates a point to point IP link in a dedicated VLAN and runs OSPF over the new link. This is a good way to implement OSPF whilst running other protocols on the same physical interface. It also allows for OSPF routers to be moved between interfaces, as long as the OSPF VLAN is present on the new interface, without completely reconfiguring the interface.
On both routers, create a bridge, if the router does not have one already,
under ‘Bridge’, and make sure that both ‘VLAN Filtering’ and ‘Unknown Multicast
Flood’ are enabled on the bridge. Create a new VLAN under ‘Interfaces, VLANs’
for the OSPF link, setting the name and VLAN id appropriately. Add addresses
to the VLAN on both devices under ‘IP, Addresses’, setting the subnet mask to
/30
. Add the new VLAN to the desired ports under ‘Bridge, Ports’. Now is a
good time to test Layer 3 connectivity between the two routers using the ‘ping’
utility.
On both routers, create the OSPF instance under ‘Routing, OSPF’. Under ‘Redistribute’, tick the routes to redistribute into OSPF.
For small networks, it is likely that ‘connected’ routes should be redistributed. If one of the routers has a default route which should be advertised into OSPF, most likely because that router has a connection to an ISP, set ‘Originate Default’ to ‘always’.
Create the OSPF area 0 under ‘OSPF, Areas’.
Finally, choose the interfaces to participate in OSPF by adding interface templates under ‘OSPF, Interface Templates’. Select only the VLAN interface that was created earlier.
Interfaces can either be added to the same interface template, or in their own interface template. Creating a separate interface template for each leads to greater flexibility later.
The interface now appears as an interface on which OSPF will operate. Note that interfaces cannot be added directly to the interface list, they must be added via a template.
If neither router is reaching the ‘Init’ state, check for IP reachability between the two routers using the ‘ping’ utility. If the routers cannot ping each other on their peering IP addresses, then either ICMP packets are being blocked by one or both firewalls, or there is a Layer 3 reachability problem.
If one router reaches the ‘Init’ state and the other does not progress to the ‘Init’ state, investigate the router that has not detected any neighbours.
When OSPF is running on a broadcast network, it needs to receive OSPF packets on multicast addresses. Under the bridge configuration, make sure that ‘Unknown Multicast Flood’ is checked, to allow the router to receive OSPF packets. OSPF packets may be blocked by a firewall rule. Check firewall rules and, if necessary, add a rule to allow OSPF traffic.