IP Address and IP class
Presented By
Md. Shohel Rana
M.Sc in CSE KUET
Head of CST - NUBNGPI
Five Different Classes
Class First Octet
decimal
(range)
First Octet
binary
(range)
IP range default
Subnet mask
Number of
Hosts Per
Network ID
Number of
networks
Class A 0 - 127 0xxxxxxx 0.0.0.0 – 127.255.255.255 255.0.0.0 224 - 2 27
Class B 128 - 191 10xxxxxx 128.0.0.0 – 191.255.255.255 255.255.0.0 216 - 2 214
Class C 192 - 223 110xxxxx 192.0.0.0 – 223.255.255.255 255.255.255.0 28 - 2 221
Class D 224 - 239 1110xxxx 224.0.0.0 – 239.255.255.255
Class E 240 - 255 1111xxxx 240.0.0.0 – 255.255.255.255
Five Different Classes
First Octet
decimal
(range)
First Octet
binary
(range)
IP range default
Subnet mask
Hosts Per
Network ID
(Usable
Addresses)
Number
Networ
0 - 127 0xxxxxxx 0.0.0.0 – 127.255.255.255 255.0.0.0 224 - 2
(16777214)
27-2
(126)
128 - 191 10xxxxxx 128.0.0.0 – 191.255.255.255 255.255.0.0 216
- 2
(65534)
214
-2
(16382)
192 - 223 110xxxxx 192.0.0.0 – 223.255.255.255 255.255.255.0 28
- 2
(254)
221
-2
(209715
224 - 239 1110xxxx 224.0.0.0 – 239.255.255.255
240 - 255 1111xxxx 240.0.0.0 – 255.255.255.255
• Class D is reserved for Multicasting
• Class E is Reserved for future use, or Research and Development
Purposes.
• Note: Class A addresses 127.0.0.0 to 127.255.255.255 cannot be
used and is reserved for loopback and diagnostic functions.
Priority Bit Concept
• To identify the range of each class a bit called priority bit is used.
• Priority Bit is the left most bits in the First Octet
• CLASS A priority bit is 0
• CLASS B priority bit is 10
• CLASS C priority bit is 110
• CLASS D priority bit is 1110
• CLASS E priority bit is 1111
CLASS A Range
• For Class A range : First bit of the first octet should be reserved
for the priority bit.
CLASS B Range
• For Class B range : First two bits of the first octet should be
reserved for the priority bit.
CLASS C Range
• For Class C range : First Three bits of the first octet should be
reserved for the priority bit.
CLASS D Range
• For Class D range : First four bits of the first octet should be
reserved for the priority bit.
CLASS E Range
• For Class E range : First four bits of the first octet should be
reserved for the priority bit.
Octet Format
Octet Format and subnet mask
No. Networks and Host formula
CLASS A – No. Networks and Host
• Class A Octet Format is N.H.H.H
• Network bits : 8 Host bits : 24
No. of Networks
= 28-1 (-1 is Priority Bit for Class A)
= 27
= 128 – 2 (-2 is for 0 & 127 Network)
= 126 Networks
• No. of Host
= 224
– 2 (-2 is for Network ID & Broadcast ID)
= 16777216 - 2
= 16777214 Hosts/Network
CLASS A 126 Networks &
16777214 Hosts/Nw CLASS A
126 Networks & 16777214
Hosts/Nw
CLASS B – No. Networks & Host
• Class A Octet Format is N.N.H.H
• Network bits : 16 Host bits : 16
• No. of Networks
= 216
-2 (-2 is Priority Bit for Class B)
= 214
= 16384 Networks
• No. of Host
= 216
– 2 (-2 is for Network ID & Broadcast ID)
= 65536 - 2
= 65534 Hosts/Network
CLASS B 16384 Networks &
65534 Hosts/Nw CLASS B
16384 Networks & 65534
Hosts/Nw
CLASS C – No. Networks & Host
• Class A Octet Format is N.N.N.H
• Network bits : 24 Host bits : 8
• No. of Networks
= 224
-3 (-3 is Priority Bit for Class C)
= 221
= 2097152 Networks
• No. of Host
=28
– 2 (-2 is for Network ID & Broadcast ID)
= 256 - 2
= 254 Hosts/Network
CLASS C 2097152 Networks
& 254 Hosts/Nw CLASS C
2097152 Networks & 254
Hosts/Nw
Network & Broadcast Address
• The network address is represented with all bits as ZERO in the host
portion of the address
• The broadcast address is represented with all bits as ONES in the host
portion of the address
• Valid IP Addresses lie between the Network Address and the Broadcast
Address.
• Only Valid IP Addresses are assigned to hosts/clients
Example and explanation- Class A
Example and explanation- Class B
Example and explanation- Class C
Private IP Addresses
Class Private Networks Subnet Mask Address Range
A 10.0.0.0 255.0.0.0
10.0.0.0 -
10.255.255.255
B 172.16.0.0 - 172.31.0.0 255.240.0.0
172.16.0.0 -
172.31.255.255
C 192.168.0.0 255.255.0.0
192.168.0.0 -
192.168.255.255
Every host on a network has
IP address and subnet mask
Subnet mask
• Subnet mask is used by a computer to determine if another
(target) computer is on the same network or on a different
network.
• The function of a subnet mask is to determine whether an IP
address exists on the local network or whether it must be routed
outside the local network.
• Subnet mask is a 32-bit long string of 1’s followed by 0’s.
• Subnet mask looks like IP address .It is 32-bit long ,same length as
IPv4 address.But they are different.
example
• Class c default subnet mask :255.255.255.0
in binary : 11111111.11111111.11111111.00000000
in shorthand : /24
• Class B default subnet mask :255.255.0.0
in binary : 11111111.11111111.00000000.00000000
in shorthand : /16
• Class A default subnet mask :255.0.0.0
in binary : 11111111.00000000.00000000.00000000
in shorthand : /8
/5 = 11111000.00000000.00000000.00000000 = 248.0.0.0
/20 = 11111111.11111111.11110000.00000000= 255.255.240.0
/25 = 11111111.11111111.11111111.10000000=255.255.255.128

IP address and IP class - Computer Networking

  • 1.
    IP Address andIP class Presented By Md. Shohel Rana M.Sc in CSE KUET Head of CST - NUBNGPI
  • 2.
    Five Different Classes ClassFirst Octet decimal (range) First Octet binary (range) IP range default Subnet mask Number of Hosts Per Network ID Number of networks Class A 0 - 127 0xxxxxxx 0.0.0.0 – 127.255.255.255 255.0.0.0 224 - 2 27 Class B 128 - 191 10xxxxxx 128.0.0.0 – 191.255.255.255 255.255.0.0 216 - 2 214 Class C 192 - 223 110xxxxx 192.0.0.0 – 223.255.255.255 255.255.255.0 28 - 2 221 Class D 224 - 239 1110xxxx 224.0.0.0 – 239.255.255.255 Class E 240 - 255 1111xxxx 240.0.0.0 – 255.255.255.255
  • 3.
    Five Different Classes FirstOctet decimal (range) First Octet binary (range) IP range default Subnet mask Hosts Per Network ID (Usable Addresses) Number Networ 0 - 127 0xxxxxxx 0.0.0.0 – 127.255.255.255 255.0.0.0 224 - 2 (16777214) 27-2 (126) 128 - 191 10xxxxxx 128.0.0.0 – 191.255.255.255 255.255.0.0 216 - 2 (65534) 214 -2 (16382) 192 - 223 110xxxxx 192.0.0.0 – 223.255.255.255 255.255.255.0 28 - 2 (254) 221 -2 (209715 224 - 239 1110xxxx 224.0.0.0 – 239.255.255.255 240 - 255 1111xxxx 240.0.0.0 – 255.255.255.255
  • 4.
    • Class Dis reserved for Multicasting • Class E is Reserved for future use, or Research and Development Purposes. • Note: Class A addresses 127.0.0.0 to 127.255.255.255 cannot be used and is reserved for loopback and diagnostic functions.
  • 5.
    Priority Bit Concept •To identify the range of each class a bit called priority bit is used. • Priority Bit is the left most bits in the First Octet • CLASS A priority bit is 0 • CLASS B priority bit is 10 • CLASS C priority bit is 110 • CLASS D priority bit is 1110 • CLASS E priority bit is 1111
  • 6.
    CLASS A Range •For Class A range : First bit of the first octet should be reserved for the priority bit.
  • 7.
    CLASS B Range •For Class B range : First two bits of the first octet should be reserved for the priority bit.
  • 8.
    CLASS C Range •For Class C range : First Three bits of the first octet should be reserved for the priority bit.
  • 9.
    CLASS D Range •For Class D range : First four bits of the first octet should be reserved for the priority bit.
  • 10.
    CLASS E Range •For Class E range : First four bits of the first octet should be reserved for the priority bit.
  • 11.
  • 12.
    Octet Format andsubnet mask
  • 13.
    No. Networks andHost formula
  • 14.
    CLASS A –No. Networks and Host • Class A Octet Format is N.H.H.H • Network bits : 8 Host bits : 24 No. of Networks = 28-1 (-1 is Priority Bit for Class A) = 27 = 128 – 2 (-2 is for 0 & 127 Network) = 126 Networks • No. of Host = 224 – 2 (-2 is for Network ID & Broadcast ID) = 16777216 - 2 = 16777214 Hosts/Network CLASS A 126 Networks & 16777214 Hosts/Nw CLASS A 126 Networks & 16777214 Hosts/Nw
  • 15.
    CLASS B –No. Networks & Host • Class A Octet Format is N.N.H.H • Network bits : 16 Host bits : 16 • No. of Networks = 216 -2 (-2 is Priority Bit for Class B) = 214 = 16384 Networks • No. of Host = 216 – 2 (-2 is for Network ID & Broadcast ID) = 65536 - 2 = 65534 Hosts/Network CLASS B 16384 Networks & 65534 Hosts/Nw CLASS B 16384 Networks & 65534 Hosts/Nw
  • 16.
    CLASS C –No. Networks & Host • Class A Octet Format is N.N.N.H • Network bits : 24 Host bits : 8 • No. of Networks = 224 -3 (-3 is Priority Bit for Class C) = 221 = 2097152 Networks • No. of Host =28 – 2 (-2 is for Network ID & Broadcast ID) = 256 - 2 = 254 Hosts/Network CLASS C 2097152 Networks & 254 Hosts/Nw CLASS C 2097152 Networks & 254 Hosts/Nw
  • 17.
    Network & BroadcastAddress • The network address is represented with all bits as ZERO in the host portion of the address • The broadcast address is represented with all bits as ONES in the host portion of the address • Valid IP Addresses lie between the Network Address and the Broadcast Address. • Only Valid IP Addresses are assigned to hosts/clients
  • 18.
  • 19.
  • 20.
  • 21.
    Private IP Addresses ClassPrivate Networks Subnet Mask Address Range A 10.0.0.0 255.0.0.0 10.0.0.0 - 10.255.255.255 B 172.16.0.0 - 172.31.0.0 255.240.0.0 172.16.0.0 - 172.31.255.255 C 192.168.0.0 255.255.0.0 192.168.0.0 - 192.168.255.255
  • 22.
    Every host ona network has IP address and subnet mask
  • 23.
    Subnet mask • Subnetmask is used by a computer to determine if another (target) computer is on the same network or on a different network. • The function of a subnet mask is to determine whether an IP address exists on the local network or whether it must be routed outside the local network. • Subnet mask is a 32-bit long string of 1’s followed by 0’s. • Subnet mask looks like IP address .It is 32-bit long ,same length as IPv4 address.But they are different.
  • 24.
    example • Class cdefault subnet mask :255.255.255.0 in binary : 11111111.11111111.11111111.00000000 in shorthand : /24 • Class B default subnet mask :255.255.0.0 in binary : 11111111.11111111.00000000.00000000 in shorthand : /16 • Class A default subnet mask :255.0.0.0 in binary : 11111111.00000000.00000000.00000000 in shorthand : /8
  • 25.
    /5 = 11111000.00000000.00000000.00000000= 248.0.0.0 /20 = 11111111.11111111.11110000.00000000= 255.255.240.0 /25 = 11111111.11111111.11111111.10000000=255.255.255.128