arista.eos.eos_bgp_global – Manages BGP global resource module¶
Note
This plugin is part of the arista.eos collection (version 1.3.0).
To install it use: ansible-galaxy collection install arista.eos
.
To use it in a playbook, specify: arista.eos.eos_bgp_global
.
New in version 1.4.0: of arista.eos
Synopsis¶
This module configures and manages the attributes of BGP global on Arista EOS platforms.
Note
This module has a corresponding action plugin.
Parameters¶
Notes¶
Note
Tested against Arista EOS 4.23.0F
This module works with connection
network_cli
. See the EOS Platform Options.
Examples¶
# 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"
- peer: "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
# 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
# veos(config)#
#
# Module Execution:
#
# "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,
# "peer": "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
# }
# },
# "next_hop_unchanged": true,
# "peer": "10.1.3.2"
# }
# ],
# "redistribute": [
# {
# "protocol": "static",
# "route_map": "map_static"
# },
# {
# "protocol": "attached-host"
# }
# ],
# "vlan": 5
# },
# "before": {},
# "changed": true,
# "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"
# ],
# 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
# veos(config)#
- 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:
- 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"
- peer: "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
# 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
# veos(config)#
#
#
# Module Execution:
#
# "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
# }
# },
# "next_hop_unchanged": true,
# "peer": "10.1.3.2"
# }
# ],
# "redistribute": [
# {
# "protocol": "static",
# "route_map": "map_static"
# },
# {
# "protocol": "attached-host"
# }
# ],
# "vrf": "vrf01"
# }
# ]
# },
# "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,
# "peer": "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
# }
# },
# "next_hop_unchanged": true,
# "peer": "10.1.3.2"
# }
# ],
# "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
# },
# "peer": "12.1.3.2"
# }
# ],
# "route_target": {
# "action": "import",
# "target": "54:11"
# },
# "vrf": "vrf01"
# }
# ]
# },
# "changed": true,
# "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"
# ],
#
# Using replaced (in presence of address_family under vrf):
# 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
# !
# address-family ipv4
# neighbor 10.1.3.2 prefix-list prefix01 out
# !
# address-family ipv6
# redistribute dhcp
# veos(config)#
- name: Replace
arista.eos.eos_bgp_global:
config:
as_number: "100"
graceful_restart:
set: True
router_id: "1.1.1.1"
timers:
keepalive: 2
holdtime: 5
ucmp:
mode:
set: True
vlan_aware_bundle: "bundle1 bundle2 bundle3"
state: replaced
# Module Execution:
# fatal: [192.168.122.113]: FAILED! => {
# "changed": false,
# "invocation": {
# "module_args": {
# "config": {
# "access_group": null,
# "aggregate_address": null,
# "as_number": "100",
# "bgp_params": null,
# "default_metric": null,
# "distance": null,
# "graceful_restart": {
# "restart_time": null,
# "set": true,
# "stalepath_time": null
# },
# "graceful_restart_helper": null,
# "maximum_paths": null,
# "monitoring": null,
# "neighbor": null,
# "network": null,
# "redistribute": null,
# "route_target": null,
# "router_id": "1.1.1.1",
# "shutdown": null,
# "timers": {
# "holdtime": 5,
# "keepalive": 2
# },
# "ucmp": {
# "fec": null,
# "link_bandwidth": null,
# "mode": {
# "nexthops": null,
# "set": true
# }
# },
# "update": null,
# "vlan": null,
# "vlan_aware_bundle": "bundle1 bundle2 bundle3",
# "vrfs": null
# },
# "running_config": null,
# "state": "replaced"
# }
# },
# "msg": "Use the _bgp_af module to delete the address_family under vrf, before replacing/deleting the vrf."
# }
# 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
# After State:
# veos(config)#show running-config | section bgp
# router bgp 100
#
#
# Module Execution:
#
# "after": {
# "as_number": "100"
# },
# "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
# }
# },
# "next_hop_unchanged": true,
# "peer": "10.1.3.2"
# }
# ],
# "redistribute": [
# {
# "protocol": "static",
# "route_map": "map_static"
# },
# {
# "protocol": "attached-host"
# }
# ],
# "vrf": "vrf01"
# }
# ]
# },
# "changed": true,
# "commands": [
# "router bgp 100",
# "no vrf vrf01",
# "no bgp convergence slow-peer time 6",
# "no bgp additional-paths send any"
# ],
#
# 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
# veos(config)#
- name: Purge configuration
arista.eos.eos_bgp_global:
config:
as_number: "100"
state: purged
# After State:
# veos(config)#show running-config | section bgp
# veos(config)#
# Module Execution:
# "after": {},
# "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,
# "peer": "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
# }
# },
# "next_hop_unchanged": true,
# "peer": "10.1.3.2"
# }
# ],
# "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
# },
# "peer": "12.1.3.2"
# }
# ],
# "route_target": {
# "action": "import",
# "target": "54:11"
# },
# "vrf": "vrf01"
# }
# ]
# },
# "changed": true,
# "commands": [
# "no router bgp 100"
# ],
Authors¶
Gomathi Selvi Srinivasan (@GomathiselviS)