08-14-2002 10:09 AM - edited 03-02-2019 12:41 AM
Can someone explain to me the difference between a Default Gateway and Gateway of Last Resort?
08-14-2002 03:24 PM
The following page should answer your questions
09-26-2002 01:48 PM
Hey Phil, did you find what you needed?
01-20-2020 07:10 PM
The previous link is dead, question unanswered.
01-21-2020 03:38 PM
It is a very old link (responding to a very old question) and I am not surprised that it did not survive the various updates/realignments that have taken place in cisco.com. I will suggest this as an answer to the question of the difference between Default Gateway and Gateway of Last Resort:
- we need to be very aware of syntax and context in which these terms are used. Frequently people are careless about terminology and use one term when the other term would really be more appropriate.
- Gateway of Last resort is a bit easier. This term is associated with layer 3 routing tables. It is essentially the same as default route and describes the next hop to which you would forward IP packets whose destination address did not have a match in the layer 3 routing table.
- Default Gateway is more difficult because it is used both in context of layer 2 and of layer 3. So let us start by considering the command " ip default-gateway". It is used in configuring layer 2 switches and provides a next hop for management traffic from the switch to remote destinations. In the context of layer 3 default gateway is the destination to which you would forward traffic when the destination address did not have a match in the layer 3 routing table. So in layer 3 Default Gateway is basically the same as Gateway of Last Resort.
So when you see Gateway of Last Resort used it should be pretty clear what it is about. When you see Default Gateway used you need to be careful to determine whether it is a layer 2 context or a layer 3 context.
HTH
Rick
01-12-2021 06:57 AM
It's the difference between layer 2 and layer 3:
Layer 2 = Default Gateway
Command = ip default-gateway x.x.x.x
Meaning = The mac-address-table will be used to reach the x.x.x.x address. This command will be used on layer 2 switches. Can be used on devices without any routing tables or capability at all.
Layer 3 = Gateway of Last Resort
Command = ip route 0.0.0.0/0 x.x.x.x
Meaning = The routing table will be used to reach the x.x.x.x address. This command will be used on layer 3 routers or multilayer switches. Only devices with routing capability can have a gateway of last resort.
In Summary:
Devices without layer 3 capability must use their mac-address-tables to forward traffic. Devices with layer 3 must use their routing tables to forward traffic. There are different ways to configure a device to reach another device that depend on whether the device is layer 2 using mac-tables or layer 3 using route-tables.
Hope an answer 19 years later isn't too late
01-12-2021 08:33 PM
I wouldn't talk about L2, it's more about "limited L3 capability", since you can potentially reach the other end of the world you are, technically speaking, doing routing in any case, just as any end host does.
However cisco ios consider you are doing routing when you have more than one ip adddress configured and the command "ip routing" issued on a device, that's the misleading part, since it refers to the capability of the device to be traversed by traffic not generated by itself, it doesn't refer to the traffic generated by or destined to the device itself.
Back to the original question:
Gateway of last resort is a generic term which describes the capability of an host/device to send all the L3 traffic, not otherwise specified, to some destination.
Ip default gateway is the cisco way to enable last resort gateway on a device without ip routing enabled
ip route 0.0.0.0 0.0.0.0 is the same for a device with ip routing enabled
01-13-2021 01:35 AM
01-13-2021 02:52 AM
That's what ios shows to you which is, for example different from a windows or a linux host which presents to you a routing table even if routing is not explicitly enabled on the host.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide