5 minute read.Last Modified 2023-11-30 10:15 EST
You can add new or edit existing network interfaces on the Network screen.
LAGG (Link Aggregation)
You should use LAGG if you want to optimize multi-user performance, balance network traffic, or have network failover protection.
For example, Failover LAGG prevents a network outage by dynamically reassigning traffic to another interface when one physical link (a cable or NIC) fails.
You should use a Bridge if you want to enable communication between two networks and provide a way for them to work as a single network.
For example, bridges can serve IPs to multiple VMs on one interface, which allows your VMs to be on the same network as the host.
Static IP addresses are used to set a fixed address for an interface that external devices or websites need to access or remember, such as for VPN access.
Use aliases to add multiple internal IP addresses, representing containers or applications hosted in a VM, to an existing network interface without having to define a separate network interface.
In the UI, you can add aliases when you add an interface or edit an existing interface. Use the Add button in the Aliases widget to add a static IP address. Press Add again to add each additional alias.
From the Console Setup Menu, select option 1 to configure network settings and add alias IP addresses.
You can only use DHCP to provide the IP address for one network interface and this is most likely for your primary network interface configured during the installation process.
To add another network interface leave the DHCP checkbox clear and click the Add button near the bottom of the Add Interface configuration panel so you can enter a static IP address for the interface.
Click Add on the Interfaces widget to display the Add Interface panel.
You must specify the type of interface you want to create. The Type field provides three options: Bridge, Link Aggregation or LAGG, and VLAN or virtual LAN. You cannot edit the interface type after you click Save.
Each interface type displays new fields on the Add Interface panel. Links with more information on adding these specific types of interfaces are at the bottom of this article.
Click on an existing interface in the Interfaces widget to display the Edit Interface configuration panel. The fields on the Edit Interface and Add Interface configuration panel fields are identical except for the Type and Name fields. Both of these fields are editable only on the Add Interface panel before you click Save. The Type field only appears on the Add Interface configuration panel.
Because you cannot edit the interface type or name after you click Save, if you make a mistake with either field you can only delete that interface and create a new one with the desired type.
If you want to change from DHCP to a static IP, you must also add the new default gateway and DNS nameservers that work with the new IP address. See Setting Up a Static IP for more information.
If you delete the primary network interface you can lose your TrueNAS connection and the ability to communicate with the TrueNAS through the web interface!
You might need command line knowledge or physical access to the TrueNAS system to fix misconfigured network settings.
Click the delete icon next to the interface. The delete interface confirmation dialog displays.
Do not delete the primary network interface!
If you delete the primary network interface you lose your TrueNAS connection and the ability to communicate with the TrueNAS through the web interface! You might need command line knowledge or physical access to the TrueNAS system to fix misconfigured network settings.
Multiple interfaces connected to a single TrueNAS system cannot be members of the same subnet.
You can combine multiple interfaces with Link Aggregation (LAGG) or a Network Bridge. Alternatively, you can assign multiple static IP addresses to a single interface by configuring aliases.
When multiple Network Interface Cards (NICs) connect to the same subnet, users might incorrectly assume that the interfaces load balance automatically. However, ethernet network topology allows only one interface to communicate at a time. Additionally, both interfaces must handle broadcast messages since they are listening on the same network. This configuration adds complexity and significantly reduces network throughput.
If you require multiple NICs on a single network for performance optimization, you can use a Link Aggregation (LAGG) configured for Link Aggregation Control Protocol (LACP). A single LAGG interface with multiple NICs appears as a single connection to the network.
While LACP is beneficial for larger deployments with many active clients, it might not be practical for smaller setups. It provides additional bandwidth or redundancy for critical networking situations. However LACP has limitations as it does not load balance packets.
On the other hand, if you need multiple IP addresses on a single subnet, you can configure one or more static IP aliases for a single NIC.
In summary, it is recommended to use LACP if you need multiple interfaces on a network. If you need multiple IP addresses, you can define aliases. Deviation from these practices might result in unexpected behavior.
For a detailed explanation of ethernet networking concepts and best practices for networking multiple NICs, you can refer to this discussion from National Instruments.
If you want to configure alias IPs for access to internal portions of the network, from the Network screen:
Click on the interface to open the Edit Interface screen for the selected interface.
Clear the checkmark for DHCP to show the Aliases fields, and then click Add for each alias you want to add to this interface.
Enter the IP address and CIDR values for the alias(es) you want to add.
Select DHCP to control the primary IP for the interface.