One NIC multiple gateways

Posted on 2010-11-10
Last Modified: 2012-08-14
I have searched high and low on this and the first dozen or more pages of google results for a good answer for the following.  Even here on EE I have seen dozens of wrong answers accepted as solutions to this problem (see below).  The scenario:

Windows Server 2003 with Exchange (one NIC with IP exists in city A on a network connected to the internet through DSL on router  From city A to city B (30 miles) is a Motorolla Canopy wireless system (10 Mbps) that connects an office in city B to the same network using the same subnet.  No router needed as it is all "LAN" traffic and not a VPN configuration.  In city B is a Cable internet connection on router  The desire is to have both routers configured on all network nodes as default gateways so that if router 1 goes down then the other will take over.

Because of the geographic dispersity of the backup internet connection, a SonicWall or other dual-WAN router will not help in this scenario.

The (wrong) advice that I keep seeing is "oh it simply can't be done; you are trying to do something that TCP/IP can't do".  It's called Dead Gateway Detection and the technology has been around a long time. See below:

and specifically an excerpt:

"If multiple routers are available on the same subnet, configure one (or more) default gateways on the same network adapter."

To be fair, I have only really seen questions phrased as "how do I do this" or "it just isnt' working" and that is not exactly the same as my issue.  Configuring multiple gateways is easy enough (it is right there in the TCP/IP properties window which should have been a red flag for the experts saying it was not possible) and by using proper metrics the failover looks like it works.  What happens, however, is that when multiple gateways are in place, even with different metrics (I used 1 for router 1 and 2 for router 2), internet connectivity on the Exchange server is hampered.  Just browsing sites seems to work perfectly fine in limited testing and the IP returned by is always the same as the gateway in use (same as router 1 whenever it is active) but email flow into the Exchange server is very hit or miss when both routers are alive.  For example, one user found that email arrived at 7am, 10:35am, 2:20pm and 4pm.  However, knowing that he normally received a lot more email in a given day, we removed the 2nd gateway from the Exchange server and within minutes the rest of his email for the day, sent at all different times throughout the day, arrived as expected.  

One last piece to the puzzle, we use DYNDNS mailhop relay to queue our mail and it is then delivered to a DDNS address with the updater being on the Exchange server.  The DDNS updater is working fine and even with both gateways configured the DDNS address did not send an IP update for the hostname so it doesn't look like the server ever tried to failover to the 2nd router.  All ping tests to both routers result in zero packet loss.

Any ideas?

Question by:technologyone
LVL 11

Expert Comment

ID: 34102048
My feeling ist that the problem can be solved by setting a persistent route in the routing table and setting the metric to be greater than the metric to the default gateway, which will have the highest priority.

This link to a Microsoft article may give you some inspiration in this regard.

Using routing tables is the only way I'm aware of to direct the traffic flow you require.  I think the reason for the "you cannot do it" is because you cannot simply have two gateways, either on one NIC or multiple NIC's as they will both have the same metric level and therefore it will not work.  By manipulating the metric you can give the primary gateway the highest priority and any fallback route will pick up the slack if the primary fails.

LVL 77

Accepted Solution

Rob Williams earned 250 total points
ID: 34111303
Windows has the option to configure multiple default gateways, and as you say you assign metrics, but unfortunately it does not work in Windows. It will with Linux, though I am not a Linux fan. In windows you can set it up, pull the plug on the primary gateway, it will fail over to the secondary gateway, and there it stays. It will never switch back unless you reboot the device. It just doesn't work. Newer windows operating systems usually warn you that multiple gateways are not supported when you try to configure it, thus i do not know why it is there.

Where multiple WAN routers are not possible the only option I see in your case would be to write a script that checks for Internet access via the primary rout every 'x' minutes, and if that fails, re write the routing table using netsh to use the other gateway.  am not a programmer, so I would not be much help with that.


Assisted Solution

lcappelli earned 250 total points
ID: 34903742
This might be off topic, but you do not necessarily need two default gateways to use 2 different routers with a fall back capability. Cisco Routers can use something called Hot Stand By Routing, this is a situation in which a virtual router exists between two routers that will switch between the 2 real routers, thus 2 possible paths, 2 routers, but the clients only needed 1 default gateway.
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!


Author Comment

ID: 34984944
Doesn't this still give you a single point of failure though?  The virtual router is the single point of failure.

Expert Comment

ID: 34989298
No the virtual router can immediately assume the identity of the 2 real routers they it stands in for, hense the hotstandby fallover concept.
LVL 38

Expert Comment

ID: 35687778
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Access shared drive during VPN session 9 108
ntp settings vcenter 4 60
DirectAccess - Open ports 2 53
VMware ESXi network trunking best practice scenario for iSCSI & NAS ? 8 161
FIPS stands for the Federal Information Processing Standardisation and FIPS 140-2 is a collection of standards that are generically associated with hardware and software cryptography. In most cases, people can refer to this as the method of encrypti…
This article is in response to a question ( here at Experts Exchange. The Original Poster (OP) requires a utility that will accept a list of IP addresses …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question