[j-nsp] Building custom route tables from VRF's

Pedro Roque Marques roque at juniper.net
Thu Apr 7 21:34:39 EDT 2005


Gordon Smith writes:

> Hi, I've been trying to construct a custom iBGP table based on
> routes received from external peers.

> I know I can do community comparisons, but I don't think that'll
> achieve what I need.

> What I need to do is take routes received from Upstream_A and
> Peer_B, then create some sort of filter so that I can create a new
> route table that consists of Upstream_A-Peer_B routes i.e. subtract
> the Peer_B routes from the Upstream_A routes as they get added to
> the new table.  The peers are all in virtual-router VRF's; I'm just
> unsure on the best way to create a filter based on another inet
> table...

> Anyone done this before? What would be the best way to go about it?

Your description is not clear to me...

what do you mean by A - B "routes" ? route is a rather ambiguous term.

Do you mean that if for a given prefix you have a path from A and a
path from B, you want this not to be included ?

e.g. if in a table you have....

     10.0.1/24 via {A, B}
     10.0.2/24 via A
     10.0.3/24 via B

do you mean that you want only the second prefix ? or is it something
else ?

If you want to get the 2nd prefix in the example above, what is the
path that you prefer in the original table ? A or B... ?

if in the original table you prefer A, then you can import this to
another table via a rib-group where you modify the local-pref such
that B is preferred. Make this a VRF and in its VRF export policy
reject path that where received via B.

i.e. only active routes are exported from a VRF... this is a way to
acomplish your (A - B) logic... if i understood what you mean.

  Pedro.


More information about the juniper-nsp mailing list