| 1 |
#!/usr/bin/python |
| 2 |
# -*- coding: utf-8 -*- |
| 3 |
# Copyright 2022 Red Hat |
| 4 |
# GNU General Public License v3.0+ |
| 5 |
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) |
| 6 |
|
| 7 |
""" |
| 8 |
The module file for ios_bgp_global |
| 9 |
""" |
| 10 |
|
| 11 |
from __future__ import absolute_import, division, print_function |
| 12 |
|
| 13 |
|
| 14 |
__metaclass__ = type |
| 15 |
|
| 16 |
DOCUMENTATION = """ |
| 17 |
module: ios_bgp_global |
| 18 |
short_description: Resource module to configure BGP. |
| 19 |
description: This module configures and manages the attributes of global bgp on Cisco IOS. |
| 20 |
version_added: 1.3.0 |
| 21 |
author: |
| 22 |
- Sumit Jaiswal (@justjais) |
| 23 |
- Sagar Paul (@KB-perByte) |
| 24 |
notes: |
| 25 |
- Tested against Cisco IOS-XE Version 17.3 on CML. |
| 26 |
- This module works with connection C(network_cli). |
| 27 |
See U(https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.html) |
| 28 |
- The module examples uses callback plugin (stdout_callback = yaml) to generate task |
| 29 |
output in yaml format. |
| 30 |
options: |
| 31 |
config: |
| 32 |
description: A dictionary of options for bgp configurations. |
| 33 |
type: dict |
| 34 |
suboptions: |
| 35 |
as_number: |
| 36 |
description: Autonomous system number |
| 37 |
type: str |
| 38 |
aggregate_addresses: |
| 39 |
description: Configure BGP aggregate entries |
| 40 |
type: list |
| 41 |
elements: dict |
| 42 |
suboptions: |
| 43 |
address: |
| 44 |
description: Specify aggregate address |
| 45 |
type: str |
| 46 |
netmask: |
| 47 |
description: Specify aggregate mask |
| 48 |
type: str |
| 49 |
advertise_map: |
| 50 |
description: Set condition to advertise attribute |
| 51 |
type: str |
| 52 |
as_confed_set: |
| 53 |
description: Generate AS confed set path information |
| 54 |
type: bool |
| 55 |
as_set: |
| 56 |
description: Generate AS set path information |
| 57 |
type: bool |
| 58 |
attribute_map: |
| 59 |
description: Set attributes of aggregate |
| 60 |
type: str |
| 61 |
summary_only: |
| 62 |
description: Filter more specific routes from updates |
| 63 |
type: bool |
| 64 |
suppress_map: |
| 65 |
description: Conditionally filter more specific routes from updates |
| 66 |
type: str |
| 67 |
auto_summary: |
| 68 |
description: Enable automatic network number summarization |
| 69 |
type: bool |
| 70 |
bgp: |
| 71 |
description: Enable address family and enter its config mode |
| 72 |
type: dict |
| 73 |
suboptions: |
| 74 |
additional_paths: |
| 75 |
description: Additional paths in the BGP table |
| 76 |
type: dict |
| 77 |
suboptions: |
| 78 |
install: |
| 79 |
description: Additional paths to install into RIB |
| 80 |
type: bool |
| 81 |
receive: |
| 82 |
description: Receive additional paths from neighbors |
| 83 |
type: bool |
| 84 |
select: |
| 85 |
description: Selection criteria to pick the paths |
| 86 |
type: dict |
| 87 |
suboptions: |
| 88 |
all: |
| 89 |
description: Select all available paths |
| 90 |
type: bool |
| 91 |
best: |
| 92 |
description: Select best N paths (2-3). |
| 93 |
type: int |
| 94 |
best_external: |
| 95 |
description: Select best-external path |
| 96 |
type: bool |
| 97 |
group_best: |
| 98 |
description: Select group-best path |
| 99 |
type: bool |
| 100 |
send: |
| 101 |
description: Send additional paths to neighbors |
| 102 |
type: bool |
| 103 |
advertise_best_external: |
| 104 |
description: Advertise best external path to internal peers |
| 105 |
type: bool |
| 106 |
aggregate_timer: |
| 107 |
description: |
| 108 |
- Configure Aggregation Timer |
| 109 |
- Please refer vendor documentation for valid values |
| 110 |
type: int |
| 111 |
always_compare_med: |
| 112 |
description: Allow comparing MED from different neighbors |
| 113 |
type: bool |
| 114 |
asnotation: |
| 115 |
description: |
| 116 |
- Change the default as plain notation |
| 117 |
- asdot notation |
| 118 |
type: bool |
| 119 |
bestpath_options: |
| 120 |
description: |
| 121 |
- Change the default bestpath selection |
| 122 |
type: dict |
| 123 |
suboptions: |
| 124 |
aigp: |
| 125 |
description: |
| 126 |
- if both paths doesn't have aigp ignore on bestpath comparison |
| 127 |
- ignore |
| 128 |
type: bool |
| 129 |
compare_routerid: |
| 130 |
description: Compare router-id for identical EBGP paths |
| 131 |
type: bool |
| 132 |
cost_community: |
| 133 |
description: cost community |
| 134 |
type: bool |
| 135 |
igp_metric: |
| 136 |
description: |
| 137 |
- igp metric |
| 138 |
- Ignore igp metric in bestpath selection |
| 139 |
type: bool |
| 140 |
med: |
| 141 |
description: MED attribute |
| 142 |
type: dict |
| 143 |
suboptions: |
| 144 |
confed: |
| 145 |
description: Compare MED among confederation paths |
| 146 |
type: bool |
| 147 |
missing_as_worst: |
| 148 |
description: Treat missing MED as the least preferred one |
| 149 |
type: bool |
| 150 |
client_to_client: |
| 151 |
description: Configure client to client route reflection |
| 152 |
type: dict |
| 153 |
suboptions: |
| 154 |
set: |
| 155 |
description: set reflection of routes allowed |
| 156 |
type: bool |
| 157 |
all: |
| 158 |
description: inter-cluster and intra-cluster (default) |
| 159 |
type: bool |
| 160 |
intra_cluster: |
| 161 |
description: |
| 162 |
- intra cluster reflection |
| 163 |
- intra-cluster reflection for cluster-id |
| 164 |
type: str |
| 165 |
cluster_id: |
| 166 |
description: |
| 167 |
- Configure Route-Reflector Cluster-id (peers may reset) |
| 168 |
- A.B.C.D/Please refer vendor documentation for valid Route-Reflector Cluster-id |
| 169 |
type: str |
| 170 |
confederation: |
| 171 |
description: AS confederation parameters |
| 172 |
type: dict |
| 173 |
suboptions: |
| 174 |
identifier: |
| 175 |
description: |
| 176 |
- Set routing domain confederation AS |
| 177 |
- AS number |
| 178 |
type: str |
| 179 |
peers: |
| 180 |
description: |
| 181 |
- Peer ASs in BGP confederation |
| 182 |
- AS number |
| 183 |
type: str |
| 184 |
consistency_checker: |
| 185 |
description: Consistency-checker |
| 186 |
type: dict |
| 187 |
suboptions: |
| 188 |
auto_repair: |
| 189 |
description: Auto-Repair |
| 190 |
type: dict |
| 191 |
suboptions: |
| 192 |
set: |
| 193 |
description: Enable Auto-Repair |
| 194 |
type: bool |
| 195 |
interval: |
| 196 |
description: |
| 197 |
- Set the bgp consistency checker |
| 198 |
- Please refer vendor documentation for valid values |
| 199 |
type: int |
| 200 |
error_message: |
| 201 |
description: Log Error-Msg |
| 202 |
type: dict |
| 203 |
suboptions: |
| 204 |
set: |
| 205 |
description: Enable Error-Msg |
| 206 |
type: bool |
| 207 |
interval: |
| 208 |
description: |
| 209 |
- Set the bgp consistency checker |
| 210 |
- Please refer vendor documentation for valid values |
| 211 |
type: int |
| 212 |
default: |
| 213 |
description: Configure BGP defaults |
| 214 |
type: dict |
| 215 |
suboptions: |
| 216 |
ipv4_unicast: |
| 217 |
description: Activate ipv4-unicast for a peer by default |
| 218 |
type: bool |
| 219 |
default: true |
| 220 |
route_target: |
| 221 |
description: Control behavior based on Route-Target attributes |
| 222 |
type: dict |
| 223 |
suboptions: |
| 224 |
filter: |
| 225 |
description: Control automatic VPN Route-Target filtering |
| 226 |
type: bool |
| 227 |
default: true |
| 228 |
dampening: |
| 229 |
description: Enable route-flap dampening |
| 230 |
type: dict |
| 231 |
suboptions: |
| 232 |
penalty_half_time: |
| 233 |
description: |
| 234 |
- Half-life time for the penalty |
| 235 |
- Please refer vendor documentation for valid values |
| 236 |
type: int |
| 237 |
reuse_route_val: |
| 238 |
description: |
| 239 |
- Value to start reusing a route |
| 240 |
- Please refer vendor documentation for valid values |
| 241 |
type: int |
| 242 |
suppress_route_val: |
| 243 |
description: |
| 244 |
- Value to start suppressing a route |
| 245 |
- Please refer vendor documentation for valid values |
| 246 |
type: int |
| 247 |
max_suppress: |
| 248 |
description: |
| 249 |
- Maximum duration to suppress a stable route |
| 250 |
- Please refer vendor documentation for valid values |
| 251 |
type: int |
| 252 |
route_map: |
| 253 |
description: Route-map to specify criteria for dampening |
| 254 |
type: str |
| 255 |
deterministic_med: |
| 256 |
description: Pick the best-MED path among paths advertised from the neighboring AS |
| 257 |
type: bool |
| 258 |
dmzlink_bw: |
| 259 |
description: Use DMZ Link Bandwidth as weight for BGP multipaths |
| 260 |
type: bool |
| 261 |
enforce_first_as: |
| 262 |
description: Enforce the first AS for EBGP routes(default) |
| 263 |
type: bool |
| 264 |
enhanced_error: |
| 265 |
description: Enabled BGP Enhanced error handling |
| 266 |
type: bool |
| 267 |
fast_external_fallover: |
| 268 |
description: Immediately reset session if a link to a directly connected external peer goes down |
| 269 |
type: bool |
| 270 |
graceful_restart: |
| 271 |
description: Graceful restart capability parameters |
| 272 |
type: dict |
| 273 |
suboptions: |
| 274 |
set: |
| 275 |
description: Set Graceful-Restart |
| 276 |
type: bool |
| 277 |
extended: |
| 278 |
description: Enable Graceful-Restart Extension |
| 279 |
type: bool |
| 280 |
restart_time: |
| 281 |
description: |
| 282 |
- Set the max time needed to restart and come back up |
| 283 |
- Please refer vendor documentation for valid values |
| 284 |
type: int |
| 285 |
stalepath_time: |
| 286 |
description: |
| 287 |
- Set the max time to hold onto restarting peer's stale paths |
| 288 |
- Please refer vendor documentation for valid values |
| 289 |
type: int |
| 290 |
graceful_shutdown: |
| 291 |
description: Graceful shutdown capability parameters |
| 292 |
type: dict |
| 293 |
suboptions: |
| 294 |
neighbors: |
| 295 |
description: Gracefully shut down all neighbors |
| 296 |
type: dict |
| 297 |
suboptions: |
| 298 |
time: |
| 299 |
description: |
| 300 |
- time in seconds |
| 301 |
- Please refer vendor documentation for valid values |
| 302 |
type: int |
| 303 |
activate: |
| 304 |
description: Activate graceful shutdown of all neighbors |
| 305 |
type: bool |
| 306 |
vrfs: |
| 307 |
description: Gracefully shut down all vrf neighbors |
| 308 |
type: dict |
| 309 |
suboptions: |
| 310 |
time: |
| 311 |
description: |
| 312 |
- time in seconds |
| 313 |
- Please refer vendor documentation for valid values |
| 314 |
type: int |
| 315 |
activate: |
| 316 |
description: Activate graceful shutdown of all neighbors |
| 317 |
type: bool |
| 318 |
community: |
| 319 |
description: |
| 320 |
- Set Community for Gshut routes |
| 321 |
- community number/community number in aa:nn format |
| 322 |
type: str |
| 323 |
local_preference: |
| 324 |
description: |
| 325 |
- Set Local Preference for Gshut routes |
| 326 |
- Please refer vendor documentation for valid values |
| 327 |
type: int |
| 328 |
inject_maps: |
| 329 |
description: Routemap which specifies prefixes to inject |
| 330 |
type: list |
| 331 |
elements: dict |
| 332 |
suboptions: |
| 333 |
name: |
| 334 |
description: route-map name |
| 335 |
type: str |
| 336 |
exist_map_name: |
| 337 |
description: route-map name |
| 338 |
type: str |
| 339 |
copy_attributes: |
| 340 |
description: Copy attributes from aggregate |
| 341 |
type: bool |
| 342 |
listen: |
| 343 |
description: Neighbor subnet range listener |
| 344 |
type: dict |
| 345 |
suboptions: |
| 346 |
limit: |
| 347 |
description: |
| 348 |
- Set the max limit for the dynamic subnet range neighbors |
| 349 |
- Please refer vendor documentation for valid values |
| 350 |
type: int |
| 351 |
range: |
| 352 |
description: Subnet network range |
| 353 |
type: dict |
| 354 |
suboptions: |
| 355 |
host_with_subnet: |
| 356 |
description: |
| 357 |
- IPv4 subnet range(A.B.C.D/nn) |
| 358 |
- IPv6 subnet range(X:X:X:X::X/<0-128>) |
| 359 |
type: str |
| 360 |
peer_group: |
| 361 |
description: Member of the peer-group |
| 362 |
type: str |
| 363 |
log_neighbor_changes: |
| 364 |
description: Log neighbor up/down and reset reason |
| 365 |
type: bool |
| 366 |
maxas_limit: |
| 367 |
description: |
| 368 |
- Allow AS-PATH attribute from any neighbor imposing a limit on number of ASes |
| 369 |
- Please refer vendor documentation for valid values |
| 370 |
type: int |
| 371 |
maxcommunity_limit: |
| 372 |
description: |
| 373 |
- Allow COMMUNITY attribute from any neighbor imposing a limit on number of communities |
| 374 |
- Please refer vendor documentation for valid values |
| 375 |
type: int |
| 376 |
maxextcommunity_limit: |
| 377 |
description: |
| 378 |
- Allow EXTENDED COMMUNITY attribute from any neighbor imposing a limit on number of extended communities |
| 379 |
- Please refer vendor documentation for valid values |
| 380 |
type: int |
| 381 |
nexthop: |
| 382 |
description: Nexthop tracking commands |
| 383 |
type: dict |
| 384 |
suboptions: |
| 385 |
route_map: |
| 386 |
description: Route map for valid nexthops |
| 387 |
type: str |
| 388 |
trigger: |
| 389 |
description: nexthop trackings |
| 390 |
type: dict |
| 391 |
suboptions: |
| 392 |
delay: |
| 393 |
description: |
| 394 |
- Set the delay to trigger nexthop tracking |
| 395 |
- Please refer vendor documentation for valid values |
| 396 |
type: int |
| 397 |
enable: |
| 398 |
description: Enable nexthop tracking |
| 399 |
type: bool |
| 400 |
nopeerup_delay_options: |
| 401 |
description: |
| 402 |
Set how long BGP will wait for the first peer to come up before beginning the update delay or |
| 403 |
graceful restart timers (in seconds) |
| 404 |
type: dict |
| 405 |
suboptions: |
| 406 |
cold_boot: |
| 407 |
description: |
| 408 |
- How long to wait for the first peer to come up upon a cold boot |
| 409 |
- Please refer vendor documentation for valid values |
| 410 |
type: int |
| 411 |
nsf_switchover: |
| 412 |
description: |
| 413 |
- How long to wait for the first peer, post NSF switchover |
| 414 |
- Please refer vendor documentation for valid values |
| 415 |
type: int |
| 416 |
post_boot: |
| 417 |
description: |
| 418 |
- How long to wait for the first peer to come up once the system is already |
| 419 |
booted and all peers go down |
| 420 |
- Please refer vendor documentation for valid values |
| 421 |
type: int |
| 422 |
user_initiated: |
| 423 |
description: |
| 424 |
- How long to wait for the first peer, post a manual clear of BGP peers by the admin user |
| 425 |
- Please refer vendor documentation for valid values |
| 426 |
type: int |
| 427 |
recursion: |
| 428 |
description: |
| 429 |
- recursion rule for the nexthops |
| 430 |
- recursion via host for the nexthops |
| 431 |
type: bool |
| 432 |
redistribute_internal: |
| 433 |
description: Allow redistribution of iBGP into IGPs (dangerous) |
| 434 |
type: bool |
| 435 |
refresh: |
| 436 |
description: refresh |
| 437 |
type: dict |
| 438 |
suboptions: |
| 439 |
max_eor_time: |
| 440 |
description: |
| 441 |
- Configure refresh max-eor time |
| 442 |
- Please refer vendor documentation for valid values |
| 443 |
type: int |
| 444 |
stalepath_time: |
| 445 |
description: |
| 446 |
- Configure refresh stale-path time |
| 447 |
- Please refer vendor documentation for valid values |
| 448 |
type: int |
| 449 |
regexp: |
| 450 |
description: |
| 451 |
- Select regular expression engine |
| 452 |
- Enable bounded-execution-time regular expression engine |
| 453 |
type: bool |
| 454 |
route_map: |
| 455 |
description: |
| 456 |
- route-map control commands |
| 457 |
- Have route-map set commands take priority over BGP commands such as next-hop unchanged |
| 458 |
type: bool |
| 459 |
router_id: |
| 460 |
description: Override configured router identifier (peers will reset) |
| 461 |
type: dict |
| 462 |
suboptions: |
| 463 |
address: |
| 464 |
description: Manually configured router identifier(A.B.C.D) |
| 465 |
type: str |
| 466 |
interface: |
| 467 |
description: Use IPv4 address on interface |
| 468 |
type: str |
| 469 |
vrf: |
| 470 |
description: |
| 471 |
- vrf-specific router id configuration |
| 472 |
- Automatically assign per-vrf bgp router id |
| 473 |
type: bool |
| 474 |
scan_time: |
| 475 |
description: |
| 476 |
- Configure background scanner interval |
| 477 |
- Please refer vendor documentation for valid values |
| 478 |
type: int |
| 479 |
slow_peer: |
| 480 |
description: Configure slow-peer |
| 481 |
type: dict |
| 482 |
suboptions: |
| 483 |
detection: |
| 484 |
description: Slow-peer detection |
| 485 |
type: dict |
| 486 |
suboptions: |
| 487 |
set: |
| 488 |
description: Slow-peer detection |
| 489 |
type: bool |
| 490 |
threshold: |
| 491 |
description: |
| 492 |
- Set the slow-peer detection threshold |
| 493 |
- Please refer vendor documentation for valid values |
| 494 |
type: int |
| 495 |
split_update_group: |
| 496 |
description: Configure slow-peer split-update-group |
| 497 |
type: dict |
| 498 |
suboptions: |
| 499 |
dynamic: |
| 500 |
description: Dynamically split the slow peer to slow-update group |
| 501 |
type: bool |
| 502 |
permanent: |
| 503 |
description: Keep the slow-peer permanently in slow-update group |
| 504 |
type: bool |
| 505 |
snmp: |
| 506 |
description: |
| 507 |
- BGP SNMP options |
| 508 |
- BGP SNMP trap options |
| 509 |
- Use cbgp Peer2Type as part of index for traps |
| 510 |
type: bool |
| 511 |
sso: |
| 512 |
description: |
| 513 |
- Stateful Switchover |
| 514 |
- Enable SSO only for Route-Refresh capable peers |
| 515 |
type: bool |
| 516 |
soft_reconfig_backup: |
| 517 |
description: Use soft-reconfiguration inbound only when route-refresh is not negotiated |
| 518 |
type: bool |
| 519 |
suppress_inactive: |
| 520 |
description: Suppress routes that are not in the routing table |
| 521 |
type: bool |
| 522 |
transport: |
| 523 |
description: |
| 524 |
- Global enable/disable transport session parameters |
| 525 |
- Transport path MTU discovery |
| 526 |
type: bool |
| 527 |
update_delay: |
| 528 |
description: |
| 529 |
- Set the max initial delay for sending update |
| 530 |
- Please refer vendor documentation for valid values |
| 531 |
type: int |
| 532 |
update_group: |
| 533 |
description: |
| 534 |
- Manage peers in bgp update groups |
| 535 |
- Split update groups based on Policy |
| 536 |
- Keep peers with as-override in different update groups |
| 537 |
type: bool |
| 538 |
upgrade_cli: |
| 539 |
description: Upgrade to hierarchical AFI mode |
| 540 |
type: dict |
| 541 |
suboptions: |
| 542 |
set: |
| 543 |
description: enable upgrade to hierarchical AFI mode |
| 544 |
type: bool |
| 545 |
af_mode: |
| 546 |
description: Upgrade to AFI mode |
| 547 |
type: bool |
| 548 |
bmp: |
| 549 |
description: BGP Monitoring Protocol |
| 550 |
type: dict |
| 551 |
suboptions: |
| 552 |
buffer_size: |
| 553 |
description: |
| 554 |
- BMP Buffer Size |
| 555 |
- Please refer vendor documentation for valid values |
| 556 |
type: int |
| 557 |
initial_refresh: |
| 558 |
description: Initial Refresh options |
| 559 |
type: dict |
| 560 |
suboptions: |
| 561 |
delay: |
| 562 |
description: Delay before Initial Refresh |
| 563 |
type: int |
| 564 |
skip: |
| 565 |
description: skip all refreshes |
| 566 |
type: bool |
| 567 |
server: |
| 568 |
description: |
| 569 |
- Server Information |
| 570 |
- Please refer vendor documentation for valid values |
| 571 |
type: int |
| 572 |
server_options: |
| 573 |
description: bmp server options |
| 574 |
type: dict |
| 575 |
suboptions: |
| 576 |
activate: |
| 577 |
description: activate server |
| 578 |
type: bool |
| 579 |
address: |
| 580 |
description: skip all refreshes |
| 581 |
type: dict |
| 582 |
suboptions: |
| 583 |
host: |
| 584 |
description: host address |
| 585 |
type: str |
| 586 |
port: |
| 587 |
description: port number BMP server |
| 588 |
type: int |
| 589 |
default_information: |
| 590 |
description: |
| 591 |
- Control distribution of default information |
| 592 |
- Distribute a default route |
| 593 |
type: bool |
| 594 |
default_metric: |
| 595 |
description: |
| 596 |
- Set metric of redistributed routes |
| 597 |
- Please refer vendor documentation for valid values |
| 598 |
type: int |
| 599 |
distance: |
| 600 |
description: Define an administrative distance |
| 601 |
type: dict |
| 602 |
suboptions: |
| 603 |
admin: |
| 604 |
description: Administrative distance |
| 605 |
type: dict |
| 606 |
suboptions: |
| 607 |
distance: |
| 608 |
description: |
| 609 |
- Administrative distance |
| 610 |
- Please refer vendor documentation for valid values |
| 611 |
type: int |
| 612 |
address: |
| 613 |
description: IP Source address (A.B.C.D) |
| 614 |
type: str |
| 615 |
wildcard_bit: |
| 616 |
description: Wildcard bits (A.B.C.D) |
| 617 |
type: str |
| 618 |
acl: |
| 619 |
description: |
| 620 |
- IP Standard access list number |
| 621 |
- IP Standard expanded access list number |
| 622 |
- Standard access-list name |
| 623 |
type: str |
| 624 |
bgp: |
| 625 |
description: BGP distance |
| 626 |
type: dict |
| 627 |
suboptions: |
| 628 |
routes_external: |
| 629 |
description: |
| 630 |
- Distance for routes external to the AS |
| 631 |
- Please refer vendor documentation for valid values |
| 632 |
type: int |
| 633 |
routes_internal: |
| 634 |
description: |
| 635 |
- Distance for routes internal to the AS |
| 636 |
- Please refer vendor documentation for valid values |
| 637 |
type: int |
| 638 |
routes_local: |
| 639 |
description: |
| 640 |
- Distance for local routes |
| 641 |
- Please refer vendor documentation for valid values |
| 642 |
type: int |
| 643 |
mbgp: |
| 644 |
description: MBGP distance |
| 645 |
type: dict |
| 646 |
suboptions: |
| 647 |
routes_external: |
| 648 |
description: |
| 649 |
- Distance for routes external to the AS |
| 650 |
- Please refer vendor documentation for valid values |
| 651 |
type: int |
| 652 |
routes_internal: |
| 653 |
description: |
| 654 |
- Distance for routes internal to the AS |
| 655 |
- Please refer vendor documentation for valid values |
| 656 |
type: int |
| 657 |
routes_local: |
| 658 |
description: |
| 659 |
- Distance for local routes |
| 660 |
- Please refer vendor documentation for valid values |
| 661 |
type: int |
| 662 |
distributes: |
| 663 |
description: Filter networks in routing updates |
| 664 |
type: list |
| 665 |
elements: dict |
| 666 |
suboptions: |
| 667 |
prefix: |
| 668 |
description: Filtering incoming updates based on gateway |
| 669 |
type: str |
| 670 |
gateway: |
| 671 |
description: Filter prefixes in routing updates |
| 672 |
type: str |
| 673 |
acl: |
| 674 |
description: IP access list number/name |
| 675 |
type: str |
| 676 |
in: |
| 677 |
description: Filter incoming routing updates |
| 678 |
type: bool |
| 679 |
out: |
| 680 |
description: Filter outgoing routing updates |
| 681 |
type: bool |
| 682 |
interface: |
| 683 |
description: interface details |
| 684 |
type: str |
| 685 |
maximum_paths: |
| 686 |
description: Forward packets over multiple paths |
| 687 |
type: dict |
| 688 |
suboptions: |
| 689 |
paths: |
| 690 |
description: Number of paths |
| 691 |
type: int |
| 692 |
eibgp: |
| 693 |
description: Both eBGP and iBGP paths as multipath |
| 694 |
type: int |
| 695 |
ibgp: |
| 696 |
description: iBGP-multipath |
| 697 |
type: int |
| 698 |
maximum_secondary_paths: |
| 699 |
description: Maximum secondary paths |
| 700 |
type: dict |
| 701 |
suboptions: |
| 702 |
paths: |
| 703 |
description: Number of secondary paths |
| 704 |
type: int |
| 705 |
eibgp: |
| 706 |
description: Both eBGP and iBGP paths as secondary multipath |
| 707 |
type: int |
| 708 |
ibgp: |
| 709 |
description: iBGP-secondary-multipath |
| 710 |
type: int |
| 711 |
neighbors: |
| 712 |
description: Specify a neighbor router |
| 713 |
type: list |
| 714 |
elements: dict |
| 715 |
aliases: |
| 716 |
- neighbor |
| 717 |
suboptions: |
| 718 |
neighbor_address: |
| 719 |
description: |
| 720 |
- Neighbor address (A.B.C.D) |
| 721 |
- Neighbor tag |
| 722 |
- Neighbor ipv6 address (X:X:X:X::X) |
| 723 |
type: str |
| 724 |
activate: |
| 725 |
description: Enable the Address Family for this Neighbor |
| 726 |
type: bool |
| 727 |
additional_paths: |
| 728 |
description: Negotiate additional paths capabilities with this neighbor |
| 729 |
type: dict |
| 730 |
suboptions: |
| 731 |
disable: |
| 732 |
description: Disable additional paths for this neighbor |
| 733 |
type: bool |
| 734 |
receive: |
| 735 |
description: Receive additional paths from neighbors |
| 736 |
type: bool |
| 737 |
send: |
| 738 |
description: Send additional paths to neighbors |
| 739 |
type: bool |
| 740 |
advertise: |
| 741 |
description: Advertise to this neighbor |
| 742 |
type: dict |
| 743 |
suboptions: |
| 744 |
additional_paths: |
| 745 |
description: Advertise additional paths |
| 746 |
type: dict |
| 747 |
suboptions: |
| 748 |
all: |
| 749 |
description: Select all available paths |
| 750 |
type: bool |
| 751 |
best: |
| 752 |
description: Select best N paths (2-3). |
| 753 |
type: int |
| 754 |
group_best: |
| 755 |
description: Select group-best path |
| 756 |
type: bool |
| 757 |
best_external: |
| 758 |
description: Advertise best-external (at RRs best-internal) path |
| 759 |
type: bool |
| 760 |
diverse_path: |
| 761 |
description: Advertise additional paths |
| 762 |
type: dict |
| 763 |
suboptions: |
| 764 |
backup: |
| 765 |
description: Diverse path can be backup path |
| 766 |
type: bool |
| 767 |
mpath: |
| 768 |
description: Diverse path can be multipath |
| 769 |
type: bool |
| 770 |
advertise_map: |
| 771 |
description: specify route-map for conditional advertisement |
| 772 |
type: dict |
| 773 |
suboptions: |
| 774 |
name: |
| 775 |
description: advertise route-map name |
| 776 |
type: str |
| 777 |
exist_map: |
| 778 |
description: |
| 779 |
- advertise prefix only if prefix is in the condition exists |
| 780 |
- condition route-map name |
| 781 |
type: str |
| 782 |
non_exist_map: |
| 783 |
description: |
| 784 |
- advertise prefix only if prefix in the condition does not exist |
| 785 |
- condition route-map name |
| 786 |
type: str |
| 787 |
advertisement_interval: |
| 788 |
description: Minimum interval between sending BGP routing updates |
| 789 |
type: int |
| 790 |
aigp: |
| 791 |
description: AIGP on neighbor |
| 792 |
type: dict |
| 793 |
suboptions: |
| 794 |
enable: |
| 795 |
description: Enable AIGP |
| 796 |
type: bool |
| 797 |
send: |
| 798 |
description: Cost community or MED carrying AIGP VALUE |
| 799 |
type: dict |
| 800 |
suboptions: |
| 801 |
cost_community: |
| 802 |
description: Cost extended community carrying AIGP Value |
| 803 |
type: dict |
| 804 |
suboptions: |
| 805 |
id: |
| 806 |
description: |
| 807 |
- Community ID |
| 808 |
- Please refer vendor documentation for valid values |
| 809 |
type: int |
| 810 |
poi: |
| 811 |
description: Point of Insertion |
| 812 |
type: dict |
| 813 |
suboptions: |
| 814 |
igp_cost: |
| 815 |
description: Point of Insertion After IGP |
| 816 |
type: bool |
| 817 |
pre_bestpath: |
| 818 |
description: Point of Insertion At Beginning |
| 819 |
type: bool |
| 820 |
transitive: |
| 821 |
description: Cost community is Transitive |
| 822 |
type: bool |
| 823 |
med: |
| 824 |
description: Med carrying AIGP Value |
| 825 |
type: bool |
| 826 |
allow_policy: |
| 827 |
description: Enable the policy support for this IBGP Neighbor |
| 828 |
type: bool |
| 829 |
allowas_in: |
| 830 |
description: Accept as-path with my AS present in it |
| 831 |
type: int |
| 832 |
as_override: |
| 833 |
description: |
| 834 |
- Override matching AS-number while sending update |
| 835 |
- Maintain Split Horizon while sending update |
| 836 |
type: bool |
| 837 |
bmp_activate: |
| 838 |
description: Activate the BMP monitoring for a BGP peer |
| 839 |
type: dict |
| 840 |
suboptions: |
| 841 |
all: |
| 842 |
description: Activate BMP monitoring for all servers |
| 843 |
type: bool |
| 844 |
server: |
| 845 |
description: |
| 846 |
- Activate BMP for server |
| 847 |
- BMP Server Number |
| 848 |
- Please refer vendor documentation for valid values |
| 849 |
type: int |
| 850 |
capability: |
| 851 |
description: |
| 852 |
- Advertise capability to the peer |
| 853 |
- Advertise ORF capability to the peer |
| 854 |
- Advertise prefix-list ORF capability to this neighbor |
| 855 |
type: dict |
| 856 |
suboptions: |
| 857 |
both: |
| 858 |
description: Capability to SEND and RECEIVE the ORF to/from this neighbor |
| 859 |
type: bool |
| 860 |
receive: |
| 861 |
description: Capability to RECEIVE the ORF from this neighbor |
| 862 |
type: bool |
| 863 |
send: |
| 864 |
description: Capability to SEND the ORF to this neighbor |
| 865 |
type: bool |
| 866 |
cluster_id: |
| 867 |
description: |
| 868 |
- Configure Route-Reflector Cluster-id (peers may reset) |
| 869 |
- Route-Reflector Cluster-id as 32 bit quantity, or |
| 870 |
Route-Reflector Cluster-id in IP address format (A.B.C.D) |
| 871 |
type: str |
| 872 |
default_originate: |
| 873 |
description: Originate default route to this neighbor |
| 874 |
type: dict |
| 875 |
suboptions: |
| 876 |
set: |
| 877 |
description: Originate default route to this neighbor |
| 878 |
type: bool |
| 879 |
route_map: |
| 880 |
description: Route-map to specify criteria to originate default |
| 881 |
type: str |
| 882 |
description: |
| 883 |
description: Neighbor specific description |
| 884 |
type: str |
| 885 |
disable_connected_check: |
| 886 |
description: one-hop away EBGP peer using loopback address |
| 887 |
type: bool |
| 888 |
distribute_list: |
| 889 |
description: Filter updates to/from this neighbor |
| 890 |
type: dict |
| 891 |
suboptions: |
| 892 |
acl: |
| 893 |
description: IP access list number/name |
| 894 |
type: str |
| 895 |
in: |
| 896 |
description: Filter incoming updates |
| 897 |
type: bool |
| 898 |
out: |
| 899 |
description: Filter outgoing updates |
| 900 |
type: bool |
| 901 |
dmzlink_bw: |
| 902 |
description: Propagate the DMZ link bandwidth |
| 903 |
type: bool |
| 904 |
ebgp_multihop: |
| 905 |
description: Allow EBGP neighbors not on directly connected networks |
| 906 |
type: dict |
| 907 |
suboptions: |
| 908 |
enable: |
| 909 |
description: Allow EBGP neighbors not on directly connected networks |
| 910 |
type: bool |
| 911 |
hop_count: |
| 912 |
description: |
| 913 |
- Maximum hop count |
| 914 |
- Please refer vendor documentation for valid values |
| 915 |
type: int |
| 916 |
fall_over: |
| 917 |
description: Session fall on peer route lost |
| 918 |
type: dict |
| 919 |
suboptions: |
| 920 |
bfd: |
| 921 |
description: Use BFD to detect failure |
| 922 |
type: dict |
| 923 |
suboptions: |
| 924 |
set: |
| 925 |
description: set bfd |
| 926 |
type: bool |
| 927 |
multi_hop: |
| 928 |
description: Force BFD multi-hop to detect failure |
| 929 |
type: bool |
| 930 |
single_hop: |
| 931 |
description: Force BFD single-hop to detect failure |
| 932 |
type: bool |
| 933 |
route_map: |
| 934 |
description: Route map for peer route |
| 935 |
type: str |
| 936 |
filter_list: |
| 937 |
description: Establish BGP filters |
| 938 |
type: dict |
| 939 |
suboptions: |
| 940 |
path_acl: |
| 941 |
description: AS path access list |
| 942 |
type: str |
| 943 |
in: |
| 944 |
description: Filter incoming updates |
| 945 |
type: bool |
| 946 |
out: |
| 947 |
description: Filter outgoing updates |
| 948 |
type: bool |
| 949 |
ha_mode: |
| 950 |
description: high availability mode |
| 951 |
type: dict |
| 952 |
suboptions: |
| 953 |
set: |
| 954 |
description: set ha-mode and graceful-restart for this peer |
| 955 |
type: bool |
| 956 |
disable: |
| 957 |
description: disable graceful-restart |
| 958 |
type: bool |
| 959 |
inherit: |
| 960 |
description: |
| 961 |
- Inherit a template |
| 962 |
- Inherit a peer-session template and Template name |
| 963 |
type: str |
| 964 |
local_as: |
| 965 |
description: Specify a local-as number |
| 966 |
type: dict |
| 967 |
suboptions: |
| 968 |
set: |
| 969 |
description: set local-as number |
| 970 |
type: bool |
| 971 |
number: |
| 972 |
description: |
| 973 |
- AS number used as local AS |
| 974 |
- Please refer vendor documentation for valid values |
| 975 |
type: int |
| 976 |
dual_as: |
| 977 |
description: Accept either real AS or local AS from the ebgp peer |
| 978 |
type: bool |
| 979 |
no_prepend: |
| 980 |
description: Do not prepend local-as to updates from ebgp peers |
| 981 |
type: dict |
| 982 |
suboptions: |
| 983 |
set: |
| 984 |
description: Set prepend |
| 985 |
type: bool |
| 986 |
replace_as: |
| 987 |
description: Replace real AS with local AS in the EBGP updates |
| 988 |
type: bool |
| 989 |
log_neighbor_changes: |
| 990 |
description: Log neighbor up/down and reset reason |
| 991 |
type: dict |
| 992 |
suboptions: |
| 993 |
set: |
| 994 |
description: set Log neighbor up/down and reset |
| 995 |
type: bool |
| 996 |
disable: |
| 997 |
description: disable Log neighbor up/down and reset |
| 998 |
type: bool |
| 999 |
maximum_prefix: |
| 1000 |
description: Maximum number of prefixes accepted from this peer |
| 1001 |
type: dict |
| 1002 |
suboptions: |
| 1003 |
max_no: |
| 1004 |
description: maximum no. of prefix limit |
| 1005 |
type: int |
| 1006 |
threshold_val: |
| 1007 |
description: Threshold value (%) at which to generate a warning msg |
| 1008 |
type: int |
| 1009 |
restart: |
| 1010 |
description: Restart bgp connection after limit is exceeded |
| 1011 |
type: int |
| 1012 |
warning_only: |
| 1013 |
description: Only give warning message when limit is exceeded |
| 1014 |
type: bool |
| 1015 |
next_hop_self: |
| 1016 |
description: Disable the next hop calculation for this neighbor |
| 1017 |
type: dict |
| 1018 |
suboptions: |
| 1019 |
set: |
| 1020 |
description: Enable next-hop-self |
| 1021 |
type: bool |
| 1022 |
all: |
| 1023 |
description: Enable next-hop-self for both eBGP and iBGP received paths |
| 1024 |
type: bool |
| 1025 |
next_hop_unchanged: |
| 1026 |
description: |
| 1027 |
- Propagate next hop unchanged for iBGP paths to this neighbor |
| 1028 |
- Propagate next hop unchanged for all paths (iBGP and eBGP) to this neighbor |
| 1029 |
type: dict |
| 1030 |
suboptions: |
| 1031 |
set: |
| 1032 |
description: Enable next-hop-unchanged |
| 1033 |
type: bool |
| 1034 |
allpaths: |
| 1035 |
description: Propagate next hop unchanged for all paths (iBGP and eBGP) to this neighbor |
| 1036 |
type: bool |
| 1037 |
password_options: |
| 1038 |
description: Set a password with encryption type |
| 1039 |
type: dict |
| 1040 |
suboptions: |
| 1041 |
encryption: |
| 1042 |
description: Encryption type (0 to disable encryption, 7 for proprietary) |
| 1043 |
type: int |
| 1044 |
pass_key: |
| 1045 |
description: The password |
| 1046 |
type: str |
| 1047 |
path_attribute: |
| 1048 |
description: BGP optional attribute filtering |
| 1049 |
type: dict |
| 1050 |
suboptions: |
| 1051 |
discard: |
| 1052 |
description: Discard matching path-attribute for this neighbor |
| 1053 |
type: dict |
| 1054 |
suboptions: |
| 1055 |
type: |
| 1056 |
description: |
| 1057 |
- path attribute type |
| 1058 |
- Please refer vendor documentation for valid values |
| 1059 |
type: int |
| 1060 |
range: |
| 1061 |
description: path attribute range |
| 1062 |
type: dict |
| 1063 |
suboptions: |
| 1064 |
start: |
| 1065 |
description: |
| 1066 |
- path attribute range start value |
| 1067 |
- Please refer vendor documentation for valid values |
| 1068 |
type: int |
| 1069 |
end: |
| 1070 |
description: |
| 1071 |
- path attribute range end value |
| 1072 |
- Please refer vendor documentation for valid values |
| 1073 |
type: int |
| 1074 |
in: |
| 1075 |
description: Perform inbound path-attribute filtering |
| 1076 |
type: bool |
| 1077 |
treat_as_withdraw: |
| 1078 |
description: Treat-as-withdraw matching path-attribute for this neighbor |
| 1079 |
type: dict |
| 1080 |
suboptions: |
| 1081 |
type: |
| 1082 |
description: |
| 1083 |
- path attribute type |
| 1084 |
- Please refer vendor documentation for valid values |
| 1085 |
type: int |
| 1086 |
range: |
| 1087 |
description: path attribute range |
| 1088 |
type: dict |
| 1089 |
suboptions: |
| 1090 |
start: |
| 1091 |
description: |
| 1092 |
- path attribute range start value |
| 1093 |
- Please refer vendor documentation for valid values |
| 1094 |
type: int |
| 1095 |
end: |
| 1096 |
description: |
| 1097 |
- path attribute range end value |
| 1098 |
- Please refer vendor documentation for valid values |
| 1099 |
type: int |
| 1100 |
in: |
| 1101 |
description: Perform inbound path-attribute filtering |
| 1102 |
type: bool |
| 1103 |
peer_group: |
| 1104 |
description: Member of the peer-group |
| 1105 |
type: str |
| 1106 |
remote_as: |
| 1107 |
description: |
| 1108 |
- Specify a BGP neighbor |
| 1109 |
- AS of remote neighbor |
| 1110 |
type: str |
| 1111 |
remove_private_as: |
| 1112 |
description: Remove private AS number from outbound updates |
| 1113 |
type: dict |
| 1114 |
suboptions: |
| 1115 |
set: |
| 1116 |
description: Remove private AS number |
| 1117 |
type: bool |
| 1118 |
all: |
| 1119 |
description: Remove all private AS numbers |
| 1120 |
type: bool |
| 1121 |
replace_as: |
| 1122 |
description: Replace all private AS numbers with local AS |
| 1123 |
type: bool |
| 1124 |
route_maps: |
| 1125 |
description: Apply a list of route maps to neighbor |
| 1126 |
type: list |
| 1127 |
elements: dict |
| 1128 |
suboptions: |
| 1129 |
name: |
| 1130 |
description: Replace all private AS numbers with local AS |
| 1131 |
type: str |
| 1132 |
in: |
| 1133 |
description: Apply map to incoming routes |
| 1134 |
type: bool |
| 1135 |
out: |
| 1136 |
description: Apply map to outbound routes |
| 1137 |
type: bool |
| 1138 |
route_reflector_client: |
| 1139 |
description: Configure a neighbor as Route Reflector client |
| 1140 |
type: bool |
| 1141 |
route_server_client: |
| 1142 |
description: Configure a neighbor as Route Server client |
| 1143 |
type: dict |
| 1144 |
suboptions: |
| 1145 |
set: |
| 1146 |
description: Set Route Server client |
| 1147 |
type: bool |
| 1148 |
context: |
| 1149 |
description: |
| 1150 |
- Specify Route Server context for neighbor |
| 1151 |
- Route Server context name |
| 1152 |
type: str |
| 1153 |
send_community: |
| 1154 |
description: Send Community attribute to this neighbor |
| 1155 |
type: dict |
| 1156 |
suboptions: |
| 1157 |
set: |
| 1158 |
description: Set send Community attribute to this neighbor |
| 1159 |
type: bool |
| 1160 |
both: |
| 1161 |
description: Send Standard and Extended Community attributes |
| 1162 |
type: bool |
| 1163 |
extended: |
| 1164 |
description: Send Extended Community attribute |
| 1165 |
type: bool |
| 1166 |
standard: |
| 1167 |
description: Send Standard Community attribute |
| 1168 |
type: bool |
| 1169 |
send_label: |
| 1170 |
description: Send NLRI + MPLS Label to this peer |
| 1171 |
type: dict |
| 1172 |
suboptions: |
| 1173 |
set: |
| 1174 |
description: Set send NLRI + MPLS Label to this peer |
| 1175 |
type: bool |
| 1176 |
explicit_null: |
| 1177 |
description: Advertise Explicit Null label in place of Implicit Null |
| 1178 |
type: bool |
| 1179 |
shutdown: |
| 1180 |
description: Administratively shut down this neighbor |
| 1181 |
type: dict |
| 1182 |
suboptions: |
| 1183 |
set: |
| 1184 |
description: shut down |
| 1185 |
type: bool |
| 1186 |
graceful: |
| 1187 |
description: |
| 1188 |
- Gracefully shut down this neighbor |
| 1189 |
- time in seconds |
| 1190 |
- Please refer vendor documentation for valid values |
| 1191 |
type: int |
| 1192 |
community: |
| 1193 |
description: Set Community for Gshut routes |
| 1194 |
type: int |
| 1195 |
local_preference: |
| 1196 |
description: Set Local Preference for Gshut routes |
| 1197 |
type: bool |
| 1198 |
slow_peer: |
| 1199 |
description: Configure slow-peer |
| 1200 |
type: dict |
| 1201 |
suboptions: |
| 1202 |
detection: |
| 1203 |
description: Configure slow-peer |
| 1204 |
type: dict |
| 1205 |
suboptions: |
| 1206 |
enable: |
| 1207 |
description: Enable slow-peer detection |
| 1208 |
type: bool |
| 1209 |
disable: |
| 1210 |
description: Disable slow-peer detection |
| 1211 |
type: bool |
| 1212 |
threshold: |
| 1213 |
description: Set the slow-peer detection threshold |
| 1214 |
type: int |
| 1215 |
split_update_group: |
| 1216 |
description: Configure slow-peer split-update-group |
| 1217 |
type: dict |
| 1218 |
suboptions: |
| 1219 |
dynamic: |
| 1220 |
description: Dynamically split the slow peer to slow-update group |
| 1221 |
type: dict |
| 1222 |
suboptions: |
| 1223 |
enable: |
| 1224 |
description: Enable slow-peer detection |
| 1225 |
type: bool |
| 1226 |
disable: |
| 1227 |
description: Disable slow-peer detection |
| 1228 |
type: bool |
| 1229 |
permanent: |
| 1230 |
description: Keep the slow-peer permanently in slow-update group |
| 1231 |
type: bool |
| 1232 |
static: |
| 1233 |
description: Static slow-peer |
| 1234 |
type: bool |
| 1235 |
soft_reconfiguration: |
| 1236 |
description: |
| 1237 |
- Per neighbor soft reconfiguration |
| 1238 |
- Allow inbound soft reconfiguration for this neighbor |
| 1239 |
type: bool |
| 1240 |
timers: |
| 1241 |
description: BGP per neighbor timers |
| 1242 |
type: dict |
| 1243 |
suboptions: |
| 1244 |
interval: |
| 1245 |
description: Keepalive interval |
| 1246 |
type: int |
| 1247 |
holdtime: |
| 1248 |
description: Holdtime |
| 1249 |
type: int |
| 1250 |
min_holdtime: |
| 1251 |
description: Minimum hold time from neighbor |
| 1252 |
type: int |
| 1253 |
translate_update: |
| 1254 |
description: Translate Update to MBGP format |
| 1255 |
type: dict |
| 1256 |
suboptions: |
| 1257 |
set: |
| 1258 |
description: Set Translate Update |
| 1259 |
type: bool |
| 1260 |
nlri: |
| 1261 |
description: Specify type of nlri to translate to |
| 1262 |
type: dict |
| 1263 |
suboptions: |
| 1264 |
multicast: |
| 1265 |
description: Translate Update to multicast nlri |
| 1266 |
type: bool |
| 1267 |
unicast: |
| 1268 |
description: Process Update as unicast nlri |
| 1269 |
type: bool |
| 1270 |
transport: |
| 1271 |
description: Transport options |
| 1272 |
type: dict |
| 1273 |
suboptions: |
| 1274 |
connection_mode: |
| 1275 |
description: Specify passive or active connection |
| 1276 |
type: dict |
| 1277 |
suboptions: |
| 1278 |
active: |
| 1279 |
description: Actively establish the TCP session |
| 1280 |
type: bool |
| 1281 |
passive: |
| 1282 |
description: Passively establish the TCP session |
| 1283 |
type: bool |
| 1284 |
multi_session: |
| 1285 |
description: Use Multi-session for transport |
| 1286 |
type: bool |
| 1287 |
path_mtu_discovery: |
| 1288 |
description: Use transport path MTU discovery |
| 1289 |
type: dict |
| 1290 |
suboptions: |
| 1291 |
set: |
| 1292 |
description: Use path MTU discovery |
| 1293 |
type: bool |
| 1294 |
disable: |
| 1295 |
description: disable |
| 1296 |
type: bool |
| 1297 |
ttl_security: |
| 1298 |
description: |
| 1299 |
- BGP ttl security check |
| 1300 |
- maximum number of hops |
| 1301 |
- Please refer vendor documentation for valid values |
| 1302 |
type: int |
| 1303 |
unsuppress_map: |
| 1304 |
description: |
| 1305 |
- Route-map to selectively un-suppress suppressed routes |
| 1306 |
- Name of route map |
| 1307 |
type: str |
| 1308 |
update_source: |
| 1309 |
description: Source of routing updates |
| 1310 |
type: str |
| 1311 |
version: |
| 1312 |
description: |
| 1313 |
- Set the BGP version to match a neighbor |
| 1314 |
- Neighbor's BGP version |
| 1315 |
- Please refer vendor documentation for valid values |
| 1316 |
type: int |
| 1317 |
weight: |
| 1318 |
description: Set default weight for routes from this neighbor |
| 1319 |
type: int |
| 1320 |
networks: |
| 1321 |
description: Specify a network to announce via BGP |
| 1322 |
type: list |
| 1323 |
elements: dict |
| 1324 |
suboptions: |
| 1325 |
address: |
| 1326 |
description: Specify network address |
| 1327 |
type: str |
| 1328 |
netmask: |
| 1329 |
description: Specify network mask |
| 1330 |
type: str |
| 1331 |
route_map: |
| 1332 |
description: Route-map to modify the attributes |
| 1333 |
type: str |
| 1334 |
backdoor: |
| 1335 |
description: Specify a BGP backdoor route |
| 1336 |
type: bool |
| 1337 |
redistribute: |
| 1338 |
description: Redistribute information from another routing protocol |
| 1339 |
type: list |
| 1340 |
elements: dict |
| 1341 |
suboptions: |
| 1342 |
application: |
| 1343 |
description: Application |
| 1344 |
type: dict |
| 1345 |
suboptions: |
| 1346 |
name: |
| 1347 |
description: Application name |
| 1348 |
type: str |
| 1349 |
metric: |
| 1350 |
description: Metric for redistributed routes |
| 1351 |
type: int |
| 1352 |
route_map: |
| 1353 |
description: Route map reference |
| 1354 |
type: str |
| 1355 |
bgp: |
| 1356 |
description: Border Gateway Protocol (BGP) |
| 1357 |
type: dict |
| 1358 |
suboptions: |
| 1359 |
as_number: |
| 1360 |
description: Autonomous system number |
| 1361 |
type: str |
| 1362 |
metric: |
| 1363 |
description: Metric for redistributed routes |
| 1364 |
type: int |
| 1365 |
route_map: |
| 1366 |
description: Route map reference |
| 1367 |
type: str |
| 1368 |
connected: |
| 1369 |
description: Connected |
| 1370 |
type: dict |
| 1371 |
suboptions: |
| 1372 |
set: |
| 1373 |
description: Set the top level attribute |
| 1374 |
type: bool |
| 1375 |
metric: |
| 1376 |
description: Metric for redistributed routes |
| 1377 |
type: int |
| 1378 |
route_map: |
| 1379 |
description: Route map reference |
| 1380 |
type: str |
| 1381 |
eigrp: |
| 1382 |
description: Enhanced Interior Gateway Routing Protocol (EIGRP) |
| 1383 |
type: dict |
| 1384 |
suboptions: |
| 1385 |
as_number: |
| 1386 |
description: Autonomous system number |
| 1387 |
type: str |
| 1388 |
metric: |
| 1389 |
description: Metric for redistributed routes |
| 1390 |
type: int |
| 1391 |
route_map: |
| 1392 |
description: Route map reference |
| 1393 |
type: str |
| 1394 |
isis: |
| 1395 |
description: ISO IS-IS |
| 1396 |
type: dict |
| 1397 |
suboptions: |
| 1398 |
area_tag: |
| 1399 |
description: ISO routing area tag |
| 1400 |
type: str |
| 1401 |
clns: |
| 1402 |
description: Redistribution of OSI dynamic routes |
| 1403 |
type: bool |
| 1404 |
ip: |
| 1405 |
description: Redistribution of IP dynamic routes |
| 1406 |
type: bool |
| 1407 |
metric: |
| 1408 |
description: Metric for redistributed routes |
| 1409 |
type: int |
| 1410 |
route_map: |
| 1411 |
description: Route map reference |
| 1412 |
type: str |
| 1413 |
iso_igrp: |
| 1414 |
description: IGRP for OSI networks |
| 1415 |
type: dict |
| 1416 |
suboptions: |
| 1417 |
area_tag: |
| 1418 |
description: ISO routing area tag |
| 1419 |
type: str |
| 1420 |
route_map: |
| 1421 |
description: Route map reference |
| 1422 |
type: str |
| 1423 |
lisp: |
| 1424 |
description: Locator ID Separation Protocol (LISP) |
| 1425 |
type: dict |
| 1426 |
suboptions: |
| 1427 |
set: |
| 1428 |
description: Set the top level attribute |
| 1429 |
type: bool |
| 1430 |
metric: |
| 1431 |
description: Metric for redistributed routes |
| 1432 |
type: int |
| 1433 |
route_map: |
| 1434 |
description: Route map reference |
| 1435 |
type: str |
| 1436 |
mobile: |
| 1437 |
description: Mobile routes |
| 1438 |
type: dict |
| 1439 |
suboptions: |
| 1440 |
set: |
| 1441 |
description: Set the top level attribute |
| 1442 |
type: bool |
| 1443 |
metric: |
| 1444 |
description: Metric for redistributed routes |
| 1445 |
type: int |
| 1446 |
route_map: |
| 1447 |
description: Route map reference |
| 1448 |
type: str |
| 1449 |
odr: |
| 1450 |
description: On Demand stub Routes |
| 1451 |
type: dict |
| 1452 |
suboptions: |
| 1453 |
set: |
| 1454 |
description: Set the top level attribute |
| 1455 |
type: bool |
| 1456 |
metric: |
| 1457 |
description: Metric for redistributed routes |
| 1458 |
type: int |
| 1459 |
route_map: |
| 1460 |
description: Route map reference |
| 1461 |
type: str |
| 1462 |
ospf: |
| 1463 |
description: Open Shortest Path First (OSPF) |
| 1464 |
type: dict |
| 1465 |
suboptions: |
| 1466 |
process_id: |
| 1467 |
description: Process ID |
| 1468 |
type: int |
| 1469 |
match: |
| 1470 |
description: On Demand stub Routes |
| 1471 |
type: dict |
| 1472 |
suboptions: |
| 1473 |
external: |
| 1474 |
description: Redistribute OSPF external routes |
| 1475 |
type: bool |
| 1476 |
internal: |
| 1477 |
description: Redistribute OSPF internal routes |
| 1478 |
type: bool |
| 1479 |
nssa_external: |
| 1480 |
description: Redistribute OSPF NSSA external routes |
| 1481 |
type: bool |
| 1482 |
type_1: |
| 1483 |
description: Redistribute NSSA external type 1 routes |
| 1484 |
type: bool |
| 1485 |
type_2: |
| 1486 |
description: Redistribute NSSA external type 2 routes |
| 1487 |
type: bool |
| 1488 |
metric: |
| 1489 |
description: Metric for redistributed routes |
| 1490 |
type: int |
| 1491 |
route_map: |
| 1492 |
description: Route map reference |
| 1493 |
type: str |
| 1494 |
vrf: |
| 1495 |
description: VPN Routing/Forwarding Instance |
| 1496 |
type: str |
| 1497 |
ospfv3: |
| 1498 |
description: OSPFv3 |
| 1499 |
type: dict |
| 1500 |
suboptions: |
| 1501 |
process_id: |
| 1502 |
description: Process ID |
| 1503 |
type: int |
| 1504 |
match: |
| 1505 |
description: On Demand stub Routes |
| 1506 |
type: dict |
| 1507 |
suboptions: |
| 1508 |
external: |
| 1509 |
description: Redistribute OSPF external routes |
| 1510 |
type: bool |
| 1511 |
internal: |
| 1512 |
description: Redistribute OSPF internal routes |
| 1513 |
type: bool |
| 1514 |
nssa_external: |
| 1515 |
description: Redistribute OSPF NSSA external routes |
| 1516 |
type: bool |
| 1517 |
type_1: |
| 1518 |
description: Redistribute NSSA external type 1 routes |
| 1519 |
type: bool |
| 1520 |
type_2: |
| 1521 |
description: Redistribute NSSA external type 2 routes |
| 1522 |
type: bool |
| 1523 |
metric: |
| 1524 |
description: Metric for redistributed routes |
| 1525 |
type: int |
| 1526 |
route_map: |
| 1527 |
description: Route map reference |
| 1528 |
type: str |
| 1529 |
rip: |
| 1530 |
description: Routing Information Protocol (RIP) |
| 1531 |
type: dict |
| 1532 |
suboptions: |
| 1533 |
set: |
| 1534 |
description: Set the top level attribute |
| 1535 |
type: bool |
| 1536 |
metric: |
| 1537 |
description: Metric for redistributed routes |
| 1538 |
type: int |
| 1539 |
route_map: |
| 1540 |
description: Route map reference |
| 1541 |
type: str |
| 1542 |
static: |
| 1543 |
description: Static routes |
| 1544 |
type: dict |
| 1545 |
suboptions: |
| 1546 |
set: |
| 1547 |
description: Set the top level attribute |
| 1548 |
type: bool |
| 1549 |
clns: |
| 1550 |
description: Redistribution of OSI static routes |
| 1551 |
type: bool |
| 1552 |
ip: |
| 1553 |
description: Redistribution of IP static routes |
| 1554 |
type: bool |
| 1555 |
metric: |
| 1556 |
description: Metric for redistributed routes |
| 1557 |
type: int |
| 1558 |
route_map: |
| 1559 |
description: Route map reference |
| 1560 |
type: str |
| 1561 |
vrf: |
| 1562 |
description: Specify a source VRF |
| 1563 |
type: dict |
| 1564 |
suboptions: |
| 1565 |
name: |
| 1566 |
description: Source VRF name |
| 1567 |
type: str |
| 1568 |
global: |
| 1569 |
description: global VRF |
| 1570 |
type: bool |
| 1571 |
synchronization: |
| 1572 |
description: Perform IGP synchronization |
| 1573 |
type: bool |
| 1574 |
table_map: |
| 1575 |
description: Map external entry attributes into routing table |
| 1576 |
type: dict |
| 1577 |
suboptions: |
| 1578 |
name: |
| 1579 |
description: route-map name |
| 1580 |
type: str |
| 1581 |
filter: |
| 1582 |
description: Selective route download |
| 1583 |
type: bool |
| 1584 |
template: |
| 1585 |
description: |
| 1586 |
- Enter template command mode |
| 1587 |
type: dict |
| 1588 |
suboptions: |
| 1589 |
peer_policy: |
| 1590 |
description: Template configuration for policy parameters |
| 1591 |
type: str |
| 1592 |
peer_session: |
| 1593 |
description: Template configuration for session parameters |
| 1594 |
type: str |
| 1595 |
timers: |
| 1596 |
description: |
| 1597 |
- Adjust routing timers |
| 1598 |
- BGP timers |
| 1599 |
type: dict |
| 1600 |
suboptions: |
| 1601 |
keepalive: |
| 1602 |
description: Keepalive interval |
| 1603 |
type: int |
| 1604 |
holdtime: |
| 1605 |
description: Holdtime |
| 1606 |
type: int |
| 1607 |
min_holdtime: |
| 1608 |
description: Minimum hold time from neighbor |
| 1609 |
type: int |
| 1610 |
running_config: |
| 1611 |
description: |
| 1612 |
- This option is used only with state I(parsed). |
| 1613 |
- The value of this option should be the output received from the IOS |
| 1614 |
device by executing the command B(sh running-config | section ^router bgp). |
| 1615 |
- The state I(parsed) reads the configuration from C(running_config) |
| 1616 |
option and transforms it into Ansible structured data as per the |
| 1617 |
resource module's argspec and the value is then returned in the |
| 1618 |
I(parsed) key within the result. |
| 1619 |
type: str |
| 1620 |
state: |
| 1621 |
choices: |
| 1622 |
- merged |
| 1623 |
- replaced |
| 1624 |
- overridden |
| 1625 |
- deleted |
| 1626 |
- purged |
| 1627 |
- gathered |
| 1628 |
- rendered |
| 1629 |
- parsed |
| 1630 |
default: merged |
| 1631 |
description: |
| 1632 |
- The state the configuration should be left in |
| 1633 |
- The module have declaratively similar behavior for replaced and overridden state. |
| 1634 |
- The states I(rendered), I(gathered) and I(parsed) does not perform any change |
| 1635 |
on the device. |
| 1636 |
- The state I(rendered) will transform the configuration in C(config) option to |
| 1637 |
platform specific CLI commands which will be returned in the I(rendered) key |
| 1638 |
within the result. For state I(rendered) active connection to remote host is |
| 1639 |
not required. |
| 1640 |
- The state I(gathered) will fetch the running configuration from device and transform |
| 1641 |
it into structured data in the format as per the resource module argspec and |
| 1642 |
the value is returned in the I(gathered) key within the result. |
| 1643 |
- The state I(parsed) reads the configuration from C(running_config) option and |
| 1644 |
transforms it into JSON format as per the resource module parameters and the |
| 1645 |
value is returned in the I(parsed) key within the result. The value of C(running_config) |
| 1646 |
option should be the same format as the output of command I(show running-config |
| 1647 |
| section ^router bgp) executed on device. For state I(parsed) active |
| 1648 |
connection to remote host is not required. |
| 1649 |
type: str |
| 1650 |
""" |
| 1651 |
|
| 1652 |
EXAMPLES = """ |
| 1653 |
# Using merged |
| 1654 |
|
| 1655 |
# Before state: |
| 1656 |
# ------------- |
| 1657 |
# |
| 1658 |
# vios#sh running-config | section ^router bgp |
| 1659 |
|
| 1660 |
- name: Merge provided configuration with device configuration |
| 1661 |
cisco.ios.ios_bgp_global: |
| 1662 |
config: |
| 1663 |
as_number: 65000 |
| 1664 |
bgp: |
| 1665 |
advertise_best_external: true |
| 1666 |
bestpath_options: |
| 1667 |
compare_routerid: true |
| 1668 |
dampening: |
| 1669 |
penalty_half_time: 1 |
| 1670 |
reuse_route_val: 1 |
| 1671 |
suppress_route_val: 1 |
| 1672 |
max_suppress: 1 |
| 1673 |
default: |
| 1674 |
ipv4_unicast: false |
| 1675 |
route_target: |
| 1676 |
filter: true |
| 1677 |
graceful_shutdown: |
| 1678 |
neighbors: |
| 1679 |
time: 50 |
| 1680 |
community: 100 |
| 1681 |
local_preference: 100 |
| 1682 |
log_neighbor_changes: true |
| 1683 |
nopeerup_delay_options: |
| 1684 |
post_boot: 10 |
| 1685 |
networks: |
| 1686 |
- address: 192.0.2.3 |
| 1687 |
- address: 192.0.2.2 |
| 1688 |
neighbors: |
| 1689 |
- neighbor_address: 192.0.2.1 |
| 1690 |
description: merge neighbor |
| 1691 |
remote_as: 100 |
| 1692 |
aigp: |
| 1693 |
send: |
| 1694 |
cost_community: |
| 1695 |
id: 100 |
| 1696 |
poi: |
| 1697 |
igp_cost: true |
| 1698 |
transitive: true |
| 1699 |
route_maps: |
| 1700 |
- name: test-route |
| 1701 |
out: true |
| 1702 |
redistribute: |
| 1703 |
- connected: |
| 1704 |
metric: 10 |
| 1705 |
timers: |
| 1706 |
keepalive: 100 |
| 1707 |
holdtime: 200 |
| 1708 |
min_holdtime: 150 |
| 1709 |
state: merged |
| 1710 |
|
| 1711 |
# Task Output: |
| 1712 |
# ------------ |
| 1713 |
# |
| 1714 |
# before: {} |
| 1715 |
# commands: |
| 1716 |
# - router bgp 65000 |
| 1717 |
# - timers bgp 100 200 150 |
| 1718 |
# - bgp advertise-best-external |
| 1719 |
# - bgp bestpath compare-routerid |
| 1720 |
# - no bgp default ipv4-unicast |
| 1721 |
# - bgp dampening 1 1 1 1 |
| 1722 |
# - bgp graceful-shutdown all neighbors 50 local-preference 100 community 100 |
| 1723 |
# - bgp log-neighbor-changes |
| 1724 |
# - bgp nopeerup-delay post-boot 10 |
| 1725 |
# - network 192.0.2.3 |
| 1726 |
# - network 192.0.2.2 |
| 1727 |
# - neighbor 192.0.2.1 remote-as 100 |
| 1728 |
# - neighbor 192.0.2.1 description merge neighbor |
| 1729 |
# - neighbor 192.0.2.1 aigp send cost-community 100 poi igp-cost transitive |
| 1730 |
# - neighbor 192.0.2.1 route-map test-route out |
| 1731 |
# - redistribute connected metric 10 |
| 1732 |
# after: |
| 1733 |
# as_number: '65000' |
| 1734 |
# bgp: |
| 1735 |
# advertise_best_external: true |
| 1736 |
# bestpath_options: |
| 1737 |
# compare_routerid: true |
| 1738 |
# dampening: |
| 1739 |
# max_suppress: 1 |
| 1740 |
# penalty_half_time: 1 |
| 1741 |
# reuse_route_val: 1 |
| 1742 |
# suppress_route_val: 1 |
| 1743 |
# default: |
| 1744 |
# ipv4_unicast: false |
| 1745 |
# route_target: |
| 1746 |
# filter: true |
| 1747 |
# graceful_shutdown: |
| 1748 |
# community: '100' |
| 1749 |
# local_preference: 100 |
| 1750 |
# neighbors: |
| 1751 |
# time: 50 |
| 1752 |
# log_neighbor_changes: true |
| 1753 |
# nopeerup_delay_options: |
| 1754 |
# post_boot: 10 |
| 1755 |
# neighbors: |
| 1756 |
# - aigp: |
| 1757 |
# send: |
| 1758 |
# cost_community: |
| 1759 |
# id: 100 |
| 1760 |
# poi: |
| 1761 |
# igp_cost: true |
| 1762 |
# transitive: true |
| 1763 |
# description: merge neighbor |
| 1764 |
# neighbor_address: 192.0.2.1 |
| 1765 |
# remote_as: '100' |
| 1766 |
# route_maps: |
| 1767 |
# - name: test-route |
| 1768 |
# out: true |
| 1769 |
# networks: |
| 1770 |
# - address: 192.0.2.2 |
| 1771 |
# - address: 192.0.2.3 |
| 1772 |
# redistribute: |
| 1773 |
# - connected: |
| 1774 |
# metric: 10 |
| 1775 |
# set: true |
| 1776 |
# timers: |
| 1777 |
# holdtime: 200 |
| 1778 |
# keepalive: 100 |
| 1779 |
# min_holdtime: 150 |
| 1780 |
|
| 1781 |
# After state: |
| 1782 |
# ------------ |
| 1783 |
# |
| 1784 |
# vios#sh running-config | section ^router bgp |
| 1785 |
# router bgp 65000 |
| 1786 |
# no bgp default ipv4-unicast |
| 1787 |
# bgp log-neighbor-changes |
| 1788 |
# bgp nopeerup-delay post-boot 10 |
| 1789 |
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100 |
| 1790 |
# bgp bestpath compare-routerid |
| 1791 |
# bgp dampening 1 1 1 1 |
| 1792 |
# bgp advertise-best-external |
| 1793 |
# network 192.0.2.2 |
| 1794 |
# network 192.0.2.3 |
| 1795 |
# timers bgp 100 200 150 |
| 1796 |
# redistribute connected metric 10 |
| 1797 |
# neighbor 192.0.2.1 remote-as 100 |
| 1798 |
# neighbor 192.0.2.1 description merge neighbor |
| 1799 |
# neighbor 192.0.2.1 aigp send cost-community 100 poi igp-cost transitive |
| 1800 |
# neighbor 192.0.2.1 route-map test-route out |
| 1801 |
|
| 1802 |
# Using replaced |
| 1803 |
|
| 1804 |
# Before state: |
| 1805 |
# ------------- |
| 1806 |
# |
| 1807 |
# vios#sh running-config | section ^router bgp |
| 1808 |
# router bgp 65000 |
| 1809 |
# bgp nopeerup-delay post-boot 10 |
| 1810 |
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100 |
| 1811 |
# bgp bestpath compare-routerid |
| 1812 |
# bgp dampening 1 1 1 1 |
| 1813 |
# network 192.0.2.2 |
| 1814 |
# network 192.0.2.3 |
| 1815 |
# bgp advertise-best-external |
| 1816 |
# neighbor 198.0.2.1 remote-as 100 |
| 1817 |
# neighbor 198.0.2.1 description merge neighbor |
| 1818 |
# neighbor 198.0.2.1 aigp send cost-community 100 poi igp-cost transitive |
| 1819 |
# neighbor 198.0.2.1 route-map test-route out |
| 1820 |
|
| 1821 |
- name: Replaces device configuration of listed global BGP with provided configuration |
| 1822 |
cisco.ios.ios_bgp_global: |
| 1823 |
config: |
| 1824 |
as_number: 65000 |
| 1825 |
bgp: |
| 1826 |
advertise_best_external: true |
| 1827 |
bestpath_options: |
| 1828 |
med: |
| 1829 |
confed: true |
| 1830 |
log_neighbor_changes: true |
| 1831 |
nopeerup_delay_options: |
| 1832 |
post_boot: 10 |
| 1833 |
cold_boot: 20 |
| 1834 |
networks: |
| 1835 |
- address: 192.0.2.4 |
| 1836 |
neighbors: |
| 1837 |
- neighbor_address: 192.0.2.5 |
| 1838 |
description: replace neighbor |
| 1839 |
remote_as: 100 |
| 1840 |
slow_peer: |
| 1841 |
detection: |
| 1842 |
disable: true |
| 1843 |
state: replaced |
| 1844 |
|
| 1845 |
# Task Output: |
| 1846 |
# ------------ |
| 1847 |
# |
| 1848 |
# before: |
| 1849 |
# as_number: '65000' |
| 1850 |
# bgp: |
| 1851 |
# advertise_best_external: true |
| 1852 |
# bestpath_options: |
| 1853 |
# compare_routerid: true |
| 1854 |
# dampening: |
| 1855 |
# max_suppress: 1 |
| 1856 |
# penalty_half_time: 1 |
| 1857 |
# reuse_route_val: 1 |
| 1858 |
# suppress_route_val: 1 |
| 1859 |
# default: |
| 1860 |
# ipv4_unicast: true |
| 1861 |
# route_target: |
| 1862 |
# filter: true |
| 1863 |
# graceful_shutdown: |
| 1864 |
# community: '100' |
| 1865 |
# local_preference: 100 |
| 1866 |
# neighbors: |
| 1867 |
# time: 50 |
| 1868 |
# log_neighbor_changes: true |
| 1869 |
# nopeerup_delay_options: |
| 1870 |
# post_boot: 10 |
| 1871 |
# neighbors: |
| 1872 |
# - aigp: |
| 1873 |
# send: |
| 1874 |
# cost_community: |
| 1875 |
# id: 100 |
| 1876 |
# poi: |
| 1877 |
# igp_cost: true |
| 1878 |
# transitive: true |
| 1879 |
# description: merge neighbor |
| 1880 |
# neighbor_address: 198.0.2.1 |
| 1881 |
# remote_as: '100' |
| 1882 |
# route_maps: |
| 1883 |
# - name: test-route |
| 1884 |
# out: true |
| 1885 |
# networks: |
| 1886 |
# - address: 192.0.2.2 |
| 1887 |
# - address: 192.0.2.3 |
| 1888 |
# |
| 1889 |
# commands: |
| 1890 |
# - router bgp 65000 |
| 1891 |
# - no bgp bestpath compare-routerid |
| 1892 |
# - bgp bestpath med confed |
| 1893 |
# - no bgp dampening 1 1 1 1 |
| 1894 |
# - no bgp graceful-shutdown all neighbors 50 local-preference 100 community 100 |
| 1895 |
# - bgp nopeerup-delay cold-boot 20 |
| 1896 |
# - network 192.0.2.4 |
| 1897 |
# - no network 192.0.2.2 |
| 1898 |
# - no network 192.0.2.3 |
| 1899 |
# - neighbor 192.0.2.5 remote-as 100 |
| 1900 |
# - neighbor 192.0.2.5 description replace neighbor |
| 1901 |
# - neighbor 192.0.2.5 slow-peer detection disable |
| 1902 |
# - no neighbor 198.0.2.1 |
| 1903 |
# after: |
| 1904 |
# as_number: '65000' |
| 1905 |
# bgp: |
| 1906 |
# advertise_best_external: true |
| 1907 |
# bestpath_options: |
| 1908 |
# med: |
| 1909 |
# confed: true |
| 1910 |
# default: |
| 1911 |
# ipv4_unicast: true |
| 1912 |
# route_target: |
| 1913 |
# filter: true |
| 1914 |
# log_neighbor_changes: true |
| 1915 |
# nopeerup_delay_options: |
| 1916 |
# cold_boot: 20 |
| 1917 |
# post_boot: 10 |
| 1918 |
# neighbors: |
| 1919 |
# - description: replace neighbor |
| 1920 |
# neighbor_address: 192.0.2.5 |
| 1921 |
# remote_as: '100' |
| 1922 |
# slow_peer: |
| 1923 |
# detection: |
| 1924 |
# disable: true |
| 1925 |
# networks: |
| 1926 |
# - address: 192.0.2.4 |
| 1927 |
|
| 1928 |
# After state: |
| 1929 |
# ------------- |
| 1930 |
# |
| 1931 |
# vios#sh running-config | section ^router bgp |
| 1932 |
# router bgp 65000 |
| 1933 |
# bgp log-neighbor-changes |
| 1934 |
# bgp nopeerup-delay cold-boot 20 |
| 1935 |
# bgp nopeerup-delay post-boot 10 |
| 1936 |
# bgp bestpath med confed |
| 1937 |
# bgp advertise-best-external |
| 1938 |
# network 192.0.2.4 |
| 1939 |
# neighbor 192.0.2.5 remote-as 100 |
| 1940 |
# neighbor 192.0.2.5 description replace neighbor |
| 1941 |
# neighbor 192.0.2.5 slow-peer detection disable |
| 1942 |
|
| 1943 |
# Using Deleted |
| 1944 |
|
| 1945 |
# Before state: |
| 1946 |
# ------------- |
| 1947 |
# |
| 1948 |
# vios#sh running-config | section ^router bgp |
| 1949 |
# router bgp 65000 |
| 1950 |
# bgp nopeerup-delay post-boot 10 |
| 1951 |
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100 |
| 1952 |
# bgp bestpath compare-routerid |
| 1953 |
# bgp dampening 1 1 1 1 |
| 1954 |
# bgp advertise-best-external |
| 1955 |
# neighbor 192.0.2.1 remote-as 100 |
| 1956 |
# neighbor 192.0.2.1 description merge neighbor |
| 1957 |
# neighbor 192.0.2.1 aigp send cost-community 100 poi igp-cost transitive |
| 1958 |
# neighbor 192.0.2.1 route-map test-route out |
| 1959 |
|
| 1960 |
- name: "Delete global BGP (Note: This won't delete the configured global BGP)" |
| 1961 |
cisco.ios.ios_bgp_global: |
| 1962 |
config: |
| 1963 |
as_number: 65000 |
| 1964 |
state: deleted |
| 1965 |
|
| 1966 |
# Task Output: |
| 1967 |
# ------------ |
| 1968 |
# |
| 1969 |
# before: |
| 1970 |
# as_number: '65000' |
| 1971 |
# bgp: |
| 1972 |
# advertise_best_external: true |
| 1973 |
# bestpath_options: |
| 1974 |
# compare_routerid: true |
| 1975 |
# dampening: |
| 1976 |
# max_suppress: 1 |
| 1977 |
# penalty_half_time: 1 |
| 1978 |
# reuse_route_val: 1 |
| 1979 |
# suppress_route_val: 1 |
| 1980 |
# default: |
| 1981 |
# ipv4_unicast: true |
| 1982 |
# route_target: |
| 1983 |
# filter: true |
| 1984 |
# graceful_shutdown: |
| 1985 |
# community: '100' |
| 1986 |
# local_preference: 100 |
| 1987 |
# neighbors: |
| 1988 |
# time: 50 |
| 1989 |
# log_neighbor_changes: true |
| 1990 |
# nopeerup_delay_options: |
| 1991 |
# post_boot: 10 |
| 1992 |
# neighbors: |
| 1993 |
# - aigp: |
| 1994 |
# send: |
| 1995 |
# cost_community: |
| 1996 |
# id: 100 |
| 1997 |
# poi: |
| 1998 |
# igp_cost: true |
| 1999 |
# transitive: true |
| 2000 |
# description: merge neighbor |
| 2001 |
# neighbor_address: 192.0.2.1 |
| 2002 |
# remote_as: '100' |
| 2003 |
# route_maps: |
| 2004 |
# - name: test-route |
| 2005 |
# out: true |
| 2006 |
# commands: |
| 2007 |
# - router bgp 65000 |
| 2008 |
# - no bgp advertise-best-external |
| 2009 |
# - no bgp bestpath compare-routerid |
| 2010 |
# - no bgp dampening 1 1 1 1 |
| 2011 |
# - no bgp graceful-shutdown all neighbors 50 local-preference 100 community 100 |
| 2012 |
# - no bgp log-neighbor-changes |
| 2013 |
# - no bgp nopeerup-delay post-boot 10 |
| 2014 |
# - no neighbor 192.0.2.1 |
| 2015 |
# after: |
| 2016 |
# as_number: '65000' |
| 2017 |
|
| 2018 |
# After state: |
| 2019 |
# ------------- |
| 2020 |
# |
| 2021 |
# vios#sh running-config | section ^router bgp |
| 2022 |
# router bgp 65000 |
| 2023 |
|
| 2024 |
# Using Deleted without any config passed |
| 2025 |
|
| 2026 |
# Before state: |
| 2027 |
# ------------- |
| 2028 |
# |
| 2029 |
# vios#sh running-config | section ^router bgp |
| 2030 |
# router bgp 65000 |
| 2031 |
# bgp nopeerup-delay post-boot 10 |
| 2032 |
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100 |
| 2033 |
# bgp bestpath compare-routerid |
| 2034 |
# bgp dampening 1 1 1 1 |
| 2035 |
# bgp advertise-best-external |
| 2036 |
# neighbor 192.0.2.1 remote-as 100 |
| 2037 |
# neighbor 192.0.2.1 description merge neighbor |
| 2038 |
# neighbor 192.0.2.1 aigp send cost-community 100 poi igp-cost transitive |
| 2039 |
# neighbor 192.0.2.1 route-map test-route out |
| 2040 |
|
| 2041 |
- name: Delete global BGP without config |
| 2042 |
cisco.ios.ios_bgp_global: |
| 2043 |
state: deleted |
| 2044 |
|
| 2045 |
# Task Output: |
| 2046 |
# ------------ |
| 2047 |
# |
| 2048 |
# before: |
| 2049 |
# as_number: '65000' |
| 2050 |
# bgp: |
| 2051 |
# advertise_best_external: true |
| 2052 |
# bestpath_options: |
| 2053 |
# compare_routerid: true |
| 2054 |
# dampening: |
| 2055 |
# max_suppress: 1 |
| 2056 |
# penalty_half_time: 1 |
| 2057 |
# reuse_route_val: 1 |
| 2058 |
# suppress_route_val: 1 |
| 2059 |
# default: |
| 2060 |
# ipv4_unicast: true |
| 2061 |
# route_target: |
| 2062 |
# filter: true |
| 2063 |
# graceful_shutdown: |
| 2064 |
# community: '100' |
| 2065 |
# local_preference: 100 |
| 2066 |
# neighbors: |
| 2067 |
# time: 50 |
| 2068 |
# log_neighbor_changes: true |
| 2069 |
# nopeerup_delay_options: |
| 2070 |
# post_boot: 10 |
| 2071 |
# neighbors: |
| 2072 |
# - aigp: |
| 2073 |
# send: |
| 2074 |
# cost_community: |
| 2075 |
# id: 100 |
| 2076 |
# poi: |
| 2077 |
# igp_cost: true |
| 2078 |
# transitive: true |
| 2079 |
# description: merge neighbor |
| 2080 |
# neighbor_address: 192.0.2.1 |
| 2081 |
# remote_as: '100' |
| 2082 |
# route_maps: |
| 2083 |
# - name: test-route |
| 2084 |
# out: true |
| 2085 |
# commands: |
| 2086 |
# - router bgp 65000 |
| 2087 |
# - no bgp advertise-best-external |
| 2088 |
# - no bgp bestpath compare-routerid |
| 2089 |
# - no bgp dampening 1 1 1 1 |
| 2090 |
# - no bgp graceful-shutdown all neighbors 50 local-preference 100 community 100 |
| 2091 |
# - no bgp nopeerup-delay post-boot 10 |
| 2092 |
# - no neighbor 198.51.100.1 |
| 2093 |
# after: |
| 2094 |
# as_number: '65000' |
| 2095 |
|
| 2096 |
# After state: |
| 2097 |
# ------------- |
| 2098 |
# |
| 2099 |
# vios#sh running-config | section ^router bgp |
| 2100 |
# router bgp 65000 |
| 2101 |
|
| 2102 |
# Using purged - would delete all configuration |
| 2103 |
|
| 2104 |
# Before state: |
| 2105 |
# ------------- |
| 2106 |
# |
| 2107 |
# vios#sh running-config | section ^router bgp |
| 2108 |
# router bgp 65000 |
| 2109 |
# bgp nopeerup-delay post-boot 10 |
| 2110 |
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100 |
| 2111 |
# bgp bestpath compare-routerid |
| 2112 |
# bgp dampening 1 1 1 1 |
| 2113 |
# bgp advertise-best-external |
| 2114 |
# neighbor 192.0.2.1 remote-as 100 |
| 2115 |
# neighbor 192.0.2.1 description merge neighbor |
| 2116 |
# neighbor 192.0.2.1 aigp send cost-community 100 poi igp-cost transitive |
| 2117 |
# neighbor 192.0.2.1 route-map test-route out |
| 2118 |
|
| 2119 |
- name: |
| 2120 |
"Delete the configured global BGP (Note: This WILL delete the the configured |
| 2121 |
global BGP)" |
| 2122 |
cisco.ios.ios_bgp_global: |
| 2123 |
state: purged |
| 2124 |
|
| 2125 |
# Task Output: |
| 2126 |
# ------------ |
| 2127 |
# |
| 2128 |
# before: |
| 2129 |
# as_number: '65000' |
| 2130 |
# bgp: |
| 2131 |
# advertise_best_external: true |
| 2132 |
# bestpath_options: |
| 2133 |
# compare_routerid: true |
| 2134 |
# default: |
| 2135 |
# ipv4_unicast: true |
| 2136 |
# route_target: |
| 2137 |
# filter: true |
| 2138 |
# dampening: |
| 2139 |
# max_suppress: 1 |
| 2140 |
# penalty_half_time: 1 |
| 2141 |
# reuse_route_val: 1 |
| 2142 |
# suppress_route_val: 1 |
| 2143 |
# graceful_shutdown: |
| 2144 |
# community: '100' |
| 2145 |
# local_preference: 100 |
| 2146 |
# neighbors: |
| 2147 |
# time: 50 |
| 2148 |
# log_neighbor_changes: true |
| 2149 |
# nopeerup_delay_options: |
| 2150 |
# post_boot: 10 |
| 2151 |
# neighbors: |
| 2152 |
# - aigp: |
| 2153 |
# send: |
| 2154 |
# cost_community: |
| 2155 |
# id: 100 |
| 2156 |
# poi: |
| 2157 |
# igp_cost: true |
| 2158 |
# transitive: true |
| 2159 |
# description: merge neighbor |
| 2160 |
# neighbor_address: 192.0.2.1 |
| 2161 |
# remote_as: '100' |
| 2162 |
# route_maps: |
| 2163 |
# - name: test-route |
| 2164 |
# out: true |
| 2165 |
# commands: |
| 2166 |
# - no router bgp 65000 |
| 2167 |
# after: {} |
| 2168 |
|
| 2169 |
# After state: |
| 2170 |
# ------------- |
| 2171 |
# |
| 2172 |
# vios#sh running-config | section ^router bgp |
| 2173 |
|
| 2174 |
# Using gathered |
| 2175 |
|
| 2176 |
# Before state: |
| 2177 |
# ------------- |
| 2178 |
# |
| 2179 |
# vios#sh running-config | section ^router bgp |
| 2180 |
# router bgp 65000 |
| 2181 |
# bgp log-neighbor-changes |
| 2182 |
# bgp nopeerup-delay post-boot 10 |
| 2183 |
# bgp graceful-shutdown all neighbors 50 local-preference 100 community 100 |
| 2184 |
# bgp bestpath compare-routerid |
| 2185 |
# bgp dampening 1 1 1 1 |
| 2186 |
# bgp advertise-best-external |
| 2187 |
# network 192.0.2.3 |
| 2188 |
# timers bgp 100 200 150 |
| 2189 |
# redistribute connected metric 10 |
| 2190 |
# neighbor 192.0.2.1 remote-as 100 |
| 2191 |
# neighbor 192.0.2.1 description merge neighbor |
| 2192 |
# neighbor 192.0.2.1 aigp send cost-community 100 poi igp-cost transitive |
| 2193 |
# neighbor 192.0.2.1 route-map test-route out |
| 2194 |
|
| 2195 |
- name: Gather facts for bgp_global |
| 2196 |
cisco.ios.ios_bgp_global: |
| 2197 |
config: |
| 2198 |
state: gathered |
| 2199 |
|
| 2200 |
# Task Output: |
| 2201 |
# ------------ |
| 2202 |
# |
| 2203 |
# gathered: |
| 2204 |
# as_number: '65000' |
| 2205 |
# bgp: |
| 2206 |
# advertise_best_external: true |
| 2207 |
# bestpath_options: |
| 2208 |
# compare_routerid: true |
| 2209 |
# dampening: |
| 2210 |
# max_suppress: 1 |
| 2211 |
# penalty_half_time: 1 |
| 2212 |
# reuse_route_val: 1 |
| 2213 |
# suppress_route_val: 1 |
| 2214 |
# default: |
| 2215 |
# ipv4_unicast: true |
| 2216 |
# route_target: |
| 2217 |
# filter: true |
| 2218 |
# graceful_shutdown: |
| 2219 |
# community: '100' |
| 2220 |
# local_preference: 100 |
| 2221 |
# neighbors: |
| 2222 |
# time: 50 |
| 2223 |
# log_neighbor_changes: true |
| 2224 |
# nopeerup_delay_options: |
| 2225 |
# post_boot: 10 |
| 2226 |
# neighbors: |
| 2227 |
# - aigp: |
| 2228 |
# send: |
| 2229 |
# cost_community: |
| 2230 |
# id: 100 |
| 2231 |
# poi: |
| 2232 |
# igp_cost: true |
| 2233 |
# transitive: true |
| 2234 |
# description: merge neighbor |
| 2235 |
# neighbor_address: 192.0.2.1 |
| 2236 |
# remote_as: '100' |
| 2237 |
# route_maps: |
| 2238 |
# - name: test-route |
| 2239 |
# out: true |
| 2240 |
# networks: |
| 2241 |
# - address: 192.0.2.3 |
| 2242 |
# redistribute: |
| 2243 |
# - connected: |
| 2244 |
# metric: 10 |
| 2245 |
# set: true |
| 2246 |
# timers: |
| 2247 |
# holdtime: 200 |
| 2248 |
# keepalive: 100 |
| 2249 |
# min_holdtime: 150 |
| 2250 |
|
| 2251 |
# Using Rendered |
| 2252 |
|
| 2253 |
- name: Rendered the provided configuration with the existing running configuration |
| 2254 |
cisco.ios.ios_bgp_global: |
| 2255 |
config: |
| 2256 |
aggregate_addresses: |
| 2257 |
- address: 192.0.2.1 |
| 2258 |
attribute_map: testMap1 |
| 2259 |
netmask: 255.255.255.0 |
| 2260 |
summary_only: true |
| 2261 |
- address: 192.0.2.2 |
| 2262 |
as_set: true |
| 2263 |
netmask: 255.255.255.0 |
| 2264 |
- address: 192.0.2.3 |
| 2265 |
as_set: true |
| 2266 |
netmask: 255.255.255.0 |
| 2267 |
as_number: "65000" |
| 2268 |
auto_summary: true |
| 2269 |
bgp: |
| 2270 |
additional_paths: |
| 2271 |
install: true |
| 2272 |
receive: true |
| 2273 |
aggregate_timer: 0 |
| 2274 |
always_compare_med: true |
| 2275 |
asnotation: true |
| 2276 |
bestpath_options: |
| 2277 |
aigp: true |
| 2278 |
compare_routerid: true |
| 2279 |
med: |
| 2280 |
confed: true |
| 2281 |
missing_as_worst: true |
| 2282 |
confederation: |
| 2283 |
identifier: "22" |
| 2284 |
consistency_checker: |
| 2285 |
error_message: |
| 2286 |
interval: 10 |
| 2287 |
set: true |
| 2288 |
dampening: |
| 2289 |
route_map: routeMap1Test |
| 2290 |
deterministic_med: true |
| 2291 |
graceful_restart: |
| 2292 |
restart_time: 2 |
| 2293 |
stalepath_time: 22 |
| 2294 |
graceful_shutdown: |
| 2295 |
community: "77" |
| 2296 |
local_preference: 230 |
| 2297 |
vrfs: |
| 2298 |
time: 31 |
| 2299 |
inject_maps: |
| 2300 |
- copy_attributes: true |
| 2301 |
exist_map_name: Testmap3 |
| 2302 |
name: map2 |
| 2303 |
- copy_attributes: true |
| 2304 |
exist_map_name: Testmap2 |
| 2305 |
name: map1 |
| 2306 |
listen: |
| 2307 |
limit: 200 |
| 2308 |
range: |
| 2309 |
host_with_subnet: 192.0.2.1/24 |
| 2310 |
peer_group: PaulNetworkGroup |
| 2311 |
log_neighbor_changes: true |
| 2312 |
maxas_limit: 2 |
| 2313 |
maxcommunity_limit: 3 |
| 2314 |
maxextcommunity_limit: 3 |
| 2315 |
nexthop: |
| 2316 |
route_map: RouteMap1 |
| 2317 |
trigger: |
| 2318 |
delay: 2 |
| 2319 |
nopeerup_delay_options: |
| 2320 |
cold_boot: 2 |
| 2321 |
nsf_switchover: 10 |
| 2322 |
post_boot: 22 |
| 2323 |
user_initiated: 22 |
| 2324 |
recursion: true |
| 2325 |
redistribute_internal: true |
| 2326 |
refresh: |
| 2327 |
max_eor_time: 700 |
| 2328 |
stalepath_time: 800 |
| 2329 |
router_id: |
| 2330 |
vrf: true |
| 2331 |
scan_time: 22 |
| 2332 |
slow_peer: |
| 2333 |
detection: |
| 2334 |
threshold: 345 |
| 2335 |
split_update_group: |
| 2336 |
dynamic: true |
| 2337 |
permanent: true |
| 2338 |
sso: true |
| 2339 |
suppress_inactive: true |
| 2340 |
update_delay: 2 |
| 2341 |
update_group: true |
| 2342 |
bmp: |
| 2343 |
buffer_size: 22 |
| 2344 |
server: 2 |
| 2345 |
distance: |
| 2346 |
bgp: |
| 2347 |
routes_external: 2 |
| 2348 |
routes_internal: 3 |
| 2349 |
routes_local: 4 |
| 2350 |
mbgp: |
| 2351 |
routes_external: 2 |
| 2352 |
routes_internal: 3 |
| 2353 |
routes_local: 5 |
| 2354 |
distributes: |
| 2355 |
- in: true |
| 2356 |
prefix: prefixTest |
| 2357 |
- gateway: gatewayTest |
| 2358 |
out: true |
| 2359 |
- acl: "300" |
| 2360 |
interface: Loopback0 |
| 2361 |
out: true |
| 2362 |
maximum_paths: |
| 2363 |
ibgp: 2 |
| 2364 |
paths: 2 |
| 2365 |
maximum_secondary_paths: |
| 2366 |
ibgp: 22 |
| 2367 |
paths: 22 |
| 2368 |
neighbors: |
| 2369 |
- neighbor_address: 192.0.2.10 |
| 2370 |
remote_as: "64500" |
| 2371 |
update_source: Loopback1 |
| 2372 |
- activate: true |
| 2373 |
neighbor_address: 192.0.2.11 |
| 2374 |
remote_as: "45000" |
| 2375 |
send_community: |
| 2376 |
extended: true |
| 2377 |
- activate: true |
| 2378 |
neighbor_address: 192.0.2.12 |
| 2379 |
remote_as: "45000" |
| 2380 |
- neighbor_address: 192.0.2.13 |
| 2381 |
remote_as: "6553601" |
| 2382 |
- advertise: |
| 2383 |
diverse_path: |
| 2384 |
backup: true |
| 2385 |
neighbor_address: 192.0.2.8 |
| 2386 |
route_reflector_client: true |
| 2387 |
- neighbor_address: 192.0.2.9 |
| 2388 |
remote_as: "64500" |
| 2389 |
route_maps: |
| 2390 |
- in: true |
| 2391 |
name: rmp1 |
| 2392 |
- in: true |
| 2393 |
name: rmp2 |
| 2394 |
update_source: Loopback0 |
| 2395 |
- activate: true |
| 2396 |
advertise: |
| 2397 |
additional_paths: |
| 2398 |
group_best: true |
| 2399 |
neighbor_address: 2001:DB8::1037 |
| 2400 |
- neighbor_address: testNebTag |
| 2401 |
peer_group: "5" |
| 2402 |
soft_reconfiguration: true |
| 2403 |
version: 4 |
| 2404 |
networks: |
| 2405 |
- address: 192.0.2.15 |
| 2406 |
backdoor: true |
| 2407 |
netmask: 55.255.255.0 |
| 2408 |
route_map: mp1 |
| 2409 |
- address: 192.0.2.16 |
| 2410 |
backdoor: true |
| 2411 |
netmask: 255.255.255.0 |
| 2412 |
route_map: mp2 |
| 2413 |
- address: 192.0.2.17 |
| 2414 |
backdoor: true |
| 2415 |
netmask: 255.255.255.0 |
| 2416 |
route_map: mp2 |
| 2417 |
redistribute: |
| 2418 |
- static: |
| 2419 |
metric: 33 |
| 2420 |
route_map: rmp1 |
| 2421 |
set: true |
| 2422 |
- application: |
| 2423 |
metric: 22 |
| 2424 |
name: app1 |
| 2425 |
- application: |
| 2426 |
metric: 33 |
| 2427 |
name: app2 |
| 2428 |
route_map: mp1 |
| 2429 |
- connected: |
| 2430 |
metric: 22 |
| 2431 |
set: true |
| 2432 |
- mobile: |
| 2433 |
metric: 211 |
| 2434 |
set: true |
| 2435 |
state: rendered |
| 2436 |
|
| 2437 |
# Task Output: |
| 2438 |
# ------------ |
| 2439 |
# |
| 2440 |
# rendered: |
| 2441 |
# - router bgp 65000 |
| 2442 |
# - auto-summary |
| 2443 |
# - bmp buffer-size 22 |
| 2444 |
# - bmp server 2 |
| 2445 |
# - distance bgp 2 3 4 |
| 2446 |
# - distance mbgp 2 3 5 |
| 2447 |
# - maximum-paths 2 |
| 2448 |
# - maximum-paths ibgp 2 |
| 2449 |
# - maximum-secondary-paths 22 |
| 2450 |
# - maximum-secondary-paths ibgp 22 |
| 2451 |
# - bgp additional-paths install receive |
| 2452 |
# - bgp aggregate-timer 0 |
| 2453 |
# - bgp always-compare-med |
| 2454 |
# - bgp asnotation dot |
| 2455 |
# - bgp bestpath aigp ignore |
| 2456 |
# - bgp bestpath compare-routerid |
| 2457 |
# - bgp bestpath med confed missing-as-worst |
| 2458 |
# - bgp confederation identifier 22 |
| 2459 |
# - bgp consistency-checker error-message interval 10 |
| 2460 |
# - bgp dampening route-map routeMap1Test |
| 2461 |
# - bgp deterministic-med |
| 2462 |
# - bgp graceful-restart restart-time 2 |
| 2463 |
# - bgp graceful-restart stalepath-time 22 |
| 2464 |
# - bgp graceful-shutdown all vrfs 31 local-preference 230 community 77 |
| 2465 |
# - bgp listen limit 200 |
| 2466 |
# - bgp listen range 192.0.2.1/24 peer-group PaulNetworkGroup |
| 2467 |
# - bgp log-neighbor-changes |
| 2468 |
# - bgp maxas-limit 2 |
| 2469 |
# - bgp maxcommunity-limit 3 |
| 2470 |
# - bgp maxextcommunity-limit 3 |
| 2471 |
# - bgp nexthop route-map RouteMap1 |
| 2472 |
# - bgp nexthop trigger delay 2 |
| 2473 |
# - bgp nopeerup-delay cold-boot 2 |
| 2474 |
# - bgp nopeerup-delay post-boot 22 |
| 2475 |
# - bgp nopeerup-delay nsf-switchover 10 |
| 2476 |
# - bgp nopeerup-delay user-initiated 22 |
| 2477 |
# - bgp recursion host |
| 2478 |
# - bgp redistribute-internal |
| 2479 |
# - bgp refresh max-eor-time 700 |
| 2480 |
# - bgp refresh stalepath-time 800 |
| 2481 |
# - bgp router-id vrf auto-assign |
| 2482 |
# - bgp scan-time 22 |
| 2483 |
# - bgp slow-peer detection threshold 345 |
| 2484 |
# - bgp slow-peer split-update-group dynamic permanent |
| 2485 |
# - bgp sso route-refresh-enable |
| 2486 |
# - bgp suppress-inactive |
| 2487 |
# - bgp update-delay 2 |
| 2488 |
# - bgp update-group split as-override |
| 2489 |
# - bgp inject-map map2 exist-map Testmap3 copy-attributes |
| 2490 |
# - bgp inject-map map1 exist-map Testmap2 copy-attributes |
| 2491 |
# - distribute-list prefix prefixTest in |
| 2492 |
# - distribute-list gateway gatewayTest out |
| 2493 |
# - distribute-list 300 out Loopback0 |
| 2494 |
# - aggregate-address 192.0.2.1 255.255.255.0 summary-only attribute-map testMap1 |
| 2495 |
# - aggregate-address 192.0.2.2 255.255.255.0 as-set |
| 2496 |
# - aggregate-address 192.0.2.3 255.255.255.0 as-set |
| 2497 |
# - network 192.0.2.15 mask 55.255.255.0 route-map mp1 backdoor |
| 2498 |
# - network 192.0.2.16 mask 255.255.255.0 route-map mp2 backdoor |
| 2499 |
# - network 192.0.2.17 mask 255.255.255.0 route-map mp2 backdoor |
| 2500 |
# - neighbor 192.0.2.10 remote-as 64500 |
| 2501 |
# - neighbor 192.0.2.10 update-source Loopback1 |
| 2502 |
# - neighbor 192.0.2.11 remote-as 45000 |
| 2503 |
# - neighbor 192.0.2.11 activate |
| 2504 |
# - neighbor 192.0.2.11 send-community extended |
| 2505 |
# - neighbor 192.0.2.12 remote-as 45000 |
| 2506 |
# - neighbor 192.0.2.12 activate |
| 2507 |
# - neighbor 192.0.2.13 remote-as 6553601 |
| 2508 |
# - neighbor 192.0.2.8 advertise diverse-path backup |
| 2509 |
# - neighbor 192.0.2.8 route-reflector-client |
| 2510 |
# - neighbor 192.0.2.9 remote-as 64500 |
| 2511 |
# - neighbor 192.0.2.9 update-source Loopback0 |
| 2512 |
# - neighbor 192.0.2.9 route-map rmp1 in |
| 2513 |
# - neighbor 192.0.2.9 route-map rmp2 in |
| 2514 |
# - neighbor 2001:DB8::1037 activate |
| 2515 |
# - neighbor 2001:DB8::1037 advertise additional-paths group-best |
| 2516 |
# - neighbor testNebTag peer-group 5 |
| 2517 |
# - neighbor testNebTag soft-reconfiguration inbound |
| 2518 |
# - neighbor testNebTag version 4 |
| 2519 |
# - redistribute static metric 33 route-map rmp1 |
| 2520 |
# - redistribute application app1 metric 22 |
| 2521 |
# - redistribute application app2 metric 33 route-map mp1 |
| 2522 |
# - redistribute connected metric 22 |
| 2523 |
# - redistribute mobile metric 211 |
| 2524 |
|
| 2525 |
# Using parsed |
| 2526 |
|
| 2527 |
# File: parsed.cfg |
| 2528 |
# ---------------- |
| 2529 |
# |
| 2530 |
# router bgp 65000 |
| 2531 |
# auto-summary |
| 2532 |
# bmp buffer-size 22 |
| 2533 |
# bmp server 2 |
| 2534 |
# distance bgp 2 3 4 |
| 2535 |
# distance mbgp 2 3 5 |
| 2536 |
# maximum-paths 2 |
| 2537 |
# maximum-paths ibgp 2 |
| 2538 |
# maximum-secondary-paths 22 |
| 2539 |
# maximum-secondary-paths ibgp 22 |
| 2540 |
# description checking description as line |
| 2541 |
# bgp additional-paths install receive |
| 2542 |
# bgp aggregate-timer 0 |
| 2543 |
# bgp always-compare-med |
| 2544 |
# bgp asnotation dot |
| 2545 |
# bgp bestpath aigp ignore |
| 2546 |
# bgp bestpath compare-routerid |
| 2547 |
# bgp bestpath med confed missing-as-worst |
| 2548 |
# bgp confederation identifier 22 |
| 2549 |
# bgp consistency-checker error-message interval 10 |
| 2550 |
# bgp dampening route-map routeMap1Test |
| 2551 |
# bgp deterministic-med |
| 2552 |
# bgp graceful-restart restart-time 2 |
| 2553 |
# bgp graceful-restart stalepath-time 22 |
| 2554 |
# bgp graceful-shutdown all vrfs 31 local-preference 230 community 77 |
| 2555 |
# bgp listen limit 200 |
| 2556 |
# bgp listen range 192.0.2.1/24 peer-group PaulNetworkGroup |
| 2557 |
# bgp log-neighbor-changes |
| 2558 |
# bgp maxas-limit 2 |
| 2559 |
# bgp maxcommunity-limit 3 |
| 2560 |
# bgp maxextcommunity-limit 3 |
| 2561 |
# bgp nexthop route-map RouteMap1 |
| 2562 |
# bgp nexthop trigger delay 2 |
| 2563 |
# bgp nopeerup-delay cold-boot 2 |
| 2564 |
# bgp nopeerup-delay post-boot 22 |
| 2565 |
# bgp nopeerup-delay nsf-switchover 10 |
| 2566 |
# bgp nopeerup-delay user-initiated 22 |
| 2567 |
# bgp recursion host |
| 2568 |
# bgp redistribute-internal |
| 2569 |
# bgp refresh max-eor-time 700 |
| 2570 |
# bgp refresh stalepath-time 800 |
| 2571 |
# bgp router-id vrf auto-assign |
| 2572 |
# bgp scan-time 22 |
| 2573 |
# bgp slow-peer detection threshold 345 |
| 2574 |
# bgp slow-peer split-update-group dynamic permanent |
| 2575 |
# bgp sso route-refresh-enable |
| 2576 |
# bgp suppress-inactive |
| 2577 |
# bgp update-delay 2 |
| 2578 |
# bgp update-group split as-override |
| 2579 |
# bgp inject-map map2 exist-map Testmap3 copy-attributes |
| 2580 |
# bgp inject-map map1 exist-map Testmap2 copy-attributes |
| 2581 |
# distribute-list prefix prefixTest in |
| 2582 |
# distribute-list gateway gatewayTest out |
| 2583 |
# distribute-list 300 out Loopback0 |
| 2584 |
# aggregate-address 192.0.2.1 255.255.255.0 summary-only attribute-map testMap1 |
| 2585 |
# aggregate-address 192.0.2.2 255.255.255.0 as-set |
| 2586 |
# aggregate-address 192.0.2.3 255.255.255.0 as-set |
| 2587 |
# network 192.0.2.15 mask 55.255.255.0 route-map mp1 backdoor |
| 2588 |
# network 192.0.2.16 mask 255.255.255.0 route-map mp2 backdoor |
| 2589 |
# network 192.0.2.17 mask 255.255.255.0 route-map mp2 backdoor |
| 2590 |
# neighbor 192.0.2.8 advertise diverse-path backup |
| 2591 |
# neighbor 192.0.2.8 route-reflector-client |
| 2592 |
# neighbor 192.0.2.9 remote-as 64500 |
| 2593 |
# neighbor 192.0.2.9 update-source Loopback0 |
| 2594 |
# neighbor 192.0.2.9 route-map rmp1 in |
| 2595 |
# neighbor 192.0.2.9 route-map rmp2 in |
| 2596 |
# neighbor 192.0.2.10 remote-as 64500 |
| 2597 |
# neighbor 192.0.2.10 update-source Loopback1 |
| 2598 |
# neighbor 192.0.2.11 remote-as 45000 |
| 2599 |
# neighbor 192.0.2.11 activate |
| 2600 |
# neighbor 192.0.2.11 send-community extended |
| 2601 |
# neighbor 192.0.2.12 remote-as 45000 |
| 2602 |
# neighbor 192.0.2.12 activate |
| 2603 |
# neighbor 192.0.2.13 remote-as 6553601 |
| 2604 |
# neighbor 192.0.2.13 shutdown graceful 10 community 20 |
| 2605 |
# neighbor 2001:DB8::1037 activate |
| 2606 |
# neighbor 2001:DB8::1037 advertise additional-paths group-best |
| 2607 |
# neighbor testNebTag peer-group 5 |
| 2608 |
# neighbor testNebTag soft-reconfiguration inbound |
| 2609 |
# neighbor testNebTag version 4 |
| 2610 |
# redistribute static metric 33 route-map rmp1 |
| 2611 |
# redistribute application app1 metric 22 |
| 2612 |
# redistribute application app2 metric 33 route-map mp1 |
| 2613 |
# redistribute connected metric 22 |
| 2614 |
# redistribute mobile metric 21 |
| 2615 |
|
| 2616 |
- name: Parse the commands for provided configuration |
| 2617 |
cisco.ios.ios_bgp_global: |
| 2618 |
running_config: "{{ lookup('file', 'parsed.cfg') }}" |
| 2619 |
state: parsed |
| 2620 |
|
| 2621 |
# Task Output: |
| 2622 |
# ------------ |
| 2623 |
# |
| 2624 |
# parsed: |
| 2625 |
# aggregate_addresses: |
| 2626 |
# - address: 192.0.2.1 |
| 2627 |
# attribute_map: testMap1 |
| 2628 |
# netmask: 255.255.255.0 |
| 2629 |
# summary_only: true |
| 2630 |
# - address: 192.0.2.2 |
| 2631 |
# as_set: true |
| 2632 |
# netmask: 255.255.255.0 |
| 2633 |
# - address: 192.0.2.3 |
| 2634 |
# as_set: true |
| 2635 |
# netmask: 255.255.255.0 |
| 2636 |
# as_number: '65000' |
| 2637 |
# auto_summary: true |
| 2638 |
# bgp: |
| 2639 |
# additional_paths: |
| 2640 |
# install: true |
| 2641 |
# receive: true |
| 2642 |
# aggregate_timer: 0 |
| 2643 |
# always_compare_med: true |
| 2644 |
# asnotation: true |
| 2645 |
# bestpath_options: |
| 2646 |
# aigp: true |
| 2647 |
# compare_routerid: true |
| 2648 |
# med: |
| 2649 |
# confed: true |
| 2650 |
# missing_as_worst: true |
| 2651 |
# confederation: |
| 2652 |
# identifier: '22' |
| 2653 |
# consistency_checker: |
| 2654 |
# error_message: |
| 2655 |
# interval: 10 |
| 2656 |
# set: true |
| 2657 |
# dampening: |
| 2658 |
# route_map: routeMap1Test |
| 2659 |
# deterministic_med: true |
| 2660 |
# graceful_restart: |
| 2661 |
# restart_time: 2 |
| 2662 |
# stalepath_time: 22 |
| 2663 |
# graceful_shutdown: |
| 2664 |
# community: '77' |
| 2665 |
# local_preference: 230 |
| 2666 |
# vrfs: |
| 2667 |
# time: 31 |
| 2668 |
# inject_maps: |
| 2669 |
# - copy_attributes: true |
| 2670 |
# exist_map_name: Testmap3 |
| 2671 |
# name: map2 |
| 2672 |
# - copy_attributes: true |
| 2673 |
# exist_map_name: Testmap2 |
| 2674 |
# name: map1 |
| 2675 |
# listen: |
| 2676 |
# limit: 200 |
| 2677 |
# range: |
| 2678 |
# host_with_subnet: 192.0.2.1/24 |
| 2679 |
# peer_group: PaulNetworkGroup |
| 2680 |
# log_neighbor_changes: true |
| 2681 |
# maxas_limit: 2 |
| 2682 |
# maxcommunity_limit: 3 |
| 2683 |
# maxextcommunity_limit: 3 |
| 2684 |
# nexthop: |
| 2685 |
# route_map: RouteMap1 |
| 2686 |
# trigger: |
| 2687 |
# delay: 2 |
| 2688 |
# nopeerup_delay_options: |
| 2689 |
# cold_boot: 2 |
| 2690 |
# nsf_switchover: 10 |
| 2691 |
# post_boot: 22 |
| 2692 |
# user_initiated: 22 |
| 2693 |
# recursion: true |
| 2694 |
# redistribute_internal: true |
| 2695 |
# refresh: |
| 2696 |
# max_eor_time: 700 |
| 2697 |
# stalepath_time: 800 |
| 2698 |
# router_id: |
| 2699 |
# vrf: true |
| 2700 |
# scan_time: 22 |
| 2701 |
# slow_peer: |
| 2702 |
# detection: |
| 2703 |
# threshold: 345 |
| 2704 |
# split_update_group: |
| 2705 |
# dynamic: true |
| 2706 |
# permanent: true |
| 2707 |
# sso: true |
| 2708 |
# suppress_inactive: true |
| 2709 |
# update_delay: 2 |
| 2710 |
# update_group: true |
| 2711 |
# bmp: |
| 2712 |
# buffer_size: 22 |
| 2713 |
# server: 2 |
| 2714 |
# distance: |
| 2715 |
# bgp: |
| 2716 |
# routes_external: 2 |
| 2717 |
# routes_internal: 3 |
| 2718 |
# routes_local: 4 |
| 2719 |
# mbgp: |
| 2720 |
# routes_external: 2 |
| 2721 |
# routes_internal: 3 |
| 2722 |
# routes_local: 5 |
| 2723 |
# distributes: |
| 2724 |
# - in: true |
| 2725 |
# prefix: prefixTest |
| 2726 |
# - gateway: gatewayTest |
| 2727 |
# out: true |
| 2728 |
# - acl: '300' |
| 2729 |
# interface: Loopback0 |
| 2730 |
# out: true |
| 2731 |
# maximum_paths: |
| 2732 |
# ibgp: 2 |
| 2733 |
# paths: 2 |
| 2734 |
# maximum_secondary_paths: |
| 2735 |
# ibgp: 22 |
| 2736 |
# paths: 22 |
| 2737 |
# neighbors: |
| 2738 |
# - neighbor_address: 192.0.2.10 |
| 2739 |
# remote_as: '64500' |
| 2740 |
# update_source: Loopback1 |
| 2741 |
# - activate: true |
| 2742 |
# neighbor_address: 192.0.2.11 |
| 2743 |
# remote_as: '45000' |
| 2744 |
# send_community: |
| 2745 |
# extended: true |
| 2746 |
# - activate: true |
| 2747 |
# neighbor_address: 192.0.2.12 |
| 2748 |
# remote_as: '45000' |
| 2749 |
# - neighbor_address: 192.0.2.13 |
| 2750 |
# remote_as: '6553601' |
| 2751 |
# - advertise: |
| 2752 |
# diverse_path: |
| 2753 |
# backup: true |
| 2754 |
# neighbor_address: 192.0.2.8 |
| 2755 |
# route_reflector_client: true |
| 2756 |
# - neighbor_address: 192.0.2.9 |
| 2757 |
# remote_as: '64500' |
| 2758 |
# route_maps: |
| 2759 |
# - in: true |
| 2760 |
# name: rmp1 |
| 2761 |
# - in: true |
| 2762 |
# name: rmp2 |
| 2763 |
# update_source: Loopback0 |
| 2764 |
# - activate: true |
| 2765 |
# advertise: |
| 2766 |
# additional_paths: |
| 2767 |
# group_best: true |
| 2768 |
# neighbor_address: 2001:DB8::1037 |
| 2769 |
# - neighbor_address: testNebTag |
| 2770 |
# peer_group: '5' |
| 2771 |
# soft_reconfiguration: true |
| 2772 |
# version: 4 |
| 2773 |
# networks: |
| 2774 |
# - address: 192.0.2.15 |
| 2775 |
# backdoor: true |
| 2776 |
# netmask: 55.255.255.0 |
| 2777 |
# route_map: mp1 |
| 2778 |
# - address: 192.0.2.16 |
| 2779 |
# backdoor: true |
| 2780 |
# netmask: 255.255.255.0 |
| 2781 |
# route_map: mp2 |
| 2782 |
# - address: 192.0.2.17 |
| 2783 |
# backdoor: true |
| 2784 |
# netmask: 255.255.255.0 |
| 2785 |
# route_map: mp2 |
| 2786 |
# redistribute: |
| 2787 |
# - static: |
| 2788 |
# metric: 33 |
| 2789 |
# route_map: rmp1 |
| 2790 |
# set: true |
| 2791 |
# - application: |
| 2792 |
# metric: 22 |
| 2793 |
# name: app1 |
| 2794 |
# - application: |
| 2795 |
# metric: 33 |
| 2796 |
# name: app2 |
| 2797 |
# route_map: mp1 |
| 2798 |
# - connected: |
| 2799 |
# metric: 22 |
| 2800 |
# set: true |
| 2801 |
# - mobile: |
| 2802 |
# metric: 21 |
| 2803 |
# set: true |
| 2804 |
""" |
| 2805 |
|
| 2806 |
|
| 2807 |
RETURN = """ |
| 2808 |
before: |
| 2809 |
description: The configuration prior to the module execution. |
| 2810 |
returned: when I(state) is C(merged), C(replaced), C(overridden), C(deleted) or C(purged) |
| 2811 |
type: dict |
| 2812 |
sample: > |
| 2813 |
This output will always be in the same format as the |
| 2814 |
module argspec. |
| 2815 |
after: |
| 2816 |
description: The resulting configuration after module execution. |
| 2817 |
returned: when changed |
| 2818 |
type: dict |
| 2819 |
sample: > |
| 2820 |
This output will always be in the same format as the |
| 2821 |
module argspec. |
| 2822 |
commands: |
| 2823 |
description: The set of commands pushed to the remote device. |
| 2824 |
returned: when I(state) is C(merged), C(replaced), C(overridden), C(deleted) or C(purged) |
| 2825 |
type: list |
| 2826 |
sample: |
| 2827 |
- "router bgp 65000" |
| 2828 |
- "neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive" |
| 2829 |
- "bgp graceful-shutdown all neighbors 50 local-preference 100 community 100" |
| 2830 |
rendered: |
| 2831 |
description: The provided configuration in the task rendered in device-native format (offline). |
| 2832 |
returned: when I(state) is C(rendered) |
| 2833 |
type: list |
| 2834 |
sample: |
| 2835 |
- "router bgp 65000" |
| 2836 |
- "neighbor 198.51.100.1 aigp send cost-community 100 poi igp-cost transitive" |
| 2837 |
- "bgp graceful-shutdown all neighbors 50 local-preference 100 community 100" |
| 2838 |
gathered: |
| 2839 |
description: Facts about the network resource gathered from the remote device as structured data. |
| 2840 |
returned: when I(state) is C(gathered) |
| 2841 |
type: list |
| 2842 |
sample: > |
| 2843 |
This output will always be in the same format as the |
| 2844 |
module argspec. |
| 2845 |
parsed: |
| 2846 |
description: The device native config provided in I(running_config) option parsed into structured data as per module argspec. |
| 2847 |
returned: when I(state) is C(parsed) |
| 2848 |
type: list |
| 2849 |
sample: > |
| 2850 |
This output will always be in the same format as the |
| 2851 |
module argspec. |
| 2852 |
""" |
| 2853 |
|
| 2854 |
from ansible.module_utils.basic import AnsibleModule |
| 2855 |
|
| 2856 |
from ansible_collections.cisco.ios.plugins.module_utils.network.ios.argspec.bgp_global.bgp_global import ( |
| 2857 |
Bgp_globalArgs, |
| 2858 |
) |
| 2859 |
from ansible_collections.cisco.ios.plugins.module_utils.network.ios.config.bgp_global.bgp_global import ( |
| 2860 |
Bgp_global, |
| 2861 |
) |
| 2862 |
|
| 2863 |
|
| 2864 |
def main(): |
| 2865 |
""" |
| 2866 |
Main entry point for module execution |
| 2867 |
|
| 2868 |
:returns: the result form module invocation |
| 2869 |
""" |
| 2870 |
module = AnsibleModule( |
| 2871 |
argument_spec=Bgp_globalArgs.argument_spec, |
| 2872 |
mutually_exclusive=[["config", "running_config"]], |
| 2873 |
required_if=[ |
| 2874 |
["state", "merged", ["config"]], |
| 2875 |
["state", "replaced", ["config"]], |
| 2876 |
["state", "overridden", ["config"]], |
| 2877 |
["state", "rendered", ["config"]], |
| 2878 |
["state", "parsed", ["running_config"]], |
| 2879 |
], |
| 2880 |
supports_check_mode=True, |
| 2881 |
) |
| 2882 |
|
| 2883 |
result = Bgp_global(module).execute_module() |
| 2884 |
module.exit_json(**result) |
| 2885 |
|
| 2886 |
|
| 2887 |
if __name__ == "__main__": |
| 2888 |
main() |