Beginners Guide to Routing in Cisco Packet Tracer

Shreeya Chatterji
Google Developer Student Clubs TIET
11 min readApr 26, 2023

In this article📝, I will be telling you about how you can get started with creating your first-ever computer network💻 on Cisco Packet tracer. So gear up and let’s start learning! 🎉✨

Photo by Moritz Kindler on Unsplash

Routing is a fundamental aspect of networking. Understanding how to configure routers and routing protocols is essential for any network engineer and a stepping stone for anyone trying to explore computer networking.

So let me formally introduce you to “Routing”.

According to Cisco-

Routing is the process of selecting and defining paths for IP-packet traffic within or between networks as well as the process of managing network traffic overall.

In layman's terms, routing is the process of connecting and configuring routers to be used for inter-device communication. A router is a device that connects two or more networks or subnetworks.

Although right now these terms can seem very intimidating for a beginner however we will understand more when we start executing this practically on Cisco Packet Tracer.

Why Cisco Packet Tracer?

Having used many networking tools like GNS3 and NetSim I have come to realise from personal experience that Cisco Packet Tracer is the most user-friendly and easy-to-use networking tool out there. It is easy to install and perfect for beginners to have a hassle-free learning experience.

For the same reason, I will be using Cisco Packet Tracer for this tutorial. If you do not have Cisco Packet Tracer installed on your device then you can refer to the links given below:

Getting Started:

Without further ado let’s jump into the implementation. I will be explaining each step so do not worry, you can get this done ✨✨

STEP 1: CREATING THE TOPOLOGY

First of all, we will be creating the basic structure of the practice network which will look as follows:

(a)Devices used and where to find them in the Cisco packet tracer:

Go to the very bottom of the CPT(Cisco Packet Tracer) window and you will find something that looks like this:

Fig 0.1: The network component box is where you will find all your devices to create the required topology

I recommend exploring this network box to see all the components available for usage as it will be very helpful whenever you try to build something new. For now, this is where I found the devices used in this tutorial:

Router2811: [network devices]->[Routers]->2811

Switch2960: [network devices]->[Switches]->2960

PC: [End Devices]->[PC]

Connections: [Connections](you can easily see it by a ⚡kinda symbol.

The inter-router connections are made by the SerialDTE connection (A red Zig-Zag symbol)

The connections from the switch and PC are made easily by the ⚡ connection which automatically chooses the type of connection that is most apt for the device.

(b) Adding Ports to Routers:

If you simply try to use the Serial DTE connection to connect the routers you will realise it can’t be done as by default there are no serial ports available in the routers. We have to manually add serial ports to the routers and it can be done by following the steps below:

  1. Click on any of the routers: A window like this will pop up.
Fig 0.2: The default setup of the Router

Click on 1 to turn off the router as changes to ports can only be made when the router is turned off.

Click on 2 as WIC-1T is the serial port that we want to insert into the router. The 1-port serial WAN interface card (WIC-1T) provides serial connections to remote sites or legacy serial network devices such as Synchronous Data Link Control (SDLC) concentrators, alarm systems, and packet over SONET (POS) devices.

Fig 0.3: Inside WIC-1T when the router is turned OFF.

Simply drag and drop the port from (3) to (4). You can add as many Serial Ports as you like (1–4) according to requirement. For demonstration purposes, I have added 2 ports.

After this turn ON the router using (1) and wait for some time till the router can fully boot.

Repeat this on all the 3 routers.

Currently, your topology should look like this:

Fig 1.1: Topology without a connection

Use ⚡(Automatically choose connection type) connection to connect PC0-Switch0, PC1-Switch1, Router1-Switch0 and Router2-Switch1.

Use Serial DTE(Red Zig-Zag symbol) to connect Router1-Router0 and Router0-Router2. [❗NOTE: While making this connection you will have to choose your serial ports from the ones that you just added other ports if chosen will not work.]

After this, your topology should look like this:

Fig1.2: Topology with connections

NOTE:

The components are slightly tilted to make sure all labellings are fairly visibly. If your topology is not showing the port labelling like Fa0/0 or Se0/0/0 in the options tab click Options->Preferences (or simply do Ctrl+R) and make sure that “Always Show Port Labels in Logical Workspace” is checked. Once selected your topology should look the same as mine.

P.S.- Try to use the same serial ports as I have as it might later cause confusion while configuring the router. You may change the Router names by selecting the router and heading to the config tab.

Congratulations🎉✨ we are done with creating the topology. Let us try to get the setup to work (all red all the red arrows to green by configuring the routers and assigning IP addresses to the PCs and Routers.

STEP 2: PLAN OUT THE IP ADDRESSES THAT YOU WANT TO ASSIGN

If you are making this network for a given assignment there is a high chance that the IP addresses for the devices will be already provided to you in the assignment. If not then bring out your copy and pen and figure out the addresses you want to assign to the network.

How to assign your IP addresses?

This article is majorly focused on the implementation of the network so I will not be diving too deep into subnetting here. If you guys want me to write an easy-to-understand article on subnetting please make sure to let me know, I’ll get to it ASAP ✨.

Just for a simple introduction. Here is the definition of subnetting according to my understanding:

Subnetting is the procedure of dividing a large network into smaller subparts. This is essential to build systems that are efficient, organised, reduce traffic, and enhances network security.

There are two types of subnetting- Classful and Classless. I’d highly suggest you do some surfing on the internet on this topic.

For this, you need not have an in-depth knowledge of subnetting you can simply use the IP addresses I have used and later on in another article, I will tell you all about subnetting.

Here is an updated network topology where I have labelled the devices with their relevant IP addresses. You should also label your devices as later while configuring the devices they will come very handy and you will not have to constantly try to figure out which IP address belongs to which device. That is why planning out the IP address before configuring is a crucial step while building your network.

Fig1.3: Topology with labelling

To label your topology simply press “N” and click anywhere on your workspace and a writing option will open.

If you want to know more about the labels here is some explanation. Don’t worry if you do not understand something here as you can easily learn about them once you know about subnetting. [You can skip the below bullet points if you want.]

  • The addresses placed on the wires are the network address for the devices being connected by the wire. This is an identifying address for the network. As you will notice the devices connected to the given network only differ in the last octet ie, the last number after the 3rd dot in the address.
  • The number after the “/” is indicating the subnet mask of the IP address.

Next comes the most important part of getting your network to work. So best of luck ✨

STEP 3: CONFIGURING THE DEVICES

To configure the routers we will be writing commands in the CLI of each of the routers. You can find your router’s CLI by:

  • Click on your router
  • Head to the CLI tab at the top navigation bar of the pop-up
  • Click inside the CLI to start the configuration.

This is how the CLI tab looks:

Fig1.4: CLI Of Router0

CONFIGURING ROUTERS:

(a) Router 0

Inside the CLI of Router0 do the following:

Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int Se0/0/0
Router(config-if)#ip add 100.1.1.1 255.255.255.0
Router(config-if)#no shut

This is the first part of the code. Let me explain each command:

  • en — Enable. This enables your router to be configured by writing commands
  • config t — This allows you to start configuring the router
  • int Se0/0/0 — Choosing the Se0/0/0 ie, the exact name of the port whose IP address you want to set
  • ip add 100.1.1.1 255.255.255.0 — Setting the ports IP address to 100.1.1.1 where 255.255.255.0 is the subnet mask (class C)
  • no shut — this command stops the router from shutting down amid the configuration of other routers.

This code pattern is repeated to configure the other port’s IP address too.

Router(config-if)#int Se0/1/0
Router(config-if)#ip add 20.1.1.1 255.255.255.0
Router(config-if)#no shut

Now that we have configured both the ports we do the RIP routing of the router. Here we are using RIP version 2 which is the most widely used version in today’s world.

What is RIP?

The full form of RIP is Routing Information Protocol. It defines where the packets(data being sent and received in the network) are allowed to move and helps avoid looping problems in the network.

Here are the RIP configuration steps:

Router(config-if)#ex
Router(config)#router rip
Router(config-router)#ver 2
Router(config-router)#net 20.1.1.0
Router(config-router)#net 100.1.1.0
Router(config-router)#end

Explanation:

  • ex- to exit the port where the changes are being made.
  • router rip- to specify that we are beginning RIP configurations.
  • net 20.1.1.0/ net 100.1.1.0- specifying where our packets are moving
  • end- to terminate configurations.

Since we have 100.1.1.1 and 20.1.1.1 as the port IPs we specify the network address of these IPs as the networks where the packets are moving which are 100.1.1.0 and 20.1.1.0 respectively.

Finally, for this router, we run the command:

wr and copy run start

This turns the entire network on and ready for communication.

when shown Destination filename [startup-config]? simply press enter.

We repeat this for the other 2 routers.

Given below is the code for the other two routers. Run each line separately and try to understand what is going on by referring to the above explanation.

✨✨

❗NOTE: It might happen that your network will not work if you do not type the command wr at the end of your configuration before running copy run start. In the CLI snapshots I have not used wr — this is not correct. Please run wr before running copy run start

✨✨

(b) Router 1

Fig 1.5: CLI Configuration of Router 1

NOTE: The text after “%” are lines generated by the CLI itself to indicate the state of the router to the person entering the commands.

(c) Router 2

Fig 1.6: CLI Configuration of Router 2

NOTE: You can press enter as many times as you want after each command. If your command is interrupted by some msg from the CLI simply continue the command or press enter and restart writing the command.

CONFIGURING THE PCs

To set the IPv4 addresses of the PCs follow the steps given below:

  1. Click on the PC whose address you want to set.
  2. At the top click on “Desktop”.
  3. In “Desktop” click on the “IP Configuration” icon.
  4. Set your IP address, Subnet mask and Default Gateway.

Given below are the values for my PCs:

PC 0:

Fig 1.7: Addresses for PC 0

PC 1:

Fig 1.8: Addressing PC 1

Finally, our setup is done!! Phewwww!!! Congrats if you have made it here 🎉🎉

Now let's see our blood, sweat and tears working!

STEP 4: CHECK THE WORKING OF THE NETWORK

Method 1: Pinging the PCs from the Command line

One of the ways to check if our network is fully functional in the Cisco Packet tracer is by checking if pings between the PCs are going through. (Ping is sending msgs.)

Open the command prompt of the PC by :

Click on the PC and go to Desktop-> Command prompt

In the command prompt type: ping <ip address of the PC to which you want to send msg>

This is how my command prompt looks:

PC 0:

Fig 1.9: Ping PC0 to PC1

PC 1:

Fig 2.0: Ping PC1 to PC0

Method 2: Using inbuilt PDU

  • To start this option press “P” on the keyboard (or press 1 in Fig 2.1)
  • Now your mouse will have an envelope on it.
  • Click on the PC from which you want to send ping.
  • Click on the PC to which you want to send ping.
  • The status of the ping should be visible at the bottom right corner of your screen. ( 2 in fig 2.1)

This is how mine looks:

Fig 2.1: Where to see your PDU status.

The Status:

Fig 2.2: The status of the PDU pings

OUR NETWORK CONFIGURATION IS COMPLETE!!

I hope you guys learnt something through this blog. It is a long and cumbersome task indeed. If your network is not working then don’t be disheartened. Throughout my time working with Cisco Packet Tracer I have discovered that networks have a way of not working no matter how accurate you are 😭. Just try out these steps on other simpler networks out there. The main aim is to learn something and I am sure through this blog you have had the opportunity to play a lot with this software.

I have been working with Cisco Packet tracer for the past 6 months as it comes under Computer Networks- a course I am taking this semester of my college. I have tried to be as accurate as possible. Feel free to drop any suggestions in the comments section below.

“Hustle on and Keep Learning! Peace ☮️”

Published originally at https://medium.com/@shreeya.chatz/beginners-guide-to-routing-in-cisco-packet-tracer-608f8a156d94

--

--