There are two ways you can configure two routers so that hosts existing on one router can communicate with hosts exiting on the second router. The first is by configuring a static route on the routers, while the second method is by configuring a dynamic routing protocol on each of the routers.
In this article, I will guide you through how to configure two routers in Cisco Packet Tracer using static routes. Static route configuration can further be done using two methods: the first is using the Graphic User Interface (GUI), and the second is using the Command-Line Interface (CLI). We will cover both in this post.
Here is a video Tutorial on How to Configure Two Routers In Cisco Packet Tracer;
Network Topology
To keep things simple, the topology we will be using in this article will consist of two routers, two switches, and an end-host device per switch.
Our goal in this article is to be able to ping from the PC on LAN A to the PC on LAN B and Vice versa.
Here is a table of the IPs We will be using in this article
Device | Interface | IP address | Network address |
---|---|---|---|
Router 0 | g0/0/0 | 192.168.2.3 | 192.168.2.0 |
g0/0/1 | 192.168.1.2 | 192.168.1.0 | |
Router 1 | g0/0/0 | 192.168.1.4 | 192.168.1.0 |
g0/0/1 | 192.168.3.3 | 192.168.3.0 | |
PC 0 | fastethernet0 | 192.168.3.7 | 192.168.3.0 |
PC 1 | fastethernet0 | 192.168.2.7 | 192.168.2.0 |
How to Configure two Routers Using the Graphical User Interface (GUI)
The GUI allows you to configure the router by simply clicking on its icon in the network topology. This opens a configuration window where you can set up IP addresses, configure interfaces, define static routes, and make other network-related settings.
Here are the steps to configure two routers using the GUI.
Step 1: Assign IP addresses to the router’s interface
First Router
Select Router 0 to access the configuration options. Then Click on the “Config” tab and select the “FastEthernet0/0” interface.
Assign the IP address; 192.168.2.3 to this interface (g0/0/0) and the subnet mask of 255.255.255.0, and then turn on the port status.
Navigate to the interface (0/0/1), and assign the IP address; 192.168.1.2 (subnet mask 255.255.255.0).
Second Router
Follow the same steps we took in router 0 and configure router 1 with IP addresses shown in the topology below (Let me know in the comment if you encounter any issue).
Step 2: Assign IP addresses to the PCs.
Tap on the first PC to access the configuration options, and then navigate to the “config tab”. Then Select fastEthernet0 and assign the correct IP address; 192.168.3.7.
Go to the setting tab and assign the default gateway IP address.
Note: The default gateway IP address is the IP address of the interface of the router that the PC is connected to.
Follow the above steps to assign IP address and default gateway IP address to the second PC as indicated in the Network topology above.
Step 3: Configure static route
Each router has a routing table that it uses to forward data packets to the next router until they reach their destination. This routing table can be obtained dynamically or configured manually by network engineers.
Here are the steps to configure static route using the GUI:
First router (Router 0)
- Click on Router 0 to access its configuration options.
- Navigate to the “Config” tab and select “Routing” (Refer to the image below).
- Choose the “Static” tab (You will see a field for network address and Next hop).
- In the “Network Address” field, enter the Network address of Router 1 (Interface g0/0/1), which is 192.168.3.0 as indicated in the network topology above.
- Enter the subnet mask of the network, which would typically be 255.255.255.0.
- In the “Next Hop” field, enter the IP address of the interface of the next router, which is 192.168.1.4 (Router 1, interface g0/0/0).
- Save the configuration by clicking “Add”.
Second Router (Router1)
Follow the same steps as in above to configure the routing table for the second routers. The IP address you should used is the one in image below
Also Read: How To Configure 3 Routers In Packet Tracer
Step 4: Verify the connectivity
To verify connectivity between the two PCs, enter simulation Mode and send a packet from one PC to another.
Alternatively, You can also verify connectivity between the PCs by going to the command prompt of one PC and then pinging the IP address of the second PC. As shown in the image below; we had successful reply.
Also Read: How To Configure 3 Routers In Packet Tracer
How to Configure Two Routers Using the Command Line Interface (CLI)
Another method to configure two routers in cisco packet tracer is using CLI. CLI allows you establish connectivity between two devices in the network using command.
Here are the steps to configure two routers in Cisco Packet Tracer using the CLI:
Step 1: assign an IP address to the Router interfaces
Router 0
- Select Router 0 and navigate to the CLI tab.
- Enter the following commands consecutively in the CLI to configure the interface g0/0/0 of Router 0:
enable
configure terminal
interface g0/0/0
ip address 192.168.2.3 255.255.255.0
no shutdown
Enter the following commands consecutively in the CLI to configure the interface g0/0/1 of Router 0
interface g0/0/1
ip address 192.168.1.2 255.255.255.0
no shutdown
Router 1
- Access the CLI of Router 1 and enter the following commands consecutively to configure it.
enable
configure terminal
interface g0/0/0
ip address 192.168.1.4 255.255.255.0
no shutdown
- Enter the following commands consecutively in the CLI to configure the interface g0/0/1 of Router 1.
interface g0/0/1
ip address 192.168.3.3 255.255.255.0
no shutdown
Step 2: Configure the two PCS
Follow the same steps we took in GUI to assign IP address to the two PCs. Remember to add the default gateways as the IP address of the interface of the router the PC is connected to.
Step 3: Configure static route Using CLI.
- Access the CLI of Router 0 and enter the following commands to configure the next hop address and the network address.
enable
configure terminal
ip route 192.168.3.0 255.255.255.0 192.168.1.4
- Access the CLI of Router 1 and enter the following commands to configure the next hop address and the network address.
enable configure terminal
ip route 192.168.2.0 255.255.255.0 192.168.1.2
Step 4: Verify connectivity
Verify connectivity by pinging from one of the PC to another. The result I obtained when I pinged is as shown below.
Note: There was 50% loss of packet at first attempt because of ARP
Also Read: How To Configure 3 Routers In Packet Tracer
I am a passionate Networking Associate specializing in Telecommunications.
With a degree in Electronic engineering, I possess a strong understanding of electronic systems and the intricacies of telecommunications networks. I gained practical experience and valuable insights working for a prominent telecommunications company.
Additionally, I hold certifications in networking, which have solidified my expertise in network architecture, protocols, and optimization.
Through my writing skills, I aim to provide accurate and valuable knowledge in the networking field.
Connect with me on social media using the links below for more insights.
You can contact me using [email protected] or connect with me using any of the social media account linked below
I’m a student of computer networking but I need more videos tutorial to follow them up for my practical class.
Hello
You can visit our Youtube channel to see videos that will help you with your practical class.