Read Output of Show Ip Route Command
Ane of the most important skills to take when it comes to basic networking is the ability to look at a routing table and decide exactly where a packet volition exist routed when it comes to a router. Sometimes a routing table is relatively uncomplicated, and this procedure is easy. Still, many times this is not the case. In large networks, especially networks that implement a hub and spoke design where core routers are oftentimes required to know hundreds of routes or more, this tin be boring. I'd like to discuss the routing table on a Cisco router, and identify a few things to look for when trying to identify routing configuration.
Today we'll be working with the following topology (click for larger view):
This pocket-sized network is running OSPF on all links. No special configurations are used at the moment - all routers were simply configured to run OSPF on all links, and in one OSPF area. We will be exploring OSPF's view of the network after convergence, and how it built the routing tabular array on each router. I synthetic this topology to bear witness connectivity betwixt 2 hosts - namely PC1 and PC2, and gain some visibility into how these routers have chosen to pass traffic between them.
Accept a expect at the output of the "show ip route" control, issued on R0:
R0#show ip route ..... one.0.0.0/30 is subnetted, iv subnets C 1.ane.i.0 is directly connected, FastEthernet0/1 O 1.1.one.4 [110/2] via 1.1.one.2, 00:10:04, FastEthernet0/1 O 1.1.1.8 [110/2] via one.1.1.xiii, 00:10:04, FastEthernet0/0 C 1.1.1.12 is directly connected, FastEthernet0/0 172.16.0.0/24 is subnetted, 4 subnets C 172.16.0.0 is directly continued, Ethernet0/0/0 O 172.16.1.0 [110/11] via 1.one.i.2, 00:10:04, FastEthernet0/1 O 172.16.ii.0 [110/12] via one.ane.ane.thirteen, 00:09:24, FastEthernet0/0 [110/12] via ane.1.1.two, 00:09:24, FastEthernet0/i O 172.16.3.0 [110/11] via ane.1.1.13, 00:10:04, FastEthernet0/0
The start matter that should draw your attention are the words "direct connected", represented past the letter of the alphabet C to the left. These are routes that were not distributed via OSPF, but are networks that are directly continued to the router. The router inherently knows of these networks, and so there'due south no demand to hear about them from some other router. Given our topology, at that place should always be exactly three of these, no thing which router we're looking at.
The other routes are represented by an "O" to the left, which identifies them as routes received via an OSPF neighbor relationship. These are networks that are not straight connected to this router, and were announced past another router on the network.
If there was a "dominion of thumb" with regards to routing, it would exist "The about specific route wins". This means that the route with the longest subnet prefix that matches a given bundle's destination IP address volition be used to route that packet. When there is a tie, there are other mechanisms that let a route to be selected, such as authoritative distance, and metric.
Notice that the routing tabular array is broken upward into two parts:
1.0.0.0/30 is subnetted, iv subnets ...... 172.16.0.0/24 is subnetted, 4 subnets ......
This is considering routing tables look at these routes start in a classful way. For instance, 1.0.0.0 is in Form A address space, and so a natural mask of /8 is causeless. Since all routes in this space are /30, the router lets u.s.a. know that this space has been subnetted, and even gives us the number of subnets present in this space. The same can be said for the 172.16.0.0 routes, since the natural mask for this Class B address space is a /sixteen. Since we're using masks that are not "the norm" for these address spaces, it is letting us know that this address space has been subnetted.
Let's expect specifically at one of the routes, and nosotros'll suspension it downwardly into it's components so that we can properly define them:
O 172.sixteen.ane.0 [110/11] via 1.ane.i.two, 00:ten:04, FastEthernet0/one
This detail route represents how R0 should transport packets to the LAN that'south straight connected to R1. The first component of this route is the "O", indicating that this road was obtained via OSPF (There is a legend in the output of "bear witness ip route" for these letters only I took it out for the purpose of this explanation).
Next, we meet "172.sixteen.ane.0". This is the remote network that the route represents.
Side by side, there's a section that's all likewise ofttimes overlooked. Within these brackets we see two numbers. First, the value 110 represents the administrative distance of this route. Administrative distance determines how trustworthy this route is. If in that location is a similar route simply with a smaller administrative distance, information technology is used instead, because it is more "trustworthy". The smaller the administrative distance, the more trustworthy the route. (It is hidden in the output shown above, but directly connected routes have an administrative distance of 0, which makes them the most trustworthy type of route.) The 2d number, 11, represents the metric for the given routing protocol. The metric varies from protocol to protocol, but OSPF is what nosotros're using, and the metric for OSPF is cost, which indicates the best quality path to use to forward packets. Cisco IOS derives this value primarily through bandwidth. (Other protocols, like RIP, apply hop count equally a metric. For neighboring routers, yous'd run across a metric value of i.)
Next, we see "via 1.one.one.2". This tells us that this road is available through the adjacent hop router located at that IP Accost, which happens to be R1. This is an important component of ip routing, as it identifies exactly where packets go when they match this road.
The next office says "00:10:04". This is the length of time that this route has been present in the routing table. This detail route has been present for ten minutes and 4 seconds. This is therefore also the length of time this route has existed without an update. If the route were removed and then re-added (if the cablevision was disconnected, for instance), this timer would begin over again at 00:00:00.
Finally, we run into an interface name, specifically, FastEthernet0/1. This indicates which interface is used to go to the adjacent-hop address for this route. Looking at our topology diagram, we encounter that this interface is used to connect R0 to R1, so this is right.
Demo
And then, we go far at our practical demonstration. We'd like to perform a ping from PC1 to PC2. Tin can you identify which route will exist used to get in that location?
O 172.16.2.0 [110/12] via i.1.i.13, 00:09:24, FastEthernet0/0 [110/12] via 1.ane.i.2, 00:09:24, FastEthernet0/1
Based on this specific route, the packets from PC1 will be sent to R0, and so to either R1 or R3. We know this because these are the routers that apply the next-hop addresses specified in the route. In improver, both the administrative distance values and the metrics are the same. This is because both routes were obtained through OSPF, and all links in question accept the aforementioned toll.
These packets crave one and only one route to get to the destination, so which one is used? Lets run a traceroute on PC1 to PC2 to and see which route this traffic takes:
PC1>tracert 172.xvi.2.ii Tracing route to 172.xvi.two.2 over a maximum of 30 hops: 1 63 ms 63 ms 63 ms 172.16.0.i 2 94 ms 94 ms 51 ms 1.1.1.13 3 125 ms 125 ms 112 ms 1.1.1.9 four 175 ms 188 ms 156 ms 172.16.two.2 Trace consummate. PC1>
And then it looks like the first hop later R0 is 1.1.i.xiii, which is R3. And so, we take our reply. Or exercise we? Lets run that trace over again, with no changes to our routing configuration:
PC1>tracert 172.16.2.2 Tracing route to 172.xvi.2.2 over a maximum of thirty hops: 1 47 ms 63 ms 49 ms 172.16.0.1 2 94 ms 94 ms 94 ms 1.1.1.ii iii 109 ms 125 ms 93 ms 1.i.i.6 iv 187 ms 172 ms 156 ms 172.16.two.2 Trace complete. PC1>
Wait a second! We now have a different adjacent-hop after R0. Instead, the next hop is now R1.
The reason for this is that OSPF is performing automatic load balancing on this route. Since the two next-hops for the route to 172.xvi.2.0/24 from R0's perspective were substantially tied, R0 is load balancing traffic between the 2 possible routes. This gets into a bit more advanced topics concerning OSPF, so I'll salvage that for another day.
In the meantime, we've learned how a routing table works, and how routes are decided. In the event of a tie, in that location are certain measures, some manual, some automatic (as nosotros've seen with OSPF) that tin be used to pause the necktie.
For more on route selection on Cisco routers, encounter http://www.cisco.com/en/The states/tech/tk365/technologies_tech_note09186a0080094823.shtml
Source: https://oswalt.dev/2011/07/the-anatomy-of-show-ip-route/
Enregistrer un commentaire for "Read Output of Show Ip Route Command"