[Contents] [Prev] [Next] [Index] [Report an Error]

Side Effects of Omitting the "from" Statement from an Export Policy

In export policies, omitting the from statement in a term might lead to unexpected results. By default, if you omit the from statement, all routes are considered to match. For example, static and direct routes are not exported by BGP by default. However, if you create a term with an empty from statement, these routes inadvertently could be exported because they matched the from statement. For example, the following routing policy is designed to reject a few route ranges and then export routes learned by BGP (which is the default export behavior):

[edit]
routing-options {
autonomous-system 56;
}
protocols {
bgp {
group 4 {
export statics-policy;
type external;
peer-as 47;
neighbor 192.168.1.1;
}
}
}
policy-options {
policy-statement statics-policy {
term term1 {
from {
route-filter 192.168.0.0/16 orlonger;
route-filter 172.16.1.1/3 orlonger;
}
then reject; # reject the prefixes in the route list
}
term term2 {
then {
accept; # accept all other routes, including static and direct routes
}
}
}
}

However, this routing policy results in BGP advertising static and direct routes to its peers because:

To modify the preceding routing policy so that an IGP does not export unwanted routes, you can specify the following additional terms:

[edit]
routing-options {
autonomous-system 56;
}
protocols {
isis {
export statics-policy;
}
}
policy-options {
policy-statement statics-policy {
term term1 {
from {
route-filter 192.168.0.0/16 orlonger;
route-filter 172.16.1.1/3 orlonger;
}
then reject; # reject the prefixes in the route list
}
term term2 { # reject direct routes
from protocol direct;
then reject;
}
term term3 { # reject static routes
from protocol static;
then reject;
}
term term4 { # reject local routes
from protocol local;
then reject;
}
term term5 { # reject aggregate routes
from protocol aggregate;
then reject;
}
term term6 {
then accept; # accept all other routes
}
}
}

[Contents] [Prev] [Next] [Index] [Report an Error]