-
Notifications
You must be signed in to change notification settings - Fork 106
/
.README.html
1651 lines (1640 loc) · 151 KB
/
.README.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<!--
==============================================================================
"GitHub HTML5 Pandoc Template" v2.2 — by Tristano Ajmone
==============================================================================
Copyright © Tristano Ajmone, 2017-2020, MIT License (MIT). Project's home:
- https://github.com/tajmone/pandoc-goodies
The CSS in this template reuses source code taken from the following projects:
- GitHub Markdown CSS: Copyright © Sindre Sorhus, MIT License (MIT):
https://github.com/sindresorhus/github-markdown-css
- Primer CSS: Copyright © 2016-2017 GitHub Inc., MIT License (MIT):
http://primercss.io/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The MIT License
Copyright (c) Tristano Ajmone, 2017-2020 (github.com/tajmone/pandoc-goodies)
Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
Copyright (c) 2017 GitHub Inc.
"GitHub Pandoc HTML5 Template" is Copyright (c) Tristano Ajmone, 2017-2020,
released under the MIT License (MIT); it contains readaptations of substantial
portions of the following third party softwares:
(1) "GitHub Markdown CSS", Copyright (c) Sindre Sorhus, MIT License (MIT).
(2) "Primer CSS", Copyright (c) 2016 GitHub Inc., MIT License (MIT).
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
==============================================================================-->
<html>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>linux-system-roles/network</title>
<style type="text/css">
@charset "UTF-8";.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:#24292e;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;line-height:1.5;word-wrap:break-word;box-sizing:border-box;min-width:200px;margin:0 auto;padding:45px}.markdown-body a{color:#0366d6;background-color:transparent;text-decoration:none;-webkit-text-decoration-skip:objects}.markdown-body a:active,.markdown-body a:hover{outline-width:0}.markdown-body a:hover{text-decoration:underline}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body strong{font-weight:600}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}.markdown-body h1{font-size:2em;margin:.67em 0;padding-bottom:.3em;border-bottom:1px solid #eaecef}.markdown-body h2{padding-bottom:.3em;font-size:1.5em;border-bottom:1px solid #eaecef}.markdown-body h3{font-size:1.25em}.markdown-body h4{font-size:1em}.markdown-body h5{font-size:.875em}.markdown-body h6{font-size:.85em;color:#6a737d}.markdown-body img{border-style:none}.markdown-body svg:not(:root){overflow:hidden}.markdown-body hr{box-sizing:content-box;height:.25em;margin:24px 0;padding:0;overflow:hidden;background-color:#e1e4e8;border:0}.markdown-body hr::before{display:table;content:""}.markdown-body hr::after{display:table;clear:both;content:""}.markdown-body input{margin:0;overflow:visible;font:inherit;font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body [type=checkbox]{box-sizing:border-box;padding:0}.markdown-body *{box-sizing:border-box}.markdown-body blockquote{margin:0}.markdown-body ol,.markdown-body ul{padding-left:2em}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}.markdown-body li>p{margin-top:16px}.markdown-body li+li{margin-top:.25em}.markdown-body dd{margin-left:0}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:600}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body code{font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace}.markdown-body pre{font:12px SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;word-wrap:normal}.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:16px}.markdown-body blockquote{padding:0 1em;color:#6a737d;border-left:.25em solid #dfe2e5}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body table{display:block;width:100%;overflow:auto;border-spacing:0;border-collapse:collapse}.markdown-body table th{font-weight:600}.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #dfe2e5}.markdown-body table tr{background-color:#fff;border-top:1px solid #c6cbd1}.markdown-body table tr:nth-child(2n){background-color:#f6f8fa}.markdown-body img{max-width:100%;box-sizing:content-box;background-color:#fff}.markdown-body code{padding:.2em 0;margin:0;font-size:85%;background-color:rgba(27,31,35,.05);border-radius:3px}.markdown-body code::after,.markdown-body code::before{letter-spacing:-.2em;content:" "}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:0 0;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f6f8fa;border-radius:3px}.markdown-body pre code{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body pre code::after,.markdown-body pre code::before{content:normal}.markdown-body .full-commit .btn-outline:not(:disabled):hover{color:#005cc5;border-color:#005cc5}.markdown-body kbd{box-shadow:inset 0 -1px 0 #959da5;display:inline-block;padding:3px 5px;font:11px/10px SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#444d56;vertical-align:middle;background-color:#fcfcfc;border:1px solid #c6cbd1;border-bottom-color:#959da5;border-radius:3px;box-shadow:inset 0 -1px 0 #959da5}.markdown-body :checked+.radio-label{position:relative;z-index:1;border-color:#0366d6}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item+.task-list-item{margin-top:3px}.markdown-body .task-list-item input{margin:0 .2em .25em -1.6em;vertical-align:middle}.markdown-body::before{display:table;content:""}.markdown-body::after{display:table;clear:both;content:""}.markdown-body>:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.Alert,.Error,.Note,.Success,.Warning{padding:11px;margin-bottom:24px;border-style:solid;border-width:1px;border-radius:4px}.Alert p,.Error p,.Note p,.Success p,.Warning p{margin-top:0}.Alert p:last-child,.Error p:last-child,.Note p:last-child,.Success p:last-child,.Warning p:last-child{margin-bottom:0}.Alert{color:#246;background-color:#e2eef9;border-color:#bac6d3}.Warning{color:#4c4a42;background-color:#fff9ea;border-color:#dfd8c2}.Error{color:#911;background-color:#fcdede;border-color:#d2b2b2}.Success{color:#22662c;background-color:#e2f9e5;border-color:#bad3be}.Note{color:#2f363d;background-color:#f6f8fa;border-color:#d5d8da}.Alert h1,.Alert h2,.Alert h3,.Alert h4,.Alert h5,.Alert h6{color:#246;margin-bottom:0}.Warning h1,.Warning h2,.Warning h3,.Warning h4,.Warning h5,.Warning h6{color:#4c4a42;margin-bottom:0}.Error h1,.Error h2,.Error h3,.Error h4,.Error h5,.Error h6{color:#911;margin-bottom:0}.Success h1,.Success h2,.Success h3,.Success h4,.Success h5,.Success h6{color:#22662c;margin-bottom:0}.Note h1,.Note h2,.Note h3,.Note h4,.Note h5,.Note h6{color:#2f363d;margin-bottom:0}.Alert h1:first-child,.Alert h2:first-child,.Alert h3:first-child,.Alert h4:first-child,.Alert h5:first-child,.Alert h6:first-child,.Error h1:first-child,.Error h2:first-child,.Error h3:first-child,.Error h4:first-child,.Error h5:first-child,.Error h6:first-child,.Note h1:first-child,.Note h2:first-child,.Note h3:first-child,.Note h4:first-child,.Note h5:first-child,.Note h6:first-child,.Success h1:first-child,.Success h2:first-child,.Success h3:first-child,.Success h4:first-child,.Success h5:first-child,.Success h6:first-child,.Warning h1:first-child,.Warning h2:first-child,.Warning h3:first-child,.Warning h4:first-child,.Warning h5:first-child,.Warning h6:first-child{margin-top:0}h1.title,p.subtitle{text-align:center}h1.title.followed-by-subtitle{margin-bottom:0}p.subtitle{font-size:1.5em;font-weight:600;line-height:1.25;margin-top:0;margin-bottom:16px;padding-bottom:.3em}div.line-block{white-space:pre-line}
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { display: inline-block; text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { color: #008000; } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { color: #008000; font-weight: bold; } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
</style>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<article class="markdown-body">
<header>
<h1 class="title">linux-system-roles/network</h1>
</header>
<hr>
<nav id="TOC">
<h1 class="toc-title">Contents</h1>
<ul>
<li><a href="#overview" id="toc-overview">Overview</a></li>
<li><a href="#introduction" id="toc-introduction">Introduction</a></li>
<li><a href="#requirements" id="toc-requirements">Requirements</a>
<ul>
<li><a href="#collection-requirements"
id="toc-collection-requirements">Collection requirements</a></li>
</ul></li>
<li><a href="#variables" id="toc-variables">Variables</a></li>
<li><a href="#examples-of-variables"
id="toc-examples-of-variables">Examples of Variables</a></li>
<li><a href="#network_connections-options"
id="toc-network_connections-options">network_connections Options</a>
<ul>
<li><a href="#name-usually-required"
id="toc-name-usually-required"><code>name</code> (usually
required)</a></li>
<li><a href="#state" id="toc-state"><code>state</code></a>
<ul>
<li><a href="#state-up"
id="toc-state-up"><code>state: up</code></a></li>
<li><a href="#state-down"
id="toc-state-down"><code>state: down</code></a></li>
</ul></li>
<li><a href="#persistent_state"
id="toc-persistent_state"><code>persistent_state</code></a>
<ul>
<li><a href="#persistent_state-present-default"
id="toc-persistent_state-present-default"><code>persistent_state: present</code>
(default)</a></li>
<li><a href="#persistent_state-absent"
id="toc-persistent_state-absent"><code>persistent_state: absent</code></a></li>
</ul></li>
<li><a href="#type" id="toc-type"><code>type</code></a>
<ul>
<li><a href="#type-ethernet"
id="toc-type-ethernet"><code>type: ethernet</code></a></li>
<li><a href="#type-bridge-type-bond-type-team"
id="toc-type-bridge-type-bond-type-team"><code>type: bridge</code>,
<code>type: bond</code>, <code>type: team</code></a></li>
<li><a href="#type-vlan"
id="toc-type-vlan"><code>type: vlan</code></a></li>
<li><a href="#type-macvlan"
id="toc-type-macvlan"><code>type: macvlan</code></a></li>
<li><a href="#type-infiniband"
id="toc-type-infiniband"><code>type: infiniband</code></a></li>
<li><a href="#type-wireless"
id="toc-type-wireless"><code>type: wireless</code></a></li>
<li><a href="#type-dummy"
id="toc-type-dummy"><code>type: dummy</code></a></li>
</ul></li>
<li><a href="#autoconnect"
id="toc-autoconnect"><code>autoconnect</code></a></li>
<li><a href="#autoconnect_retries"
id="toc-autoconnect_retries"><code>autoconnect_retries</code></a></li>
<li><a href="#mac" id="toc-mac"><code>mac</code></a></li>
<li><a href="#cloned_mac"
id="toc-cloned_mac"><code>cloned_mac</code></a></li>
<li><a href="#mtu" id="toc-mtu"><code>mtu</code></a></li>
<li><a href="#interface_name"
id="toc-interface_name"><code>interface_name</code></a></li>
<li><a href="#match" id="toc-match"><code>match</code></a></li>
<li><a href="#path" id="toc-path"><code>path</code></a></li>
<li><a href="#zone" id="toc-zone"><code>zone</code></a></li>
<li><a href="#ip" id="toc-ip"><code>ip</code></a></li>
<li><a href="#ethtool" id="toc-ethtool"><code>ethtool</code></a></li>
<li><a href="#ieee802_1x"
id="toc-ieee802_1x"><code>ieee802_1x</code></a></li>
<li><a href="#bond" id="toc-bond"><code>bond</code></a></li>
</ul></li>
<li><a href="#examples-of-options" id="toc-examples-of-options">Examples
of Options</a></li>
<li><a href="#examples-of-applying-the-network-state-configuration"
id="toc-examples-of-applying-the-network-state-configuration">Examples
of Applying the Network State Configuration</a>
<ul>
<li><a href="#invalid-and-wrong-configuration"
id="toc-invalid-and-wrong-configuration">Invalid and Wrong
Configuration</a></li>
<li><a href="#network_connections-internal-module"
id="toc-network_connections-internal-module">network_connections
Internal Module</a></li>
</ul></li>
<li><a href="#compatibility"
id="toc-compatibility">Compatibility</a></li>
<li><a href="#limitations" id="toc-limitations">Limitations</a>
<ul>
<li><a href="#handling-potential-problems"
id="toc-handling-potential-problems">Handling potential
problems</a></li>
</ul></li>
<li><a href="#rpm-ostree" id="toc-rpm-ostree">rpm-ostree</a></li>
</ul>
</nav>
<hr>
<h1 id="overview">Overview</h1>
<p>The <code>network</code> role enables users to configure network on
the target machines. This role can be used to configure:</p>
<ul>
<li>Ethernet interfaces</li>
<li>Bridge interfaces</li>
<li>Bonded interfaces</li>
<li>VLAN interfaces</li>
<li>MacVLAN interfaces</li>
<li>Infiniband interfaces</li>
<li>Wireless (WiFi) interfaces</li>
<li>IP configuration</li>
<li>802.1x authentication</li>
</ul>
<h1 id="introduction">Introduction</h1>
<p>The <code>network</code> role supports two providers: <code>nm</code>
and <code>initscripts</code>. <code>nm</code> is used by default since
RHEL7 and <code>initscripts</code> in RHEL6. The
<code>initscripts</code> provider requires <code>network-scripts</code>
package which is deprecated in RHEL8 and dropped in RHEL9. These
providers can be configured per host via the <a
href="#variables"><code>network_provider</code></a> variable. In absence
of explicit configuration, it is autodetected based on the distribution.
However, note that either <code>nm</code> or <code>initscripts</code> is
not tied to a certain distribution. The <code>network</code> role works
everywhere the required API is available. This means that
<code>nm</code> requires at least NetworkManager's API version 1.2
available and certain settings supported by <code>nm</code> provider
also requires higher NetworkManager's API version since which the
settings are introduced.</p>
<p>The <code>network</code> role supports two modules:
<code>network_connections</code> and <code>network_state</code>.</p>
<p>Since the backend of <code>network_state</code> is Nmstate, the
<code>network_state</code> modules represents the future direction for
the network role, aiming to provide a more streamlined and reliable way
of managing network. As a result, the focus is on promoting the use of
<code>network_state</code> over the <code>network_connections</code>
variable to ensure better consistency and functionality moving forward.
Additionally, most of the features currently supported in NetworkManager
are also available with <code>network_state</code>. For more information
and examples on how to configure the network using Nmstate schema in
<code>network_state</code> variable, please refer to the official
documentation at <a href="https://nmstate.io">nmstate.io</a>. For
detailed syntax and explanations of each parameter, visit <a
href="https://docs.rs/nmstate/latest/nmstate/index.html">nmstate's API
documentation</a>.</p>
<p>For each host a list of networking profiles can be configured via the
<code>network_connections</code> variable.</p>
<ul>
<li><p>For <code>initscripts</code>, profiles correspond to ifcfg files
in the <code>/etc/sysconfig/network-scripts/</code> directory and those
ifcfg files has the line <code>NM_CONTROLLED=no</code> written.</p></li>
<li><p>For <code>nm</code>, profiles correspond to connection profiles
are handled by NetworkManager and only NetworkManager keyfile format
profiles are supported in
<code>/etc/NetworkManager/system-connections/</code> since
RHEL9.</p></li>
</ul>
<p>For each host the network state configuration can also be applied to
the interface directly via the <code>network_state</code> variable, and
only the <code>nm</code> provider supports using the
<code>network_state</code> variable.</p>
<p>Note that the <code>network</code> role both operates on the
connection profiles of the devices (via the
<code>network_connections</code> variable) and on devices directly (via
the <code>network_state</code> variable). When configuring the
connection profiles through the role, it uses the profile name by
default as the interface name. It is also possible to create generic
profiles, by creating for example a profile with a certain IP
configuration without activating the profile. To apply the configuration
to the actual networking interface, use the <code>nmcli</code> commands
on the target system.</p>
<p><strong>Warning</strong>: The <code>network</code> role updates or
creates all connection profiles on the target system as specified in the
<code>network_connections</code> variable. Therefore, the
<code>network</code> role removes options from the specified profiles if
the options are only present on the system but not in the
<code>network_connections</code> variable. Exceptions are mentioned
below. However, the partial networking configuration can be achieved via
specifying the network state configuration in the
<code>network_state</code> variable.</p>
<h1 id="requirements">Requirements</h1>
<p>See below</p>
<h2 id="collection-requirements">Collection requirements</h2>
<p>The role requires external collections only for management of
<code>rpm-ostree</code> nodes. Please run the following command to
install them if you need to manage <code>rpm-ostree</code> nodes:</p>
<div class="sourceCode" id="cb1"><pre
class="sourceCode bash"><code class="sourceCode bash"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="ex">ansible-galaxy</span> collection install <span class="at">-vv</span> <span class="at">-r</span> meta/collection-requirements.yml</span></code></pre></div>
<h1 id="variables">Variables</h1>
<p>The <code>network</code> role is configured via variables starting
with <code>network_</code> as the name prefix. List of variables:</p>
<ul>
<li><code>network_provider</code> - The <code>network_provider</code>
variable allows to set a specific provider (<code>nm</code> or
<code>initscripts</code>) . Setting it to
<code>{{ network_provider_os_default }}</code>, the provider is set
depending on the operating system. This is usually <code>nm</code>
except for RHEL 6 or CentOS 6 systems. Changing the provider for an
existing profile is not supported. To switch providers, it is
recommended to first remove profiles with the old provider and then
create new profiles with the new provider.</li>
<li><code>network_connections</code> - The connection profiles are
configured as <code>network_connections</code>, which is a list of
dictionaries that include specific options.</li>
<li><code>network_allow_restart</code> - It defaults to
<code>false</code>. To load NetworkManager plugins after installation,
NetworkManager requires to be restarted. For example, if a wireless
connection is configured and NetworkManager-wifi is not installed,
NetworkManager must be restarted prior to the connection being
configured. The restart can result in connectivity loss and therefore
the role does not allow it without explicit consent. The user can
consent to it by setting <code>network_allow_restart</code> to
<code>true</code>. Setting <code>network_allow_restart</code> to
<code>false</code> will prevent the role from restarting
NetworkManager.</li>
<li><code>network_state</code> - The network state settings can be
configured in the managed host, and the format and the syntax of the
configuration should be consistent with the <a
href="https://nmstate.io/examples.html">nmstate state examples</a>
(YAML).</li>
</ul>
<h1 id="examples-of-variables">Examples of Variables</h1>
<p>Setting the variables</p>
<div class="sourceCode" id="cb2"><pre
class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="fu">network_provider</span><span class="kw">:</span><span class="at"> nm</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="fu">network_connections</span><span class="kw">:</span></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">name</span><span class="kw">:</span><span class="at"> eth0</span></span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a><span class="co"> #...</span></span>
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a><span class="fu">network_allow_restart</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span></code></pre></div>
<div class="sourceCode" id="cb3"><pre
class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="fu">network_provider</span><span class="kw">:</span><span class="at"> nm</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="fu">network_state</span><span class="kw">:</span></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">interfaces</span><span class="kw">:</span></span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">name</span><span class="kw">:</span><span class="at"> eth0</span></span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a><span class="co"> #...</span></span>
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">routes</span><span class="kw">:</span></span>
<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">config</span><span class="kw">:</span></span>
<span id="cb3-8"><a href="#cb3-8" aria-hidden="true" tabindex="-1"></a><span class="co"> #...</span></span>
<span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">dns-resolver</span><span class="kw">:</span></span>
<span id="cb3-10"><a href="#cb3-10" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">config</span><span class="kw">:</span></span>
<span id="cb3-11"><a href="#cb3-11" aria-hidden="true" tabindex="-1"></a><span class="co"> #...</span></span></code></pre></div>
<h1 id="network_connections-options">network_connections Options</h1>
<p>The <code>network_connections</code> variable is a list of
dictionaries that include the following options. List of options:</p>
<h2 id="name-usually-required"><code>name</code> (usually required)</h2>
<p>The <code>name</code> option identifies the connection profile to be
configured. It is not the name of the networking interface for which the
profile applies, though we can associate the profile with an interface
and give them the same name. Note that you can have multiple profiles
for the same device, but only one profile can be active on the device
each time. For NetworkManager, a connection can only be active at one
device each time.</p>
<ul>
<li><p>For <code>NetworkManager</code>, the <code>name</code> option
corresponds to the <a
href="https://developer.gnome.org/NetworkManager/stable/nm-settings.html#nm-settings.property.connection.id"><code>connection.id</code></a>
property option. Although NetworkManager supports multiple connections
with the same <code>connection.id</code>, the <code>network</code> role
cannot handle a duplicate <code>name</code>. Specifying a
<code>name</code> multiple times refers to the same connection
profile.</p></li>
<li><p>For <code>initscripts</code>, the <code>name</code> option
determines the ifcfg file name
<code>/etc/sysconfig/network-scripts/ifcfg-$NAME</code>. Note that the
<code>name</code> does not specify the <code>DEVICE</code> but a
filename. As a consequence, <code>'/'</code> is not a valid character
for the <code>name</code>.</p></li>
</ul>
<p>You can also use the same connection profile multiple times.
Therefore, it is possible to create a profile and activate it
separately.</p>
<p><strong>Note:</strong> The network role will only change the profiles
that are specified in the <code>network_connections</code> variable.
Therefore, if only the ports of a profile are specified to be removed
from the controller and the controller is not specified, then the
controller profile will remain on the system. This can happen, if for
example all ports are removed from a bond interface.</p>
<p><strong>Note:</strong> To remove all profiles on a system that are
not specified in the <code>network_connections</code> variable, add an
entry without a name and <code>persistent_state: absent</code>. This
will match and remove all remaining profiles:</p>
<div class="sourceCode" id="cb4"><pre
class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="fu">network_connections</span><span class="kw">:</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">name</span><span class="kw">:</span><span class="at"> eth0</span><span class="co"> # profiles to keep/configure on the system</span></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">[</span><span class="at">...</span><span class="kw">]</span></span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a></span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> </span><span class="fu">persistent_state</span><span class="kw">:</span><span class="at"> absent</span><span class="co"> # remove all other profiles</span></span></code></pre></div>
<h2 id="state"><code>state</code></h2>
<p>The <code>state</code> option identifies what is the runtime state of
each connection profile. The <code>state</code> option (optional) can be
set to the following values:</p>
<ul>
<li><code>up</code> - the connection profile is activated</li>
<li><code>down</code> - the connection profile is deactivated</li>
</ul>
<h3 id="state-up"><code>state: up</code></h3>
<ul>
<li><p>For <code>NetworkManager</code>, this corresponds to
<code>nmcli connection id {{name}} up</code>.</p></li>
<li><p>For <code>initscripts</code>, this corresponds to
<code>ifup {{name}}</code>.</p></li>
</ul>
<p>When the <code>state</code> option is set to <code>up</code>, you can
also specify the <code>wait</code> option (optional):</p>
<ul>
<li><code>wait: 0</code> - initiates only the activation, but does not
wait until the device is fully connected. The connection will be
completed in the background, for example after a DHCP lease was
received.</li>
<li><code>wait: <seconds></code> is a timeout that enables you to
decide how long you give the device to activate. The default is using a
suitable timeout. Note that the <code>wait</code> option is only
supported by NetworkManager.</li>
</ul>
<p>Note that <code>state: up</code> always re-activates the profile and
possibly changes the networking configuration, even if the profile was
already active before. As a consequence, <code>state: up</code> always
changes the system.</p>
<h3 id="state-down"><code>state: down</code></h3>
<ul>
<li><p>For <code>NetworkManager</code>, it corresponds to
<code>nmcli connection id {{name}} down</code>.</p></li>
<li><p>For <code>initscripts</code>, it corresponds to call
<code>ifdown {{name}}</code>.</p></li>
</ul>
<p>You can deactivate a connection profile, even if is currently not
active. As a consequence, <code>state: down</code> always changes the
system.</p>
<p>Note that if the <code>state</code> option is unset, the connection
profile's runtime state will not be changed.</p>
<h2 id="persistent_state"><code>persistent_state</code></h2>
<p>The <code>persistent_state</code> option identifies if a connection
profile is persistent (saved on disk). The <code>persistent_state</code>
option can be set to the following values:</p>
<h3
id="persistent_state-present-default"><code>persistent_state: present</code>
(default)</h3>
<p>Note that if <code>persistent_state</code> is <code>present</code>
and the connection profile contains the <code>type</code> option, the
profile will be created or updated. If the connection profile is
incomplete (no <code>type</code> option), the behavior is undefined.
Also, the <code>present</code> value does not directly result in a
change in the network configuration. If the <code>state</code> option is
not set to <code>up</code>, the profile is only created or modified, not
activated.</p>
<p>For NetworkManager, the new connection profile is created with the
<code>autoconnect</code> option enabled by default. Therefore,
NetworkManager can activate the new profile on a currently disconnected
device. (<a
href="https://bugzilla.redhat.com/show_bug.cgi?id=1401515">rh#1401515</a>).</p>
<h3
id="persistent_state-absent"><code>persistent_state: absent</code></h3>
<p>The <code>absent</code> value ensures that the profile is not present
on the target host. If a profile with the given <code>name</code>
exists, it will be deleted. In this case:</p>
<ul>
<li><p><code>NetworkManager</code> deletes all connection profiles with
the corresponding <code>connection.id</code>. Deleting a profile usually
does not change the current networking configuration, unless the profile
was currently activated on a device. Deleting the currently active
connection profile disconnects the device. That makes the device
eligible to autoconnect another connection (for more details, see <a
href="https://bugzilla.redhat.com/show_bug.cgi?id=1401515">rh#1401515</a>).</p></li>
<li><p><code>initscripts</code> deletes the ifcfg file in most cases
with no impact on the runtime state of the system unless some component
is watching the sysconfig directory.</p></li>
</ul>
<p><strong>Note</strong>: For profiles that only contain a
<code>state</code> option, the <code>network</code> role only activates
or deactivates the connection without changing its configuration.</p>
<h2 id="type"><code>type</code></h2>
<p>The <code>type</code> option can be set to the following values:</p>
<ul>
<li><code>ethernet</code></li>
<li><code>bridge</code></li>
<li><code>bond</code></li>
<li><code>team</code></li>
<li><code>vlan</code></li>
<li><code>macvlan</code></li>
<li><code>infiniband</code></li>
<li><code>wireless</code></li>
<li><code>dummy</code></li>
</ul>
<h3 id="type-ethernet"><code>type: ethernet</code></h3>
<p>If the type is <code>ethernet</code>, then there can be an extra
<code>ethernet</code> dictionary with the following items (options):
<code>autoneg</code>, <code>speed</code> and <code>duplex</code>, which
correspond to the settings of the <code>ethtool</code> utility with the
same name.</p>
<ul>
<li><code>autoneg</code>: <code>true</code> (default) or
<code>false</code> [if auto-negotiation is enabled or disabled]</li>
<li><code>speed</code>: speed in Mbit/s</li>
<li><code>duplex</code>: <code>half</code> or <code>full</code></li>
</ul>
<p>Note that the <code>speed</code> and <code>duplex</code> link
settings are required when autonegotiation is disabled
(<code>autoneg: false</code>).</p>
<h3 id="type-bridge-type-bond-type-team"><code>type: bridge</code>,
<code>type: bond</code>, <code>type: team</code></h3>
<p>The <code>bridge</code>, <code>bond</code>, <code>team</code> device
types work similar. Note that <code>team</code> is not supported in
RHEL6 kernels, and has been deprecated in RHEL 9.</p>
<p>For ports, the <code>port_type</code> and <code>controller</code>
properties must be set. Note that ports should not have <code>ip</code>
settings, which means that the active ports will not have IP addresses
assigned.</p>
<p>The <code>controller</code> refers to the <code>name</code> of a
profile in the Ansible playbook. It is neither an interface-name nor a
connection-id of NetworkManager.</p>
<ul>
<li><p>For NetworkManager, <code>controller</code> will be converted to
the <code>connection.uuid</code> of the corresponding profile.</p></li>
<li><p>For initscripts, the controller is looked up as the
<code>DEVICE</code> from the corresponding ifcfg file.</p></li>
</ul>
<p>As <code>controller</code> refers to other profiles of the same or
another play, the order of the <code>connections</code> list matters.
Profiles that are referenced by other profiles need to be specified
first. Also, <code>--check</code> ignores the value of the
<code>controller</code> and assumes it will be present during a real
run. That means, in presence of an invalid <code>controller</code>,
<code>--check</code> may signal success but the actual play run
fails.</p>
<p>If only bringing down the <code>controller</code> profile , then the
port profiles will be brought down automatically. If bringing down the
connection on some or all ports, then the controller profile stay
active.</p>
<p>The <code>team</code> type uses <code>roundrobin</code> as the
<code>runner</code> configuration. No further configuration is supported
at the moment.</p>
<h3 id="type-vlan"><code>type: vlan</code></h3>
<p>Similar to <code>controller</code>, the <code>parent</code>
references the connection profile in the ansible role. The vlan ID can
be specified by using nested vlan setting, the valid vlan ID value
ranges from 0 to 4094. Here is how to specify the vlan ID:</p>
<div class="sourceCode" id="cb5"><pre
class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb5-1"><a href="#cb5-1" aria-hidden="true" tabindex="-1"></a><span class="fu">type</span><span class="kw">:</span><span class="at"> vlan</span></span>
<span id="cb5-2"><a href="#cb5-2" aria-hidden="true" tabindex="-1"></a><span class="fu">vlan</span><span class="kw">:</span></span>
<span id="cb5-3"><a href="#cb5-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">id</span><span class="kw">:</span><span class="at"> </span><span class="dv">6</span></span></code></pre></div>
<h3 id="type-macvlan"><code>type: macvlan</code></h3>
<p>Similar to <code>controller</code> and <code>vlan</code>, the
<code>parent</code> references the connection profile in the ansible
role.</p>
<h3 id="type-infiniband"><code>type: infiniband</code></h3>
<p>For the infiniband connection, currently it is only supported for the
nm provider, and the following options are supported:</p>
<ul>
<li><code>p_key</code>: The infiniband P_Key to use for the device. When
it is not specified, then the connection is created on the physical
infiniband fabrics. Otherwise, it is a 16-bit unsigned integer and the
ipoib (IP over Infiniband) connection will be created, the high bit
should be set if it is a "full membership" P_Key. The special
<code>p_key</code> values 0x0000 and 0x8000 are invalid as kernel does
not support them.</li>
<li><code>transport_mode</code>: The ipoib (IP over Infiniband)
connection operation mode. The possible modes are <code>datagram</code>
(default) and <code>connected</code>.</li>
</ul>
<p><strong>Note:</strong> If the <code>p_key</code> is specified , then
the <code>interface_name</code> must be unset.</p>
<h3 id="type-wireless"><code>type: wireless</code></h3>
<p>The <code>wireless</code> type supports WPA-PSK (password)
authentication, WPA-EAP (802.1x) authentication, WPA3-Personal SAE
(password) authentication and Enhanced Open (OWE).</p>
<p><code>nm</code> (NetworkManager) is the only supported
<code>network_provider</code> for this type.</p>
<p>If WPA-EAP is used, ieee802_1x settings must be defined in the <a
href="#ieee802_1x">ieee802_1x</a> option.</p>
<p>The following options are supported:</p>
<ul>
<li><p><code>ssid</code>: the SSID of the wireless network
(required)</p></li>
<li><p><code>key_mgmt</code> (required)</p>
<p>Any key from following key list:</p>
<ul>
<li><code>owe</code></li>
<li><code>sae</code></li>
<li><code>wpa-eap</code></li>
<li><code>wpa-psk</code></li>
</ul></li>
<li><p><code>password</code>: password for the network (required if
<code>wpa-psk</code> or <code>sae</code> is used)</p></li>
</ul>
<h3 id="type-dummy"><code>type: dummy</code></h3>
<p>Dummy network interface, <code>nm</code> (NetworkManager) is the only
supported <code>network_provider</code> for this type.</p>
<h2 id="autoconnect"><code>autoconnect</code></h2>
<p>By default, profiles are created with autoconnect enabled.</p>
<ul>
<li><p>For <code>NetworkManager</code>, this corresponds to the
<code>connection.autoconnect</code> property.</p></li>
<li><p>For <code>initscripts</code>, this corresponds to the
<code>ONBOOT</code> property.</p></li>
</ul>
<h2 id="autoconnect_retries"><code>autoconnect_retries</code></h2>
<p>The number of times a connection should be tried when autoactivating
before giving up. Zero means forever, -1 means the global default in
NetworkManager (4 times if not overridden). Setting this to 1 means to
try activation only once before blocking autoconnect. Note that after a
timeout, NetworkManager will try to autoconnect again.</p>
<ul>
<li>For <code>NetworkManager</code>, this corresponds to the
<code>connection.autoconnect-retries</code> property.</li>
</ul>
<h2 id="mac"><code>mac</code></h2>
<p>The <code>mac</code> address is optional and restricts the profile to
be usable only on devices with the given MAC address. <code>mac</code>
is only allowed for <code>type</code> <code>ethernet</code> or
<code>infiniband</code> to match a non-virtual device with the profile.
The value of the <code>mac</code> address needs to be specified in
hexadecimal notation using colons (for example:
<code>mac: "00:00:5e:00:53:5d"</code>). To avoid YAML parsing mac
addresses as integers in sexagesimal (base 60) notation (see <a
href="https://yaml.org/spec/1.1/#id858600">https://yaml.org/spec/1.1/#id858600</a>),
it is recommended to always quote the value with double quotes and
sometimes it is necessary.</p>
<ul>
<li><p>For <code>NetworkManager</code>, <code>mac</code> is the
permanent MAC address, <code>ethernet.mac-address</code>.</p></li>
<li><p>For <code>initscripts</code>, <code>mac</code> is the currently
configured MAC address of the device (<code>HWADDR</code>).</p></li>
</ul>
<h2 id="cloned_mac"><code>cloned_mac</code></h2>
<p>The <code>cloned_mac</code> address is optional and allow to specify
the strategy to get the default mac or to set your own mac. The value of
the <code>cloned_mac</code> address needs to be specified in hexadecimal
notation like <code>mac</code> property. Besides explicitly specifying
the value as a MAC address with hexadecimal notation, the following
special values are also supported:</p>
<ul>
<li><code>default</code>: honor the default behavior in
NetworkManager</li>
<li><code>permanent</code>: use the permanent MAC address of the
device</li>
<li><code>preserve</code>: don't change the MAC address of the device
upon activation</li>
<li><code>random</code>: generate a randomized value upon each
connect</li>
<li><code>stable</code>: generate a stable, hashed MAC address</li>
</ul>
<h2 id="mtu"><code>mtu</code></h2>
<p>The <code>mtu</code> option denotes the maximum transmission unit for
the profile's device. The maximum value depends on the device. For
virtual devices, the maximum value of the <code>mtu</code> option
depends on the underlying device.</p>
<h2 id="interface_name"><code>interface_name</code></h2>
<p>For the <code>ethernet</code> and <code>infiniband</code> types, the
<code>interface_name</code> option restricts the profile to the given
interface by name. This argument is optional and by default the profile
name is used unless a mac address is specified using the
<code>mac</code> key. Specifying an empty string (<code>""</code>) means
that the profile is not restricted to a network interface.</p>
<p><strong>Note:</strong> With <a
href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/ch-Consistent_Network_Device_Naming.html">persistent
interface naming</a>, the interface is predictable based on the hardware
configuration. Otherwise, the <code>mac</code> address might be an
option.</p>
<p>For virtual interface types such as bridges, the
<code>interface_name</code> is the name of the created interface. In
case of a missing <code>interface_name</code>, the <code>name</code> of
the profile name is used.</p>
<p><strong>Note:</strong> The <code>name</code> (the profile name) and
the <code>interface_name</code> (the device name) may be different or
the profile may not be tied to an interface at all.</p>
<h2 id="match"><code>match</code></h2>
<p>Settings to specify devices or systems matching a profile. Currently,
only the <code>path</code> setting is implemented.</p>
<p>The settings support a list of patterns which support the following
modifiers and wildcards:</p>
<p><strong>Special modifiers for <code>match</code>
settings:</strong></p>
<ul>
<li><p><code>|</code>, the element is an alternative, the match
evaluates to be true if at least one of the alternatives matches
(logical OR). By default, an element is an alternative. This means that
an element <code>foo</code> behaves the same as
<code>|foo</code></p></li>
<li><p><code>&</code>, the element is mandatory, the match evaluates
to be true if all the element matches (logical AND)</p></li>
<li><p><code>!</code>, an element can also be inverted with exclamation
mark (<code>!</code>) between the pipe symbol (or the ampersand) and
before the pattern. Note that <code>!foo</code> is a shortcut for the
mandatory match <code>&!foo</code></p></li>
<li><p><code>\</code>, a backslash can be used at the beginning of the
element (after the optional special characters) to escape the start of
the pattern. For example, <code>&\!a</code> is an mandatory match
for literally <code>!a</code></p></li>
</ul>
<p><strong>Wildcard patterns for <code>match</code> Settings:</strong>
In general these work like shell globs.</p>
<ul>
<li><code>*</code>, matches zero or more of any character</li>
<li><code>?</code>, matches any single character</li>
<li><code>[fo]</code> - matches any single <code>f</code> or
<code>o</code> character - also supports ranges - <code>[0-9]</code>
will match any single digit character</li>
</ul>
<h2 id="path"><code>path</code></h2>
<p>The <code>path</code> setting is a list of patterns to match against
the <code>ID_PATH</code> udev property of devices. The
<code>ID_PATH</code> udev property represents the persistent path of a
device. It consists of a subsystem string (pci, usb, platform, etc.) and
a subsystem-specific identifier. The <code>ID_PATH</code> of a device
can be obtained with the command
<code>udevadm info /sys/class/net/$dev | grep ID_PATH=</code> or by
looking at the <code>path</code> property exported by NetworkManager
(<code>nmcli -f general.path device show $dev</code>). The
<code>path</code> setting is optional and restricts the profile to be
activated only on devices with a matching <code>ID_PATH</code>. The
<code>path</code> setting is only supported for ethernet or infiniband
profiles. It supports modifiers and wildcards as described for match
settings.</p>
<h2 id="zone"><code>zone</code></h2>
<p>The <code>zone</code> option sets the firewalld zone for the
interface.</p>
<p>Ports to the bridge, bond or team devices cannot specify a zone.</p>
<h2 id="ip"><code>ip</code></h2>
<p>The IP configuration supports the following options:</p>
<ul>
<li><p><code>address</code> Manual addressing can be specified via a
list of addresses under the <code>address</code> option.</p></li>
<li><p><code>auto_gateway</code></p>
<p>If enabled, a default route will be configured using the default
gateway. If disabled, the default route will be removed.</p>
<p>If this variable is not specified, the role will use the default
behavior of the <code>network_provider</code> selected.</p>
<p>Setting this option to <code>false</code> is equivalent to:</p>
<ul>
<li><code>DEFROUTE = no</code> in initscripts, or</li>
<li><code>ipv4.never-default/ipv6.never-default yes</code> in nmcli</li>
</ul></li>
<li><p><code>dhcp4</code>, <code>auto6</code>, and
<code>ipv6_disabled</code></p>
<p>Also, manual addressing can be specified by setting either
<code>dhcp4</code> or <code>auto6</code>. The <code>dhcp4</code> key is
for DHCPv4 and <code>auto6</code> for StateLess Address Auto
Configuration (SLAAC). Note that the <code>dhcp4</code> and
<code>auto6</code> keys can be omitted and the default key depends on
the presence of manual addresses. <code>ipv6_disabled</code> can be set
to disable ipv6 for the connection.</p></li>
<li><p><code>dhcp4_send_hostname</code></p>
<p>If <code>dhcp4</code> is enabled, it can be configured whether the
DHCPv4 request includes the hostname via the
<code>dhcp4_send_hostname</code> option. Note that
<code>dhcp4_send_hostname</code> is only supported by the
<code>nm</code> provider and corresponds to <a
href="https://developer.gnome.org/NetworkManager/stable/nm-settings.html#nm-settings.property.ipv4.dhcp-send-hostname"><code>ipv4.dhcp-send-hostname</code></a>
property.</p></li>
<li><p><code>dns</code></p>
<p>Manual DNS configuration can be specified via a list of addresses
given in the <code>dns</code> option.</p></li>
<li><p><code>dns_search</code></p>
<p>Manual DNS configuration can be specified via a list of domains to
search given in the <code>dns_search</code> option.</p></li>
<li><p><code>dns_options</code></p>
<p><code>dns_options</code> is only supported for the NetworkManager
provider. Manual DNS configuration via a list of DNS options can be
given in the <code>dns_options</code>. The list of supported DNS options
for IPv4 nameservers is described in <a
href="https://man7.org/linux/man-pages/man5/resolv.conf.5.html">man 5
resolv.conf</a>. Currently, the list of supported DNS options is:</p>
<ul>
<li><code>attempts:n</code></li>
<li><code>debug</code></li>
<li><code>edns0</code></li>
<li><code>inet6</code></li>
<li><code>ip6-bytestring</code></li>
<li><code>ip6-dotint</code></li>
<li><code>ndots:n</code></li>
<li><code>no-aaaa</code></li>
<li><code>no-check-names</code></li>
<li><code>no-ip6-dotint</code></li>
<li><code>no-reload</code></li>
<li><code>no-tld-query</code></li>
<li><code>rotate</code></li>
<li><code>single-request</code></li>
<li><code>single-request-reopen</code></li>
<li><code>timeout:n</code></li>
<li><code>trust-ad</code></li>
<li><code>use-vc</code></li>
</ul>
<p><strong>Note:</strong> The "trust-ad" setting is only honored if the
profile contributes name servers to resolv.conf, and if all contributing
profiles have "trust-ad" enabled. When using a caching DNS plugin
(dnsmasq or systemd-resolved in NetworkManager.conf) then "edns0" and
"trust-ad" are automatically added.</p></li>
<li><p><code>dns_priority</code></p>
<p>DNS servers priority. The relative priority for DNS servers specified
by this setting. The default value is 0, a lower numerical value has
higher priority. The valid value of <code>dns_priority</code> ranges
from -2147483648 to 2147483647. Negative values have the special effect
of excluding other configurations with a greater numerical priority
value; so in presence of at least one negative priority, only DNS
servers from connections with the lowest priority value will be
used.</p></li>
<li><p><code>gateway4</code> and <code>gateway6</code></p>
<p>The default gateway for IPv4 (<code>gateway4</code>) or IPv6
(<code>gateway6</code>) packets.</p></li>
<li><p><code>wait_ip</code></p>
<p>The property controls whether the system should wait for a specific
IP stack to be configured before considering the connection activated.
It can be set to "any", "ipv4","ipv6," or "ipv4+ipv6". When set to
"any," the system considers the connection activated when any IP stack
is configured. "ipv4" ensures the system waits for IPv4 configuration,
while "ipv6" ensures the system waits for IPv6 configuration. The
"ipv4+ipv6" option requires both IPv4 and IPv6 to be configured before
the connection is considered activated.</p></li>
<li><p><code>ipv4_ignore_auto_dns</code> and
<code>ipv6_ignore_auto_dns</code></p>
<p>If enabled, the automatically configured name servers and search
domains (via DHCPv4, DHCPv6, modem etc) for IPv4 or IPv6 are ignored,
only the name servers and search domains specified in <code>dns</code>
and <code>dns_search</code> properties are used. The settings are
distinguished by the address families. The variables are not supported
by initscripts provider.</p>
<p>If the variables are not specified, the role will use the default
behavior of nm provider.</p></li>
<li><p><code>route_metric4</code> and <code>route_metric6</code></p>
<p>For <code>NetworkManager</code>, <code>route_metric4</code> and
<code>route_metric6</code> corresponds to the <a
href="https://developer.gnome.org/NetworkManager/stable/nm-settings.html#nm-settings.property.ipv4.route-metric"><code>ipv4.route-metric</code></a>
and <a
href="https://developer.gnome.org/NetworkManager/stable/nm-settings.html#nm-settings.property.ipv6.route-metric"><code>ipv6.route-metric</code></a>
properties, respectively. If specified, it determines the route metric
for DHCP assigned routes and the default route, and thus the priority
for multiple interfaces. For <code>initscripts</code>,
<code>route_metric4</code> sets the metric for the default route and
<code>route_metric6</code> is not supported.</p></li>
<li><p><code>route</code></p>
<p>Static route configuration can be specified via a list of routes
given in the <code>route</code> option. The default value is an empty
list. Each route is a dictionary with the following entries:
<code>gateway</code>, <code>metric</code>, <code>network</code>,
<code>prefix</code>, <code>src</code>, <code>table</code> and
<code>type</code>. <code>network</code> and <code>prefix</code> specify
the destination network. <code>src</code> specifies the source IP
address for a route. <code>table</code> supports both the numeric table
and named table. In order to specify the named table, the users have to
ensure the named table is properly defined in
<code>/etc/iproute2/rt_tables</code> or
<code>/etc/iproute2/rt_tables.d/*.conf</code>. The optional
<code>type</code> key supports the values <code>blackhole</code>,
<code>prohibit</code>, and <code>unreachable</code>. See <a
href="https://man7.org/linux/man-pages/man8/ip-route.8.html#DESCRIPTION">man
8 ip-route</a> for their definition. Routes with these types do not
support a gateway. If the type is not specified, the route is considered
as a unicast route. Note that the classless inter-domain routing(CIDR)
notation or the network mask notation are not supported for the
<code>network</code> key.</p></li>
<li><p><code>routing_rule</code></p>
<p>The policy routing rules can be specified via a list of rules given
in the <code>routing_rule</code> option, which allow routing the packets
on other packet fields except for destination address. The default value
is a an empty list. Each rule is a dictionary with the following
entries:</p>
<ul>
<li><code>priority</code> - The priority of the rule. A valid priority
ranges from 0 to 4294967295. Higher number means lower priority.</li>
<li><code>action</code> - The action of the rule. The possible values
are <code>to-table</code> (default), <code>blackhole</code>,
<code>prohibit</code>, <code>unreachable</code>.</li>
<li><code>dport</code>- The range of the destination port (e.g.
<code>1000 - 2000</code>). A valid dport value for both start and end
ranges from 0 to 65534. And the start cannot be greater than the
end.</li>
<li><code>family</code> - The IP family of the rule. The possible values
are <code>ipv4</code> and <code>ipv6</code>.</li>
<li><code>from</code> - The source address of the packet to match (e.g.
<code>192.168.100.58/24</code>).</li>
<li><code>fwmark</code> - The fwmark value of the packet to match.</li>
<li><code>fwmask</code> - The fwmask value of the packet to match.</li>
<li><code>iif</code> - Select the incoming interface name to match.</li>
<li><code>invert</code> - Invert the selected match of the rule. The
possible values are boolean values <code>true</code> and
<code>false</code> (default). If the value is <code>true</code>, this is
equivalent to match any packet that not satisfying selected match of the
rule.</li>
<li><code>ipproto</code> - Select the IP protocol value to match, the
valid value ranges from 1 to 255.</li>
<li><code>oif</code> - Select the outgoing interface name to match.</li>
<li><code>sport</code> - The range of the source port (e.g.
<code>1000 - 2000</code>). A valid sport value for both start and end
ranges from 0 to 65534. And the start cannot be greater than the
end.</li>
<li><code>suppress_prefixlength</code> - Reject routing decisions that
have a prefix length of the specified or less.</li>
<li><code>table</code> - The route table to look up for the
<code>to-table</code> action. <code>table</code> supports both the
numeric table and named table. In order to specify the named table, the
users have to ensure the named table is properly defined in
<code>/etc/iproute2/rt_tables</code> or
<code>/etc/iproute2/rt_tables.d/*.conf</code>.</li>
<li><code>to</code> - The destination address of the packet to match
(e.g. <code>192.168.100.58/24</code>).</li>
<li><code>tos</code> - Select the tos value to match.</li>
<li><code>uid</code> - The range of the uid to match (e.g.
<code>1000 - 2000</code>). A valid uid value for both start and end
ranges from 0 to 4294967295. And the start cannot be greater than the
end.</li>
</ul></li>
<li><p><code>route_append_only</code></p>
<p>The <code>route_append_only</code> option allows only to add new
routes to the existing routes on the system.</p>
<p>If the <code>route_append_only</code> boolean option is set to
<code>true</code>, the specified routes are appended to the existing
routes. If <code>route_append_only</code> is set to <code>false</code>
(default), the current routes are replaced. Note that setting
<code>route_append_only</code> to <code>true</code> without setting
<code>route</code> has the effect of preserving the current static
routes.</p></li>
<li><p><code>rule_append_only</code></p>
<p>The <code>rule_append_only</code> boolean option allows to preserve
the current routing rules.</p></li>
</ul>
<p><strong>Note:</strong> When <code>route_append_only</code> or
<code>rule_append_only</code> is not specified, the network role deletes
the current routes or routing rules.</p>
<p><strong>Note:</strong> Ports to the bridge, bond or team devices
cannot specify <code>ip</code> settings.</p>
<h2 id="ethtool"><code>ethtool</code></h2>
<p>The ethtool settings allow to enable or disable various features. The
names correspond to the names used by the <code>ethtool</code> utility.
Depending on the actual kernel and device, changing some options might
not be supported.</p>
<p>The ethtool configuration supports the following options:</p>
<ul>
<li><p><code>ring</code></p>
<p>Changes the <code>rx</code>/<code>tx</code> <code>ring</code>
parameters of the specified network device. The list of supported
<code>ring</code> parameters is:</p>
<ul>
<li><code>rx</code> - Changes the number of ring entries for the Rx
ring.</li>
<li><code>rx-jumbo</code> - Changes the number of ring entries for the
Rx Jumbo ring.</li>
<li><code>rx-mini</code> - Changes the number of ring entries for the Rx
Mini ring.</li>
<li><code>tx</code> - Changes the number of ring entries for the Tx
ring.</li>
</ul></li>
</ul>
<div class="sourceCode" id="cb6"><pre
class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb6-1"><a href="#cb6-1" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">ethtool</span><span class="kw">:</span></span>
<span id="cb6-2"><a href="#cb6-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">features</span><span class="kw">:</span></span>
<span id="cb6-3"><a href="#cb6-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">esp_hw_offload</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-4"><a href="#cb6-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">esp_tx_csum_hw_offload</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-5"><a href="#cb6-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">fcoe_mtu</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-6"><a href="#cb6-6" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">gro</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-7"><a href="#cb6-7" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">gso</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-8"><a href="#cb6-8" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">highdma</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-9"><a href="#cb6-9" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">hw_tc_offload</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-10"><a href="#cb6-10" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">l2_fwd_offload</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-11"><a href="#cb6-11" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">loopback</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-12"><a href="#cb6-12" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">lro</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-13"><a href="#cb6-13" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">ntuple</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-14"><a href="#cb6-14" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">rx</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-15"><a href="#cb6-15" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">rx_all</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-16"><a href="#cb6-16" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">rx_fcs</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-17"><a href="#cb6-17" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">rx_gro_hw</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-18"><a href="#cb6-18" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">rx_udp_tunnel_port_offload</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-19"><a href="#cb6-19" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">rx_vlan_filter</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-20"><a href="#cb6-20" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">rx_vlan_stag_filter</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-21"><a href="#cb6-21" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">rx_vlan_stag_hw_parse</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-22"><a href="#cb6-22" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">rxhash</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-23"><a href="#cb6-23" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">rxvlan</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-24"><a href="#cb6-24" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">sg</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>
<span id="cb6-25"><a href="#cb6-25" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">tls_hw_record</span><span class="kw">:</span><span class="at"> true|false</span><span class="co"> # optional</span></span>