Subnetting
Subnet
 Subnets are a subset of the entire
network
 Networks can be divided into subnets
 Each subnet is treated as a separate
network
 A subnet can be a WAN or LAN
Subnets
Subnet 1 Subnet 2
Subnet 3 Subnet 4
Sub netting
o What?
Sub netting is the strategy that allows creating
multiple networks from a single one.
o Why?
Maximize addressing efficiency
Extend the life of IPv4
o How?
Transform host bits into network bits thus
creating additional networks from single address
block
Cont…
oThe default subnet mask is as follows:
Class A: 255.0.0.0
Class B: 255.255.0.0
Class C: 255.255.255.0
Sub Netting in Class C
◦ Subnetting base address 192.168.1.0/24
11111111 11111111 11111111 00000000
◦ Transform 1 host bit into network bit
11111111 11111111 11111111 10000000
2 𝑏
networks (where b=no. host bits transformed) =2 networks
2ℎ
-2 hosts/ips per new networks (where h=no. of host bits left)=126 hosts
New prefix length /25
255.255.255.128
◦ So the first network will have the network id of
.0.25
◦ And the 2nd network will have the network id of
.128.25
Cont…
◦ Transform 2 host bits into networks bit
11111111 11111111 11111111 11000000
New prefix length /26
255.255.255.192
◦ So the first network will have the network id of
.0.26
◦ 2nd network:
.64.26
◦ 3rd network :
.128.26
◦ 4th network:
.192.26
And in each network we will have maximum 62 ips.
Subnet Masks
Mask No. of hosts Host Bits
255.255.255.0 254 bits 8
255.255.255.128 126 bits 7
255.255.255.192 62 bits 6
255.255.255.224 30 bits 5
255.255.255.240 14 bits 4
255.255.255.248 6 bits 3
255.255.255.252 2 bits 2
𝑈𝑠𝑖𝑛𝑔 𝑡ℎ𝑒 𝑓𝑜𝑟𝑚𝑢𝑙𝑎 ∶ 2ℎ
-2
Example
Subnet Base Address: 200.10.21.0/24
◦ Objective:
The network segment requires a maximum of 25 ip addresses.
Subnet the base address in order to yield the maximum address
utilization.
◦ Solution:
2ℎ
-2 => 25 (what is the smallest value of h that meets the criteria?)
h=5
b=32-(n+h)
b=32-(24+5)
b=3
2 𝑏
= 8 (networks) each having 30 ips
◦ New Mask:
255.255.255.224/27
Subnetting

Subnetting

  • 1.
  • 2.
    Subnet  Subnets area subset of the entire network  Networks can be divided into subnets  Each subnet is treated as a separate network  A subnet can be a WAN or LAN
  • 3.
    Subnets Subnet 1 Subnet2 Subnet 3 Subnet 4
  • 4.
    Sub netting o What? Subnetting is the strategy that allows creating multiple networks from a single one. o Why? Maximize addressing efficiency Extend the life of IPv4 o How? Transform host bits into network bits thus creating additional networks from single address block
  • 5.
    Cont… oThe default subnetmask is as follows: Class A: 255.0.0.0 Class B: 255.255.0.0 Class C: 255.255.255.0
  • 6.
    Sub Netting inClass C ◦ Subnetting base address 192.168.1.0/24 11111111 11111111 11111111 00000000 ◦ Transform 1 host bit into network bit 11111111 11111111 11111111 10000000 2 𝑏 networks (where b=no. host bits transformed) =2 networks 2ℎ -2 hosts/ips per new networks (where h=no. of host bits left)=126 hosts New prefix length /25 255.255.255.128 ◦ So the first network will have the network id of .0.25 ◦ And the 2nd network will have the network id of .128.25
  • 7.
    Cont… ◦ Transform 2host bits into networks bit 11111111 11111111 11111111 11000000 New prefix length /26 255.255.255.192 ◦ So the first network will have the network id of .0.26 ◦ 2nd network: .64.26 ◦ 3rd network : .128.26 ◦ 4th network: .192.26 And in each network we will have maximum 62 ips.
  • 8.
    Subnet Masks Mask No.of hosts Host Bits 255.255.255.0 254 bits 8 255.255.255.128 126 bits 7 255.255.255.192 62 bits 6 255.255.255.224 30 bits 5 255.255.255.240 14 bits 4 255.255.255.248 6 bits 3 255.255.255.252 2 bits 2 𝑈𝑠𝑖𝑛𝑔 𝑡ℎ𝑒 𝑓𝑜𝑟𝑚𝑢𝑙𝑎 ∶ 2ℎ -2
  • 9.
    Example Subnet Base Address:200.10.21.0/24 ◦ Objective: The network segment requires a maximum of 25 ip addresses. Subnet the base address in order to yield the maximum address utilization. ◦ Solution: 2ℎ -2 => 25 (what is the smallest value of h that meets the criteria?) h=5 b=32-(n+h) b=32-(24+5) b=3 2 𝑏 = 8 (networks) each having 30 ips ◦ New Mask: 255.255.255.224/27