.. _cisco.nxos.nxos_bgp_global_module:
**************************
cisco.nxos.nxos_bgp_global
**************************
**BGP Global resource module.**
Version added: 1.4.0
.. contents::
:local:
:depth: 1
Synopsis
--------
- This module manages global BGP configuration on devices running Cisco NX-OS.
Parameters
----------
.. raw:: html
| Parameter |
Choices/Defaults |
Comments |
|
config
dictionary
|
|
A list of BGP process configuration.
|
|
affinity_group
dictionary
|
|
Configure an affinity group.
|
|
|
group_id
integer
|
|
Affinity Group ID.
|
|
as_number
string
|
|
Autonomous System Number of the router.
|
|
bestpath
dictionary
|
|
Define the default bestpath selection algorithm.
|
|
|
always_compare_med
boolean
|
|
Compare MED on paths from different AS.
|
|
|
as_path
dictionary
|
|
AS-Path.
|
|
|
|
ignore
boolean
|
|
Ignore AS-Path during bestpath selection.
|
|
|
|
multipath_relax
boolean
|
|
Relax AS-Path restriction when choosing multipaths.
|
|
|
compare_neighborid
boolean
|
|
When more paths are available than max path config, use neighborid as tie-breaker.
|
|
|
compare_routerid
boolean
|
|
Compare router-id for identical EBGP paths.
|
|
|
cost_community_ignore
boolean
|
|
Ignore cost communities in bestpath selection.
|
|
|
igp_metric_ignore
boolean
|
|
Ignore IGP metric for next-hop during bestpath selection.
|
|
|
med
dictionary
|
|
MED
|
|
|
|
confed
boolean
|
|
Compare MED only from paths originated from within a confederation.
|
|
|
|
missing_as_worst
boolean
|
|
Treat missing MED as highest MED.
|
|
|
|
non_deterministic
boolean
|
|
Not always pick the best-MED path among paths from same AS.
|
|
cluster_id
string
|
|
Configure Route Reflector Cluster-ID.
|
|
confederation
dictionary
|
|
AS confederation parameters.
|
|
|
identifier
string
|
|
Set routing domain confederation AS.
|
|
|
peers
list
/ elements=string
|
|
Peer ASs in BGP confederation.
|
|
disable_policy_batching
dictionary
|
|
Disable batching evaluation of outbound policy for a peer.
|
|
|
ipv4
dictionary
|
|
IPv4 address-family settings.
|
|
|
|
prefix_list
string
|
|
Name of prefix-list to apply.
|
|
|
ipv6
dictionary
|
|
IPv6 address-family settings.
|
|
|
|
prefix_list
string
|
|
Name of prefix-list to apply.
|
|
|
nexthop
boolean
|
|
Batching based on nexthop.
|
|
|
set
boolean
|
|
Set policy batching.
|
|
dynamic_med_interval
integer
|
|
Sets the interval for dampening of med changes.
|
|
enforce_first_as
boolean
|
|
Enforce neighbor AS is the first AS in AS-PATH attribute (EBGP).
|
|
enhanced_error
boolean
|
|
Enable BGP Enhanced error handling.
|
|
fabric_soo
string
|
|
Fabric site of origin.
|
|
fast_external_fallover
boolean
|
|
Immediately reset the session if the link to a directly connected BGP peer goes down.
|
|
flush_routes
boolean
|
|
Flush routes in RIB upon controlled restart.
|
|
graceful_restart
dictionary
|
|
Configure Graceful Restart functionality.
|
|
|
helper
boolean
|
|
Configure Graceful Restart Helper mode functionality.
|
|
|
restart_time
integer
|
|
Maximum time for restart advertised to peers.
|
|
|
set
boolean
|
|
Enable graceful-restart.
|
|
|
stalepath_time
integer
|
|
Maximum time to keep a restarting peer's stale routes.
|
|
graceful_shutdown
dictionary
|
|
Graceful-shutdown for BGP protocol.
|
|
|
activate
dictionary
|
|
Send graceful-shutdown community on all routes.
|
|
|
|
route_map
string
|
|
Apply route-map to modify attributes for outbound.
|
|
|
|
set
boolean
|
|
Activate graceful-shutdown.
|
|
|
aware
boolean
|
|
Lower preference of routes carrying graceful-shutdown community.
|
|
isolate
dictionary
|
|
Isolate this router from BGP perspective.
|
|
|
include_local
boolean
|
|
Withdraw both local and remote BGP routes.
|
|
|
set
boolean
|
|
Withdraw remote BGP routes to isolate this router.
|
|
log_neighbor_changes
boolean
|
|
Log a message for neighbor up/down event.
|
|
maxas_limit
integer
|
|
Allow AS-PATH attribute from EBGP neighbor imposing a limit on number of ASes.
|
|
neighbor_down
dictionary
|
|
Handle BGP neighbor down event, due to various reasons.
|
|
|
fib_accelerate
boolean
|
|
Accelerate the hardware updates for IP/IPv6 adjacencies for neighbor.
|
|
neighbors
list
/ elements=dictionary
|
|
Configure BGP neighbors.
|
|
|
bfd
dictionary
|
|
Bidirectional Fast Detection for the neighbor.
|
|
|
|
multihop
dictionary
|
|
Multihop session.
|
|
|
|
|
interval
dictionary
|
|
Configure BFD session interval parameters.
|
|
|
|
|
|
min_rx_interval
integer
|
|
Minimum RX interval.
|
|
|
|
|
|
multiplier
integer
|
|
Detect Multiplier.
|
|
|
|
|
|
tx_interval
integer
|
|
TX interval in milliseconds.
|
|
|
|
|
set
boolean
|
|
Set BFD multihop.
|
|
|
|
set
boolean
|
|
Set BFD for this neighbor.
|
|
|
|
singlehop
boolean
|
|
Single-hop session.
|
|
|
bmp_activate_server
integer
|
|
Specify server ID for activating BMP monitoring for the peer.
|
|
|
capability
dictionary
|
|
Capability.
|
|
|
|
suppress_4_byte_as
boolean
|
|
Suppress 4-byte AS Capability.
|
|
|
description
string
|
|
Neighbor specific description.
|
|
|
disable_connected_check
boolean
|
|
Disable check for directly connected peer.
|
|
|
dont_capability_negotiate
boolean
|
|
Don't negotiate capability with this neighbor.
|
|
|
dscp
string
|
|
Set dscp value for tcp transport.
|
|
|
dynamic_capability
boolean
|
|
Dynamic Capability
|
|
|
ebgp_multihop
integer
|
|
Specify multihop TTL for remote peer.
|
|
|
graceful_shutdown
dictionary
|
|
Graceful-shutdown for this neighbor.
|
|
|
|
activate
dictionary
|
|
Send graceful-shutdown community.
|
|
|
|
|
route_map
string
|
|
Apply route-map to modify attributes for outbound.
|
|
|
|
|
set
boolean
|
|
Set activate.
|
|
|
inherit
dictionary
|
|
Inherit a template.
|
|
|
|
peer
string
|
|
Peer template to inherit.
|
|
|
|
peer_session
string
|
|
Peer-session template to inherit.
|
|
|
local_as
string
|
|
Specify the local-as number for the eBGP neighbor.
Deprecated, Use local_as_config instead, the facts would always render local_as information as a part of local_as_config as_number
This option has been deprecated and will be removed in a release after 2027-01-01.
|
|
|
local_as_config
dictionary
|
|
Local Autonomous System Number options.
|
|
|
|
as_number
string
|
|
Set Specify the local-as number for the eBGP neighbor.
|
|
|
|
dual_as
boolean
|
|
Connect using either the local-as number or the real as.
|
|
|
|
no_prepend
boolean
|
|
Do not prepend the local-as number to updates from the eBGP neighbor.
|
|
|
|
replace_as
boolean
|
|
Prepend only the local-as number to updates to eBGP neighbor.
|
|
|
log_neighbor_changes
dictionary
|
|
Log message for neighbor up/down event.
|
|
|
|
disable
boolean
|
|
Disable logging of neighbor up/down event.
|
|
|
|
set
boolean
|
|
Set log-neighbor-changes.
|
|
|
low_memory
dictionary
|
|
Behavior in low memory situations.
|
|
|
|
exempt
boolean
|
|
Do not shutdown this peer when under memory pressure.
|
|
|
neighbor_address
string
/ required
|
|
IP address/Prefix of the neighbor or interface.
|
|
|
neighbor_affinity_group
dictionary
|
|
Configure an affinity group.
|
|
|
|
group_id
integer
|
|
Affinity Group ID.
|
|
|
password
dictionary
|
|
Configure a password for neighbor.
|
|
|
|
encryption
integer
|
|
0 specifies an UNENCRYPTED neighbor password.
3 specifies an 3DES ENCRYPTED neighbor password will follow.
7 specifies a Cisco type 7 ENCRYPTED neighbor password will follow.
|
|
|
|
key
string
|
|
Authentication password.
|
|
|
path_attribute
list
/ elements=dictionary
|
|
BGP path attribute optional filtering.
|
|
|
|
action
string
|
Choices:
- discard
- treat-as-withdraw
|
Action.
|
|
|
|
range
dictionary
|
|
Path attribute range.
|
|
|
|
|
end
integer
|
|
Path attribute range end value.
|
|
|
|
|
start
integer
|
|
Path attribute range start value.
|
|
|
|
type
integer
|
|
Path attribute type
|
|
|
peer_type
string
|
Choices:
- fabric-border-leaf
- fabric-external
|
Neighbor facing
|
|
|
remote_as
string
|
|
Specify Autonomous System Number of the neighbor.
|
|
|
remote_as_route_map
string
|
|
Route-map to match prefix peer AS number.
|
|
|
remove_private_as
dictionary
|
|
Remove private AS number from outbound updates.
|
|
|
|
all
boolean
|
|
All.
|
|
|
|
replace_as
boolean
|
|
Replace.
|
|
|
|
set
boolean
|
|
Remove private AS.
|
|
|
shutdown
boolean
|
|
Administratively shutdown this neighbor.
|
|
|
timers
dictionary
|
|
Configure keepalive and hold timers.
|
|
|
|
holdtime
integer
|
|
Holdtime (seconds).
|
|
|
|
keepalive
integer
|
|
Keepalive interval (seconds).
|
|
|
transport
dictionary
|
|
BGP transport connection.
|
|
|
|
connection_mode
dictionary
|
|
Specify type of connection.
|
|
|
|
|
passive
boolean
|
|
Allow passive connection setup only.
|
|
|
ttl_security
dictionary
|
|
Enable TTL Security Mechanism.
|
|
|
|
hops
integer
|
|
Specify hop count for remote peer.
|
|
|
update_source
string
|
|
Specify source of BGP session and updates.
|
|
nexthop
dictionary
|
|
Nexthop resolution options.
|
|
|
suppress_default_resolution
boolean
|
|
Prohibit use of default route for nexthop address resolution.
|
|
rd
dictionary
|
|
Secondary Route Distinguisher for vxlan multisite border gateway.
|
|
|
dual
boolean
|
|
Generate Secondary RD for all VRFs and L2VNIs.
|
|
|
id
integer
|
|
Specify 2 byte value for ID.
|
|
reconnect_interval
integer
|
|
Configure connection reconnect interval.
|
|
router_id
string
|
|
Specify the IP address to use as router-id.
|
|
shutdown
boolean
|
|
Administratively shutdown BGP protocol.
|
|
suppress_fib_pending
boolean
|
|
Advertise only routes that are programmed in hardware to peers.
|
|
timers
dictionary
|
|
Configure bgp related timers.
|
|
|
bestpath_limit
dictionary
|
|
Configure timeout for first bestpath after restart.
|
|
|
|
always
boolean
|
|
Configure update-delay-always option.
|
|
|
|
timeout
integer
|
|
Bestpath timeout (seconds).
|
|
|
bgp
dictionary
|
|
Configure different bgp keepalive and holdtimes.
|
|
|
|
holdtime
integer
|
|
Holdtime (seconds).
|
|
|
|
keepalive
integer
|
|
Keepalive interval (seconds).
|
|
|
prefix_peer_timeout
integer
|
|
Prefix Peer timeout (seconds).
|
|
|
prefix_peer_wait
integer
|
|
Configure wait timer for a prefix peer.
|
|
vrfs
list
/ elements=dictionary
|
|
Virtual Router Context configurations.
|
|
|
allocate_index
integer
|
|
Configure allocate-index.
|
|
|
bestpath
dictionary
|
|
Define the default bestpath selection algorithm.
|
|
|
|
always_compare_med
boolean
|
|
Compare MED on paths from different AS.
|
|
|
|
as_path
dictionary
|
|
AS-Path.
|
|
|
|
|
ignore
boolean
|
|
Ignore AS-Path during bestpath selection.
|
|
|
|
|
multipath_relax
boolean
|
|
Relax AS-Path restriction when choosing multipaths.
|
|
|
|
compare_neighborid
boolean
|
|
When more paths are available than max path config, use neighborid as tie-breaker.
|
|
|
|
compare_routerid
boolean
|
|
Compare router-id for identical EBGP paths.
|
|
|
|
cost_community_ignore
boolean
|
|
Ignore cost communities in bestpath selection.
|
|
|
|
igp_metric_ignore
boolean
|
|
Ignore IGP metric for next-hop during bestpath selection.
|
|
|
|
med
dictionary
|
|
MED
|
|
|
|
|
confed
boolean
|
|
Compare MED only from paths originated from within a confederation.
|
|
|
|
|
missing_as_worst
boolean
|
|
Treat missing MED as highest MED.
|
|
|
|
|
non_deterministic
boolean
|
|
Not always pick the best-MED path among paths from same AS.
|
|
|
cluster_id
string
|
|
Configure Route Reflector Cluster-ID.
|
|
|
confederation
dictionary
|
|
AS confederation parameters.
|
|
|
|
identifier
string
|
|
Set routing domain confederation AS.
|
|
|
|
peers
list
/ elements=string
|
|
Peer ASs in BGP confederation.
|
|
|
graceful_restart
dictionary
|
|
Configure Graceful Restart functionality.
|
|
|
|
helper
boolean
|
|
Configure Graceful Restart Helper mode functionality.
|
|
|
|
restart_time
integer
|
|
Maximum time for restart advertised to peers.
|
|
|
|
set
boolean
|
|
Enable graceful-restart.
|
|
|
|
stalepath_time
integer
|
|
Maximum time to keep a restarting peer's stale routes.
|
|
|
local_as
string
|
|
Specify the local-as for this vrf.
|
|
|
log_neighbor_changes
boolean
|
|
Log a message for neighbor up/down event.
|
|
|
maxas_limit
integer
|
|
Allow AS-PATH attribute from EBGP neighbor imposing a limit on number of ASes.
|
|
|
neighbor_down
dictionary
|
|
Handle BGP neighbor down event, due to various reasons.
|
|
|
|
fib_accelerate
boolean
|
|
Accelerate the hardware updates for IP/IPv6 adjacencies for neighbor.
|
|
|
neighbors
list
/ elements=dictionary
|
|
Configure BGP neighbors.
|
|
|
|
bfd
dictionary
|
|
Bidirectional Fast Detection for the neighbor.
|
|
|
|
|
multihop
dictionary
|
|
Multihop session.
|
|
|
|
|
|
interval
dictionary
|
|
Configure BFD session interval parameters.
|
|
|
|
|
|
|
min_rx_interval
integer
|
|
Minimum RX interval.
|
|
|
|
|
|
|
multiplier
integer
|
|
Detect Multiplier.
|
|
|
|
|
|
|
tx_interval
integer
|
|
TX interval in milliseconds.
|
|
|
|
|
|
set
boolean
|
|
Set BFD multihop.
|
|
|
|
|
set
boolean
|
|
Set BFD for this neighbor.
|
|
|
|
|
singlehop
boolean
|
|
Single-hop session.
|
|
|
|
bmp_activate_server
integer
|
|
Specify server ID for activating BMP monitoring for the peer.
|
|
|
|
capability
dictionary
|
|
Capability.
|
|
|
|
|
suppress_4_byte_as
boolean
|
|
Suppress 4-byte AS Capability.
|
|
|
|
description
string
|
|
Neighbor specific description.
|
|
|
|
disable_connected_check
boolean
|
|
Disable check for directly connected peer.
|
|
|
|
dont_capability_negotiate
boolean
|
|
Don't negotiate capability with this neighbor.
|
|
|
|
dscp
string
|
|
Set dscp value for tcp transport.
|
|
|
|
dynamic_capability
boolean
|
|
Dynamic Capability
|
|
|
|
ebgp_multihop
integer
|
|
Specify multihop TTL for remote peer.
|
|
|
|
graceful_shutdown
dictionary
|
|
Graceful-shutdown for this neighbor.
|
|
|
|
|
activate
dictionary
|
|
Send graceful-shutdown community.
|
|
|
|
|
|
route_map
string
|
|
Apply route-map to modify attributes for outbound.
|
|
|
|
|
|
set
boolean
|
|
Set activate.
|
|
|
|
inherit
dictionary
|
|
Inherit a template.
|
|
|
|
|
peer
string
|
|
Peer template to inherit.
|
|
|
|
|
peer_session
string
|
|
Peer-session template to inherit.
|
|
|
|
local_as
string
|
|
Specify the local-as number for the eBGP neighbor.
Deprecated, Use local_as_config instead, the facts would always render local_as information as a part of local_as_config as_number
This option has been deprecated and will be removed in a release after 2027-01-01.
|
|
|
|
local_as_config
dictionary
|
|
Local Autonomous System Number options.
|
|
|
|
|
as_number
string
|
|
Set Specify the local-as number for the eBGP neighbor.
|
|
|
|
|
dual_as
boolean
|
|
Connect using either the local-as number or the real as.
|
|
|
|
|
no_prepend
boolean
|
|
Do not prepend the local-as number to updates from the eBGP neighbor.
|
|
|
|
|
replace_as
boolean
|
|
Prepend only the local-as number to updates to eBGP neighbor.
|
|
|
|
log_neighbor_changes
dictionary
|
|
Log message for neighbor up/down event.
|
|
|
|
|
disable
boolean
|
|
Disable logging of neighbor up/down event.
|
|
|
|
|
set
boolean
|
|
Set log-neighbor-changes.
|
|
|
|
low_memory
dictionary
|
|
Behavior in low memory situations.
|
|
|
|
|
exempt
boolean
|
|
Do not shutdown this peer when under memory pressure.
|
|
|
|
neighbor_address
string
/ required
|
|
IP address/Prefix of the neighbor or interface.
|
|
|
|
neighbor_affinity_group
dictionary
|
|
Configure an affinity group.
|
|
|
|
|
group_id
integer
|
|
Affinity Group ID.
|
|
|
|
password
dictionary
|
|
Configure a password for neighbor.
|
|
|
|
|
encryption
integer
|
|
0 specifies an UNENCRYPTED neighbor password.
3 specifies an 3DES ENCRYPTED neighbor password will follow.
7 specifies a Cisco type 7 ENCRYPTED neighbor password will follow.
|
|
|
|
|
key
string
|
|
Authentication password.
|
|
|
|
path_attribute
list
/ elements=dictionary
|
|
BGP path attribute optional filtering.
|
|
|
|
|
action
string
|
Choices:
- discard
- treat-as-withdraw
|
Action.
|
|
|
|
|
range
dictionary
|
|
Path attribute range.
|
|
|
|
|
|
end
integer
|
|
Path attribute range end value.
|
|
|
|
|
|
start
integer
|
|
Path attribute range start value.
|
|
|
|
|
type
integer
|
|
Path attribute type
|
|
|
|
peer_type
string
|
Choices:
- fabric-border-leaf
- fabric-external
|
Neighbor facing
|
|
|
|
remote_as
string
|
|
Specify Autonomous System Number of the neighbor.
|
|
|
|
remote_as_route_map
string
|
|
Route-map to match prefix peer AS number.
|
|
|
|
remove_private_as
dictionary
|
|
Remove private AS number from outbound updates.
|
|
|
|
|
all
boolean
|
|
All.
|
|
|
|
|
replace_as
boolean
|
|
Replace.
|
|
|
|
|
set
boolean
|
|
Remove private AS.
|
|
|
|
shutdown
boolean
|
|
Administratively shutdown this neighbor.
|
|
|
|
timers
dictionary
|
|
Configure keepalive and hold timers.
|
|
|
|
|
holdtime
integer
|
|
Holdtime (seconds).
|
|
|
|
|
keepalive
integer
|
|
Keepalive interval (seconds).
|
|
|
|
transport
dictionary
|
|
BGP transport connection.
|
|
|
|
|
connection_mode
dictionary
|
|
Specify type of connection.
|
|
|
|
|
|
passive
boolean
|
|
Allow passive connection setup only.
|
|
|
|
ttl_security
dictionary
|
|
Enable TTL Security Mechanism.
|
|
|
|
|
hops
integer
|
|
Specify hop count for remote peer.
|
|
|
|
update_source
string
|
|
Specify source of BGP session and updates.
|
|
|
reconnect_interval
integer
|
|
Configure connection reconnect interval.
|
|
|
router_id
string
|
|
Specify the IP address to use as router-id.
|
|
|
timers
dictionary
|
|
Configure bgp related timers.
|
|
|
|
bestpath_limit
dictionary
|
|
Configure timeout for first bestpath after restart.
|
|
|
|
|
always
boolean
|
|
Configure update-delay-always option.
|
|
|
|
|
timeout
integer
|
|
Bestpath timeout (seconds).
|
|
|
|
bgp
dictionary
|
|
Configure different bgp keepalive and holdtimes.
|
|
|
|
|
holdtime
integer
|
|
Holdtime (seconds).
|
|
|
|
|
keepalive
integer
|
|
Keepalive interval (seconds).
|
|
|
|
prefix_peer_timeout
integer
|
|
Prefix Peer timeout (seconds).
|
|
|
|
prefix_peer_wait
integer
|
|
Configure wait timer for a prefix peer.
|
|
|
vrf
string
|
|
VRF name.
|
|
running_config
string
|
|
This option is used only with state parsed.
The value of this option should be the output received from the NX-OS device by executing the command show 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
|
Choices:
merged ←
- replaced
- overridden
- deleted
- purged
- parsed
- gathered
- rendered
|
The state the configuration should be left in.
State purged removes all the BGP configurations from the target device. Use caution with this state.
State deleted only removes BGP attributes that this modules manages and does not negate the BGP process completely. Thereby, preserving address-family related configurations under BGP context.
Running states deleted and replaced will result in an error if there are address-family configuration lines present under a neighbor, or a vrf context that is to be removed. Please use the cisco.nxos.nxos_bgp_af or cisco.nxos.nxos_bgp_neighbor_af modules for prior cleanup.
States merged and replaced will result in a failure if BGP is already configured with a different ASN than what is provided in the task. In such cases, please use state purged to remove the existing BGP process and proceed further.
States replaced and overridden have the same behaviour for this module.
Refer to examples for more details.
|