You are on page 1of 13

How to Create Routing Table in Cisco

Packet Tracer

By

Apex TG India Pvt Ltd


http://www.apextgi.in

The Routing Table

Before we begin lets see lets discuss the


routing table and directly connected routes.
This is information which is not in the
curriculum, but will give you a better
understanding of what is taking place.

Directly Connected Networks and the IP Routing Table


192.168.2.0/24
e0
.1

172.16.0.0/16
RTA

s0

s0

.1

.2

192.168.1.0/24
RTB

s1

s1

.1

.2

10.0.0.0/8
RTC

e0
.1

RTA#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is not set
RTA#

The Routing Table prior to any interface configuration

The command to view the IP Routing table is: (priviledge or user mode)

Router# show ip route

Currently, no routes in the routing table.

Directly Connected Networks and the IP Routing Table

192.168.2.0/24
e0
.1

172.16.0.0/16
RTA

s0

s0

.1

.2

192.168.1.0/24
RTB

s1

s1

.1

.2

10.0.0.0/8
RTC

e0
.1

RTA(config)#inter e 0
RTA(config-if)#ip add 192.168.2.1 255.255.255.0
RTA(config-if)#no shutdown
RTA#show ip route
Codes: C - connected,.. <Other codes and gateway information omitted>
C
192.168.2.0/24 is directly connected, Ethernet0
RTA#

Adding an ip address/mask to an interface tells the router that it is a member, Directly


Connected to that network just like when a host computer is configured with an ip
address/mask.
Notice the route is shown with the subnet mask and the exit-interface.
Dont forget the no shutdown
Dont forget the interface must be in up and up

Directly Connected Networks and the IP Routing Table

RTA# debug ip routing


RTA(config)#inter e 0
RTA(config-if)#ip add 192.168.2.1 255.255.255.0
RTA(config-if)#no shutdown
00:28:56: RT: add 192.168.2.0/24 via 0.0.0.0, connected metric [0/0]
00:28:56: RT: interface Ethernet0 added to routing table
RTA#show ip route
Codes: C - connected,.. <Other codes and gateway information omitted>
C
192.168.2.0/24 is directly connected, Ethernet0
RTA# undebug all

Viewing the Routing Table Process

Use the debug ip routing command to view the Cisco IOS routing table process of adding a
directly connected network to the routing table.
When finished, be sure to use undebug all
Debug commands are used to view detailed information about Cisco IOS processes more
later.

Directly Connected Networks and the IP Routing Table

RTA# debug ip routing


RTA(config)#inter e 0
RTA(config-if)#shutdown
00:34:38: RT: interface Ethernet0 removed from routing table
00:34:38: RT: del 192.168.2.0 via 0.0.0.0, connected metric [0/0]
00:34:38: RT: delete network route to 192.168.2.0
RTA#show ip route
Codes: C - connected,.. <Other codes and gateway information omitted>

RTA# undebug all

Viewing the Routing Table Process

Directly connected routes will also be removed if the link goes down.
Directly connected routes will only be in the routing table if, it is not administratively down, the
line is up and protocol is up
For serial interfaces, dont forget the clock rate command on the router with the DCE cable
neither interface will be up and up until both ends are configured correctly.
6

Directly Connected Networks and the IP Routing Table


192.168.2.0/24
e0
.1

172.16.0.0/16
RTA

s0

s0

.1

.2

192.168.1.0/24
RTB

s1

s1

.1

.2

10.0.0.0/8
RTC

e0
.1

RTA#show ip route
Codes: C - connected,.. <Other codes and gateway information omitted>
C
172.16.0.0/16 is directly connected, Serial0
C
192.168.2.0/24 is directly connected, Ethernet0
RTB#show ip route
Codes: C - connected,.. <Other codes and gateway information omitted>
C
172.16.0.0/16 is directly connected, Serial0
C
192.168.1.0/24 is directly connected, Serial1
RTC#show ip route
Codes: C - connected,.. <Other codes and gateway information omitted>
C
10.0.0.0/8 is directly connected, Ethernet0
C
192.168.1.0/24 is directly connected, Serial1

The Routing Tables

Notice that the routers only know about their own directly connected networks.
7
They are not sharing routing information because we have not configured any static routes or dynamic routing
protocols.

Directly Connected Networks and the IP Routing Table

192.168.2.0/24
e0
.1

172.16.0.0/16
RTA

s0

s0

.1

.2

192.168.1.0/24
RTB

s1

s1

.1

.2

10.1.0.0/16
RTC

e0
.1

RTC(config)#inter e 0
RTC(config-if)#ip add 10.1.0.1 255.255.0.0
RTC#show ip route
Codes: C - connected,.. <Other codes and gateway information omitted>
10.0.0.0/16 is subnetted, 1 subnets
C
10.1.0.0 is directly connected, Ethernet0
C
192.168.1.0/24 is directly connected, Serial1
RTC#

Configuring an interface which has a subnet mask greater than the classful mask

We will discuss this in much more detail later using the presentation The Routing Table.
For now, notice that when the subnet mask is not a classful mask, but a subnetted /16 mask.
The routing table information shows the route to the subnetted network
The mask is shown in the above, parent classful network.

Directly Connected Networks and the IP Routing Table


192.168.2.0/24
e0

172.16.0.0/16
RTA

.1

s0

s0

.1

.2

192.168.1.0/24
RTB

s1

s1

.1

.2

10.1.0.0/16
RTC

e0
.1

RTA#show ip route
C
172.16.0.0/16 is directly connected, Serial0
C
192.168.2.0/24 is directly connected, Ethernet0
RTA#ping 172.16.0.1
!!!!!
RTA#ping 172.16.0.2
!!!!!
RTA#ping 192.168.1.1
.....
RTA#ping 192.168.1.2
.....
RTA#ping 10.1.0.1
.....

Routing Only directly connected hosts (routers)

Routers can only reach networks known about in its own routing table.

Directly Connected Networks and the IP Routing Table

192.168.2.0/24
e0

172.16.0.0/16
RTA

.1

s0

s0

.1

.2

192.168.1.0/24
RTB

s1

s1

.1

.2

10.1.0.0/16
RTC

e0
.1

RTA#show ip route
C
172.16.0.0/16 is directly connected, Serial0
C
192.168.2.0/24 is directly connected, Ethernet0
RTA#ping 172.16.0.1
Sending 5, 100-byte ICMP Echos to 172.16.0.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/57/60 ms
RTA#ping 172.16.0.2
!!!!!

Routing Routing tables must have the necessary network routes

Question: If RTA can ping RTBs 172.16.0.2 interface why cant it ping RTBs 192.168.1.1 interface? - RTA
does not have a route to it in its routing table.
Question: Would an extended ping from RTA, using the source IP address of 192.168.2.1 be able to ping
172.16.0.1 on RTB? Why or why not? Where does the echo request or echo reply fail?
10

Directly Connected Networks and the IP Routing Table


192.168.2.0/24
e0
.1

172.16.0.0/16
RTA

s0

s0

.1

.2

192.168.1.0/24
RTB

s1

s1

.1

.2

10.1.0.0/16
RTC

e0
.1

RTA#show ip route
C
172.16.0.0/16 is directly connected, Serial0
C
192.168.2.0/24 is directly connected, Ethernet0
RTB#show ip route
Codes: C - connected,.. <Other codes and gateway information omitted>
C
172.16.0.0/16 is directly connected, Serial0
C
192.168.1.0/24 is directly connected, Serial1
RTA#ping
Protocol [ip]:
Target IP address: 172.16.0.2
Extended commands [n]: y
Source address or interface: 192.168.2.1
Sending 5, 100-byte ICMP Echos to 172.16.0.2, timeout is 2 seconds:
.....

Routing Routing tables must have the necessary network routes

Question: Would an extended ping from RTA, using the source IP address of 192.168.2.1 be able to ping
172.16.0.1 on RTB? Why or why not?
The echo request from RTA reaches RTB because RTA has a route to 172.16.0.0/16 in its routing table.
However, the echo reply from RTB back to RTA fails, because RTB does not have a route for 192.168.2.0/24
11
in its routing table.

Directly Connected Networks and the IP Routing Table


192.168.2.0/24
e0
.1

172.16.0.0/16
RTA

s0

s0

.1

.2

192.168.1.0/24
RTB

s1

s1

.1

.2

10.1.0.0/16
RTC

e0
.1

RTA#show ip route
Codes: C - connected,.. <Other codes and gateway information omitted>
C
172.16.0.0/16 is directly connected, Serial0
C
192.168.2.0/24 is directly connected, Ethernet0
RTB#show ip route
Codes: C - connected,.. <Other codes and gateway information omitted>
C
172.16.0.0/16 is directly connected, Serial0
C
192.168.1.0/24 is directly connected, Serial1
RTC#show ip route
Codes: C - connected,.. <Other codes and gateway information omitted>
10.0.0.0/16 is subnetted, 1 subnets
C
10.1.0.0 is directly connected, Ethernet0
C
192.168.1.0/24 is directly connected, Serial1

Routing Table Principles Revisited (Zinin, Cisco IP Routing)

Every router makes its decision alone, based on the information it has in its own routing table.
The fact that one router has certain information in its routing table does not mean that other routers have the
same information.
12
Routing information about a path from one network to another does not provide routing information about the
reverse, or return path.

Thanks
Say Connected for more chapters on Routing
Follow us on

Facebook

Twitter

Google+

You might also like