Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

routing traffic through 2 NICs


  • Please log in to reply
2 replies to this topic

#1 hugo442

hugo442

  • Members
  • 5 posts
  • OFFLINE
  •  
  • Local time:09:23 AM

Posted 30 April 2015 - 05:39 PM

I'll start by saying I had this working on my last windows 7 box and thought I understood windows 7 routing.  However, this new machine is proving to be difficult.  

 

I have 2 NICs, one is WiFI (IF=12) an the other is ethernet (IF=13). I want anything on 10.0.0.0 and 141.248.0.0 to use the ethernet NIC and gateway and everything else to use the wireless NIC.   I have set the adapter metrics to ethernet = metric 1 and wifi = metric 99. I've done this because it's important for windows to use the DNS servers set on the ethernet NIC because those DNS servers will properly resolve hostnames on the 10.0.0.0 network and also serve DNS for the public internet.  If windows tries to resolve the hostnames using the wifi dns servers, they resolve to the wrong IP addresses and things break.  I have disabled ipv6, teredo, 6to4 and deleted any ipv6 routes so as not to confuse things.  

 

I deleted the default route for ethernet.  I've added a route for all traffic on 10.0.0.0 to use the ethernet interface and correct gateway and set this to the highest metric.  Then I added a route for all traffic on 141.248.0.0 to use the ethernet interface and correct gateway and set this to the next highest metric.  The default route 0.0.0.0 points to the wifi nic and uses the wifi gateway and its metric is higher than the other 2 routes.

 

But this doesn't work as it did on my previous computer.  I can reach the public internet using the wifi NIC as expected.  But if I ping a hostname on the 10.0.0.0 network or 141.248.0.0.0 network, it resolves to a hostname provided by the wifi nic's dns servers, not the ethernet nic's dns servers.  If I disable wifi, it immediately begins working.  I can confirm that my routing rules are working by using tracert and it shows that data is going to the ethernet nic's gateway.

 

I think my method of forcing windows to resolve hostnames using the ethernet NIC's dns servers is not working but I'm not sure how to correct it.

 

I've pasted by ipconfig and route print results below.

C:\WINDOWS\system32>ipconfig /all

Windows IP Configuration

   Host Name . . . . . . . . . . . . : [redacted]
   Primary Dns Suffix  . . . . . . . : [redacted]
   Node Type . . . . . . . . . . . . : Hybrid
   IP Routing Enabled. . . . . . . . : No
   WINS Proxy Enabled. . . . . . . . : No
   DNS Suffix Search List. . . . . . : [redacted]

Ethernet adapter Bluetooth Network Connection:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Bluetooth Device (Personal Area Network)
   Physical Address. . . . . . . . . : [redacted]
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes

Wireless LAN adapter Wireless Network Connection:

   Connection-specific DNS Suffix  . :
   Description . . . . . . . . . . . : Intel(R) Dual Band Wireless-AC 7260
   Physical Address. . . . . . . . . : [redacted]
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 192.168.4.172(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.248.0
   Lease Obtained. . . . . . . . . . : Thursday, April 30, 2015 11:35:21 AM
   Lease Expires . . . . . . . . . . : Thursday, April 30, 2015 4:51:18 PM
   Default Gateway . . . . . . . . . : 192.168.2.1
   DHCP Server . . . . . . . . . . . : 192.168.2.2
   DNS Servers . . . . . . . . . . . : 12.127.16.67
                                       4.2.2.2
   NetBIOS over Tcpip. . . . . . . . : Enabled

Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . : [redacted]
   Description . . . . . . . . . . . : Intel(R) Ethernet Connection I217-LM
   Physical Address. . . . . . . . . : [redacted]
   DHCP Enabled. . . . . . . . . . . : Yes
   Autoconfiguration Enabled . . . . : Yes
   IPv4 Address. . . . . . . . . . . : 10.121.191.162(Preferred)
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Lease Obtained. . . . . . . . . . : Thursday, April 30, 2015 11:35:21 AM
   Lease Expires . . . . . . . . . . : Friday, May 01, 2015 11:45:59 AM
   Default Gateway . . . . . . . . . :
   DHCP Server . . . . . . . . . . . : 141.248.228.137
   DNS Servers . . . . . . . . . . . : 10.120.200.8
                                       10.120.200.9
                                       141.248.228.75
   Primary WINS Server . . . . . . . : 10.120.200.8
   Secondary WINS Server . . . . . . : 10.120.200.9
   NetBIOS over Tcpip. . . . . . . . : Enabled


C:\WINDOWS\system32>route print
===========================================================================
Interface List
 15...[redacted] ......Bluetooth Device (Personal Area Network)
 13...[redacted] ......Intel(R) Dual Band Wireless-AC 7260
 12...[redacted] ......Intel(R) Ethernet Connection I217-LM
  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.2.1    192.168.4.172    114
         10.0.0.0        255.0.0.0     10.121.191.4   10.121.191.162      2
     10.121.191.0    255.255.255.0         On-link    10.121.191.162    257
   10.121.191.162  255.255.255.255         On-link    10.121.191.162    257
   10.121.191.255  255.255.255.255         On-link    10.121.191.162    257
        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
      141.248.0.0      255.255.0.0     10.121.191.4   10.121.191.162      4
      192.168.0.0    255.255.248.0         On-link     192.168.4.172    355
    192.168.4.172  255.255.255.255         On-link     192.168.4.172    355
    192.168.7.255  255.255.255.255         On-link     192.168.4.172    355
        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.121.191.162    257
        224.0.0.0        240.0.0.0         On-link     192.168.4.172    355
  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.121.191.162    257
  255.255.255.255  255.255.255.255         On-link     192.168.4.172    355
===========================================================================
Persistent Routes:
  None

IPv6 Route Table
===========================================================================
Active Routes:
  None
Persistent Routes:
  None

C:\WINDOWS\system32>

Edited by Chris Cosgrove, 30 April 2015 - 05:44 PM.
Moved from Win 7 to 'Networking'


BC AdBot (Login to Remove)

 


#2 Wand3r3r

Wand3r3r

  • Members
  • 2,027 posts
  • OFFLINE
  •  
  • Local time:09:23 AM

Posted 01 May 2015 - 09:27 AM

First of all you don't have "10.0.0.0 and 141.248.0.0".  You have 10.121.191.0/24 and 192.168.4.0/21  What you desire is also not routing. Routing does not recognize traffic the way you think "I want anything on.... to use the ethernet NIC and gateway and everything else to use the wireless NIC."  This is a filter or ACL not a route.

 

If your only concern is name resolution put the target dns server you desire on both interfaces.

 

But you have a problem

Name:    gatordc01.sd.gat.com
Address:  141.248.228.75

is not a dns server

 

C:\Users\>nslookup comcast.net 141.248.228.75
DNS request timed out.
    timeout was 2 seconds.
Server:  UnKnown
Address:  141.248.228.75

DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
*** Request to UnKnown timed-out

 

C:\Users\>nslookup comcast.net 8.8.8.8
Server:  google-public-dns-a.google.com
Address:  8.8.8.8

Non-authoritative answer:
Name:    comcast.net
Address:  69.252.80.75

 

You can see from my test results its not a dns server at least not a public one reachable from the internet.

 

Oh I see you have no gateway on the10x network.  Using a metric of 1 for this network and 999 should make this the preferred network but this may affect your internet access..

 

Usually businesses with closed networks don't want you connecting to the internet at the same time for security reasons.


Edited by Wand3r3r, 01 May 2015 - 09:39 AM.


#3 hugo442

hugo442
  • Topic Starter

  • Members
  • 5 posts
  • OFFLINE
  •  
  • Local time:09:23 AM

Posted 01 May 2015 - 11:57 AM

Thanks Wand3r3r, after typing the original message out, I actually tried the dns suggestion you made above and it works.  Thanks for reviewing.  Yes, the DNS server you tested is internal only.  I do actually have a gateway configured for the 10x network:  "10.121.191.4".






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users