I need some serious help with this networking in TrueNAS, I for the life of me, cant work out what is going on.
I have 2 Nics
eno1np0 - Not connected
eno2np1 - Connected DHCP
No matter what I do, I cant get both nics to connect to my switch, in the past I have always ran dual nics, one is used for internet access the other for local lan access, this has never been an issue, I would have normally configured them this way as example:
eno1np0:
Gateway: N/A
IP: 192.168.0.20
DNS: N/A
eno2np1:
Gateway: 192.168.0.1
IP: 192.168.0.21
DNS: 1.1.1.1
So the server access internet through eno2np1 and I access the server from lan side on 192.168.0.20.
This has never been an issue until I started using TrueNAS, the networking in the GUI does not really give me this control to set these values, its DHCP or its the highway.
If I connect both nics to my L3 switch, obviously the one with DHCP gets its IP served up, and I have specified my switch to reserve 192.168.0.21 for that interface, but eno1np0 when I connect that, it never has an IP, even if I specify one via an alias in the GUI like 192.168.0.20, this connection never shows up on my switch, its always showing no ip address, it does show as a device connected, but no address, if I try to assign it the same address as the alias, it still will not show up as having an address.
Its extremely funky behaviour
I have also tried to tie eno1np0 to one of my vlans, I have assigned the port on the switch to only be on that vlan, the vlan uses 10.1.95.0/24 I have given the nic an alias of 10.1.95.5/24 I have also given the device connected to the port that same address, but still same behaviour, no ip given or shown on my L3 switch, all traffic on that vlan goes through my VPN, I set the app on truenas to use that ip and it doesn’t work, all traffic still goes through eno2np1 no matter what I do.
I have also removed the second nic from the equation, and I have tried vlan’s on eno2np1 and bridge connections, nothing ever routes the way I expect, nothing appears to work.
I expect when creating a bridged network device, that it should appear as a separate ip address on my switch, but it doesn’t, I did this:
eno2np1:
Gateway: 192.168.0.1
IP: 192.168.0.21
DNS: 1.1.1.1
br01 Alias: 192.168.0.50
And yes I can connect to 192.168.0.50 from my lan and bring up the GUI, but this address never shows up in my switch as a device connected on my lan, its just bazar behaviour.
What I’m desperately trying to do is have 2 x IP addresses for TrueNAS, 1 is for everything, GUI, SMB, and lan services, the other is purely for certain apps traffic only, and I cant route that connection on my L3 switch if I don’t have an IP do it with.
I would like to have 1 or 2 docker apps use 1 NIC and that 1 NIC only, and everything else use the other NIC.
The only way I can do this is to have 2 separate machines running, one that just runs those apps, and the other running everything else, or run 2 instances of TrueNAS on top of Proxmox, both of these options I think should not be required, there has to be a way of managing multiple nics on TrueNAS.