File tree Expand file tree Collapse file tree 3 files changed +75
-0
lines changed
Expand file tree Collapse file tree 3 files changed +75
-0
lines changed Original file line number Diff line number Diff line change 2020 * [ Accept All MAC addresses] ( #accept-all-mac-addresses )
2121 * [ Copy MAC From] ( #copy-mac-from )
2222 * [ Dispatch script] ( #dispatch-script )
23+ * [ Interface Alternative Name] ( #interface-alternative-name )
2324 * [ IP] ( #ip )
2425 * [ IP Enable] ( #ip-enable )
2526 * [ DHCP] ( #dhcp )
@@ -450,6 +451,40 @@ Setting the `post-activation` or `post-deactivation` to empty string will
450451remove the dispatch scripts. Removing the interface using
451452`state : absent` also remove the dispatch scripts.
452453
454+ # ### Interface Alternative Name
455+
456+ Since 2.2.51, nmstate support configuration interface alternative names.
457+
458+ Example YAML for adding alternative names :
459+
460+ ` ` ` rust
461+ ---
462+ interfaces:
463+ - name: enp7s0
464+ alt-names:
465+ - name: port1
466+ - name: veryveryveryverylonglonglongname
467+ ` ` `
468+
469+ Example YAML for removing alternative names :
470+
471+ ` ` `
472+ ---
473+ interfaces:
474+ - name: enp7s0
475+ alt-names:
476+ - name: port1
477+ state: absent
478+ - name: veryveryveryverylonglonglongname
479+ state: absent
480+ ` ` `
481+
482+ Considering the alternative name might also added by external tools(e.g.
483+ systemd-udev), nmstate is doing incremental changes to interface alternative
484+ names, meaning :
485+ * Applying YAML only append alt-names to existing.
486+ * Only remove names marked with `state: absent`.
487+
453488# ## IP
454489
455490This is the example of interface with static IP addresses :
Original file line number Diff line number Diff line change 1+ ## Interface Alternative Names
2+
3+ New feature in nmstate 2.2.51.
4+
5+ Interface alternative name is a kernel property of network interface which is
6+ treat equally as interface kernel name in netlink protocol.
7+
8+ Unlike kernel interface name limitation on 15 characters, alternative name
9+ length limitation is 255(might change in the future by kernel team).
10+
11+ Like kernel interface name, alternative name should unique among all interface
12+ names and all alternative names. Nmstate will raise error otherwise.
13+
14+ Nmstate does not override existing alternative names, you can only append
15+ and remove explicitly.
16+
17+ Example YAML for adding alternative names:
18+
19+ ``` rust
20+ ---
21+ interfaces :
22+ - name : enp7s0
23+ alt - names :
24+ - name : port1
25+ - name : veryveryveryverylonglonglongname
26+ ```
27+
28+ Example YAML for removing alternative names:
29+
30+ ```
31+ ---
32+ interfaces:
33+ - name: enp7s0
34+ alt-names:
35+ - name: port1
36+ state: absent
37+ - name: veryveryveryverylonglonglongname
38+ state: absent
39+ ```
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ NetworkManager acts as the main (and currently the only) provider supported.
3636- [ IPsec] ( ./features/ipsec.md )
3737- [ DNS] ( ./features/dns.md )
3838- [ Infiniband] ( ./features/infiniband.md )
39+ - [ Interface Alternative Name] ( ./features/alt-name.md )
3940
4041## Example output
4142
You can’t perform that action at this time.
0 commit comments