With two gateways, system is using wrong one

I have two network cards in a system, one card is static IP and has an assigned gateway, that is the default gateway for internet access.

The second NIC is DHCP and plugged into an AirLink Modem.  The DHCP services are giving the card a Gateway address.

IN this situation I do not have access to the internet as the system appears to be using the Airlink Gateway and NOT the one assigned on the first NIC.

is there a way to route or otherwise force the system to use the correct gateway?
LVL 1
Eric_Where_am_IAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Richard MurphySenior Network AnalystCommented:
Windows doesn't handle two gateways very well, you could send certain traffic to different subnets by removing the gateway and using  that ip as your route target.
0
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
Windows does not handle two gateways at all. The metrics should determine which route to use in preference, but that does not work well.

You can make sure one gateway is used all the time by defining two more specific routes: 0.0.0.0/1 and 128.0.0.0/1. Those have precedence over any default route.
1
KimputerCommented:
Set the 2nd NIC to fixed IP. Since you already have some DHCP info, fill in a fixed IP in the range you think is reserved (usually either very high or very low) , and leave the gateway empty.
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Eric_Where_am_IAuthor Commented:
Going to have to review comments, before I accept answer.  There were several suggestions and I will have to try them all before commenting.
0
Eric_Where_am_IAuthor Commented:
Qlemo, you suggestion sounds like the one I am looking for.

Would you mind providing an example of the route Add statement for me..just put 0.0.0.0 in place of actual IP numbers I will figure out the rest.
0
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
I'll use 1.1.1.1 as gateway - 0.0.0.0 might be mistakable.
route add -p   0.0.0.0 mask 128.0.0.0 1.1.1.1
route add -p 128.0.0.0 mask 128.0.0.0 1.1.1.1

Open in new window

The -p makes it permanent, so you should not loose the setting if the network changes, and need to run those commands only once.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DHCP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.