How many hosts can 100 IPs serve?

How many hosts can 100 IPs serve?

I have calculated this once in an old article, but the algorithm I used at the time was too conservative, so I decided to give my answer again in this article.

To simplify the problem, only one layer of NAT is allowed here. Nested NAT is not allowed, and IP does not distinguish between public and private.

In the old article, I divided the 100 IPs into two equal parts. One part of 50 IPs was used as the intranet IPs, and the other part of 50 IPs was used as the router IPs of each subnet. So the calculation result was 49 times 49 = 2401, which is more than 24 times the number of hosts that can be served when 100 IPs are directly allocated (the old article did not take into account the IP consumed by the gateway, and used 50 times 50 for calculation, which is corrected here to 49 times 49).

picture

Looking back now, I was too cautious at that time. Since NAT is used, there is no need to worry about conflicts caused by duplicate IP addresses not only between brother subnets, but also between internal and external subnets.

The NAT service connects different subnets like a "wormhole". No matter whether they are brothers or parents, they will not affect each other. The subnets are like "parallel universes".

There are still 100 IPs, but with one layer of NAT, one IP is used as the default gateway address, and the other 99 IPs are allocated to hosts. The maximum number of hosts that can be served is actually 99 times 99, which is 98 times the scale of directly using 100 IPs.

picture

We have been emphasizing that NAT should not be used in a nested manner because the nested use of NAT will form a tree structure with increasingly higher levels.

The non-leaf nodes of this tree can be regarded as network devices such as routers, and the leaf nodes are connected hosts. As a full tree, the leaf nodes at the bottom of the tree will increase exponentially as the height of the tree increases.

picture

Based on this, if the level of NAT nesting is not limited, the number of hosts that 100 IPs can serve is theoretically unlimited.

But this is inevitably confusing. Isn’t IPv4 not enough? According to this article, 100 IPs can serve unlimited hosts by nesting NAT. So what is the point of IPv6?

In addition, many explanations about the significance of the existence of private IPs say that it is to solve the problem of insufficient IPv4. However, from this article, it seems that there is no need to distinguish between private IPs and the problem can be solved by simply using NAT. So what is the significance of dividing up private IPs?

The above two questions are exactly what I want to continue answering. In order to avoid the article being bloated and tedious, I will leave them for separate answers later.

<<:  Do you know several commonly used communication methods in microservices?

>>:  Qianxinan Prefecture: Green "optical" network, a new style of government office

Recommend

Fault recovery and resource allocation in software-defined optical networks

Preface Traditional IP packet switching networks ...

Google open-sources network-opt for optimizing network topology

The Internet has become the most important issue ...

5G and manufacturing: the missing link to drive Industry 4.0?

5G can help transform the manufacturing industry....

...

IMIDC Hong Kong/Taiwan Server E3 Series $90 off per month starting at $39/month

IMIDC is a local operator in Hong Kong. It has br...

The Importance of PoE in Surveillance and Remote Security Systems

Many devices on the network today, such as IP cam...

7 ways to understand the 5G standards in June

MicrosoftInternetExplorer402DocumentNotSpecified7....

Are you ready for network automation?

[[374510]] This article is reprinted from the WeC...

NFV is stumbling forward and entering the second half

The first half of NFV was a bumpy road, and it wa...