Question regarding default routes

Unanswered Question
Aug 17th, 2007

If I set up the following...

ip route 0.0.0.0 0.0.0.0 204.26.3.5

Which of the following is true:

1. Any packet destined for a route not in the routing table will use 204.26.3.5

2. This default gateway will have the default administrative distance

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
royalblues Fri, 08/17/2007 - 04:38

Both the statements are true.

whenever you have a default route, any packet that does not have a better match in the route table will match this route and will be forwarded to the next hop 204.26.3.5

Since this is a static default route with no optional parameters set, it will have a default AD of 1.

This can be confusing as eventhough the AD is 1 this route will be matched only when there is no other longest match found in the RT. If a router sees a longer match from any other routing protocol like OSPF, EIGRP etc, it will be matched ahead of these

HTH

Narayan

srue Fri, 08/17/2007 - 04:56

It depends on whether you have enabled the command 'ip classless' or not, actually.

I'm a little rusty here, but i think this is how it works:

if 'ip classless' is enabled, then yes, the default route acts as you would intuitively expect it to.

However, if it is disabled, the following situation might occur:

if you have for example, a route in the routing table for 10.0.1.0/24, but then the router received a packet for a host on network 10.0.2.0/24, the packet will actually discard it even if you have a default route. the 'ip classless' command describes the ROUTING TABLE, NOT the routing PROTOCOL <- source of confusion here.

Basically, if ip classless is disabled, the routing table assumes it should have all the routes to all known subnets if even one subnet is in the routing table.

Like I said, i'm a little rusty, but if you want to know more just google it:

"ip classless" site:cisco.com

mohammedmahmoud Fri, 08/17/2007 - 05:15

Hi,

Although i think that Narayan's answer is the answer that the original poster is seeking, but i got excited by the topic that Steven has arise.

Classlessness can be a characteristic of a routing protocol (Classless routing protocol - Advertise subnetmask with the prefix - Supports VLSM and CIDR - RIP-2, EIGRP, OSPF, Integrated IS-IS, and BGP-4) and also Classlessness can be a characteristic of a router independent of the routing protocol (Classless routing - A router with the "ip classless" command - how the router does the matching in the routing table).

Classful route lookups, in which a destination address is first matched to its major network address in the routing table and is then matched to a subnet of the major network (trying to find the more specific route - Finding the more specific route is the action for both Classful and Classless rouet lookup). If no match is found at either of these steps, the packet is dropped (A default route will only work if the major classful route is not in the routing table), example, if you have a route in the routing table for 10.1.1.0/24, and the router received a packet for a host on network 10.1.2.0/24, the packet will actually be discarded even if you have a default route. For earlier IOS versions you can enable classless route lookup, even for classful routing protocols such as RIPv1 and IGRP, by entering the global command ip classless. When a router performs classless route lookups, it does not pay attention to the class of the destination address. Instead, it performs a bit-by-bit best match between the destination address and all its known routes, and the thus the default route will work with no constrains.

HTH,

Mohammed Mahmoud.

royalblues Fri, 08/17/2007 - 05:25

Mohammed and steven are absoultely correct

My response was based on the assumption that IP classless has been configured or enabled by default

Narayan

srue Fri, 08/17/2007 - 05:30

i know my answer was superfluous, and most likely ip classless is enabled by default on the device in question...

it was more for the sake of completeness ;)

greekgeek Mon, 08/20/2007 - 03:28

I asked this question in order to confirm my assumption that the CCNA combined exam is misleading at times.

I had a similar question on my test and there were four options. The question said to choose only one. However, at least two were correct.

I believe Cisco needs to be more careful with their questions...this one is not clear.

Thank you

mohammedmahmoud Mon, 08/20/2007 - 04:38

Hi,

Cisco exams questions depends sometime on this kind of puzzling and playing with words, for example for your post the more accurate answer, if we want to choose only one answer is "This default gateway will have the default administrative distance", this is absolutely right, while the other answer has a an if then probability (depending on the presence or the absence of ip classless).

HTH,

Mohammed Mahmoud.

Actions

This Discussion