3

In my windows 8.1 ENT [64 bit] machine I have 3 network adapters. Ethernet 1 is connected to public network and other 2 ethernet adaptors are connected to different internal networks. The problem is in route table we have active routes like:

Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric


          0.0.0.0          0.0.0.0      192.168.1.1     192.168.1.17     10 
          0.0.0.0          0.0.0.0      192.168.2.1     192.168.2.51     10
          0.0.0.0          0.0.0.0    10.112.29.253    10.112.29.164     10
      10.112.28.0    255.255.254.0         On-link     10.112.29.164    266
    10.112.29.164  255.255.255.255         On-link     10.112.29.164    266
    10.112.29.255  255.255.255.255         On-link     10.112.29.164    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.0.0    255.255.254.0         On-link      192.168.1.17    266
     192.168.1.17  255.255.255.255         On-link      192.168.1.17    266
    192.168.1.255  255.255.255.255         On-link      192.168.1.17    266
      192.168.2.0    255.255.254.0         On-link      192.168.2.51    266
     192.168.2.51  255.255.255.255         On-link      192.168.2.51    266
    192.168.3.255  255.255.255.255         On-link      192.168.2.51    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      192.168.1.17    266
        224.0.0.0        240.0.0.0         On-link      192.168.2.51    266
        224.0.0.0        240.0.0.0         On-link     10.112.29.164    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      192.168.1.17    266
  255.255.255.255  255.255.255.255         On-link      192.168.2.51    266
  255.255.255.255  255.255.255.255         On-link     10.112.29.164    266

As we have 3 default gateways coming from 3 different networks and metrics are all same, my machine lost internet connectivity. Please let me know how can I make sure that gateway of public network can take precedence over others.

Appreciate your help...

Thanks and Regards, Shruti

  • Why do you have three default routes? Once the traffic falls into a particular machine, you should only have one default route. I have no experience regarding Windows, but, principally speaking, having more than one default route seems wrong and illogical. – Ahmet Cemil Sabır Jun 27 '14 at 07:54

2 Answers2

4

Thanks David. To remove these entries from route table I have used:

route change 0.0.0.0 MASK 0.0.0.0 10.112.29.253 metric 1

What I saw is, if I am executing this command, The metric value for this route is incremented by 1 and the other 2 default gateways are getting removed from the route table. Not sure why. If you can explain that would be great.

Please let me know whether this is a correct approach for doing this. As per my dhcp setup for internal networks, there is very less chance to have same default gateway assigned for other 2 adapters [192.168.1.1 and 192.168.2.1], hence cannot put delete code inside a batch file for doing this.

Thanks, Shruti

user228255
  • 41
  • 1
2

The problem is that you have three default routes. Since only one of the networks is connected to the internet, there should be only one default route. One of these three lines needs to stay and the others need to be removed.

  0.0.0.0          0.0.0.0      192.168.1.1     192.168.1.17     10 
  0.0.0.0          0.0.0.0      192.168.2.1     192.168.2.51     10
  0.0.0.0          0.0.0.0    10.112.29.253    10.112.29.164     10

You already have more specific routes for the networks, so don't think that deleting a default route will prevent access to these networks. Assuming that 192.168.1.1 was your subnet with internet access, here is a breakdown of how they'd work:

  192.168.0.0    255.255.254.0         On-link      192.168.1.17    266

All traffic for 192.168.0.x and 192.168.1.x will be sent over the interface with IP 192.168.1.17

  192.168.2.0    255.255.254.0         On-link      192.168.2.51    266

All traffic for 192.168.2.x and 192.168.3.x will be sent over the interface with IP 192.168.2.51

  10.112.28.0    255.255.254.0         On-link     10.112.29.164    266

All traffic for 10.112.28.x and 10.112.29.x will be sent over the interface with IP 10.112.29.164

  0.0.0.0              0.0.0.0      192.168.1.1    192.168.1.17     10

All traffic that doesn't match any more specific routes will be sent to 192.168.1.1 over the interface with the IP 192.168.1.17

David Houde
  • 3,200
  • 1
  • 16
  • 19