The Sunday Subnetting challenge: Less is more

A little subnetting challenge for today! Time to brush off the weekend cobwebs, put the hangover to one side and exercise the grey matter!

This one is all about address space restrictions and conservation of IPs.

Network topology:

Subnetting: Less is More!


Using the network, with the smallest (but usable) network mask, set up IP addressing on all the nodes, and make sure that one node can ping its neighbor. If you want to confirm end to end connectivity through an IGP, then go ahead!

Click here to download the UNL file from the forum.



We need to use a /27 subnet here ( But why?

A /27 subnet will give us 32 addresses. Less the subnet and broadcast address, this leaves us with 30 usable host addresses. A /28 would not give us enough addresses, and a /26 would give us too many.
We can work out the number of addresses we need by counting the number of links in the network that require IP addresses (16), and work out the subnet as follows.

On a piece of paper, write out the octet numbers:
128 64 32 16 8 4 2 1
Then start adding the numbers from the right to the left, until we get to a place that gives us enough addresses:
1+2 = 3 (not enough)
1+2+4 = 7 (not enough)
1+2+4+8 = 15 (not enough)
1+2+4+8+16 = 31 (perfect!)
Then take this number away from 255, to give us the subnet mask:

We now have our subnet mask of!


We cannot just start addressing the interfaces using this subnet though, as we cannot have two interfaces with overlapping subnets. Instead we need to further sub-divide our subnet into four groups. We need to address R1 to R2, R2 to R3 and R4, and the office network.

R1 to R2 will need a point-to-point link (a /31), as will R2 to R3 and R2 to R4.

We use /31 subnet masks ( as these give us just two addresses, which is ideal. Therefore we can number the links as follows:

R1 (e0/0): - R2 (e0/0):
R2 (e0/1): - R3 (e0/0):
R2 (e0/2): - R4 (e0/0):

Notice that I have started R1 with an IP address of We cannot number R1 with, and R2 with, as these are in different subnets. We could have used an, but I don't really like numbering hosts with an IP address with .0 (though it is valid).

The office will use a larger subnet masks

There are 10 interfaces here, so using the same method as above, we need to borrow the first four octets, which will give us 15 addresses (/28), so the subnet for this will be 255-15, which gives us a subnet mask of We cannot start from where the first set ends though, as there will be an overlap. This is why it makes sense to work out the largest section first. Nevertheless, let's work out where we need to start from, it makes for good practice.

With a subnet mask of, we can have two /28 subnets, each with 16 addresses in them (14 of which as usable). The first will start at, and end at, and the second will start at and end at So, we cannot start numbering our office network at, as this will overlap into the subnet configured for the other network. Remember that we lose the first and last address to the subnet and broadcast addresses.

So we can start numbering as follows:
R3 (e0/1):
R4 (e0/1):
R5 (e0/0):
R6 (e0/0):
R7 (e0/0):
R8 (e0/0):
R9 (e0/0):
R10 (e0/0):
R11 (e0/0):
R12 (e0/0):

If we add an IGP into the mix, then we can get from one side to the other:
R1#sh ip route eigrp | b Gate
Gateway of last resort is not set is variably subnetted, 5 subnets, 3 masks
D [90/307200] via, 00:01:55, Ethernet0/0
D [90/307200] via, 00:01:55, Ethernet0/0
D [90/332800] via, 00:01:55, Ethernet0/0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to, timeout is 2 seconds:
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/2 ms

How did you get on?

CCIE #49337, author of CCNA and Beyond, BGP for Cisco Networks, MPLS for Cisco Networks, VPNs and NAT for Cisco Networks.

Related Posts

Next Post »