Link to home
Start Free TrialLog in
Avatar of Daryl Ponting
Daryl PontingFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Web server with 2 NICs, 2nd NIC drops it's default gateway

Hello,

I've just installed a new web server running on Windows Server 2003.  The server has 2 NICs.  Each NIC is assigned to a different subnet.  The two subnets connect to two different routers that connect to two different leased lines.  The idea is to have www.website.com going down one leased line and www.website.net going down the other leased line.

We have this exact same setup on a Windows 2000 server and it works fine.  When I set it up on the Windows 2003 box, it gives an warning about multiple default gateways but works ok when I click yes to saving the changes.  However, after a day or so, the 2nd NIC drops it's default gateway so www.website.net doesn't work.  The default gateway is there in the TCP/IP properties on the 2nd NIC but the output of ipconfig shows a blank for the default gateway on the 2nd NIC.

Setting a different metric on each NIC doesn't work because the web page is sent back through the NIC with the lowest metric which might not be the one the web request came in on.

Does anyone have any ideas how I can have two NICs each with a different default gateway?
Avatar of tlbrittain
tlbrittain

Try this...on the server that keeps dropping the default gateway open up Command Prompt and type in "route -p ADD 'destination' MASK 'subnet mask' 'gateway' METRIC '#' IF 'interface"

Example for your situation to just add the default gateway:

route -p ADD 0.0.0.0 MASK 0.0.0.0 x.x.x.x  METRIC 10 IF y.y.y.y

Route is the command
-p makes the route persistent so you do not have to re-add the route everytime you reboot
ADD is the option
you will want to type the above command exactly like it is with the exception that you will put your default gateway in the first IP variable x.x.x.x and the IP of the corresponding interface in the second ip variable y.y.y.y
leave the first 2 IP's as 0.0.0.0 because you are not setting up a static route only a static default gateway assigned to a specific interface.
METRIC is the number of hops the server will try the default seems to be 10

Once you accomplish you should be able to assign the IP address to the interface but leave the default gateway blank.  It may bark at you but don't worry it doesn't need the default gateway when you have the static gateway assigned to that interface.
I am having the exact same problem.  But my primary is the one that is dropping the gatway.  I originally thought that it was a router issue since I could brouse the pages while I was on the same gateway.  
ASKER CERTIFIED SOLUTION
Avatar of tlbrittain
tlbrittain

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Daryl Ponting

ASKER

Thanks for the suggestion but it looks like my boss has fixed it.  All he's done is added a route to the network of the NIC that's dropping it's gateway.  For example, just say the 2nd NIC (the one that's dropping it's gateway) has a 192.168.5.0/24 subnet address and a GW of 192.168.5.1, he ran the following command...

route add -p 192.168.5.0 mask 255.255.255.0 192.168.5.1 (he left out the metric and interface options).

It's been up since Friday evening; it has always dropped within the first day so far.