The constraint-rt-filter command enables the route target (RT) filter to control VPNv4 and VPNv6 route advertisement.
The undo constraint-rt-filter command restores the default configuration.
By default, the RT filter is enabled in the BGP-VPN-target address family view.
Usage Scenario
In a VPN ORF scenario, after the RT filter is enabled in the BGP-VPN-Target address family view, BGP peers filter VPNv4 and VPNv6 routes to be sent based on the import target (IRT) of the peers. After the RT filter is disabled, VPNv4 and VPNv6 routes are not filtered based on the peer IRT.
In an RR scenario, only VPN target routes need to be forwarded, and RT filters do not need to be enabled to guide VPNv4 and VPNv6 route advertisement. That is, after the RT filter is disabled in the RR scenario, the BGP peer directly forwards VPN target routes and does not guide VPNv4 and VPNv6 route advertisement. This reduces the burden on the RR and speeds up VPN route convergence.