Pada halaman ini kita akan menkonfigrasi dynamic routinf ospf pada mikrotik RouterOS v7. Kali ini kita akan membuat jaringan sederhana single area ospf
/system identity set name="R1"
/ip address
add interface=ether1 address=172.16.0.1/30
add interface=ether2 address=172.16.1.1/30
add interface=ether3 address=192.168.1.1/24
/ip dhcp-server setup
/system identity set name="R2"
/ip address
add interface=ether1 address=172.16.1.2/30
add interface=ether2 address=172.16.2.1/30
add interface=ether3 address=192.168.2.1/24
/ip dhcp-server setup
/system identity set name="R3"
/ip address
add interface=ether1 address=172.16.0.2/30
add interface=ether2 address=172.16.2.2/30
add interface=ether3 address=192.168.3.1/24
/ip dhcp-server setup
# Membuat instance
/routing ospf instance
add name=ospf-instance router-id=10.1.1.1
# Membuat Area
/routing ospf area
add name=backbone area-id=0.0.0.0
# Menetapkan interface ke area ospf
/routing ospf interface-template
add networks=192.168.1.0/24 area=backbone
add networks=172.16.0.0/30 area=backbone
add networks=172.16.1.0/30 area=backbone
# Membuat instance
/routing ospf instance
add name=ospf-instance router-id=10.2.2.2
# Membuat Area
/routing ospf area
add name=backbone area-id=0.0.0.0
# Menetapkan interface ke area ospf
/routing ospf interface-template
add networks=192.168.2.0/24 area=backbone
add networks=172.16.1.0/30 area=backbone
add networks=172.16.2.0/30 area=backbone
# Membuat instance
/routing ospf instance
add name=ospf-instance router-id=10.3.3.3
# Membuat Area
/routing ospf area
add name=backbone area-id=0.0.0.0
# Menetapkan interface ke area ospf
/routing ospf interface-template
add networks=192.168.3.0/24 area=backbone
add networks=172.16.0.0/30 area=backbone
add networks=172.16.2.0/30 area=backbone
[admin@R1] > /routing ospf neighbor print
Flags: V - virtual; D - dynamic
0 D instance=ospf-instance area=backbone address=172.16.0.2 priority=128
router-id=10.3.3.3 dr=172.16.0.1 bdr=172.16.0.2 state="Full"
state-changes=7 adjacency=7m11s timeout=39s
1 D instance=ospf-instance area=backbone address=172.16.1.2 priority=128
router-id=10.2.2.2 dr=172.16.1.1 bdr=172.16.1.2 state="Full"
state-changes=7 adjacency=7m19s timeout=32s
[admin@R1] > /ip route print where ospf
Flags: D - DYNAMIC; A - ACTIVE; o, y - COPY; + - ECMP
Columns: DST-ADDRESS, GATEWAY, DISTANCE
DST-ADDRESS GATEWAY DISTANCE
DAo+ 172.16.2.0/30 172.16.0.2%ether1 110
DAo+ 172.16.2.0/30 172.16.1.2%ether2 110
DAo 192.168.2.0/24 172.16.1.2%ether2 110
DAo 192.168.3.0/24 172.16.0.2%ether1 110
PC1> ip dhcp
DORA IP 192.168.1.254/24 GW 192.168.1.1
PC1> ping 192.168.2.254
84 bytes from 192.168.2.254 icmp_seq=1 ttl=62 time=2.591 ms
84 bytes from 192.168.2.254 icmp_seq=2 ttl=62 time=1.884 ms
84 bytes from 192.168.2.254 icmp_seq=3 ttl=62 time=1.716 ms
84 bytes from 192.168.2.254 icmp_seq=4 ttl=62 time=1.948 ms
84 bytes from 192.168.2.254 icmp_seq=5 ttl=62 time=1.656 ms
PC1> ping 192.168.3.254
84 bytes from 192.168.3.254 icmp_seq=1 ttl=62 time=1.949 ms
84 bytes from 192.168.3.254 icmp_seq=2 ttl=62 time=2.791 ms
84 bytes from 192.168.3.254 icmp_seq=3 ttl=62 time=1.433 ms
84 bytes from 192.168.3.254 icmp_seq=4 ttl=62 time=1.686 ms
84 bytes from 192.168.3.254 icmp_seq=5 ttl=62 time=1.529 ms
PC1> trace 192.168.3.254
trace to 192.168.3.254, 8 hops max, press Ctrl+C to stop
1 192.168.1.1 0.736 ms 0.694 ms 0.449 ms
2 172.16.0.2 1.555 ms 1.607 ms 1.040 ms
3 *192.168.3.254 1.219 ms (ICMP type:3, code:3, Destination port unreachable)