Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am running Windows 7, and need to route DNS traffic to 8.8.8.8 over a separate network interface without it passing through the primary (wired) interface. No other traffic should be routed through the second interface (3G) - partially due to speed and partially due to servers in the 10.x.x.x range. How can I configure Windows to route my traffic?

In particular, how can I configure Windows to not find a route to 8.8.8.8 when the second interface is not plugged in or disabled?

Result of running route print with second interface enabled:

===========================================================================
Interface List
 11..1c 6f 65 38 15 c3 ......Realtek PCIe GBE Family Controller
 20...8a 4e 09 12 1f 35 ......Remote NDIS based Internet Sharing Device
 1...........................Software Loopback Interface 1
 12...00 00 00 00 00 00 00 e0 Microsoft ISATAP Adapter
 13...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         10.0.0.1       10.0.10.29     10
          0.0.0.0          0.0.0.0   192.168.42.129   192.168.42.205    266
         10.0.0.0      255.255.0.0         On-link        10.0.10.29    266
       10.0.10.29  255.255.255.255         On-link        10.0.10.29    266
     10.0.255.255  255.255.255.255         On-link        10.0.10.29    266
        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.42.0    255.255.255.0         On-link    192.168.42.205    266
   192.168.42.205  255.255.255.255         On-link    192.168.42.205    266
   192.168.42.255  255.255.255.255         On-link    192.168.42.205    266
        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        10.0.10.29    266
        224.0.0.0        240.0.0.0         On-link    192.168.42.205    266
  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        10.0.10.29    266
  255.255.255.255  255.255.255.255         On-link    192.168.42.205    266
===========================================================================
Persistent Routes:
  None
share|improve this question

migrated from serverfault.com Feb 12 '13 at 23:42

This question came from our site for professional system and network administrators.

    
You do realise that we don't generally consider windows 7 'server' to be topical here don't you. Super User is a better place for that kind of question. –  Iain Feb 9 '13 at 9:41
    
@Iain I had not realized it - the question is about workstation configuration in a large corporate office. As such I felt that it struck points 1 and 3 on the faq page. As you point out, since my issue could also be generalized to include home use, it also meets Super User posting standards ("specific issues with computer ... networking"). Would you be able to migrate it over? –  michaelc Feb 11 '13 at 22:15
add comment

1 Answer

up vote 1 down vote accepted

I have a partial success by running:

route -p add 8.8.8.8 mask 255.255.255.255 10.0.0.1 metric 1000 if 11
route -p add 8.8.8.8 mask 255.255.255.255 192.168.42.129 metric 1 if 20
route -p change 0.0.0.0 mask 0.0.0.0 192.168.42.129 metric 1000 if 20

The last line doesn't influence the standard value of 266 when I plug the second interface back in, and I have had to re-run it each time. Although traffic does not pass through the primary interface to reach 8.8.8.8 when the second interface is plugged in and configured, the routing table still permits connections to 8.8.8.8 over the standard interface. I verified these results using Wireshark, which I verified by manually providing the first interface to ping.

Posting this in case a partial answer is good enough for similar cases.

share|improve this answer
    
Marking as accepted as the solution was adequate and I don't need it now. Willing to accept a better answer. –  michaelc Jan 8 at 13:18
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.