Lab 2 Mikrotik Routing - OSPF Routing Non Backbone Area
Assalamu'alaikum
Topology
Konfigurasi Ip Address
[admin@MikroTik] > system identity set name=R1 [admin@R1] > ip address add address=12.12.12.1/24 interface=ether1 |
[admin@MikroTik] > system identity set name=R2 [admin@R2] > ip address add address=12.12.12.2/24 interface=ether1 [admin@R2] > ip address add address=23.23.23.2/24 interface=ether2 |
[admin@MikroTik] > system identity set name=R3 [admin@R3] > ip address add address=23.23.23.3/24 interface=ether1 [admin@R3] > ip address add address=34.34.34.3/24 interface=ether2 |
[admin@MikroTik] > system identity set name=R4 [admin@R4] > ip address add address=34.34.34.4/24 interface=ether1 |
Konfigurasi OSPF Interface dan Instance
[admin@R1] > routing ospf interface add interface=ether1 [admin@R1] > routing ospf instance set 0 router-id=0.0.0.1 |
[admin@R2] > routing ospf interface add interface=ether1 [admin@R2] > routing ospf interface add interface=ether2 [admin@R2] > routing ospf instance set 0 router-id=0.0.0.2 |
[admin@R3] > routing ospf interface add interface=ether1 [admin@R3] > routing ospf interface add interface=ether2 [admin@R3] > routing ospf instance set 0 router-id=0.0.0.3 |
[admin@R4] > routing ospf interface add interface=ether1 [admin@R4] > routing ospf instance set 0 router-id=0.0.0.4 |
Konfigurasi OSPF Area
[admin@R1] > routing ospf area add name=area1 area-id=0.0.0.1 |
[admin@R2] > routing ospf area add name=area1 area-id=0.0.0.1 |
[admin@R3] > routing ospf area add name=area2 area-id=0.0.0.2 |
[admin@R4] > routing ospf area add name=area2 area-id=0.0.0.2 |
- Area backbone tidak perlu ditambahkan karena default ospf adalah area backbone. Dan area backbone memiliki area id 0.0.0.0
- Pada dasarnya, kalian ingin menambahkan semua area di semua routerpun tidak masalah.
Advertising Network
[admin@R1] > routing ospf network add network=12.12.12.0/24 area=area1 |
[admin@R2] > routing ospf network add network=12.12.12.0/24 area=area1 [admin@R2] > routing ospf network add network=23.23.23.0/24 area=backbone |
[admin@R3] > routing ospf network add network=23.23.23.0/24 area=backbone [admin@R3] > routing ospf network add network=34.34.34.0/24 area=area2 |
[admin@R4] > routing ospf network add network=34.34.34.0/24 area=area2 |
Pengecekkan
Selain itu, pada table routing kalian juga akan bisa melihat status routingnya. ADo menandakan Active, Dynamic, OSPF. Identitas seperti ini setidaknya harus kalian kuasai agar memudahkan kalian dalam melakukan pengecekkan setiap waktu. Dan juga untuk distance yang digunakan ospf secara default adalah 110.
[admin@R1] > ip route print Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme, B - blackhole, U - unreachable, P - prohibit # DST-ADDRESS PREF-SRC GATEWAY DISTANCE 0 ADC 12.12.12.0/24 12.12.12.1 ether1 0 1 ADo 23.23.23.0/24 12.12.12.2 110 2 ADo 34.34.34.0/24 12.12.12.2 110 |