+(65) 8344 4290 Ciscodumps.net@gmail.com Room 907, Block B, Baoneng Entrepreneurship Center, Guangrong Road, Hongqiao District, Tianjin

ThinkMo EDU Share – network 65.Netmask

蒂娜 1 Comment 01/09/2023

ThinkMo EDU Share – network 65.Netmask

Carrier PE routers have a global routing table with more than 700,000 entries, and this number has been on the rise.

PE (Provider Edge) router

E is the abbreviation of Edge, and PE translates into Chinese as “border router”. The border router is usually located at the border of the operator and is physically connected to other operators.

PE routers and PE routers of other operators exchange routes through the BGP routing protocol:

(1) Learn the routing table of other operators (incoming); (2) Notify your own routing table (outgoing).

Through the above two-way routing exchange, the local PE has a global routing table.

More than 2 billion available IP addresses worldwide ?

The IP address has a total of 32 bits. In theory, there are 232 = 4.29 billion IP addresses. Excluding multicast, private, test, and reserved IPs, there are more than 2 billion+ available IP addresses.

Can the current memory of the router accommodate 2 billion+ massive routing entries?

On a Cisco router, it takes about 100 bytes to save a BGP routing entry, so how many bytes are needed to save 2 billion routing entries?

2*109*100=2*1011=200G bytes.

Even the most high-end routers can hardly meet this massive memory requirement.

Since the router cannot accommodate each IP address, can the IP addresses with a unified prefix be summed up, which will greatly reduce the entries in the routing table, and then introduce the magical effect of the network mask again.

What is the shortest netmask length?


Where is mask length “0” used?

For example

The computers and smartphones of hundreds of millions of users on the earth only need to have this route to access all IP address resources on the Internet. In short, represents all routing entries on the Internet.

What is the longest netmask?


Where is the mask length “32” used?

For example, means the IP address of

When the user dials through PPPoE, the PPPoE server assigns the PPPoE client an IP address with a 32-bit mask, assuming it is

To sum up, a mask length of 0 represents all IP addresses in the world, but there is only one occasion for a mask length of 0, which is Other than that, no more, combinations like are wrong!

A mask length of 32 represents only one IP address. For example, and have the same meaning, representing an individual IP address.

Mask length “31”: means that a network segment has 2 IP addresses.

Calculation formula: Number of IP addresses in the network segment = 2^(32-31) = 2., this route actually represents two IP addresses:,

What about This route represents two IP addresses:,

And so on…

The so-called 31-bit mask means that the 32nd bit of the IP address (counting from left to right) can be 0 or 1. Where the mask does not cover, it can be any combination of 0 and 1.

Since the 31-bit mask can only accommodate 2 IP addresses, it is usually used on a point-to-point link, with one IP address on each side, and no IP address is wasted!

If a 30-bit mask is used on a point-to-point link, 2 IP addresses will be wasted.

The mask length is “30”. According to the calculation formula, the number of IP addresses in the network segment = 2^(32-30) = 4, and the route with the mask length of 30 represents 4 IP addresses.

The mask length is “29”. According to the calculation formula, the number of IP addresses in the network segment = 2^(32-29) = 8, and the route with the mask length of 29 represents 8 IP addresses.

And so on…

The mask length is “8”. According to the calculation formula, the number of IP addresses in the network segment = 2^(32-8) = 224 = 16777216, and the route with the mask length of 8 represents 16777216 IP addresses.

The difference between and is the collection of all IP addresses with a prefix of 1. It is better understood if it is written as 1.xxx/8, where x can be any value from 0 to 255. This collection has a total of 16777216 IP addresses. is a routing entry containing 16777216 IP addresses, which usually appears in the routing table of the router and is automatically or manually summarized by the router. is an individual, and the IP address of this individual is Obviously, it belongs to the collective, because it belongs to the collective 1.xxx, doesn’t it? is usually configured on the interface of the host for use by the host.

The above explanation has actually answered the question about routing induction. Using the network mask to summarize the IP addresses with the same prefix into a collection, the global routing table will be greatly reduced.

Since the shorter the netmask, the more IP addresses can be summarized, can a netmask with a length of 8 be used to sum up the route?

for example:

. . .

Then, in addition to the private IP (10.xxx), reserved IP (169.xxx), and local IP (127.xxx), the global routing table only needs more than 200 routing entries to represent it, right?

No, because an IP address prefix does not necessarily belong to an operator, so they cannot be grouped together.


For example, the address prefix 1.xxx cannot belong to an operator. Assuming that 1.1.xx belongs to an American operator and 1.2.xx belongs to a European operator, then these IP addresses cannot be grouped together.

If summed up together, does the route lead to the United States or Europe?

It’s easy to handle. Use to classify operators in the United States, and to classify operators in Europe.

① A message with destination IP= is matched to the route and sent to the US operator;

② A packet with destination IP= is matched to the route and sent to the European operator.

In the early days of Internet development, due to the memory limitation of routers and the small network bandwidth, BGP has a strict regulation on the mask length of routes, which needs to be ≤19.

The longest 19-bit mask, what is the limit of the global routing table?

219= 524288

Later, with the continuous improvement of the performance of the router, the improvement of memory, and the increasingly discontinuous IP addresses, it became more and more unrealistic to use a 19-bit network mask. Later, BGP relaxed the restriction on the length of the network mask, as long as it is not greater than 21 is fine.

How much does the 21-bit mask length limit the global routing table?

221= 2097152

ThinkMo CCNA Dump exam information exchange group:

CCNA/CCNP/CCIE telegram study group:https://t.me/ccie_ei_lab
WAHTAPP:+65 83444290
WAHTAPP:+63 9750724648

ThinkMo CCNA 200-301 Tutorial VIP Exclusive:

The complete EVE_NG file, free learning PDF and PPT that can be used directly, as well as video explaining the technical points are all here!

1 Comment

Leave a Reply