Applying Both the VRF Export and the BGP Export Policies
When you apply a VRF export policy as described in Configuring Export Policy for the PE Router's VRF Table, routes from VPN routing instances are advertised to other PE routers based on this policy, while the BGP export policy is ignored.
If you configure the
vpn-apply-exportstatement, both the VRF export and BGP group or neighbor export policies are applied (VRF first, then BGP) before routes are advertised in the VPN routing tables to other PE routers.If you configure a PE router as a route reflector or as an AS border router, the behavior enabled by the
vpn-apply-exportstatement is enabled on these routers automatically. For information on how to configure a route reflector or an AS border router, see the JUNOS Routing Protocols Configuration Guide.When you configure the
vpn-apply-exportstatement, be aware of the following:
- Routes imported into the
l3vpn.bgp.0routing table retain the attributes of the original routes (for example, an OSPF route remains an OSPF route even when it is stored in thel3vpn.bgp.0routing table). You should be aware of this when you configure an export policy for connections between an IBGP PE router and a PE router, a route reflector and a PE router, or AS boundary router (ASBR) peer routers.- By default, all routes in the
l3vpn.bgp.0routing table are exported to the IBGP peers. If the last statement of the export policy isdeny alland if the export policy does not specifically match on routes in thel3vpn.bgp.0routing table, no routes are exported.To apply both the VRF export and BGP export policies to VPN routes, include the
vpn-apply-exportstatement:vpn-apply-export;For a list of hierarchy levels at which you can configure this statement, see the statement summary section for this statement.