Debian Codegraph @

ansible_collections/dellemc/enterprise_sonic/docs/dellemc.enterprise_sonic.sonic_bgp_module.rst

raw
1 .. _dellemc.enterprise_sonic.sonic_bgp_module:
2
3
4 **********************************
5 dellemc.enterprise_sonic.sonic_bgp
6 **********************************
7
8 **Manage global BGP and its parameters**
9
10
11 Version added: 1.0.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - This module provides configuration management of global BGP parameters on devices running Enterprise SONiC Distribution by Dell Technologies.
21
22
23
24
25 Parameters
26 ----------
27
28 .. raw:: html
29
30 <table border=0 cellpadding=0 class="documentation-table">
31 <tr>
32 <th colspan="4">Parameter</th>
33 <th>Choices/<font color="blue">Defaults</font></th>
34 <th width="100%">Comments</th>
35 </tr>
36 <tr>
37 <td colspan="4">
38 <div class="ansibleOptionAnchor" id="parameter-"></div>
39 <b>config</b>
40 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
41 <div style="font-size: small">
42 <span style="color: purple">list</span>
43 / <span style="color: purple">elements=dictionary</span>
44 </div>
45 </td>
46 <td>
47 </td>
48 <td>
49 <div>Specifies the BGP-related configuration.</div>
50 </td>
51 </tr>
52 <tr>
53 <td class="elbow-placeholder"></td>
54 <td colspan="3">
55 <div class="ansibleOptionAnchor" id="parameter-"></div>
56 <b>as_notation</b>
57 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
58 <div style="font-size: small">
59 <span style="color: purple">string</span>
60 </div>
61 </td>
62 <td>
63 <ul style="margin: 0; padding: 0"><b>Choices:</b>
64 <li>asdot</li>
65 <li>asdot+</li>
66 </ul>
67 </td>
68 <td>
69 <div>Specify the AS number notation format</div>
70 <div>Option supported on Enterprise-Sonic releases 4.4.0 and higher.</div>
71 </td>
72 </tr>
73 <tr>
74 <td class="elbow-placeholder"></td>
75 <td colspan="3">
76 <div class="ansibleOptionAnchor" id="parameter-"></div>
77 <b>bestpath</b>
78 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
79 <div style="font-size: small">
80 <span style="color: purple">dictionary</span>
81 </div>
82 </td>
83 <td>
84 </td>
85 <td>
86 <div>Configures the BGP best-path.</div>
87 </td>
88 </tr>
89 <tr>
90 <td class="elbow-placeholder"></td>
91 <td class="elbow-placeholder"></td>
92 <td colspan="2">
93 <div class="ansibleOptionAnchor" id="parameter-"></div>
94 <b>as_path</b>
95 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
96 <div style="font-size: small">
97 <span style="color: purple">dictionary</span>
98 </div>
99 </td>
100 <td>
101 </td>
102 <td>
103 <div>Configures the as-path values.</div>
104 </td>
105 </tr>
106 <tr>
107 <td class="elbow-placeholder"></td>
108 <td class="elbow-placeholder"></td>
109 <td class="elbow-placeholder"></td>
110 <td colspan="1">
111 <div class="ansibleOptionAnchor" id="parameter-"></div>
112 <b>confed</b>
113 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
114 <div style="font-size: small">
115 <span style="color: purple">boolean</span>
116 </div>
117 </td>
118 <td>
119 <ul style="margin: 0; padding: 0"><b>Choices:</b>
120 <li>no</li>
121 <li>yes</li>
122 </ul>
123 </td>
124 <td>
125 <div>Configures the confed values of as-path.</div>
126 </td>
127 </tr>
128 <tr>
129 <td class="elbow-placeholder"></td>
130 <td class="elbow-placeholder"></td>
131 <td class="elbow-placeholder"></td>
132 <td colspan="1">
133 <div class="ansibleOptionAnchor" id="parameter-"></div>
134 <b>ignore</b>
135 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
136 <div style="font-size: small">
137 <span style="color: purple">boolean</span>
138 </div>
139 </td>
140 <td>
141 <ul style="margin: 0; padding: 0"><b>Choices:</b>
142 <li>no</li>
143 <li>yes</li>
144 </ul>
145 </td>
146 <td>
147 <div>Configures the ignore values of as-path.</div>
148 </td>
149 </tr>
150 <tr>
151 <td class="elbow-placeholder"></td>
152 <td class="elbow-placeholder"></td>
153 <td class="elbow-placeholder"></td>
154 <td colspan="1">
155 <div class="ansibleOptionAnchor" id="parameter-"></div>
156 <b>multipath_relax</b>
157 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
158 <div style="font-size: small">
159 <span style="color: purple">boolean</span>
160 </div>
161 </td>
162 <td>
163 <ul style="margin: 0; padding: 0"><b>Choices:</b>
164 <li>no</li>
165 <li>yes</li>
166 </ul>
167 </td>
168 <td>
169 <div>Configures the multipath_relax values of as-path.</div>
170 </td>
171 </tr>
172 <tr>
173 <td class="elbow-placeholder"></td>
174 <td class="elbow-placeholder"></td>
175 <td class="elbow-placeholder"></td>
176 <td colspan="1">
177 <div class="ansibleOptionAnchor" id="parameter-"></div>
178 <b>multipath_relax_as_set</b>
179 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
180 <div style="font-size: small">
181 <span style="color: purple">boolean</span>
182 </div>
183 </td>
184 <td>
185 <ul style="margin: 0; padding: 0"><b>Choices:</b>
186 <li>no</li>
187 <li>yes</li>
188 </ul>
189 </td>
190 <td>
191 <div>Configures the multipath_relax_as_set values of as-path.</div>
192 </td>
193 </tr>
194
195 <tr>
196 <td class="elbow-placeholder"></td>
197 <td class="elbow-placeholder"></td>
198 <td colspan="2">
199 <div class="ansibleOptionAnchor" id="parameter-"></div>
200 <b>bandwidth</b>
201 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
202 <div style="font-size: small">
203 <span style="color: purple">string</span>
204 </div>
205 <div style="font-style: italic; font-size: small; color: darkgreen">added in 3.1.0</div>
206 </td>
207 <td>
208 <ul style="margin: 0; padding: 0"><b>Choices:</b>
209 <li>default_weight</li>
210 <li>ignore_weight</li>
211 <li>skip_missing</li>
212 </ul>
213 </td>
214 <td>
215 <div>Link Bandwidth attribute for the bestpath selection process</div>
216 <div>Options are as follows</div>
217 <div>default_weight - Assign a low default weight (value 1) to paths not having link bandwidth</div>
218 <div>ignore_weight - Ignore link bandwidth (i.e., do regular ECMP, not weighted)</div>
219 <div>skip_missing - Ignore paths without link bandwidth for ECMP (if other paths have it)</div>
220 </td>
221 </tr>
222 <tr>
223 <td class="elbow-placeholder"></td>
224 <td class="elbow-placeholder"></td>
225 <td colspan="2">
226 <div class="ansibleOptionAnchor" id="parameter-"></div>
227 <b>compare_routerid</b>
228 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
229 <div style="font-size: small">
230 <span style="color: purple">boolean</span>
231 </div>
232 </td>
233 <td>
234 <ul style="margin: 0; padding: 0"><b>Choices:</b>
235 <li>no</li>
236 <li>yes</li>
237 </ul>
238 </td>
239 <td>
240 <div>Configures the compare_routerid.</div>
241 </td>
242 </tr>
243 <tr>
244 <td class="elbow-placeholder"></td>
245 <td class="elbow-placeholder"></td>
246 <td colspan="2">
247 <div class="ansibleOptionAnchor" id="parameter-"></div>
248 <b>med</b>
249 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
250 <div style="font-size: small">
251 <span style="color: purple">dictionary</span>
252 </div>
253 </td>
254 <td>
255 </td>
256 <td>
257 <div>Configures the med values.</div>
258 </td>
259 </tr>
260 <tr>
261 <td class="elbow-placeholder"></td>
262 <td class="elbow-placeholder"></td>
263 <td class="elbow-placeholder"></td>
264 <td colspan="1">
265 <div class="ansibleOptionAnchor" id="parameter-"></div>
266 <b>always_compare_med</b>
267 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
268 <div style="font-size: small">
269 <span style="color: purple">boolean</span>
270 </div>
271 </td>
272 <td>
273 <ul style="margin: 0; padding: 0"><b>Choices:</b>
274 <li>no</li>
275 <li>yes</li>
276 </ul>
277 </td>
278 <td>
279 <div>Allows comparing meds from different neighbors if set to true</div>
280 </td>
281 </tr>
282 <tr>
283 <td class="elbow-placeholder"></td>
284 <td class="elbow-placeholder"></td>
285 <td class="elbow-placeholder"></td>
286 <td colspan="1">
287 <div class="ansibleOptionAnchor" id="parameter-"></div>
288 <b>confed</b>
289 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
290 <div style="font-size: small">
291 <span style="color: purple">boolean</span>
292 </div>
293 </td>
294 <td>
295 <ul style="margin: 0; padding: 0"><b>Choices:</b>
296 <li>no</li>
297 <li>yes</li>
298 </ul>
299 </td>
300 <td>
301 <div>Configures the confed values of med.</div>
302 </td>
303 </tr>
304 <tr>
305 <td class="elbow-placeholder"></td>
306 <td class="elbow-placeholder"></td>
307 <td class="elbow-placeholder"></td>
308 <td colspan="1">
309 <div class="ansibleOptionAnchor" id="parameter-"></div>
310 <b>missing_as_worst</b>
311 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
312 <div style="font-size: small">
313 <span style="color: purple">boolean</span>
314 </div>
315 </td>
316 <td>
317 <ul style="margin: 0; padding: 0"><b>Choices:</b>
318 <li>no</li>
319 <li>yes</li>
320 </ul>
321 </td>
322 <td>
323 <div>Configures the missing_as_worst values of as-path.</div>
324 </td>
325 </tr>
326
327
328 <tr>
329 <td class="elbow-placeholder"></td>
330 <td colspan="3">
331 <div class="ansibleOptionAnchor" id="parameter-"></div>
332 <b>bgp_as</b>
333 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
334 <div style="font-size: small">
335 <span style="color: purple">string</span>
336 / <span style="color: red">required</span>
337 </div>
338 </td>
339 <td>
340 </td>
341 <td>
342 <div>Specifies the BGP autonomous system (AS) number to configure on the device.</div>
343 </td>
344 </tr>
345 <tr>
346 <td class="elbow-placeholder"></td>
347 <td colspan="3">
348 <div class="ansibleOptionAnchor" id="parameter-"></div>
349 <b>graceful_restart</b>
350 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
351 <div style="font-size: small">
352 <span style="color: purple">dictionary</span>
353 </div>
354 <div style="font-style: italic; font-size: small; color: darkgreen">added in 3.1.0</div>
355 </td>
356 <td>
357 </td>
358 <td>
359 <div>Configure graceful restart</div>
360 </td>
361 </tr>
362 <tr>
363 <td class="elbow-placeholder"></td>
364 <td class="elbow-placeholder"></td>
365 <td colspan="2">
366 <div class="ansibleOptionAnchor" id="parameter-"></div>
367 <b>enabled</b>
368 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
369 <div style="font-size: small">
370 <span style="color: purple">boolean</span>
371 </div>
372 </td>
373 <td>
374 <ul style="margin: 0; padding: 0"><b>Choices:</b>
375 <li>no</li>
376 <li>yes</li>
377 </ul>
378 </td>
379 <td>
380 <div>Enable graceful restart</div>
381 </td>
382 </tr>
383 <tr>
384 <td class="elbow-placeholder"></td>
385 <td class="elbow-placeholder"></td>
386 <td colspan="2">
387 <div class="ansibleOptionAnchor" id="parameter-"></div>
388 <b>preserve_fw_state</b>
389 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
390 <div style="font-size: small">
391 <span style="color: purple">boolean</span>
392 </div>
393 </td>
394 <td>
395 <ul style="margin: 0; padding: 0"><b>Choices:</b>
396 <li>no</li>
397 <li>yes</li>
398 </ul>
399 </td>
400 <td>
401 <div>Configures preserve-fw-state</div>
402 </td>
403 </tr>
404 <tr>
405 <td class="elbow-placeholder"></td>
406 <td class="elbow-placeholder"></td>
407 <td colspan="2">
408 <div class="ansibleOptionAnchor" id="parameter-"></div>
409 <b>restart_time</b>
410 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
411 <div style="font-size: small">
412 <span style="color: purple">integer</span>
413 </div>
414 </td>
415 <td>
416 </td>
417 <td>
418 <div>Configures restart-time.</div>
419 <div>The range is from 1 to 3600.</div>
420 </td>
421 </tr>
422 <tr>
423 <td class="elbow-placeholder"></td>
424 <td class="elbow-placeholder"></td>
425 <td colspan="2">
426 <div class="ansibleOptionAnchor" id="parameter-"></div>
427 <b>stale_routes_time</b>
428 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
429 <div style="font-size: small">
430 <span style="color: purple">integer</span>
431 </div>
432 </td>
433 <td>
434 </td>
435 <td>
436 <div>Configures stale-routes-time.</div>
437 <div>The range is from 1 to 3600.</div>
438 </td>
439 </tr>
440
441 <tr>
442 <td class="elbow-placeholder"></td>
443 <td colspan="3">
444 <div class="ansibleOptionAnchor" id="parameter-"></div>
445 <b>log_neighbor_changes</b>
446 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
447 <div style="font-size: small">
448 <span style="color: purple">boolean</span>
449 </div>
450 </td>
451 <td>
452 <ul style="margin: 0; padding: 0"><b>Choices:</b>
453 <li>no</li>
454 <li>yes</li>
455 </ul>
456 </td>
457 <td>
458 <div>Enables/disables logging neighbor up/down and reset reason.</div>
459 </td>
460 </tr>
461 <tr>
462 <td class="elbow-placeholder"></td>
463 <td colspan="3">
464 <div class="ansibleOptionAnchor" id="parameter-"></div>
465 <b>max_med</b>
466 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
467 <div style="font-size: small">
468 <span style="color: purple">dictionary</span>
469 </div>
470 </td>
471 <td>
472 </td>
473 <td>
474 <div>Configure max med and its parameters</div>
475 </td>
476 </tr>
477 <tr>
478 <td class="elbow-placeholder"></td>
479 <td class="elbow-placeholder"></td>
480 <td colspan="2">
481 <div class="ansibleOptionAnchor" id="parameter-"></div>
482 <b>on_startup</b>
483 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
484 <div style="font-size: small">
485 <span style="color: purple">dictionary</span>
486 </div>
487 </td>
488 <td>
489 </td>
490 <td>
491 <div>On startup time and max-med value</div>
492 </td>
493 </tr>
494 <tr>
495 <td class="elbow-placeholder"></td>
496 <td class="elbow-placeholder"></td>
497 <td class="elbow-placeholder"></td>
498 <td colspan="1">
499 <div class="ansibleOptionAnchor" id="parameter-"></div>
500 <b>med_val</b>
501 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
502 <div style="font-size: small">
503 <span style="color: purple">integer</span>
504 </div>
505 </td>
506 <td>
507 </td>
508 <td>
509 <div>on startup med value</div>
510 </td>
511 </tr>
512 <tr>
513 <td class="elbow-placeholder"></td>
514 <td class="elbow-placeholder"></td>
515 <td class="elbow-placeholder"></td>
516 <td colspan="1">
517 <div class="ansibleOptionAnchor" id="parameter-"></div>
518 <b>timer</b>
519 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
520 <div style="font-size: small">
521 <span style="color: purple">integer</span>
522 </div>
523 </td>
524 <td>
525 </td>
526 <td>
527 <div>Configures on startup time</div>
528 </td>
529 </tr>
530
531
532 <tr>
533 <td class="elbow-placeholder"></td>
534 <td colspan="3">
535 <div class="ansibleOptionAnchor" id="parameter-"></div>
536 <b>router_id</b>
537 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
538 <div style="font-size: small">
539 <span style="color: purple">string</span>
540 </div>
541 </td>
542 <td>
543 </td>
544 <td>
545 <div>Configures the BGP routing process router-id value.</div>
546 </td>
547 </tr>
548 <tr>
549 <td class="elbow-placeholder"></td>
550 <td colspan="3">
551 <div class="ansibleOptionAnchor" id="parameter-"></div>
552 <b>rt_delay</b>
553 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
554 <div style="font-size: small">
555 <span style="color: purple">integer</span>
556 </div>
557 </td>
558 <td>
559 </td>
560 <td>
561 <div>Time in seconds to wait before processing route-map changes.</div>
562 <div>Range is 0-600. 0 disables the timer and changes to route-map will not be updated.</div>
563 </td>
564 </tr>
565 <tr>
566 <td class="elbow-placeholder"></td>
567 <td colspan="3">
568 <div class="ansibleOptionAnchor" id="parameter-"></div>
569 <b>timers</b>
570 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
571 <div style="font-size: small">
572 <span style="color: purple">dictionary</span>
573 </div>
574 </td>
575 <td>
576 </td>
577 <td>
578 <div>Adjust routing timers</div>
579 </td>
580 </tr>
581 <tr>
582 <td class="elbow-placeholder"></td>
583 <td class="elbow-placeholder"></td>
584 <td colspan="2">
585 <div class="ansibleOptionAnchor" id="parameter-"></div>
586 <b>holdtime</b>
587 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
588 <div style="font-size: small">
589 <span style="color: purple">integer</span>
590 </div>
591 </td>
592 <td>
593 </td>
594 <td>
595 <div>Configures hold-time</div>
596 </td>
597 </tr>
598 <tr>
599 <td class="elbow-placeholder"></td>
600 <td class="elbow-placeholder"></td>
601 <td colspan="2">
602 <div class="ansibleOptionAnchor" id="parameter-"></div>
603 <b>keepalive_interval</b>
604 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
605 <div style="font-size: small">
606 <span style="color: purple">integer</span>
607 </div>
608 </td>
609 <td>
610 </td>
611 <td>
612 <div>Configures keepalive-interval</div>
613 </td>
614 </tr>
615
616 <tr>
617 <td class="elbow-placeholder"></td>
618 <td colspan="3">
619 <div class="ansibleOptionAnchor" id="parameter-"></div>
620 <b>vrf_name</b>
621 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
622 <div style="font-size: small">
623 <span style="color: purple">string</span>
624 </div>
625 </td>
626 <td>
627 <b>Default:</b><br/><div style="color: blue">"default"</div>
628 </td>
629 <td>
630 <div>Specifies the VRF name.</div>
631 </td>
632 </tr>
633
634 <tr>
635 <td colspan="4">
636 <div class="ansibleOptionAnchor" id="parameter-"></div>
637 <b>state</b>
638 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
639 <div style="font-size: small">
640 <span style="color: purple">string</span>
641 </div>
642 </td>
643 <td>
644 <ul style="margin: 0; padding: 0"><b>Choices:</b>
645 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
646 <li>deleted</li>
647 <li>replaced</li>
648 <li>overridden</li>
649 </ul>
650 </td>
651 <td>
652 <div>Specifies the operation to be performed on the BGP process that is configured on the device.</div>
653 <div>In case of merged, the input configuration is merged with the existing BGP configuration on the device.</div>
654 <div>In case of deleted, the existing BGP configuration is removed from the device.</div>
655 <div>In case of replaced, the existing configuration of the specified BGP AS will be replaced with provided configuration.</div>
656 <div>In case of overridden, the existing BGP configuration will be overridden with the provided configuration.</div>
657 </td>
658 </tr>
659 </table>
660 <br/>
661
662
663 Notes
664 -----
665
666 .. note::
667 - Tested against Enterprise SONiC Distribution by Dell Technologies.
668 - Supports ``check_mode``.
669
670
671
672 Examples
673 --------
674
675 .. code-block:: yaml
676
677 # Using "deleted" state
678 #
679 # Before state:
680 # -------------
681 #
682 # !
683 # router bgp 10 vrf VrfCheck1
684 # router-id 10.2.2.32
685 # route-map delay-timer 20
686 # log-neighbor-changes
687 # !
688 # router bgp 11 vrf VrfCheck2
689 # log-neighbor-changes
690 # bestpath as-path ignore
691 # bestpath med missing-as-worst confed
692 # bestpath compare-routerid
693 # !
694 # router bgp 4
695 # router-id 10.2.2.4
696 # graceful-restart enable
697 # graceful-restart restart-time 1
698 # graceful-restart stalepath-time 500
699 # route-map delay-timer 10
700 # bestpath as-path ignore
701 # bestpath as-path confed
702 # bestpath med missing-as-worst confed
703 # bestpath compare-routerid
704 # bestpath bandwidth default-weight
705 # !
706 #
707 - name: Delete BGP Global attributes
708 dellemc.enterprise_sonic.sonic_bgp:
709 config:
710 - bgp_as: 4
711 router_id: 10.2.2.4
712 rt_delay: 10
713 log_neighbor_changes: false
714 graceful_restart:
715 stale_routes_time: 500
716 restart_time: 1
717 bestpath:
718 as_path:
719 confed: true
720 ignore: true
721 multipath_relax: false
722 multipath_relax_as_set: true
723 bandwidth: default_weight
724 compare_routerid: true
725 med:
726 confed: true
727 missing_as_worst: true
728 - bgp_as: 10
729 router_id: 10.2.2.32
730 rt_delay: 20
731 log_neighbor_changes: true
732 vrf_name: 'VrfCheck1'
733 - bgp_as: 11
734 log_neighbor_changes: true
735 vrf_name: 'VrfCheck2'
736 bestpath:
737 as_path:
738 confed: false
739 ignore: true
740 multipath_relax_as_set: true
741 compare_routerid: true
742 med:
743 confed: true
744 missing_as_worst: true
745 state: deleted
746
747
748 # After state:
749 # ------------
750 #
751 # !
752 # router bgp 10 vrf VrfCheck1
753 # log-neighbor-changes
754 # !
755 # router bgp 11 vrf VrfCheck2
756 # log-neighbor-changes
757 # bestpath compare-routerid
758 # !
759 # router bgp 4
760 # graceful-restart enable
761 # log-neighbor-changes
762 # bestpath compare-routerid
763 # !
764
765
766 # Using "deleted" state
767 #
768 # Before state:
769 # -------------
770 #
771 # !
772 # router bgp 10 vrf VrfCheck1
773 # router-id 10.2.2.32
774 # route-map delay-timer 20
775 # log-neighbor-changes
776 # !
777 # router bgp 11 vrf VrfCheck2
778 # graceful-restart enable
779 # log-neighbor-changes
780 # bestpath as-path ignore
781 # bestpath med missing-as-worst confed
782 # bestpath compare-routerid
783 # bestpath bandwidth ignore-weight
784 # !
785 # router bgp 4
786 # router-id 10.2.2.4
787 # route-map delay-timer 10
788 # bestpath as-path ignore
789 # bestpath as-path confed
790 # bestpath med missing-as-worst confed
791 # bestpath compare-routerid
792 # !
793
794 - name: Deletes all the bgp global configurations
795 dellemc.enterprise_sonic.sonic_bgp:
796 config:
797 state: deleted
798
799 # After state:
800 # ------------
801 #
802 # !
803 # !
804
805
806 # Using "merged" state
807 #
808 # Before state:
809 # -------------
810 #
811 # !
812 # router bgp 4
813 # router-id 10.1.1.4
814 # !
815 #
816 - name: Merges provided configuration with device configuration
817 dellemc.enterprise_sonic.sonic_bgp:
818 config:
819 - bgp_as: 4
820 router_id: 10.2.2.4
821 rt_delay: 10
822 log_neighbor_changes: false
823 graceful_restart:
824 enabled: true
825 preserve_fw_state: true
826 timers:
827 holdtime: 20
828 keepalive_interval: 30
829 bestpath:
830 as_path:
831 confed: true
832 ignore: true
833 multipath_relax: false
834 multipath_relax_as_set: true
835 bandwidth: ignore-weight
836 compare_routerid: true
837 med:
838 confed: true
839 missing_as_worst: true
840 always_compare_med: true
841 max_med:
842 on_startup:
843 timer: 667
844 med_val: 7878
845 - bgp_as: 10
846 router_id: 10.2.2.32
847 rt_delay: 20
848 log_neighbor_changes: true
849 vrf_name: 'VrfCheck1'
850 - bgp_as: 11
851 log_neighbor_changes: true
852 vrf_name: 'VrfCheck2'
853 bestpath:
854 as_path:
855 confed: false
856 ignore: true
857 multipath_relax_as_set: true
858 compare_routerid: true
859 med:
860 confed: true
861 missing_as_worst: true
862 state: merged
863
864 #
865 # After state:
866 # ------------
867 #
868 # !
869 # router bgp 10 vrf VrfCheck1
870 # router-id 10.2.2.32
871 # route-map delay-timer 20
872 # log-neighbor-changes
873 # !
874 # router bgp 11 vrf VrfCheck2
875 # log-neighbor-changes
876 # bestpath as-path ignore
877 # bestpath med missing-as-worst confed
878 # bestpath compare-routerid
879 # !
880 # router bgp 4
881 # router-id 10.2.2.4
882 # graceful-restart enable
883 # graceful-restart preserve-fw-state
884 # route-map delay-timer 10
885 # bestpath as-path ignore
886 # bestpath as-path confed
887 # bestpath med missing-as-worst confed
888 # bestpath compare-routerid
889 # bestpath bandwidth ignore-weight
890 # always-compare-med
891 # max-med on-startup 667 7878
892 # timers 20 30
893 #
894 # !
895
896
897 # Using "replaced" state
898 #
899 # Before state:
900 # -------------
901 #
902 # !
903 # router bgp 10 vrf VrfCheck1
904 # router-id 10.2.2.32
905 # log-neighbor-changes
906 # timers 60 180
907 # !
908 # router bgp 4
909 # router-id 10.2.2.4
910 # max-med on-startup 667 7878
911 # bestpath as-path ignore
912 # bestpath as-path confed
913 # bestpath med missing-as-worst confed
914 # bestpath compare-routerid
915 # bestpath bandwidth default-weight
916 # timers 20 30
917 # !
918 #
919
920 - name: Replace device configuration of specified BGP AS with provided
921 dellemc.enterprise_sonic.sonic_bgp:
922 config:
923 - bgp_as: 4
924 router_id: 10.2.2.44
925 log_neighbor_changes: true
926 bestpath:
927 as_path:
928 confed: true
929 bandwidth: skip_missing
930 compare_routerid: true
931 - bgp_as: 11
932 vrf_name: 'VrfCheck2'
933 router_id: 10.2.2.33
934 log_neighbor_changes: true
935 bestpath:
936 as_path:
937 confed: true
938 ignore: true
939 compare_routerid: true
940 med:
941 confed: true
942 missing_as_worst: true
943 state: replaced
944
945 #
946 # After state:
947 # ------------
948 #
949 # !
950 # router bgp 10 vrf VrfCheck1
951 # router-id 10.2.2.32
952 # log-neighbor-changes
953 # timers 60 180
954 # !
955 # router bgp 11 vrf VrfCheck2
956 # router-id 10.2.2.33
957 # log-neighbor-changes
958 # bestpath as-path ignore
959 # bestpath as-path confed
960 # bestpath med missing-as-worst confed
961 # bestpath compare-routerid
962 # timers 60 180
963 # !
964 # router bgp 4
965 # router-id 10.2.2.44
966 # log-neighbor-changes
967 # bestpath as-path confed
968 # bestpath compare-routerid
969 # bestpath bandwidth skip_missing
970 # timers 60 180
971 # !
972
973
974 # Using "overridden" state
975 #
976 # Before state:
977 # -------------
978 #
979 # !
980 # router bgp 10 vrf VrfCheck1
981 # router-id 10.2.2.32
982 # log-neighbor-changes
983 # timers 60 180
984 # !
985 # router bgp 4
986 # router-id 10.2.2.4
987 # max-med on-startup 667 7878
988 # bestpath as-path ignore
989 # bestpath as-path confed
990 # bestpath med missing-as-worst confed
991 # bestpath compare-routerid
992 # bestpath bandwidth default-weight
993 # timers 20 30
994 # !
995 #
996
997 - name: Override device configuration of global BGP with provided configuration
998 dellemc.enterprise_sonic.sonic_bgp:
999 config:
1000 - bgp_as: 4
1001 router_id: 10.2.2.44
1002 log_neighbor_changes: true
1003 bestpath:
1004 as_path:
1005 confed: true
1006 compare_routerid: true
1007 - bgp_as: 11
1008 vrf_name: 'VrfCheck2'
1009 router_id: 10.2.2.33
1010 log_neighbor_changes: true
1011 bestpath:
1012 as_path:
1013 confed: true
1014 ignore: true
1015 compare_routerid: true
1016 timers:
1017 holdtime: 90
1018 keepalive_interval: 30
1019 state: overridden
1020
1021 #
1022 # After state:
1023 # ------------
1024 #
1025 # !
1026 # router bgp 11 vrf VrfCheck2
1027 # router-id 10.2.2.33
1028 # log-neighbor-changes
1029 # bestpath as-path ignore
1030 # bestpath as-path confed
1031 # bestpath compare-routerid
1032 # timers 30 90
1033 # !
1034 # router bgp 4
1035 # router-id 10.2.2.44
1036 # log-neighbor-changes
1037 # bestpath as-path confed
1038 # bestpath compare-routerid
1039 # timers 60 180
1040 # !
1041
1042
1043
1044 Return Values
1045 -------------
1046 Common return values are documented `here <https://docs.ansible.com/projects/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
1047
1048 .. raw:: html
1049
1050 <table border=0 cellpadding=0 class="documentation-table">
1051 <tr>
1052 <th colspan="1">Key</th>
1053 <th>Returned</th>
1054 <th width="100%">Description</th>
1055 </tr>
1056 <tr>
1057 <td colspan="1">
1058 <div class="ansibleOptionAnchor" id="return-"></div>
1059 <b>after</b>
1060 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
1061 <div style="font-size: small">
1062 <span style="color: purple">list</span>
1063 </div>
1064 </td>
1065 <td>when changed</td>
1066 <td>
1067 <div>The resulting configuration module invocation.</div>
1068 <br/>
1069 <div style="font-size: smaller"><b>Sample:</b></div>
1070 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned is always in the same format as the parameters above.</div>
1071 </td>
1072 </tr>
1073 <tr>
1074 <td colspan="1">
1075 <div class="ansibleOptionAnchor" id="return-"></div>
1076 <b>before</b>
1077 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
1078 <div style="font-size: small">
1079 <span style="color: purple">list</span>
1080 </div>
1081 </td>
1082 <td>always</td>
1083 <td>
1084 <div>The configuration prior to the module invocation.</div>
1085 <br/>
1086 <div style="font-size: smaller"><b>Sample:</b></div>
1087 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">The configuration returned is always in the same format as the parameters above.</div>
1088 </td>
1089 </tr>
1090 <tr>
1091 <td colspan="1">
1092 <div class="ansibleOptionAnchor" id="return-"></div>
1093 <b>commands</b>
1094 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
1095 <div style="font-size: small">
1096 <span style="color: purple">list</span>
1097 </div>
1098 </td>
1099 <td>always</td>
1100 <td>
1101 <div>The set of commands pushed to the remote device.</div>
1102 <br/>
1103 <div style="font-size: smaller"><b>Sample:</b></div>
1104 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;command 1&#x27;, &#x27;command 2&#x27;, &#x27;command 3&#x27;]</div>
1105 </td>
1106 </tr>
1107 </table>
1108 <br/><br/>
1109
1110
1111 Status
1112 ------
1113
1114
1115 Authors
1116 ~~~~~~~
1117
1118 - Dhivya P (@dhivayp)