There are tens of thousands of roads, which one should I choose? Routing also has priority~

2023.04.13

There are tens of thousands of roads, which one should I choose? Routing also has priority~


A router can run multiple dynamic routing protocols at the same time, and different dynamic routing protocols have their own standards to measure the quality of routes, and each dynamic routing protocol sends the route it thinks is the best to the router.

In static routing or dynamic routing, an example clearly! In the article, Mr. Document is going to travel all the way from Beijing to Sanya, and uses the examples of "group tour" and "free travel" to help everyone understand "static routing" and "dynamic routing".

Continuing from the above book, Mr. Document thought twice and chose the "free travel" travel method, so which route generated by the dynamic routing protocol should we choose?

picture

Is it the "sightseeing tour" recommended by DRP 1?

Or is it the "hiking" recommended by Dynamic Routing Protocol 2?

Is it taste culture? Or explore food along the way?

There are tens of thousands of roads, which one should you choose?

We have to mention "routing method of dynamic routing protocol" and "routing priority"~

How does the PART.01 dynamic routing protocol select routes?

A router can run multiple dynamic routing protocols at the same time, and different dynamic routing protocols have their own standards to measure the quality of routes, and each dynamic routing protocol sends the route it thinks is the best to the router.

In this way, to reach the same destination address, there may be multiple different routes selected by different dynamic routing protocols.

For example, the route generated by the "dynamic routing protocol" is like the "recommended route" intelligently generated in the "travel software". Each "recommended route" is measured in dimensions such as physical strength, cost, and food.

picture

The same is true for different dynamic routing protocols, measured in terms of performance parameters such as path length, reliability, delay, bandwidth, load, etc.

However, because the measurement methods of different protocols are slightly different, just like the recommendation algorithms of different travel routes are slightly different, the meaning of the measurement value is also different, so it is only for reference, but not accurate comparability.

In any case, the router must select the "best route" calculated by one of the routing protocols as the forwarding path and add it to the routing table.

At this time, you need "routing priority"~

PART.02 What is routing priority?

When choosing a route for a trip, Mr. Doc can mark the recommended routes with "routing priority" according to his travel preferences, and then choose the recommended route with the highest "routing priority", and then start off by PICKing the route he likes the most!

picture

In practical applications, routing priority is also called "routing management distance", which is used to distinguish the priority of dynamic routing protocols, and its value is an integer ranging from 0 to 255.

We assign different routing priorities to different routing protocols (including static routing), and specify that a smaller value means a higher routing priority.

When there are multiple routes to the same destination address, one of the routes with the smallest priority value can be selected as the optimal route according to the route priority value, and this route is written into the routing table at the same time.

So what is the priority of common routing protocols?

See the table below:

routing type

routing priority

Direct routing (Direct)

0

Static routing (Static)

1

OSPF

110

RIP

120

IBGP

200

Special (for internal processing use)

255

tips

Directly connected routing: Directly connected routing can only obtain the routing information of routers that are directly connected, and there is nothing that can be done for those that are not directly connected.

Indirect route: The route learned from other routers through routing protocols is called indirect route, which is divided into static route and dynamic route.

Except for direct routes, the priority values ​​of various routing protocols can be manually adjusted by the administrator.

The principles for assigning default route priorities are as follows:

  • Directly connected routes have the highest priority.

picture

  • Manually set routing entries have higher priority than dynamically selected routing entries.

picture

A routing protocol with a complex metric algorithm takes precedence over a routing protocol with a simple metric algorithm.

picture