1

I have windows 7 with two nics, one default gateway set on nic1, and no default gateway on nic2. Nics are on different subnets. Nic1 is on 192.168.1.0/24 subnet, and nic2 is on 10.60.194.0/28 network. When I ping 10.60.194.1 router, packets are sent on 192.168.1.0/24 subnet! How can this be? This is the routing table:

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.3    266
      10.60.194.0  255.255.255.240         On-link       10.60.194.3    276
      10.60.194.3  255.255.255.255         On-link       10.60.194.3    276
     10.60.194.15  255.255.255.255         On-link       10.60.194.3    276
        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
      169.254.0.0      255.255.0.0         On-link       192.168.1.3     30
  169.254.255.255  255.255.255.255         On-link       192.168.1.3    266
      192.168.1.0    255.255.255.0         On-link       192.168.1.3    266
      192.168.1.3  255.255.255.255         On-link       192.168.1.3    266
    192.168.1.255  255.255.255.255         On-link       192.168.1.3    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.60.194.3    276
        224.0.0.0        240.0.0.0         On-link       192.168.1.3    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.60.194.3    276
  255.255.255.255  255.255.255.255         On-link       192.168.1.3    266
===========================================================================
Persistent Routes:
  Network Address          Netmask  Gateway Address  Metric
          0.0.0.0          0.0.0.0      192.168.1.1  Default
===========================================================================

IPv6 Route Table
===========================================================================
Active Routes:
 If Metric Network Destination      Gateway
  1    306 ::1/128                  On-link
  1    306 ff00::/8                 On-link
===========================================================================
Persistent Routes:
  None

C:\Users\zdravke>ipconfig

Windows IP Configuration


Ethernet adapter internet:

   Connection-specific DNS Suffix  . :
   IPv4 Address. . . . . . . . . . . : 192.168.1.3
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1

Ethernet adapter cisco:

   Connection-specific DNS Suffix  . :
   IPv4 Address. . . . . . . . . . . : 10.60.194.3
   Subnet Mask . . . . . . . . . . . : 255.255.255.240
   Default Gateway . . . . . . . . . :

C:\Users\zdravke>tracert 10.60.194.1

Tracing route to 10.60.194.1 over a maximum of 30 hops

  1    <1 ms    <1 ms    <1 ms  192.168.1.1
  2    10 ms    10 ms     9 ms  1.96-66-87.adsl-dyn.isp.belgacom.be [87.66.96.1]

Wireshark is confirming above - when pinging 10.60.194.1, all icmp packets are sent on nic1 which is on 192.168.1.0 subnet!

I tried so far: 1) netsh tcp ip reset 2) removed and reinstalled both adapters 3) updated nic drivers to latest.

2
  • Is there a reason why you don't have a default gateway set on nic2?
    – Sašo
    May 26, 2015 at 14:55
  • Windows can't use 2 default gateways.
    – joeqwerty
    May 26, 2015 at 14:56

3 Answers 3

1

I solved this issue myself. Cisco network was requiring 802.1x port authentication, so even though other PCs were able to ping Cisco net before authentication, for some reason this PC was not. It could not even resolve with the Cisco net gateway with arp. I even tried setting static arp value in win7, but icmp ping was still failing. The problem was occurring with single nic installed in win as well. At first I thought 802.1x authentication was failing because of lack of IP connectivity to port, but it turned out to be the opposite.

Once I fixed 802.1x port authentication, arp started working, ip connectivity was restored on Cisco nic and win7 stopped sending packets to other nic.

This seems like a bug in win7 or a problem in my installation, as it should not send packets to nic1 regardless of 802.1x authentication outcome on nic2.

0

I've a server with similar configuration, but the metric numbers are different - both NICs have the same metric value.

From your routing table I assume the your 10.60.194.3 interface has a 266 metric (not sure if this is the default for a secondary NIC).
Changing the metric, as demonstrated here, to 256 should solve this.

1
  • It still does not work. I have set the NIC2 to the lowest possible value allowed, and it's showing as 257 which is lower than NIC1, and still the traffic for NIC2 network goes over NIC1.
    – zdravke
    May 27, 2015 at 15:47
-1

The default gateway has the lowest metric (gateway: 192.168.1.1, interface: 192.168.1.3, metric: 266). Using the following static route will properly configure traffic for the other NIC. The "-p" switch will keep the route after a reboot and you can set the metric to whatever you'd like.

route -p ADD 10.60.194.0 MASK 255.255.255.240 10.60.194.1 METRIC 1

7

You must log in to answer this question.

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