.. _vyos.rest.vyos_route_maps_module:
*************************
vyos.rest.vyos_route_maps
*************************
**Manage route-map configuration on VyOS devices using REST API**
Version added: 1.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- Manages route maps on VyOS via the REST API.
- Uses REST API (``connection=httpapi``) instead of CLI.
- Covers the commonly used match/set fields (as documented below). VyOS's route-map schema is considerably larger than this (EVPN attributes, extended communities, RPKI matching, on-match goto/next, route-source, source-peer, source-vrf, and more) -- those are not modeled by this module and are a real, documented limitation, not an oversight.
Parameters
----------
.. raw:: html
| Parameter |
Choices/Defaults |
Comments |
|
config
list
/ elements=dictionary
|
|
List of route-map configurations.
|
|
entries
list
/ elements=dictionary
|
|
Route map rules.
|
|
|
action
string
|
|
Permit or deny.
|
|
|
call
string
|
|
Call another route map.
|
|
|
continue_sequence
integer
|
|
Continue at a different sequence number.
|
|
|
description
string
|
|
Rule description.
|
|
|
match
dictionary
|
|
Match conditions.
|
|
|
|
interface
string
|
|
Interface to match.
|
|
|
|
ip
dictionary
|
|
IPv4 next-hop match parameters.
|
|
|
|
|
nexthop_address
string
|
|
IPv4 next-hop address to match.
|
|
|
|
|
nexthop_prefix_list
string
|
|
IPv4 next-hop prefix-list to match.
|
|
|
|
ipv6
dictionary
|
|
IPv6 next-hop match parameters.
|
|
|
|
|
nexthop_address
string
|
|
IPv6 next-hop address to match.
|
|
|
|
metric
integer
|
|
Metric of route to match.
|
|
|
|
origin
string
|
Choices:
- egp
- igp
- incomplete
|
BGP origin code to match.
|
|
|
|
peer
string
|
|
Peer address to match.
|
|
|
|
prefix_list
string
|
|
IPv4 prefix-list to match.
|
|
|
|
prefix_list6
string
|
|
IPv6 prefix-list to match.
|
|
|
|
protocol
string
|
Choices:
- babel
- bgp
- connected
- isis
- kernel
- ospf
- ospfv3
- rip
- ripng
- static
- table
- vnc
|
Match protocol via which the route was learnt.
|
|
|
sequence
integer
/ required
|
|
Rule sequence number (1-65535).
|
|
|
set
dictionary
|
|
Route parameters to set.
|
|
|
|
aggregator
dictionary
|
|
BGP aggregator attribute.
|
|
|
|
|
as_
integer
|
|
AS number of an aggregation.
aliases: as
|
|
|
|
|
ip
string
|
|
IP address of an aggregation.
|
|
|
|
as_path_exclude
string
|
|
AS number(s) to remove from the as-path attribute.
|
|
|
|
as_path_prepend
string
|
|
AS number(s) to prepend to the as-path attribute.
|
|
|
|
as_path_prepend_last_as
integer
|
|
Number of times to prepend the last AS number in the as-path.
|
|
|
|
atomic_aggregate
boolean
|
|
Set the BGP atomic aggregate attribute.
|
|
|
|
community
dictionary
|
|
BGP community attribute.
|
|
|
|
|
add
list
/ elements=string
|
|
Communities to add to a prefix.
|
|
|
|
|
delete
string
|
|
Remove communities defined in a list from a prefix.
|
|
|
|
|
none
boolean
|
|
Completely remove the communities attribute from a prefix.
|
|
|
|
|
replace
list
/ elements=string
|
|
Communities to set for a prefix.
|
|
|
|
distance
integer
|
|
Locally significant administrative distance.
|
|
|
|
ip_next_hop
string
|
|
IPv4 next-hop address to set.
|
|
|
|
ipv6_next_hop
dictionary
|
|
IPv6 next-hop to set.
|
|
|
|
|
global
string
|
|
Nexthop IPv6 global address.
|
|
|
|
|
local
string
|
|
Nexthop IPv6 local address.
|
|
|
|
|
peer_address
boolean
|
|
Use the peer address (BGP only) as the nexthop.
|
|
|
|
|
prefer_global
boolean
|
|
Prefer the global address as the nexthop.
|
|
|
|
large_community
dictionary
|
|
BGP large community attribute.
|
|
|
|
|
add
list
/ elements=string
|
|
Large communities to add to a prefix.
|
|
|
|
|
delete
string
|
|
Remove large communities defined in a list from a prefix.
|
|
|
|
|
none
boolean
|
|
Completely remove the large-community attribute from a prefix.
|
|
|
|
|
replace
list
/ elements=string
|
|
Large communities to set for a prefix.
|
|
|
|
local_preference
integer
|
|
BGP local preference.
|
|
|
|
metric
integer
|
|
Metric of route.
|
|
|
|
metric_type
string
|
|
Metric type.
|
|
|
|
origin
string
|
Choices:
- egp
- igp
- incomplete
|
BGP origin code to set.
|
|
|
|
originator_id
string
|
|
BGP originator ID.
|
|
|
|
src
string
|
|
Source address for route.
|
|
|
|
table
integer
|
|
Non-main kernel routing table.
|
|
|
|
tag
integer
|
|
Route tag value.
|
|
|
|
weight
integer
|
|
BGP weight.
|
|
route_map
string
/ required
|
|
Route map name.
|
|
state
string
|
Choices:
merged ←
- replaced
- overridden
- deleted
- gathered
|
Desired state of the route-map configuration.
merged adds or updates entries without removing existing ones.
replaced replaces each named route map mentioned in config.
overridden replaces all route maps.
deleted removes route maps. Without config removes all.
gathered returns current configuration as structured data.
|