Unable to configure 2nd NIC for Direct Copper connection. Mandatory Gateway check fails

fooby

Cadet
Joined
Aug 3, 2023
Messages
3
OS Version:TrueNAS-SCALE-22.12.3.3
Product:X370 Taichi
Model:AMD Ryzen 5 5600X 6-Core Processor
Memory:16 GiB

Greetings everyone,

I think i'm being some sort of simpleton, reading threads and people talking of bridges and stuff, not what i'm looking for.

It seems other people have done this with previous versions no problem, but for whatever reason i seem unable to complete this task.

I have 2 phyiscal NICS, one to my network and this works fine, allocated via DHCP. Standard 1 gig interface

I installed a RTL8125 Realtek 2.5gbe and i wanted to get truenas to configure this on a static IP, in the same /24 i setup on my Windows PC. This link isnt going via a switch, or router, its purely direct connect.

Both interfaces show up in TrueNas, happy days. enp9s0 is onbaord 1GBE and enp8s0 is 2.5GBE

1691101639500.png


When i edit the enp8s0 network to unselect DHCP, hit save.
1691101704248.png


I'm immediately prompted to specify a default gateway. Well, given that this is a direct connection it technically doesnt need one, but ok. I use the IP of the interface on my windows machine so that it gets a reply, but it just throws an error saying its not valid.

1691101723038.png


1691101787577.png


I use the IP of the interface on my windows machine so that it gets a reply, but it just throws an error saying its not valid.

And yes, NAS IP would be 137.137.137.137/24 and my PC is 137.137.137.136/24 Because i can.

Is there some way i can bypass this requirement and have it just apply the config i want it to.

I attempted to do via systemd/network like i do on my router and it didnt seem to take there either, so unsure if truenas is using systemd to control networking or not. I've undone any changes there to ensure no issues.

Any thoughts on how i can make this simple task possible?

Cheers for your time
Fooby
 

Policy0702

Cadet
Joined
Aug 3, 2023
Messages
9
I have never encountered a system that requires a functioning gateway to save the config. (They could exist, I just never saw it)
I would guess that your problem has to do with syntax in the gateway field more than a connection check failing.

1. Try setting your gateway without a netmask (or with a netmask if you hadn't used one)
2.Try /31 netmask. That should remove the gateway requirement.
3. Try setting your gateway the same as your IP.

Here is an discussion on netmasks that might be helpful.

Hope this helps.
 

fooby

Cadet
Joined
Aug 3, 2023
Messages
3
Thanks for the reply.

Its very strange indeed, but it is actually doing some sort of validation, which i find weird as to why it does it. I've tried /32 the IP and even just putting 0.0.0.0 in as gateway. I even tried actually giving it the IP of the other device (which pings from shell) as the gateway so that it actually gets a response, but still fails.

I didnt try setting without a netmask, but i suspect it will fail validation there.

But i dont want to take up any more of your time, i've decdied that truenas isnt going to be for me and ive switched to proxmox running debian 12 and i just can just achieve what i want within the native debian OS rather than trying to force truenas to do something it doesnt want to do!

Thanks all for your help
 

lailakas

Dabbler
Joined
Jul 7, 2023
Messages
17
Hi fooby,

My setup is almost identical as yours, 1G (enp9s0) interface to router, and 2.5G (enp8s0) for server to server connection only, and mine is working. You need to set an alias for the 2.5G nic (aka configure a static ip). Then you won't be prompted to use a gateway. Here is a screenshot of my settings. My windows machine is on 192.168.0.2, and my 2.5G NIC on Truenas scale set to 192.168.0.1. You mentioned your NAS IP would be 137.137.137.137/24, you should use that as your alias. If you did that and still doesn't work, try configure your 1G NIC to use static ip as well (that where our setups are different). My windows machine is configured to use 192.168.0.1 as a gateway, and static ip of 192.168.0.2, but I don't think it makes a difference.

1691229300494.png
1691229888223.png
 

fooby

Cadet
Joined
Aug 3, 2023
Messages
3
I think i did try alias before and it didnt work, but then i tried a bunch of different things in order.

Thanks a lot for taking the time to reply and glad to see you got yours working. Leaves hope for me :)
 

lailakas

Dabbler
Joined
Jul 7, 2023
Messages
17
I think i did try alias before and it didnt work, but then i tried a bunch of different things in order.

Thanks a lot for taking the time to reply and glad to see you got yours working. Leaves hope for me :)
If you are still looking into it. I also set my default ipv4 gateway in global configuration to 192.168.1.1, don't know if that makes a difference. I can't help to notice we set exactly the same ip for the 1G NIC lol.
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
And yes, NAS IP would be 137.137.137.137/24 and my PC is 137.137.137.136/24 Because i can.
This is a publicly routable IP address and is potentially the source of your issue. Because this isn't in the RFC1918 "private IP space" range the routing tables may want to send it out your default interface.

If you want to stay l33t, try the 10.13.37.0/24 subnet. :wink:
 
Top