From 61975f7ced81ed20b5c231764d75e56faf41e5c4 Mon Sep 17 00:00:00 2001 From: MCamp859 Date: Wed, 14 Mar 2018 11:07:15 -0400 Subject: [PATCH 1/3] Edited for grammar, formatting, and text flow. Modified topic title. Replaced # with sudo. Removed ini role, added bash role to user entry code blocks. Removed duplicated external link. Edited text for active voice and consistency between steps. Signed-off-by: MCamp859 --- .../guides/network/network-bonding.rst | 115 +++++++++--------- 1 file changed, 60 insertions(+), 55 deletions(-) diff --git a/source/clear-linux/guides/network/network-bonding.rst b/source/clear-linux/guides/network/network-bonding.rst index 6b562280..8cde75cd 100644 --- a/source/clear-linux/guides/network/network-bonding.rst +++ b/source/clear-linux/guides/network/network-bonding.rst @@ -1,32 +1,42 @@ .. _network-bonding: -Combine multiple interfaces -########################### +Combine multiple interfaces with network bonding +################################################ -Network bonding is a technique for combining multiple network interfaces into -a single, logical interface, providing some redundancy and bandwidth -aggregation. +Network bonding combines multiple network interfaces into a single logical +interface to provide redundancy and bandwidth aggregation. -|CLOSIA| includes the bonding_ and team_ drivers. The guide example provided -below shows how to configure systemd to use the ``bonding`` driver. +|CLOSIA| includes Linux bonding_ and team_ drivers. This guide describes how +to configure systemd to use the `bonding` driver. + +The example demonstrates how to: + +* Bond all four ports of a quad-port NIC in `802.3ad` mode. + +* Enable jumbo frames to optimize large data transfers on the local network. + +You may need to configure your NICs and network switch to support `802.3ad` +mode and jumbo frames. .. note:: - All commands in this guide must be run as root. -1. Create the ``/etc/systemd/network`` directory (if it doesn't already exist): + You must run all commands in this guide as root. + +#. Create the :file:`/etc/systemd/network` directory. + + .. code-block:: bash + + sudo mkdir -p /etc/systemd/network + + The :file:`/etc/systemd/network` directory contains configuration files and + network settings for the virtual device and its underlying physical + interfaces. + +#. Configure systemd to create a virtual network device called `bond1`. Use a + text editor to create a file named :file:`30-bond1.netdev`. .. code-block:: console - # mkdir -p /etc/systemd/network - - This directory contains the configuration files and network settings - for the virtual device and its underlying physical interfaces. - -2. Configure systemd to create a virtual network device, ``bond1``. Use a text - editor to create a file named ``30-bond1.netdev`` as shown here: - - .. code-block:: ini - [NetDev] Name=bond1 Kind=bond @@ -37,19 +47,15 @@ below shows how to configure systemd to use the ``bonding`` driver. MIIMonitorSec=1s LACPTransmitRate=fast - The syntax for this file is defined in the systemd.netdev_ manpage. - `This example`__ may be used verbatim, or tuned to your particular - requirements. Note that ``802.3ad`` mode requires explicit support from - your NICs and network switch. This and other modes may also require - additional configuration of your network switch. + Refer to the systemd.netdev_ manpage for :file:`30-bond1.netdev` file + syntax. This example is based on Example 9 on the manpage. Modify the + example for your configuration. -__ https://www.freedesktop.org/software/systemd/man/systemd.netdev.html#id-1.20.10 +#. Configure the slave interfaces. Create a text file named + :file:`30-bond1-enp1s0.network`. Assign the slave interfaces to the virtual + `bond1` device and use the syntax shown in systemd.network_. -3. Configure the slave interfaces, assigning them to the new ``bond1`` device, - using the syntax in systemd.network_, and in a text file named - ``30-bond1-enp1s0.network`` as shown here: - - .. code-block:: ini + .. code-block:: console [Match] Name=enp1s0f* @@ -60,21 +66,20 @@ __ https://www.freedesktop.org/software/systemd/man/systemd.netdev.html#id-1.20. [Link] MTUBytes=9000 - This example demonstrates bonding all four ports of a quad-port NIC, with - names in the range ``enp1s0f0-enp1s0f3``, allowing the use of a single file - with a wildcard match. You may also create a separate file for each NIC, - particularly if they have names that are not wildcard-friendly. This - configuration assigns each NIC as a slave of ``bond1``. For best results, - do not assign addresses or DHCP support to the individual NICs. + The example bonds all four ports of a quad-port NIC as a slave of `bond1`. + The example uses a wildcard match because the NIC names are in the range + `enp1s0f0-enp1s0f3`. If your NIC names are not wildcard-compatible, create + a separate :file:`.network` file for each NIC. - This example also enables jumbo frames of up to 9000 bytes to optimize large - data transfers on the local network. Again, your NICs and switch must - support jumbo frames, and your switch may require additional configuration. + For best results, do not assign addresses or DHCP support to the individual + NICs. -4. Define the network configuration for the bonded interface in a file named - ``30-bond1.network`` as shown here: + The `[Link]` setting enables jumbo frames of up to 9000 bytes. Your switch + may require additional configuration to support this setting. - .. code-block:: ini +#. Configure the bonded interface in a file named :file:`30-bond1.network`. + + .. code-block:: console [Match] Name=bond1 @@ -86,25 +91,25 @@ __ https://www.freedesktop.org/software/systemd/man/systemd.netdev.html#id-1.20. [Link] MTUBytes=9000 - Since ``bond1`` is a virtual interface, it has no concept of physical link - status. The ``BindCarrier`` directive indicates that the link status of this - interface is determined by the status of the listed slave devices. + `bond1` is a virtual interface with no physical link status. - This is the logical interface, so assign it an IP address. DHCP is more - complicated with bonded interfaces, and is not covered in this example. + `BindCarrier` indicates that the `bond1` link status is determined by the + status of the listed slave devices. - This file also enables jumbo frames of up to 9000 bytes. This option must be - enabled for all slave interfaces *and* the bonded interface, in order to take - effect. + `Address` contains an IP address that you assign to the logical interface. + DHCP bonded interfaces are complex and outside the scope of this example. -5. Apply the new network configuration: + `MTUBytes` must be the same on all slave interfaces and on the bonded + interface for successful operation. - .. code-block:: console +#. Apply the new network configuration with the command: - # systemctl restart systemd-networkd + .. code-block:: bash - The MTU settings will not take effect until a reboot, or if you explicitly - apply them via ``ifconfig``, for example. + sudo systemctl restart systemd-networkd + + The `MTUBytes` settings do not take effect until you reboot or you explicitly + apply the settings with a utility such as `ifconfig`. .. _bonding: https://www.kernel.org/doc/Documentation/networking/bonding.txt From ef04ca612a689b5aae118b4a1cc8a6c132e88f1a Mon Sep 17 00:00:00 2001 From: MCamp859 Date: Thu, 15 Mar 2018 15:01:51 -0400 Subject: [PATCH 2/3] Updated network-bonding doc per review feedback. Signed-off-by: MCamp859 --- .../guides/network/network-bonding.rst | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/source/clear-linux/guides/network/network-bonding.rst b/source/clear-linux/guides/network/network-bonding.rst index 8cde75cd..648e3e5a 100644 --- a/source/clear-linux/guides/network/network-bonding.rst +++ b/source/clear-linux/guides/network/network-bonding.rst @@ -15,8 +15,9 @@ The example demonstrates how to: * Enable jumbo frames to optimize large data transfers on the local network. -You may need to configure your NICs and network switch to support `802.3ad` -mode and jumbo frames. +Your NICs and network switch must support `802.3ad` mode and jumbo frames. The +example explains how to configure your NICs for both features. Your switch may +require additional configuration. See your switch documentation for details. .. note:: @@ -74,8 +75,8 @@ mode and jumbo frames. For best results, do not assign addresses or DHCP support to the individual NICs. - The `[Link]` setting enables jumbo frames of up to 9000 bytes. Your switch - may require additional configuration to support this setting. + The `MTUBytes` setting enables jumbo frames of up to 9000 bytes. Your + switch may require additional configuration to support this setting. #. Configure the bonded interface in a file named :file:`30-bond1.network`. @@ -99,8 +100,9 @@ mode and jumbo frames. `Address` contains an IP address that you assign to the logical interface. DHCP bonded interfaces are complex and outside the scope of this example. - `MTUBytes` must be the same on all slave interfaces and on the bonded - interface for successful operation. + `MTUBytes` must be set to 9000 on all slave interfaces and on the bonded + interface for successful jumbo frames operation. If `MTUBytes` is not the + same on all interfaces, then the lowest value is used. #. Apply the new network configuration with the command: @@ -108,7 +110,7 @@ mode and jumbo frames. sudo systemctl restart systemd-networkd - The `MTUBytes` settings do not take effect until you reboot or you explicitly + The `MTUBytes` settings do not take effect until you reboot or manually apply the settings with a utility such as `ifconfig`. .. _bonding: From 74d0af843b1736e93f05d1eecfd0b8bf835862ac Mon Sep 17 00:00:00 2001 From: MCamp859 Date: Thu, 22 Mar 2018 14:23:54 -0400 Subject: [PATCH 3/3] Added sudo -s as first command and deleted sudo from other commands. Signed-off-by: MCamp859 --- source/clear-linux/guides/network/network-bonding.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/source/clear-linux/guides/network/network-bonding.rst b/source/clear-linux/guides/network/network-bonding.rst index 648e3e5a..1b601748 100644 --- a/source/clear-linux/guides/network/network-bonding.rst +++ b/source/clear-linux/guides/network/network-bonding.rst @@ -23,11 +23,17 @@ require additional configuration. See your switch documentation for details. You must run all commands in this guide as root. +#. Log in and get root privileges. + + .. code-block:: console + + sudo -s + #. Create the :file:`/etc/systemd/network` directory. .. code-block:: bash - sudo mkdir -p /etc/systemd/network + mkdir -p /etc/systemd/network The :file:`/etc/systemd/network` directory contains configuration files and network settings for the virtual device and its underlying physical @@ -108,7 +114,7 @@ require additional configuration. See your switch documentation for details. .. code-block:: bash - sudo systemctl restart systemd-networkd + systemctl restart systemd-networkd The `MTUBytes` settings do not take effect until you reboot or manually apply the settings with a utility such as `ifconfig`.