VMs, Networking, Shares, and IP Addresses

Caboose30

Cadet
Joined
Sep 19, 2023
Messages
1
Preface: I know nothing. I don't know enough to even know what I need to search for, or what I'm searching for doesn't exist. Apologies if I sound cranky, I am a bit because I've been chasing my tail trying to get this to work and to get google/startpage to show me relevant search results and not 20 variations of the same thing.

Short version: I want my VM (Linux Mint) to see my SMB shares and still remain accessible to outside resources. Last time I followed instructions to set up a bridge, the VM could see the shares, the host OS could see the VM, but nothing external could see either resource and Plex quit working. I have 8x 1GB ethernet ports, and a 24 port 1GB managed switch (Cisco 2960S). Two ethernet ports are currently online. I don't know what info is pertinent to receive help, so I'm going to do my best.

NIC #1: 192.168.68.70 static, Host OS(TrueNAS Scale)/Plex/SMB use
NIC #2: 192.168.68.74 DHCP, VM use
VM: 192.168.68.87 static

Long version:
I installed TrueNAS Scale about a year and a half ago, it hosts Plex, four SMB shares, and one VM running Linux Mint. The VM itself runs Asterisk for a small PBX (teaching myself how to configure IP Phones as well), and I would like it to be able to host other things and download some torrents (we all know why). What I would also like it to do is be able to copy those downloaded files straight to the shares on the host machine. Now, it can ping the host machine but when I try to use the file browser it just.. doesn't do anything. I hate to use this phrase but on every other computer it 'just works', when I open the file manager and browse to the network it shows the TrueNAS machine and my QNAP NAS, available to be browsed. I would like this to work in my Linux VM as well.

So I have two different NICs currently plugged into the switch that can see each other and everything else but I can't access the SMB shares. NOW I KNOW WE AREN'T "SUPPOSED" TO USE THE SAME SUBNET ON TWO NICS. That out of the way, I literally do not understand why. I read through the entire long post to do with that topic and I still don't understand why (https://www.truenas.com/community/resources/multiple-network-interfaces-on-a-single-subnet.45/). NIC 1 is set to static at 192.168.68.70. NIC 2 is DHCP and has pulled an address of 192.168.68.74. I'm confused af as to why it can DHCP an address on the same subnet and outside of SMB shares everything else works as intended. But I digress.

My concern is this: Knowing very little about networking setup, putting two NICs on different subnets is going to prevent one or the other from seeing any of the resources that I want it to access without manually programming in a whole bunch of crap which I do not want to do because this is a home, 5-7 PC environment that frankly isn't worth the effort. As a side note, I also turned off IPv6 on this server because I do not want to use it. I don't know enough about it to be able to set everything up properly, and since the ISP uses ipv4 it doesn't make sense to me to have to translate that at some point to the rest of the network.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You should probably start here:


If you really need a second NIC for VMs, don't assign it an address, just add the bridge to it and your VMs to that bridge, they will get or manage/set their own addresses.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
If you really need a second NIC for VMs, don't assign it an address, just add the bridge to it and your VMs to that bridge, they will get or manage/set their own addresses.
Really this is a very clean solution and gets you around all multicast/scope issues etc. Only downside: your VMs will communicate with the NAS host via your switch. But at gigabit and up, who cares?

Also you can place the VMs in a VLAN different from your NAS host's. Remember the loud complaints claiming you could not isolate TrueNAS' control plane? :wink:
 
Top