Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,152,442 members, 7,816,016 topics. Date: Thursday, 02 May 2024 at 11:35 PM

Ip-subnetting-in-3-steps.html - Science/Technology - Nairaland

Nairaland Forum / Science/Technology / Ip-subnetting-in-3-steps.html (1137 Views)

Free Tutorial Of IP Subnetting / How To Make Your Own Anti-virus In Few Minutes In Just 3 Steps / How To Get $13 Million In 3 Hours (2) (3) (4)

(1) (Reply)

Ip-subnetting-in-3-steps.html by kosemani1(m): 11:52am On Jun 01, 2015
IP Subnetting in 3 steps
What is IP subnetting anyway?

Subnet is a shortened version of the phrase subdivided network. Yes you guessed it, it literarily means subdividing a network into chunks of networks or diving a particular IP address into several IP addresses. This is a very important aspect of networking that means a lot to planning and implementing a network.
I have heard alot of IT technicians or even students complain of this topic. This tutorial shall guide you through classful subnetting in few steps. I use this myself and it really works. So lets Rock n Roll!!!
--------------
Scenario
--------------
What if you walk into a job interview and you were given a network diagram, with routers, switches, hosts and servers in it. You were not asked to configure the network, rather you were given something like 199.1.1.100/27 and you were asked to provide an IP address for each of the devices using the ip address and subnet prefix you were provided. What do you do?





Typical Example of a Computer Network

There are 3 kinds of classful networks. The Class A, Class B and Class C networks.

Class A Class B Class C
------------------------------------------------------------------------------------------------------------------------

First Octet Range 1-126 128-191 192-223
------------------------------------------------------------------------------------------------------------------------
valid network no 1.0.0.0-126.0.0.0 128.0.0.0-191.2455.0.0 192.0.0.0-233.255.255.0
------------------------------------------------------------------------------------------------------------------------
Octet Bits(Network) 1(8bits) 2(16bits) 3(24bits)
------------------------------------------------------------------------------------------------------------------------
Octet Bits(Host) 3(24bits) 2(16bits) 1(8bits)
------------------------------------------------------------------------------------------------------------------------
Default Mask 255.0.0.0 255.255.0.0 255.255.255.0
------------------------------------------------------------------------------------------------------------------------

Table X shows summary of necessary information for each classes of a classful IP address.

Step1. Determine the Class of The IP address

Looking at the IP address that you were given, we can infer that the IP address is a Class C IP address. It falls within the range of 192-223.

Step2. Determine the Subnet Mask and subnets.

What is a Subnet Mask? A Subnet Mask divides the IP address in a subnet into 2 parts. The Subnet Prefix or CIDR and the Host. Where the prefix comprise of the subnet and network bits. For this IP addressing scheme, 199.1.1.100/27. /27 is the subnet prefix for the IP.

Borrowed Bit 1 2 3 4 5 6 7 8
-----------------------------------------------------------------------------------------------------------------------
Bit Value 128 64 32 16 8 4 2 1
-----------------------------------------------------------------------------------------------------------------------
Subnet Mask 128 192 224 240 248 252 254 255
-----------------------------------------------------------------------------------------------------------------------
mask format
Subnet Prefix /1 /2 /3 /4 /5 /6 /7 /8 255.0.0.0
-----------------------------------------------------------------------------------------------------------------------
/9 /10 /11 /12 /13 /14 /15 /16 255.255.0.0
------------------------------------------------------------------------------------------------------------------------
/17 /18 /19 /20 /21 /22 /23 /24 255.255.255.0
------------------------------------------------------------------------------------------------------------------------
/25 /26 /27 /28 /29 /30 /31 /32 255.255.255.255
-----------------------------------------------------------------------------------------------------------------------
Table XI Shows the correlation between the subnet prefix and the subnet Mask


ClassA Class B Class C
------------------------------------------------------------------------------------------------------------------------
Octet Bits(Network) 1(8bits) 2(16bits) 3(24bits)
------------------------------------------------------------------------------------------------------------------------
Table XII shows the Host bits for each classes of IP

From the table above. We can see that a Class C network has 24 network bits.

199.1.1.100/27 has a /27 subnet prefix.

Subnet Prefix - Network Bit = subnets. Solving this we shall derive the number of subnets for this network.

27-24=3. Therefore there are 2^3= 8 subnets in this network.

Also note from Table X1. The subnet mask of /27 is 224.

Now that we have derived the subnets, and subnet mask for this IP address, Its time to get the IP address Ranges.

Step 3 Determine the IP address Ranges.

Remember, each octet has 8 bits assigned to them, IP Address has 32 bits in all, you can see that on table xi. subnet prefix for our given IP address is a /27. You have to spread this bits over your IP address, to determine where the /27 resides on the IP.

199 .1 .1 .100
8 8 8 3 => 27
Spreading the bits,you will observe that the incomplete bit is on the 4th octet. Therefore we shall convert the incomplete bit to binary.

100 converted to binary is 1100100. if you count the bits,you have 7 bits.Add an additional bit (0) to the left of the binary so that you have something like 01100100. For a /27 the first 3 bits is the network bit and the rest is for the host.

Note-- You binary should always be 8 bits, always add zero(s) on the left side to make it 8.

network bits / Host Bit
0 1 1 / 0 0 1 0 0
25 26 27

-----------------------------------------------------------------------------------------------------------------------
Bit Value 128 64 32 / 16 8 4 2 1

0 1 1 / 0 0 1 0 0
-----------------------------------------------------------------------------------------------------------------------
Table XIII Spreading the binary across bits values

The Subnet ID

The Subnet ID is the first IP address in a subnet. It also serves as Network identifier.
The subnet ID for our network shall be :
Add the first 3 network bit values,that is 0+64+32= 96.

Note-- only 1s' bit values are added

Therefore our subnet ID is 199.1.1.96 (Replace the 100 with the bit values)

Broadcast Address

The broadcast address is the last address on a subnet.
To determine the broadcast address, change all the bits on the host side of the network to all 1s.

Network / Host
-----------------------------------------------------------------------------------------------------------------------
Bit Value 128 64 32 / 16 8 4 2 1

0 1 1 / 1 1 1 1 1
-----------------------------------------------------------------------------------------------------------------------
Table XIV

Add up all the bit values of all the 1s you have in addition to the bit value of the network.

64+32+16+8+4+2+1=127

Therefore our Broadcast address is 199.1.1.127.

The network range is 199.1.1.96 - 199.1.1.127

The first usable address is 199.1.1.97, the last usable address is 199.1.1.126

The subnet mask is 255.255.255.224.

Remember /27 is on the 255.255.255.255 row. Check table x1 to verify. /27 has the mask of 224. Therefore you replace the 255 in the 4th octect with 224.

I shall show you how to allocate subnets in the next tutorial. I want us to have a better understanding of this concept first.

-------------------------------------------------------------------------------------------------------------------------------------------------------------
Rough Work
------------------
Determine the network range, subnet id, broadcast id, subnet mask of 172.6.2.0/21

This is a class B IP address. (falls within 128-191)

subnet mask
prefix-network=subnet
21-16=5.
2^5= 32. The network has 32 subnet masks.

Subnet ID, Broadcast Address

172 .6 .2 .0

8 8 5

2 to binary is 10. add 6 zeros 00000010


network bit / host bit
00000 / 010

Therefore subnet ID will be 172.6.0.0

Host bits
010
111 to decimal==>7


Broadcast ID = 172.6.7.255
Note
If there is a zero bit after you have added the host bit to the ip address. like the one above, replace the zero bit with 255 for the broadcast address.

like adding 7 to 172.6.0.0, you have 172.6.7. ( 0 ). change the zero to 255.

/21 has a mask of 248, therefore its subnet mask is 255.255.248.0

IP address Range 172.6.0.0-172.6.7.255
First useable ip 172.6.1.0
last useable ip 172.6.7.255

Try these as well
Determine the network range, subnet id, broadcast id, subnet mask of

a) 8.1.4.5/16
b) 130.4.102.1 subnet mask 255.255.255.0
c) 1.99.53.76/8

You can leave your answers as a comment

Contact
---------
Email:oyinolasunkanmi@gmail.com
Website:fiatinnovations.com
Phone no: 08063054432

1 Like 1 Share

(1) (Reply)

Stephen Hawking Says He's Figured Out To Escape From Black Hole / This Politician Will Win 2019 Election On The Great Platform Of The APC (PICS) / Correct Name Of Some Rare Animals Found In Nigeria.

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 26
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.