I have an RB450G running 5.19. It is an ospf neighbor on an ipv4 only network with 5 neighbors all in 1 area (0.0.0.0, backbone). On this link are 2 ASBRs that redistribute the same prefixes (learned from BGP) into OSPF as type 2 externals. Router 1 (10.240.128.4) advertises the prefixes with a metric of 30 and router 2 (10.240.128.5) advertises them with a metric of 20 (preferred path).
All other neighbors on this link choose the LSAs with metric 20 and put them into their device’s FIB (the behavior I expect). The RB450 seems to be selecting some with metric 30 for a reason I do not know. Why is the RB450G not selecting the “shorter” (lower metric) path for these prefixes?
Example output below:
From /ip route print:
17 ADo 10.195.0.0/16 10.240.128.5 110
18 ADo 10.197.0.0/16 10.240.128.4 110
From /routing ospf lsa print detail:
instance=default area=external type=as-external id=10.195.0.0 originator=10.240.128.4 sequence-number=0x800000A7 age=2599 checksum=0xB3EC options=“E|DC” body=
netmask=255.255.0.0
forwarding-address=0.0.0.0
metric=30
route-tag=0x0
type2
instance=default area=external type=as-external id=10.195.0.0 originator=10.240.128.5 sequence-number=0x800000A7 age=2566 checksum=0x4960 options=“E|DC” body=
netmask=255.255.0.0
forwarding-address=0.0.0.0
metric=20
route-tag=0x0
type2
instance=default area=external type=as-external id=10.197.0.0 originator=10.240.128.4 sequence-number=0x800000A9 age=819 checksum=0x9705 options=“E|DC” body=
netmask=255.255.0.0
forwarding-address=0.0.0.0
metric=30
route-tag=0x0
type2
instance=default area=external type=as-external id=10.197.0.0 originator=10.240.128.5 sequence-number=0x800000A7 age=2516 checksum=0x3176 options=“E|DC” body=
netmask=255.255.0.0
forwarding-address=0.0.0.0
metric=20
route-tag=0x0
type2
As you can see, the same prefix is advertised from each ASBR with different metrics. I would expect OSPF to choose the shorter metric on E2 LSAs to put into the FIB. That’s not what’s occurring. Are my expectations incorrect, and if so, is there a way to meet my expectations of OSPF selecting the shortest path for E2 LSAs, as presented by the metric? All of the other devices in the area (cisco ASAs, juniper routers, a linux appliance running zebra) all select the LSA with the shorter metric.
Below is /routing ospf export:
/routing ospf instance
set [ find default=yes ] disabled=no distribute-default=never in-filter=ospf-in metric-bgp=auto metric-connected=20 metric-default=1 metric-other-ospf=auto metric-rip=20
metric-static=20 name=default out-filter=ospf-out redistribute-bgp=no redistribute-connected=no redistribute-other-ospf=no redistribute-rip=no redistribute-static=no router-id=
10.240.128.7
/routing ospf area
set [ find default=yes ] area-id=0.0.0.0 disabled=no instance=default name=backbone type=default
/routing ospf interface
add authentication=simple authentication-key=(redacted) authentication-key-id=1 cost=10 dead-interval=8s disabled=no hello-interval=2s instance-id=0 interface=Safenet network-type=
broadcast passive=no priority=1 retransmit-interval=5s transmit-delay=1s use-bfd=no
/routing ospf network
add area=backbone disabled=no network=10.240.128.0/24