Configure Virtual Routing and Forwarding (VRF) instances on Cisco IOS XR devices. VRFs provide network segmentation by creating multiple isolated routing tables within a single router, enabling support for overlapping IP address spaces and multi-tenancy in service provider and enterprise networks.
Name Type Constraint Mandatory Default Value configuration Class configuration No
Name Type Constraint Mandatory Default Value configuration Class configuration No
Name Type Constraint Mandatory Default Value configuration Class configuration No
Name Type Constraint Mandatory Default Value vrfs List vrfs No
Name Type Constraint Mandatory Default Value name String Yes description String No fallback_vrf String No evpn_route_sync Integer min: 1, max: 65534 No address_family Class address_family No rd String No vpn_id Any String or String[Regex: ^[0-9a-fA-F]{1,6}:[0-9a-fA-F]{1,8}$] or String[Regex: ^.*[\$\%]\{.*$] No remote_route_filtering_disable Boolean true, falseNo
Name Type Constraint Mandatory Default Value enable Boolean true, falseNo import_route_policy String No export_route_policy String No import_from_bridge_domain_advertise_as_vpn Boolean true, falseNo import_from_vrf_advertise_as_vpn Boolean true, falseNo import_from_vrf_allow_backup Boolean true, falseNo import_from_vrf_allow_best_external Boolean true, falseNo import_from_default_vrf_advertise_as_vpn Boolean true, falseNo import_from_default_vrf_route_policy String No export_to_vrf_allow_imported_vpn Boolean true, falseNo export_to_vrf_allow_backup Boolean true, falseNo export_to_vrf_allow_best_external Boolean true, falseNo export_to_default_vrf_route_policy String No export_to_default_vrf_allow_imported_vpn Boolean true, falseNo max_prefix_limit Integer min: 32, max: 10000000 No max_prefix_threshold Integer min: 1, max: 100 No import_route_targets List import_route_targets No export_route_targets List export_route_targets No
Name Type Constraint Mandatory Default Value enable Boolean true, falseNo import_route_policy String No export_route_policy String No import_from_bridge_domain_advertise_as_vpn Boolean true, falseNo import_from_vrf_advertise_as_vpn Boolean true, falseNo import_from_vrf_allow_backup Boolean true, falseNo import_from_vrf_allow_best_external Boolean true, falseNo import_from_default_vrf_advertise_as_vpn Boolean true, falseNo import_from_default_vrf_route_policy String No export_to_vrf_allow_imported_vpn Boolean true, falseNo export_to_vrf_allow_backup Boolean true, falseNo export_to_vrf_allow_best_external Boolean true, falseNo export_to_default_vrf_route_policy String No export_to_default_vrf_allow_imported_vpn Boolean true, falseNo max_prefix_limit Integer min: 32, max: 10000000 No max_prefix_threshold Integer min: 1, max: 100 No import_route_targets List import_route_targets No export_route_targets List export_route_targets No
Name Type Constraint Mandatory Default Value enable Boolean true, falseNo import_route_policy String No export_route_policy String No import_from_bridge_domain_advertise_as_vpn Boolean true, falseNo import_from_vrf_advertise_as_vpn Boolean true, falseNo import_from_vrf_allow_backup Boolean true, falseNo import_from_vrf_allow_best_external Boolean true, falseNo import_from_default_vrf_advertise_as_vpn Boolean true, falseNo import_from_default_vrf_route_policy String No export_to_vrf_allow_imported_vpn Boolean true, falseNo export_to_vrf_allow_backup Boolean true, falseNo export_to_vrf_allow_best_external Boolean true, falseNo export_to_default_vrf_route_policy String No export_to_default_vrf_allow_imported_vpn Boolean true, falseNo max_prefix_limit Integer min: 32, max: 10000000 No max_prefix_threshold Integer min: 1, max: 100 No import_route_targets List import_route_targets No export_route_targets List export_route_targets No
Name Type Constraint Mandatory Default Value enable Boolean true, falseNo import_route_policy String No export_route_policy String No import_from_bridge_domain_advertise_as_vpn Boolean true, falseNo import_from_vrf_advertise_as_vpn Boolean true, falseNo import_from_vrf_allow_backup Boolean true, falseNo import_from_vrf_allow_best_external Boolean true, falseNo import_from_default_vrf_advertise_as_vpn Boolean true, falseNo import_from_default_vrf_route_policy String No export_to_vrf_allow_imported_vpn Boolean true, falseNo export_to_vrf_allow_backup Boolean true, falseNo export_to_vrf_allow_best_external Boolean true, falseNo export_to_default_vrf_route_policy String No export_to_default_vrf_allow_imported_vpn Boolean true, falseNo max_prefix_limit Integer min: 32, max: 10000000 No max_prefix_threshold Integer min: 1, max: 100 No import_route_targets List import_route_targets No export_route_targets List export_route_targets No
Name Type Constraint Mandatory Default Value enable Boolean true, falseNo import_route_policy String No export_route_policy String No import_from_bridge_domain_advertise_as_vpn Boolean true, falseNo import_from_vrf_advertise_as_vpn Boolean true, falseNo import_from_vrf_allow_backup Boolean true, falseNo import_from_vrf_allow_best_external Boolean true, falseNo import_from_default_vrf_advertise_as_vpn Boolean true, falseNo import_from_default_vrf_route_policy String No export_to_vrf_allow_imported_vpn Boolean true, falseNo export_to_vrf_allow_backup Boolean true, falseNo export_to_vrf_allow_best_external Boolean true, falseNo export_to_default_vrf_route_policy String No export_to_default_vrf_allow_imported_vpn Boolean true, falseNo max_prefix_limit Integer min: 32, max: 10000000 No max_prefix_threshold Integer min: 1, max: 100 No import_route_targets List import_route_targets No export_route_targets List export_route_targets No
Name Type Constraint Mandatory Default Value enable Boolean true, falseNo import_route_policy String No export_route_policy String No import_from_bridge_domain_advertise_as_vpn Boolean true, falseNo import_from_vrf_advertise_as_vpn Boolean true, falseNo import_from_vrf_allow_backup Boolean true, falseNo import_from_vrf_allow_best_external Boolean true, falseNo import_from_default_vrf_advertise_as_vpn Boolean true, falseNo import_from_default_vrf_route_policy String No export_to_vrf_allow_imported_vpn Boolean true, falseNo export_to_vrf_allow_backup Boolean true, falseNo export_to_vrf_allow_best_external Boolean true, falseNo export_to_default_vrf_route_policy String No export_to_default_vrf_allow_imported_vpn Boolean true, falseNo max_prefix_limit Integer min: 32, max: 10000000 No max_prefix_threshold Integer min: 1, max: 100 No import_route_targets List import_route_targets No export_route_targets List export_route_targets No
Name Type Constraint Mandatory Default Value rt String Yes stitching Choice disable, enableNo
Name Type Constraint Mandatory Default Value rt String Yes stitching Choice disable, enableNo
In IOS-XR, simply enabling an address-family under a VRF (e.g., address-family ipv4 unicast) is a valid and meaningful configuration, even without any additional sub-attributes. There are three supported ways to enable an address-family:
# 1. Enabled by having attributes configured in the address-family
# 3. Enabled with empty mapping
Note: All three forms produce the same result on the device. The enable: true form is preferred for clarity. The empty mapping {} is also supported. Declaring a key with no value (e.g., ipv6_unicast:) works functionally but the IDE schema validator will flag it; use enable: true or {} instead.
RD Formats
Fields that accept Route Distinguisher can be in any of four formats:
two-byte AS (e.g., 65001:100)
four-byte AS (e.g., 65536:100)
IPv4 address (e.g., 192.168.1.1:100)
auto (e.g., auto)
All four formats can be used interchangeably. The normalization layer automatically detects the user-specified format and maps to the correct attributes before sending to the device.
Example-1: VRF with explicitly enabled IPv4 and IPv6 unicast address-families.
description : " VRF Description "
Example-2: VRF with two-byte AS route distinguisher and IPv4 unicast address family with route targets.
description : " VRF Description "
import_route_policy : POLICY_IN
export_route_policy : POLICY_OUT
Example-3: VRF with four-byte AS route distinguisher, IPv6 unicast, import/export options, and max prefix limits.
description : " VRF Description "
import_route_policy : POLICY_IN
export_route_policy : POLICY_OUT
import_from_bridge_domain_advertise_as_vpn : true
Example-4: VRF with IPv4 address route distinguisher, fallback VRF, EVPN route sync, and VPN ID.
description : " VRF Description "
import_route_policy : POLICY_IN
export_route_policy : POLICY_OUT
Example-5: PE router Dual-stack L3VPN.
description : " CUSTOMER-A dual-stack L3VPN "
import_route_policy : CUSTOMER-A-V4
export_route_policy : CUSTOMER-A-V4
import_from_default_vrf_route_policy : LEAK-TO-CUSTOMER
import_route_policy : CUSTOMER-A-V6
export_route_policy : CUSTOMER-A-V6