static route GUI not propagating to shell route -n

john60

Explorer
Joined
Nov 22, 2021
Messages
85
I entered the following static routes in the GUI
1655062343347.png


But in the shell, I do not see these?
root@truenas[~]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.254 0.0.0.0 UG 0 0 0 enp2s0f0
172.16.0.0 0.0.0.0 255.255.0.0 U 0 0 0 kube-bridge
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 enp2s0f0


Is there something more I need to make these routes active?
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Static routes are only useful with multiple network interfaces. Further, you did not specify the Gateway. Using 0.0.0.0 is not really valid, except in the case of a local interface. As is shown for your 2nd & 3rd entries. The first entry is your default route, which takes care of any routing not over-ridden by host or sub-net routes.

What is the purpose of setting a static route?
And where do you expect it to go?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Maybe what you're seeking is the Kubernetes Settings, which can be found under Apps | Setings (button) | Advanced Settings

There you can set a default interface and router for Kubernetes apps to use. (Route v4 Interface and Route v4 Gateway respectively)
 

john60

Explorer
Joined
Nov 22, 2021
Messages
85
Truenas is on a 10G/s switch (#1) on a 10G/s port. The 10Gs/s switch (#1) has a 1G/s port and this 1G/s link is connected a 1G/s switch (#2) and this switch (#2) is connected to the pace gateway (#3).

The truenas ip address is 192.168.1.80/24 and the remainder of home network is on 192.168.1.xxx

So all traffic from Truenas to any 192.168.1.xx will be routed to the local 10G/s interface. Any 192.168.1.xxx connected to either the 10G/s switch (#1) or the ports on switch (#2) will get traffic. So Truenas is reachable to my local network including a backup Truenas.

Truenas traffic address outside of 192.168.1.xxx will be routed to the gateway. This includes two 1G/s links.

So far everything is good and standard.

I have a public IP 99.153.71.80 web server. AT&T pace gateway configured for pinhole passthrough for this fixed IP address.
So my home network has 192.168.1.xxxx address for all nodes except for one 99.153.71.80.

This 99.153.71.80 webserver is located on the 10G/s switch (#1). Without special routes, traffic from Truenas will be routed to the pace gateway (#3) and bounced back to the truenas. Since this includes 1G/s links, the throughput is limied.

By adding a route to Truenas, I can configure truenas to route 99.153.71.80 traffic to the local port. When I do , I get 10G/s traffic between truenas to the webserver.
 
Top