MASK
•
A mask is a 32 bit number in which the n leftmost bits are 1’s and the 32-n rightmost bits are 0’s.
•
In classless addressing, the mask for a block can take any value from 0
to 32.
•
In IPv4 addressing , a block of addresses can be defined as x.y.z.t/n , where /n defines the mask.
This notation is called Classless
Inter Domain Routing or slash notation.
•
The addresses and the /n notation
completely define the whole block (the first address, the last address and the
number of addresses)
FIRST METHOD
•
The first address in the block can be found by setting rightmost 32-n
bits to 0s.
•
The last address in the block can
be found by setting rightmost 32-n bits
to 1’s.
•
The no. of addresses in the block can be found by using the formula
232-n .
SECOND METHOD
•
First Address= Given address AND Mask (bit by bit AND ing)
•
Last Address= Given address OR
complement (Mask)
•
No. of address= decimal equivalent
of the complement (Mask) +1
No comments:
Post a Comment