Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Notes  >  Computer Networks  >  IP Addressing: Classless Addressing

IP Addressing: Classless Addressing | Computer Networks - Computer Science Engineering (CSE) PDF Download

Network Address and Mask


  • Network address: It identifies a network on internet.  Using this, we can find range of addresses in the network and total possible number of hosts in the network.
  • Mask: It is a 32-bit binary number that gives the network address in the address block when AND operation is bitwise applied on the mask and any IP address of the block.

The default mask in different classes are 

  • Class A – 255.0.0.0
  • Class B – 255.255.0.0
  • Class C – 255.255.255.0

Example: Given IP address 132.6.17.85 and default class B mask, find the beginning address (network address).

The default mask is 255.255.0.0, which means that the only the first 2 bytes are preserved and the other 2 bytes are set to 0. Therefore, the network address is 132.6.0.0.

Subnetting


Dividing a large block of addresses into several contiguous sub-blocks and assigning these sub-blocks to different smaller networks is called subnetting. It is a practice that is widely used when classless addressing is done.

Classless Addressing


To reduce the wastage of IP addresses in a block, we use sub-netting. What we do is that we use host id bits as net id bits of a classful IP address. We give the IP address and define the number of bits for mask along with it (usually followed by a ‘/’ symbol), like, 192.168.1.1/28. Here, subnet mask is found by putting the given number of bits out of 32 as 1, like, in the given address, we need to put 28 out of 32 bits as 1 and the rest as 0, and so, the subnet mask would be 255.255.255.240.

Some values calculated in subnetting


  • Number of subnets: 2(Given bits for mask – No. of bits in default mask)
  • Subnet address: AND result of subnet mask and the given IP address
  • Broadcast address: By putting the host bits as 1 and retaining the network bits as in the IP address
  • Number of hosts per subnet: 2(32 – Given bits for mask) – 2
  • First Host ID: Subnet address + 1 (adding one to the binary representation of the subnet address)
  • Last Host ID: Subnet address + Number of Hosts

Example: Given IP Address – 172.16.0.0/25, find the number of subnets and the number of hosts per subnet. Also, for the first subnet block, find the subnet address, first host ID, last host ID and broadcast address.

This is a class B address. So, no. of subnets = 2(25-16) = 29 = 512.

No. of hosts per subnet = 2(32-25) – 2 = 27 – 2 = 128 – 2 = 126

For the first subnet block, we have subnet address = 0.0, first host id = 0.1, last host id = 0.126 and broadcast address = 0.127

The document IP Addressing: Classless Addressing | Computer Networks - Computer Science Engineering (CSE) is a part of the Computer Science Engineering (CSE) Course Computer Networks.
All you need of Computer Science Engineering (CSE) at this link: Computer Science Engineering (CSE)
21 videos|113 docs|66 tests

Top Courses for Computer Science Engineering (CSE)

21 videos|113 docs|66 tests
Download as PDF
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev
Related Searches

MCQs

,

video lectures

,

Exam

,

Objective type Questions

,

study material

,

Summary

,

mock tests for examination

,

Sample Paper

,

Viva Questions

,

ppt

,

past year papers

,

Previous Year Questions with Solutions

,

Important questions

,

Extra Questions

,

pdf

,

shortcuts and tricks

,

practice quizzes

,

Free

,

IP Addressing: Classless Addressing | Computer Networks - Computer Science Engineering (CSE)

,

IP Addressing: Classless Addressing | Computer Networks - Computer Science Engineering (CSE)

,

IP Addressing: Classless Addressing | Computer Networks - Computer Science Engineering (CSE)

,

Semester Notes

;