0

My computer has 3 Network Interface cards (NICS) and one more virtual Network Adapter that in reality is connected via USB to a Modem. It's a complex setup - the problem is I have multiple Internet connections (3) and want to restrict my computer to always use only one of them - and if that one connection is say switched off or disconnected, It should go internet-less and should not fallback to internet connections with higher metric values.

Deleting two unwanted entries has no effect, because they get recreated on restart.

My route table has 3 gateways for the internet { network destination 0.0.0.0 & mask 0.0.0.0 } I have given metric values as follows :

Lowest (10) to the one I want to use. Higher (20 & 30) to the rest of the two. This means I use the correct internet connection when I boot up with all modems lit up and running.

This also means if my preferred connection is say switched of, when my computer booted up, it did a fallback to the connection with 20 metric value, which I don't want - Any thoughts on how I can prevent this fallback? Deleting the other two entries has no effect, because they get recreated on restart.

pepoluan
  • 4,918
  • 3
  • 43
  • 71
Zasz
  • 133
  • 1
  • 2
  • 9

2 Answers2

1

Remove the gateway specification from the interface specifications for the interfaces you don't want to have default routes defined on. This is usually defined in the file where you define the IP address and netmask for the interface.

BillThor
  • 27,354
  • 3
  • 35
  • 69
  • How do I go about removing a gateway specification from the interface in Windows 7? – Zasz Mar 30 '11 at 13:45
  • Thanks for the reply will google along these lines - but I still have my problem – Zasz Mar 30 '11 at 13:46
  • @Zasz: Default gateway is set in the network interface configuration for the interface. Open `Control Panel -> Network and Interfaces -> Network Connections`. Select the interface, and open the properties window. Default gateway is set in the `Internet Protocol Version 4` properties – BillThor Mar 30 '11 at 13:51
  • Excellent, that resolved my issue - I removed the gateway from the adapter, and persists on restart. I'm marking your answer as the right one :) – Zasz Mar 30 '11 at 13:56
1

Since you're using Windows:

  • Remove all Default Gateway's from the interfaces you don't want to use

How to remove Default Gateway's from interfaces

  • Start Menu > Control Panel > View Network Status and Tasks > Change Adapter Settings.

  • Right-click on the interface > Properties

  • Click "Internet Protocol Version 4" > Click Properties

  • Click "Advanced..."

  • Click on the entry(-ies) under "Default gateways" and click "Remove" for each

Note: This does not work on DHCP-assigned interfaces

pepoluan
  • 4,918
  • 3
  • 43
  • 71
  • Is there a DOS command that can do what you say, or is there UI for this? Google doesn't help much on "Removing gateways from Network Adapter" - In fact I'm hitting this page as the main result! (KUDOS to StackExchange SEO) – Zasz Mar 30 '11 at 13:51
  • @Zasz I've edited my answer. – pepoluan Mar 30 '11 at 14:03
  • Thanks. BillThor beat you to it, but your answer is much clearer to future viewers. – Zasz Mar 30 '11 at 14:31
  • Thanks, that resolved it - I removed the default gateways for the unwanted NICs - Your answer will be more helpful to future viewers. – Zasz Mar 30 '11 at 14:33