Unable to use Auto-derived Route targets on certain routing instance type such VRF due to error "vrf-target auto is meant only for evpn or virtual-switch instance or mac-vrf"
Getting below error while trying to commit "set routing-instances instance-name vrf-target auto"
user@switch# commit check[edit routing-instances VRFtest vrf-target] 'auto' vrf-target auto is meant only for evpn or virtual-switch instance or mac-vrf
Auto-derived route targets simplify the configuration of VLAN services for EVPN, especially in VLAN-aware bundle services where you can have multiple VLANs, multiple bridge domains and the VLANS for a given service that are not present on all PE devices. Without the auto-derived target option enabled, EVPN Type 2 and Type 3 routes are imported into the EVPN instances (EVIs) on all receiving PE devices and the routes subsequently dropped for non-existing VLANs (bridge-domains). To minimize the number of routes that are distributed, different auto-derived route targets can be used within each bridge-domain.
Note: Devices don't auto-derive the route targets for EVPN route types other than Type 2 and Type 3.
user@switch# show routing-instancesVRFtest { instance-type vrf; ## ## Warning: vrf-target auto is meant only for evpn or virtual-switch instance or mac-vrf ## vrf-target auto;}
Auto-derived route targets are supported only in virtual switch and EVPN routing instances and will report a warning is configured under unsupported instances. This warning was introduced on new 20 codes to prevent incorrect use. On devices running early 18/19 versions which allowed committing the unsupported configuration you must correct these lines before upgrading units.
delete routing-instances VRFtest vrf-target auto
user@switch# commit checkconfiguration check succeeds