cisco.ios.ios_bgp_address_family module – Resource module to configure BGP Address family.
Note
This module is part of the cisco.ios collection (version 4.6.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.ios
.
To use it in a playbook, specify: cisco.ios.ios_bgp_address_family
.
New in cisco.ios 1.2.0
Synopsis
This module configures and manages the attributes of bgp address family on Cisco IOS.
Parameters
Parameter |
Comments |
---|---|
A list of configurations for bgp address family. |
|
A list of configurations for bgp address family. |
|
Address Family Choices:
|
|
Configure BGP aggregate entries |
|
Aggregate address(A.B.C.D) |
|
Set condition to advertise attribute |
|
Generate AS confed set path information Choices:
|
|
Generate AS set path information Choices:
|
|
Set attributes of aggregate |
|
Aggregate mask(A.B.C.D) |
|
Filter more specific routes from updates Choices:
|
|
Conditionally filter more specific routes from updates |
|
Enable automatic network number summarization Choices:
|
|
Configure BGP aggregate entries |
|
Additional paths in the BGP table |
|
Additional paths to install into RIB Choices:
|
|
Receive additional paths from neighbors Choices:
|
|
Selection criteria to pick the paths |
|
Select all available paths Choices:
|
|
Select backup path Choices:
|
|
Select best N paths (2-3). |
|
Select best-external path Choices:
|
|
Select group-best path Choices:
|
|
Send additional paths to neighbors Choices:
|
|
Configure Aggregation Timer Please refer vendor documentation for valid values |
|
Enable route-flap dampening |
|
Maximum duration to suppress a stable route Please refer vendor documentation for valid values |
|
Half-life time for the penalty Please refer vendor documentation for valid values |
|
Value to start reusing a route Please refer vendor documentation for valid values |
|
Route-map to specify criteria for dampening |
|
Value to start suppressing a route Please refer vendor documentation for valid values |
|
Use DMZ Link Bandwidth as weight for BGP multipaths Choices:
|
|
Nexthop tracking commands |
|
Route map for valid nexthops |
|
Nexthop triggering |
|
Set the delay to tigger nexthop tracking Please refer vendor documentation for valid values |
|
Enable nexthop tracking Choices:
|
|
Allow redistribution of iBGP into IGPs (dangerous) Choices:
|
|
route-map control commands Have route-map set commands take priority over BGP commands such as next-hop unchanged Choices:
|
|
Configure background scanner interval Please refer vendor documentation for valid values |
|
Nexthop triggering This option is DEPRECATED and replaced with slow_peer_options, this attribute will be removed after 2025-01-01. |
|
Slow-peer detection |
|
Enable slow-peer detection Choices:
|
|
Set the slow-peer detection threshold Threshold value (seconds) Please refer vendor documentation for valid values |
|
Configure slow-peer split-update-group |
|
Dynamically split the slow peer to slow-update group Choices:
|
|
Keep the slow-peer permanently in slow-update group Choices:
|
|
Nexthop triggering |
|
Slow-peer detection |
|
Enable slow-peer detection Choices:
|
|
Set the slow-peer detection threshold Threshold value (seconds) Please refer vendor documentation for valid values |
|
Configure slow-peer split-update-group |
|
Dynamically split the slow peer to slow-update group Choices:
|
|
Keep the slow-peer permanently in slow-update group Choices:
|
|
Use soft-reconfiguration inbound only when route-refresh is not negotiated Choices:
|
|
Manage peers in bgp update groups Split update groups based on Policy Keep peers with as-override in different update groups Choices:
|
|
Set a command to its defaults Choices:
|
|
Distribution of default information Distribute default route Choices:
|
|
Set metric of redistributed routes |
|
Define an administrative distance |
|
Distance for routes external to the AS |
|
Distance for routes internal to the AS |
|
Distance for local routes |
|
Specify a neighbor router |
|
Enable the Address Family for this Neighbor Choices:
|
|
Negotiate additional paths capabilities with this neighbor |
|
Disable additional paths for this neighbor Choices:
|
|
Receive additional paths from neighbors Choices:
|
|
Send additional paths to this neighbor Choices:
|
|
Neighbor address (A.B.C.D) This option is DEPRECATED and replaced with neighbor_address, this attribute will be removed after 2025-01-01. |
|
Advertise to this neighbor Advertise additional paths |
|
Select all available paths Choices:
|
|
Select best N paths (2-3). |
|
Select group-best path Choices:
|
|
specify route-map for conditional advertisement |
|
advertise prefix only if prefix is in the condition exists condition route-map name |
|
advertise route-map name |
|
advertise prefix only if prefix in the condition does not exist condition route-map name |
|
Minimum interval between sending BGP routing updates |
|
Advertise to this neighbor |
|
Advertise additional paths |
|
Select all available paths Choices:
|
|
Select best N paths (2-3). |
|
Select group-best path Choices:
|
|
Advertise best-external (at RRs best-internal) path Choices:
|
|
Advertise additional paths |
|
Diverse path can be backup path Choices:
|
|
Diverse path can be multipath Choices:
|
|
Enable a AIGP on neighbor |
|
Enable a AIGP on neighbor |
|
Cost community or MED carrying AIGP VALUE |
|
Cost extended community carrying AIGP Value |
|
Community ID Please refer vendor documentation for valid values |
|
Point of Insertion |
|
Point of Insertion After IGP Choices:
|
|
Point of Insertion At Beginning Choices:
|
|
Cost community is Transitive Choices:
|
|
Med carrying AIGP Value Choices:
|
|
Enable the policy support for this IBGP Neighbor Choices:
|
|
Accept as-path with my AS present in it Please refer vendor documentation for valid values |
|
Override matching AS-number while sending update |
|
Enable AS override Choices:
|
|
Maintain Split Horizon while sending update Choices:
|
|
Activate the BMP monitoring for a BGP peer |
|
Activate BMP monitoring for all servers Choices:
|
|
Activate BMP for server BMP Server Number Please refer vendor documentation for valid values |
|
Advertise capability to the peer Advertise ORF capability to the peer Advertise prefixlist ORF capability to this neighbor |
|
Capability to SEND and RECEIVE the ORF to/from this neighbor Choices:
|
|
Capability to RECEIVE the ORF from this neighbor Choices:
|
|
Capability to SEND the ORF to this neighbor Choices:
|
|
Configure Route-Reflector Cluster-id (peers may reset) Route-Reflector Cluster-id as 32 bit quantity, or Route-Reflector Cluster-id in IP address format (A.B.C.D) |
|
Originate default route to this neighbor |
|
Route-map to specify criteria to originate default |
|
Set default route to this neighbor Choices:
|
|
Neighbor specific description |
|
one-hop away EBGP peer using loopback address Choices:
|
|
Filter updates to/from this neighbor |
|
ACL id/name |
|
Filter incoming updates Choices:
|
|
Filter outgoing updates Choices:
|
|
Propagate the DMZ link bandwidth Choices:
|
|
Allow EBGP neighbors not on directly connected networks |
|
Allow EBGP neighbors not on directly connected networks Choices:
|
|
Maximum hop count Please refer vendor documentation for valid values |
|
Session fall on peer route lost |
|
Use BFD to detect failure |
|
Force BFD multi-hop to detect failure Choices:
|
|
set bfd Choices:
|
|
Force BFD single-hop to detect failure Choices:
|
|
Route map for peer route |
|
Establish BGP filters |
|
AS path access list Please refer vendor documentation for valid values |
|
Filter incoming updates Choices:
|
|
Filter outgoing updates Choices:
|
|
high availability mode |
|
disable graceful-restart Choices:
|
|
set ha-mode and graceful-restart for this peer Choices:
|
|
Inherit a template Inherit a peer-policy template |
|
Stack iBGP-CE Neighbor Path in ATTR_SET for vpn update Choices:
|
|
Neighbor ipv6 address (X:X:X:X::X) This option is DEPRECATED and replaced with neighbor_address, this attribute will be removed after 2025-01-01. |
|
Specify a local-as number |
|
Accept either real AS or local AS from the ebgp peer Choices:
|
|
Do not prepend local-as to updates from ebgp peers |
|
Replace real AS with local AS in the EBGP updates Choices:
|
|
Set prepend Choices:
|
|
AS number used as local AS Please refer vendor documentation for valid values |
|
set local-as number Choices:
|
|
Log neighbor up/down and reset reason |
|
disable Log neighbor up/down and reset Choices:
|
|
set Log neighbor up/down and reset Choices:
|
|
Establish BGP filters |
|
maximum no. of prefix limit Please refer vendor documentation for valid values |
|
Restart bgp connection after limit is exceeded |
|
Threshold value (%) at which to generate a warning msg Please refer vendor documentation for valid values |
|
Only give warning message when limit is exceeded Choices:
|
|
Neighbor address (A.B.C.D) Neighbor tag Neighbor ipv6 address (X:X:X:X::X) |
|
Disable the next hop calculation for this neighbor This option is DEPRECATED and is replaced with nexthop_self which accepts dict as input this attribute will be removed after 2023-06-01. Choices:
|
|
Propagate next hop unchanged for iBGP paths to this neighbor Propagate next hop unchanged for all paths (iBGP and eBGP) to this neighbor |
|
Propagate next hop unchanged for all paths (iBGP and eBGP) to this neighbor Choices:
|
|
Enable next-hop-unchanged Choices:
|
|
Disable the next hop calculation for this neighbor |
|
Enable next-hop-self for both eBGP and iBGP received paths Choices:
|
|
set the next hop self Choices:
|
|
Set a password This option is DEPRECATED and is replaced with password_options which accepts dict as input, this attribute will be removed after 2024-06-01. |
|
Set a password with encryption type |
|
Encryption type (0 to disable encryption, 7 for proprietary) |
|
The password |
|
BGP optional attribute filtering |
|
Discard matching path-attribute for this neighbor |
|
Perform inbound path-attribute filtering Choices:
|
|
path attribute range |
|
path attribute range end value Please refer vendor documentation for valid values |
|
path attribute range start value Please refer vendor documentation for valid values |
|
path attribute type Please refer vendor documentation for valid values |
|
Treat-as-withdraw matching path-attribute for this neighbor |
|
Perform inbound path-attribute filtering Choices:
|
|
path attribute range |
|
path attribute range end value Please refer vendor documentation for valid values |
|
path attribute range start value Please refer vendor documentation for valid values |
|
path attribute type Please refer vendor documentation for valid values |
|
Member of the peer-group Choices:
|
|
Member of the peer-group |
|
Filter updates to/from this neighbor This option is DEPRECATED and is replaced with prefix_lists which accepts list of dict as input |
|
Filter incoming updates Choices:
|
|
Name of a prefix list |
|
Filter outgoing updates Choices:
|
|
Filter updates to/from this neighbor |
|
Filter incoming updates Choices:
|
|
Name of a prefix list |
|
Filter outgoing updates Choices:
|
|
Specify a BGP neighbor AS of remote neighbor |
|
Remove private AS number from outbound updates |
|
Remove all private AS numbers Choices:
|
|
Replace all private AS numbers with local AS Choices:
|
|
Remove private AS number from outbound updates Choices:
|
|
Apply route map to neighbor This option is DEPRECATED and is replaced with route_maps which accepts list of dict as input |
|
Apply map to incoming routes Choices:
|
|
Name of route map |
|
Apply map to outbound routes Choices:
|
|
Apply route map to neighbor |
|
Apply map to incoming routes Choices:
|
|
Name of route map |
|
Apply map to outbound routes Choices:
|
|
Configure a neighbor as Route Reflector client Choices:
|
|
Configure a neighbor as Route Server client Choices:
|
|
Send Community attribute to this neighbor |
|
Send Standard and Extended Community attributes Choices:
|
|
Send Extended Community attribute Choices:
|
|
Send Standard Community attribute. Maintains backwards compatibility for configurations that do not specify a send-community type. Choices:
|
|
Send Standard Community attribute Choices:
|
|
Administratively shut down this neighbor |
|
Gracefully shut down this neighbor time in seconds Please refer vendor documentation for valid values |
|
shut down Choices:
|
|
Configure slow-peer This option is DEPRECATED and replaced with slow_peer_options, this attribute will be removed after 2025-01-01. |
|
Configure slow-peer |
|
Disable slow-peer detection Choices:
|
|
Enable slow-peer detection Choices:
|
|
Set the slow-peer detection threshold |
|
Configure slow-peer |
|
Configure slow-peer |
|
Configure slow-peer Choices:
|
|
Configure slow-peer Choices:
|
|
Configure slow-peer Choices:
|
|
Configure slow-peer Choices:
|
|
Configure slow-peer options |
|
Configure slow-peer |
|
Disable slow-peer detection Choices:
|
|
Enable slow-peer detection Choices:
|
|
Set the slow-peer detection threshold |
|
Configure slow-peer |
|
Configure slow-peer |
|
Configure slow-peer Choices:
|
|
Configure slow-peer Choices:
|
|
Configure slow-peer Choices:
|
|
Configure slow-peer Choices:
|
|
Per neighbor soft reconfiguration Allow inbound soft reconfiguration for this neighbor Choices:
|
|
Site-of-Origin extended community |
|
Neighbor tag This option is DEPRECATED and replaced with neighbor_address, this attribute will be removed after 2025-01-01. |
|
BGP per neighbor timers |
|
Holdtime |
|
Keepalive interval |
|
Minimum hold time from neighbor |
|
Transport options |
|
Specify passive or active connection |
|
Actively establish the TCP session Choices:
|
|
Passively establish the TCP session Choices:
|
|
Use Multi-session for transport Choices:
|
|
Use transport path MTU discovery |
|
disable Choices:
|
|
Use path MTU discovery Choices:
|
|
BGP ttl security check maximum number of hops Please refer vendor documentation for valid values |
|
Route-map to selectively unsuppress suppressed routes |
|
Set the BGP version to match a neighbor Neighbor’s BGP version Please refer vendor documentation for valid values |
|
Set default weight for routes from this neighbor |
|
Specify a network to announce via BGP |
|
Network number (A.B.C.D) |
|
Specify a BGP backdoor route Choices:
|
|
Advertise or Export to EVPN address-family Choices:
|
|
Network mask (A.B.C.D) |
|
Route-map to modify the attributes |
|
Redistribute information from another routing protocol |
|
Application |
|
Metric for redistributed routes |
|
Application name |
|
Route map reference |
|
Border Gateway Protocol (BGP) |
|
Autonomous system number |
|
Metric for redistributed routes |
|
Route map reference |
|
Connected |
|
Metric for redistributed routes |
|
Route map reference |
|
Redistribute automatically established IP connected routes. This only needs to be set if metric or route_map aren’t used. Choices:
|
|
Enhanced Interior Gateway Routing Protocol (EIGRP) |
|
Autonomous system number |
|
Metric for redistributed routes |
|
Route map reference |
|
ISO IS-IS |
|
ISO routing area tag |
|
Redistribution of OSI dynamic routes Choices:
|
|
Redistribution of IP dynamic routes Choices:
|
|
Metric for redistributed routes |
|
Route map reference |
|
IGRP for OSI networks |
|
ISO routing area tag |
|
Route map reference |
|
Locator ID Separation Protocol (LISP) |
|
Metric for redistributed routes |
|
Route map reference |
|
Set the top level attribute Choices:
|
|
Mobile routes |
|
Metric for redistributed routes |
|
Route map reference |
|
Set the top level attribute Choices:
|
|
On Demand stub Routes |
|
Metric for redistributed routes |
|
Route map reference |
|
Set the top level attribute Choices:
|
|
Open Shortest Path First (OSPF) |
|
Include connected. Only applicable under IPv6 AFI Choices:
|
|
Redistribute matched routes |
|
Redistribute OSPF external routes This option is DEPRECATED and replaced with externals option, this attribute will be removed after 2025-01-01. Choices:
|
|
Redistribute OSPF external routes |
|
Redistribute OSPF External type 1 routes Choices:
|
|
Redistribute OSPF External type 1 routes Choices:
|
|
Redistribute OSPF internal routes Choices:
|
|
Redistribute OSPF NSSA external routes This option is DEPRECATED and replaced with nssa_externals option, this attribute will be removed after 2025-01-01. Choices:
|
|
Redistribute OSPF NSSA external routes |
|
Redistribute NSSA external type 1 routes Choices:
|
|
Redistribute NSSA external type 2 routes Choices:
|
|
Redistribute NSSA external type 1 routes This option is DEPRECATED and replaced with nssa_externals.type_1 option, this attribute will be removed after 2025-01-01. Choices:
|
|
Redistribute NSSA external type 2 routes This option is DEPRECATED and replaced with nssa_externals.type_2 option, this attribute will be removed after 2025-01-01. Choices:
|
|
Metric for redistributed routes |
|
Process ID |
|
Route map reference |
|
VPN Routing/Forwarding Instance |
|
OSPFv3 |
|
Redistribute matched routes |
|
Redistribute OSPF external routes This option is DEPRECATED and replaced with externals, this attribute will be removed after 2025-01-01. Choices:
|
|
Redistribute OSPF external routes |
|
Redistribute OSPF External type 1 routes Choices:
|
|
Redistribute OSPF External type 1 routes Choices:
|
|
Redistribute OSPF internal routes Choices:
|
|
Redistribute OSPF internal routes This option is DEPRECATED and replaced with nssa_externals, this attribute will be removed after 2025-01-01. Choices:
|
|
Redistribute OSPF NSSA external routes |
|
Redistribute NSSA external type 1 routes Choices:
|
|
Redistribute NSSA external type 2 routes Choices:
|
|
Redistribute NSSA external type 1 routes This option is DEPRECATED and replaced with nssa_externals.type_1 option, this attribute will be removed after 2025-01-01. Choices:
|
|
Redistribute NSSA external type 2 routes This option is DEPRECATED and replaced with nssa_externals.type_2 option, this attribute will be removed after 2025-01-01. Choices:
|
|
Metric for redistributed routes |
|
Process ID |
|
Route map reference |
|
Routing Information Protocol (RIP) |
|
Metric for redistributed routes |
|
Route map reference |
|
Set the top level attribute Choices:
|
|
Static routes |
|
Redistribution of OSI static routes Choices:
|
|
Redistribution of IP static routes Choices:
|
|
Metric for redistributed routes |
|
Route map reference |
|
Set the top level attribute Choices:
|
|
Specify a source VRF |
|
global VRF Choices:
|
|
Source VRF name |
|
Address Family modifier Choices:
|
|
Modify snmp parameters |
|
Configure a SNMP context Context Name |
|
Configure a SNMP v2c Community string and access privs |
|
Standard IP accesslist allowing access with this community string Expanded IP accesslist allowing access with this community string Access-list name |
|
Specify IPv6 Named Access-List IPv6 Access-list name |
|
Read-only access with this community string Choices:
|
|
Read-write access with this community string Choices:
|
|
SNMP community string |
|
Context Name |
|
Configure a SNMP v3 user |
|
specify an access-list associated with this group |
|
SNMP community string |
|
Specify IPv6 Named Access-List IPv6 Access-list name |
|
authentication parameters for the user |
|
Use HMAC MD5 algorithm for authentication authentication password for user |
|
Use HMAC SHA algorithm for authentication authentication password for user |
|
If the user password is already configured and saved Choices:
|
|
specifying passwords as MD5 or SHA digests Choices:
|
|
SNMP community string |
|
encryption parameters for the user |
|
Use 128 bit AES algorithm for encryption |
|
Use 192 bit 3DES algorithm for encryption |
|
Use 256 bit DES algorithm for encryption |
|
Use 56 bit DES algorithm for encryption |
|
Use 56 bit DES algorithm for encryption |
|
Map external entry attributes into routing table |
|
Selective route download Choices:
|
|
route-map name |
|
Specify parameters for a VPN Routing/Forwarding instance |
|
Autonomous system number. |
|
This option is used only with state parsed. The value of this option should be the output received from the IOS device by executing the command sh running-config | section ^router bgp. The state parsed reads the configuration from |
|
The state the configuration should be left in The states rendered, gathered and parsed does not perform any change on the device. The state rendered will transform the configuration in The state gathered will fetch the running configuration from device and transform it into structured data in the format as per the resource module argspec and the value is returned in the gathered key within the result. The state parsed reads the configuration from Choices:
|
Notes
Note
Tested against Cisco IOSXE Version 17.3 on CML.
This module works with connection
network_cli
. See https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.htmlThe module examples uses callback plugin (stdout_callback = yaml) to generate task output in yaml format.
Examples
# Using merged
# Before state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp nopeerup-delay cold-boot 20
- name: Merge provided configuration with device configuration
cisco.ios.ios_bgp_address_family:
config:
as_number: 65000
address_family:
- afi: ipv4
safi: multicast
vrf: blue
aggregate_address:
- address: 192.0.2.1
netmask: 255.255.255.255
as_confed_set: true
bgp:
aggregate_timer: 10
dampening:
penalty_half_time: 1
reuse_route_val: 1
suppress_route_val: 1
max_suppress: 1
slow_peer:
- detection:
threshold: 150
neighbor:
- address: 198.51.100.1
aigp:
send:
cost_community:
id: 100
poi:
igp_cost: true
transitive: true
slow_peer:
- detection:
threshold: 150
remote_as: 10
route_map:
- name: test-route-out
out: true
- name: test-route-in
in: true
route_server_client: true
network:
- address: 198.51.110.10
mask: 255.255.255.255
backdoor: true
snmp:
context:
name: snmp_con
community:
snmp_community: community
ro: true
acl: 10
- afi: ipv4
safi: mdt
bgp:
dmzlink_bw: true
dampening:
penalty_half_time: 1
reuse_route_val: 10
suppress_route_val: 100
max_suppress: 5
soft_reconfig_backup: true
- afi: ipv4
safi: multicast
aggregate_address:
- address: 192.0.3.1
netmask: 255.255.255.255
as_confed_set: true
default_metric: 12
distance:
external: 10
internal: 10
local: 100
network:
- address: 198.51.111.11
mask: 255.255.255.255
route_map: test
table_map:
name: test_tableMap
filter: true
state: merged
# Task Output:
# ------------
#
# before: {}
# commands:
# - router bgp 65000
# - address-family ipv4 multicast vrf blue
# - bgp aggregate-timer 10
# - bgp dampening 1 1 1 1
# - bgp slow-peer detection threshold 150
# - snmp context snmp_con community community ro 10
# - neighbor 198.51.100.1 remote-as 10
# - neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# - neighbor 198.51.100.1 slow-peer detection threshold 150
# - network 198.51.110.10 mask 255.255.255.255 backdoor
# - aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# - address-family ipv4 multicast
# - default-metric 12
# - distance bgp 10 10 100
# - table-map test_tableMap filter
# - network 198.51.111.11 mask 255.255.255.255 route-map test
# - aggregate-address 192.0.3.1 255.255.255.255 as-confed-set
# - address-family ipv4 mdt
# - bgp dmzlink-bw
# - bgp soft-reconfig-backup
# - bgp dampening 1 10 100 5
# after:
# address_family:
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.2.1
# as_confed_set: true
# netmask: 255.255.255.255
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 1
# penalty_half_time: 1
# reuse_route_val: 1
# suppress_route_val: 1
# slow_peer_options:
# detection:
# threshold: 150
# neighbors:
# - activate: true
# aigp:
# send:
# cost_community:
# id: 100
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.100.1
# slow_peer_options:
# detection:
# threshold: 150
# networks:
# - address: 198.51.110.10
# backdoor: true
# mask: 255.255.255.255
# snmp:
# context:
# community:
# acl: '10'
# ro: true
# snmp_community: community
# name: snmp_con
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.3.1
# as_confed_set: true
# netmask: 255.255.255.255
# default_metric: 12
# distance:
# external: 10
# internal: 10
# local: 100
# networks:
# - address: 198.51.111.11
# mask: 255.255.255.255
# route_map: test
# safi: multicast
# table_map:
# filter: true
# name: test_tableMap
# - afi: ipv4
# bgp:
# dampening:
# max_suppress: 5
# penalty_half_time: 1
# reuse_route_val: 10
# suppress_route_val: 100
# dmzlink_bw: true
# soft_reconfig_backup: true
# safi: mdt
# as_number: '65000'
# After state:
# ------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# snmp context snmp_con community community RO 10
# neighbor 198.51.100.1 remote-as 10
# !
# address-family ipv4
# snmp context snmp_con community community RO 10
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 150
# bgp dampening 1 1 1 1
# network 198.51.110.10 mask 255.255.255.255 backdoor
# aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# neighbor 198.51.100.1 activate
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 slow-peer detection threshold 150
# exit-address-family
# !
# address-family ipv4 multicast
# table-map test_tableMap filter
# network 198.51.111.11 mask 255.255.255.255 route-map test
# aggregate-address 192.0.3.1 255.255.255.255 as-confed-set
# default-metric 12
# distance bgp 10 10 100
# exit-address-family
# !
# address-family ipv4 mdt
# bgp dampening 1 10 100 5
# bgp dmzlink-bw
# bgp soft-reconfig-backup
# exit-address-family
# Using replaced
# Before state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# snmp context snmp_con community community RO 10
# neighbor 198.51.100.1 remote-as 10
# !
# address-family ipv4
# snmp context snmp_con community community RO 10
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 150
# bgp dampening 1 1 1 1
# network 198.51.110.10 mask 255.255.255.255 backdoor
# aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# neighbor 198.51.100.1 activate
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 slow-peer detection threshold 150
# exit-address-family
# !
# address-family ipv4 multicast
# table-map test_tableMap filter
# network 198.51.111.11 mask 255.255.255.255 route-map test
# aggregate-address 192.0.3.1 255.255.255.255 as-confed-set
# default-metric 12
# distance bgp 10 10 100
# exit-address-family
# !
# address-family ipv4 mdt
# bgp dampening 1 10 100 5
# bgp dmzlink-bw
# bgp soft-reconfig-backup
# exit-address-family
- name: Replaces device configuration of listed AF BGP with provided configuration
cisco.ios.ios_bgp_address_family:
config:
as_number: 65000
address_family:
- afi: ipv4
safi: multicast
vrf: blue
aggregate_address:
- address: 192.0.2.1
netmask: 255.255.255.255
as_confed_set: true
bgp:
aggregate_timer: 10
dampening:
penalty_half_time: 1
reuse_route_val: 1
suppress_route_val: 1
max_suppress: 1
slow_peer:
- detection:
threshold: 150
neighbor:
- address: 198.51.110.1
activate: true
aigp:
send:
cost_community:
id: 200
poi:
igp_cost: true
transitive: true
slow_peer:
- detection:
threshold: 150
remote_as: 10
network:
- address: 198.51.110.10
mask: 255.255.255.255
backdoor: true
- afi: ipv4
safi: multicast
bgp:
aggregate_timer: 10
dampening:
penalty_half_time: 10
reuse_route_val: 10
suppress_route_val: 10
max_suppress: 10
slow_peer:
- detection:
threshold: 200
network:
- address: 192.0.2.1
mask: 255.255.255.255
route_map: test
state: replaced
# Task Output:
# ------------
# before:
# address_family:
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.2.1
# as_confed_set: true
# netmask: 255.255.255.255
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 1
# penalty_half_time: 1
# reuse_route_val: 1
# suppress_route_val: 1
# slow_peer_options:
# detection:
# threshold: 150
# neighbors:
# - activate: true
# aigp:
# send:
# cost_community:
# id: 100
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.100.1
# slow_peer_options:
# detection:
# threshold: 150
# networks:
# - address: 198.51.110.10
# backdoor: true
# mask: 255.255.255.255
# snmp:
# context:
# community:
# acl: '10'
# ro: true
# snmp_community: community
# name: snmp_con
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.3.1
# as_confed_set: true
# netmask: 255.255.255.255
# default_metric: 12
# distance:
# external: 10
# internal: 10
# local: 100
# networks:
# - address: 198.51.111.11
# mask: 255.255.255.255
# route_map: test
# safi: multicast
# table_map:
# filter: true
# name: test_tableMap
# - afi: ipv4
# bgp:
# dampening:
# max_suppress: 5
# penalty_half_time: 1
# reuse_route_val: 10
# suppress_route_val: 100
# dmzlink_bw: true
# soft_reconfig_backup: true
# safi: mdt
# as_number: '65000'
# commands:
# - router bgp 65000
# - address-family ipv4 multicast vrf blue
# - bgp aggregate-timer 10
# - bgp dampening 1 1 1 1
# - bgp slow-peer detection threshold 150
# - neighbor 198.51.110.1 remote-as 10
# - neighbor 198.51.110.1 activate
# - neighbor 198.51.110.1 aigp send cost-community 200 poi igp-cost transitive
# - neighbor 198.51.110.1 slow-peer detection threshold 150
# - network 198.51.110.10 mask 255.255.255.255 backdoor
# - aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# - address-family ipv4 multicast
# - no default-metric 12
# - no distance bgp 10 10 100
# - no table-map test_tableMap filter
# - bgp aggregate-timer 10
# - bgp dampening 10 10 10 10
# - bgp slow-peer detection threshold 200
# - network 192.0.2.1 mask 255.255.255.255 route-map test
# - no network 198.51.111.11 mask 255.255.255.255 route-map test
# - no aggregate-address 192.0.3.1 255.255.255.255 as-confed-set
# after:
# address_family:
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.2.1
# as_confed_set: true
# netmask: 255.255.255.255
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 1
# penalty_half_time: 1
# reuse_route_val: 1
# suppress_route_val: 1
# slow_peer_options:
# detection:
# threshold: 150
# neighbors:
# - activate: true
# aigp:
# send:
# cost_community:
# id: 100
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.100.1
# slow_peer_options:
# detection:
# threshold: 150
# - activate: true
# aigp:
# send:
# cost_community:
# id: 200
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.110.1
# slow_peer_options:
# detection:
# threshold: 150
# networks:
# - address: 198.51.110.10
# backdoor: true
# mask: 255.255.255.255
# snmp:
# context:
# community:
# acl: '10'
# ro: true
# snmp_community: community
# name: snmp_con
# - afi: ipv4
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 10
# penalty_half_time: 10
# reuse_route_val: 10
# suppress_route_val: 10
# slow_peer_options:
# detection:
# threshold: 200
# networks:
# - address: 192.0.2.1
# mask: 255.255.255.255
# route_map: test
# safi: multicast
# - afi: ipv4
# bgp:
# dampening:
# max_suppress: 5
# penalty_half_time: 1
# reuse_route_val: 10
# suppress_route_val: 100
# dmzlink_bw: true
# soft_reconfig_backup: true
# safi: mdt
# as_number: '65000'
# After state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# snmp context snmp_con community community RO 10
# neighbor 198.51.100.1 remote-as 10
# neighbor 198.51.110.1 remote-as 10
# !
# address-family ipv4
# snmp context snmp_con community community RO 10
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 150
# bgp dampening 1 1 1 1
# network 198.51.110.10 mask 255.255.255.255 backdoor
# aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# neighbor 198.51.100.1 activate
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 slow-peer detection threshold 150
# neighbor 198.51.110.1 activate
# neighbor 198.51.110.1 aigp send cost-community 200 poi igp-cost transitive
# neighbor 198.51.110.1 slow-peer detection threshold 150
# exit-address-family
# !
# address-family ipv4 multicast
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 200
# bgp dampening 10 10 10 10
# network 192.0.2.1 mask 255.255.255.255 route-map test
# exit-address-family
# !
# address-family ipv4 mdt
# bgp dampening 1 10 100 5
# bgp dmzlink-bw
# bgp soft-reconfig-backup
# exit-address-family
# Using overridden
# Before state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# snmp context snmp_con community community RO 10
# neighbor 198.51.100.1 remote-as 10
# neighbor 198.51.110.1 remote-as 10
# !
# address-family ipv4
# snmp context snmp_con community community RO 10
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 150
# bgp dampening 1 1 1 1
# network 198.51.110.10 mask 255.255.255.255 backdoor
# aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# neighbor 198.51.100.1 activate
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 slow-peer detection threshold 150
# neighbor 198.51.110.1 activate
# neighbor 198.51.110.1 aigp send cost-community 200 poi igp-cost transitive
# neighbor 198.51.110.1 slow-peer detection threshold 150
# exit-address-family
# !
# address-family ipv4 multicast
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 200
# bgp dampening 10 10 10 10
# network 192.0.2.1 mask 255.255.255.255 route-map test
# exit-address-family
# !
# address-family ipv4 mdt
# bgp dampening 1 10 100 5
# bgp dmzlink-bw
# bgp soft-reconfig-backup
# exit-address-family
- name: Override device configuration of all AF BGP with provided configuration
cisco.ios.ios_bgp_address_family:
config:
as_number: 65000
address_family:
- afi: ipv4
safi: multicast
vrf: blue
aggregate_address:
- address: 192.0.2.1
netmask: 255.255.255.255
as_confed_set: true
bgp:
aggregate_timer: 10
dampening:
penalty_half_time: 10
reuse_route_val: 10
suppress_route_val: 100
max_suppress: 50
slow_peer:
- detection:
threshold: 150
neighbor:
- address: 198.51.110.1
activate: true
log_neighbor_changes:
disable: true
maximum_prefix:
number: 1
threshold_value: 10
restart: 100
slow_peer:
- detection:
threshold: 150
remote_as: 100
version: 4
network:
- address: 198.51.110.10
mask: 255.255.255.255
backdoor: true
- afi: ipv6
safi: multicast
default_information: true
bgp:
aggregate_timer: 10
dampening:
penalty_half_time: 10
reuse_route_val: 10
suppress_route_val: 10
max_suppress: 10
slow_peer:
- detection:
threshold: 200
network:
- address: 2001:DB8:0:3::/64
route_map: test_ipv6
state: overridden
# Task Output:
# ------------
#
# before:
# address_family:
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.2.1
# as_confed_set: true
# netmask: 255.255.255.255
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 10
# penalty_half_time: 10
# reuse_route_val: 10
# suppress_route_val: 10
# slow_peer_options:
# detection:
# threshold: 200
# default_information: true
# neighbors:
# - activate: true
# aigp:
# send:
# cost_community:
# id: 100
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.100.1
# slow_peer_options:
# detection:
# threshold: 150
# - activate: true
# aigp:
# send:
# cost_community:
# id: 200
# poi:
# igp_cost: true
# transitive: true
# maximum_prefix:
# number: 1
# restart: 100
# threshold_value: 10
# neighbor_address: 198.51.110.1
# slow_peer_options:
# detection:
# threshold: 150
# networks:
# - address: 198.51.110.10
# backdoor: true
# mask: 255.255.255.255
# - afi: ipv4
# safi: multicast
# - afi: ipv4
# safi: mdt
# - afi: ipv6
# safi: multicast
# as_number: '65000'
# commands:
# - router bgp 65000
# - address-family ipv4
# - no default-information originate
# - no bgp aggregate-timer 10
# - no bgp dampening 10 10 10 10
# - no bgp slow-peer detection threshold 200
# - no neighbor 198.51.100.1
# - no neighbor 198.51.110.1
# - no network 198.51.110.10 mask 255.255.255.255 backdoor
# - no aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# - address-family ipv4 multicast vrf blue
# - bgp aggregate-timer 10
# - bgp dampening 10 10 100 50
# - bgp slow-peer detection threshold 150
# - neighbor 198.51.110.1 remote-as 100
# - neighbor 198.51.110.1 activate
# - neighbor 198.51.110.1 disable
# - neighbor 198.51.110.1 maximum-prefix 1 10 restart 100
# - neighbor 198.51.110.1 slow-peer detection threshold 150
# - neighbor 198.51.110.1 version 4
# - network 198.51.110.10 mask 255.255.255.255 backdoor
# - aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# - address-family ipv6 multicast
# - default-information originate
# - bgp aggregate-timer 10
# - bgp dampening 10 10 10 10
# - bgp slow-peer detection threshold 200
# after:
# address_family:
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.2.1
# as_confed_set: true
# netmask: 255.255.255.255
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 10
# penalty_half_time: 10
# reuse_route_val: 10
# suppress_route_val: 10
# slow_peer_options:
# detection:
# threshold: 200
# default_information: true
# neighbors:
# - activate: true
# aigp:
# send:
# cost_community:
# id: 100
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.100.1
# slow_peer_options:
# detection:
# threshold: 150
# - activate: true
# aigp:
# send:
# cost_community:
# id: 200
# poi:
# igp_cost: true
# transitive: true
# maximum_prefix:
# number: 1
# restart: 100
# threshold_value: 10
# neighbor_address: 198.51.110.1
# slow_peer_options:
# detection:
# threshold: 150
# networks:
# - address: 198.51.110.10
# backdoor: true
# mask: 255.255.255.255
# - afi: ipv4
# safi: multicast
# - afi: ipv4
# safi: mdt
# - afi: ipv6
# safi: multicast
# as_number: '65000'
# After state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# neighbor 198.51.100.1 remote-as 10
# neighbor 198.51.110.1 remote-as 100
# neighbor 198.51.110.1 disable-connected-check
# neighbor 198.51.110.1 version 4
# !
# address-family ipv4
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 200
# bgp dampening 10 10 10 10
# network 198.51.110.10 mask 255.255.255.255 backdoor
# aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# neighbor 198.51.100.1 activate
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 slow-peer detection threshold 150
# neighbor 198.51.110.1 activate
# neighbor 198.51.110.1 aigp send cost-community 200 poi igp-cost transitive
# neighbor 198.51.110.1 slow-peer detection threshold 150
# neighbor 198.51.110.1 maximum-prefix 1 10 restart 100
# default-information originate
# exit-address-family
# !
# address-family ipv4 multicast
# exit-address-family
# !
# address-family ipv4 mdt
# exit-address-family
# !
# address-family ipv6 multicast
# exit-address-family
# Using deleted
# Before state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# neighbor 198.51.100.1 remote-as 10
# neighbor 198.51.110.1 remote-as 100
# neighbor 198.51.110.1 disable-connected-check
# neighbor 198.51.110.1 version 4
# !
# address-family ipv4
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 200
# bgp dampening 10 10 10 10
# network 198.51.110.10 mask 255.255.255.255 backdoor
# aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# neighbor 198.51.100.1 activate
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 slow-peer detection threshold 150
# neighbor 198.51.110.1 activate
# neighbor 198.51.110.1 aigp send cost-community 200 poi igp-cost transitive
# neighbor 198.51.110.1 slow-peer detection threshold 150
# neighbor 198.51.110.1 maximum-prefix 1 10 restart 100
# default-information originate
# exit-address-family
# !
# address-family ipv4 multicast
# exit-address-family
# !
# address-family ipv4 mdt
# exit-address-family
# !
# address-family ipv6 multicast
# exit-address-family
- name: "Delete AF BGP (Note: This won't delete the all configured AF BGP)"
cisco.ios.ios_bgp_address_family:
config:
as_number: 65000
address_family:
- afi: ipv4
safi: multicast
- afi: ipv4
safi: mdt
state: deleted
# Task Output:
# ------------
#
# before:
# address_family:
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.2.1
# as_confed_set: true
# netmask: 255.255.255.255
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 10
# penalty_half_time: 10
# reuse_route_val: 10
# suppress_route_val: 10
# slow_peer_options:
# detection:
# threshold: 200
# default_information: true
# neighbors:
# - activate: true
# aigp:
# send:
# cost_community:
# id: 100
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.100.1
# slow_peer_options:
# detection:
# threshold: 150
# - activate: true
# aigp:
# send:
# cost_community:
# id: 200
# poi:
# igp_cost: true
# transitive: true
# maximum_prefix:
# number: 1
# restart: 100
# threshold_value: 10
# neighbor_address: 198.51.110.1
# slow_peer_options:
# detection:
# threshold: 150
# networks:
# - address: 198.51.110.10
# backdoor: true
# mask: 255.255.255.255
# - afi: ipv4
# safi: multicast
# - afi: ipv4
# safi: mdt
# - afi: ipv6
# safi: multicast
# as_number: '65000'
# commands:
# - router bgp 65000
# - no address-family ipv4 multicast
# - no address-family ipv4 mdt
# after:
# address_family:
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.2.1
# as_confed_set: true
# netmask: 255.255.255.255
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 10
# penalty_half_time: 10
# reuse_route_val: 10
# suppress_route_val: 10
# slow_peer_options:
# detection:
# threshold: 200
# default_information: true
# neighbors:
# - activate: true
# aigp:
# send:
# cost_community:
# id: 100
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.100.1
# slow_peer_options:
# detection:
# threshold: 150
# - activate: true
# aigp:
# send:
# cost_community:
# id: 200
# poi:
# igp_cost: true
# transitive: true
# maximum_prefix:
# number: 1
# restart: 100
# threshold_value: 10
# neighbor_address: 198.51.110.1
# slow_peer_options:
# detection:
# threshold: 150
# networks:
# - address: 198.51.110.10
# backdoor: true
# mask: 255.255.255.255
# - afi: ipv6
# safi: multicast
# as_number: '65000'
# After state:
# -------------
#
# vios#sh running-config | section ^router bg
# hostname#show running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# neighbor 198.51.100.1 remote-as 10
# neighbor 198.51.110.1 remote-as 100
# neighbor 198.51.110.1 disable-connected-check
# neighbor 198.51.110.1 version 4
# !
# address-family ipv4
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 200
# bgp dampening 10 10 10 10
# network 198.51.110.10 mask 255.255.255.255 backdoor
# aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# neighbor 198.51.100.1 activate
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 slow-peer detection threshold 150
# neighbor 198.51.110.1 activate
# neighbor 198.51.110.1 aigp send cost-community 200 poi igp-cost transitive
# neighbor 198.51.110.1 slow-peer detection threshold 150
# neighbor 198.51.110.1 maximum-prefix 1 10 restart 100
# default-information originate
# exit-address-family
# !
# address-family ipv6 multicast
# exit-address-family
# Using Deleted without any config passed (delete all)
# Before state:
# -------------
#
# vios#sh running-config | section ^router bg
# hostname#show running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# neighbor 198.51.100.1 remote-as 10
# neighbor 198.51.110.1 remote-as 100
# neighbor 198.51.110.1 disable-connected-check
# neighbor 198.51.110.1 version 4
# !
# address-family ipv4
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 200
# bgp dampening 10 10 10 10
# network 198.51.110.10 mask 255.255.255.255 backdoor
# aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# neighbor 198.51.100.1 activate
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 slow-peer detection threshold 150
# neighbor 198.51.110.1 activate
# neighbor 198.51.110.1 aigp send cost-community 200 poi igp-cost transitive
# neighbor 198.51.110.1 slow-peer detection threshold 150
# neighbor 198.51.110.1 maximum-prefix 1 10 restart 100
# default-information originate
# exit-address-family
# !
# address-family ipv6 multicast
# exit-address-family
- name: "Delete ALL of configured AF BGP"
cisco.ios.ios_bgp_address_family:
state: deleted
# Task Output:
# ------------
#
# before:
# address_family:
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.2.1
# as_confed_set: true
# netmask: 255.255.255.255
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 10
# penalty_half_time: 10
# reuse_route_val: 10
# suppress_route_val: 10
# slow_peer_options:
# detection:
# threshold: 200
# default_information: true
# neighbors:
# - activate: true
# aigp:
# send:
# cost_community:
# id: 100
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.100.1
# slow_peer_options:
# detection:
# threshold: 150
# - activate: true
# aigp:
# send:
# cost_community:
# id: 200
# poi:
# igp_cost: true
# transitive: true
# maximum_prefix:
# number: 1
# restart: 100
# threshold_value: 10
# neighbor_address: 198.51.110.1
# slow_peer_options:
# detection:
# threshold: 150
# networks:
# - address: 198.51.110.10
# backdoor: true
# mask: 255.255.255.255
# - afi: ipv6
# safi: multicast
# as_number: '65000'
# commands:
# - router bgp 65000
# - no address-family ipv4
# - no address-family ipv6 multicast
# after:
# address_family:
# - afi: ipv4
# bgp:
# aggregate_timer: 10
# as_number: '65000'
# After state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# neighbor 198.51.100.1 remote-as 10
# neighbor 198.51.110.1 remote-as 100
# neighbor 198.51.110.1 disable-connected-check
# neighbor 198.51.110.1 version 4
# !
# address-family ipv4
# bgp aggregate-timer 10
# no neighbor 198.51.100.1 activate
# no neighbor 198.51.110.1 activate
# exit-address-family
# Using gathered
# Before state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# snmp context snmp_con community community RO 10
# neighbor 198.51.100.1 remote-as 10
# !
# address-family ipv4
# snmp context snmp_con community community RO 10
# bgp aggregate-timer 10
# bgp slow-peer detection threshold 150
# bgp dampening 1 1 1 1
# network 198.51.110.10 mask 255.255.255.255 backdoor
# aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# neighbor 198.51.100.1 activate
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 slow-peer detection threshold 150
# exit-address-family
# !
# address-family ipv4 multicast
# table-map test_tableMap filter
# network 198.51.111.11 mask 255.255.255.255 route-map test
# aggregate-address 192.0.3.1 255.255.255.255 as-confed-set
# default-metric 12
# distance bgp 10 10 100
# exit-address-family
# !
# address-family ipv4 mdt
# bgp dampening 1 10 100 5
# bgp dmzlink-bw
# bgp soft-reconfig-backup
# exit-address-family
- name: Gather listed AF BGP with provided configurations
cisco.ios.ios_bgp_address_family:
config:
state: gathered
# Task Output:
# ------------
#
# gathered:
# address_family:
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.2.1
# as_confed_set: true
# netmask: 255.255.255.255
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 1
# penalty_half_time: 1
# reuse_route_val: 1
# suppress_route_val: 1
# slow_peer_options:
# detection:
# threshold: 150
# neighbors:
# - activate: true
# aigp:
# send:
# cost_community:
# id: 100
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.100.1
# slow_peer_options:
# detection:
# threshold: 150
# networks:
# - address: 198.51.110.10
# backdoor: true
# mask: 255.255.255.255
# snmp:
# context:
# community:
# acl: '10'
# ro: true
# snmp_community: community
# name: snmp_con
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.3.1
# as_confed_set: true
# netmask: 255.255.255.255
# default_metric: 12
# distance:
# external: 10
# internal: 10
# local: 100
# networks:
# - address: 198.51.111.11
# mask: 255.255.255.255
# route_map: test
# safi: multicast
# table_map:
# filter: true
# name: test_tableMap
# - afi: ipv4
# bgp:
# dampening:
# max_suppress: 5
# penalty_half_time: 1
# reuse_route_val: 10
# suppress_route_val: 100
# dmzlink_bw: true
# soft_reconfig_backup: true
# safi: mdt
# as_number: '65000'
# Using rendered
- name: Rendered the provided configuration with the existing running configuration
cisco.ios.ios_bgp_address_family:
config:
as_number: 65000
address_family:
- afi: ipv4
safi: multicast
vrf: blue
aggregate_address:
- address: 192.0.2.1
netmask: 255.255.255.255
as_confed_set: true
bgp:
aggregate_timer: 10
dampening:
penalty_half_time: 1
reuse_route_val: 1
suppress_route_val: 1
max_suppress: 1
slow_peer:
- detection:
threshold: 150
neighbor:
- address: 198.51.100.1
aigp:
send:
cost_community:
id: 100
poi:
igp_cost: true
transitive: true
slow_peer:
- detection:
threshold: 150
remote_as: 10
route_maps:
- name: test-route
out: true
route_server_client: true
network:
- address: 198.51.110.10
mask: 255.255.255.255
backdoor: true
snmp:
context:
name: snmp_con
community:
snmp_community: community
ro: true
acl: 10
- afi: ipv4
safi: mdt
bgp:
dmzlink_bw: true
dampening:
penalty_half_time: 1
reuse_route_val: 10
suppress_route_val: 100
max_suppress: 5
soft_reconfig_backup: true
state: rendered
# Task Output:
# ------------
#
# rendered:
# - router bgp 65000
# - address-family ipv4 multicast vrf blue
# - bgp aggregate-timer 10
# - bgp dampening 1 1 1 1
# - bgp slow-peer detection threshold 150
# - snmp context snmp_con community community ro 10
# - neighbor 198.51.100.1 remote-as 10
# - neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# - neighbor 198.51.100.1 slow-peer detection threshold 150
# - network 198.51.110.10 mask 255.255.255.255 backdoor
# - aggregate-address 192.0.2.1 255.255.255.255 as-confed-set
# - address-family ipv4 mdt
# - bgp dmzlink-bw
# - bgp soft-reconfig-backup
# - bgp dampening 1 10 100 5
# Using parsed
# File: parsed.cfg
# ----------------
# router bgp 65000
# bgp log-neighbor-changes
# bgp nopeerup-delay cold-boot 20
# !
# address-family ipv4 multicast
# table-map test_tableMap filter
# network 1.1.1.1 mask 255.255.255.255 route-map test
# aggregate-address 192.0.3.1 255.255.255.255 as-confed-set
# default-metric 12
# distance bgp 10 10 100
# exit-address-family
# !
# address-family ipv4 mdt
# bgp dampening 1 10 100 5
# bgp dmzlink-bw
# bgp soft-reconfig-backup
# exit-address-family
# !
- name: Parse the commands for provided configuration
cisco.ios.ios_bgp_address_family:
running_config: "{{ lookup('file', 'parsed.cfg') }}"
state: parsed
# Task Output:
# ------------
#
# parsed:
# address_family:
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.2.1
# as_confed_set: true
# netmask: 255.255.255.255
# bgp:
# aggregate_timer: 10
# dampening:
# max_suppress: 1
# penalty_half_time: 1
# reuse_route_val: 1
# suppress_route_val: 1
# slow_peer_options:
# detection:
# threshold: 150
# neighbors:
# - activate: true
# aigp:
# send:
# cost_community:
# id: 100
# poi:
# igp_cost: true
# transitive: true
# neighbor_address: 198.51.100.1
# slow_peer_options:
# detection:
# threshold: 150
# networks:
# - address: 198.51.110.10
# backdoor: true
# mask: 255.255.255.255
# snmp:
# context:
# community:
# acl: '10'
# ro: true
# snmp_community: community
# name: snmp_con
# - afi: ipv4
# aggregate_addresses:
# - address: 192.0.3.1
# as_confed_set: true
# netmask: 255.255.255.255
# default_metric: 12
# distance:
# external: 10
# internal: 10
# local: 100
# networks:
# - address: 198.51.111.11
# mask: 255.255.255.255
# route_map: test
# safi: multicast
# table_map:
# filter: true
# name: test_tableMap
# - afi: ipv4
# bgp:
# dampening:
# max_suppress: 5
# penalty_half_time: 1
# reuse_route_val: 10
# suppress_route_val: 100
# dmzlink_bw: true
# soft_reconfig_backup: true
# safi: mdt
# as_number: '65000'
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: |