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