A: Lets first start by comparing all the choices. Default Gateway, Default Network and the Gateway of Last Resort. Just by reading the names one would think these are similar if not the same things. Answer is basically yes and no. Here is a quick basic breakdown of each and when you might use them.
1) Default Gateway (ip default-gateway x.x.x.x)
In order for this command to function ip routing must be disabled. basically when you router is being a host on the network. think of it acting like a PC. It needs to have a default-gateway in order to get out of its local network.
2) Default Network (ip default-network a.b.c.d)
First off with this command ip routing must be enabled. So that means your router will actually route packets unlike the default-gateway command. Second this command does not specify the next hop address, it specifies a network to be considered as default. In order for this command to set a default network, you must already have a static route in your routing table. You can tell if this is working if from a sh ip route there is a "gateway of last resort" configured.
3) Gateway of Last Resort (ip route 0.0.0.0 0.0.0.0 next-hop-ip/exit-interface)
This command also requires ip routing to be enabled. This command sets a default route for anything not in your routing table. After this command is entered it will show a "gateway of last resort" configured in your ip route table.
show feedback form
close
by dpocoroba edited by aryoba  last modified: 2005-09-15 10:03:21 |