Skip to content

Commit 2b35b1f

Browse files
committed
content migrated
1 parent a98afbf commit 2b35b1f

23 files changed

+365
-68
lines changed

antora.yml

-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,4 @@ nav:
55
- modules/ROOT/nav.adoc
66
- modules/LABENV/nav.adoc
77
- modules/chapter1/nav.adoc
8-
- modules/chapter2/nav.adoc
9-
- modules/chapter3/nav.adoc
108
- modules/appendix/nav.adoc

modules/ROOT/pages/index.adoc

+8-7
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
1-
= An Example Quick Course
1+
= NetworkManager Keyfile
22
:navtitle: Home
33

44
== Introduction
55

6-
Course Title: Course title FIXME
6+
Course Title: NetworkManager Keyfile
77

88
Description:
9-
Course description FIXME
9+
Understand how keyfile works and configure it to have a network interface work using the keyfile.
1010

11-
Duration: FIXME hours
11+
Duration: 30 minutes
1212

1313
== Objectives
1414

1515
On completing this course, you should be able to:
1616

17-
* Observable, measurable objective...
18-
* Observable, measurable objective...
19-
* Observable, measurable objective...
17+
* Describe the use of NetworkManager keyfile
18+
* Describe the keyfile config format
19+
* Configure a network interface to use a keyfile
20+
* Describe the impact of this configuration on upgrade/compatibility and user experience
2021

2122
== Prerequisites
2223

modules/appendix/pages/appendix.adoc

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
= Appendix
22

3-
FIXME: Content for Appendix...
3+
https://access.redhat.com/solutions/5313011[Why are scripts under /etc/sysconfig/network-scripts directory are gone on rhel8/rhel9?]
4+
5+
https://fedoraproject.org/wiki/Changes/NetworkManager_keyfile_instead_of_ifcfg_rh[Fedora Wiki: Changes/NetworkManager keyfile instead of ifcfg rh]
6+
7+
https://networkmanager.dev/docs/api/latest/nm-settings-keyfile.html[Upstream doc: nm-settings-keyfile]
8+
9+
https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/9/html/configuring_and_managing_networking/assembly_networkmanager-connection-profiles-in-keyfile-format_configuring-and-managing-networking#proc_manually-creating-a-networkmanager-profile-in-keyfile-format_assembly_networkmanager-connection-profiles-in-keyfile-format[Product Documentation: Manually creating NetworkManager profiles in key file format]
10+

modules/chapter1/nav.adoc

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
11
* xref:index.adoc[]
22
** xref:section1.adoc[]
33
** xref:section2.adoc[]
4-
** xref:section3.adoc[]
4+
** xref:section3.adoc[]
5+
** xref:section4.adoc[]
6+
** xref:section5.adoc[]
7+
** xref:section6.adoc[]
8+
** xref:section7.adoc[]
9+
** xref:section8.adoc[]
10+
** xref:section9.adoc[]
11+
** xref:section10.adoc[]

modules/chapter1/pages/index.adoc

+9-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
1-
= Chapter 1
1+
= Describe and Configure NetworkManager Keyfile
22

3-
In this section, we cover... FIXME
3+
*Topics covered in this section:*
44

5+
Describe the use of NetworkManager keyfile
6+
7+
Describe the keyfile config format
8+
9+
Configure a network interface to use a keyfile
10+
11+
Describe the impact of this configuration on upgrade/compatibility and user experience
512

6-
- Add or remove section entries in the `antora.yaml` file as needed.
7-
- Ensure you create or delete the corresponding directory for the chapter accordingly.

modules/chapter1/pages/section1.adoc

+40-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,41 @@
1-
= Section 1
1+
= What is NetworkManager keyfile?
2+
3+
NetworkManager supports profiles stored in the keyfile format.
4+
5+
NetworkManager supports profiles in the `ifcfg` format. In RHEL9, the default format is the keyfile, yet NetworkManager can also work with profiles saved in the ifcfg format. This is useful for tools like `nmcli`, the networking RHEL System Role, or the nmstate API used to manage profiles.
6+
7+
The default settings plugin of NetworkManager creates new profiles in the keyfile format instead of the `ifcfg-rh` format.
8+
9+
This feature changes the plugin order in the NetworkManager configuration file. In the main section of the configuration file, the plugin order is changed from `ifcfg-rh`,`keyfile` to `keyfile`,`ifcfg-rh`.
10+
11+
You can see the configured option with NetworkManager --print-config command.
12+
13+
[source]
14+
----
15+
NetworkManager --print-config
16+
----
17+
18+
.Sample output
19+
----
20+
# NetworkManager configuration: /etc/NetworkManager/NetworkManager.conf
21+
22+
[main]
23+
# plugins=keyfile,ifcfg-rh
24+
# rc-manager=auto
25+
# auth-polkit=true
26+
# dhcp=internal
27+
# iwd-config-path=
28+
configure-and-quit=no
29+
30+
[logging]
31+
# backend=journal
32+
# audit=false
33+
34+
[device]
35+
# wifi.backend=wpa_supplicant
36+
37+
# no-auto-default file "/var/lib/NetworkManager/no-auto-default.state"
38+
----
39+
40+
The plugins field in the preceding output shows that the NetworkManager gives preference to keyfile configurations.
241

3-
* Create multiple copies of this section as needed.
4-
* Remove any unnecessary sections or chapter pages.
5-
* Customize the section as appropriate.
6-
* Ensure that each page contains a manageable amount of content.

modules/chapter1/pages/section10.adoc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
= Summary
2+
3+
4+
* NetworkManager now supports profiles stored in the .ini-style keyfile format.
5+
6+
* Legacy ifcfg format is still be supported but will be deprecated in RHEL10.
7+
8+
* You can enable the keyfile plugin for NetworkManager in its configuration file and manually configure interfaces using the keyfile format.

modules/chapter1/pages/section2.adoc

+61-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,62 @@
1-
= Section 2
1+
= The keyfile config format
2+
3+
The keyfile config format is a simple .ini-style format. It consists of sections (groups) of key-value pairs. Each section corresponds to a setting name as described under the settings specification in manual page (nm-settings(5)).
4+
5+
Each configuration key/value pair in the section is one of the properties listed in the settings specification. Most of the properties of the specification is written in the same format into the keyfile too. These are stored in the files in a more readable way.
6+
7+
You can create or modify the keyfile connection files manually, even if that is not the recommended way of managing the profiles. However, if you choose to do that, you must inform NetworkManager about the changes via the nmcli con reload command.
8+
9+
Sample keyfile configuration for a bridge connection.
10+
11+
[source]
12+
----
13+
cat /etc/NetworkManager/system-connections/bridge-br0.nmconnection
14+
----
15+
16+
.Sample output
17+
----
18+
[connection]
19+
id=bridge-br0
20+
uuid=6dac3bf-8d0e-4c2f-8d92-ceba5f427d18
21+
type=bridge
22+
interface-name=br0
23+
24+
[bridge]
25+
26+
[ipv4]
27+
method=auto
28+
29+
[ipv6]
30+
addr-gen-mode=stable-privacy
31+
method=auto
32+
33+
[proxy]
34+
----
35+
36+
Sample keyfile configuration for an ethernet connection.
37+
38+
[source]
39+
----
40+
cat /etc/NetworkManager/system-connections/ens3.nmconnection
41+
----
42+
43+
.Sample output
44+
----
45+
[connection]
46+
id=ens3
47+
uuid=ee95a23e-a1d4-8839-79668382c0e2
48+
type=ethernet
49+
interface-name=en3
50+
51+
[ethernet]
52+
53+
[ipv4]
54+
method=auto
55+
56+
[ipv6]
57+
addr-gen-mode=eui64
58+
method=auto
59+
60+
[proxy]
61+
----
262

3-
* Create multiple copies of this section as needed.
4-
* Remove any unnecessary sections or chapter pages.
5-
* Customize the section as appropriate.
6-
* Ensure that each page contains a manageable amount of content.

modules/chapter1/pages/section3.adoc

+12-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1-
= Section 3
1+
= Directories of interest
2+
3+
Depending on the purpose of the connection profile, the file can be saved in one of the following directories:
4+
5+
* `/etc/NetworkManager/system-connections/`:
6+
The general location for persistent profiles created by the user that can also be edited. NetworkManager copies them automatically to /etc/NetworkManager/system-connections/.
7+
8+
* `/run/NetworkManager/system-connections/`:
9+
The location for temporary profiles that are automatically removed when you reboot the system.
10+
11+
* `/usr/lib/NetworkManager/system-connections/`:
12+
The location for pre-deployed immutable profiles. When you edit such a profile using the NetworkManager API, NetworkManager copies this profile to either the persistent or temporary storage.
213
3-
* Create multiple copies of this section as needed.
4-
* Remove any unnecessary sections or chapter pages.
5-
* Customize the section as appropriate.
6-
* Ensure that each page contains a manageable amount of content.

modules/chapter1/pages/section4.adoc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
= What happens to the ifcfg-rh files now?
2+
3+
Legacy `ifcfg-` files are still supported and are not deprecated.
4+
5+
If a connection has both a keyfile and an ifcfg- file, the keyfile is used and the ifcfg- file is ignored.
6+
7+
NOTE: A deprecated functionality in RHEL 9 means it is removed in RHEL 10+. If a functionality is meant to be removed in RHEL 9, it needs to be announced as deprecated in RHEL 8.

modules/chapter1/pages/section5.adoc

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
= What does the new precedence look like?
2+
3+
With RHEL9, the path `/etc/sysconfig/network-scripts/` where `ifcfg-rh`` files are found, is no longer the primary source for network interfaces.
4+
5+
NetworkManager first looks for files in the `/etc/NetworkManager/system-connections/` directory. The files in this directory should be in the keyfile format.
6+
7+
Then it looks for files in the `/etc/sysconfig/network-scripts/` directory, in the classic `ifcfg-rh` format.
8+
9+
When files for an interface get created in both of these directories, then the `/etc/NetworkManager/system-connections/` directory gets priority and is used. Further changes in the interfaces config file in the other directory are not picked up.

modules/chapter1/pages/section6.adoc

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
= What is the upgrade/compatibility impact of this change?
2+
3+
The biggest effect of this change is that new profiles are now persisted in keyfile format. This changes behavior for the users who expect NetworkManager to write ifcfg-rh files, or who have the scripts or tools that expect that.
4+
5+
What still works is that the existing ifcfg files are loaded after upgrading from RHEL8 to RHEL9. Users who only use the D-Bus API (via one of the client applications like nmcli or the GUI), do not notice the difference.
6+
7+
After upgrading NetworkManager, the ifcfg-rh files are still read, hence no intervention is required by the system administrator.
8+
9+
Also, dropping configuration snippets during package upgrade has its own downsides because new installations behave differently than upgraded systems.
10+

modules/chapter1/pages/section7.adoc

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
= Is there any change in the user experience?
2+
3+
NetworkManager now prefers the use of the keyfile format (INI files). This format is more readable to users and has a closer resemblance to how the profile is presented in nmcli.
4+
5+
If you use NetworkManager tools that use the D-Bus API (like nmcli or the GUI), then the used storage plugin and format is usually of no concern to you.
6+

modules/chapter1/pages/section8.adoc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
= Advantages of NetworkManager keyfile
2+
3+
The keyfile format has a better syntax and supports all profile types. The keyfile plugin is the only plugin to support all profiles. Having multiple plugins and file formats is confusing.
4+
5+
The long term goal of NetworkManager is to move away from ifcfg-rh files. It affects existing installations and might require migration of existing configurations.
6+
7+
This change is only a first step and affects how NetworkManager by default persists new profiles to disk.
8+

0 commit comments

Comments
 (0)