Skip to content

Route Map

Route maps are sophisticated policy tools that provide conditional routing decisions by combining flexible match criteria with configurable set actions, enabling complex routing policies for route redistribution, BGP path selection, and traffic engineering. They operate using sequence-based entries that define match conditions (such as prefix lists, access lists, AS paths, or communities) paired with set actions (including metric modification, next-hop assignment, community tagging, and BGP attribute manipulation). Route maps are fundamental building blocks for implementing advanced routing policies, enabling administrators to control route advertisement, path selection, and traffic flow while supporting features like conditional route filtering, multi-homed network optimization, and service provider peering policies.

Diagram

Diagram

Classes

configuration (iosxe.devices)

NameTypeConstraintMandatoryDefault Value
route_mapsList[route_maps]No

route_maps (iosxe.devices.configuration)

NameTypeConstraintMandatoryDefault Value
nameStringRegex: ^[^\s]*$Yes
entriesList[entries]No

entries (iosxe.devices.configuration.route_maps)

NameTypeConstraintMandatoryDefault Value
seqIntegermin: 0, max: 65535Yes
operationChoicedeny, permitNo
descriptionStringNo
continueBooleantrue, falseNo
continue_sequence_numberIntegermin: 0, max: 65535No
matchClass[match]No
setClass[set]No

match (iosxe.devices.configuration.route_maps.entries)

NameTypeConstraintMandatoryDefault Value
interfacesListStringNo
ipv4_address_access_listsListStringNo
ipv4_address_prefix_listsListStringNo
ipv4_next_hop_access_listsListStringNo
ipv4_next_hop_prefix_listsListStringNo
ipv6_address_access_listsStringNo
ipv6_address_prefix_listsStringNo
ipv6_next_hop_access_listsStringNo
ipv6_next_hop_prefix_listsStringNo
route_typeClass[route_type]No
source_protocolClass[source_protocol]No
tagsListIntegerNo
trackIntegermin: 1, max: 1000No
as_pathsListIntegerNo
community_listsListStringNo
community_list_exact_matchBooleantrue, falseNo
extcommunity_listsListStringNo
local_preferencesListIntegerNo

set (iosxe.devices.configuration.route_maps.entries)

NameTypeConstraintMandatoryDefault Value
default_interfacesListStringNo
globalBooleantrue, falseNo
interfacesListStringNo
ipv4_addressStringNo
ipv4_default_global_next_hop_addressesListStringNo
ipv4_default_next_hop_addressesListStringNo
ipv4_global_next_hop_addressesListStringNo
ipv4_next_hop_addressesListStringNo
ipv4_next_hop_selfBooleantrue, falseNo
ipv4_qos_groupIntegermin: 0, max: 99No
ipv6_addressesListStringNo
ipv6_default_global_next_hopStringNo
ipv6_default_next_hop_addressesListStringNo
ipv6_next_hop_addressesListStringNo
level_1Booleantrue, falseNo
level_1_2Booleantrue, falseNo
level_2Booleantrue, falseNo
metric_changeStringNo
metric_valueIntegermin: 0, max: 4294967295No
metric_delayStringNo
metric_reliabilityIntegermin: 0, max: 255No
metric_loadingIntegermin: 1, max: 255No
metric_mtuIntegermin: 1, max: 4294967295No
metric_typeChoiceexternal, internal, type-1, type-2No
tagIntegermin: 0, max: 4294967295No
vrfStringNo
as_path_prepend_asStringNo
as_path_prepend_last_asIntegermin: 1, max: 10No
as_path_tagBooleantrue, falseNo
as_path_replace_anyBooleantrue, falseNo
as_path_replace_asListStringNo
community_noneBooleantrue, falseNo
communitiesListStringNo
communities_additiveBooleantrue, falseNo
community_list_deleteBooleantrue, falseNo
community_list_standardIntegermin: 1, max: 99No
community_list_expandedIntegermin: 100, max: 500No
community_list_nameStringNo
extcomunity_rtListStringNo
extcomunity_sooStringNo
extcomunity_vpn_distinguisherStringNo
extcomunity_vpn_distinguisher_additiveBooleantrue, falseNo
local_preferenceIntegermin: 0, max: 4294967295No
weightIntegermin: 0, max: 65535No

route_type (iosxe.devices.configuration.route_maps.entries.match)

NameTypeConstraintMandatoryDefault Value
externalBooleantrue, falseNo
external_type_1Booleantrue, falseNo
external_type_2Booleantrue, falseNo
internalBooleantrue, falseNo
level_1Booleantrue, falseNo
level_2Booleantrue, falseNo
localBooleantrue, falseNo

source_protocol (iosxe.devices.configuration.route_maps.entries.match)

NameTypeConstraintMandatoryDefault Value
bgpListStringNo
connectedBooleantrue, falseNo
eigrpListStringNo
isisBooleantrue, falseNo
lispBooleantrue, falseNo
ospfListStringNo
ospfv3ListStringNo
ripBooleantrue, falseNo
staticBooleantrue, falseNo

Examples

iosxe:
devices:
- name: Device1
configuration:
route_maps:
- name: BGP-IN-FILTER
entries:
- seq: 10
operation: permit
description: Allow specific prefixes and set local preference
match:
ipv4_address_prefix_lists:
- CUSTOMER-PREFIXES
set:
local_preference: 200
communities:
- "65001:100"
- seq: 20
operation: permit
description: Allow remaining prefixes with default preference
match:
ipv4_address_prefix_lists:
- BACKUP-PREFIXES
set:
local_preference: 100
- name: BGP-OUT-FILTER
entries:
- seq: 10
operation: permit
description: Advertise internal routes with community
match:
source_protocol:
connected: true
static: true
set:
as_path_prepend_as: "65001 65001"
communities:
- "65001:200"
- seq: 20
operation: permit
description: Set next-hop for specific interfaces
match:
interfaces:
- GigabitEthernet0/0/1
set:
ipv4_next_hop_addresses:
- 192.168.1.1
metric_value: 100
- seq: 30
operation: deny
description: Deny all other routes