PDA

View Full Version : Default routing is confusing, help!!!



otto4u
08-04-2009, 12:37 PM
Understanding default route is proving to be a bit hard for me!:confused:

Every thing was ok until "IP classless" command came in between!!

"If you’re using default routing, you must use the ip classless command because it is possible that no remote subnets will be in the
routing table."-CCNA guide quote(page:- 375)

how using ip classless command will help if there are no remote subnets in the routing table??:( ip classless is used when we need to add diff. subnet masks on each interface, isn't it? what it has to do with default routing and routing tables??

and my 2nd question is, we must only use default routing on stud networks, right?, then why are we using it on fig.6.10(pg 275)??

please help!!!:mad:
http://www.lammle.com/discussion/images/misc/progress.gif

Fuzz
08-05-2009, 07:26 AM
A default route is used if there are no matching routes in the routing table. With no ip classless it is only used if the classful network is not known in the routing table. If a packet destined for a subnet not in the routing table, but the router knows about the major network it is destined for, the router drops the packet instead of forwarding it via the default route. For example

172.30.0.0/16 is variably subnetted, 2 subnets, 2 masks
D 172.30.32.0/20 [90/4879540] via 10.1.1.2
D 172.30.32.0/24 [90/25789217] via 10.1.1.1
S* 0.0.0.0/0 [1/0] via 10.1.1.3

Packets destined for 172.30.32.1 will be forwarded via 10.1.1.1, as the longest prefix wins.
Packets for 172.30.33.1 will be forwarded via 10.1.1.2
Packets for 10.1.1.5 will be sent to the default route via 10.1.1.3
Packets for 172.30.64.1 will be dropped, not sent to the default route.

This is because the router knows about 172.30.0.0/16, which this packet is a part of, but it doesn't have a specific route for it. Turning on ip classless will cause the router to forget about classful boundaries and send any packet to the default route for which it does not have a specific route for. The command is not about addressing interfaces on the router, it tells the router how to handle routing. This is important to remember when using routing protocols that auto summarise.

In this way, you can use default routing on any router, as long as you address your network accordingly. Stub networks only have one way in/out of the network, so they only need one route in the routing table, the default route.

otto4u
08-05-2009, 09:41 AM
ok almost got it!

But why 172.30.64.1 will be dropped and not forwarded to default route??(/20 means Its has a mask of 240 with means we get subnets 0,16,32 and 64 so 64.1 is a valid host so why would it wont send it to default route?):rolleye s:

and you mean we can use default routing on non-stud networks too??virtually any network? we just have to take care that we use it properly, right?

OK! what I got now is, we don't necessarily need to use default routing only for stud network but for all routers/networks we want to set default route to(from this I mean, if routers don't find route in the routing table , packets must be headed to default route, so we make sure that packet don't get dropped in any case!)


Thanks for replying(I just have above doubts, I hope u will clear it, thanks in advance)

Fuzz
08-05-2009, 01:46 PM
But why 172.30.64.1 will be dropped and not forwarded to default route??(/20 means Its has a mask of 240 with means we get subnets 0,16,32 and 64 so 64.1 is a valid host so why would it wont send it to default route?):rolleye s:

If you don't have ip classless enabled, even though the packet is destined for a valid host the router will drop the packet. This is because it is using classful routing. It knows about 2 subnets in the 172.30.0.0 network, but it doesn't have a specific match for the subnet 172.30.64.1 is a part of it drops the packet. The default route is not considered because it does have a match for subnets in the classful network.

Using the ip classless command makes the router forget about network classes and matches destinations as they appear in the routing table, without worrying about the classful boundaries.