I'm struggling to make a static route working in Windows 10 and on a specific PC: it doesn't seem to do its job.
Here's the route table before:
C:\WINDOWS\system32>route print
===========================================================================
Interface List
27...84 a9 XX XX XX XX ......Realtek PCi GBE Family Controller #2
26...04 d3 XX XX XX XX ......Microsoft Wi-Fi Direct Virtual Adapter #3
11...06 d3 XX XX XX XX ......Microsoft Wi-Fi Direct Virtual Adapter #4
12...04 d3 XX XX XX XX ......Intel(R) Dual Band Wireless-AC 7265 #2
1...........................Software Loopback Interface 1
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.7 105
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
192.168.1.0 255.255.255.0 On-link 192.168.1.7 301
192.168.1.7 255.255.255.255 On-link 192.168.1.7 301
192.168.1.255 255.255.255.255 On-link 192.168.1.7 301
224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
224.0.0.0 240.0.0.0 On-link 192.168.1.7 301
255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
255.255.255.255 255.255.255.255 On-link 192.168.1.7 301
===========================================================================
Persistent Routes:
None
As you can see the Wi-Fi card (with automatic metric) is assigned an IP 192.168.1.7 by the router 192.168.1.1; I want all the traffic to 192.168.0.0/24 to be forwared to 192.168.1.253.
So I add the (temporary) route with:
C:\WINDOWS\system32>route ADD 192.168.0.0 MASK 255.255.255.0 192.168.1.253
OK
Then I check with route print again and it seems OK:
C:\WINDOWS\system32>route print
===========================================================================
Interface List
27...84 a9 XX XX XX XX ......Realtek PCi GBE Family Controller #2
26...04 d3 XX XX XX XX ......Microsoft Wi-Fi Direct Virtual Adapter #3
11...06 d3 XX XX XX XX ......Microsoft Wi-Fi Direct Virtual Adapter #4
12...04 d3 XX XX XX XX ......Intel(R) Dual Band Wireless-AC 7265 #2
1...........................Software Loopback Interface 1
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.7 105
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
192.168.0.0 255.255.255.0 192.168.1.253 192.168.1.7 46
192.168.1.0 255.255.255.0 On-link 192.168.1.7 301
192.168.1.7 255.255.255.255 On-link 192.168.1.7 301
192.168.1.255 255.255.255.255 On-link 192.168.1.7 301
224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
224.0.0.0 240.0.0.0 On-link 192.168.1.7 301
255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
255.255.255.255 255.255.255.255 On-link 192.168.1.7 301
===========================================================================
Persistent Routes:
None
I can also see the route with:
C:\WINDOWS\system32>route print 192.168.0.*
===========================================================================
Interface List
27...84 a9 XX XX XX XX ......Realtek PCi GBE Family Controller #2
26...04 d3 XX XX XX XX ......Microsoft Wi-Fi Direct Virtual Adapter #3
11...06 d3 XX XX XX XX ......Microsoft Wi-Fi Direct Virtual Adapter #4
12...04 d3 XX XX XX XX ......Intel(R) Dual Band Wireless-AC 7265 #2
1...........................Software Loopback Interface 1
===========================================================================
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
192.168.0.0 255.255.255.0 192.168.1.253 192.168.1.7 46
===========================================================================
Persistent Routes:
None
But when pinging I have no reply at all by any of the 192.168.0.0/24 IPs.
C:\WINDOWS\system32>ping 192.168.0.1
Pinging 192.168.0.1 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.0.1:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
C:\WINDOWS\system32>ping 192.168.1.253
Pinging 192.168.1.253 with 32 bytes of data:
Reply from 192.168.1.253: bytes=32 time=117ms TTL=128
Reply from 192.168.1.253: bytes=32 time=4ms TTL=128
Reply from 192.168.1.253: bytes=32 time=4ms TTL=128
^C
Ping statistics for 192.168.1.253:
Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 4ms, Maximum = 117ms, Average = 41ms
C:\WINDOWS\system32>tracert 192.168.0.1
1 * * * Request timeout.
2 * * * Request timeout.
3 * * * Request timeout.
4 * * * Request timeout.
5 ^C
I'm sure the 192.168.1.253 forwards the packets correctly because I used another router + another PC with the same route command and it works, but I need to make this router (192.168.1.1) and this PC (192.168.1.7) work. Also, I cannot add the static route on the router itself (192.168.1.1) because it doesn't support this feature.
EDIT 1: There is of course a static route on the 192.168.0.1 router that forwards all the 192.168.1.0/24 traffic on the IP 192.168.0.112, which is another interface on the same device that has 192.168.1.253. On this device I can ping every other device of the two networks.
EDIT 2: I tried also disabling the firewall on the PC (192.168.1.7) but unbelievably it still doesn't work.