No default route with static IP

ks4z

Cadet
Joined
Mar 9, 2024
Messages
4
Hi @All

I am using TrueNAS-SCALE-23.10.2 bare metal and it drives me crazy.
I have 4 NICs in the system, 2 of which are in use. One uses a static IP the other one DHCP. This works fine.
Default gateway and nameserver a set in the network section.
netstat -r shows

default via 192.168.100.1 dev ens4f1
172.16.0.0/16 dev kube-bridge proto kernel scope link src 172.16.0.1
192.168.100.0/24 dev ens4f1 proto kernel scope link src 192.168.100.19


Now I want to switch over to a static IP (in fact I'd like to add a bride on the default NIC for a VM to be accesible).
However, as soon as I switch the DHCP interface to a static IP I lose all network connections.
Using netstat -r shows as single entry only the kube-bridge, nowthing else.
Neiter the originally static interface that used to work can access the network, nor the now newly statically configured one.
I also tried to manually add a default route, didn't work or help.

Is there any way to tell truenas which interface should be the default one and make it add a default route?
Any help is appreciated. I can't imageine that I am the only one with such a setup...

Thanks

ks4z
 

murzik

Dabbler
Joined
Jun 25, 2017
Messages
39
You do not need to switch interfaces to static or DHCP. You need to set up a bridge first, then assign static ip to the bridge. That is a bit tricky to do using GUI, so use consol.
 

ks4z

Cadet
Joined
Mar 9, 2024
Messages
4
You do not need to switch interfaces to static or DHCP. You need to set up a bridge first, then assign static ip to the bridge. That is a bit tricky to do using GUI, so use consol.
Thanks for the suggestion, but the result is the same. I end up with a bridge with a static ip but no default route.
It seems the networ is only setup properly if the main NIC is configured via DHCP.

Any other hints?

Thanks
ks4z
 

murzik

Dabbler
Joined
Jun 25, 2017
Messages
39
I am not sure about your exact network setup.
Should look like below
tn.jpg
 

ks4z

Cadet
Joined
Mar 9, 2024
Messages
4
Please see the atteched image.
I have 4 NICS, 2 of which are in use. One with a static IP for my DMZ (eno1) and one with DHCP (ens4f1) for my green network.
I'd like to set a static ip to this green NIC. Whenever I do that, I end up with no network access at all, from none of the two NICs, because there is no default route anymore. All I have, route-wise is:

netstat -r
172.16.0.0/16 dev kube-bridge proto kernel scope link src 172.16.0.1

Thanks

ks4z
 

Attachments

  • Screenshot 2024-03-09 150427.png
    Screenshot 2024-03-09 150427.png
    55.9 KB · Views: 16

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Yep, the default route goes into the "Global Configuration" section after you configured the static IP address on the bridge. No problem when configuring locally, might cut your connection when working from remote, so better have e.g. an RDP session to some system at the location of the TrueNAS instead of a direct connection from your browser. If you are working from remote.
 

ks4z

Cadet
Joined
Mar 9, 2024
Messages
4
Yep, the default route goes into the "Global Configuration" section after you configured the static IP address on the bridge. No problem when configuring locally, might cut your connection when working from remote, so better have e.g. an RDP session to some system at the location of the TrueNAS instead of a direct connection from your browser. If you are working from remote.
Thanks a lot for the tip.
Unfotunately, I lose all network connections. The machine cannot access any of the networks, including the local one. Only the console works, no access to the LAN whatsoever. The routing table does only contain this "kube-bridge."

No idea what to do :-(

Thanks

ks4z
 

murzik

Dabbler
Joined
Jun 25, 2017
Messages
39
do proper network configuration from the console.
1. confiigure interfaces . create bridge.
2. Routes, DNS, etc
 
Top