On this page
cisco.ios.ios_bgp_global – Global BGP resource module
Note
This plugin is part of the cisco.ios collection (version 2.5.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.ios
.
To use it in a playbook, specify: cisco.ios.ios_bgp_global
.
New in version 1.3.0: of cisco.ios
Synopsis
- This module configures and manages the attributes of global bgp on Cisco IOS.
Note
This module has a corresponding action plugin.
Parameters
Parameter | Choices/Defaults | Comments | ||||||
---|---|---|---|---|---|---|---|---|
config
dictionary
|
A list of configurations for global bgp.
|
|||||||
aggregate_address
dictionary
|
Configure BGP aggregate entries
|
|||||||
address
string
|
Aggregate address
|
|||||||
advertise_map
string
|
Set condition to advertise attribute
|
|||||||
as_confed_set
boolean
|
|
Generate AS confed set path information
|
||||||
as_set
boolean
|
|
Generate AS set path information
|
||||||
attribute_map
string
|
Set attributes of aggregate
|
|||||||
netmask
string
|
Aggregate mask
|
|||||||
summary_only
boolean
|
|
Filter more specific routes from updates
|
||||||
suppress_map
string
|
Conditionally filter more specific routes from updates
|
|||||||
as_number
string / required
|
Autonomous system number.
|
|||||||
auto_summary
boolean
|
|
Enable automatic network number summarization
|
||||||
bgp
dictionary
|
Enable address family and enter its config mode
|
|||||||
additional_paths
dictionary
|
Additional paths in the BGP table
|
|||||||
install
boolean
|
|
Additional paths to install into RIB
|
||||||
receive
boolean
|
|
Receive additional paths from neighbors
|
||||||
select
dictionary
|
Selection criteria to pick the paths
|
|||||||
all
boolean
|
|
Select all available paths
|
||||||
best
integer
|
Select best N paths (2-3).
|
|||||||
best_external
boolean
|
|
Select best-external path
|
||||||
group_best
boolean
|
|
Select group-best path
|
||||||
send
boolean
|
|
Send additional paths to neighbors
|
||||||
advertise_best_external
boolean
|
|
Advertise best external path to internal peers
|
||||||
aggregate_timer
integer
|
Configure Aggregation Timer
Please refer vendor documentation for valid values
|
|||||||
always_compare_med
boolean
|
|
Allow comparing MED from different neighbors
|
||||||
asnotation
boolean
|
|
Change the default asplain notation
asdot notation
|
||||||
bestpath
list / elements=dictionary
|
Change the default bestpath selection
|
|||||||
aigp
boolean
|
|
if both paths doesn't have aigp ignore on bestpath comparision
ignore
|
||||||
compare_routerid
boolean
|
|
Compare router-id for identical EBGP paths
|
||||||
cost_community
boolean
|
|
cost community
|
||||||
igp_metric
boolean
|
|
igp metric
Ignore igp metric in bestpath selection
|
||||||
med
dictionary
|
MED attribute
|
|||||||
confed
boolean
|
|
Compare MED among confederation paths
|
||||||
missing_as_worst
boolean
|
|
Treat missing MED as the least preferred one
|
||||||
client_to_client
dictionary
|
Configure client to client route reflection
|
|||||||
all
boolean
|
|
inter-cluster and intra-cluster (default)
|
||||||
intra_cluster
string
|
intra cluster reflection
intra-cluster reflection for cluster-id
|
|||||||
set
boolean
|
|
set reflection of routes allowed
|
||||||
cluster_id
boolean
|
|
Configure Route-Reflector Cluster-id (peers may reset)
A.B.C.D/Please refer vendor documentation for valid Route-Reflector Cluster-id
|
||||||
confederation
dictionary
|
AS confederation parameters
|
|||||||
identifier
string
|
Set routing domain confederation AS
AS number
|
|||||||
peers
string
|
Peer ASs in BGP confederation
AS number
|
|||||||
consistency_checker
dictionary
|
Consistency-checker
|
|||||||
auto_repair
dictionary
|
Auto-Repair
|
|||||||
interval
integer
|
Set the bgp consistency checker
Please refer vendor documentation for valid values
|
|||||||
set
boolean
|
|
Enable Auto-Repair
|
||||||
error_message
dictionary
|
Log Error-Msg
|
|||||||
interval
integer
|
Set the bgp consistency checker
Please refer vendor documentation for valid values
|
|||||||
set
boolean
|
|
Enable Error-Msg
|
||||||
dampening
dictionary
|
Enable route-flap dampening
|
|||||||
max_suppress
integer
|
Maximum duration to suppress a stable route
Please refer vendor documentation for valid values
|
|||||||
penalty_half_time
integer
|
Half-life time for the penalty
Please refer vendor documentation for valid values
|
|||||||
reuse_route_val
integer
|
Value to start reusing a route
Please refer vendor documentation for valid values
|
|||||||
route_map
string
|
Route-map to specify criteria for dampening
|
|||||||
suppress_route_val
integer
|
Value to start suppressing a route
Please refer vendor documentation for valid values
|
|||||||
deterministic_med
boolean
|
|
Pick the best-MED path among paths advertised from the neighboring AS
|
||||||
dmzlink_bw
boolean
|
|
Use DMZ Link Bandwidth as weight for BGP multipaths
|
||||||
enforce_first_as
boolean
|
|
Enforce the first AS for EBGP routes(default)
|
||||||
enhanced_error
boolean
|
|
Enabled BGP Enhanced error handling
|
||||||
fast_external_fallover
boolean
|
|
Immediately reset session if a link to a directly connected external peer goes down
|
||||||
graceful_restart
dictionary
|
Graceful restart capability parameters
|
|||||||
extended
boolean
|
|
Enable Graceful-Restart Extension
|
||||||
restart_time
integer
|
Set the max time needed to restart and come back up
Please refer vendor documentation for valid values
|
|||||||
set
boolean
|
|
Set Graceful-Restart
|
||||||
stalepath_time
integer
|
Set the max time to hold onto restarting peer's stale paths
Please refer vendor documentation for valid values
|
|||||||
graceful_shutdown
dictionary
|
Graceful shutdown capability parameters
|
|||||||
community
string
|
Set Community for Gshut routes
community number/community number in aa:nn format
|
|||||||
local_preference
integer
|
Set Local Preference for Gshut routes
Please refer vendor documentation for valid values
|
|||||||
neighbors
dictionary
|
Gracefully shut down all neigbors
|
|||||||
activate
boolean
|
|
Activate graceful shutdown of all neigbors
|
||||||
time
integer
|
time in seconds
Please refer vendor documentation for valid values
|
|||||||
vrfs
dictionary
|
Gracefully shut down all vrf neigbors
|
|||||||
activate
boolean
|
|
Activate graceful shutdown of all neigbors
|
||||||
time
integer
|
time in seconds
Please refer vendor documentation for valid values
|
|||||||
inject_map
dictionary
|
Routemap which specifies prefixes to inject
|
|||||||
copy_attributes
boolean
|
|
Copy attributes from aggregate
|
||||||
exist_map_name
string
|
route-map name
|
|||||||
name
string
|
route-map name
|
|||||||
listen
dictionary
|
Neighbor subnet range listener
|
|||||||
limit
integer
|
Set the max limit for the dynamic subnet range neighbors
Please refer vendor documentation for valid values
|
|||||||
range
dictionary
|
Subnet network range
|
|||||||
ipv4_with_subnet
string
|
IPv4 subnet range(A.B.C.D/nn)
|
|||||||
ipv6_with_subnet
string
|
IPv6 subnet range(X:X:X:X::X/<0-128>)
|
|||||||
peer_group
string
|
Member of the peer-group
|
|||||||
log_neighbor_changes
boolean
|
|
Log neighbor up/down and reset reason
|
||||||
maxas_limit
integer
|
Allow AS-PATH attribute from any neighbor imposing a limit on number of ASes
Please refer vendor documentation for valid values
|
|||||||
maxcommunity_limit
integer
|
Allow COMMUNITY attribute from any neighbor imposing a limit on number of communities
Please refer vendor documentation for valid values
|
|||||||
maxextcommunity_limit
integer
|
Allow EXTENDED COMMUNITY attribute from any neighbor imposing a limit on number of extended communities
Please refer vendor documentation for valid values
|
|||||||
nexthop
dictionary
|
Nexthop tracking commands
|
|||||||
route_map
string
|
Route map for valid nexthops
|
|||||||
trigger
dictionary
|
nexthop trackings
|
|||||||
delay
integer
|
Set the delay to tigger nexthop tracking
Please refer vendor documentation for valid values
|
|||||||
enable
boolean
|
|
Enable nexthop tracking
|
||||||
nopeerup_delay
list / elements=dictionary
|
Set how long BGP will wait for the first peer to come up before beginning the update delay or graceful restart timers (in seconds)
|
|||||||
cold_boot
integer
|
How long to wait for the first peer to come up upon a cold boot
Please refer vendor documentation for valid values
|
|||||||
nsf_switchover
integer
|
How long to wait for the first peer, post NSF switchover
Please refer vendor documentation for valid values
|
|||||||
post_boot
integer
|
How long to wait for the first peer to come up once the system is already booted and all peers go down
Please refer vendor documentation for valid values
|
|||||||
user_initiated
integer
|
How long to wait for the first peer, post a manual clear of BGP peers by the admin user
Please refer vendor documentation for valid values
|
|||||||
recursion
boolean
|
|
recursion rule for the nexthops
recursion via host for the nexthops
|
||||||
redistribute_internal
boolean
|
|
Allow redistribution of iBGP into IGPs (dangerous)
|
||||||
refresh
dictionary
|
refresh
|
|||||||
max_eor_time
integer
|
Configure refresh max-eor time
Please refer vendor documentation for valid values
|
|||||||
stalepath_time
integer
|
Configure refresh stale-path time
Please refer vendor documentation for valid values
|
|||||||
regexp
boolean
|
|
Select regular expression engine
Enable bounded-execution-time regular expression engine
|
||||||
route_map
boolean
|
|
route-map control commands
Have route-map set commands take priority over BGP commands such as next-hop unchanged
|
||||||
router_id
dictionary
|
Override configured router identifier (peers will reset)
|
|||||||
address
string
|
Manually configured router identifier(A.B.C.D)
|
|||||||
interface
string
|
Use IPv4 address on interface
|
|||||||
vrf
boolean
|
|
vrf-specific router id configuration
Automatically assign per-vrf bgp router id
|
||||||
scan_time
integer
|
Configure background scanner interval
Please refer vendor documentation for valid values
|
|||||||
slow_peer
dictionary
|
Configure slow-peer
|
|||||||
detection
dictionary
|
Slow-peer detection
|
|||||||
set
boolean
|
|
Slow-peer detection
|
||||||
threshold
integer
|
Set the slow-peer detection threshold
Please refer vendor documentation for valid values
|
|||||||
split_update_group
dictionary
|
Configure slow-peer split-update-group
|
|||||||
dynamic
boolean
|
|
Dynamically split the slow peer to slow-update group
|
||||||
permanent
integer
|
Keep the slow-peer permanently in slow-update group
|
|||||||
snmp
boolean
|
|
BGP SNMP options
BGP SNMP trap options
Use cbgpPeer2Type as part of index for traps
|
||||||
soft_reconfig_backup
boolean
|
|
Use soft-reconfiguration inbound only when route-refresh is not negotiated
|
||||||
sso
boolean
|
|
Stateful Switchover
Enable SSO only for Route-Refresh capable peers
|
||||||
suppress_inactive
boolean
|
|
Suppress routes that are not in the routing table
|
||||||
transport
boolean
|
|
Global enable/disable transport session parameters
Transport path MTU discovery
|
||||||
update_delay
integer
|
Set the max initial delay for sending update
Please refer vendor documentation for valid values
|
|||||||
update_group
boolean
|
|
Manage peers in bgp update groups
Split update groups based on Policy
Keep peers with as-override in different update groups
|
||||||
upgrade_cli
dictionary
|
Upgrade to hierarchical AFI mode
|
|||||||
af_mode
boolean
|
|
Upgrade to AFI mode
|
||||||
set
boolean
|
|
enable upgrade to hierarchical AFI mode
|
||||||
bmp
dictionary
|
BGP Monitoring Protocol)
|
|||||||
buffer_size
integer
|
BMP Buffer Size
Please refer vendor documentation for valid values
|
|||||||
initial_refresh
dictionary
|
Initial Refresh options
|
|||||||
delay
integer
|
Delay before Initial Refresh
|
|||||||
skip
boolean
|
|
skip all refreshes
|
||||||
server
integer
|
Server Information
Please refer vendor documentation for valid values
|
|||||||
default_information
boolean
|
|
Control distribution of default information
Distribute a default route
|
||||||
default_metric
integer
|
Set metric of redistributed routes
Please refer vendor documentation for valid values
|
|||||||
distance
dictionary
|
Define an administrative distance
|
|||||||
admin
dictionary
|
Administrative distance
|
|||||||
acl
string
|
IP Standard access list number
IP Standard expanded access list number
Standard access-list name
|
|||||||
address
string
|
IP Source address (A.B.C.D)
|
|||||||
distance
integer
|
Administrative distance
Please refer vendor documentation for valid values
|
|||||||
wildcard_bit
string
|
Wildcard bits (A.B.C.D)
|
|||||||
bgp
dictionary
|
BGP distance
|
|||||||
routes_external
integer
|
Distance for routes external to the AS
Please refer vendor documentation for valid values
|
|||||||
routes_internal
integer
|
Distance for routes internal to the AS
Please refer vendor documentation for valid values
|
|||||||
routes_local
integer
|
Distance for local routes
Please refer vendor documentation for valid values
|
|||||||
mbgp
dictionary
|
MBGP distance
|
|||||||
routes_external
integer
|
Distance for routes external to the AS
Please refer vendor documentation for valid values
|
|||||||
routes_internal
integer
|
Distance for routes internal to the AS
Please refer vendor documentation for valid values
|
|||||||
routes_local
integer
|
Distance for local routes
Please refer vendor documentation for valid values
|
|||||||
distribute_list
dictionary
|
Filter networks in routing updates
|
|||||||
acl
string
|
IP access list number/name
|
|||||||
in
boolean
|
|
Filter incoming routing updates
|
||||||
interface
string
|
interface details
|
|||||||
out
boolean
|
|
Filter outgoing routing updates
|
||||||
maximum_paths
dictionary
|
Forward packets over multiple paths
|
|||||||
eibgp
integer
|
Both eBGP and iBGP paths as multipath
|
|||||||
ibgp
integer
|
iBGP-multipath
|
|||||||
paths
integer
|
Number of paths
|
|||||||
maximum_secondary_paths
dictionary
|
Maximum secondary paths
|
|||||||
eibgp
integer
|
Both eBGP and iBGP paths as secondary multipath
|
|||||||
ibgp
integer
|
iBGP-secondary-multipath
|
|||||||
paths
integer
|
Number of secondary paths
|
|||||||
neighbor
list / elements=dictionary
|
Specify a neighbor router
|
|||||||
activate
boolean
|
|
Enable the Address Family for this Neighbor
|
||||||
additional_paths
dictionary
|
Negotiate additional paths capabilities with this neighbor
|
|||||||
disable
boolean
|
|
Disable additional paths for this neighbor
|
||||||
receive
boolean
|
|
Receive additional paths from neighbors
|
||||||
send
boolean
|
|
Send additional paths to neighbors
|
||||||
address
string
|
Neighbor address (A.B.C.D)
|
|||||||
advertise
dictionary
|
Advertise to this neighbor
|
|||||||
additional_paths
dictionary
|
Advertise additional paths
|
|||||||
all
boolean
|
|
Select all available paths
|
||||||
best
integer
|
Select best N paths (2-3).
|
|||||||
group_best
boolean
|
|
Select group-best path
|
||||||
best_external
boolean
|
|
Advertise best-external (at RRs best-internal) path
|
||||||
diverse_path
dictionary
|
Advertise additional paths
|
|||||||
backup
boolean
|
|
Diverse path can be backup path
|
||||||
mpath
boolean
|
|
Diverse path can be multipath
|
||||||
advertise_map
dictionary
|
specify route-map for conditional advertisement
|
|||||||
exist_map
string
|
advertise prefix only if prefix is in the condition exists
condition route-map name
|
|||||||
name
string
|
advertise route-map name
|
|||||||
non_exist_map
string
|
advertise prefix only if prefix in the condition does not exist
condition route-map name
|
|||||||
advertisement_interval
integer
|
Minimum interval between sending BGP routing updates
|
|||||||
aigp
dictionary
|
AIGP on neighbor
|
|||||||
enable
boolean
|
|
Enable AIGP
|
||||||
send
dictionary
|
Cost community or MED carrying AIGP VALUE
|
|||||||
cost_community
dictionary
|
Cost extended community carrying AIGP Value
|
|||||||
id
integer
|
Community ID
Please refer vendor documentation for valid values
|
|||||||
poi
dictionary
|
Point of Insertion
|
|||||||
igp_cost
boolean
|
|
Point of Insertion After IGP
|
||||||
pre_bestpath
boolean
|
|
Point of Insertion At Beginning
|
||||||
transitive
boolean
|
|
Cost community is Transitive
|
||||||
med
boolean
|
|
Med carrying AIGP Value
|
||||||
allow_policy
boolean
|
|
Enable the policy support for this IBGP Neighbor
|
||||||
allowas_in
integer
|
Accept as-path with my AS present in it
|
|||||||
as_override
boolean
|
|
Override matching AS-number while sending update
Maintain Split Horizon while sending update
|
||||||
bmp_activate
dictionary
|
Activate the BMP monitoring for a BGP peer
|
|||||||
all
boolean
|
|
Activate BMP monitoring for all servers
|
||||||
server
integer
|
Activate BMP for server
BMP Server Number
Please refer vendor documentation for valid values
|
|||||||
capability
dictionary
|
Advertise capability to the peer
Advertise ORF capability to the peer
Advertise prefixlist ORF capability to this neighbor
|
|||||||
both
boolean
|
|
Capability to SEND and RECEIVE the ORF to/from this neighbor
|
||||||
receive
boolean
|
|
Capability to RECEIVE the ORF from this neighbor
|
||||||
send
boolean
|
|
Capability to SEND the ORF to this neighbor
|
||||||
cluster_id
string
|
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)
|
|||||||
default_originate
dictionary
|
Originate default route to this neighbor
|
|||||||
route_map
string
|
Route-map to specify criteria to originate default
|
|||||||
set
boolean
|
|
Originate default route to this neighbor
|
||||||
description
string
|
Neighbor specific description
|
|||||||
disable_connected_check
boolean
|
|
one-hop away EBGP peer using loopback address
|
||||||
distribute_list
dictionary
|
Filter updates to/from this neighbor
|
|||||||
acl
string
|
IP access list number/name
|
|||||||
in
boolean
|
|
Filter incoming updates
|
||||||
out
boolean
|
|
Filter outgoing updates
|
||||||
dmzlink_bw
boolean
|
|
Propagate the DMZ link bandwidth
|
||||||
ebgp_multihop
dictionary
|
Allow EBGP neighbors not on directly connected networks
|
|||||||
enable
boolean
|
|
Allow EBGP neighbors not on directly connected networks
|
||||||
hop_count
integer
|
Maximum hop count
Please refer vendor documentation for valid values
|
|||||||
fall_over
dictionary
|
Session fall on peer route lost
|
|||||||
bfd
dictionary
|
Use BFD to detect failure
|
|||||||
multi_hop
boolean
|
|
Force BFD multi-hop to detect failure
|
||||||
set
boolean
|
|
set bfd
|
||||||
single_hop
boolean
|
|
Force BFD single-hop to detect failure
|
||||||
route_map
string
|
Route map for peer route
|
|||||||
filter_list
dictionary
|
Establish BGP filters
|
|||||||
in
boolean
|
|
Filter incoming updates
|
||||||
out
boolean
|
|
Filter outgoing updates
|
||||||
path_acl
string
|
AS path access list
|
|||||||
ha_mode
dictionary
|
high availability mode
|
|||||||
disable
boolean
|
|
disable graceful-restart
|
||||||
set
boolean
|
|
set ha-mode and graceful-restart for this peer
|
||||||
inherit
string
|
Inherit a template
Inherit a peer-session template and Template name
|
|||||||
ipv6_adddress
string
|
Neighbor ipv6 address (X:X:X:X::X)
|
|||||||
local_as
dictionary
|
Specify a local-as number
|
|||||||
dual_as
boolean
|
|
Accept either real AS or local AS from the ebgp peer
|
||||||
no_prepend
dictionary
|
Do not prepend local-as to updates from ebgp peers
|
|||||||
replace_as
boolean
|
|
Replace real AS with local AS in the EBGP updates
|
||||||
set
boolean
|
|
Set prepend
|
||||||
number
integer
|
AS number used as local AS
Please refer vendor documentation for valid values
|
|||||||
set
boolean
|
|
set local-as number
|
||||||
log_neighbor_changes
dictionary
|
Log neighbor up/down and reset reason
|
|||||||
disable
boolean
|
|
disable Log neighbor up/down and reset
|
||||||
set
boolean
|
|
set Log neighbor up/down and reset
|
||||||
maximum_prefix
dictionary
|
Maximum number of prefixes accepted from this peer
|
|||||||
max_no
integer
|
maximum no. of prefix limit
|
|||||||
restart
integer
|
Restart bgp connection after limit is exceeded
|
|||||||
threshold_val
integer
|
Threshold value (%) at which to generate a warning msg
|
|||||||
warning_only
boolean
|
|
Only give warning message when limit is exceeded
|
||||||
next_hop_self
dictionary
|
Disable the next hop calculation for this neighbor
|
|||||||
all
boolean
|
|
Enable next-hop-self for both eBGP and iBGP received paths
|
||||||
set
boolean
|
|
Enable next-hop-self
|
||||||
next_hop_unchanged
dictionary
|
Propagate next hop unchanged for iBGP paths to this neighbor
Propagate next hop unchanged for all paths (iBGP and eBGP) to this neighbor
|
|||||||
allpaths
boolean
|
|
Propagate next hop unchanged for all paths (iBGP and eBGP) to this neighbor
|
||||||
set
boolean
|
|
Enable next-hop-unchanged
|
||||||
password
string
|
Set a password
|
|||||||
path_attribute
dictionary
|
BGP optional attribute filtering
|
|||||||
discard
dictionary
|
Discard matching path-attribute for this neighbor
|
|||||||
in
boolean
|
|
Perform inbound path-attribute filtering
|
||||||
range
dictionary
|
path attribute range
|
|||||||
end
integer
|
path attribute range end value
Please refer vendor documentation for valid values
|
|||||||
start
integer
|
path attribute range start value
Please refer vendor documentation for valid values
|
|||||||
type
integer
|
path attribute type
Please refer vendor documentation for valid values
|
|||||||
treat_as_withdraw
dictionary
|
Treat-as-withdraw matching path-attribute for this neighbor
|
|||||||
in
boolean
|
|
Perform inbound path-attribute filtering
|
||||||
range
dictionary
|
path attribute range
|
|||||||
end
integer
|
path attribute range end value
Please refer vendor documentation for valid values
|
|||||||
start
integer
|
path attribute range start value
Please refer vendor documentation for valid values
|
|||||||
type
integer
|
path attribute type
Please refer vendor documentation for valid values
|
|||||||
peer_group
string
|
Member of the peer-group
|
|||||||
remote_as
integer
|
Specify a BGP neighbor
AS of remote neighbor
|
|||||||
remove_private_as
dictionary
|
Remove private AS number from outbound updates
|
|||||||
all
boolean
|
|
Remove all private AS numbers
|
||||||
replace_as
boolean
|
|
Replace all private AS numbers with local AS
|
||||||
set
boolean
|
|
Remove private AS number
|
||||||
route_map
dictionary
|
Apply route map to neighbor
|
|||||||
in
boolean
|
|
Apply map to incoming routes
|
||||||
name
string
|
Replace all private AS numbers with local AS
|
|||||||
out
boolean
|
|
Apply map to outbound routes
|
||||||
route_reflector_client
boolean
|
|
Configure a neighbor as Route Reflector client
|
||||||
route_server_client
dictionary
|
Configure a neighbor as Route Server client
|
|||||||
context
string
|
Specify Route Server context for neighbor
Route Server context name
|
|||||||
set
boolean
|
|
Set Route Server client
|
||||||
send_community
dictionary
|
Send Community attribute to this neighbor
|
|||||||
both
boolean
|
|
Send Standard and Extended Community attributes
|
||||||
extended
boolean
|
|
Send Extended Community attribute
|
||||||
set
boolean
|
|
Set send Community attribute to this neighbor
|
||||||
standard
boolean
|
|
Send Standard Community attribute
|
||||||
send_label
dictionary
|
Send NLRI + MPLS Label to this peer
|
|||||||
explicit_null
boolean
|
|
Advertise Explicit Null label in place of Implicit Null
|
||||||
set
boolean
|
|
Set send NLRI + MPLS Label to this peer
|
||||||
shutdown
dictionary
|
Administratively shut down this neighbor
|
|||||||
graceful
integer
|
Gracefully shut down this neighbor
time in seconds
Please refer vendor documentation for valid values
|
|||||||
set
boolean
|
|
shut down
|
||||||
slow_peer
dictionary
|
Configure slow-peer
|
|||||||
detection
dictionary
|
Configure slow-peer
|
|||||||
disable
boolean
|
|
Disable slow-peer detection
|
||||||
enable
boolean
|
|
Enable slow-peer detection
|
||||||
threshold
integer
|
Set the slow-peer detection threshold
|
|||||||
split_update_group
dictionary
|
Configure slow-peer split-update-group
|
|||||||
dynamic
dictionary
|
Dynamically split the slow peer to slow-update group
|
|||||||
disable
boolean
|
|
Disable slow-peer detection
|
||||||
enable
boolean
|
|
Enable slow-peer detection
|
||||||
permanent
boolean
|
|
Keep the slow-peer permanently in slow-update group
|
||||||
static
boolean
|
|
Static slow-peer
|
||||||
soft_reconfiguration
boolean
|
|
Per neighbor soft reconfiguration
Allow inbound soft reconfiguration for this neighbor
|
||||||
tag
string
|
Neighbor tag
|
|||||||
timers
dictionary
|
BGP per neighbor timers
|
|||||||
holdtime
integer
|
Holdtime
|
|||||||
interval
integer
|
Keepalive interval
|
|||||||
min_holdtime
integer
|
Minimum hold time from neighbor
|
|||||||
translate_update
dictionary
|
Translate Update to MBGP format
|
|||||||
nlri
dictionary
|
Specify type of nlri to translate to
|
|||||||
multicast
boolean
|
|
Translate Update to multicast nlri
|
||||||
unicast
boolean
|
|
Process Update as unicast nlri
|
||||||
set
boolean
|
|
Set Translate Update
|
||||||
transport
dictionary
|
Transport options
|
|||||||
connection_mode
dictionary
|
Specify passive or active connection
|
|||||||
active
boolean
|
|
Actively establish the TCP session
|
||||||
passive
boolean
|
|
Passively establish the TCP session
|
||||||
multi_session
boolean
|
|
Use Multi-session for transport
|
||||||
path_mtu_discovery
dictionary
|
Use transport path MTU discovery
|
|||||||
disable
boolean
|
|
disable
|
||||||
set
boolean
|
|
Use path MTU discovery
|
||||||
ttl_security
integer
|
BGP ttl security check
maximum number of hops
Please refer vendor documentation for valid values
|
|||||||
unsuppress_map
string
|
Route-map to selectively unsuppress suppressed routes
Name of route map
|
|||||||
version
integer
|
Set the BGP version to match a neighbor
Neighbor's BGP version
Please refer vendor documentation for valid values
|
|||||||
weight
integer
|
Set default weight for routes from this neighbor
|
|||||||
redistribute
list / elements=dictionary
|
Redistribute information from another routing protocol
|
|||||||
application
dictionary
|
Application
|
|||||||
metric
integer
|
Metric for redistributed routes
|
|||||||
name
string
|
Application name
|
|||||||
route_map
string
|
Route map reference
|
|||||||
bgp
dictionary
|
Border Gateway Protocol (BGP)
|
|||||||
as_number
string
|
Autonomous system number
|
|||||||
metric
integer
|
Metric for redistributed routes
|
|||||||
route_map
string
|
Route map reference
|
|||||||
connected
dictionary
|
Connected
|
|||||||
metric
integer
|
Metric for redistributed routes
|
|||||||
route_map
string
|
Route map reference
|
|||||||
eigrp
dictionary
|
Enhanced Interior Gateway Routing Protocol (EIGRP)
|
|||||||
as_number
string
|
Autonomous system number
|
|||||||
metric
integer
|
Metric for redistributed routes
|
|||||||
route_map
string
|
Route map reference
|
|||||||
isis
dictionary
|
ISO IS-IS
|
|||||||
area_tag
string
|
ISO routing area tag
|
|||||||
clns
boolean
|
|
Redistribution of OSI dynamic routes
|
||||||
ip
boolean
|
|
Redistribution of IP dynamic routes
|
||||||
metric
integer
|
Metric for redistributed routes
|
|||||||
route_map
string
|
Route map reference
|
|||||||
iso_igrp
dictionary
|
IGRP for OSI networks
|
|||||||
area_tag
string
|
ISO routing area tag
|
|||||||
route_map
string
|
Route map reference
|
|||||||
lisp
dictionary
|
Locator ID Separation Protocol (LISP)
|
|||||||
metric
integer
|
Metric for redistributed routes
|
|||||||
route_map
string
|
Route map reference
|
|||||||
mobile
dictionary
|
Mobile routes
|
|||||||
metric
integer
|
Metric for redistributed routes
|
|||||||
route_map
string
|
Route map reference
|
|||||||
odr
dictionary
|
On Demand stub Routes
|
|||||||
metric
integer
|
Metric for redistributed routes
|
|||||||
route_map
string
|
Route map reference
|
|||||||
ospf
dictionary
|
Open Shortest Path First (OSPF)
|
|||||||
match
dictionary
|
On Demand stub Routes
|
|||||||
external
boolean
|
|
Redistribute OSPF external routes
|
||||||
internal
boolean
|
|
Redistribute OSPF internal routes
|
||||||
nssa_external
boolean
|
|
Redistribute OSPF NSSA external routes
|
||||||
type_1
boolean
|
|
Redistribute NSSA external type 1 routes
|
||||||
type_2
boolean
|
|
Redistribute NSSA external type 2 routes
|
||||||
metric
integer
|
Metric for redistributed routes
|
|||||||
process_id
integer
|
Process ID
|
|||||||
route_map
string
|
Route map reference
|
|||||||
vrf
string
|
VPN Routing/Forwarding Instance
|
|||||||
ospfv3
dictionary
|
OSPFv3
|
|||||||
match
dictionary
|
On Demand stub Routes
|
|||||||
external
boolean
|
|
Redistribute OSPF external routes
|
||||||
internal
boolean
|
|
Redistribute OSPF internal routes
|
||||||
nssa_external
boolean
|
|
Redistribute OSPF NSSA external routes
|
||||||
type_1
boolean
|
|
Redistribute NSSA external type 1 routes
|
||||||
type_2
boolean
|
|
Redistribute NSSA external type 2 routes
|
||||||
metric
integer
|
Metric for redistributed routes
|
|||||||
process_id
integer
|
Process ID
|
|||||||
route_map
string
|
Route map reference
|
|||||||
rip
dictionary
|
Routing Information Protocol (RIP)
|
|||||||
metric
integer
|
Metric for redistributed routes
|
|||||||
route_map
string
|
Route map reference
|
|||||||
static
dictionary
|
Static routes
|
|||||||
clns
boolean
|
|
Redistribution of OSI static routes
|
||||||
ip
boolean
|
|
Redistribution of IP static routes
|
||||||
metric
integer
|
Metric for redistributed routes
|
|||||||
route_map
string
|
Route map reference
|
|||||||
vrf
dictionary
|
Specify a source VRF
|
|||||||
global
boolean
|
|
global VRF
|
||||||
name
string
|
Source VRF name
|
|||||||
route_server_context
dictionary
|
Enter route server context command mode
|
|||||||
address_family
dictionary
|
Enter address family command mode
|
|||||||
afi
string
|
|
Address family
|
||||||
import_map
string
|
Import matching routes using a route map
Name of route map
|
|||||||
modifier
string
|
|
Address Family modifier
|
||||||
description
string
|
Textual description of the router server context
|
|||||||
name
string
|
Name of route server context
|
|||||||
scope
dictionary
|
Enter scope command mode
|
|||||||
global
boolean
|
|
Global scope
|
||||||
vrf
string
|
VRF scope
VPN Routing/Forwarding instance name
|
|||||||
synchronization
boolean
|
|
Perform IGP synchronization
|
||||||
table_map
dictionary
|
Map external entry attributes into routing table
|
|||||||
filter
boolean
|
|
Selective route download
|
||||||
name
string
|
route-map name
|
|||||||
template
dictionary
|
Enter template command mode
|
|||||||
peer_policy
string
|
Template configuration for policy parameters
|
|||||||
peer_session
string
|
Template configuration for session parameters
|
|||||||
timers
dictionary
|
Adjust routing timers
BGP timers
|
|||||||
holdtime
integer
|
Holdtime
|
|||||||
keepalive
integer
|
Keepalive interval
|
|||||||
min_holdtime
integer
|
Minimum hold time from neighbor
|
|||||||
running_config
string
|
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 running_config option and transforms it into Ansible structured data as per the resource module's argspec and the value is then returned in the parsed key within the result.
|
|||||||
state
string
|
|
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
config option to platform specific CLI commands which will be returned in the rendered key within the result. For state rendered active connection to remote host is not required.
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 running_config option and transforms it into JSON format as per the resource module parameters and the value is returned in the parsed key within the result. The value of running_config option should be the same format as the output of command show running-config | include ip route|ipv6 route executed on device. For state parsed active connection to remote host is not required.
|
Notes
Note
- Tested against Cisco IOSv Version 15.2 on VIRL
Examples
# Using merged
# Before state:
# -------------
#
# vios#sh running-config | section ^router bgp
- name: Merge provided configuration with device configuration
cisco.ios.ios_bgp_global:
config:
as_number: 65000
bgp:
advertise_best_external: true
bestpath:
- compare_routerid: true
nopeerup_delay:
- post_boot: 10
dampening:
penalty_half_time: 1
reuse_route_val: 1
suppress_route_val: 1
max_suppress: 1
graceful_shutdown:
neighbors:
time: 50
community: 100
local_preference: 100
neighbor:
- address: 198.51.100.1
description: merge neighbor
remote_as: 100
aigp:
send:
cost_community:
id: 100
poi:
igp_cost: true
transitive: true
route_map:
name: test-route
out: true
state: merged
# Commands fired:
# ---------------
#
# "commands": [
# "router bgp 65000",
# "bgp dampening 1 1 1 1",
# "bgp graceful-shutdown all neighbors 50 community 100 local-preference 100",
# "bgp advertise-best-external",
# "bgp nopeerup-delay post-boot 10",
# "bgp bestpath compare-routerid",
# "neighbor 198.51.100.1 remote-as 100",
# "neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive",
# "neighbor 198.51.100.1 description merge neighbor",
# "neighbor 198.51.100.1 route-map test-route out"
# ]
# After state:
# ------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp nopeerup-delay post-boot 10
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# bgp bestpath compare-routerid
# bgp dampening 1 1 1 1
# bgp advertise-best-external
# neighbor 198.51.100.1 remote-as 100
# neighbor 198.51.100.1 description merge neighbor
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 route-map test-route out
# Using replaced
# Before state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp nopeerup-delay post-boot 10
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# bgp bestpath compare-routerid
# bgp dampening 1 1 1 1
# bgp advertise-best-external
# neighbor 198.51.100.1 remote-as 100
# neighbor 198.51.100.1 description merge neighbor
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 route-map test-route out
- name: Replaces device configuration of listed global BGP with provided configuration
cisco.ios.ios_bgp_global:
config:
as_number: 65000
bgp:
advertise_best_external: true
bestpath:
- med:
confed: true
log_neighbor_changes: true
nopeerup_delay:
- post_boot: 10
cold_boot: 20
neighbor:
- address: 192.0.2.1
description: replace neighbor
remote_as: 100
slow_peer:
detection:
disable: true
state: replaced
# Commands fired:
# ---------------
#
# "commands": [
# "router bgp 65000"
# "no bgp dampening 1 1 1 1"
# "no timers bgp 100 200 150"
# "no bgp bestpath compare-routerid"
# "bgp bestpath med confed"
# "bgp nopeerup-delay cold-boot 20"
# "no neighbor 198.51.100.1 remote-as 100"
# "neighbor 192.0.2.1 remote-as 100"
# "no bgp graceful-shutdown all neighbors 50 local-preference 100 community 100"
# "no neighbor 198.51.100.1 route-map test-route out"
# "no neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive"
# "no neighbor 198.51.100.1 description merge neighbor"
# "neighbor 192.0.2.1 slow-peer detection disable"
# "neighbor 192.0.2.1 description replace neighbor"
# ]
# After state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp log-neighbor-changes
# bgp nopeerup-delay cold-boot 20
# bgp nopeerup-delay post-boot 10
# bgp bestpath med confed
# bgp advertise-best-external
# redistribute connected metric 10
# neighbor 192.0.2.1 remote-as 100
# neighbor 192.0.2.1 description replace neighbor
# neighbor 192.0.2.1 slow-peer detection disable
# Using Deleted
# Before state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp nopeerup-delay post-boot 10
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# bgp bestpath compare-routerid
# bgp dampening 1 1 1 1
# bgp advertise-best-external
# neighbor 198.51.100.1 remote-as 100
# neighbor 198.51.100.1 description merge neighbor
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 route-map test-route out
- name: "Delete global BGP (Note: This won't delete the configured global BGP)"
cisco.ios.ios_bgp_global:
config:
as_number: 65000
state: deleted
# Commands fired:
# ---------------
# "commands": [
# "router bgp 65000",
# "no bgp dampening 1 1 1 1",
# "no bgp graceful-shutdown all neighbors 50 community 100 local-preference 100",
# "no bgp advertise-best-external",
# "no bgp bestpath compare-routerid",
# "no bgp nopeerup-delay post-boot 10",
# "no neighbor 198.51.100.1 remote-as 100",
# "no neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive",
# "no neighbor 198.51.100.1 description merge neighbor",
# "no neighbor 198.51.100.1 route-map test-route out"
# ]
# After state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# Using Deleted without any config passed
#"(NOTE: This will delete all of configured global BGP)"
# Before state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp nopeerup-delay post-boot 10
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# bgp bestpath compare-routerid
# bgp dampening 1 1 1 1
# bgp advertise-best-external
# neighbor 198.51.100.1 remote-as 100
# neighbor 198.51.100.1 description merge neighbor
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 route-map test-route out
- name: "Delete global BGP without config"
cisco.ios.ios_bgp_global:
state: deleted
# Commands fired:
# ---------------
# "commands": [
# "router bgp 65000",
# "no bgp dampening 1 1 1 1",
# "no bgp graceful-shutdown all neighbors 50 community 100 local-preference 100",
# "no bgp advertise-best-external",
# "no bgp bestpath compare-routerid",
# "no bgp nopeerup-delay post-boot 10",
# "no neighbor 198.51.100.1 remote-as 100",
# "no neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive",
# "no neighbor 198.51.100.1 description merge neighbor",
# "no neighbor 198.51.100.1 route-map test-route out"
# ]
# After state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# Using Purged
#"(NOTE: This WILL delete the configured global BGP)"
# Before state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp nopeerup-delay post-boot 10
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# bgp bestpath compare-routerid
# bgp dampening 1 1 1 1
# bgp advertise-best-external
# neighbor 198.51.100.1 remote-as 100
# neighbor 198.51.100.1 description merge neighbor
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 route-map test-route out
- name: 'Delete the configured global BGP (Note: This WILL delete the the configured
global BGP)'
cisco.ios.ios_bgp_global:
state: purged
# Commands fired:
# ---------------
# "commands": [
# "no router bgp 65000",
# ]
# After state:
# -------------
#
# vios#sh running-config | section ^router bgp
# Using Gathered
# Before state:
# -------------
#
# vios#sh running-config | section ^router bgp
# router bgp 65000
# bgp nopeerup-delay post-boot 10
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# bgp bestpath compare-routerid
# bgp dampening 1 1 1 1
# bgp advertise-best-external
# neighbor 198.51.100.1 remote-as 100
# neighbor 198.51.100.1 description merge neighbor
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 route-map test-route out
- name: Gather listed global BGP with provided configurations
cisco.ios.ios_bgp_global:
config:
state: gathered
# Module Execution Result:
# ------------------------
#
# "gathered": {
# "as_number": "65000",
# "bgp": {
# "advertise_best_external": true,
# "bestpath": [
# {
# "compare_routerid": true
# }
# ],
# "dampening": {
# "max_suppress": 1,
# "penalty_half_time": 1,
# "reuse_route_val": 1,
# "suppress_route_val": 1
# },
# "graceful_shutdown": {
# "community": "100",
# "local_preference": 100,
# "neighbors": {
# "time": 50
# }
# },
# "nopeerup_delay": [
# {
# "post_boot": 10
# }
# ]
# },
# "neighbor": [
# {
# "address": "198.51.100.1",
# "aigp": {
# "send": {
# "cost_community": {
# "id": 100,
# "poi": {
# "igp_cost": true,
# "transitive": true
# }
# }
# }
# },
# "description": "merge neighbor",
# "remote_as": 100,
# "route_map": {
# "name": "test-route",
# "out": true
# }
# }
# ]
# }
# Using Rendered
- name: Rendered the provided configuration with the existing running configuration
cisco.ios.ios_bgp_global:
config:
as_number: 65000
bgp:
advertise_best_external: true
bestpath:
- compare_routerid: true
nopeerup_delay:
- post_boot: 10
dampening:
penalty_half_time: 1
reuse_route_val: 1
suppress_route_val: 1
max_suppress: 1
graceful_shutdown:
neighbors:
time: 50
community: 100
local_preference: 100
neighbor:
- address: 198.51.100.1
description: merge neighbor
remote_as: 100
aigp:
send:
cost_community:
id: 100
poi:
igp_cost: true
transitive: true
route_map:
name: test-route
out: true
state: rendered
# Module Execution Result:
# ------------------------
#
# "rendered": [
# "router bgp 65000",
# "bgp dampening 1 1 1 1",
# "bgp graceful-shutdown all neighbors 50 community 100 local-preference 100",
# "bgp advertise-best-external",
# "bgp nopeerup-delay post-boot 10",
# "bgp bestpath compare-routerid",
# "neighbor 198.51.100.1 remote-as 100",
# "neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive",
# "neighbor 198.51.100.1 description merge neighbor",
# "neighbor 198.51.100.1 route-map test-route out"
# ]
# Using Parsed
# File: parsed.cfg
# ----------------
#
# router bgp 65000
# bgp nopeerup-delay post-boot 10
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100
# bgp bestpath compare-routerid
# bgp dampening 1 1 1 1
# bgp advertise-best-external
# neighbor 198.51.100.1 remote-as 100
# neighbor 198.51.100.1 description merge neighbor
# neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive
# neighbor 198.51.100.1 route-map test-route out
- name: Parse the commands for provided configuration
cisco.ios.ios_bgp_global:
running_config: "{{ lookup('file', 'parsed.cfg') }}"
state: parsed
# Module Execution Result:
# ------------------------
#
# "parsed": {
# "as_number": "65000",
# "bgp": {
# "advertise_best_external": true,
# "bestpath": [
# {
# "compare_routerid": true
# }
# ],
# "dampening": {
# "max_suppress": 1,
# "penalty_half_time": 1,
# "reuse_route_val": 1,
# "suppress_route_val": 1
# },
# "graceful_shutdown": {
# "community": "100",
# "local_preference": 100,
# "neighbors": {
# "time": 50
# }
# },
# "nopeerup_delay": [
# {
# "post_boot": 10
# }
# ]
# },
# "neighbor": [
# {
# "address": "198.51.100.1",
# "aigp": {
# "send": {
# "cost_community": {
# "id": 100,
# "poi": {
# "igp_cost": true,
# "transitive": true
# }
# }
# }
# },
# "description": "merge neighbor",
# "remote_as": 100,
# "route_map": {
# "name": "test-route",
# "out": true
# }
# }
# ]
# }
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
after
list / elements=string
|
when changed |
The configuration as structured data after module completion.
Sample:
The configuration returned will always be in the same format of the parameters above.
|
before
list / elements=string
|
always |
The configuration as structured data prior to module invocation.
Sample:
The configuration returned will always be in the same format of the parameters above.
|
commands
list / elements=string
|
always |
The set of commands pushed to the remote device
Sample:
['router bgp 65000', 'bgp nopeerup-delay post-boot 10', 'bgp advertise-best-external']
|
Authors
- Sumit Jaiswal (@justjais)
© 2012–2018 Michael DeHaan
© 2018–2021 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/latest/collections/cisco/ios/ios_bgp_global_module.html