0% found this document useful (0 votes)
11 views

Classless

Uploaded by

padma
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

Classless

Uploaded by

padma
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 72

Limitations of Classful Addressing

• A block in class A address is too large for almost any organization. This means
most of the addresses in class A were wasted and were not used.

• A block in class B is also very large, probably too large for many of the
organizations that received a class B block.

• A block in class C is probably too small for many organizations.

• Class D addresses were designed for multicasting. Each address in this class is
used to define one group of hosts on the Internet.
MASK
• the length of the network id and host id (in bits) is predetermined in
classful addressing,

• we can also use a mask (also called the default mask),

• a 32-bit number made of contiguous 1s followed by contiguous 0s.


• The concept does not apply to classes D and E.
The mask can help us to find the network id and the host id For example,
the mask for a class A address has eight 1s, which means the first 8 bits of
any address in class A define the network id; the next 24 bits define the
host id.

The last column of Table shows the mask in the form /n where n can be
8, 16, or 24 in classful addressing. This notation is also called slash notation
or Classless Interdomain Routing (CIDR) notation.
IPv4 ADDRESSES

NetId and HostId


•The address is divided into Netid and
Hostid.
•These part are of varying lengths,
depending on the class.
Dose not apply to classes D and E
Classful Addressing: Classes and Blocks

Mask (default mask)


• Help us to find the NetId and HostId
• Mask: 32-bit made of 1s followed by 0s.
• Dose not apply to classes D and E.
• CIDR(Classless Interdomain Routing): used to show the
mask in the form /n (n=8,16,24)
CIDR Dotted-decimal Binary Class
8/ 255.0.0.0 11111111 00000000 00000000 00000000 A
16/ 255.255.0.0 11111111 11111111 00000000 00000000 B
24/ 255.255.255.0 11111111 11111111 11111111 C
00000000
Classful Addressing: Network address

The network address is an address that define the


network itself to the reset of the internet

The network address has the following properties:


1. All hostid bytes are 0’s
2. It is the first address in the block
3. It cannot be assigned to a host
4. Given the network address, we can find
the class of the address
Classful Addressing: Network address

Find the network address for the following:


a. 132.6.17.85
b. 23.56.7.91
a. The class is B. The first 2 bytes defines the Netid.
We can find the network address by replacing the hostid
bytes (17.85) with 0s.
Therefore, the network address is 132.6.0.0

b. The class is A. Only the first byte defines the


Netid. We can find the network address by replacing the
hostid bytes (56.7.91) with 0s.
Therefore, the network address is 23.0.0.0
Classful Addressing: Network address
Classful addressing : subnetting

IP addresses are designed with two


levels of hierarchy.
Figure 19.21 Addresses in a network with and without subnetting
Figure 19.22 Hierarchy concept in a telephone number
Classless Addressing
• A large organization is given with large number of addresses.
• A Home may be given with two address.
• ISP may be given with thousands of address.
Classless IP address

The use of classful IP addressing has created many problems.

The main of these is that the range of addresses in class A, B, and C is multiples of 256. Thus the size of an address block is
usually fixed.

So, since 1996 Internet authorities announce another addressing architecture.

This architecture overcomes the problems of classful IP addressing.


Here the address space is divided into blocks of different sizes.

An organization (for example) is given (usually by an ISP) a block of addresses that is suitable for its needs.
The block belongs to no class and thus this addressing architecture is named classless IP addressing.

Number of addresses in the block is a power of 2

but the main restriction in classless IP addressing is that the first address in the block (block address or network address)
must be divisible by the number of addresses in this block.
Classless Address
Example
Mask
Mask
Finding the block
To find the block of addresses in classless addressing.

It is necessary to find the followings:

 First address in the block: It can be found by ANDing any address in the block with the
subnet mask

 Number of addresses in the block: Actual number of addresses in the block is while the
useable number of addresses in the block equals the actual number of addresses in the
block minus two.

 Last address in the block: It can be found by adding the 1st address in the block with the
Example: Find the block if one of the addresses is 190.87.140.202 / 29.

Finding the first address: is found by ANDing the address (190.87.140.202) with the
subnet mask (255.255.255.248).
The first address in the block is (190.87.140.200 / 29)

Number of addresses in the block

Last address in the block can be found by adding the 1st address in the
block (190.87.140.200) with the complement of the subnet mask (0.0.0.7)

The last address in the block is (190.87.140.207 / 29)


Example
Example
Example
Example
Example
Example (Try yourself)
Address Depletion Problem
The fast growth of the Internet led to the near depletion of the available
addresses in classful addressing scheme.

Yet the number of devices on the Internet is much less than the 2^32 address
space.

We have run out of class A and B addresses, and a class C block is too small for
most midsize organizations.

One solution that has alleviated the problem is the idea of classless addressing.

Classful addressing, which is almost obsolete, is replaced with classless


addressing.
Classless Addressing
To overcome address depletion and give more organizations access to
the Internet, classless addressing was designed and implemented.

In this scheme, there are no classes, but the addresses are still granted
in blocks.
Address Blocks
In classless addressing, when an entity, small or large, needs to be
connected to the Internet, it is granted a block (range) of addresses.
The size of the block (the number of addresses) varies based on the
nature and size of the entity.

For example, a household may be given only two addresses; a large


organization may be given thousands of addresses.

An ISP, as the Internet service provider, may be given thousands or


hundreds of thousands based on the number of customers it may serve.
The Internet authorities impose three restrictions
on classless address blocks:

1. The addresses in a block must be contiguous, one after another.

2. The number of addresses in a block must be a power of 2 (1, 2, 4, 8, .

3. The first address must be evenly divisible by the number of addresses.


• Figure shows a block of addresses, in both binary
and dotted-decimal notation, granted to a small
business that needs 16 addresses.

• We can see that the restrictions are applied to this


block.

• The addresses are contiguous.

• The number of addresses is a power of 2 (16 =


2^4), and the first address is divisible by 16.

• The first address, when converted to a decimal


number, is 3,440,387,360, which when divided by
Mask
A better way to define a block of addresses is to select any address in the block and the mask.

a mask is a 32-bit number in which the n leftmost bits are 1s and the 32 - n rightmost bits are 0s.
However, in classless addressing the mask for a block can take any value from 0 to 32.

It is very convenient to give just the value of n preceded by a slash (CIDR notation).
Classless inter-domain routing

In 1Pv4 addressing, a block of addresses can be defined as x.y.z.t/n in which x.y.z.t defines one of
the addresses and the /n defines the mask.

The address and the /n notation completely define the whole block (the first address, the last
address, and the number of addresses).
• First Address:

The first address in the block can be found by setting the 32 - n rightmost bits in
the binary notation of the address to 0s.
Example:1
A block of addresses is granted to a small organization. We know that one of the
addresses is 205.16.37.39/28. What is the first address in the block?
First address

205.16.37.39/28.

The binary representation of the given address is

11001101 00010000 00100101 00100111.

If we set 32 - 28 rightmost bits to 0,


we get
11001101 0001000 00100101 0010000 or 205.16.37.32. This is actually
the block shown in Figure
Last Address
The last address in the block can be found by setting the 32 - n
rightmost bits in the binary notation of the address to 1s
Find the last address for the block

The binary representation of the given address is

11001101 00010000 00100101 00100111.

If we set 32 - 28 rightmost bits to 1, we get 11001101 00010000 00100101 0010 1111 or


205.16.37.47. This is actually the block shown in Figure
Number of Addresses
The number of addresses in the block is the difference between the
last and first address

It can easily be found using the formula


Find the number of addresses in Example
Example -2
IPv4 classless address in CIDR notation

i.e. 167.199.170.82/27
and from the given address calculate the number of
addresses in the corresponding network,
the first address of the network and
last address of the network.
number of addresses
The number of addresses in the network can be
calculated with the formula
N=232-n
=232-27
=25
=32
there are 32 addresses in the corresponding network
block and it can be assigned to 32 hosts in the network.
The first address of the network can be calculated with the
formula below:

First address = (given address) AND (network mask)


The given address is 167.199.170.82
The last address can be calculated with the formula below:
Last address = (given address) OR [NOT (network mask)]
Now, let us verify the rules for CIDR blocks :

1. The number of addresses in a block must be in power of 2 i.e. in the


above case the number of addresses in the block is 32 which is equal to
25 .
2. The first address of block must be divisible by the number size of the
block.
So, the first address of the block 167.199.170.64 is divisible by 2 5 as the last
five bits of 10100111 11000111 10101010 01000000 address (binary
notation of first address 167.199.170.64) is ‘0’.

The block (first address is 167.199.170.64 and last address is


167.199.170.95) contain contiguous 32 addresses.
Public IP
public IP address is assigned to a device directly connected to the internet,
allowing it to communicate with other devices on the internet.

Public IP addresses are unique and globally routable, meaning they can be
accessed from anywhere on the internet.

They are provided by Internet Service Providers (ISPs) and are used to identify
devices on the internet.
Private IP
A private IP address is used within a local network, such as a home or
office network, to identify and communicate with devices within that
network.

Private IP addresses are not directly accessible from the internet.

They are typically assigned by network administrators and reserved for


private network use.
Private IP addresses are not unique globally.
Many devices can have the same private IP address within different
networks,
as long as they don't need to communicate with each other directly over
the internet.
The most commonly used private IP address ranges are:

10.0.0.0 to 10.255.255.255 (10.0.0.0/8)


172.16.0.0 to 172.31.255.255 (172.16.0.0/12)
192.168.0.0 to 192.168.255.255 (192.168.0.0/16)
Network address
Network Address Translation
The number of home users and small businesses that want to use the Internet is ever increasing.

In the beginning, a user was connected to the Internet with a dial-up line, which means that she was
connected for a specific period of time.

An ISP with a block of addresses could dynamically assign an address to this user. An address was given
to a user when it was needed.

But the situation is different today. Home users and small businesses can be connected by an ADSL line
or cable modem.

In addition, many are not happy with one address; many have created small networks with several
hosts and need an IP address for each host.

With the shortage of addresses, this is a serious problem. A quick solution to this problem is called
network address translation (NAT).
Network Address Translation
A quick solution to this problem is called network address translation (NAT).

 NAT enables a user to have a large set of addresses internally and one
address, or a small set of addresses, externally.

The traffic inside can use the large set; the traffic outside, the small set.
 To separate the addresses used inside the home or business and the ones
used for the Internet, the Internet authorities have reserved three sets of
addresses as private addresses
Network Address Translation
Any organization can use an address out of this set without permission
from the Internet authorities.
Everyone knows that these reserved addresses are for private
networks.
 They are unique inside the organization, but they are not unique
globally.
No router will forward a packet that has one of these addresses as the
destination address.
 The site must have only one single connection to the global Internet
through a router that runs the NAT software.
Network Address Translation
Network Translation Table (NAT)
Translation Table
Using one IP address
Example
Using Both IP address and Port
numbers (NAT..)
Translation Table
IPV6 addresses
Structure
IPV6 address
Address Space
Type prefixes for IPv6 address
INTERNETWORKING
INTERNETWORKS
INTERNETWORKS
INTERNETWORKS
Routing Table
Routing Table
Internet as a Datagram Network

You might also like