home lab

TrueNAS SCALE Network Configuration Tips for Home Server

Learn the essentials of TrueNAS Scale network configuration. Deep dive into Failover, Loadbalancing, VLAN, and Bridge interfaces server setup.

When you set up a TrueNAS SCALE server, one of the first configuration items you will want to tackle is the network configuration. This helps make sure you achieve optimal performance and security. If you are struggling to configure your TrueNAS SCALE home server networking, this post will help you configure a static IP address, Link Aggregation (Failover, LoadBalance, LACP), VLAN, and Bridge interfaces making the TrueNAS Scale network configuration less daunting, even for those with just a little command line knowledge.

Configure from web UI or console?

While you can configure global network configuration settings from the web UI, I definitely recommend doing this from the console menu. The reason is simple. If you are using the web UI, one misstep will prevent you from being able to connect to the server.

So you will need physical access to your server console or use an IP-based KVM or have IPMI access to keep from losing connection.

Also, I have seen instances where, even when you configure things correctly from the web UI, such as with failover and load balancing, you may get disconnected and be unable to connect to the server again.

So, for this post, that is the method I will be using in the examples given.

TrueNAS SCALE Static IP Address: The Starting Point

The most basic configuration you want to set is a static IP address on your server. Why are static IP addresses important? Well, most likely, you are using TrueNAS to serve out resources in your home lab or home network. For those resources to always be found at the same IP address, you will want to configure a static address.

A static IP address remains constant, unlike a dynamic IP address configured by a dynamic host configuration protocol (DHCP) server. Assigning a static IP address to your TrueNAS system is usually the first step in the network configuration process.

First, choose option 1) Configure network interfaces. This is where you will configure your global configuration option.

Configure network interfaces menu
Configure network interfaces menu in TrueNAS SCALE

Pick the network interface you want to edit and assign a static IP address on. In my case, the (2) 10 gig connections for my TrueNAS server are found on eno3 and eno4. So, for a basic example, I am going to pick eno3 as the configured interface to host the static IP address. Keep in mind we can only select only one interface from this screen. We will see below how to create the special interfaces needed to add multiple network adapters.

Select the network interface for the truenas network static ip configuration
Select the network interface for the truenas network static ip configuration

Next, we see this screen. on the ipv4_dhcp setting, select it, and then press Enter.

Configuring a static ip address by turning off dhcp
Configuring a static ip address by turning off dhcp

Here, we select no on the DHCP checkbox.

Set dhcp to no
Set dhcp to no

Now, enter into the aliases configuration. The aliases in this context are the IP addresses we want to assign.

Entering the aliases configuration
Entering the aliases configuration

Type in the new static IP address in CIDR format containing the bits for the subnet mask. Then TAB and press OK.

Setting the ip address for truenas networking
Setting the ip address for truenas SCALE networking

You will want to Save your changes.

Saving the truenas ip aliases
Saving the truenas SCALE ip aliases

Once you save out of the configuration screen. You will see the message that you have network changes to apply. Press the a button.

You have pending network changes to commit
You have pending network changes to commit

Then you will see a message asking if you want to make the configuration persistent. Press the p button to persist the changes.

Make the changes persistent
Make the changes persistent

Hostname, default gateway, domain, DNS servers

One confusing thing with TrueNAS on the network configuration, they split up the configuration of the IP address from the configuration of the default gateway and other settings. I really think it would be best if they would consolidate this configuration as it is just confusing.

To get to these settings, you need to enter into menu item 2) Configure network settings to set these.

Configure truenas network settings
Configure truenas network settings

In this menu, you can configure the above-mentioned settings. Your default gateway will need to be on the same subnet as the IP address you are configuring for network connectivity. Below on this screen, you will see the current settings.

Truenas network settings including hostname and gateway
Truenas SCALE network settings including hostname and gateway

Configure static routes

You may want to add static routes to your TrueNAS configuration. You can configure static routes as well on menu item 3) Configure static routes.

Configure truenas network static routes
Configure truenas network static routes
No static routes found before adding them
No static routes found before adding them

The next type of network configuration is the failover configuration. The failover configuration is an option for the link aggregation interface type. With failover, you can assign multiple interfaces to the failover link. If one of the links fails, then the other link takes off and picks up traffic.

Configuring Failover in TrueNAS Scale primarily involves setting up multiple interfaces and IP addresses. A common practice is to assign multiple IP addresses to a single interface or have multiple interfaces each with a static IP address.

The web interface of TrueNAS Scale simplifies this configuration, guiding you through the necessary steps to achieve a Failover setup that meets your needs.

You will need to configure the following:

SettingSpecification
TypeLINK_AGGREGATION
Name“bond” followed by a unique number
Descriptiondefault
IPV4_dhcpNo (for a static IP address)
IPV6_autoNO (default)
AliasesYour desired IP address
Lag_protocolFAILOVER
Lag_portsSelect your adapter interfaces here
Xmit_hash_policydefault
Lacpdu_ratedefault
Other settingsMTU value
Link aggregation failover configuration
Link aggregation failover configuration

Loadbalancing is another crucial network configuration in TrueNAS Scale, aiming to distribute network traffic evenly across several servers or network interfaces. This not only enhances the performance but also the reliability of your network.

Between LoadBalance and LACP, LACP provides better resiliency against failure. In a “dumb” loadbalance configuration, the loadbalance configuration doesn’t know if there is a problem with the load balance links. However, LACP sends PDU packets to know at all times the state of the link aggregation links. So, it is the smarter of the two. However, keep in mind it is the most involved to setup, since you will have configuration that will also need to happen from the switch side as well.

The process of setting up “dumb” Loadbalancing involves configuring multiple interfaces to the link aggregation interface. A balanced distribution of network traffic is achieved by the underlying algorithms across the links.

Note the following configuration you will need to assign for the “dumb” or traditional link aggregation configuration.

SettingSpecification
TypeLINK_AGGREGATION
Name“bond” followed by a unique number
Descriptiondefault
IPV4_dhcpNo (for a static IP address)
IPV6_autoNO (default)
AliasesYour desired IP address
Lag_protocolLOADBALANCE
Lag_portsSelect your adapter interfaces here
Xmit_hash_policydefault
Lacpdu_ratedefault
Other settingsMTU value
Link aggregation load balance
Link aggregation load balance

LACP is very similar. However, as mentioned, it must also be configured on the switchports for your uplinks coming from your TrueNAS system, in addition to the TrueNAS configuration.

SettingSpecification
TypeLINK_AGGREGATION
Name“bond” followed by a unique number
Descriptiondefault
IPV4_dhcpNo (for a static IP address)
IPV6_autoNO (default)
AliasesYour desired IP address
Lag_protocolLACP
Lag_portsSelect your adapter interfaces here
Xmit_hash_policydefault
Lacpdu_ratedefault
Other settingsMTU value
Link aggregation lacp truenas network configuration
Link aggregation lacp truenas network configuration

TrueNAS SCALE VLAN: Segmenting Your Network

VLAN (Virtual Local Area Network) configuration in TrueNAS Scale allows for network segmentation for enhancing network security and performance. By creating VLANs, you can isolate network traffic, ensuring that only authorized users can access certain network resources.

Another reason to think about creating your VLAN interfaces is if you will be using TrueNAS SCALE for virtualization (no brainer) you will most likely want your various VMs to be able to connect to the different segments of your network. When you create a new VM, you can choose which interface you want it to connect to, which gives you the same effect as a port group on a VMware vSphere virtual switch as an example.

Configuring a VLAN involves creating a new network interface, assigning it a static IP address, and defining the VLAN ID and other network settings. The web interface simplifies this process, allowing for a straightforward VLAN setup.

SettingSpecification
TypeVLAN
Name“vlan” followed by a unique number
Descriptiondefault
IPV4_dhcpNo (for a static IP address)
IPV6_autoNO (default)
AliasesYour desired IP address
Vlan_parent_interfaceYour parent interface name
Vlan_tag<VLAN number>
Vlan_pcp<not set>
Other settingsMTU value

This table organizes the settings for configuring a VLAN-type network

Vlan configuration
Vlan configuration

Round robin accepts inbound traffic on any port of the LAGG group. It sends outbound traffic using a round robin scheduling algorithm. The None setting uses no link algorithm for the lag protocol.

Bridge Interfaces: Connecting Networks

Bridge interfaces in TrueNAS Scale allow for the interconnection of multiple networks at the data link layer. This is particularly useful in extending or segmenting networks. However, for my purposes and I think most others, using the link aggregation interface or assigning a static IP address to an interface you want to use will be the more common configuration. Just know they are available and you can use the Bridge interface when needed.

Wrapping up

TrueNAS SCALE has really robust networking with many different configuration options that will allow most to do just about anything they want to do. Understand the different interface configurations, including the link aggregation with failover, load balancing, and LACP, along with the VLAN interface. These will allow you to create many different configurations for your TrueNAS server that will allow you also to have the networking needed for virtualization, etc.

Subscribe to VirtualizationHowto via Email ๐Ÿ””

Enter your email address to subscribe to this blog and receive notifications of new posts by email.



Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com, and a 7-time VMware vExpert, with over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, He has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family. Also, he goes through the effort of testing and troubleshooting issues, so you don't have to.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.