Cisco device configuration newbies - routing


  •     SPOTO
  • |
  •   Posted on: 2019-04-18
  • |
  •   Views: 195
  • |
  •   Category:
  • CCIE Written

One of the fascinating aspects of Cisco routers, especially for those unfamiliar with routing, is that routers can choose the best route through routing protocols, manual configuration, and various other methods.

 

Establishing and maintaining a routing table in a Cisco router involves three processes:

1 Various routing processes, actually running a network (or routing) protocol, such as Enhanced Interior Gateway Routing Protocol (EIGRP), Border Gateway Protocol (BGP), Intermediate System to Intermediate System (IS-IS), and Open Shortest Path Priority (OSPF).

2 The routing table itself receives the information of the routing process and replies to the information request of the forwarding process.

3 The forwarding process needs the information in the routing table to make a packet forwarding decision.

 

The main considerations when building a routing table are:

1 Manage Distance - This is a measure of the trustworthiness of the route source. If the router knows a destination from multiple routing protocols, it compares the administrative distances and assigns a lower administrative distance to the routes. In other words, it is the credibility of the routing source.

2 Weights - This is a measurement method used by routing protocols to calculate the best path through a specified destination, if you need to know multiple paths through the same destination. Each routing protocol uses a different metric.

Prefix length

When each routing process receives updates and other information, it chooses the best path to any given destination and attempts to install the path into the routing table. For example, if EIGRP knows the path to 10.1.1.0/24 and determines that this particular path is the best EIGRP path for that destination, it will try to install the learned path into the routing table.

The router decides whether to install the route presented by the routing process, depending on the administrative distance of the associated route. If the path has the shortest administrative distance to the destination (compared to other routes in the routing table), the path will be installed in the routing table. If the route is not the route with the best administrative distance, then the route is rejected.

For a better understanding, let's look at an example. Suppose the router has four routing processes running: EIGRP, OSPF, RIP, and IGRP. Now, through these four procedures, various routes to the 192.168.24.0/24 network are known, and each route selects its best path to the network through its internal measurement standards and procedures.

The four processes attempted to install their routes to 192.168.24.0/24 into the routing table. Each routing process is assigned a management distance to determine which route to install.

 

Since the internal EIGRP route has the best management distance (the shorter the management distance, the more preferred), the internal EIGRP route is installed in the routing table.

 

Backup route

What other protocols, RIP, IGRP, and OSPF will do for routes that they do not have? What can I learn from EIGRP if the preferred route fails?

Cisco IOS® software addresses this issue in two ways: The first is to have each routing process try to periodically install its best route. If most preferred routes fail, the next best route (based on administrative distance) will succeed in the next attempt. Other solutions are used when the routing protocol fails to install its path in the routing table. If the best path fails, the routing table process is reported.

For protocols that do not have their own routing information tables (such as IGRP), the first method is used. Each time IGRP receives a routing update, it attempts to install updated information in the routing table. If there is already a route to the same destination in the routing table, the installation attempt cannot be completed.

For protocols that have routing information for their own databases, such as EIGRP, IS-IS, OSPF, BGP, and RIP, the backup route is registered when the initial attempt to install a route fails. If the route installed in the routing table fails for some reason, the routing table maintenance process will call each routing protocol process that has registered the backup route and ask them to reinstall the route into the routing table. If multiple protocols have registered backup routes, the preferred route will be selected based on the administrative distance.

 

Adjust management distance

The default administrative distance may not always be appropriate for your network; you may want to adjust them, for example to make RIP routing better than IGRP routing. Before we explain how to adjust the management distance, we need to check the management distance change prompt.

Changing the administrative distance on a routing protocol is very dangerous! Changing the default distance can cause routing loops and other anomalies in the network. We recommend that you carefully change the administrative distance. Before doing this, be sure to think twice about the purpose of your operation and all the consequences of the operation.

Changing the distance is relatively easy for the entire protocol; in the sub-configuration mode of the routing process, the distance can be easily configured using the distance command. You can also change the distance of the route, which can only be obtained from some protocols, you can only change the distance of some routes.

For static routes, you can change the distance of each route by entering the distance after the ip route command is issued:

Ip route network subnet mask next hop distance

You cannot change the administrative distance of all static routes at once.

 

How metrics determine the routing process

Routing is selected and built in the routing table based on the administrative distance of the routing protocol. The route with the shortest administrative distance learned from the routing protocol will be installed into the routing table. If multiple paths use a routing protocol to the same destination, then multiple paths have the same administrative distance and the best path is chosen according to the measurement criteria. Weights are values ​​associated with a particular route, ranked from primary to secondary. The parameters used to determine the metric vary depending on the routing protocol. The path with the lowest weight is selected as the best path and is installed in the routing table. If there are multiple paths with equal weights that arrive at the same destination, load balancing will be performed on these equal cost paths.

 

Prefix length

Look at another scenario to see how the router handles another common situation: variable prefix length. Again assume that there are four routing processes running on the router, and each process has already received these routes:

Which routes are you going to install in the routing table? Because EIGRP internal routing has the best management distance, it is very attractive to assume that the first one will be installed. However, since each of these routes has a different prefix length (subnet mask), the destinations of these routes are treated as different destinations, all installed in the routing table.

Let's see how the forwarding engine uses the information in the routing table to make forwarding decisions.

 

Make forwarding decisions

Look at the three routes we installed in the routing table and see how to find these three routes on the router.

If the packet arrives at the router interface assigned to 192.168.32.1, which route does the router choose? It depends on the prefix length in the subnet or the number of bit sets in the subnet mask. Longer prefixes always take precedence over shorter prefixes when forwarding packets.

In this case, the packet assigned to 192.168.32.1 is controlled by 10.1.1.1 because 192.168.32.1 belongs to the 192.168.32.0/26 network (192.168.32.0 to 192.168.32.63). It also belongs to the other 2 available routes, but 192.168.32.0/26 has the longest prefix in the routing table (26 bits and 24 or 19 bits).

Similarly, if a packet destined for 192.168.32.100 arrives at a router interface, it will be forwarded to 10.1.1.2 because 192.168.32.100 does not belong to 192.168.32.0/26 (192.168.32.0 to 192.168.32.63) but belongs to 192.168.32.0 /24 destination (192.168.32.0 to 192.168.32.255). It once again enters the range covered by 192.168.32.0/19, but 192.168.32.0/24 has a longer prefix.

 

IP CLASSLESS

The location of the ip classless configuration commands in the routing and forwarding process is often confusing. In fact, ip classless only affects the operation of the forwarding process in IOS; it does not affect how the routing table is built. If ip classless is not configured (using the no ip classless command), the router will not forward packets to the supernet. For example, we put three routes in the routing table again and route the packets through the router.

Note: If the supernet or default route is obtained through IS-IS or OSPF, the no ip classless configuration command will be ignored. In this case, the packet exchange behavior is like having ip classless configured.

Remember that the 172.30.32.0/24 network includes addresses from 172.30.32.0 to 172.30.32.255, while the 172.30.32.0/20 network includes addresses from 172.30.32.0 to 172.30.147.255, so we can manage to convert three packets through this routing table. And view the results.

The packet specified to 172.30.32.1 is forwarded to 10.1.1.1 because this is the longest prefix match.

The packet specified to 172.30.33.1 is forwarded to 10.1.1.2 because this is the longest prefix match.

The packet destined for 192.168.10.1 is forwarded to 10.1.1.3; because the network does not exist in the routing table, this packet is forwarded to the default route.

Packets destined for 172.30.254.1 are discarded.

 

Of these four results, the last packet that was dropped was surprising. The reason for the packet drop is its destination, 172.30.254.1 is located in the known primary network 172.30.0.0/16, but the router does not know the specific subnet within the primary network.

This is the essence of classful routing: if you know a part of the primary network, but the information specified by the subnet in the primary network is unknown, the packet will be discarded.

The most confusing aspect of this rule is that if the destination primary network does not exist at all in the routing table, the router can only use the default route.

As shown in the figure, a network remote site is connected to other networks using a no-routing protocol and a single connection, which may cause problems at the remote site of the network.

The configuration of the remote site router is as follows:

With this configuration, the host at the remote site can reach the destination in the Internet (through the 10.x.x.x cloud) instead of the destination in the 10.x.x.x cloud (company network). Since the remote router knows some parts of the 10.0.0.0/8 network, 2 directly connected subnets, but does not understand the other subnets of 10.xxx, it is assumed that these other subnets do not exist and the drop destinations are these subnets. Information package. Traffic destined for the Internet, without a destination in the 10.x.x.x address range, so it can be routed through the default route.

Configure ip classless on the remote router to allow the router to ignore the network in its routing table with class boundaries and simply route to the longest prefix match it can find to solve the problem.

 

Summary

In summary, making a forwarding decision actually involves three sets of processes: routing protocols, routing tables, and the actual process of making forwarding decisions and exchanging packets. Below is a demonstration of the three sets of processes, including the relationship between them.

The longest prefix match always wins in the route that is actually installed in the routing table, and the routing protocol with the shortest administrative distance needs to be installed in the routing table when routing is required.

Comments:


Start the discussion...


To Leave a Comment or reply to posts please log in