This is probably a un-realistic question, but a question nonetheless, that has been bugging me since quite a while now. Consider the below network diagram, where R1 is a part of a network (subnets are indicated by ovals), and it further splits the network into several /16 networks, one of which is Now the interfaces for the routers (denoted by the green links) have the addresses for R1 (the first IP in the subnet) and for R2. Further, R2 splits the /16 network assigned to it into two /24 networks. The logic is similar. enter image description here

Coming to the question, if we look at the link between R1 and R2, of the available 2^16 host addresses available in that subnet (due to /16 mask), only two are used for the router interfaces. What would happen to the rest addresses in that subnet? Since R2 would have to use up some bits more than than the 16 available ones in its subnet, to create further subnets, will the subnet between the R1 and R2 go into a black hole and never be used again?

Edit: Updating the diagram after discussion in the comments. I am now removing the extraneous part from the problem and only keeping the relevant network that I am having my question about.

Basically subnet/CIDR literature online tells me that you can further divide the assigned network range into smaller by borrowing the network bits from the assigned mask. That is what R1 and R2 are doing, as seen in the diagram. I am really confused as to whether this is an overlap and if so, how to avoid it, also, what should R1 and R2 advertise.

Any help in clearing this concept will be greatly appreciated.

Update #2: This article EXACTLY demonstrates what I am trying to achieve -- https://cse.buffalo.edu/~hungngo/classes/2010/589/reading-materials/IP-addressing2.pdf though, it mentions VLSM which I reckon is similar to CIDR, but for classful networks.

enter image description here

Update: (Final solution)

After discussion with all the esteemed members, it seems that, the only problem with the initial diagram was the wasted address space. Also, there are some CIDR-specific precautions to be taken while assigning addresses to hosts, to avoid routing problems. Keeping all this in mind, I have made a final diagram that uses link subnets of /30 and advertisements accordingly.

enter image description here

Elaborating the diagram even more to add some hierarchy:

enter image description here

  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Ron Maupin
    Commented Oct 13, 2021 at 17:04
  • 2
    Your last edit substantially changes the situation: before it looked (to me) like you advertised to your other routers. With the bottom diagram, you're advertising to the outside world.
    – Zac67
    Commented Oct 13, 2021 at 18:22
  • Yes, that is indeed the case. I simplified the diagram to show what I mean. Apologies for confusion Commented Oct 13, 2021 at 18:27
  • I have now added a modified diagram incorporating your suggestions regarding link subnets and CIDR precautions. Please, let me know if my understanding is now correct. Commented Oct 14, 2021 at 12:55
  • @aditya_medhe You should write your own answer using your updated diagram. That way, others can benefit from your knowledge.
    – Ron Trunk
    Commented Oct 14, 2021 at 13:01

6 Answers 6


Yes this is wasteful. The remaining IP addresses are lost.

This is why we usually configure a /31 on such link.

(Well actually if this /16 subnet is not announced to the other routers, technically it could be used somewhere else, but this would be a very dirty configuration).

  • Thank you for your answer. One follow-up question: by "usually configure a /31 on such a link", won't we create extremely small subnets which we would not be able to further divide? Am I missing something here? FYI I learnt subnetting recently, so there might be gaps in my understanding Commented Oct 11, 2021 at 8:09
  • On a link between two routers (what we call a point-to-point link) there cannot be anything else. So we don't need to subnet it so we use a /31.
    – JFL
    Commented Oct 11, 2021 at 8:11
  • Let's say we configure instead of, how would the traffic destined for the IP for example, reach? As I understand the IP addresses are hierarchical so if we flatten the hierarchy by assigning a /31 address, how can we un-flatten it again? Could you point me to a source where I can find more about it please? Commented Oct 11, 2021 at 8:21
  • first: IP addresses should be hierarchical, it is not a must. Every routing protocol can work with non-hierarchical addresses. It will result in huge tables, and possibly extra resources for routing protocol, but it is in theory possible. second: every link should have a different subnet. otherwise if you have overlapping addresses on two links, how would routers know where to send packets to these addresses. in your figure your routers would not know whether to send traffic 10.1/16 to orange red or green, or worse, they will think differently. A hierarchy allows to aggregate addresses if
    – Effie
    Commented Oct 11, 2021 at 9:47
  • several addresses are routed over the same interface. for example, R1 can aggregate all addresses advertized by all your subnets, and send only one to the outgoing interface (away from r2/r3). R2 could announce only one address to R1 which covers both R3 and R4. I however think you have to specially configure your system to do this. A single link, between R1 and R2 cannot be aggregated on either R1 or R2 anyways. So, if you want to use hierarchy, you have to select appropriate network address for this /31, so that the address can be aggreagated.
    – Effie
    Commented Oct 11, 2021 at 9:56

The consensus after discussing with the esteemed forum members is that the link subnets (subnets between two routers) are wasteful: since there are only two devices on the interface, there is no need to have a /16 or /24 subnet.

A key concept I was missing was: to denote hierarchy and break the network down into smaller divisions progressively, it is not needed that the subnets are contiguous and attached to each other. The subnets that are to contain hosts and (have progressively smaller masks like /16, /24, /26 and so on) can be in a hierarchy, but the links connecting the routers can be a part of a smaller /30 or /31 subnet.

The hierarchy and the routing can be configured by using the appropriate advertisements and route tables.

For using the subnets in the links between two routers, a subnet can be reserved especially for this purpose. In our example below, the company reserves a /24 subnet especially for carving out /30 subnets as needed for the links.

enter image description here

Appreciate the help and patience of the forum members @Zac67, @RonTrunk, @JFL, and @Effie


They are "currently unused". On a link where there will never be many nodes, one would never use a /16. Even a /24 would be wasting >90% of the space. It's common practice to use /30 (or /31 if the hardware supports it) for point-to-point links. (Personally, I've used /28 and /29 internally for "device" networks, but your needs may vary.)

  • Thank you, can you show me an example of hierarchical subnetting with /31 links in between? I'm facing a tough time picturing it Commented Oct 12, 2021 at 1:49

This is not a direct answer to the question, but judging from the comments, I think there is a confusion between address aggregation and address assignment.

update: i think you can think of this in terms of disjoint sets and set unions. Each subnet is a set of IP addresses. All subnets must be disjoint, that is each subnet is unique. Hierarchy works on unions, not individual sets. That is, when a union of sets can be aggregated by a single address, summarization is possible. So, R1 can summarize a union of orange, green, and red (and whatever is behind R3 and R4). R2 could summarize a union of green and red.

update2: Can you draw your picture with orange spanning the whole network, red spanning link between R2 and R3 and whatever is behind R3, and identical for green. Each layer 2 segment within the network has to have a unique address/mask. But your addresses are summarizable on circle boundaries.

(1) Route summarization works only in one direction. R1 can summarize routes if all routes to addresses 10.1.*.* This means that routers outside of your picture will learn only one address to 10.1../16 via R1. In contrast, without summarization, they could learn routes to 10.1.100., 10.1.200. separatelly. Route summarization does not affect what happens inside, and what happens inside does not have direct effect on route summarizaiton.

Further, R1's ability to do this does not require anything within your network to be actually hierarchical. It only requires all addresses to match 10.1.*.* (and no other parts of network to have addresses that match). No matter how you assign your addresses within your network, this will not change.

Having a link between R1 and R2 have /30 or /31 address does not prevent R1 from summarization.

(2) IP interconnects layer 2 segments. Thus IP differentiates between systems, reachable directly using layer 2 and systems, not reachable, where the address has to be actually forwarded (here routed would mean ~ the same). If an interface has an address and mask, IP can assume that all addresses that match 10.1.*.* are local, and not forwarded. This means, that 10.1.*.* should be delivered using layer 2 of the corresponding interface (for IP -> do ARP, get mac address, and send packet to the mac address)

In this sence, a configuration where 10.1.*.* are local, but 10.1.100.* has to be forwarded, although could make sence from longest prefix match point of view, is actually incorrect. I can't find any specification which says what exactly will happen. I think it is safe to say, that it is unclear whether this will work or not.

So, you can have a routing table: 10.1.100.* -> interface 3 via R_X (forwarded), and 10.1.*.* -> interface 2 via R_Y (again forwarded) (this will be resolved using longest prefix match), but you cannot have a situation 10.1.100.* -> interface 2 via R_Y (forwarded), 10.1.*.* -> interface 2, local.

(3) also IP does not know that the link between R1 and R2 is a cable. If the cable is ethernet, there is also no guarantee that it remains this way. You could replace it with a switch, and plug 2 routers and N hosts to the switch. If you do this, and these N hosts are in network 10.1.*.* they can in theory have any IP within this network, including If this happens your overlapping subnets will cause problems.

Thus it is recommended to use /30 or 31/ addresses, because they only allow 2 systems in the subnet, and if you try to get a third one in, it won't work.

(4) As an example, let's consider a situation where you want to have route summarization on R2 as well. R1 is already summarizing routes.

  • note, that R1 and R2 cannot summarize the link between each other. they have to learn about this link. Let's assign to the link (so that 000* (last one binary) are assigned to this link.

R2 has two networks, green and red, and it wants to summarize addresses. To do so, these networks have to have addresses that have a common prefix, and this prefix should not overlap with the link above. Since you have all 10.1.*.* to choose from, let's assign them addresses that match arbitrary 10.1.1*** ****. **** **** (which is Then red one can get 10.1.10 ** ****.* and green one gets 10.1.11 ** ****.**** ****, or and Then R2 can announce a single address to R1. R2 cannot announce it to anyone else, because it has to be able to route between green and red. [please verify my binary to decimal convertion!]

Now, in red zone there is a link between R2 and R3. We can assign it a /31 address that matches, or 10.1.10** ****.**** ****. Let's use all zeroes and have 10.1.1000 0000.0000 000* or All other addresses can be assigned to whatever is behind R3.

So, this is what you do when you assign subnets. Each subnet has a unique address. However all subnets who are summarized, can be covered by a unique address with a shorter prefix.

Which brings me to final notes

(5). When route summarization can be performed actually depends on your protocol. Distance-vector protocols can do it everywhere, link state routing can not. Link state routing protocols have to know the topology, thus route summariation cannot be performed. OSPF divides its domain into separate areas, where each area does link-state routing separatelly, but inter-area communication is not done based on link-state approach. OSPF can only do summarization on area boundary. There are more complicated cases with external routes and route re-distribution, but they follow the same pattern. There are "border" routers, which can get routes from outside of the area and inject them in the area. Route summarization can only be done by such a router.

(6) route summarization is not the same as keeping small tables. Route summarization affects information exchanged by a routing protocol itself. Even if your routers use OSPF and cannot actually summarize anything, they would (i think) still be able to have fewer entries in routing tables.

P.S. I use the notation .0100 0000. as a binary representation of the octet in IP address. And * in address to represent, that a bit can have arbitrary value, i.e., it is not covered by prefix length. 10.1.10** . **** is an ip address where first 8 bits are decimal 10, second 8 bits are decimal 1, and the rest 2 octets are in binary notation, where the third octed must start with 10 and have all other bits arbitrary or irrelevant.

  • markdown has replaced some of my *, i hope i found all places, but something can still make no sense.
    – Effie
    Commented Oct 13, 2021 at 14:12
  • 1
    The router "above" R1 can have a summary route pointing to R1. with static routes, there is no "advertising."
    – Ron Trunk
    Commented Oct 13, 2021 at 14:39
  • 1
    This should go in your answer
    – Ron Trunk
    Commented Oct 14, 2021 at 14:37
  • 1
    from my point it makes perfect sense. to be safe let's wait for more experienced folks to review :) I hopy you now understand the difference between your original post and final update.
    – Effie
    Commented Oct 14, 2021 at 14:39
  • 1
    The way to do this is to write your answer, and let people comment/correct it. that way everyone can see the process.
    – Ron Trunk
    Commented Oct 14, 2021 at 14:47

I think you might be confusing route aggregation and actual subnet usage.

where R1 is a part of a network (subnets are indicated by ovals), and it further splits the network into several /16 networks,

This will not work (without fine tuning). When is used on one interface, that includes all of the subnets as well.

(from comment) The is not a router interface for R1, rather, it advertises the aggregated route. The has been assigned to the R1 to split up further.

Of course, you could have a general (aggregated) "" gateway/route from the perspectives of R2/R3/R4, where all its possible subnets of are behind (north of) R1, but do not use that subnet itself on any of the R1's interfaces. That logic would also prevent any addresses from to be used anywhere else unless you use metric tuning to make that work - perhaps not such a good idea.

Using an aggregated route for the subnets north of R1 is possible, but to avoid routing ambiguity you need to make sure that the visible 10.1.x.0 subnets always get a better (lower) cost/metric than the route. A better choice would be only north of R1.

The R1-R2 subnet and the lower subnets and have the same problem. Likely, R2 will not allow you to bind these addresses/subnets in that way since they overlap. You should always make sure that none of your subnets overlap, regardless of where they are attached. If there's routing ambiguity if will land on your feet sooner or later.

What would happen to the rest addresses in that subnet?

Nothing. You cannot use them elsewhere without causing routing problems.

Using full /24 or even larger subnets for a pure link segment is extremely wasteful. When you're sure that no other devices need to attach to that segment you should only use a /31 subnet. For simplicity, you could use those /31 subnets that you split off from a single /24 subnet you've reserved for that purpose.

Looking at your diagram, you should consider location-specific supernets behind each gateway for better structure ( behind R1, behind R3, behind R4) and use point-to-point subnets between them (,,

''Behind each gateway'' refers to the scope attached to a router that is not visible to other routers. Of course, you don't use a /16 in whole but create subnets from it. In any case, that way you can use a simple, aggregate /16 route from the other routers/locations.

  • All the route summarization/aggregation articles (for example this one) start with a large /8 subnet, and it is made more and more specific (/16, /24, etc) as we go down the hierarchy. So, includes addresses from -, whereas, would include addresses from - I do not understand what I am missing :( Commented Oct 11, 2021 at 15:36
  • Normally, you don't start out with a subnet that you already have in active use but with a range that has been assigned to you or that you have reserved in the past. From that you split off what you currently need and save the rest for later. Downsizing a subnet in use requires renumbering the hosts in that subnet and that's nothing you take lightly.
    – Zac67
    Commented Oct 11, 2021 at 15:52
  • I provided an example for hierarchical addressing in your other question, where I start out from the "global scope" that I don't directly use anywhere but that represents the address range I'll work with for many years to come - and I'd want to make the best of it.
    – Zac67
    Commented Oct 11, 2021 at 15:57
  • 1
    @aditya_medhe Yes, you need to advertise That is why the addresses you have chosen are so problematic -- they don't allow efficient summarization.
    – Ron Trunk
    Commented Oct 13, 2021 at 14:42
  • 1
    Looks much better, especially with a better understanding of your intentions on my side. ;-)
    – Zac67
    Commented Oct 14, 2021 at 13:02

To the question about what happens to the unused addresses in your subnets, nothing. They stay unused, not doing anything. That is, until you have an attacked in your network, being free to use any of your unused addresses, to pose as an inside device on your network.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.