Route only internet traffice to NIC 2

I have a pc with 2 network cards that's connected to the company's LAN with NIC 1.
NIC 2 is connected to a regular adsl modem.

What I want is all internet traffic to travel though NIC 2.

I can only get this working by disabling NIC 1, but I want to keep using both networks.
Is there any routing rule I can apply to direct only internet traffice to NIC2 ?

LVL 5
karstiemanAsked:
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.

GhousullahCommented:
Type "route print" i command mode. you will get a screen as something like below.

===========================================================================
Interface List
0x1 ........................... Broadcam Net01
0x2 ...00 14 22 4d 41 a2 ...... Broadcom NetXtreme 57xx Gigabit Controller - Pac
ket Scheduler Miniport
===========================================================================

Note down the NIC connected to your office network. For eg: 0x1 here.

Then you should be aware of the intranet IP range for eg 10.* or 172.168.* so based on that add use route add command as below syntax.

route ADD 157.0.0.0 MASK 155.0.0.0 157.55.80.1 IF 1

This means that traffic for the IPs starting from 157.* with Subnet mask 155.0.0.0 will go through 157.55.80.1 gateway.

For this to work make your NIC2 connected to internet as your default Ethernet network cad.

This will go off once u log off from the system so to make it work make a batch file and put it in the startup. so that no need of manual work need to be done.




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
ArtFunGuyCommented:
You must put the default route to NIC2, and add specific routes to NIC1 for you LANs networks.
On windows, you can do it by DOS command : route add ...
see route add /? to have parameters.
the command for default route : route add 255.255.255.255 MASK 255.255.255.255 addrNIC2  IF n
where n is the ID of the NIC2 interface. Yoy get it by command  : route print
0
karstiemanAuthor Commented:
Thanks guys, I've got it working now !
@ Ghousullah: how can I change the default network card from a batch file ? ( I know how to add the routes )
0
karstiemanAuthor Commented:
Thanks guys, I got it working now !
0
GhousullahCommented:
I think you would not need to make it through Batch file. As windows will have the settings stored to your profile as your NIC2 as default once you make it through the Control panel window.
0
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
Networking

From novice to tech pro — start learning today.