SOLVED Static address in GUI

atakacs

Explorer
Joined
Apr 23, 2012
Messages
92
ok muss be missing something obvious.

Just installed from scratch and have my server up & running. By default IP is set to DHCP and everything is working so far as expected.

I now want to set a static IP. As such I go into the GUI and untick DHCP.

Screenshot 2024-01-23 at 09.03.28.png


From there I go into Aliases (very un-intuitive btw) and setup my desired IP.
Then I run the mandatory "test". So far so good. What is supposed to happen there ?
 
Last edited:

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Then I run the mandatory "test". So far so good. What is supposed to happen there ?
If the test succeeds, it should return you to the same screen with the option to confirm and "Save Changes".

If you didn't get to that, it reverts after 60 seconds.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Or since you're changing(?) the IP address from the current one... you need to help your browser to return to that new address/page to confirm it worked.
 

atakacs

Explorer
Joined
Apr 23, 2012
Messages
92
Actually I have 2 NIC.
One is connected to the LAN and is the one I am using for the web interface. I am not touching it.
The other is a direct machine to machine connection to an ESX host. I want to use it for my storage needs. This is the one I ma trying to configure (at the moment setting up a static IP). For some reason I can't seem to have it working.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
So if you have the primary NIC unchanged, you can just set no address for that NIC first, then see if you can save that change.

You might want to think about if you have any VMs or jails running as those can block NIC changes in some cases.
 

atakacs

Explorer
Joined
Apr 23, 2012
Messages
92
Thanks - for some reason I am not managing to do the desired setup.
Again, I have two NIC
  • one is connected to the LAN. Gets IP via DHCP and is used for web interface. Works as expected.
  • one is connected directly to our ESX host. Want to setup a static IP on it. So I untick the DHCP, enter the desired IP (with a bogus gateway, as it is required although this net doesn't route anywhere) and press save. Nothing happens and I get back to the web interface so I gather the simulation fails - but (1) how do i find out what the problem is and (2) do you see anything wrong in what I am doing ?
  • I seem to have read in some other threads that there was an issue with multi homed servers in the past. Is that still the case ?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
So I untick the DHCP, enter the desired IP (with a bogus gateway, as it is required although this net doesn't route anywhere
I have no idea what you mean... there's no spot for a gateway on a NIC setup page. (and additional NICs would usually not need one as you say already)

do you see anything wrong in what I am doing ?
Changing a setting that isn't there somehow...?

I seem to have read in some other threads that there was an issue with multi homed servers in the past. Is that still the case ?
This is still as true as it was years ago:


Maybe you can share a screenshot of the NIC setup where you're entering the gateway and we can see how we're going wrong.
 

atakacs

Explorer
Joined
Apr 23, 2012
Messages
92
Thanks for your continued interest.

I define the IP as follows

Screenshot 2024-01-24 at 11.36.54.png


When pushing save I get this prompt

Screenshot 2024-01-24 at 11.37.02.png


As you can see there is not way out of it - it requires a default gateway (presumably for the network I am currently configuring) ?

As this network is not routable I enter a bogus IP but I get an error that it is not reachable.
So I enter a reachable gateway but I am still told that it is not reachable, although it obviously is (as I am using it to access the web ui )

Screenshot 2024-01-24 at 11.37.55.png


Re multi homed I guess it does not apply to my case as I will have two completely segregated LAN (and I only need the UI one one) ?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You haven't specified a gateway in your TrueNAS config yet, so it's forcing you to do that on adding a second network.

You need that gateway to be the one (and only) gateway you intend to use for reaching networks not defined by you.

You can set it under Network | Global Configuration -> Settings -> IPv4 Default Gateway

You must set that first and save it before doing the rest of your changes.
 

atakacs

Explorer
Joined
Apr 23, 2012
Messages
92
Actually I have one gateway there (otherwise I would not be able to access the GUI at all from another network)
Well somehow - despite canceling the default gateway prompt - I managed to save the setting and have them working...
 

atakacs

Explorer
Joined
Apr 23, 2012
Messages
92
Just further update to confirm that all is well (or at least working)
That being said not sure about that default gateway thing. Should it not be per network ?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
That being said not sure about that default gateway thing. Should it not be per network ?
Absolutely not.

A default gateway is meant to be the single answer to the question, "If I don't have an interface on the network this packet is destined for, which interface should I send it out (and to what router)?".

The routing table automatically points all packets for the network(s) of local NICs out that NIC owning that network (one of the reasons you can't... or shouldn't... have two on a single network).

You might be thinking about Static Routes (where you can define additional information about how to get to specific networks). (Network | Static Routes -> Add)
 
Top