.. _vyos.rest.vyos_lag_interfaces_module: ***************************** vyos.rest.vyos_lag_interfaces ***************************** **Manage LAG interface configuration on VyOS devices via REST API.** Version added: 1.0.0 .. contents:: :local: :depth: 1 Synopsis -------- - Manages Link Aggregation Group (LAG/bonding) interface configuration on VyOS devices using the HTTPS REST API. - A bonding interface's device path (``interfaces bonding ``) is shared with :ref:`vyos.rest.vyos_interfaces ` (L2 attributes: description, mtu, vrf) and :ref:`vyos.rest.vyos_l3_interfaces ` (addresses) -- every command this module generates is scoped to exactly ``mode``/ ``primary``/``hash-policy``/``member``/``arp-monitor``, never the bond's subtree as a whole, so it never touches those other modules' fields. Parameters ---------- .. raw:: html
Parameter Choices/Defaults Comments
config
list / elements=dictionary
List of LAG interface configurations.
arp_monitor
dictionary
ARP link monitoring parameters.
interval
integer
ARP monitoring interval in milliseconds.
target
list / elements=string
IP addresses to use for ARP monitoring.
hash_policy
string
    Choices:
  • layer2
  • layer2+3
  • layer3+4
Transmit hash policy.
members
list / elements=dictionary
List of member interfaces.
member
string
Name of the member interface.
mode
string
    Choices:
  • 802.3ad
  • active-backup
  • broadcast
  • round-robin
  • transmit-load-balance
  • adaptive-load-balance
  • xor-hash
LAG bonding mode.
name
string / required
Name of the LAG interface (e.g. bond0).
primary
string
Primary interface for active-backup mode.
state
string
    Choices:
  • merged ←
  • replaced
  • overridden
  • deleted
  • gathered
merged - Merge config with existing LAG settings.
replaced - Replace config for listed LAG interfaces.
overridden - Replace config for all LAG interfaces.
deleted - Remove listed or all LAG interface config.
gathered - Read LAG config from device without changes.

See Also -------- .. seealso:: :ref:`vyos.vyos.vyos_lag_interfaces_module` The official documentation on the **vyos.vyos.vyos_lag_interfaces** module. :ref:`vyos.rest.vyos_interfaces_module` The official documentation on the **vyos.rest.vyos_interfaces** module. :ref:`vyos.rest.vyos_l3_interfaces_module` The official documentation on the **vyos.rest.vyos_l3_interfaces** module. Examples -------- .. code-block:: yaml - name: Merge LAG interface configuration vyos.rest.vyos_lag_interfaces: config: - name: bond0 mode: 802.3ad hash_policy: layer2 members: - member: eth1 - member: eth2 state: merged - name: Delete all LAG interfaces vyos.rest.vyos_lag_interfaces: state: deleted - name: Gather current LAG configuration vyos.rest.vyos_lag_interfaces: 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
list
when changed
LAG configuration after this module ran.

before
list
always
LAG configuration before this module ran.

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

gathered
list
when state is gathered
Current LAG configuration as structured data.

response
dictionary
when changes are applied
Raw API response.

saved
boolean
when changes are applied
Whether the config was saved after changes.



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