6

OS: Windows 8

I have a cabled NIC (connected to router with ip 192.168.0.1) and a WIFI NIC (connected to a router with ip 192.168.1.1) . I want all traffic to go through the cabled NIC, except the 192.168.1.0/24 range should use the wifi-nic.

This was working fine in Windows 7, without any manual configuration. In Windows 8 however, it's not.

My routing table:

  ===========================================================================
Interface List
 14...f2 7b cb 13 e7 f0 ......Microsoft Wi-Fi Direct Virtual Adapter
 13...b8 ac 6f 54 d2 5c ......Realtek PCIe FE Family Controller
 12...f0 7b cb 13 e7 f0 ......Dell Wireless 1397 WLAN Mini-Card
  1...........................Software Loopback Interface 1
 15...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
 16...00 00 00 00 00 00 00 e0 Teredo Tunneling Pseudo-Interface
===========================================================================

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.198     30
          0.0.0.0          0.0.0.0      192.168.0.1    192.168.0.233     20
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
      192.168.0.0    255.255.255.0         On-link     192.168.0.233    276
    192.168.0.233  255.255.255.255         On-link     192.168.0.233    276
    192.168.0.255  255.255.255.255         On-link     192.168.0.233    276
      192.168.1.0    255.255.255.0      192.168.1.1    192.168.1.198     31
    192.168.1.198  255.255.255.255         On-link     192.168.1.198    286
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link     192.168.0.233    276
        224.0.0.0        240.0.0.0         On-link     192.168.1.198    286
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link     192.168.0.233    276
  255.255.255.255  255.255.255.255         On-link     192.168.1.198    286
===========================================================================
Persistent Routes:
  None

I added the rule for 192.168.1.0. I would think Windows should use this rule for the IP 192.168.1.1 because it's more specific than the default-route.

However it's not:

C:\Windows\system32>tracert 192.168.1.1

Tracing route to 192.168.1.1 over a maximum of 30 hops

  1    58 ms     4 ms     4 ms  192.168.0.1
  2    68 ms    12 ms    11 ms  ^C

So... What do I do wrong? And how can I make Windows use the wireless NIC for 192.168.1.0/8

Kris
  • 103
  • 3
Coder14
  • 195

4 Answers4

1

You can use route add -p command. It can add persistent route, which can have lower metric than 30.

ko4evneg
  • 525
  • 1
  • 5
  • 13
0

Can you show the route command you used to add your route.

Generally if two routes exist for the same location, windows chooses the route with the lowest metric. Your metric for the new rout is 31 so it won't normally be chosen.

There are a couple of questions related to this as in How does Windows 7 decide which route to take if 2 connections to an internet source exist? (e.g. a Wireless and an Ethernet one to a router)

Johnnie
  • 256
  • 1
  • 6
0

That doesn't seem to help either. It seems like the routing is looking for 'On-link' as the default GW when dialup is establishes before it routes the request through the requested interface.

For example, no default route is set;

10.217.83.0     255.255.255.0         On-link     10.217.83.141    257
10.217.83.141   255.255.255.255       On-link     10.217.83.141    257
10.255.255.255  255.255.255.255       On-link     41.122.100.139   286

The following will route 10.217.83.254 through 10.217.83.141 which is IF 12 but if you manually add the correct GW for the IP then it does not go through.

JoshP
  • 2,263
  • 3
  • 22
  • 28
Steve
  • 1
0

I had exactly same problem. In Wireshark I could see, that ping was using wrong source address. When I used ping -S 1.2.3.4 hostname I could reach the host.

After disabling all NDIS items on my LAN and WIFI adapters, routes started to work as expected.