using two different subnets on a single machine

Joined
Mar 20, 2019
Messages
1
Reaction score
0
Points
1
Hi Folks,
I have a MBP that I use WiFi for internet and Ethernet for connection to a rack of IoT type test equipment. Sometimes what I am trying to do works, by accident I think.

WiFi is set as DHCP with subnet 192.168.1.1, with internet access.
Ethernet is set DHCP with subnet 192.168.2.1, without internet access.

they are isolated so the device in the 1 group don't have issues with devices in the 2 group, and vice versa.
Also because I have external users access devices on the 2 subnet (VPN) and 1 is my own private network.

Is there a way to have both operate flawlessly by forcing apps to use specific connections?

Thanks!
 
Joined
Apr 20, 2019
Messages
11
Reaction score
1
Points
3
Location
Upstate SC
Your Mac's Specs
iMac, Mac Mini, MacBook Pro, bunch of iOS devices.
I'm not sure you can force apps to use specific network connections. Even on the Windows side, I don't think that is possible.
 

Raz0rEdge

Well-known member
Staff member
Moderator
Joined
Jul 17, 2009
Messages
15,745
Reaction score
2,071
Points
113
Location
MA
Your Mac's Specs
2022 Mac Studio M1 Max, 2023 M2 MBA
The way you "force" an app to use one interface over the other is by choosing to access a resource available on that interface only. However, with dual subnets the thing that will usually cause you grief is the default gateway. Each of your subnets also has a gateway of its own. But the default gateway is where things go if it can't be directly routed.

I would suggest that your default gateway be the Internet facing IP address and interface so that your DNS stuff works like it should.

For your internal (2.x) interface, I would suggest you direct requests using specific IP addresses. You can create entires in the /etc/hosts file to give those devices nice names so you don't have to remember IP addresses. This will prevent traffic from going down the default gateway (Internet facing) interface.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top