Setting Up Static IPs
5 minute read.
Last Modified 2022-12-12 10:23 -0500This 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.
Disruptive Change!
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.
2. Check the name servers and default router information in the Global Information card. If the current settings are not on the same network click Settings and modify each as needed to allow the static IP to communicate over the network.
For home users, use 8.8.8.8 for a DNS name sever address so you can communicate with external networks.
5. Test the network changes. Click Test Changes. Select Confirm to activate Test Changes button. Click the button and then click Save on the Save Changes dialog.
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.
-
Select DHCP.
-
Remove the static IP address from the IP Address field.
-
Click Apply.
-
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 8.8.8.8 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.
Related Content
- 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