[networking-guide] master: Improve markup of nmcli examples (16a65d4)
stephenw at fedoraproject.org
stephenw at fedoraproject.org
Tue Jul 15 20:29:10 UTC 2014
Repository : http://git.fedorahosted.org/cgit/docs/networking-guide.git
On branch : master
>---------------------------------------------------------------
commit 16a65d4649510ed86d18e6a71e820acd53e5fe19
Author: Stephen Wadeley <swadeley at redhat.com>
Date: Tue Jul 15 22:22:57 2014 +0200
Improve markup of nmcli examples
adding <replaceable> tags to examples
There were complaints that the examples were hard to read
>---------------------------------------------------------------
en-US/Configure_Networking.xml | 31 ++++++++++++++++---------------
1 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/en-US/Configure_Networking.xml b/en-US/Configure_Networking.xml
index 4637e41..4cf9d7b 100644
--- a/en-US/Configure_Networking.xml
+++ b/en-US/Configure_Networking.xml
@@ -1902,7 +1902,7 @@ For example:
<synopsis> <literal>type</literal>-ifname[-number]</synopsis>
</para>
<para>
- The connection name is the name of a connection profile and should not be confused with the interface name that denotes a device (<interface>wlan0</interface>, <interface>eth0</interface>, <interface>em1</interface>, and so on). Users can however name the connections after interfaces, but they are not the same thing. There can be multiple connection profiles available for a device. This is particularly useful for mobile devices or when switching a network cable back and forth between different devices. Rather than edit the configuration, create different profiles and apply them to the interface as needed. The <command>id</command> command also refers to the connection profile name.
+ The connection name is the name of a <firstterm>connection profile</firstterm> and should not be confused with the interface name that denotes a device (<interface>wlan0</interface>, <interface>eth0</interface>, <interface>em1</interface>, and so on). Users can however name the connections after interfaces, but they are not the same thing. There can be multiple connection profiles available for a device. This is particularly useful for mobile devices or when switching a network cable back and forth between different devices. Rather than edit the configuration, create different profiles and apply them to the interface as needed. The <option>id</option> option also refers to the connection profile name.
</para>
</listitem>
</varlistentry>
@@ -1949,18 +1949,19 @@ lo loopback unmanaged</screen>
<bridgehead id="Adding_an_Ethernet_Connection">Adding an Ethernet Connection</bridgehead>
<para>
To add an Ethernet connection with manual <systemitem class="protocol">IP</systemitem> configuration, issue a command as follows:
- <screen>~]$ <command>nmcli con add con-name my-eth1 ifname eth1 type ethernet ip4 192.168.100.100/24 \</command>
- <command>gw4 192.168.100.1 ip4 1.2.3.4 ip6 abbe::cafe</command></screen>
+ <screen>~]$ <command>nmcli con add con-name <replaceable>my-eth1</replaceable> ifname <replaceable>eth1</replaceable> type ethernet ip4 192.168.100.100/24 \</command>
+ <command>gw4 192.168.100.1</command></screen>
+ Optionally, at the same time specify <systemitem class="protocol">IPv6</systemitem> addresses for the device as follows:
+ <screen>~]$ <command>nmcli con add con-name <replaceable>my-eth1</replaceable> ifname <replaceable>eth1</replaceable> type ethernet ip4 192.168.100.100/24 \</command>
+<command> gw4 192.168.100.1 ip6 abbe::cafe gw6 2001:db8::1</command></screen>
To add two <systemitem class="protocol">IPv4</systemitem> <systemitem class="protocol">DNS</systemitem> server addresses:
- <screen>~]$ <command>nmcli con mod my-eth1 ipv4.dns "8.8.8.8 8.8.4.4"</command></screen>
+ <screen>~]$ <command>nmcli con mod <replaceable>my-eth1</replaceable> ipv4.dns "8.8.8.8 8.8.4.4"</command></screen>
To add two <systemitem class="protocol">IPv6</systemitem> <systemitem class="protocol">DNS</systemitem> server addresses:
- <screen>~]$ <command>nmcli con mod my-con-em1 ipv6.dns "2001:4860:4860::8888 2001:4860:4860::8844"</command></screen>
+ <screen>~]$ <command>nmcli con mod <replaceable>my-eth1</replaceable> ipv6.dns "2001:4860:4860::8888 2001:4860:4860::8844"</command></screen>
To bring up the new connection, issue a command as follows:
- <screen>~]$ <command>nmcli -p con up "my-eth1" ifname eth1</command></screen>
+ <screen>~]$ <command>nmcli -p con up "<replaceable>my-eth1</replaceable>" ifname <replaceable>eth1</replaceable></command></screen>
To view detailed information about the newly configured connection, issue a command as follows:
- <screen>~]$ <command>nmcli -p con show my-eth1</command></screen>
- To lock this connection to a specific MAC address, issue a command as follows:
- <screen>~]$ <command>nmcli connection edit type ethernet con-name "my-eth1" mac 00-00-5E-00-53-00</command></screen>
+ <screen>~]$ <command>nmcli -p con show configured <replaceable>my-eth1</replaceable></command></screen></para>
</para>
<bridgehead id="Adding_a_Wi-Fi_Connection">Adding a Wi-Fi Connection</bridgehead>
@@ -1973,11 +1974,11 @@ NextDoor Infra 1 54 MB/s 27 ▂___ WPA2</screen>
</para>
<para>
To create a Wi-Fi connection profile with manual <systemitem class="protocol">IP</systemitem> configuration, but allowing automatic <systemitem class="protocol">DNS</systemitem> address assignment, issue a command as follows:
- <screen>~]$ <command>nmcli con add con-name MyCafe ifname wlan0 type wifi ssid MyCafe \</command>
+ <screen>~]$ <command>nmcli con add con-name <replaceable>MyCafe</replaceable> ifname wlan0 type wifi ssid MyCafe \</command>
<command>p4 192.168.100.101/24 gw4 192.168.100.1</command></screen>
To set a WPA2 password, for example <quote>caffeine</quote>, issue commands as follows:
-<screen>~]$ <command>nmcli con modify MyCafe wifi-sec.key-mgmt wpa-psk</command>
-~]$ <command>nmcli con modify MyCafe wifi-sec.psk caffeine</command></screen>
+<screen>~]$ <command>nmcli con modify <replaceable>MyCafe</replaceable> wifi-sec.key-mgmt wpa-psk</command>
+~]$ <command>nmcli con modify <replaceable>MyCafe</replaceable> wifi-sec.psk caffeine</command></screen>
</para>
<para>
To change Wi-Fi state, issue a command in the following format:
@@ -1987,12 +1988,12 @@ NextDoor Infra 1 54 MB/s 27 ▂___ WPA2</screen>
<bridgehead id="Changing_a_Specific_Property">Changing a Specific Property</bridgehead>
<para>
To check a specific property, for example <literal>mtu</literal>, issue a command as follows:
- <screen>~]$ <command>nmcli connection show id 'MyCafe' | grep mtu</command>
+ <screen>~]$ <command>nmcli connection show id '<replaceable>MyCafe</replaceable>' | grep mtu</command>
802-11-wireless.mtu: auto</screen>
To change the property of a setting, issue a command as follows:
- <screen>~]$ <command>nmcli connection modify id 'MyCafe' 802-11-wireless.mtu 1350</command></screen>
+ <screen>~]$ <command>nmcli connection modify id '<replaceable>MyCafe</replaceable>' 802-11-wireless.mtu 1350</command></screen>
To verify the change, issue a command as follows:
- <screen>~]$ <command>nmcli connection show id 'MyCafe' | grep mtu</command>
+ <screen>~]$ <command>nmcli connection show id '<replaceable>MyCafe</replaceable>' | grep mtu</command>
802-11-wireless.mtu: 1350</screen>
</para>
<para>
More information about the docs-commits
mailing list