12-27-2011 06:41 AM - edited 03-04-2019 02:45 PM
Hi Peter,
Would you explain why sh ip route command shows like this below:
#sh ip route connected
10.0.0.0/24 is subnetted, 4 subnets
C 10.1.2.0 is directly connected, Ethernet0
C 10.1.7.0 is directly connected, Ethernet0
C 10.1.129.0 is directly connected, Serial1
C 10.1.128.0 is directly connected, Serial0
Here we are not subnetting 10.0.0.0/24, but we have subnetted major n/w 10.0.0.0/8 to use smaller /24 subnets on the n/w, what is the reason that it should show /24 above.
Can you please provide some insight on this.
Thanks/Nag
Solved! Go to Solution.
12-28-2011 02:29 AM
Hello Nag,
I am honored and glad to help. Please feel welcome to come back and ask new questions. There are many great experts here on CSC and I am sure your questions will be answered appropriately.
Best regards,
Peter
12-27-2011 07:42 AM
the routing table is a heirarchical structure and i believe that this certain structure make makes the whole route lookup process much efficient.
now looking on the output you got,
#sh ip route connected
10.0.0.0/24 is subnetted, 4 subnets
C 10.1.2.0 is directly connected, Ethernet0
C 10.1.7.0 is directly connected, Ethernet0
C 10.1.129.0 is directly connected, Serial1
C 10.1.128.0 is directly connected, Serial0
breaking the line "10.0.0.0/24 is subnetted, 4 subnets "in parts-
firstly, its a parent route, and the other 4 enteries are child routes.
parent routes are created whenever a subnet is added to the routing table.
and the child routes are the actual routes, tells about where we got it from (source-C,O, D, R etc) , interface etc.
If we dont have any subnet routes, but only classful, you dont have any parent route entry created.
for eg. if you add an interface like
interface l0
ip add 10.1.1.1 255.0.0.0
end
there will be no parent route entry. but just one entry saying 10.0.0.0 is directly connected - inteface l0 -sth like that.
10.0.0.0 --- represents the classful network,
/24 show the masks of the child routes, is shows that you have used /24 mask in interface addresses.
subnetted means, - its just subnetted, i mean not VLSM'ed.
HTH
12-27-2011 02:07 PM
Hello Nag,
Would you explain why sh ip route command shows like this below:
#sh ip route connected
10.0.0.0/24 is subnetted, 4 subnets
C 10.1.2.0 is directly connected, Ethernet0
C 10.1.7.0 is directly connected, Ethernet0
C 10.1.129.0 is directly connected, Serial1
C 10.1.128.0 is directly connected, Serial0
What you see here is a way how Cisco simplifies the output of the routing table. What is written here is:
It is also true that this organization of the routing table as printed out in this command, namely, sorting all the networks in the routing table according to their classful networks from which they were created, was important in times of so-called classful routing behavior. However, this approach to routing is not used anymore and for the sake of clarity, I am not going to explain it here at this moment - still, if you are interested, I will be glad to extend the explanation.
An important fact to remember is that the output of the show ip route does not need to correspond to the true organization of the routing table. Internally, the routing table may be sorted in a way that considerably differs from the sorting visible in the show ip route output. Therefore, no claims about efficiency or non-efficiency of a particular sorting visible in this command's output should be inferred.
Best regards,
Peter
12-27-2011 07:46 PM
Hi Peter,
Thanks for the information, i always thought that the routing table structure has sth to do with the efficiency.
But, a little more information is truly desired. Please correct me if i'm wrong .
in short-
the route table is used to build the cef tables whose enteries are populated into certain datastructures based on the type of cef being used, and these datastructures are actually used when routing decisions are made.
But, what about the process swithcing? I guess it uses the routing table.
Thanks.
12-28-2011 01:46 AM
Hello,
i always thought that the routing table structure has sth to do with the efficiency.
This is true but the efficiency is based on how the routing table is organized in the memory and how can it be accessed and searched. The output of the show ip route is just a visual output but it does not have to mimic the actual order and sequence of entries as really present in the routing table, nor does it really depict its real organization.
What I am saying is that we have a routing table which is a data structure that absolutely needs to be efficiently organized, and we have its listing which needs to be, first and foremost, readable by humans. Even if you perform the show ip cef command, you get a linear, table-like listing in the output, despite the CEF using a tree structure, not a table. See the difference between the memory representation and its listing? This is what I am hinting at.
the route table is used to build the cef tables whose enteries are populated into certain datastructures based on the type of cef being used, and these datastructures are actually used when routing decisions are made
This is true. The routing table is the basic structure that can be used to forward packets but performing routing lookups in this structure may not be as efficient. However, the routing table is the master data source for optimized forwarding databases - route caches, trees, tries, value/mask pairs for TCAMs, etc.
But, what about the process swithcing? I guess it uses the routing table.
Yes, that is absolutely correct. If a packet is process switched, the routing table is used.
Check out the two following documents:
http://www.cisco.com/en/US/tech/tk827/tk831/technologies_white_paper09186a00800a62d9.shtml
This document nicely explains the various switching paths in IOS-based routers.
http://www.cisco.com/en/US/products/sw/iosswrel/ps1828/products_tech_note09186a00801e1e46.shtml
This document, in its lower parts, contains a nice table that explains how a packet would be forwarded if different switching methods were configured on ingress/egress interface. This document has to be taken with a grain of salt, however - with most recent IOSes, the fast switching support has been dropped, as far as I know.
Best regards,
Peter
12-28-2011 02:53 AM
Hello,
the stuff was really helpful.
Thanks a lot Peter.
12-28-2011 12:20 AM
Thanks Peter for your response !!
While you say,
But the representation in #sh ip route is misleading right?
Like specifying 10.0.0.0/24 is subnetted. It also shows that it is the zero-subnet of 10.0.0.0/8 with 24 bit mask.
Where as, the 4 known subnets above are the subnets we arrive at from 10.1.0.0/16 with 24 bit mask.
With 10.0.0.0/24 being the 1st subnet and also the zero-subnet, the above 4 known subnets are 259th, 264th, 385th & 386th subnets respectively.
I believe if the #sh ip route shows 10.0.0.0/8 is subnetted and listing the 4 subnets with /24 would have been fine for network engineers, am I correct.
Request, better if you could elaborate on this- It is because any one who understands routing table clearly can do well with routing part of the network.
Thanks/Nag
12-28-2011 02:00 AM
Hello Nag,
But the representation in #sh ip route is misleading right?
Like specifying 10.0.0.0/24 is subnetted. It also shows that it is the zero-subnet of 10.0.0.0/8 with 24 bit mask. Where as, the 4 known subnets above are the subnets we arrive at from 10.1.0.0/16 with 24 bit mask.
Well, the show ip route is organized according to classful networks. Each subnetwork of a classful network is placed below a headline entry that describes the classful network under which the subnet belongs. The comment of 10.0.0.0/24 is subnetted is quite misleading, true - because it makes you think that the 10.0.0.0/24 is further subnetted. In reality, however, this output tells you that the classful network 10.0.0.0 is subnetted into several subnets with an identical mask of /24. There's no deep logic to this output. It's just the way it is.
I believe if the #sh ip route shows 10.0.0.0/8 is subnetted and listing the 4 subnets with /24 would have been fine for network engineers, am I correct.
Definitely yes. As a matter of fact, as soon as you do VLSM, i.e. create differently sized subnets of a particular classful network then the output immediately becomes more readable:
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.0.10.0/27 is directly connected, Loopback0
C 10.0.0.0/24 is directly connected, FastEthernet0/0
Notice now that because my two subnets are variably subnetted, the output says immediately:
I believe that a similar output would be appropriate even for equally-sized subnets, although it may get kind of tedious to see the same netmask printed out in each line again and again.
Does this answer your question, Nag?
Best regards,
Peter
12-28-2011 02:22 AM
Thanks and Excellent Peter. Got it.
May be if I could get a chance will try in a lab env. with examples. I could verify it to the benifit of retaining my memory.
Will be posting many a queries whre I come across a need for clarity in several other things too, that need your expert help.
Your patient explanation from ground level is awesome !1
Best Rgds/Nag
12-28-2011 02:29 AM
Hello Nag,
I am honored and glad to help. Please feel welcome to come back and ask new questions. There are many great experts here on CSC and I am sure your questions will be answered appropriately.
Best regards,
Peter
01-05-2012 12:34 AM
Hi Peter,
Back again, I have seen somewhere in Cisco documentation that routing table itself by default acts classfully( even without a classful routing protocol). I believe this has direct relationship with the #sh ip route o/put showing the top headline saying 10.0.0.0/24 is subnetted. As we know the fact that a classful routing protocol assumes
1).classful/ default subnet mask for a subnet if it receives/sends a routing update crossing the network bondary.
2). it also assumes that the entire network uses equal masks for all the subnets.
So when we use an IP address on the router's interface, due to the very nature of routing table, if we look at the #sh ip route o/put, it shows that 10.0.0.0 is the classful network and is subnetted as equal masks, as is the case in the above example /24. ( 10.0.0.0/24).
I have logically verified and accept that the routing table nature shows that it has roots with original inception of routing protocols.
Thanks to Peter to let me go deeper.
//Nag
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