doc: minor fixes

- Markdown syntax
 - Grammar fixes
 - Use lowdown's admonition syntax
 - Update examples

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2026-03-20 16:18:02 +01:00
parent ea5071a264
commit 3b85fdff87
7 changed files with 75 additions and 94 deletions
+3 -3
View File
@@ -85,12 +85,12 @@ interfaces {
admin@infix-12-34-56:/config/interface/eth0/> <b>leave</b>
admin@infix-12-34-56:/> <b>show interfaces</b>
<u>INTERFACE PROTOCOL STATE DATA </u>
eth0 ethernet UP 52:54:00:12:34:56
ipv4 192.168.2.200/24 (static)
ipv6 fe80::5054:ff:fe12:3456/64 (link-layer)
lo ethernet UP 00:00:00:00:00:00
ipv4 127.0.0.1/8 (static)
ipv6 ::1/128 (static)
eth0 ethernet UP 52:54:00:12:34:56
ipv4 192.168.2.200/24 (static)
ipv6 fe80::5054:ff:fe12:3456/64 (link-layer)
admin@infix-12-34-56:/> <b>copy running startup</b>
</code></pre>
+44 -56
View File
@@ -40,16 +40,14 @@ admin@host:/config/interface/eth0/> up
admin@host:/config/>
```
----
> **Note:** commands in configure context are automatically generated
> from the system's YANG models, hence different products likely have a
> different set of commands. However, both the `ietf-interfaces.yang`
> and `ietf-ip.yang` models, for instance, that provide the networking
> **Note**
>
> Commands in configure context are automatically generated from the
> system's YANG models, hence different products likely have a different
> set of commands. However, both the `ietf-interfaces.yang` and
> `ietf-ip.yang` models, for instance, that provide the networking
> support are common to all systems.
----
## Set IP Address on an Interface
```
@@ -74,7 +72,6 @@ interfaces {
}
```
## Saving Changes
Apply the changes (from candidate to `running-config`):
@@ -85,12 +82,12 @@ admin@host:/> show running-config
...
interfaces {
interface eth0 {
type ethernetCsmacd;
ipv4 {
address 192.168.2.200 {
prefix-length 24;
}
}
type ethernetCsmacd;
ipv4 {
address 192.168.2.200 {
prefix-length 24;
}
}
}
...
```
@@ -106,12 +103,10 @@ admin@host:/> copy running-config startup-config
The `startup-config` can also be inspected with the `show` command to
verify the changes are saved.
----
> **Note:** all commands need to be spelled out, no short forms are
> allowed in the CLI. Use the `TAB` key to make your life easier.
----
> **Important**
>
> All commands need to be spelled out, no short forms are allowed in the
> CLI. Use the `TAB` key to make your life easier.
## Changing Hostname
@@ -128,12 +123,10 @@ admin@example:/>
Notice how the hostname in the prompt does not change until the change
is committed.
----
> **Note:** critical services like syslog, mDNS, LLDP, and similar that
> advertise the hostname, are restarted when the hostname is changed.
----
> **Note**
>
> Critical services like syslog, mDNS, LLDP, and similar that advertise
> the hostname, are restarted when the hostname is changed.
## Changing Password
@@ -142,14 +135,14 @@ User management, including passwords, is also a part of `ietf-system`.
```
admin@host:/config/> edit system authentication user admin
admin@host:/config/system/authentication/user/admin/> change password
New password:
Retype password:
New password:
Retype password:
admin@host:/config/system/authentication/user/admin/> leave
```
The `change password` command starts an interactive dialogue that asks
for the new password, with a confirmation, and then salts and encrypts
the password with sha512crypt.
the password with sha512crypt.
It is also possible to use the `set password ...` command. This allows
setting an already hashed password. To manually hash a password, use
@@ -157,13 +150,11 @@ the `do password encrypt` command. This launches the admin-exec command
to hash, and optionally salt, your password. This encrypted string can
then be used with `set password ...`.
----
> **Tip:** if you are having trouble thinking of a password, there is
> also `do password generate`, which generates random but readable
> strings using the UNIX command `pwgen`.
----
> **Tip**
>
> If you are having trouble thinking of a password, there is also `do
> password generate`, which generates random but readable strings using
> the UNIX command `pwgen`.
## SSH Authorized Key
@@ -185,11 +176,11 @@ key-data AAAAB3NzaC1yc2EAAAADAQABAAABgQC8iBL42yeMBioFay7lty1C4ZDTHcHyo739gc91rTT
admin@host:/config/system/authentication/user/admin/authorized-key/example@host/> leave
```
----
> **Note:** the `ssh-keygen` program already base64 encodes the public
> key data, so there is no need to use the `text-editor` command, `set`
> does the job.
> **Note**
>
> The `ssh-keygen` program already base64 encodes the public key data,
> so there is no need to use the `text-editor` command, `set` does the
> job.
----
@@ -229,13 +220,12 @@ admin@host:/config/> leave
See the bridging example below for more.
----
> **Note:** in the CLI you do not have to create the `veth0b` interface.
> The system _infers_ this for you. When setting up a VETH pair using
> NETCONF, however, you must include the `veth0b` interface.
----
> **Tip**
>
> In the CLI you do not have to create the `veth0b` interface. The
> system _infers_ this for you. This does not apply when setting up a
> VETH pair using NETCONF or RESTCONF, then you must submit a complete
> configuration.
## Creating a Bridge
@@ -291,10 +281,8 @@ the VETH pair from the previous example) are now bridged. Any traffic
ingressing one port will egress the other. Only reserved IEEE multicast
is filtered, except LLDP frames as shown above.
----
> **Note:** the bridge can be named anything, provided the interface
> name is not already taken. However, for any name outside the pattern
> `br[0-9]+`, you have to set the interface type manually to `bridge`.
----
> **Important**
>
> The bridge can be named anything, provided the interface name is not
> already taken. However, for any name outside the pattern `br[0-9]+`,
> you have to set the interface type manually to `bridge`.
+22 -25
View File
@@ -34,13 +34,11 @@ admin@host-12-34-56:/> show # Try: Tab or ?
admin@host-12-34-56:/> # Try: Tab or ?
```
----
> **Note:** even on an empty command line, you can tap the `Tab` or `?` keys.
> **Tip**
>
> Even on an empty command line, you can tap the `Tab` or `?` keys.
> See [`help keybindings`](keybindings.md) for more tips!
----
## Key Concepts
The two modes in the CLI are the admin-exec and the configure context.
@@ -78,15 +76,15 @@ and *running* that can be managed and inspected using the `copy`,
`show`, and `configure` commands. The traditional names used in the CLI
for these are listed below:
- `factory-config` the default configuration from factory for the
device, i.e., what the system returns to after a `factory-reset`
- `startup-config` created from `factory-config` at first boot after
factory reset. Loaded as the system configuration on each boot
- `running-config` what is actively running on the system. If no
changes have been made since boot, it is the same as `startup-config`
- `candidate-config` is created from `running-config` when entering the
configure context. Any changes made here can be discarded (`abort`,
`rollback`) or committed (`commit`, `leave`) to `running-config`
- `factory-config` the default configuration from factory for the
device, i.e., what the system returns to after a `factory-reset`
- `startup-config` created from `factory-config` at first boot after
factory reset. Loaded as the system configuration on each boot
- `running-config` what is actively running on the system. If no
changes have been made since boot, it is the same as `startup-config`
- `candidate-config` is created from `running-config` when entering the
configure context. Any changes made here can be discarded (`abort`,
`rollback`) or committed (`commit`, `leave`) to `running-config`
Edit the *running* configuration using the `configure` command. This
copies *running* to *candidate*, a temporary datastore, where changes
@@ -131,16 +129,13 @@ In *configure context* the following commands are available:
| `do command` | Call admin-exec command: `do show log` |
| `commit` | |
## Example Session
----
> **Tip**
>
> Remember to use the `TAB` and `?` keys to speed up your navigation.
> See [`help keybindings`](keybindings.md) for more tips!
----
In this example we enter configure context to add an IPv4 address to
interface `eth0`, then we apply the changes using the `leave` command.
@@ -151,8 +146,8 @@ save the changes for the next reboot.
admin@host-12-34-56:/> configure
admin@host-12-34-56:/config/> edit interface eth0
admin@host-12-34-56:/config/interface/eth0/> set ipv4 <TAB>
address autoconf bind-ni-name enabled
forwarding mtu neighbor
address autoconf bind-ni-name dhcp
enabled forwarding mtu neighbor
admin@host-12-34-56:/config/interface/eth0/> set ipv4 address 192.168.2.200 prefix-length 24
admin@host-12-34-56:/config/interface/eth0/> show
type ethernetCsmacd;
@@ -193,10 +188,12 @@ admin@host-12-34-56:/> copy startup-config running-config
Or restart the device, for example if the change to the configuration
caused you to lose contact with the system (it happens to the best of
us). The system will start up from the last "save gave".
us). The system will start up from the last "save game".
> **Tip:** when restoring a backup of a configuration, or having manually
> edited a config file, you can validate it using system's YANG models,
> it is *not* applied if validation is successful:
> **Tip:** Restoring Backups
>
> When restoring a backup of a configuration, or having manually edited
> a config file, you can validate it using the system's YANG models, it
> is *not* applied if validation is successful:
>
> `copy /media/backup/old.cfg running-config validate`
+1 -2
View File
@@ -33,7 +33,7 @@ CLI has several keybindings, most significant first:
| Ctrl-t | | Transpose/Swap characters before and at cursor |
| Meta-# | Alt-Shift-3 | Prepend # to current line and submit to history |
## What is Meta?
## What is Meta
The Meta key is called Alt on most modern keyboards. If you have
neither, first tap the Esc key instead of holding down Alt/Meta.
@@ -53,4 +53,3 @@ See possible arguments, with brief help text, to a command:
...
Type the command, then tap the `?` key.
-1
View File
@@ -18,7 +18,6 @@ A subnet can be entered in two ways:
An optional `split LEN` can be given as argument, the new length value
must be bigger than the current prefix length. See example below.
## Examples
Its most commonly used features are to understand how many addresses an
+3 -5
View File
@@ -23,10 +23,8 @@ keybindings are really useful to learn!
| `help text-editor` | Help with the built-in text-editor command |
| `help keybindings` | Lists available keybindings & other helpful tricks |
----
> In `configure` context the `help setting` command shows the YANG
> **Tip:** Online Help
>
> In `configure` context the `help <setting>` command shows the YANG
> description text for each node and container. To reach the admin
> exec help from configure context, e.g., `do help text-editor`
----
+2 -2
View File
@@ -10,7 +10,7 @@ use the `upgrade` command and a URI to a ftp/tftp/sftp or http/https server
that hosts the file:
```
admin@host:/> upgrade tftp://192.168.122.1/firmware-x86_64-v23.11.pkg
admin@example:/> upgrade tftp://192.168.122.1/firmware-x86_64-v23.11.pkg
installing
0% Installing
0% Determining slot states
@@ -31,7 +31,7 @@ installing
99% Updating slots done.
100% Installing done.
Installing `tftp://192.168.122.1/firmware-x86_64-v23.11.pkg` succeeded
admin@host:/>
admin@example:/>
```
The secondary partition (`rootfs.1`) has now been upgraded and will be used as