No Connection With Static IP, DHCP Works Fine

For some unknown reason, whenever I untoggle DHCP for my NIC it completely kills the connection, even though the default gateway (192.168.1.0/24) is set properly under General Settings. I have an alias set (192.168.1.8/32, the static IP I intend to use, which apparently sticks around even after toggling DHCP on) and that doesn’t work but the dynamic IP address given by DHCP (192.168.1.202) works without issue.

Once I disable DHCP pings aren’t received by 1.8 external to that device, but when I pull up the IPMI and ping 1.8 from within it responds and appears to be set properly. I only have 60 seconds to diagnose whats wrong before it refreshes so I’m not really sure what the issue is.

When I re-enable DHCP and try to ping the alias I get the following


[bran@r911vm89 Downloads]$ ping 192.168.1.8
PING 192.168.1.8 (192.168.1.8) 56(84) bytes of data.
From 192.168.1.202 icmp_seq=2 Redirect Host(New nexthop: 192.168.1.8)
From 192.168.1.202 icmp_seq=3 Redirect Host(New nexthop: 192.168.1.8)
From 192.168.1.202 icmp_seq=4 Redirect Host(New nexthop: 192.168.1.8)
--- 192.168.1.8 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3051ms

It appears that the route isn’t being set when I disable DHCP. With it enabled it shows

truenas% ip route
default via 192.168.1.1 dev enp70s0f0 
172.16.0.0/16 dev kube-bridge proto kernel scope link src 172.16.0.1 
192.168.1.0/24 dev enp70s0f0 proto kernel scope link src 192.168.1.202 

but when I disable DHCP all I see is

truenas% ip route
172.16.0.0/16 dev kube-bridge proto kernel scope link src 172.16.0.1 

my network config:

[truenas] network configuration> config
+----------------------+------------------+
|                   id | 1                |
|             hostname | truenas          |
|               domain | local|
|          ipv4gateway | 192.168.1.1      |
|          ipv6gateway |                  |
|          nameserver1 | 192.168.1.1      |
|          nameserver2 |                  |
|          nameserver3 |                  |
|            httpproxy |                  |
|                hosts | <empty list>     |
|              domains | <empty list>     |
| service_announcement | <dict>           |
|             activity | <dict>           |
|       hostname_local | truenas          |
|                state | <dict>           |
+----------------------+------------------+

edit: yep, the issue is that it doesn’t re-apply the route. I quickly executed ip route add 192.168.1.0/24 dev enp7s0f0, and was able to bring up the webUI, login and commit it without issue.

That’s going to be your problem; that IP belongs to a subnet, probably a Class C one. It should be 192.168.1.8/24.

2 Likes

Ugh, seems you’re right. Thanks!

FWIW, I go through the process in this video:

There should be no need to use the console if you get the order of operations right (and the netmask!)

1 Like