Link to home
Create AccountLog in
Avatar of bleujaegel
bleujaegel

asked on

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?
SOLUTION
Avatar of Rob Williams
Rob Williams
Flag of Canada image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
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.
Avatar of bleujaegel
bleujaegel

ASKER

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.
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
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'.
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.
Thanks for the info!
Thanks bleujaegel ,
--Rob