[j-nsp] OSPF metric not taken into account in BGP routing

Nathan have.an.email at gmail.com
Fri Jun 6 04:58:30 EDT 2008


In BGP bestpath selection, more important things being equal, the
choice is supposed to be made according to the IGP metric of the
nexthop. Somehow that is working on my Ciscos, but not on my Junipers.
On the routes to the endpoints, Metric2 is equal to 1 on all the
junipers and the route I want is not chosen because it is "Not Best in
its group - Router ID".

I expect the Metric2 to be equal to the IGP cost, not "1".

Since it is working on the Ciscos, I suppose there's something wrong
with my Juniper configs, could someone please tell me what It might


My network looks a lot like
two CPEs in one private AS, each one connected to a separate PE, and
other provider routers connected to the PEs. The difference with my
setup is that in my case the CPEs announce identical MEDs and I want
traffic to go horizontally as much as possible, so as to maximize the
use of the PE-CPE connections.

The Junipers are the rightmost R3 and R6 routers not connected to the
CPEs, while all others, PE and CPE, are Ciscos (and there are other
Cisco routers connected the same as the Junipers choosing the routes
the way I expect and want).

For each eligible path there are three IP's shown which I suppose
could be used for the IGP cost:

                Source (that's the loopback of the PE)

                Next hop (that's the IP of the PE on the interface
between the PE and the Juniper)

                Protocol next hop (that's the IP of the CPE on the
CPE-PE interface, it's known through OSPF because the PE redistributes
connected, but I could change that if there are reasons other than
OSPF database size and OSPF LSA recalculation due to flapping, none of
which worry me).

When I do a show route on the six IPs (three IPs per eligible path),
the route and the metrics shown are every single time the ones I
expect and want. The Next Hops are known by Direct/0, but I don't see
how it could not be so. The Sources are known by OSPF, metric 10 for
the route I want, metric 40 for the other one (they are also announced
by BGP with metric=0 and metric2 =1 . . .). The Protocol Next-Hops are
known by OSPF, metric 29 for the route I want, metric 40 (??) for the
other one (they are also announced by BGP with metric=0 and metric2 =1
. . .).

But I still don't get the route I want. If useful I'll post configs and output.


More information about the juniper-nsp mailing list