Subnetting of IP address in computer networking

In this article I describe the subnetting of IP address in computer networking. This subnetting is also used in subnetting of internetworking at the ISP level. In previous article I brief the term IP address and subnet mask. Now the term subnet mask is related to subnetting of IP address in computer networking.

Subnetting of IP address is most important term in networking. In view of CCNA exam subnetting of IP address in computer networking may be helpful to increase the score. In this article I give a brief discussion about subnetting. So let’s start the topic.

What is subnetting of ip address in computer networking?

Subnetting of IP address in computer networking breaks a big local network into small network virtually. These network behave like separate network in inter-networking. When two or more networks connect with each other via a router, it is called inter-networking. What to do within a network where all devices connected with a switch.

We know router works on layer 3 network layer and switches works on layer 2 data link layer. So how to create separate networks in a LAN. Taking borrow the host bits with network bits creates subnetting. Subnetting creates sub-network of a large network. The devices of different sub-networks can not communicate with each other.

Requirement for subnetting of ip address in computer network.

We know the IP address scheme identifies as Class of IP address. IP addressing is basic requirement for subnetting. There are two parts of IP addressing when we configure IP address in any device. The first one is IP address and second is subnet mask.

Subnet mask defines the class of IP address. Subnet mask address breaks big network into small networks. Subnetting basics requirement are depend on required network and hosts. How many networks are required to create in a LAN? How many hosts are required in a subnet. These two figures are basic requirement to create subnetting. Next part is calculation to create the subnet mask for each network.

Classes of IP address for subnetting of IP address in computer networking.

IP address are classified by three types Classfull, VLSM and CIDR. Here VLSM stands for Variable Length Subnet Mask. CIDR stands for Classless Inter Domain Routing.

Subnetting created in all three types of IP address. We know the classes of IP address are Class A, B, C, D and E. These class belongs to classfull address system. With VLSM and CIDR IP address became classless. The bits of subnet mask breaks into smaller parts in VLSM and CIDR.

Requirement for creating subnetting of IP addresses in computer networking.

We know network ID and host ID are basic need to create a network. Similarly to create subnetting in a network, network ID for each subnet is required.

Second thing is required maximum host in any subnet. These two requirements are for a LAN. In case of WAN the network ID or each network and host ID on each interface of Router.

Subnetting of Class C network

In this section I will provide a brief description of subnetting for class C network. Keep remember this subnetting is for classfull address system. Remember the range of IP address in a class C network. It is from 192.0.0.0 to 223.255.255.255. the subnet mask is fixed 255.255.255.0 for a classfull class C IP address.

In this IP address we have only 8 bits for host. For creating subnetting we have only 8 bits to manipulate. Lets begin the subnetting for class c network. Do not be panic by reading so many mathematical expressions in this article. Once you go through them all terms understood easily.

You may also like to read --  Next generation firewalls and IPS

Denoting the IP address for subnetting

Here we denote the subnet mask by a fix number. We know that subnet mask is of 32 bits. When we assign subnet mask to a host we write full figure like “255.0.0.0”, “255.255.0.0” etc.

Actually 1 bits denote the network ID only and remaining 0 bits used for host ID. We can write the subnet mask 255.0.0.0 like /8. the subnet mask 255.255.0.0 as /16 . the subnet mask 255.255.255.0 like /24. Here the number after / shows the on bits for network ID. These numbers known as CIDR.

subnetting for class c network, ccna tutorials, ccna, subnetting of ip address for computer networking

In class C the subnet is 255.255.255.0 or we can say /24. Here first 24 bits remain on always. We have only remaining 8 bits for creating subnetting. So the subnets will be /25 , /26 , /27 , /28 etc.

For each subnet the number of Hosts became less. For /25 subnet we have on 7 bits for hosts. Keep in mind that total number of network and hosts always remains 32.

Factors to know before creating subnetting of IP address in computer networking

You have to know five things before going to subnetting of IP address in computer networking.

1. The number of subnets required. How many networks you want to create. In a subnet mask the masked bits are use to know the subnets. For example in a class C address for /26 mask we have 2 bits on and remaining 6 bits are available for hosts. Here number of subnets is 22=4. It means if we use first two bits of host we can create 4 subnets. Similarly for a /27 mask we have 3 bits masked. For /27 we have 23=8 subnets.

2. The numbers of hosts in each subnet. In above para you know the valid subnets by using the masked bits. Similarly to know the numbers of hosts in each subnet can be calculated by using hosts bits. For example for a /26 mask we have only 6 bits for hosts. So here the numbers of hosts ID is 26=64. we have to leave 2 ID for network ID and broadcast ID. So in a /26 mask 26-2=62 hosts per subnet are available.

3. The numbers of valid subnets known as block size. A simple formula is used to get the valid subnets. 256-subnet mask= valid subnets. For a mask /28 the decimal value is “255.255.255.240”. Here the block size will be 256-240=16. So the block size of a /28 mask is 16. It means there are 16 subnets in a /28 mask.

4. The number of valid hosts in each subnet. The simple formula to know the valid host in a subnet is Block size-2= valid hosts. In a 4 block size the valid hosts are only 2 in each subnet. Remaining 2 ID will be used for subnet ID and Broadcast ID.

5. The broadcast address or each subnet. The last address in each subnet will be broadcast address. For example for a /30 mask we have only 22=4 valid host ID. The last Host ID will be used for broadcast ID in this subnet. For example for a block size of 4 the valid host are 1,2 because 0 is the subnet ID and 3 is the broadcast ID. Another example for a 64 block we have 0 to 63 Host ID in first block. So here the broadcast ID for first block will be 63. in next block the broadcast ID is 127 and so on.

subnetting for class c network, ccna tutorials, ccna, subnetting of ip address in computer networking

Subnetting of Class C /25 network

It is clear that a /25 mask provides remaining 7 bits for host ID and first bit is reserved for network. The last octate of /27 is like 10000000 the subnet mask looks like 255.255.255.128. Calculate the five terms discussed above for /27 masked network. Number of subnets are 21=2. It means there will be only two subnets created by /27 mask.

You may also like to read --  MCQ for Subnetting set 1

Number of hosts per subnet are 27-2=126. The valid subnets or block size is 256-128=128. The valid subnet Id are 0 to 128 here. The broadcast ID for each subnet is the last ID of subnet. Here for first block the broadcast ID is 127 and for second block broadcast ID is 255. conclusion for /25 mask subnetting is that /25 subnet have two blocks.

Subnetting of Class C /26 network

It is clear that a /26 mask provides remaining 6 bits for host ID and first 2 bits are reserved for network. The last octate of /26 is like 11000000 the subnet mask looks like 255.255.255.192. The calculation for /26 masked network.

Number of subnets are 22=4. It means there will be only 4 subnets created by /26 mask. Number of hosts per subnet are 26-2=62. The valid subnets or block size is 256-192=64. The valid subnet Id are 0,64,128 and 192 here. The broadcast ID for each subnet is the last ID of subnet.

Here for first block the broadcast ID is 63 and for second block broadcast ID is 127. conclusion for /26 mask subnetting is that /26 subnet have four blocks.


Block 1 or subnet 1Block 2 or subnet 2Block 3 or subnet 3Block 4 or subnet 4
Subnet
ID
064128192
First
host ID
165129193
Last
host ID
62126190254
Broad cast
ID
63127191255
Similarly you can calculate remaining /27, /28, /29, /30 mask subnetting.

What about subnetting for a /31 mask.

It is not possible to use a /31 mask for subnetting because the valid for a /31 mask is 21-2=0. remaining you can understand if we have not a valid host number what we do in that subnet.

Subnetting of Class B network

The range of ip address in a class B network is from 128.0.0.0 to 191.255.255.255. The subnet mask is fixed 255.255.0.0 for a classfull class B IP address. In this IP address we have only 16 bits for host.

For creating subnetting we have only 16 bits to manipulate. Lets begin the subnetting for class B network. Do not be panic by reading so many mathematical expressions in this article. Once you go through them all terms understood easily.

Denoting the IP address for subnetting of IP address in computer networking.

Here we denote the subnet mask by a fix number. We know that subnet mask is or 32 bits. When we assign subnet mask to a host we write full figure like “255.0.0.0”, “255.255.0.0” etc. Actually 1 bits denote the network ID only and remaining 0 bits used for host ID.

We can write the subnet mask 255.0.0.0 like /8. the subnet mask 255.255.0.0 as /16 . the subnet mask 255.255.255.0 like /24. Here the number after / shows the on bits for network ID. These numbers known as CIDR.

subnetting for class B network , ccna tutorials, ccna, subnetting of ip address in computer networking

In class B the subnet is 255.255.0.0 or we can say /16. Here first 16 bits remain on always. We have only remaining 16 bits for creating subnetting. So the subnets will be /17 , /18 , /19 , /20 etc.

For each subnet the number of Hosts became less. For /17 subnet we have on 15 bits for hosts. Keep in mind that total number of network and hosts always remains 32.

Factors to know before creating subnetting of IP address in computer networking

You have to know five things before going to subnetting a network.

1. The number of subnets required. How many networks you want to create. In a subnet mask the masked bits are use to know the subnets. For example in a class B address for /17 mask we have 1 bit on and remaining 15 bits are available for hosts. Here number of subnets is 21=2. It means if we use first bit of host we can create 2 subnets. Similarly for a /18 mask we have 2 bits masked. For /18 we have 22=4 subnets.

You may also like to read --  Classes of IP address

2. The numbers of hosts in each subnet. In above para you know the valid subnets by using the masked bits. Similarly to know the numbers of hosts in each subnet can be calculated by using hosts bits. For example for a /17 mask we have only 15 bits for hosts. So here the numbers of hosts ID is 215=32768. we have to leave 2 ID for network ID and broadcast ID. So in a /17 mask 26-2= 32766 hosts per subnet are available.

3. The numbers of valid subnets known as block size. A simple formula is used to get the valid subnets or block size is 256-subnet mask= valid subnets. For a mask /17 the decimal value is “255.255.128.0”. Here the block size will be 256-128=128. So the block size of a /17 mask is 128.

4. The number of valid hosts in each subnet. The simple formula to know the valid host in a subnet is Block size-2= valid hosts. In a 32768 block size the valid hosts are only 32766 in each subnet. Remaining 2 ID will be used for subnet ID and Broadcast ID.

5. The broadcast address or each subnet. The last address in each subnet will be broadcast address. For a /17 mask the first broadcast address is 127.255.

The important thing to keep in mind for subnetting for class B network

subnetting for class B network , ccna tutorials, ccna, subnetting of IP address in computer networking

Subnetting for class B network is very similar to subnetting for class C network. The last octate of each subnet remain 0 for subnet ID and 255 for Broadcast ID. Only third octate will change for each subnet.

Subnetting of Class B /17 network

It is clear that a /17 mask provides remaining 15 bits for host ID and first bit is reserved for network. Out of 15 bits last octate bits remain unchanged. The third octate of /17 is like 10000000 the subnet mask looks like 255.255.128.0. Calculate the five terms discussed above for /17 masked network. Number of subnets are 21=2. It means there will be only two subnets created by class B /17 mask.

Number of hosts per subnet are 215-2=32766 . The valid subnets or block size is 256-128=128. The valid subnet Id are 0.0 and 128.0 here. The broadcast ID for each subnet is the last ID of subnet. Here for first block the broadcast ID is 127.255 and for second block broadcast ID is 255.255. conclusion for /17 mask subnetting is that /17 subnet have two blocks.


Block 1 or subnet 1Block 2 or subnet 2
Subnet ID0.0128.0
First host ID1.1129.1
Last host ID127.254255.254
Broadcast ID127.255255.255

Subnetting of Class B /18 network

It is clear that a /18 mask provides remaining 14 bits for host ID and first 2 bits are reserved for network. The third octate of /18 is like 11000000 the subnet mask looks like 255.255.192.0. The calculation for /18 masked network. Number of subnets are 22=4. It means there will be only 4 subnets created by /18 mask.

Number of hosts per subnet are 214-2=16384. The valid subnets or block size is 256-192=64. The valid subnet Id are 0.0,64.0,128.0 and 192.0 here. The broadcast ID for each subnet is the last ID of subnet. Here for first block the broadcast ID is 63.255 and for second block broadcast ID is 127.255 for last block 255.255. conclusion for /18 mask subnetting is that /18 subnet have four blocks.


Block 1 or subnet 1Block 2 or subnet 2Block 3 or subnet 3Block 4 or subnet 4
Subnet ID0.064.0128.0192.0
First host ID0.164.1128.1192.1
Last host ID63.254127.254191.254255.254
Broadcast ID63.255127.255191.255255.255

Similarly you can calculate remaining /19, /20, /21, /22…../30 etc mask subnetting.

You can see the subnetting for Class A network here.

In this article I describe the subnetting of ip address in computer networking with examples. I hope you found this article helpful. For any query or suggestion you may drop a comment below or contact us. Your suggestions are always welcome by us.

Share this article in your social circle :)
,

1 thought on “Subnetting of IP address in computer networking

Leave a Reply

Your email address will not be published. Required fields are marked *