03-15-2015 11:17 AM - edited 03-07-2019 11:05 PM
Hi all,
It was all good while i am reading Classful IP and Subnetting in which host bits are borrowed to create further subnets until I chance upon the CIDR/VLSM topic.
Over here, I saw this diagram below whereby a Class C IP (192.168.1.x) is having a subnet mask/CIDR of less then what a Class C network should be.
This led me to think that -- Okay, this is the reason why CIDR is call Classless and lead me to think of the network ID and available hosts in this 192.168.1.x network.
So 192.168.1.x with a subnet of 255.255.128.0 will have a network ID of 192.168.0.0 and 2^15-2 hosts addresses = 32766 hosts IPs.
=======================================================================================================
But somehow I am still confuse on when will Classful network/subnetting be use and when will CIDR/VLSM be use ?
What if somehow the whole internet industry uses a mixture of both ?
E.g. Company A - Computer A uses Classful network and normal subnetting
Host IP = 222.222.222.222/24
Subnet Mask = 255.255.255.0 (Class C)
Network ID = 222.222.222.0
Available IPs = 222.222.222.1 to 222.222.222.254
Company B - Computer B uses CIDR/VLSM
Host IP = 222.222.221.111/22
Subnet Mask = 255.255.252.0
Network ID = 222.222.220.0
Available IPs = 222.222.220.1 - 222.222.223.254
In that case, when Computer B wanted to send to Computer A, wouldn't it thought that Computer A is in the same network as it is, since 222.222.222.222 (Computer A), is part of the available IPs in Company B network (222.222.220.1 to 222.222.223.254) ?
=================================================================================================
How does 1 control the IPs allocated to the different companies around in the whole internet world ? Wouldn't this cause any routing confusion and repeated networks all around ?
Maybe my concept is wrong ... , hope some Gurus here can share some advices
Thanks
Regards,
Noob
Solved! Go to Solution.
03-15-2015 11:33 AM
Companies generally don't use public IP addressing for their private networks so your example my not be the best.
In terms of public IPs yes there are registries which are responsible for allocating them eg. ARIN in the USA and Canada, RIPE for Europe, Russia, the Middle East etc. If you want to see who is responsible for which country go here -
https://www.arin.net/knowledge/rirs/countries.html
The registries then allocate public blocks to ISPs in their region (and in the past to some companies if they were large enough) and the ISPs then allocate them to customers.
So you can't have the same public IP block being used by different companies.
You can however have the same private IPs within companies and often do. And so when they want to communicate with other companies or the internet for example, their private IPs are translated to their public IPs using NAT.
Obviously there are usually within a company a lot more private IPs in use than they have public IPs but it still works because you can translate many private IPs to the same public IP for general internet access.
Jon
03-15-2015 04:37 PM
Hi,
In addition to Jon's reply (he's one of the greatest gurus around here!), let me add a few words as well.
But somehow I am still confuse on when will Classful network/subnetting be use and when will CIDR/VLSM be use ?
What if somehow the whole internet industry uses a mixture of both ?
You have to keep in mind what the classful really means. It in fact applies to several concepts in networks, namely: classful addressing, classful routing protocols, and classful routing behavior.
Classful addressing was about two very specific things: First, whenever you asked your ISP or an internet registry for an IP address space of a certain size, it would assign you an entire network of the size of 16,777,216 (class A), 65,536 (class B), or 256 (class C) addresses to accomodate your needs, and it would always be allocated from the corresponding range (class A was in 0.0.0.0 - 127.255.255.255, class B was in 128.0.0.0 - 191.255.255.255, class C was in 192.0.0.0 - 223.255.255.255). There was absolutely no way for an internet registry to assign you any other contiguous network size - like, say, 128, 512, 2048 or 32768 addresses. The network sizes of 2^24, 2^16 or 2^8 were the only options because as soon as you had an IP address on hand, you immediately knew what class it was and so what was its size. Second, if you took this allocated network and you started subnetting it inside your own network, you were expected to split it into subnets of identical size, that is, use the same network mask for all subnets.
Nowadays, we're not using this addressing system at all. Internet registries disregard address classes entirely and instead, whenever they assign IP addresses (if there are any left yet), they simply do it from whatever free space they have and in sizes that best fit your intended network size (in powers of two, obviously).
Classful routing protocols relied on classful addressing in two aspects: Inside the same major network (that is a fancy name for the entire network of a particular class you would be assigned from an internet registry), they knew you would be using same-sized subnets, so they did not bother advertising netmasks along with subnet addresses. Why? Because the subnet mask was identical on all interfaces within the same major network, so they just "borrowed" it. And if routes were exchanged over an interface that was from a different major network than the routes themselves, the routers would automatically summarize them - replace all subnets with their corresponding major network, and derive the netmask from the class of this major network. Again, why? Because you were the sole owner of the entire network, no one else could ever have even the tiniest subnet from your entire space, so whenever you advertised your networks to someone else, it was completely sufficient to simply advertise just the major network you owned yourself - because either the addresses falling into that network truly existed in your network, or they did not exist anywhere at all.
Again, we do not use such protocols (RIPv1, IGRP) anymore. All today's routing protocols are classless, meaning that they do not make any assumptions about classes and netmasks (not) being identical. Instead, they simply advertise each network together with its netmask and all ambiguosity is thereby removed.
I won't describe the classful routing behavior here as it is not that much relevant to your original question.
Nonetheless, this all was to highlight the fact that today, the classful principles are simply a matter of days long past, not relevant and not used anymore. The mixture you are concerned with simply does not exist.
Best regards,
Peter
03-15-2015 11:33 AM
Companies generally don't use public IP addressing for their private networks so your example my not be the best.
In terms of public IPs yes there are registries which are responsible for allocating them eg. ARIN in the USA and Canada, RIPE for Europe, Russia, the Middle East etc. If you want to see who is responsible for which country go here -
https://www.arin.net/knowledge/rirs/countries.html
The registries then allocate public blocks to ISPs in their region (and in the past to some companies if they were large enough) and the ISPs then allocate them to customers.
So you can't have the same public IP block being used by different companies.
You can however have the same private IPs within companies and often do. And so when they want to communicate with other companies or the internet for example, their private IPs are translated to their public IPs using NAT.
Obviously there are usually within a company a lot more private IPs in use than they have public IPs but it still works because you can translate many private IPs to the same public IP for general internet access.
Jon
03-16-2015 10:52 AM
Dear all,
Thanks for the wonderful insights.
Hi Peter,
Thanks for explaining in details, I am still not very sure on the classful routing protocol portion, but I will read up more and find out.
Regards,
Noob
03-15-2015 04:37 PM
Hi,
In addition to Jon's reply (he's one of the greatest gurus around here!), let me add a few words as well.
But somehow I am still confuse on when will Classful network/subnetting be use and when will CIDR/VLSM be use ?
What if somehow the whole internet industry uses a mixture of both ?
You have to keep in mind what the classful really means. It in fact applies to several concepts in networks, namely: classful addressing, classful routing protocols, and classful routing behavior.
Classful addressing was about two very specific things: First, whenever you asked your ISP or an internet registry for an IP address space of a certain size, it would assign you an entire network of the size of 16,777,216 (class A), 65,536 (class B), or 256 (class C) addresses to accomodate your needs, and it would always be allocated from the corresponding range (class A was in 0.0.0.0 - 127.255.255.255, class B was in 128.0.0.0 - 191.255.255.255, class C was in 192.0.0.0 - 223.255.255.255). There was absolutely no way for an internet registry to assign you any other contiguous network size - like, say, 128, 512, 2048 or 32768 addresses. The network sizes of 2^24, 2^16 or 2^8 were the only options because as soon as you had an IP address on hand, you immediately knew what class it was and so what was its size. Second, if you took this allocated network and you started subnetting it inside your own network, you were expected to split it into subnets of identical size, that is, use the same network mask for all subnets.
Nowadays, we're not using this addressing system at all. Internet registries disregard address classes entirely and instead, whenever they assign IP addresses (if there are any left yet), they simply do it from whatever free space they have and in sizes that best fit your intended network size (in powers of two, obviously).
Classful routing protocols relied on classful addressing in two aspects: Inside the same major network (that is a fancy name for the entire network of a particular class you would be assigned from an internet registry), they knew you would be using same-sized subnets, so they did not bother advertising netmasks along with subnet addresses. Why? Because the subnet mask was identical on all interfaces within the same major network, so they just "borrowed" it. And if routes were exchanged over an interface that was from a different major network than the routes themselves, the routers would automatically summarize them - replace all subnets with their corresponding major network, and derive the netmask from the class of this major network. Again, why? Because you were the sole owner of the entire network, no one else could ever have even the tiniest subnet from your entire space, so whenever you advertised your networks to someone else, it was completely sufficient to simply advertise just the major network you owned yourself - because either the addresses falling into that network truly existed in your network, or they did not exist anywhere at all.
Again, we do not use such protocols (RIPv1, IGRP) anymore. All today's routing protocols are classless, meaning that they do not make any assumptions about classes and netmasks (not) being identical. Instead, they simply advertise each network together with its netmask and all ambiguosity is thereby removed.
I won't describe the classful routing behavior here as it is not that much relevant to your original question.
Nonetheless, this all was to highlight the fact that today, the classful principles are simply a matter of days long past, not relevant and not used anymore. The mixture you are concerned with simply does not exist.
Best regards,
Peter
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