How to select default network interface for internet?

4

3

I have 2 network interfaces. Both use DHCP to obtain ip address. First provides internet directly and second uses PPPOE connection. How to select which connection windows will use to connect to internet? I need both links to be enabled and want one with PPPOE to be my default.

P.S. I understand I can do it using console and route command but I want windows to do that automatically.

Poma

Posted 2012-03-21T18:58:31.160

Reputation: 1 267

With non PPOE one do you ever access IP addresses outside of your subnet? – Scott Chamberlain – 2012-03-21T19:00:27.180

I use it as backup when my PPPOE provider has problems – Poma – 2012-03-21T19:02:05.467

Answers

8

Go in to your network adapter properties page for the non-PPPOE device, from there click on Internet Protocol Version 4 and go to Properties, from there click Advanced to get the following window.

enter image description here

Un-check Automatic metric if it is checked and enter 100 for the value of the 'Interface metric' box.

That value should be high enough to make your computer prefer the PPPOE link if the PPPOE link has automatic metric set.

If you are doing IPv6 you will need to set the same value in the Internet Protocol Version 6 properties page too.

Scott Chamberlain

Posted 2012-03-21T18:58:31.160

Reputation: 28 923

1Does not work on Server products it appears. I tried this and Windows still chooses the wrong interface despite the higher cost metric (even across reboots). – Brian Knoblauch – 2015-11-11T14:49:25.577

Do you have a static route it is following? Static routes take priority over cost metrics, the cost metric only is used when there is a tie in the route table. Do a route print from the command line to see all routes, it also lists the metric value for each route. – Scott Chamberlain – 2015-11-11T16:23:22.160

Great. Worked at Win7 - 2018 . The smaller priority wins. I changed metric to both my adapters (lan and wifi), and packets travel through the adapter with the smaller metric number. – George Vasiliou – 2018-11-12T10:42:15.803

thank you, that works! One more question. Is there a way to tell windows to try to connect to PPPOE connection when it's not connected (like it does when there is no connection to internet)? – Poma – 2012-03-21T19:23:51.333

It will just do it, it tries the lowest valued device that can connect to the destination, so if your normal link is down the PPPOE link will be the lowest valued connection (because the other one is down, so in essence it has a value of infinity) – Scott Chamberlain – 2012-03-21T19:34:24.080

No, the PPPOE is the primary connection and direct link is secondary. I want it to try to automatically reconnect to PPPOE even when there is internet on secondary link. – Poma – 2012-03-21T19:36:53.593

Misunderstood you, there should be a redial option in the properties of the link settings, I do not have a PPPOE link on my machines so I can't tell you where to look. – Scott Chamberlain – 2012-03-21T19:38:03.840