Discussion Locked

using Dual Default Gateways

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am trying to configure Dual Default Gateways in a XP machine using dual Nics. Below are the currant settings for both Nics.

Below are the currant configs for both nics
Nic 1 is the Internet connection and conection to second external network.
IP Address 198.xxx.xxx.xxx
SubNet Mask 255.255.0.0
Default Gateway 198.xxx.xxx.xxx
Prefered DNS 198.xxx.xxx.xxx
Alternate DNS 198.xxx.xxx.xxx

Nic 2 is the Local internal Lan and also a connection to an AS/400 residing in another city via Frame Relay and Cisco 1710 Router.

IP Address 172.xxx.xxx.xxx
SubNet Mask 255.255.255.0
Default Gateway 172.xxx.xxx.xxx
NO DNS INSTALLED
Connections to the internet on Nic1 and Connections to the Local LAN and remote AS/400 are both needed. Would appreciate any help that can be given.

6 replies

by lordinfidel

In this instance you do not need 2 default gateways.

Why?

The definition in intself of a default gateway defines the answer. A default gateway is where all traffic goes that your OS has no idea where to send it.

So essentially you only ever need 1 default gateway. Because, it is that gateway, that all traffic that is "not" destined for any subnet that the machine is on(has knowledge of) will be sent to. There is one exception to this and that is dead gateway support that was introduced in 2K.

So since your machine sits on 2 different subnets.
It will have multiple routes in it's routing table. When you need to go to a machine on the 172. subnet, it will go out over nic2. It will never speak to the gateway for the 172.x subnet.

The same is true for reaching a host on the 198.0.0.0/16 network. It will never talk to the gateway and will also send the request out thru nic 1.

Now If you need to get to an address outside of one of those 2 subnets, it has to go thru a single gateway address. Which is where the default route comes into play.

The OS can not make judgement calls as to where to send the packet. Not unless it is running some advanced routing protocol such as BGP.

The only "exception" to this rule, is if you have a default gateway specified on both adapters. And you put in a static route to use the 2nd gateway to get to a particular network.

by jack s.

I have a default gateway set up on both nics but the 172 gateway doe not allow traffice to the remote system. I really would like to know how to configue it so I can Access BOTH the Internet and the remote site. I jsut do not know how to configre itso that will happen. Any help would be great thank you

by lordinfidel

For simplicity reasons we have the following.

Subnet 1> 192.168.1.0/24
Subnet 1 gateway> 192.168.1.1
Subnet 1 gateway can get out to the public net

Subnet 2> 172.16.1.0/16
Subnet 2 gateway> 172.16.1.1/16
Subnet 2 gateway can get out to thepublic net

Host1
--------
multihomed with 2 nics.
eth0= 192.168.1.10/24 gwy 192.168.1.1
##eth0 can reach any host on the 192.168.1.0/24 network, and it can also contact the public net.

eth1= 172.16.0.10/16 with no gateway
##You can ping/reach any host on the 172.16.0.0/16 subnet

As you can see, both network cards do not need a gateway. Only 1 does. Because that 1 network card contains your default route out to the internet.

But it knows that if it needs to reach any host on the 172.16.0.0/16 network, to go out thru eth1.

If it needs to go to *any other host* on the 192.168.1.0/24 network or the public net, it will go out over eth0.

-------------------
Now when you say, the 172 gateway will not allow traffic to the remote system, what do you mean.

You can not just put 2 nics in the machine, connect them both to the same switch and expect it to work.

eth0 needs to be plugged into the same physical network lan that the 192.168.1.0/24 gateway is on.

eth1 needs to be plugged into the same physical network lan that the rest of the 172.16.0.0/16 machines are plugged into.

This discussion is closed to new replies.