Debian Codegraph @

ansible_collections/cisco/ios/docs/cisco.ios.ios_evpn_global_module.rst

raw
1 .. _cisco.ios.ios_evpn_global_module:
2
3
4 *************************
5 cisco.ios.ios_evpn_global
6 *************************
7
8 **Resource module to configure L2VPN EVPN.**
9
10
11 Version added: 5.3.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - This module provides declarative management of L2VPN EVPN on Cisco IOS network devices.
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">dictionary</span>
43 </div>
44 </td>
45 <td>
46 </td>
47 <td>
48 <div>A dictionary of L2VPN Ethernet Virtual Private Network (EVPN) configuration</div>
49 </td>
50 </tr>
51 <tr>
52 <td class="elbow-placeholder"></td>
53 <td colspan="3">
54 <div class="ansibleOptionAnchor" id="parameter-"></div>
55 <b>default_gateway</b>
56 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
57 <div style="font-size: small">
58 <span style="color: purple">dictionary</span>
59 </div>
60 </td>
61 <td>
62 </td>
63 <td>
64 <div>Default gateway parameters</div>
65 </td>
66 </tr>
67 <tr>
68 <td class="elbow-placeholder"></td>
69 <td class="elbow-placeholder"></td>
70 <td colspan="2">
71 <div class="ansibleOptionAnchor" id="parameter-"></div>
72 <b>advertise</b>
73 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
74 <div style="font-size: small">
75 <span style="color: purple">boolean</span>
76 </div>
77 </td>
78 <td>
79 <ul style="margin: 0; padding: 0"><b>Choices:</b>
80 <li>no</li>
81 <li>yes</li>
82 </ul>
83 </td>
84 <td>
85 <div>Advertise Default Gateway MAC/IP routes</div>
86 </td>
87 </tr>
88
89 <tr>
90 <td class="elbow-placeholder"></td>
91 <td colspan="3">
92 <div class="ansibleOptionAnchor" id="parameter-"></div>
93 <b>flooding_suppression</b>
94 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
95 <div style="font-size: small">
96 <span style="color: purple">dictionary</span>
97 </div>
98 </td>
99 <td>
100 </td>
101 <td>
102 <div>Suppress flooding of broadcast, multicast, and/or unknown unicast packets</div>
103 </td>
104 </tr>
105 <tr>
106 <td class="elbow-placeholder"></td>
107 <td class="elbow-placeholder"></td>
108 <td colspan="2">
109 <div class="ansibleOptionAnchor" id="parameter-"></div>
110 <b>address_resolution</b>
111 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
112 <div style="font-size: small">
113 <span style="color: purple">dictionary</span>
114 </div>
115 </td>
116 <td>
117 </td>
118 <td>
119 <div>Suppress flooding of Address Resolution and Neighbor Discovery Protocol packets</div>
120 </td>
121 </tr>
122 <tr>
123 <td class="elbow-placeholder"></td>
124 <td class="elbow-placeholder"></td>
125 <td class="elbow-placeholder"></td>
126 <td colspan="1">
127 <div class="ansibleOptionAnchor" id="parameter-"></div>
128 <b>disable</b>
129 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
130 <div style="font-size: small">
131 <span style="color: purple">boolean</span>
132 </div>
133 </td>
134 <td>
135 <ul style="margin: 0; padding: 0"><b>Choices:</b>
136 <li>no</li>
137 <li>yes</li>
138 </ul>
139 </td>
140 <td>
141 <div>Disable flooding suppression</div>
142 </td>
143 </tr>
144
145
146 <tr>
147 <td class="elbow-placeholder"></td>
148 <td colspan="3">
149 <div class="ansibleOptionAnchor" id="parameter-"></div>
150 <b>ip</b>
151 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
152 <div style="font-size: small">
153 <span style="color: purple">dictionary</span>
154 </div>
155 </td>
156 <td>
157 </td>
158 <td>
159 <div>IP parameters</div>
160 </td>
161 </tr>
162 <tr>
163 <td class="elbow-placeholder"></td>
164 <td class="elbow-placeholder"></td>
165 <td colspan="2">
166 <div class="ansibleOptionAnchor" id="parameter-"></div>
167 <b>local_learning</b>
168 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
169 <div style="font-size: small">
170 <span style="color: purple">dictionary</span>
171 </div>
172 </td>
173 <td>
174 </td>
175 <td>
176 <div>IP local learning</div>
177 </td>
178 </tr>
179 <tr>
180 <td class="elbow-placeholder"></td>
181 <td class="elbow-placeholder"></td>
182 <td class="elbow-placeholder"></td>
183 <td colspan="1">
184 <div class="ansibleOptionAnchor" id="parameter-"></div>
185 <b>disable</b>
186 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
187 <div style="font-size: small">
188 <span style="color: purple">boolean</span>
189 </div>
190 </td>
191 <td>
192 <ul style="margin: 0; padding: 0"><b>Choices:</b>
193 <li>no</li>
194 <li>yes</li>
195 </ul>
196 </td>
197 <td>
198 <div>Disable IP local learning</div>
199 </td>
200 </tr>
201
202
203 <tr>
204 <td class="elbow-placeholder"></td>
205 <td colspan="3">
206 <div class="ansibleOptionAnchor" id="parameter-"></div>
207 <b>replication_type</b>
208 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
209 <div style="font-size: small">
210 <span style="color: purple">string</span>
211 </div>
212 </td>
213 <td>
214 <ul style="margin: 0; padding: 0"><b>Choices:</b>
215 <li>ingress</li>
216 <li>static</li>
217 </ul>
218 </td>
219 <td>
220 <div>Method for replicating BUM traffic</div>
221 </td>
222 </tr>
223 <tr>
224 <td class="elbow-placeholder"></td>
225 <td colspan="3">
226 <div class="ansibleOptionAnchor" id="parameter-"></div>
227 <b>route_target</b>
228 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
229 <div style="font-size: small">
230 <span style="color: purple">dictionary</span>
231 </div>
232 </td>
233 <td>
234 </td>
235 <td>
236 <div>Route Target VPN Extended Communities</div>
237 </td>
238 </tr>
239 <tr>
240 <td class="elbow-placeholder"></td>
241 <td class="elbow-placeholder"></td>
242 <td colspan="2">
243 <div class="ansibleOptionAnchor" id="parameter-"></div>
244 <b>auto</b>
245 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
246 <div style="font-size: small">
247 <span style="color: purple">dictionary</span>
248 </div>
249 </td>
250 <td>
251 </td>
252 <td>
253 <div>Automatically set a route-target</div>
254 </td>
255 </tr>
256 <tr>
257 <td class="elbow-placeholder"></td>
258 <td class="elbow-placeholder"></td>
259 <td class="elbow-placeholder"></td>
260 <td colspan="1">
261 <div class="ansibleOptionAnchor" id="parameter-"></div>
262 <b>vni</b>
263 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
264 <div style="font-size: small">
265 <span style="color: purple">boolean</span>
266 </div>
267 </td>
268 <td>
269 <ul style="margin: 0; padding: 0"><b>Choices:</b>
270 <li>no</li>
271 <li>yes</li>
272 </ul>
273 </td>
274 <td>
275 <div>Set vni-based route-target</div>
276 </td>
277 </tr>
278
279
280 <tr>
281 <td class="elbow-placeholder"></td>
282 <td colspan="3">
283 <div class="ansibleOptionAnchor" id="parameter-"></div>
284 <b>router_id</b>
285 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
286 <div style="font-size: small">
287 <span style="color: purple">string</span>
288 </div>
289 </td>
290 <td>
291 </td>
292 <td>
293 <div>EVPN router ID</div>
294 </td>
295 </tr>
296
297 <tr>
298 <td colspan="4">
299 <div class="ansibleOptionAnchor" id="parameter-"></div>
300 <b>running_config</b>
301 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
302 <div style="font-size: small">
303 <span style="color: purple">string</span>
304 </div>
305 </td>
306 <td>
307 </td>
308 <td>
309 <div>This option is used only with state <em>parsed</em>.</div>
310 <div>The value of this option should be the output received from the IOS device by executing the command <b>sh running-config nve | section ^l2vpn evpn$</b>.</div>
311 <div>The state <em>parsed</em> reads the configuration from <code>running_config</code> option and transforms it into Ansible structured data as per the resource module&#x27;s argspec and the value is then returned in the <em>parsed</em> key within the result.</div>
312 </td>
313 </tr>
314 <tr>
315 <td colspan="4">
316 <div class="ansibleOptionAnchor" id="parameter-"></div>
317 <b>state</b>
318 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
319 <div style="font-size: small">
320 <span style="color: purple">string</span>
321 </div>
322 </td>
323 <td>
324 <ul style="margin: 0; padding: 0"><b>Choices:</b>
325 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
326 <li>replaced</li>
327 <li>overridden</li>
328 <li>deleted</li>
329 <li>gathered</li>
330 <li>rendered</li>
331 <li>parsed</li>
332 </ul>
333 </td>
334 <td>
335 <div>The state the configuration should be left in</div>
336 </td>
337 </tr>
338 </table>
339 <br/>
340
341
342 Notes
343 -----
344
345 .. note::
346 - Tested against Cisco IOS-XE device with Version 17.13.01 on Cat9k on CML.
347 - This module works with connection ``network_cli``. See https://docs.ansible.com/ansible/latest/network/user_guide/platform_ios.html
348
349
350
351 Examples
352 --------
353
354 .. code-block:: yaml
355
356 # Using merged
357
358 # Before state:
359 # -------------
360 #
361 # Leaf-01#show running-config nve | section ^l2vpn evpn$
362 # l2vpn evpn
363 # replication-type static
364 # router-id Loopback1
365 # default-gateway advertise
366
367 - name: Merge provided configuration with device configuration
368 cisco.ios.ios_evpn_global:
369 config:
370 replication_type: ingress
371 route_target:
372 auto:
373 vni: true
374 default_gateway:
375 advertise: false
376 ip:
377 local_learning:
378 disable: true
379 flooding_suppression:
380 address_resolution:
381 disable: false
382 state: merged
383
384 # Task Output
385 # -----------
386 #
387 # before:
388 # - replication_type: static
389 # router_id: Loopback1
390 # default_gateway:
391 # advertise: true
392 # commands:
393 # - l2vpn evpn
394 # no default-gateway advertise
395 # replication-type ingress
396 # route-target auto vni
397 # ip local-learning disable
398 # after:
399 # - replication_type: ingress
400 # router_id: Loopback1
401 # route_target:
402 # auto:
403 # vni: true
404 # ip:
405 # local_learning:
406 # disable: true
407
408 # After state:
409 # ------------
410 #
411 # Leaf-01#show running-config nve | section ^l2vpn evpn$
412 # l2vpn evpn
413 # replication-type ingress
414 # router-id Loopback1
415 # ip local-learning disable
416 # route-target auto vni
417
418 # Using replaced
419
420 # Before state:
421 # -------------
422 #
423 # Leaf-01#show running-config nve | section ^l2vpn evpn$
424 # l2vpn evpn
425 # replication-type ingress
426 # router-id Loopback1
427 # ip local-learning disable
428 # route-target auto vni
429
430 - name: Replaces device configuration for EVPN global with provided configuration
431 cisco.ios.ios_evpn_global:
432 config:
433 replication_type: static
434 router_id: Loopback2
435 default_gateway:
436 advertise: true
437 flooding_suppression:
438 address_resolution:
439 disable: true
440 state: replaced
441
442 # Task Output
443 # -----------
444 #
445 # before:
446 # - replication_type: ingress
447 # router_id: Loopback1
448 # route_target:
449 # auto:
450 # vni: true
451 # ip:
452 # local_learning:
453 # disable: true
454 # commands:
455 # - l2vpn evpn
456 # - default-gateway advertise
457 # - flooding-suppression address-resolution disable
458 # - no ip local-learning disable
459 # - replication-type static
460 # - no route-target auto vni
461 # - router-id Loopback2
462 # after:
463 # - replication_type: ingress
464 # router_id: Loopback2
465 # default_gateway:
466 # advertise: true
467 # flooding_suppression:
468 # address_resolution:
469 # disable: true
470
471 # After state:
472 # ------------
473 #
474 # Leaf-01#show running-config nve | section ^l2vpn evpn$
475 # l2vpn evpn
476 # replication-type static
477 # flooding-suppression address-resolution disable
478 # router-id Loopback2
479 # default-gateway advertise
480
481 # Using Deleted
482
483 # Before state:
484 # -------------
485 #
486 # Leaf-01#show running-config nve | section ^l2vpn evpn$
487 # l2vpn evpn
488 # replication-type static
489 # flooding-suppression address-resolution disable
490 # router-id Loopback2
491 # default-gateway advertise
492
493 - name: Delete EVPN global
494 cisco.ios.ios_evpn_global:
495 config:
496 state: deleted
497
498 # before:
499 # - replication_type: ingress
500 # router_id: Loopback2
501 # default_gateway:
502 # advertise: true
503 # flooding_suppression:
504 # address_resolution:
505 # disable: true
506 # commands:
507 # - no l2vpn evpn
508 # after:
509 #
510
511 # After state:
512 # -------------
513 #
514 # Leaf-01#show running-config nve | section ^l2vpn evpn$
515 #
516
517 # Using gathered
518
519 # Before state:
520 # -------------
521 #
522 # Leaf-01#show running-config nve | section ^l2vpn evpn$
523 # l2vpn evpn
524 # replication-type ingress
525 # router-id Loopback1
526 # ip local-learning disable
527 # route-target auto vni
528
529 - name: Gather facts of l2vpn evpn
530 cisco.ios.ios_evpn_global:
531 config:
532 state: gathered
533
534 # Task Output:
535 # ------------
536 #
537 # gathered:
538 # - replication_type: ingress
539 # route_target:
540 # auto:
541 # vni: true
542 # router_id: Loopback1
543 # ip:
544 # local_learning:
545 # disable: true
546
547 # Using rendered
548
549 - name: Render the commands for provided configuration
550 cisco.ios.ios_evpn_global:
551 config:
552 replication_type: static
553 route_target:
554 auto:
555 vni: true
556 state: rendered
557
558 # Task Output:
559 # ------------
560 #
561 # rendered:
562 # - l2vpn evpn
563 # - replication-type static
564 # - route-target auto vni
565
566 # Using parsed
567
568 # File: parsed.cfg
569 # ----------------
570 #
571 # l2vpn evpn
572 # replication-type ingress
573 # router-id Loopback1
574 # default-gateway advertise
575 # route-target auto vni
576
577 - name: Parse the provided configuration
578 cisco.ios.ios_evpn_global:
579 running_config: "{{ lookup('file', 'parsed.cfg') }}"
580 state: parsed
581
582 # Task Output:
583 # ------------
584 #
585 # parsed:
586 # - replication_type: ingress
587 # route_target:
588 # auto:
589 # vni: true
590 # router_id: Loopback1
591 # default_gateway:
592 # advertise: true
593
594
595
596 Return Values
597 -------------
598 Common return values are documented `here <https://docs.ansible.com/ansible/latest/reference_appendices/common_return_values.html#common-return-values>`_, the following are the fields unique to this module:
599
600 .. raw:: html
601
602 <table border=0 cellpadding=0 class="documentation-table">
603 <tr>
604 <th colspan="1">Key</th>
605 <th>Returned</th>
606 <th width="100%">Description</th>
607 </tr>
608 <tr>
609 <td colspan="1">
610 <div class="ansibleOptionAnchor" id="return-"></div>
611 <b>after</b>
612 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
613 <div style="font-size: small">
614 <span style="color: purple">dictionary</span>
615 </div>
616 </td>
617 <td>when changed</td>
618 <td>
619 <div>The resulting configuration after module execution.</div>
620 <br/>
621 <div style="font-size: smaller"><b>Sample:</b></div>
622 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
623 </td>
624 </tr>
625 <tr>
626 <td colspan="1">
627 <div class="ansibleOptionAnchor" id="return-"></div>
628 <b>before</b>
629 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
630 <div style="font-size: small">
631 <span style="color: purple">dictionary</span>
632 </div>
633 </td>
634 <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, or <code>deleted</code></td>
635 <td>
636 <div>The configuration prior to the module execution.</div>
637 <br/>
638 <div style="font-size: smaller"><b>Sample:</b></div>
639 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
640 </td>
641 </tr>
642 <tr>
643 <td colspan="1">
644 <div class="ansibleOptionAnchor" id="return-"></div>
645 <b>commands</b>
646 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
647 <div style="font-size: small">
648 <span style="color: purple">list</span>
649 </div>
650 </td>
651 <td>when <em>state</em> is <code>merged</code>, <code>replaced</code>, <code>overridden</code>, or <code>deleted</code></td>
652 <td>
653 <div>The set of commands pushed to the remote device.</div>
654 <br/>
655 <div style="font-size: smaller"><b>Sample:</b></div>
656 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;l2vpn evpn&#x27;, &#x27;replication-type ingress&#x27;, &#x27;router_id Loopback1&#x27;]</div>
657 </td>
658 </tr>
659 <tr>
660 <td colspan="1">
661 <div class="ansibleOptionAnchor" id="return-"></div>
662 <b>gathered</b>
663 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
664 <div style="font-size: small">
665 <span style="color: purple">list</span>
666 </div>
667 </td>
668 <td>when <em>state</em> is <code>gathered</code></td>
669 <td>
670 <div>Facts about the network resource gathered from the remote device as structured data.</div>
671 <br/>
672 <div style="font-size: smaller"><b>Sample:</b></div>
673 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
674 </td>
675 </tr>
676 <tr>
677 <td colspan="1">
678 <div class="ansibleOptionAnchor" id="return-"></div>
679 <b>parsed</b>
680 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
681 <div style="font-size: small">
682 <span style="color: purple">list</span>
683 </div>
684 </td>
685 <td>when <em>state</em> is <code>parsed</code></td>
686 <td>
687 <div>The device native config provided in <em>running_config</em> option parsed into structured data as per module argspec.</div>
688 <br/>
689 <div style="font-size: smaller"><b>Sample:</b></div>
690 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">This output will always be in the same format as the module argspec.</div>
691 </td>
692 </tr>
693 <tr>
694 <td colspan="1">
695 <div class="ansibleOptionAnchor" id="return-"></div>
696 <b>rendered</b>
697 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
698 <div style="font-size: small">
699 <span style="color: purple">list</span>
700 </div>
701 </td>
702 <td>when <em>state</em> is <code>rendered</code></td>
703 <td>
704 <div>The provided configuration in the task rendered in device-native format (offline).</div>
705 <br/>
706 <div style="font-size: smaller"><b>Sample:</b></div>
707 <div style="font-size: smaller; color: blue; word-wrap: break-word; word-break: break-all;">[&#x27;l2vpn evpn&#x27;, &#x27;replication-type static&#x27;, &#x27;route-target auto vni&#x27;]</div>
708 </td>
709 </tr>
710 </table>
711 <br/><br/>
712
713
714 Status
715 ------
716
717
718 Authors
719 ~~~~~~~
720
721 - Padmini Priyadarshini Sivaraj (@PadminiSivaraj)