Skip to content

Commit

Permalink
Jh nm comments (#407)
Browse files Browse the repository at this point in the history
* Added first batch of proposals.

* Team and bonds creating.

* Rework the modify section.

* Completed the review. Added nmcli reference.
  • Loading branch information
lvicoun authored Jan 10, 2025
1 parent 8fc67ca commit 56846de
Show file tree
Hide file tree
Showing 11 changed files with 773 additions and 357 deletions.
19 changes: 18 additions & 1 deletion articles/SLES-networkmanager-nmcli.asm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@
<resource xml:id="_networkmanager-nm-enabledisable" href="../references/networkmanager-nm-enabledisable.xml">
<description>You can enable and disable &nm; using <command>nmcli</command> command.</description>
</resource>
<resource xml:id="_networking-nmcli" href="../references/networking-nmcli.xml">
<description>The nmcli command description.</description>
</resource>
</resources>
<!-- Legal -->
<resources>
Expand Down Expand Up @@ -197,14 +200,28 @@
<module resourceref="_glue-more-info" renderas="section"/>
<module resourceref="_glue-whats-next" renderas="section"/>-->
<module resourceref="_networkmanager-nmcli-concept" renderas="section"/>
<module renderas="section">
<merge>
<title>Installing and Configuring &nm;</title>
<abstract>
<para>
On &productname;, &nm; is installed and enabled by default and thus runs out of the box.
Usually, you do not have to reinstall it or change the configuration, but if such an action is
needed, these sections provide guidance.
</para>
</abstract>
</merge>
<module resourceref="_install-networkmanager-nmcli" renderas="section"/>
<module resourceref="_networkmanager-nmcli-start" renderas="section"/>
<module resourceref="networkmanager-nmcli-conf-nwbehavior" renderas="section"/>
</module>
<module resourceref="_networkmanager-nmcli-start" renderas="section"/>

<module resourceref="_networkmanager-nmcli-configure" renderas="section"/>
<module resourceref="_networkmanager-nm-modify" renderas="section"/>
<module resourceref="_networkmanager-nm-enabledisable" renderas="section"/>
<module resourceref="_networkmanager-nm-monitor" renderas="section"/>
<module resourceref="_networkmanager-nmcli-logging" renderas="section"/>
<module resourceref="_networking-nmcli" renderas="section"/>
<module resourceref="_networkmanager-nmcli-troubleshoot" renderas="section"/>
<module resourceref="_legal" renderas="section"/>
<module resourceref="_gfdl" renderas="appendix"/>
Expand Down
30 changes: 25 additions & 5 deletions concepts/networkmanager-nmcli-concept.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,36 @@
<meta name="maintainer" content="[email protected]" its:translate="no"/>
<abstract>
<para>
&nm; is a tool that enables managing network connections and devices.</para>
&nm; is a tool that enables managing network connections and devices. &nm; allows you to create, configure and manage network connections and devices.</para>
</abstract>
</info>
<para>&nm; allows you to create, configure and manage network connections and devices. You can enable &nm; to manage primary network connection and other network interfaces. It supports state-of-the-art encryption types and standards for network connections, including connections to 802.1X protected networks. 802.1X is the IEEE Standard for Local and Metropolitan Area Networks—Port-Based Network Access Control.</para>
<para>On
&productnameshort;, &nm; has been designed to be fully automatic by default. It is enabled by
default and is shipped with all necessary service unit files that enables you to manage primary network connection and other network interfaces. &nm; supports state-of-the-art
encryption types and standards for network connections,
including connections to 802.1X protected networks. 802.1X is the IEEE Standard for Local and
Metropolitan Area Networks—Port-Based Network Access Control.</para>
<para>
You can switch between wired or wireless networks seamlessly, as &nm; automatically connects to known wireless networks and manages several network connections in parallel. You can also manually switch between available networks.
</para>
<para>In &productname;, you control &nm; via the following components:</para>
<para>&nm; is typically comprised of the following parts:</para>
<itemizedlist>
<listitem><para>&nm; daemon</para></listitem>
<listitem><para>command-line interfaces</para></listitem>
<listitem><para>&nm; daemon&mdash;you can interact with the daemon using standard
&systemd; commands</para></listitem>
<listitem><para>the <command>nmcli</command> command-line interface</para></listitem>
<listitem>
<para>
the ncurses interface <literal>nmtui</literal>
</para></listitem>
<listitem>
<para>
&nm; libraries
</para>
</listitem>
<listitem>
<para>
configuration files.
</para>
</listitem>
</itemizedlist>
</topic>
82 changes: 38 additions & 44 deletions references/networking-nmcli.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,26 +16,21 @@
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:trans="http://docbook.org/ns/transclusion">
<info>
<title>Managing the network using &nm;</title>
<title>The <command>nmcli</command> command reference</title>
<!-- can be changed via merge in the assembly -->
<!--add author's email address-->
<meta name="maintainer" content="[email protected]" its:translate="no"/>
<abstract>
<!-- can be changed via merge in the assembly -->
<para>
To manage the network using &nm;, use the <command>nmcli</command> command.
This command provides subcommands and options that enable you to add, edit or
delete connections, devices and so on.
This section provides a summary of options and
subcommands of the <command>nmcli</command> command, you can use to interact with &nm;
daemon to manage the network.
</para>
</abstract>
</info>
<section xml:id="sec-nmcli-interface">
<title>The <command>nmcli</command> command</title>
</info>
<para>
&nm; provides a CLI interface to manage your connections. By using the
<command>nmcli</command> interface, you can connect to a particular
network, edit a connection, edit a device, etc. The generic syntax of the
<command>nmcli</command> is as follows:
The <command>nmcli</command> command has the following generic syntax:
</para>
<screen>&prompt.root;nmcli <replaceable>OPTIONS</replaceable> <replaceable>SUBCOMMAND</replaceable> <replaceable>SUBCOMMAND_ARGUMENTS</replaceable></screen>
<para>
Expand All @@ -57,7 +52,7 @@
<term><command>device</command></term>
<listitem>
<para>
For details, refer to <xref linkend="sec-device-command"/>.
used for network device management. For details, refer to <xref linkend="sec-device-command"/>.
</para>
</listitem>
</varlistentry>
Expand Down Expand Up @@ -165,12 +160,12 @@
<para>
to list connections:
</para>
<screen>&prompt.root;nmcli connection show</screen>
<screen>&prompt.user;<command>nmcli connection show</command></screen>
<para>
You can also use this command to show details about a specified
connection:
</para>
<screen>&prompt.root;nmcli connection show <replaceable>CONNECTION_ID</replaceable></screen>
<screen>&prompt.user;<command>nmcli connection show <replaceable>CONNECTION_ID</replaceable></command></screen>
<para>
where <replaceable>CONNECTION_ID</replaceable> is any of the
identifiers: <emphasis>a connection name, UUID or a
Expand All @@ -186,7 +181,7 @@
connection. Also run this command after you perform any change to
the connection.
</para>
<screen>&prompt.root;nmcli connection up [--active] [<replaceable>CONNECTION_ID</replaceable>]</screen>
<screen>&prompt.sudo;<command>nmcli connection up [--active] [<replaceable>CONNECTION_ID</replaceable>]</command></screen>
<para>
When <option>--active</option> is specified, only the active
profiles are displayed. The default is to display both active
Expand All @@ -200,7 +195,7 @@
<para>
to deactivate a connection.
</para>
<screen>&prompt.root;nmcli connection down <replaceable>CONNECTION_ID</replaceable></screen>
<screen>&prompt.sudo;<command>nmcli connection down <replaceable>CONNECTION_ID</replaceable></command></screen>
<para>
where: <replaceable>CONNECTION_ID</replaceable> is any of the
identifiers: <emphasis>a connection name, UUID or a
Expand All @@ -218,7 +213,7 @@
<para>
to change or delete a property of a connection.
</para>
<screen>&prompt.root;nmcli connection modify <replaceable>CONNECTION_ID</replaceable> <replaceable>SETTING.PROPERTY</replaceable> <replaceable>PROPERTY_VALUE</replaceable></screen>
<screen>&prompt.sudo;<command>nmcli connection modify <replaceable>CONNECTION_ID</replaceable> <replaceable>SETTING.PROPERTY</replaceable> <replaceable>PROPERTY_VALUE</replaceable></command></screen>
<para>
where:
</para>
Expand Down Expand Up @@ -248,7 +243,7 @@
<option>autoconnect</option> option on the
<literal>ethernet1</literal> connection:
</para>
<screen>&prompt.root;nmcli connection modify ethernet1 connection.autoconnect no</screen>
<screen>&prompt.sudo;<command>nmcli connection modify ethernet1 connection.autoconnect no</command></screen>
</listitem>
</varlistentry>
<varlistentry>
Expand All @@ -258,15 +253,15 @@
to add a connection with the provided details. The command syntax
is similar to the <command>modify</command> command:
</para>
<screen>&prompt.root;nmcli connection add <replaceable>CONNECTION_ID</replaceable> <replaceable>save YES|NO</replaceable> <replaceable>SETTING.PROPERTY</replaceable> <replaceable>PROPERTY_VALUE</replaceable></screen>
<screen>&prompt.sudo;<command>nmcli connection add <replaceable>CONNECTION_ID</replaceable> <replaceable>save YES|NO</replaceable> <replaceable>SETTING.PROPERTY</replaceable> <replaceable>PROPERTY_VALUE</replaceable></command></screen>
<para>
You should at least specify a <literal>connection.type</literal>
or use <literal>type</literal>. The following example adds an
Ethernet connection tied to the <literal>eth0</literal> interface
with DHCP, and disables the connection's
<option>autoconnect</option> flag:
</para>
<screen>&prompt.root;nmcli connection add type ethernet autoconnect no ifname eth0</screen>
<screen>&prompt.sudo;<command>nmcli connection add type ethernet autoconnect no ifname eth0</command></screen>
</listitem>
</varlistentry>
<varlistentry>
Expand All @@ -275,7 +270,7 @@
<para>
to edit an existing connection using an interactive editor.
</para>
<screen>&prompt.root;nmcli connection edit <replaceable>CONNECTION_ID</replaceable></screen>
<screen>&prompt.sudo;<command>nmcli connection edit <replaceable>CONNECTION_ID</replaceable></command></screen>
</listitem>
</varlistentry>
<varlistentry>
Expand All @@ -285,7 +280,7 @@
to clone an existing connection. The minimal syntax
follows:
</para>
<screen>&prompt.root;nmcli connection clone <replaceable>CONNECTION_ID</replaceable> <replaceable>NEW_NAME</replaceable></screen>
<screen>&prompt.sudo;<command>nmcli connection clone <replaceable>CONNECTION_ID</replaceable> <replaceable>NEW_NAME</replaceable></command></screen>
<para>
where <replaceable>CONNECTION_ID</replaceable> is the connection
to be cloned.
Expand All @@ -298,7 +293,7 @@
<para>
to delete an existing connection:
</para>
<screen>&prompt.root;nmcli connection delete <replaceable>CONNECTION_ID</replaceable></screen>
<screen>&prompt.sudo;<command>nmcli connection delete <replaceable>CONNECTION_ID</replaceable></command></screen>
</listitem>
</varlistentry>
<varlistentry>
Expand All @@ -308,7 +303,7 @@
to monitor the provided connection. Each time the connection
changes, &nm; prints a line.
</para>
<screen>&prompt.root;nmcli connection monitor <replaceable>CONNECTION_ID</replaceable></screen>
<screen>&prompt.sudo;<command>nmcli connection monitor <replaceable>CONNECTION_ID</replaceable></command></screen>
</listitem>
</varlistentry>
<varlistentry>
Expand All @@ -328,7 +323,7 @@
<para>
to load/reload a particular connection file, run:
</para>
<screen>&prompt.root;nmcli connection load <replaceable>CONNECTION_FILE</replaceable></screen>
<screen>&prompt.sudo;<command>nmcli connection load <replaceable>CONNECTION_FILE</replaceable></command></screen>
</listitem>
</varlistentry>
</variablelist>
Expand All @@ -352,7 +347,7 @@
<para>
to print the status of all devices.
</para>
<screen>&prompt.root;nmcli device status</screen>
<screen>&prompt.user;<command>nmcli device status</command></screen>
</listitem>
</varlistentry>
<varlistentry>
Expand All @@ -362,7 +357,7 @@
shows detailed information about a device. If no device is
specified, all devices are displayed.
</para>
<screen>&prompt.root;mcli device show [<replaceable>DEVICE_NAME</replaceable>]</screen>
<screen>&prompt.user;<command>mcli device show [<replaceable>DEVICE_NAME</replaceable>]</command></screen>
</listitem>
</varlistentry>
<varlistentry>
Expand All @@ -373,7 +368,7 @@
to activate. If there is no compatible connection, a
new profile is created.
</para>
<screen>&prompt.root;nmcli device connect <replaceable>DEVICE_NAME</replaceable></screen>
<screen>&prompt.sudo;<command>nmcli device connect <replaceable>DEVICE_NAME</replaceable></command></screen>
</listitem>
</varlistentry>
<varlistentry>
Expand All @@ -384,7 +379,7 @@
the particular device. The changes are not stored in the
connection profile.
</para>
<screen>&prompt.root;nmcli device modify <replaceable>DEVICE_NAME</replaceable> [+|-] <replaceable>SETTING.PROPERTY</replaceable> <replaceable>VALUE</replaceable></screen>
<screen>&prompt.sudo;<command>nmcli device modify <replaceable>DEVICE_NAME</replaceable> [+|-] <replaceable>SETTING.PROPERTY</replaceable> <replaceable>VALUE</replaceable></command></screen>
<para>
For possible <replaceable>SETTING.PROPERTY</replaceable> values,
refer to <emphasis>nm-settings-nmcli(5)</emphasis>.
Expand All @@ -393,7 +388,7 @@
The example below starts the IPv4 shared connection sharing on
the device <literal>con1</literal>.
</para>
<screen>&prompt.root;nmcli dev modify con1 ipv4.method shared</screen>
<screen>&prompt.sudo;<command>nmcli dev modify con1 ipv4.method shared</command></screen>
</listitem>
</varlistentry>
<varlistentry>
Expand All @@ -403,7 +398,7 @@
disconnects a device and prevents the device from automatically
activating further connections without manual intervention.
</para>
<screen>&prompt.root;nmcli device disconnect <replaceable>DEVICE_NAME</replaceable></screen>
<screen>&prompt.sudo;<command>nmcli device disconnect <replaceable>DEVICE_NAME</replaceable></command></screen>
</listitem>
</varlistentry>
<varlistentry>
Expand All @@ -414,7 +409,7 @@
to delete only software devices like bonds and bridges. You
cannot delete hardware devices with this command.
</para>
<screen>&prompt.root;nmcli device <replaceable>DEVICE_NAME</replaceable></screen>
<screen>&prompt.sudo;<command>nmcli device delete <replaceable>DEVICE_NAME</replaceable></command></screen>
</listitem>
</varlistentry>
<varlistentry>
Expand All @@ -423,7 +418,7 @@
<para>
lists all available access points.
</para>
<screen>&prompt.root;nmcli device wifi</screen>
<screen>&prompt.user;<command>nmcli device wifi</command></screen>
</listitem>
</varlistentry>
<varlistentry>
Expand Down Expand Up @@ -451,12 +446,12 @@
</para>
</listitem>
</itemizedlist>
<screen>&prompt.root;nmcli device wifi connect <replaceable>SSID</replaceable> [password <replaceable>PASSWORD_VALUE</replaceable>] [ifname <replaceable>INTERFACE_NAME</replaceable>]</screen>
<screen>&prompt.sudo;<command>nmcli device wifi connect <replaceable>SSID</replaceable> [password <replaceable>PASSWORD_VALUE</replaceable>] [ifname <replaceable>INTERFACE_NAME</replaceable>]</command></screen>
<para>
To connect to a Wi-Fi <emphasis>GUESTWiFi</emphasis> with a
password <literal>pass$word2#@@</literal>, run:
</para>
<screen>&prompt.root;nmcli device wifi connect <replaceable>GUESTWiFi</replaceable> password pass$word2#@@ </screen>
<screen>&prompt.sudo;<command>nmcli device wifi connect <replaceable>GUESTWiFi</replaceable> password pass$word2#@@</command></screen>
</listitem>
</varlistentry>
</variablelist>
Expand All @@ -477,7 +472,7 @@
a command to the <command>nmcli general</command> command, status
is used by default.
</para>
<screen>&prompt.root;nmcli general status</screen>
<screen>&prompt.user;<command>nmcli general status</command></screen>
</listitem>
</varlistentry>
<varlistentry>
Expand All @@ -488,11 +483,11 @@
host name is displayed. If you specify a new host name, the value
is used to set a new host name.
</para>
<screen>&prompt.root;nmcli general hostname [<replaceable>HOSTNAME</replaceable>]</screen>
<screen>&prompt.sudo;<command>nmcli general hostname [<replaceable>HOSTNAME</replaceable>]</command></screen>
<para>
For example, to set <literal>MyHostname</literal>, run:
</para>
<screen>&prompt.root;nmcli general hostname MyHostname</screen>
<screen>&prompt.sudo;<command>nmcli general hostname MyHostname</command></screen>
</listitem>
</varlistentry>
<varlistentry>
Expand All @@ -502,7 +497,7 @@
shows your permission for &nm; operations like enabling or
disabling networking, modifying connections, etc.
</para>
<screen>&prompt.root;nmcli general permissions</screen>
<screen>&prompt.user;<command>nmcli general permissions</command></screen>
</listitem>
</varlistentry>
<varlistentry>
Expand All @@ -513,7 +508,7 @@
arguments, the command displays current logging levels and
domains.
</para>
<screen>&prompt.root;nmcli general logging [level <replaceable>LEVEL</replaceable> domains <replaceable>DOMAIN</replaceable>]</screen>
<screen>&prompt.sudo;<command>nmcli general logging [level <replaceable>LEVEL</replaceable> domains <replaceable>DOMAIN</replaceable>]</command></screen>
<para>
<replaceable>LEVEL</replaceable> is any of the values:
<literal>OFF</literal>, <literal>ERR</literal>,
Expand Down Expand Up @@ -549,7 +544,7 @@
enables or disables networking. The <command>off</command>
command deactivates all interfaces managed by &nm;.
</para>
<screen>&prompt.root;nmcli networking on</screen>
<screen>&prompt.sudo;<command>nmcli networking on</command></screen>
</listitem>
</varlistentry>
<varlistentry>
Expand All @@ -560,7 +555,7 @@
<option>check</option> is used, &nm; performs a new check of the
state. Otherwise, the last detected state is displayed.
</para>
<screen>&prompt.root;nmcli networking connectivity</screen>
<screen>&prompt.user;<command>nmcli networking connectivity</command></screen>
<para>
Possible states are the following:
</para>
Expand Down Expand Up @@ -598,7 +593,6 @@
</itemizedlist>
</listitem>
</varlistentry>
</variablelist>
</section>
</variablelist>
</section>
</topic>
Loading

0 comments on commit 56846de

Please sign in to comment.