Using alternative route in Windows 10

geoffmorg

Reputable
Jan 9, 2016
16
0
4,520
I have a NAS which has two LAN ports. One is configured to 192.168.0.x and is connected to my router. The other is configured to 192.168.1.1 and is directly wired to a second card in my PC. That card is manually configured to the same subnet.

I can ping 192.168.1.1 but the machine will not use the connection for data.

I have tried setting a higher metric on the router connection than the direct connection. Also putting 192.168.1.1 in my hosts file.

I previously had this working fine under Windows 7 but cannot for the life of me remember what I did.

Can anyone help please?
 
First I will assume your model of NAS supports this configuration.

You should be able to just remove the default route from the PC on the nic that you have static ip going to the nas.

If your pc is also connected to both networks you likely do not get any benefit unless your router say only has 100m ports. It would be simple to just connect via the router if it is gig. The lan ports on a router act as a switch and do not delay the traffic. Now if you are actually exceeding 1g of traffic to the nas and need 2 ports then you have a very different installation.
 

geoffmorg

Reputable
Jan 9, 2016
16
0
4,520
The NAS supports it, as I said it used to be set up this way in Windows 7 but I can't recall what I did to set it up. I feel it was around metrics.

I'm doing it primarily "because I can". which is a good enough reason. But I do use the link between my PC and the NAS frequently for large file movements so it also servers to reduce any potential for contention on the main network. I do understand how networks and routers work and would like to get this running again.
 
If I understand your setup correctly, your PC' route to the Internet goes thru the NAS. In that case, NAS itself should be configured as a router - it must know what to do with packets received on one interface intended to the other. Your router also should be configured to route packets for 192.168.1.x network toward the NAS.

Unless you're moving tons of data between your PC and the NAS (or your router does not support Gigabit LAN), I see little benefit of your setup.
 

geoffmorg

Reputable
Jan 9, 2016
16
0
4,520
Nope my internet is through VM router at 192.168.0.1. Direct access to the NAS was because I can and just to avoid contention. It has worked before. Both do support Gigabit LAN.

The NAS config has no gateway and is not a DHCP server. NIC1 is configured to 192.168.0.x so all can reach it, NIC2 is configured to 192.168.1.1.

In my PC the onboard NIC gets it's address automatically from 192.168.0.1. There is a LAN card which has a set address 192.168.1.3.

I can ping 192.168.1.1 from my PC but no get that connection to use data.

So I now understand that people think there may be little benefit from this setup but I'd like to get it working again, if there's anyone out there who knows how.
 

geoffmorg

Reputable
Jan 9, 2016
16
0
4,520
I've tried that, Windows cannot access, error code 0x80070035 "The network path was not found". I put an entry in the hosts file fwiw.

IPConfig shows all my network connections configured as I have reported. The gateway on the IP config of the 192.168.1.3 LAN card is blank.
 

geoffmorg

Reputable
Jan 9, 2016
16
0
4,520
OK I'm going back to the drawing board. If I disable 192.168.0.x adapter I cannot ping 192.168.1.1. I need to get the PC and NAS talking on the direct connection before anything wil work. I'd assumed the PING was telling me that that was working - I'm a little surprised it is routing a ping across subnets but there you go.

I will say again - I definitely had this working under Windows 7!! :)

Edit: Trying to add a route but it is failing, presume because no gateway... need to go out now, will try again later
 
How many NICs are in your PC? One or Two?
If you have two - PC NIC1 on DHCP, going to the router. PC NIC2 - static, on another network, no GW, going to NAS' NIC2 (private point-to-point connection).
On NAS: NIC1 on (supposedly, static, or DHCP), going to the router. NIC2 - statis, on PC' NIC2 network.
Add NAS' private IP address on NIC2 to your Windows' host file.
 

geoffmorg

Reputable
Jan 9, 2016
16
0
4,520
Thanks Alabalcho, that's exactly how it's set up. 2 NICs, one to the gateway which gets it's IP by DHCP and one to the NAS which si static and on the same subnet as the NAS 2nd NIC, with an entry in the HOSTS file for the NAS.

As I said yesterday, I seem to have no route in the routing table and the ROUTE ADD command was failing. I'l be looking at that today or tomorrow.
 
You need no special routing for your setup. On your PC, the only NIC with gateway should be the one with DHCP. If the two NICs are on separate networks (with second NIC being static, having neither gateway nor DNS settings), you should be able to see both your router and your NAS.
 

geoffmorg

Reputable
Jan 9, 2016
16
0
4,520
OK I agree and that's exactly what I'm trying to achieve and how it's set up. But it can reach the NAS through either path, and I want to force it to use only the direct connection, leaving the other route available for other users.
That's where metrics used to come into it, if there were two equla routes to the same place then it would use the one with the lowest metric. But that isn't working, and despite the metric being lower it is still using the router path.
So yesterday I found there is no route on the "direct" subnet i.e. even a Ping to the NAS (192.168.1.1) was going via the router (192.168.0.1).
As I've said before this used to work and I'm sure all I did was change the metrics to force it across the direct link, maybe the hosts file too - but those are both done and it isn't working.
The NAS is mapped on my computer by name not IP which is, I understand, where the HOSTS file comes into play.
Remember if I disable the router NIC then I can't reach the NAS - and this should not be the case.
 

kanewolf

Titan
Moderator
I was in another thread with somebody trying to setup dual networks in Windows 8.1. If a network doesn't have a default gateway (which the 192.168.1.1 may not) then Windows has problems categorizing (public, private, work) the network. That was causing problems for the other poster I was working with. That might be your problem. The solutions I found on the web didn't work for that thread....