The default gateway, also known as simply the gateway, the default route, and on Cisco routers as the gateway of last resort, is the path packets use when there is no explicit route to a destination. Without a default gateway, each host would have to have a routing table containing explicit paths to every host on the Internet, an absurd and unworkable solution. When we configure a default gateway, we're saying to the host, "If you don't know what else to do with a packet, send it to the default gateway and let the gateway figure out what to do with the packet."
In order for a host's default gateway to work, there are certain criteria that must be met:
- It must be an interface on a network already known to the host (If it's not known to the host, how will the host know how to get the packets to the gateway?)
- It must be an interface on a device connected to the rest of the world, usually the public Internet.
In the above scenario, suppose the top laptop wants to visit a website, say www.soundtraining.net. It probably doesn't have an explicit route in its local routing table for www.soundtraining.net's IP address, so it hands the request off to its default gateway, the ASA. The ASA also doesn't have an explicit route in its routing table for www.soundtraining.net's IP address so it hands the packet off to its default gateway, which is the ISP's router. The process may be repeated through several routers before the packet finally arrives at its destination. You can see the entire process by using the command traceroute www.soundtraining.net in a terminal window.
One word of caution, on hosts with multiple interfaces, you can sometimes end up with multiple default gateways which can produce unpredictable results. Generally, you want only one default gateway configured per device, regardless of the number of interfaces on the device.
1 comment:
This is the first site on default gateways that actually explained what it is and what it's for in a way that was simple and made sense.
Thank you.
Post a Comment