A simple routing example By using the command show ip route

A simple routing example
By using the command
show ip route
in Table 3.1, you can see the routing table (map of
the internetwork) that Lab_A uses to make forwarding decisions:
And here is the output of the routing table:
Lab_A#
sh ip route
[output cut]
Gateway of last resort is not set
C 10.10.10.0/24 is directly connected, FastEthernet0/0
C 10.10.20.0/24 is directly connected, FastEthernet0/1
C 10.10.30.0/24 is directly connected, FastEthernet0/2
C 10.10.40.0/24 is directly connected, Serial 0/0
Let’s take a look at the information you get from the routing table. All the way to the left
in each of the listings is a
C
. Now, if you look at a routing table on a real router, you will see
a legend right above the table. The
C
tells you that each of these networks is directly connected
to this router. I will be talking about many more of the codes in the legend as we go along. The
next bit of information from the listings is the actual network that the router knows about.
The table then tells you that each of the entries is directly connected and finally the interface
you have to send packets out of to reach the given network.
For another example, look at the output of a corporate router’s routing table, and it will
say you have now turned on RIP:
Corp#
sh ip route
[output cut]
R 192.168.215.0 [120/2] via 192.168.20.2, 00:00:23, Serial0/0
R 192.168.115.0 [120/1] via 192.168.20.2, 00:00:23, Serial0/0
R 192.168.30.0 [120/1] via 192.168.20.2, 00:00:23, Serial0/0
C 192.168.20.0 is directly connected, Serial0/0
C 192.168.214.0 is directly connected, FastEthernet0/0
You can now see there is a little bit more information the routing table is displaying to you.
Again, from the far left there is an
R
. The
R
tells you that this entry or route was learned by
the router through the RIP routing protocol. The entry displays the network for you again, but
now you can see some new pieces. The two numbers in the brackets are important. The first
number tells the administrative distance of the route. The second number gives you the metric
of the route.
Corp#
sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2,
ia - IS-IS inter area, * - candidate default, U - per-user static route, o -
ODR, P - periodic downloaded static route
Gateway of last resort is not set
10.0.0.0/24 is subnetted, 1 subnets
C 10.1.1.0 is directly connected, FastEthernet0/1
Corp#
Here is the output of the entire top portion of the routing table so you can see all the routing
codes: