Network Protocols and Communication
Practice Quiz + correction
Exercise 1
For the following addresses :
● 145.245.45.225
● 202.2.48.149
● 97.124.36.142
Give :
1. Address class.
2. Default network mask.
3. Network address.
4. Modified mask if networks have (1) 60, (2) 15 and (3) 200 subnets respectively.
5. Subnet address and number.
6. The number of the machine on the subnet.
7. Usable address ranges for the first three subnets.
Solution
● For address 145.245.45.225
, The first byte of the address gives a binary value of 10010001. The first two bits indicate that
this is a class B address.
The default mask for a class B is: 255.255.0.0 (/16). In binary:
11111111.11111111.00000000.00000000.
To find the default network address, we'll apply the default network mask to the IP address using
an "and" function. We'll get: 145.245.0.0.
To obtain 60 network subdivisions, we need to increase the network mask by 6 bits. Indeed, 26
gives 64, which is the smallest exponent of 2 greater than 60. The subnet mask will therefore be
255.255.252.0 (/22). In binary: 11111111.11111111.11111100.00000000.
To find the subnet address, we'll apply the subnet mask to the IP address using an "and"
function. We'll get: 145.245.44.0. To find the subnet number, we'll consider only the dedicated
subnet bits of the IP address. You'll get: 11.
To find the machine number in the subnet, we'll only consider the bits dedicated to the machine
in the IP address. We'll get: 481.
To determine the subnet addresses, we'll vary the 6 subnet bits from 000000 to 111111. Within
each subnet, to determine all usable addresses, we'll vary the 10 machine bits from
0000000001 to 1111111110. This will give us :
Network address 1st usable address Last usable address
145.245.0.0 145.245.0.1 145.245.3.254
145.245.4.0 145.245.4.1 145.245.7.254
145.245.8.0 145.245.8.1 145.245.11.254