Junos export policy not working?
During a project recently, I was promptly reminded about the construction of Junos route export (i.e. route redistribution) policies. Specifically when filtering prefixes during the export/redistribution. The logic goes something like this:
a) Create prefix-list of prefixes to export
b) Create policy which references the protocol and prefix list to export
c) Attach policy to protocol
An example is here:
policy-options {
prefix-list CUST_A {
192.0.2.1/32;
}
policy-statement REDISTRIBUTE_STATICS_CUST_A {
/* FROM PREFIX-LIST TEST TO METRIC TYPE 1 FOR CUST A */
term 1 {
from {
prefix-list CUST_A;
}
to protocol ospf2;
then {
external {
type 1;
}
accept;
}
}
}
}
protocols {
ospf {
export REDISTRIBUTE_STATICS_CUST_A
area 0.0.0.0 {
interface x-x/x/x.x
}
}
}
With Junos export policies for routing, if you want to export more prefixes of the same type, adding an additional policy which also references the same protocol for the export will just not work. If you do the below, then you’re out of luck.
policy-options {
prefix-list CUST_A {
192.0.2.1/32;
}
prefix-list CUST_B {
192.0.2.2/32;
}
policy-statement REDISTRIBUTE_STATICS_CUST_A {
/* FROM PREFIX-LIST TEST TO METRIC TYPE 1 Continue reading

Liked our NV Report? You'll love the new 2015 NFV Report! Download it Today.