.. _vyos.rest.vyos_vrf_module:
******************
vyos.rest.vyos_vrf
******************
**Manage VRF configuration on VyOS devices using REST API**
Version added: 1.0.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- Manages Virtual Routing and Forwarding (VRF) instances on VyOS devices via the REST API.
- Supports merged, replaced, overridden, deleted, and gathered states.
- Protocol configuration within VRFs (BGP, OSPFv2, static routes) is managed inline with focused scope (core fields only).
Parameters
----------
.. raw:: html
| Parameter |
Choices/Defaults |
Comments |
|
config
dictionary
|
|
VRF configuration.
|
|
bind_to_all
boolean
|
|
Enable binding services to all VRFs.
Whether omitting this option preserves the current device setting depends on state. With merged, and with deleted when specific instances are named, omission leaves it untouched. With replaced or overridden, omission deletes an existing setting, since those states replace everything not explicitly present in config. With deleted and no instances given, the entire VRF configuration (including this setting) is removed.
Only set this explicitly (true or false) when you want this module to manage it under merged or deleted with named instances.
|
|
instances
list
/ elements=dictionary
|
|
List of VRF instances.
|
|
|
address_family
list
/ elements=dictionary
|
|
Address family configuration.
|
|
|
|
afi
string
/ required
|
|
Address family identifier.
|
|
|
|
disable_forwarding
boolean
|
|
Disable IP forwarding for this address family.
|
|
|
|
nht_no_resolve_via_default
boolean
|
|
Disable next-hop resolution via default route.
|
|
|
|
route_maps
list
/ elements=dictionary
|
|
Route maps applied per protocol.
|
|
|
|
|
protocol
string
/ required
|
Choices:
- any
- babel
- bgp
- eigrp
- isis
- ospf
- rip
- static
|
Protocol to which the route map applies.
|
|
|
|
|
rm_name
string
/ required
|
|
Route map name.
|
|
|
description
string
|
|
VRF description.
|
|
|
disable
boolean
|
|
Administratively disable this VRF.
|
|
|
name
string
/ required
|
|
VRF instance name.
|
|
|
protocols
dictionary
|
|
Protocol configuration within this VRF instance.
|
|
|
|
bgp
dictionary
|
|
BGP protocol configuration (core fields only).
|
|
|
|
|
neighbor
list
/ elements=dictionary
|
|
BGP neighbors.
|
|
|
|
|
|
address
string
/ required
|
|
Neighbor IP address.
|
|
|
|
|
|
description
string
|
|
Neighbor description.
|
|
|
|
|
|
remote_as
integer
|
|
Neighbor AS number.
|
|
|
|
|
system_as
integer
|
|
BGP autonomous system number.
|
|
|
|
ospf
dictionary
|
|
OSPFv2 protocol configuration (core fields only).
|
|
|
|
|
areas
list
/ elements=dictionary
|
|
OSPF areas.
|
|
|
|
|
|
area_id
string
/ required
|
|
OSPF area identifier.
|
|
|
|
|
|
networks
list
/ elements=string
|
|
Networks in this area.
|
|
|
|
|
parameters
dictionary
|
|
OSPF parameters.
|
|
|
|
|
|
router_id
string
|
|
OSPF router ID.
|
|
|
|
static
dictionary
|
|
Static routes configuration.
|
|
|
|
|
routes
list
/ elements=dictionary
|
|
Static routes.
|
|
|
|
|
|
dest
string
/ required
|
|
Destination prefix.
|
|
|
|
|
|
next_hops
list
/ elements=string
|
|
Next-hop IP addresses.
|
|
|
table_id
integer
|
|
Routing table ID associated with this VRF.
The device enforces the valid range and rejects an invalid value with its own error message.
VyOS does not support changing an existing VRF's table ID in place -- it must be deleted and recreated. state=merged and state=replaced fail with a clear error if this differs from the current device value, rather than silently deleting and recreating the VRF. Use state=overridden (which deletes and recreates the VRF, re-applying every other desired field, since it already replaces everything to match config), or explicitly run state=deleted followed by state=merged/replaced as separate tasks.
|
|
|
vni
integer
|
|
Virtual Network Identifier.
|
|
state
string
|
Choices:
merged ←
- replaced
- overridden
- deleted
- gathered
|
Desired state of the VRF configuration.
|