Junos
Junos

Problem with BGP routing policy configuration

‎02-08-2016 11:45 PM

Hello,

 

Yesterday, we faced a problem with a  routing policy configuration. We want to achieve the following configuration with a routing policy:

 

let's say we have a routing policy with a couple of 'match-conditions' (XYZ) for importing BGP routes on the router. If a route matches the 'match-conditions', then we want to send the destination prefix of that route to a prefix-list. 

 

Unfortunately, after researching and reading a lot of Juniper documentation, I couldn't find any proper solution. Does anyone have a solution for this problem?

 

I've added an image that might simplify my problem (and highlighted the problem in red). Furthermore, the platform version of the router is a Core T-series with JunOS 15.1

 

Many thanks

Vincent,

 

Drawing1.jpg

 

 

Attachments

3 REPLIES 3
Junos

Re: Problem with BGP routing policy configuration

‎02-09-2016 12:29 AM

What exactly do you mean by sending the destination prefix to prefix-list? You want the prefix be evaluated by the prefix list after it matches conditions ABC? Then simply include it in the from section, e.g.

 

policy-statement Import-policy-BGP {
  term 1 {
    from {
	  match-condition X;
	  match-condition X;
	  match-condition X;
	  prefix-list lst1;
	}
	then {
	  accept;
	}
  }
}

Cheers,

Carsten

Junos

Re: Problem with BGP routing policy configuration

‎02-09-2016 01:50 AM

Thanks for your response Carsten :-)

 

But it's not really what I want. Let's say that BGP imports the following routes:

 

bgp.PNG

The router contains the following policy with a 'match condition'. What I want to do is to send the destination-prefix of the route (in this situation: 100.0.0.0/24 and 150.0.0.0/25) to a prefix-list.

 

1.PNG

 

With the following output:

----------------------------------------------------------------.

2.PNG

----------------------------------------------------------------.

 

Does anyone have a solution for this problem?

 

Many thanks,

Vincent 

 

 

Junos

Re: Problem with BGP routing policy configuration

‎02-09-2016 02:26 AM

Ok, if I understand correctly you want to generate a prefix list based on routes received from a BGP neighbor, right? 

 

That would not be possible as the prefix list is part of the configuration and cannot depend on dynamic information (ok, you could write scripts to manipulate configuration but that won't scale). However, if you want to filter these specific routes somewhere else, you could  use either route tagging (internal to the system) or policy subroutines (using this policy as match within another policy) instead of a prefix list.

 

Cheers,

Carsten