Truenas - Default gateway network unreachable

abclobato

Cadet
Joined
Jan 4, 2023
Messages
7
Hello everyone, I am currently facing the following problem.

My Truenas server has 2 NICs, with the following static ip addresses :

enp2s0 : 192.168.0.11/30
eno1: 192.168.0.5/30

My router (Default Gateway) is 192.168.0.1

A VM running inside Truenas with the static ip of 192.168.0.14/24, wich is also my DHCP server.

When trying to reach the default gateway from my server, the following error bellow is displayed.
1675556261189.png


Currently my DHCP server is a VM running inside truenas, it is running Piehole, and using enp2s0 as it`s network adapter.

What have I setup wrong here, that made my router not being reachable by Truenas and the VM not reach truenas ?
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
You can't use 2 NICs on the same network, sorry. Pick one and stick with it. You may also have a conflict with your router's DHCP server.
 

abclobato

Cadet
Joined
Jan 4, 2023
Messages
7
I have disabled DHCP on my router, so I am not worried about that.

Thank you for the answer on the nics.

My ideia for using 2 nics was using one for the VM and one for my network backup, since that is not possible I will use a bridge on the first NIC
 

GBillR

Contributor
Joined
Jun 12, 2016
Messages
189
Hello everyone, I am currently facing the following problem.

My Truenas server has 2 NICs, with the following static ip addresses :

enp2s0 : 192.168.0.11/30
eno1: 192.168.0.5/30

My router (Default Gateway) is 192.168.0.1

A VM running inside Truenas with the static ip of 192.168.0.14/24, wich is also my DHCP server.

When trying to reach the default gateway from my server, the following error bellow is displayed.
View attachment 63323

Currently my DHCP server is a VM running inside truenas, it is running Piehole, and using enp2s0 as it`s network adapter.

What have I setup wrong here, that made my router not being reachable by Truenas and the VM not reach truenas ?
I'm not sure how your NAS is even reaching your gateway since it is not within the subnet range for either static IP you've configured. Did you do that intentionally?

EDIT :I just realized that not reaching your gateway is the subject of the post...

Technically, those two IPs are on different networks, so I don't think that is the reason you can't ping the GW. The reason is as I stated above... your GW IP is not in either subnet.
 
Last edited:

abclobato

Cadet
Joined
Jan 4, 2023
Messages
7
I'm not sure how your NAS is even reaching your gateway since it is not within the subnet range for either static IP you've configured. Did you do that intentionally?

Unintentionally, I have very little knowledge in networking as you seen.

Thanks for the answer tough, I will Check to see what i can do.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Unintentionally, I have very little knowledge in networking as you seen.
The issue that Samuel (and I, when I first looked at this thread) missed, but GBill caught, is that for some reason you've set up a non-standard subnet mask. Ordinarily, networks in 192.x.x.x are class C subnets, with 24-bit netmasks, which would be denoted as 192.168.0.11/24. With the "normal" or default layout, this would mean that any address in 192.168.0.x is part of the same network. You can divide these further if you like, with larger netmasks and correspondingly smaller (i.e., fewer available addresses) networks, and you've done this by specifying a 30-bit netmask (/30). Why you've done this is something only you (perhaps) know.

But in doing that, you've specified a network that only has four possible addresses (.8, .9, .10, and .11), and two of them (.8 and .11) are reserved. The .8 address is the address for the whole subnet (192.168.0.8/30), and the .11 address is the "broadcast" address for the subnet; neither of these is a valid node IP address. You've done the same for the .5 address; its network has .4, .5, .6, and .7, of which .4 and .7 are reserved.

So your two interfaces don't have addresses in the same subnet, as it appears at first glance. But that means that the gateway is more complicated. In order for either of those interfaces to connect to anything else, it needs to have a gateway available, and that gateway must be within the network in question. And as I've shown above, the .0.1 address isn't within either of the two networks you've specified.
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
My Truenas server has 2 NICs, with the following static ip addresses :

enp2s0 : 192.168.0.11/30
eno1: 192.168.0.5/30
As others have mentioned, I'm not even sure how anything works at all.
192.168.0.11/30 gives you a valid IP range of 192.168.0.9 and 192.168.0.10, with 192.168.0.11 being the broadcast address (hint: you can't use this).
192.168.0.5/30 gives you a valid IP range of 192.168.0.5 and 192.168.0.6, so for this one, at least you got a proper IP address in the usable range though it leads to nowhere land.
My router (Default Gateway) is 192.168.0.1
Your router isn't even in the same subnet as your two NIC subnets, which means you need additional hosts to act as gateways to your router subnet. Also, you gave the other two networks in CIDR notation, but not your router? Did you even intend this topology? I'm going to assume your router is in 192.168.0.1/24.

A VM running inside Truenas with the static ip of 192.168.0.14/24, wich is also my DHCP server.
I think DHCP "might" still work since (I'm assuming) they're all still in the same L2 broadcast domain, but this is a really weird topology and for this to function, you will need two extra routers for the 192.168.0.8/30 and 192.168.0.4/30 to reach your 192.168.0.0/24 network.
I think that may be what you need to get it working, but I"m not entirely 100% sure cause I've never really setup overlapping subnets like this.

What have I setup wrong here, that made my router not being reachable by Truenas and the VM not reach truenas ?
I think this is quite expected since as I have mentioned above, you'd need additional routers to route from your mini /30 subnets to your main 192.168.0.0/24 network.
 
Last edited:

abclobato

Cadet
Joined
Jan 4, 2023
Messages
7
Thanks for the clarification everyone.

I Have solved this problem by creating a bridge between the VM and first NIC and also removed the second card.

Also reason why this was so "out of norm" is because I have very little knowledge on networking in general , so I tried reduced numbers to see what it would work, turns out it was a really bad ideia.

Thanks everyone!

Edit : A bunch of Typos.
 
Last edited:
Top