The policy vpn-target command configures a device to implement VPN target-based filtering for received routes.
The undo policy vpn-target command cancels VPN target-based filtering.
By default, VPN target-based filtering is enabled for VPN routes.
Usage Scenario
After the undo policy vpn-target command is run on a device, the device does not compare the export RT of a VPN route with the import RT of the local VPN instance. In the inter-AS VPN Option B scenario, if the undo policy vpn-target command is not run, ensure that a VPN instance is created on the RR and the import RT of the local VPN instance matches the export RT of received VPN routes; otherwise, received VPN routes may be discarded.
Configuration Impact
After the policy vpn-target command is run on a device, the device accepts a VPN route if one export RT attribute contained in the VPN route matches the import IT of the local VPN instance, and then adds the VPN route to the VPN routing tables of the VPN instances of which the import RT matches the export RT of the VPN route.