Powered by Blogger.

Mikrotik Single Area OSPF Configuration


This tutorial illustrate how to configure single-area OSPF Network.

In the above example, 3 routers are connected together.


1.Configure IP address on 3 routers

- Router1:
/ip address add address=10.10.10.2/30 interface=ether1
/ip address add address=192.168.100.1/24 interface=ether2


- Router2:
/ip address add address=10.10.10.1/30 interface=ether1
/ip address add address=172.17.18.2/30 interface=ether2

- Router3:
/ip address add address=172.17.18.1/30 interface=ether1
/ip address add address=172.20.3.1/24 interface=ether2


In most cases it is recommended to set up loopback IP address as router-id. Loopback IP address is virtual, software address that is used for router identification in network. The benefits are that loopback address is always up (active) and can’t be down as physical interface. OSPF protocol used it for communication among routers that identified by router-id. Loopback interface are configured as follows:


- Create bridge interface named, for example, “loopback”:
/interface bridge add name=loopback


- Add IP address:
/ip address add address=1.1.1.1/32 interface=loopback 


This can be done on other routers (R2, R3) as well.


2. OSPF Configuration

There are three basic elements of OSPF configuration:

    Enable OSPF instance
    OSPF area configuration
    OSPF network configuration

General information is configured in /routing ospf instance menu. For advanced OSPF setups, it is possible to run multiple OSPF instances.In this example, i will create new Instance called "OSPF100".


2.1 Enable OSPF instance

- Router1:
/routing ospf instance add name=OSPF100  router-id=1.1.1.1

1.1.1.1 is loopback interface's IP address. Now i use it as router-id.


- Router2:
/routing ospf instance add name=OSPF100  router-id=1.1.1.2


- Router3:
/routing ospf instance add name=OSPF100  router-id=1.1.1.3

Show OSPF instance information:
/routing ospf instance print



2.2 OSPF area configuration

The default area is backbone , but i will create another area called "area0"
/routing ospf area add instance=OSPF100 name=area0


2.3 OSPF network configuration

router1:
/routing ospf network add network=10.10.10.0/30 area=area0
/routing ospf network add network=192.168.100.0/24 area=area0


Router2:
/routing ospf network add network=10.10.10.0/30 area=area0
/routing ospf network add network=172.17.18.0/30 area=area0


Router3:
/routing ospf network add network=172.17.18.0/30 area=area0
/routing ospf network add network=172.20.3.0/24 area=area0


3. Troubleshooting

You can verify your OSPF operation as follows:

- Look at the OSPF interface menu to verify that dynamic entry was created:
/routing ospf interface print


- Check your OSPF neighbors, what DR and BDR is elected and adjacencies established:
/routing ospf neighbor print

  
- Check router’s routing table (make sure OSPF routes are present):
/ip route print

Done!!!
    Blogger Comment
    Facebook Comment