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

5
  • My route command: "route add 192.168.1.0 mask 255.255.255.0 192.168.1.1 if 12 metric 1" If Windows is not prefering more specific routes, and only looking to metric, how can I add a route with a lower metric than the default route? If I add a route of metric 1, a route of metric 31 (metric default route + 1) is created. So my route can never override the default route? :-/ Then how do I make Windows use another NIC for a certain IP range?
    – Coder14
    Nov 26, 2012 at 15:34
  • Have you tried disabling the route/nic it's using to see if it will actually use the one you want? just to test the connection and verify it can use it? if it works, a likely hypothesis would be that it takes the speed link into account as mentioned in the article.
    – Johnnie
    Nov 27, 2012 at 6:45
  • any luck with this?
    – Johnnie
    Dec 1, 2012 at 18:28
  • If I disconnect the cabled NIC, I can access the 192.168.1.0/8 range. So what should I do to make it work, even when cabled NIC is connected?
    – Coder14
    Dec 29, 2012 at 16:36
  • OK, If I disable DHCP on the second NIC, and set a static IP but no default gateway, I can ping devices on the 192.168.1.0/8-range. However, I still can't print to my networkprinter in this range. I can ping the device, but the device is "Offline". When I disconnect the wired NIC, I can print... So the question is: How do I set a route to a secondary NIC for a specific IP range, while both NIC's have DHCP enabled?
    – Coder14
    Dec 29, 2012 at 17:11

4 Answers 4

1

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

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)

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.

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .