CP1402 - CP5631 Week 06 Prac - Subnetting Prac 01
CP1402 - CP5631 Week 06 Prac - Subnetting Prac 01
Given a subnet mask and an IP address, the router will AND the bits together to work out the network
address.
A)
B)
C)
D)
E)
F)
Next Page
G)
For example, if we have a class C network 200.200.200.0/24. N = 24. If we borrow 3 bits for subnets, S = 3
and H = 5.
Given numbers S and H, we can determine the size of the subnets we’ve created, and how many there are.
Two addresses are usually reserved in a subnet, the subnet address, where all the host bits are 0, and the
broadcast address, where all the host bits are 1.
Number of subnets 2S 23 = 8
Suppose we have a building with four departments, and want to therefore create four subnets. We have the
200.200.200.0/24 block to split up. We need to choose S so that we get four: 2S = 4, so S = 2. We know
that N = 24, because we started with a /24 network. Therefore H = 32 – 24 – 2 = 6, and hence each subnet
consists of 26 = 64 addresses, of which 62 are usable. We’ve borrowed 2 bits from hosts, so the subnet
mask for our subnets is /26 (24 + 2) or 255.255.255.192 (note that 256 – 64 = 192).
Is there an easier way than looking at the binary to work out the subnet and broadcast addresses? Yes, just
use the subnet sizes. Subnet 0 starts at 200.200.200.0 and the subnet size is 64, so the next subnet begins
at 200.200.200.64. The broadcast always precedes the subnet address of the next subnet, so subnet 0 has
a broadcast address of 200.200.200.63. The usable addresses are all those between the subnet address
and broadcast address, so these are 200.200.200.1 to 200.200.200.63.
Task 2
Suppose we need to create 16 subnets from the class C block 198.4.23.0/24. Determine the following
values:
S ...
H ...
A subnet size can only be a power of 2, so we need to find the next largest power of two: 211 = 2048. This
means we need to leave 11 host bits (H = 11). We start with a class B block, so N = 16, and we know N + S
+ H = 32, so a little bit of algebra gives us S = 5, so we’re borrowing 5 bits for subnetting. In slash notation,
our subnet mask will be /21 (16 + 5), which in octet notation is 11111111.11111111.11111000.00000000 =
255.255.248.0.
When working out subnetting for subnets of size more than 256, it can be simpler to think in terms of the
number of class C blocks. Notice that 2048 = 8 × 256, so each of our subnets is equivalent 8 class C
blocks. The subnet mask is 255.255.248.0, and 248 = 256 – 8. Each of our subnets begins at an address
where the third octet is a multiple of 8.
Task 3
Consider the scenario above, but suppose we need to accommodate 3000 hosts per subnet.
#0 155.155.00000000.00000000 155.155.0.0