SYIT PRACTICAL COMPUTER NETWORK
Practical 1: IPv4 Addressing and Subnetting
PRACTICAL NO 1A
An address in a block is given as 180.8.17.9. Find the number of addresses in
the block, the first address, and the last address
Solution:
The given address is a Class B address therefore n= 16
1) No of addresses:
N = 232-n
= 232-16
= 216
= 65536
Therefore, the number of addresses are = 65536 addresses
2) First address:
For class B address netid = 16
Therefore network mask is 255.255.0.0
To find the first address we logically AND the given address with the
network mask
Given 180 8 17 9
address
Network 255 255 0 0
mask
AND 180 8 0 0
operation
Therefore, the first address is 180.8.0.0
3) Last address:
To find the last address we logically OR the given address with the
COMPLEMENT of the network mask
Network mask = 255.255.0.0
ISMAIL H P Page 1
SYIT PRACTICAL COMPUTER NETWORK
Network 255 255 0 0
mask
Complement 0 0 255 255
of mask
Given address 180 8 17 9
Complement of 0 0 255 255
mask
OR operation 180 8 255 255
Therefore, the last address is 180.8.255.255
Hence, we conclude that
a) Network address: The first address is the Network Address 180.8.0.0
b) Network broadcast address: The last address is the Network broadcast address
180.8.255.255
c) Total number of host bits: 16
d) Number of hosts: 65534 (65536 – 2)
ISMAIL H P Page 2
SYIT PRACTICAL COMPUTER NETWORK
PRACTICAL NO 1B
An organization is granted the block 130.34.12.64/26. The organization needs
four sub networks, each with an equal number of hosts. Design the sub
networks and find the information about each network.
Solution:
The given address is address of type classless addressing
with n= 26
1) No of addresses:
N = 232-n
= 232-26
= 26
= 64
Therefore, the number of addresses is = 64 addresses
2) First address:
For the given case n = 26
Therefore, network mask is 255.255.255.192
To find the first address we logically AND the given
address with the network mask
Given 130 34 12 64
address
Network 255 255 255 192
mask
AND 130 34 12 64
operation
Therefore the first address is 130.34.12.64
ISMAIL H P Page 3
SYIT PRACTICAL COMPUTER NETWORK
3) Last address:
Network mask is 255.255.255.192
Network 255 255 255 192
mask
Complement 0 0 0 63
of mask
To find the last address we logically OR the given
address with the Complement of the network mask
Given 130 34 12 64
address
Network 0 0 0 63
mask
OR 130 34 12 127
operation
Therefore the last address is 130.34.12.127
ISMAIL H P Page 4
SYIT PRACTICAL COMPUTER NETWORK
4) Creating sub-networks:
In this case we need to create 4 sub-networks with equal number of
hosts
Total number of hosts N = 64
Therefore, number of hosts in each sub-network NSUB = 16
We calculate the sub-netid for each network as follows nSUB= n + log2(N/ NSUB)
= 26 + log2(64/16)
= 28
Therefore, the given sub-networks are
Sub-network First address Last address
1 130.34.12.64 130.34.12.79
2 130.34.12.80 130.34.12.95
3 130.34.12.96 130.34.12.111
4 130.34.12.112 130.34.12.127
a. The subnet address of this subnet: The First address of each subnet
b. The broadcast address of this subnet: The Last address of each subnet
c. The range of host addresses for this subnet: Shown in the above table
d. The maximum number of subnets for this subnet mask: 4
e. The number of hosts for each subnet: 14
f. The number of subnet bits: 28
g. The number of this subnet: Mentioned in the above table
ISMAIL H P Page 5