Module 3 Addressing Continued
Module 3 Addressing Continued
and
Classless Addressing
Address Depletion
• What is Address Deletion Problem in Classful
Addressing?
Solutions:
Short term Solution
• Use of Private Addresses
• Subnetting
• Supernetting
• Use of NAT and DHCP
• Classless Addressing
The mask is
11111111 11111111 11111111 11000000
or
255.255.255.192.
The number of subnets is 1024.
The number of addresses in each subnet is 26
(6 is the number of 0s) or 64.
See Figure 5.9
Example 4
Example 5
• Initial mask : 24
• New mask is /27
• No of bits used for subnetting = 27-24 = 3
• Total Subnets created = 23 = 8
• No. of IP Address in each subnet = 232-27 = 25 = 32
Solution 5
Default Mask
255.255.255.0
CLASSLESS ADDRESSING
Figure 5-13
Variable-length blocks
Number of Addresses in a Block
There is only one condition on the number
of addresses in a block; it must be a power
of 2 (2, 4, 8, . . .).
Slash notation or CIDR notation
Slash notation is also called
CIDR
notation.
Example 11
A small organization is given a block with the beginning
address and the prefix length 205.16.37.24/29 (in slash
notation). What is the range of the block?
Solution
The beginning address is 205.16.37.24. To find the
last address we keep the first 29 bits and change the
last 3 bits to 1s.
Beginning:11001111 00010000 00100101 00011000
Ending : 11001111 00010000 00100101 00011111
There are only 8 addresses in this block.
Example 12
We can find the range of addresses in Example 11 by
another method. We can argue that the length of the suffix
is 32 - 29 or 3. So there are 23 = 8 addresses in this block.
If the first address is 205.16.37.24, the last address is
205.16.37.31 (24 + 7 = 31).
A block in classes A, B, and C
can easily be represented in slash
notation as
A.B.C.D/ n
where n is
either 8 (class A), 16 (class B), or
24 (class C).
Example 13
What is the network address if one of the addresses is
167.199.170.82/27?
Solution
The prefix length is 27, which means that we must
keep the first 27 bits as is and change the remaining
bits (5) to 0s. The 5 bits affect only the last byte.
The last byte is 01010010. Changing the last 5 bits
to 0s, we get 01000000 or 64. The network address
is 167.199.170.64/27.
Example 14
An organization is granted the block 130.34.12.64/26.
The organization needs to have four subnets. What are the
subnet addresses and the range of addresses for each
subnet?
Solution
Design the subblocks and give the slash notation for each
subblock. Find out how many addresses are still available
after these allocations.
Solution
Group 1
For this group, there are 64 customers and each
customer needs 256 addresses.
Total addresses = 64 256 = 16,384 = 214
new mask = 32-14=/18
First address of Group 1 : 190.100.0.0/18
Last address of Group 1 : 190.100.63.255/18
Solution (Continued)
Group 2
For this group, there are 128 customers and each
customer needs 128 addresses.
Total addresses = 128 128 = 16,384 = 214
new mask = 32-14=/18
First address of Group 1 : 190.100.64.0/18
Last address of Group 1 : 190.100.127.255/18
Solution (Continued)
Group 3
For this group, there are 128 customers and each
customer needs 64 addresses.
Total addresses = 128 64 = 8192 = 213
new mask = 32-13=/19
First address of Group 1 : 190.100.128.0/19
Last address of Group 1 : 190.100.159.255/19
Step 1:
Solution
Group 1
For this group, there are 64 sub blocks .
Old Subnet mask = /18
New subnet mask = 18+log(26 )=18+6=24
01: 190.100.0.0/24 ➔190.100.0.255/24
02: 190.100.1.0/24 ➔190.100.1.255/24
…………………………………..
64: 190.100.63.0/24➔190.100.63.255/24
Solution (Continued)
Group 2
For this group, there are 128 sub blocks .
Old Subnet mask = /18
New subnet mask = 18+log(27 )=18+7=25
001: 190.100.64.0/25 ➔190.100.64.127/25
002: 190.100.64.128/25 ➔190.100.64.255/25
003: 190.100.127.128/25 ➔190.100.127.255/25
Solution (Continued)
Group 3
For this group, there are 128 sub blocks .
Old Subnet mask = /19
New subnet mask = 19+log(27 )=19+7=26
001:190.100.128.0/26 ➔190.100.128.63/26
002:190.100.128.64/26 ➔190.100.128.127/26
…………………………
128:190.100.159.192/26 ➔190.100.159.255/26
Step 2:
Solution (Continued)
Why Supernetting?
• The main purpose of supernetting is reducing the size of the
routing table on routers
• It saves memory and processing resources on routing devices.
• also helped slow down the exhaustion of IP addresses through the use
of Classless Inter-Domain Routing (CIDR).
Rules: (For Class C Addresses)
** The number of blocks must be a power of 2 (1,
2, 4, 8, 16, . . .).
** The blocks must be contiguous in the address
space (no gaps between the blocks).
** The third byte of the first address in the
superblock must be evenly divisible by the number
of blocks. In other words, if the number of blocks is
N, the third byte must be divisible by N.
Example 5
Solution