In: Computer Science
A company has been granted a block of classless addresses which starts at 198.87.24.0/23. Create the following 4 subnets by calculating the subnet address for each subnet including the prefix. Create a table to organise your answer. Show your working in the space provided.
a) 1 subnet with 256 addresses (1 mark correct subnet, 0.5 mark good calcs)
b) 1 subnet with 128 addresses (1 mark correct subnet, 0.5 mark good calcs)
c) 2 subnets with 64 addresses each (1 mark per correct subnet, 0.5 mark good calcs per subnet)
Subnet Address / Network Address |
Network mask | Range | No. of address |
198.87.24.0/24 | 255.255.255.0 | 198.87.24.0 - 198.87.24.255 | 256 |
198.87.25.0/25 | 255.255.255.128 | 198.87.25.0 - 198.87.25.127 | 128 |
198.87.25.128/26 | 255.255.255.192 | 198.87.25.128 - 198.87.25.191 | 64 |
198.87.25.192/26 | 255.255.255.192 | 198.87.25.192 - 198.87.25.255 | 64 |
Given IP: 198.87.24.0/23
The network has a total of 32 bits, split into 4 octets. Each octet ranges from value 0 - 255.
As per the CIDR notation, 23 bits are network bits.
So, subnet mask: 255:255:254:0
and 9 bits are host bits.
There are 512 addresses in this netrwork ().
a) First subnet requires 256 addresses.
Given IP in bits : 11000110.01010111.0001100 0.00000000
The red bits are network bits and green bits are host bits.
For 256 addresses 8 bits are needed ().
The right most bits are considered for this. Taking 8 bits out of
the 9 host bits from right as hosts:
11000110.01010111.0001100 0.00000000
The green bits are the new host bits. The blue bit will be considered as a network bit,making 24 network bits.
Converting back to decimals, the first subnet will be: 198.87.24.0 - 198.87.24.255
Network address : 198.87.24.0/24
This subnet will give 256 addresses including network and broadcast address.
b) Second subnet requires 128 addresses.
198.87.24.0 - 198.87.24.255 have already been used for first subnet. The next address is 198.87.25.0/24. The IP in bits : 11000110.01010111.00011001. 00000000
The red bits are network bits and green bits are host bits.
For 128 addresses 7 bits are needed ().
The right most bits are considered for this. Taking 7 bits out of
the 8 host bits from right as hosts:
11000110.01010111.00011001. 0 0000000
The green bits are the new host bits. The blue bit will be considered as a network bit,making 25 network bits.
Converting back to decimals, the second subnet will be: 198.87.25.0 - 198.87.25.127
Network address : 198.87.25.0/25
This subnet will give 128 addresses including network and broadcast address.
c) Third and fourth subnet requires 64 addresses in each.
Third:
Addresses till 198.87.25.127 have already been used for second subnet. The next address is 198.87.25.128/25. The IP in bits : 11000110.01010111.00011001 .1 0000000
The red bits are network bits and green bits are host bits.
For 64 addresses 6 bits are needed ().
The right most bits are considered for this. Taking 6 bits out of
the 7 host bits from right as hosts:
11000110.01010111.00011001 .1 0 000000
The green bits are the new host bits. The blue bit will be considered as a network bit,making 26 network bits.
Converting back to decimals, the third subnet will be: 198.87.25.128 - 198.87.25.191
Network address : 198.87.25.128/26
This subnet will give 64 addresses including network and broadcast address.
Fourth:
Addresses till 198.87.25.191 have already been used for third subnet. The next address is 198.87.25.192. The IP in bits :
11000110.01010111.00011001.11 000000
The rest of the 64 bits in the nertwork can be used for this sub net.
Fourth subnet : 198.87.25.192 - 198.87.25.255
Network address : 198.87.25.192/26