is your subnet mask 255.255.255.0 if so change that adapter on pc and trunenas from 192.168.8.x to 192.168.x.x .change 8 to any number thats not in use on your network. See if that works.
To (attempt to) answer your question, yes, this is a direct connection between machines. However, they both are connected to my regular network as I use my TrueNAS for Syncthing.
I was completely lost before, but I feel a little like I’m understanding this basic concept a little more.
Assigning the same static IP to two devices makes no sense because then they aren’t differentiable. I don’t know how this one went past my head.
I don’t need the gateway because I am connecting them directly, rather than through my regular network.
I should use a different subnet to separate the direct connection from my regular network?
I went ahead and changed my PC static IP to something different, used a different subnet (/25 or 255.255.255.128), and removed the gateway. After changing the subnet on TrueNAS, I was able to connect to the TrueNAS Scale Web UI via Ethernet (192.168.8.130) for a second. I think it reverted midway because I lost connection to the Web UI via home network (192.168.8.129).
Now all of the sudden, my Ethernet cable isn’t detected by my PC anymore. I’m going to debug this for now, but I think I’m on the right track thanks to you.
Red herring. There’s nothing wrong with using 192.168.8.#/24 i.e. subnet mask 255.255.255.0.
What caused this issue is likely that you had two ports connected to the same subnet on your TrueNAS system. That’s an invalid configuration. Also, assigning the same IP 192.168.8.130 to both your TrueNAS and the Windows system is obviously incorrect.
You should use a different subnet because having two interfaces on the same subnet is just not a valid configuration. Windows permits it anyway, but TrueNAS generally does not.
Two interfaces on the same subnet is valid in a variety of scenarios, SMB Multichannel is probably the most obvious one supported by TrueNAS.
I agree that it’s usually a sign of some “how does networking work” confusion. There’s usually “I want certain traffic to only use this interface” magical thinking.
Does SCALE still prevent multiple interfaces from being assigned addresses in the same subnet?
I’ve done smb multichannel on bare linux in the same subnet, probably added more-specific routes, I don’t remember.
I wonder what Synology and QNAP and others are doing, since it “just works” on them, just like Windows. I want to go test some things. I’ll start a thread if I figure out what they’re doing.