Hello,
I have a CCR1036 that receives a FIRT from my transit and I also have a peering session in an IXP.
I have filters that set the local-pref of all the routes that I receive from the IXP’s Route Server at 150.
Google announces its networks on my IXP and testing I noticed that I was being routed through my transit provider instead of the IXP.
After investigating I verified that I receive the routes from Google and they have a local-pref of 150 but the routes coming from my transit are still active even though they have a lower local-pref.
You can see a screenshot of the routes:

As you can see they both of them are active and marked with ECMP despite the second one having a higher local-pref and a shorter as-path.
I’ve also tried setting a higher weight for the routes coming from the IXP but there’s no difference.
The only way that I was able to select the second route without filtering the first is setting a lower distance on the routes coming from the IXP.
Am I forgetting something or is there something wrong?
BGP from one instance can install only one best route. From your route output it appears that each route is received from its own BGP instance. In this case of course bgp best path selection is not applied.
Yes the two routes are received from two different sessions but I really don’t understand what you’re saying.
What is the point of having a local-pref for a specific route if the bgp best path selection isn’t applied to the same route being sent from another session?
The problem here is not that the route is installed but rather that is being marked as active and not as a candidate.
I have other routes that are being announced both on the transit and at the IXP and the local-pref is working as intended, the routes with a lower local-pref are being marked as candidates and the ones with a higher local-pref are being marked as active.
Post your BGP config
Here is the BGP configuration for those two peers and the filters:
/routing bgp connection
add address-families=ip as=56488 connect=yes disabled=no input.filter=
IXP_IN_IPv4 local.address=185.1.114.91 .role=ebgp-peer name=
“MINAP rs1 IPv4” output.filter-chain=OUT_IPv4 .filter-select=“” .network=
bgp-announce-v4 remote.address=185.1.114.252/32 .as=43369 router-id=
185.1.114.91 routing-table=main templates=defaultadd address-families=ip as=56488 connect=yes disabled=no input.filter=
TRANSIT_IN_IPv4 listen=yes local.address=185.157.231.101 .role=
ebgp-provider name=“FiberTelecom IPv4” output.filter-chain=OUT_IPv4
.filter-select=“” .network=bgp-announce-v4 remote.address=
185.157.231.100/32 .as=41327 router-id=185.157.231.101 routing-table=main
templates=default
/routing filter rule
add chain=TRANSIT_IN_IPv4 disabled=no rule=“if (dst-len > 24) \r
\n{reject}\r
\nelse\r
\n{\r
\nset bgp-local-pref 100;\r
\njump IN-RFC-6890-IPv4;\r
\n}\r
\n”
add chain=IXP_IN_IPv4 disabled=no rule=“if (dst-len == 0 || dst-len > 24) \r
\n{reject}\r
\nelse\r
\n{\r
\nset bgp-local-pref 150;\r
\njump IN-RFC-6890-IPv4;\r
\n}”
add chain=IN-RFC-6890-IPv4 comment=“Discard private IPv4” disabled=no rule=“if
( dst in 0.0.0.0/8 || dst in 10.0.0.0/8 || dst in 100.64.0.0/10 || dst in
127.0.0.0/8 || dst in 169.254.0.0/16 || dst in 172.16.0.0/12 || dst in 192
.0.2.0/24 || dst in 192.88.99.0/24 || dst in 192.168.0.0/16 || dst in 198.
18.0.0/15 || dst in 198.51.100.0/24 || dst in 203.0.113.0/24 || dst in 240
.0.0.0/4 || dst in 255.255.255.255/32)\r
\n{reject}\r
\nelse\r
\n{jump IN_OWN_PREFIX_IPv4}”
add chain=IN_OWN_PREFIX_IPv4 comment=“Discard own prefix” disabled=no rule=
“if (dst in x.x.x.x/24) \r
\n{reject}\r
\nelse\r
\n{accept}”
Let me know if you need more.
Set to use the same template and the same router-id for both connections.
You are right, it was the router-id.
Thanks for the help.