Your policy currently following this sequence of action while executing , "select route received through protocol BGP having local-preference of 90 and then route-filter 10.1.162.0/25 orlonger and simply accepting routes matching these conditions" . Which is obviously null as local-preference of routes receiving from both peers is 100 .
Your Policy should be like "select routes received through protocol BGP from neighbor 10.100.0.1 and route filiter 10.1.162.0/25 orlonger and in then stanza use set the local-preference 90 ". This will set local preference of routes equal to 90 making this neighbor less preferred. Configuration for required scenario is as under:-
Policy-statement tata_import_test {
term 1 {
from {
protocol BGP;
neighbor 10.100.0.1
route-filter 10.1.162.0/25 orlonger;
}
then local-preference 90;
}
}
Please mark this as accepted solution if it works for you
A kudos is a good way of appreciation
Kashif Nawaz
JNCIP-Sec ,JNCIP-Ent
JNCIS-Ent, JNCIS-Sec
JNCIA-Junos