Skip to content

Latest commit

 

History

History
9003 lines (8849 loc) · 373 KB

arista.eos.eos_bgp_global_module.rst

File metadata and controls

9003 lines (8849 loc) · 373 KB

arista.eos.eos_bgp_global

Manages BGP global resource module

Version added: 1.4.0

  • This module configures and manages the attributes of BGP global on Arista EOS platforms.
Parameter Choices/Defaults Comments
config
dictionary
A list of configurations for BGP global.
access_group
list / elements=dictionary
ip/ipv6 access list configuration.
acl_name
string
access list name.
afi
string
    Choices:
  • ipv4
  • ipv6
Specify ip/ipv6.
direction
string
direction of packets.
aggregate_address
list / elements=dictionary
Configure aggregate address.
address
string
ipv4/ipv6 address prefix.
advertise_only
boolean
    Choices:
  • no
  • yes
Advertise without installing the generated blackhole route in FIB.
as_set
boolean
    Choices:
  • no
  • yes
Generate autonomous system set path information.
attribute_map
string
Name of the route map used to set the attribute of the aggregate route.
match_map
string
Name of the route map used to filter the contributors of the aggregate route.
summary_only
boolean
    Choices:
  • no
  • yes
Filters all more-specific routes from updates.
as_number
string
Autonomous system number.
bgp_params
dictionary
BGP parameters.
additional_paths
string
    Choices:
  • install
  • send
  • receive
BGP additional-paths commands
advertise_inactive
boolean
    Choices:
  • no
  • yes
Advertise BGP routes even if they are inactive in RIB.
allowas_in
dictionary
Allow local-as in updates.
count
integer
Number of local ASNs allowed in a BGP update.
set
boolean
    Choices:
  • no
  • yes
When true, it is set.
always_compare_med
boolean
    Choices:
  • no
  • yes
BGP Always Compare MED
asn
string
    Choices:
  • asdot
  • asplain
AS Number notation.
auto_local_addr
boolean
    Choices:
  • no
  • yes
Automatically determine the local address to be used for the non-transport AF.
bestpath
dictionary
Select the bestpath selection algorithim for BGP routes.
as_path
string
    Choices:
  • ignore
  • multipath_relax
Select the bestpath selection based on as-path.
ecmp_fast
boolean
    Choices:
  • no
  • yes
Tie-break BGP paths in a ECMP group based on the order of arrival.
med
dictionary
MED attribute
confed
boolean
    Choices:
  • no
  • yes
MED Confed.
missing_as_worst
boolean
    Choices:
  • no
  • yes
MED missing-as-worst.
skip
boolean
    Choices:
  • no
  • yes
skip one of the tie breaking rules in the bestpath selection.
tie_break
string
    Choices:
  • cluster_list_length
  • router_id
Configure the tie-break option for BGP bestpath selection.
client_to_client
boolean
    Choices:
  • no
  • yes
client to client configuration.
cluster_id
string
Cluster ID of this router acting as a route reflector.
confederation
dictionary
confederation.
identifier
string
Confederation identifier.
peers
string
Confederation peers.
control_plane_filter
boolean
    Choices:
  • no
  • yes
Control plane filter for BGP.
convergence
dictionary
Bgp convergence parameters.
slow_peer
boolean
    Choices:
  • no
  • yes
Maximum amount of time to wait for slow peers to estabilsh session.
time
integer
time in secs
default
string
    Choices:
  • ipv4_unicast
  • ipv6_unicast
Default neighbor configuration commands.
enforce_first_as
boolean
    Choices:
  • no
  • yes
Enforce the First AS for EBGP routes(default).
host_routes
boolean
    Choices:
  • no
  • yes
BGP host routes configuration.
labeled_unicast
string
    Choices:
  • ip
  • tunnel
Labeled Unicast.
listen
dictionary
BGP listen.
limit
integer
Set limit on the number of dynamic BGP peers allowed.
range
dictionary
Subnet Range to be associated with the peer group.
address
string
Address prefix
peer_group
dictionary
Name of peer group.
name
string
name.
peer_filter
string
Name of peer filter.
remote_as
string
Neighbor AS number
log_neighbor_changes
boolean
    Choices:
  • no
  • yes
Log neighbor up/down events.
missing_policy
dictionary
Missing policy override configuration commands.
action
string
    Choices:
  • deny
  • permit
  • deny-in-out
Missing policy action options.
direction
string
    Choices:
  • in
  • out
Missing policy direction options.
monitoring
boolean
    Choices:
  • no
  • yes
Enable Bgp monitoring for all/specified stations.
next_hop_unchanged
boolean
    Choices:
  • no
  • yes
Preserve original nexthop while advertising routes to eBGP peers.
redistribute_internal
boolean
    Choices:
  • no
  • yes
Redistribute internal BGP routes.
route
string
Configure route-map for route installation.
route_reflector
dictionary
Configure route reflector options
preserve
boolean
    Choices:
  • no
  • yes
preserve route attributes, overwriting route-map changes
set
boolean
    Choices:
  • no
  • yes
When true route_reflector is set.
transport
integer
Configure transport port for TCP session
default_metric
integer
Default metric.
distance
dictionary
Define an administrative distance.
external
integer
distance for external routes.
internal
integer
distance for internal routes.
local
integer
distance for local routes.
graceful_restart
dictionary
Enable graceful restart mode.
restart_time
integer
Set the max time needed to restart and come back up.
set
boolean
    Choices:
  • no
  • yes
When true, graceful restart is set.
stalepath_time
integer
Set the max time to hold onto restarting peer stale paths.
graceful_restart_helper
boolean
    Choices:
  • no
  • yes
Enable graceful restart helper mode.
maximum_paths
dictionary
Maximum number of equal cost paths.
max_equal_cost_paths
integer
Value for maximum number of equal cost paths.
max_installed_ecmp_paths
integer
Value for maximum number of installed ECMP routes.
monitoring
dictionary
BGP monitoring protocol configuration.
port
integer
Configure the BGP monitoring protocol port number <1024-65535>.
received
string
    Choices:
  • post_policy
  • pre_policy
BGP monitoring protocol received route selection.
station
string
BGP monitoring station configuration.
timestamp
string
    Choices:
  • none
  • send_time
BGP monitoring protocol Per-Peer Header timestamp behavior.
neighbor
list / elements=dictionary
Configure routing for a network.

aliases: neighbors
additional_paths
string
    Choices:
  • send
  • receive
BGP additional-paths commands.
allowas_in
dictionary
Allow local-as in updates.
count
integer
Number of local ASNs allowed in a BGP update.
set
boolean
    Choices:
  • no
  • yes
When true, it is set.
auto_local_addr
boolean
    Choices:
  • no
  • yes
Automatically determine the local address to be used for the non-transport AF.
bfd
string
    Choices:
  • enable
  • c_bit
Configure BFD fallover for this peer
default_originate
dictionary
Originate default route to this neighbor.
always
boolean
    Choices:
  • no
  • yes
Always originate default route to this neighbor.
route_map
string
Route map reference.
description
string
Text describing the neighbor.
dont_capability_negotiate
boolean
    Choices:
  • no
  • yes
Donot perform Capability Negotiation with this neighbor.
ebgp_multihop
dictionary
Allow BGP connections to indirectly connected external peers.
set
boolean
    Choices:
  • no
  • yes
If true, ttl is not set.
ttl
integer
Time-to-live in the range 1-255 hops.
encryption_password
dictionary
Password to use in computation of MD5 hash.
password
string
password (up to 80 chars).
type
integer
    Choices:
  • 0
  • 7
Encryption type.
enforce_first_as
boolean
    Choices:
  • no
  • yes
Enforce the First AS for EBGP routes(default).
export_localpref
integer
Override localpref when exporting to an internal peer.
fall_over
boolean
    Choices:
  • no
  • yes
Configure BFD protocol options for this peer.
graceful_restart
boolean
    Choices:
  • no
  • yes
Enable graceful restart mode.
graceful_restart_helper
boolean
    Choices:
  • no
  • yes
Enable graceful restart helper mode.
idle_restart_timer
integer
Neighbor idle restart timer.
import_localpref
integer
Override localpref when importing from an external peer.
link_bandwidth
dictionary
Enable link bandwidth community for routes to this peer.
auto
boolean
    Choices:
  • no
  • yes
Enable link bandwidth auto generation for routes from this peer.
default
string
Enable link bandwidth default generation for routes from this peer.
set
boolean
    Choices:
  • no
  • yes
If true, set link bandwidth
update_delay
integer
Delay outbound route updates.
local_as
dictionary
Configure local AS number advertised to peer.
as_number
string
AS number.
fallback
boolean
    Choices:
  • no
  • yes
Prefer router AS Number over local AS Number.
local_v6_addr
string
The local IPv6 address of the neighbor in A:B:C:D:E:F:G:H format.
maximum_accepted_routes
dictionary
Maximum number of routes accepted from this peer.
count
integer
Maximum number of accepted routes (0 means unlimited).
warning_limit
integer
Maximum number of accepted routes after which a warning is issued. (0 means never warn)
maximum_received_routes
dictionary
Maximum number of routes received from this peer.
count
integer
Maximum number of routes (0 means unlimited).
warning_limit
dictionary
Percentage of maximum-routes at which warning is to be issued.
limit_count
integer
Number of routes at which to warn.
limit_percent
integer
Percentage of maximum number of routes at which to warn( 1-100).
warning_only
boolean
    Choices:
  • no
  • yes
Only warn, no restart, if max route limit exceeded.
metric_out
integer
MED value to advertise to peer.
monitoring
boolean
    Choices:
  • no
  • yes
Enable BGP Monitoring Protocol for this peer.
neighbor_address
string
Neighbor address or peer group.

aliases: peer
next_hop_self
boolean
    Choices:
  • no
  • yes
Always advertise this router address as the BGP next hop
next_hop_unchanged
boolean
    Choices:
  • no
  • yes
Preserve original nexthop while advertising routes to eBGP peers.
next_hop_v6_address
string
IPv6 next-hop address for the neighbor
out_delay
integer
Delay outbound route updates.
peer_group
string
Name of the peer group.
prefix_list
dictionary
Prefix list reference.
direction
string
    Choices:
  • in
  • out
Configure an inbound/outbound prefix-list.
name
string
prefix list name.
remote_as
string
Neighbor Autonomous System.
remove_private_as
dictionary
Remove private AS number from updates to this peer.
all
boolean
    Choices:
  • no
  • yes
Remove private AS number.
replace_as
boolean
    Choices:
  • no
  • yes
Replace private AS number with local AS number.
set
boolean
    Choices:
  • no
  • yes
If true, set remove_private_as.
route_map
dictionary
Route map reference.
direction
string
    Choices:
  • in
  • out
Configure an inbound/outbound route-map.
name
string
Route map name.
route_reflector_client
boolean
    Choices:
  • no
  • yes
Configure peer as a route reflector client.
route_to_peer
boolean
    Choices:
  • no
  • yes
Use routing table information to reach the peer.
send_community
dictionary
Send community attribute to this neighbor.
community_attribute
string
Type of community attributes to send to this neighbor.
divide
string
    Choices:
  • equal
  • ratio
link-bandwidth divide attribute.
link_bandwidth_attribute
string
    Choices:
  • aggregate
  • divide
cumulative/aggregate attribute to be sent.
set
boolean
    Choices:
  • no
  • yes
Enable send-community
speed
string
Reference link speed in bits/second
sub_attribute
string
    Choices:
  • extended
  • link-bandwidth
  • standard
Attribute to be sent to the neighbor.
shutdown
boolean
    Choices:
  • no
  • yes
Administratively shut down this neighbor.
soft_recognition
string
    Choices:
  • all
  • None
Configure how to handle routes that fail import.
timers
dictionary
Timers.
holdtime
integer
Hold time in secs.
keepalive
integer
Keep Alive Interval in secs.
transport
dictionary
Configure transport options for TCP session.
connection_mode
string
Configure connection-mode for TCP session.
remote_port
integer
Configure BGP peer TCP port to connect to.
ttl
integer
BGP ttl security check
update_source
string
Specify the local source interface for peer BGP sessions.
weight
integer
Weight to assign.
network
list / elements=dictionary
Configure routing for a network.

aliases: networks
address
string
address prefix.
route_map
string
Name of route map.
redistribute
list / elements=dictionary
Redistribute routes in to BGP.
isis_level
string
    Choices:
  • level-1
  • level-2
  • level-1-2
Applicable for isis routes. Specify isis route level.
ospf_route
string
    Choices:
  • internal
  • external
  • nssa_external_1
  • nssa_external_2
ospf route options.
protocol
string
    Choices:
  • isis
  • ospfv3
  • ospf
  • attached-host
  • connected
  • rip
  • static
Routes to be redistributed.
route_map
string
Route map reference.
route_target
dictionary
Route target.
action
string
    Choices:
  • both
  • import
  • export
Route action.
target
string
Route Target.
router_id
string
Router id.
shutdown
boolean
    Choices:
  • no
  • yes
When true, shut down BGP.
timers
dictionary
Timers.
holdtime
integer
Hold time in secs.
keepalive
integer
Keep Alive Interval in secs.
ucmp
dictionary
Configure unequal cost multipathing.
fec
dictionary
Configure UCMP fec utilization threshold.
clear
integer
UCMP FEC utilization Clear thresholds.
trigger
integer
UCMP fec utilization too high threshold.
link_bandwidth
dictionary
Configure link-bandwidth propagation delay.
mode
string
    Choices:
  • encoding_weighted
  • recursive
UCMP link bandwidth mode
update_delay
integer
Link Bandwidth Advertisement delay.
mode
dictionary
UCMP mode.
nexthops
integer
Value for total number UCMP nexthops.
set
boolean
    Choices:
  • no
  • yes
If true, ucmp mode is set to 1.
update
dictionary
Configure BGP update generation.
batch_size
integer
batch size for FIB route acknowledgements.
wait_for
string
    Choices:
  • wait_for_convergence
  • wait_install
wait for options before converge or synchronize.
vlan
integer
Configure MAC VRF BGP for single VLAN support.
vlan_aware_bundle
string
Configure MAC VRF BGP for multiple VLAN support.
vrfs
list / elements=dictionary
Configure BGP in a VRF.
access_group
list / elements=dictionary
ip/ipv6 access list configuration.
acl_name
string
access list name.
afi
string
    Choices:
  • ipv4
  • ipv6
Specify ip/ipv6.
direction
string
direction of packets.
aggregate_address
list / elements=dictionary
Configure aggregate address.
address
string
ipv4/ipv6 address prefix.
advertise_only
boolean
    Choices:
  • no
  • yes
Advertise without installing the generated blackhole route in FIB.
as_set
boolean
    Choices:
  • no
  • yes
Generate autonomous system set path information.
attribute_map
string
Name of the route map used to set the attribute of the aggregate route.
match_map
string
Name of the route map used to filter the contributors of the aggregate route.
summary_only
boolean
    Choices:
  • no
  • yes
Filters all more-specific routes from updates.
bgp_params
dictionary
BGP parameters.
additional_paths
string
    Choices:
  • install
  • send
  • receive
BGP additional-paths commands
advertise_inactive
boolean
    Choices:
  • no
  • yes
Advertise BGP routes even if they are inactive in RIB.
allowas_in
dictionary
Allow local-as in updates.
count
integer
Number of local ASNs allowed in a BGP update.
set
boolean
    Choices:
  • no
  • yes
When true, it is set.
always_compare_med
boolean
    Choices:
  • no
  • yes
BGP Always Compare MED
asn
string
    Choices:
  • asdot
  • asplain
AS Number notation.
auto_local_addr
boolean
    Choices:
  • no
  • yes
Automatically determine the local address to be used for the non-transport AF.
bestpath
dictionary
Select the bestpath selection algorithim for BGP routes.
as_path
string
    Choices:
  • ignore
  • multipath_relax
Select the bestpath selection based on as-path.
ecmp_fast
boolean
    Choices:
  • no
  • yes
Tie-break BGP paths in a ECMP group based on the order of arrival.
med
dictionary
MED attribute
confed
boolean
    Choices:
  • no
  • yes
MED Confed.
missing_as_worst
boolean
    Choices:
  • no
  • yes
MED missing-as-worst.
skip
boolean
    Choices:
  • no
  • yes
skip one of the tie breaking rules in the bestpath selection.
tie_break
string
    Choices:
  • cluster_list_length
  • router_id
Configure the tie-break option for BGP bestpath selection.
client_to_client
boolean
    Choices:
  • no
  • yes
client to client configuration.
cluster_id
string
Cluster ID of this router acting as a route reflector.
confederation
dictionary
confederation.
identifier
string
Confederation identifier.
peers
string
Confederation peers.
control_plane_filter
boolean
    Choices:
  • no
  • yes
Control plane filter for BGP.
convergence
dictionary
Bgp convergence parameters.
slow_peer
boolean
    Choices:
  • no
  • yes
Maximum amount of time to wait for slow peers to estabilsh session.
time
integer
time in secs
default
string
    Choices:
  • ipv4_unicast
  • ipv6_unicast
Default neighbor configuration commands.
enforce_first_as
boolean
    Choices:
  • no
  • yes
Enforce the First AS for EBGP routes(default).
host_routes
boolean
    Choices:
  • no
  • yes
BGP host routes configuration.
labeled_unicast
string
    Choices:
  • ip
  • tunnel
Labeled Unicast.
listen
dictionary
BGP listen.
limit
integer
Set limit on the number of dynamic BGP peers allowed.
range
dictionary
Subnet Range to be associated with the peer group.
address
string
Address prefix
peer_group
dictionary
Name of peer group.
name
string
name.
peer_filter
string
Name of peer filter.
remote_as
string
Neighbor AS number
log_neighbor_changes
boolean
    Choices:
  • no
  • yes
Log neighbor up/down events.
missing_policy
dictionary
Missing policy override configuration commands.
action
string
    Choices:
  • deny
  • permit
  • deny-in-out
Missing policy action options.
direction
string
    Choices:
  • in
  • out
Missing policy direction options.
monitoring
boolean
    Choices:
  • no
  • yes
Enable Bgp monitoring for all/specified stations.
next_hop_unchanged
boolean
    Choices:
  • no
  • yes
Preserve original nexthop while advertising routes to eBGP peers.
redistribute_internal
boolean
    Choices:
  • no
  • yes
Redistribute internal BGP routes.
route
string
Configure route-map for route installation.
route_reflector
dictionary
Configure route reflector options
preserve
boolean
    Choices:
  • no
  • yes
preserve route attributes, overwriting route-map changes
set
boolean
    Choices:
  • no
  • yes
When true route_reflector is set.
transport
integer
Configure transport port for TCP session
default_metric
integer
Default metric.
distance
dictionary
Define an administrative distance.
external
integer
distance for external routes.
internal
integer
distance for internal routes.
local
integer
distance for local routes.
graceful_restart
dictionary
Enable graceful restart mode.
restart_time
integer
Set the max time needed to restart and come back up.
set
boolean
    Choices:
  • no
  • yes
When true, graceful restart is set.
stalepath_time
integer
Set the max time to hold onto restarting peer stale paths.
graceful_restart_helper
boolean
    Choices:
  • no
  • yes
Enable graceful restart helper mode.
maximum_paths
dictionary
Maximum number of equal cost paths.
max_equal_cost_paths
integer
Value for maximum number of equal cost paths.
max_installed_ecmp_paths
integer
Value for maximum number of installed ECMP routes.
neighbor
list / elements=dictionary
Configure routing for a network.

aliases: neighbors
additional_paths
string
    Choices:
  • send
  • receive
BGP additional-paths commands.
allowas_in
dictionary
Allow local-as in updates.
count
integer
Number of local ASNs allowed in a BGP update.
set
boolean
    Choices:
  • no
  • yes
When true, it is set.
auto_local_addr
boolean
    Choices:
  • no
  • yes
Automatically determine the local address to be used for the non-transport AF.
bfd
string
    Choices:
  • enable
  • c_bit
Configure BFD fallover for this peer
default_originate
dictionary
Originate default route to this neighbor.
always
boolean
    Choices:
  • no
  • yes
Always originate default route to this neighbor.
route_map
string
Route map reference.
description
string
Text describing the neighbor.
dont_capability_negotiate
boolean
    Choices:
  • no
  • yes
Donot perform Capability Negotiation with this neighbor.
ebgp_multihop
dictionary
Allow BGP connections to indirectly connected external peers.
set
boolean
    Choices:
  • no
  • yes
If true, ttl is not set.
ttl
integer
Time-to-live in the range 1-255 hops.
encryption_password
dictionary
Password to use in computation of MD5 hash.
password
string
password (up to 80 chars).
type
integer
    Choices:
  • 0
  • 7
Encryption type.
enforce_first_as
boolean
    Choices:
  • no
  • yes
Enforce the First AS for EBGP routes(default).
export_localpref
integer
Override localpref when exporting to an internal peer.
fall_over
boolean
    Choices:
  • no
  • yes
Configure BFD protocol options for this peer.
graceful_restart
boolean
    Choices:
  • no
  • yes
Enable graceful restart mode.
graceful_restart_helper
boolean
    Choices:
  • no
  • yes
Enable graceful restart helper mode.
idle_restart_timer
integer
Neighbor idle restart timer.
import_localpref
integer
Override localpref when importing from an external peer.
link_bandwidth
dictionary
Enable link bandwidth community for routes to this peer.
auto
boolean
    Choices:
  • no
  • yes
Enable link bandwidth auto generation for routes from this peer.
default
string
Enable link bandwidth default generation for routes from this peer.
set
boolean
    Choices:
  • no
  • yes
If true, set link bandwidth
update_delay
integer
Delay outbound route updates.
local_as
dictionary
Configure local AS number advertised to peer.
as_number
string
AS number.
fallback
boolean
    Choices:
  • no
  • yes
Prefer router AS Number over local AS Number.
local_v6_addr
string
The local IPv6 address of the neighbor in A:B:C:D:E:F:G:H format.
maximum_accepted_routes
dictionary
Maximum number of routes accepted from this peer.
count
integer
Maximum number of accepted routes (0 means unlimited).
warning_limit
integer
Maximum number of accepted routes after which a warning is issued. (0 means never warn)
maximum_received_routes
dictionary
Maximum number of routes received from this peer.
count
integer
Maximum number of routes (0 means unlimited).
warning_limit
dictionary
Percentage of maximum-routes at which warning is to be issued.
limit_count
integer
Number of routes at which to warn.
limit_percent
integer
Percentage of maximum number of routes at which to warn( 1-100).
warning_only
boolean
    Choices:
  • no
  • yes
Only warn, no restart, if max route limit exceeded.
metric_out
integer
MED value to advertise to peer.
monitoring
boolean
    Choices:
  • no
  • yes
Enable BGP Monitoring Protocol for this peer.
neighbor_address
string
Neighbor address or peer group.

aliases: peer
next_hop_self
boolean
    Choices:
  • no
  • yes
Always advertise this router address as the BGP next hop
next_hop_unchanged
boolean
    Choices:
  • no
  • yes
Preserve original nexthop while advertising routes to eBGP peers.
next_hop_v6_address
string
IPv6 next-hop address for the neighbor
out_delay
integer
Delay outbound route updates.
peer_group
string
Name of the peer group.
prefix_list
dictionary
Prefix list reference.
direction
string
    Choices:
  • in
  • out
Configure an inbound/outbound prefix-list.
name
string
prefix list name.
remote_as
string
Neighbor Autonomous System.
remove_private_as
dictionary
Remove private AS number from updates to this peer.
all
boolean
    Choices:
  • no
  • yes
Remove private AS number.
replace_as
boolean
    Choices:
  • no
  • yes
Replace private AS number with local AS number.
set
boolean
    Choices:
  • no
  • yes
If true, set remove_private_as.
route_map
dictionary
Route map reference.
direction
string
    Choices:
  • in
  • out
Configure an inbound/outbound route-map.
name
string
Route map name.
route_reflector_client
boolean
    Choices:
  • no
  • yes
Configure peer as a route reflector client.
route_to_peer
boolean
    Choices:
  • no
  • yes
Use routing table information to reach the peer.
send_community
dictionary
Send community attribute to this neighbor.
community_attribute
string
Type of community attributes to send to this neighbor.
divide
string
    Choices:
  • equal
  • ratio
link-bandwidth divide attribute.
link_bandwidth_attribute
string
    Choices:
  • aggregate
  • divide
cumulative/aggregate attribute to be sent.
speed
string
Reference link speed in bits/second
sub_attribute
string
    Choices:
  • extended
  • link-bandwidth
  • standard
Attribute to be sent to the neighbor.
shutdown
boolean
    Choices:
  • no
  • yes
Administratively shut down this neighbor.
soft_recognition
string
    Choices:
  • all
  • None
Configure how to handle routes that fail import.
timers
dictionary
Timers.
holdtime
integer
Hold time in secs.
keepalive
integer
Keep Alive Interval in secs.
transport
dictionary
Configure transport options for TCP session.
connection_mode
string
Configure connection-mode for TCP session.
remote_port
integer
Configure BGP peer TCP port to connect to.
ttl
integer
BGP ttl security check
update_source
string
Specify the local source interface for peer BGP sessions.
weight
integer
Weight to assign.
network
list / elements=dictionary
Configure routing for a network.

aliases: networks
address
string
address prefix.
route_map
string
Name of route map.
redistribute
list / elements=dictionary
Redistribute routes in to BGP.
isis_level
string
    Choices:
  • level-1
  • level-2
  • level-1-2
Applicable for isis routes. Specify isis route level.
ospf_route
string
    Choices:
  • internal
  • external
  • nssa_external_1
  • nssa_external_2
ospf route options.
protocol
string
    Choices:
  • isis
  • ospfv3
  • ospf
  • attached-host
  • connected
  • rip
  • static
Routes to be redistributed.
route_map
string
Route map reference.
route_target
dictionary
Route target.
action
string
    Choices:
  • both
  • import
  • export
Route action.
imported_route
boolean
    Choices:
  • no
  • yes
Export routes imported from the same Afi/Safi.
route_map
string
Name of a route map.
target
string
Route Target.
type
string
    Choices:
  • evpn
  • vpn-ipv4
  • vpn-ipv6
Type of address fmaily
router_id
string
Router id.
shutdown
boolean
    Choices:
  • no
  • yes
When true, shut down BGP.
timers
dictionary
Timers.
holdtime
integer
Hold time in secs.
keepalive
integer
Keep Alive Interval in secs.
ucmp
dictionary
Configure unequal cost multipathing.
fec
dictionary
Configure UCMP fec utilization threshold.
clear
integer
UCMP FEC utilization Clear thresholds.
trigger
integer
UCMP fec utilization too high threshold.
link_bandwidth
dictionary
Configure link-bandwidth propagation delay.
mode
string
    Choices:
  • encoding_weighted
  • recursive
  • update_delay
UCMP link bandwidth mode
update_delay
integer
Link Bandwidth Advertisement delay.
mode
dictionary
UCMP mode.
nexthops
integer
Value for total number UCMP nexthops.
set
boolean
    Choices:
  • no
  • yes
If true, ucmp mode is set to 1.
update
dictionary
Configure BGP update generation.
batch_size
integer
batch size for FIB route acknowledgements.
wait_for
string
    Choices:
  • wait_for_convergence
  • wait_install
wait for options before converge or synchronize.
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 EOS device by executing the command show running-config | section 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:
  • deleted
  • merged ←
  • overridden
  • purged
  • replaced
  • gathered
  • rendered
  • parsed
The state the configuration should be left in.
State purged removes all the BGP configurations from the target device. Use caution with this state.('no router bgp <x>')
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 vrf context that is is to be removed. Please use the arista.eos.eos_bgp_address_family module for prior cleanup.
Refer to examples for more details.

Note

  • Tested against Arista EOS 4.24.6F
  • This module works with connection network_cli. See the EOS Platform Options.
# Using Merged

# Before state:
# -------------
# veos(config)#show running-config | section bgp
# veos(config)#

- name: Merge provided configuration with device configuration
  arista.eos.eos_bgp_global:
    config:
      as_number: "100"
      bgp_params:
        host_routes: true
        convergence:
          slow_peer: true
          time: 6
        additional_paths: "send"
        log_neighbor_changes: true
      maximum_paths:
        max_equal_cost_paths: 55
      aggregate_address:
        - address: "1.2.1.0/24"
          as_set: true
          match_map: "match01"
        - address: "5.2.1.0/24"
          attribute_map: "attrmatch01"
          advertise_only: true
      redistribute:
        - protocol: "static"
          route_map: "map_static"
        - protocol: "attached-host"
      distance:
        internal: 50
      neighbor:
        - peer: "10.1.3.2"
          allowas_in:
            set: true
          default_originate:
            always: true
          dont_capability_negotiate: true
          export_localpref: 4000
          maximum_received_routes:
            count: 500
            warning_limit:
              limit_percent: 5
          next_hop_unchanged: true
          prefix_list:
            name: "prefix01"
            direction: "out"
        - neighbor_address: "peer1"
          fall_over: true
          link_bandwidth:
            update_delay: 5
          monitoring: true
          send_community:
            community_attribute: "extended"
            sub_attribute: "link-bandwidth"
            link_bandwidth_attribute: "aggregate"
            speed: "600"
      vlan: 5
    state: merged

# Task output:
# ------------
# before: {}
#
# commands:
# - router bgp 100
#   - neighbor 10.1.3.2 allowas-in
#   - neighbor 10.1.3.2 default-originate always
#   - neighbor 10.1.3.2 dont-capability-negotiate
#   - neighbor 10.1.3.2 export-localpref 4000
#   - neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent
#   - neighbor 10.1.3.2 next-hop-unchanged
#   - neighbor 10.1.3.2 prefix-list prefix01 out
#   - neighbor peer1 fall-over bfd
#   - neighbor peer1 link-bandwidth update-delay 5
#   - neighbor peer1 monitoring
#   - neighbor peer1 send-community extended link-bandwidth aggregate 600
#   - redistribute static route-map map_static
#   - redistribute attached-host
#   - aggregate-address 1.2.1.0/24 as-set match-map match01
#   - aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only
#   - bgp host-routes fib direct-install
#   - bgp convergence slow-peer time 6
#   - bgp additional-paths send any
#   - bgp log-neighbor-changes
#   - maximum-paths 55
#   - distance bgp 50
#   - vlan 5
#
# after:
#     aggregate_address:
#     - address: 1.2.1.0/24
#       as_set: true
#       match_map: match01
#     - address: 5.2.1.0/24
#       advertise_only: true
#       attribute_map: attrmatch01
#     as_number: '100'
#     bgp_params:
#       additional_paths: send
#       convergence:
#         slow_peer: true
#         time: 6
#     distance:
#       external: 50
#       internal: 50
#       local: 50
#     maximum_paths:
#       max_equal_cost_paths: 55
#     neighbor:
#     - fall_over: true
#       link_bandwidth:
#         set: true
#         update_delay: 5
#       maximum_received_routes:
#         count: 12000
#       monitoring: true
#       neighbor_address: peer1
#       peer_group: peer1
#       send_community:
#         community_attribute: extended
#         link_bandwidth_attribute: aggregate
#         speed: '600'
#         sub_attribute: link-bandwidth
#     - allowas_in:
#         count: 3
#       default_originate:
#         always: true
#       dont_capability_negotiate: true
#       export_localpref: 4000
#       maximum_received_routes:
#         count: 500
#         warning_limit:
#           limit_percent: 5
#       neighbor_address: 10.1.3.2
#       next_hop_unchanged: true
#     redistribute:
#     - protocol: static
#       route_map: map_static
#     - protocol: attached-host
#     vlan: 5

# After state:
# ------------
# veos(config)#show running-config | section bgp
# router bgp 100
#    bgp convergence slow-peer time 6
#    distance bgp 50 50 50
#    maximum-paths 55
#    bgp additional-paths send any
#    neighbor peer1 peer group
#    neighbor peer1 link-bandwidth update-delay 5
#    neighbor peer1 fall-over bfd
#    neighbor peer1 monitoring
#    neighbor peer1 send-community extended link-bandwidth aggregate 600
#    neighbor peer1 maximum-routes 12000
#    neighbor 10.1.3.2 export-localpref 4000
#    neighbor 10.1.3.2 next-hop-unchanged
#    neighbor 10.1.3.2 dont-capability-negotiate
#    neighbor 10.1.3.2 allowas-in 3
#    neighbor 10.1.3.2 default-originate always
#    neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent
#    aggregate-address 1.2.1.0/24 as-set match-map match01
#    aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only
#    redistribute static route-map map_static
#    redistribute attached-host
#    !
#    vlan 5
#    !
#    address-family ipv4
#       neighbor 10.1.3.2 prefix-list prefix01 out

# Using replaced:

# Before state:
# -------------
# veos(config)#show running-config | section bgp
# router bgp 100
#    bgp convergence slow-peer time 6
#    distance bgp 50 50 50
#    maximum-paths 55
#    bgp additional-paths send any
#    neighbor peer1 peer group
#    neighbor peer1 link-bandwidth update-delay 5
#    neighbor peer1 fall-over bfd
#    neighbor peer1 monitoring
#    neighbor peer1 send-community extended link-bandwidth aggregate 600
#    neighbor peer1 maximum-routes 12000
#    neighbor 10.1.3.2 export-localpref 4000
#    neighbor 10.1.3.2 next-hop-unchanged
#    neighbor 10.1.3.2 dont-capability-negotiate
#    neighbor 10.1.3.2 allowas-in 3
#    neighbor 10.1.3.2 default-originate always
#    neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent
#    aggregate-address 1.2.1.0/24 as-set match-map match01
#    aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only
#    redistribute static route-map map_static
#    redistribute attached-host
#    !
#    vlan 5
#    !
#    address-family ipv4
#       neighbor 10.1.3.2 prefix-list prefix01 out
#    !
#    vrf vrf01
#       route-target import 54:11
#       neighbor 12.1.3.2 dont-capability-negotiate
#       neighbor 12.1.3.2 allowas-in 3
#       neighbor 12.1.3.2 default-originate always
#       neighbor 12.1.3.2 maximum-routes 12000

- name: replace provided configuration with device configuration
  arista.eos.eos_bgp_global:
    config:
      as_number: "100"
      bgp_params:
        host_routes: true
        convergence:
          slow_peer: true
          time: 6
        additional_paths: "send"
        log_neighbor_changes: true
      vrfs:
        - vrf: "vrf01"
          maximum_paths:
            max_equal_cost_paths: 55
          aggregate_address:
            - address: "1.2.1.0/24"
              as_set: true
              match_map: "match01"
            - address: "5.2.1.0/24"
              attribute_map: "attrmatch01"
              advertise_only: true
          redistribute:
            - protocol: "static"
              route_map: "map_static"
            - protocol: "attached-host"
          distance:
            internal: 50
          neighbor:
            - neighbor_address: "10.1.3.2"
              allowas_in:
                set: true
              default_originate:
                always: true
              dont_capability_negotiate: true
              export_localpref: 4000
              maximum_received_routes:
                count: 500
                warning_limit:
                  limit_percent: 5
              next_hop_unchanged: true
              prefix_list:
                name: "prefix01"
                direction: "out"
            - neighbor_address: "peer1"
              fall_over: true
              link_bandwidth:
                update_delay: 5
              monitoring: true
              send_community:
                community_attribute: "extended"
                sub_attribute: "link-bandwidth"
                link_bandwidth_attribute: "aggregate"
                speed: "600"
    state: replaced

# Task output:
# ------------

# before:
#     aggregate_address:
#     - address: 1.2.1.0/24
#       as_set: true
#       match_map: match01
#     - address: 5.2.1.0/24
#       advertise_only: true
#       attribute_map: attrmatch01
#     as_number: '100'
#     bgp_params:
#       additional_paths: send
#       convergence:
#         slow_peer: true
#         time: 6
#     distance:
#       external: 50
#       internal: 50
#       local: 50
#     maximum_paths:
#       max_equal_cost_paths: 55
#     neighbor:
#     - fall_over: true
#       link_bandwidth:
#         set: true
#         update_delay: 5
#       maximum_received_routes:
#         count: 12000
#       monitoring: true
#       neighbor_address: peer1
#       peer_group: peer1
#       send_community:
#         community_attribute: extended
#         link_bandwidth_attribute: aggregate
#         speed: '600'
#         sub_attribute: link-bandwidth
#     - allowas_in:
#         count: 3
#       default_originate:
#         always: true
#       dont_capability_negotiate: true
#       export_localpref: 4000
#       maximum_received_routes:
#         count: 500
#         warning_limit:
#           limit_percent: 5
#       neighbor_address: 10.1.3.2
#       next_hop_unchanged: true
#     redistribute:
#     - protocol: static
#       route_map: map_static
#     - protocol: attached-host
#     vlan: 5
#     vrfs:
#     - neighbor:
#       - allowas_in:
#           count: 3
#         default_originate:
#           always: true
#         dont_capability_negotiate: true
#         maximum_received_routes:
#           count: 12000
#         neighbor_address: 12.1.3.2
#       route_target:
#         action: import
#         target: '54:11'
#       vrf: vrf01
#
# commands:
# - router bgp 100
# - vrf vrf01
# - no route-target import 54:11
# - neighbor 10.1.3.2 allowas-in
# - neighbor 10.1.3.2 default-originate always
# - neighbor 10.1.3.2 dont-capability-negotiate
# - neighbor 10.1.3.2 export-localpref 4000
# - neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent
# - neighbor 10.1.3.2 next-hop-unchanged
# - neighbor 10.1.3.2 prefix-list prefix01 out
# - neighbor peer1 fall-over bfd
# - neighbor peer1 link-bandwidth update-delay 5
# - neighbor peer1 monitoring
# - neighbor peer1 send-community extended link-bandwidth aggregate 600
# - no neighbor 12.1.3.2
# - redistribute static route-map map_static
# - redistribute attached-host
# - aggregate-address 1.2.1.0/24 as-set match-map match01
# - aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only
# - maximum-paths 55
# - distance bgp 50
# - exit
# - no neighbor peer1 peer group
# - no neighbor peer1 link-bandwidth update-delay 5
# - no neighbor peer1 fall-over bfd
# - no neighbor peer1 monitoring
# - no neighbor peer1 send-community extended link-bandwidth aggregate 600
# - no neighbor peer1 maximum-routes 12000
# - no neighbor 10.1.3.2
# - no redistribute static route-map map_static
# - no redistribute attached-host
# - no aggregate-address 1.2.1.0/24 as-set match-map match01
# - no aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only
# - bgp host-routes fib direct-install
# - bgp log-neighbor-changes
# - no distance bgp 50 50 50
# - no maximum-paths 55
# - no vlan 5
#
# after:
#     as_number: '100'
#     bgp_params:
#       additional_paths: send
#       convergence:
#         slow_peer: true
#         time: 6
#     vrfs:
#     - aggregate_address:
#       - address: 1.2.1.0/24
#         as_set: true
#         match_map: match01
#       - address: 5.2.1.0/24
#         advertise_only: true
#         attribute_map: attrmatch01
#       distance:
#         external: 50
#         internal: 50
#         local: 50
#       maximum_paths:
#         max_equal_cost_paths: 55
#       neighbor:
#       - allowas_in:
#           count: 3
#         default_originate:
#           always: true
#         dont_capability_negotiate: true
#         export_localpref: 4000
#         maximum_received_routes:
#           count: 500
#           warning_limit:
#             limit_percent: 5
#         neighbor_address: 10.1.3.2
#         next_hop_unchanged: true
#       redistribute:
#       - protocol: static
#         route_map: map_static
#       - protocol: attached-host
#       vrf: vrf01
#
# After state:
# ------------
# veos(config)#show running-config | section bgp
# router bgp 100
#    bgp convergence slow-peer time 6
#    bgp additional-paths send any
#    !
#    vrf vrf01
#       distance bgp 50 50 50
#       maximum-paths 55
#       neighbor 10.1.3.2 export-localpref 4000
#       neighbor 10.1.3.2 next-hop-unchanged
#       neighbor 10.1.3.2 dont-capability-negotiate
#       neighbor 10.1.3.2 allowas-in 3
#       neighbor 10.1.3.2 default-originate always
#       neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent
#       aggregate-address 1.2.1.0/24 as-set match-map match01
#       aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only
#       redistribute static route-map map_static
#       redistribute attached-host
#       !
#       address-family ipv4
#          neighbor 10.1.3.2 prefix-list prefix01 out

# Using overridden:
# (Note: Overridden and replaced operations are identitical)

# Before state:
# -------------
# veos(config)#show running-config | section bgp
# router bgp 100
#    bgp convergence slow-peer time 6
#    distance bgp 50 50 50
#    maximum-paths 55
#    bgp additional-paths send any
#    neighbor peer1 peer group
#    neighbor peer1 link-bandwidth update-delay 5
#    neighbor peer1 fall-over bfd
#    neighbor peer1 monitoring
#    neighbor peer1 send-community extended link-bandwidth aggregate 600
#    neighbor peer1 maximum-routes 12000
#    neighbor 10.1.3.2 export-localpref 4000
#    neighbor 10.1.3.2 next-hop-unchanged
#    neighbor 10.1.3.2 dont-capability-negotiate
#    neighbor 10.1.3.2 allowas-in 3
#    neighbor 10.1.3.2 default-originate always
#    neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent
#    aggregate-address 1.2.1.0/24 as-set match-map match01
#    aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only
#    redistribute static route-map map_static
#    redistribute attached-host
#    !
#    vlan 5
#    !
#    address-family ipv4
#       neighbor 10.1.3.2 prefix-list prefix01 out
#    !
#    vrf vrf01
#       route-target import 54:11
#       neighbor 12.1.3.2 dont-capability-negotiate
#       neighbor 12.1.3.2 allowas-in 3
#       neighbor 12.1.3.2 default-originate always
#       neighbor 12.1.3.2 maximum-routes 12000

- name: override running configuration with configuration
  arista.eos.eos_bgp_global:
    config:
      as_number: "100"
      bgp_params:
        host_routes: true
        convergence:
          slow_peer: true
          time: 6
        additional_paths: "send"
        log_neighbor_changes: true
      vrfs:
        - vrf: "vrf01"
          maximum_paths:
            max_equal_cost_paths: 55
          aggregate_address:
            - address: "1.2.1.0/24"
              as_set: true
              match_map: "match01"
            - address: "5.2.1.0/24"
              attribute_map: "attrmatch01"
              advertise_only: true
          redistribute:
            - protocol: "static"
              route_map: "map_static"
            - protocol: "attached-host"
          distance:
            internal: 50
          neighbor:
            - neighbor_address: "10.1.3.2"
              allowas_in:
                set: true
              default_originate:
                always: true
              dont_capability_negotiate: true
              export_localpref: 4000
              maximum_received_routes:
                count: 500
                warning_limit:
                  limit_percent: 5
              next_hop_unchanged: true
              prefix_list:
                name: "prefix01"
                direction: "out"
            - neighbor_address: "peer1"
              fall_over: true
              link_bandwidth:
                update_delay: 5
              monitoring: true
              send_community:
                community_attribute: "extended"
                sub_attribute: "link-bandwidth"
                link_bandwidth_attribute: "aggregate"
                speed: "600"
    state: overridden

# Task output:
# ------------
# before:
#     aggregate_address:
#     - address: 1.2.1.0/24
#       as_set: true
#       match_map: match01
#     - address: 5.2.1.0/24
#       advertise_only: true
#       attribute_map: attrmatch01
#     as_number: '100'
#     bgp_params:
#       additional_paths: send
#       convergence:
#         slow_peer: true
#         time: 6
#     distance:
#       external: 50
#       internal: 50
#       local: 50
#     maximum_paths:
#       max_equal_cost_paths: 55
#     neighbor:
#     - fall_over: true
#       link_bandwidth:
#         set: true
#         update_delay: 5
#       maximum_received_routes:
#         count: 12000
#       monitoring: true
#       neighbor_address: peer1
#       peer_group: peer1
#       send_community:
#         community_attribute: extended
#         link_bandwidth_attribute: aggregate
#         speed: '600'
#         sub_attribute: link-bandwidth
#     - allowas_in:
#         count: 3
#       default_originate:
#         always: true
#       dont_capability_negotiate: true
#       export_localpref: 4000
#       maximum_received_routes:
#         count: 500
#         warning_limit:
#           limit_percent: 5
#       neighbor_address: 10.1.3.2
#       next_hop_unchanged: true
#     redistribute:
#     - protocol: static
#       route_map: map_static
#     - protocol: attached-host
#     vlan: 5
#     vrfs:
#     - neighbor:
#       - allowas_in:
#           count: 3
#         default_originate:
#           always: true
#         dont_capability_negotiate: true
#         maximum_received_routes:
#           count: 12000
#         neighbor_address: 12.1.3.2
#       route_target:
#         action: import
#         target: '54:11'
#       vrf: vrf01
#
# commands:
# - router bgp 100
# - vrf vrf01
# - no route-target import 54:11
# - neighbor 10.1.3.2 allowas-in
# - neighbor 10.1.3.2 default-originate always
# - neighbor 10.1.3.2 dont-capability-negotiate
# - neighbor 10.1.3.2 export-localpref 4000
# - neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent
# - neighbor 10.1.3.2 next-hop-unchanged
# - neighbor 10.1.3.2 prefix-list prefix01 out
# - neighbor peer1 fall-over bfd
# - neighbor peer1 link-bandwidth update-delay 5
# - neighbor peer1 monitoring
# - neighbor peer1 send-community extended link-bandwidth aggregate 600
# - no neighbor 12.1.3.2
# - redistribute static route-map map_static
# - redistribute attached-host
# - aggregate-address 1.2.1.0/24 as-set match-map match01
# - aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only
# - maximum-paths 55
# - distance bgp 50
# - exit
# - no neighbor peer1 peer group
# - no neighbor peer1 link-bandwidth update-delay 5
# - no neighbor peer1 fall-over bfd
# - no neighbor peer1 monitoring
# - no neighbor peer1 send-community extended link-bandwidth aggregate 600
# - no neighbor peer1 maximum-routes 12000
# - no neighbor 10.1.3.2
# - no redistribute static route-map map_static
# - no redistribute attached-host
# - no aggregate-address 1.2.1.0/24 as-set match-map match01
# - no aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only
# - bgp host-routes fib direct-install
# - bgp log-neighbor-changes
# - no distance bgp 50 50 50
# - no maximum-paths 55
# - no vlan 5
#
# after:
#     as_number: '100'
#     bgp_params:
#       additional_paths: send
#       convergence:
#         slow_peer: true
#         time: 6
#     vrfs:
#     - aggregate_address:
#       - address: 1.2.1.0/24
#         as_set: true
#         match_map: match01
#       - address: 5.2.1.0/24
#         advertise_only: true
#         attribute_map: attrmatch01
#       distance:
#         external: 50
#         internal: 50
#         local: 50
#       maximum_paths:
#         max_equal_cost_paths: 55
#       neighbor:
#       - allowas_in:
#           count: 3
#         default_originate:
#           always: true
#         dont_capability_negotiate: true
#         export_localpref: 4000
#         maximum_received_routes:
#           count: 500
#           warning_limit:
#             limit_percent: 5
#         neighbor_address: 10.1.3.2
#         next_hop_unchanged: true
#       redistribute:
#       - protocol: static
#         route_map: map_static
#       - protocol: attached-host
#       vrf: vrf01
#
# After state:
# ------------
# veos(config)#show running-config | section bgp
# router bgp 100
#    bgp convergence slow-peer time 6
#    bgp additional-paths send any
#    !
#    vrf vrf01
#       distance bgp 50 50 50
#       maximum-paths 55
#       neighbor 10.1.3.2 export-localpref 4000
#       neighbor 10.1.3.2 next-hop-unchanged
#       neighbor 10.1.3.2 dont-capability-negotiate
#       neighbor 10.1.3.2 allowas-in 3
#       neighbor 10.1.3.2 default-originate always
#       neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent
#       aggregate-address 1.2.1.0/24 as-set match-map match01
#       aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only
#       redistribute static route-map map_static
#       redistribute attached-host
#       !
#       address-family ipv4
#          neighbor 10.1.3.2 prefix-list prefix01 out

# Using deleted:

# Before state:
# -------------
# veos(config)#show running-config | section bgp
# router bgp 100
#    bgp convergence slow-peer time 6
#    bgp additional-paths send any
#    !
#    vrf vrf01
#       distance bgp 50 50 50
#       maximum-paths 55
#       neighbor 10.1.3.2 export-localpref 4000
#       neighbor 10.1.3.2 next-hop-unchanged
#       neighbor 10.1.3.2 dont-capability-negotiate
#       neighbor 10.1.3.2 allowas-in 3
#       neighbor 10.1.3.2 default-originate always
#       neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent
#       aggregate-address 1.2.1.0/24 as-set match-map match01
#       aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only
#       redistribute static route-map map_static
#       redistribute attached-host
#       !

- name: Delete configuration
  arista.eos.eos_bgp_global:
    config:
      as_number: "100"
    state: deleted

# Task output:
# ------------
# before:
#     as_number: '100'
#     bgp_params:
#       additional_paths: send
#       convergence:
#         slow_peer: true
#         time: 6
#     vrfs:
#     - aggregate_address:
#       - address: 1.2.1.0/24
#         as_set: true
#         match_map: match01
#       - address: 5.2.1.0/24
#         advertise_only: true
#         attribute_map: attrmatch01
#       distance:
#         external: 50
#         internal: 50
#         local: 50
#       maximum_paths:
#         max_equal_cost_paths: 55
#       neighbor:
#       - allowas_in:
#           count: 3
#         default_originate:
#           always: true
#         dont_capability_negotiate: true
#         export_localpref: 4000
#         maximum_received_routes:
#           count: 500
#           warning_limit:
#             limit_percent: 5
#         neighbor_address: 10.1.3.2
#         next_hop_unchanged: true
#       redistribute:
#       - protocol: static
#         route_map: map_static
#       - protocol: attached-host
#       vrf: vrf01
#
# commands:
# - router bgp 100
# - no vrf vrf01
# - no bgp convergence slow-peer time 6
# - no bgp additional-paths send any
#
# after:
#  as_number: '100'

#
# After state:
# ------------
# veos(config)#show running-config | section bgp
# router bgp 100

# Using purged:

# Before state:
# -------------
# veos(config)#show running-config | section bgp
# router bgp 100
#    bgp convergence slow-peer time 6
#    distance bgp 50 50 50
#    maximum-paths 55
#    bgp additional-paths send any
#    neighbor peer1 peer group
#    neighbor peer1 link-bandwidth update-delay 5
#    neighbor peer1 fall-over bfd
#    neighbor peer1 monitoring
#    neighbor peer1 send-community extended link-bandwidth aggregate 600
#    neighbor peer1 maximum-routes 12000
#    neighbor 10.1.3.2 export-localpref 4000
#    neighbor 10.1.3.2 next-hop-unchanged
#    neighbor 10.1.3.2 dont-capability-negotiate
#    neighbor 10.1.3.2 allowas-in 3
#    neighbor 10.1.3.2 default-originate always
#    neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent
#    aggregate-address 1.2.1.0/24 as-set match-map match01
#    aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only
#    redistribute static route-map map_static
#    redistribute attached-host
#    !
#    vlan 5
#    !
#    address-family ipv4
#       neighbor 10.1.3.2 prefix-list prefix01 out
#    !
#    vrf vrf01
#       route-target import 54:11
#       neighbor 12.1.3.2 dont-capability-negotiate
#       neighbor 12.1.3.2 allowas-in 3
#       neighbor 12.1.3.2 default-originate always
#       neighbor 12.1.3.2 maximum-routes 12000

- name: Purge configuration
  arista.eos.eos_bgp_global:
    config:
      as_number: "100"
    state: purged


# Task output:
# ------------
# before:
#     aggregate_address:
#     - address: 1.2.1.0/24
#       as_set: true
#       match_map: match01
#     - address: 5.2.1.0/24
#       advertise_only: true
#       attribute_map: attrmatch01
#     as_number: '100'
#     bgp_params:
#       additional_paths: send
#       convergence:
#         slow_peer: true
#         time: 6
#     distance:
#       external: 50
#       internal: 50
#       local: 50
#     maximum_paths:
#       max_equal_cost_paths: 55
#     neighbor:
#     - fall_over: true
#       link_bandwidth:
#         set: true
#         update_delay: 5
#       maximum_received_routes:
#         count: 12000
#       monitoring: true
#       neighbor_address: peer1
#       peer_group: peer1
#       send_community:
#         community_attribute: extended
#         link_bandwidth_attribute: aggregate
#         speed: '600'
#         sub_attribute: link-bandwidth
#     - allowas_in:
#         count: 3
#       default_originate:
#         always: true
#       dont_capability_negotiate: true
#       export_localpref: 4000
#       maximum_received_routes:
#         count: 500
#         warning_limit:
#           limit_percent: 5
#       neighbor_address: 10.1.3.2
#       next_hop_unchanged: true
#     redistribute:
#     - protocol: static
#       route_map: map_static
#     - protocol: attached-host
#     vlan: 5
#     vrfs:
#     - neighbor:
#       - allowas_in:
#           count: 3
#         default_originate:
#           always: true
#         dont_capability_negotiate: true
#         maximum_received_routes:
#           count: 12000
#         neighbor_address: 12.1.3.2
#       route_target:
#         action: import
#         target: '54:11'
#       vrf: vrf01
#     "changed": true,
#
# commands:
# - no router bgp 100
#
# after: {}

# After state:
# ------------
# veos(config)#show running-config | section bgp
# veos(config)#

# Using rendered

- name: Render command lines for provided configuration
  arista.eos.eos_bgp_global:
    config:
      as_number: "100"
      bgp_params:
        host_routes: true
        convergence:
          slow_peer: true
          time: 6
        additional_paths: "send"
        log_neighbor_changes: true
      maximum_paths:
        max_equal_cost_paths: 55
      aggregate_address:
        - address: "1.2.1.0/24"
          as_set: true
          match_map: "match01"
        - address: "5.2.1.0/24"
          attribute_map: "attrmatch01"
          advertise_only: true
      redistribute:
        - protocol: "static"
          route_map: "map_static"
        - protocol: "attached-host"
      distance:
        internal: 50
      neighbor:
        - peer: "10.1.3.2"
          allowas_in:
            set: true
          default_originate:
            always: true
          dont_capability_negotiate: true
          export_localpref: 4000
          maximum_received_routes:
            count: 500
            warning_limit:
              limit_percent: 5
          next_hop_unchanged: true
          prefix_list:
            name: "prefix01"
            direction: "out"
        - neighbor_address: "peer1"
          fall_over: true
          link_bandwidth:
            update_delay: 5
          monitoring: true
          send_community:
            community_attribute: "extended"
            sub_attribute: "link-bandwidth"
            link_bandwidth_attribute: "aggregate"
            speed: "600"
      vlan: 5
    state: rendered

# Task output:
# ------------
# rendered:
#   - router bgp 100
#   - neighbor 10.1.3.2 allowas-in
#   - neighbor 10.1.3.2 default-originate always
#   - neighbor 10.1.3.2 dont-capability-negotiate
#   - neighbor 10.1.3.2 export-localpref 4000
#   - neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent
#   - neighbor 10.1.3.2 next-hop-unchanged
#   - neighbor 10.1.3.2 prefix-list prefix01 out
#   - neighbor peer1 fall-over bfd
#   - neighbor peer1 link-bandwidth update-delay 5
#   - neighbor peer1 monitoring
#   - neighbor peer1 send-community extended link-bandwidth aggregate 600
#   - redistribute static route-map map_static
#   - redistribute attached-host
#   - aggregate-address 1.2.1.0/24 as-set match-map match01
#   - aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only
#   - bgp host-routes fib direct-install
#   - bgp convergence slow-peer time 6
#   - bgp additional-paths send any
#   - bgp log-neighbor-changes
#   - maximum-paths 55
#   - distance bgp 50
#   - vlan 5


# Using parsed

# parsed.cfg
# ----------
# router bgp 100
#    bgp convergence slow-peer time 6
#    distance bgp 50 50 50
#    maximum-paths 55
#    bgp additional-paths send any
#    neighbor peer1 peer group
#    neighbor peer1 link-bandwidth update-delay 5
#    neighbor peer1 fall-over bfd
#    neighbor peer1 monitoring
#    neighbor peer1 send-community extended link-bandwidth aggregate 600
#    neighbor peer1 maximum-routes 12000
#    neighbor 10.1.3.2 export-localpref 4000
#    neighbor 10.1.3.2 next-hop-unchanged
#    neighbor 10.1.3.2 dont-capability-negotiate
#    neighbor 10.1.3.2 allowas-in 3
#    neighbor 10.1.3.2 default-originate always
#    neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent
#    aggregate-address 1.2.1.0/24 as-set match-map match01
#    aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only
#    redistribute static route-map map_static
#    redistribute attached-host
#    !
#    vlan 5
#    !
#    address-family ipv4
#       neighbor 10.1.3.2 prefix-list prefix01 out
#    !
#    vrf vrf01
#       route-target import 54:11
#       neighbor 12.1.3.2 dont-capability-negotiate
#       neighbor 12.1.3.2 allowas-in 3
#       neighbor 12.1.3.2 default-originate always
#       neighbor 12.1.3.2 maximum-routes 12000

- name: Parse externally provided BGP config
  arista.eos.eos_bgp_global:
    running_config: "{{ lookup('file', 'parsed.cfg') }}"
    state: parsed

# Task output:
# ------------

# parsed:
#     aggregate_address:
#     - address: 1.2.1.0/24
#       as_set: true
#       match_map: match01
#     - address: 5.2.1.0/24
#       advertise_only: true
#       attribute_map: attrmatch01
#     as_number: '100'
#     bgp_params:
#       additional_paths: send
#       convergence:
#         slow_peer: true
#         time: 6
#     distance:
#       external: 50
#       internal: 50
#       local: 50
#     maximum_paths:
#       max_equal_cost_paths: 55
#     neighbor:
#     - fall_over: true
#       link_bandwidth:
#         set: true
#         update_delay: 5
#       maximum_received_routes:
#         count: 12000
#       monitoring: true
#       neighbor_address: peer1
#       peer_group: peer1
#       send_community:
#         community_attribute: extended
#         link_bandwidth_attribute: aggregate
#         speed: '600'
#         sub_attribute: link-bandwidth
#     - allowas_in:
#         count: 3
#       default_originate:
#         always: true
#       dont_capability_negotiate: true
#       export_localpref: 4000
#       maximum_received_routes:
#         count: 500
#         warning_limit:
#           limit_percent: 5
#       neighbor_address: 10.1.3.2
#       next_hop_unchanged: true
#     redistribute:
#     - protocol: static
#       route_map: map_static
#     - protocol: attached-host
#     vlan: 5
#     vrfs:
#     - neighbor:
#       - allowas_in:
#           count: 3
#         default_originate:
#           always: true
#         dont_capability_negotiate: true
#         maximum_received_routes:
#           count: 12000
#         neighbor_address: 12.1.3.2
#       route_target:
#         action: import
#         target: '54:11'
#       vrf: vrf01

# Using gathered

# existing config
# veos(config)#show running-config | section bgp
# router bgp 100
#    bgp convergence slow-peer time 6
#    distance bgp 50 50 50
#    maximum-paths 55
#    bgp additional-paths send any
#    neighbor peer1 peer group
#    neighbor peer1 link-bandwidth update-delay 5
#    neighbor peer1 fall-over bfd
#    neighbor peer1 monitoring
#    neighbor peer1 send-community extended link-bandwidth aggregate 600
#    neighbor peer1 maximum-routes 12000
#    neighbor 10.1.3.2 export-localpref 4000
#    neighbor 10.1.3.2 next-hop-unchanged
#    neighbor 10.1.3.2 dont-capability-negotiate
#    neighbor 10.1.3.2 allowas-in 3
#    neighbor 10.1.3.2 default-originate always
#    neighbor 10.1.3.2 maximum-routes 500 warning-limit 5 percent
#    aggregate-address 1.2.1.0/24 as-set match-map match01
#    aggregate-address 5.2.1.0/24 attribute-map attrmatch01 advertise-only
#    redistribute static route-map map_static
#    redistribute attached-host
#    !
#    vlan 5
#    !
#    address-family ipv4
#       neighbor 10.1.3.2 prefix-list prefix01 out
#    !
#    vrf vrf01
#       route-target import 54:11
#       neighbor 12.1.3.2 dont-capability-negotiate
#       neighbor 12.1.3.2 allowas-in 3
#       neighbor 12.1.3.2 default-originate always
#       neighbor 12.1.3.2 maximum-routes 12000

- name: Gather BGP facts using gathered
  arista.eos.eos_bgp_global:
    state: gathered

# Task output:
# ------------
# gathered:
#     aggregate_address:
#     - address: 1.2.1.0/24
#       as_set: true
#       match_map: match01
#     - address: 5.2.1.0/24
#       advertise_only: true
#       attribute_map: attrmatch01
#     as_number: '100'
#     bgp_params:
#       additional_paths: send
#       convergence:
#         slow_peer: true
#         time: 6
#     distance:
#       external: 50
#       internal: 50
#       local: 50
#     maximum_paths:
#       max_equal_cost_paths: 55
#     neighbor:
#     - fall_over: true
#       link_bandwidth:
#         set: true
#         update_delay: 5
#       maximum_received_routes:
#         count: 12000
#       monitoring: true
#       neighbor_address: peer1
#       peer_group: peer1
#       send_community:
#         community_attribute: extended
#         link_bandwidth_attribute: aggregate
#         speed: '600'
#         sub_attribute: link-bandwidth
#     - allowas_in:
#         count: 3
#       default_originate:
#         always: true
#       dont_capability_negotiate: true
#       export_localpref: 4000
#       maximum_received_routes:
#         count: 500
#         warning_limit:
#           limit_percent: 5
#       neighbor_address: 10.1.3.2
#       next_hop_unchanged: true
#     redistribute:
#     - protocol: static
#       route_map: map_static
#     - protocol: attached-host
#     vlan: 5
#     vrfs:
#     - neighbor:
#       - allowas_in:
#           count: 3
#         default_originate:
#           always: true
#         dont_capability_negotiate: true
#         maximum_received_routes:
#           count: 12000
#         neighbor_address: 12.1.3.2
#       route_target:
#         action: import
#         target: '54:11'
#       vrf: vrf01

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
after
dictionary
when changed
The resulting configuration model invocation.

Sample:
The configuration returned will always be in the same format of the parameters above.
before
dictionary
always
The configuration prior to the model invocation.

Sample:
The configuration returned will always be in the same format of the parameters above.
commands
list
always
The set of commands pushed to the remote device.

Sample:
['router bgp 100', 'neighbor 10.1.3.2 allowas-in', 'neighbor 10.1.3.2 default-originate always', 'neighbor 10.1.3.2 dont-capability-negotiate']
gathered
dictionary
when state is gathered
Facts about the network resource gathered from the remote device as structured data.

Sample:
This output will always be in the same format as the module argspec.
parsed
dictionary
when state is parsed
The device native config provided in running_config option parsed into structured data as per module argspec.

Sample:
This output will always be in the same format as the module argspec.
rendered
list
when state is rendered
The provided configuration in the task rendered in device-native format (offline).

Sample:
['router bgp 100', 'neighbor 10.1.3.2 allowas-in', 'neighbor 10.1.3.2 default-originate always', 'neighbor 10.1.3.2 dont-capability-negotiate']


Authors

  • Gomathi Selvi Srinivasan (@GomathiselviS)