frr.frr.frr_bgp module – Configure global BGP settings on Free Range Routing(FRR).
Note
This module is part of the frr.frr collection (version 2.0.0).
You might already have this collection installed if you are using the ansible
package.
It is not included in ansible-core
.
To check whether it is installed, run ansible-galaxy collection list
.
To install it, use: ansible-galaxy collection install frr.frr
.
To use it in a playbook, specify: frr.frr.frr_bgp
.
New in frr.frr 1.0.0
Synopsis
This module provides configuration management of global BGP parameters on devices running Free Range Routing(FRR).
Parameters
Parameter |
Comments |
---|---|
Specifies the BGP related configuration. |
|
Specifies BGP address family related configurations. |
|
Type of address family to configure. Choices:
|
|
Specifies BGP neighbor related configurations in Address Family configuration mode. |
|
Enable the address family for this neighbor. Choices:
|
|
Maximum number of prefixes to accept from this peer. The range is from 1 to 4294967295. |
|
Neighbor router address. |
|
Enable/disable the next hop calculation for this neighbor. Choices:
|
|
Remove the private AS number from outbound updates. Choices:
|
|
Specify a neighbor as a route reflector client. Choices:
|
|
Specify a neighbor as a route server client. Choices:
|
|
Specify networks to announce via BGP. For operation replace, this option is mutually exclusive with root level networks option. |
|
Subnet mask length for the network to announce(e.g, 8, 16, 24, etc.). |
|
Network ID to announce via BGP. |
|
Route map to modify the attributes. |
|
Specifies the redistribute information from another routing protocol. |
|
Specifies the instance ID/table ID for this protocol Valid for ospf and table |
|
Specifies the metric for redistributed routes. |
|
Specifies the protocol for configuring redistribute information. Choices:
|
|
Specifies the route map reference. |
|
Specifies the type of cast for the address family. Choices:
|
|
Specifies the BGP Autonomous System (AS) number to configure on the device. |
|
Enable/disable logging neighbor up/down and reset reason. Choices:
|
|
Specifies BGP neighbor related configurations. |
|
Minimum interval between sending BGP routing updates for this neighbor. |
|
Neighbor specific description. |
|
Specifies the maximum hop count for EBGP neighbors not on directly connected networks. The range is from 1 to 255. |
|
Administratively shutdown or enable a neighbor. Choices:
|
|
The local AS number for the neighbor. |
|
Neighbor router address. |
|
Password to authenticate the BGP peer connection. |
|
Name of the peer group that the neighbor is a member of. |
|
The TCP Port number to use for this neighbor. The range is from 0 to 65535. |
|
Remote AS of the BGP neighbor to configure. |
|
Specifies BGP neighbor timer related configurations. |
|
Interval (in seconds) after not receiving a keepalive message that FRR declares a peer dead. The range is from 0 to 65535. |
|
Frequency (in seconds) with which the FRR sends keepalive messages to its peer. The range is from 0 to 65535. |
|
Source of the routing updates. |
|
Specify networks to announce via BGP. For operation replace, this option is mutually exclusive with networks option under address_family. For operation replace, if the device already has an address family activated, this option is not allowed. |
|
Subnet mask length for the network to announce(e.g, 8, 16, 24, etc.). |
|
Network ID to announce via BGP. |
|
Route map to modify the attributes. |
|
Configures the BGP routing process router-id value. |
|
Specifies the operation to be performed on the BGP process configured on the device. In case of merge, the input configuration will be merged with the existing BGP configuration on the device. In case of replace, if there is a diff between the existing configuration and the input configuration, the existing configuration will be replaced by the input configuration for every option that has the diff. In case of override, all the existing BGP configuration will be removed from the device and replaced with the input configuration. In case of delete the existing BGP configuration will be removed from the device. Choices:
|
Notes
Note
Tested against FRRouting 6.0.
Examples
- name: configure global bgp as 64496
frr.frr.frr_bgp:
config:
bgp_as: 64496
router_id: 192.0.2.1
log_neighbor_changes: true
neighbors:
- neighbor: 192.51.100.1
remote_as: 64497
timers:
keepalive: 120
holdtime: 360
- neighbor: 198.51.100.2
remote_as: 64498
networks:
- prefix: 192.0.2.0
masklen: 24
route_map: RMAP_1
- prefix: 198.51.100.0
masklen: 24
address_family:
- afi: ipv4
safi: unicast
redistribute:
- protocol: ospf
id: 223
metric: 10
operation: merge
- name: Configure BGP neighbors
frr.frr.frr_bgp:
config:
bgp_as: 64496
neighbors:
- neighbor: 192.0.2.10
remote_as: 64496
password: ansible
description: IBGP_NBR_1
timers:
keepalive: 120
holdtime: 360
- neighbor: 192.0.2.15
remote_as: 64496
description: IBGP_NBR_2
advertisement_interval: 120
operation: merge
- name: Configure BGP neighbors under address family mode
frr.frr.frr_bgp:
config:
bgp_as: 64496
address_family:
- afi: ipv4
safi: multicast
neighbors:
- neighbor: 203.0.113.10
activate: yes
maximum_prefix: 250
- neighbor: 192.0.2.15
activate: yes
route_reflector_client: true
operation: merge
- name: Configure root-level networks for BGP
frr.frr.frr_bgp:
config:
bgp_as: 64496
networks:
- prefix: 203.0.113.0
masklen: 27
route_map: RMAP_1
- prefix: 203.0.113.32
masklen: 27
route_map: RMAP_2
operation: merge
- name: remove bgp as 64496 from config
frr.frr.frr_bgp:
config:
bgp_as: 64496
operation: delete
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The list of configuration mode commands to send to the device Returned: always Sample: |