cisco.iosxr.iosxr_bgp_global module – Resource module to configure BGP.
Note
This module is part of the cisco.iosxr collection (version 6.1.1).
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 cisco.iosxr
.
To use it in a playbook, specify: cisco.iosxr.iosxr_bgp_global
.
New in cisco.iosxr 2.0.0
Synopsis
This module configures and manages the attributes of BGP global on Cisco IOS-XR platforms.
Parameters
Parameter |
Comments |
---|---|
A list of configurations for BGP global. |
|
Autonomous system number of the router. |
|
Configure BFD parameters. |
|
Specifies the BFD session’s minimum-interval value for the neighbor. |
|
Specifies the BFD session’s multiplier value for the neighbor. |
|
BGP parameters. |
|
Enable AS-path loop checking for iBGP peers. Choices:
|
|
Enable automatic soft peer reset on policy reconfiguration. |
|
Disable an automatic soft reset of Border Gateway Protocol (BGP) peers. Choices:
|
|
Select the bestpath selection algorithim for BGP routes. |
|
AIGP attribute |
|
Ignore AIGP attribute. Choices:
|
|
Select the bestpath selection based on as-path. |
|
ignore Choices:
|
|
multipath-relax Choices:
|
|
Compare router-id for identical EBGP paths. Choices:
|
|
Cost community. |
|
ignore cost_community Choices:
|
|
MED attribute |
|
Allow comparing MED from different neighbors. Choices:
|
|
Compare MED among confederation paths. Choices:
|
|
Treat missing MED as the least preferred one. Choices:
|
|
BGP origin-AS knobs. |
|
BGP origin-AS knobs. |
|
BGP bestpath selection will allow ‘invalid’ origin-AS Choices:
|
|
BGP origin-AS knobs. |
|
BGP bestpath selection will use origin-AS validity Choices:
|
|
Cluster ID of this router acting as a route reflector. |
|
confederation. |
|
Set routing domain confederation AS. |
|
Enter peer ASs in BGP confederation mode. |
|
Configure default value. |
|
local preferance. Please refer vendor documentation for valid values |
|
Enforce the first AS for EBGP routes |
|
disable enforce 1st as Choices:
|
|
Immediately reset session if a link to a directly connected external peer goes down. |
|
disable fast external fallover. Choices:
|
|
Enable graceful restart support. |
|
Reset gracefully if configuration change forces a peer reset. Choices:
|
|
Time before stale routes are purged in seconds <1-6000>. |
|
Restart time advertised to neighbors in seconds <1-4095>. |
|
Enable graceful-restart. Choices:
|
|
Maximum time to wait for restart of GR capable peers in seconds <1-4095>. |
|
Install diversion path to RIB/CEF. |
|
Install diversion path to RIB/CEF. Choices:
|
|
Log bgp info |
|
Log neighbor inbound/outbound message. |
|
disable inbound outbound messages. Choices:
|
|
Log neighbor state info. |
|
Log neighbor up/down and reset reason. |
|
detail Choices:
|
|
disable Choices:
|
|
Maximum number of neighbors that can be configured |
|
Maximum number of neighbors <1-15000>. |
|
Change multipath selection criteria |
|
AS path |
|
Ignore as-path related check for multipath selection. |
|
Ignore everything onwards as-path for multipath selection. Choices:
|
|
BGP origin-AS knobs. |
|
BGP origin-AS validation knobs. |
|
Disable RPKI origin-AS validation. Choices:
|
|
Signal origin-AS validity towards peers. |
|
Signal origin-AS validity towards iBGP peers Choices:
|
|
Time to wait between an RPKI update and a BGP table walk. |
|
Prefix validation time (in seconds). |
|
No automatic prefix validation after an RPKI update. Choices:
|
|
Redistribute internal BGP routes. Choices:
|
|
Configure Router-id. Example- A.B.C.D IPv4 address. |
|
Configure background scanner interval for generic scanner Example- <5-3600>. |
|
Make eBGP neighbors with no policy pass all routes(cisco-support). Choices:
|
|
Set the max initial delay for sending updates Example-<0-3600> in secs. |
|
Control distribution of default information. |
|
Distribute a default route Choices:
|
|
Default metric. Example-<1-4294967295>. |
|
This allows the router to be brought in or out of service gracefully. |
|
All neighbors with graceful-maintenance config Choices:
|
|
Set options for iBGP peers. |
|
Set options for route-policy. |
|
Set options for outbound policy. |
|
Allow policy to modify all attributes. Choices:
|
|
Enable mpls parameters. |
|
Enter mpls interfaces in BGP mpls activate mode. |
|
Name of interface to enable mpls. |
|
Connect to PIM/PIM6. Choices:
|
|
Specify a neighbor router. |
|
Minimum interval between sending BGP routing updates.Example-<0-600>. |
|
Configure BFD parameters. |
|
Enable Fast detection |
|
Prevent bfd settings from being inherited from the parent. Choices:
|
|
set fast-detect Choices:
|
|
Hold down neighbor session until BFD session is up Choices:
|
|
Specifies the BFD session’s minimum-interval value for the neighbor. |
|
Specifies the BFD session’s multiplier value for the neighbor. |
|
Enable BMP logging for this neighbor. |
|
Enable BMP connection to particular server.Example-<1-8>. |
|
Advertise capability to the peer. |
|
BGP additional-paths commands. |
|
Additional paths receive capability |
|
set receive capability Choices:
|
|
set receive capability Choices:
|
|
Additional paths Send capability |
|
set send capability Choices:
|
|
set send capability Choices:
|
|
Suppress advertising capability to the peer. |
|
all capability |
|
Do not inherit this configuration from parent group. Choices:
|
|
set all. Choices:
|
|
4-byte-as capability |
|
set 4_byte_as. Choices:
|
|
Cluster ID of this router acting as a route reflector. |
|
Neighbor specific description. |
|
Propagate the DMZ link bandwidth. |
|
Do not inherit this configuration from parent group. Choices:
|
|
set dmz-link-bandwidth. Choices:
|
|
Set IP DSCP (DiffServ CodePoint).Please refer vendor document for valid entries. |
|
Allow EBGP neighbors not on directly connected networks. |
|
Disable BGP MPLS forwarding. Choices:
|
|
maximum hop count.Example-<1-255>. |
|
Receive extcommunity dmz link bandwidth from ebgp neighbor. |
|
Prevent ebgp-recv-community-dmz from being inherited from parent Choices:
|
|
set ebgp-recv-community-dmz. Choices:
|
|
Send extcommunity dmz link bandwidth from ebgp neighbor. |
|
Send cumulative community dmz link bandwidth of all multipaths to ebgp neighbor. Choices:
|
|
Prevent ebgp-send-community-dmz from being inherited from parent Choices:
|
|
set ebgp-send-community-dmz. Choices:
|
|
Enable egress peer engineering for this neighbor. |
|
Prevent egress-engineering from being inherited from parent Choices:
|
|
set egress-engineering. Choices:
|
|
Enforce the first AS for EBGP routes |
|
disable enforce 1st as Choices:
|
|
Attributes for Graceful Maintenance. This will cause neighbors to de-prefer routes from this router and choose alternates. This allows the router to be brought in or out of service gracefully. |
|
Routes will be announced with the graceful maintenance attributes while activated either here or under router bgp configuration. |
|
Prevent activate from being inherited from the parent. Choices:
|
|
activate. Choices:
|
|
Number of times to prepend the local AS number to the AS path of routes. Default=0 |
|
Prevent as prepends from being inherited from the parent. Choices:
|
|
Range of values for as prepends.Example-<0-6> . |
|
local preference with which to advertise routes to ibgp neigbors. Default=No Touch |
|
Prevent local preference from being inherited from the parent. Choices:
|
|
Range of values for Local Preference.Example-<0-4294967295> . |
|
set graceful maintenance. Choices:
|
|
Enable graceful restart support for this neighbor. |
|
Restart time advertised to neighbors in seconds <1-4095>. |
|
Maximum time to wait for restart of GR capable peers in seconds <1-4095>. |
|
Bypass the directly connected nexthop check for single-hop eBGP peering |
|
Prevent ignore-connected-check from being inherited from the parent Choices:
|
|
set ignore-connected-check. Choices:
|
|
Set keychain based authentication. |
|
Prevent keychain from being inherited from parent. Choices:
|
|
Name of the key chain - maximum 32 characters. |
|
Configure local parameter |
|
IPv4 address |
|
Prevent local address from being inherited from parent. Choices:
|
|
IPv4 address <A.B.C.D>. |
|
Specify local AS number. |
|
Prevent local AS from being inherited from parent. Choices:
|
|
Do not prepend local AS to announcements from this neighbor. |
|
Prepend only local AS to announcements to this neighbor. |
|
Dual-AS mode. Choices:
|
|
Prepend only local AS to announcements to this neighbor. Choices:
|
|
Do not prepend local AS to announcements from this neighbor. Choices:
|
|
2 byte, 4 byte As number |
|
Logging update messages per neighbor. |
|
Logging update/notification messages per neighbor. |
|
Inbound log messages |
|
Disable inbound message logging. Choices:
|
|
Prevents the msg log from being inherited from the parent. Choices:
|
|
Range for message log buffer size <1-100>. |
|
Outbound log messages |
|
Disable inbound message logging. Choices:
|
|
Prevents the msg log from being inherited from the parent. Choices:
|
|
Range for message log buffer size <1-100>. |
|
Neighbor router address. |
|
BGP origin-AS knobs. |
|
BGP origin-AS validation knobs. |
|
Disable RPKI origin-AS validation. Choices:
|
|
Set a password. |
|
Specifies an ENCRYPTED password will follow. |
|
Prevent password from being inherited from parent. Choices:
|
|
Set socket and BGP receive buffer size.Example <512-131072>. |
|
Neighbor Autonomous System. |
|
Set socket and BGP send buffer size.Example <4096-131072>. |
|
Establish BGP session using this TCP open mode. Choices:
|
|
Administratively shut down this neighbor. |
|
Prevent shutdown from being inherited from parent Choices:
|
|
shutdown. Choices:
|
|
TCP session configuration commands. |
|
Maximum Segment Size. |
|
Prevent mss from being inherited from parent Choices:
|
|
TCP initial maximum segment size. |
|
BGP per neighbor timers. |
|
hold time <3-65535> or 0 Disable hold time. |
|
keepalive interval <0-65535>. |
|
Enable EBGP TTL security. |
|
Prevent ttl-security from being inherited from parent Choices:
|
|
set ttl-security Choices:
|
|
BGP Update configuration. |
|
Inbound update message handling. |
|
Inbound update message filtering |
|
Attribute-filter configuration. |
|
Name of group. |
|
Update filtering syslog message. |
|
Disable update filtering syslog message. Choices:
|
|
Filtered update messages. |
|
Number of buffers to store filtered update messages. |
|
Source of routing updates.Refer vendor document for valid values. |
|
Use a neighbor-group and session-group template. |
|
Inherit configuration from a neighbor-group. |
|
Inherit address-family independent config from a session-group |
|
Enable non-stop-routing support for all neighbors. |
|
disable nsr Choices:
|
|
set nsr Choices:
|
|
Configure RPKI. |
|
Configure an RPKI route.A.B.C.D/length or X:X::X/length Network/Minimum prefix length |
|
Maximum prefix length. Example- <1-128> . |
|
Origin Autonomous System number (in asplain format) Example-<1-4294967295>. |
|
A.B.C.D/length or X:X::X/length Network/Minimum prefix length. |
|
Configure RPKI cache-servers. |
|
address of rpki server. |
|
Time to wait after a cache goes down to clean up stale routes |
|
Time between sending serial-queries for the RPKI cache-server |
|
Do not send serial-queries periodically Choices:
|
|
Purge time (in seconds) <30-360> |
|
Time to wait for a response from the RPKI cache-server |
|
Wait indefinitely for a response Choices:
|
|
Purge time (in seconds) <15-3600> |
|
Shutdown the RPKI cache-server Choices:
|
|
Specify a transport method for the RPKI cache-server |
|
Connect to the RPKI cache-server using SSH |
|
Specify a port number for the RPKI cache-server transport |
|
Connect to the RPKI cache-server using TCP (unencrypted) |
|
Specify a port number for the RPKI cache-server transport |
|
set socket parameters. |
|
socket receive buffer size.Example-<512-131072>. |
|
socket send buffer size.Example- <4096-131072>. |
|
BGP per neighbor timers. |
|
hold time <3-65535> or 0 Disable hold time. |
|
keepalive interval <0-65535>. |
|
BGP Update configuration. |
|
Inbound update message handling |
|
Inbound update message error handling. |
|
Inbound update message basic error handling |
|
Inbound update message basic error handling for EBGP neighbors |
|
disable Choices:
|
|
Inbound update message basic error handling for ibgp neighbors |
|
disable Choices:
|
|
Inbound update message extended error handling |
|
Inbound update message extended error handling for EBGP neighbors Choices:
|
|
Inbound update message extended error handling for ibgp neighbors Choices:
|
|
Upper bound on transient memory usage for update generation.Example-<16-2048>. |
|
BGP Update generation configuration. |
|
Enable logging of update generation events. Choices:
|
|
Specify a vrf name. |
|
Configure BFD parameters. |
|
Specifies the BFD session’s minimum-interval value for the neighbor. |
|
Specifies the BFD session’s multiplier value for the neighbor. |
|
BGP commands. |
|
Enable automatic soft peer reset on policy reconfiguration. |
|
Disable an automatic soft reset of Border Gateway Protocol (BGP) peers. Choices:
|
|
Select the bestpath selection algorithim for BGP routes. |
|
AIGP attribute |
|
Ignore AIGP attribute. Choices:
|
|
Select the bestpath selection based on as-path. |
|
ignore Choices:
|
|
multipath-relax Choices:
|
|
Compare router-id for identical EBGP paths. Choices:
|
|
Cost community. |
|
ignore cost_community Choices:
|
|
MED attribute |
|
Allow comparing MED from different neighbors. Choices:
|
|
Compare MED among confederation paths. Choices:
|
|
Treat missing MED as the least preferred one. Choices:
|
|
BGP origin-AS knobs. |
|
BGP origin-AS knobs. |
|
BGP bestpath selection will allow ‘invalid’ origin-AS Choices:
|
|
BGP origin-AS knobs. |
|
BGP bestpath selection will use origin-AS validity Choices:
|
|
Configure default value. |
|
local preferance. Please refer vendor documentation for valid values |
|
Enforce the first AS for EBGP routes |
|
disable enforce 1st as Choices:
|
|
Immediately reset session if a link to a directly connected external peer goes down. |
|
disable fast external fallover. Choices:
|
|
Log bgp info |
|
Log neighbor inbound/outbound message. |
|
disable inbound outbound messages. Choices:
|
|
Log neighbor state info. |
|
Log neighbor up/down and reset reason. |
|
detail Choices:
|
|
disable Choices:
|
|
Change multipath selection criteria |
|
AS path |
|
Ignore as-path related check for multipath selection. |
|
Ignore everything onwards as-path for multipath selection. Choices:
|
|
Redistribute internal BGP routes. Choices:
|
|
Configure Router-id. Example- A.B.C.D IPv4 address. |
|
Make eBGP neighbors with no policy pass all routes(cisco-support). Choices:
|
|
Control distribution of default information. |
|
Distribute a default route Choices:
|
|
Default metric. Example-<1-4294967295>. |
|
Enable mpls parameters. |
|
Enter mpls interfaces in BGP mpls activate mode. |
|
Name of interface to enable mpls. |
|
Specify a neighbor router. |
|
Minimum interval between sending BGP routing updates.Example-<0-600>. |
|
Configure BFD parameters. |
|
Enable Fast detection |
|
Prevent bfd settings from being inherited from the parent. Choices:
|
|
set fast-detect Choices:
|
|
Hold down neighbor session until BFD session is up Choices:
|
|
Specifies the BFD session’s minimum-interval value for the neighbor. |
|
Specifies the BFD session’s multiplier value for the neighbor. |
|
Enable BMP logging for this neighbor. |
|
Enable BMP connection to particular server.Example-<1-8>. |
|
Advertise capability to the peer. |
|
BGP additional-paths commands. |
|
Additional paths receive capability |
|
set receive capability Choices:
|
|
set receive capability Choices:
|
|
Additional paths Send capability |
|
set send capability Choices:
|
|
set send capability Choices:
|
|
Suppress advertising capability to the peer. |
|
all capability |
|
Do not inherit this configuration from parent group. Choices:
|
|
set all. Choices:
|
|
4-byte-as capability |
|
set 4_byte_as. Choices:
|
|
Cluster ID of this router acting as a route reflector. |
|
Neighbor specific description. |
|
Propagate the DMZ link bandwidth. |
|
Do not inherit this configuration from parent group. Choices:
|
|
set dmz-link-bandwidth. Choices:
|
|
Set IP DSCP (DiffServ CodePoint).Please refer vendor document for valid entries. |
|
Allow EBGP neighbors not on directly connected networks. |
|
Disable BGP MPLS forwarding. Choices:
|
|
maximum hop count.Example-<1-255>. |
|
Receive extcommunity dmz link bandwidth from ebgp neighbor. |
|
Prevent ebgp-recv-community-dmz from being inherited from parent Choices:
|
|
set ebgp-recv-community-dmz. Choices:
|
|
Send extcommunity dmz link bandwidth from ebgp neighbor. |
|
Send cumulative community dmz link bandwidth of all multipaths to ebgp neighbor. Choices:
|
|
Prevent ebgp-send-community-dmz from being inherited from parent Choices:
|
|
set ebgp-send-community-dmz. Choices:
|
|
Enable egress peer engineering for this neighbor. |
|
Prevent egress-engineering from being inherited from parent Choices:
|
|
set egress-engineering. Choices:
|
|
Enforce the first AS for EBGP routes |
|
disable enforce 1st as Choices:
|
|
Attributes for Graceful Maintenance. This will cause neighbors to de-prefer routes from this router and choose alternates. This allows the router to be brought in or out of service gracefully. |
|
Routes will be announced with the graceful maintenance attributes while activated either here or under router bgp configuration. |
|
Prevent activate from being inherited from the parent. Choices:
|
|
activate. Choices:
|
|
Number of times to prepend the local AS number to the AS path of routes. Default=0 |
|
Prevent as prepends from being inherited from the parent. Choices:
|
|
Range of values for as prepends.Example-<0-6> . |
|
local preference with which to advertise routes to ibgp neigbors. Default=No Touch |
|
Prevent local preference from being inherited from the parent. Choices:
|
|
Range of values for Local Preference.Example-<0-4294967295> . |
|
set graceful maintenance. Choices:
|
|
Enable graceful restart support for this neighbor. |
|
Restart time advertised to neighbors in seconds <1-4095>. |
|
Maximum time to wait for restart of GR capable peers in seconds <1-4095>. |
|
Bypass the directly connected nexthop check for single-hop eBGP peering |
|
Prevent ignore-connected-check from being inherited from the parent Choices:
|
|
set ignore-connected-check. Choices:
|
|
Set keychain based authentication. |
|
Prevent keychain from being inherited from parent. Choices:
|
|
Name of the key chain - maximum 32 characters. |
|
Configure local parameter |
|
IPv4 address |
|
Prevent local address from being inherited from parent. Choices:
|
|
IPv4 address <A.B.C.D>. |
|
Specify local AS number. |
|
Prevent local AS from being inherited from parent. Choices:
|
|
Do not prepend local AS to announcements from this neighbor. |
|
Prepend only local AS to announcements to this neighbor. |
|
Dual-AS mode. Choices:
|
|
Prepend only local AS to announcements to this neighbor. Choices:
|
|
Do not prepend local AS to announcements from this neighbor. Choices:
|
|
2 byte, 4 byte As number |
|
Logging update messages per neighbor. |
|
Logging update/notification messages per neighbor. |
|
Inbound log messages |
|
Disable inbound message logging. Choices:
|
|
Prevents the msg log from being inherited from the parent. Choices:
|
|
Range for message log buffer size <1-100>. |
|
Outbound log messages |
|
Disable inbound message logging. Choices:
|
|
Prevents the msg log from being inherited from the parent. Choices:
|
|
Range for message log buffer size <1-100>. |
|
Neighbor router address. |
|
BGP origin-AS knobs. |
|
BGP origin-AS validation knobs. |
|
Disable RPKI origin-AS validation. Choices:
|
|
Set a password. |
|
Specifies an ENCRYPTED password will follow. |
|
Prevent password from being inherited from parent. Choices:
|
|
Set socket and BGP receive buffer size.Example <512-131072>. |
|
Neighbor Autonomous System. |
|
Set socket and BGP send buffer size.Example <4096-131072>. |
|
Establish BGP session using this TCP open mode. Choices:
|
|
Administratively shut down this neighbor. |
|
Prevent shutdown from being inherited from parent Choices:
|
|
shutdown. Choices:
|
|
TCP session configuration commands. |
|
Maximum Segment Size. |
|
Prevent mss from being inherited from parent Choices:
|
|
TCP initial maximum segment size. |
|
BGP per neighbor timers. |
|
hold time <3-65535> or 0 Disable hold time. |
|
keepalive interval <0-65535>. |
|
Enable EBGP TTL security. |
|
Prevent ttl-security from being inherited from parent Choices:
|
|
set ttl-security Choices:
|
|
BGP Update configuration. |
|
Inbound update message handling. |
|
Inbound update message filtering |
|
Attribute-filter configuration. |
|
Name of group. |
|
Update filtering syslog message. |
|
Disable update filtering syslog message. Choices:
|
|
Filtered update messages. |
|
Number of buffers to store filtered update messages. |
|
Source of routing updates.Refer vendor document for valid values. |
|
Use a neighbor-group and session-group template. |
|
Inherit configuration from a neighbor-group. |
|
Inherit address-family independent config from a session-group |
|
route distinguisher. |
|
Automatic route distinguisher. Choices:
|
|
set socket parameters. |
|
socket receive buffer size.Example-<512-131072>. |
|
socket send buffer size.Example- <4096-131072>. |
|
BGP per neighbor timers. |
|
hold time <3-65535> or 0 Disable hold time. |
|
keepalive interval <0-65535>. |
|
VRF name. |
|
The state the configuration should be left in. - State purged removes all the BGP configurations from the target device. Use caution with this state. - State deleted only removes BGP attributes that this modules manages and does not negate the BGP process completely. Thereby, preserving address-family related configurations under BGP context. - Running states deleted and replaced will result in an error if there are address-family configuration lines present under a neighbor, or a vrf context that is to be removed. Please use the cisco.iosxr.iosxr_bgp_address_family or cisco.iosxr.iosxr_bgp_neighbor_address_family modules for prior cleanup. - Refer to examples for more details. |
|
The state the configuration should be left in. Choices:
|
Notes
Note
This module works with connection
network_cli
.
Examples
# Using merged
#
# Before state
# ------------
# RP/0/0/CPU0:10#show running-config router bgp
# Thu Feb 4 09:38:36.245 UTC
# % No such configuration item(s)
# RP/0/0/CPU0:10#
- name: Merge the following BGP global configuration
cisco.iosxr.iosxr_bgp_global:
config:
as_number: 65536
default_metric: 5
socket:
receive_buffer_size: 514
send_buffer_size: 4098
bgp:
confederation:
identifier: 4
bestpath:
med:
confed: true
cluster_id: 5
router_id: 192.0.2.10
neighbors:
- neighbor: 192.0.2.13
remote_as: 65538
bfd:
fast_detect:
strict_mode: true
multiplier: 6
minimum_interval: 20
vrfs:
- vrf: vrf1
default_metric: 5
#
# Task Output:
# ---------------
#
# before: {}
# commands:
# - router bgp 65536
# - bgp cluster-id 5
# - bgp router-id 192.0.2.10
# - bgp bestpath med confed
# - bgp confederation identifier 4
# - default-metric 5
# - socket receive-buffer-size 514
# - socket send-buffer-size 4098
# - neighbor 192.0.2.13
# - bfd fast-detect strict-mode
# - bfd minimum-interval 20
# - bfd multiplier 6
# - remote-as 65538
# - vrf vrf1
# - default-metric 5
#
# after:
# as_number: '65536'
# bgp:
# bestpath:
# med:
# confed: true
# cluster_id: '5'
# confederation:
# identifier: 4
# router_id: 192.0.2.10
# default_metric: 5
# neighbors:
# - bfd:
# fast_detect:
# strict_mode: true
# minimum_interval: 20
# multiplier: 6
# neighbor_address: 192.0.2.13
# remote_as: 65538
# socket:
# receive_buffer_size: 514
# send_buffer_size: 4098
# vrfs:
# - default_metric: 5
# vrf: vrf1
#
# After state
# -----------
# RP/0/0/CPU0:10#show running-config router bgp
# Thu Feb 4 09:44:32.480 UTC
# router bgp 65536
# bgp confederation identifier 4
# bgp router-id 192.0.2.10
# bgp cluster-id 5
# default-metric 5
# socket send-buffer-size 4098
# bgp bestpath med confed
# socket receive-buffer-size 514
# neighbor 192.0.2.13
# remote-as 65538
# bfd fast-detect strict-mode
# bfd multiplier 6
# bfd minimum-interval 20
# !
# vrf vrf1
# default-metric 5
# !
# !
# Using replaced
#
# Before state
# ------------
#
# RP/0/0/CPU0:10#show running-config router bgp
# Thu Feb 4 09:44:32.480 UTC
# router bgp 65536
# bgp confederation identifier 4
# bgp router-id 192.0.2.10
# bgp cluster-id 5
# default-metric 5
# socket send-buffer-size 4098
# bgp bestpath med confed
# socket receive-buffer-size 514
# neighbor 192.0.2.13
# remote-as 65538
# bfd fast-detect strict-mode
# bfd multiplier 6
# bfd minimum-interval 20
# !
# vrf vrf1
# default-metric 5
# !
# !
- name: Replace the following configuration
cisco.iosxr.iosxr_bgp_global:
state: replaced
config:
as_number: 65536
default_metric: 4
socket:
receive_buffer_size: 514
send_buffer_size: 4098
bgp:
confederation:
identifier: 4
bestpath:
med:
confed: true
cluster_id: 5
router_id: 192.0.2.10
neighbors:
- neighbor: 192.0.2.14
remote_as: 65538
bfd:
fast_detect:
strict_mode: true
multiplier: 6
minimum_interval: 20
vrfs:
- vrf: vrf1
default_metric: 5
#
# Task Output:
# -------------
#
# before:
# as_number: '65536'
# bgp:
# bestpath:
# med:
# confed: true
# cluster_id: '5'
# confederation:
# identifier: 4
# router_id: 192.0.2.10
# default_metric: 5
# neighbors:
# - bfd:
# fast_detect:
# strict_mode: true
# minimum_interval: 20
# multiplier: 6
# neighbor_address: 192.0.2.13
# remote_as: 65538
# socket:
# receive_buffer_size: 514
# send_buffer_size: 4098
# vrfs:
# - default_metric: 5
# vrf: vrf1
#
# commands:
# - router bgp 65536
# - default-metric 4
# - neighbor 192.0.2.14
# - bfd fast-detect strict-mode
# - bfd minimum-interval 20
# - bfd multiplier 6
# - remote-as 65538
# - no neighbor 192.0.2.13
#
# after:
# as_number: '65536'
# bgp:
# bestpath:
# med:
# confed: true
# cluster_id: '5'
# confederation:
# identifier: 4
# router_id: 192.0.2.10
# default_metric: 4
# neighbors:
# - bfd:
# fast_detect:
# strict_mode: true
# minimum_interval: 20
# multiplier: 6
# neighbor_address: 192.0.2.14
# remote_as: 65538
# socket:
# receive_buffer_size: 514
# send_buffer_size: 4098
# vrfs:
# - default_metric: 5
# vrf: vrf1
#
# After state
# -----------
#
# RP/0/0/CPU0:10#show running-config router bgp
# Thu Feb 4 09:54:11.161 UTC
# router bgp 65536
# bgp confederation identifier 4
# bgp router-id 192.0.2.10
# bgp cluster-id 5
# default-metric 4
# socket send-buffer-size 4098
# bgp bestpath med confed
# socket receive-buffer-size 514
# neighbor 192.0.2.14
# remote-as 65538
# bfd fast-detect strict-mode
# bfd multiplier 6
# bfd minimum-interval 20
# !
# vrf vrf1
# default-metric 5
# !
# !
# Using overridden
#
# Before state
# ------------
#
# RP/0/0/CPU0:10#show running-config router bgp
# Thu Feb 4 09:44:32.480 UTC
# router bgp 65536
# bgp confederation identifier 4
# bgp router-id 192.0.2.10
# bgp cluster-id 5
# default-metric 5
# socket send-buffer-size 4098
# bgp bestpath med confed
# socket receive-buffer-size 514
# neighbor 192.0.2.13
# remote-as 65538
# bfd fast-detect strict-mode
# bfd multiplier 6
# bfd minimum-interval 20
# !
# vrf vrf1
# default-metric 5
# !
# !
- name: Override running config with provided configuration
cisco.iosxr.iosxr_bgp_global:
state: overridden
config:
as_number: 65536
default_metric: 4
socket:
receive_buffer_size: 514
send_buffer_size: 4098
bgp:
confederation:
identifier: 4
bestpath:
med:
confed: true
cluster_id: 5
router_id: 192.0.2.10
neighbors:
- neighbor: 192.0.2.14
remote_as: 65538
bfd:
fast_detect:
strict_mode: true
multiplier: 6
minimum_interval: 20
vrfs:
- vrf: vrf1
default_metric: 5
#
# Task Output:
# -------------
#
# before:
# as_number: '65536'
# bgp:
# bestpath:
# med:
# confed: true
# cluster_id: '5'
# confederation:
# identifier: 4
# router_id: 192.0.2.10
# default_metric: 5
# neighbors:
# - bfd:
# fast_detect:
# strict_mode: true
# minimum_interval: 20
# multiplier: 6
# neighbor_address: 192.0.2.13
# remote_as: 65538
# socket:
# receive_buffer_size: 514
# send_buffer_size: 4098
# vrfs:
# - default_metric: 5
# vrf: vrf1
#
# commands:
# - router bgp 65536
# - default-metric 4
# - neighbor 192.0.2.14
# - bfd fast-detect strict-mode
# - bfd minimum-interval 20
# - bfd multiplier 6
# - remote-as 65538
# - no neighbor 192.0.2.13
#
# after:
# as_number: '65536'
# bgp:
# bestpath:
# med:
# confed: true
# cluster_id: '5'
# confederation:
# identifier: 4
# router_id: 192.0.2.10
# default_metric: 4
# neighbors:
# - bfd:
# fast_detect:
# strict_mode: true
# minimum_interval: 20
# multiplier: 6
# neighbor_address: 192.0.2.14
# remote_as: 65538
# socket:
# receive_buffer_size: 514
# send_buffer_size: 4098
# vrfs:
# - default_metric: 5
# vrf: vrf1
# After state
# -----------
#
# RP/0/0/CPU0:10#show running-config router bgp
# Thu Feb 4 09:54:11.161 UTC
# router bgp 65536
# bgp confederation identifier 4
# bgp router-id 192.0.2.10
# bgp cluster-id 5
# default-metric 4
# socket send-buffer-size 4098
# bgp bestpath med confed
# socket receive-buffer-size 514
# neighbor 192.0.2.14
# remote-as 65538
# bfd fast-detect strict-mode
# bfd multiplier 6
# bfd minimum-interval 20
# !
# vrf vrf1
# default-metric 5
# !
# !
# Using deleted
#
# Before state
# ------------
#
# RP/0/0/CPU0:10#show running-config router bgp
# Thu Feb 4 09:54:11.161 UTC
# router bgp 65536
# bgp confederation identifier 4
# bgp router-id 192.0.2.10
# bgp cluster-id 5
# default-metric 4
# socket send-buffer-size 4098
# bgp bestpath med confed
# socket receive-buffer-size 514
# neighbor 192.0.2.14
# remote-as 65538
# bfd fast-detect strict-mode
# bfd multiplier 6
# bfd minimum-interval 20
# !
# vrf vrf1
# default-metric 5
# !
# !
#
- name: Delete BGP configurations handled by this module
cisco.iosxr.iosxr_bgp_global:
config:
as_number: 65536
state: deleted
#
# Task Output:
# -------------
#
# before:
# as_number: '65536'
# bgp:
# bestpath:
# med:
# confed: true
# cluster_id: '5'
# confederation:
# identifier: 4
# router_id: 192.0.2.10
# default_metric: 4
# neighbors:
# - bfd:
# fast_detect:
# strict_mode: true
# minimum_interval: 20
# multiplier: 6
# neighbor_address: 192.0.2.14
# remote_as: 65538
# socket:
# receive_buffer_size: 514
# send_buffer_size: 4098
# vrfs:
# - default_metric: 5
# vrf: vrf1
#
# commands:
# - router bgp 65536
# - no bgp cluster-id 5
# - no bgp router-id 192.0.2.10
# - no bgp bestpath med confed
# - no bgp confederation identifier 4
# - no default-metric 4
# - no socket receive-buffer-size 514
# - no socket send-buffer-size 4098
# - no neighbor 192.0.2.14
# - no vrf vrf1
#
# after:
# as_number: '65536'
#
# After state
# -----------
#
# RP/0/0/CPU0:10#show running-config router bgp
# Thu Feb 4 10:01:08.232 UTC
# router bgp 65536
# !
#
# Using purged
#
# Before state
# ------------
#
# RP/0/0/CPU0:10#show running-config router bgp
# Thu Feb 4 09:54:11.161 UTC
# router bgp 65536
# bgp confederation identifier 4
# bgp router-id 192.0.2.10
# bgp cluster-id 5
# default-metric 5
# socket send-buffer-size 4098
# bgp bestpath med confed
# socket receive-buffer-size 514
# neighbor 192.0.2.13
# remote-as 65538
# bfd fast-detect strict-mode
# bfd multiplier 6
# bfd minimum-interval 20
# !
# vrf vrf1
# default-metric 5
# !
# !
#
- name: Purge all BGP configurations from the device
cisco.iosxr.iosxr_bgp_global:
state: purged
#
# Task Output:
# -------------
#
# before:
# as_number: '65536'
# bgp:
# bestpath:
# med:
# confed: true
# cluster_id: '5'
# confederation:
# identifier: 4
# router_id: 192.0.2.10
# default_metric: 5
# neighbors:
# - bfd:
# fast_detect:
# strict_mode: true
# minimum_interval: 20
# multiplier: 6
# neighbor_address: 192.0.2.13
# remote_as: 65538
# socket:
# receive_buffer_size: 514
# send_buffer_size: 4098
# vrfs:
# - default_metric: 5
# vrf: vrf1
#
# commands:
# - no router bgp 65536
#
# after: {}
#
# After state
# -----------
#
# RP/0/0/CPU0:10#show running-config router bgp
# Thu Feb 4 09:38:36.245 UTC
# % No such configuration item(s)
# RP/0/0/CPU0:10#
#
#
# Using Rendered
# -----------------
#
- name: >-
Render platform specific configuration lines (without connecting to the
device)
cisco.iosxr.iosxr_bgp_global:
state: rendered
config:
as_number: 1
default_metric: 4
vrfs:
- vrf: vrf3
bfd:
minimum_interval: 20
multiplier: 10
bgp:
fast_external_fallover:
disable: true
router_id: 1.2.3.4
auto_policy_soft_reset:
disable: true
timers:
keepalive_time: 20
holdtime: 30
- vrf: vrf2
bgp:
enforce_first_as:
disable: true
default_metric: 4
neighbors:
- neighbor: 1.1.1.3
remote_as: 2
graceful_maintenance:
set: true
activate:
inheritance_disable: true
local_preference:
value: 1
as_prepends:
value: 2
#
# Task output
# -----------------------
# rendered:
# - router bgp 1
# - default-metric 4
# - vrf vrf3
# - bfd multiplier 10
# - bfd minimum-interval 20
# - bgp auto-policy-soft-reset disable
# - bgp fast-external-fallover disable
# - bgp router-id 1.2.3.4
# - timers bgp 20 30
# - vrf vrf2
# - neighbor 1.1.1.3
# - remote-as 2
# - graceful-maintenance
# - graceful-maintenance activate inheritance-disable
# - graceful-maintenance local-preference 1
# - graceful-maintenance as-prepends 2
# - bgp enforce-first-as disable
# - default-metric 4
# Using parsed
#
# parsed.cfg
# ------------
# router bgp 65536
# bgp confederation identifier 4
# bgp router-id 192.0.2.10
# bgp cluster-id 5
# default-metric 4
# socket send-buffer-size 4098
# bgp bestpath med confed
# socket receive-buffer-size 514
# neighbor 192.0.2.11
# remote-as 65537
# cluster-id 3
# !
# neighbor 192.0.2.14
# remote-as 65538
# bfd fast-detect strict-mode
# bfd multiplier 6
# bfd minimum-interval 20
# !
# !
#
- name: Parse externally provided BGP config
cisco.iosxr.iosxr_bgp_global:
running_config: "{{ lookup('file', 'parsed.cfg') }}"
state: parsed
# Task output
# -----------------------
# parsed:
# as_number: '65536'
# bgp:
# bestpath:
# med:
# confed: true
# cluster_id: '5'
# confederation:
# identifier: 4
# router_id: 192.0.2.10
# default_metric: 4
# neighbors:
# - cluster_id: '3'
# neighbor_address: 192.0.2.11
# remote_as: 65537
# - bfd:
# fast_detect:
# strict_mode: true
# minimum_interval: 20
# multiplier: 6
# neighbor_address: 192.0.2.14
# remote_as: 65538
# socket:
# receive_buffer_size: 514
# send_buffer_size: 4098
# Using gathered
#
# Before state
# ------------
#
# RP/0/0/CPU0:10#show running-config router bgp
# Thu Feb 4 09:38:36.245 UTC
# router bgp 65536
# bgp confederation identifier 4
# bgp router-id 192.0.2.10
# bgp cluster-id 5
# default-metric 5
# socket send-buffer-size 4098
# bgp bestpath med confed
# socket receive-buffer-size 514
# neighbor 192.0.2.13
# remote-as 65538
# bfd fast-detect strict-mode
# bfd multiplier 6
# bfd minimum-interval 20
# !
# vrf vrf1
# default-metric 5
# !
# !
- name: Gather bgp global facts
cisco.iosxr.iosxr_bgp_global:
state: gathered
# Task Output:
# ------------
#
# gathered:
# as_number: '65536'
# bgp:
# bestpath:
# med:
# confed: true
# cluster_id: '5'
# confederation:
# identifier: 4
# router_id: 192.0.2.10
# default_metric: 5
# neighbors:
# - bfd:
# fast_detect:
# strict_mode: true
# minimum_interval: 20
# multiplier: 6
# neighbor_address: 192.0.2.13
# remote_as: 65538
# socket:
# receive_buffer_size: 514
# send_buffer_size: 4098
# vrfs:
# - default_metric: 5
# vrf: vrf1
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The resulting configuration model invocation. Returned: when changed Sample: |
|
The configuration prior to the model invocation. Returned: always Sample: |
|
The set of commands pushed to the remote device. Returned: always Sample: |
|
Facts about the network resource gathered from the remote device as structured data. Returned: when state is Sample: |
|
The device native config provided in running_config option parsed into structured data as per module argspec. Returned: when state is Sample: |
|
The provided configuration in the task rendered in device-native format (offline). Returned: when state is Sample: |