subnetting tutorial – Expert Network Consultant https://www.expertnetworkconsultant.com Networking | Cloud | DevOps | IaC Fri, 12 Feb 2021 12:58:49 +0000 en-GB hourly 1 https://wordpress.org/?v=6.3.5 How to Calculate Subnet Mask from IP Address Step by Step https://www.expertnetworkconsultant.com/expert-approach-in-successfully-networking-devices/how-to-calculate-subnet-mask-from-ip-address-step-by-step/ Wed, 06 May 2020 20:46:30 +0000 http://www.expertnetworkconsultant.com/?p=3742 Continue readingHow to Calculate Subnet Mask from IP Address Step by Step]]> In as much as there are a great number of articles on the subject of subnetting, I have also taken a bold step in creating a step by step guide “How to Calculate Subnet Mask from IP Address Step by Step” to bring you the understanding I have gained in the real world where subnetting is concerned.





Have you been faced with a task laced with many prefixes you find intimidating? Well, you are in the right place at the right time to improve your understanding of subnetting once and for all.

You can read more on the subject broadly from Cisco’s website here.

Step by step guide to IP Subnetting Video

Below is a simple 6 step by step method I use to perform subnetting calculations.

Let us look at this question below;

1: You have been given an IP Address 10.20.4.13/29 and been asked to find out the following pieces;

  1. Subnet Address
  2. First Valid Host Address
  3. Last Valid Host Address
  4. Broadcast Address
  5. Subnet Mask

How to Calculate Subnet Mask from IP Address Step by Step

Step 1: Find Subnet Number
Subtract Prefix Number from /32
32-29=3

Calculate Subnet Mask
8 Bits – 3 Bits = 5 Bits(Network Bits Turned On)

You might be asking why 8 Bits, 8 Bits are required for each octet.

128 64 32 16 8 4 2 1
1 1 1 1 1 0 0 0
128 + 64 + 32 + 16 + 8 = 248

Subnet Mask = 255.255.255.248

Step 2: Find Subnet Size
Raise 2 to the power of deduction (8-3 =5 Bits). Let’s call the bits n!
2**n = Subnet Size
2**5 = Subnet Sizes for each subnet.
2*2*2 = 8

Note: 8 is the block size for the subnet so for example, the increments will now be 0 8 16 32 40 and so on!

Step 3: Find Broadcast Address
Subnet Size – 1
(2**n) – 1 = Broadcast Address
(2**3) – 1 = (8-1) = 7

Step 4: Locate IP Address Subnet
Identify Subnet Block for IP Address:
Where in each increment is the address 10.20.4.13/29 located 0 8 16 32 40?

13 falls between 8 and 16 and therefore the address is in the valid host range of the subnet 10.20.4.8/29

Step 5: Calculate Valid Hosts | How to calculate number of hosts in the subnet
2**n – 2 = Valid Host Range
2**3 – 2 = (8-2) = 6

Answer for question now is as follows;

Subnet Address: 10.20.4.8/29
Min Host Address: 10.20.4.9/29
Max Host Address: 10.20.4.14/29
Broadcast Address: 10.20.4.15/29

There you have it. A simple 6 step by step guide to subnetting effectively.

Variable Length Subnets Mask Table

Prefix size Network mask Usable hosts per subnet
/1 128.0.0.0 2,147,483,646
/2 192.0.0.0 1,073,741,822
/3 224.0.0.0 536,870,910
/4 240.0.0.0 268,435,454
/5 248.0.0.0 134,217,726
/6 252.0.0.0 67,108,862
/7 254.0.0.0 33,554,430
Class A
/8 255.0.0.0 16,777,214
/9 255.128.0.0 8,388,606
/10 255.192.0.0 4,194,302
/11 255.224.0.0 2,097,150
/12 255.240.0.0 1,048,574
/13 255.248.0.0 524,286
/14 255.252.0.0 262,142
/15 255.254.0.0 131,070
Class B
/16 255.255.0.0 65,534
/17 255.255.128.0 32,766
/18 255.255.192.0 16,382
/19 255.255.224.0 8,190
/20 255.255.240.0 4,094
/21 255.255.248.0 2,046
/22 255.255.252.0 1,022
/23 255.255.254.0 510
Class C
/24 255.255.255.0 254
/25 255.255.255.128 126
/26 255.255.255.192 62
/27 255.255.255.224 30
/28 255.255.255.240 14
/29 255.255.255.248 6
/30 255.255.255.252 2
/31 255.255.255.254 0
/32 255.255.255.255 0
    Related Posts:

How to connect GNS3 to a Physical Network Step by Step

]]>
Introduction to Subnetting from the Perspective of Design and Operation https://www.expertnetworkconsultant.com/expert-approach-in-successfully-networking-devices/introduction-to-subnetting-from-the-perspective-of-design-and-operation/ https://www.expertnetworkconsultant.com/expert-approach-in-successfully-networking-devices/introduction-to-subnetting-from-the-perspective-of-design-and-operation/#respond Fri, 13 Apr 2018 17:08:21 +0000 http://www.expertnetworkconsultant.com/?p=1282 Continue readingIntroduction to Subnetting from the Perspective of Design and Operation]]>

Have you considered the operational view versus design view of subnetting yet?

Imagine you’ve gone to the beach with a team of friends and each person has been charged with building a sand castle or an object from sand, perhaps you may say, what has this got to do with Introduction to Subnetting from the Perspective of Design and Operation, well it does indeed have everything to do with it. The beach has an endless heap of sand readily available to your use and the weather is fantastic. You go on a nice trip to work on sand projects with the aim to create a competition amongst some friends.

Now each member of the team has been given a container to fill up with sand for their object but you have been delegated as the person responsible for giving the right amount to each individual for their selected objects based on the sizes chosen.

John has chosen to create a full size motorcycle, Jenny has chosen to create a mouse, Rebecca has chosen to create her pet dog, Kwabena has chosen to create a joystick and then the twins have decided to become the Wright brothers, you guessed it, they are creating an aircraft. Knowing the estimated sizes of their objects, you have provided each one a container to work within and have started to heap the sand for each of them.

Before undertaking a task as per the above scenario, what do you personally think should be his approach so no one is deficient of sand enough to cater for their sand objects?

 

Let us consider the following key points;

  • Analyse Needs
  • Choose Size Requirements (Sand)
  • Plan how to apportion the Sand.

 

A big question to ask is this, will you give Jenny the same amount of sand as the Twins who wants to create a full sized aircraft? The answer is obvious, No! Someone may argue that this is a competition and so it does not matter, give them all the same portion and let them get on with it. This is not the best mindset as this will only incur waste.

So the best thing to do is measure a quantity equivalent or just slightly over the size of the object they are about to create so there is enough room for the creation of the object and any unforseeable adjustments they might need.

 

Translate our beach creation to the world of subnetting from the perspective of design and operation.

Consider the following diagram – Figure 1.0

subnet design per networks

Subnet Design: Class B 172.16.0.0 | First 3 Octets are Equal. | Figure 1.0 is our Sample Subnet Plan Document

 

In the design above, the entire network design depicts 5 separate networks broken down into three LANs and one each for the WAN links. Each subnet has the same value in the first 3 octets. For example, for the LAN on the left, the number shows 172.16.1._ meaning all addresses that begin with 172.16.1. Since this is a class B network and not all the subnets have been used, there is a great deal of room for improvement.

 

The skill of subnetting in designing is crucial for the network engineer. Do note that most times the role you take would have had some engineers beforehand who would have designed the network and planned the subnets before you arrived there. The concept is still very essential for you as will need to interpret what someone before you has already chosen. To completely grasp IP addressing and subnetting, you need to have a mindset from the perspective of design and operation. In our earlier example of Figure 1.0, I mentioned that the Subnet Design states that the first three octets of all the subnets were equal. A question you may ask is why was this convention chosen? Could there not have been any alternatives? Would the alternatives be better for the network today. As you can see, subnetting require a great deal of planned design rather than to operation. Let’s consider the following flow;

Figure 1.1

Analyse Needs

  • Number of Subnets
  • Number of Hosts per Subnet
  • Size of Subnet

Design Subnets

  • Choose Network
  • Choose 1 Mask
  • List all Subnets

Plan Implementation

  • Subnets and their Locations
  • Static IP
  • DHCP Ranges

Let us break these down so we can have a deeper understanding of what needs doing.

Analyse Subnetting and Addressing Needs

  • Which hosts should be grouped together into a subnet?
  • How many sunbets does this network require?
  • How many host IP addresses does each subnet require?
  • Will we use a single subnet size for simplicity, or not?

Figure 1.2

 

 

Rules to consider for devices in each subnet

Every device that connects to an IP internetwork needs to have an IP address in order to do so. These devices include printers,IP phones, servers, mobile phones, tablets and end devices used by users. Major network devices like routers, switches, and firewalls must also have IP’s in order to internetwork.

Figure 1.3 – Identifying the Subnets

Rules about which hosts are in which subnet

IP addresses must be assigned according to some fundamental rules and for for good reasons. To make routing work efficiently, IP addressing rules group addresses into groups called subnets. The rules are as follows:

Addresses in the same subnet are not separated by a router – look at figure 2.1
Addresses in different subnets are separated by at least one router – look at figure 2.2

same subnet and different subnet ip addressing rules per design

Notice that PC A and B are in one subnet and PC C is in another subnet. For PC A to speak with PC C, at least one router (R1) would be required.

Determine the Number of Subnets

You would be given a document detailing the entire detail of your organisation’s internetwork. Once you have been given this document start applying the rules.

Consider the following:
Network Diagrams
VLAN configuration details
WAN technology used( MPLS, Frame-Relay, VPLS, Metronet, etc) Based on this information, use the above rules and plan one subnet for every;

  1. VLAN
  2. Point-to-point Serial link
  3. Ethernet emulation WAN link (EoMPLS)
  4. Frame Relay PVC.

 

In the above diagram, there is a clear indication of expected hosts per subnet and so it makes out design and implemention of a subnet scheme a little less daunting. I will be going through a simple method in performing subnetting in another article. Look out for more and You might also enjoy reading my article on Inter-VLAN Routing.

 

Good Resource for Further Study:
Get more advanced in-depth knowledge in Routing and Switching from the world’s most renown author in Networking.

]]>
https://www.expertnetworkconsultant.com/expert-approach-in-successfully-networking-devices/introduction-to-subnetting-from-the-perspective-of-design-and-operation/feed/ 0