Routing
Highlighted
Routing

Route is advertised but not matching routing policy

[ Edited ]
‎12-19-2013 05:59 PM

Hi All,

 

Can anybody tell me why the below policy doesn't match the 198.18.97.0/24 subnet  Smiley Frustrated ?

 

> show configuration policy-options policy-statement match-1
term match {
from {

protocol bgp;
route-filter 198.18.97.0/24 exact;
condition subnet1;
}
then accept;
}
term reject {
from protocol bgp;
then reject;
}

 

> show configuration policy-options condition subnet1
if-route-exists {
198.18.97.0/24;
table inet.0;
}

 

BR,

Peter Riad
Network Engineer,
JNCIA-JUNOS, JNCIS-SP, JNCIP-SP
Juniper Fan
9 REPLIES 9
Highlighted
Routing

Re: Route is advertised but not matching routing policy

‎12-19-2013 06:08 PM

Was the route learned from BGP?

 

Can you post the output of show route?

Steve Puluka BSEET - Juniper Ambassador
IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP)
http://puluka.com/home
Highlighted
Routing

Re: Route is advertised but not matching routing policy

‎12-19-2013 06:22 PM

Hi Steve,

 

Yea it was learned from iBGP, Here you are:

 

> show route 198.18.97.0/24 exact

inet.0: 14 destinations, 15 routes (13 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both

198.18.97.0/24 *[BGP/170] 02:07:12, localpref 100, from 198.51.100.250
AS path: I, validation-state: unverified
> to 198.51.100.0 via ge-0/0/1.0

 

Thanks!

Peter Riad
Network Engineer,
JNCIA-JUNOS, JNCIS-SP, JNCIP-SP
Juniper Fan
Highlighted
Routing

Re: Route is advertised but not matching routing policy

‎12-19-2013 06:26 PM

FYI

 

> test policy match-1 198.18.97.0/24

Policy match-1: 0 prefix accepted, 1 prefix rejected

 

BR,

Peter Riad
Network Engineer,
JNCIA-JUNOS, JNCIS-SP, JNCIP-SP
Juniper Fan
Highlighted
Routing

Re: Route is advertised but not matching routing policy

‎12-19-2013 06:52 PM

I'm not sure how the test handles the conditional statements.

 

Take a look at the output of the extensive advertising link, where 1.1.1.1 is the neighbor address you are advertising to.  This output will include the details of the policy match conditions.

 

show route advertising-protocol bgp 1.1.1.1 extensive

Steve Puluka BSEET - Juniper Ambassador
IP Architect - DQE Communications Pittsburgh, PA (Metro Ethernet & ISP)
http://puluka.com/home
Highlighted
Routing

Re: Route is advertised but not matching routing policy

‎12-20-2013 12:20 AM
It is not about the condition line because even if you remove it, you will get same result. I don't know whats wrong with the policy as it should accept the route.
Peter Riad
Network Engineer,
JNCIA-JUNOS, JNCIS-SP, JNCIP-SP
Juniper Fan
Highlighted
Routing

Re: Route is advertised but not matching routing policy

‎12-20-2013 09:29 AM
No one can explain this strange behavior!
Peter Riad
Network Engineer,
JNCIA-JUNOS, JNCIS-SP, JNCIP-SP
Juniper Fan
Highlighted
Routing

Re: Route is advertised but not matching routing policy

‎12-20-2013 01:22 PM

I connected to your setup and it looks fine to me after deactivating from aggregate-contributor. I won't have time to look again at it, going on a trip:

 

[edit policy-options policy-statement match-1]
juniper@VJX1# show
term match {
    from {
        protocol bgp;
        route-filter 198.18.97.0/24 exact;
        inactive: aggregate-contributor;
        condition subnet1;
    }
    then accept;
}
term reject {
    from protocol bgp;
    then reject;
}

[edit policy-options policy-statement match-1]
juniper@VJX1# run test policy match-1 198.18.97.0/24

inet.0: 14 destinations, 15 routes (13 active, 0 holddown, 1 hidden)
+ = Active Route, - = Last Active, * = Both

198.18.97.0/24     *[BGP/170] 21:06:39, localpref 100, from 198.51.100.250
                      AS path: I, validation-state: unverified
                    > to 198.51.100.0 via ge-0/0/1.0

Policy match-1: 1 prefix accepted, 0 prefix rejected

Highlighted
Routing

Re: Route is advertised but not matching routing policy

[ Edited ]
‎12-20-2013 01:34 PM

Thanks Antonio, but i don't think the aggregate-contributor matching condition was the problem as i tried testing without it before and didn't accept the route also. I'll wait for you to have an in-depth look at the setup on the long run. hope you enjoy your trip. Thanks!

Peter Riad
Network Engineer,
JNCIA-JUNOS, JNCIS-SP, JNCIP-SP
Juniper Fan
Highlighted
Routing

Re: Route is advertised but not matching routing policy

‎12-20-2013 01:37 PM
Sorry I won't be able to do it since my holidays start. Right now it's working so I can't troubleshoot it further.