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