BGP route target filtering is enabled through the exchange of the route-target address family, stored in the bgp.rtarget.0 routing table. Based on the route-target address family, the route target NLRI (address family indicator [AFI]=1, subsequent AFI [SAFI]=132) is negotiated with its peers.
On a system that has locally configured VRF instances, BGP automatically generates local routes corresponding to targets referenced in the vrf-import policies.
To configure BGP route target filtering, include the family route-target statement:
-
family route-target {
- advertise-default;
- external-paths number;
- prefix-limit number;
- }
For a list of hierarchy levels at which you can configure the family route-target statement, see the statement summary section for this statement.
The advertise-default, external-paths, and prefix-limit statements affect the BGP route target filtering configuration as follows:
Suppressing all route target advertisements other than the default route reduces the amount of information exchanged between the route reflector and the PE routers. The JUNOS software further helps to reduce route target advertisement overhead by not maintaining dependency information unless a nondefault route is received.
The route-target, advertise-default, and external-path statements affect the RIB-OUT state and must be consistent between peer routers that share the same BGP group. The prefix-limit statement affects the receive side only and can have different settings between different peer routers in a BGP group.
For examples illustrating how to configure BGP route target filtering for VPNs, see VPN Examples.