Community discussions

 
User avatar
luqasz
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Thu Aug 16, 2007 9:53 pm
Location: Poland

badly selected OSPF route. ignored cost

Mon Apr 28, 2014 3:18 pm

hi

i have made a lab with diagram as in
ospf.png
.

R1
/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

R2
/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

R3
/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

R4
/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.
You do not have the required permissions to view the files attached to this post.
 
digicomtech
Frequent Visitor
Frequent Visitor
Posts: 75
Joined: Fri Apr 20, 2007 5:03 pm
Location: Alma, Qc, Canada
Contact:

Re: badly selected OSPF route. ignored cost

Mon Apr 28, 2014 5:36 pm

Hi,
I'm happy to see someone with a lab test showing this problem.
We've got similar problem with ROS OSPF routing.
In our production environment, all OSPF route with the best cost are installed in routing table and that is the correct behavior for OSPF. However, we got a loop on our backbone and when one link goes down and get back after a while, external route distributed through this link is use whenever the cost is !

I don't have much more information but I guess this could be related with time synchronisation.

Do your lab setup have pefect time synchronisation ?

Edit: It looks like a multiarea OSPF problem. It seems to be described in RFC5185 as describe in ths post:
http://forum.mikrotik.com/viewtopic.php ... hilit=ospf

Regards,
 
User avatar
luqasz
Member Candidate
Member Candidate
Topic Author
Posts: 101
Joined: Thu Aug 16, 2007 9:53 pm
Location: Poland

Re: badly selected OSPF route. ignored cost

Mon Apr 28, 2014 8:29 pm

Hi,

Edit: It looks like a multiarea OSPF problem. It seems to be described in RFC5185 as describe in ths post:
http://forum.mikrotik.com/viewtopic.php ... hilit=ospf

Regards,
I do not think so. Problem described in link is a different one. R2 knows about 2 paths. intra and inter area. R2 does not install intra area path (witch should).

Who is online

Users browsing this forum: MSN [Bot] and 50 guests