Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1866
  • Last Modified:

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?
0
bleujaegel
Asked:
bleujaegel
  • 3
  • 3
  • 2
2 Solutions
 
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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
 
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

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now