What is subnetting ?
Sub netting allows creating multiple networks from a single address block.
Sub netting allows creating multiple networks from a single address block.
Why do we use subnetting ?
We use sub netting for:-
(a) Maximize addressing efficiency.
(b) Extend the life of IPv4.
(c)Public IPv4 addresses are scarce.
We use sub netting for:-
(a) Maximize addressing efficiency.
(b) Extend the life of IPv4.
(c)Public IPv4 addresses are scarce.
How do we use subnetting ?
We use it for transforming host bits into network bits creating additional networks from a single address block.
We use it for transforming host bits into network bits creating additional networks from a single address block.
Formula and Variables
h – Number of host bits.
b – Number of host bits transfer into network bits.
n – Number of network bits.
2^b – Number of networks resulting from the subnetting.
2^h-2 – Number of hosts per new network.
b – Number of host bits transfer into network bits.
n – Number of network bits.
2^b – Number of networks resulting from the subnetting.
2^h-2 – Number of hosts per new network.
Example of subnetting:-
Subnetting base address – 192.168.1.0/24
11111111 11111111 11111111 00000000
11111111 11111111 11111111 00000000
Transform 1 host bit into a network bit.
11111111 11111111 11111111 10000000
2^b networks
2^h-2 hosts per new network.
New prefix length /25
255.255.255.128
11111111 11111111 11111111 10000000
2^b networks
2^h-2 hosts per new network.
New prefix length /25
255.255.255.128
How we find no. of hosts in 1 bit?
11111111 11111111 11111111 1|0000000
Subnet mask – 255.255.255.128
Subnet mask – 255.255.255.128
2^7-2= 126
255.255.255.0/25 – Network ID
255.255.255.128/25 – Broadcast ID
255.255.255.0/25 – Network ID
255.255.255.128/25 – Broadcast ID
Transform 2 host bits into network bits.
11111111 11111111 11111111 11000000
2^b network
2^h-2 host per new network
New prefix length /26 255.255.255.192
11111111 11111111 11111111 11000000
2^b network
2^h-2 host per new network
New prefix length /26 255.255.255.192
How we find no. of hosts in 2 bit?
11111111 11111111 11111111 11|0000000
Subnet mask – 255.255.255.192
Subnet mask – 255.255.255.192
2^6-2= 62
255.255.255.0/26 – Network ID.
255.255.255.64/26 – Network ID.
255.255.255.128/26 – Network ID.
255.255.255.192/26 – Broadcast ID.
255.255.255.0/26 – Network ID.
255.255.255.64/26 – Network ID.
255.255.255.128/26 – Network ID.
255.255.255.192/26 – Broadcast ID.
SUBNET MASK
| ||
Mask
|
Number of Hosts
|
Host Bits
|
255.255.255.0
|
254
|
8
|
255.255.255.128
|
126
|
7
|
255.255.255.192
|
62
|
6
|
255.255.255.224
|
30
|
5
|
255.255.255.240
|
14
|
4
|
255.255.255.248
|
6
|
3
|
255.255.255.252
|
2
|
2
|