Hello to all,
After reading several RFCs, guides and HOWTOs I am confused by an apparently trivial question - what is the basic, fundamental difference between classful and classless routing?
I am well aware that - said in a very primitive way - the classful routing does not make use of netmasks and instead uses the address classes while the classless routing utilizes the netmasks and does not evaluate the address classes.
However, already in 1985 the RFC 950 (Internet Standard Subnetting Procedure) stated that the networks can be further subnetted using the network mask. Since then the routers are expected to use network masks in the routing decision process in the precise way they use it nowadays. However, if the routers use network masks they are doing the classless routing, aren't they? Where is then the difference if we used to describe the 80's way of routing as a classful routing? Or was it already the classless routing? The RFCs about CIDR came gradually only in 1992 and 1993.
If somebody could give me an insight into the key difference between classful and classless routing (and perhaps into the Internet history, how was the real routing done then) I would be most grateful.
Thank you a lot!
your understanding on classful routing protocols is not exactly correct. a classful routing protocol is a protocol that does not forward the subnet mask information in its routing updates. however, routers running classful routing protocols use subnet masks to make forwarding decisions.
lets take RIP for example. before a RIP router SENDS an update it goes through a relatively simple process. this will help you understand how a classful routing protocol uses subnet masks to make forwarding decisions. :
1) the routing process checks to see if the advertised subnet belongs to the same major network as the outgoing interface (the source interface of the update). assume that the answer is yes.
2) the router then checks to see if the advertised network and the outgoing interface have the same subnet mask. if yes, then the subnet is advertised. if they do not share the same mask, the advertisement is dropped.
so you can see. even though RIP is a classful routing protocol, it still uses subnet mask information to make its forwarding decisions. as a matter of fact, the example above explains why RIP doesn't support VLSM (because whenever it notices the different subnet masks, the update is dropped).
hope this explains it for you.
thank you very much for your reply. Please allow me to make some remarks.
I am not discussing the routing protocols, rather I am talking about the process of path selection itself - the routing. According to the literature, the routing (as a process, or as a basic function of a router) can be either classful or classless.
So I have two technical terms - classful routing on the one hand, and classless routing on the other. I need to properly define them and differentiate between them. From what I have learned and studied up to now I can not give a key difference between these two.
The routing protocols are concerned with dynamic route propagation. We can say somewhat abstractly that the routing protocols deal with the information base that the routing process uses for its decisions. However, a routing protocol is not the decision making itself... and I am trying to understand the difference between classful and classless "decision making", that is, routing.
I am not sure about your description of the RIP behavior. Assume that the major net of the outgoing interface and the major net of the route to be advertised agree. Then assume that the netmask of the outgoing interface and of the route to be advertised do not agree. I would suspect that the route to be advertised will be simply masked by the netmask of the interface itself. Many software implementations of the RIPv1 do just that (e.g Quagga). I might be wrong about this on Cisco boxes but I am quite sure of this on some other implementations.
The RFC 1058 where RIPv1 is specified assumes that the netmasks used the autonomous system are identical. The RFC does not specify what should happen if various netmasks are used, therefore every reaction to such event is purely implementation-specific. If the Cisco implementation drops these routes from the advertisements, it is their implementational decision that is neither supported nor prohibited in the RIPv1 specification.
I am not sure I can clearly express what I am searching for. Excuse me please if this is the case. Thank you very much for your patience with me and for every your hint and suggestion!
hi again Peter,
i think i understand what you're looking for now. the only thing i can recommend is you dive into the mechanism used to select the best path and , therefore, enter it into the routing table. the algorithms used for this are Bellman-Ford (for classful protocols) and Dijkstra (for classless protocols).
the RIP example i gave was simplified. the actual process is much more elaborate of course. i underestimated your understanding of the subject earlier.... sorry ;)
I hope you find what youre looking for. I wish you good luck.
I am afraid we still have not understood each other ;) I am not looking for the algorithms used to select the best path. I am well aware of them, both Ford-Bellman and Dijkstra, and about their internals. By the way, these algorithms do not have any influence whether the routing is classful or classless because they deal with metrics, not with masks. For example, a classless EIGRP internally uses a distance-vector algorithm, not a SPF algorithm.
I will try to explain once more what is my problem... There are two terms commonly used but badly defined: the classless routing and classful routing. Originally, I have thought that the classful routing works as follows:
- The routing table consists only of classful destination networks (major nets), metrics and respective gateways. No network masks are stored in the table because we are classful, that is, we use exclusively the route classes and all entries in the routing table are already classful.
- When routing a packet, the router looks at its destination IP address and determines the major net of this IP address (that is, the classful network that this IP address belongs to). Then it looks up the corresponding entry in the routing table and sends the packet to the respective gateway.
I thought that the classful routing works in this way. I won't describe the classless routing - both of us know how do the today's routers select the next hop.
However, in the RFCs 917 and 950 which were published in 1985, long ago before the term 'classless routing' was coined, the network mask was already defined and it was stated how the routers should work with it.
Now I am confused. The terms classless addresses and classless routing were defined sometime in 1990's, therefore I assume that the routing before the invention of classless IP assignment can be in fact described as classful. In other words, I thought that the routing that was commonly used in 1980's did not use netmasks and can be described as classful because the notion of classlessness came first in 1990's. But now I see that netmasks were defined in 1985.
Now where am I wrong? Do I understand the classful routing properly as I described it? Is it correct to talk about routing in that era as classful although the netmasks were already in use? Or was it already the classless routing?
Basically I am trying to understand what was called the classful routing if the classless routing is said to be something different.
Mohammed, I am most grateful to you for your patience and suggestions! Thank you indeed.
Mohammed is following a path that many people follow in assuming that classful routing is based on a foundation of classful routing protocols while classless routing is based on a foundation of classless protocols. I find that frequently there is merit in this approach.
But I do understand that you are asking a different question and I propose this answer to your question. In the IOS there is a command "ip classless" which can be enabled (and is enabled by default in IOS for many releases) or can be disabled (and was disabled by default in early IOS releases). The command ip classless applies to the routing process (determining how to forward a particular packet) and not to the process of building the routing table. So I believe that your question really becomes the question of what is the difference in behavior when ip classless is not enabled from when it is enabled.
First let me establish a little bit of background: in determining how to foward a packet the routing process searches the routing table for the longest match: it searches for a /32 host specific entry, and if it does not find a host specific entry, it searches the table with successivly shorter masks attempting to find a match for the subnet in which the address belongs, and if it does not find a match for the subnet it continues searching looking for a supernet match, and eventually for a match on the default route.
Having established this background the difference in behavior is that when ip classless is disabled the routing decision will NOT forward to a supernet match in the routing table. With ip classless enabled the routing decision WILL forward to a supernet match. That is the basic difference in classful and classless routing.
This technot has a good discussion of ip classless. Perhaps it will be helpful to you.
"The routing table consists only of classful destination networks (major nets), metrics and respective gateways. No network masks are stored in the table because we are classful, that is, we use exclusively the route classes and all entries in the routing table are already classful. "
I havent read any RFC, so what I say is learn from the Cisco experience and courses.
The routing table contains only classful destinations for remote networks. Subnet masks and variable length subnet masks can be used locally.
"Now where am I wrong? Do I understand the classful routing properly as I described it? Is it correct to talk about routing in that era as classful although the netmasks were already in use? Or was it already the classless routing? "
Once again, netmasks can be used locally because this information is not passed in a routing update. SO they could've used subnetting locally in the 1980s.
If you find your question still not being answered, convert your questions to YES/NO question.
Most of the messages in this discussion have brought up the question of netmask and whether it is used or not and suggest that the difference between classful and classless may have to do with whether netmasks are used in the routing table. I believe that this approach is not helpful.
Netmasks have been used ever since IP networks began to subnet networks. That was long before we began to consider any difference between classful and classless routing.
Classful routing was earlier and classless routing was a later improvement. Classful routing is more simple, less sophisticated approach which is based on several assumptions which include among others these assumptions:
- if the network is subnetted, all subnets will be of the same size.
- summarization will always occur when advertising accross network boundaries.
- summarization will only occur when advertising accross network boundaries.
- if a router knows some subnets of a network, it will know ALL of the subnets of that network.
Classful routing made these assumptions and they made networking easier and more simple. But ultimately they became restrictive and classless routing evolved and changed the assumptions. So in classless routing subnets may be of different sizes (VLSM), summarization may or may not occur at network boundaries, summarization may occur within the network, there may be individual subnets which exist but that we do not see individually in the routing table. These assumptions give us a much more powerful, much more efficient approach to routing which does introduce some more complexity into the way that things work.
I realize that this discussion goes beyond the original specific question that Peter asked. But it puts the question of the classful vs classless decision of how to forward a packet into a larger context of the fundamental difference in approach of classful and classless routing.
First of all I would like to thank you all very much for your kind responses and interest.
As Rick correctly pointed out I have somehow connected the term 'classful' and 'classless' with the notion of using netmasks. I thought that using netmasks was the defining property of the classless routing.
I think I am slowly beginning to understand where I miss the point.
May I have some more questions? The term 'classful' references a 'class' that should be respected ('ful'). What is this class? Is it the common classification of the IP addresses into 5 groups? How does the class relate to the classful routing?
I understand that my questions are somewhat theoretical, maybe even academic (and probably stupid as well ;) but I am looking for the rationale behind these terms.
Thank you very much again.
The concepts of classful and classless are complex and have many aspects. Your original question was focused on the routing decision (how to forward a packet) and there are aspects of classful and classless involved in that. There are aspects of classful and classless in the routing protocols (why is RIP v1 a classful protocol, why is OSPF a classless protocol, what about protocols like RIP v2 and EIGRP which have aspects of both classful and classless?). Ultimately I believe it is not a binary choice of either classful or classless but of a position on a scale (how much classful behavior and how much classless behavior).
As I said in my previous post there are a set of assumptions embodied in classful networking and those assumptions are changed in the transition to classless networking. I believe it is easiest to see the differences in the two viewpoints in their treatment of subnetting (classful does use subnetting and insists that all subnets are the same size while classless gets into variable length subnetting) and their treatment of summarization (classful does automatic summarization (always) at network boundaries and summarizes to the classful boundary while classless makes summarization optional, allows summarization within the network, and allows summarization to less than (or more than) the classful network boundary).
If you want to find more information I would suggest that Jeff Doyle's book Routing TCP/IP vol 1 would be a good place to look.
There is a lot of good information on this forum in this particular topic. I just want to remind everyone on something very simple.
The one thing I try to remember is when we first started using IP we did not care to much about the mask because the most importatnt thing was the first 2 or 3 bits. (01, 10, 11) of the IP address which set up the classes (classful). When we started doing classless these did not matter anymore and masks became very important.
Now as to how routing protocols work I think all of you guru's have answered this very well.
Just a thought.