ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

Step-by-Step tutorial by expert to understand IP adressing and subnetting (CCNA context) Part-II(Subnetting)

Updated on November 5, 2008

Topic: Subnetting a network An step-by-step tutorial with examples for IP addressing and sub-netting.


To divide a large network into smaller sub-networks, we have to simply turn some of the host bits on in the subnet mask, thus increasing the number of sub-networks and decreasing the number of hosts per sub-networks. Here we are dividing a class C network into 2 smaller sub-networks by turning two host bits on in the subnet mask. It means now we are having 26 bits reserved for the network addressing and only 6 bits remaining for the host addressing. The formula to get the number of subnets is:

No. of subnets is equal to 2^n-2, where "n" is the number of bits taken from host. So here in our case we have taken 2 bits from the host, thus we get total of two subnets. In fact we get total of four subnets, but according to RFC which stands for Request For Comment and is the documentation of TCP/IP, we cannot use the first subnet because all the subnet bits are turned "off" in the first subnet and we cannot use the last subnet, because all the subnet bits are turned "on" at the same time, however Cisco routers does allow 1st subnet to be used by issuing an IOS command "ip subnet zero". Here just remember that the subnet bits refer to the number of bits taken from the host. So we have to subtract all subnet bits on and all subnet bits off. Practically we can use all the subnets, but from CCNA exam point of view we cannot use 1st and last subnet.

Now the No. of hosts per subnet is equal to 2^r -2, where "r" is the number of bits remaining for the host. So 2^r-2 is equal to 2^6-2 is equal to 62. So we get total of two subnets with 62 hosts per subnet. ==================================================

After getting the number of subnets and hosts per subnet, we have to find the valid host range in each subnet and network and broadcast address for each subnet. To get all these information, we have to get a block size. We get block size by subtracting decimal value of the subnet bits from the maximum value of the octet, that is 2^8 is equal to 256. So here Block size is equal to 256 - 192 = 64. In this case, 192 is the decimal value of the two subnet bits turned on. Once we get a block size, that block size becomes the network address of the first valid subnet. Add block size to the first valid subnet and it gives you the network address of the second subnet. Keep on adding the block size to next subnet until the value reaches to equal to all subnet bits turned "on", which is 192 in our case. So we cannot use this last subnet. So we got two valid subnets, i.e., subnet 64 and subnet 128. The valid IP range for the subnet 64 is from to The network address for this subnet is and broadcast address is We cannot assign these network and broadcast addresses to the system. The valid IP range for the subnet 128 is from to The network address for this subnet is and the broadcast address is =====================================================

First of all let us write the subnet mask. Since it is class C address, the default subnet mask length is 24 bits. And we have taken 3 bits extra from the host portion. Now we have total of 27 bits for network addressing. If you remember earlier lessons, you will be able to calculate that up-to 24 bits continuous "on" in subnet mask will be represented as, but we have taken 3 bits extra from the fourth octet. So the decimal value of the three bits from the left will be 224. Hence new subnet mask for the network will be It's important to remember that all the subnets will have the same subnet mask. Now let us calculate the number of subnets. Here the number of subnets =2^n-2 = 2^3-2 = 6. So we got six smaller networks or subnets out of dividing a single class C network. Now let us calculate the number of hosts per subnet. ==================================================

The number of hosts per subnet = 2^r-2 = 2^5-2 = 30. So we divided one big network into six smaller sub networks with 30 hosts each. Next let us calculate the block size. Block size = 256 - 224 =32. Here 224 is the decimal value of the subnet bits i.e., the number of bits we have taken from the host. Now start from the block size and keep on adding itself to next block till it reaches to maximum i.e., 224 which we cannot use. So we got the blocks of 32, 64, 96, 128, 160 and 192. The valid IP address in first subnet starts from to, the network address for this subnet 32 is and the broadcast address The valid IP addresses in subnet 64 starts from to, the network address for this subnet is and the broadcast address is The valid IP addresses in subnet 96 starts from to, the network address for this subnet is and the broadcast address is The valid IP addresses in subnet 128 starts from to, the network address for this subnet is and the broadcast address is The valid IP addresses for the subnet 160 are from to, the network address is and the broadcast address is The valid IP addresses for the subnet 192 starts from to, the network address for this subnet is and the broadcast address is ==================================================

Now you can see that we have divided single class c network into six sub-networks. And we are using five subnets out of six on different interfaces of the router. Every sub net is having the same subnet mask that is /27. If you remember earlier IP address assignment, we were losing almost 1212 IP addresses out of 1270. Now after sub-netting, we are saving almost 4*254=1016+30= 1046 IP addresses. Well that's really a huge saving.

Definitely we are able to save lot of IP addresses in the example but you can observe that we are still losing a lot of IP addresses. We know that on the network-1 and network-2 side, we may use all the IP addresses in the subnet, but what about router to router interfaces..? We are never going to use more than two IP address on the point to point serial link between two routers. So if our sub-networks are having 30 hosts each, we are utilizing only two IP addresses per subnet out of 30. Again we are losing almost 28 IP addresses per router to router interfaces. To save IP addresses which are being wasted this way, we use a concept called VLSM or classless routing. VLSM stands for Variable Length Subnet Mask. In classless routing we assign variable length subnet mask to different interfaces of the routers. The contrary of the classless routing is class full routing where every interface of the routers are having same subnet mask. By using classless routing we use different subnet mask for the router to router interfaces and some other subnet mask for the hosts side. ====================================================

Now you can see that we are using different subnet mask for the router to router interfaces and router to host interfaces. For router to router interfaces we are using slash 30 subnet masks, which provides only two IP addresses per subnet while the router to hosts side we are using slash 27 which is providing 30 hosts per subnet.

Now let us subnet a class B network.


We have a requirement of total of 13 subnets with minimum of 4000 hosts per subnet. We are using the class B network How many bits should we take from host portion to fulfill the above requirements? If we take two bits, we will be getting 2^2-2= 2 subnets. But we need 13 subnets. So if we take 5 bits then we will get 2^5-2=30 subnets. Great we are getting more than what we needed. But what about hosts. Just let us calculate. Since it is a class B network, the total number of host bits is 16, out of which we have taken 5 bits for sub-netting. So the number of hosts per subnet will be 2^11-2=2046. But we require at least 4000 hosts per subnet. So let us try once again. If we take 4 bits from hosts then? Let's calculate. ===================================================

If we take four bits from host portion, then total number of network bits becomes 20. The new subnet mask for each subnet will be Number of subnets = 14 and number of hosts/subnet we get 4094. Exactly what we needed. So four bits extra solves our problem. One more important thing you should know that the representation of network addresses like is referred as CIDR notation. CIDR stands for classless inter-domain routing.

Now we are going to discuss another important term related to IP addressing, "Super-netting". You will be wondering what is this new term? Very simple, remember what is sub netting? Division of one large network into multiple smaller sub-networks. And super-netting? Grouping multiple networks into larger super networks. Confused. We discussed that sub-netting is done to save the IP addresses, so super-netting is contrary to that, it will waste IP addresses, if use on client side. So why do we need super-netting? Well it is used by ISP's for route summarization. We do route summarization to bring down the number of routing table entry in the internet routers. As you should know that internet routers must have every network route entry into its routing table, in order to route packets to every possible destination. Routers simply drop packets if they don't find the destination network in the routing table. So internet routers will have to maintain routing table entry of every possible network around the world in order to provide connectivity from anywhere around the world to any site. This will lead to hundreds of thousands of routing table entry. The result of so many routing table entry will be slowed down routing performance, since routers will have to read through the very long list of routing table to find out the destination network before it can forward the data packets on outbound interface. Hence to reduce the number of routing table entry the ISP's gets assigned a large pool of IP addresses as super-nets. ===================================================

Here you can see in the illustration, a large ISP has got super-net assigned. The large ISP is assigning small networks within the super-net to small ISP's. The small ISP's are further dividing the networks into sub-nets and then assigning to the customers. Important thing to notice here is that all the networks including sub-nets under the large ISP is represented as single super-net to the internet. When ever any data packets arrive to the internet router for any small ISP's customers, the internet router will simply send to the Large ISP. Internet routers will have to remember only large ISP's network and not every network under the large ISP; hence super-netting effectively solves the problem of large number of routing table entry into the internet routers. Representation of large number of networks as single super-net into the internet routers routing table is referred as route summarization, and the representation of super-nets in the form of is referred as CIDR notation. CIDR stands for class less inter domain routing. So we learnt how super-netting brings down the number of routing table entry into the internet routers. Now we will learn how to create super-nets. ===================================================

Remember, for sub-netting, we take bits from host, but for super-netting we give bits to hosts. Just see the figures. We had a class C network but we removed two bits from the network portion and added to host. Here removing means turning the network bits off. If you examine the figures closely, you will find that each super-net here is a combination of four class C networks. The first super-net is ranging from -, which includes network, network, network, and The same way every super-net out here consists of four class C networks with 1022 hosts per supernet.

For IP addressing, please select IP addressing and subnetting part-I

Comments: Was the post useful? Dou you expect me to write post on specific topic?

    0 of 8192 characters used
    Post Comment
    • profile image


      5 years ago

      can you help me plz

    • profile image


      6 years ago -IP -subnet mask.pls calculate subnet for 15 network

    • profile image


      6 years ago

      in need of some real help here. I have an assignment that i don't understand with subnetting. Im required to find these particluar subnet ranges and there broadcast addresses 18. subnetted to 11280 subnets and provide information for subnets #1, #6811, #10229, and #11280.. I understand how to subnet but cant figure how to get the really high numbered subnets... any assistance would be greatly appreciated.

    • profile image

      abay ja 

      6 years ago

      # of subnet = 2^n-2


      # of subnet = 2^n

    • profile image


      6 years ago

      So no of subnets = 2^2-2 = 2

      anything to the power zero is one. . . how it is 2

    • profile image


      6 years ago

      Nice dear

    • profile image

      dzahieda ismail 

      7 years ago

      A customer has called the ISP to design a network upgrade for an organization. The existing customer network supports two (2) subnets of up to 20 clients each and allows for growth to five subnets in the future. Use the determine :

      a. Based on the customer requirements, how many hosts must each subnet support?

      b. How many subnets must there be to allow for future growth?

      c. What is the new subnet mask in dotted decimal notation ?

      d. New subnet mask in slash notation

      e. Table of subnetting :

      f. Range of valid IP Address for first subnet?

      g. Network id for third subnets?

      h. Broadcast IP Address for subnet number 2?

      i. What is the total number of networks with this scheme?

      j. What is the total number of hosts for each network?

      k. How many IP Address that valid to use?

    • profile image


      7 years ago


      First IP Add-Last IP Add Subnet Mask

      Subnet1: 25/

      Subnet2: 26/

      Subnet3: 27/

      Subnet4: 28/

      Subnet5: 30/


      Anyone please correct if I'm wrong.

    • profile image


      7 years ago

      If I have a network address , and I have 5 Groups i wanna to find the subnetmask , ip address, and the range of ip address for each one, the groups are :

      S1: 95 users

      S2: 50 users

      S3: 28 users

      S4: 9 users

      and S5: 2 users, plz i need to know the answer.

      with my great thank.

    • profile image


      7 years ago

      veryyyyyyyyyyyyyyy gooooooooooood subnet explanation..thanku so much

    • profile image


      7 years ago

      thanks for the informative material which made a lot many concepts clear to me.

    • Fi Whitchelo profile image

      Fi Whitchelo 

      7 years ago from Glasgow, United Kingdom

      There are no words to describe how much this has helped :-)

    • profile image 

      7 years ago

      The Answer shown by the calculator is correct.

      For we leave last three bits in the fourth octet for host portion.

      Hence the incremental value will be 8. (Hope everbody knw how to calculate the incremental value)

      new subnet mask for /29 will be

      so last subnet in this network is

      last but one subnet is which is a network ip is valid host ip, the given ip is the broadcast ip of that netwok.

      Please reply to my mail if there is any mistake in this calculation.

      by paranthaman,

    • profile image


      7 years ago

      can you help me plz...

      my exam Q?

      if a company has address is ""

      and the company has 20 sections each has subnetwork.

      1)what is mask address in dotted decimal and slash notations?

    • profile image


      8 years ago

      Hi everyone,

      Can anyone find the network id of ip address. I've got network id but in calculator id is

      plz elaborate the solution how it comes.

      my techniques

      32-29 = 3

      So we jump in 2***.5 or .32

      239/32 = 7

      7 * 32 = 224

      Network = to

    • profile image


      8 years ago

      is dere any other easy way to understand?

    • profile image

      s adas d 

      8 years ago

      sad asdasd as das das

    • profile image


      8 years ago


    • profile image


      8 years ago

      yes, it is really very informative

    • profile image

      Manoj Prabakar 

      8 years ago

      good explanation.........

    • profile image

      Azfar Ahmad 

      8 years ago

      It's very nice. A simple steps has been given by u for students who don't know how to do subnetting. Thanks a lot............................!!!

    • profile image

      nirajan parajuli 

      9 years ago

      like very good it s information .

    • profile image


      9 years ago


    • profile image


      9 years ago

      Simple, clear, precise and direct to the point! Can't ask for more, its really informative! Thanks alot!

    • profile image

      Arjohn Garcia Poquiz 

      9 years ago

      Very good site...! very interesting...! the easy way...!

    • profile image


      9 years ago

      i wanna know more on yhis

    • profile image


      9 years ago

      Thank you very much,Got the idea very clearly

    • profile image


      10 years ago

      Nice one man..very nice tut!

    • profile image

      Boriboon Deeka 

      10 years ago

      Very Best, I need Part III

    • bskvsdm profile image


      11 years ago from Bangalore

      i found this article as is very simple and clear.....Even a layman can

      understand easily......good article...

    • profile image


      11 years ago

      I always had few doubts regarding subnetting.After reading this article I have found the answer to all my doubts. It's a nice article

    • profile image

      Subodh Gupta 

      11 years ago

      yes, it is really very informative and cleared my few doubts as well.

    • profile image

      Yogesh R 

      11 years ago

      Thanks for sharing subnetting...really very helpful and informative.


    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at:

    Show Details
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the or domains, for performance and efficiency reasons. (Privacy Policy)
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)
    ClickscoThis is a data management platform studying reader behavior (Privacy Policy)