Unable to change subnet for TrueNAS

planedrop

Dabbler
Joined
Jun 28, 2021
Messages
26
Maybe there is something I'm missing that's super obvious (real tired today) but is there basically no easy way to move a TrueNAS server over to another subnet?

I'm currently trying to adjust mine so it's in a new subnet, and I can change the interface IP address as you should, but I can't change the default gateway at the same time as it says it's not reachable. Meaning that once the new IP address on the interface is applied TrueNAS has an incorrect default gateway and therefore can't be accessed on the WebGUI to accept the changes made.

To make things perfectly clear, I'm no noob, and yes the firewall rules are in place to allow connections to the other subnet from my client (and I've validated they are working and opening states), and I can ping the TrueNAS from the firewall (which will ping from a local layer 2 address) once the interface IP is updated, so the changes are applying correctly.

TLDR; how do I change the default gateway and interface IP address at the same time?
 

JBBB-

Cadet
Joined
Jul 26, 2022
Messages
6
I registered just for the purpose of replying to your question. Was it ever answered? I just downloaded both Core and Scale for the purpose of installing and testing in a VM, and ran into the same problems with both that you did. It is brain dead stupid to separate interface address configuration from gateway configuration the way iX does. I couldn't even change the IP from dynamic to static at the console - forget moving to another subnet.

I did find a YouTube video from iX that was supposed to show how to change from DHCP to static in the console. I tried it in Core but my installation behaved entirely different from the one used in the video. I was never given the same prompts, and FreeNAS simply reconfigured to dynamic. I thought to, and still may, change the IP config at the OS level, but my expectations are low.

Frankly, this is insulting. I also am appalled that nobody at iX would take a minute to answer you, and this garbage is supposed to be an enterprise solution?
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
It is brain dead stupid to separate interface address configuration from gateway configuration the way iX does.

Welcome to the forums.

It isn't brain dead stupid, because it accurately represents the way things work at the UNIX networking level. Let's consider the case where you are on the NAS and try to run "ping 8.8.8.8". In such a case, which outgoing interface should be selected? This is why there's only one default route and it isn't tied to interface configuration.

I couldn't even change the IP from dynamic to static at the console - forget moving to another subnet.

Many sites are running with multiple interfaces, which typically should be configured statically. There's often been brokenness when people try to mix multiple DHCP and static interfaces, these configurations are somewhat problematic.

I also am appalled that nobody at iX would take a minute to answer you,
This is not iXsystems technical support. The posters here, except for those badged as "iXsystems", are fellow community members who are taking time out of their day to share their expertise. iXsystems provides no official support for TrueNAS CORE/Scale; support for paying customers is handled as part of your TrueNAS Enterprise purchase.

Please note that there are maybe half a dozen forum members that have extensive familiarity with networking and related complications. I know I'm usually the one who takes on beginner misconceptions and spends time trying to explain stuff like the multiple interfaces on a single network, etc., and if you're willing to learn and adjust your worldview to match reality, I'm generally happy to spend a significant amount of time trying to educate. However, my time here has been limited because I'm coming off a two month hospitalization for some serious medical issues, and so haven't been as involved in authoring long responses.

this garbage is supposed to be an enterprise solution?
Have you actually used enterprise solutions? I'll take TrueNAS over most of them any day. Please don't lose view of the fact that iXsystems sells this stuff and is rapidly growing. As a non-enterprise customer, you don't have an iX engineer assisting you with setup and integration of your system. You're expected to have the background knowledge yourself, or at least be able to bring yourself up to speed. Here in the forums, we can help you with that latter.

how do I change the default gateway and interface IP address at the same time?

1) Put a laptop (or VM or whatever) on the new network and complete the default network reconfiguration portion there

--or--

2) "ifconfig em0 inet 1.2.3.4/24; route delete default; route add default 1.2.3.1"

--or--

3) Log in on the console and add the default route through the text UI

--or--

4) etc.
 

planedrop

Dabbler
Joined
Jun 28, 2021
Messages
26
Welcome to the forums.

It isn't brain dead stupid, because it accurately represents the way things work at the UNIX networking level. Let's consider the case where you are on the NAS and try to run "ping 8.8.8.8". In such a case, which outgoing interface should be selected? This is why there's only one default route and it isn't tied to interface configuration.



Many sites are running with multiple interfaces, which typically should be configured statically. There's often been brokenness when people try to mix multiple DHCP and static interfaces, these configurations are somewhat problematic.


This is not iXsystems technical support. The posters here, except for those badged as "iXsystems", are fellow community members who are taking time out of their day to share their expertise. iXsystems provides no official support for TrueNAS CORE/Scale; support for paying customers is handled as part of your TrueNAS Enterprise purchase.

Please note that there are maybe half a dozen forum members that have extensive familiarity with networking and related complications. I know I'm usually the one who takes on beginner misconceptions and spends time trying to explain stuff like the multiple interfaces on a single network, etc., and if you're willing to learn and adjust your worldview to match reality, I'm generally happy to spend a significant amount of time trying to educate. However, my time here has been limited because I'm coming off a two month hospitalization for some serious medical issues, and so haven't been as involved in authoring long responses.


Have you actually used enterprise solutions? I'll take TrueNAS over most of them any day. Please don't lose view of the fact that iXsystems sells this stuff and is rapidly growing. As a non-enterprise customer, you don't have an iX engineer assisting you with setup and integration of your system. You're expected to have the background knowledge yourself, or at least be able to bring yourself up to speed. Here in the forums, we can help you with that latter.



1) Put a laptop (or VM or whatever) on the new network and complete the default network reconfiguration portion there

--or--

2) "ifconfig em0 inet 1.2.3.4/24; route delete default; route add default 1.2.3.1"

--or--

3) Log in on the console and add the default route through the text UI

--or--

4) etc.
Yeah seems to me option 3 is the easiest in most cases. Not a huge deal, just seems like it's something that should have been thought about when setting up the UI. Suppose it's a very minor thing though since generally you should very rarely if ever change the subnet the device is on lol.

Appreciate the reply though.
 

JBBB-

Cadet
Joined
Jul 26, 2022
Messages
6
Welcome to the forums.

It isn't brain dead stupid, because it accurately represents the way things work at the UNIX networking level. Let's consider the case where you are on the NAS and try to run "ping 8.8.8.8". In such a case, which outgoing interface should be selected? This is why there's only one default route and it isn't tied to interface configuration.



Many sites are running with multiple interfaces, which typically should be configured statically. There's often been brokenness when people try to mix multiple DHCP and static interfaces, these configurations are somewhat problematic.


This is not iXsystems technical support. The posters here, except for those badged as "iXsystems", are fellow community members who are taking time out of their day to share their expertise. iXsystems provides no official support for TrueNAS CORE/Scale; support for paying customers is handled as part of your TrueNAS Enterprise purchase.

Please note that there are maybe half a dozen forum members that have extensive familiarity with networking and related complications. I know I'm usually the one who takes on beginner misconceptions and spends time trying to explain stuff like the multiple interfaces on a single network, etc., and if you're willing to learn and adjust your worldview to match reality, I'm generally happy to spend a significant amount of time trying to educate. However, my time here has been limited because I'm coming off a two month hospitalization for some serious medical issues, and so haven't been as involved in authoring long responses.


Have you actually used enterprise solutions? I'll take TrueNAS over most of them any day. Please don't lose view of the fact that iXsystems sells this stuff and is rapidly growing. As a non-enterprise customer, you don't have an iX engineer assisting you with setup and integration of your system. You're expected to have the background knowledge yourself, or at least be able to bring yourself up to speed. Here in the forums, we can help you with that latter.



1) Put a laptop (or VM or whatever) on the new network and complete the default network reconfiguration portion there

--or--

2) "ifconfig em0 inet 1.2.3.4/24; route delete default; route add default 1.2.3.1"

--or--

3) Log in on the console and add the default route through the text UI

--or--

4) etc.
Thank you for the welcome, and I hope you are feeling better.

I have used enterprise solutions and have configured plenty of Linux (and UNIX) servers. What I and planedrop are experiencing, I believe, is a structural issue with TrueNAS (both Core and Scale). It is the same issue I ran into with OMV, where all configuration must be performed either in the web UI, or in the case of TrueNAS using the console menu. My interpretation... TrueNAS and OMV both store the network configs in their own files and then apply them at boot.

It must work that way because I used ip (ifconfig is depreciated) at the Linux prompt in Scale to set a static IP for the system's single Ethernet interface. The IP gets applied. I can test it in the console. I can ping it from elsewhere. it survives a restart of the networking service. When I reboot, however, it's back to the dynamic IP. So,
  1. it can't be changed in the web UI,
  2. it can't be changed using the TrueNAS console menu, and
  3. it can be changed in the Linux shell using ip, but won't survive a reboot.
Explain that please?

I also downloaded and installed NexentaStor Community Edition, which runs on the illumos distribution of OpenSolaris, last evening. Guess what? I was prompted during the illumos installation to configure networking, and was allowed to configure a static IP. Can you imagine that? Why TrueNAS forces DHCP at installation, and then is too broken to enable a simple fix is beyond me. Being "enterprise" should not require some engineer's help to configure networking. That's a bad joke.

I dumped OMV because I was tired of being constrained to the OMV web UI for all configuration and administration. My NAS now is a minimal Debian 11 running Cockpit with the 45Drives application for when I want GUI goodness. Samba and NFS server are easy. I am considering moving from MDADM to ZFS and thought TrueNAS would be a good option. Could I be doing something colossally stupid? Sure, but I did build my own NAS from scratch in vanilla Debian, so there's that.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
I dumped OMV because I was tired of being constrained to the OMV web UI for all configuration and administration.
You're not going to be happy with TrueNAS, the architecture is very similar in that regard.
it can't be changed using the TrueNAS console menu, and
Of course it can, it's option 1) on the menu. From SSH, it can be run with /etc/netcli. If that doesn't work, a bug report is in order.
 

JBBB-

Cadet
Joined
Jul 26, 2022
Messages
6
How is option 1 on the menu useful?

I can edit the interface and set DHCP to no, but there is no place to enter a static IP address. Then, after applying the change, the following pleasantry is received. Delete to remove the interface does nothing. The only option is to quit.

Screen Shot 2022-07-27 at 6.47.01 PM.png


When I try to change the gateway in option 2 to a new subnet, I am greeted with this doozy...

Screen Shot 2022-07-27 at 6.38.57 PM.png

Even though I can ping it from the Linux shell, so it certainly is not unreachable!

Screen Shot 2022-07-27 at 9.14.48 PM.png


I tried running /etc/netcli and got the following...

Screen Shot 2022-07-27 at 9.31.29 PM.png


As you can see... the network settings are removed, but the network is immediately restarted and the DHCP-derived IP config restored. No option is provided for removing the DHCP setting or entering a static IP config.

Just for yucks, I created an OMV VM earlier. It also uses DHCP during the installation, but setting the interface to a static IP, in a different subnet, in the web UI afterward was a no-brainer and took all of two minutes.

TrueNAS Scale and OMV are both Debian 11. What is the difference? Why does one work and the other supposedly "enterprise" solution crap all over itself? Also, OMV is a one-man operation versus iX Systems? What am I missing here?

I really want to like TrueNAS, but this is bordering on the absurd. Granted, I am only installing in a Proxmox VM for evaluation. My current homemade minimal Debian 11 NAS is running in a VM with PCI Passthrough of an HBA. My plan this Fall is to migrate the NAS to bare-metal and hopefully to ZFS, but this is not looking promising.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
It's non-intuitive, but under option 1, don't reply y when prompted if you want to remove the current settings. You should be able to set a static address, and then test the static address. If the test passes, the workflow will ask if you want to save the new settings and overwrite your old.
 

JBBB-

Cadet
Joined
Jul 26, 2022
Messages
6
It's non-intuitive, but under option 1, don't reply y when prompted if you want to remove the current settings. You should be able to set a static address, and then test the static address. If the test passes, the workflow will ask if you want to save the new settings and overwrite your old.
Thank you, Samuel. That worked and even allowed me to change the subnet. It survived a reboot as well.

This could have been a more straight forward process through. Also, what about network configuration in the web UI? Is it broken, or was I being stupid there as well?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
No, the web UI works the same way. Configure new settings -> test -> confirm saving.
 

JBBB-

Cadet
Joined
Jul 26, 2022
Messages
6
No, the web UI works the same way. Configure new settings -> test -> confirm saving.
Could you be more specific? The web UI failed for me when trying to change the subnet. The IP address could be changed, but when testing it went off into spinning-blue-circle la-la land, and returned automatically to a login screen. After logging in, the interface was reverted back to the original IP address. Then, when trying to change the default gateway, it errors with "gateway is unreachable". This happened when changing the gateway both after, and before, changing the interface IP.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
You may have to tinker with the sequence of changes in the web UI, especially if you're making changes on the same interface as you're using to access the UI in the first place. You may also need multiple login sessions to be able to change the default gateway simultaneously. You may also need a PowerShell open to clear the ARP cache on the machine you're using to access the web UI.
 

JBBB-

Cadet
Joined
Jul 26, 2022
Messages
6
You may have to tinker with the sequence of changes in the web UI, especially if you're making changes on the same interface as you're using to access the UI in the first place. You may also need multiple login sessions to be able to change the default gateway simultaneously. You may also need a PowerShell open to clear the ARP cache on the machine you're using to access the web UI.
Thank you again. I was just curious about the web UI. Being able to change the IP configuration at the console is good enough for me.
 
Top