Friday, October 14, 2011

Examining the Routing Table / The show ip route command

Examining the Routing Table 
The show ip route command 
9.1.1 This page will explain the functions of the show ip route command.
One of the primary functions of a router is to determine the best path to a given destination. A router learns paths, which are also called routes, from the configurations entered by an administrator or from other routers through routing protocols. Routers store this routing information in routing tables using on-board random access memory (RAM). A routing table contains a list of the best available routes. Routers use the routing table to make packet forwarding decisions.
The show ip route command displays the contents of the IP routing table. This table contains entries for all known networks and subnetworks, as well as a code that indicates how that information was learned. The following are some additional commands that can be used with the show ip route command:
  • show ip route connected
  • show ip routeaddress
  • show ip route rip
  • show ip route igrp
  • show ip route static
A routing table maps network prefixes to an outbound interface. When RTA receives a packet destined for 192.168.4.46, it looks for the prefix 192.168.4.0/24 in its table. RTA then forwards the packet out interface Ethernet0 based on the routing table entry. If RTA receives a packet destined for 10.3.21.5, it sends that packet out Serial 0/0.
The example routing table shows four routes for directly connected networks. These routes are labeled with a C. RTA drops any packet destined for a network that is not listed in the routing table. The routing table for RTA will have to include more routes before it can forward to other destinations. There are two ways to add new routes:
  • Static routing - An administrator manually defines routes to one or more destination networks.
  • Dynamic routing - Routers follow rules defined by a routing protocol to exchange routing information and independently select the best path.
Administratively defined routes are said to be static because they do not change until a network administrator manually programs the changes. Routes learned from other routers are dynamic because they change automatically as directly connected routers update each other with new information. Each method has fundamental advantages and disadvantages. 
The Lab Activity will allow students to use the show ip route command to examine routing tables.
The next page will define a gateway of last resort.

No comments:

Post a Comment