Our Leadership team is attending CloudFest 2026, from Mar 22 - April 8. Schedule a Connect

Our Leadership team is attending CloudFest 2026, from Mar 22 - April 8.

Discuss MSP growth, DevOps excellence, and Cloud Transformation. Available for 1:1 meetings, Schedule a Connect

  • DevOps
    Case Study

    How we helped a development company rebuild DevOps for efficiency and scale.

    READ CASESTUDY
    icon

    24/7 DevOps as a Service

    Round-the-clock DevOps for uninterrupted efficiency.

    icon

    Infrastructure as a Code

    Crafting infrastructure with ingenious code.

    icon

    CI/CD Pipeline

    Automated CI/CD pipeline for seamless deployments.

    icon

    DevSecOps

    Integrated security in continuous DevOps practices.

    icon

    Hire DevOps Engineers

    Level up your team with DevOps visionaries.

    icon

    Consulting Services

    Navigate success with expert DevOps consulting.

  • TechOps
    Case Study

    How a US hosting leader scaled with us!

    READ CASESTUDY

    WEB HOSTING SUPPORT

    icon

    HelpDesk Support

    Highly skilled 24/7 HelpDesk Support

    icon

    Product Support

    Boost your product support with our expertise.

    MANAGED SERVICES

    icon

    Server Management

    Don’t let server issues slow you down. Let us manage them for you.

    icon

    Server Monitoring

    Safeguard your server health with our comprehensive monitoring solutions.

    STAFF AUGMENTATION

    icon

    Hire an Admin

    Transform your business operations with our expert administrative support.

    icon

    Hire a Team

    Augment your workforce with highly skilled professionals from our diverse talent pool.

  • CloudOps
    Case Study

    How we helped a Private Deemed University in India, save US $3500/m on hosting charges!

    READ CASESTUDY
    icon

    AWS Well Architected Review

    Round-the-clock for uninterrupted efficiency

    icon

    Optimize

    Efficient CloudOps mastery for seamless cloud management

    icon

    Manage

    Automated CI/CD pipeline for seamless deployments

    icon

    Migrate

    Upgrade the journey, Migrate & Modernize seamlessly

    icon

    Modernize

    Simplify compliance complexities with our dedicated services

    icon

    FinOps as a Service

    FinOps as a Service

  • SecOps
    Case Study

    Enabling financial grade platforms through strategic cloud modernisation.

    READ CASESTUDY
    icon

    VAPT

    Vulnerability Assessment and Penetration Testing

    icon

    Source Code Review

    Ensuring source code security ans safe practices to reduce risks

    icon

    Security Consultation

    On demand services for improving server security

    icon

    System Hardening

    Reduced vulnerability and proactive protection

    icon

    Managed SoC

    Monitors and maintains system security. Quick response on incidents.

    icon

    Compliance as a Service

    Regulatory compliance, reduced risk

  • Insights
    Case Study

    How we helped a Private Deemed University in India, save US $3,500/m on hosting charges!

    READ CASESTUDY
    icon

    Blog

    Explore our latest articles and insights

    icon

    Case Studies

    Read about our client success stories

    icon

    Flipbook

    Explore our latest Flipbook

    icon

    Events

    Join us at upcoming events and conferences

    icon

    Webinars

    Watch our educational webinar series

  • Our Story
  • Contact Us

Interested to collaborate?

Get in touch with us!

Ready to elevate your business with certified cloud expertise? Contact us today to learn how our team can help you leverage cloud technology to drive growth, streamline operations, and enhance security.

  • AWSAWS
  • Azure CloudAzure Cloud
  • Google CloudGoogle Cloud
  • Akamai CloudAkamai Cloud
  • OVHOVH
  • Digital OceanDigital Ocean
  • HetznerHetzner
  • Managed Services Overview
  • Kubernetes Consulting
  • DevOps as a Service
  • Infrastructure Monitoring
  • Kubernetes Consultancy Services
  • K8s & Cloud native Solutions
  • 24/7 Infrastructure Monitoring
  • DevOps as a Service
  • Cloud CI/CD Solutions
  • White Labeled MSP Support
  • Our story
  • Life@SupportSages
  • Insights
  • Careers
  • Events
  • Services
  • Managed Services

aws partneraws advanced partner
LinkedInFacebookXInstagramYouTube
SupportSages

Copyright © 2008 – 2026 SupportSages Pvt Ltd. All Rights Reserved.
Privacy PolicyLegal TermsData ProtectionCookie Policy

IP’s – The backbone of Internet Part 3 – Subnetting and Classless Addressing

Jithin Vijayan

  • 6 min read
IP’s – The backbone of Internet Part 3 – Subnetting and Classless Addressing

Generating audio, please wait...

IP Subnetting

Increasing growth of Internet created a high demand for IPs and made the job of IP allocation a tougher one. To avoid this situation of requesting additional IP addresses was avoided by the introduction of IP subnetting. The IP subnetting was introduced so that the local network will be more adaptable to changes when a new physical media is installed, when it has to be split into two or more networks. Say for example in an office if they needs a seperate network for the administrative purpose and which should not get interfered with the office purpose ones. But the main purpose of IP subnetting is to reduce the heavy traffic loads. Security can also be increased with subnetting by preventing access to a particular network from others. Basically it allows a single shared network to connect to the internet so that the organisation will have multiple connections without having any extra IP address space.

Though job of IP subnetting is done locally it still appears as one IP network for outside world. As said the subnetting is done locally, the part which is used for subnetting is the host part. It divides the host part again into subnetid and hosts which makes the IP format like

<Network part><subnet id><host part>

Process of subnetting a network

Subnetting a network in simple words is representing network bits by 1s and host bits by 0s. As mentioned earlier we divide host bits for subnetting so we are reducing the host ID for the subnet ID. Class A have 24 bits to split, Class B has 16 and Class C have only 8. Let’s take a Class B IP for instance.

172.16.5.1 here (172.16) is the network part and (5.1) represents host. IP’s are subnetted bitwise, one bit subnetting will have 1 bit for subnet id and rest 15 for host part. Let me explain this in figures

1 bit subnet – <1 subnet id > <15 host ids>

2 bit subnet – <2 subnet id > <14 host ids>

3 bit subnet – <3 subnet id > <13 host ids>

and so on. Here if we take 5 bit subnetting for this IP, subnetting will be done in

172.16.5.1 bitwise representation 10101100.00010000.00000101.00000001

subnetting 5 bits     –       10101100.00010000.00000|101.00000001

The number of sub-networks created will be equal to (2^n) where n is the number of bits borrowed to network portion. Here it is 5 so

2^5 = 32

Number of hosts per subnet is calculated by formula (2^n)-2 where n is the number in host bits.  (2 subtracted is for, one is the network id which is the first IP in the network and last one will be the broadcast ip). i.e All 1’s and all 0’s are not permitted for subnets.

(2^11)-2 =2046

A bit mask, known as the subnet mask, is used to identify which bits of the

original host address field indicate the subnet number. The number is calculated by representing the network part with ones and the rest with zeroes. The subnet mask for the above IP will be

10101100.00010000.00000|101.00000001

1-21 bits are the network part they will be represented in ones and rest 22-32 in zeroes

11111111.11111111.11111000.00000000

Decimal notation will be  255.255.248.0

255.255.248.0 is the subnet mask of the the subnetting we done for the IP 172.16.5.1.

The above case is just an example as subnetting is done for a required number of hosts per subnets.

We can calculate the network id by performing a bitwise logical AND operation between the IP address and the subnet mask, then setting all the host bits to 0s. Similarly, the Broadcast Address for a subnet by performing the same logical AND between the IP address and the subnet mask, then setting all the host bits to 1s.

11111111.11111111.11111000.00000000 –

10101100.00010000.00000101.00000001

——————————————————-

10101100.00010000.00000000.00000000

10101100.00010000.00011111.11111111

Decimal notation – 172.16.0.0 will be the network id and 172.16.31.255 will be the broadcast address.

Variable Subnetting

The above subnetting done is an example of static subnetting but there are some setbacks when the subnets are divided statically. Consider a corporation where a Class C network IP 165.214.32.0 is assigned and they have a requirement to split this into 5 separate networks. And let each network has a prerequisite of

Subnet 1 : 50 hosts

Subnet 2: 50 hosts

Subnet 3: 40 hosts

Subnet 4: 30 hosts

Subnet 5: 20 hosts

The above cannot be achieved with the subnetting which we done earlier. Static subnetting can divide network into four subnets each with 64 hosts or eight subnets each with 32 hosts. This doesn’t meet our prerequisite. Here the entire network cannot have same subnet mask . To avoid such situations we divide the network into different subnets according to the requirement. For the above it can be done

The first three subnets can be divided with a mask of 255.255.255.192 the network can be divided into four subnets each with 64 hosts. The last two can be divided into two subnets each with 32 hosts by using a mask of 255.255.255.224 . This satisfies the requirement also by eliminating the possibility of high number of wasted host addresses.

Classless Addressing: Classless Inter-Domain Routing

It is a methodology of allocating IP addresses and routing Internet Protocol packets. This method was introduced to keep Internet from running out of IP addresses. Though the concept of subnetting addressed a major difficulties in classful addressing they couldn’t tackle the problem in general terms. Anyone having a requirement of more than a 254 host addresses were given Class B address block which have 65534 host addresses. This is really unacceptable at this point of time where the requirement of Ips are on a high. The method of classless addressing was introduced to avoid the crisis.

Each CIDR routing table entry contains a 32-bit IP address and a 32-bit network mask, which together give the length and value of the IP prefix. This is represented as <IP_address network_mask>. For example, to address a block of eight Class C addresses with one single routing table entry, the following representation suffices: <192.32.136.0 255.255.248.0>.

i.e Class C network range from 192.32.136.0 to 192.32.143.0 is represented as one single network.

11000000 00100000 10001000 00000000 = 192.32.136.0 (Class C address)

11111111 11111111 11111— ——– = 255.255.248.0 (network mask)

===================================== logical_AND

11000000 00100000 10001— ——– = 192.32.136 (IP prefix)

11000000 00100000 10001111 00000000 = 192.32.143.0 (Class C address)

11111111 11111111 11111— ——– = 255.255.248.0 (network mask)

===================================== logical_AND

11000000 00100000 10001— ——– = 192.32.136 (same IP prefix)

The process of combining multiple entries into a single network is known as supernetting.

The above IP is also represented in another notation 192.32.136.0/21 where 21 means network has 21 bits for network id and 11 bits for host id. Perhaps this is the widely used notation better known as CIDR notation. The following figure will explain this better.

  • General
  • Linux
  • Training
IP’s – The backbone of Internet Part 3 – Subnetting and Classless Addressing

Adjusting the language settings in spamassassin

SupportSages Logo
  • cPanel
  • Howtos
  • Linux
  • Snippets
logo

Error in Drupal while enabling clean URL

SupportSages Logo
  • General
  • Howtos
  • Linux
logo

How would I checkout a particular version from SVN

SupportSages Logo
  • Howtos
  • Snippets
  • Troubleshooting
logo

IP’s – The backbone of Internet Part 1 – OSI Layer

IP’s – The backbone of Internet Part 1 – OSI Layer
  • General
  • Linux
  • Special Offers
  • Training
logo

Posts by Jithin Vijayan

One of the most inquisitive person you may come across in your life :-). His enthusiasm to unearth the existing technologies and excellent comprehension skills makes him one of the most dependable admin during critical situations. Jithin loves trekking and photography.