Article From:https://www.cnblogs.com/ricksteves/p/9688325.html

1、Routing summary technology background

As you can see above, for R1, if you’re going to the 172.16.1.0/24, 172.16.2.0/24, 172.16.3.0/24 network behind R2, you’re going to have a route, and if you’re doing static routing, you’re going to give R1.Configuring three static routes corresponds to each of these three segments, as we’ve already said, is a lot of work. Think about it if R2 has more than three networks behind it. What if there are 100 networks? Moreover, this means that the routing table of R1 has become very bloated.
Default routing is part of the solution in the previous section, but the default routing is too granular to control the routing more carefully, and if R1 connects to a network exit on the left and takes up the default routing, then thisWe can only think of him in other ways.
Routing summarization can solve this problem well.

In the previous scenario, we used three detailed routes, and in Figure R1 above, we used only one route to achieve the same effect, which is the aggregate route of the three detailed routes in the previous scenario. A direct benefit of this configuration is that the routing table entries of the router are greatly reduced. thisThe way we operate is called routing summarization. Routing aggregation is always a very important network design idea. In a large and medium-sized network design, we must always consider the network and routing optimization. Routing aggregation is a tool we often need to pay attention to. This is actually a collection of static routes.In summary, of course, in addition to routing aggregation in dynamic routing protocols, almost all dynamic routing protocols support routing aggregation.

2、Algorithm for routing accurate summarization

The summarization of routing is done through the operation of subnet mask. For the following example:

On R2, R2 uses routing aggregation tools to point to a aggregated route in order to reach a network connected below R1:

[R2] ip route-static 172.16.0.0 16 10.1.12.1                                #12.1Interface IP for R1

Although this does serve network optimization purposes, this aggregate routing is so “rough” that it includes even segments on the R3 side, which we call inaccurate. Therefore, an ideal way is to use a “just right” aggregate route that encompasses these detailed routesIn this way, we can avoid the problem of inaccurate aggregation.
Here we have to emphasize that the premise that the network can deploy routing aggregation is that the design of IP subnet and network model in our network is scientific and reasonable, so routing aggregation is closely related to the design of IP subnet and network model. If your network planning is chaotic, routing summarizationDeployment is quite difficult.
So how do we make accurate calculation of aggregate routing? Let’s look at an example:
Existing detailed routing: 172.16.1.0/24 to 172.16.31.0/24, to compute the most accurate aggregate routing.

What we have to do is very simple. These subnets are continuous. We just have to pick out the first two or three network numbers to calculate them.

  1. Write these IP addresses in binary form. In fact, we only need to consider the third 8-bit group, because only it is changing.
  2. Now, we’re going to draw a vertical line with the same binary number for each column on the left side of the line, no matter what the right side of the line is, it can be changed, and the final position of the line is the length of the aggregate routing mask. Note that this vertical line can start from the default mask length, that is, /24.The lattice moves to the left until you see that every column on the left end of the line is equal, and you stop, and the line is in exactly the right place.
  3. As shown above, the line is 16 + 3 = 19, so we get the summary address: 172.16.0.0/19, which is the most accurate summary address.

Therefore, we can configure the above example:

 

3、Potential problems of routing summarization

 

Routing sinks are always a very important network optimization tool, but they can also cause problems if used improperly. In the figure above, R1 has a series of networks beginning with 192.168 on the left of R1, and R1 has configured default routes to R2 to allow them to access the Internet. And R2 isTo allow data to return, and to streamline the routing table, a summary route 192.168.0.0/16 is configured, pointing to R1. There seems to be nothing wrong with the network, but…

 

Terms of settlement:

 

This problem can be solved by configuring an IP route-static 192.168.0.0 16 null0 on R1. When R1 receives a scan message to a destination that does not exist under 192.168 network, it is discarded directly by R1 and will not be forwarded to it again.R2. This solves the problem of reason loop. This idea is critical in routing aggregation, which is why many dynamic routing protocols produce a null0-oriented aggregate route in the local routing table when they perform routing aggregation using commands.
Therefore, whether static routing or dynamic routing protocols are used to deploy routing aggregates, special attention should be paid to whether routing aggregates can always trigger routing loops.

Leave a Reply

Your email address will not be published. Required fields are marked *