Skip to content

Route Policy

Route policy is the shared control-plane filter and rewrite surface used by BGP, redistribution, and import analysis. It gives protocol docs one consistent way to describe filtering and attribute changes.

AreaLevelNotes
Prefix listsSupportedIPv4 prefix matching with ge/le where implemented.
Route mapsSupportedOrdered permit/deny sequences with match/set actions.
AS-path ACLsSupportedRegex-like matching for BGP AS_PATH strings.
Community listsSupportedStandard exact and expanded regex-style community matching.
Redistribution filtersSupportedUsed by BGP and OSPF-related import paths.
StandardCoverageNotes
RFC 4271 policy attributesBehaviour modelLOCAL_PREF, MED, AS_PATH, NEXT_HOP, ORIGIN.
RFC 1997 communitiesSupportedStandard community representation and matching.
Cisco route-map semanticsBehaviour modelOrdered sequence evaluation.
FeatureStatusNotes
ip prefix-listSupportedPrefix filters.
route-map NAME permit/deny <seq>SupportedOrdered policy.
match ip address prefix-listSupportedPrefix-list match.
match as-pathSupportedAS_PATH ACL match.
match communitySupportedCommunity-list match.
set local-preferenceSupportedBGP attribute rewrite.
set metricSupportedMED or protocol metric depending on context.
set as-path prependSupportedOutbound BGP path prepending.
set communitySupportedReplace/add/remove community values.
CommandIOS-styleJunos-styleVyOS-styleNotes
ip prefix-list PL permit 10.0.0.0/8 le 24SupportedPartialSupportedPrefix filter.
route-map RM permit 10SupportedPartialSupportedPolicy sequence.
ip as-path access-list 10 permit _65001_Supportedn/aPartialAS_PATH match.
ip community-list standard C permit 65000:10SupportedPartialPartialCommunity match.
show route-mapSupportedPartialPartialPolicy view.

Route maps are evaluated in sequence order. A route that does not match any permit sequence is rejected in policy contexts that require an explicit permit.

Canonical example
configure terminal
ip prefix-list CUSTOMER permit 10.10.0.0/16 le 24
route-map CUSTOMER-IN permit 10
match ip address prefix-list CUSTOMER
set local-preference 200
router bgp 65000
neighbor 192.0.2.2 route-map CUSTOMER-IN in
end

Vendor styles

IOS-style
ip prefix-list CUSTOMER permit 10.10.0.0/16 le 24
route-map CUSTOMER-IN permit 10
match ip address prefix-list CUSTOMER
set local-preference 200
Junos-style
set policy-options prefix-list CUSTOMER 10.10.0.0/16
set policy-options policy-statement CUSTOMER-IN term 10 from prefix-list CUSTOMER
set policy-options policy-statement CUSTOMER-IN term 10 then local-preference 200
set policy-options policy-statement CUSTOMER-IN term 10 then accept
VyOS-style
set policy prefix-list CUSTOMER rule 10 action permit
set policy prefix-list CUSTOMER rule 10 prefix 10.10.0.0/16
set policy route-map CUSTOMER-IN rule 10 action permit
set policy route-map CUSTOMER-IN rule 10 set local-preference 200

Junos policy-statement parity, Cisco AS-path regex boundary syntax fidelity, large-community support, RPKI validation, and complex policy language features are not complete.