Setting Up Static IPs
4 minute read.Last Modified 2022-07-26 09:16 EDT
This article provides instructions on setting up a network interface with a static IP address or changing the main interface from a DHCP-assigned to a manually-entered static IP address. You must know the DNS name server and default gateway addresses for your IP address.
You can lose your TrueNAS connection if you change the network interface that the web interface uses!
You might need command line knowledge or physical access to the TrueNAS system to fix misconfigured network settings.
Have the DNS name server addresses and the default gateway for the new IP address, and the new static IP address on hand to prevent lost communication with the server. You have only 60 seconds to change and test these network settings before they revert back to the current settings, for example back to DHCP assigned if moving from DHCP to a static IP.
Back up your system to preserve your data and system settings.
As a precaution, grab a screenshot of your current settings in the Global Configuration widget.
If your network changes result in lost communication with the network and you need to return to the DHCP configuration you had before, you can refer to this information to restore communication with your server. Lost communicatation could require you to reconfigure your network settings using the Console Setup Menu.
To view a demonstration of this procedure see the tutorial video in the Managing Global Configuration article.
To change an interface from using DHCP to a static IP address:
Select the interface on the Interfaces widget to open the Edit Interface configuration screen to turn off DHCP and add the new static IP. Click Apply.
a. Clear the checkmark from the DHCP checkbox.
b. Click Add in the IP Addresses section of the form and then enter the new static IP address into the field displayed. Select the CIDR number from the dropdown list.
![EditInterfaceAddStaticIP](/images/SCALE/22.02/EditInterfaceAddStaticIP.png "Add IP Addresses")
c. Click Apply. The Network screen displays with a new widget where you can select to either Test Changes or Revert Changes.
![NetworkTestChangesWidget](/images/SCALE/22.02/NetworkTestChangesWidget.png "Test Change Widget")
For home users, use 18.104.22.168 for a DNS name sever address so you can communicate with external networks.
a. Add the IP addresses for the DNS name servers in the Nameserver 1, Nameserver2, and Nameserver3 fields.
![EditGlobalConfiguration](/images/SCALE/22.02/EditGlobalConfiguration.png "Add Nameserver and Default Gateway")
b. Add the IP address for the default gateway in the appropriate field. If the static network is IPv4 enter the gateway in IPv4 Default Gateway, if the static network is IPv6 use IPv6 Default Gateway.
c. Click Save.
The system attempts to connect to the new static IP address. If successful the Save Changes widget displays.
Click Save Changes to make the change to the static IP address permanent or click Revert Changes to discard changes and return to your previous settings. The Save Changes confirmation dialog displays. Click SAVE. The system displays a final confirmation that the change is in effect.
Only one interface can use DHCP to assign the IP address and that is likely the primary network interface. If you do not have a existing network interface set to use DHCP you can use it to convert from static IP to DHCP.
To return to using DHCP:
Click Settings on the Global Configuration widget.
Clear the name server fields and the default gateway, and then click Save.
Click on the interface to display the Edit Interface screen.
Remove the static IP address from the IP Address field.
Click Settings to display the Global Configuration configuration form and enter name server and default gateway addresses for the new DHCP-provided IP address. Home user can enter 22.214.171.124 in the Nameserver 1 field.
Click Test Change. If the network settings are correct, the screen displays the Save Changes widget. Click Save Changes.
If the test network operation fails or the system times out, your system returns to the network settings before you attempted the change. Verify the name server and default gateway information to try again.
- Network Interface Screens
- Managing Interfaces
- Console Setup Menu Configuration
- Setting Up a Network Bridge
- Setting Up a Link Aggregation
- Setting Up a Network VLAN
- Configuring Static Routes