Home > Articles > Cisco > CCNA Routing and Switching

IP Subnetting Basics

One of the topics that seem to be the hardest for those entering the networking field is the concept of subnetting and addressing. This article is intended as an addressing and subnetting primer and will initially review what the Internet Protocol (IP) address is and how it is structured; it will then go over a number of the main IP concepts that are commonly referenced in subnetting documentation and guides.
Like this article? We recommend

Like this article? We recommend

One of the topics that seem to be the hardest for those entering the networking field is the concept of subnetting and addressing. There are a number of different techniques that can be used to explain how to subnet, many are good and greatly depend on the aptitude of the learner and whether the technique used works for that specific learner. This article is intended as an addressing and subnetting primer and will initially review what the Internet Protocol (IP) address is and how it is structured; it will then go over a number of the main IP concepts that are commonly referenced in subnetting documentation and guides. As the audience for this article is a reader with no previous subnetting experience, more advanced subnetting examples and the binary math behind subnetting be covered in the companion article “Advanced IPv4 Subnet Concepts and Examples.”

What is an IP Address Used For?

Most individuals entering into the networking field have at least heard of IP and know that it can be assigned to an end device. The question that is often asked by these individuals is “what is an IP address used for and why is it needed?” The IP address, unlike other addresses that exist on an end device, is used to communicate with it over an IP network; this network can be local (like a corporate network), global (like the Internet) or can be a combination of both. From an end user perspective, the only thing that is required is an IP address that is able to be assigned to their device (or devices) that enables them to speak with the intended destination.

For most home users, this is a single address that is given by an Internet Service Provider (ISP) that enables the user to speak with any destination that also exists on the Internet. In a corporate environment, each corporate device is assigned an address that at least enables it to speak with the required internal corporate resources (and typically also enables some amount of Internet access). The address is 32 bits long and is notated using 4 different octets (groups of 8), for example 00000001.00000010.00000011.00000100 (binary) or 1.2.3.4 (decimal).

How are IP Addresses Split Up?

So why would an IP address range need to be split up? Think of it this way: if all IP addresses existed without being split into smaller ranges, it would be almost impossible to assign them logically to the many different entities that exist on the Internet. As the Internet is a global network, there are a number of different entities that exist and want to use it; for example: ISPs, corporations, governments, educational institutions and end users.

So why assign an address to these different entities? If an IP addressing space was randomly assigned it would be impossible to efficiently route traffic from source to destination. Let’s use the US Postal Service as an example; what if postal address assignment was random? What if there were three houses on a block: house #1 had address 38748923, house#2 had address 83639567 and house #3 had address 53845284? In this scenario, how would the post office route mail to these addresses? They would have to individually route every parcel based on a specific address; even the mail distribution points would need to reference very specific addressing tables to ensure proper routing. The same is true for IP addresses. If the space was not split up logically, the Internet routers would need to have a table entry for every single IP address; and keep in mind that with IP version 4 there are over 3 billion total addresses used on the Internet. Imagine for a minute the amount of investment that would be required for each of these connected routers to hold this large of a table, even modern high speed routers would not be able to process this size of table.

The initial solution to this problem was to split the IP address space into classes, these included:

  • Class A—All addresses within this range begin with a binary ‘0’ in the first octet which results in addresses from 0.0.0.0 through 127.255.255.255. With the class A address space, the other 7 bits of the first octet are used to separate the space into different networks (and were assigned to different organizations), this allowed for a total of 128 (27) class A ranges that were available. Each of these assigned ranges could use the other 24 bits of the address and use them to assign to network hosts; this provided up to 16,777,216 (224) host addresses.
  • Figure 1 Class A Range (/8)

  • Class B—All address within this range begin with a binary ‘10’ in the first octet, which results in addresses from 128.0.0.0 through 191.255.255.255. With the class B address space, the other 6 bits of the first octet and the whole second octet are used to separate the space into different networks; this allowed for a total of 16,384 (214) class B ranges that were available. Each of these assigned ranges could use the other 16 bits of the address and use them to assign to network hosts; this provided up to 65,636 (216) host addresses.
  • Figure 2 Class B Range (/16)

  • Class C—All addresses within this range begin with a binary ‘110’ in the first octet, which results in addresses from 192.0.0.0 through 223.255.255.255. With the class C address space, the other 5 bits of the first octet and the whole second and third octets are used to separate the space into different networks; this allowed for a total of 2,097,152 (221) class C ranges that were available. Each of these assigned ranges could use the other 8 bits of the address and use them to assign to network hosts, this provided up to 256 (28) host addresses.
  • Figure 3 Class C Range (/24)

  • Class D—All addresses with this range begin with a binary ‘1110’ in the first octet, which results in addresses from 224.0.0.0 through 239.255.255.255.0. Unlike the previous classes of addresses, the class D range is used for multicast and does not have network and host bits defined.
  • Figure 4 Class D Range

  • Class E—All addresses with this range begin with a binary ‘1111’ in the first octet which results in addresses from 240.0.0.0 through 255.255.255.255. This range is reserved and is not used for network or host assignment.
  • Figure 5 Class E Range

CIDR and VLSM

This solution worked fine when the size of the Internet was rather small. However, once the size of the networks started to grow and the number of organizations and devices increased, it became clear that using only this mechanism the number of addresses would be exhausted quickly. Two different solutions were developed, Classless Inter-Domain Routing (CIDR—RFC 1518, 1519) and Variable Length Subnet Masking (VLSM—RFC 950). The CIDR standard developed a method of combining multiple classful networks to limit the size of the Internet routing tables. CIDR notation included a ‘/’ with a number following it that indicated the number of grouped non-host bits also refer to as the network prefix. For example, a classful class A address uses a total of 8 bits that are reserved, including the initial ‘0’ and the 7 bits for the network, this is noted in CIDR as /8. A classful class B address uses a total of 16 bits and is notated as /16 and so on. CIDR is not limited to only notating on a classful boundary, it can notate at any boundary from 0 through 32.

The next thing to discuss is why this is important to Internet routers. As the number of A and B class addresses were depleted, it became obvious that many organizations would need to have multiple blocks of addresses. To maintain an efficient routing table it was easier to assign these blocks consecutively, for example 128.0.0.0/16 and 128.1.0.0/16. Without CIDR it was necessary for there to be two separate routing entries for these networks. When these networks are looked at in binary it can be seen that the difference between the network bits is a single digit as shown in Figure 6:

With CIDR, instead of being represented in the routing table as 128.0.0.0/16 and 128.1.0.0/16, it could be combined to be 128.0.0.0/15; this is what is referred to as a supernet.

VLSM was defined to provide the ability to divide classful networks into smaller pieces. Using the classful model, addresses would have to be assigned in 256, 65,636 and 16,777,216 sized blocks; this is not an efficient method of address assignment or network routing. Just imagine if all of the devices in a class A network had to listen to all of the traffic from each of the other 16,777,215 devices; the network would never function. VLSM provided the ability to separate an assigned address space based on the requirements of the specific situation. For example, if a large organization was assigned a class A network, they had the ability to separate that network (via VLSM) into smaller blocks that they would assign to different divisions, locations and departments. A much more detailed description of this process will be discussed in “Advanced IPv4 Subnet Concepts and Examples.”

Summary

The concept of subnetting scares many new people entering into the network world, especially those who have issues with math. Keep in mind that the concepts can be learned by anyone and just need to be properly understood to be a good networking engineer. Take the time to understand the basics before moving forward, once this is complete the more advanced ideas can be picked up quicker and will continue to become easier to learn.

vceplus-200-125    | boson-200-125    | training-cissp    | actualtests-cissp    | techexams-cissp    | gratisexams-300-075    | pearsonitcertification-210-260    | examsboost-210-260    | examsforall-210-260    | dumps4free-210-260    | reddit-210-260    | cisexams-352-001    | itexamfox-352-001    | passguaranteed-352-001    | passeasily-352-001    | freeccnastudyguide-200-120    | gocertify-200-120    | passcerty-200-120    | certifyguide-70-980    | dumpscollection-70-980    | examcollection-70-534    | cbtnuggets-210-065    | examfiles-400-051    | passitdump-400-051    | pearsonitcertification-70-462    | anderseide-70-347    | thomas-70-533    | research-1V0-605    | topix-102-400    | certdepot-EX200    | pearsonit-640-916    | itproguru-70-533    | reddit-100-105    | channel9-70-346    | anderseide-70-346    | theiia-IIA-CIA-PART3    | certificationHP-hp0-s41    | pearsonitcertification-640-916    | anderMicrosoft-70-534    | cathMicrosoft-70-462    | examcollection-cca-500    | techexams-gcih    | mslearn-70-346    | measureup-70-486    | pass4sure-hp0-s41    | iiba-640-916    | itsecurity-sscp    | cbtnuggets-300-320    | blogged-70-486    | pass4sure-IIA-CIA-PART1    | cbtnuggets-100-101    | developerhandbook-70-486    | lpicisco-101    | mylearn-1V0-605    | tomsitpro-cism    | gnosis-101    | channel9Mic-70-534    | ipass-IIA-CIA-PART1    | forcerts-70-417    | tests-sy0-401    | ipasstheciaexam-IIA-CIA-PART3    | mostcisco-300-135    | buildazure-70-533    | cloudera-cca-500    | pdf4cert-2v0-621    | f5cisco-101    | gocertify-1z0-062    | quora-640-916    | micrcosoft-70-480    | brain2pass-70-417    | examcompass-sy0-401    | global-EX200    | iassc-ICGB    | vceplus-300-115    | quizlet-810-403    | cbtnuggets-70-697    | educationOracle-1Z0-434    | channel9-70-534    | officialcerts-400-051    | examsboost-IIA-CIA-PART1    | networktut-300-135    | teststarter-300-206    | pluralsight-70-486    | coding-70-486    | freeccna-100-101    | digitaltut-300-101    | iiba-CBAP    | virtuallymikebrown-640-916    | isaca-cism    | whizlabs-pmp    | techexams-70-980    | ciscopress-300-115    | techtarget-cism    | pearsonitcertification-300-070    | testking-2v0-621    | isacaNew-cism    | simplilearn-pmi-rmp    | simplilearn-pmp    | educationOracle-1z0-809    | education-1z0-809    | teachertube-1Z0-434    | villanovau-CBAP    | quora-300-206    | certifyguide-300-208    | cbtnuggets-100-105    | flydumps-70-417    | gratisexams-1V0-605    | ituonline-1z0-062    | techexams-cas-002    | simplilearn-70-534    | pluralsight-70-697    | theiia-IIA-CIA-PART1    | itexamtips-400-051    | pearsonitcertification-EX200    | pluralsight-70-480    | learn-hp0-s42    | giac-gpen    | mindhub-102-400    | coursesmsu-CBAP    | examsforall-2v0-621    | developerhandbook-70-487    | root-EX200    | coderanch-1z0-809    | getfreedumps-1z0-062    | comptia-cas-002    | quora-1z0-809    | boson-300-135    | killtest-2v0-621    | learncia-IIA-CIA-PART3    | computer-gcih    | universitycloudera-cca-500    | itexamrun-70-410    | certificationHPv2-hp0-s41    | certskills-100-105    | skipitnow-70-417    | gocertify-sy0-401    | prep4sure-70-417    | simplilearn-cisa    |
http://www.pmsas.pr.gov.br/wp-content/    | http://www.pmsas.pr.gov.br/wp-content/    |