SUBNETTING - CCNA
Home Contact Me TOPICS TCP/IP SUBNETTING OSI LAYER ARP CLI Home
Banner

Something about Me

Your favourite quotation or your philosophy of life

Something i love to say

why do we go for subnetting???


* to conserve IP address and reduce wastage of IP address.

* to segment the broadcast domain which results in improving the network performance.


what is subnetting??


* dividing major networks into smaller networks ( subnets ) by converting host bits into network bits.


lets see an example..

the given network ID ( NID ) is

NID                                    : 192 . 168 . 1 . 0

no of subnets needed          : 5

here 192 . 168 . 1 are in network part as the given NID belongs to CLASS C.

the 4th octet is in host portion. from the host portion, we need to borrow 5 bits and the rest are in host portion and it is made as SNID ( subnet ID ).


NOTE:

counting for borrowing is made from right side.

now, after the borrowing and converting as SNID, there are 8 possibilities for SNID in which 000 and 111 are reserved for some other functions. the rest are namely 001, 010, 011, 100, 101, 110.

now, for each possibilities, we have to find out the NID, FHID, LHID and BIP.

to find there, i have already explained in the previous page of TCP/IP. refer to it.

after finding the SNID for all the possibilities, we get a new subnet mask.

that new subnet mask is find by incrementing last octet of the last BIP by 1.


let us see an example in brief:

NID                                                     : 192 . 168 . 1 . 0

no of subnets needed                    : 5

no of bits borrwed                          : 3


since we borrow 3 bits, the no of possibilities of subnets is 6.( 8 - 2 )


1SNID:

 

NID:    192 . 168 . 1 . 32

FHID:  192 . 168 . 1 . 33

LHID:  192 . 168 . 1 . 62

BIP:    192 . 168 . 1 . 63


2SNID:


NID:     192 . 168 . 1 . 64

FHID:   192 . 168 . 1 . 65

LHID:   192 . 168 . 1 . 94

BIP:     192 . 168 . 1 . 95


- - - - - - - - - - - - - - - - -

- - - - - - - - - - - - - - - - -


5SNID:


NID:     192 . 168 . 1 . 160

FHID:   192 . 168 . 1 . 161

LHID:   192 . 168 . 1 . 190

BIP:     192 . 168. 1 . 191


6SNID:


NID:     192 . 168 . 1 . 192

FHID:   192 . 168 . 1 . 193

LHID:   192 . 168 . 1 . 222

BIP:     192 . 168 . 1 . 223


so the new subnet mask value is 255 . 255 . 255 . 224.


lets see another example..


NID                          :   25 . 0 . 0 . 0

no of subnets needed:   50

no of bits borrowed    :   6


since we borrow 6 bits, the no of possibilities are 62.( 64 - 2 )


1SNID:


NID    : 25 . 4 . 0 . 0

FHID  : 25 . 4 . 0 . 1

LHID  : 25 . 7 . 255 . 254

BIP    : 25 . 7 . 255 . 255


2SNID:


NID    : 25 . 8 . 0 . 0

FHID  : 25 . 8 . 0 . 1

LHID  : 25 . 11 . 255 . 254

BIP    : 25 . 11 . 255 . 255


3SNID:


NID    : 25 . 12 . 0 . 0

FHID  : 25 . 12 . 0 . 1

LHID  : 25 . 15 . 255 . 254

BIP    : 25 . 15 . 255 . 255


- - - - - - - - - - - - - - - - -

- - - - - - - - - - - - - - - - -

- - - - - - - - - - - - - - - - -


60SNID:


NID    : 25 . 240 . 0 . 0

FHID  : 25 . 240 . 0 . 1

LHID  : 25 . 243 . 255 . 254

BIP    : 25 . 243 . 255 . 255


61SNID:


NID   : 25 . 244 . 0 . 0

FHID : 25 . 244 . 0 . 1

LHID : 25 . 247 . 255 . 254

BIP   : 25 . 247 . 255 . 255


62SNID:


NID   : 25 . 248 . 0 . 0

FHID : 25 . 248 . 0 . 1

LHID : 25 . 251 . 255 . 254

BIP   : 25 . 251 . 255 . 255


the new subnet mask for the given network is 25 . 252 . 0 . 0

now, we are going to see another type of problem where the subnet mask will be given and we have to find out no of bits borrowed and then the usual procedure of finding NID, FHID, LHID and BIP.


lets see an example...


NID    : 221 . 222 . 0 . 0

SNM   : 255 . 255 . 255 . 252


--> with the given problem we can find that the given network ID is belongs to CLASS C.

the default subnet mask value for CLASS C is 255 . 255 . 255 . 0.

but the given subnet mask value in the problem is 255 . 255 . 255 . 252.

so, compare the 4th octet value of the default and the given subnet mask..with that we can find the no of bits borrowed.

therfore, the no of bits borrowed is 6.


lets find the first SNID

since no of bits borrwed = 6, the incremental value for the 4th octet will be 4.


NID   : 221 . 222 . 0 . 4

FHID : 221 . 222 . 0 . 5

LHID : 221 . 222 . 0 . 6

BIP   : 221 . 222 . 0 . 7


- - - - - - - - - - - - - - - -

- - - - - - - - - - - - - - - -

now, lets find one SNID from the middle.


50th SNID:


NID   : 221 . 222 . 0 . 200

FHID : 221 . 222 . 0 . 201

LHID : 221 . 222 . 0 . 202

BIP   : 221 . 222 . 0 . 203


last SNID:


NID   : 221 . 222 . 0 . 248

FHID : 221 . 222 . 0 . 249

LHID : 221 . 222 . 0 . 250

BIP   : 221 . 222 . 0 . 251


you may find the first and last SNID easily.but, it is difficult to find any of the SNID from the middle.

inorder to find from the middle, there is an easy method.

which ever SNID you want to find, take the binary format of it.

for example, to find the 50th SNID, take the binary form of 50 which is 1 1 0 0 1 0.

place those values in the 4th octet from left side and add the result with the place value.

thus we get 200 for the 50th SNID.


another type of problem in subnetting.....

here, a NID will be given and along with that, no of host needed will also be given.

we have to find the new subnet mask...


NID                            : 162.135.0.0

no of subnets needed  : 100


from the question, we come to know that no of subnets needed is 100.so we have to borrow 7 bits from the 4th octet.

so, the incremental value will be 128 for the 4th octet.


first SNID:


NID   : 162 . 135 . 0 . 128

FHID : 162 . 135 . 0 . 129

LHID : 162 . 135 . 0 . 254

BIP   : 162 . 135 . 0 . 255


last SNID:


NID    : 162 . 135 . 255 . 0

FHID  : 162 . 135 . 255 . 1

LHID  : 162 . 135 . 255 . 126

BIP    : 162 . 135 . 255 . 127


the new subnet mask is 255 . 255 . 255 . 128.