Why is default gateway left blank?

On a dual NIC setup, why is the default gateway left blank on the LAN side?  Is this the same as giving it the IP of '0.0.0.0'?  Understandably, the WAN side NIC would be on a different network, and I'm assuming the necessary information is pulled from the routing table.   Am I wrong?
LVL 2
bleujaegelAsked:
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.

Rob WilliamsCommented:
A gateway is where the device (server in this case) sends packets that are not destined for a defined local network. An example would be an Internet based IP. The LAN side is defined by one specific IP range/subnet, therefore any unknown IP must be on the WAN side so that is where they are sent and that is where you would need a gateway. An IP of 0.0.0.0 usually implies "any". Therefore if no gateway is required, as in the case of the LAN NIC, you would leave it blank.
0
Imran HashimSr. IT Infrastructure ConsultantCommented:
Default gateway is used if the device does not have a pre-defined/specific path to the destination. In such a case when the server have multiple NICs and one of them is hooked to external network, the default gateway for internal NIC is left blank. If the Default GW is configured on both the NICs with same Cost value, the packets desgined for networks other than the internal will be sent on similar to Round Robin technique. The routing is done on the basis of entries in the routing table and the networks to whom the IP addresses of the NICs belong are automatically added as Local networks. As the IPs used within companies are limited and known, they do not need to be routed through default gateway. If your internal IP subnets are more than one, you can create manual routes through Internal NIC and this will ensure. The best tool for managing such situation is Routing and Remote Access.

Tip: If you want your internal NIC to be used for all external traffic in case your external NIC is unable to reach there, you may add a route for 0.0.0.0 with cost (metric) higher than the Default Gateway.
0
bleujaegelAuthor Commented:
So the blank default gateway is only pointing out.

If 0.0.0.0 implies 'any', does that mean that it can be pointing to an internal or external route?  In other words, what would happen if you put 0.0.0.0 for the default gateway.  I'm still not totally clear on the difference.
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Imran HashimSr. IT Infrastructure ConsultantCommented:
Blank does not mean 0.0.0.0. Blank means there is nothing.

Yes, 0.0.0.0 mean Any IP address wether internal or external. You can not put 0.0.0.0 as an IP address or default gateway. The valid IP ranges that can be used must start with 1-223. You can use  ROUTE PRINT command from Windows computer to see the routing table, showing like following:

c:\>route print
===========================================================================
Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...00 11 22 33 44 55 ...... Intel(R) PRO/1000 MT Network Connection
 Scheduler Miniport
===========================================================================
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0     10.10.10.20     10.10.10.1       20
       10.10.10.0    255.255.255.0      10.10.10.1     10.10.10.1       20
      10.10.10.1  255.255.255.255        127.0.0.1       127.0.0.1       20
   10.255.255.255  255.255.255.255      10.10.10.1     10.10.10.1       20
        127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1       1
        224.0.0.0        240.0.0.0      10.10.10.1     10.10.10.1       20
  255.255.255.255  255.255.255.255      10.10.10.1     10.10.10.1       1
Default Gateway:      10.10.10.20
===========================================================================

In this, you will see the first line shows that the network destination 0.0.0.0 with netmask 0.0.0.0 is going through 10.10.10.20 using local interface 10.10.10.1. This is the translation of default gateway. If you put DGW for multiple NICs, you will similar entries for them as well. The result will be that the routing table will have multiple routes available with same Metric for 0.0.0.0 and will force the routing engine to use both of them for unknown addresses.

If we do not put a default gateway for an NIC, it means that this NIC will not be used for sending packets for which this computer does not have a definite route.
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
bleujaegelAuthor Commented:
If I'm running a NAT server with 2 NIC's (one directly connected to internet), would it be correct to say that if a client computer sends something through the NAT server:
1) It sends it to it's default gateway (the LAN ip of the NAT server) e.g. 192.168.100.254.
2) The NAT server sees the gateway for it's IP in the routing table as
'network destination 192.168.100.254'       'Gateway 127.0.0.1'
3) The 127.0.0.1 IP allows it to reveal the WAN default gateway IP.

In other words, it looks as though the LAN NIC with the blank default gateway simply 'passes the buck'.
0
Imran HashimSr. IT Infrastructure ConsultantCommented:
It works somewhat similarly. if 192.168.100.254 is not part of the LAN, the server will receive from the LAN interface and forward it to the Default Gateway (Internet connected interface in your case) and the packet will be routed.
0
bleujaegelAuthor Commented:
Thanks for the info!
0
Rob WilliamsCommented:
Thanks bleujaegel ,
--Rob
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
Windows Server 2003

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.