From 739ecbe4a6ccbb46cb58eeb9ab9221c5293d8278 Mon Sep 17 00:00:00 2001 From: MCamp859 Date: Mon, 19 Nov 2018 15:48:51 -0500 Subject: [PATCH] Add Assign static IP address to maint guide section. Signed-off-by: MCamp859 --- .../guides/maintenance/assign-static-ip.rst | 70 +++++++++++++++++++ .../guides/maintenance/maintenance.rst | 1 + 2 files changed, 71 insertions(+) create mode 100644 source/clear-linux/guides/maintenance/assign-static-ip.rst diff --git a/source/clear-linux/guides/maintenance/assign-static-ip.rst b/source/clear-linux/guides/maintenance/assign-static-ip.rst new file mode 100644 index 00000000..e198deec --- /dev/null +++ b/source/clear-linux/guides/maintenance/assign-static-ip.rst @@ -0,0 +1,70 @@ +.. _assign-static-ip: + +Assign a static IP address to a network interface +################################################# + +Introduction +************ + +*<< Need input: why you need to do this and/or how it relates to other +tasks. Prerequisites? Any issues that are solved by doing this? >>* + +Process +******* + +#. Make this directory: + + .. code-block:: bash + + $ sudo mkdir -p /etc/systemd/network + +#. Identify the interface to be assigned the static IP address: + + .. code-block:: bash + + $ ip addr + + The system returns the following: + + .. code-block:: console + + 1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 + link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 + inet 127.0.0.1/8 scope host lo + valid_lft forever preferred_lft forever + inet6 ::1/128 scope host + valid_lft forever preferred_lft forever + + 2: wlp1s0: mtu 1500 qdisc mq state DOWN group default qlen 1000 + link/ether 4a:98:8d:e5:43:15 brd ff:ff:ff:ff:ff:ff + + 3: eno1: mtu 1500 qdisc fq state UP group default qlen 1000 + link/ether f4:4d:30:68:96:20 brd ff:ff:ff:ff:ff:ff + inet 10.0.1.2/24 brd 10.54.74.255 scope global dynamic eno1 + valid_lft 6766sec preferred_lft 6766sec + inet6 fe80::f64d:30ff:fe68:9620/64 scope link + valid_lft forever preferred_lft forever + + In this example, we will use the `eno1` interface. + +#. Create the :file:`70-static.network` file and add the following: + + .. code-block:: bash + + $ sudo vi /etc/systemd/network/70-static.network + + [Match] + Name=[interface name] + [Network] + Address=[IP address]/24 + DHCP=yes # to get DNS info, etc. + + Replace [interface-name] and [IP-address] with your specific settings. + +#. Restart the networkd service: + + .. code-block:: bash + + # sudo systemctl restart systemd-networkd + +**Congratulations!** You have successfully assigned a static IP address. \ No newline at end of file diff --git a/source/clear-linux/guides/maintenance/maintenance.rst b/source/clear-linux/guides/maintenance/maintenance.rst index 0751cd2b..b5657d9d 100644 --- a/source/clear-linux/guides/maintenance/maintenance.rst +++ b/source/clear-linux/guides/maintenance/maintenance.rst @@ -25,3 +25,4 @@ completed. download-verify-decompress-mac download-verify-decompress-windows autospec + assign-static-ip