Classful Addressing/FLSM/VLSM/CIDR

Reading Time: 4 minutes

csm_ipadressen_620_c1ab63e736

Classful Addressing

This addressing strategy is the oldest one used back in the days. Nowadays, we don’t work with it but lecturers are still teaching it to help students understand and analyse the addressing strategies.

Main idea of classful addressing is dividing IPs by certain subnet masks and create classes from them. There are five classes extracted by classful addressing and each of them has their own usages and attributes.

Capture1111

This is an old addressing and there was a lot of wastage of IPs. The idea was, if you were a company that needed 200 IP addresses, a class C assignment would have been provided. If you were a company that needed 50,000 IP addresses, a class B would have been provided. And if you were one of the few companies that justified requiring over 65k~ IP addresses, you would be given a Class A.

Obviously, this lead to a lot of wasted IP addresses. If, for instance, you only needed 300 IP addresses, a Class C wouldn’t cut it, so you would end up with a Class B and nearly 60,000 IP addresses would be wasted.


Classless Inter Domain Routing/CIDR

With CIDR representation, slow growth of route tables and helping to slow IPv4 exhaustion are aimed.

Instead of using classful addressing(Remember those 5 classes) 255.0.0.0255.255.0.0 and 255.255.255.0 and being stuck on 5 classes, subnet masks can be broken up into any size network. /xx notation is added with this routing strategy for simplicity.

  • If you need 300 IPs? You get a /23.
  • If you need 500 IPs? You also get a /23.
  • If you need 1000 IPs? You get a /22.
  • If you need 70,000 IPs? You get a /15
  • If you need 250,000 IPs? You get a /14 (instead of a /8 that you would have gotten in the Classful world)

Fixed Length Subnet Mask/FLSM

Fixed Length Subnet Mask refers to a strategy where every one of your networks within your infrastructure was the same size. Whether you got a classful assignment or a classless assignment from your RIR1(IANA), you can deploy the IP addresses in a Fixed Length manner, meaning each subnet has to be same sized which we will be investigating soon.

For example, You are assigned by your RIR this /24: 200.2.2.0/24

You have one Router, with the following requirements of IP addresses and designation of addresses within your assignment:

  • Fa0/02– Needs 10 IP addresses – Assigned: 200.2.2.0/26
  • Fa0/1 – Needs 20 IP addresses – Assigned: 200.2.2.64/26
  • Fa0/2 – Needs 40 IP addresses – Assigned: 200.2.2.128/26
  • Fa0/3 – Needs 15 IP addresses – Assigned: 200.2.2.192/26

We need to allocate IPs for four different interfaces.The reason why we chose /26 as our masking, because we need 40 IP addresses to allocate and for the efficiency purpose we decided to define a range of 64 IPs so that minimum number of IPs are unused hence, wasted(24).

/26 notation means that the bits after 24th will be included in subnet mask, resulting 255.255.255.192. We can use remaining bits to allocate our IPs.

Screen Shot 2018-04-18 at 16.53.51

If you ask why don’t we use different subnet maskings for different interfaces, for example, we could choose /28(255.255.255.240) for Fa0/0 and only waste 6 IPs, we could again choose /27(255.255.255.224) for Fa0/1 and only waste 12 IPs instead of 24. Obviously, this could be a better solution. Although, in early routing protocols subnet bits were being saved on wires. Therefore, all subnets were assumed to be the same. It results as different subnet masks not being recognised by each other. Hence, we were stuck at using same subnet.


Variable Length Subnet Mask/VLSM

Now that we know FLSM is not efficient on IP allocation, plus we have IPv4 exhaustion, someone came with an idea.

In contrast to FLSM, VLSM is a subnet deployment strategy that allows all subnet masks to be variable sizes. As I said above that in FLSM we are not able to select different subnet masks(/26, /27 …) for different number of IPs in each interface, we are able to accomplish that with VLSM.

Let’s use the same example in FLSM.

You are assigned by your RIR this /24200.2.2.0/24

You have one Router, with the following requirements of IP addresses and designation of addresses within your assignment:

  • Fa0/1 – Needs 20 IP addresses – Assigned: 200.2.2.0/27
  • Fa0/3 – Needs 15 IP addresses – Assigned: 200.2.2.32/27
  • Fa0/2 – Needs 40 IP addresses – Assigned: 200.2.2.64/26
  • Fa0/0 – Needs 10 IP addresses – Assigned: 200.2.2.128/28

Assigning the minimum IPs blocks to each network you’ve only assigned out x.0 x.139, leaving you a remaining 116 IP addresses for expansion. Not perfect, but definitely much better than FLSM.


As For the IP Calculators

  1. regional Internet registry (RIR) is an organization that manages the allocation and registration of Internet number resources within a particular region of the world. Internet number resources include IP addresses and autonomous system (AS) numbers.
  2. Interface #1 – 0 Module Number/0 Port Number

Leave a Reply