Can't set a static IP address.

ddos127

Dabbler
Joined
Jan 5, 2022
Messages
20
Hi Guys

I've opened a bug report (NAS-120187) regarding the attached example video highlighting issues with setting a static IP address

If I am doing something wrong a pointer would be greatly appreciated


 
Last edited:

MisterE2002

Patron
Joined
Sep 5, 2015
Messages
211
The last time i wanted to change the IP of a secondary card it also resetted the primary connection. So, i never could confirm the change. So, i am not suprised about this issue.

But maybe you can add the ticket number here.
 

ddos127

Dabbler
Joined
Jan 5, 2022
Messages
20
The last time i wanted to change the IP of a secondary card it also resetted the primary connection. So, i never could confirm the change. So, i am not suprised about this issue.

But maybe you can add the ticket number here.
Scale is still rather buggy
OP updated with ticket number
 
Joined
Feb 3, 2023
Messages
1
Having a Similar Issue here, the documentation for Truenas Scale is not there, its outdated or related to Core, for a newbie its rather difficult to follow. Also cant find a better explanation for the GUI either, just some old videos which dont seem to apply any more!
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Having a Similar Issue here
What, specifically, is the issue? Setting a static IP on an interface is simple enough, if not very intuitive: you'd set it as an alias for the interface in question, complete with its netmask, e.g., 10.10.0.50/24.

But you're right, the TrueNAS (especially SCALE, but also CORE) docs suck. And what's sad is that they've gone from having about the best docs around in the era of 8.x and 9.x, to a pretty-but-useless "documentation hub".
 
Last edited:

ddos127

Dabbler
Joined
Jan 5, 2022
Messages
20
What, specifically, is the issue? Setting a static IP on an interface is simple enough, if not very intuitive: you'd set it as an alias for the interface in question, complete with its netmask, e.g., 10.10.0.50/24.

But you're right, the TrueNAS (especially SCALE, but also CORE) docs suck. And what's sad is that they've gone to having about the best docs around in the era of 8.x and 9.x, to a pretty-but-useless "documentation hub".
Did you watch the video example of the issue in the OP ?
 

sqwuade

Cadet
Joined
Feb 11, 2023
Messages
6
If you try to uncheck DHCP it then asks for a default gateway and then throws this python related error:

1676154371375.png
 

sqwuade

Cadet
Joined
Feb 11, 2023
Messages
6
Ok, I was able to set a static IP but not via the web interface. I got it working by editing the /etc/network/interfaces file:

sudo su
nano /etc/network/interfaces

# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# static ip for main address
auto enp4s0
iface enp4s0 inet static
address 172.17.171.190/27
gateway 172.17.171.161

Then, for a while I had two IPs showing up in the web interface. I unchecked the DHCP option and got the error I posted above so didn't think the change stuck but after I rebooted the system the DHCP option was unchecked and the static IP was in effect and working.

1676155839161.png
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Just so as it doesn't catch you unawares, this will not persist and will go away when you reboot the system.
 

NugentS

MVP
Joined
Apr 16, 2020
Messages
2,947
You seem to be trying to put 2 NICs on the same logical network - something which is very bad practise. I wonder if thats the issue and that TN is getting confused by the "bad" networking
 
Last edited:

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I've rebooted a couple times and it's still working.

Fine, then I'll go with a more general "Thar be dragons here", because this is not the authoritative source for this information, and there are definitely things that will cause this file to be regenerated from the configuration database's settings.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
You seem to be trying to put 2 NICs on the same logical network - something which is very bad practise. I wonder if thats the issue and that TN is getting confused bu the "bad" networking

I missed that, that only seems to be in your "video".

 

sqwuade

Cadet
Joined
Feb 11, 2023
Messages
6
Fine, then I'll go with a more general "Thar be dragons here", because this is not the authoritative source for this information, and there are definitely things that will cause this file to be regenerated from the configuration database's settings.
Agree that this is not the preferred method of configuring a static IP but doing it through TN Scale's web console wasn't working.
I did try to do it while first installing the system via the installer's CLI and that wasn't working either. I'm wondering if doing that may have caused issues with the system after it was fully installed and up and running?

I chose the option: "Configure Network Interfaces" when installing so I could give it the IP on my /27 network that I wanted it to have but there was no way to enter the IP address. I ended up just letting it use DHCP and then I ran into issues after the install when trying to set it to static via the web interface.

I'm seeing now that the static IP has still been retained after 3 reboots but understand your concerns about "...there are definitely things that will cause this file to be regenerated from the configuration database's settings."

editing the /etc/networking/interfaces file is a valid way to set a static IP via Debian but, as you say, TrueNAS may have a system in place that configures things a different way from a database as you say.

 

Attachments

  • StaticIP.jpg
    StaticIP.jpg
    60.9 KB · Views: 457

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I did try to do it while first installing the system via the installer's CLI and that wasn't working either. I'm wondering if doing that may have caused issues with the system after it was fully installed and up and running?

Anything done via the console's netcli should be safe; it's part of the system firmware and has access to the configuration database.

editing the /etc/networking/interfaces file is a valid way to set a static IP via Debian

Only problem with that logic is that this isn't Debian. TrueNAS is not some weird Debian "distro"; it's an appliance firmware, and is not expected to work like Debian, even though Debian might be the original basis for large parts of it.
 

sqwuade

Cadet
Joined
Feb 11, 2023
Messages
6
Anything done via the console's netcli should be safe; it's part of the system firmware and has access to the configuration database.



Only problem with that logic is that this isn't Debian. TrueNAS is not some weird Debian "distro"; it's an appliance firmware, and is not expected to work like Debian, even though Debian might be the original basis for large parts of it.
I would have liked to configure it through the setup app or web app but it didn't work (There are some other posts attesting to the same issue on the board as well).
 

jts2045

Cadet
Joined
Apr 5, 2023
Messages
1
Hi Guys

I've opened a bug report (NAS-120187) regarding the attached example video highlighting issues with setting a static IP address

If I am doing something wrong a pointer would be greatly appreciated


View attachment 63233
Noob here... I was able to create a static IP from the console. Was not able to make it stick via the web GUI. Thanks for all of the advice and replies.
 

Tuxxin

Cadet
Joined
Dec 17, 2022
Messages
3
I am unable to comment on the bug so I will comment here. TNS does see the error, it's just not displaying it to the user, looking at the browser debug console you can see.
 

Attachments

  • 2023-06-03 14_27_55-TrueNAS - 192.168.1.133 — Mozilla Firefox.jpg
    2023-06-03 14_27_55-TrueNAS - 192.168.1.133 — Mozilla Firefox.jpg
    9.7 KB · Views: 396
Top