Debian Codegraph @

ansible_collections/dellemc/enterprise_sonic/docs/dellemc.enterprise_sonic.sonic_br_l2pt_module.rst

raw
1 .. _dellemc.enterprise_sonic.sonic_br_l2pt_module:
2
3
4 **************************************
5 dellemc.enterprise_sonic.sonic_br_l2pt
6 **************************************
7
8 **Manage L2PT configurations on SONiC**
9
10
11 Version added: 3.1.0
12
13 .. contents::
14 :local:
15 :depth: 1
16
17
18 Synopsis
19 --------
20 - This module provides configuration management of L2PT parameters in devices running SONiC.
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="3">Parameter</th>
33 <th>Choices/<font color="blue">Defaults</font></th>
34 <th width="100%">Comments</th>
35 </tr>
36 <tr>
37 <td colspan="3">
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>A list of L2PT configurations.</div>
50 </td>
51 </tr>
52 <tr>
53 <td class="elbow-placeholder"></td>
54 <td colspan="2">
55 <div class="ansibleOptionAnchor" id="parameter-"></div>
56 <b>bridge_l2pt_params</b>
57 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
58 <div style="font-size: small">
59 <span style="color: purple">list</span>
60 / <span style="color: purple">elements=dictionary</span>
61 </div>
62 </td>
63 <td>
64 </td>
65 <td>
66 <div>VLAN ID list per supported Layer 2 protocol.</div>
67 </td>
68 </tr>
69 <tr>
70 <td class="elbow-placeholder"></td>
71 <td class="elbow-placeholder"></td>
72 <td colspan="1">
73 <div class="ansibleOptionAnchor" id="parameter-"></div>
74 <b>protocol</b>
75 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
76 <div style="font-size: small">
77 <span style="color: purple">string</span>
78 / <span style="color: red">required</span>
79 </div>
80 </td>
81 <td>
82 <ul style="margin: 0; padding: 0"><b>Choices:</b>
83 <li>LLDP</li>
84 <li>LACP</li>
85 <li>STP</li>
86 <li>CDP</li>
87 </ul>
88 </td>
89 <td>
90 <div>L2 protocol.</div>
91 </td>
92 </tr>
93 <tr>
94 <td class="elbow-placeholder"></td>
95 <td class="elbow-placeholder"></td>
96 <td colspan="1">
97 <div class="ansibleOptionAnchor" id="parameter-"></div>
98 <b>vlan_ids</b>
99 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
100 <div style="font-size: small">
101 <span style="color: purple">list</span>
102 / <span style="color: purple">elements=string</span>
103 </div>
104 </td>
105 <td>
106 </td>
107 <td>
108 <div>List of VLAN IDs on which the L2 Protocol packets are to be tunneled.</div>
109 <div>Ranges can be specified in the list of VLAN IDs using the delimiter &#x27;-&#x27;.</div>
110 </td>
111 </tr>
112
113 <tr>
114 <td class="elbow-placeholder"></td>
115 <td colspan="2">
116 <div class="ansibleOptionAnchor" id="parameter-"></div>
117 <b>name</b>
118 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
119 <div style="font-size: small">
120 <span style="color: purple">string</span>
121 / <span style="color: red">required</span>
122 </div>
123 </td>
124 <td>
125 </td>
126 <td>
127 <div>Interface name for L2PT configuration.</div>
128 </td>
129 </tr>
130
131 <tr>
132 <td colspan="3">
133 <div class="ansibleOptionAnchor" id="parameter-"></div>
134 <b>state</b>
135 <a class="ansibleOptionLink" href="#parameter-" title="Permalink to this option"></a>
136 <div style="font-size: small">
137 <span style="color: purple">string</span>
138 </div>
139 </td>
140 <td>
141 <ul style="margin: 0; padding: 0"><b>Choices:</b>
142 <li><div style="color: blue"><b>merged</b>&nbsp;&larr;</div></li>
143 <li>deleted</li>
144 <li>replaced</li>
145 <li>overridden</li>
146 </ul>
147 </td>
148 <td>
149 <div>The state of the configuration after module completion.</div>
150 </td>
151 </tr>
152 </table>
153 <br/>
154
155
156 Notes
157 -----
158
159 .. note::
160 - Tested against Enterprise SONiC Distribution by Dell Technologies.
161 - Supports ``check_mode``.
162
163
164
165 Examples
166 --------
167
168 .. code-block:: yaml
169
170 # Using "merged" state
171 #
172 # Before state:
173 # -------------
174 # sonic# show running-configuration interface Ethernet 0
175 # !
176 # interface Ethernet0
177 # mtu 9100
178 # speed 400000
179 # fec RS
180 # unreliable-los auto
181 # no shutdown
182 # switchport l2proto-tunnel lldp Vlan 10
183
184 - name: Modify interface L2PT configurations
185 dellemc.enterprise_sonic.sonic_br_l2pt:
186 config:
187 - name: Ethernet0
188 bridge_l2pt_params:
189 - protocol: 'LACP'
190 vlan_ids:
191 - 10-12
192 - protocol: 'CDP'
193 vlan_ids:
194 - 20
195 - 40-60
196 - protocol: 'STP'
197 vlan_ids:
198 - 25-26
199 state: merged
200
201 # After state:
202 # ------------
203 # sonic# show running-configuration interface Ethernet0
204 # !
205 # interface Ethernet0
206 # mtu 9100
207 # speed 400000
208 # fec RS
209 # unreliable-los auto
210 # no shutdown
211 # switchport l2proto-tunnel cdp Vlan 20,40-60
212 # switchport l2proto-tunnel lacp Vlan 10-12
213 # switchport l2proto-tunnel lldp Vlan 10
214 # switchport l2proto-tunnel stp Vlan 25-26
215
216
217 # Using "merged" state
218 #
219 # Before state:
220 # -------------
221 # sonic# show running-configuration interface Ethernet 0
222 # !
223 # interface Ethernet0
224 # mtu 9100
225 # speed 400000
226 # fec RS
227 # unreliable-los auto
228 # no shutdown
229 # switchport l2proto-tunnel cdp Vlan 20, 40-50
230 # switchport l2proto-tunnel lacp Vlan 10-11
231 # switchport l2proto-tunnel lldp Vlan 10
232 # switchport l2proto-tunnel stp Vlan 25-26
233
234 - name: Modify interface L2PT configurations
235 dellemc.enterprise_sonic.sonic_br_l2pt:
236 config:
237 - name: Ethernet0
238 bridge_l2pt_params:
239 - protocol: 'LLDP'
240 vlan_ids:
241 - 12
242 - protocol: 'LACP'
243 vlan_ids:
244 - 12
245 - protocol: 'CDP'
246 vlan_ids:
247 - 20
248 - 45-60
249 - protocol: 'STP'
250 vlan_ids:
251 - 20-21
252 state: merged
253
254 # After state:
255 # ------------
256 # sonic# show running-configuration interface Ethernet0
257 # !
258 # interface Ethernet0
259 # mtu 9100
260 # speed 400000
261 # fec RS
262 # unreliable-los auto
263 # no shutdown
264 # switchport l2proto-tunnel cdp Vlan 20,40-60
265 # switchport l2proto-tunnel lacp Vlan 10-12
266 # switchport l2proto-tunnel lldp Vlan 10,12
267 # switchport l2proto-tunnel stp Vlan 20-21,25-26
268
269
270 # Using "deleted" state
271 #
272 # Before state:
273 # -------------
274 # sonic# show running-configuration interface Ethernet 0
275 # !
276 # interface Ethernet0
277 # mtu 9100
278 # speed 400000
279 # fec RS
280 # unreliable-los auto
281 # no shutdown
282 # switchport l2proto-tunnel lacp Vlan 10-12
283 # switchport l2proto-tunnel cdp Vlan 20,40-60
284 # switchport l2proto-tunnel stp Vlan 25-26
285
286 - name: Delete interface L2PT configurations
287 dellemc.enterprise_sonic.sonic_br_l2pt:
288 config:
289 - name: Ethernet0
290 bridge_l2pt_params:
291 - protocol: 'LACP'
292 vlan_ids:
293 - 10-12
294 state: deleted
295
296 # After state:
297 # ------------
298 # sonic# show running-configuration interface Ethernet0
299 # !
300 # interface Ethernet0
301 # mtu 9100
302 # speed 400000
303 # fec RS
304 # unreliable-los auto
305 # no shutdown
306 # switchport l2proto-tunnel cdp Vlan 20,40-60
307 # switchport l2proto-tunnel stp Vlan 25-26
308
309
310 # Using "deleted" state
311 #
312 # Before state:
313 # -------------
314 # sonic# show running-configuration interface Ethernet 0
315 # !
316 # interface Ethernet0
317 # mtu 9100
318 # speed 400000
319 # fec RS
320 # unreliable-los auto
321 # no shutdown
322 # switchport l2proto-tunnel lacp Vlan 10-12
323 # switchport l2proto-tunnel cdp Vlan 20,40-60
324 # switchport l2proto-tunnel stp Vlan 25-26
325 # sonic# show running-configuration interface Ethernet 8
326 # !
327 # interface Ethernet8
328 # mtu 9100
329 # speed 400000
330 # fec RS
331 # unreliable-los auto
332 # no shutdown
333 # switchport l2proto-tunnel lldp Vlan 100
334 # switchport l2proto-tunnel stp Vlan 100-150
335
336 - name: Delete all interface L2PT configurations
337 dellemc.enterprise_sonic.sonic_br_l2pt:
338 config:
339 state: deleted
340
341 # After state:
342 # ------------
343 # sonic# show running-configuration interface Ethernet0
344 # !
345 # interface Ethernet0
346 # mtu 9100
347 # speed 400000
348 # fec RS
349 # unreliable-los auto
350 # no shutdown
351 # sonic# show running-configuration interface Ethernet 8
352 # !
353 # interface Ethernet8
354 # mtu 9100
355 # speed 400000
356 # fec RS
357 # unreliable-los auto
358 # no shutdown
359
360
361 # Using "deleted" state
362 #
363 # Before state:
364 # -------------
365 # sonic# show running-configuration interface Ethernet 0
366 # !
367 # interface Ethernet0
368 # mtu 9100
369 # speed 400000
370 # fec RS
371 # unreliable-los auto
372 # no shutdown
373 # switchport l2proto-tunnel lacp Vlan 10-12
374 # switchport l2proto-tunnel cdp Vlan 20,40-60
375 # switchport l2proto-tunnel stp Vlan 25-26
376
377 - name: Delete L2PT configurations for protocol
378 dellemc.enterprise_sonic.sonic_br_l2pt:
379 config:
380 - name: Ethernet0
381 bridge_l2pt_params:
382 - protocol: 'LACP'
383 - protocol: 'CDP'
384 vlan_ids: []
385 state: deleted
386
387 # After state:
388 # ------------
389 # sonic# show running-configuration interface Ethernet0
390 # !
391 # interface Ethernet0
392 # mtu 9100
393 # speed 400000
394 # fec RS
395 # unreliable-los auto
396 # no shutdown
397 # switchport l2proto-tunnel stp Vlan 25-26
398
399
400 # Using "deleted" state
401 #
402 # Before state:
403 # -------------
404 # sonic# show running-configuration interface Ethernet 0
405 # !
406 # interface Ethernet0
407 # mtu 9100
408 # speed 400000
409 # fec RS
410 # unreliable-los auto
411 # no shutdown
412 # switchport l2proto-tunnel lacp Vlan 10-12
413 # switchport l2proto-tunnel cdp Vlan 20,40-60
414 # switchport l2proto-tunnel stp Vlan 25-26
415
416 - name: Delete interface L2PT configurations
417 dellemc.enterprise_sonic.sonic_br_l2pt:
418 config:
419 - name: Ethernet0
420 bridge_l2pt_params:
421 - protocol: 'LACP'
422 vlan_ids:
423 - 11
424 - protocol: 'CDP'
425 vlan_ids:
426 - 40-50
427 state: deleted
428
429 # After state:
430 # ------------
431 # sonic# show running-configuration interface Ethernet0
432 # !
433 # interface Ethernet0
434 # mtu 9100
435 # speed 400000
436 # fec RS
437 # unreliable-los auto
438 # no shutdown
439 # switchport l2proto-tunnel lacp Vlan 10,12
440 # switchport l2proto-tunnel cdp Vlan 20,51-60
441 # switchport l2proto-tunnel stp Vlan 25-26
442
443
444 # Using "deleted" state
445 #
446 # Before state:
447 # -------------
448 # sonic# show running-configuration interface Ethernet 0
449 # !
450 # interface Ethernet0
451 # mtu 9100
452 # speed 400000
453 # fec RS
454 # unreliable-los auto
455 # no shutdown
456 # switchport l2proto-tunnel lacp Vlan 10-12
457 # switchport l2proto-tunnel cdp Vlan 20,40-60
458 # switchport l2proto-tunnel stp Vlan 25-26
459 # sonic# show running-configuration interface Ethernet 8
460 # !
461 # interface Ethernet8
462 # mtu 9100
463 # speed 400000
464 # fec RS
465 # unreliable-los auto
466 # no shutdown
467 # switchport l2proto-tunnel lacp Vlan 10-12
468 # switchport l2proto-tunnel cdp Vlan 20,40-60
469 # switchport l2proto-tunnel stp Vlan 25-26
470
471 - name: Delete L2PT configurations for entire interface
472 dellemc.enterprise_sonic.sonic_br_l2pt:
473 config:
474 - name: Ethernet0
475 bridge_l2pt_params: []
476 - name: Ethernet8
477 state: deleted
478
479 # After state:
480 # ------------
481 # sonic# show running-configuration interface Ethernet 0
482 # !
483 # interface Ethernet0
484 # mtu 9100
485 # speed 400000
486 # fec RS
487 # unreliable-los auto
488 # no shutdown
489 # sonic# show running-configuration interface Ethernet 8
490 # !
491 # interface Ethernet8
492 # mtu 9100
493 # speed 400000
494 # fec RS
495 # unreliable-los auto
496 # no shutdown
497
498
499 # Using "replaced" state
500 #
501 # Before state:
502 # -------------
503 # sonic# show running-configuration interface Ethernet 0
504 # !
505 # interface Ethernet0
506 # mtu 9100
507 # speed 400000
508 # fec RS
509 # unreliable-los auto
510 # no shutdown
511 # switchport l2proto-tunnel lacp Vlan 10-12
512 # switchport l2proto-tunnel cdp Vlan 20,40-60
513 # switchport l2proto-tunnel stp Vlan 25-26
514 # sonic# show running-configuration interface Ethernet 8
515 # !
516 # interface Ethernet8
517 # mtu 9100
518 # speed 400000
519 # fec RS
520 # unreliable-los auto
521 # no shutdown
522 # switchport l2proto-tunnel lldp Vlan 100
523 # switchport l2proto-tunnel stp Vlan 100-150
524
525 - name: Replace interface L2PT configurations
526 dellemc.enterprise_sonic.sonic_br_l2pt:
527 config:
528 - name: Ethernet0
529 bridge_l2pt_params:
530 - protocol: 'LLDP'
531 vlan_ids:
532 - 10-12
533 - protocol: 'LACP'
534 vlan_ids:
535 - 8
536 - 12-14
537 - protocol: 'CDP'
538 vlan_ids:
539 - 20-45
540 state: replaced
541
542 # After state:
543 # ------------
544 # sonic# show running-configuration interface Ethernet 0
545 # !
546 # interface Ethernet0
547 # mtu 9100
548 # speed 400000
549 # fec RS
550 # unreliable-los auto
551 # no shutdown
552 # switchport l2proto-tunnel lldp Vlan 10-12
553 # switchport l2proto-tunnel lacp Vlan 8,12-14
554 # switchport l2proto-tunnel cdp Vlan 20-45
555 # sonic# show running-configuration interface Ethernet 8
556 # !
557 # interface Ethernet8
558 # mtu 9100
559 # speed 400000
560 # fec RS
561 # unreliable-los auto
562 # no shutdown
563 # switchport l2proto-tunnel lldp Vlan 100
564 # switchport l2proto-tunnel stp Vlan 100-150
565
566
567 # Using "overridden" state
568 #
569 # Before state:
570 # -------------
571 # sonic# show running-configuration interface Ethernet 0
572 # !
573 # interface Ethernet0
574 # mtu 9100
575 # speed 400000
576 # fec RS
577 # unreliable-los auto
578 # no shutdown
579 # switchport l2proto-tunnel lldp Vlan 10
580 # switchport l2proto-tunnel lacp Vlan 15-50
581 # switchport l2proto-tunnel cdp 20
582 # switchport l2proto-tunnel stp 25-26
583 # sonic# show running-configuration interface Ethernet 8
584 # !
585 # interface Ethernet8
586 # mtu 9100
587 # speed 400000
588 # fec RS
589 # unreliable-los auto
590 # no shutdown
591 # switchport l2proto-tunnel lldp Vlan 100
592 # switchport l2proto-tunnel stp Vlan 100-150
593
594 - name: Override interface L2PT configurations
595 dellemc.enterprise_sonic.sonic_br_l2pt:
596 config:
597 - name: Ethernet0
598 bridge_l2pt_params:
599 - protocol: 'LACP'
600 vlan_ids:
601 - 10-12
602 - protocol: 'CDP'
603 vlan_ids:
604 - 20
605 - 40-60
606 - protocol: 'STP'
607 vlan_ids:
608 - 25-26
609 state: overridden
610
611 # After state:
612 # ------------
613 # sonic# show running-configuration interface Ethernet0
614 # !
615 # interface Ethernet0
616 # mtu 9100
617 # speed 400000
618 # fec RS
619 # unreliable-los auto
620 # no shutdown
621 # switchport l2proto-tunnel cdp Vlan 20,40-60
622 # switchport l2proto-tunnel lacp Vlan 10-12
623 # switchport l2proto-tunnel stp Vlan 25-26
624
625
626
627 Return Values
628 -------------
629 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:
630
631 .. raw:: html
632
633 <table border=0 cellpadding=0 class="documentation-table">
634 <tr>
635 <th colspan="1">Key</th>
636 <th>Returned</th>
637 <th width="100%">Description</th>
638 </tr>
639 <tr>
640 <td colspan="1">
641 <div class="ansibleOptionAnchor" id="return-"></div>
642 <b>after</b>
643 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
644 <div style="font-size: small">
645 <span style="color: purple">list</span>
646 </div>
647 </td>
648 <td>when changed</td>
649 <td>
650 <div>The configuration resulting from module invocation.</div>
651 <br/>
652 </td>
653 </tr>
654 <tr>
655 <td colspan="1">
656 <div class="ansibleOptionAnchor" id="return-"></div>
657 <b>after_generated</b>
658 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
659 <div style="font-size: small">
660 <span style="color: purple">list</span>
661 </div>
662 </td>
663 <td>when <code>check_mode</code></td>
664 <td>
665 <div>The configuration that would result from non-check-mode module invocation.</div>
666 <br/>
667 </td>
668 </tr>
669 <tr>
670 <td colspan="1">
671 <div class="ansibleOptionAnchor" id="return-"></div>
672 <b>before</b>
673 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
674 <div style="font-size: small">
675 <span style="color: purple">list</span>
676 </div>
677 </td>
678 <td>always</td>
679 <td>
680 <div>The configuration prior to the module invocation.</div>
681 <br/>
682 </td>
683 </tr>
684 <tr>
685 <td colspan="1">
686 <div class="ansibleOptionAnchor" id="return-"></div>
687 <b>commands</b>
688 <a class="ansibleOptionLink" href="#return-" title="Permalink to this return value"></a>
689 <div style="font-size: small">
690 <span style="color: purple">list</span>
691 </div>
692 </td>
693 <td>always</td>
694 <td>
695 <div>The set of commands pushed to the remote device. In <code>check_mode</code> the needed commands are displayed, but not pushed to the device.</div>
696 <br/>
697 <div style="font-size: smaller"><b>Sample:</b></div>
698 <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>
699 </td>
700 </tr>
701 </table>
702 <br/><br/>
703
704
705 Status
706 ------
707
708
709 Authors
710 ~~~~~~~
711
712 - Allen Ting (@allenkting)