In Tech Knowledge learn various technologies

Recent Post

Tuesday, December 10, 2019

IP SUBNETTING PART-1

IP SUBNETTING

IP Subnetting

Subnetting is a process of logical grouping of an IP network into two or more subnetworks.


Why subnetting is required?
1. Improved network performance due to less network congestion
2. Better Administration
3. Improved network security
4. Better utilization of IP address

Classful and Classless IP Address
In Classful IP Address, an IP address must use the default subnet mask for that IP address.For example, 120.10.0.0 is an IP address of class A and the default subnet mask for class A is 255.0.0.0. This subnet mask uses a total of 8 bits to define a network. It would be expressed in network notation as 120.10.0.0/8.

Class A IP address range : 1.0.0.0 to 126.255.255.255
Class B IP address range : 128.0.0.0 to 191.255.255.255
Class C IP address range : 192.0.0.0 to 223.255.255.255

                 Default Subnet Mask
Class
Octet
1st
2nd
3rd
4th
A
255
0
0
0
11111111
00000000
00000000
00000000
B
255
255
0
0
11111111
11111111
00000000
00000000
C
255
255
255
0
11111111
11111111
11111111
00000000

In Classless IP Address, an IP address allows to use Variable Length Subnet Mask (VLSM). As an example of a custom subnet mask, 210.10.20.0 is an IP address of class C and the default subnet mask for class C is 255.255.255.0. Suppose the custom subnet mask uses a total of 30 bits to define the subnetwork. It would be expressed in network notation as 210.10.20.0/30.

Convert Binary to Decimal
00000000
07+06+05+04+03+02+01+00
0+0+0+0+0+0+0+0
0
10000000
27+06+05+04+03+02+01+00
128+0+0+0+0+0+0+0
128
11000000
27+26+05+04+03+02+01+00
128+64+0+0+0+0+0+0
192
11100000
27+26+25+04+03+02+01+00
128+64+32+0+0+0+0+0
224
11110000
27+26+25+24+03+02+01+00
128+64+32+16+0+0+0+0
240
11111000
27+26+25+24+23+02+01+00
128+64+32+16+8+0+0+0
248
11111100
27+26+25+24+23+22+01+00
128+64+32+16+8+4+0+0
252
11111110
27+26+25+24+23+22+21+00
128+64+32+16+8+4+2+0
254
11111111
27+26+25+24+23+22+21+20
128+64+32+16+8+4+2+1
255

Example-1
210.10.20.56/30

Step 1: Identify the Class of the above IP Address.
             Here, 210.10.20.56 belongs to Class C

Step 2: Find the default subnet mask for that Class of IP address.
             Here, Default subnet mask for Class C is 255.255.255.0
                IP Address                    : 210.10.20.56
                Default Subnet Mask    : 255.255.255.0

Step 3: Identify the numbers of required network (1s) bits.
For the IP Address 210.10.20.56/30 the required network bits is 30.
IP SUBNETTING
Step 4: Find total number of sub networks.
Number of sub networks,  2X      
[x:numbers of network(1s)bits from host part of default sub netmask]
                                        =  26
                                        =  64

Step 5: Find the number of usable hosts in each sub networks.
Number of valid hosts per sub network, 2y - 2   
[y :numbers of host(0s)bits from new sub netmask]
                                                               = 22 - 2
                                                               = 4 - 2
                                                               = 2

Step 6: Find total number of IP address in each sub networks.
Block size of per subnetwork= 28 - new sub netmask
                                               =256 - 252
                                               =4

The blocks will be:
0,(0+4)=4,(4+4)=8,(8+4)=12,(12+4)=16,(16+4)=20,(20+4)=24,(24+4)=28,(28+4)=32,(32+4)=36, (36+4)=40,(40+4)=44,(44+4)=48,(48+4)=52,(52+4)=56,(56+4)=60,(60+4)=64,(64+4)=68,(68+4)=72,(72+4)=76,(76+4)=80,(80+4)=84,(84+4)=88,(88+4)=92,(92+4)=96,(96+4)=100,(100+4)=104,(104+4)=108,(108+4)=112,(112+4)=116,(116+4)=120,(120+4)=124,(124+4)=128, (128+4)=132,(132+4)=136,(136+4)=140,(140+4)=144,(144+4)=148,(148+4)=152,(152+4)=156, (156+4)=160,(160+4)=164,(164+4)=168,(168+4)=172,(172+4)=176,(176+4)=180,(180+4)=184, (184+4)=188,(188+4)=192,(192+4)=196,(196+4)=200,(200+4)=204,(204+4)=208,(208+4)=212, (212+4)=216,(216+4)=220,(220+4)=224,(224+4)=228,(228+4)=232,(232+4)=236,(236+4)=240, (240+4)=244,(244+4)=248,(248+4)=252,(252+4)=256.

1st Sub network
210.10.20.0---- Network IP address for the 1st sub network
210.10.20.1- - -Valid Host IP
210.10.20.2- - -Valid Host IP
210.10.20.3---- Broadcast IP address for the 1st sub network

2nd Sub network
210.10.20.4---- Network IP address for the 2nd sub network
210.10.20.5- - -Valid Host IP
210.10.20.6- - -Valid Host IP
210.10.20.7---- Broadcast IP address for the 2nd sub network

Example-2
Given address 192.10.20.19/28, find the valid host addresses on this subnet.

Step 1: Identify the Class of the above IP Address.
             Here, 192.10.20.19 belongs to Class C

Step 2: Find the default subnet mask for that Class of IP address.
             Here, Default subnet mask for Class C is 255.255.255.0
                IP Address                    : 192.10.20.19
                Default Subnet Mask    : 255.255.255.0

Step 3: Identify the numbers of required network (1s) bits.
For the IP Address 192.10.20.19/28 the required network bits is 28.

Default Subnet Mask: 255.255.255.0
                          =11111111.11111111.11111111.00000000
(By default class C uses 24 network bits.So, we need to borrow 4 network bits)
                          =11111111.11111111.11111111.11110000
                          =255.255.255.240

Step 4: Find total number of sub networks.
Number of sub networks,  2X      
[x:numbers of network(1s)bits from host part of default sub netmask]
                                        = 24
                                        = 16

Step 5: Find the number of usable hosts in each sub networks.
Number of valid hosts per sub network, 2y - 2   
[y :numbers of host(0s)bits from new sub netmask]
                                                              = 24 - 2
                                                              = 16 - 2
                                                              = 14

Step 6: Find total number of IP address in each sub networks.
Block size of per subnetwork= 28 - new sub netmask
                                               =256 - 240
                                               =16

The blocks will be:
0, (0+16)=16, (16+16)=32, (32+16)=48,- - - - 256.

Required Sub network
210.10.20.16---- Network IP address for the 3rd sub network
210.10.20.17- - - -
210.10.20.18       |
                  |         |
                  |         |  Valid host
210.10.20.29       |
210.10.20.30- - - -
210.10.20.31---- Broadcast IP address for the 3rd sub network

No comments:

Post a Comment

please do not enter any spam link in the comment box