In the above example, 4 routers are connected together.
1.Configure IP address on 4 routers
- Router1:
on router 1, i will configure it with winbox,
other routers, i will configure it with command line.
/ip address add address=10.10.10.2/30 interface=ether1
/ip address add address=192.168.100.1/24 interface=ether2
/interface bridge add name=loopback
/ip address add address=1.1.1.1/32 interface=loopback
- Router2:
Now let's configure other 3 routers
/ip address add address=10.10.10.1/30 interface=ether1
/ip address add address=172.17.18.2/30 interface=ether2
/interface bridge add name=loopback
/ip address add address=1.1.1.2/32 interface=loopback
- Router3:
/ip address add address=172.17.18.1/30 interface=ether1
/ip address add address=172.20.3.2/30 interface=ether2
/ip address add address=10.10.30.0/24 interface=ether3
/interface bridge add name=loopback
/ip address add address=1.1.1.3/32 interface=loopback
- Router4:
/ip address add address=172.20.3.1/30 interface=ether1
/ip address add address=192.168.50.0/24 interface=ether2
/interface bridge add name=loopback
/ip address add address=1.1.1.4/32 interface=loopback
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 and OSPF Area
- Router1:
/routing ospf instance add name=OSPF100 router-id=1.1.1.1
/routing ospf area add instance=OSPF100 area-id=0.0.0.1 name=area1
- Router2:
/routing ospf instance add name=OSPF100 router-id=1.1.1.2
/routing ospf area add instance=OSPF100 area-id=0.0.0.0 name=area0
/routing ospf area add instance=OSPF100 area-id=0.0.0.1 name=area1
- Router3:
/routing ospf instance add name=OSPF100 router-id=1.1.1.3
/routing ospf area add instance=OSPF100 area-id=0.0.0.0 name=area0
/routing ospf area add instance=OSPF100 area-id=0.0.0.2 name=area2
- Router4:
/routing ospf instance add name=OSPF100 router-id=1.1.1.4
/routing ospf area add instance=OSPF100 area-id=0.0.0.2 name=area2
Show OSPF instance information:
/routing ospf instance print
2.2 OSPF network configuration
Router1:
/routing ospf network add network=10.10.10.0/30 area=area1
/routing ospf network add network=192.168.100.0/24 area=area1
Router2:
/routing ospf network add network=10.10.10.0/30 area=area1
/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/30 area=area2
Router4:
/routing ospf network add network=192.168.50.0/24 area=area2
/routing ospf network add network=172.20.3.0/30 area=area2
Now you can check routing table using command /ip route print
Routing table on router Router1
Now you see a few destination route are missing. In order to see those router, we need to set Redistribution feature in OSPF instance. We need to add following configuration on routers Router1, Router2 and Router3.
Redistribute Setting
1. Always: always send the default route.
2. If-installed: send default router only if it has been installed.
3. As-type-1: total cost to this network will be made based on the sum of the external and internal cost.
4. As-type-2: total cost to this network will be made based only on external metric.
/routing ospf instance set 1 redistribute-connected=as-type-1
/routing ospf instance print
Please help to support and subscribe.
blog site: http://www.learnwithsomono.com/
youtube channel: https://www.youtube.com/channel/UC8neg7DeMRtDnLZlvMTdYQw
twitter: https://twitter.com/somonochek
Thank You,
Somono
Blogger Comment
Facebook Comment