Configuring Policy-Based Export for Routing Instances
Configuring policy-based export simplifies the process of exchanging route information between routing instances.
Exporting routing information between routing instances typically is accomplished by configuring separate routing table groups for each instance. The use of policy-based export reduces the configuration needed for exporting routes between multiple routing instances by eliminating the configuration of separate routing table groups for each instance.
Policy-based export is particularly useful in the following two cases:
- Overlapping VPNs—VPN configurations in which more than one VRF has the same route target
- Nonforwarding instances—Multilevel IGPs using multiple
routing instances

Note: The instance-export and instance-import statements are not valid for VRF instances. The auto-export statement is valid for VRF and non-VRF instances. The instance-import statement automatically enables auto-export for non-VRF instances.
For detailed information about configuring overlapping VPNs and nonforwarding instances, see the Junos VPNs Configuration Guide.
For sample configurations, see the following sections:
Example: Configuring Policy-Based Export for an Overlapping VPN
In Layer 3 VPNs, a CE router is often a member of more than one VPN. Figure 1 illustrates the topology for the configuration example in this section. The configurations in this section illustrate local connectivity between CE routers connected to the same PE router using BGP.
The configuration statements enable the VPN AB Router CE2 to communicate with the VPN A Router CE1 and the VPN B Router CE3, both directly connected to the Router PE1. VPN routes that originate from the remote PE routers (the PE2 Router, in this case) are placed in a global Layer 3 VPN routing table (bgp.l3vpn.inet.0) and routes with appropriate route targets are imported into the routing tables, as dictated by the VRF import policy configuration.
Figure 1: Configuration of Policy-Based Export for an Overlapping VPN

Configuring Router PE1
This section describes how to configure Router PE1 in the backbone entity for this overlapping VPN by means of policy-based export.
Configure the routing instances for VPN-A, VPN-AB, and VPN-B:
Configuring Router PE2
The configuration for Router PE2 is the same as that for Router PE1; however, the interface names might differ.
Example: Configuring Policy-Based Export for a Nonforwarding Instance
This example shows how to use the instance-import and instance-export statements to control route export between multiple instances. This is equivalent to using the vrf-import and vrf-export statements for VPNs, except these are with nonforwarding instances, not VRF instances.
There are two nonforwarding instances: data and voice. The following is the configuration for a PE router.
Configure the routing instances for data and voice:
Configure a master policy:
Configure policies for each instance:
