i have made a lab with diagram as in .
R1
Code: Select all
/routing ospf instance
set [ find default=yes ] disabled=no distribute-default=if-installed-as-type-1 !domain-id \
!domain-tag in-filter=ospf-in metric-bgp=auto metric-connected=20 metric-default=1 \
metric-other-ospf=auto metric-rip=20 metric-static=20 !mpls-te-area !mpls-te-router-id \
name=default out-filter=ospf-out redistribute-bgp=no redistribute-connected=no \
redistribute-other-ospf=no redistribute-rip=no redistribute-static=no router-id=1.1.1.1 \
!routing-table !use-dn
/routing ospf area
set [ find default=yes ] area-id=0.0.0.0 disabled=no instance=default name=backbone type=\
default
add area-id=0.0.0.1 disabled=no instance=default name=area1 type=default
/routing ospf interface
add authentication=none authentication-key="" authentication-key-id=1 cost=10 dead-interval=\
40s disabled=no hello-interval=10s instance-id=0 interface=all network-type=broadcast \
passive=no priority=1 retransmit-interval=5s transmit-delay=1s use-bfd=yes
add authentication=none authentication-key="" authentication-key-id=1 cost=10 dead-interval=\
40s disabled=no hello-interval=10s instance-id=0 interface=ether1 network-type=broadcast \
passive=yes priority=1 retransmit-interval=5s transmit-delay=1s use-bfd=no
/routing ospf network
add area=backbone disabled=no network=10.1.4.0/24
add area=area1 disabled=no network=0.0.0.0/0
/ip address
add address=10.1.4.2/24 interface=ether2 network=10.1.4.0
add address=10.1.3.2/24 interface=ether3 network=10.1.3.0
Code: Select all
/routing ospf instance
set [ find default=yes ] disabled=no distribute-default=never !domain-id !domain-tag \
in-filter=ospf-in metric-bgp=auto metric-connected=20 metric-default=1 \
metric-other-ospf=auto metric-rip=20 metric-static=20 !mpls-te-area !mpls-te-router-id \
name=default out-filter=ospf-out redistribute-bgp=no redistribute-connected=no \
redistribute-other-ospf=no redistribute-rip=no redistribute-static=no router-id=2.2.2.2 \
!routing-table !use-dn
/routing ospf area
set [ find default=yes ] area-id=0.0.0.0 disabled=no instance=default name=backbone type=\
default
add area-id=0.0.0.1 disabled=no instance=default name=area1 type=default
/routing ospf interface
add authentication=none authentication-key="" authentication-key-id=1 cost=10 \
dead-interval=40s disabled=no hello-interval=10s instance-id=0 interface=all \
network-type=broadcast passive=no priority=1 retransmit-interval=5s transmit-delay=1s \
use-bfd=yes
/routing ospf network
add area=backbone disabled=no network=10.1.4.0/24
add area=area1 disabled=no network=0.0.0.0/0
/ip address
add address=10.1.1.3/24 interface=ether4 network=10.1.1.0
add address=10.1.4.3/24 interface=ether2 network=10.1.4.0
Code: Select all
/routing ospf instance
set [ find default=yes ] disabled=no distribute-default=never !domain-id !domain-tag \
in-filter=ospf-in metric-bgp=auto metric-connected=20 metric-default=1 \
metric-other-ospf=auto metric-rip=20 metric-static=20 !mpls-te-area !mpls-te-router-id \
name=default out-filter=ospf-out redistribute-bgp=no redistribute-connected=no \
redistribute-other-ospf=no redistribute-rip=no redistribute-static=no router-id=3.3.3.3 \
!routing-table !use-dn
/routing ospf area
set [ find default=yes ] area-id=0.0.0.0 disabled=no instance=default name=backbone type=\
default
add area-id=0.0.0.1 disabled=no instance=default name=area1 type=default
/routing ospf interface
add authentication=none authentication-key="" authentication-key-id=1 cost=10 dead-interval=\
40s disabled=no hello-interval=10s instance-id=0 interface=all network-type=broadcast \
passive=no priority=1 retransmit-interval=5s transmit-delay=1s use-bfd=yes
/routing ospf network
add area=area1 disabled=no network=0.0.0.0/0
/ip address
add address=10.1.2.2/24 interface=ether5 network=10.1.2.0
add address=10.1.1.1/24 interface=ether4 network=10.1.1.0
Code: Select all
/routing ospf instance
set [ find default=yes ] disabled=no distribute-default=never !domain-id !domain-tag \
in-filter=ospf-in metric-bgp=auto metric-connected=20 metric-default=1 \
metric-other-ospf=auto metric-rip=20 metric-static=20 !mpls-te-area !mpls-te-router-id \
name=default out-filter=ospf-out redistribute-bgp=no redistribute-connected=no \
redistribute-other-ospf=no redistribute-rip=no redistribute-static=no router-id=4.4.4.4 \
!routing-table !use-dn
/routing ospf area
set [ find default=yes ] area-id=0.0.0.0 disabled=no instance=default name=backbone type=\
default
add area-id=0.0.0.1 disabled=no instance=default name=area1 type=default
/routing ospf interface
add authentication=none authentication-key="" authentication-key-id=1 cost=10 \
dead-interval=40s disabled=no hello-interval=10s instance-id=0 interface=all \
network-type=broadcast passive=no priority=1 retransmit-interval=5s transmit-delay=1s \
use-bfd=yes
/routing ospf network
add area=area1 disabled=no network=0.0.0.0/0
/ip address
add address=10.1.3.4/24 interface=ether3 network=10.1.3.0
add address=10.1.2.4/24 interface=ether5 network=10.1.2.0
R2 should pick default route through R1. Unfortunatelly it does not. It installs default route from ospf with cost=31 via R3. If I tear down link between R3 and R2, R2 installs default route via R1 (which is desired). This route has cost=11. When link between R2 and R3 comes up, R2 installs back "wrong" route via R3.
I have reproduced exactly the same setup in GNS3 with mikrotik in qemu and on cisco IOS. On cisco no such problem was present.
Either there is some option witch I forgot to set, or mikrotik has a bug.