Computer Network: Optimal Routing Entry Selection

1. View the IP routing table

<Huawei> display ip routing-table

Destination/Mask: Indicates the destination network address and network mask of this route. The address of the network segment where the destination host or router is located can be obtained by logically ANDing the destination address and the subnet mask. For example: the destination address is 1.1.1.1 and the network segment address of the host or router with the mask 255.255.255.0 is 1.1.1.0.

Proto (Protocol): The protocol type of the route, that is, the protocol through which the router learned the route.

Pre (Preference): Indicates the routing protocol priority of this route. For the same destination, there may be multiple routes with different next hops, outbound interfaces, etc. These different routes may be discovered by different routing protocols, or they may be manually configured static routes. The route with the highest priority (smallest value) will become the current optimal route.

Cost: Routing cost. When multiple routes to the same destination have the same route priority, the route with the smallest cost will become the current optimal route.

NextHop: Indicates, for this router, the next hop address to the destination network pointed by the route. This field indicates the next device for data forwarding.

Interface: Indicates the outbound interface of this route. Specify which interface on this router the data will be forwarded from.

2. Routing priority - basic concept

  • When a router learns routes to the same destination network segment from multiple different channels (these routes have the same destination network address and network mask), the router will compare the priorities of these routes and give priority to the route with the smallest priority value.
  • The smaller the priority value (Preference) of the route source, the higher the priority of adding it to the routing table.
  • The route with the highest priority will be added to the routing table.

3. Routing priority - comparison process

  • RTA discovered the route to 10.0.0.0/30 through the dynamic routing protocol OSPF and manual configuration. At this time, it will compare the priorities of the two routes and give priority to the route with the smallest priority value.
  • Each routing protocol has a corresponding priority.
  • OSPF has a better priority, so routes learned through OSPF are added to the routing table.

4. Routing priority - common default values

5. Measurement value  - basic concept

  • When a router discovers multiple routes to the same destination network (with the same route priority) through a certain routing protocol, the metric value will be used as one of the basis for route selection.
  • The route metric represents the cost of reaching the destination address pointed to by this route.
  • Some commonly used metrics include: hop count, bandwidth, delay, cost, load, reliability, etc.
  • The smaller the metric value, the higher the priority. The route with the smallest metric value will be added to the routing table.
  • The metric is often called cost.

Guess you like

Origin blog.csdn.net/yuyeconglong/article/details/132863507