2. IP ver. 4 Address Classifications and
Range
Class Range
From
Range
To
Subnet Mask
A 1.0.0.0 126.255.255.255 255.0.0.0
B 128.0.0.0 191.255.255.255 255.255.0.0
C 192.0.0.0 223.255.255.255 255.255.255.0
The Range 127.0.0.0 to 127.255.255.255 Reserved for loopback address
Class D Range 224.0.0.0 – 239.255.255.255 Reserved for Multicasting
Class E Range 240.0.0.0 – 255.255.255.255 Reserved for Research and Development
0.0.0.0 – Network Address
255.255.255.255 – Broadcast Address 2Author Saravanan K
3. The Host Portion-Network portion
And Subnet mask
• Each IP Address has two portions
– The Network portion
– The Host Portion
• This portions are determined by the IP
Classification and the subnet mask.
• Example :
10.10.10.10 172.16.0.10 192.168.1.10
N. H.H.H N.N.H.H N.N.N.H
255.0.0.0 255.255.0.0 255.255.255.0
Where N – Network Portion H – Host Portion
3Author Saravanan K
4. Number of hosts per network in Class
A,B,C
IP Class Example Network Subnet Mask Total Host IP
Addresses /
Network
Class A
10.0.0.0
10.255.255.255
255.0.0.0 1,67,77,216
Class B
172.16.0.0
172.16.255.255
255.255.0.0 65,536
Class C
192.168.10.0
192.168.10.255
255.255.255.0 256
The total number of hosts / network can be calculated with reference to the
subnet mask.
In the subnet mask the 255 indicates the Network part and the 0 s indicates
the host part. 4Author Saravanan K
5. Subnetting
• Subnetting is the process of dividing a class C
network into sub networks.
• To understand this let us consider a scenario
– Your company has 250 hosts (may be a combination of
systems and IP phones, IP printers etc.)
– You are asked to divide this 250 hosts into two
different networks.
– That is 125 hosts in each network.
– How to do that?
5Author Saravanan K
6. Subnetting
• The straight approach is take two different
network IP in class C.
• Assign IP addresses to the hosts as follows
Network 1 Network 2
Network IP 192.168.1.0 Network IP 192.168.2.0
First Host IP 192.168.1.1 First Host IP 192.168.2.1
Last Host IP 192.168.1.254 Last Host IP 192.168.2.254
Broadcast IP 192.168.1.255 Broadcast IP 192.168.2.255
Subnet Mask 255.255.255.0 Subnet Mask 255.255.255.0
6Author Saravanan K
7. Subnetting
• In this example each network has 256 IP addresses
and the valid host addresses are 254.
(256 – 2 (Network IP + Broadcast IP) =254)
• As per the scenario each network you need only 125
hosts and total IP available are 254.
• The remaining 129 IP address are left unhandled in
each network.
• That means you are wasting total 258 IP (129 +129) in
both the networks.
• You can make use of the 129 IP (those are left unused
in the first network) for the second network.
• This approach is called Sub netting.
7Author Saravanan K
8. Subnetting
IP Addresses in one Class C
network
Total IP 256
Subnetted networks
Network 1 with 128
IP
Network 2 with 128
IP
8Author Saravanan K
9. The Class C subnet mask
• The subnet mask 255.255.255.0, has the first
three octets as network portions and the last
octet is the host portion.
• The decimal form and the binary format are
255.255.255.0
11111111.11111111.11111111.00000000
• If you convert the first bit 0 as 1 in the fourth
octet, then you make two networks out of the
above one network.
9Author Saravanan K
10. Steps in Subnetting - /25 Mask
Step 1: Change the subnet mask since you are occupying the
host bit as subnet bit
11111111.11111111.11111111.10000000 then the subnet
mask is
255.255.255.128
11111111.11111111.11111111.10000000
11111111.11111111.11111111.(27+26+25+24+23+22+21+20)
11111111.11111111.11111111. (128+0+0+0+0+0+0+0)
Note:
27 (128)+26 (64)+25 (32)+24(16)+23(8)+22(4)+21(2)+20(1) = 255
10Author Saravanan K
11. Steps in Subnetting - /25 Mask
Step 2: Now find the number of hosts per
network after sub netting.
The total number of IP in the class C network is
256.
As per step 1 you occupied the host bit as
network bit and got the subnet mask 128 in the
last octet. (255.255.255.128)
Now subtract 128 from 256 you will get the
number of host IP per subnet.
That is 256 – 128 = 128 IP / sub network.
11Author Saravanan K
12. Sub nets in /25 Mask
Network 1 Network 2
Network IP 192.168.1.0 Network IP 192.168.1.128
First Host IP 192.168.1.1 First Host IP 192.168.1.129
Last Host IP 192.168.1.126 Last Host IP 192.168.1.254
Broadcast IP 192.168.1.127 Broadcast IP 192.168.1.255
Subnet Mask 255.255.255.128 Subnet Mask 255.255.255.128
12Author Saravanan K
Now you have separate Network IP and Broadcast IP for each subnet
13. The /mask
The class C network with a subnet mask 255.255.255.0 may
use the / mask as /24 since all the network bits in the first
three are 1 s.
That is 11111111. 11111111. 11111111.00000000
(8) + (8) + (8) = 24
(Total number of 1 s)
Since you changed the 0 bit as 1 in the fourth octet it
becomes /25
That is 11111111. 11111111. 11111111.10000000
(8) + (8) + (8) + 1 = 25
(Total number of 1 s)
As per the scenario by sub netting you could create two
networks with 128 IP in each network, from a class C
network. 13Author Saravanan K
14. The /26 mask
Author Saravanan K 14
Step 1: Change the subnet mask since you are occupying the host bit as subnet bit
11111111.11111111.11111111.11000000 then the subnet mask is
255.255.255.192
11111111.11111111.11111111.11000000
11111111.11111111.11111111.(27+26+25+24+23+22+21+20)
11111111.11111111.11111111. (128+64+0+0+0+0+0+0)
Step 2: Now find the number of hosts per network after sub netting.
The total number of IP in the class C network is 256.
As per step 1 you occupied the host bit as network bit and got the subnet mask192
(128+64) in the last octet. (255.255.255.192)
Now subtract 192 from 256 you will get the number of host IP per subnet.
That is 256 – 192 = 64 IP / sub network.
Refer the table in the next slide.
15. Author Saravanan K 15
Sub nets in /26 Mask
Name of IP Network 1 Network 2 Network 3 Network 4
Network IP 192.168.1.0 192.168.1.64 192.168.1.128 192.168.1.192
First Host IP 192.168.1.1 192.168.1.65 192.168.2.129 192.168.1.193
Last Host IP 192.168.1.62 192.168.1.126 192.168.2.190 192.168.1.254
Broadcast IP 192.168.1.63 192.168.1.127 192.168.2.191 192.168.1.255
Subnet Mask 255.255.255.192 255.255.255.192 255.255.255.192 255.255.255.192
IP Address
Total 4 networks
With 64 Host in each
network.
Valid Hosts are
64-2 =62
16. Sub netting - up to /30 mask
• The sub netting is possible up to /30 in this
you will get 64 Networks and 4 Host IP in each
network.
• Refer the table in the next slide for all sub
netting details of /25, /26, /27, /28, /29, /30
masks.
Author Saravanan K 16
17. Sub netting table
Author Saravanan K 17
Mask bits
occupi
ed in
4 th
octet
Value of Bit occupied 4 th Octet
in binary
format
The Bit value Subnet mask Networ
ks
No
Of
host
IP
Valid
Host
IP
/25 1 27 10000000 128
255.255.255.128 2 128 126
/26 2 27 + 26 11000000 (128+64)=192
255.255.255.192 4 64 62
/27 3 27 + 26 +25 11100000 (128+64+32) = 224
255.255.255.224 8 32 30
/28 4 27 + 26 +25+24 11110000 (128+64+32+16) = 240
255.255.255.240 16 16 14
/29 5 27 +26 +25+24+23 11111000 (128+64+32+16+8)=248
255.255.255.248 32 8 6
/30 6 27+26+25+24+23+22 11111100 (128+64+32+16+8+4)=252
255.255.255.252 64 4 2