Classless
Classless
• 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.
• 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,
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
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.
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.
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.
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)
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)
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.
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.
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.
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:
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.
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