Professional Documents
Culture Documents
Each class occupy occupies some part of the whole address space
1 08/08/2020
In classful addressing the address space is
divided into 5 classes:
A, B, C, D, and E.
2 08/08/2020
Figure 4-3
3 08/08/2020
Figure 4-4
4 08/08/2020
Figure 4-2
5
Example 5
6 08/08/2020
Example 5
Solution
In class A, only 1 bit defines the class. The remaining 31 bits are
available for the address. With 31 bits, we can have 231
or 2,147,483,648 addresses.
7
Example 6
Solution
• 00000001 00001011 00001011 11101111
1st is 0, hence it is Class A
• 11000001 00001011 00001011 11101111
1st and 2nd bits are 1, and 3rd bit is 0 hence, Class C
8 08/08/2020
Figure 4-5
9 08/08/2020
Example 7
Solution
• 158.223.1.108
1st byte = 158 (128<158<191) class B
• 227.13.14.88
1st byte = 227 (224<227<239) class D
10 08/08/2020
Figure 4-6
11 08/08/2020
Class and Blocks
Each class A is divided into a fixed number of blocks, with fixed size.
Class A is divided into 128 blocks, with each block having a different
NetID.
– The first covers address from 0.0.0.0 – 0.255.255.255 (netid 0)
– The second covers 1.0.0.0 – 1.255.255.255 (netid 1)
– The last block covers 127.0.0.0 – 127.255.255.255 (netid 127)
Note, for each block the first byte (NetID) is the same, but the other 3
bytes (HostID) can take any value in the given range.
The first and the last blocks are reserved for special purposes.One
block (netid 10) is used for private addresses.The remaining 125
blocks can be assigned to organisation (total number of organisation)
Each block contains 16, 777, 216 addresses, organization should be
really large (larger than the needs of most organisation)
12
All-Zeros Address
0.0.0.0
The block 0.0.0.0, which contains only one single address, is
reserved for communication when a host needs to send an
IPv4 packet but it does not know its own address.
This is normally used by a host at bootstrap time when it does
not know its IPv4 address.
The host sends an IPv4 packet to a bootstrap server (called
DHCP server as discussed in using this address as the source
address and a limited broadcast address as the destination
address to find its own address
13
All-Ones Address: Limited
Broadcast Address
255.255.255.255
The block 255.255.255.255, which contains one
single address, is reserved for limited broadcast
address in the current network.
A host that wants to send a message to every other
host can use this address as a destination address in
an IPv4 packet
However, a router will block a packet having this type
of address to confine the broadcasting to the local
network.
14
Figure 4-7
Blocks in class A
15
Direct Broadcast Address
The last address in a block or subblock (with the suffix set all to 1s) can be
used as a
direct broadcast address. This address is usually used by a router to send
a packet to
all hosts in a specific network. All hosts will accept a packet having this type
of destination
address. Note that this address can be used only as a destination address in
an IPv4
packet. In Figure 5.38, the router sends a datagram using a destination IPv4
address
with a suffix of all 1s. All devices on this network receive and process the
datagram.
16 08/08/2020
Network Address
17
Millions of class A addresses
are wasted.
18 08/08/2020
Class B
19
Figure 4-8
Blocks in class B
20
Many class B addresses
are wasted.
21 08/08/2020
Class C
23
The number of addresses in
a class C block
is smaller than
the needs of most organizations.
24 08/08/2020
Class D addresses
are used for multicasting;
there is only
one block in this class.
25 08/08/2020
Class E addresses are reserved
for special purposes;
most of the block is wasted.
26 08/08/2020
Network Addresses
28
Example 8
29 08/08/2020
Figure 4-5
30
Example
Since 200 is between 192 and 223, the class of the address is C
The number of addresses in this block is 256
The first address is 200.11.8.0
The last address is 200.11.8.255
31 08/08/2020
Mask
32
Network Mask
33
Mask
34
Figure 4-10
Masking concept
35
Figure 4-11
AND operation
36
The network address is the
beginning address of each block.
It can be found by applying
the default mask to
any of the addresses in the block
(including itself).
It retains the netid of the block
and sets the hostid to zero.
37
Default Mak
38
Example
A router receives a packet with the destination
address 201.24.67.32. Show how the router finds the
network address of the packet.
39