.. _vyos.rest.vyos_bgp_global_module: ************************* vyos.rest.vyos_bgp_global ************************* **Manage BGP global configuration on VyOS devices using REST API** Version added: 1.0.0 .. contents:: :local: :depth: 1 Synopsis -------- - Manages BGP global configuration on VyOS devices via the REST API. - Covers system AS, parameters, neighbors, and peer-groups. - For per-neighbor address-family configuration use :ref:`vyos.rest.vyos_bgp_address_family `. - Uses REST API (``connection=httpapi``) instead of CLI. Parameters ---------- .. raw:: html
Parameter Choices/Defaults Comments
config
dictionary
BGP global configuration.
as_number
integer / required
BGP autonomous system number.
neighbors
list / elements=dictionary
BGP neighbors.
description
string
Neighbor description.
disable_connected_check
boolean
    Choices:
  • no
  • yes
Disable connected route check.
ebgp_multihop
integer
EBGP multihop TTL.
local_as
integer
Local AS number.
neighbor_address
string / required
Neighbor IP address.
password
string
MD5 password for neighbor.
peer_group
string
Peer group name.
remote_as
integer
Neighbor AS number.
shutdown
boolean
    Choices:
  • no
  • yes
Shutdown neighbor.
timers
dictionary
Neighbor timers.
holdtime
integer
Hold time in seconds.
keepalive
integer
Keepalive interval in seconds.
update_source
string
Source interface/IP for updates.
parameters
dictionary
BGP global parameters.
bestpath
dictionary
BGP bestpath parameters.
as_path
string
    Choices:
  • confed
  • ignore
  • multipath-relax
AS-path attribute comparison.
confederation
dictionary
AS confederation parameters.
identifier
integer
Confederation AS identifier.
peers
list / elements=integer
Peer ASs in confederation.
graceful_restart
boolean
    Choices:
  • no
  • yes
Enable graceful restart.
log_neighbor_changes
boolean
    Choices:
  • no
  • yes
Log neighbor up/down changes.
no_ipv4_unicast
boolean
    Choices:
  • no
  • yes
Disable IPv4 unicast default.
router_id
string
BGP router ID.
peer_groups
list / elements=dictionary
BGP peer groups.
description
string
Peer group description.
ebgp_multihop
integer
EBGP multihop TTL.
password
string
MD5 password.
peer_group
string / required
Peer group name.
remote_as
integer
Peer group AS number.
timers
dictionary
Peer group timers.
holdtime
integer
Hold time in seconds.
keepalive
integer
Keepalive interval in seconds.
update_source
string
Source interface/IP for updates.
state
string
    Choices:
  • merged ←
  • replaced
  • deleted
  • gathered
Desired state of the BGP global configuration.
merged adds or updates without removing existing config.
replaced replaces the entire BGP configuration.
deleted removes BGP configuration.
gathered returns current configuration as structured data.

Notes ----- .. note:: - Requires ``ansible_connection=httpapi`` with the VyOS httpapi plugin. - ``ansible_network_os`` must be set to ``vyos.rest.vyos``. - BGP system-as must be defined before any other BGP configuration. Examples -------- .. code-block:: yaml - name: Merge BGP global configuration vyos.rest.vyos_bgp_global: config: as_number: 65000 parameters: router_id: 192.0.1.1 neighbors: - neighbor_address: 192.0.2.1 remote_as: 65001 description: peer1 timers: holdtime: 30 keepalive: 10 peer_groups: - peer_group: PG1 remote_as: 65002 state: merged - name: Delete BGP configuration vyos.rest.vyos_bgp_global: state: deleted - name: Gather BGP global configuration vyos.rest.vyos_bgp_global: state: gathered Return Values ------------- Common return values are documented `here `_, the following are the fields unique to this module: .. raw:: html
Key Returned Description
after
dictionary
when changed
BGP configuration after this module ran.

before
dictionary
always
BGP configuration before this module ran.

commands
list
always
List of API command tuples sent to the device.

gathered
dictionary
when state is gathered
Current BGP configuration as structured data.

response
dictionary
always
Raw API response.

saved
boolean
when changed
Whether the config was saved after changes.



Status ------ Authors ~~~~~~~ - VyOS Community (@vyos)