cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
19134
Views
31
Helpful
8
Replies

Default Gateway vs. Gateway of Last Resort

pgcampbell
Level 1
Level 1

Can someone explain to me the difference between a Default Gateway and Gateway of Last Resort?

8 Replies 8

Prashanth Krishnappa
Cisco Employee
Cisco Employee

The following page should answer your questions

http://www.cisco.com/warp/public/105/default.html

Hey Phil, did you find what you needed?

The previous link is dead, question unanswered.

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

HTH

Rick

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

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

 

Not true. The command IP routing will be nowhere to be found on devices
using default gateways, only on devices using gateways of last resort. The
command show IP route is not possible to issue on devices where a default
gateway is required. If you see a routing table, you require a gateway of
last resort via a static route, and not a default gateway.

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.