cisco.iosxr.iosxr_bgp_templates module – Manages BGP templates resource module.
Note
This module is part of the cisco.iosxr collection (version 10.1.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 cisco.iosxr
.
To use it in a playbook, specify: cisco.iosxr.iosxr_bgp_templates
.
New in cisco.iosxr 6.0.0
Synopsis
This module configures and manages the attributes of BGP templates on Cisco IOS-XR platforms.
Parameters
Parameter |
Comments |
---|---|
BGP template configurations. |
|
Autonomous system number. |
|
A list of BGP neighbor group configurations. |
|
Enable address family and enter its config mode |
|
Per neighbor advertisement options |
|
Advertisement of routes with local-label |
|
disable local-labeled-route Choices:
|
|
set local-labeled-route Choices:
|
|
Allow permanent networks for this neighbor Choices:
|
|
address family. Choices:
|
|
AIGP attribute |
|
Ignore AIGP attribute. Choices:
|
|
send AIGP attribute. Choices:
|
|
send med options. |
|
disable Send AIGP value in MED. Choices:
|
|
set Send AIGP value in MED. Choices:
|
|
Set AIGP attribute. Choices:
|
|
Allow as-path with my AS present in it. |
|
set allowas_in Choices:
|
|
Number of occurences of AS number 1-10. |
|
Override matching AS-number while sending update |
|
Prevent as-override from being inherited from the parent. Choices:
|
|
set as_override Choices:
|
|
Change default route selection criteria.Allow BGP origin-AS knobs. Choices:
|
|
Advertise address prefix ORF capability to this neighbor. Choices:
|
|
Originate default route to this neighbor. |
|
Prevent default-originate from being inherited from the parent. Choices:
|
|
Route policy to specify criteria to originate default |
|
set default route. Choices:
|
|
Specify encapsulation type Choices:
|
|
Enable long lived graceful restart support. |
|
Treat neighbor as LLGR capable. Choices:
|
|
Maximum time to wait before purging long-lived stale routes. |
|
max accept time |
|
max send time |
|
Maximum number of prefixes to accept from this peer. |
|
Discard extra paths when limit is exceeded. Choices:
|
|
maximum no. of prefix limit.<1-4294967295. |
|
Restart time interval. |
|
hreshold value (%) at which to generate a warning msg <1-100>. |
|
Only give warning message when limit is exceeded. Choices:
|
|
Paths from this neighbor is eligible for multipath. Choices:
|
|
Disable the next hop calculation for this neighbor. |
|
Prevent next_hop_self from being inherited from the parent. Choices:
|
|
set next hop self. Choices:
|
|
Disable the next hop calculation for this neighbor. |
|
Prevent next_hop_unchanged from being inherited from the parent. Choices:
|
|
Do not overwrite nexthop before advertising multipaths. Choices:
|
|
set next hop unchanged. Choices:
|
|
Configure optimal-route-reflection group. |
|
Specify ORF and inbound filtering criteria.’ |
|
BGP origin-AS knobs. |
|
BGP origin-AS validation knobs. |
|
Disable RPKI origin-AS validation. Choices:
|
|
Remove private AS number from outbound updates. |
|
remove only if all ASes in the path are private. Choices:
|
|
Remove private AS number from inbound updates. Choices:
|
|
Prevent remove-private-AS from being inherited from the parent. Choices:
|
|
set remove private As. Choices:
|
|
Apply route policy to neighbor. |
|
Apply route policy to inbound routes. |
|
Apply route policy to outbound routes. |
|
Configure a neighbor as Route Reflector client. |
|
Prevent route-reflector-client from being inherited from the parent. Choices:
|
|
set route-reflector-client. Choices:
|
|
Address Family modifier Choices:
|
|
Send community attribute to this external neighbor. |
|
Prevent send_community_ebgp from being inherited from the parent. Choices:
|
|
set send_community_ebgp. Choices:
|
|
Allow the g-shut community to be sent to this external neighbor. |
|
Prevent send_community_gshut_ebgp from being inherited from the parent. Choices:
|
|
set send_community_gshut_ebgp. Choices:
|
|
Send extended community attribute to this external neighbor. |
|
Prevent send_extended_community_ebgp from being inherited from the parent. Choices:
|
|
set send_extended_community_ebgp. Choices:
|
|
Send multicast attributes to this neighbor . |
|
Disable send multicast attributes. Choices:
|
|
set send_multicast_attributes. Choices:
|
|
Signalling protocols to disable, BGP or LDP |
|
Select BGP to disable Choices:
|
|
Select LDP to disable Choices:
|
|
Per neighbor soft reconfiguration. |
|
inbound soft reconfiguration |
|
Allow inbound soft reconfiguration for this neighbor. Always use soft reconfig, even if route refresh is supported. Choices:
|
|
Prevent soft_reconfiguration from being inherited from the parent. Choices:
|
|
set inbound Choices:
|
|
update |
|
Disable originator loop check Choices:
|
|
Set originator loop check Choices:
|
|
Inherit configuration for this address-family from an af-group. |
|
Set default weight for routes from this neighbor. |
|
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>. |
|
Maximum time to wait for deletion of IDLE state dynamic peer. |
|
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:
|
|
Preserve iBGP CE neighbor path in ATTR_SET across VPN core. 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>. |
|
Local address subnet of routing updates |
|
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>. |
|
Maximum dynamic neighbors <1-4095>. |
|
Name of neighbor group. |
|
Set a password. |
|
Specifies an ENCRYPTED password will follow. |
|
Prevent password from being inherited from parent. Choices:
|
|
Assign this neighbor to a peer-set used for egress peer engineering <1-255>. |
|
Set precedence Choices:
|
|
Set socket and BGP receive buffer size.Example <512-131072>. |
|
Neighbor Autonomous System. |
|
Remote as-list configuration |
|
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>. |
|
Minimum acceptable holdtime from neighbor <3-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 |
|
This option is used only with state parsed. The value of this option should be the output received from the Iosxr device by executing the command show running-config router bgp. The state parsed reads the configuration from |
|
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/RP0/CPU0:10#show running-config router bgp
# Thu Mar 23 10:00:12.668 UTC
# % No such configuration item(s)
#
# RP/0/RP0/CPU0:10#
- name: Merge the provided configuration with the existing running configuration
cisco.iosxr.iosxr_bgp_templates:
config:
as_number: 65536
neighbor:
- address_family:
- advertise:
local_labeled_route:
set: true
afi: ipv4
safi: unicast
advertisement_interval: 10
bfd:
fast_detect:
strict_mode: true
internal_vpn_client: true
name: neighbor-group1
precedence: critical
- cluster_id: '1'
description: neighbor-group2
dmz_link_bandwidth:
set: true
ebgp_multihop:
value: 255
egress_engineering:
set: true
graceful_maintenance:
as_prepends:
value: 0
set: true
ignore_connected_check:
set: true
internal_vpn_client: true
local:
address:
inheritance_disable: true
local_as:
value: 6
name: neighbor-group2
precedence: flash
receive_buffer_size: 512
send_buffer_size: 4096
session_open_mode: both
tcp:
mss:
inheritance_disable: true
ttl_security:
set: true
update_source: Loopback919
state: merged
# Task Output
# -----------
# before: {}
# commands:
# - router bgp 65536
# - neighbor-group neighbor-group1
# - advertisement-interval 10
# - bfd fast-detect strict-mode
# - internal-vpn-client
# - precedence critical
# - address-family ipv4 unicast
# - advertise local-labeled-route
# - neighbor-group neighbor-group2
# - dmz-link-bandwidth
# - description neighbor-group2
# - cluster-id 1
# - ebgp-multihop 255
# - egress-engineering
# - internal-vpn-client
# - ignore-connected-check
# - local-as 6
# - local address inheritance-disable
# - precedence flash
# - receive-buffer-size 512
# - send-buffer-size 4096
# - session-open-mode both
# - tcp mss inheritance-disable
# - update-source Loopback919
# - ttl-security
# - graceful-maintenance
# - graceful-maintenance as-prepends 0
# after:
# as_number: '65536'
# neighbor:
# - address_family:
# - advertise:
# local_labeled_route:
# set: true
# afi: ipv4
# safi: unicast
# advertisement_interval: 10
# bfd:
# fast_detect:
# strict_mode: true
# internal_vpn_client: true
# name: neighbor-group1
# precedence: critical
# - cluster_id: '1'
# description: neighbor-group2
# dmz_link_bandwidth:
# set: true
# ebgp_multihop:
# value: 255
# egress_engineering:
# set: true
# graceful_maintenance:
# as_prepends:
# value: 0
# set: true
# ignore_connected_check:
# set: true
# internal_vpn_client: true
# local:
# address:
# inheritance_disable: true
# local_as:
# value: 6
# name: neighbor-group2
# precedence: flash
# receive_buffer_size: 512
# send_buffer_size: 4096
# session_open_mode: both
# tcp:
# mss:
# inheritance_disable: true
# ttl_security:
# set: true
# update_source: Loopback919
# After state:
# ------------
# RP/0/RP0/CPU0:10#show running-config router bgp
# Thu Mar 23 10:14:33.116 UTC
# router bgp 65536
# neighbor-group neighbor-group1
# bfd fast-detect strict-mode
# precedence critical
# advertisement-interval 10
# internal-vpn-client
# address-family ipv4 unicast
# advertise local-labeled-route
# !
# !
# neighbor-group neighbor-group2
# ebgp-multihop 255
# egress-engineering
# precedence flash
# graceful-maintenance
# as-prepends 0
# !
# tcp mss inheritance-disable
# local-as 6
# cluster-id 1
# dmz-link-bandwidth
# description neighbor-group2
# ttl-security
# local address inheritance-disable
# update-source Loopback919
# ignore-connected-check
# session-open-mode both
# send-buffer-size 4096
# receive-buffer-size 512
# internal-vpn-client
# !
# !
# Using replaced
# Before state:
# ------------
# RP/0/RP0/CPU0:10#show running-config router bgp
# Thu Mar 23 10:14:33.116 UTC
# router bgp 65536
# neighbor-group neighbor-group1
# bfd fast-detect strict-mode
# precedence critical
# advertisement-interval 10
# internal-vpn-client
# address-family ipv4 unicast
# advertise local-labeled-route
# !
# !
# neighbor-group neighbor-group2
# ebgp-multihop 255
# egress-engineering
# precedence flash
# graceful-maintenance
# as-prepends 0
# !
# tcp mss inheritance-disable
# local-as 6
# cluster-id 1
# dmz-link-bandwidth
# description neighbor-group2
# ttl-security
# local address inheritance-disable
# update-source Loopback919
# ignore-connected-check
# session-open-mode both
# send-buffer-size 4096
# receive-buffer-size 512
# internal-vpn-client
# !
# !
- name: Replaced given bgp_templates configuration
cisco.iosxr.iosxr_bgp_templates:
config:
as_number: 65536
neighbor:
- address_family:
- advertise:
local_labeled_route:
set: true
afi: ipv4
safi: unicast
advertisement_interval: 12
name: neighbor-group1
precedence: flash
- cluster_id: '2'
description: replace neighbor-group2
ebgp_multihop:
value: 254
graceful_maintenance:
as_prepends:
value: 2
set: true
update_source: Loopback917
name: neighbor-group2
state: replaced
# Task Output
# -----------
# before:
# as_number: '65536'
# neighbor:
# - address_family:
# - advertise:
# local_labeled_route:
# set: true
# afi: ipv4
# safi: unicast
# advertisement_interval: 10
# bfd:
# fast_detect:
# strict_mode: true
# internal_vpn_client: true
# name: neighbor-group1
# precedence: critical
# - cluster_id: '1'
# description: neighbor-group2
# dmz_link_bandwidth:
# set: true
# ebgp_multihop:
# value: 255
# egress_engineering:
# set: true
# graceful_maintenance:
# as_prepends:
# value: 0
# set: true
# ignore_connected_check:
# set: true
# internal_vpn_client: true
# local:
# address:
# inheritance_disable: true
# local_as:
# value: 6
# name: neighbor-group2
# precedence: flash
# receive_buffer_size: 512
# send_buffer_size: 4096
# session_open_mode: both
# tcp:
# mss:
# inheritance_disable: true
# ttl_security:
# set: true
# update_source: Loopback919
# commands:
# - router bgp 65536
# - neighbor-group neighbor-group1
# - no bfd fast-detect strict-mode
# - no internal-vpn-client
# - advertisement-interval 12
# - precedence flash
# - neighbor-group neighbor-group2
# - no dmz-link-bandwidth
# - no egress-engineering
# - no internal-vpn-client
# - no ignore-connected-check
# - no local-as 6
# - no local address inheritance-disable
# - no precedence flash
# - no receive-buffer-size 512
# - no send-buffer-size 4096
# - no session-open-mode both
# - no tcp mss inheritance-disable
# - no ttl-security
# - description replace neighbor-group2
# - cluster-id 2
# - ebgp-multihop 254
# - update-source Loopback917
# - graceful-maintenance as-prepends 2
# after:
# as_number: '65536'
# neighbor:
# - address_family:
# - advertise:
# local_labeled_route:
# set: true
# afi: ipv4
# safi: unicast
# advertisement_interval: 12
# name: neighbor-group1
# precedence: flash
# - cluster_id: '2'
# description: replace neighbor-group2
# ebgp_multihop:
# value: 254
# graceful_maintenance:
# as_prepends:
# value: 2
# set: true
# name: neighbor-group2
# update_source: Loopback917
# After state:
# ------------
# RP/0/RP0/CPU0:10#show running-config router bgp
# Thu Mar 23 10:23:34.104 UTC
# router bgp 65536
# neighbor-group neighbor-group1
# precedence flash
# advertisement-interval 12
# address-family ipv4 unicast
# advertise local-labeled-route
# !
# !
# neighbor-group neighbor-group2
# ebgp-multihop 254
# graceful-maintenance
# as-prepends 2
# !
# cluster-id 2
# description replace neighbor-group2
# update-source Loopback917
# !
# !
# Using deleted
# Before state:
# -------------
# RP/0/RP0/CPU0:10#show running-config router bgp
# Thu Mar 23 10:23:34.104 UTC
# router bgp 65536
# neighbor-group neighbor-group1
# precedence flash
# advertisement-interval 12
# address-family ipv4 unicast
# advertise local-labeled-route
# !
# !
# neighbor-group neighbor-group2
# ebgp-multihop 254
# graceful-maintenance
# as-prepends 2
# !
# cluster-id 2
# description replace neighbor-group2
# update-source Loopback917
# !
# !
- name: Delete given bgp_nbr_address_family configuration
cisco.iosxr.iosxr_bgp_templates: &deleted
config:
state: deleted
# Task Output
# -----------
# before:
# as_number: '65536'
# neighbor:
# - address_family:
# - advertise:
# local_labeled_route:
# set: true
# afi: ipv4
# safi: unicast
# advertisement_interval: 12
# name: neighbor-group1
# precedence: flash
# - cluster_id: '2'
# description: replace neighbor-group2
# ebgp_multihop:
# value: 254
# graceful_maintenance:
# as_prepends:
# value: 2
# set: true
# name: neighbor-group2
# update_source: Loopback917
# commands:
# - router bgp 65536
# - no neighbor-group neighbor-group1
# - no neighbor-group neighbor-group2
# after: {}
# After state:
# -------------
# RP/0/RP0/CPU0:10#show running-config router bgp
# Thu Mar 23 10:00:12.668 UTC
# % No such configuration item(s)
#
# RP/0/RP0/CPU0:10#
# Using gathered
# Before state:
# -------------
# RP/0/RP0/CPU0:10#show running-config router bgp
# Thu Mar 23 10:30:38.785 UTC
# router bgp 65536
# neighbor-group neighbor-group1
# bfd fast-detect strict-mode
# precedence critical
# advertisement-interval 10
# internal-vpn-client
# address-family ipv4 unicast
# advertise local-labeled-route
# !
# !
# neighbor-group neighbor-group2
# ebgp-multihop 255
# egress-engineering
# precedence flash
# graceful-maintenance
# as-prepends 0
# !
# tcp mss inheritance-disable
# local-as 6
# cluster-id 1
# dmz-link-bandwidth
# description neighbor-group2
# ttl-security
# local address inheritance-disable
# update-source Loopback919
# ignore-connected-check
# session-open-mode both
# send-buffer-size 4096
# receive-buffer-size 512
# internal-vpn-client
# !
# !
- name: Gather given bgp_templates configuration
cisco.iosxr.iosxr_bgp_templates: &id001
config:
state: gathered
# Task output
# -----------
# gathered:
# as_number: '65536'
# neighbor:
# - address_family:
# - advertise:
# local_labeled_route:
# set: true
# afi: ipv4
# safi: unicast
# advertisement_interval: 10
# bfd:
# fast_detect:
# strict_mode: true
# internal_vpn_client: true
# name: neighbor-group1
# precedence: critical
# - cluster_id: '1'
# description: neighbor-group2
# dmz_link_bandwidth:
# set: true
# ebgp_multihop:
# value: 255
# egress_engineering:
# set: true
# graceful_maintenance:
# as_prepends:
# value: 0
# set: true
# ignore_connected_check:
# set: true
# internal_vpn_client: true
# local:
# address:
# inheritance_disable: true
# local_as:
# value: 6
# name: neighbor-group2
# precedence: flash
# receive_buffer_size: 512
# send_buffer_size: 4096
# session_open_mode: both
# tcp:
# mss:
# inheritance_disable: true
# ttl_security:
# set: true
# update_source: Loopback919
# Using overridden
# Before state:
# -------------
# RP/0/RP0/CPU0:10#show running-config router bgp
# Thu Mar 23 10:30:38.785 UTC
# router bgp 65536
# neighbor-group neighbor-group1
# bfd fast-detect strict-mode
# precedence critical
# advertisement-interval 10
# internal-vpn-client
# address-family ipv4 unicast
# advertise local-labeled-route
# !
# !
# neighbor-group neighbor-group2
# ebgp-multihop 255
# egress-engineering
# precedence flash
# graceful-maintenance
# as-prepends 0
# !
# tcp mss inheritance-disable
# local-as 6
# cluster-id 1
# dmz-link-bandwidth
# description neighbor-group2
# ttl-security
# local address inheritance-disable
# update-source Loopback919
# ignore-connected-check
# session-open-mode both
# send-buffer-size 4096
# receive-buffer-size 512
# internal-vpn-client
# !
# !
- name: override given bgp_templates configuration
cisco.iosxr.iosxr_bgp_templates:
config:
as_number: 65536
neighbor:
- address_family:
- advertise:
local_labeled_route:
disable: true
afi: ipv4
safi: unicast
advertisement_interval: 12
bfd:
fast_detect:
strict_mode: true
name: neighbor-group1
precedence: flash
state: overridden
# Task Output
# -----------
# before:
# as_number: '65536'
# neighbor:
# - address_family:
# - advertise:
# local_labeled_route:
# set: true
# afi: ipv4
# safi: unicast
# advertisement_interval: 10
# bfd:
# fast_detect:
# strict_mode: true
# internal_vpn_client: true
# name: neighbor-group1
# precedence: critical
# - cluster_id: '1'
# description: neighbor-group2
# dmz_link_bandwidth:
# set: true
# ebgp_multihop:
# value: 255
# egress_engineering:
# set: true
# graceful_maintenance:
# as_prepends:
# value: 0
# set: true
# ignore_connected_check:
# set: true
# internal_vpn_client: true
# local:
# address:
# inheritance_disable: true
# local_as:
# value: 6
# name: neighbor-group2
# precedence: flash
# receive_buffer_size: 512
# send_buffer_size: 4096
# session_open_mode: both
# tcp:
# mss:
# inheritance_disable: true
# ttl_security:
# set: true
# update_source: Loopback919
# commands:
# - router bgp 65536
# - no neighbor-group neighbor-group2
# - neighbor-group neighbor-group1
# - no internal-vpn-client
# - advertisement-interval 12
# - precedence flash
# - address-family ipv4 unicast
# - no advertise local-labeled-route
# - advertise local-labeled-route disable
# after:
# as_number: '65536'
# neighbor:
# - address_family:
# - advertise:
# local_labeled_route:
# disable: true
# afi: ipv4
# safi: unicast
# advertisement_interval: 12
# bfd:
# fast_detect:
# strict_mode: true
# name: neighbor-group1
# precedence: flash
# Using rendered
- name: >-
Render platform specific configuration lines with state rendered (without
connecting to the device)
cisco.iosxr.iosxr_bgp_templates:
config:
as_number: 65536
neighbor:
- address_family:
- advertise:
local_labeled_route:
set: true
afi: ipv4
safi: unicast
advertisement_interval: 10
bfd:
fast_detect:
strict_mode: true
internal_vpn_client: true
name: neighbor-group1
precedence: critical
- cluster_id: '1'
description: neighbor-group2
dmz_link_bandwidth:
set: true
ebgp_multihop:
value: 255
egress_engineering:
set: true
graceful_maintenance:
as_prepends:
value: 0
set: true
ignore_connected_check:
set: true
internal_vpn_client: true
local:
address:
inheritance_disable: true
local_as:
value: 6
name: neighbor-group2
precedence: flash
receive_buffer_size: 512
send_buffer_size: 4096
session_open_mode: both
tcp:
mss:
inheritance_disable: true
ttl_security:
set: true
update_source: Loopback919
state: rendered
# Task Output
# -----------
# rendered:
# - router bgp 65536
# - neighbor-group neighbor-group1
# - advertisement-interval 10
# - bfd fast-detect strict-mode
# - internal-vpn-client
# - precedence critical
# - address-family ipv4 unicast
# - advertise local-labeled-route
# - neighbor-group neighbor-group2
# - dmz-link-bandwidth
# - description neighbor-group2
# - cluster-id 1
# - ebgp-multihop 255
# - egress-engineering
# - internal-vpn-client
# - ignore-connected-check
# - local-as 6
# - local address inheritance-disable
# - precedence flash
# - receive-buffer-size 512
# - send-buffer-size 4096
# - session-open-mode both
# - tcp mss inheritance-disable
# - update-source Loopback919
# - ttl-security
# - graceful-maintenance
# - graceful-maintenance as-prepends 0
# Using parsed
- name: Parse externally provided BGP configuration
register: result
cisco.iosxr.iosxr_bgp_templates:
running_config: "{{ lookup('file', 'parsed.cfg') }}"
state: parsed
# content of pared.cfg
# router bgp 65536
# neighbor-group neighbor-group1
# bfd fast-detect strict-mode
# precedence critical
# advertisement-interval 10
# internal-vpn-client
# address-family ipv4 unicast
# advertise local-labeled-route
# !
# !
# neighbor-group neighbor-group2
# ebgp-multihop 255
# egress-engineering
# precedence flash
# graceful-maintenance
# as-prepends 0
# !
# tcp mss inheritance-disable
# local-as 6
# cluster-id 1
# dmz-link-bandwidth
# description neighbor-group2
# ttl-security
# local address inheritance-disable
# update-source Loopback919
# idle-watch-time 30
# ignore-connected-check
# session-open-mode both
# send-buffer-size 4096
# receive-buffer-size 512
# internal-vpn-client
# !
# !
# Task output
# -----------
# parsed:
# as_number: '65536'
# neighbor:
# - address_family:
# - advertise:
# local_labeled_route:
# set: true
# afi: ipv4
# safi: unicast
# advertisement_interval: 10
# bfd:
# fast_detect:
# strict_mode: true
# internal_vpn_client: true
# name: neighbor-group1
# precedence: critical
# - cluster_id: '1'
# description: neighbor-group2
# dmz_link_bandwidth:
# set: true
# ebgp_multihop:
# value: 255
# egress_engineering:
# set: true
# graceful_maintenance:
# as_prepends:
# value: 0
# set: true
# ignore_connected_check:
# set: true
# internal_vpn_client: true
# local:
# address:
# inheritance_disable: true
# local_as:
# value: 6
# name: neighbor-group2
# precedence: flash
# receive_buffer_size: 512
# send_buffer_size: 4096
# session_open_mode: both
# tcp:
# mss:
# inheritance_disable: true
# ttl_security:
# set: true
# update_source: Loopback919
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
---|---|
The resulting configuration after module execution. Returned: when changed Sample: |
|
The configuration prior to the module execution. Returned: when state is Sample: |
|
The set of commands pushed to the remote device. Returned: when state is 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: |